@fusion.dev/helix-headless 0.0.0-dev
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/LICENSE +21 -0
- package/custom-elements.json +75202 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/item/accordion-item.d.ts +141 -0
- package/dist/accordion/item/accordion-item.js +214 -0
- package/dist/accordion/root/accordion-root.d.ts +57 -0
- package/dist/accordion/root/accordion-root.js +96 -0
- package/dist/announcement/index.d.ts +1 -0
- package/dist/announcement/index.js +1 -0
- package/dist/announcement/root/announcement-root.d.ts +106 -0
- package/dist/announcement/root/announcement-root.js +144 -0
- package/dist/app-header/index.d.ts +1 -0
- package/dist/app-header/index.js +1 -0
- package/dist/app-header/root/app-header-root.d.ts +113 -0
- package/dist/app-header/root/app-header-root.js +147 -0
- package/dist/avatar/group/avatar-group.d.ts +116 -0
- package/dist/avatar/group/avatar-group.js +136 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/root/avatar-root.d.ts +71 -0
- package/dist/avatar/root/avatar-root.js +147 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/badge/root/badge-root.d.ts +61 -0
- package/dist/badge/root/badge-root.js +121 -0
- package/dist/bar-chart/index.d.ts +1 -0
- package/dist/bar-chart/index.js +1 -0
- package/dist/bar-chart/root/bar-chart-root.d.ts +266 -0
- package/dist/bar-chart/root/bar-chart-root.js +515 -0
- package/dist/blockquote/index.d.ts +1 -0
- package/dist/blockquote/index.js +1 -0
- package/dist/blockquote/root/blockquote-root.d.ts +51 -0
- package/dist/blockquote/root/blockquote-root.js +84 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +104 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +137 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +77 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +94 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +1 -0
- package/dist/button/root/button-root.d.ts +251 -0
- package/dist/button/root/button-root.js +401 -0
- package/dist/button-group/index.d.ts +1 -0
- package/dist/button-group/index.js +1 -0
- package/dist/button-group/root/button-group-root.d.ts +62 -0
- package/dist/button-group/root/button-group-root.js +62 -0
- package/dist/callout/index.d.ts +1 -0
- package/dist/callout/index.js +1 -0
- package/dist/callout/root/callout-root.d.ts +72 -0
- package/dist/callout/root/callout-root.js +90 -0
- package/dist/card/index.d.ts +1 -0
- package/dist/card/index.js +1 -0
- package/dist/card/root/card-root.d.ts +54 -0
- package/dist/card/root/card-root.js +71 -0
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/root/carousel-root.d.ts +399 -0
- package/dist/carousel/root/carousel-root.js +723 -0
- package/dist/chat/composer/chat-composer.d.ts +160 -0
- package/dist/chat/composer/chat-composer.js +273 -0
- package/dist/chat/index.d.ts +3 -0
- package/dist/chat/index.js +3 -0
- package/dist/chat/message/chat-message.d.ts +170 -0
- package/dist/chat/message/chat-message.js +271 -0
- package/dist/chat/root/chat-root.d.ts +216 -0
- package/dist/chat/root/chat-root.js +389 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/checkbox/root/checkbox-root.d.ts +108 -0
- package/dist/checkbox/root/checkbox-root.js +207 -0
- package/dist/checkbox-group/index.d.ts +1 -0
- package/dist/checkbox-group/index.js +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +155 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +293 -0
- package/dist/code/index.d.ts +1 -0
- package/dist/code/index.js +1 -0
- package/dist/code/root/code-root.d.ts +36 -0
- package/dist/code/root/code-root.js +43 -0
- package/dist/code-block/index.d.ts +1 -0
- package/dist/code-block/index.js +1 -0
- package/dist/code-block/root/code-block-root.d.ts +112 -0
- package/dist/code-block/root/code-block-root.js +155 -0
- package/dist/color-input/index.d.ts +1 -0
- package/dist/color-input/index.js +1 -0
- package/dist/color-input/root/color-input-root.d.ts +227 -0
- package/dist/color-input/root/color-input-root.js +456 -0
- package/dist/color-picker/color.d.ts +74 -0
- package/dist/color-picker/color.js +238 -0
- package/dist/color-picker/index.d.ts +2 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/color-picker/root/color-picker-root.d.ts +303 -0
- package/dist/color-picker/root/color-picker-root.js +576 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +1 -0
- package/dist/combobox/root/combobox-root.d.ts +396 -0
- package/dist/combobox/root/combobox-root.js +808 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.js +1 -0
- package/dist/command/root/command-root.d.ts +166 -0
- package/dist/command/root/command-root.js +353 -0
- package/dist/copy-button/index.d.ts +1 -0
- package/dist/copy-button/index.js +1 -0
- package/dist/copy-button/root/copy-button-root.d.ts +154 -0
- package/dist/copy-button/root/copy-button-root.js +225 -0
- package/dist/data-table/index.d.ts +2 -0
- package/dist/data-table/index.js +2 -0
- package/dist/data-table/root/data-table-root.d.ts +392 -0
- package/dist/data-table/root/data-table-root.js +729 -0
- package/dist/data-table/root/order.d.ts +116 -0
- package/dist/data-table/root/order.js +175 -0
- package/dist/date-input/index.d.ts +1 -0
- package/dist/date-input/index.js +1 -0
- package/dist/date-input/root/date-input-root.d.ts +361 -0
- package/dist/date-input/root/date-input-root.js +791 -0
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/date-picker/root/date-picker-root.d.ts +361 -0
- package/dist/date-picker/root/date-picker-root.js +837 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -0
- package/dist/dialog/root/dialog-root.d.ts +185 -0
- package/dist/dialog/root/dialog-root.js +319 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +1 -0
- package/dist/divider/root/divider-root.d.ts +68 -0
- package/dist/divider/root/divider-root.js +116 -0
- package/dist/donut-chart/index.d.ts +1 -0
- package/dist/donut-chart/index.js +1 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +209 -0
- package/dist/donut-chart/root/donut-chart-root.js +395 -0
- package/dist/drawer/index.d.ts +1 -0
- package/dist/drawer/index.js +1 -0
- package/dist/drawer/root/drawer-root.d.ts +144 -0
- package/dist/drawer/root/drawer-root.js +222 -0
- package/dist/drilldown/index.d.ts +2 -0
- package/dist/drilldown/index.js +2 -0
- package/dist/drilldown/item/drilldown-item.d.ts +87 -0
- package/dist/drilldown/item/drilldown-item.js +152 -0
- package/dist/drilldown/root/drilldown-root.d.ts +115 -0
- package/dist/drilldown/root/drilldown-root.js +263 -0
- package/dist/element-events.generated.d.ts +1 -0
- package/dist/element-events.generated.js +125 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +1 -0
- package/dist/empty/root/empty-root.d.ts +47 -0
- package/dist/empty/root/empty-root.js +68 -0
- package/dist/file-input/index.d.ts +1 -0
- package/dist/file-input/index.js +1 -0
- package/dist/file-input/root/file-input-root.d.ts +196 -0
- package/dist/file-input/root/file-input-root.js +488 -0
- package/dist/format-date/index.d.ts +1 -0
- package/dist/format-date/index.js +1 -0
- package/dist/format-date/root/format-date-root.d.ts +151 -0
- package/dist/format-date/root/format-date-root.js +266 -0
- package/dist/heatmap/index.d.ts +2 -0
- package/dist/heatmap/index.js +2 -0
- package/dist/heatmap/root/buckets.d.ts +62 -0
- package/dist/heatmap/root/buckets.js +85 -0
- package/dist/heatmap/root/heatmap-root.d.ts +330 -0
- package/dist/heatmap/root/heatmap-root.js +526 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.d.ts +53 -0
- package/dist/icon/root/icon-root.js +93 -0
- package/dist/icon-button/index.d.ts +1 -0
- package/dist/icon-button/index.js +1 -0
- package/dist/icon-button/root/icon-button-root.d.ts +40 -0
- package/dist/icon-button/root/icon-button-root.js +46 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +1 -0
- package/dist/image/root/image-root.d.ts +213 -0
- package/dist/image/root/image-root.js +335 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.js +99 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.js +1 -0
- package/dist/input/root/input-root.d.ts +281 -0
- package/dist/input/root/input-root.js +472 -0
- package/dist/kbd/index.d.ts +1 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/root/kbd-root.d.ts +98 -0
- package/dist/kbd/root/kbd-root.js +230 -0
- package/dist/legend/index.d.ts +1 -0
- package/dist/legend/index.js +1 -0
- package/dist/legend/root/legend-root.d.ts +83 -0
- package/dist/legend/root/legend-root.js +125 -0
- package/dist/line-chart/index.d.ts +1 -0
- package/dist/line-chart/index.js +1 -0
- package/dist/line-chart/root/line-chart-root.d.ts +238 -0
- package/dist/line-chart/root/line-chart-root.js +365 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/list/item/list-item.d.ts +95 -0
- package/dist/list/item/list-item.js +148 -0
- package/dist/list/root/list-root.d.ts +72 -0
- package/dist/list/root/list-root.js +61 -0
- package/dist/listbox/index.d.ts +1 -0
- package/dist/listbox/index.js +1 -0
- package/dist/listbox/root/listbox-root.d.ts +357 -0
- package/dist/listbox/root/listbox-root.js +890 -0
- package/dist/loader/index.d.ts +1 -0
- package/dist/loader/index.js +1 -0
- package/dist/loader/root/loader-root.d.ts +52 -0
- package/dist/loader/root/loader-root.js +74 -0
- package/dist/megamenu/index.d.ts +1 -0
- package/dist/megamenu/index.js +1 -0
- package/dist/megamenu/root/megamenu-root.d.ts +254 -0
- package/dist/megamenu/root/megamenu-root.js +526 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/item/menu-item.d.ts +231 -0
- package/dist/menu/item/menu-item.js +405 -0
- package/dist/menu/root/menu-root.d.ts +158 -0
- package/dist/menu/root/menu-root.js +422 -0
- package/dist/meter/index.d.ts +1 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter/root/meter-root.d.ts +234 -0
- package/dist/meter/root/meter-root.js +316 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/root/navigation-root.d.ts +55 -0
- package/dist/navigation/root/navigation-root.js +130 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/notification/notification.d.ts +181 -0
- package/dist/notifications/notification/notification.js +305 -0
- package/dist/notifications/root/notifications-root.d.ts +168 -0
- package/dist/notifications/root/notifications-root.js +291 -0
- package/dist/number-input/index.d.ts +1 -0
- package/dist/number-input/index.js +1 -0
- package/dist/number-input/root/number-input-root.d.ts +282 -0
- package/dist/number-input/root/number-input-root.js +592 -0
- package/dist/option/group/option-group.d.ts +38 -0
- package/dist/option/group/option-group.js +58 -0
- package/dist/option/index.d.ts +2 -0
- package/dist/option/index.js +2 -0
- package/dist/option/root/option-root.d.ts +194 -0
- package/dist/option/root/option-root.js +247 -0
- package/dist/outline/index.d.ts +1 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/root/outline-root.d.ts +237 -0
- package/dist/outline/root/outline-root.js +519 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +3 -0
- package/dist/pagination/root/pagination-root.d.ts +390 -0
- package/dist/pagination/root/pagination-root.js +695 -0
- package/dist/pagination/size/pagination-size.d.ts +127 -0
- package/dist/pagination/size/pagination-size.js +232 -0
- package/dist/pagination/summary/pagination-summary.d.ts +90 -0
- package/dist/pagination/summary/pagination-summary.js +145 -0
- package/dist/pin-input/index.d.ts +1 -0
- package/dist/pin-input/index.js +1 -0
- package/dist/pin-input/root/pin-input-root.d.ts +292 -0
- package/dist/pin-input/root/pin-input-root.js +553 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/root/popover-root.d.ts +108 -0
- package/dist/popover/root/popover-root.js +231 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/root/progress-root.d.ts +125 -0
- package/dist/progress/root/progress-root.js +212 -0
- package/dist/qr-code/index.d.ts +1 -0
- package/dist/qr-code/index.js +1 -0
- package/dist/qr-code/root/qr-code-root.d.ts +93 -0
- package/dist/qr-code/root/qr-code-root.js +233 -0
- package/dist/quote/index.d.ts +1 -0
- package/dist/quote/index.js +1 -0
- package/dist/quote/root/quote-root.d.ts +36 -0
- package/dist/quote/root/quote-root.js +50 -0
- package/dist/radio/group/radio-group.d.ts +84 -0
- package/dist/radio/group/radio-group.js +170 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/root/radio-root.d.ts +102 -0
- package/dist/radio/root/radio-root.js +151 -0
- package/dist/rating/index.d.ts +1 -0
- package/dist/rating/index.js +1 -0
- package/dist/rating/root/rating-root.d.ts +242 -0
- package/dist/rating/root/rating-root.js +484 -0
- package/dist/scroll-area/index.d.ts +1 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/scroll-area/root/scroll-area-root.d.ts +96 -0
- package/dist/scroll-area/root/scroll-area-root.js +215 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +1 -0
- package/dist/select/root/select-root.d.ts +170 -0
- package/dist/select/root/select-root.js +419 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/root/skeleton-root.d.ts +31 -0
- package/dist/skeleton/root/skeleton-root.js +42 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/root/slider-root.d.ts +235 -0
- package/dist/slider/root/slider-root.js +488 -0
- package/dist/sparkline/index.d.ts +1 -0
- package/dist/sparkline/index.js +1 -0
- package/dist/sparkline/root/sparkline-root.d.ts +147 -0
- package/dist/sparkline/root/sparkline-root.js +278 -0
- package/dist/speed-dial/index.d.ts +2 -0
- package/dist/speed-dial/index.js +2 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +71 -0
- package/dist/speed-dial/item/speed-dial-item.js +113 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +122 -0
- package/dist/speed-dial/root/speed-dial-root.js +251 -0
- package/dist/splitter/index.d.ts +1 -0
- package/dist/splitter/index.js +1 -0
- package/dist/splitter/root/splitter-root.d.ts +491 -0
- package/dist/splitter/root/splitter-root.js +1030 -0
- package/dist/stat/group/stat-group.d.ts +30 -0
- package/dist/stat/group/stat-group.js +47 -0
- package/dist/stat/index.d.ts +2 -0
- package/dist/stat/index.js +2 -0
- package/dist/stat/root/stat-root.d.ts +62 -0
- package/dist/stat/root/stat-root.js +51 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/root/steps-root.d.ts +110 -0
- package/dist/steps/root/steps-root.js +130 -0
- package/dist/steps/step/step.d.ts +139 -0
- package/dist/steps/step/step.js +215 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/root/switch-root.d.ts +74 -0
- package/dist/switch/root/switch-root.js +153 -0
- package/dist/table/cell/table-cell.d.ts +34 -0
- package/dist/table/cell/table-cell.js +52 -0
- package/dist/table/column/table-column.d.ts +165 -0
- package/dist/table/column/table-column.js +222 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +4 -0
- package/dist/table/root/table-root.d.ts +98 -0
- package/dist/table/root/table-root.js +161 -0
- package/dist/table/row/table-row.d.ts +27 -0
- package/dist/table/row/table-row.js +42 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.js +3 -0
- package/dist/tabs/panel/tab-panel.d.ts +67 -0
- package/dist/tabs/panel/tab-panel.js +98 -0
- package/dist/tabs/root/tabs-root.d.ts +123 -0
- package/dist/tabs/root/tabs-root.js +217 -0
- package/dist/tabs/tab/tab.d.ts +64 -0
- package/dist/tabs/tab/tab.js +116 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.d.ts +41 -0
- package/dist/tag/root/tag-root.js +67 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +1 -0
- package/dist/textarea/root/textarea-root.d.ts +215 -0
- package/dist/textarea/root/textarea-root.js +380 -0
- package/dist/time-input/index.d.ts +1 -0
- package/dist/time-input/index.js +1 -0
- package/dist/time-input/root/time-input-root.d.ts +322 -0
- package/dist/time-input/root/time-input-root.js +661 -0
- package/dist/time-picker/index.d.ts +1 -0
- package/dist/time-picker/index.js +1 -0
- package/dist/time-picker/root/time-picker-root.d.ts +380 -0
- package/dist/time-picker/root/time-picker-root.js +669 -0
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/item/timeline-item.d.ts +81 -0
- package/dist/timeline/item/timeline-item.js +128 -0
- package/dist/timeline/root/timeline-root.d.ts +52 -0
- package/dist/timeline/root/timeline-root.js +72 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/item/toast-item.d.ts +183 -0
- package/dist/toast/item/toast-item.js +345 -0
- package/dist/toast/root/toast-root.d.ts +72 -0
- package/dist/toast/root/toast-root.js +87 -0
- package/dist/toggle/group/toggle-group.d.ts +140 -0
- package/dist/toggle/group/toggle-group.js +278 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +2 -0
- package/dist/toggle/root/toggle-root.d.ts +99 -0
- package/dist/toggle/root/toggle-root.js +146 -0
- package/dist/toolbar/index.d.ts +1 -0
- package/dist/toolbar/index.js +1 -0
- package/dist/toolbar/root/toolbar-root.d.ts +105 -0
- package/dist/toolbar/root/toolbar-root.js +260 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/root/tooltip-root.d.ts +388 -0
- package/dist/tooltip/root/tooltip-root.js +707 -0
- package/dist/tour/index.d.ts +2 -0
- package/dist/tour/index.js +2 -0
- package/dist/tour/root/tour-root.d.ts +161 -0
- package/dist/tour/root/tour-root.js +351 -0
- package/dist/tour/stop/tour-stop.d.ts +131 -0
- package/dist/tour/stop/tour-stop.js +249 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/item/tree-item.d.ts +208 -0
- package/dist/tree/item/tree-item.js +381 -0
- package/dist/tree/root/tree-root.d.ts +88 -0
- package/dist/tree/root/tree-root.js +287 -0
- package/dist/trend/index.d.ts +1 -0
- package/dist/trend/index.js +1 -0
- package/dist/trend/root/trend-root.d.ts +67 -0
- package/dist/trend/root/trend-root.js +106 -0
- package/dist/video/index.d.ts +1 -0
- package/dist/video/index.js +1 -0
- package/dist/video/root/video-root.d.ts +711 -0
- package/dist/video/root/video-root.js +1821 -0
- package/dist/video-playlist/index.d.ts +3 -0
- package/dist/video-playlist/index.js +3 -0
- package/dist/video-playlist/item/video-playlist-item.d.ts +101 -0
- package/dist/video-playlist/item/video-playlist-item.js +162 -0
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +121 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +237 -0
- package/dist/video-playlist/root/video-playlist-root.d.ts +108 -0
- package/dist/video-playlist/root/video-playlist-root.js +218 -0
- package/dist/virtual-list/index.d.ts +1 -0
- package/dist/virtual-list/index.js +1 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +121 -0
- package/dist/virtual-list/root/virtual-list-root.js +221 -0
- package/jsx.d.ts +49767 -0
- package/package.json +77 -0
- package/svelte.d.ts +129 -0
- package/vue.d.ts +9242 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A row of related measurements.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* A group rather than a list, because the figures are read together and their
|
|
8
|
+
* order carries no meaning: a list would announce "1 of 4" for a set where the
|
|
9
|
+
* position is not information.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.1.0
|
|
12
|
+
* @status stable
|
|
13
|
+
* @aliases Metrics, KPIs, Figures
|
|
14
|
+
* @documentation https://helix.fusion.dev/components/stat
|
|
15
|
+
*
|
|
16
|
+
* @slot - The stats.
|
|
17
|
+
*/
|
|
18
|
+
export declare class HelixHeadlessStatGroup extends HelixElement {
|
|
19
|
+
/**
|
|
20
|
+
* Accessible name for the set.
|
|
21
|
+
*/
|
|
22
|
+
label: string;
|
|
23
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
24
|
+
protected render(): TemplateResult;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'helix-headless-stat-group': HelixHeadlessStatGroup;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
/**
|
|
11
|
+
* @summary A row of related measurements.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* A group rather than a list, because the figures are read together and their
|
|
15
|
+
* order carries no meaning: a list would announce "1 of 4" for a set where the
|
|
16
|
+
* position is not information.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
* @status stable
|
|
20
|
+
* @aliases Metrics, KPIs, Figures
|
|
21
|
+
* @documentation https://helix.fusion.dev/components/stat
|
|
22
|
+
*
|
|
23
|
+
* @slot - The stats.
|
|
24
|
+
*/
|
|
25
|
+
let HelixHeadlessStatGroup = class HelixHeadlessStatGroup extends HelixElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name for the set.
|
|
30
|
+
*/
|
|
31
|
+
this.label = '';
|
|
32
|
+
}
|
|
33
|
+
willUpdate(changed) {
|
|
34
|
+
super.willUpdate(changed);
|
|
35
|
+
hostAria(this.internals, { label: this.label, role: 'group' });
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return html `<slot></slot>`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
property()
|
|
43
|
+
], HelixHeadlessStatGroup.prototype, "label", void 0);
|
|
44
|
+
HelixHeadlessStatGroup = __decorate([
|
|
45
|
+
customElement('helix-headless-stat-group')
|
|
46
|
+
], HelixHeadlessStatGroup);
|
|
47
|
+
export { HelixHeadlessStatGroup };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary One measurement, with the word for what it measures.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Label first in the markup and the value after it, which is the reading order
|
|
8
|
+
* a screen reader takes and the order a caption sits above a figure. The eye
|
|
9
|
+
* lands on the number either way, because the number is the loud thing; a
|
|
10
|
+
* reader hearing it needs to know what it counts before hearing how many.
|
|
11
|
+
*
|
|
12
|
+
* This paragraph said the opposite, value first and label after, on a render
|
|
13
|
+
* that has always emitted the label slot first: the description was published
|
|
14
|
+
* to two tiers and shipped into the generated types, and the component was
|
|
15
|
+
* right and the sentence was wrong.
|
|
16
|
+
*
|
|
17
|
+
* Both are bare slots. An element whose only job is to assign itself a slot on
|
|
18
|
+
* connect gives its own host an attribute after upgrade, which a React
|
|
19
|
+
* consumer's server markup never had.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.1.0
|
|
22
|
+
* @status stable
|
|
23
|
+
* @category data
|
|
24
|
+
* @aliases Metric, KPI, Figure
|
|
25
|
+
* @documentation https://helix.fusion.dev/components/stat
|
|
26
|
+
*
|
|
27
|
+
* @slot - The value.
|
|
28
|
+
* @slot label - What the value measures.
|
|
29
|
+
* @slot unit - The unit, set beside the value.
|
|
30
|
+
*/
|
|
31
|
+
export declare class HelixHeadlessStat extends HelixElement {
|
|
32
|
+
/**
|
|
33
|
+
* Which way the label and the value are arranged.
|
|
34
|
+
*
|
|
35
|
+
* Absent is a column, the label over the number, which is how a figure is read
|
|
36
|
+
* on a dashboard: the words say what is coming and the number answers.
|
|
37
|
+
* `column-reverse` puts the number first, which is right where the number is
|
|
38
|
+
* the headline and the label is a caption under it.
|
|
39
|
+
*
|
|
40
|
+
* The row directions set them side by side, for a figure in a line of text or
|
|
41
|
+
* a narrow strip where a stacked pair would be two lines of almost nothing.
|
|
42
|
+
*
|
|
43
|
+
* A property rather than a `helix-flex` around it, because the unit has to
|
|
44
|
+
* stay on the value's baseline whichever way the pair goes, and only this
|
|
45
|
+
* element knows which of its children the unit belongs to.
|
|
46
|
+
*
|
|
47
|
+
* **Optional rather than defaulted to `column`, which is not a style
|
|
48
|
+
* preference.** A reflecting property with a default writes its attribute onto
|
|
49
|
+
* the host the moment the element upgrades, and the host is markup the
|
|
50
|
+
* consumer rendered: React compares what it rendered against what is there and
|
|
51
|
+
* reports a hydration mismatch. The absent attribute is the column, which the
|
|
52
|
+
* stylesheet reads as the base case. The existing server spec caught this,
|
|
53
|
+
* being the one that asserts the host carries nothing nobody wrote.
|
|
54
|
+
*/
|
|
55
|
+
direction?: 'column-reverse' | 'row' | 'row-reverse';
|
|
56
|
+
protected render(): TemplateResult;
|
|
57
|
+
}
|
|
58
|
+
declare global {
|
|
59
|
+
interface HTMLElementTagNameMap {
|
|
60
|
+
'helix-headless-stat': HelixHeadlessStat;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
/**
|
|
11
|
+
* @summary One measurement, with the word for what it measures.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Label first in the markup and the value after it, which is the reading order
|
|
15
|
+
* a screen reader takes and the order a caption sits above a figure. The eye
|
|
16
|
+
* lands on the number either way, because the number is the loud thing; a
|
|
17
|
+
* reader hearing it needs to know what it counts before hearing how many.
|
|
18
|
+
*
|
|
19
|
+
* This paragraph said the opposite, value first and label after, on a render
|
|
20
|
+
* that has always emitted the label slot first: the description was published
|
|
21
|
+
* to two tiers and shipped into the generated types, and the component was
|
|
22
|
+
* right and the sentence was wrong.
|
|
23
|
+
*
|
|
24
|
+
* Both are bare slots. An element whose only job is to assign itself a slot on
|
|
25
|
+
* connect gives its own host an attribute after upgrade, which a React
|
|
26
|
+
* consumer's server markup never had.
|
|
27
|
+
*
|
|
28
|
+
* @since 0.1.0
|
|
29
|
+
* @status stable
|
|
30
|
+
* @category data
|
|
31
|
+
* @aliases Metric, KPI, Figure
|
|
32
|
+
* @documentation https://helix.fusion.dev/components/stat
|
|
33
|
+
*
|
|
34
|
+
* @slot - The value.
|
|
35
|
+
* @slot label - What the value measures.
|
|
36
|
+
* @slot unit - The unit, set beside the value.
|
|
37
|
+
*/
|
|
38
|
+
let HelixHeadlessStat = class HelixHeadlessStat extends HelixElement {
|
|
39
|
+
render() {
|
|
40
|
+
return html `<slot name="label"></slot>
|
|
41
|
+
<slot></slot>
|
|
42
|
+
<slot name="unit"></slot>`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ reflect: true })
|
|
47
|
+
], HelixHeadlessStat.prototype, "direction", void 0);
|
|
48
|
+
HelixHeadlessStat = __decorate([
|
|
49
|
+
customElement('helix-headless-stat')
|
|
50
|
+
], HelixHeadlessStat);
|
|
51
|
+
export { HelixHeadlessStat };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
declare const HelixHeadlessSteps_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerActiveInterface) & typeof HelixElement;
|
|
4
|
+
/**
|
|
5
|
+
* @summary A sequence of stages, and where the reader is in it.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* **`active` names where the reader is. `complete` stays on each step.** They
|
|
9
|
+
* are two different facts and only one of them is positional. Deriving both
|
|
10
|
+
* from a position is the obvious design and it is wrong the first time anybody
|
|
11
|
+
* steps back: return to stage one of three and stages one and two are still
|
|
12
|
+
* finished, while "everything before the active one" says only the first is.
|
|
13
|
+
* So this element drives `current` and never touches `complete`.
|
|
14
|
+
*
|
|
15
|
+
* **`active` is optional, and a sequence without it still renders.** Left
|
|
16
|
+
* unset, each step's own `current` stands and nothing here overwrites it, which
|
|
17
|
+
* is what lets the whole sequence be right in the server's markup: this element
|
|
18
|
+
* would have to count its slotted children to know which one is third, and the
|
|
19
|
+
* server has no children to count. Set it, and it wins, because it is a
|
|
20
|
+
* statement about the sequence where the attribute on a step is a statement
|
|
21
|
+
* about one step.
|
|
22
|
+
*
|
|
23
|
+
* That is also why the numbering is not JavaScript. It is a CSS counter in the
|
|
24
|
+
* tier above, which the browser resolves at layout with no script at all, so
|
|
25
|
+
* the third step reads "3" in the server's own markup.
|
|
26
|
+
*
|
|
27
|
+
* **The connector belongs to the step, not to the list.** Each one draws the
|
|
28
|
+
* line that arrives at it and hides it when it is first, the same arrangement
|
|
29
|
+
* Breadcrumbs uses for its separator and for the same reason: a line drawn
|
|
30
|
+
* between items needs either an index or a parent that counts, and drawing it
|
|
31
|
+
* on the item needs neither.
|
|
32
|
+
*
|
|
33
|
+
* `role="list"` on the host rather than an `<ol>` in the shadow root. The steps
|
|
34
|
+
* are the consumer's elements in the light DOM, so an `<ol>` here would be a
|
|
35
|
+
* list whose items are somewhere else.
|
|
36
|
+
*
|
|
37
|
+
* @since 0.1.0
|
|
38
|
+
* @status experimental
|
|
39
|
+
* @category navigation
|
|
40
|
+
* @aliases Stepper, Wizard, Progress steps
|
|
41
|
+
* @documentation https://helix.fusion.dev/components/steps
|
|
42
|
+
*
|
|
43
|
+
* @slot - The steps, which are `helix-step` elements.
|
|
44
|
+
*
|
|
45
|
+
* @event {HelixActivateEvent} helix-activate - Fired once the current one has moved, so the element already holds it.
|
|
46
|
+
* @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the active step changes. Cancelable: refusing it takes the decision and nothing moves.
|
|
47
|
+
*/
|
|
48
|
+
export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
|
|
49
|
+
/**
|
|
50
|
+
* Accessible name for the sequence.
|
|
51
|
+
*
|
|
52
|
+
* A list of stages is a landmark a reader arrives at out of order, so it
|
|
53
|
+
* needs a name of its own rather than borrowing the heading above it.
|
|
54
|
+
*/
|
|
55
|
+
label: string;
|
|
56
|
+
/**
|
|
57
|
+
* Which way the steps run.
|
|
58
|
+
*
|
|
59
|
+
* Absent is a row, which is what a form header wants, with each name under
|
|
60
|
+
* its mark: beside them there is a word in the rule's path and the line would
|
|
61
|
+
* be struck through it. `vertical` stacks them, names beside their marks,
|
|
62
|
+
* which is the shape with room under a step for what the stage holds.
|
|
63
|
+
*
|
|
64
|
+
* Each axis has one arrangement rather than a second property offering both
|
|
65
|
+
* in both. Of those four combinations three are ones nobody should pick, and
|
|
66
|
+
* a property whose job is mostly to be left alone is a property that mostly
|
|
67
|
+
* catches people out.
|
|
68
|
+
*/
|
|
69
|
+
orientation?: 'vertical';
|
|
70
|
+
/**
|
|
71
|
+
* What each step is marked with.
|
|
72
|
+
*
|
|
73
|
+
* Absent is the state itself: a check where a stage is done, a target where
|
|
74
|
+
* the reader is, an empty ring ahead of them. Three marks that need no
|
|
75
|
+
* legend, which a number does: "3" says where a stage sits in the order and
|
|
76
|
+
* nothing about whether it is finished.
|
|
77
|
+
*
|
|
78
|
+
* `numeric` is the older convention and is still the right one where the
|
|
79
|
+
* order is the point, a form that says "step 3 of 5" beside it, or a sequence
|
|
80
|
+
* a reader is told to come back to by number.
|
|
81
|
+
*/
|
|
82
|
+
variant?: 'numeric';
|
|
83
|
+
/** The steps, in the order the consumer wrote them. */
|
|
84
|
+
private get steps();
|
|
85
|
+
/**
|
|
86
|
+
* Puts `active` on whichever step owns it.
|
|
87
|
+
*
|
|
88
|
+
* Returns without touching anything where nothing has set `active`, which is
|
|
89
|
+
* the case a server renders: the steps' own `current` is the state then, and
|
|
90
|
+
* overwriting it on hydration is exactly the flash this design exists to
|
|
91
|
+
* avoid.
|
|
92
|
+
*
|
|
93
|
+
* `current` only. `complete` is the consumer's on each step, because a reader
|
|
94
|
+
* who steps back has finished more stages than they are standing in front of.
|
|
95
|
+
*/
|
|
96
|
+
private sync;
|
|
97
|
+
private readonly handleSelection;
|
|
98
|
+
private readonly handleSlotChange;
|
|
99
|
+
connectedCallback(): void;
|
|
100
|
+
disconnectedCallback(): void;
|
|
101
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
102
|
+
protected updated(changed: PropertyValues): void;
|
|
103
|
+
protected render(): TemplateResult;
|
|
104
|
+
}
|
|
105
|
+
declare global {
|
|
106
|
+
interface HTMLElementTagNameMap {
|
|
107
|
+
'helix-headless-steps': HelixHeadlessSteps;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixElement, hostAria, MixinControllerActive, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
/**
|
|
11
|
+
* @summary A sequence of stages, and where the reader is in it.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* **`active` names where the reader is. `complete` stays on each step.** They
|
|
15
|
+
* are two different facts and only one of them is positional. Deriving both
|
|
16
|
+
* from a position is the obvious design and it is wrong the first time anybody
|
|
17
|
+
* steps back: return to stage one of three and stages one and two are still
|
|
18
|
+
* finished, while "everything before the active one" says only the first is.
|
|
19
|
+
* So this element drives `current` and never touches `complete`.
|
|
20
|
+
*
|
|
21
|
+
* **`active` is optional, and a sequence without it still renders.** Left
|
|
22
|
+
* unset, each step's own `current` stands and nothing here overwrites it, which
|
|
23
|
+
* is what lets the whole sequence be right in the server's markup: this element
|
|
24
|
+
* would have to count its slotted children to know which one is third, and the
|
|
25
|
+
* server has no children to count. Set it, and it wins, because it is a
|
|
26
|
+
* statement about the sequence where the attribute on a step is a statement
|
|
27
|
+
* about one step.
|
|
28
|
+
*
|
|
29
|
+
* That is also why the numbering is not JavaScript. It is a CSS counter in the
|
|
30
|
+
* tier above, which the browser resolves at layout with no script at all, so
|
|
31
|
+
* the third step reads "3" in the server's own markup.
|
|
32
|
+
*
|
|
33
|
+
* **The connector belongs to the step, not to the list.** Each one draws the
|
|
34
|
+
* line that arrives at it and hides it when it is first, the same arrangement
|
|
35
|
+
* Breadcrumbs uses for its separator and for the same reason: a line drawn
|
|
36
|
+
* between items needs either an index or a parent that counts, and drawing it
|
|
37
|
+
* on the item needs neither.
|
|
38
|
+
*
|
|
39
|
+
* `role="list"` on the host rather than an `<ol>` in the shadow root. The steps
|
|
40
|
+
* are the consumer's elements in the light DOM, so an `<ol>` here would be a
|
|
41
|
+
* list whose items are somewhere else.
|
|
42
|
+
*
|
|
43
|
+
* @since 0.1.0
|
|
44
|
+
* @status experimental
|
|
45
|
+
* @category navigation
|
|
46
|
+
* @aliases Stepper, Wizard, Progress steps
|
|
47
|
+
* @documentation https://helix.fusion.dev/components/steps
|
|
48
|
+
*
|
|
49
|
+
* @slot - The steps, which are `helix-step` elements.
|
|
50
|
+
*
|
|
51
|
+
* @event {HelixActivateEvent} helix-activate - Fired once the current one has moved, so the element already holds it.
|
|
52
|
+
* @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the active step changes. Cancelable: refusing it takes the decision and nothing moves.
|
|
53
|
+
*/
|
|
54
|
+
let HelixHeadlessSteps = class HelixHeadlessSteps extends MixinControllerActive(HelixElement) {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
/**
|
|
58
|
+
* Accessible name for the sequence.
|
|
59
|
+
*
|
|
60
|
+
* A list of stages is a landmark a reader arrives at out of order, so it
|
|
61
|
+
* needs a name of its own rather than borrowing the heading above it.
|
|
62
|
+
*/
|
|
63
|
+
this.label = 'Steps';
|
|
64
|
+
this.handleSelection = (event) => {
|
|
65
|
+
this.requestActive(event.detail.value);
|
|
66
|
+
};
|
|
67
|
+
this.handleSlotChange = () => {
|
|
68
|
+
this.sync();
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** The steps, in the order the consumer wrote them. */
|
|
72
|
+
get steps() {
|
|
73
|
+
return [...this.querySelectorAll(':scope > *')].filter((one) => 'current' in one);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Puts `active` on whichever step owns it.
|
|
77
|
+
*
|
|
78
|
+
* Returns without touching anything where nothing has set `active`, which is
|
|
79
|
+
* the case a server renders: the steps' own `current` is the state then, and
|
|
80
|
+
* overwriting it on hydration is exactly the flash this design exists to
|
|
81
|
+
* avoid.
|
|
82
|
+
*
|
|
83
|
+
* `current` only. `complete` is the consumer's on each step, because a reader
|
|
84
|
+
* who steps back has finished more stages than they are standing in front of.
|
|
85
|
+
*/
|
|
86
|
+
sync() {
|
|
87
|
+
if (this.active === '') {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const steps = this.steps;
|
|
91
|
+
const value = this.resolveActive(steps)?.value ?? '';
|
|
92
|
+
for (const step of steps) {
|
|
93
|
+
step.current = step.value === value;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
connectedCallback() {
|
|
97
|
+
super.connectedCallback();
|
|
98
|
+
this.addEventListener('helix-select', this.handleSelection);
|
|
99
|
+
}
|
|
100
|
+
disconnectedCallback() {
|
|
101
|
+
super.disconnectedCallback();
|
|
102
|
+
this.removeEventListener('helix-select', this.handleSelection);
|
|
103
|
+
}
|
|
104
|
+
willUpdate(changed) {
|
|
105
|
+
super.willUpdate(changed);
|
|
106
|
+
hostAria(this.internals, { label: this.label, role: 'list' });
|
|
107
|
+
}
|
|
108
|
+
updated(changed) {
|
|
109
|
+
super.updated(changed);
|
|
110
|
+
if (changed.has('active')) {
|
|
111
|
+
this.sync();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
return html `<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
__decorate([
|
|
119
|
+
property()
|
|
120
|
+
], HelixHeadlessSteps.prototype, "label", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ reflect: true })
|
|
123
|
+
], HelixHeadlessSteps.prototype, "orientation", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ reflect: true })
|
|
126
|
+
], HelixHeadlessSteps.prototype, "variant", void 0);
|
|
127
|
+
HelixHeadlessSteps = __decorate([
|
|
128
|
+
customElement('helix-headless-steps')
|
|
129
|
+
], HelixHeadlessSteps);
|
|
130
|
+
export { HelixHeadlessSteps };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import type { PropertyValues, TemplateResult } from 'lit';
|
|
3
|
+
import '../../button/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @summary One stage in a sequence.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* **The name is a button, and only the name.** A stepper is something a reader
|
|
9
|
+
* goes back through, and the thing they reach for is the name of the stage. The
|
|
10
|
+
* marker is `aria-hidden` decoration, so wrapping it in the button would add
|
|
11
|
+
* hit area and no meaning: the accessible name would be the text either way,
|
|
12
|
+
* and what is pressable would stop being the same shape as what is readable.
|
|
13
|
+
*
|
|
14
|
+
* It is `helix-button`, not a `<button>` this element resets and dresses. The
|
|
15
|
+
* hover wash, the focus ring, the disabled treatment and the way the label sits
|
|
16
|
+
* against an icon are all decisions the button already carries, and a second
|
|
17
|
+
* copy of them here is a second copy to keep in step. `ghost` is the quiet
|
|
18
|
+
* shape: transparent until it is pointed at.
|
|
19
|
+
*
|
|
20
|
+
* It says nothing about where a reader may go. Every step is pressable and
|
|
21
|
+
* announces itself with `helix-select`; refusing the ones ahead is `disabled`,
|
|
22
|
+
* which the consumer sets because only the consumer knows whether a form can be
|
|
23
|
+
* skipped. A component that guessed would be wrong on the first wizard that
|
|
24
|
+
* lets you jump to the end.
|
|
25
|
+
*
|
|
26
|
+
* **The marker is a slot whose fallback is the state.** A finished stage shows
|
|
27
|
+
* a check, the current one a target, and one not yet reached an empty ring:
|
|
28
|
+
* three marks that say what a reader wants to know without a legend. A consumer
|
|
29
|
+
* who wants their own fills the slot instead.
|
|
30
|
+
*
|
|
31
|
+
* The step renders exactly one of the three, chosen from its own two booleans.
|
|
32
|
+
* Rendering all three and hiding two in CSS would work and is worse: the
|
|
33
|
+
* accessibility tree would carry marks that are not there, and the markup would
|
|
34
|
+
* say three things about a stage that is one.
|
|
35
|
+
*
|
|
36
|
+
* Numbering is a separate question and belongs to the tier above. `numeric`
|
|
37
|
+
* hides the mark and shows a CSS counter, which the browser resolves at layout,
|
|
38
|
+
* so the digit costs no script and is right in the server's markup however the
|
|
39
|
+
* steps are ordered. Nothing here knows which appearance is in use, and does
|
|
40
|
+
* not need to.
|
|
41
|
+
*
|
|
42
|
+
* **`complete` and `current` are separate, and both can be false.** A stage
|
|
43
|
+
* that is neither is one the reader has not reached, which is the majority of
|
|
44
|
+
* any sequence and therefore the state that needs no attribute. They can also
|
|
45
|
+
* both be true: a reader who steps back into a finished stage is in it and has
|
|
46
|
+
* finished it, and a stepper that forgets the second is one that loses its
|
|
47
|
+
* checks the moment somebody reviews their answers.
|
|
48
|
+
*
|
|
49
|
+
* **The `content` slot opens on the current step, and only down a column.** A
|
|
50
|
+
* row has no room under a step to put a form in, and stretching one to fit
|
|
51
|
+
* would set every step's height by the tallest. `current` is what opens it, so
|
|
52
|
+
* the state that says where the reader is is also the state that shows them the
|
|
53
|
+
* stage: one attribute, no second flag to keep in step with it, and it renders
|
|
54
|
+
* open on the server rather than after hydration.
|
|
55
|
+
*
|
|
56
|
+
* @since 0.1.0
|
|
57
|
+
* @status experimental
|
|
58
|
+
* @aliases Stage
|
|
59
|
+
* @documentation https://helix.fusion.dev/components/steps
|
|
60
|
+
*
|
|
61
|
+
* @slot - The step's name.
|
|
62
|
+
* @slot content - What the stage holds, shown while it is the current one.
|
|
63
|
+
* @slot description - A line under the name, for what the stage is for.
|
|
64
|
+
* @slot marker - Replaces the number, or the check a complete step shows.
|
|
65
|
+
*
|
|
66
|
+
* @event {HelixSelectEvent} helix-select - Fired when the step is pressed. Cancelable: refusing it takes the decision and nothing moves.
|
|
67
|
+
*
|
|
68
|
+
* @csspart body - The name and its description.
|
|
69
|
+
* @csspart content - What the stage holds, while it is open.
|
|
70
|
+
* @csspart description - The line under it.
|
|
71
|
+
* @csspart label - The step's name, which is a `helix-button`.
|
|
72
|
+
* @csspart label-button - The inner control.
|
|
73
|
+
* @csspart lead - The half line arriving from the step before.
|
|
74
|
+
* @csspart mark - The glyph inside the marker: a tick, a dot, or an empty ring.
|
|
75
|
+
* @csspart marker - The shape carrying the number or the check.
|
|
76
|
+
* @csspart trail - The half line running on to the next.
|
|
77
|
+
*/
|
|
78
|
+
export declare class HelixHeadlessStep extends HelixElement {
|
|
79
|
+
/**
|
|
80
|
+
* Whether the reader has finished this stage.
|
|
81
|
+
*/
|
|
82
|
+
complete: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether this is the stage the reader is in.
|
|
85
|
+
*/
|
|
86
|
+
current: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether the reader may go to this stage.
|
|
89
|
+
*/
|
|
90
|
+
disabled: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* What this stage is called when it announces itself.
|
|
93
|
+
*/
|
|
94
|
+
value: string;
|
|
95
|
+
/** Announces the step, unless it is refusing. */
|
|
96
|
+
select(): void;
|
|
97
|
+
/**
|
|
98
|
+
* The mark this stage's state calls for.
|
|
99
|
+
*
|
|
100
|
+
* `complete` first, so a stage a reader has stepped back into keeps its check
|
|
101
|
+
* rather than losing it to the target: they did finish it, and the name and
|
|
102
|
+
* the rule below still say which one is open.
|
|
103
|
+
*
|
|
104
|
+
* **Three shapes, and the reader can tell them apart with the color off.**
|
|
105
|
+
* An outline circle for a stage nobody has reached, the same circle with a
|
|
106
|
+
* center for the one they are standing on, a bare check for one that is done.
|
|
107
|
+
* The first two are one shape filling in, which is the progression, and the
|
|
108
|
+
* check is the only mark that leaves the family because finishing is the only
|
|
109
|
+
* state that is not a position in the sequence.
|
|
110
|
+
*
|
|
111
|
+
* What went was the coin around the check: a filled disc carrying a check
|
|
112
|
+
* beside a filled disc carrying a ring put two of the three inside the same
|
|
113
|
+
* container, and left hue doing most of the work of telling them apart.
|
|
114
|
+
*
|
|
115
|
+
* The bare check is `Timeline`'s, deliberately: the two components report the
|
|
116
|
+
* same kind of thing, a sequence with marks down it, and a check floating on
|
|
117
|
+
* a hairline in one beside a check inside a green coin in the other was two
|
|
118
|
+
* answers to one question. Timeline's rings came off the same day.
|
|
119
|
+
*/
|
|
120
|
+
protected renderMarker(): TemplateResult;
|
|
121
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
122
|
+
/**
|
|
123
|
+
* The step's own label, which is a control because a step can be gone to, behind a seam the styled tier can move.
|
|
124
|
+
*
|
|
125
|
+
* A method rather than a fragment inline, so a tier above can render its own,
|
|
126
|
+
* wrap this one, pass it a property the base does not know about, or leave it
|
|
127
|
+
* out, without reimplementing the whole template to do any of them. The tag is
|
|
128
|
+
* interpolated rather than written, so `tier` resolves it: this renders the
|
|
129
|
+
* headless element, and a styled subclass that sets `tier` renders the styled one
|
|
130
|
+
* from the same template.
|
|
131
|
+
*/
|
|
132
|
+
protected renderLabel(): TemplateResult;
|
|
133
|
+
protected render(): TemplateResult;
|
|
134
|
+
}
|
|
135
|
+
declare global {
|
|
136
|
+
interface HTMLElementTagNameMap {
|
|
137
|
+
'helix-headless-step': HelixHeadlessStep;
|
|
138
|
+
}
|
|
139
|
+
}
|