@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,399 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Shows one slide of several, with controls to move between them.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The track is a scroller with scroll snapping, so a drag, a trackpad swipe,
|
|
8
|
+
* and the browser's own momentum all work without being reimplemented. The
|
|
9
|
+
* controls scroll it; they do not drive a transform.
|
|
10
|
+
*
|
|
11
|
+
* Slides are the consumer's own elements, and nothing is written onto them. The
|
|
12
|
+
* component renders a pane per slide carrying `role="group"`,
|
|
13
|
+
* `aria-roledescription="slide"` and a name reading its position in the set,
|
|
14
|
+
* and assigns the slide into it: a screen-reader user hears where they are, and
|
|
15
|
+
* a slide that is itself a link is still a link, which it was not while the role
|
|
16
|
+
* was being written on top of it. See `assign`.
|
|
17
|
+
*
|
|
18
|
+
* **Rotation stops on focus and on hover, and once stopped it stays stopped.**
|
|
19
|
+
* The APG is explicit: rotation must not resume unless the reader asks for it,
|
|
20
|
+
* so hovering away does not start it again. The control names the action it
|
|
21
|
+
* performs, and it is first in the tab order.
|
|
22
|
+
*
|
|
23
|
+
* @since 0.1.0
|
|
24
|
+
* @status experimental
|
|
25
|
+
* @category layout
|
|
26
|
+
* @aliases Slider, Gallery, Slideshow
|
|
27
|
+
* @documentation https://helix.fusion.dev/components/carousel
|
|
28
|
+
*
|
|
29
|
+
* @slot - The slides.
|
|
30
|
+
*
|
|
31
|
+
* @event {HelixSelectEvent} helix-select - Fired when the slide in view changes, with its index. Cancelable: refusing it takes the decision and nothing moves.
|
|
32
|
+
*
|
|
33
|
+
* @csspart controls - The row of controls.
|
|
34
|
+
* @csspart indicator - One of them, and a way to reach that slide.
|
|
35
|
+
* @csspart indicators - The row of controls saying where the reader is.
|
|
36
|
+
* @csspart next - The control that moves to the next slide.
|
|
37
|
+
* @csspart next-mark - The glyph on the next control.
|
|
38
|
+
* @csspart previous - The control that moves to the previous slide.
|
|
39
|
+
* @csspart previous-mark - The glyph on the previous control.
|
|
40
|
+
* @csspart rotation - The control that stops and starts rotation.
|
|
41
|
+
* @csspart rotation-mark - The glyph on the play and pause control.
|
|
42
|
+
* @csspart slide - The pane one slide is shown in, and the box the track snaps to.
|
|
43
|
+
* @csspart track - The scroller the slides sit in.
|
|
44
|
+
*/
|
|
45
|
+
export declare class HelixHeadlessCarousel extends HelixElement {
|
|
46
|
+
/**
|
|
47
|
+
* Manual, so each slide can be wrapped without its markup being touched.
|
|
48
|
+
*
|
|
49
|
+
* A slide has to be a `group` carrying `aria-roledescription="slide"` and a
|
|
50
|
+
* position in the run, and those are the component's facts rather than the
|
|
51
|
+
* consumer's element's. Writing them on is what a React consumer's hydration
|
|
52
|
+
* reports and does not patch up, and on a slide that is itself a link it also
|
|
53
|
+
* takes the link's role away. Assigning into a pane the component rendered
|
|
54
|
+
* says the same thing to a screen reader and leaves the consumer's element
|
|
55
|
+
* exactly as it was served. `Chat` and `DataTable` wrap their children the
|
|
56
|
+
* same way and for the first of those two reasons.
|
|
57
|
+
*/
|
|
58
|
+
static shadowRootOptions: ShadowRootInit;
|
|
59
|
+
/**
|
|
60
|
+
* Accessible name for the carousel.
|
|
61
|
+
*/
|
|
62
|
+
label: string;
|
|
63
|
+
/**
|
|
64
|
+
* The slide in view, counted from zero.
|
|
65
|
+
*
|
|
66
|
+
* Reading gives the real slide, in either mode. Writing sets it, the way a
|
|
67
|
+
* script assigning to a native control does. Which mode the carousel is in is
|
|
68
|
+
* read once, at the first update, from whether anything had declared an
|
|
69
|
+
* `index` by then: declared, and the consumer owns it and the carousel only
|
|
70
|
+
* announces where it would have gone; not declared, and the carousel owns it
|
|
71
|
+
* and `default-index` says where it starts.
|
|
72
|
+
*
|
|
73
|
+
* The same contract the four mixins carry, written out here rather than
|
|
74
|
+
* extracted, because a slide is addressed by position and every one of those
|
|
75
|
+
* mixins is keyed by a name. One consumer is not a mixin: if a second numeric
|
|
76
|
+
* state turns up, this is what it is extracted from.
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
get index(): number;
|
|
81
|
+
set index(next: number);
|
|
82
|
+
/**
|
|
83
|
+
* Which way the track runs.
|
|
84
|
+
*
|
|
85
|
+
* Behavior rather than presentation, which is why it is here: the scroll
|
|
86
|
+
* position and the nearest-slide arithmetic are both single-axis, and a
|
|
87
|
+
* styled-tier attribute cannot change which one they read. Two sites branch
|
|
88
|
+
* on it, `scrollTo` and the drag settle, and nothing else in the component
|
|
89
|
+
* knows about the axis at all.
|
|
90
|
+
*
|
|
91
|
+
* A vertical track needs a height, which a horizontal one does not: width
|
|
92
|
+
* comes from the page and height does not, so the styled tier gives it
|
|
93
|
+
* `--carousel-block-size` and a consumer sets that to whatever the slides
|
|
94
|
+
* want.
|
|
95
|
+
*/
|
|
96
|
+
orientation?: 'horizontal' | 'vertical';
|
|
97
|
+
/**
|
|
98
|
+
* Whether the previous and next controls are shown.
|
|
99
|
+
*
|
|
100
|
+
* `auto`, which is the resting behavior and what an absent attribute means,
|
|
101
|
+
* shows them wherever the pointer can hover and hides them where it cannot.
|
|
102
|
+
* `always` keeps them on every device, and `none` never renders them at all.
|
|
103
|
+
*
|
|
104
|
+
* **Pointer and not width, which is the distinction this exists to make.** A
|
|
105
|
+
* 375px window on a desktop still has a mouse and still wants the arrows; a
|
|
106
|
+
* tablet at 1024 has neither. `.claude/rules/helix.md` forbids a component
|
|
107
|
+
* asking about the viewport, because the viewport is not the component's box,
|
|
108
|
+
* and that objection does not reach `hover` and `pointer`: those describe the
|
|
109
|
+
* input device, and the answer is the same whether this carousel is 300px in
|
|
110
|
+
* a sidebar or runs the width of the page.
|
|
111
|
+
*
|
|
112
|
+
* **Safe to hide because the arrows are not the keyboard's way in.** The
|
|
113
|
+
* indicators carry a roving `tabindex` and handle the arrow keys, so every
|
|
114
|
+
* slide is still reachable with the controls gone. Hiding a control that was
|
|
115
|
+
* the only route to something would be a different change under this name.
|
|
116
|
+
*
|
|
117
|
+
* **The rotation control is never hidden by this**, which is a decision
|
|
118
|
+
* rather than a limit of scope: content that moves on its own has to offer a
|
|
119
|
+
* way to stop it, so an autoplaying carousel keeps its pause control on a
|
|
120
|
+
* touch device exactly as it does on a desktop.
|
|
121
|
+
*/
|
|
122
|
+
controls?: 'always' | 'auto' | 'none';
|
|
123
|
+
/**
|
|
124
|
+
* Slide to start on, where nothing declared one.
|
|
125
|
+
*/
|
|
126
|
+
defaultIndex: number;
|
|
127
|
+
/** The slide in view, whoever set it, and `undefined` until somebody has. */
|
|
128
|
+
private indexState;
|
|
129
|
+
/**
|
|
130
|
+
* Whether moving past either end wraps to the other.
|
|
131
|
+
*/
|
|
132
|
+
loop: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Whether the carousel advances on its own.
|
|
135
|
+
*/
|
|
136
|
+
autoplay: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* How long each slide is held, in milliseconds.
|
|
139
|
+
*/
|
|
140
|
+
interval: number;
|
|
141
|
+
/**
|
|
142
|
+
* Whether rotation is running.
|
|
143
|
+
*
|
|
144
|
+
* Absent until autoplay starts it.
|
|
145
|
+
*/
|
|
146
|
+
private rotating;
|
|
147
|
+
private timer;
|
|
148
|
+
/**
|
|
149
|
+
* How many slides are shown across the track at once. Absent shows one.
|
|
150
|
+
*
|
|
151
|
+
* **Here rather than on the styled tier, because it decides how many places
|
|
152
|
+
* the track can stop.** It was declared above as a width, which is what it
|
|
153
|
+
* looks like from the stylesheet: one rule per value setting a custom
|
|
154
|
+
* property, and the slides divide the track by it. But a carousel showing
|
|
155
|
+
* four of six slides has three positions, not six, and everything that counts
|
|
156
|
+
* positions is in this file. Left up there, `goTo` clamped to the last
|
|
157
|
+
* *slide*, so three of the six indicators pointed at a scroll offset the
|
|
158
|
+
* track had already reached and could not pass: pressing next walked the dots
|
|
159
|
+
* to the end while the slides stopped moving a third of the way through.
|
|
160
|
+
*
|
|
161
|
+
* No default, because it reflects. A reflected property with a value writes
|
|
162
|
+
* its attribute on upgrade, and the host then carries something a consumer's
|
|
163
|
+
* server markup never had, which React reports as a mismatch. The one-across
|
|
164
|
+
* case is the absent attribute, and the styles read it that way.
|
|
165
|
+
*/
|
|
166
|
+
perView?: number;
|
|
167
|
+
/**
|
|
168
|
+
* How many distinct views the track holds, which is what the indicators count.
|
|
169
|
+
*
|
|
170
|
+
* A window of `perView` slides sliding one at a time over `n` of them stops
|
|
171
|
+
* `n - perView + 1` times, so six slides four across is three: 0 to 3, 1 to 4,
|
|
172
|
+
* 2 to 5. One at minimum, since a carousel showing everything it has still
|
|
173
|
+
* has the one place to be.
|
|
174
|
+
*/
|
|
175
|
+
get positions(): number;
|
|
176
|
+
/**
|
|
177
|
+
* The panes rendered for the slides, in order. Empty until the first render.
|
|
178
|
+
*
|
|
179
|
+
* One per slide, and the box the track actually lays out: the slide itself is
|
|
180
|
+
* assigned into it and takes its size from it, so every offset the scroller
|
|
181
|
+
* is asked about is a pane's. Read fresh rather than cached, because a slide
|
|
182
|
+
* arriving or leaving re-renders the run.
|
|
183
|
+
*/
|
|
184
|
+
private get panes();
|
|
185
|
+
/** The slides, in light-DOM order. Empty on the server, which has no tree. */
|
|
186
|
+
get slides(): HTMLElement[];
|
|
187
|
+
/**
|
|
188
|
+
* The arrows move between indicators, which is the tablist pattern.
|
|
189
|
+
*
|
|
190
|
+
* One tab stop for the set and the arrows within it, so a reader does not
|
|
191
|
+
* have to press Tab once per slide to get past a carousel of twelve. Moving
|
|
192
|
+
* changes the slide, because an indicator that could be focused without
|
|
193
|
+
* selecting would leave the highlight and the slide disagreeing with nothing
|
|
194
|
+
* on screen saying which is which.
|
|
195
|
+
*/
|
|
196
|
+
private readonly handleIndicatorKeydown;
|
|
197
|
+
/** Moves to a slide, wrapping only where `loop` says to. */
|
|
198
|
+
goTo(index: number): void;
|
|
199
|
+
/**
|
|
200
|
+
* The leading padding the track keeps for a slide to draw its own edge in.
|
|
201
|
+
*
|
|
202
|
+
* A styled track carries one so a slide's shadow and focus ring have
|
|
203
|
+
* somewhere to go: a scroll container clips at its padding box, and a slide
|
|
204
|
+
* flush against that edge loses whatever it paints outside itself. The
|
|
205
|
+
* headless tier has no stylesheet and so no padding, and this reads zero
|
|
206
|
+
* there, which is why both tiers can share the arithmetic below.
|
|
207
|
+
*
|
|
208
|
+
* Physical sides rather than logical, to match the physical `offsetLeft` and
|
|
209
|
+
* `offsetTop` it is subtracted from. The bleed is one length on all four
|
|
210
|
+
* sides, so the two agree whatever the writing mode; if that stops being
|
|
211
|
+
* true, this is the method that has to know.
|
|
212
|
+
*/
|
|
213
|
+
private bleed;
|
|
214
|
+
/**
|
|
215
|
+
* Where a slide's leading edge sits, in the scroller's own coordinates.
|
|
216
|
+
*
|
|
217
|
+
* **Both directions go through here, because they have to agree.** The
|
|
218
|
+
* offsets are measured to the track's *border* box and `scrollTop` and
|
|
219
|
+
* `scrollLeft` are measured from its content box, so the two differ by the
|
|
220
|
+
* bleed: sending the carousel to a slide and reading back which slide it is
|
|
221
|
+
* on used the same expression, and correcting one of them alone put a drag
|
|
222
|
+
* one position off what the arrows did.
|
|
223
|
+
*
|
|
224
|
+
* Unsubtracted, the leading slide's own offset *is* the bleed, so scrolling
|
|
225
|
+
* to index 0 put its edge back on the clip edge. Measured on the insights
|
|
226
|
+
* carousel: `scrollLeft` resting at 4 against a 4px bleed, the first card
|
|
227
|
+
* shaved, and no scrolling done to cause it.
|
|
228
|
+
*/
|
|
229
|
+
private edgeOf;
|
|
230
|
+
private scrollToIndex;
|
|
231
|
+
/**
|
|
232
|
+
* Whether the scroll now settling is one this component asked for.
|
|
233
|
+
*
|
|
234
|
+
* Cleared by the first `scrollend` after it is set, and by a reader taking
|
|
235
|
+
* hold of the track. The second half is not belt and braces: a `scrollTo`
|
|
236
|
+
* whose target is already the scroll position fires no `scrollend` at all,
|
|
237
|
+
* and the clamped end of a `per-view` track is exactly that case. Measured:
|
|
238
|
+
* clicking past the last reachable slide moves `index` and produces no
|
|
239
|
+
* `scrollend`, so a flag that only a `scrollend` could clear would stay set
|
|
240
|
+
* and swallow the reader's next drag.
|
|
241
|
+
*/
|
|
242
|
+
private settling;
|
|
243
|
+
private readonly handleTake;
|
|
244
|
+
/**
|
|
245
|
+
* Stops rotation for good.
|
|
246
|
+
*
|
|
247
|
+
* Hovering away or moving focus out does not start it again. The APG is
|
|
248
|
+
* explicit that rotation resumes only when the reader asks for it, because a
|
|
249
|
+
* carousel that starts moving again on its own is the thing the control
|
|
250
|
+
* exists to escape.
|
|
251
|
+
*/
|
|
252
|
+
private stop;
|
|
253
|
+
private start;
|
|
254
|
+
/**
|
|
255
|
+
* Owns the timer, from the state rather than from the call site.
|
|
256
|
+
*
|
|
257
|
+
* `start()` and `stop()` each held the interval and `connectedCallback`
|
|
258
|
+
* started one, which the rules forbid: a DOM move re-ran connect and restarted
|
|
259
|
+
* rotation the reader had stopped, and the server, which never runs connect at
|
|
260
|
+
* all, rendered the control saying the opposite of what it would do. The
|
|
261
|
+
* state is what is declared and the timer follows it, which also means one
|
|
262
|
+
* place clears it.
|
|
263
|
+
*/
|
|
264
|
+
private runTimer;
|
|
265
|
+
/**
|
|
266
|
+
* The slide the track is nearest to, or undefined when there is no track.
|
|
267
|
+
*
|
|
268
|
+
* Shared by the two readers of the scroll position, which want the same
|
|
269
|
+
* arithmetic and disagree about what to do with it: one commits where a drag
|
|
270
|
+
* settled, the other follows it while it is still moving.
|
|
271
|
+
*
|
|
272
|
+
* Only the leading edges a window can actually rest on. Past the last
|
|
273
|
+
* position every remaining slide is on screen already, and taking the nearest
|
|
274
|
+
* of *those* to the scroller's edge reported a place the reader could not get
|
|
275
|
+
* back to: dragged fully right, a four-across six reported the sixth slide
|
|
276
|
+
* and the dots jumped to an indicator that no longer existed.
|
|
277
|
+
*/
|
|
278
|
+
private nearest;
|
|
279
|
+
/**
|
|
280
|
+
* Follows the track while a reader is still dragging it.
|
|
281
|
+
*
|
|
282
|
+
* **`scrollend` is the only honest place to commit an index and much too late
|
|
283
|
+
* to show one.** It fires once momentum has fully settled, which on iOS is
|
|
284
|
+
* most of a second after the finger has left the glass, so the dots sat on
|
|
285
|
+
* the old slide for the whole of the coast and then jumped. Reported exactly
|
|
286
|
+
* that way, as the delay on the indicator being too great.
|
|
287
|
+
*
|
|
288
|
+
* So showing and committing are separated. This moves the marker and nothing
|
|
289
|
+
* else: no state is written and no event is dispatched, because neither is
|
|
290
|
+
* true yet. A drag in flight is not a reader having chosen, `handleScroll`
|
|
291
|
+
* still decides that, and a consumer holding `index` still hears once.
|
|
292
|
+
*
|
|
293
|
+
* **The marker only, and not `aria-current` or the roving `tabindex`.** Those
|
|
294
|
+
* describe where the reader *is*, which is a question with one answer per
|
|
295
|
+
* settled position; moving them every frame of a drag would churn the
|
|
296
|
+
* accessibility tree to report a place nobody has arrived at.
|
|
297
|
+
*
|
|
298
|
+
* Coalesced to a frame, a scroll firing far more often than a screen
|
|
299
|
+
* refreshes, and skipped while we are settling a scroll of our own: a click
|
|
300
|
+
* has already moved the index and the track is following it, which is the
|
|
301
|
+
* precedence `handleScroll` documents at length.
|
|
302
|
+
*/
|
|
303
|
+
private readonly handleTrackScroll;
|
|
304
|
+
/**
|
|
305
|
+
* Reads where a reader's drag settled, and only a reader's.
|
|
306
|
+
*
|
|
307
|
+
* **The scroll we issued ourselves ends with a `scrollend` too, and taking it
|
|
308
|
+
* as a reading is what makes the dots jump back.** This ran on every one, so
|
|
309
|
+
* the index a reader had just chosen was overwritten by whichever slide
|
|
310
|
+
* happened to be nearest the leading edge at the moment the animation
|
|
311
|
+
* finished. Any disagreement there is enough: a snap settling a pixel short of
|
|
312
|
+
* a midpoint, a target clamped by the scroller's own maximum, a fractional
|
|
313
|
+
* layout, or a smooth scroll cut off by the next click. The component asked
|
|
314
|
+
* for slide four, the pixels said three, and the pixels won.
|
|
315
|
+
*
|
|
316
|
+
* Which is the wrong precedence in one direction only. A drag is the reader
|
|
317
|
+
* moving the track and the index has to follow it; a click is the reader
|
|
318
|
+
* moving the index and the track has to follow *that*. One `scrollend` cannot
|
|
319
|
+
* tell those apart, so the flag does.
|
|
320
|
+
*/
|
|
321
|
+
private readonly handleScroll;
|
|
322
|
+
/**
|
|
323
|
+
* Where the track is right now, while a drag is still running.
|
|
324
|
+
*
|
|
325
|
+
* Separate from `index`, which is where the reader has *arrived*. Undefined
|
|
326
|
+
* whenever the two would agree, so the marker falls back to the committed
|
|
327
|
+
* index the moment a drag settles and nothing has to keep them in step. See
|
|
328
|
+
* `handleTrackScroll` for why they are not one value.
|
|
329
|
+
*/
|
|
330
|
+
private showing;
|
|
331
|
+
/** The pending frame for the above, so a burst of scrolls costs one reading. */
|
|
332
|
+
private scrollFrame;
|
|
333
|
+
/**
|
|
334
|
+
* Whether the reader has stopped it, as opposed to something pausing it.
|
|
335
|
+
*
|
|
336
|
+
* The two were one flag and the difference matters: `focusin` bubbles, so
|
|
337
|
+
* every focus move inside the carousel re-ran `stop()`, and a reader who
|
|
338
|
+
* pressed Start had it undone by their very next Tab. Pausing on hover and on
|
|
339
|
+
* focus is right; forgetting that the reader asked it to stop is not, and the
|
|
340
|
+
* APG is explicit that rotation resumes only when the reader asks.
|
|
341
|
+
*/
|
|
342
|
+
private stopped;
|
|
343
|
+
/**
|
|
344
|
+
* Watches the light DOM for slides arriving and leaving.
|
|
345
|
+
*
|
|
346
|
+
* **A manually assigned slot does not announce them.** `slotchange` fires when
|
|
347
|
+
* an assignment changes, and under `slotAssignment: 'manual'` the only thing
|
|
348
|
+
* that changes an assignment is this component calling `assign`, so a slide
|
|
349
|
+
* appended by a consumer would reach no slot, render nowhere and be counted by
|
|
350
|
+
* nothing. The default slot used to carry that duty and could, because it took
|
|
351
|
+
* whatever was there. `Chat` watches for the same reason.
|
|
352
|
+
*/
|
|
353
|
+
private watcher;
|
|
354
|
+
connectedCallback(): void;
|
|
355
|
+
disconnectedCallback(): void;
|
|
356
|
+
/** Pauses without forgetting that the reader wanted it running. */
|
|
357
|
+
private readonly pause;
|
|
358
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
359
|
+
protected updated(changed: PropertyValues): void;
|
|
360
|
+
/**
|
|
361
|
+
* Puts each slide into the pane rendered for it.
|
|
362
|
+
*
|
|
363
|
+
* **The panes carry the ARIA and the consumer's element carries none**, which
|
|
364
|
+
* is the whole reason this is a manual assignment rather than a plain slot.
|
|
365
|
+
* The APG wants each slide to be a `group` with `aria-roledescription="slide"`
|
|
366
|
+
* and a name saying where it sits in the run, and this used to be four
|
|
367
|
+
* `setAttribute` calls onto the elements a consumer wrote. Two things were
|
|
368
|
+
* wrong with that, and only one of them was about frameworks.
|
|
369
|
+
*
|
|
370
|
+
* **A React consumer's slides are nodes React is in the middle of hydrating.**
|
|
371
|
+
* The attributes landed before React reached them, so React found a DOM it had
|
|
372
|
+
* not rendered and reported a mismatch it says it will not patch up. It means
|
|
373
|
+
* it: the ARIA survived and the announcement was correct, so nothing looked
|
|
374
|
+
* wrong and the console was the only tell. Deferring the write was tried
|
|
375
|
+
* first, and a frame is a race rather than an ordering: measured in Chromium
|
|
376
|
+
* on the landing page, a tab opened in the foreground still reported the
|
|
377
|
+
* mismatch, and a tab opened hidden did not, only because `requestAnimationFrame`
|
|
378
|
+
* had not run there yet. `Chat` reached this same conclusion for the same
|
|
379
|
+
* reason and its comment on `shadowRootOptions` says so.
|
|
380
|
+
*
|
|
381
|
+
* **And `role="group"` on a consumer's `<a href>` is not additive.** It
|
|
382
|
+
* replaces the implicit link role, so six insight cards on the landing page
|
|
383
|
+
* announced as groups and left the links list entirely. Every slide that is
|
|
384
|
+
* itself a control had this, and no amount of deferring the write would have
|
|
385
|
+
* helped, because the write was the bug. A pane around the slide is what the
|
|
386
|
+
* pattern actually asks for: a group holding a link, rather than a link
|
|
387
|
+
* relabeled as a group.
|
|
388
|
+
*
|
|
389
|
+
* So nothing is written onto a consumer's element at all now, and the
|
|
390
|
+
* mismatch is gone by construction rather than by timing.
|
|
391
|
+
*/
|
|
392
|
+
private assign;
|
|
393
|
+
protected render(): TemplateResult;
|
|
394
|
+
}
|
|
395
|
+
declare global {
|
|
396
|
+
interface HTMLElementTagNameMap {
|
|
397
|
+
'helix-headless-carousel': HelixHeadlessCarousel;
|
|
398
|
+
}
|
|
399
|
+
}
|