Files
kryon/docs/ui-map.json

50 lines
5.5 KiB
JSON

{
"version": 2,
"backend": "native",
"elements": [
{"html": ["html", "body"], "import": "kryon/page", "call": "Draw", "css": "Page", "scope": "opened"},
{"html": ["main", "section"], "import": "kryon/page", "call": "Section", "css": "Section", "scope": "opened"},
{"html": ["article", ".card"], "import": "kryon/card", "call": "Draw", "css": "Card", "content": "result.content"},
{"html": ["div", "form", "ul", "ol"], "import": "kryon/layout", "call": "Draw", "css": "Column", "scope": "opened"},
{"html": ["header"], "import": "kryon/toolbar", "call": "Draw", "css": "Toolbar", "lists": [["options", "kryon/dropdown.Option"], ["actions", "ToolbarAction"]]},
{"html": ["nav"], "import": "kryon/navigation", "call": "Draw", "css": "NavigationBar", "lists": [["items", "NavigationBarItem"]]},
{"html": ["[role=tablist]"], "import": "kryon/tab_bar", "call": "Draw", "css": "TabBar", "lists": [["tabs", "Tab"]]},
{"html": ["h1", "h2", "h3", "h4", "h5", "h6"], "import": "kryon/page", "call": "Heading", "css": "Heading", "props": {"level": 1}, "level_from_tag": true},
{"html": ["p"], "import": "kryon/page", "call": "ParagraphText", "css": "ParagraphText"},
{"html": ["span", "label"], "import": "kryon/text", "call": "Draw", "css": "Text"},
{"html": ["a[href]"], "import": "kryon/link", "call": "Draw", "css": "Link", "event": "open_url"},
{"html": ["button"], "import": "kryon/button", "call": "Draw", "css": "Button"},
{"html": ["input", "input[type=text]", "input[type=search]"], "import": "kryon/text_field", "call": "Bind", "css": "TextField", "state": "State"},
{"html": ["input[type=password]"], "import": "kryon/text_field", "call": "Bind", "css": "TextField", "state": "State", "props": {"secure": true}},
{"html": ["input[type=number]"], "import": "kryon/text_field", "call": "Bind", "css": "TextField", "state": "State", "props": {"numeric": true}},
{"html": ["textarea"], "import": "kryon/text_area", "call": "Draw", "css": "TextArea"},
{"html": ["input[type=checkbox]"], "import": "kryon/checkbox", "call": "Draw", "css": "Checkbox", "event": "changed"},
{"html": ["[role=switch]"], "import": "kryon/toggle", "call": "Draw", "css": "Toggle", "event": "changed"},
{"html": ["input[type=radio]"], "import": "kryon/radio", "call": "Draw", "css": "Radio"},
{"html": ["select"], "import": "kryon/dropdown", "call": "Draw", "css": "Dropdown", "lists": [["options", "Option"]]},
{"html": ["select[multiple]"], "import": "kryon/list_box", "call": "ListBoxMulti", "css": "ListBoxMulti", "lists": [["items", "ListBoxItem"], ["selected", "bool"]]},
{"html": ["input[type=range]"], "import": "kryon/slider", "call": "Draw", "css": "Slider"},
{"html": ["progress"], "import": "kryon/progress", "call": "Draw", "css": "Progress"},
{"html": ["fieldset"], "import": "kryon/fieldset", "call": "Draw", "css": "Fieldset"},
{"html": ["table"], "import": "kryon/layout", "call": "Grid", "css": "Grid", "scope": "container.opened", "items": "kryon/grid.GridItem", "scroll": "kryon/scroll"},
{"html": ["th", "td", "code", "pre", "strong"], "import": "kryon/text", "call": "Draw", "css": "Text"},
{"html": ["details"], "import": "kryon/collapsible", "call": "Draw", "css": "Collapsible", "lists": [["headers", "CollapsibleHeader"]], "content": "result.content"},
{"html": ["dialog"], "import": "kryon/modal", "call": "Draw", "css": "Modal", "scope": "opened"},
{"html": ["hr"], "import": "kryon/separator", "call": "Draw", "css": "Separator"},
{"html": ["li", "[role=listitem]"], "import": "kryon/list_item", "call": "Draw", "css": "Button", "event": "clicked"},
{"html": [".chip", "[role=option]"], "import": "kryon/chip", "call": "Draw", "css": "Button", "event": "changed"},
{"html": [".skeleton", "[aria-busy=true]"], "import": "kryon/skeleton", "call": "Draw", "css": "Box"},
{"html": ["img"], "import": "kryon/image", "call": "Draw", "css": "Image"},
{"html": ["svg"], "import": "kryon/svg_icon", "call": "Draw"}
],
"layouts": [
{"pattern": "display: flex; flex-direction: row", "import": "kryon/layout", "call": "Row", "scope": "opened", "items": "[]Layout.FlexItem", "placements": "[]Layout.FlexPlacement", "child_bounds": "placements[i].bounds", "css": "Row"},
{"pattern": "display: flex; flex-direction: column", "import": "kryon/layout", "call": "Draw", "scope": "opened", "items": "[]Layout.FlexItem", "placements": "[]Layout.FlexPlacement", "child_bounds": "placements[i].bounds", "css": "Column"},
{"pattern": "display: grid", "import": "kryon/layout", "call": "Grid", "css": "Grid", "scope": "container.opened", "items": "kryon/grid.GridItem", "placement": "item_bounds", "cursor_step": "kryon/grid.GridItemStep", "auto_height": "GridItem.measure_height"},
{"pattern": "overflow-y: auto", "import": "kryon/scroll", "call": "Draw", "scope": "opened"}
],
"viewport": {"import": "css/Css", "environment": "CssEnvironmentWithViewportWidth", "install": "CssSheetInstall", "same_media": "CssSheetSameMedia", "features": ["width", "min-width", "max-width"], "units": ["px", "rem", "unitless zero"]},
"grid_columns": {"native": ["1fr", "minmax(0, 1fr)", "repeat(N, 1fr)", "repeat(N, minmax(0, 1fr))", "repeat(auto-fit, minmax(LENGTH, 1fr))", "repeat(auto-fit, minmax(min(LENGTH, 100%), 1fr))"], "full_row": {"html": "grid-column: 1/-1", "prop": "GridItem.column_span", "value": -1}},
"charts": {"import": "plot/Plot", "bounds": "ChartProps.bounds", "line_point_step": "XYChart", "categorical": "BarChart", "matrix": "HeatmapChart", "deltas_and_totals": "WaterfallChart", "ohlc": "TimeCandleChart"}
}