@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,381 @@
|
|
|
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, HelixSelectEvent, MixinControllerOpen, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { caretDown } from '@fusion.dev/helix-icons';
|
|
9
|
+
import { html, nothing } from 'lit';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
12
|
+
/**
|
|
13
|
+
* @summary One node in a tree.
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* **`open`, on `MixinControllerOpen`, where it was a bare `expanded` boolean.**
|
|
17
|
+
* A branch showing its children is the same state a disclosure holds, and
|
|
18
|
+
* `AccordionItem` has been on that mixin all along. Written here by hand it had
|
|
19
|
+
* neither half of what the mixin gives: `this.expanded = !this.expanded`
|
|
20
|
+
* announced nothing, so a consumer could not know a branch had opened, and
|
|
21
|
+
* could not own the state either. `aria-expanded` is still what the row
|
|
22
|
+
* renders, because that is the attribute a tree uses; the property is what
|
|
23
|
+
* changed, not the semantics.
|
|
24
|
+
*
|
|
25
|
+
* An element rather than a slot because it owns state: whether it is open,
|
|
26
|
+
* whether it is selected, and whether it is the one holding focus.
|
|
27
|
+
*
|
|
28
|
+
* A branch is any item with something slotted into `children`, detected in
|
|
29
|
+
* `firstUpdated` rather than declared by the consumer. That is a client-side
|
|
30
|
+
* enhancement by necessity, since the server cannot inspect children, so the
|
|
31
|
+
* server renders the node as a leaf and the twisty appears on hydration. It
|
|
32
|
+
* appears rather than disappearing, which is the harmless direction.
|
|
33
|
+
*
|
|
34
|
+
* **`href` makes the row itself the link.** A tree used as navigation is a list
|
|
35
|
+
* of links, and the row is what a reader presses: with the anchor slotted into
|
|
36
|
+
* the name instead, everything outside the words is dead, Enter does nothing,
|
|
37
|
+
* and there is no middle-click, no status bar and no open-in-new-tab. Given an
|
|
38
|
+
* `href` the row *is* an `<a>`, so the platform provides all of that and the
|
|
39
|
+
* keyboard needs no handler at all.
|
|
40
|
+
*
|
|
41
|
+
* It changes the shape of the ARIA, which is why it is a property and not the
|
|
42
|
+
* default. An anchor cannot contain the group, since the group holds more
|
|
43
|
+
* anchors and nesting them is invalid, so the row carries `treeitem` and the
|
|
44
|
+
* group becomes its sibling under a presentational wrapper. That is exactly the
|
|
45
|
+
* navigation flavor of the tree pattern, and the arrangement without an `href`
|
|
46
|
+
* stays as it was: `treeitem` containing `group`, which is what an `<li>`
|
|
47
|
+
* holding a `<ul>` is.
|
|
48
|
+
*
|
|
49
|
+
* A consumer whose framework owns routing slots its own link instead and leaves
|
|
50
|
+
* `href` unset. The row follows that one too, so the whole row works either
|
|
51
|
+
* way; what the anchor adds is what only a real anchor can give.
|
|
52
|
+
*
|
|
53
|
+
* The properties below are written by this component and read by whoever draws
|
|
54
|
+
* it. A consumer sets none of them: they carry a number this element computed
|
|
55
|
+
* and CSS cannot, which is what lets a stylesheet on this tier draw the thing
|
|
56
|
+
* without measuring anything itself.
|
|
57
|
+
*
|
|
58
|
+
* @since 0.1.0
|
|
59
|
+
* @status experimental
|
|
60
|
+
* @aliases TreeNode, Branch, Leaf
|
|
61
|
+
* @documentation https://helix.fusion.dev/components/tree
|
|
62
|
+
*
|
|
63
|
+
* @slot - The item's label.
|
|
64
|
+
* @slot children - Nested items, which make this a branch.
|
|
65
|
+
* @slot end - After the label, at the row's far side. A count, or a state.
|
|
66
|
+
* @slot start - Before the label, after the chevron. A mark about the item.
|
|
67
|
+
*
|
|
68
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before a branch closes, and cancelable.
|
|
69
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before a branch opens, and cancelable.
|
|
70
|
+
* @event {HelixSelectEvent} helix-select - Fired when the item is chosen. Cancelable: refusing it takes the decision and nothing moves.
|
|
71
|
+
* @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
|
|
72
|
+
*
|
|
73
|
+
* @csspart group - The container for nested items.
|
|
74
|
+
* @csspart item - The node, and the focus target unless `href` moves it to the row.
|
|
75
|
+
* @csspart label - The label text.
|
|
76
|
+
* @csspart row - The clickable label row, which is an `<a>` where `href` is set.
|
|
77
|
+
* @csspart toggle - The expand and collapse control.
|
|
78
|
+
*
|
|
79
|
+
* @cssproperty --tree-level - How deep this row sits, counting from zero, for the indent.
|
|
80
|
+
*/
|
|
81
|
+
let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerOpen(HelixElement) {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(...arguments);
|
|
84
|
+
/**
|
|
85
|
+
* Identifies the item to the consumer, carried in `helix-select`.
|
|
86
|
+
*/
|
|
87
|
+
this.value = '';
|
|
88
|
+
/**
|
|
89
|
+
* Where this node goes, which makes its row a real link.
|
|
90
|
+
*
|
|
91
|
+
* Unset by default, and unreflected: a tree of choosable nodes is not a tree
|
|
92
|
+
* of links, and an empty `href` written onto every row would be a link to the
|
|
93
|
+
* current page on every item a consumer never asked to be one.
|
|
94
|
+
*/
|
|
95
|
+
this.href = '';
|
|
96
|
+
/**
|
|
97
|
+
* Where the link opens, for the rare row that leaves the site.
|
|
98
|
+
*/
|
|
99
|
+
this.target = '';
|
|
100
|
+
/**
|
|
101
|
+
* What the link declares about where it goes.
|
|
102
|
+
*
|
|
103
|
+
* Set by the consumer rather than derived from `target`: `noreferrer` is a
|
|
104
|
+
* decision about their own analytics and a component should not make it for
|
|
105
|
+
* them. `noopener` is not needed as a default either, since every browser
|
|
106
|
+
* this library supports implies it for `target="_blank"` already.
|
|
107
|
+
*/
|
|
108
|
+
this.rel = '';
|
|
109
|
+
/**
|
|
110
|
+
* Whether this item is the current one.
|
|
111
|
+
*
|
|
112
|
+
* Not reflected, for the reason `level` below gives in full: the tree assigns
|
|
113
|
+
* this after it upgrades, so the attribute would be a change to markup the
|
|
114
|
+
* consumer rendered and hydration would report it. It reflected, one line
|
|
115
|
+
* from the paragraph saying why it must not.
|
|
116
|
+
*
|
|
117
|
+
* The stylesheet reads it from the row inside this shadow root, which is the
|
|
118
|
+
* answer `level` gives one paragraph down: the indent it drives is written
|
|
119
|
+
* onto the row rather than onto the host, because the row is not part of the
|
|
120
|
+
* tree React hydrates. Mirroring to `data-selected` on the host instead was
|
|
121
|
+
* the same fault with a different name, and React said so.
|
|
122
|
+
*/
|
|
123
|
+
this.selected = false;
|
|
124
|
+
/**
|
|
125
|
+
* Whether this item holds the tree's single tab stop.
|
|
126
|
+
*/
|
|
127
|
+
this.focusable = false;
|
|
128
|
+
/**
|
|
129
|
+
* Whether anything is slotted into `children`.
|
|
130
|
+
*
|
|
131
|
+
* Read after first render.
|
|
132
|
+
*/
|
|
133
|
+
this.branch = false;
|
|
134
|
+
this.handleToggleClick = (event) => {
|
|
135
|
+
/* Only where the row is a link, and then it has to stop: the row would
|
|
136
|
+
navigate away from the branch the reader was trying to open. Without an
|
|
137
|
+
`href` the whole row toggles, which is what a tree of folders wants, so
|
|
138
|
+
there is nothing here to intercept. */
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
event.stopPropagation();
|
|
141
|
+
this.toggleOpen();
|
|
142
|
+
};
|
|
143
|
+
this.handleRowClick = (event) => {
|
|
144
|
+
/* A press that landed on a link is that link's, whichever branch of this
|
|
145
|
+
runs. It was asked on one side and not the other, and the missing half
|
|
146
|
+
cost a feature: a row can hold a link in its `end` slot, which is what
|
|
147
|
+
the documentation sidebar puts there to get back to the index, and
|
|
148
|
+
pressing it collapsed the branch on the way out. Measured in Chrome,
|
|
149
|
+
`open` false and the route changed from the one press.
|
|
150
|
+
|
|
151
|
+
"There is nowhere else for the press to mean" was true of a row holding
|
|
152
|
+
a label, and a slot is somewhere else. */
|
|
153
|
+
const onLink = event.composedPath().some((node) => node instanceof HTMLAnchorElement);
|
|
154
|
+
/* A branch that is also a link goes where it points, and its chevron is
|
|
155
|
+
what opens it. A branch that is not toggles from anywhere in the row. */
|
|
156
|
+
if (this.branch && this.href === '') {
|
|
157
|
+
if (!onLink) {
|
|
158
|
+
this.toggleOpen();
|
|
159
|
+
}
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.select();
|
|
163
|
+
/* Following it here as well would follow it twice and, where a consumer's
|
|
164
|
+
router is listening, route twice. */
|
|
165
|
+
if (!onLink) {
|
|
166
|
+
this.follow();
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
firstUpdated(changed) {
|
|
171
|
+
super.firstUpdated(changed);
|
|
172
|
+
const slot = this.renderRoot.querySelector('slot[name="children"]');
|
|
173
|
+
this.branch = (slot?.assignedElements().length ?? 0) > 0;
|
|
174
|
+
slot?.addEventListener('slotchange', () => {
|
|
175
|
+
this.branch = slot.assignedElements().length > 0;
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @internal Read by the tree to identify a branch across the light DOM,
|
|
180
|
+
* which is cheaper than `instanceof` and is why this is public rather than
|
|
181
|
+
* protected. A consumer asks `branch`, which is the property they set.
|
|
182
|
+
*/
|
|
183
|
+
get isBranch() {
|
|
184
|
+
return this.branch;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Moves focus to this node.
|
|
188
|
+
*
|
|
189
|
+
* Which element that is moves with `href`: the thing carrying `treeitem` is
|
|
190
|
+
* the thing the tree's roving tab stop lives on, and with a link that is the
|
|
191
|
+
* row rather than the wrapper around it.
|
|
192
|
+
*/
|
|
193
|
+
focusItem() {
|
|
194
|
+
/* `preventScroll`, because the browser's own answer to a focus is to walk
|
|
195
|
+
every scrollable ancestor and reveal the element, which is
|
|
196
|
+
`scrollIntoView` by another route and takes the page with it. The root
|
|
197
|
+
calls `scrollItemIntoView` on the next line precisely to avoid that, and
|
|
198
|
+
without this the careful call was arriving after the thing it exists to
|
|
199
|
+
prevent had already happened. It was also hiding whether that util worked
|
|
200
|
+
at all: measured in Chrome, a tree in a scroller scrolled either way, so
|
|
201
|
+
the util could have been scrolling nothing and nobody would have seen. */
|
|
202
|
+
this.renderRoot
|
|
203
|
+
.querySelector(this.href === '' ? '[part="item"]' : '[part="row"]')
|
|
204
|
+
?.focus({ preventScroll: true });
|
|
205
|
+
}
|
|
206
|
+
/** Selects this node and announces it. */
|
|
207
|
+
select() {
|
|
208
|
+
this.dispatchEvent(new HelixSelectEvent({ value: this.value }));
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Chooses this node the way a reader does, from a press or from Enter.
|
|
212
|
+
*
|
|
213
|
+
* Selecting and following are two things and this is where they meet, so the
|
|
214
|
+
* pointer and the keyboard take one path to the same end. The tree calls this
|
|
215
|
+
* rather than `select` for the keyboard, which is what fixes Enter: a nav
|
|
216
|
+
* tree whose rows are links could be walked with the arrows and not entered,
|
|
217
|
+
* because choosing announced a value and nothing listened for it.
|
|
218
|
+
*/
|
|
219
|
+
activate() {
|
|
220
|
+
this.select();
|
|
221
|
+
this.follow();
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Follows a link slotted into the name, if there is one.
|
|
225
|
+
*
|
|
226
|
+
* A row is wider than the words in it: the indent, the padding, and with the
|
|
227
|
+
* chevron at the far end most of the row's width are all outside the anchor,
|
|
228
|
+
* so a reader who pressed the row anywhere but on the text got nothing. The
|
|
229
|
+
* words are the consumer's own content and this does not rewrite them, so
|
|
230
|
+
* what it does instead is press the link they put there.
|
|
231
|
+
*
|
|
232
|
+
* The consumer's anchor rather than an `href` of this element's own,
|
|
233
|
+
* deliberately: a framework's link component is what carries prefetching and
|
|
234
|
+
* client-side routing, and a plain `<a href>` rendered in here would be a
|
|
235
|
+
* full page load on a site that had neither. A synthetic click is what those
|
|
236
|
+
* components listen for, so both keep working.
|
|
237
|
+
*
|
|
238
|
+
* `querySelector` on the light DOM, not the render root: the link is the
|
|
239
|
+
* consumer's, and it is scoped to this item's own name rather than to the
|
|
240
|
+
* whole subtree, or a branch would follow the first link belonging to one of
|
|
241
|
+
* its children.
|
|
242
|
+
*/
|
|
243
|
+
follow() {
|
|
244
|
+
/* Its own row first, where `href` made one. Pressed with a pointer the
|
|
245
|
+
anchor has already navigated and this never runs; from the keyboard it
|
|
246
|
+
has not, because the tree calls `preventDefault` on every key it handles
|
|
247
|
+
and that is what would otherwise swallow Enter on a link. */
|
|
248
|
+
const own = this.renderRoot?.querySelector('a[part="row"]');
|
|
249
|
+
if (own) {
|
|
250
|
+
own.click();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
for (const node of this.children) {
|
|
254
|
+
if (node.slot !== '') {
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
const link = node instanceof HTMLAnchorElement ? node : node.querySelector('a[href]');
|
|
258
|
+
if (link) {
|
|
259
|
+
link.click();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/** Everything inside the row, which is the same whichever element it is. */
|
|
265
|
+
renderRow() {
|
|
266
|
+
return html `${this.branch
|
|
267
|
+
? html `<svg
|
|
268
|
+
part="toggle"
|
|
269
|
+
fill="currentColor"
|
|
270
|
+
viewBox=${caretDown.viewBox}
|
|
271
|
+
aria-hidden="true"
|
|
272
|
+
@click=${this.href === '' ? nothing : this.handleToggleClick}
|
|
273
|
+
>
|
|
274
|
+
${unsafeSVG(caretDown.content)}
|
|
275
|
+
</svg>`
|
|
276
|
+
: nothing}
|
|
277
|
+
<slot name="start"></slot>
|
|
278
|
+
<span part="label"><slot></slot></span>
|
|
279
|
+
<slot name="end"></slot>`;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Mirrors the chosen state where a stylesheet can select on it.
|
|
283
|
+
*
|
|
284
|
+
* **A custom state and not the `selected` attribute it used to reflect.** The
|
|
285
|
+
* parent writes this: a listbox choosing a row, a tab strip moving the tab, a
|
|
286
|
+
* radio group answering for its set. Reflected, that put the element's own
|
|
287
|
+
* bookkeeping onto markup a consumer wrote and a consumer's server never sent,
|
|
288
|
+
* which React reconciles and reports as a mismatch, and which a serialized
|
|
289
|
+
* element pasted back declares as a choice nobody made. `ElementInternals`
|
|
290
|
+
* holds it instead, where it is not in the DOM at all.
|
|
291
|
+
*
|
|
292
|
+
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
293
|
+
* seeds the property, which is what `<helix-tree-item selected>` in a consumer's
|
|
294
|
+
* markup means. What stops is the write back. See 302 and 304.
|
|
295
|
+
*/
|
|
296
|
+
willUpdate(changed) {
|
|
297
|
+
super.willUpdate(changed);
|
|
298
|
+
this.toggleState('selected', this.selected);
|
|
299
|
+
}
|
|
300
|
+
render() {
|
|
301
|
+
/* Where the semantics sit, which `href` decides.
|
|
302
|
+
*
|
|
303
|
+
* A link row carries them itself and the wrapper drops to `none`, because
|
|
304
|
+
* an anchor cannot contain the group: the group holds more anchors and
|
|
305
|
+
* nesting them is invalid markup that no assistive technology reads the way
|
|
306
|
+
* it looks. So the row becomes the `treeitem` and the group becomes its
|
|
307
|
+
* sibling, which is the navigation flavor of the pattern.
|
|
308
|
+
*
|
|
309
|
+
* Without one, nothing changes: the wrapper is the `treeitem` and holds the
|
|
310
|
+
* group, which is what an `<li>` holding a `<ul>` is, and what this was
|
|
311
|
+
* fixed to be when the group rendered outside the node it belonged to. */
|
|
312
|
+
const linked = this.href !== '';
|
|
313
|
+
const level = this.level ?? 1;
|
|
314
|
+
const expanded = this.branch ? (this.open ? 'true' : 'false') : nothing;
|
|
315
|
+
const tabIndex = this.focusable ? '0' : '-1';
|
|
316
|
+
return html `<div
|
|
317
|
+
part="item"
|
|
318
|
+
role=${linked ? 'none' : 'treeitem'}
|
|
319
|
+
aria-expanded=${linked ? nothing : expanded}
|
|
320
|
+
aria-selected=${linked ? nothing : this.selected ? 'true' : 'false'}
|
|
321
|
+
aria-level=${linked ? nothing : level}
|
|
322
|
+
tabindex=${linked ? nothing : tabIndex}
|
|
323
|
+
>
|
|
324
|
+
${linked
|
|
325
|
+
? html `<a
|
|
326
|
+
part="row"
|
|
327
|
+
role="treeitem"
|
|
328
|
+
href=${this.href}
|
|
329
|
+
target=${this.target || nothing}
|
|
330
|
+
rel=${this.rel || nothing}
|
|
331
|
+
aria-expanded=${expanded}
|
|
332
|
+
aria-selected=${this.selected ? 'true' : 'false'}
|
|
333
|
+
aria-level=${level}
|
|
334
|
+
tabindex=${tabIndex}
|
|
335
|
+
style="--tree-level: ${level}"
|
|
336
|
+
@click=${this.handleRowClick}
|
|
337
|
+
>${this.renderRow()}</a>`
|
|
338
|
+
: html `<div
|
|
339
|
+
part="row"
|
|
340
|
+
style="--tree-level: ${level}"
|
|
341
|
+
@click=${this.handleRowClick}
|
|
342
|
+
>${this.renderRow()}</div>`}
|
|
343
|
+
<!-- Inside the treeitem, not beside it. It rendered as a sibling, so
|
|
344
|
+
the row's \`aria-expanded\` described a group the row did not own and
|
|
345
|
+
the branch reported children it had no relationship to. The pattern
|
|
346
|
+
is \`treeitem\` containing \`group\`, which is also what an \`<li>\`
|
|
347
|
+
holding a \`<ul>\` is. -->
|
|
348
|
+
<div part="group" role="group" ?hidden=${!this.open}>
|
|
349
|
+
<slot name="children"></slot>
|
|
350
|
+
</div>
|
|
351
|
+
</div>`;
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
__decorate([
|
|
355
|
+
property()
|
|
356
|
+
], HelixHeadlessTreeItem.prototype, "value", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
property()
|
|
359
|
+
], HelixHeadlessTreeItem.prototype, "href", void 0);
|
|
360
|
+
__decorate([
|
|
361
|
+
property()
|
|
362
|
+
], HelixHeadlessTreeItem.prototype, "target", void 0);
|
|
363
|
+
__decorate([
|
|
364
|
+
property()
|
|
365
|
+
], HelixHeadlessTreeItem.prototype, "rel", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
property({ type: Boolean })
|
|
368
|
+
], HelixHeadlessTreeItem.prototype, "selected", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
property({ attribute: 'level', type: Number })
|
|
371
|
+
], HelixHeadlessTreeItem.prototype, "level", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
state()
|
|
374
|
+
], HelixHeadlessTreeItem.prototype, "focusable", void 0);
|
|
375
|
+
__decorate([
|
|
376
|
+
state()
|
|
377
|
+
], HelixHeadlessTreeItem.prototype, "branch", void 0);
|
|
378
|
+
HelixHeadlessTreeItem = __decorate([
|
|
379
|
+
customElement('helix-headless-tree-item')
|
|
380
|
+
], HelixHeadlessTreeItem);
|
|
381
|
+
export { HelixHeadlessTreeItem };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
|
+
declare const HelixHeadlessTree_base: (new (...args: any[]) => import("@fusion.dev/helix-core").CollectionElement) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerActiveInterface) & typeof HelixElement;
|
|
4
|
+
/**
|
|
5
|
+
* @summary A tree of items, navigable entirely from the keyboard.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Focus is a single tab stop, moved with the arrow keys, which is what the tree
|
|
9
|
+
* pattern requires: a sidebar of forty items should not be forty presses of Tab
|
|
10
|
+
* to get past. The tree owns which item is the tab stop and moves it as focus
|
|
11
|
+
* moves, so the browser's own focus order is never fought with.
|
|
12
|
+
*
|
|
13
|
+
* Items are found with `instanceof`, never by tag name, so the headless tier
|
|
14
|
+
* does not learn about the styled one.
|
|
15
|
+
*
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
* @status experimental
|
|
18
|
+
* @category navigation
|
|
19
|
+
* @aliases FileTree, Navigation tree
|
|
20
|
+
* @documentation https://helix.fusion.dev/components/tree
|
|
21
|
+
*
|
|
22
|
+
* @slot - The tree's items.
|
|
23
|
+
*
|
|
24
|
+
* @event {HelixActivateEvent} helix-activate - Fired once the current one has moved, so the element already holds it.
|
|
25
|
+
* @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the current node moves, and cancelable. The only way to refuse one.
|
|
26
|
+
* @event {HelixSelectEvent} helix-select - Fired when an item is chosen. Dispatched by the item and listened for here, because the tree is what a consumer holds a reference to. Cancelable: refusing it takes the decision and nothing moves.
|
|
27
|
+
*
|
|
28
|
+
* @csspart empty - Shown when there are no rows to show.
|
|
29
|
+
* @csspart loading - Shown while the rows are still on their way.
|
|
30
|
+
* @csspart tree - The tree container.
|
|
31
|
+
*/
|
|
32
|
+
export declare class HelixHeadlessTree extends HelixHeadlessTree_base {
|
|
33
|
+
/**
|
|
34
|
+
* Accessible name for the tree.
|
|
35
|
+
*/
|
|
36
|
+
label: string;
|
|
37
|
+
private watcher;
|
|
38
|
+
/**
|
|
39
|
+
* Every item, in the order a reader moving down would meet them.
|
|
40
|
+
*
|
|
41
|
+
* Selected by tag rather than by walking everything and filtering. `'*'` built
|
|
42
|
+
* an array of every descendant element in the tree, labels and icons and
|
|
43
|
+
* whatever a consumer slotted into a row included, and threw most of it away;
|
|
44
|
+
* on a tree of any size that is the array a single arrow press rebuilds.
|
|
45
|
+
*
|
|
46
|
+
* The two tag names rather than `instanceof` on everything: a styled
|
|
47
|
+
* `helix-tree-item` extends the base, so both names are needed, and the
|
|
48
|
+
* `instanceof` stays as the type guard because a consumer can write either
|
|
49
|
+
* tag and neither selector proves what the element is.
|
|
50
|
+
*/
|
|
51
|
+
private get items();
|
|
52
|
+
/** Items a reader can actually reach: not inside a collapsed branch. */
|
|
53
|
+
private get visibleItems();
|
|
54
|
+
private readonly handleSelection;
|
|
55
|
+
/**
|
|
56
|
+
* Pushes tree-owned state down: which item is selected, which holds the tab
|
|
57
|
+
* stop, and how deep each one sits.
|
|
58
|
+
*
|
|
59
|
+
* Depth is computed here rather than by each item counting its own ancestors,
|
|
60
|
+
* so an item moved in the tree gets the right indent without knowing it moved.
|
|
61
|
+
*/
|
|
62
|
+
private syncItems;
|
|
63
|
+
private move;
|
|
64
|
+
private focusOn;
|
|
65
|
+
private readonly handleKeydown;
|
|
66
|
+
/**
|
|
67
|
+
* A branch opened or closed, whoever did it.
|
|
68
|
+
*
|
|
69
|
+
* The keyboard paths called `syncItems` by hand and the pointer path did not,
|
|
70
|
+
* so collapsing a branch by clicking its chevron left the tab stop on a row
|
|
71
|
+
* inside the subtree that had just been hidden: the tree kept its one stop
|
|
72
|
+
* and the stop was on something nobody could see or reach. Listening for the
|
|
73
|
+
* item's own open events covers every way a branch can move, including a
|
|
74
|
+
* consumer setting `open` directly.
|
|
75
|
+
*/
|
|
76
|
+
private readonly handleBranch;
|
|
77
|
+
connectedCallback(): void;
|
|
78
|
+
disconnectedCallback(): void;
|
|
79
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
80
|
+
protected updated(changed: PropertyValues): void;
|
|
81
|
+
protected render(): TemplateResult;
|
|
82
|
+
}
|
|
83
|
+
declare global {
|
|
84
|
+
interface HTMLElementTagNameMap {
|
|
85
|
+
'helix-headless-tree': HelixHeadlessTree;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export {};
|