@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,532 @@
|
|
|
1
|
+
import "./calendar.css"
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { guidFor } from '@ember/object/internals';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { fn } from '@ember/helper';
|
|
7
|
+
import { not } from 'ember-truth-helpers';
|
|
8
|
+
import { modifier } from 'ember-modifier';
|
|
9
|
+
import { format, endOfMonth, addMonths, isBefore, startOfMonth, isAfter, startOfWeek, endOfWeek, eachDayOfInterval, getDay, isSameDay, isSameMonth, isToday, addWeeks, addDays } from 'date-fns';
|
|
10
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
+
import { setComponentTemplate } from '@ember/component';
|
|
12
|
+
import { g, i } from 'decorator-transforms/runtime';
|
|
13
|
+
|
|
14
|
+
;
|
|
15
|
+
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Main Component
|
|
18
|
+
// ============================================================================
|
|
19
|
+
class Calendar extends Component {
|
|
20
|
+
static {
|
|
21
|
+
g(this.prototype, "internalMonth", [tracked], function () {
|
|
22
|
+
return new Date();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
#internalMonth = (i(this, "internalMonth"), void 0);
|
|
26
|
+
static {
|
|
27
|
+
g(this.prototype, "focusedDate", [tracked], function () {
|
|
28
|
+
return null;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
#focusedDate = (i(this, "focusedDate"), void 0);
|
|
32
|
+
static {
|
|
33
|
+
g(this.prototype, "internalValue", [tracked], function () {
|
|
34
|
+
return null;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
#internalValue = (i(this, "internalValue"), void 0);
|
|
38
|
+
static {
|
|
39
|
+
g(this.prototype, "internalMultiValue", [tracked], function () {
|
|
40
|
+
return [];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
#internalMultiValue = (i(this, "internalMultiValue"), void 0);
|
|
44
|
+
static {
|
|
45
|
+
g(this.prototype, "internalRangeValue", [tracked], function () {
|
|
46
|
+
return null;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
#internalRangeValue = (i(this, "internalRangeValue"), void 0);
|
|
50
|
+
static {
|
|
51
|
+
g(this.prototype, "rangeSelectionStart", [tracked], function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
#rangeSelectionStart = (i(this, "rangeSelectionStart"), void 0);
|
|
56
|
+
static {
|
|
57
|
+
g(this.prototype, "hoveredDate", [tracked], function () {
|
|
58
|
+
return null;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
#hoveredDate = (i(this, "hoveredDate"), void 0);
|
|
62
|
+
elementRef = null;
|
|
63
|
+
// ============================================================================
|
|
64
|
+
// Computed Properties
|
|
65
|
+
// ============================================================================
|
|
66
|
+
get componentId() {
|
|
67
|
+
return guidFor(this);
|
|
68
|
+
}
|
|
69
|
+
get mode() {
|
|
70
|
+
return this.args.mode ?? 'single';
|
|
71
|
+
}
|
|
72
|
+
get weekStartsOn() {
|
|
73
|
+
return this.args.weekStartsOn ?? 0;
|
|
74
|
+
}
|
|
75
|
+
get showOutsideDays() {
|
|
76
|
+
return this.args.showOutsideDays ?? true;
|
|
77
|
+
}
|
|
78
|
+
get showToday() {
|
|
79
|
+
return this.args.showToday ?? true;
|
|
80
|
+
}
|
|
81
|
+
/** Current displayed month (controlled or uncontrolled) */
|
|
82
|
+
get currentMonth() {
|
|
83
|
+
if (this.args.month !== undefined) {
|
|
84
|
+
return this.args.month;
|
|
85
|
+
}
|
|
86
|
+
if (this.args.defaultMonth !== undefined && !this.hasInternalMonthChanged) {
|
|
87
|
+
return this.args.defaultMonth;
|
|
88
|
+
}
|
|
89
|
+
return this.internalMonth;
|
|
90
|
+
}
|
|
91
|
+
hasInternalMonthChanged = false;
|
|
92
|
+
hasInternalValueChanged = false;
|
|
93
|
+
set currentMonth(value) {
|
|
94
|
+
this.hasInternalMonthChanged = true;
|
|
95
|
+
this.internalMonth = value;
|
|
96
|
+
this.args.onMonthChange?.(value);
|
|
97
|
+
}
|
|
98
|
+
/** Selected value for single mode (controlled or uncontrolled) */
|
|
99
|
+
get selectedValue() {
|
|
100
|
+
if (this.args.value !== undefined) {
|
|
101
|
+
return this.args.value;
|
|
102
|
+
}
|
|
103
|
+
if (this.args.defaultValue !== undefined && !this.hasInternalValueChanged) {
|
|
104
|
+
return this.args.defaultValue;
|
|
105
|
+
}
|
|
106
|
+
return this.internalValue;
|
|
107
|
+
}
|
|
108
|
+
/** Selected values for multiple mode */
|
|
109
|
+
get selectedMultiValue() {
|
|
110
|
+
if (this.args.multiValue !== undefined) {
|
|
111
|
+
return this.args.multiValue;
|
|
112
|
+
}
|
|
113
|
+
return this.internalMultiValue;
|
|
114
|
+
}
|
|
115
|
+
/** Selected range for range mode */
|
|
116
|
+
get selectedRange() {
|
|
117
|
+
if (this.args.rangeValue !== undefined) {
|
|
118
|
+
return this.args.rangeValue;
|
|
119
|
+
}
|
|
120
|
+
return this.internalRangeValue;
|
|
121
|
+
}
|
|
122
|
+
/** Weekday labels starting from weekStartsOn */
|
|
123
|
+
get weekdayLabels() {
|
|
124
|
+
const labels = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
125
|
+
const startDay = this.weekStartsOn;
|
|
126
|
+
return [...labels.slice(startDay), ...labels.slice(0, startDay)];
|
|
127
|
+
}
|
|
128
|
+
/** Month and year display text */
|
|
129
|
+
get monthYearLabel() {
|
|
130
|
+
return format(this.currentMonth, 'MMMM yyyy');
|
|
131
|
+
}
|
|
132
|
+
/** Can navigate to previous month (respects minDate) */
|
|
133
|
+
get canGoToPreviousMonth() {
|
|
134
|
+
if (!this.args.minDate) return true;
|
|
135
|
+
const prevMonthEnd = endOfMonth(addMonths(this.currentMonth, -1));
|
|
136
|
+
return !isBefore(prevMonthEnd, this.args.minDate);
|
|
137
|
+
}
|
|
138
|
+
/** Can navigate to next month (respects maxDate) */
|
|
139
|
+
get canGoToNextMonth() {
|
|
140
|
+
if (!this.args.maxDate) return true;
|
|
141
|
+
const nextMonthStart = startOfMonth(addMonths(this.currentMonth, 1));
|
|
142
|
+
return !isAfter(nextMonthStart, this.args.maxDate);
|
|
143
|
+
}
|
|
144
|
+
/** Generate weeks array for the current month view */
|
|
145
|
+
get weeks() {
|
|
146
|
+
const monthStart = startOfMonth(this.currentMonth);
|
|
147
|
+
const monthEnd = endOfMonth(this.currentMonth);
|
|
148
|
+
const calendarStart = startOfWeek(monthStart, {
|
|
149
|
+
weekStartsOn: this.weekStartsOn
|
|
150
|
+
});
|
|
151
|
+
const calendarEnd = endOfWeek(monthEnd, {
|
|
152
|
+
weekStartsOn: this.weekStartsOn
|
|
153
|
+
});
|
|
154
|
+
const days = eachDayOfInterval({
|
|
155
|
+
start: calendarStart,
|
|
156
|
+
end: calendarEnd
|
|
157
|
+
});
|
|
158
|
+
const weeks = [];
|
|
159
|
+
for (let i = 0; i < days.length; i += 7) {
|
|
160
|
+
weeks.push(days.slice(i, i + 7));
|
|
161
|
+
}
|
|
162
|
+
return weeks;
|
|
163
|
+
}
|
|
164
|
+
get tabIndex() {
|
|
165
|
+
return this.args.isDisabled ? -1 : 0;
|
|
166
|
+
}
|
|
167
|
+
get activedescendant() {
|
|
168
|
+
if (this.focusedDate) {
|
|
169
|
+
return this.getDayId(this.focusedDate);
|
|
170
|
+
}
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
// ============================================================================
|
|
174
|
+
// Day State Methods
|
|
175
|
+
// ============================================================================
|
|
176
|
+
getDayId = date => {
|
|
177
|
+
const dateStr = format(date, 'yyyy-MM-dd');
|
|
178
|
+
return `${this.componentId}-day-${dateStr}`;
|
|
179
|
+
};
|
|
180
|
+
isDateDisabled = date => {
|
|
181
|
+
if (this.args.isDisabled) return true;
|
|
182
|
+
// Check min/max bounds
|
|
183
|
+
if (this.args.minDate && isBefore(date, this.args.minDate)) {
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
if (this.args.maxDate && isAfter(date, this.args.maxDate)) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
// Check disabled days of week
|
|
190
|
+
if (this.args.disabledDaysOfWeek?.includes(getDay(date))) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
// Check disabled dates
|
|
194
|
+
if (this.args.disabledDates) {
|
|
195
|
+
if (Array.isArray(this.args.disabledDates)) {
|
|
196
|
+
return this.args.disabledDates.some(d => isSameDay(d, date));
|
|
197
|
+
}
|
|
198
|
+
return this.args.disabledDates(date);
|
|
199
|
+
}
|
|
200
|
+
return false;
|
|
201
|
+
};
|
|
202
|
+
isDateSelected = date => {
|
|
203
|
+
if (this.mode === 'single') {
|
|
204
|
+
return this.selectedValue ? isSameDay(date, this.selectedValue) : false;
|
|
205
|
+
}
|
|
206
|
+
if (this.mode === 'multiple') {
|
|
207
|
+
return this.selectedMultiValue.some(d => isSameDay(d, date));
|
|
208
|
+
}
|
|
209
|
+
if (this.mode === 'range') {
|
|
210
|
+
const range = this.selectedRange;
|
|
211
|
+
if (range) {
|
|
212
|
+
return isSameDay(date, range.start) || isSameDay(date, range.end);
|
|
213
|
+
}
|
|
214
|
+
// Check if it's the start of a pending range selection
|
|
215
|
+
if (this.rangeSelectionStart) {
|
|
216
|
+
return isSameDay(date, this.rangeSelectionStart);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return false;
|
|
220
|
+
};
|
|
221
|
+
isDateFocused = date => {
|
|
222
|
+
return this.focusedDate ? isSameDay(date, this.focusedDate) : false;
|
|
223
|
+
};
|
|
224
|
+
isDateOutsideMonth = date => {
|
|
225
|
+
return !isSameMonth(date, this.currentMonth);
|
|
226
|
+
};
|
|
227
|
+
isDateRangeStart = date => {
|
|
228
|
+
if (this.mode !== 'range') return false;
|
|
229
|
+
const range = this.selectedRange;
|
|
230
|
+
if (range) {
|
|
231
|
+
return isSameDay(date, range.start);
|
|
232
|
+
}
|
|
233
|
+
if (this.rangeSelectionStart) {
|
|
234
|
+
return isSameDay(date, this.rangeSelectionStart);
|
|
235
|
+
}
|
|
236
|
+
return false;
|
|
237
|
+
};
|
|
238
|
+
isDateRangeEnd = date => {
|
|
239
|
+
if (this.mode !== 'range') return false;
|
|
240
|
+
const range = this.selectedRange;
|
|
241
|
+
return range ? isSameDay(date, range.end) : false;
|
|
242
|
+
};
|
|
243
|
+
isDateInRange = date => {
|
|
244
|
+
if (this.mode !== 'range') return false;
|
|
245
|
+
// Check confirmed range
|
|
246
|
+
const range = this.selectedRange;
|
|
247
|
+
if (range) {
|
|
248
|
+
return isAfter(date, range.start) && isBefore(date, range.end);
|
|
249
|
+
}
|
|
250
|
+
// Check hover preview during range selection
|
|
251
|
+
if (this.rangeSelectionStart && this.hoveredDate) {
|
|
252
|
+
const start = this.rangeSelectionStart;
|
|
253
|
+
const end = this.hoveredDate;
|
|
254
|
+
if (isBefore(start, end)) {
|
|
255
|
+
return isAfter(date, start) && isBefore(date, end);
|
|
256
|
+
} else {
|
|
257
|
+
return isAfter(date, end) && isBefore(date, start);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return false;
|
|
261
|
+
};
|
|
262
|
+
getDayState = date => {
|
|
263
|
+
return {
|
|
264
|
+
date,
|
|
265
|
+
isToday: this.showToday && isToday(date),
|
|
266
|
+
isSelected: this.isDateSelected(date),
|
|
267
|
+
isFocused: this.isDateFocused(date),
|
|
268
|
+
isDisabled: this.isDateDisabled(date),
|
|
269
|
+
isOutsideMonth: this.isDateOutsideMonth(date),
|
|
270
|
+
isRangeStart: this.isDateRangeStart(date),
|
|
271
|
+
isRangeEnd: this.isDateRangeEnd(date),
|
|
272
|
+
isInRange: this.isDateInRange(date)
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
// ============================================================================
|
|
276
|
+
// Selection Methods
|
|
277
|
+
// ============================================================================
|
|
278
|
+
selectDate = date => {
|
|
279
|
+
if (this.isDateDisabled(date)) return;
|
|
280
|
+
if (this.mode === 'single') {
|
|
281
|
+
this.hasInternalValueChanged = true;
|
|
282
|
+
this.internalValue = date;
|
|
283
|
+
this.args.onChange?.(date);
|
|
284
|
+
} else if (this.mode === 'multiple') {
|
|
285
|
+
const current = [...this.selectedMultiValue];
|
|
286
|
+
const index = current.findIndex(d => isSameDay(d, date));
|
|
287
|
+
if (index >= 0) {
|
|
288
|
+
// Deselecting - remove from array and clear focus
|
|
289
|
+
current.splice(index, 1);
|
|
290
|
+
this.focusedDate = null;
|
|
291
|
+
} else {
|
|
292
|
+
current.push(date);
|
|
293
|
+
}
|
|
294
|
+
this.internalMultiValue = current;
|
|
295
|
+
this.args.onMultiChange?.(current);
|
|
296
|
+
} else if (this.mode === 'range') {
|
|
297
|
+
if (!this.rangeSelectionStart) {
|
|
298
|
+
// First click: set range start and clear any existing range
|
|
299
|
+
this.rangeSelectionStart = date;
|
|
300
|
+
this.internalRangeValue = null;
|
|
301
|
+
this.args.onRangeChange?.(null);
|
|
302
|
+
} else {
|
|
303
|
+
// Second click: complete range
|
|
304
|
+
const start = this.rangeSelectionStart;
|
|
305
|
+
const end = date;
|
|
306
|
+
const range = isBefore(start, end) ? {
|
|
307
|
+
start,
|
|
308
|
+
end
|
|
309
|
+
} : {
|
|
310
|
+
start: end,
|
|
311
|
+
end: start
|
|
312
|
+
};
|
|
313
|
+
this.rangeSelectionStart = null;
|
|
314
|
+
this.hoveredDate = null;
|
|
315
|
+
this.internalRangeValue = range;
|
|
316
|
+
this.args.onRangeChange?.(range);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
// ============================================================================
|
|
321
|
+
// Navigation Methods
|
|
322
|
+
// ============================================================================
|
|
323
|
+
goToPreviousMonth = () => {
|
|
324
|
+
this.currentMonth = addMonths(this.currentMonth, -1);
|
|
325
|
+
};
|
|
326
|
+
goToNextMonth = () => {
|
|
327
|
+
this.currentMonth = addMonths(this.currentMonth, 1);
|
|
328
|
+
};
|
|
329
|
+
setFocusedDate(date) {
|
|
330
|
+
this.focusedDate = date;
|
|
331
|
+
// If focused date is outside current month, navigate to that month
|
|
332
|
+
if (!isSameMonth(date, this.currentMonth)) {
|
|
333
|
+
this.currentMonth = startOfMonth(date);
|
|
334
|
+
}
|
|
335
|
+
// Scroll the focused day into view
|
|
336
|
+
const dayId = this.getDayId(date);
|
|
337
|
+
const dayElement = document.getElementById(dayId);
|
|
338
|
+
dayElement?.scrollIntoView({
|
|
339
|
+
block: 'nearest'
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
moveFocus(direction) {
|
|
343
|
+
const current = this.focusedDate ?? this.selectedValue ?? new Date();
|
|
344
|
+
let newDate;
|
|
345
|
+
switch (direction) {
|
|
346
|
+
case 'prev':
|
|
347
|
+
newDate = addDays(current, -1);
|
|
348
|
+
break;
|
|
349
|
+
case 'next':
|
|
350
|
+
newDate = addDays(current, 1);
|
|
351
|
+
break;
|
|
352
|
+
case 'up':
|
|
353
|
+
newDate = addWeeks(current, -1);
|
|
354
|
+
break;
|
|
355
|
+
case 'down':
|
|
356
|
+
newDate = addWeeks(current, 1);
|
|
357
|
+
break;
|
|
358
|
+
case 'home':
|
|
359
|
+
newDate = startOfWeek(current, {
|
|
360
|
+
weekStartsOn: this.weekStartsOn
|
|
361
|
+
});
|
|
362
|
+
break;
|
|
363
|
+
case 'end':
|
|
364
|
+
newDate = endOfWeek(current, {
|
|
365
|
+
weekStartsOn: this.weekStartsOn
|
|
366
|
+
});
|
|
367
|
+
break;
|
|
368
|
+
case 'prevMonth':
|
|
369
|
+
newDate = addMonths(current, -1);
|
|
370
|
+
break;
|
|
371
|
+
case 'nextMonth':
|
|
372
|
+
newDate = addMonths(current, 1);
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
// Skip disabled dates when navigating (with safety limit)
|
|
376
|
+
const maxIterations = 365; // Prevent infinite loop
|
|
377
|
+
let iterations = 0;
|
|
378
|
+
while (this.isDateDisabled(newDate) && iterations < maxIterations) {
|
|
379
|
+
// Stop if we've gone beyond min/max bounds
|
|
380
|
+
if (this.args.minDate && isBefore(newDate, this.args.minDate)) {
|
|
381
|
+
newDate = current; // Revert to current date
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
if (this.args.maxDate && isAfter(newDate, this.args.maxDate)) {
|
|
385
|
+
newDate = current; // Revert to current date
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
if (direction === 'prev' || direction === 'up') {
|
|
389
|
+
newDate = addDays(newDate, -1);
|
|
390
|
+
} else if (direction === 'next' || direction === 'down') {
|
|
391
|
+
newDate = addDays(newDate, 1);
|
|
392
|
+
} else if (direction === 'home') {
|
|
393
|
+
// For Home, look forward to find enabled date within the week
|
|
394
|
+
newDate = addDays(newDate, 1);
|
|
395
|
+
} else if (direction === 'end') {
|
|
396
|
+
// For End, look backward to find enabled date within the week
|
|
397
|
+
newDate = addDays(newDate, -1);
|
|
398
|
+
} else {
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
iterations++;
|
|
402
|
+
}
|
|
403
|
+
this.setFocusedDate(newDate);
|
|
404
|
+
}
|
|
405
|
+
// ============================================================================
|
|
406
|
+
// Event Handlers
|
|
407
|
+
// ============================================================================
|
|
408
|
+
handleKeyDown = event => {
|
|
409
|
+
if (this.args.isDisabled) return;
|
|
410
|
+
switch (event.key) {
|
|
411
|
+
case 'ArrowLeft':
|
|
412
|
+
event.preventDefault();
|
|
413
|
+
this.moveFocus('prev');
|
|
414
|
+
break;
|
|
415
|
+
case 'ArrowRight':
|
|
416
|
+
event.preventDefault();
|
|
417
|
+
this.moveFocus('next');
|
|
418
|
+
break;
|
|
419
|
+
case 'ArrowUp':
|
|
420
|
+
event.preventDefault();
|
|
421
|
+
this.moveFocus('up');
|
|
422
|
+
break;
|
|
423
|
+
case 'ArrowDown':
|
|
424
|
+
event.preventDefault();
|
|
425
|
+
this.moveFocus('down');
|
|
426
|
+
break;
|
|
427
|
+
case 'Home':
|
|
428
|
+
event.preventDefault();
|
|
429
|
+
this.moveFocus('home');
|
|
430
|
+
break;
|
|
431
|
+
case 'End':
|
|
432
|
+
event.preventDefault();
|
|
433
|
+
this.moveFocus('end');
|
|
434
|
+
break;
|
|
435
|
+
case 'PageUp':
|
|
436
|
+
event.preventDefault();
|
|
437
|
+
this.moveFocus('prevMonth');
|
|
438
|
+
break;
|
|
439
|
+
case 'PageDown':
|
|
440
|
+
event.preventDefault();
|
|
441
|
+
this.moveFocus('nextMonth');
|
|
442
|
+
break;
|
|
443
|
+
case 'Enter':
|
|
444
|
+
case ' ':
|
|
445
|
+
event.preventDefault();
|
|
446
|
+
if (this.focusedDate) {
|
|
447
|
+
this.selectDate(this.focusedDate);
|
|
448
|
+
}
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
handleFocus = () => {
|
|
453
|
+
// Focus selected date, or today, or first of month
|
|
454
|
+
if (!this.focusedDate) {
|
|
455
|
+
if (this.selectedValue) {
|
|
456
|
+
this.focusedDate = this.selectedValue;
|
|
457
|
+
} else if (this.selectedMultiValue.length > 0) {
|
|
458
|
+
this.focusedDate = this.selectedMultiValue[0] ?? startOfMonth(this.currentMonth);
|
|
459
|
+
} else if (this.selectedRange) {
|
|
460
|
+
this.focusedDate = this.selectedRange.start;
|
|
461
|
+
} else {
|
|
462
|
+
const today = new Date();
|
|
463
|
+
if (isSameMonth(today, this.currentMonth)) {
|
|
464
|
+
this.focusedDate = today;
|
|
465
|
+
} else {
|
|
466
|
+
this.focusedDate = startOfMonth(this.currentMonth);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
handleBlur = () => {
|
|
472
|
+
this.focusedDate = null;
|
|
473
|
+
};
|
|
474
|
+
handleDayClick = date => {
|
|
475
|
+
if (!this.isDateDisabled(date)) {
|
|
476
|
+
this.focusedDate = date;
|
|
477
|
+
this.selectDate(date);
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
handleDayMouseEnter = date => {
|
|
481
|
+
if (this.mode === 'range' && this.rangeSelectionStart && !this.isDateDisabled(date)) {
|
|
482
|
+
this.hoveredDate = date;
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
handlePrevMonthClick = event => {
|
|
486
|
+
event.stopPropagation();
|
|
487
|
+
if (this.canGoToPreviousMonth) {
|
|
488
|
+
this.goToPreviousMonth();
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
handleNextMonthClick = event => {
|
|
492
|
+
event.stopPropagation();
|
|
493
|
+
if (this.canGoToNextMonth) {
|
|
494
|
+
this.goToNextMonth();
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
// ============================================================================
|
|
498
|
+
// Modifiers
|
|
499
|
+
// ============================================================================
|
|
500
|
+
setupRef = modifier(element => {
|
|
501
|
+
this.elementRef = element;
|
|
502
|
+
return () => {
|
|
503
|
+
this.elementRef = null;
|
|
504
|
+
};
|
|
505
|
+
});
|
|
506
|
+
// ============================================================================
|
|
507
|
+
// Template Helpers
|
|
508
|
+
// ============================================================================
|
|
509
|
+
getDayNumber = date => {
|
|
510
|
+
return date.getDate();
|
|
511
|
+
};
|
|
512
|
+
shouldShowDay = date => {
|
|
513
|
+
if (this.showOutsideDays) return true;
|
|
514
|
+
return isSameMonth(date, this.currentMonth);
|
|
515
|
+
};
|
|
516
|
+
// ============================================================================
|
|
517
|
+
// Template
|
|
518
|
+
// ============================================================================
|
|
519
|
+
static {
|
|
520
|
+
setComponentTemplate(precompileTemplate("{{!-- template-lint-disable no-positive-tabindex require-aria-activedescendant-tabindex --}}\n<div role=\"grid\" tabindex={{this.tabIndex}} class=\"calendar_e7aa819da\" aria-label=\"Calendar\" aria-activedescendant={{this.activedescendant}} aria-disabled={{if @isDisabled \"true\"}} data-disabled={{if @isDisabled \"true\" \"false\"}} data-mode={{this.mode}} data-test-calendar {{this.setupRef}} {{on \"keydown\" this.handleKeyDown}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}} ...attributes>\n {{!-- Header with month navigation --}}\n <div class=\"calendar-header_e7aa819da\" data-test-calendar-header>\n <button type=\"button\" class=\"calendar-nav-button_e7aa819da\" aria-label=\"Previous month\" disabled={{not this.canGoToPreviousMonth}} data-test-calendar-prev {{on \"click\" this.handlePrevMonthClick}}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n\n <div class=\"calendar-title_e7aa819da\" aria-live=\"polite\" data-test-calendar-title>\n {{this.monthYearLabel}}\n </div>\n\n <button type=\"button\" class=\"calendar-nav-button_e7aa819da\" aria-label=\"Next month\" disabled={{not this.canGoToNextMonth}} data-test-calendar-next {{on \"click\" this.handleNextMonthClick}}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </div>\n\n {{!-- Weekday headers --}}\n <div class=\"calendar-weekdays_e7aa819da\" role=\"row\" data-test-calendar-weekdays>\n {{#each this.weekdayLabels as |label|}}\n <div class=\"calendar-weekday_e7aa819da\" role=\"columnheader\">\n {{label}}\n </div>\n {{/each}}\n </div>\n\n {{!-- Day grid --}}\n {{!-- template-lint-disable no-nested-interactive require-valid-alt-text --}}\n <div class=\"calendar-grid_e7aa819da\" role=\"rowgroup\" data-test-calendar-grid>\n {{#each this.weeks as |week|}}\n <div class=\"calendar-week_e7aa819da\" role=\"row\">\n {{#each week as |day|}}\n {{#if (this.shouldShowDay day)}}\n {{#let (this.getDayState day) as |state|}}\n {{!-- template-lint-disable no-invalid-interactive --}}\n <div role=\"gridcell\" id={{this.getDayId day}} class=\"calendar-day_e7aa819da\" aria-selected={{if state.isSelected \"true\" \"false\"}} aria-disabled={{if state.isDisabled \"true\"}} aria-current={{if state.isToday \"date\"}} data-today={{if state.isToday \"true\" \"false\"}} data-selected={{if state.isSelected \"true\" \"false\"}} data-focused={{if state.isFocused \"true\" \"false\"}} data-disabled={{if state.isDisabled \"true\" \"false\"}} data-outside={{if state.isOutsideMonth \"true\" \"false\"}} data-range-start={{if state.isRangeStart \"true\" \"false\"}} data-range-end={{if state.isRangeEnd \"true\" \"false\"}} data-in-range={{if state.isInRange \"true\" \"false\"}} data-test-calendar-day data-test-calendar-day-value={{this.getDayId day}} {{on \"click\" (fn this.handleDayClick day)}} {{on \"mouseenter\" (fn this.handleDayMouseEnter day)}}>\n {{this.getDayNumber day}}\n </div>\n {{/let}}\n {{else}}\n <div class=\"calendar-day_e7aa819da calendar-day-empty_e7aa819da\" role=\"presentation\"></div>\n {{/if}}\n {{/each}}\n </div>\n {{/each}}\n </div>\n</div>", {
|
|
521
|
+
strictMode: true,
|
|
522
|
+
scope: () => ({
|
|
523
|
+
on,
|
|
524
|
+
not,
|
|
525
|
+
fn
|
|
526
|
+
})
|
|
527
|
+
}), this);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export { Calendar as default };
|
|
532
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* src/form/checkbox-group.css */
|
|
2
|
+
.fieldset_e634e725a {
|
|
3
|
+
border: none;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--spacing-1-5);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.legend_e634e725a {
|
|
12
|
+
display: block;
|
|
13
|
+
font-size: var(--font-size-sm);
|
|
14
|
+
font-weight: var(--font-weight-medium);
|
|
15
|
+
color: var(--color-text);
|
|
16
|
+
line-height: var(--line-height-normal);
|
|
17
|
+
margin-bottom: var(--spacing-1-5);
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.required_e634e725a {
|
|
22
|
+
color: var(--color-text-critical);
|
|
23
|
+
margin-left: var(--spacing-0-5);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.description_e634e725a {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-size: var(--font-size-sm);
|
|
29
|
+
line-height: var(--line-height-normal);
|
|
30
|
+
color: var(--color-text-secondary);
|
|
31
|
+
margin-bottom: var(--spacing-1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.options_e634e725a {
|
|
35
|
+
display: flex;
|
|
36
|
+
gap: var(--spacing-4);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.options_e634e725a[data-orientation="vertical"] {
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
gap: var(--spacing-3);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.options_e634e725a[data-orientation="horizontal"] {
|
|
45
|
+
flex-flow: row wrap;
|
|
46
|
+
gap: var(--spacing-6);
|
|
47
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import "./checkbox-group.css"
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { hash } from '@ember/helper';
|
|
7
|
+
import { guidFor } from '@ember/object/internals';
|
|
8
|
+
import Checkbox from './checkbox.js';
|
|
9
|
+
import ErrorMessage from './error-message.js';
|
|
10
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
+
import { setComponentTemplate } from '@ember/component';
|
|
12
|
+
import { g, i, n } from 'decorator-transforms/runtime';
|
|
13
|
+
|
|
14
|
+
;
|
|
15
|
+
|
|
16
|
+
class CheckboxGroup extends Component {
|
|
17
|
+
static {
|
|
18
|
+
g(this.prototype, "internalValues", [tracked]);
|
|
19
|
+
}
|
|
20
|
+
#internalValues = (i(this, "internalValues"), void 0);
|
|
21
|
+
constructor(owner, args) {
|
|
22
|
+
super(owner, args);
|
|
23
|
+
this.internalValues = [...(args.defaultValue ?? [])];
|
|
24
|
+
}
|
|
25
|
+
guid = guidFor(this);
|
|
26
|
+
get isControlled() {
|
|
27
|
+
return this.args.value !== undefined;
|
|
28
|
+
}
|
|
29
|
+
get selectedValues() {
|
|
30
|
+
return this.isControlled ? this.args.value ?? [] : this.internalValues;
|
|
31
|
+
}
|
|
32
|
+
get orientation() {
|
|
33
|
+
return this.args.orientation ?? 'vertical';
|
|
34
|
+
}
|
|
35
|
+
get size() {
|
|
36
|
+
return this.args.size ?? 'md';
|
|
37
|
+
}
|
|
38
|
+
get errorMessageId() {
|
|
39
|
+
return `${this.guid}-error`;
|
|
40
|
+
}
|
|
41
|
+
get ariaDescribedBy() {
|
|
42
|
+
if (this.args.isInvalid) {
|
|
43
|
+
return this.errorMessageId;
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
isValueSelected = value => {
|
|
48
|
+
return this.selectedValues.includes(value);
|
|
49
|
+
};
|
|
50
|
+
handleCheckboxChange(value, isChecked) {
|
|
51
|
+
let newValues;
|
|
52
|
+
if (isChecked) {
|
|
53
|
+
newValues = [...this.selectedValues, value];
|
|
54
|
+
} else {
|
|
55
|
+
newValues = this.selectedValues.filter(v => v !== value);
|
|
56
|
+
}
|
|
57
|
+
if (!this.isControlled) {
|
|
58
|
+
this.internalValues = newValues;
|
|
59
|
+
}
|
|
60
|
+
this.args.onChange?.(newValues);
|
|
61
|
+
}
|
|
62
|
+
static {
|
|
63
|
+
n(this.prototype, "handleCheckboxChange", [action]);
|
|
64
|
+
}
|
|
65
|
+
static {
|
|
66
|
+
setComponentTemplate(precompileTemplate("<fieldset class=\"fieldset_e634e725a\" aria-describedby={{this.ariaDescribedBy}} data-test-checkbox-group ...attributes>\n {{#if @label}}\n <legend class=\"legend_e634e725a\" data-test-checkbox-group-legend>\n {{@label}}\n {{#if @isRequired}}\n <span class=\"required_e634e725a\">*</span>\n {{/if}}\n </legend>\n {{/if}}\n\n {{#if @description}}\n <p class=\"description_e634e725a\" data-test-checkbox-group-description>\n {{@description}}\n </p>\n {{/if}}\n\n <div class=\"options_e634e725a\" data-orientation={{this.orientation}} data-test-checkbox-group-options>\n {{yield (hash Checkbox=(component ContextualCheckbox groupName=@name groupDisabled=@isDisabled groupInvalid=@isInvalid groupSize=this.size isValueSelected=this.isValueSelected onCheckboxChange=this.handleCheckboxChange) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=@isInvalid))}}\n </div>\n</fieldset>", {
|
|
67
|
+
strictMode: true,
|
|
68
|
+
scope: () => ({
|
|
69
|
+
hash,
|
|
70
|
+
ContextualCheckbox,
|
|
71
|
+
ErrorMessage
|
|
72
|
+
})
|
|
73
|
+
}), this);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class ContextualCheckbox extends Component {
|
|
77
|
+
get isChecked() {
|
|
78
|
+
return this.args.isValueSelected(this.args.value);
|
|
79
|
+
}
|
|
80
|
+
get isDisabled() {
|
|
81
|
+
return this.args.isDisabled ?? this.args.groupDisabled ?? false;
|
|
82
|
+
}
|
|
83
|
+
handleChange(event) {
|
|
84
|
+
const target = event.target;
|
|
85
|
+
this.args.onCheckboxChange(this.args.value, target.checked);
|
|
86
|
+
}
|
|
87
|
+
static {
|
|
88
|
+
n(this.prototype, "handleChange", [action]);
|
|
89
|
+
}
|
|
90
|
+
static {
|
|
91
|
+
setComponentTemplate(precompileTemplate("{{!-- Wrapper captures bubbling change event from checkbox input --}}\n<span {{on \"change\" this.handleChange}} data-test-checkbox-group-item>\n {{#if (has-block)}}\n <Checkbox @isChecked={{this.isChecked}} @value={{@value}} @name={{@groupName}} @label={{@label}} @description={{@description}} @isDisabled={{this.isDisabled}} @isInvalid={{@groupInvalid}} @size={{@groupSize}} ...attributes>\n {{yield}}\n </Checkbox>\n {{else}}\n <Checkbox @isChecked={{this.isChecked}} @value={{@value}} @name={{@groupName}} @label={{@label}} @description={{@description}} @isDisabled={{this.isDisabled}} @isInvalid={{@groupInvalid}} @size={{@groupSize}} ...attributes />\n {{/if}}\n</span>", {
|
|
92
|
+
strictMode: true,
|
|
93
|
+
scope: () => ({
|
|
94
|
+
on,
|
|
95
|
+
Checkbox
|
|
96
|
+
})
|
|
97
|
+
}), this);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { CheckboxGroup as default };
|
|
102
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|