@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,419 @@
|
|
|
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 { AriaForwardController, customElement, HelixFormElement, hostAria, MixinControllerOpen, MixinControllerValue, MixinField, PopoverController, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { caretDown } from '@fusion.dev/helix-icons';
|
|
9
|
+
import { nothing } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
12
|
+
import { html } from 'lit/static-html.js';
|
|
13
|
+
import '../../listbox/index.js';
|
|
14
|
+
/**
|
|
15
|
+
* @summary A closed list that opens to be chosen from.
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* **A trigger and a `Listbox`, not a listbox reimplemented behind a button.**
|
|
19
|
+
* The list this opens is the same element a consumer can use on its own, with
|
|
20
|
+
* the same keyboard, the same filtering and the same multi-select rules. What
|
|
21
|
+
* Select adds is the closing: a trigger that says what is chosen, a surface
|
|
22
|
+
* that floats, and somewhere for focus to go back to.
|
|
23
|
+
*
|
|
24
|
+
* The options are the consumer's, in the consumer's light DOM, slotted through
|
|
25
|
+
* into the listbox. That is why the listbox walks through slots to find them:
|
|
26
|
+
* from its point of view the options belong to something else.
|
|
27
|
+
*
|
|
28
|
+
* **What it does not do is duplicate the value.** `Select` owns it, hands it
|
|
29
|
+
* down, and takes changes back; the listbox is the thing being operated and not
|
|
30
|
+
* a second place the answer lives.
|
|
31
|
+
*
|
|
32
|
+
* @since 0.1.0
|
|
33
|
+
* @status experimental
|
|
34
|
+
* @category forms
|
|
35
|
+
* @aliases Dropdown, Picker
|
|
36
|
+
* @documentation https://helix.fusion.dev/components/select
|
|
37
|
+
*
|
|
38
|
+
* @slot - The options, and any groups of them.
|
|
39
|
+
* @slot end - After it, for a count, a unit, or a clear button.
|
|
40
|
+
* @slot hint - Richer than a string.
|
|
41
|
+
* @slot indicator - The mark on the trigger saying this opens, usually a caret.
|
|
42
|
+
* @slot label - Richer than a string.
|
|
43
|
+
* @slot start - Before the chosen value, for an icon or a prefix.
|
|
44
|
+
*
|
|
45
|
+
* @event {Event} change - Announced once the value has moved.
|
|
46
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - Relayed from the listbox when the answer changes. Cancelable: refusing it takes the decision and nothing moves.
|
|
47
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before it closes. Cancelable: refusing it takes the decision and nothing moves.
|
|
48
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the list opens. Cancelable: refusing it takes the decision and nothing moves.
|
|
49
|
+
* @event {Event} input - Announced once the value has moved.
|
|
50
|
+
* @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
|
|
51
|
+
*
|
|
52
|
+
* @csspart feedback - What is wrong with it.
|
|
53
|
+
* @csspart hint - Help under the trigger.
|
|
54
|
+
* @csspart indicator - The caret saying the control opens. Replaced by slotting one.
|
|
55
|
+
* @csspart label - The question, over the trigger.
|
|
56
|
+
* @csspart listbox - The list inside it.
|
|
57
|
+
* @csspart listbox-empty - Shown when a filter has hidden everything.
|
|
58
|
+
* @csspart listbox-feedback - What is wrong with it.
|
|
59
|
+
* @csspart listbox-filter-icon - The mark beside that field.
|
|
60
|
+
* @csspart listbox-filter-mark - The glyph beside the filter field, where none is slotted.
|
|
61
|
+
* @csspart listbox-hint - Help under the list.
|
|
62
|
+
* @csspart listbox-items - The list itself.
|
|
63
|
+
* @csspart listbox-label - The question, over the list.
|
|
64
|
+
* @csspart listbox-loading - Shown while the options are still on their way.
|
|
65
|
+
* @csspart listbox-search - The region holding the field that narrows the list.
|
|
66
|
+
* @csspart listbox-search-field - The field itself.
|
|
67
|
+
* @csspart surface - The floating panel.
|
|
68
|
+
* @csspart trigger - The closed control, which says what is chosen.
|
|
69
|
+
* @csspart value - The chosen option's text inside the trigger.
|
|
70
|
+
*/
|
|
71
|
+
let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(MixinControllerValue(MixinField(HelixFormElement))) {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
/* A consumer's `aria-describedby` names ids in their own tree and the control
|
|
75
|
+
is in this shadow root, so the reference has to be carried down as an
|
|
76
|
+
element rather than copied as an id. See `AriaForwardController`: measured
|
|
77
|
+
in Chrome's own tree, the host held the description and the control the
|
|
78
|
+
reader is actually on was exposed without it. */
|
|
79
|
+
this.aria = new AriaForwardController(this, {
|
|
80
|
+
target: () => this.renderRoot?.querySelector('[part="trigger"]') ?? null,
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* Whether the list can be narrowed by typing.
|
|
84
|
+
*
|
|
85
|
+
* Passed to the listbox rather than acted on here, because the listbox owns
|
|
86
|
+
* the filtering, the empty state and the keyboard. This property existed and
|
|
87
|
+
* was never read: it reflected, it type-checked, and nothing anywhere
|
|
88
|
+
* rendered a field. API that does nothing is worse than API that is missing,
|
|
89
|
+
* because a consumer sets it and believes it.
|
|
90
|
+
*/
|
|
91
|
+
this.filterable = false;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the options are still on their way.
|
|
94
|
+
*
|
|
95
|
+
* Passed straight to the list, which is where the rows are and so where the
|
|
96
|
+
* message belongs. Two components saying "Loading" about one request is a
|
|
97
|
+
* consumer wiring the same flag twice.
|
|
98
|
+
*/
|
|
99
|
+
this.loading = false;
|
|
100
|
+
/**
|
|
101
|
+
* What the list says while they are on their way.
|
|
102
|
+
*/
|
|
103
|
+
this.loadingText = 'Loading';
|
|
104
|
+
/**
|
|
105
|
+
* What it says where there are none.
|
|
106
|
+
*/
|
|
107
|
+
this.emptyText = 'No matches';
|
|
108
|
+
/**
|
|
109
|
+
* Whether more than one option can be the answer.
|
|
110
|
+
*/
|
|
111
|
+
this.multiple = false;
|
|
112
|
+
/**
|
|
113
|
+
* Shown on the trigger while nothing is chosen.
|
|
114
|
+
*/
|
|
115
|
+
this.placeholder = 'Choose';
|
|
116
|
+
/* The surface floats *and is in the top layer*, which it was not.
|
|
117
|
+
*
|
|
118
|
+
* It had a `FloatingController` and a `DismissController` and never called
|
|
119
|
+
* `showPopover`, so the panel was an ordinary positioned element and the
|
|
120
|
+
* first ancestor with `overflow: hidden` clipped it. A select inside a
|
|
121
|
+
* scrolling card was cut off where a menu in the same place was not, and the
|
|
122
|
+
* two are the same shape: floating panel, trigger, dismissal. That is what
|
|
123
|
+
* `PopoverController` is, and having one of them is what stops the third copy
|
|
124
|
+
* being subtly different again.
|
|
125
|
+
*
|
|
126
|
+
* Held off the trigger by the controller rather than by a margin on the
|
|
127
|
+
* panel. A margin is inside the box the controller measures, so it would be
|
|
128
|
+
* counted once in the placement and again in the layout, and the gap would
|
|
129
|
+
* change as the panel flipped above the trigger for want of room. */
|
|
130
|
+
this.panel = new PopoverController(this, {
|
|
131
|
+
anchor: () => this.renderRoot?.querySelector('[part="trigger"]'),
|
|
132
|
+
/* The surface *and* the trigger.
|
|
133
|
+
*
|
|
134
|
+
* A control is not always one element: the button that opens this panel is
|
|
135
|
+
* part of it, and a press on it is not a press outside. Scoped to the
|
|
136
|
+
* surface alone, `pointerdown` on the trigger closed the panel and the
|
|
137
|
+
* trigger's own `toggleOpen` reopened it on the `click` that followed, so
|
|
138
|
+
* the panel could never be closed by the button that opened it. Measured
|
|
139
|
+
* across all five popover-bearing components: Menu, Popover and Tooltip
|
|
140
|
+
* already named their invoker; this one and its three siblings did not, and
|
|
141
|
+
* all four stayed open on a second press where Menu closed.
|
|
142
|
+
*
|
|
143
|
+
* `DismissController` documents this exact failure and takes a list for it.
|
|
144
|
+
* The list was the fix; using it was the part that did not happen here. */
|
|
145
|
+
boundary: () => [
|
|
146
|
+
this.renderRoot?.querySelector('[part="surface"]'),
|
|
147
|
+
this.renderRoot?.querySelector('[part="trigger"]'),
|
|
148
|
+
],
|
|
149
|
+
offset: () => 4,
|
|
150
|
+
onDismiss: () => this.close(),
|
|
151
|
+
placement: 'bottom-start',
|
|
152
|
+
surface: () => this.renderRoot?.querySelector('[part="surface"]'),
|
|
153
|
+
});
|
|
154
|
+
this.handleChange = (event) => {
|
|
155
|
+
/* From the event, not from the listbox.
|
|
156
|
+
*
|
|
157
|
+
* The event carries the value being *proposed*, and it is dispatched before
|
|
158
|
+
* it is applied, which is what makes it refusable. Reading the listbox here
|
|
159
|
+
* therefore read the value it still held: one choice behind, and on the
|
|
160
|
+
* first choice nothing at all.
|
|
161
|
+
*
|
|
162
|
+
* And the listbox never applies it anyway. The select passes `.value` down,
|
|
163
|
+
* which is a consumer declaring ownership, so the listbox inside the panel
|
|
164
|
+
* is controlled by the select and correctly waits to be told. That is the
|
|
165
|
+
* right arrangement, and it makes reading the listbox's own value the one
|
|
166
|
+
* thing that can never work. */
|
|
167
|
+
const next = event.detail.value;
|
|
168
|
+
/* Nothing happens on a refusal, and everything did.
|
|
169
|
+
*
|
|
170
|
+
* The panel closed and a native `change` went out whether or not the change
|
|
171
|
+
* was taken, so a consumer calling `preventDefault()` on `helix-change`
|
|
172
|
+
* kept the old value, watched the select shut as though it had been chosen,
|
|
173
|
+
* and told the form it had moved. Refusing a change should leave the
|
|
174
|
+
* control exactly where it was. */
|
|
175
|
+
if (!this.requestValue(next)) {
|
|
176
|
+
event.stopPropagation();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
/* Closed on a choice, unless more than one can be made: a multi-select that
|
|
180
|
+
shut after each pick would be a control the reader has to reopen to use
|
|
181
|
+
again. */
|
|
182
|
+
if (!this.multiple) {
|
|
183
|
+
this.close();
|
|
184
|
+
}
|
|
185
|
+
/* The listbox's request is stopped and this element's own has already gone
|
|
186
|
+
out, from `requestValue` above: two elements announcing one choice is
|
|
187
|
+
what a consumer would have to deduplicate. The comment here used to say
|
|
188
|
+
the listbox's was "left to travel", which the line below it has always
|
|
189
|
+
contradicted.
|
|
190
|
+
|
|
191
|
+
And no `change` is dispatched here. `requestValue` announces `input` and
|
|
192
|
+
`change` through the mixin, the way every other discrete control does, so
|
|
193
|
+
a second one from this line was a second `change` per choice: measured on
|
|
194
|
+
the styled tier at three, one from the mixin, one from here, and one from
|
|
195
|
+
the listbox before it was stopped. */
|
|
196
|
+
event.stopPropagation();
|
|
197
|
+
};
|
|
198
|
+
this.handleTriggerKeydown = (event) => {
|
|
199
|
+
if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') {
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
this.requestOpen(true);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Which option is chosen, as an index, or `-1` where none is.
|
|
207
|
+
*
|
|
208
|
+
* Read off the listbox this renders, which owns the options and is where the
|
|
209
|
+
* same two properties are implemented. Delegating rather than recomputing is
|
|
210
|
+
* what keeps a composed control and the control inside it from answering
|
|
211
|
+
* differently: they are one chooser to a consumer.
|
|
212
|
+
*/
|
|
213
|
+
get selectedIndex() {
|
|
214
|
+
return this.listbox?.selectedIndex ?? -1;
|
|
215
|
+
}
|
|
216
|
+
set selectedIndex(at) {
|
|
217
|
+
const listbox = this.listbox;
|
|
218
|
+
if (listbox) {
|
|
219
|
+
listbox.selectedIndex = at;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/** Which kind of chooser this is, in the platform's two words. */
|
|
223
|
+
get type() {
|
|
224
|
+
return this.multiple ? 'select-multiple' : 'select-one';
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The list inside the surface, or nothing where there is no DOM to hold one.
|
|
228
|
+
*
|
|
229
|
+
* The optional chain is the server. `renderRoot` is a property Lit's element
|
|
230
|
+
* shim does not carry, and this getter is reached from `display`, which is
|
|
231
|
+
* read during `render`: without it the select threw on every server render
|
|
232
|
+
* and could not be served at all. Found by writing its SSR spec, which is
|
|
233
|
+
* the only thing that would have found it, because the client is where every
|
|
234
|
+
* other path runs and the client always has a root.
|
|
235
|
+
*
|
|
236
|
+
* The other reads of `renderRoot` here are inside callbacks the controllers
|
|
237
|
+
* invoke, and a controller only runs on a connected element, so they cannot
|
|
238
|
+
* be reached from the server and are left plain.
|
|
239
|
+
*/
|
|
240
|
+
get listbox() {
|
|
241
|
+
return this.renderRoot?.querySelector('[part="listbox"]') ?? null;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* What the trigger says: the chosen options' words, or the placeholder.
|
|
245
|
+
*
|
|
246
|
+
* Read off the options rather than stored, because the words are the
|
|
247
|
+
* consumer's content and storing a copy is storing something that goes stale
|
|
248
|
+
* the moment they change it.
|
|
249
|
+
*/
|
|
250
|
+
get display() {
|
|
251
|
+
const chosen = new Set(this.value === '' ? [] : this.value.split(','));
|
|
252
|
+
const words = (this.listbox?.options ?? [])
|
|
253
|
+
.filter((option) => chosen.has(option.value))
|
|
254
|
+
.map((option) => option.text);
|
|
255
|
+
return words.length > 0 ? words.join(', ') : this.placeholder;
|
|
256
|
+
}
|
|
257
|
+
/** Closes the list and puts focus back where it came from. */
|
|
258
|
+
close() {
|
|
259
|
+
if (!this.open) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
this.requestOpen(false);
|
|
263
|
+
// Back to the trigger, because focus is inside a panel that is going away
|
|
264
|
+
// and a reader who loses it lands at the top of the document.
|
|
265
|
+
this.renderRoot.querySelector('[part="trigger"]')?.focus();
|
|
266
|
+
}
|
|
267
|
+
/** Reports the answer and the verdict on it. */
|
|
268
|
+
sync() {
|
|
269
|
+
this.internals.setFormValue(this.value === '' ? null : this.value);
|
|
270
|
+
this.reportRequired(this.value === '', 'Choose one to continue.', 'trigger');
|
|
271
|
+
}
|
|
272
|
+
willUpdate(changed) {
|
|
273
|
+
super.willUpdate(changed);
|
|
274
|
+
hostAria(this.internals, { label: this.label });
|
|
275
|
+
}
|
|
276
|
+
updated(changed) {
|
|
277
|
+
super.updated(changed);
|
|
278
|
+
this.sync();
|
|
279
|
+
this.linkHost();
|
|
280
|
+
if (this.open) {
|
|
281
|
+
/* Driven from `updated` rather than from a `show()` method, because the
|
|
282
|
+
open state is the property and a consumer may set it directly. The
|
|
283
|
+
controller is idempotent, so arriving here twice for the same open
|
|
284
|
+
costs nothing. */
|
|
285
|
+
this.panel.show();
|
|
286
|
+
/* Into the list, which is where the keyboard has to be for the arrows to
|
|
287
|
+
mean anything. It reached the listbox element and stopped there, that
|
|
288
|
+
element not being focusable, so focus stayed on the trigger and every
|
|
289
|
+
arrow press went to the page. The listbox delegates focus now, so this
|
|
290
|
+
lands on the list inside it.
|
|
291
|
+
*
|
|
292
|
+
* Only on the update that opened it. `updated` runs for any change while
|
|
293
|
+
* the panel is up, a filter keystroke or a value arriving, and moving
|
|
294
|
+
* focus on each of those is a focus thief: harmless while the listbox was
|
|
295
|
+
* unfocusable, and a real one the moment it was made to work. */
|
|
296
|
+
if (changed.has('open')) {
|
|
297
|
+
this.listbox?.focus();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
this.panel.hide();
|
|
302
|
+
/* And the filter goes with it. A filterable select reopened still narrowed
|
|
303
|
+
with the old needle in its search box, and `hidden` still written on the
|
|
304
|
+
options it had ruled out, so the second use of the control started from
|
|
305
|
+
the first one's leftovers. Closing is where a search ends. */
|
|
306
|
+
this.listbox?.requestFilter('');
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* The list the trigger opens, behind a seam the styled tier can move.
|
|
311
|
+
*
|
|
312
|
+
* A method rather than a fragment inline, so a tier above can render its own
|
|
313
|
+
* list, wrap this one, or pass it a property the base does not know about,
|
|
314
|
+
* without reimplementing the whole template. The tag is interpolated rather
|
|
315
|
+
* than written, so `tier` resolves it: this renders the base listbox, and a
|
|
316
|
+
* styled subclass that sets `tier` renders the styled one from the same
|
|
317
|
+
* template.
|
|
318
|
+
*/
|
|
319
|
+
renderListbox() {
|
|
320
|
+
return html `<${this.tag('listbox')}
|
|
321
|
+
empty-text=${this.emptyText}
|
|
322
|
+
loading-text=${this.loadingText}
|
|
323
|
+
?loading=${this.loading}
|
|
324
|
+
part="listbox"
|
|
325
|
+
exportparts="empty: listbox-empty, feedback: listbox-feedback, filter-icon: listbox-filter-icon,
|
|
326
|
+
filter-mark: listbox-filter-mark, hint: listbox-hint, items: listbox-items,
|
|
327
|
+
label: listbox-label, loading: listbox-loading, search: listbox-search,
|
|
328
|
+
search-field: listbox-search-field"
|
|
329
|
+
.value=${this.value}
|
|
330
|
+
?multiple=${this.multiple}
|
|
331
|
+
?filterable=${this.filterable}
|
|
332
|
+
aria-label=${this.label || nothing}
|
|
333
|
+
@helix-before-change=${this.handleChange}
|
|
334
|
+
@change=${this.stopInner}
|
|
335
|
+
@input=${this.stopInner}
|
|
336
|
+
>
|
|
337
|
+
<!-- The trigger's words are read off the options, and on the first
|
|
338
|
+
render there are none: the slot has not been assigned yet, so a
|
|
339
|
+
select with a value came up showing its placeholder. Assignment
|
|
340
|
+
changes no property, so nothing else would schedule the update
|
|
341
|
+
that fixes it. -->
|
|
342
|
+
<slot @slotchange=${() => this.requestUpdate()}></slot>
|
|
343
|
+
</${this.tag('listbox')}>`;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* The caret saying the control opens, behind a seam.
|
|
347
|
+
*
|
|
348
|
+
* Slot fallback, so a consumer replaces it by slotting; and a method, so the
|
|
349
|
+
* tier above replaces it by overriding. Those answer different people: the
|
|
350
|
+
* slot is for the page and the method is for whoever is building the styled
|
|
351
|
+
* layer, and a fallback with only the first is one a tier can restyle and
|
|
352
|
+
* cannot change.
|
|
353
|
+
*/
|
|
354
|
+
renderIndicator() {
|
|
355
|
+
return html `<slot name="indicator">
|
|
356
|
+
<svg part="indicator" fill="currentColor" viewBox=${caretDown.viewBox} aria-hidden="true">
|
|
357
|
+
${unsafeSVG(caretDown.content)}
|
|
358
|
+
</svg>
|
|
359
|
+
</slot>`;
|
|
360
|
+
}
|
|
361
|
+
render() {
|
|
362
|
+
return html `${this.renderLabel()}
|
|
363
|
+
<button
|
|
364
|
+
part="trigger"
|
|
365
|
+
id="control"
|
|
366
|
+
type="button"
|
|
367
|
+
aria-haspopup="listbox"
|
|
368
|
+
aria-expanded=${this.open ? 'true' : 'false'}
|
|
369
|
+
aria-describedby=${this.describedBy ?? nothing}
|
|
370
|
+
?disabled=${this.isDisabled}
|
|
371
|
+
@click=${() => this.toggleOpen()}
|
|
372
|
+
@keydown=${this.handleTriggerKeydown}
|
|
373
|
+
>
|
|
374
|
+
<slot name="start"></slot>
|
|
375
|
+
<span part="value">${this.display}</span>
|
|
376
|
+
${
|
|
377
|
+
/* Before the indicator, not after it. The caret is the affordance
|
|
378
|
+
saying the control opens, so it stays the last thing in the trigger
|
|
379
|
+
whatever else is put in front of it. */
|
|
380
|
+
''}
|
|
381
|
+
<slot name="end"></slot>
|
|
382
|
+
${
|
|
383
|
+
/* The slot has a fallback, and had none: a select written without a
|
|
384
|
+
hand-slotted icon drew no mark at all saying it opens, and every
|
|
385
|
+
example in the family passes one, which is what hid it. A caret is
|
|
386
|
+
the mark, and slotting anything replaces it, which is this
|
|
387
|
+
library's rule for a content property. */
|
|
388
|
+
''}
|
|
389
|
+
${this.renderIndicator()}
|
|
390
|
+
</button>
|
|
391
|
+
|
|
392
|
+
<div part="surface" popover="manual" ?hidden=${!this.open}>
|
|
393
|
+
${this.renderListbox()}
|
|
394
|
+
</div>
|
|
395
|
+
${this.renderHint()}${this.renderFeedback()}`;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
__decorate([
|
|
399
|
+
property({ reflect: true, type: Boolean })
|
|
400
|
+
], HelixHeadlessSelect.prototype, "filterable", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
property({ reflect: true, type: Boolean })
|
|
403
|
+
], HelixHeadlessSelect.prototype, "loading", void 0);
|
|
404
|
+
__decorate([
|
|
405
|
+
property({ attribute: 'loading-text' })
|
|
406
|
+
], HelixHeadlessSelect.prototype, "loadingText", void 0);
|
|
407
|
+
__decorate([
|
|
408
|
+
property({ attribute: 'empty-text' })
|
|
409
|
+
], HelixHeadlessSelect.prototype, "emptyText", void 0);
|
|
410
|
+
__decorate([
|
|
411
|
+
property({ reflect: true, type: Boolean })
|
|
412
|
+
], HelixHeadlessSelect.prototype, "multiple", void 0);
|
|
413
|
+
__decorate([
|
|
414
|
+
property()
|
|
415
|
+
], HelixHeadlessSelect.prototype, "placeholder", void 0);
|
|
416
|
+
HelixHeadlessSelect = __decorate([
|
|
417
|
+
customElement('helix-headless-select')
|
|
418
|
+
], HelixHeadlessSelect);
|
|
419
|
+
export { HelixHeadlessSelect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/skeleton-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/skeleton-root.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Stands in for content that has not arrived.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Carries `aria-busy` and a polite live region, so a reader using a screen
|
|
8
|
+
* reader is told the region is filling rather than told nothing and left to
|
|
9
|
+
* wonder. Both go through `ElementInternals`, which writes no attribute.
|
|
10
|
+
*
|
|
11
|
+
* Holds no `shape`. Whether a placeholder is a line, a block or a circle is
|
|
12
|
+
* presentation, and putting it here would give the headless tier an appearance
|
|
13
|
+
* property, which is the one thing that tier is for not having.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1.0
|
|
16
|
+
* @status stable
|
|
17
|
+
* @category feedback
|
|
18
|
+
* @aliases Placeholder, Shimmer, Ghost
|
|
19
|
+
* @documentation https://helix.fusion.dev/components/skeleton
|
|
20
|
+
*
|
|
21
|
+
* @csspart skeleton - The placeholder surface.
|
|
22
|
+
*/
|
|
23
|
+
export declare class HelixHeadlessSkeleton extends HelixElement {
|
|
24
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
25
|
+
protected render(): TemplateResult;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'helix-headless-skeleton': HelixHeadlessSkeleton;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* @summary Stands in for content that has not arrived.
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
* Carries `aria-busy` and a polite live region, so a reader using a screen
|
|
14
|
+
* reader is told the region is filling rather than told nothing and left to
|
|
15
|
+
* wonder. Both go through `ElementInternals`, which writes no attribute.
|
|
16
|
+
*
|
|
17
|
+
* Holds no `shape`. Whether a placeholder is a line, a block or a circle is
|
|
18
|
+
* presentation, and putting it here would give the headless tier an appearance
|
|
19
|
+
* property, which is the one thing that tier is for not having.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.1.0
|
|
22
|
+
* @status stable
|
|
23
|
+
* @category feedback
|
|
24
|
+
* @aliases Placeholder, Shimmer, Ghost
|
|
25
|
+
* @documentation https://helix.fusion.dev/components/skeleton
|
|
26
|
+
*
|
|
27
|
+
* @csspart skeleton - The placeholder surface.
|
|
28
|
+
*/
|
|
29
|
+
let HelixHeadlessSkeleton = class HelixHeadlessSkeleton extends HelixElement {
|
|
30
|
+
willUpdate(changed) {
|
|
31
|
+
super.willUpdate(changed);
|
|
32
|
+
this.internals.ariaBusy = 'true';
|
|
33
|
+
this.internals.ariaLive = 'polite';
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return html `<span part="skeleton"></span>`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
HelixHeadlessSkeleton = __decorate([
|
|
40
|
+
customElement('helix-headless-skeleton')
|
|
41
|
+
], HelixHeadlessSkeleton);
|
|
42
|
+
export { HelixHeadlessSkeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/slider-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/slider-root.js';
|