@fusion.dev/helix 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 +99157 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/item/accordion-item.css.d.ts +1 -0
- package/dist/accordion/item/accordion-item.css.js +92 -0
- package/dist/accordion/item/accordion-item.d.ts +39 -0
- package/dist/accordion/item/accordion-item.js +45 -0
- package/dist/accordion/root/accordion-root.css.d.ts +1 -0
- package/dist/accordion/root/accordion-root.css.js +25 -0
- package/dist/accordion/root/accordion-root.d.ts +49 -0
- package/dist/accordion/root/accordion-root.js +40 -0
- package/dist/announcement/index.d.ts +1 -0
- package/dist/announcement/index.js +1 -0
- package/dist/announcement/root/announcement-root.css.d.ts +1 -0
- package/dist/announcement/root/announcement-root.css.js +145 -0
- package/dist/announcement/root/announcement-root.d.ts +26 -0
- package/dist/announcement/root/announcement-root.js +32 -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.css.d.ts +1 -0
- package/dist/app-header/root/app-header-root.css.js +112 -0
- package/dist/app-header/root/app-header-root.d.ts +103 -0
- package/dist/app-header/root/app-header-root.js +72 -0
- package/dist/aura/index.d.ts +1 -0
- package/dist/aura/index.js +1 -0
- package/dist/aura/root/aura-axis.d.ts +61 -0
- package/dist/aura/root/aura-axis.js +68 -0
- package/dist/aura/root/aura-root.css.d.ts +1 -0
- package/dist/aura/root/aura-root.css.js +35 -0
- package/dist/aura/root/aura-root.d.ts +447 -0
- package/dist/aura/root/aura-root.js +1024 -0
- package/dist/aura/root/aura-shader.d.ts +46 -0
- package/dist/aura/root/aura-shader.js +1145 -0
- package/dist/avatar/group/avatar-group.css.d.ts +1 -0
- package/dist/avatar/group/avatar-group.css.js +48 -0
- package/dist/avatar/group/avatar-group.d.ts +34 -0
- package/dist/avatar/group/avatar-group.js +40 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/root/avatar-root.css.d.ts +1 -0
- package/dist/avatar/root/avatar-root.css.js +55 -0
- package/dist/avatar/root/avatar-root.d.ts +41 -0
- package/dist/avatar/root/avatar-root.js +46 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +1 -0
- package/dist/badge/root/badge-root.css.d.ts +1 -0
- package/dist/badge/root/badge-root.css.js +91 -0
- package/dist/badge/root/badge-root.d.ts +38 -0
- package/dist/badge/root/badge-root.js +38 -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.css.d.ts +1 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +445 -0
- package/dist/bar-chart/root/bar-chart-root.d.ts +177 -0
- package/dist/bar-chart/root/bar-chart-root.js +122 -0
- package/dist/blockquote/index.d.ts +1 -0
- package/dist/blockquote/index.js +1 -0
- package/dist/blockquote/root/blockquote-root.css.d.ts +1 -0
- package/dist/blockquote/root/blockquote-root.css.js +42 -0
- package/dist/blockquote/root/blockquote-root.d.ts +27 -0
- package/dist/blockquote/root/blockquote-root.js +33 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.d.ts +1 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +109 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +38 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +44 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.d.ts +1 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +23 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +29 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +35 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +1 -0
- package/dist/button/root/button-root.css.d.ts +1 -0
- package/dist/button/root/button-root.css.js +190 -0
- package/dist/button/root/button-root.d.ts +95 -0
- package/dist/button/root/button-root.js +59 -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.css.d.ts +1 -0
- package/dist/button-group/root/button-group-root.css.js +54 -0
- package/dist/button-group/root/button-group-root.d.ts +48 -0
- package/dist/button-group/root/button-group-root.js +44 -0
- package/dist/callout/index.d.ts +1 -0
- package/dist/callout/index.js +1 -0
- package/dist/callout/root/callout-root.css.d.ts +1 -0
- package/dist/callout/root/callout-root.css.js +82 -0
- package/dist/callout/root/callout-root.d.ts +36 -0
- package/dist/callout/root/callout-root.js +42 -0
- package/dist/card/index.d.ts +1 -0
- package/dist/card/index.js +1 -0
- package/dist/card/root/card-root.css.d.ts +1 -0
- package/dist/card/root/card-root.css.js +111 -0
- package/dist/card/root/card-root.d.ts +120 -0
- package/dist/card/root/card-root.js +74 -0
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/root/carousel-root.css.d.ts +1 -0
- package/dist/carousel/root/carousel-root.css.js +347 -0
- package/dist/carousel/root/carousel-root.d.ts +111 -0
- package/dist/carousel/root/carousel-root.js +53 -0
- package/dist/chat/composer/chat-composer.css.d.ts +1 -0
- package/dist/chat/composer/chat-composer.css.js +103 -0
- package/dist/chat/composer/chat-composer.d.ts +37 -0
- package/dist/chat/composer/chat-composer.js +43 -0
- package/dist/chat/index.d.ts +3 -0
- package/dist/chat/index.js +3 -0
- package/dist/chat/message/chat-message.css.d.ts +1 -0
- package/dist/chat/message/chat-message.css.js +270 -0
- package/dist/chat/message/chat-message.d.ts +66 -0
- package/dist/chat/message/chat-message.js +50 -0
- package/dist/chat/root/chat-root.css.d.ts +1 -0
- package/dist/chat/root/chat-root.css.js +134 -0
- package/dist/chat/root/chat-root.d.ts +51 -0
- package/dist/chat/root/chat-root.js +57 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/checkbox/root/checkbox-root.css.d.ts +1 -0
- package/dist/checkbox/root/checkbox-root.css.js +177 -0
- package/dist/checkbox/root/checkbox-root.d.ts +51 -0
- package/dist/checkbox/root/checkbox-root.js +48 -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.css.d.ts +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.css.js +30 -0
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +29 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +37 -0
- package/dist/code/index.d.ts +1 -0
- package/dist/code/index.js +1 -0
- package/dist/code/root/code-root.css.d.ts +1 -0
- package/dist/code/root/code-root.css.js +30 -0
- package/dist/code/root/code-root.d.ts +27 -0
- package/dist/code/root/code-root.js +33 -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.css.d.ts +1 -0
- package/dist/code-block/root/code-block-root.css.js +84 -0
- package/dist/code-block/root/code-block-root.d.ts +31 -0
- package/dist/code-block/root/code-block-root.js +37 -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.css.d.ts +1 -0
- package/dist/color-input/root/color-input-root.css.js +193 -0
- package/dist/color-input/root/color-input-root.d.ts +50 -0
- package/dist/color-input/root/color-input-root.js +62 -0
- package/dist/color-picker/index.d.ts +1 -0
- package/dist/color-picker/index.js +1 -0
- package/dist/color-picker/root/color-picker-root.css.d.ts +1 -0
- package/dist/color-picker/root/color-picker-root.css.js +282 -0
- package/dist/color-picker/root/color-picker-root.d.ts +53 -0
- package/dist/color-picker/root/color-picker-root.js +64 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +1 -0
- package/dist/combobox/root/combobox-root.css.d.ts +1 -0
- package/dist/combobox/root/combobox-root.css.js +249 -0
- package/dist/combobox/root/combobox-root.d.ts +37 -0
- package/dist/combobox/root/combobox-root.js +49 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.js +1 -0
- package/dist/command/root/command-root.css.d.ts +1 -0
- package/dist/command/root/command-root.css.js +76 -0
- package/dist/command/root/command-root.d.ts +31 -0
- package/dist/command/root/command-root.js +40 -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.css.d.ts +1 -0
- package/dist/copy-button/root/copy-button-root.css.js +37 -0
- package/dist/copy-button/root/copy-button-root.d.ts +28 -0
- package/dist/copy-button/root/copy-button-root.js +34 -0
- package/dist/data-table/index.d.ts +1 -0
- package/dist/data-table/index.js +1 -0
- package/dist/data-table/root/data-table-root.css.d.ts +1 -0
- package/dist/data-table/root/data-table-root.css.js +91 -0
- package/dist/data-table/root/data-table-root.d.ts +49 -0
- package/dist/data-table/root/data-table-root.js +55 -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.css.d.ts +1 -0
- package/dist/date-input/root/date-input-root.css.js +172 -0
- package/dist/date-input/root/date-input-root.d.ts +44 -0
- package/dist/date-input/root/date-input-root.js +59 -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.css.d.ts +1 -0
- package/dist/date-picker/root/date-picker-root.css.js +219 -0
- package/dist/date-picker/root/date-picker-root.d.ts +38 -0
- package/dist/date-picker/root/date-picker-root.js +44 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -0
- package/dist/dialog/root/dialog-root.css.d.ts +1 -0
- package/dist/dialog/root/dialog-root.css.js +184 -0
- package/dist/dialog/root/dialog-root.d.ts +81 -0
- package/dist/dialog/root/dialog-root.js +54 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +1 -0
- package/dist/divider/root/divider-root.css.d.ts +1 -0
- package/dist/divider/root/divider-root.css.js +82 -0
- package/dist/divider/root/divider-root.d.ts +34 -0
- package/dist/divider/root/divider-root.js +40 -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.css.d.ts +1 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +326 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +111 -0
- package/dist/donut-chart/root/donut-chart-root.js +76 -0
- package/dist/drawer/index.d.ts +1 -0
- package/dist/drawer/index.js +1 -0
- package/dist/drawer/root/drawer-root.css.d.ts +1 -0
- package/dist/drawer/root/drawer-root.css.js +151 -0
- package/dist/drawer/root/drawer-root.d.ts +69 -0
- package/dist/drawer/root/drawer-root.js +58 -0
- package/dist/drilldown/index.d.ts +2 -0
- package/dist/drilldown/index.js +2 -0
- package/dist/drilldown/item/drilldown-item.css.d.ts +1 -0
- package/dist/drilldown/item/drilldown-item.css.js +47 -0
- package/dist/drilldown/item/drilldown-item.d.ts +25 -0
- package/dist/drilldown/item/drilldown-item.js +31 -0
- package/dist/drilldown/root/drilldown-root.css.d.ts +1 -0
- package/dist/drilldown/root/drilldown-root.css.js +125 -0
- package/dist/drilldown/root/drilldown-root.d.ts +33 -0
- package/dist/drilldown/root/drilldown-root.js +39 -0
- package/dist/element-events.generated.d.ts +1 -0
- package/dist/element-events.generated.js +123 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +1 -0
- package/dist/empty/root/empty-root.css.d.ts +1 -0
- package/dist/empty/root/empty-root.css.js +45 -0
- package/dist/empty/root/empty-root.d.ts +26 -0
- package/dist/empty/root/empty-root.js +32 -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.css.d.ts +1 -0
- package/dist/file-input/root/file-input-root.css.js +194 -0
- package/dist/file-input/root/file-input-root.d.ts +40 -0
- package/dist/file-input/root/file-input-root.js +53 -0
- package/dist/flex/index.d.ts +1 -0
- package/dist/flex/index.js +1 -0
- package/dist/flex/root/flex-root.css.d.ts +1 -0
- package/dist/flex/root/flex-root.css.js +81 -0
- package/dist/flex/root/flex-root.d.ts +61 -0
- package/dist/flex/root/flex-root.js +75 -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.css.d.ts +1 -0
- package/dist/format-date/root/format-date-root.css.js +15 -0
- package/dist/format-date/root/format-date-root.d.ts +28 -0
- package/dist/format-date/root/format-date-root.js +34 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +1 -0
- package/dist/grid/root/grid-root.css.d.ts +1 -0
- package/dist/grid/root/grid-root.css.js +74 -0
- package/dist/grid/root/grid-root.d.ts +79 -0
- package/dist/grid/root/grid-root.js +125 -0
- package/dist/heatmap/index.d.ts +1 -0
- package/dist/heatmap/index.js +1 -0
- package/dist/heatmap/root/heatmap-root.css.d.ts +1 -0
- package/dist/heatmap/root/heatmap-root.css.js +141 -0
- package/dist/heatmap/root/heatmap-root.d.ts +87 -0
- package/dist/heatmap/root/heatmap-root.js +96 -0
- package/dist/icon/glyph.css.d.ts +1 -0
- package/dist/icon/glyph.css.js +7 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.css.d.ts +1 -0
- package/dist/icon/root/icon-root.css.js +20 -0
- package/dist/icon/root/icon-root.d.ts +29 -0
- package/dist/icon/root/icon-root.js +35 -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.css.d.ts +1 -0
- package/dist/icon-button/root/icon-button-root.css.js +165 -0
- package/dist/icon-button/root/icon-button-root.d.ts +65 -0
- package/dist/icon-button/root/icon-button-root.js +63 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +1 -0
- package/dist/image/root/image-root.css.d.ts +1 -0
- package/dist/image/root/image-root.css.js +73 -0
- package/dist/image/root/image-root.d.ts +39 -0
- package/dist/image/root/image-root.js +52 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +100 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.js +1 -0
- package/dist/input/root/input-root.css.d.ts +1 -0
- package/dist/input/root/input-root.css.js +123 -0
- package/dist/input/root/input-root.d.ts +36 -0
- package/dist/input/root/input-root.js +48 -0
- package/dist/kbd/index.d.ts +1 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/root/kbd-root.css.d.ts +1 -0
- package/dist/kbd/root/kbd-root.css.js +47 -0
- package/dist/kbd/root/kbd-root.d.ts +30 -0
- package/dist/kbd/root/kbd-root.js +36 -0
- package/dist/legend/index.d.ts +1 -0
- package/dist/legend/index.js +1 -0
- package/dist/legend/root/legend-root.css.d.ts +1 -0
- package/dist/legend/root/legend-root.css.js +90 -0
- package/dist/legend/root/legend-root.d.ts +128 -0
- package/dist/legend/root/legend-root.js +99 -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.css.d.ts +1 -0
- package/dist/line-chart/root/line-chart-root.css.js +293 -0
- package/dist/line-chart/root/line-chart-root.d.ts +106 -0
- package/dist/line-chart/root/line-chart-root.js +74 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/list/item/list-item.css.d.ts +1 -0
- package/dist/list/item/list-item.css.js +70 -0
- package/dist/list/item/list-item.d.ts +49 -0
- package/dist/list/item/list-item.js +58 -0
- package/dist/list/root/list-root.css.d.ts +1 -0
- package/dist/list/root/list-root.css.js +76 -0
- package/dist/list/root/list-root.d.ts +54 -0
- package/dist/list/root/list-root.js +50 -0
- package/dist/listbox/index.d.ts +1 -0
- package/dist/listbox/index.js +1 -0
- package/dist/listbox/root/listbox-root.css.d.ts +1 -0
- package/dist/listbox/root/listbox-root.css.js +110 -0
- package/dist/listbox/root/listbox-root.d.ts +30 -0
- package/dist/listbox/root/listbox-root.js +38 -0
- package/dist/loader/index.d.ts +1 -0
- package/dist/loader/index.js +1 -0
- package/dist/loader/root/loader-root.css.d.ts +1 -0
- package/dist/loader/root/loader-root.css.js +159 -0
- package/dist/loader/root/loader-root.d.ts +49 -0
- package/dist/loader/root/loader-root.js +42 -0
- package/dist/megamenu/index.d.ts +1 -0
- package/dist/megamenu/index.js +1 -0
- package/dist/megamenu/root/megamenu-root.css.d.ts +1 -0
- package/dist/megamenu/root/megamenu-root.css.js +153 -0
- package/dist/megamenu/root/megamenu-root.d.ts +34 -0
- package/dist/megamenu/root/megamenu-root.js +40 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/item/menu-item.css.d.ts +1 -0
- package/dist/menu/item/menu-item.css.js +87 -0
- package/dist/menu/item/menu-item.d.ts +26 -0
- package/dist/menu/item/menu-item.js +32 -0
- package/dist/menu/root/menu-root.css.d.ts +1 -0
- package/dist/menu/root/menu-root.css.js +161 -0
- package/dist/menu/root/menu-root.d.ts +36 -0
- package/dist/menu/root/menu-root.js +42 -0
- package/dist/meter/index.d.ts +1 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter/root/meter-root.css.d.ts +1 -0
- package/dist/meter/root/meter-root.css.js +218 -0
- package/dist/meter/root/meter-root.d.ts +79 -0
- package/dist/meter/root/meter-root.js +72 -0
- package/dist/mixins/mixin-control-surface/mixin-control-surface.d.ts +28 -0
- package/dist/mixins/mixin-control-surface/mixin-control-surface.js +21 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/root/navigation-root.css.d.ts +1 -0
- package/dist/navigation/root/navigation-root.css.js +50 -0
- package/dist/navigation/root/navigation-root.d.ts +28 -0
- package/dist/navigation/root/navigation-root.js +34 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/notification/notification.css.d.ts +1 -0
- package/dist/notifications/notification/notification.css.js +194 -0
- package/dist/notifications/notification/notification.d.ts +64 -0
- package/dist/notifications/notification/notification.js +71 -0
- package/dist/notifications/root/notifications-root.css.d.ts +1 -0
- package/dist/notifications/root/notifications-root.css.js +94 -0
- package/dist/notifications/root/notifications-root.d.ts +43 -0
- package/dist/notifications/root/notifications-root.js +49 -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.css.d.ts +1 -0
- package/dist/number-input/root/number-input-root.css.js +149 -0
- package/dist/number-input/root/number-input-root.d.ts +41 -0
- package/dist/number-input/root/number-input-root.js +49 -0
- package/dist/option/group/option-group.css.d.ts +1 -0
- package/dist/option/group/option-group.css.js +24 -0
- package/dist/option/group/option-group.d.ts +23 -0
- package/dist/option/group/option-group.js +29 -0
- package/dist/option/index.d.ts +2 -0
- package/dist/option/index.js +2 -0
- package/dist/option/root/option-root.css.d.ts +1 -0
- package/dist/option/root/option-root.css.js +93 -0
- package/dist/option/root/option-root.d.ts +30 -0
- package/dist/option/root/option-root.js +36 -0
- package/dist/outline/index.d.ts +1 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/root/outline-root.css.d.ts +1 -0
- package/dist/outline/root/outline-root.css.js +144 -0
- package/dist/outline/root/outline-root.d.ts +31 -0
- package/dist/outline/root/outline-root.js +37 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +3 -0
- package/dist/pagination/root/pagination-root.css.d.ts +1 -0
- package/dist/pagination/root/pagination-root.css.js +158 -0
- package/dist/pagination/root/pagination-root.d.ts +59 -0
- package/dist/pagination/root/pagination-root.js +65 -0
- package/dist/pagination/size/pagination-size.css.d.ts +1 -0
- package/dist/pagination/size/pagination-size.css.js +24 -0
- package/dist/pagination/size/pagination-size.d.ts +31 -0
- package/dist/pagination/size/pagination-size.js +44 -0
- package/dist/pagination/summary/pagination-summary.css.d.ts +1 -0
- package/dist/pagination/summary/pagination-summary.css.js +9 -0
- package/dist/pagination/summary/pagination-summary.d.ts +23 -0
- package/dist/pagination/summary/pagination-summary.js +29 -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.css.d.ts +1 -0
- package/dist/pin-input/root/pin-input-root.css.js +74 -0
- package/dist/pin-input/root/pin-input-root.d.ts +37 -0
- package/dist/pin-input/root/pin-input-root.js +45 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/root/popover-root.css.d.ts +1 -0
- package/dist/popover/root/popover-root.css.js +93 -0
- package/dist/popover/root/popover-root.d.ts +53 -0
- package/dist/popover/root/popover-root.js +50 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/root/progress-root.css.d.ts +1 -0
- package/dist/progress/root/progress-root.css.js +225 -0
- package/dist/progress/root/progress-root.d.ts +54 -0
- package/dist/progress/root/progress-root.js +45 -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.css.d.ts +1 -0
- package/dist/qr-code/root/qr-code-root.css.js +58 -0
- package/dist/qr-code/root/qr-code-root.d.ts +37 -0
- package/dist/qr-code/root/qr-code-root.js +43 -0
- package/dist/quote/index.d.ts +1 -0
- package/dist/quote/index.js +1 -0
- package/dist/quote/root/quote-root.css.d.ts +1 -0
- package/dist/quote/root/quote-root.css.js +20 -0
- package/dist/quote/root/quote-root.d.ts +25 -0
- package/dist/quote/root/quote-root.js +31 -0
- package/dist/radio/group/radio-group.css.d.ts +1 -0
- package/dist/radio/group/radio-group.css.js +23 -0
- package/dist/radio/group/radio-group.d.ts +26 -0
- package/dist/radio/group/radio-group.js +34 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/root/radio-root.css.d.ts +1 -0
- package/dist/radio/root/radio-root.css.js +198 -0
- package/dist/radio/root/radio-root.d.ts +73 -0
- package/dist/radio/root/radio-root.js +74 -0
- package/dist/rating/index.d.ts +1 -0
- package/dist/rating/index.js +1 -0
- package/dist/rating/root/rating-root.css.d.ts +1 -0
- package/dist/rating/root/rating-root.css.js +122 -0
- package/dist/rating/root/rating-root.d.ts +52 -0
- package/dist/rating/root/rating-root.js +42 -0
- package/dist/sandbox/index.d.ts +20 -0
- package/dist/sandbox/index.js +20 -0
- package/dist/sandbox/preview/sandbox-preview.css.d.ts +1 -0
- package/dist/sandbox/preview/sandbox-preview.css.js +14 -0
- package/dist/sandbox/preview/sandbox-preview.d.ts +224 -0
- package/dist/sandbox/preview/sandbox-preview.js +306 -0
- package/dist/sandbox/root/sandbox-root.css.d.ts +1 -0
- package/dist/sandbox/root/sandbox-root.css.js +73 -0
- package/dist/sandbox/root/sandbox-root.d.ts +324 -0
- package/dist/sandbox/root/sandbox-root.js +569 -0
- package/dist/sandbox/source/sandbox-source.css.d.ts +1 -0
- package/dist/sandbox/source/sandbox-source.css.js +27 -0
- package/dist/sandbox/source/sandbox-source.d.ts +105 -0
- package/dist/sandbox/source/sandbox-source.js +173 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.css.d.ts +1 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.css.js +23 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.d.ts +59 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.js +86 -0
- package/dist/sandbox/terminal/sandbox-terminal.css.d.ts +1 -0
- package/dist/sandbox/terminal/sandbox-terminal.css.js +69 -0
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +71 -0
- package/dist/sandbox/terminal/sandbox-terminal.js +130 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.d.ts +1 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +32 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.d.ts +37 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.js +49 -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.css.d.ts +1 -0
- package/dist/scroll-area/root/scroll-area-root.css.js +118 -0
- package/dist/scroll-area/root/scroll-area-root.d.ts +34 -0
- package/dist/scroll-area/root/scroll-area-root.js +40 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +1 -0
- package/dist/select/root/select-root.css.d.ts +1 -0
- package/dist/select/root/select-root.css.js +197 -0
- package/dist/select/root/select-root.d.ts +71 -0
- package/dist/select/root/select-root.js +60 -0
- package/dist/shared/chart/series.css.d.ts +1 -0
- package/dist/shared/chart/series.css.js +35 -0
- package/dist/shared/chart/terminus.css.d.ts +1 -0
- package/dist/shared/chart/terminus.css.js +41 -0
- package/dist/shared/field/field-inline.css.d.ts +1 -0
- package/dist/shared/field/field-inline.css.js +7 -0
- package/dist/shared/field/field-stacked.css.d.ts +1 -0
- package/dist/shared/field/field-stacked.css.js +7 -0
- package/dist/shared/field/field.css.d.ts +1 -0
- package/dist/shared/field/field.css.js +59 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/root/skeleton-root.css.d.ts +1 -0
- package/dist/skeleton/root/skeleton-root.css.js +74 -0
- package/dist/skeleton/root/skeleton-root.d.ts +34 -0
- package/dist/skeleton/root/skeleton-root.js +38 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/root/slider-root.css.d.ts +1 -0
- package/dist/slider/root/slider-root.css.js +335 -0
- package/dist/slider/root/slider-root.d.ts +42 -0
- package/dist/slider/root/slider-root.js +50 -0
- package/dist/sparkline/index.d.ts +1 -0
- package/dist/sparkline/index.js +1 -0
- package/dist/sparkline/root/sparkline-root.css.d.ts +1 -0
- package/dist/sparkline/root/sparkline-root.css.js +103 -0
- package/dist/sparkline/root/sparkline-root.d.ts +114 -0
- package/dist/sparkline/root/sparkline-root.js +67 -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.css.d.ts +1 -0
- package/dist/speed-dial/item/speed-dial-item.css.js +80 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +26 -0
- package/dist/speed-dial/item/speed-dial-item.js +32 -0
- package/dist/speed-dial/root/speed-dial-root.css.d.ts +1 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +140 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +27 -0
- package/dist/speed-dial/root/speed-dial-root.js +34 -0
- package/dist/splitter/index.d.ts +1 -0
- package/dist/splitter/index.js +1 -0
- package/dist/splitter/root/splitter-root.css.d.ts +1 -0
- package/dist/splitter/root/splitter-root.css.js +203 -0
- package/dist/splitter/root/splitter-root.d.ts +78 -0
- package/dist/splitter/root/splitter-root.js +70 -0
- package/dist/stat/group/stat-group.css.d.ts +1 -0
- package/dist/stat/group/stat-group.css.js +12 -0
- package/dist/stat/group/stat-group.d.ts +30 -0
- package/dist/stat/group/stat-group.js +43 -0
- package/dist/stat/index.d.ts +2 -0
- package/dist/stat/index.js +2 -0
- package/dist/stat/root/stat-root.css.d.ts +1 -0
- package/dist/stat/root/stat-root.css.js +60 -0
- package/dist/stat/root/stat-root.d.ts +27 -0
- package/dist/stat/root/stat-root.js +33 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/root/steps-root.css.d.ts +1 -0
- package/dist/steps/root/steps-root.css.js +94 -0
- package/dist/steps/root/steps-root.d.ts +36 -0
- package/dist/steps/root/steps-root.js +42 -0
- package/dist/steps/step/step.css.d.ts +1 -0
- package/dist/steps/step/step.css.js +158 -0
- package/dist/steps/step/step.d.ts +20 -0
- package/dist/steps/step/step.js +30 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/root/switch-root.css.d.ts +1 -0
- package/dist/switch/root/switch-root.css.js +113 -0
- package/dist/switch/root/switch-root.d.ts +42 -0
- package/dist/switch/root/switch-root.js +50 -0
- package/dist/table/cell/table-cell.css.d.ts +1 -0
- package/dist/table/cell/table-cell.css.js +25 -0
- package/dist/table/cell/table-cell.d.ts +24 -0
- package/dist/table/cell/table-cell.js +30 -0
- package/dist/table/column/table-column.css.d.ts +1 -0
- package/dist/table/column/table-column.css.js +21 -0
- package/dist/table/column/table-column.d.ts +23 -0
- package/dist/table/column/table-column.js +29 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +4 -0
- package/dist/table/root/table-root.css.d.ts +1 -0
- package/dist/table/root/table-root.css.js +39 -0
- package/dist/table/root/table-root.d.ts +29 -0
- package/dist/table/root/table-root.js +35 -0
- package/dist/table/row/table-row.css.d.ts +1 -0
- package/dist/table/row/table-row.css.js +5 -0
- package/dist/table/row/table-row.d.ts +24 -0
- package/dist/table/row/table-row.js +30 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.js +3 -0
- package/dist/tabs/panel/tab-panel.css.d.ts +1 -0
- package/dist/tabs/panel/tab-panel.css.js +17 -0
- package/dist/tabs/panel/tab-panel.d.ts +26 -0
- package/dist/tabs/panel/tab-panel.js +32 -0
- package/dist/tabs/root/tabs-root.css.d.ts +1 -0
- package/dist/tabs/root/tabs-root.css.js +136 -0
- package/dist/tabs/root/tabs-root.d.ts +29 -0
- package/dist/tabs/root/tabs-root.js +35 -0
- package/dist/tabs/tab/tab.css.d.ts +1 -0
- package/dist/tabs/tab/tab.css.js +57 -0
- package/dist/tabs/tab/tab.d.ts +26 -0
- package/dist/tabs/tab/tab.js +32 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.css.d.ts +1 -0
- package/dist/tag/root/tag-root.css.js +112 -0
- package/dist/tag/root/tag-root.d.ts +66 -0
- package/dist/tag/root/tag-root.js +48 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.js +1 -0
- package/dist/text/root/text-root.css.d.ts +1 -0
- package/dist/text/root/text-root.css.js +113 -0
- package/dist/text/root/text-root.d.ts +83 -0
- package/dist/text/root/text-root.js +92 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +1 -0
- package/dist/textarea/root/textarea-root.css.d.ts +1 -0
- package/dist/textarea/root/textarea-root.css.js +79 -0
- package/dist/textarea/root/textarea-root.d.ts +27 -0
- package/dist/textarea/root/textarea-root.js +35 -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.css.d.ts +1 -0
- package/dist/time-input/root/time-input-root.css.js +184 -0
- package/dist/time-input/root/time-input-root.d.ts +42 -0
- package/dist/time-input/root/time-input-root.js +53 -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.css.d.ts +1 -0
- package/dist/time-picker/root/time-picker-root.css.js +147 -0
- package/dist/time-picker/root/time-picker-root.d.ts +38 -0
- package/dist/time-picker/root/time-picker-root.js +48 -0
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/item/timeline-item.css.d.ts +1 -0
- package/dist/timeline/item/timeline-item.css.js +111 -0
- package/dist/timeline/item/timeline-item.d.ts +27 -0
- package/dist/timeline/item/timeline-item.js +33 -0
- package/dist/timeline/root/timeline-root.css.d.ts +1 -0
- package/dist/timeline/root/timeline-root.css.js +12 -0
- package/dist/timeline/root/timeline-root.d.ts +25 -0
- package/dist/timeline/root/timeline-root.js +31 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/item/toast-item.css.d.ts +1 -0
- package/dist/toast/item/toast-item.css.js +233 -0
- package/dist/toast/item/toast-item.d.ts +31 -0
- package/dist/toast/item/toast-item.js +37 -0
- package/dist/toast/root/toast-root.css.d.ts +1 -0
- package/dist/toast/root/toast-root.css.js +66 -0
- package/dist/toast/root/toast-root.d.ts +37 -0
- package/dist/toast/root/toast-root.js +43 -0
- package/dist/toggle/group/toggle-group.css.d.ts +1 -0
- package/dist/toggle/group/toggle-group.css.js +118 -0
- package/dist/toggle/group/toggle-group.d.ts +49 -0
- package/dist/toggle/group/toggle-group.js +47 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +2 -0
- package/dist/toggle/root/toggle-root.css.d.ts +1 -0
- package/dist/toggle/root/toggle-root.css.js +25 -0
- package/dist/toggle/root/toggle-root.d.ts +28 -0
- package/dist/toggle/root/toggle-root.js +34 -0
- package/dist/toolbar/index.d.ts +1 -0
- package/dist/toolbar/index.js +1 -0
- package/dist/toolbar/root/toolbar-root.css.d.ts +1 -0
- package/dist/toolbar/root/toolbar-root.css.js +28 -0
- package/dist/toolbar/root/toolbar-root.d.ts +29 -0
- package/dist/toolbar/root/toolbar-root.js +35 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/root/tooltip-root.css.d.ts +1 -0
- package/dist/tooltip/root/tooltip-root.css.js +121 -0
- package/dist/tooltip/root/tooltip-root.d.ts +63 -0
- package/dist/tooltip/root/tooltip-root.js +42 -0
- package/dist/tour/index.d.ts +2 -0
- package/dist/tour/index.js +2 -0
- package/dist/tour/root/tour-root.css.d.ts +1 -0
- package/dist/tour/root/tour-root.css.js +30 -0
- package/dist/tour/root/tour-root.d.ts +24 -0
- package/dist/tour/root/tour-root.js +30 -0
- package/dist/tour/stop/tour-stop.css.d.ts +1 -0
- package/dist/tour/stop/tour-stop.css.js +77 -0
- package/dist/tour/stop/tour-stop.d.ts +34 -0
- package/dist/tour/stop/tour-stop.js +40 -0
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/item/tree-item.css.d.ts +1 -0
- package/dist/tree/item/tree-item.css.js +177 -0
- package/dist/tree/item/tree-item.d.ts +44 -0
- package/dist/tree/item/tree-item.js +50 -0
- package/dist/tree/root/tree-root.css.d.ts +1 -0
- package/dist/tree/root/tree-root.css.js +43 -0
- package/dist/tree/root/tree-root.d.ts +63 -0
- package/dist/tree/root/tree-root.js +47 -0
- package/dist/trend/index.d.ts +1 -0
- package/dist/trend/index.js +1 -0
- package/dist/trend/root/trend-root.css.d.ts +1 -0
- package/dist/trend/root/trend-root.css.js +50 -0
- package/dist/trend/root/trend-root.d.ts +48 -0
- package/dist/trend/root/trend-root.js +55 -0
- package/dist/video/index.d.ts +1 -0
- package/dist/video/index.js +1 -0
- package/dist/video/root/video-root.css.d.ts +1 -0
- package/dist/video/root/video-root.css.js +404 -0
- package/dist/video/root/video-root.d.ts +87 -0
- package/dist/video/root/video-root.js +61 -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.css.d.ts +1 -0
- package/dist/video-playlist/item/video-playlist-item.css.js +95 -0
- package/dist/video-playlist/item/video-playlist-item.d.ts +25 -0
- package/dist/video-playlist/item/video-playlist-item.js +31 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.d.ts +1 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.js +44 -0
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +43 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +56 -0
- package/dist/video-playlist/root/video-playlist-root.css.d.ts +1 -0
- package/dist/video-playlist/root/video-playlist-root.css.js +21 -0
- package/dist/video-playlist/root/video-playlist-root.d.ts +26 -0
- package/dist/video-playlist/root/video-playlist-root.js +32 -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.css.d.ts +1 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +27 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +31 -0
- package/dist/virtual-list/root/virtual-list-root.js +37 -0
- package/elements.css +287 -0
- package/jsx.d.ts +54748 -0
- package/package.json +80 -0
- package/svelte.d.ts +139 -0
- package/vue.d.ts +11511 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { HelixHeadlessRadio } from '@fusion.dev/helix-headless/radio';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary One choice in a radio group.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* A circle with a dot in it, drawn here rather than by the browser for the
|
|
8
|
+
* reason the checkbox's box is: this is a `<button role="radio">`, so there was
|
|
9
|
+
* never a native control to restyle, and the weight and the motion of the mark
|
|
10
|
+
* are ours either way.
|
|
11
|
+
*
|
|
12
|
+
* The dot scales from nothing, like the checkbox's tick, so choosing shows
|
|
13
|
+
* something happening. It has no color, because color is reserved for state
|
|
14
|
+
* and being chosen is an answer rather than a state.
|
|
15
|
+
*
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
* @status experimental
|
|
18
|
+
* @category forms
|
|
19
|
+
* @aliases Option, Choice
|
|
20
|
+
* @documentation https://helix.fusion.dev/components/radio
|
|
21
|
+
*
|
|
22
|
+
* @cssproperty --radio-background-color - Fill of an unselected circle.
|
|
23
|
+
* @cssproperty --radio-border-color - Edge of the circle, in every state.
|
|
24
|
+
* @cssproperty --radio-card-background-color - Fill behind a card-shaped choice.
|
|
25
|
+
* @cssproperty --radio-card-border-color - Edge around one.
|
|
26
|
+
* @cssproperty --radio-card-padding - Inset of the card appearance.
|
|
27
|
+
* @cssproperty --radio-chip-size - Diameter of the chip appearance.
|
|
28
|
+
* @cssproperty --radio-mark-color - Color of the dot.
|
|
29
|
+
* @cssproperty --radio-size - Diameter of the circle.
|
|
30
|
+
*/
|
|
31
|
+
export declare class HelixRadio extends HelixHeadlessRadio {
|
|
32
|
+
static styles: CSSResultGroup;
|
|
33
|
+
/**
|
|
34
|
+
* How the choice presents itself.
|
|
35
|
+
*
|
|
36
|
+
* - `plain` is the default and is never written: a circle beside its words,
|
|
37
|
+
* which is what a list of choices should be almost always.
|
|
38
|
+
* - `card` puts it in a bounded surface, for options that need room to
|
|
39
|
+
* explain themselves: a description, an icon, a price. It is the half a
|
|
40
|
+
* `data-card` link cannot do, because a link reports no value and belongs
|
|
41
|
+
* to no group, so a card that is genuinely an answer has to be this.
|
|
42
|
+
*
|
|
43
|
+
* The circle stays in both. A card whose only marker was its own border would
|
|
44
|
+
* ask a reader to compare surfaces across a row to find the answer, and would
|
|
45
|
+
* leave nothing for a high-contrast display.
|
|
46
|
+
*/
|
|
47
|
+
variant?: 'chip' | 'plain' | 'card';
|
|
48
|
+
/**
|
|
49
|
+
* Takes the circle away, leaving the card as the whole control.
|
|
50
|
+
*
|
|
51
|
+
* Unnecessary under `chip`, which has no room for a circle beside its mark
|
|
52
|
+
* and hides it already.
|
|
53
|
+
*
|
|
54
|
+
* `card` only, and it is a graphic that goes rather than a radio: the control
|
|
55
|
+
* in the shadow root is untouched, so the row is still focusable, still
|
|
56
|
+
* reported to a screen reader, and still the thing a form submits.
|
|
57
|
+
*
|
|
58
|
+
* Safe because the card already carries the answer in its surface, a raised
|
|
59
|
+
* fill inside a primary edge and a three-pixel ring of it. That ring is
|
|
60
|
+
* recent, and before it there was nothing left saying which card was chosen,
|
|
61
|
+
* which is why this is a property now and could not have been one then.
|
|
62
|
+
*
|
|
63
|
+
* Not on `Checkbox`, deliberately. A radio card with no circle is still
|
|
64
|
+
* unmistakably one-of-many because its siblings behave that way; a checkbox
|
|
65
|
+
* card with no box loses the only thing that says you may pick several.
|
|
66
|
+
*/
|
|
67
|
+
hideControl: boolean;
|
|
68
|
+
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
'helix-radio': HelixRadio;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessRadio } from '@fusion.dev/helix-headless/radio';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './radio-root.css.js';
|
|
11
|
+
/**
|
|
12
|
+
* @summary One choice in a radio group.
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* A circle with a dot in it, drawn here rather than by the browser for the
|
|
16
|
+
* reason the checkbox's box is: this is a `<button role="radio">`, so there was
|
|
17
|
+
* never a native control to restyle, and the weight and the motion of the mark
|
|
18
|
+
* are ours either way.
|
|
19
|
+
*
|
|
20
|
+
* The dot scales from nothing, like the checkbox's tick, so choosing shows
|
|
21
|
+
* something happening. It has no color, because color is reserved for state
|
|
22
|
+
* and being chosen is an answer rather than a state.
|
|
23
|
+
*
|
|
24
|
+
* @since 0.1.0
|
|
25
|
+
* @status experimental
|
|
26
|
+
* @category forms
|
|
27
|
+
* @aliases Option, Choice
|
|
28
|
+
* @documentation https://helix.fusion.dev/components/radio
|
|
29
|
+
*
|
|
30
|
+
* @cssproperty --radio-background-color - Fill of an unselected circle.
|
|
31
|
+
* @cssproperty --radio-border-color - Edge of the circle, in every state.
|
|
32
|
+
* @cssproperty --radio-card-background-color - Fill behind a card-shaped choice.
|
|
33
|
+
* @cssproperty --radio-card-border-color - Edge around one.
|
|
34
|
+
* @cssproperty --radio-card-padding - Inset of the card appearance.
|
|
35
|
+
* @cssproperty --radio-chip-size - Diameter of the chip appearance.
|
|
36
|
+
* @cssproperty --radio-mark-color - Color of the dot.
|
|
37
|
+
* @cssproperty --radio-size - Diameter of the circle.
|
|
38
|
+
*/
|
|
39
|
+
let HelixRadio = class HelixRadio extends HelixHeadlessRadio {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
/**
|
|
43
|
+
* Takes the circle away, leaving the card as the whole control.
|
|
44
|
+
*
|
|
45
|
+
* Unnecessary under `chip`, which has no room for a circle beside its mark
|
|
46
|
+
* and hides it already.
|
|
47
|
+
*
|
|
48
|
+
* `card` only, and it is a graphic that goes rather than a radio: the control
|
|
49
|
+
* in the shadow root is untouched, so the row is still focusable, still
|
|
50
|
+
* reported to a screen reader, and still the thing a form submits.
|
|
51
|
+
*
|
|
52
|
+
* Safe because the card already carries the answer in its surface, a raised
|
|
53
|
+
* fill inside a primary edge and a three-pixel ring of it. That ring is
|
|
54
|
+
* recent, and before it there was nothing left saying which card was chosen,
|
|
55
|
+
* which is why this is a property now and could not have been one then.
|
|
56
|
+
*
|
|
57
|
+
* Not on `Checkbox`, deliberately. A radio card with no circle is still
|
|
58
|
+
* unmistakably one-of-many because its siblings behave that way; a checkbox
|
|
59
|
+
* card with no box loses the only thing that says you may pick several.
|
|
60
|
+
*/
|
|
61
|
+
this.hideControl = false;
|
|
62
|
+
}
|
|
63
|
+
static { this.styles = styles; }
|
|
64
|
+
};
|
|
65
|
+
__decorate([
|
|
66
|
+
property({ reflect: true })
|
|
67
|
+
], HelixRadio.prototype, "variant", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
property({ attribute: 'hide-control', reflect: true, type: Boolean })
|
|
70
|
+
], HelixRadio.prototype, "hideControl", void 0);
|
|
71
|
+
HelixRadio = __decorate([
|
|
72
|
+
customElement('helix-radio')
|
|
73
|
+
], HelixRadio);
|
|
74
|
+
export { HelixRadio };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/rating-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/rating-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Generated from src/rating/root/rating-root.css by `bun run styles`. Do not edit.
|
|
2
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
3
|
+
export const styles = createSheet(`:host {
|
|
4
|
+
|
|
5
|
+
--_rating-mark-size: var(--rating-size, var(--helix-size-icon-md));
|
|
6
|
+
--_rating-mark-gap: var(--rating-gap, var(--helix-space-2xs));
|
|
7
|
+
|
|
8
|
+
align-items: center;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
gap: var(--rating-gap, var(--helix-space-xs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[part="marks"] {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
touch-action: pan-y;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[part="track"],
|
|
21
|
+
[part="fill"] {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
gap: var(--_rating-mark-gap);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[part="track"] {
|
|
27
|
+
color: var(--rating-empty-color, var(--helix-color-border));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[part="fill"] {
|
|
31
|
+
color: var(--rating-color, var(--helix-color-warning));
|
|
32
|
+
inline-size: calc(
|
|
33
|
+
var(--rating-full, 0) *
|
|
34
|
+
(var(--_rating-mark-size) + var(--_rating-mark-gap)) +
|
|
35
|
+
var(--rating-part, 0) *
|
|
36
|
+
var(--_rating-mark-size)
|
|
37
|
+
);
|
|
38
|
+
inset-block: 0;
|
|
39
|
+
inset-inline-start: 0;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
position: absolute;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[part="mark"] {
|
|
45
|
+
--_rating-star: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2.6l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5-5.8-3-5.8 3 1.1-6.5L2.6 9.4l6.5-.9z"/></svg>');
|
|
46
|
+
|
|
47
|
+
background-color: currentcolor;
|
|
48
|
+
block-size: var(--_rating-mark-size);
|
|
49
|
+
flex: 0 0 auto;
|
|
50
|
+
inline-size: var(--_rating-mark-size);
|
|
51
|
+
mask-image: var(--rating-mark, var(--_rating-star));
|
|
52
|
+
mask-position: center;
|
|
53
|
+
mask-repeat: no-repeat;
|
|
54
|
+
mask-size: contain;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[part="option"] {
|
|
58
|
+
all: unset;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
inset-block: 0;
|
|
63
|
+
position: absolute;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[part="option"] {
|
|
67
|
+
--_rating-pitch: calc((100% + var(--_rating-mark-gap)) / var(--rating-steps, 1));
|
|
68
|
+
|
|
69
|
+
inline-size: var(--_rating-pitch);
|
|
70
|
+
inset-inline-start: calc(
|
|
71
|
+
(var(--rating-step, 1) - 1) *
|
|
72
|
+
var(--_rating-pitch) -
|
|
73
|
+
var(--_rating-mark-gap) /
|
|
74
|
+
2
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[part="value"] {
|
|
79
|
+
color: var(--helix-color-foreground-muted);
|
|
80
|
+
font-size: var(--helix-text-sm);
|
|
81
|
+
font-variant-numeric: tabular-nums;
|
|
82
|
+
line-height: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([variant="dots"]) {
|
|
86
|
+
--_rating-mark-size: var(--rating-size, var(--helix-size-icon-sm));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([variant="dots"]) [part="mark"] {
|
|
90
|
+
border-radius: var(--helix-radii-full);
|
|
91
|
+
mask-image: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[part="option"]:focus-visible {
|
|
95
|
+
border-radius: var(--helix-radii-sm);
|
|
96
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
97
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host(:disabled) [part="option"] {
|
|
101
|
+
cursor: not-allowed;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host(:disabled) [part="marks"] {
|
|
105
|
+
opacity: 0.5;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([readonly]) [part="marks"] {
|
|
109
|
+
cursor: default;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-slotted] [part="mark"] {
|
|
113
|
+
background-color: transparent;
|
|
114
|
+
mask-image: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media print {
|
|
118
|
+
:host {
|
|
119
|
+
box-shadow: none;
|
|
120
|
+
print-color-adjust: exact;
|
|
121
|
+
}
|
|
122
|
+
}`);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HelixHeadlessRating } from '@fusion.dev/helix-headless/rating';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A score out of a few marks, given or shown.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Presentation only: the marks, and the clip that fills them partway.
|
|
8
|
+
* Everything about what the score is and how it is chosen is the base class.
|
|
9
|
+
*
|
|
10
|
+
* @since 0.1.0
|
|
11
|
+
* @status experimental
|
|
12
|
+
* @category forms
|
|
13
|
+
* @aliases Stars, Score, Review score
|
|
14
|
+
* @documentation https://helix.fusion.dev/components/rating
|
|
15
|
+
*
|
|
16
|
+
* @slot mark - The shape of a mark, cloned into every position. Left empty, the
|
|
17
|
+
* stylesheet draws its own and `--rating-mark` swaps it.
|
|
18
|
+
*
|
|
19
|
+
* @cssproperty --rating-color - The color of a filled mark.
|
|
20
|
+
* @cssproperty --rating-empty-color - And of an unfilled one.
|
|
21
|
+
* @cssproperty --rating-gap - Space between marks.
|
|
22
|
+
* @cssproperty --rating-mark - The shape of one mark, as a mask image.
|
|
23
|
+
* @cssproperty --rating-size - How big one mark is.
|
|
24
|
+
*/
|
|
25
|
+
export declare class HelixRating extends HelixHeadlessRating {
|
|
26
|
+
static styles: CSSResultGroup;
|
|
27
|
+
/**
|
|
28
|
+
* Which mark the row is drawn with.
|
|
29
|
+
*
|
|
30
|
+
* `marks` is the star, and is what a rating means to most readers. `dots`
|
|
31
|
+
* drops the glyph for a plain circle, which says how much rather than how
|
|
32
|
+
* good: a star carries a judgment that a level of spice, a difficulty or a
|
|
33
|
+
* confidence has not earned.
|
|
34
|
+
*
|
|
35
|
+
* Both are one shape repeated and clipped to the score, so halves work in
|
|
36
|
+
* either, and both are only a choice of drawing. A scale whose marks are
|
|
37
|
+
* *different* drawings is a set of choices rather than a quantity: that is
|
|
38
|
+
* `Radio.Group`, whose options already carry a value and a name each.
|
|
39
|
+
*
|
|
40
|
+
* **Undefaulted, because it reflects.** Defaulted to `marks` it wrote
|
|
41
|
+
* `appearance="marks"` onto every rating the server rendered, which React
|
|
42
|
+
* held no prop for and reported as a hydration mismatch. The stylesheet was
|
|
43
|
+
* already written the right way round, naming only `dots`, so marks is what
|
|
44
|
+
* an unset one draws and nothing else had to move.
|
|
45
|
+
*/
|
|
46
|
+
variant?: 'dots' | 'marks';
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
'helix-rating': HelixRating;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -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 } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessRating } from '@fusion.dev/helix-headless/rating';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './rating-root.css.js';
|
|
11
|
+
/**
|
|
12
|
+
* @summary A score out of a few marks, given or shown.
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* Presentation only: the marks, and the clip that fills them partway.
|
|
16
|
+
* Everything about what the score is and how it is chosen is the base class.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
* @status experimental
|
|
20
|
+
* @category forms
|
|
21
|
+
* @aliases Stars, Score, Review score
|
|
22
|
+
* @documentation https://helix.fusion.dev/components/rating
|
|
23
|
+
*
|
|
24
|
+
* @slot mark - The shape of a mark, cloned into every position. Left empty, the
|
|
25
|
+
* stylesheet draws its own and `--rating-mark` swaps it.
|
|
26
|
+
*
|
|
27
|
+
* @cssproperty --rating-color - The color of a filled mark.
|
|
28
|
+
* @cssproperty --rating-empty-color - And of an unfilled one.
|
|
29
|
+
* @cssproperty --rating-gap - Space between marks.
|
|
30
|
+
* @cssproperty --rating-mark - The shape of one mark, as a mask image.
|
|
31
|
+
* @cssproperty --rating-size - How big one mark is.
|
|
32
|
+
*/
|
|
33
|
+
let HelixRating = class HelixRating extends HelixHeadlessRating {
|
|
34
|
+
static { this.styles = styles; }
|
|
35
|
+
};
|
|
36
|
+
__decorate([
|
|
37
|
+
property({ reflect: true })
|
|
38
|
+
], HelixRating.prototype, "variant", void 0);
|
|
39
|
+
HelixRating = __decorate([
|
|
40
|
+
customElement('helix-rating')
|
|
41
|
+
], HelixRating);
|
|
42
|
+
export { HelixRating };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sandbox: a preview that runs what it is given, and the panes around it.
|
|
3
|
+
*
|
|
4
|
+
* The editor is deliberately absent and lives on in `@fusion.dev/helix-editor`, because
|
|
5
|
+
* it carries CodeMirror. That is roughly 4 MB installed against a design system
|
|
6
|
+
* of about the same size, and a `dependencies` entry is paid at install time by
|
|
7
|
+
* every consumer whether or not they import it, which is the one cost a subpath
|
|
8
|
+
* export cannot avoid. Its pane takes an editor by slot, so bringing one is a
|
|
9
|
+
* choice rather than a condition of using this.
|
|
10
|
+
*
|
|
11
|
+
* What makes this a sandbox rather than a layout is here: `Sandbox.Preview`
|
|
12
|
+
* hardcodes `sandbox="allow-scripts allow-forms"` on its frame and never
|
|
13
|
+
* `allow-same-origin`, which is the pairing that would undo it.
|
|
14
|
+
*/
|
|
15
|
+
export * from './preview/sandbox-preview.js';
|
|
16
|
+
export * from './root/sandbox-root.js';
|
|
17
|
+
export * from './source/sandbox-source.js';
|
|
18
|
+
export * from './status-bar/sandbox-status-bar.js';
|
|
19
|
+
export * from './terminal/sandbox-terminal.js';
|
|
20
|
+
export * from './toolbar/sandbox-toolbar.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sandbox: a preview that runs what it is given, and the panes around it.
|
|
3
|
+
*
|
|
4
|
+
* The editor is deliberately absent and lives on in `@fusion.dev/helix-editor`, because
|
|
5
|
+
* it carries CodeMirror. That is roughly 4 MB installed against a design system
|
|
6
|
+
* of about the same size, and a `dependencies` entry is paid at install time by
|
|
7
|
+
* every consumer whether or not they import it, which is the one cost a subpath
|
|
8
|
+
* export cannot avoid. Its pane takes an editor by slot, so bringing one is a
|
|
9
|
+
* choice rather than a condition of using this.
|
|
10
|
+
*
|
|
11
|
+
* What makes this a sandbox rather than a layout is here: `Sandbox.Preview`
|
|
12
|
+
* hardcodes `sandbox="allow-scripts allow-forms"` on its frame and never
|
|
13
|
+
* `allow-same-origin`, which is the pairing that would undo it.
|
|
14
|
+
*/
|
|
15
|
+
export * from './preview/sandbox-preview.js';
|
|
16
|
+
export * from './root/sandbox-root.js';
|
|
17
|
+
export * from './source/sandbox-source.js';
|
|
18
|
+
export * from './status-bar/sandbox-status-bar.js';
|
|
19
|
+
export * from './terminal/sandbox-terminal.js';
|
|
20
|
+
export * from './toolbar/sandbox-toolbar.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated from src/sandbox/preview/sandbox-preview.css by `bun run styles`. Do not edit.
|
|
2
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
3
|
+
export const styles = createSheet(`:host {
|
|
4
|
+
display: block;
|
|
5
|
+
min-block-size: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[part="frame"] {
|
|
9
|
+
background-color: var(--helix-color-background);
|
|
10
|
+
block-size: 100%;
|
|
11
|
+
border: none;
|
|
12
|
+
display: block;
|
|
13
|
+
inline-size: 100%;
|
|
14
|
+
}`);
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
4
|
+
/** The frame saying it has a listener, and where to answer it. */
|
|
5
|
+
export interface PreviewReady {
|
|
6
|
+
type: 'helix-preview-ready';
|
|
7
|
+
}
|
|
8
|
+
/** What the frame is asked to render. */
|
|
9
|
+
export interface PreviewRender {
|
|
10
|
+
colorMode?: 'dark' | 'light';
|
|
11
|
+
direction: 'ltr' | 'rtl';
|
|
12
|
+
layout: 'padded' | 'centered' | 'fullscreen' | 'hug';
|
|
13
|
+
source: string;
|
|
14
|
+
styles: string;
|
|
15
|
+
type: 'helix-preview-render';
|
|
16
|
+
}
|
|
17
|
+
/** One console call from inside the frame. */
|
|
18
|
+
export interface PreviewConsole {
|
|
19
|
+
level: 'log' | 'info' | 'warn' | 'error';
|
|
20
|
+
text: string;
|
|
21
|
+
type: 'helix-preview-console';
|
|
22
|
+
}
|
|
23
|
+
/** How tall the frame says its content is, in CSS pixels. */
|
|
24
|
+
export interface PreviewSize {
|
|
25
|
+
size: number;
|
|
26
|
+
type: 'helix-preview-size';
|
|
27
|
+
}
|
|
28
|
+
export type PreviewMessage = PreviewConsole | PreviewReady | PreviewRender | PreviewSize;
|
|
29
|
+
/**
|
|
30
|
+
* @summary Renders sandbox source in a frame of its own.
|
|
31
|
+
*
|
|
32
|
+
* @description
|
|
33
|
+
* A sandboxed `<iframe>` pointed at `src`, which is a document the consumer
|
|
34
|
+
* provides. That document imports whatever the examples need, listens for a
|
|
35
|
+
* render message, and writes the markup into itself.
|
|
36
|
+
*
|
|
37
|
+
* **A frame rather than the page.** Rendering into the page meant an example
|
|
38
|
+
* was styled by whatever surrounded it, which flatters the preview and lies
|
|
39
|
+
* about it: an example that restyles `helix-card` restyled the sandbox too, a
|
|
40
|
+
* script in an example ran against the real document, and a stray
|
|
41
|
+
* `position: fixed` escaped the pane. It also left nothing to capture console
|
|
42
|
+
* output from, and the terminal has to come from somewhere.
|
|
43
|
+
*
|
|
44
|
+
* The cost is that the frame starts empty. Styles and element definitions do
|
|
45
|
+
* not cross into it, because a document has its own stylesheets and a window
|
|
46
|
+
* has its own custom element registry, so `src` has to load them. That is the
|
|
47
|
+
* consumer's document rather than something guessed at here.
|
|
48
|
+
*
|
|
49
|
+
* **The source is not trusted, and the frame is what makes that safe.**
|
|
50
|
+
* `fullscreen` is granted for the same reason and found the same way: a video
|
|
51
|
+
* in the preview offered a fullscreen button that did nothing at all, because
|
|
52
|
+
* the policy default is `self`, this frame is not `self`, and a denied request
|
|
53
|
+
* rejects a promise nobody was watching. Two capabilities now, both explicit,
|
|
54
|
+
* both starred.
|
|
55
|
+
*
|
|
56
|
+
* `allow="clipboard-write *"` is granted explicitly, and the star matters: the
|
|
57
|
+
* policy defaults to `self` and this frame has an opaque origin, so it is not
|
|
58
|
+
* `self` and the default denies it. A component inside the preview that copies
|
|
59
|
+
* to the clipboard is otherwise a control that silently does nothing, which is
|
|
60
|
+
* how this was found. Nothing else is granted, and a copy still needs the
|
|
61
|
+
* reader's own gesture.
|
|
62
|
+
*
|
|
63
|
+
* `sandbox="allow-scripts"` and no `allow-same-origin`, so the document runs on
|
|
64
|
+
* an opaque origin: script in an example cannot reach this page, its storage,
|
|
65
|
+
* its cookies, or the editor the source was typed into. Without it they could,
|
|
66
|
+
* measured, through an `onerror` handler on an image that fails to load, which
|
|
67
|
+
* `innerHTML` does not strip the way it refuses a `<script>` tag.
|
|
68
|
+
*
|
|
69
|
+
* That is what lets a sandbox hold markup a reader pasted from somewhere, or
|
|
70
|
+
* one day arrived in a shared link, rather than only what its owner typed.
|
|
71
|
+
*
|
|
72
|
+
* `allow-forms` is granted because examples have forms in them and a submit
|
|
73
|
+
* that silently does nothing is a worse lie than one that navigates a frame
|
|
74
|
+
* nobody is looking at. Top-level navigation, popups and modals are not.
|
|
75
|
+
*
|
|
76
|
+
* @since 0.1.0
|
|
77
|
+
* @status experimental
|
|
78
|
+
* @aliases Result, Output
|
|
79
|
+
* @documentation https://helix.fusion.dev/sandbox/preview
|
|
80
|
+
*
|
|
81
|
+
* @event {HelixConsoleEvent} helix-console - Relayed from the frame, one per console call.
|
|
82
|
+
* @event {HelixResizeEvent} helix-resize - How tall the frame's content is, whenever it changes.
|
|
83
|
+
*
|
|
84
|
+
* @csspart frame - The iframe.
|
|
85
|
+
*/
|
|
86
|
+
export declare class HelixSandboxPreview extends HelixElement {
|
|
87
|
+
/**
|
|
88
|
+
* Which half of the palette the frame renders in.
|
|
89
|
+
*
|
|
90
|
+
* **The frame is a document and a document has its own color mode.** Setting
|
|
91
|
+
* `data-color-mode` on this element styles this element, and the contents of
|
|
92
|
+
* an iframe inherit nothing from it: measured, a frame under a host carrying
|
|
93
|
+
* the attribute had it unset on its own root. Left alone the frame follows
|
|
94
|
+
* `prefers-color-scheme`, which is right for a preview that should look like
|
|
95
|
+
* the reader's own machine, and wrong for one whose tool has a scheme control.
|
|
96
|
+
*
|
|
97
|
+
* It matters more than a background: `light-dark()` is compiled to a shim
|
|
98
|
+
* keyed on this attribute, and of the 56 tokens that differ by scheme the
|
|
99
|
+
* theme engine emits 19. The other 37 would stay light in a dark preview,
|
|
100
|
+
* including every one of the 24 series colours a chart reads.
|
|
101
|
+
*/
|
|
102
|
+
colorMode?: 'dark' | 'light';
|
|
103
|
+
/**
|
|
104
|
+
* Document the frame loads, which brings the styles and the elements.
|
|
105
|
+
*/
|
|
106
|
+
src: string;
|
|
107
|
+
/**
|
|
108
|
+
* Markup to render.
|
|
109
|
+
*/
|
|
110
|
+
source: string;
|
|
111
|
+
/**
|
|
112
|
+
* Stylesheet applied inside the frame, alongside the markup.
|
|
113
|
+
*/
|
|
114
|
+
styles: string;
|
|
115
|
+
/**
|
|
116
|
+
* Accessible name for the frame.
|
|
117
|
+
*/
|
|
118
|
+
label: string;
|
|
119
|
+
/**
|
|
120
|
+
* Writing direction inside the frame.
|
|
121
|
+
*/
|
|
122
|
+
direction?: 'rtl';
|
|
123
|
+
/**
|
|
124
|
+
* How the example is placed in the frame.
|
|
125
|
+
*/
|
|
126
|
+
layout?: 'padded' | 'centered' | 'fullscreen' | 'hug';
|
|
127
|
+
/** Whether the frame has said it is listening. */
|
|
128
|
+
private ready;
|
|
129
|
+
private get frame();
|
|
130
|
+
/**
|
|
131
|
+
* The frame's document has finished loading, so its listener exists.
|
|
132
|
+
*
|
|
133
|
+
* **The announcement is one shot and the parent can miss it.** The frame
|
|
134
|
+
* posts `helix-preview-ready` at the end of its own module evaluation and
|
|
135
|
+
* never repeats it, and `handleMessage` drops anything whose `source` is not
|
|
136
|
+
* `this.frame?.contentWindow`. That getter reads the render root, so it is
|
|
137
|
+
* null until this element has rendered once. A frame that loads before that
|
|
138
|
+
* render commits therefore announces into a guard that refuses it, `ready`
|
|
139
|
+
* stays false, and `send` returns early forever: the source is set, the
|
|
140
|
+
* markup is correct, and the preview is blank with nothing logged.
|
|
141
|
+
*
|
|
142
|
+
* **It is a race, so it hides in the one place nobody looks.** The frame is
|
|
143
|
+
* only fast enough to win when its document and its bundle are already in the
|
|
144
|
+
* HTTP cache, which is a client-side navigation and never a cold load.
|
|
145
|
+
* Measured on the theme builder reached by clicking a link: `ready` false, a
|
|
146
|
+
* 9,382 character `source` in place, and an empty preview, where the same
|
|
147
|
+
* page loaded directly rendered correctly.
|
|
148
|
+
*
|
|
149
|
+
* `load` closes it without a retry protocol and without weakening either
|
|
150
|
+
* check on the way in. The frame's script is `defer`, so it has run by the
|
|
151
|
+
* time this fires, which makes the event a guarantee that the listener is
|
|
152
|
+
* there rather than a guess that it might be. The message path stays, because
|
|
153
|
+
* it is the one that works when the frame is slower than the render, and
|
|
154
|
+
* either arriving is enough.
|
|
155
|
+
*/
|
|
156
|
+
private readonly handleFrameLoad;
|
|
157
|
+
/**
|
|
158
|
+
* Takes messages from the frame.
|
|
159
|
+
*
|
|
160
|
+
* Two checks, and both earn their place.
|
|
161
|
+
*
|
|
162
|
+
* The window is the identity: `event.source` is a reference the sender cannot
|
|
163
|
+
* forge, and this frame's `contentWindow` is one only this element holds.
|
|
164
|
+
*
|
|
165
|
+
* The origin has to be opaque. The frame is sandboxed, so every message it
|
|
166
|
+
* sends arrives as `"null"`, measured. A real origin therefore means the
|
|
167
|
+
* frame is no longer showing the document it was given: `allow-scripts` lets
|
|
168
|
+
* an example navigate its own frame, and whatever it navigated to inherits
|
|
169
|
+
* `contentWindow` and could otherwise write lines into the terminal as though
|
|
170
|
+
* the example had logged them.
|
|
171
|
+
*/
|
|
172
|
+
private readonly handleMessage;
|
|
173
|
+
/**
|
|
174
|
+
* Where messages to the frame are addressed.
|
|
175
|
+
*
|
|
176
|
+
* `'*'`, because there is nothing else to say: a sandboxed document has an
|
|
177
|
+
* opaque origin and `postMessage` has no target string that names one.
|
|
178
|
+
*
|
|
179
|
+
* It costs nothing. What is sent is the example's own source and stylesheet,
|
|
180
|
+
* to the document that is about to render them, and that document is the one
|
|
181
|
+
* thing on the page already entitled to both.
|
|
182
|
+
*/
|
|
183
|
+
private static readonly target;
|
|
184
|
+
/** Set while a coalesced send is waiting, so only one is ever queued. */
|
|
185
|
+
private pending;
|
|
186
|
+
/**
|
|
187
|
+
* Sends once the typing stops, replacing anything already waiting.
|
|
188
|
+
*
|
|
189
|
+
* A frame was tried first and is the wrong unit. Keystrokes arrive fifty to a
|
|
190
|
+
* hundred and fifty milliseconds apart, so each one lands in a frame of its
|
|
191
|
+
* own and coalescing by frame coalesces nothing: the example was still being
|
|
192
|
+
* rebuilt per character. The delay has to be longer than the gap between
|
|
193
|
+
* keystrokes to catch a burst, and short enough to read as immediate when the
|
|
194
|
+
* typing stops.
|
|
195
|
+
*/
|
|
196
|
+
private scheduleSend;
|
|
197
|
+
/** Sends the current source to the frame, once it is listening. */
|
|
198
|
+
private send;
|
|
199
|
+
connectedCallback(): void;
|
|
200
|
+
disconnectedCallback(): void;
|
|
201
|
+
/**
|
|
202
|
+
* Loads the frame's document again, and re-sends the example to it.
|
|
203
|
+
*
|
|
204
|
+
* For a bundle that has changed underneath a page nobody reloaded. The frame
|
|
205
|
+
* carries its own build of the component library, as a classic script it ran
|
|
206
|
+
* once at load, so a rebuilt bundle reaches a tab that is already open
|
|
207
|
+
* exactly never: the sandbox around it hot-reloads and the preview inside it
|
|
208
|
+
* keeps running whatever it started with, which reads as a component fix that
|
|
209
|
+
* did not work.
|
|
210
|
+
*
|
|
211
|
+
* Nothing needs to be resent by the caller. Clearing `ready` and reassigning
|
|
212
|
+
* `src` puts this back in the state it was in before the first load, and the
|
|
213
|
+
* new document announces itself the same way the first one did.
|
|
214
|
+
*/
|
|
215
|
+
reload(): void;
|
|
216
|
+
protected updated(changed: PropertyValues): void;
|
|
217
|
+
protected render(): TemplateResult;
|
|
218
|
+
static styles: CSSResultGroup;
|
|
219
|
+
}
|
|
220
|
+
declare global {
|
|
221
|
+
interface HTMLElementTagNameMap {
|
|
222
|
+
'helix-sandbox-preview': HelixSandboxPreview;
|
|
223
|
+
}
|
|
224
|
+
}
|