@tartaguti/ui-components 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +12 -0
- package/custom-elements.json +2887 -823
- package/dist/accordion/tt-accordion-item.d.ts.map +1 -1
- package/dist/accordion/tt-accordion-item.js +5 -2
- package/dist/accordion/tt-accordion-item.js.map +1 -1
- package/dist/bento/tt-bento-item.d.ts.map +1 -1
- package/dist/bento/tt-bento-item.js +7 -13
- package/dist/bento/tt-bento-item.js.map +1 -1
- package/dist/docs.d.ts +7 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +15 -0
- package/dist/docs.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/sidebar/tt-menu-group.d.ts.map +1 -1
- package/dist/sidebar/tt-menu-group.js +16 -5
- package/dist/sidebar/tt-menu-group.js.map +1 -1
- package/dist/sidebar/tt-menu-item.d.ts.map +1 -1
- package/dist/sidebar/tt-menu-item.js +24 -11
- package/dist/sidebar/tt-menu-item.js.map +1 -1
- package/dist/sidebar/tt-sidebar-footer.d.ts.map +1 -1
- package/dist/sidebar/tt-sidebar-footer.js +7 -3
- package/dist/sidebar/tt-sidebar-footer.js.map +1 -1
- package/dist/sidebar/tt-sidebar.d.ts +8 -3
- package/dist/sidebar/tt-sidebar.d.ts.map +1 -1
- package/dist/sidebar/tt-sidebar.js +196 -44
- package/dist/sidebar/tt-sidebar.js.map +1 -1
- package/dist/strings.d.ts +64 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +68 -0
- package/dist/strings.js.map +1 -0
- package/dist/tokens.css +30 -6
- package/dist/tt-alert.d.ts.map +1 -1
- package/dist/tt-alert.js +5 -2
- package/dist/tt-alert.js.map +1 -1
- package/dist/tt-auth.d.ts +5 -1
- package/dist/tt-auth.d.ts.map +1 -1
- package/dist/tt-auth.js +72 -10
- package/dist/tt-auth.js.map +1 -1
- package/dist/tt-breadcrumbs.d.ts.map +1 -1
- package/dist/tt-breadcrumbs.js +6 -3
- package/dist/tt-breadcrumbs.js.map +1 -1
- package/dist/tt-button-group.d.ts.map +1 -1
- package/dist/tt-button-group.js +7 -1
- package/dist/tt-button-group.js.map +1 -1
- package/dist/tt-button.d.ts.map +1 -1
- package/dist/tt-button.js +37 -28
- package/dist/tt-button.js.map +1 -1
- package/dist/tt-card.d.ts.map +1 -1
- package/dist/tt-card.js +9 -6
- package/dist/tt-card.js.map +1 -1
- package/dist/tt-chart.d.ts +10 -2
- package/dist/tt-chart.d.ts.map +1 -1
- package/dist/tt-chart.js +167 -29
- package/dist/tt-chart.js.map +1 -1
- package/dist/tt-checkbox.d.ts.map +1 -1
- package/dist/tt-checkbox.js +5 -2
- package/dist/tt-checkbox.js.map +1 -1
- package/dist/tt-code-block.d.ts +4 -5
- package/dist/tt-code-block.d.ts.map +1 -1
- package/dist/tt-code-block.js +53 -17
- package/dist/tt-code-block.js.map +1 -1
- package/dist/tt-combobox.d.ts +14 -0
- package/dist/tt-combobox.d.ts.map +1 -1
- package/dist/tt-combobox.js +234 -31
- package/dist/tt-combobox.js.map +1 -1
- package/dist/tt-company-card.d.ts +18 -0
- package/dist/tt-company-card.d.ts.map +1 -1
- package/dist/tt-company-card.js +73 -4
- package/dist/tt-company-card.js.map +1 -1
- package/dist/tt-comparison-table.d.ts.map +1 -1
- package/dist/tt-comparison-table.js +6 -3
- package/dist/tt-comparison-table.js.map +1 -1
- package/dist/tt-component-doc.d.ts.map +1 -1
- package/dist/tt-component-doc.js +6 -3
- package/dist/tt-component-doc.js.map +1 -1
- package/dist/tt-contact-list.d.ts +17 -2
- package/dist/tt-contact-list.d.ts.map +1 -1
- package/dist/tt-contact-list.js +68 -10
- package/dist/tt-contact-list.js.map +1 -1
- package/dist/tt-copy-button.d.ts.map +1 -1
- package/dist/tt-copy-button.js +6 -3
- package/dist/tt-copy-button.js.map +1 -1
- package/dist/tt-data-table.d.ts +32 -1
- package/dist/tt-data-table.d.ts.map +1 -1
- package/dist/tt-data-table.js +302 -16
- package/dist/tt-data-table.js.map +1 -1
- package/dist/tt-dock-item.d.ts +53 -0
- package/dist/tt-dock-item.d.ts.map +1 -0
- package/dist/tt-dock-item.js +270 -0
- package/dist/tt-dock-item.js.map +1 -0
- package/dist/tt-dock.d.ts +59 -0
- package/dist/tt-dock.d.ts.map +1 -0
- package/dist/tt-dock.js +337 -0
- package/dist/tt-dock.js.map +1 -0
- package/dist/tt-drawer.d.ts +4 -0
- package/dist/tt-drawer.d.ts.map +1 -1
- package/dist/tt-drawer.js +14 -4
- package/dist/tt-drawer.js.map +1 -1
- package/dist/tt-dropdown-menu.d.ts +5 -0
- package/dist/tt-dropdown-menu.d.ts.map +1 -1
- package/dist/tt-dropdown-menu.js +34 -8
- package/dist/tt-dropdown-menu.js.map +1 -1
- package/dist/tt-file-upload.d.ts +35 -0
- package/dist/tt-file-upload.d.ts.map +1 -1
- package/dist/tt-file-upload.js +210 -21
- package/dist/tt-file-upload.js.map +1 -1
- package/dist/tt-filter.d.ts.map +1 -1
- package/dist/tt-filter.js +10 -5
- package/dist/tt-filter.js.map +1 -1
- package/dist/tt-form.d.ts +25 -1
- package/dist/tt-form.d.ts.map +1 -1
- package/dist/tt-form.js +151 -12
- package/dist/tt-form.js.map +1 -1
- package/dist/tt-grid.d.ts +10 -1
- package/dist/tt-grid.d.ts.map +1 -1
- package/dist/tt-grid.js +38 -9
- package/dist/tt-grid.js.map +1 -1
- package/dist/tt-icon.d.ts.map +1 -1
- package/dist/tt-icon.js +5 -0
- package/dist/tt-icon.js.map +1 -1
- package/dist/tt-inbox.d.ts +4 -0
- package/dist/tt-inbox.d.ts.map +1 -1
- package/dist/tt-inbox.js +13 -3
- package/dist/tt-inbox.js.map +1 -1
- package/dist/tt-input.d.ts.map +1 -1
- package/dist/tt-input.js +15 -5
- package/dist/tt-input.js.map +1 -1
- package/dist/tt-key-values.d.ts +2 -0
- package/dist/tt-key-values.d.ts.map +1 -1
- package/dist/tt-key-values.js +45 -2
- package/dist/tt-key-values.js.map +1 -1
- package/dist/tt-layout.d.ts +53 -2
- package/dist/tt-layout.d.ts.map +1 -1
- package/dist/tt-layout.js +233 -27
- package/dist/tt-layout.js.map +1 -1
- package/dist/tt-modal.d.ts +4 -0
- package/dist/tt-modal.d.ts.map +1 -1
- package/dist/tt-modal.js +14 -4
- package/dist/tt-modal.js.map +1 -1
- package/dist/tt-navbar.d.ts +4 -0
- package/dist/tt-navbar.d.ts.map +1 -1
- package/dist/tt-navbar.js +42 -7
- package/dist/tt-navbar.js.map +1 -1
- package/dist/tt-pagination.d.ts +4 -0
- package/dist/tt-pagination.d.ts.map +1 -1
- package/dist/tt-pagination.js +8 -1
- package/dist/tt-pagination.js.map +1 -1
- package/dist/tt-product.d.ts +67 -15
- package/dist/tt-product.d.ts.map +1 -1
- package/dist/tt-product.js +447 -366
- package/dist/tt-product.js.map +1 -1
- package/dist/tt-progress.d.ts +1 -0
- package/dist/tt-progress.d.ts.map +1 -1
- package/dist/tt-progress.js +26 -7
- package/dist/tt-progress.js.map +1 -1
- package/dist/tt-quantity.d.ts.map +1 -1
- package/dist/tt-quantity.js +5 -2
- package/dist/tt-quantity.js.map +1 -1
- package/dist/tt-radio-group.d.ts.map +1 -1
- package/dist/tt-radio-group.js +5 -2
- package/dist/tt-radio-group.js.map +1 -1
- package/dist/tt-scroller.d.ts +76 -0
- package/dist/tt-scroller.d.ts.map +1 -0
- package/dist/tt-scroller.js +525 -0
- package/dist/tt-scroller.js.map +1 -0
- package/dist/tt-search.d.ts.map +1 -1
- package/dist/tt-search.js +10 -5
- package/dist/tt-search.js.map +1 -1
- package/dist/tt-select.d.ts +9 -0
- package/dist/tt-select.d.ts.map +1 -1
- package/dist/tt-select.js +99 -14
- package/dist/tt-select.js.map +1 -1
- package/dist/tt-slider.d.ts.map +1 -1
- package/dist/tt-slider.js +13 -2
- package/dist/tt-slider.js.map +1 -1
- package/dist/tt-social-links.d.ts.map +1 -1
- package/dist/tt-social-links.js +7 -4
- package/dist/tt-social-links.js.map +1 -1
- package/dist/tt-switcher.d.ts +2 -0
- package/dist/tt-switcher.d.ts.map +1 -1
- package/dist/tt-switcher.js +24 -76
- package/dist/tt-switcher.js.map +1 -1
- package/dist/tt-table-row.d.ts.map +1 -1
- package/dist/tt-table-row.js +5 -2
- package/dist/tt-table-row.js.map +1 -1
- package/dist/tt-table.d.ts.map +1 -1
- package/dist/tt-table.js +5 -2
- package/dist/tt-table.js.map +1 -1
- package/dist/tt-tabs.d.ts.map +1 -1
- package/dist/tt-tabs.js +5 -2
- package/dist/tt-tabs.js.map +1 -1
- package/dist/tt-tag-list.d.ts.map +1 -1
- package/dist/tt-tag-list.js +6 -3
- package/dist/tt-tag-list.js.map +1 -1
- package/dist/tt-textarea.d.ts.map +1 -1
- package/dist/tt-textarea.js +5 -2
- package/dist/tt-textarea.js.map +1 -1
- package/dist/tt-toast.d.ts +4 -1
- package/dist/tt-toast.d.ts.map +1 -1
- package/dist/tt-toast.js +40 -6
- package/dist/tt-toast.js.map +1 -1
- package/dist/tt-toggle-group.d.ts.map +1 -1
- package/dist/tt-toggle-group.js +7 -1
- package/dist/tt-toggle-group.js.map +1 -1
- package/dist/tt-toggle.d.ts.map +1 -1
- package/dist/tt-toggle.js +14 -9
- package/dist/tt-toggle.js.map +1 -1
- package/package.json +1 -1
- package/vscode.html-custom-data.json +241 -66
|
@@ -618,6 +618,14 @@
|
|
|
618
618
|
"name": "value",
|
|
619
619
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-combobox>`"
|
|
620
620
|
},
|
|
621
|
+
{
|
|
622
|
+
"name": "multiple",
|
|
623
|
+
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-combobox>`"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "values",
|
|
627
|
+
"description": "The chosen values while `multiple` is on, in the options' order.\n\nType: `string[]`\n\nDefault: `[]`\n\nOn `<tt-combobox>`"
|
|
628
|
+
},
|
|
621
629
|
{
|
|
622
630
|
"name": "options",
|
|
623
631
|
"description": "Type: `SelectOption[]`\n\nDefault: `[]`\n\nOn `<tt-combobox>`"
|
|
@@ -673,7 +681,7 @@
|
|
|
673
681
|
},
|
|
674
682
|
{
|
|
675
683
|
"name": "tt-company-card",
|
|
676
|
-
"description": "**Events:** tt-company-select, tt-company-action",
|
|
684
|
+
"description": "A company in a directory or a search result: logo, name, place, a short\ndescription and tags; selecting it fires tt-company-select.\n\n**Events:** tt-company-select, tt-company-action\n\n**Slots:** badge, meta",
|
|
677
685
|
"attributes": [
|
|
678
686
|
{
|
|
679
687
|
"name": "value",
|
|
@@ -691,6 +699,28 @@
|
|
|
691
699
|
"name": "verified",
|
|
692
700
|
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-company-card>`"
|
|
693
701
|
},
|
|
702
|
+
{
|
|
703
|
+
"name": "status",
|
|
704
|
+
"description": "A tier or state shown as a badge after the name: \"Gold partner\".\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-company-card>`"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "status-variant",
|
|
708
|
+
"description": "Type: `BadgeVariant`\n\nDefault: `\"neutral\"`\n\nOn `<tt-company-card>`",
|
|
709
|
+
"values": [
|
|
710
|
+
{
|
|
711
|
+
"name": "neutral"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "success"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "warning"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"name": "danger"
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
},
|
|
694
724
|
{
|
|
695
725
|
"name": "city",
|
|
696
726
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-company-card>`"
|
|
@@ -852,7 +882,7 @@
|
|
|
852
882
|
},
|
|
853
883
|
{
|
|
854
884
|
"name": "tt-data-table",
|
|
855
|
-
"description": "Working table: sorting, selection, row actions, sticky header, and\nloading and empty states.\n\nIt owns nothing. Sort state and selection come in as properties and\nchanges go out as events, so the page stays the single source of truth\nand can put either in a URL. Sorting itself is the page's job too: it\nknows whether the data is an in-memory array or a server query.\n\n**Events:** tt-selection-change, tt-sort, tt-row-click, tt-row-action",
|
|
885
|
+
"description": "Working table: sorting, selection, row actions, sticky header, and\nloading and empty states. With visible-rows it is virtualized: a box\nthat many rows tall, holding only the rows in view, so ten thousand\nrows scroll as smoothly as ten.\n\nIt owns nothing. Sort state and selection come in as properties and\nchanges go out as events, so the page stays the single source of truth\nand can put either in a URL. Sorting itself is the page's job too: it\nknows whether the data is an in-memory array or a server query.\n\n**Events:** tt-range-change, tt-selection-change, tt-sort, tt-row-click, tt-row-action",
|
|
856
886
|
"attributes": [
|
|
857
887
|
{
|
|
858
888
|
"name": "columns",
|
|
@@ -901,6 +931,10 @@
|
|
|
901
931
|
{
|
|
902
932
|
"name": "clickable-rows",
|
|
903
933
|
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-data-table>`"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "visible-rows",
|
|
937
|
+
"description": "Type: `number`\n\nDefault: `0`\n\nOn `<tt-data-table>`"
|
|
904
938
|
}
|
|
905
939
|
]
|
|
906
940
|
},
|
|
@@ -918,6 +952,72 @@
|
|
|
918
952
|
}
|
|
919
953
|
]
|
|
920
954
|
},
|
|
955
|
+
{
|
|
956
|
+
"name": "tt-dock",
|
|
957
|
+
"description": "A few big targets on one edge of the screen: a phone's tab bar, a\nfloating dock on a desktop, or a column down the side. Holds\ntt-dock-item children and renders a <nav>.\n\n---------------------------------------------------------------------\nWHY A DOCK IS NOT A NAVBAR.\n\nA navbar is the top of a site: a brand, links, actions, all sizes. A\ndock is three to five equal targets in thumb reach. Different job,\ndifferent shape, so a different component.\n\n---------------------------------------------------------------------\nIT TAKES ITS OWN SPACE, SO IT NEVER COVERS THE PAGE.\n\nIt is sticky: it sits where you put it and pins to that edge of\nwhatever scrolls (the window, a preview frame, a builder canvas,\ntt-layout's page). Put a bottom dock last, a top dock first, and a\nside dock beside the content in a row, where it is one screen tall\nlike a sticky sidebar. Being in the flow is what keeps the last line\nof content clear of it: at the end of the page the dock sits after\nthe content, not over it.\n\n---------------------------------------------------------------------\nTHE DOCK OWNS WHICH ITEM IS CURRENT.\n\nAn item's click only asks (tt-dock-select from the item). The dock\nmoves `active` to it, off the others, and sends its own\ntt-dock-select, so a dock with no listener (a pasted snippet, a\ngenerated component) still shows the right current page, and a page\nhears one event, not two. A page that sets `active` itself still wins.\n\n**Events:** tt-dock-select",
|
|
958
|
+
"attributes": [
|
|
959
|
+
{
|
|
960
|
+
"name": "variant",
|
|
961
|
+
"description": "bar: across the whole edge. floating: a pill held off the edge.\n\nType: `DockVariant`\n\nDefault: `\"bar\"`\n\nOn `<tt-dock>`",
|
|
962
|
+
"values": [
|
|
963
|
+
{
|
|
964
|
+
"name": "bar"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"name": "floating"
|
|
968
|
+
}
|
|
969
|
+
]
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "position",
|
|
973
|
+
"description": "The edge it sits on. Top and bottom lay the items in a row; left and right in a column.\n\nType: `DockPosition`\n\nDefault: `\"bottom\"`\n\nOn `<tt-dock>`",
|
|
974
|
+
"values": [
|
|
975
|
+
{
|
|
976
|
+
"name": "bottom"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"name": "top"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"name": "left"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"name": "right"
|
|
986
|
+
}
|
|
987
|
+
]
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"name": "labels-hidden",
|
|
991
|
+
"description": "Icons only. Each label stays as the item's name for a screen reader, and a hint for a mouse.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-dock>`"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "label",
|
|
995
|
+
"description": "Names the navigation for a screen reader, beside any other on the page.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-dock>`"
|
|
996
|
+
}
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "tt-dock-item",
|
|
1001
|
+
"description": "One target in a tt-dock: an icon over a short label, a link or a button.\n\n---------------------------------------------------------------------\nTHE DOCK KEEPS THE STATE, THE ITEM ONLY ASKS.\n\nA click sends `tt-dock-select` and changes nothing here. The dock\nhears it, moves `active` (the current page) and sends its own\n`tt-dock-select`. Only the\ndock can know that choosing one item un-chooses another, the same\nreason tt-accordion owns its items' open state.\n\n---------------------------------------------------------------------\nHOW THE DOCK STYLES IT.\n\nThe dock decides the shape (a bar, a floating pill, a column) and\nwhether labels show. It says so through inherited custom properties\n(`--tt-dock-item-*`, `--tt-dock-label-*`), read below with the\nbar's values as fallbacks, so an item has no props for any of it and\none used outside a dock still looks right.\n\n**Events:** tt-dock-select",
|
|
1002
|
+
"attributes": [
|
|
1003
|
+
{
|
|
1004
|
+
"name": "active",
|
|
1005
|
+
"description": "The current page, announced as aria-current=\"page\". The dock moves\nit when an item is chosen; set it for the start.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-dock-item>`"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"name": "disabled",
|
|
1009
|
+
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-dock-item>`"
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "href",
|
|
1013
|
+
"description": "Makes the item a link. Empty: a button that tells your app it was chosen.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-dock-item>`"
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"name": "value",
|
|
1017
|
+
"description": "Names this item in `tt-dock-select`. Empty: the label text is sent.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-dock-item>`"
|
|
1018
|
+
}
|
|
1019
|
+
]
|
|
1020
|
+
},
|
|
921
1021
|
{
|
|
922
1022
|
"name": "tt-drawer",
|
|
923
1023
|
"description": "A panel that slides in over the page.\n\nUse it instead of a modal when the thing behind still matters: editing\na row without losing your place in the list, or a filter panel you\nadjust while watching results change. A modal says \"deal with this\nfirst\"; a drawer says \"here is more, the list is still there\".\n\n**Events:** tt-close",
|
|
@@ -965,7 +1065,7 @@
|
|
|
965
1065
|
},
|
|
966
1066
|
{
|
|
967
1067
|
"name": "label",
|
|
968
|
-
"description": "Type: `string`\n\nDefault: `\"
|
|
1068
|
+
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-dropdown-menu>`"
|
|
969
1069
|
},
|
|
970
1070
|
{
|
|
971
1071
|
"name": "align",
|
|
@@ -1053,7 +1153,7 @@
|
|
|
1053
1153
|
},
|
|
1054
1154
|
{
|
|
1055
1155
|
"name": "tt-file-upload",
|
|
1056
|
-
"description": "Chooses files, by tapping a button or dropping them on the box. Checks\ntype, size and count before keeping a file, previews images, and\nsubmits the files with its form under `name`.\n\n**Events:** tt-change, tt-reject",
|
|
1156
|
+
"description": "Chooses files, by tapping a button or dropping them on the box. Checks\ntype, size and count before keeping a file, previews images, and\nsubmits the files with its form under `name`.\n\n**Events:** tt-change, tt-reject, tt-retry",
|
|
1057
1157
|
"attributes": [
|
|
1058
1158
|
{
|
|
1059
1159
|
"name": "name",
|
|
@@ -1171,7 +1271,7 @@
|
|
|
1171
1271
|
},
|
|
1172
1272
|
{
|
|
1173
1273
|
"name": "tt-grid",
|
|
1174
|
-
"description": "Responsive grid. By default it auto-fills as many columns as will fit\nat `minWidth`, so it reflows without media queries. Set `columns` for a\nfixed count
|
|
1274
|
+
"description": "Responsive grid. By default it auto-fills as many columns as will fit\nat `minWidth`, so it reflows without media queries. Set `columns` for a\nfixed count on screens wider than 768px; at 768px and below it always\nauto-fills from `minWidth`.",
|
|
1175
1275
|
"attributes": [
|
|
1176
1276
|
{
|
|
1177
1277
|
"name": "min-width",
|
|
@@ -1355,6 +1455,18 @@
|
|
|
1355
1455
|
{
|
|
1356
1456
|
"name": "items",
|
|
1357
1457
|
"description": "Type: `KeyValue[]`\n\nDefault: `[]`\n\nOn `<tt-key-values>`"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"name": "layout",
|
|
1461
|
+
"description": "Type: `KeyValuesLayout`\n\nDefault: `\"columns\"`\n\nOn `<tt-key-values>`",
|
|
1462
|
+
"values": [
|
|
1463
|
+
{
|
|
1464
|
+
"name": "columns"
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
"name": "split"
|
|
1468
|
+
}
|
|
1469
|
+
]
|
|
1358
1470
|
}
|
|
1359
1471
|
]
|
|
1360
1472
|
},
|
|
@@ -1390,8 +1502,17 @@
|
|
|
1390
1502
|
},
|
|
1391
1503
|
{
|
|
1392
1504
|
"name": "tt-layout",
|
|
1393
|
-
"description": "",
|
|
1394
|
-
"attributes": [
|
|
1505
|
+
"description": "The app shell: a navbar across the top, a sidebar down the side and the\npage beside it, with the sidebar turning into a drawer on a phone.\n\n---------------------------------------------------------------------\nTWO WAYS TO SCROLL.\n\nBy default the layout is exactly one screen tall and only the content\narea scrolls, under a fixed bar and beside a fixed sidebar. That is\nthe whole window, and it is what this app's own shell uses.\n\n`contained` keeps the same picture and changes who scrolls: the layout\ngrows with its content and the PAGE scrolls, while the navbar and the\nsidebar stay pinned with position: sticky. Nothing is placed against\nthe window, the phone drawer included, so a contained layout also\nworks inside something smaller than the window: a preview, a design\nin the component builder, a page of documentation.\n\n---------------------------------------------------------------------\nPHONE OR NOT IS ASKED OF THE LAYOUT, NOT THE WINDOW.\n\nThe host is a size container, and the drawer, the navbar's menu button\nand the sidebar's drawer rules all ask the same container query (below\n768px). A media query asks how wide the WINDOW is, which in a builder\ncanvas drawing a 375px phone on a 1440px screen is the wrong question.\nThe container is the host rather than an element inside it, because\nWebKit finds containers through the DOM tree, and the navbar and the\nsidebar are the host's children, not its shadow root's.\n\n**Events:** tt-menu-toggle",
|
|
1506
|
+
"attributes": [
|
|
1507
|
+
{
|
|
1508
|
+
"name": "contained",
|
|
1509
|
+
"description": "Grows with its content and lets the page scroll, with the navbar and\nthe sidebar pinned. Reflected, because the styles match on it.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-layout>`"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"name": "mobile-menu-open",
|
|
1513
|
+
"description": "Whether the phone menu (the sidebar drawer) is open. The layout opens\nand closes it itself: the navbar's menu button, Escape, the backdrop\nand a click on a menu item. It announces the ones it decides with\ntt-menu-toggle, the same event the navbar sends for its button, so a\nlistener on the layout hears every change once. Setting it opens or\ncloses the drawer; on a wider screen it changes nothing.\n\nNamed as on tt-navbar, whose button it keeps in step.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-layout>`"
|
|
1514
|
+
}
|
|
1515
|
+
]
|
|
1395
1516
|
},
|
|
1396
1517
|
{
|
|
1397
1518
|
"name": "tt-menu-group",
|
|
@@ -1618,64 +1739,15 @@
|
|
|
1618
1739
|
},
|
|
1619
1740
|
{
|
|
1620
1741
|
"name": "tt-product",
|
|
1621
|
-
"description": "**Events:** tt-product-action",
|
|
1742
|
+
"description": "A product in a shop: photo, name, price and a button.\n\nTWO CHOICES, FOUR RESULTS. `orientation` (a tile for a grid, or a row\nfor a list) and `size` (medium, or small for two across on a phone).\nEvery pairing of the two is designed, so there is no combination that\nbreaks. It had four variants and three layouts, twenty-four pairings,\nand several of them did: text on a pale photo, a white band under the\nphoto of a tall row, a layout that did nothing in a row.\n\nPROPS GIVE THE DEFAULTS, SLOTS ADD TO THEM. `src` draws the photo,\n`rating` the star, `button-label` the button. The `media`, `meta` and\n`actions` slots add your own beside them (or over the photo), and\nclearing the prop drops its default. One rule, so nothing disappears\nwhen something is added.\n\nONE TARGET. With `href` the name is a link, or with `clickable` a\nbutton, and either one is stretched over the whole card by a\npseudo-element, so the card is clickable while the accessibility tree\nholds ONE link named by the product, not a card-sized link wrapping a\nbutton (interactive content inside a link is invalid and announced\ntwice). The action row sits above the stretched link, so its buttons\nstay separate targets.\n\nThe card draws its own surface with tt-card's tokens rather than\ncomposing tt-card, because the stretched link needs the surface as its\npositioned box and the focus ring has to go round the whole card.\n\n**Events:** tt-product-action, tt-product-open\n\n**Slots:** media, badge, meta, actions",
|
|
1622
1743
|
"attributes": [
|
|
1623
1744
|
{
|
|
1624
|
-
"name": "
|
|
1745
|
+
"name": "heading",
|
|
1625
1746
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1626
1747
|
},
|
|
1627
1748
|
{
|
|
1628
|
-
"name": "
|
|
1629
|
-
"description": "
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
"name": "orientation",
|
|
1633
|
-
"description": "Type: `ProductOrientation`\n\nDefault: `\"vertical\"`\n\nOn `<tt-product>`",
|
|
1634
|
-
"values": [
|
|
1635
|
-
{
|
|
1636
|
-
"name": "vertical"
|
|
1637
|
-
},
|
|
1638
|
-
{
|
|
1639
|
-
"name": "horizontal"
|
|
1640
|
-
}
|
|
1641
|
-
]
|
|
1642
|
-
},
|
|
1643
|
-
{
|
|
1644
|
-
"name": "variant",
|
|
1645
|
-
"description": "Type: `ProductVariant`\n\nDefault: `\"default\"`\n\nOn `<tt-product>`",
|
|
1646
|
-
"values": [
|
|
1647
|
-
{
|
|
1648
|
-
"name": "default"
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
"name": "minimal"
|
|
1652
|
-
},
|
|
1653
|
-
{
|
|
1654
|
-
"name": "elevated"
|
|
1655
|
-
},
|
|
1656
|
-
{
|
|
1657
|
-
"name": "featured"
|
|
1658
|
-
}
|
|
1659
|
-
]
|
|
1660
|
-
},
|
|
1661
|
-
{
|
|
1662
|
-
"name": "layout",
|
|
1663
|
-
"description": "Type: `ProductLayout`\n\nDefault: `\"standard\"`\n\nOn `<tt-product>`",
|
|
1664
|
-
"values": [
|
|
1665
|
-
{
|
|
1666
|
-
"name": "standard"
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
"name": "overlay"
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
"name": "compact"
|
|
1673
|
-
}
|
|
1674
|
-
]
|
|
1675
|
-
},
|
|
1676
|
-
{
|
|
1677
|
-
"name": "heading",
|
|
1678
|
-
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1749
|
+
"name": "heading-level",
|
|
1750
|
+
"description": "Its place in the page outline, as on tt-card.\n\nType: `number`\n\nDefault: `3`\n\nOn `<tt-product>`"
|
|
1679
1751
|
},
|
|
1680
1752
|
{
|
|
1681
1753
|
"name": "description",
|
|
@@ -1698,20 +1770,56 @@
|
|
|
1698
1770
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1699
1771
|
},
|
|
1700
1772
|
{
|
|
1701
|
-
"name": "
|
|
1773
|
+
"name": "src",
|
|
1702
1774
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1703
1775
|
},
|
|
1704
1776
|
{
|
|
1705
|
-
"name": "
|
|
1706
|
-
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1777
|
+
"name": "ratio",
|
|
1778
|
+
"description": "Type: `string`\n\nDefault: `\"1\"`\n\nOn `<tt-product>`"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"name": "value",
|
|
1782
|
+
"description": "Identifies the product in its events.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"name": "href",
|
|
1786
|
+
"description": "The product's page. The name becomes a link over the whole card.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-product>`"
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"name": "clickable",
|
|
1790
|
+
"description": "Without href: the whole card is a button that emits tt-product-open.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-product>`"
|
|
1707
1791
|
},
|
|
1708
1792
|
{
|
|
1709
1793
|
"name": "button-label",
|
|
1710
|
-
"description": "
|
|
1794
|
+
"description": "The built-in button's text. Empty for no built-in button.\n\nType: `string`\n\nDefault: `\"Add to basket\"`\n\nOn `<tt-product>`"
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"name": "orientation",
|
|
1798
|
+
"description": "Type: `ProductOrientation`\n\nDefault: `\"vertical\"`\n\nOn `<tt-product>`",
|
|
1799
|
+
"values": [
|
|
1800
|
+
{
|
|
1801
|
+
"name": "vertical"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"name": "horizontal"
|
|
1805
|
+
}
|
|
1806
|
+
]
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"name": "size",
|
|
1810
|
+
"description": "Type: `ProductSize`\n\nDefault: `\"medium\"`\n\nOn `<tt-product>`",
|
|
1811
|
+
"values": [
|
|
1812
|
+
{
|
|
1813
|
+
"name": "medium"
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
"name": "small"
|
|
1817
|
+
}
|
|
1818
|
+
]
|
|
1711
1819
|
},
|
|
1712
1820
|
{
|
|
1713
1821
|
"name": "disabled",
|
|
1714
|
-
"description": "
|
|
1822
|
+
"description": "Cannot be bought (sold out): the button is off and the photo greys. Still a link.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-product>`"
|
|
1715
1823
|
}
|
|
1716
1824
|
]
|
|
1717
1825
|
},
|
|
@@ -1780,6 +1888,10 @@
|
|
|
1780
1888
|
{
|
|
1781
1889
|
"name": "grade",
|
|
1782
1890
|
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-progress>`"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
"name": "budget",
|
|
1894
|
+
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-progress>`"
|
|
1783
1895
|
}
|
|
1784
1896
|
]
|
|
1785
1897
|
},
|
|
@@ -1924,6 +2036,57 @@
|
|
|
1924
2036
|
}
|
|
1925
2037
|
]
|
|
1926
2038
|
},
|
|
2039
|
+
{
|
|
2040
|
+
"name": "tt-scroller",
|
|
2041
|
+
"description": "A row of children side by side that scrolls sideways when they do not\nfit, with no scrollbar.\n\nWith the bar gone, two things say there is more: the edge that has\nmore to scroll fades out, by as much as is hidden there up to the fade\nwidth, so the fade grows in as you scroll rather than snapping on; and,\nwith `controls`, an arrow button on each side that has more.\n\nThe arrows only appear where a pointer can hover. A finger swipes the\nrow natively, which is what people do on a phone, and two 44px circles\nwould cover a third of a phone's row. A mouse with a plain wheel has no\nsideways scroll at all, which is who the arrows are for.\n\nLEFT AND RIGHT ARE PHYSICAL ON PURPOSE. Everything about the layout\nfollows the writing direction (the row starts on the right in a\nright-to-left page), but an arrow points at a side of the screen, and\n\"Scroll left\" names that side, so the fades and arrows are measured\nphysically and stay right in both directions.",
|
|
2042
|
+
"attributes": [
|
|
2043
|
+
{
|
|
2044
|
+
"name": "label",
|
|
2045
|
+
"description": "Names the row for a screen reader. Given a label, the row is a named group.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-scroller>`"
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
"name": "gap",
|
|
2049
|
+
"description": "Type: `ScrollerGap`\n\nDefault: `\"medium\"`\n\nOn `<tt-scroller>`",
|
|
2050
|
+
"values": [
|
|
2051
|
+
{
|
|
2052
|
+
"name": "none"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"name": "small"
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "medium"
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"name": "large"
|
|
2062
|
+
}
|
|
2063
|
+
]
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
"name": "snap",
|
|
2067
|
+
"description": "Lands on a whole child after a swipe or an arrow: its start or its centre.\n\nType: `ScrollerSnap`\n\nDefault: `\"none\"`\n\nOn `<tt-scroller>`",
|
|
2068
|
+
"values": [
|
|
2069
|
+
{
|
|
2070
|
+
"name": "none"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
"name": "start"
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "center"
|
|
2077
|
+
}
|
|
2078
|
+
]
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
"name": "controls",
|
|
2082
|
+
"description": "Arrow buttons on the sides that have more, for a mouse.\n\nType: `boolean`\n\nDefault: `false`\n\nOn `<tt-scroller>`"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"name": "item-width",
|
|
2086
|
+
"description": "Every child's width, as a CSS length (\"240px\", \"80%\"). Empty: each\nchild keeps its own width, which is right for chips but makes a card\nas wide as its longest line.\n\nType: `string`\n\nDefault: `\"\"`\n\nOn `<tt-scroller>`"
|
|
2087
|
+
}
|
|
2088
|
+
]
|
|
2089
|
+
},
|
|
1927
2090
|
{
|
|
1928
2091
|
"name": "tt-search",
|
|
1929
2092
|
"description": "A search field.\n\nOne field, with the magnifier INSIDE it and a clear button that appears\nonly when there is something to clear. There is no separate submit\nbutton, because search is not a form you submit: results follow typing.\nThe old layout put a filled button beside the input, which read as two\ncontrols and made the field look like it needed permission to run.\nEnter still fires tt-search for anyone who expects it to.\n\n`collapsible` is opt-in, and off by default. Collapsing to an icon on a\nphone is right in a navbar, where the row is fighting for space, and\nwrong in a page toolbar, where the field is the main control on screen.\nOnly the host knows which it is, so the host decides.\n\n**Events:** tt-search-input, tt-search",
|
|
@@ -1995,6 +2158,14 @@
|
|
|
1995
2158
|
"name": "value",
|
|
1996
2159
|
"description": "Type: `string`\n\nDefault: `\"\"`\n\nOn `<tt-select>`"
|
|
1997
2160
|
},
|
|
2161
|
+
{
|
|
2162
|
+
"name": "multiple",
|
|
2163
|
+
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-select>`"
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"name": "values",
|
|
2167
|
+
"description": "The chosen values while `multiple` is on, in the options' order.\n\nType: `string[]`\n\nDefault: `[]`\n\nOn `<tt-select>`"
|
|
2168
|
+
},
|
|
1998
2169
|
{
|
|
1999
2170
|
"name": "placeholder",
|
|
2000
2171
|
"description": "Type: `string`\n\nDefault: `\"Select an option\"`\n\nOn `<tt-select>`"
|
|
@@ -2042,7 +2213,7 @@
|
|
|
2042
2213
|
},
|
|
2043
2214
|
{
|
|
2044
2215
|
"name": "tt-sidebar",
|
|
2045
|
-
"description": "The navigation column of an app shell.\n\n---------------------------------------------------------------------\nHOW COLLAPSING WORKS, AND WHY IT NEEDS NO PROPS.\n\nWith `collapsible`, the sidebar can shrink to an icon rail. Everything\ninside it has to change at once: labels disappear, rows centre, group\nheadings go, badges go, the indent goes. Passing that down would mean a\n`collapsed` prop on every child, kept in sync by hand, at every depth.\n\nInstead the collapsed state is published as ordinary CSS custom\nproperties on the host, and each child reads the ones it cares about\nthrough var() with the expanded value as the fallback:\n\n --tt-menu-label-cols 1fr -> 0fr label track collapses\n --tt-menu-gap sp-2 -> 0px no gap beside nothing\n --tt-menu-justify start-> center icons centre in the rail\n --tt-menu-trail-display flex -> none badges and dots go\n --tt-menu-heading-display flex -> none group headings go\n --tt-menu-rail-rows unset-> 1fr every group forced open\n --tt-menu-rail-visibility unset-> visible ...and its items reachable\n --tt-menu-indent sp-2 -> 0px no nesting indent\n\nCustom properties inherit and they cross shadow boundaries, so this\nreaches a menu item nested three groups deep with no wiring, and a menu\nitem used outside a sidebar simply gets the fallbacks. Same mechanism\nas --tt-radius-nested in tokens.css.\n\nThey are declared in the stylesheet under :host([collapsed]) rather\nthan written from JavaScript, and that matters: a
|
|
2216
|
+
"description": "The navigation column of an app shell.\n\n---------------------------------------------------------------------\nHOW COLLAPSING WORKS, AND WHY IT NEEDS NO PROPS.\n\nWith `collapsible`, the sidebar can shrink to an icon rail. Everything\ninside it has to change at once: labels disappear, rows centre, group\nheadings go, badges go, the indent goes. Passing that down would mean a\n`collapsed` prop on every child, kept in sync by hand, at every depth.\n\nInstead the collapsed state is published as ordinary CSS custom\nproperties on the host, and each child reads the ones it cares about\nthrough var() with the expanded value as the fallback:\n\n --tt-menu-label-cols 1fr -> 0fr label track collapses\n --tt-menu-gap sp-2 -> 0px no gap beside nothing\n --tt-menu-justify start-> center icons centre in the rail\n --tt-menu-trail-display flex -> none badges and dots go\n --tt-menu-heading-display flex -> none group headings go\n --tt-menu-rail-rows unset-> 1fr every group forced open\n --tt-menu-rail-visibility unset-> visible ...and its items reachable\n --tt-menu-indent sp-2 -> 0px no nesting indent\n\nCustom properties inherit and they cross shadow boundaries, so this\nreaches a menu item nested three groups deep with no wiring, and a menu\nitem used outside a sidebar simply gets the fallbacks. Same mechanism\nas --tt-radius-nested in tokens.css.\n\nThey are declared in the stylesheet under :host([collapsed]) rather\nthan written from JavaScript, and that matters: a container query can\noverride a stylesheet rule, and cannot override an inline style. It is\nwhat lets the block at the bottom of this file switch the whole rail\noff in tt-layout's drawer on a phone, where a rail would be an unusable\n64px strip sliding over the page.\n\n---------------------------------------------------------------------\nWHO OWNS `collapsed`.\n\nThe component toggles itself and announces it with tt-sidebar-toggle,\nthe same shape tt-menu-group uses for open/close. An app that wants to\nremember the choice listens for the event and writes the property back;\none that does not gets working behaviour for free.\n\n**Events:** tt-sidebar-toggle",
|
|
2046
2217
|
"attributes": [
|
|
2047
2218
|
{
|
|
2048
2219
|
"name": "variant",
|
|
@@ -2075,6 +2246,10 @@
|
|
|
2075
2246
|
"name": "collapsed",
|
|
2076
2247
|
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-sidebar>`"
|
|
2077
2248
|
},
|
|
2249
|
+
{
|
|
2250
|
+
"name": "sticky",
|
|
2251
|
+
"description": "Type: `boolean`\n\nDefault: `false`\n\nOn `<tt-sidebar>`"
|
|
2252
|
+
},
|
|
2078
2253
|
{
|
|
2079
2254
|
"name": "label",
|
|
2080
2255
|
"description": "Type: `string`\n\nDefault: `\"Main\"`\n\nOn `<tt-sidebar>`"
|