@visitwonders/assembly 0.1.0
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.md +9 -0
- package/README.md +26 -0
- package/addon-main.cjs +4 -0
- package/declarations/action/button.d.ts +50 -0
- package/declarations/action/button.d.ts.map +1 -0
- package/declarations/action/index.d.ts +3 -0
- package/declarations/action/index.d.ts.map +1 -0
- package/declarations/action/link.d.ts +16 -0
- package/declarations/action/link.d.ts.map +1 -0
- package/declarations/components/form/checkbox.d.ts +65 -0
- package/declarations/components/form/checkbox.d.ts.map +1 -0
- package/declarations/components/form/control.d.ts +36 -0
- package/declarations/components/form/control.d.ts.map +1 -0
- package/declarations/components/form/error-message.d.ts +22 -0
- package/declarations/components/form/error-message.d.ts.map +1 -0
- package/declarations/components/form/field.d.ts +21 -0
- package/declarations/components/form/field.d.ts.map +1 -0
- package/declarations/components/form/form.d.ts +14 -0
- package/declarations/components/form/form.d.ts.map +1 -0
- package/declarations/components/form/help-text.d.ts +14 -0
- package/declarations/components/form/help-text.d.ts.map +1 -0
- package/declarations/components/form/index.d.ts +15 -0
- package/declarations/components/form/index.d.ts.map +1 -0
- package/declarations/components/form/input.d.ts +80 -0
- package/declarations/components/form/input.d.ts.map +1 -0
- package/declarations/components/form/label.d.ts +34 -0
- package/declarations/components/form/label.d.ts.map +1 -0
- package/declarations/components/form/radio-group.d.ts +43 -0
- package/declarations/components/form/radio-group.d.ts.map +1 -0
- package/declarations/components/form/radio.d.ts +54 -0
- package/declarations/components/form/radio.d.ts.map +1 -0
- package/declarations/components/form/search-input.d.ts +35 -0
- package/declarations/components/form/search-input.d.ts.map +1 -0
- package/declarations/components/form/select.d.ts +36 -0
- package/declarations/components/form/select.d.ts.map +1 -0
- package/declarations/components/form/test.d.ts +11 -0
- package/declarations/components/form/test.d.ts.map +1 -0
- package/declarations/components/form/textarea.d.ts +79 -0
- package/declarations/components/form/textarea.d.ts.map +1 -0
- package/declarations/components/form/toggle.d.ts +23 -0
- package/declarations/components/form/toggle.d.ts.map +1 -0
- package/declarations/components/primitives/grid-item.d.ts +21 -0
- package/declarations/components/primitives/grid-item.d.ts.map +1 -0
- package/declarations/components/primitives/grid.d.ts +49 -0
- package/declarations/components/primitives/grid.d.ts.map +1 -0
- package/declarations/components/primitives/h-stack.d.ts +17 -0
- package/declarations/components/primitives/h-stack.d.ts.map +1 -0
- package/declarations/components/primitives/heading.d.ts +52 -0
- package/declarations/components/primitives/heading.d.ts.map +1 -0
- package/declarations/components/primitives/image.d.ts +24 -0
- package/declarations/components/primitives/image.d.ts.map +1 -0
- package/declarations/components/primitives/index.d.ts +8 -0
- package/declarations/components/primitives/index.d.ts.map +1 -0
- package/declarations/components/primitives/link.d.ts +16 -0
- package/declarations/components/primitives/link.d.ts.map +1 -0
- package/declarations/components/primitives/stack.d.ts +23 -0
- package/declarations/components/primitives/stack.d.ts.map +1 -0
- package/declarations/components/primitives/text.d.ts +50 -0
- package/declarations/components/primitives/text.d.ts.map +1 -0
- package/declarations/components/primitives/v-stack.d.ts +16 -0
- package/declarations/components/primitives/v-stack.d.ts.map +1 -0
- package/declarations/components/ui/badge.d.ts +14 -0
- package/declarations/components/ui/badge.d.ts.map +1 -0
- package/declarations/components/ui/button.d.ts +32 -0
- package/declarations/components/ui/button.d.ts.map +1 -0
- package/declarations/components/ui/card.d.ts +27 -0
- package/declarations/components/ui/card.d.ts.map +1 -0
- package/declarations/components/ui/description-list.d.ts +22 -0
- package/declarations/components/ui/description-list.d.ts.map +1 -0
- package/declarations/components/ui/drawer.d.ts +14 -0
- package/declarations/components/ui/drawer.d.ts.map +1 -0
- package/declarations/components/ui/icon-button.d.ts +21 -0
- package/declarations/components/ui/icon-button.d.ts.map +1 -0
- package/declarations/components/ui/icon.d.ts +21 -0
- package/declarations/components/ui/icon.d.ts.map +1 -0
- package/declarations/components/ui/index.d.ts +17 -0
- package/declarations/components/ui/index.d.ts.map +1 -0
- package/declarations/components/ui/modal.d.ts +14 -0
- package/declarations/components/ui/modal.d.ts.map +1 -0
- package/declarations/components/ui/page-header.d.ts +16 -0
- package/declarations/components/ui/page-header.d.ts.map +1 -0
- package/declarations/components/ui/skeleton-card.d.ts +17 -0
- package/declarations/components/ui/skeleton-card.d.ts.map +1 -0
- package/declarations/components/ui/skeleton-text.d.ts +16 -0
- package/declarations/components/ui/skeleton-text.d.ts.map +1 -0
- package/declarations/components/ui/skeleton.d.ts +20 -0
- package/declarations/components/ui/skeleton.d.ts.map +1 -0
- package/declarations/components/ui/spinner.d.ts +11 -0
- package/declarations/components/ui/spinner.d.ts.map +1 -0
- package/declarations/components/ui/tab-nav/index.d.ts +36 -0
- package/declarations/components/ui/tab-nav/index.d.ts.map +1 -0
- package/declarations/components/ui/table/body.d.ts +11 -0
- package/declarations/components/ui/table/body.d.ts.map +1 -0
- package/declarations/components/ui/table/caption.d.ts +18 -0
- package/declarations/components/ui/table/caption.d.ts.map +1 -0
- package/declarations/components/ui/table/cell.d.ts +31 -0
- package/declarations/components/ui/table/cell.d.ts.map +1 -0
- package/declarations/components/ui/table/footer.d.ts +11 -0
- package/declarations/components/ui/table/footer.d.ts.map +1 -0
- package/declarations/components/ui/table/header-cell.d.ts +35 -0
- package/declarations/components/ui/table/header-cell.d.ts.map +1 -0
- package/declarations/components/ui/table/header.d.ts +11 -0
- package/declarations/components/ui/table/header.d.ts.map +1 -0
- package/declarations/components/ui/table/index.d.ts +0 -0
- package/declarations/components/ui/table/index.d.ts.map +1 -0
- package/declarations/components/ui/table/row.d.ts +21 -0
- package/declarations/components/ui/table/row.d.ts.map +1 -0
- package/declarations/components/ui/table_old.d.ts +29 -0
- package/declarations/components/ui/table_old.d.ts.map +1 -0
- package/declarations/data/index.d.ts +2 -0
- package/declarations/data/index.d.ts.map +1 -0
- package/declarations/data/table.d.ts +147 -0
- package/declarations/data/table.d.ts.map +1 -0
- package/declarations/form/calendar.d.ts +113 -0
- package/declarations/form/calendar.d.ts.map +1 -0
- package/declarations/form/checkbox-group.d.ts +84 -0
- package/declarations/form/checkbox-group.d.ts.map +1 -0
- package/declarations/form/checkbox.d.ts +65 -0
- package/declarations/form/checkbox.d.ts.map +1 -0
- package/declarations/form/control.d.ts +53 -0
- package/declarations/form/control.d.ts.map +1 -0
- package/declarations/form/country-data.d.ts +42 -0
- package/declarations/form/country-data.d.ts.map +1 -0
- package/declarations/form/country-select-field.d.ts +52 -0
- package/declarations/form/country-select-field.d.ts.map +1 -0
- package/declarations/form/country-select.d.ts +117 -0
- package/declarations/form/country-select.d.ts.map +1 -0
- package/declarations/form/date-picker-field.d.ts +69 -0
- package/declarations/form/date-picker-field.d.ts.map +1 -0
- package/declarations/form/date-picker.d.ts +128 -0
- package/declarations/form/date-picker.d.ts.map +1 -0
- package/declarations/form/date-range-picker-field.d.ts +71 -0
- package/declarations/form/date-range-picker-field.d.ts.map +1 -0
- package/declarations/form/date-range-picker.d.ts +146 -0
- package/declarations/form/date-range-picker.d.ts.map +1 -0
- package/declarations/form/error-message.d.ts +22 -0
- package/declarations/form/error-message.d.ts.map +1 -0
- package/declarations/form/field.d.ts +21 -0
- package/declarations/form/field.d.ts.map +1 -0
- package/declarations/form/form.d.ts +61 -0
- package/declarations/form/form.d.ts.map +1 -0
- package/declarations/form/help-text.d.ts +14 -0
- package/declarations/form/help-text.d.ts.map +1 -0
- package/declarations/form/index.d.ts +35 -0
- package/declarations/form/index.d.ts.map +1 -0
- package/declarations/form/input.d.ts +78 -0
- package/declarations/form/input.d.ts.map +1 -0
- package/declarations/form/label.d.ts +34 -0
- package/declarations/form/label.d.ts.map +1 -0
- package/declarations/form/listbox.d.ts +181 -0
- package/declarations/form/listbox.d.ts.map +1 -0
- package/declarations/form/money-field.d.ts +74 -0
- package/declarations/form/money-field.d.ts.map +1 -0
- package/declarations/form/multi-select.d.ts +121 -0
- package/declarations/form/multi-select.d.ts.map +1 -0
- package/declarations/form/number-field.d.ts +86 -0
- package/declarations/form/number-field.d.ts.map +1 -0
- package/declarations/form/option-group.d.ts +2 -0
- package/declarations/form/option-group.d.ts.map +1 -0
- package/declarations/form/option.d.ts +2 -0
- package/declarations/form/option.d.ts.map +1 -0
- package/declarations/form/radio-group.d.ts +43 -0
- package/declarations/form/radio-group.d.ts.map +1 -0
- package/declarations/form/radio.d.ts +54 -0
- package/declarations/form/radio.d.ts.map +1 -0
- package/declarations/form/search-input.d.ts +35 -0
- package/declarations/form/search-input.d.ts.map +1 -0
- package/declarations/form/select-field.d.ts +49 -0
- package/declarations/form/select-field.d.ts.map +1 -0
- package/declarations/form/select.d.ts +145 -0
- package/declarations/form/select.d.ts.map +1 -0
- package/declarations/form/test.d.ts +11 -0
- package/declarations/form/test.d.ts.map +1 -0
- package/declarations/form/text-field.d.ts +95 -0
- package/declarations/form/text-field.d.ts.map +1 -0
- package/declarations/form/textarea.d.ts +81 -0
- package/declarations/form/textarea.d.ts.map +1 -0
- package/declarations/form/time-picker-field.d.ts +61 -0
- package/declarations/form/time-picker-field.d.ts.map +1 -0
- package/declarations/form/time-picker.d.ts +151 -0
- package/declarations/form/time-picker.d.ts.map +1 -0
- package/declarations/form/toggle-field.d.ts +45 -0
- package/declarations/form/toggle-field.d.ts.map +1 -0
- package/declarations/form/toggle-group.d.ts +21 -0
- package/declarations/form/toggle-group.d.ts.map +1 -0
- package/declarations/form/toggle.d.ts +59 -0
- package/declarations/form/toggle.d.ts.map +1 -0
- package/declarations/index.d.ts +1 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/layout/divider.d.ts +21 -0
- package/declarations/layout/divider.d.ts.map +1 -0
- package/declarations/layout/grid-item.d.ts +21 -0
- package/declarations/layout/grid-item.d.ts.map +1 -0
- package/declarations/layout/grid.d.ts +49 -0
- package/declarations/layout/grid.d.ts.map +1 -0
- package/declarations/layout/h-stack.d.ts +17 -0
- package/declarations/layout/h-stack.d.ts.map +1 -0
- package/declarations/layout/index.d.ts +7 -0
- package/declarations/layout/index.d.ts.map +1 -0
- package/declarations/layout/stack.d.ts +23 -0
- package/declarations/layout/stack.d.ts.map +1 -0
- package/declarations/layout/v-stack.d.ts +16 -0
- package/declarations/layout/v-stack.d.ts.map +1 -0
- package/declarations/media/icon.d.ts +34 -0
- package/declarations/media/icon.d.ts.map +1 -0
- package/declarations/media/image.d.ts +24 -0
- package/declarations/media/image.d.ts.map +1 -0
- package/declarations/media/index.d.ts +3 -0
- package/declarations/media/index.d.ts.map +1 -0
- package/declarations/overlay/blanket.d.ts +78 -0
- package/declarations/overlay/blanket.d.ts.map +1 -0
- package/declarations/overlay/drawer.d.ts +140 -0
- package/declarations/overlay/drawer.d.ts.map +1 -0
- package/declarations/overlay/index.d.ts +7 -0
- package/declarations/overlay/index.d.ts.map +1 -0
- package/declarations/overlay/modal.d.ts +138 -0
- package/declarations/overlay/modal.d.ts.map +1 -0
- package/declarations/overlay/popover.d.ts +205 -0
- package/declarations/overlay/popover.d.ts.map +1 -0
- package/declarations/overlay/toast.d.ts +58 -0
- package/declarations/overlay/toast.d.ts.map +1 -0
- package/declarations/overlay/tooltip.d.ts +154 -0
- package/declarations/overlay/tooltip.d.ts.map +1 -0
- package/declarations/primitives/grid-item.d.ts +21 -0
- package/declarations/primitives/grid-item.d.ts.map +1 -0
- package/declarations/primitives/grid.d.ts +49 -0
- package/declarations/primitives/grid.d.ts.map +1 -0
- package/declarations/primitives/h-stack.d.ts +17 -0
- package/declarations/primitives/h-stack.d.ts.map +1 -0
- package/declarations/primitives/heading.d.ts +52 -0
- package/declarations/primitives/heading.d.ts.map +1 -0
- package/declarations/primitives/image.d.ts +24 -0
- package/declarations/primitives/image.d.ts.map +1 -0
- package/declarations/primitives/index.d.ts +4 -0
- package/declarations/primitives/index.d.ts.map +1 -0
- package/declarations/primitives/link.d.ts +16 -0
- package/declarations/primitives/link.d.ts.map +1 -0
- package/declarations/primitives/stack.d.ts +23 -0
- package/declarations/primitives/stack.d.ts.map +1 -0
- package/declarations/primitives/text.d.ts +50 -0
- package/declarations/primitives/text.d.ts.map +1 -0
- package/declarations/primitives/v-stack.d.ts +16 -0
- package/declarations/primitives/v-stack.d.ts.map +1 -0
- package/declarations/services/index.d.ts +3 -0
- package/declarations/services/index.d.ts.map +1 -0
- package/declarations/services/toast.d.ts +81 -0
- package/declarations/services/toast.d.ts.map +1 -0
- package/declarations/status/badge.d.ts +38 -0
- package/declarations/status/badge.d.ts.map +1 -0
- package/declarations/status/index.d.ts +8 -0
- package/declarations/status/index.d.ts.map +1 -0
- package/declarations/status/skeleton-avatar.d.ts +22 -0
- package/declarations/status/skeleton-avatar.d.ts.map +1 -0
- package/declarations/status/skeleton-button.d.ts +21 -0
- package/declarations/status/skeleton-button.d.ts.map +1 -0
- package/declarations/status/skeleton-image.d.ts +21 -0
- package/declarations/status/skeleton-image.d.ts.map +1 -0
- package/declarations/status/skeleton-text.d.ts +24 -0
- package/declarations/status/skeleton-text.d.ts.map +1 -0
- package/declarations/status/skeleton.d.ts +33 -0
- package/declarations/status/skeleton.d.ts.map +1 -0
- package/declarations/status/tag.d.ts +48 -0
- package/declarations/status/tag.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +1 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/declarations/types/design-system.d.ts +42 -0
- package/declarations/types/design-system.d.ts.map +1 -0
- package/declarations/typography/heading.d.ts +52 -0
- package/declarations/typography/heading.d.ts.map +1 -0
- package/declarations/typography/index.d.ts +3 -0
- package/declarations/typography/index.d.ts.map +1 -0
- package/declarations/typography/link.d.ts +16 -0
- package/declarations/typography/link.d.ts.map +1 -0
- package/declarations/typography/text.d.ts +50 -0
- package/declarations/typography/text.d.ts.map +1 -0
- package/declarations/ui/button.d.ts +50 -0
- package/declarations/ui/button.d.ts.map +1 -0
- package/declarations/ui/icon.d.ts +21 -0
- package/declarations/ui/icon.d.ts.map +1 -0
- package/declarations/ui/index.d.ts +2 -0
- package/declarations/ui/index.d.ts.map +1 -0
- package/dist/_app_/action/button.js +1 -0
- package/dist/_app_/action/link.js +1 -0
- package/dist/_app_/data/table.js +1 -0
- package/dist/_app_/form/calendar.js +1 -0
- package/dist/_app_/form/checkbox-group.js +1 -0
- package/dist/_app_/form/checkbox.js +1 -0
- package/dist/_app_/form/control.js +1 -0
- package/dist/_app_/form/country-data.js +1 -0
- package/dist/_app_/form/country-select-field.js +1 -0
- package/dist/_app_/form/country-select.js +1 -0
- package/dist/_app_/form/date-picker-field.js +1 -0
- package/dist/_app_/form/date-picker.js +1 -0
- package/dist/_app_/form/date-range-picker-field.js +1 -0
- package/dist/_app_/form/date-range-picker.js +1 -0
- package/dist/_app_/form/error-message.js +1 -0
- package/dist/_app_/form/field.js +1 -0
- package/dist/_app_/form/form.js +1 -0
- package/dist/_app_/form/help-text.js +1 -0
- package/dist/_app_/form/input.js +1 -0
- package/dist/_app_/form/label.js +1 -0
- package/dist/_app_/form/listbox.js +1 -0
- package/dist/_app_/form/money-field.js +1 -0
- package/dist/_app_/form/multi-select.js +1 -0
- package/dist/_app_/form/number-field.js +1 -0
- package/dist/_app_/form/option-group.js +1 -0
- package/dist/_app_/form/option.js +1 -0
- package/dist/_app_/form/radio-group.js +1 -0
- package/dist/_app_/form/radio.js +1 -0
- package/dist/_app_/form/search-input.js +1 -0
- package/dist/_app_/form/select-field.js +1 -0
- package/dist/_app_/form/select.js +1 -0
- package/dist/_app_/form/text-field.js +1 -0
- package/dist/_app_/form/textarea.js +1 -0
- package/dist/_app_/form/time-picker-field.js +1 -0
- package/dist/_app_/form/time-picker.js +1 -0
- package/dist/_app_/form/toggle-field.js +1 -0
- package/dist/_app_/form/toggle-group.js +1 -0
- package/dist/_app_/form/toggle.js +1 -0
- package/dist/_app_/layout/divider.js +1 -0
- package/dist/_app_/layout/grid-item.js +1 -0
- package/dist/_app_/layout/grid.js +1 -0
- package/dist/_app_/layout/h-stack.js +1 -0
- package/dist/_app_/layout/stack.js +1 -0
- package/dist/_app_/layout/v-stack.js +1 -0
- package/dist/_app_/media/icon.js +1 -0
- package/dist/_app_/media/image.js +1 -0
- package/dist/_app_/overlay/blanket.js +1 -0
- package/dist/_app_/overlay/drawer.js +1 -0
- package/dist/_app_/overlay/modal.js +1 -0
- package/dist/_app_/overlay/popover.js +1 -0
- package/dist/_app_/overlay/toast.js +1 -0
- package/dist/_app_/overlay/tooltip.js +1 -0
- package/dist/_app_/services/toast.js +1 -0
- package/dist/_app_/status/badge.js +1 -0
- package/dist/_app_/status/skeleton-avatar.js +1 -0
- package/dist/_app_/status/skeleton-button.js +1 -0
- package/dist/_app_/status/skeleton-image.js +1 -0
- package/dist/_app_/status/skeleton-text.js +1 -0
- package/dist/_app_/status/skeleton.js +1 -0
- package/dist/_app_/status/tag.js +1 -0
- package/dist/_app_/typography/heading.js +1 -0
- package/dist/_app_/typography/text.js +1 -0
- package/dist/action/button.css +360 -0
- package/dist/action/button.js +50 -0
- package/dist/action/button.js.map +1 -0
- package/dist/action/index.js +3 -0
- package/dist/action/index.js.map +1 -0
- package/dist/action/link-css-2b7265326c02ebb264835b3680b7e81e.css +19 -0
- package/dist/action/link.js +17 -0
- package/dist/action/link.js.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/table.css +270 -0
- package/dist/data/table.js +478 -0
- package/dist/data/table.js.map +1 -0
- package/dist/form/calendar.css +239 -0
- package/dist/form/calendar.js +532 -0
- package/dist/form/calendar.js.map +1 -0
- package/dist/form/checkbox-group.css +47 -0
- package/dist/form/checkbox-group.js +102 -0
- package/dist/form/checkbox-group.js.map +1 -0
- package/dist/form/checkbox.css +193 -0
- package/dist/form/checkbox.js +70 -0
- package/dist/form/checkbox.js.map +1 -0
- package/dist/form/control-css-6c81caf37fd813b36033091d5340bc70.css +20 -0
- package/dist/form/control.js +57 -0
- package/dist/form/control.js.map +1 -0
- package/dist/form/country-data.js +1075 -0
- package/dist/form/country-data.js.map +1 -0
- package/dist/form/country-select-field.js +37 -0
- package/dist/form/country-select-field.js.map +1 -0
- package/dist/form/country-select.css +299 -0
- package/dist/form/country-select.js +336 -0
- package/dist/form/country-select.js.map +1 -0
- package/dist/form/date-picker-field.js +37 -0
- package/dist/form/date-picker-field.js.map +1 -0
- package/dist/form/date-picker.css +177 -0
- package/dist/form/date-picker.js +366 -0
- package/dist/form/date-picker.js.map +1 -0
- package/dist/form/date-range-picker-field.js +37 -0
- package/dist/form/date-range-picker-field.js.map +1 -0
- package/dist/form/date-range-picker.css +259 -0
- package/dist/form/date-range-picker.js +451 -0
- package/dist/form/date-range-picker.js.map +1 -0
- package/dist/form/error-message.css +27 -0
- package/dist/form/error-message.js +27 -0
- package/dist/form/error-message.js.map +1 -0
- package/dist/form/field.css +45 -0
- package/dist/form/field.js +28 -0
- package/dist/form/field.js.map +1 -0
- package/dist/form/form.css +6 -0
- package/dist/form/form.js +120 -0
- package/dist/form/form.js.map +1 -0
- package/dist/form/help-text.css +7 -0
- package/dist/form/help-text.js +13 -0
- package/dist/form/help-text.js.map +1 -0
- package/dist/form/index.js +33 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/input.css +176 -0
- package/dist/form/input.js +43 -0
- package/dist/form/input.js.map +1 -0
- package/dist/form/label.css +59 -0
- package/dist/form/label.js +54 -0
- package/dist/form/label.js.map +1 -0
- package/dist/form/listbox.css +125 -0
- package/dist/form/listbox.js +388 -0
- package/dist/form/listbox.js.map +1 -0
- package/dist/form/money-field.css +9 -0
- package/dist/form/money-field.js +203 -0
- package/dist/form/money-field.js.map +1 -0
- package/dist/form/multi-select.css +343 -0
- package/dist/form/multi-select.js +429 -0
- package/dist/form/multi-select.js.map +1 -0
- package/dist/form/number-field.css +170 -0
- package/dist/form/number-field.js +184 -0
- package/dist/form/number-field.js.map +1 -0
- package/dist/form/option-group.js +2 -0
- package/dist/form/option-group.js.map +1 -0
- package/dist/form/option.js +2 -0
- package/dist/form/option.js.map +1 -0
- package/dist/form/radio-group.css +54 -0
- package/dist/form/radio-group.js +53 -0
- package/dist/form/radio-group.js.map +1 -0
- package/dist/form/radio.css +183 -0
- package/dist/form/radio.js +65 -0
- package/dist/form/radio.js.map +1 -0
- package/dist/form/search-input.css +118 -0
- package/dist/form/search-input.js +87 -0
- package/dist/form/search-input.js.map +1 -0
- package/dist/form/select-field.js +39 -0
- package/dist/form/select-field.js.map +1 -0
- package/dist/form/select.css +201 -0
- package/dist/form/select.js +394 -0
- package/dist/form/select.js.map +1 -0
- package/dist/form/text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css +31 -0
- package/dist/form/text-field.js +141 -0
- package/dist/form/text-field.js.map +1 -0
- package/dist/form/textarea.css +139 -0
- package/dist/form/textarea.js +140 -0
- package/dist/form/textarea.js.map +1 -0
- package/dist/form/time-picker-field.js +37 -0
- package/dist/form/time-picker-field.js.map +1 -0
- package/dist/form/time-picker.css +239 -0
- package/dist/form/time-picker.js +618 -0
- package/dist/form/time-picker.js.map +1 -0
- package/dist/form/toggle-field.css +6 -0
- package/dist/form/toggle-field.js +40 -0
- package/dist/form/toggle-field.js.map +1 -0
- package/dist/form/toggle-group.css +46 -0
- package/dist/form/toggle-group.js +20 -0
- package/dist/form/toggle-group.js.map +1 -0
- package/dist/form/toggle.css +206 -0
- package/dist/form/toggle.js +103 -0
- package/dist/form/toggle.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/divider-css-1ba104b9c606cbd1f542b45640fb5f2b.css +122 -0
- package/dist/layout/divider.js +35 -0
- package/dist/layout/divider.js.map +1 -0
- package/dist/layout/grid-css-086976eb41686e3714554f56c098d3d5.css +155 -0
- package/dist/layout/grid-item-css-8d0f842568d1e8345ac709bdf2ed6745.css +122 -0
- package/dist/layout/grid-item.js +13 -0
- package/dist/layout/grid-item.js.map +1 -0
- package/dist/layout/grid.js +96 -0
- package/dist/layout/grid.js.map +1 -0
- package/dist/layout/h-stack.js +14 -0
- package/dist/layout/h-stack.js.map +1 -0
- package/dist/layout/index.js +7 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/stack-css-f094dc4a0a45b6af2acedca81dcce289.css +77 -0
- package/dist/layout/stack.js +32 -0
- package/dist/layout/stack.js.map +1 -0
- package/dist/layout/v-stack.js +14 -0
- package/dist/layout/v-stack.js.map +1 -0
- package/dist/media/icon.css +43 -0
- package/dist/media/icon.js +71 -0
- package/dist/media/icon.js.map +1 -0
- package/dist/media/image-css-6bc4899d3a8b992c3d4d2f1a796ce0fc.css +78 -0
- package/dist/media/image.js +47 -0
- package/dist/media/image.js.map +1 -0
- package/dist/media/index.js +3 -0
- package/dist/media/index.js.map +1 -0
- package/dist/overlay/blanket.css +67 -0
- package/dist/overlay/blanket.js +139 -0
- package/dist/overlay/blanket.js.map +1 -0
- package/dist/overlay/drawer.css +369 -0
- package/dist/overlay/drawer.js +275 -0
- package/dist/overlay/drawer.js.map +1 -0
- package/dist/overlay/index.js +7 -0
- package/dist/overlay/index.js.map +1 -0
- package/dist/overlay/modal.css +209 -0
- package/dist/overlay/modal.js +269 -0
- package/dist/overlay/modal.js.map +1 -0
- package/dist/overlay/popover.css +210 -0
- package/dist/overlay/popover.js +396 -0
- package/dist/overlay/popover.js.map +1 -0
- package/dist/overlay/toast.css +300 -0
- package/dist/overlay/toast.js +123 -0
- package/dist/overlay/toast.js.map +1 -0
- package/dist/overlay/tooltip.css +246 -0
- package/dist/overlay/tooltip.js +368 -0
- package/dist/overlay/tooltip.js.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/toast.js +162 -0
- package/dist/services/toast.js.map +1 -0
- package/dist/skeleton-CL5Pcwrk.js +3 -0
- package/dist/skeleton-CL5Pcwrk.js.map +1 -0
- package/dist/status/badge.css +218 -0
- package/dist/status/badge.js +38 -0
- package/dist/status/badge.js.map +1 -0
- package/dist/status/index.js +8 -0
- package/dist/status/index.js.map +1 -0
- package/dist/status/skeleton-avatar.js +29 -0
- package/dist/status/skeleton-avatar.js.map +1 -0
- package/dist/status/skeleton-button.js +25 -0
- package/dist/status/skeleton-button.js.map +1 -0
- package/dist/status/skeleton-image.js +31 -0
- package/dist/status/skeleton-image.js.map +1 -0
- package/dist/status/skeleton-text.js +41 -0
- package/dist/status/skeleton-text.js.map +1 -0
- package/dist/status/skeleton.css +185 -0
- package/dist/status/skeleton.js +44 -0
- package/dist/status/skeleton.js.map +1 -0
- package/dist/status/tag.css +352 -0
- package/dist/status/tag.js +81 -0
- package/dist/status/tag.js.map +1 -0
- package/dist/styles/animations.css +11 -0
- package/dist/styles/base/typography.css +47 -0
- package/dist/styles/ember-promise-modals.css +43 -0
- package/dist/styles/primitive/colors.css +86 -0
- package/dist/styles/primitive/effects.css +29 -0
- package/dist/styles/primitive/fonts.css +19 -0
- package/dist/styles/primitive/motion.css +18 -0
- package/dist/styles/primitive/shape.css +17 -0
- package/dist/styles/primitive/spacing.css +29 -0
- package/dist/styles/primitive/typography.css +45 -0
- package/dist/styles/primitive/z-index.css +14 -0
- package/dist/styles/semantic/colors.css +155 -0
- package/dist/styles/semantic/component.css +0 -0
- package/dist/styles/semantic/effects.css +17 -0
- package/dist/styles/semantic/motion.css +10 -0
- package/dist/styles/semantic/shape.css +20 -0
- package/dist/styles/semantic/sizing.css +53 -0
- package/dist/styles/semantic/spacing.css +32 -0
- package/dist/styles/semantic/typography.css +32 -0
- package/dist/styles/tokens.css +31 -0
- package/dist/styles.css +710 -0
- package/dist/template-registry.js +2 -0
- package/dist/template-registry.js.map +1 -0
- package/dist/types/design-system.js +2 -0
- package/dist/types/design-system.js.map +1 -0
- package/dist/typography/heading-css-8850735eabc2efb34f15240b852c99e7.css +99 -0
- package/dist/typography/heading.js +80 -0
- package/dist/typography/heading.js.map +1 -0
- package/dist/typography/index.js +3 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/text-css-73e03f1b750b32d7064d4ef87562289c.css +143 -0
- package/dist/typography/text.js +76 -0
- package/dist/typography/text.js.map +1 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/index.js.map +1 -0
- package/package.json +218 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import "./select.css"
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { on } from '@ember/modifier';
|
|
5
|
+
import { hash } from '@ember/helper';
|
|
6
|
+
import { modifier } from 'ember-modifier';
|
|
7
|
+
import Popover from '../overlay/popover.js';
|
|
8
|
+
import Icon from '../media/icon.js';
|
|
9
|
+
import { ChevronDown } from 'lucide';
|
|
10
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
+
import { setComponentTemplate } from '@ember/component';
|
|
12
|
+
import templateOnly from '@ember/component/template-only';
|
|
13
|
+
import { g, i } from 'decorator-transforms/runtime';
|
|
14
|
+
|
|
15
|
+
;
|
|
16
|
+
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Sub-Components
|
|
19
|
+
// ============================================================================
|
|
20
|
+
let optionIdCounter = 0;
|
|
21
|
+
class SelectOption extends Component {
|
|
22
|
+
optionId = `select-option-${++optionIdCounter}`;
|
|
23
|
+
element = null;
|
|
24
|
+
label = '';
|
|
25
|
+
get ctx() {
|
|
26
|
+
return this.args.ctx;
|
|
27
|
+
}
|
|
28
|
+
get isSelected() {
|
|
29
|
+
return this.ctx.selectedValue === this.args.value;
|
|
30
|
+
}
|
|
31
|
+
get isActive() {
|
|
32
|
+
return this.ctx.activeId === this.optionId;
|
|
33
|
+
}
|
|
34
|
+
get ariaSelected() {
|
|
35
|
+
return this.isSelected ? 'true' : 'false';
|
|
36
|
+
}
|
|
37
|
+
get ariaDisabled() {
|
|
38
|
+
return this.args.disabled ? 'true' : undefined;
|
|
39
|
+
}
|
|
40
|
+
registerElement = modifier(element => {
|
|
41
|
+
this.element = element;
|
|
42
|
+
// Get the text content for typeahead
|
|
43
|
+
this.label = element.textContent?.trim() ?? '';
|
|
44
|
+
this.ctx.registerOption({
|
|
45
|
+
id: this.optionId,
|
|
46
|
+
value: this.args.value,
|
|
47
|
+
label: this.label,
|
|
48
|
+
disabled: this.args.disabled ?? false,
|
|
49
|
+
element: element
|
|
50
|
+
});
|
|
51
|
+
return () => {
|
|
52
|
+
this.ctx.unregisterOption(this.optionId);
|
|
53
|
+
this.element = null;
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
handleClick = event => {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
if (!this.args.disabled) {
|
|
59
|
+
this.ctx.selectOption(this.args.value);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
handleMouseEnter = () => {
|
|
63
|
+
if (!this.args.disabled) {
|
|
64
|
+
this.ctx.setActiveId(this.optionId);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
static {
|
|
68
|
+
setComponentTemplate(precompileTemplate("<div id={{this.optionId}} role=\"option\" class=\"select-option_ebb583c5d\" aria-selected={{this.ariaSelected}} aria-disabled={{this.ariaDisabled}} data-active={{if this.isActive \"true\"}} data-selected={{if this.isSelected \"true\"}} data-disabled={{if @disabled \"true\"}} {{this.registerElement}} {{on \"click\" this.handleClick}} {{on \"mouseenter\" this.handleMouseEnter}} data-test-select-option ...attributes>\n <span class=\"select-option-content_ebb583c5d\">\n {{yield}}\n </span>\n {{#if this.isSelected}}\n <span class=\"select-option-check_ebb583c5d\" aria-hidden=\"true\"></span>\n {{/if}}\n</div>", {
|
|
69
|
+
strictMode: true,
|
|
70
|
+
scope: () => ({
|
|
71
|
+
on
|
|
72
|
+
})
|
|
73
|
+
}), this);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const SelectOptionGroup = setComponentTemplate(precompileTemplate("<div role=\"group\" aria-label={{@label}} class=\"select-option-group_ebb583c5d\" data-test-select-option-group ...attributes>\n <div class=\"select-option-group-label_ebb583c5d\" data-test-select-option-group-label>{{@label}}</div>\n {{yield}}\n</div>", {
|
|
77
|
+
strictMode: true
|
|
78
|
+
}), templateOnly());
|
|
79
|
+
// ============================================================================
|
|
80
|
+
// Main Component
|
|
81
|
+
// ============================================================================
|
|
82
|
+
let selectIdCounter = 0;
|
|
83
|
+
class Select extends Component {
|
|
84
|
+
static {
|
|
85
|
+
g(this.prototype, "isOpen", [tracked], function () {
|
|
86
|
+
return false;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
#isOpen = (i(this, "isOpen"), void 0);
|
|
90
|
+
static {
|
|
91
|
+
g(this.prototype, "activeId", [tracked], function () {
|
|
92
|
+
return null;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
#activeId = (i(this, "activeId"), void 0);
|
|
96
|
+
static {
|
|
97
|
+
g(this.prototype, "_optionsVersion", [tracked], function () {
|
|
98
|
+
return 0;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
#_optionsVersion = (i(this, "_optionsVersion"), void 0);
|
|
102
|
+
// Non-tracked internal storage for options - avoids autotracking conflicts during render
|
|
103
|
+
_optionsMap = new Map();
|
|
104
|
+
// Cache for selected label - persists even when options are unregistered (dropdown closed)
|
|
105
|
+
_selectedLabelCache = new Map();
|
|
106
|
+
listboxId = `select-listbox-${++selectIdCounter}`;
|
|
107
|
+
triggerElement = null;
|
|
108
|
+
// Typeahead state
|
|
109
|
+
typeaheadBuffer = '';
|
|
110
|
+
typeaheadTimeout = null;
|
|
111
|
+
willDestroy() {
|
|
112
|
+
super.willDestroy();
|
|
113
|
+
if (this.typeaheadTimeout) {
|
|
114
|
+
clearTimeout(this.typeaheadTimeout);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
get selectedValue() {
|
|
118
|
+
return this.args.value;
|
|
119
|
+
}
|
|
120
|
+
get options() {
|
|
121
|
+
// Return options from non-tracked map
|
|
122
|
+
// This is intentionally non-reactive to avoid autotracking conflicts during render
|
|
123
|
+
return Array.from(this._optionsMap.values());
|
|
124
|
+
}
|
|
125
|
+
get selectedLabel() {
|
|
126
|
+
// Reference version to create tracking dependency
|
|
127
|
+
void this._optionsVersion;
|
|
128
|
+
if (!this.selectedValue) return undefined;
|
|
129
|
+
// First check currently registered options
|
|
130
|
+
for (const opt of this._optionsMap.values()) {
|
|
131
|
+
if (opt.value === this.selectedValue) {
|
|
132
|
+
return opt.label;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Fall back to cached label (for when dropdown is closed and options are unregistered)
|
|
136
|
+
return this._selectedLabelCache.get(this.selectedValue);
|
|
137
|
+
}
|
|
138
|
+
get triggerDisplayText() {
|
|
139
|
+
return this.selectedLabel ?? this.args.placeholder ?? '';
|
|
140
|
+
}
|
|
141
|
+
get enabledOptions() {
|
|
142
|
+
return this.options.filter(o => !o.disabled);
|
|
143
|
+
}
|
|
144
|
+
get ariaExpanded() {
|
|
145
|
+
return this.isOpen ? 'true' : 'false';
|
|
146
|
+
}
|
|
147
|
+
get ariaRequired() {
|
|
148
|
+
return this.args.isRequired ? 'true' : undefined;
|
|
149
|
+
}
|
|
150
|
+
get ariaInvalid() {
|
|
151
|
+
return this.args.isInvalid ? 'true' : undefined;
|
|
152
|
+
}
|
|
153
|
+
// Setup keyboard and focus handling
|
|
154
|
+
setupTrigger = modifier(element => {
|
|
155
|
+
this.triggerElement = element;
|
|
156
|
+
element.addEventListener('keydown', this.handleTriggerKeyDown);
|
|
157
|
+
element.addEventListener('focus', this.handleFocus);
|
|
158
|
+
element.addEventListener('blur', this.handleBlur);
|
|
159
|
+
return () => {
|
|
160
|
+
element.removeEventListener('keydown', this.handleTriggerKeyDown);
|
|
161
|
+
element.removeEventListener('focus', this.handleFocus);
|
|
162
|
+
element.removeEventListener('blur', this.handleBlur);
|
|
163
|
+
this.triggerElement = null;
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
handleFocus = event => {
|
|
167
|
+
this.args.onFocus?.(event);
|
|
168
|
+
};
|
|
169
|
+
handleBlur = event => {
|
|
170
|
+
this.args.onBlur?.(event);
|
|
171
|
+
};
|
|
172
|
+
handleTriggerKeyDown = event => {
|
|
173
|
+
switch (event.key) {
|
|
174
|
+
case 'Enter':
|
|
175
|
+
case ' ':
|
|
176
|
+
case 'ArrowDown':
|
|
177
|
+
case 'ArrowUp':
|
|
178
|
+
if (!this.isOpen) {
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
this.openDropdown();
|
|
181
|
+
// Set active to selected or first option
|
|
182
|
+
if (this.selectedValue) {
|
|
183
|
+
const selectedOption = this.options.find(o => o.value === this.selectedValue);
|
|
184
|
+
if (selectedOption) {
|
|
185
|
+
this.activeId = selectedOption.id;
|
|
186
|
+
}
|
|
187
|
+
} else if (this.enabledOptions.length > 0) {
|
|
188
|
+
this.activeId = this.enabledOptions[0].id;
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
this.handleListboxKeyDown(event);
|
|
192
|
+
}
|
|
193
|
+
break;
|
|
194
|
+
case 'Home':
|
|
195
|
+
case 'End':
|
|
196
|
+
if (this.isOpen) {
|
|
197
|
+
this.handleListboxKeyDown(event);
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
case 'Escape':
|
|
201
|
+
if (this.isOpen) {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
this.closeDropdown();
|
|
204
|
+
}
|
|
205
|
+
break;
|
|
206
|
+
case 'Tab':
|
|
207
|
+
if (this.isOpen) {
|
|
208
|
+
this.closeDropdown();
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
default:
|
|
212
|
+
// Typeahead - handle printable characters
|
|
213
|
+
if (event.key.length === 1 && !event.ctrlKey && !event.metaKey) {
|
|
214
|
+
event.preventDefault();
|
|
215
|
+
this.handleTypeahead(event.key);
|
|
216
|
+
if (!this.isOpen) {
|
|
217
|
+
this.openDropdown();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
handleListboxKeyDown = event => {
|
|
223
|
+
switch (event.key) {
|
|
224
|
+
case 'ArrowDown':
|
|
225
|
+
{
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
this.moveActiveOption(1);
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
case 'ArrowUp':
|
|
231
|
+
{
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
this.moveActiveOption(-1);
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
case 'Home':
|
|
237
|
+
{
|
|
238
|
+
event.preventDefault();
|
|
239
|
+
if (this.enabledOptions.length > 0) {
|
|
240
|
+
this.activeId = this.enabledOptions[0].id;
|
|
241
|
+
this.scrollActiveIntoView();
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
case 'End':
|
|
246
|
+
{
|
|
247
|
+
event.preventDefault();
|
|
248
|
+
if (this.enabledOptions.length > 0) {
|
|
249
|
+
this.activeId = this.enabledOptions[this.enabledOptions.length - 1].id;
|
|
250
|
+
this.scrollActiveIntoView();
|
|
251
|
+
}
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case 'Enter':
|
|
255
|
+
case ' ':
|
|
256
|
+
{
|
|
257
|
+
event.preventDefault();
|
|
258
|
+
if (this.activeId) {
|
|
259
|
+
const activeOption = this.options.find(o => o.id === this.activeId);
|
|
260
|
+
if (activeOption && !activeOption.disabled) {
|
|
261
|
+
this.selectOptionByValue(activeOption.value);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
default:
|
|
267
|
+
// Typeahead
|
|
268
|
+
if (event.key.length === 1 && !event.ctrlKey && !event.metaKey) {
|
|
269
|
+
event.preventDefault();
|
|
270
|
+
this.handleTypeahead(event.key);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
moveActiveOption(direction) {
|
|
275
|
+
if (this.enabledOptions.length === 0) return;
|
|
276
|
+
const currentIndex = this.activeId ? this.enabledOptions.findIndex(o => o.id === this.activeId) : -1;
|
|
277
|
+
let newIndex;
|
|
278
|
+
if (currentIndex === -1) {
|
|
279
|
+
newIndex = direction === 1 ? 0 : this.enabledOptions.length - 1;
|
|
280
|
+
} else {
|
|
281
|
+
newIndex = currentIndex + direction;
|
|
282
|
+
if (newIndex < 0) newIndex = this.enabledOptions.length - 1;
|
|
283
|
+
if (newIndex >= this.enabledOptions.length) newIndex = 0;
|
|
284
|
+
}
|
|
285
|
+
this.activeId = this.enabledOptions[newIndex].id;
|
|
286
|
+
this.scrollActiveIntoView();
|
|
287
|
+
}
|
|
288
|
+
scrollActiveIntoView() {
|
|
289
|
+
if (!this.activeId) return;
|
|
290
|
+
const option = this.options.find(o => o.id === this.activeId);
|
|
291
|
+
option?.element?.scrollIntoView({
|
|
292
|
+
block: 'nearest'
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
handleTypeahead(key) {
|
|
296
|
+
// Clear existing timeout
|
|
297
|
+
if (this.typeaheadTimeout) {
|
|
298
|
+
clearTimeout(this.typeaheadTimeout);
|
|
299
|
+
}
|
|
300
|
+
// Add to buffer
|
|
301
|
+
this.typeaheadBuffer += key.toLowerCase();
|
|
302
|
+
// Find matching option
|
|
303
|
+
const match = this.enabledOptions.find(o => o.label.toLowerCase().startsWith(this.typeaheadBuffer));
|
|
304
|
+
if (match) {
|
|
305
|
+
this.activeId = match.id;
|
|
306
|
+
this.scrollActiveIntoView();
|
|
307
|
+
}
|
|
308
|
+
// Clear buffer after delay
|
|
309
|
+
this.typeaheadTimeout = setTimeout(() => {
|
|
310
|
+
this.typeaheadBuffer = '';
|
|
311
|
+
this.typeaheadTimeout = null;
|
|
312
|
+
}, 500);
|
|
313
|
+
}
|
|
314
|
+
openDropdown = () => {
|
|
315
|
+
if (this.args.isDisabled) return;
|
|
316
|
+
this.isOpen = true;
|
|
317
|
+
};
|
|
318
|
+
closeDropdown = () => {
|
|
319
|
+
this.isOpen = false;
|
|
320
|
+
this.activeId = null;
|
|
321
|
+
this.typeaheadBuffer = '';
|
|
322
|
+
if (this.typeaheadTimeout) {
|
|
323
|
+
clearTimeout(this.typeaheadTimeout);
|
|
324
|
+
this.typeaheadTimeout = null;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
toggleDropdown = () => {
|
|
328
|
+
if (this.isOpen) {
|
|
329
|
+
this.closeDropdown();
|
|
330
|
+
} else {
|
|
331
|
+
this.openDropdown();
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
handleOpenChange = open => {
|
|
335
|
+
if (open) {
|
|
336
|
+
this.openDropdown();
|
|
337
|
+
} else {
|
|
338
|
+
this.closeDropdown();
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
registerOption = option => {
|
|
342
|
+
// Store in non-tracked map
|
|
343
|
+
this._optionsMap.set(option.id, option);
|
|
344
|
+
// Cache label for display when dropdown is closed
|
|
345
|
+
this._selectedLabelCache.set(option.value, option.label);
|
|
346
|
+
// Defer version bump to avoid autotracking conflicts during render
|
|
347
|
+
setTimeout(() => {
|
|
348
|
+
this._optionsVersion++;
|
|
349
|
+
}, 0);
|
|
350
|
+
};
|
|
351
|
+
unregisterOption = id => {
|
|
352
|
+
this._optionsMap.delete(id);
|
|
353
|
+
setTimeout(() => {
|
|
354
|
+
this._optionsVersion++;
|
|
355
|
+
}, 0);
|
|
356
|
+
};
|
|
357
|
+
selectOptionByValue = value => {
|
|
358
|
+
this.args.onChange?.(value);
|
|
359
|
+
this.closeDropdown();
|
|
360
|
+
this.triggerElement?.focus();
|
|
361
|
+
};
|
|
362
|
+
setActiveId = id => {
|
|
363
|
+
this.activeId = id;
|
|
364
|
+
};
|
|
365
|
+
get context() {
|
|
366
|
+
return {
|
|
367
|
+
isOpen: this.isOpen,
|
|
368
|
+
selectedValue: this.selectedValue,
|
|
369
|
+
activeId: this.activeId,
|
|
370
|
+
registerOption: this.registerOption,
|
|
371
|
+
unregisterOption: this.unregisterOption,
|
|
372
|
+
selectOption: this.selectOptionByValue,
|
|
373
|
+
setActiveId: this.setActiveId,
|
|
374
|
+
listboxId: this.listboxId
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
static {
|
|
378
|
+
setComponentTemplate(precompileTemplate("<Popover @trigger=\"manual\" @open={{this.isOpen}} @onOpenChange={{this.handleOpenChange}} @dismissOnClickOutside={{true}} @dismissOnEscape={{true}} class=\"select_ebb583c5d\" data-invalid={{if @isInvalid \"true\"}} data-disabled={{if @isDisabled \"true\"}} data-open={{if this.isOpen \"true\"}} data-test-select ...attributes as |popover|>\n {{!-- Hidden input for form submission --}}\n {{#if @name}}\n <input type=\"hidden\" name={{@name}} value={{this.selectedValue}} data-test-select-input />\n {{/if}}\n\n <popover.Trigger {{this.setupTrigger}} {{on \"click\" this.toggleDropdown}} class=\"select-trigger_ebb583c5d\" id={{@id}} role=\"combobox\" aria-haspopup=\"listbox\" aria-expanded={{this.ariaExpanded}} aria-controls={{this.listboxId}} aria-activedescendant={{this.activeId}} aria-required={{this.ariaRequired}} aria-invalid={{this.ariaInvalid}} aria-describedby={{@aria-describedby}} disabled={{@isDisabled}} data-test-select-trigger>\n <span class=\"select-trigger-text_ebb583c5d\" data-placeholder={{unless this.selectedValue \"true\"}} data-test-select-trigger-text>{{this.triggerDisplayText}}</span>\n <Icon @icon={{ChevronDown}} @size=\"sm\" class=\"select-trigger-icon_ebb583c5d\" />\n </popover.Trigger>\n\n <popover.Content @side=\"bottom\" @align=\"start\" @sideOffset={{4}} @animation=\"scale\" class=\"select-popover-content_ebb583c5d\">\n <div id={{this.listboxId}} role=\"listbox\" class=\"select-listbox_ebb583c5d\" tabindex=\"-1\" data-test-select-listbox>\n {{yield (hash Option=(component SelectOption ctx=this.context) OptionGroup=SelectOptionGroup isOpen=this.isOpen selectedValue=this.selectedValue)}}\n </div>\n </popover.Content>\n</Popover>", {
|
|
379
|
+
strictMode: true,
|
|
380
|
+
scope: () => ({
|
|
381
|
+
Popover,
|
|
382
|
+
on,
|
|
383
|
+
Icon,
|
|
384
|
+
ChevronDown,
|
|
385
|
+
hash,
|
|
386
|
+
SelectOption,
|
|
387
|
+
SelectOptionGroup
|
|
388
|
+
})
|
|
389
|
+
}), this);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export { SelectOption, SelectOptionGroup, Select as default };
|
|
394
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* <inline>/src/form/text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css */
|
|
2
|
+
|
|
3
|
+
.text-field_e2680f9ba {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--spacing-2);
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-field-footer_e2680f9ba {
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: var(--spacing-2);
|
|
15
|
+
min-height: var(--line-height-normal);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.text-field-footer_e2680f9ba:empty {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.text-field-character-count_e2680f9ba {
|
|
23
|
+
font-size: var(--font-size-sm);
|
|
24
|
+
color: var(--color-text-secondary);
|
|
25
|
+
margin-left: auto;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.text-field_e2680f9ba[data-over-limit="true"] .text-field-character-count_e2680f9ba {
|
|
30
|
+
color: var(--color-text-critical);
|
|
31
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import "./text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css"
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { guidFor } from '@ember/object/internals';
|
|
6
|
+
import { on } from '@ember/modifier';
|
|
7
|
+
import Label from './label.js';
|
|
8
|
+
import Input from './input.js';
|
|
9
|
+
import Textarea from './textarea.js';
|
|
10
|
+
import HelpText from './help-text.js';
|
|
11
|
+
import ErrorMessage from './error-message.js';
|
|
12
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
13
|
+
import { setComponentTemplate } from '@ember/component';
|
|
14
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
15
|
+
|
|
16
|
+
;
|
|
17
|
+
|
|
18
|
+
class TextField extends Component {
|
|
19
|
+
static {
|
|
20
|
+
g(this.prototype, "internalValue", [tracked]);
|
|
21
|
+
}
|
|
22
|
+
#internalValue = (i(this, "internalValue"), void 0);
|
|
23
|
+
id = this.args.id ?? guidFor(this);
|
|
24
|
+
constructor(owner, args) {
|
|
25
|
+
super(owner, args);
|
|
26
|
+
this.internalValue = args.value ?? args.defaultValue ?? '';
|
|
27
|
+
}
|
|
28
|
+
get helpTextId() {
|
|
29
|
+
return `${this.id}-help-text`;
|
|
30
|
+
}
|
|
31
|
+
get errorMessageId() {
|
|
32
|
+
return `${this.id}-error-message`;
|
|
33
|
+
}
|
|
34
|
+
get ariaDescribedBy() {
|
|
35
|
+
const ids = [];
|
|
36
|
+
if (this.args.helpText) {
|
|
37
|
+
ids.push(this.helpTextId);
|
|
38
|
+
}
|
|
39
|
+
if (this.args.error) {
|
|
40
|
+
ids.push(this.errorMessageId);
|
|
41
|
+
}
|
|
42
|
+
return ids.length > 0 ? ids.join(' ') : '';
|
|
43
|
+
}
|
|
44
|
+
get isInvalid() {
|
|
45
|
+
return !!this.args.error;
|
|
46
|
+
}
|
|
47
|
+
get isDisabled() {
|
|
48
|
+
return this.args.isDisabled ?? false;
|
|
49
|
+
}
|
|
50
|
+
get isRequired() {
|
|
51
|
+
return this.args.isRequired ?? false;
|
|
52
|
+
}
|
|
53
|
+
get isReadOnly() {
|
|
54
|
+
return this.args.isReadOnly ?? false;
|
|
55
|
+
}
|
|
56
|
+
get isLabelHidden() {
|
|
57
|
+
return this.args.labelVisibility === 'hidden';
|
|
58
|
+
}
|
|
59
|
+
get rows() {
|
|
60
|
+
return this.args.rows ?? 3;
|
|
61
|
+
}
|
|
62
|
+
get isControlled() {
|
|
63
|
+
return this.args.value !== undefined;
|
|
64
|
+
}
|
|
65
|
+
get currentValue() {
|
|
66
|
+
return this.isControlled ? this.args.value ?? '' : this.internalValue;
|
|
67
|
+
}
|
|
68
|
+
get characterCount() {
|
|
69
|
+
return this.currentValue.length;
|
|
70
|
+
}
|
|
71
|
+
get isOverLimit() {
|
|
72
|
+
if (this.args.maxLength === undefined) return false;
|
|
73
|
+
return this.characterCount > this.args.maxLength;
|
|
74
|
+
}
|
|
75
|
+
get showFooter() {
|
|
76
|
+
return !!this.args.error || !!this.args.helpText || !!this.args.showCharacterCount;
|
|
77
|
+
}
|
|
78
|
+
// Handler for Textarea (receives value as first arg)
|
|
79
|
+
handleTextareaInput(value, event) {
|
|
80
|
+
if (!this.isControlled) {
|
|
81
|
+
this.internalValue = value;
|
|
82
|
+
}
|
|
83
|
+
this.args.onInput?.(value, event);
|
|
84
|
+
}
|
|
85
|
+
static {
|
|
86
|
+
n(this.prototype, "handleTextareaInput", [action]);
|
|
87
|
+
}
|
|
88
|
+
handleTextareaChange(value, event) {
|
|
89
|
+
this.args.onChange?.(value, event);
|
|
90
|
+
}
|
|
91
|
+
// Handler for Input (receives native DOM event)
|
|
92
|
+
static {
|
|
93
|
+
n(this.prototype, "handleTextareaChange", [action]);
|
|
94
|
+
}
|
|
95
|
+
handleInputEvent(event) {
|
|
96
|
+
const target = event.target;
|
|
97
|
+
const value = target.value;
|
|
98
|
+
if (!this.isControlled) {
|
|
99
|
+
this.internalValue = value;
|
|
100
|
+
}
|
|
101
|
+
this.args.onInput?.(value, event);
|
|
102
|
+
}
|
|
103
|
+
static {
|
|
104
|
+
n(this.prototype, "handleInputEvent", [action]);
|
|
105
|
+
}
|
|
106
|
+
handleChangeEvent(event) {
|
|
107
|
+
const target = event.target;
|
|
108
|
+
this.args.onChange?.(target.value, event);
|
|
109
|
+
}
|
|
110
|
+
static {
|
|
111
|
+
n(this.prototype, "handleChangeEvent", [action]);
|
|
112
|
+
}
|
|
113
|
+
handleFocus(event) {
|
|
114
|
+
this.args.onFocus?.(event);
|
|
115
|
+
}
|
|
116
|
+
static {
|
|
117
|
+
n(this.prototype, "handleFocus", [action]);
|
|
118
|
+
}
|
|
119
|
+
handleBlur(event) {
|
|
120
|
+
this.args.onBlur?.(event);
|
|
121
|
+
}
|
|
122
|
+
static {
|
|
123
|
+
n(this.prototype, "handleBlur", [action]);
|
|
124
|
+
}
|
|
125
|
+
static {
|
|
126
|
+
setComponentTemplate(precompileTemplate("\n\n<div class=\"text-field_e2680f9ba\" data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if this.isDisabled \"true\" \"false\"}} data-readonly={{if this.isReadOnly \"true\" \"false\"}} data-over-limit={{if this.isOverLimit \"true\" \"false\"}} data-test-text-field ...attributes>\n <Label @for={{this.id}} @isRequired={{this.isRequired}} @isDisabled={{this.isDisabled}} @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </Label>\n\n {{#if @multiline}}\n <FormTextarea id={{this.id}} @size={{@size}} @variant={{@variant}} @value={{this.currentValue}} @placeholder={{@placeholder}} @isDisabled={{this.isDisabled}} @isReadOnly={{this.isReadOnly}} @isRequired={{this.isRequired}} @isInvalid={{this.isInvalid}} @rows={{this.rows}} @autoGrow={{@autoResize}} @maxLength={{@maxLength}} @name={{@name}} @onInput={{this.handleTextareaInput}} @onChange={{this.handleTextareaChange}} @onFocus={{this.handleFocus}} @onBlur={{this.handleBlur}} aria-describedby={{if this.ariaDescribedBy this.ariaDescribedBy}} />\n {{else}}\n <FormInput id={{this.id}} @type={{@type}} @size={{@size}} @variant={{@variant}} @value={{this.currentValue}} @placeholder={{@placeholder}} @isDisabled={{this.isDisabled}} @isReadOnly={{this.isReadOnly}} @isRequired={{this.isRequired}} @isInvalid={{this.isInvalid}} @maxLength={{@maxLength}} @autoComplete={{@autoComplete}} @name={{@name}} aria-describedby={{if this.ariaDescribedBy this.ariaDescribedBy}} {{on \"input\" this.handleInputEvent}} {{on \"change\" this.handleChangeEvent}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}}>\n <:prefix>{{yield to=\"prefix\"}}{{@prefix}}</:prefix>\n <:suffix>{{yield to=\"suffix\"}}{{@suffix}}</:suffix>\n </FormInput>\n {{/if}}\n\n {{#if this.showFooter}}\n <div class=\"text-field-footer_e2680f9ba\" data-test-text-field-footer>\n {{#if @error}}\n <ErrorMessage id={{this.errorMessageId}} @isInvalid={{this.isInvalid}}>\n {{@error}}\n </ErrorMessage>\n {{else if @helpText}}\n <HelpText id={{this.helpTextId}}>\n {{@helpText}}\n </HelpText>\n {{/if}}\n\n {{#if @showCharacterCount}}\n <span class=\"text-field-character-count_e2680f9ba\" aria-live=\"polite\" data-test-character-count>\n {{this.characterCount}}{{#if @maxLength}}/{{@maxLength}}{{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n</div>", {
|
|
127
|
+
strictMode: true,
|
|
128
|
+
scope: () => ({
|
|
129
|
+
Label,
|
|
130
|
+
FormTextarea: Textarea,
|
|
131
|
+
FormInput: Input,
|
|
132
|
+
on,
|
|
133
|
+
ErrorMessage,
|
|
134
|
+
HelpText
|
|
135
|
+
})
|
|
136
|
+
}), this);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { TextField as default };
|
|
141
|
+
//# sourceMappingURL=text-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|