frontile 0.18.0-beta.1 → 0.18.0-beta.3
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/declarations/-private/control-blur.d.ts +1 -0
- package/declarations/-private/control-blur.d.ts.map +1 -0
- package/declarations/-private/deprecated-args.d.ts +19 -0
- package/declarations/-private/deprecated-args.d.ts.map +1 -0
- package/declarations/-private/dialog.d.ts +1 -0
- package/declarations/-private/dialog.d.ts.map +1 -0
- package/declarations/-private/dom.d.ts +1 -0
- package/declarations/-private/dom.d.ts.map +1 -0
- package/declarations/-private/get-config.d.ts +1 -0
- package/declarations/-private/get-config.d.ts.map +1 -0
- package/declarations/-private/icons.d.ts +23 -0
- package/declarations/-private/icons.d.ts.map +1 -0
- package/declarations/-private/manager.d.ts +1 -0
- package/declarations/-private/manager.d.ts.map +1 -0
- package/declarations/-private/notification-stack.d.ts +1 -0
- package/declarations/-private/notification-stack.d.ts.map +1 -0
- package/declarations/-private/notification.d.ts +5 -4
- package/declarations/-private/notification.d.ts.map +1 -0
- package/declarations/-private/timer.d.ts +1 -0
- package/declarations/-private/timer.d.ts.map +1 -0
- package/declarations/-private/types.d.ts +11 -8
- package/declarations/-private/types.d.ts.map +1 -0
- package/declarations/buttons.d.ts +1 -0
- package/declarations/buttons.d.ts.map +1 -0
- package/declarations/collections.d.ts +1 -0
- package/declarations/collections.d.ts.map +1 -0
- package/declarations/components/buttons/button-group.d.ts +4 -1
- package/declarations/components/buttons/button-group.d.ts.map +1 -0
- package/declarations/components/buttons/button.d.ts +13 -3
- package/declarations/components/buttons/button.d.ts.map +1 -0
- package/declarations/components/buttons/chip.d.ts +16 -8
- package/declarations/components/buttons/chip.d.ts.map +1 -0
- package/declarations/components/buttons/close-button.d.ts +6 -2
- package/declarations/components/buttons/close-button.d.ts.map +1 -0
- package/declarations/components/buttons/index.d.ts +1 -0
- package/declarations/components/buttons/index.d.ts.map +1 -0
- package/declarations/components/buttons/segmented-control/item.d.ts +1 -0
- package/declarations/components/buttons/segmented-control/item.d.ts.map +1 -0
- package/declarations/components/buttons/segmented-control/segmented-control.d.ts +21 -10
- package/declarations/components/buttons/segmented-control/segmented-control.d.ts.map +1 -0
- package/declarations/components/buttons/segmented-control.d.ts +1 -0
- package/declarations/components/buttons/segmented-control.d.ts.map +1 -0
- package/declarations/components/buttons/toggle-button.d.ts +10 -1
- package/declarations/components/buttons/toggle-button.d.ts.map +1 -0
- package/declarations/components/collections/calendar/calendar.d.ts +58 -61
- package/declarations/components/collections/calendar/calendar.d.ts.map +1 -0
- package/declarations/components/collections/calendar/day-cell.d.ts +1 -0
- package/declarations/components/collections/calendar/day-cell.d.ts.map +1 -0
- package/declarations/components/collections/calendar/header.d.ts +1 -0
- package/declarations/components/collections/calendar/header.d.ts.map +1 -0
- package/declarations/components/collections/calendar/month-grid.d.ts +1 -0
- package/declarations/components/collections/calendar/month-grid.d.ts.map +1 -0
- package/declarations/components/collections/calendar/types.d.ts +1 -0
- package/declarations/components/collections/calendar/types.d.ts.map +1 -0
- package/declarations/components/collections/calendar/utils.d.ts +2 -0
- package/declarations/components/collections/calendar/utils.d.ts.map +1 -0
- package/declarations/components/collections/calendar/year-grid.d.ts +1 -0
- package/declarations/components/collections/calendar/year-grid.d.ts.map +1 -0
- package/declarations/components/collections/calendar.d.ts +1 -0
- package/declarations/components/collections/calendar.d.ts.map +1 -0
- package/declarations/components/collections/command/command.d.ts +2 -11
- package/declarations/components/collections/command/command.d.ts.map +1 -0
- package/declarations/components/collections/command/dialog.d.ts +1 -0
- package/declarations/components/collections/command/dialog.d.ts.map +1 -0
- package/declarations/components/collections/command/footer.d.ts +1 -0
- package/declarations/components/collections/command/footer.d.ts.map +1 -0
- package/declarations/components/collections/command/index.d.ts +1 -0
- package/declarations/components/collections/command/index.d.ts.map +1 -0
- package/declarations/components/collections/command/input.d.ts +7 -1
- package/declarations/components/collections/command/input.d.ts.map +1 -0
- package/declarations/components/collections/command/list.d.ts +4 -0
- package/declarations/components/collections/command/list.d.ts.map +1 -0
- package/declarations/components/collections/command.d.ts +1 -0
- package/declarations/components/collections/command.d.ts.map +1 -0
- package/declarations/components/collections/dropdown/dropdown.d.ts +74 -4
- package/declarations/components/collections/dropdown/dropdown.d.ts.map +1 -0
- package/declarations/components/collections/dropdown/menu-context.d.ts +34 -7
- package/declarations/components/collections/dropdown/menu-context.d.ts.map +1 -0
- package/declarations/components/collections/dropdown/sub.d.ts +4 -8
- package/declarations/components/collections/dropdown/sub.d.ts.map +1 -0
- package/declarations/components/collections/dropdown.d.ts +1 -0
- package/declarations/components/collections/dropdown.d.ts.map +1 -0
- package/declarations/components/collections/index.d.ts +1 -0
- package/declarations/components/collections/index.d.ts.map +1 -0
- package/declarations/components/collections/listbox/group.d.ts +8 -2
- package/declarations/components/collections/listbox/group.d.ts.map +1 -0
- package/declarations/components/collections/listbox/item.d.ts +49 -7
- package/declarations/components/collections/listbox/item.d.ts.map +1 -0
- package/declarations/components/collections/listbox/listbox.d.ts +32 -4
- package/declarations/components/collections/listbox/listbox.d.ts.map +1 -0
- package/declarations/components/collections/listbox.d.ts +1 -0
- package/declarations/components/collections/listbox.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/body.d.ts +118 -103
- package/declarations/components/collections/simple-table/body.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/cell.d.ts +118 -103
- package/declarations/components/collections/simple-table/cell.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/column.d.ts +118 -103
- package/declarations/components/collections/simple-table/column.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/footer.d.ts +118 -103
- package/declarations/components/collections/simple-table/footer.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/header.d.ts +118 -103
- package/declarations/components/collections/simple-table/header.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/index.d.ts +118 -103
- package/declarations/components/collections/simple-table/index.d.ts.map +1 -0
- package/declarations/components/collections/simple-table/row.d.ts +118 -103
- package/declarations/components/collections/simple-table/row.d.ts.map +1 -0
- package/declarations/components/collections/table/cell-default.d.ts +1 -0
- package/declarations/components/collections/table/cell-default.d.ts.map +1 -0
- package/declarations/components/collections/table/cell-for.d.ts +1 -0
- package/declarations/components/collections/table/cell-for.d.ts.map +1 -0
- package/declarations/components/collections/table/cell-rendering-context.d.ts +1 -0
- package/declarations/components/collections/table/cell-rendering-context.d.ts.map +1 -0
- package/declarations/components/collections/table/checkbox.d.ts +6 -1
- package/declarations/components/collections/table/checkbox.d.ts.map +1 -0
- package/declarations/components/collections/table/column-visibility.d.ts +119 -104
- package/declarations/components/collections/table/column-visibility.d.ts.map +1 -0
- package/declarations/components/collections/table/index.d.ts +1 -0
- package/declarations/components/collections/table/index.d.ts.map +1 -0
- package/declarations/components/collections/table/sort-button.d.ts +118 -103
- package/declarations/components/collections/table/sort-button.d.ts.map +1 -0
- package/declarations/components/collections/table/table.d.ts +118 -103
- package/declarations/components/collections/table/table.d.ts.map +1 -0
- package/declarations/components/collections/table/types.d.ts +1 -0
- package/declarations/components/collections/table/types.d.ts.map +1 -0
- package/declarations/components/collections/table/utils.d.ts +1 -0
- package/declarations/components/collections/table/utils.d.ts.map +1 -0
- package/declarations/components/collections/table.d.ts +1 -0
- package/declarations/components/collections/table.d.ts.map +1 -0
- package/declarations/components/disclosure/accordion/accordion.d.ts +31 -24
- package/declarations/components/disclosure/accordion/accordion.d.ts.map +1 -0
- package/declarations/components/disclosure/accordion/item.d.ts +1 -0
- package/declarations/components/disclosure/accordion/item.d.ts.map +1 -0
- package/declarations/components/disclosure/accordion.d.ts +1 -0
- package/declarations/components/disclosure/accordion.d.ts.map +1 -0
- package/declarations/components/disclosure/index.d.ts +1 -0
- package/declarations/components/disclosure/index.d.ts.map +1 -0
- package/declarations/components/forms/autocomplete.d.ts +36 -34
- package/declarations/components/forms/autocomplete.d.ts.map +1 -0
- package/declarations/components/forms/checkbox-group.d.ts +8 -1
- package/declarations/components/forms/checkbox-group.d.ts.map +1 -0
- package/declarations/components/forms/checkbox.d.ts +6 -1
- package/declarations/components/forms/checkbox.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/date-picker.d.ts +258 -0
- package/declarations/components/forms/date-picker/date-picker.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/end-content.d.ts +30 -0
- package/declarations/components/forms/date-picker/end-content.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/trigger.d.ts +41 -0
- package/declarations/components/forms/date-picker/trigger.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/types.d.ts +150 -0
- package/declarations/components/forms/date-picker/types.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/value.d.ts +44 -0
- package/declarations/components/forms/date-picker/value.d.ts.map +1 -0
- package/declarations/components/forms/date-picker.d.ts +4 -0
- package/declarations/components/forms/date-picker.d.ts.map +1 -0
- package/declarations/components/forms/field-types.d.ts +2 -1
- package/declarations/components/forms/field-types.d.ts.map +1 -0
- package/declarations/components/forms/field.d.ts +6 -0
- package/declarations/components/forms/field.d.ts.map +1 -0
- package/declarations/components/forms/form-control.d.ts +2 -1
- package/declarations/components/forms/form-control.d.ts.map +1 -0
- package/declarations/components/forms/form-description.d.ts +1 -0
- package/declarations/components/forms/form-description.d.ts.map +1 -0
- package/declarations/components/forms/form-feedback.d.ts +18 -2
- package/declarations/components/forms/form-feedback.d.ts.map +1 -0
- package/declarations/components/forms/form.d.ts +2 -11
- package/declarations/components/forms/form.d.ts.map +1 -0
- package/declarations/components/forms/icons.d.ts +4 -1
- package/declarations/components/forms/index.d.ts +3 -0
- package/declarations/components/forms/index.d.ts.map +1 -0
- package/declarations/components/forms/input-otp.d.ts +10 -12
- package/declarations/components/forms/input-otp.d.ts.map +1 -0
- package/declarations/components/forms/input.d.ts +21 -21
- package/declarations/components/forms/input.d.ts.map +1 -0
- package/declarations/components/forms/label.d.ts +6 -1
- package/declarations/components/forms/label.d.ts.map +1 -0
- package/declarations/components/forms/native-select.d.ts +17 -7
- package/declarations/components/forms/native-select.d.ts.map +1 -0
- package/declarations/components/forms/radio-group.d.ts +8 -1
- package/declarations/components/forms/radio-group.d.ts.map +1 -0
- package/declarations/components/forms/radio.d.ts +6 -1
- package/declarations/components/forms/radio.d.ts.map +1 -0
- package/declarations/components/forms/select/end-content.d.ts +1 -0
- package/declarations/components/forms/select/end-content.d.ts.map +1 -0
- package/declarations/components/forms/select/native-mirror.d.ts +1 -0
- package/declarations/components/forms/select/native-mirror.d.ts.map +1 -0
- package/declarations/components/forms/select/select.d.ts +44 -50
- package/declarations/components/forms/select/select.d.ts.map +1 -0
- package/declarations/components/forms/select/selected-items.d.ts +1 -0
- package/declarations/components/forms/select/selected-items.d.ts.map +1 -0
- package/declarations/components/forms/select/trigger.d.ts +1 -0
- package/declarations/components/forms/select/trigger.d.ts.map +1 -0
- package/declarations/components/forms/select/types.d.ts +43 -12
- package/declarations/components/forms/select/types.d.ts.map +1 -0
- package/declarations/components/forms/select.d.ts +1 -0
- package/declarations/components/forms/select.d.ts.map +1 -0
- package/declarations/components/forms/switch.d.ts +30 -19
- package/declarations/components/forms/switch.d.ts.map +1 -0
- package/declarations/components/forms/textarea.d.ts +16 -6
- package/declarations/components/forms/textarea.d.ts.map +1 -0
- package/declarations/components/navigation/external-link.d.ts +2 -1
- package/declarations/components/navigation/external-link.d.ts.map +1 -0
- package/declarations/components/navigation/index.d.ts +1 -0
- package/declarations/components/navigation/index.d.ts.map +1 -0
- package/declarations/components/navigation/pagination/pagination.d.ts +26 -19
- package/declarations/components/navigation/pagination/pagination.d.ts.map +1 -0
- package/declarations/components/navigation/pagination/range.d.ts +1 -0
- package/declarations/components/navigation/pagination/range.d.ts.map +1 -0
- package/declarations/components/navigation/pagination.d.ts +1 -0
- package/declarations/components/navigation/pagination.d.ts.map +1 -0
- package/declarations/components/navigation/tab-nav/item.d.ts +1 -0
- package/declarations/components/navigation/tab-nav/item.d.ts.map +1 -0
- package/declarations/components/navigation/tab-nav/tab-nav.d.ts +23 -13
- package/declarations/components/navigation/tab-nav/tab-nav.d.ts.map +1 -0
- package/declarations/components/navigation/tab-nav.d.ts +1 -0
- package/declarations/components/navigation/tab-nav.d.ts.map +1 -0
- package/declarations/components/navigation/tabs/panel.d.ts +1 -0
- package/declarations/components/navigation/tabs/panel.d.ts.map +1 -0
- package/declarations/components/navigation/tabs/tab.d.ts +1 -0
- package/declarations/components/navigation/tabs/tab.d.ts.map +1 -0
- package/declarations/components/navigation/tabs/tabs.d.ts +23 -13
- package/declarations/components/navigation/tabs/tabs.d.ts.map +1 -0
- package/declarations/components/navigation/tabs.d.ts +1 -0
- package/declarations/components/navigation/tabs.d.ts.map +1 -0
- package/declarations/components/notifications/index.d.ts +3 -2
- package/declarations/components/notifications/index.d.ts.map +1 -0
- package/declarations/components/notifications/notification-card.d.ts +7 -8
- package/declarations/components/notifications/notification-card.d.ts.map +1 -0
- package/declarations/components/notifications/notifications-container.d.ts +3 -2
- package/declarations/components/notifications/notifications-container.d.ts.map +1 -0
- package/declarations/components/overlays/backdrop.d.ts +1 -0
- package/declarations/components/overlays/backdrop.d.ts.map +1 -0
- package/declarations/components/overlays/drawer/body.d.ts +1 -0
- package/declarations/components/overlays/drawer/body.d.ts.map +1 -0
- package/declarations/components/overlays/drawer/drag-handle.d.ts +1 -0
- package/declarations/components/overlays/drawer/drag-handle.d.ts.map +1 -0
- package/declarations/components/overlays/drawer/footer.d.ts +1 -0
- package/declarations/components/overlays/drawer/footer.d.ts.map +1 -0
- package/declarations/components/overlays/drawer/header.d.ts +1 -0
- package/declarations/components/overlays/drawer/header.d.ts.map +1 -0
- package/declarations/components/overlays/drawer/selectors.d.ts +1 -0
- package/declarations/components/overlays/drawer/selectors.d.ts.map +1 -0
- package/declarations/components/overlays/drawer.d.ts +94 -86
- package/declarations/components/overlays/drawer.d.ts.map +1 -0
- package/declarations/components/overlays/index.d.ts +1 -0
- package/declarations/components/overlays/index.d.ts.map +1 -0
- package/declarations/components/overlays/modal/body.d.ts +1 -0
- package/declarations/components/overlays/modal/body.d.ts.map +1 -0
- package/declarations/components/overlays/modal/footer.d.ts +1 -0
- package/declarations/components/overlays/modal/footer.d.ts.map +1 -0
- package/declarations/components/overlays/modal/header.d.ts +1 -0
- package/declarations/components/overlays/modal/header.d.ts.map +1 -0
- package/declarations/components/overlays/modal.d.ts +18 -12
- package/declarations/components/overlays/modal.d.ts.map +1 -0
- package/declarations/components/overlays/mount-animation.d.ts +1 -0
- package/declarations/components/overlays/mount-animation.d.ts.map +1 -0
- package/declarations/components/overlays/overlay.d.ts +14 -0
- package/declarations/components/overlays/overlay.d.ts.map +1 -0
- package/declarations/components/overlays/popover.d.ts +2 -1
- package/declarations/components/overlays/popover.d.ts.map +1 -0
- package/declarations/components/overlays/portal-target.d.ts +1 -0
- package/declarations/components/overlays/portal-target.d.ts.map +1 -0
- package/declarations/components/overlays/portal.d.ts +1 -0
- package/declarations/components/overlays/portal.d.ts.map +1 -0
- package/declarations/components/overlays/tooltip.d.ts +3 -2
- package/declarations/components/overlays/tooltip.d.ts.map +1 -0
- package/declarations/components/status/alert.d.ts +12 -13
- package/declarations/components/status/alert.d.ts.map +1 -0
- package/declarations/components/status/index.d.ts +1 -0
- package/declarations/components/status/index.d.ts.map +1 -0
- package/declarations/components/status/progress-bar.d.ts +6 -1
- package/declarations/components/status/progress-bar.d.ts.map +1 -0
- package/declarations/components/utilities/avatar.d.ts +13 -7
- package/declarations/components/utilities/avatar.d.ts.map +1 -0
- package/declarations/components/utilities/collapsible.d.ts +1 -0
- package/declarations/components/utilities/collapsible.d.ts.map +1 -0
- package/declarations/components/utilities/divider.d.ts +12 -0
- package/declarations/components/utilities/divider.d.ts.map +1 -0
- package/declarations/components/utilities/index.d.ts +1 -0
- package/declarations/components/utilities/index.d.ts.map +1 -0
- package/declarations/components/utilities/kbd.d.ts +5 -4
- package/declarations/components/utilities/kbd.d.ts.map +1 -0
- package/declarations/components/utilities/skeleton.d.ts +1 -0
- package/declarations/components/utilities/skeleton.d.ts.map +1 -0
- package/declarations/components/utilities/spinner.d.ts +15 -7
- package/declarations/components/utilities/spinner.d.ts.map +1 -0
- package/declarations/components/utilities/visually-hidden.d.ts +1 -0
- package/declarations/components/utilities/visually-hidden.d.ts.map +1 -0
- package/declarations/disclosure.d.ts +1 -0
- package/declarations/disclosure.d.ts.map +1 -0
- package/declarations/forms.d.ts +1 -0
- package/declarations/forms.d.ts.map +1 -0
- package/declarations/index.d.ts +2 -1
- package/declarations/index.d.ts.map +1 -0
- package/declarations/modifiers/drag-to-dismiss.d.ts +1 -0
- package/declarations/modifiers/drag-to-dismiss.d.ts.map +1 -0
- package/declarations/modifiers/press.d.ts +1 -0
- package/declarations/modifiers/press.d.ts.map +1 -0
- package/declarations/navigation.d.ts +1 -0
- package/declarations/navigation.d.ts.map +1 -0
- package/declarations/notifications.d.ts +1 -0
- package/declarations/notifications.d.ts.map +1 -0
- package/declarations/overlays.d.ts +1 -0
- package/declarations/overlays.d.ts.map +1 -0
- package/declarations/services/notifications.d.ts +1 -0
- package/declarations/services/notifications.d.ts.map +1 -0
- package/declarations/status.d.ts +1 -0
- package/declarations/status.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +2 -1
- package/declarations/test-support.d.ts +1 -0
- package/declarations/test-support.d.ts.map +1 -0
- package/declarations/utilities.d.ts +1 -0
- package/declarations/utilities.d.ts.map +1 -0
- package/declarations/utils/deferred-work.d.ts +1 -0
- package/declarations/utils/deferred-work.d.ts.map +1 -0
- package/declarations/utils/filter.d.ts +1 -0
- package/declarations/utils/filter.d.ts.map +1 -0
- package/declarations/utils/forms-utils-index.d.ts +1 -0
- package/declarations/utils/forms-utils-index.d.ts.map +1 -0
- package/declarations/utils/keys.d.ts +1 -0
- package/declarations/utils/keys.d.ts.map +1 -0
- package/declarations/utils/listManager.d.ts +22 -0
- package/declarations/utils/listManager.d.ts.map +1 -0
- package/declarations/utils/nested-data.d.ts +1 -0
- package/declarations/utils/nested-data.d.ts.map +1 -0
- package/declarations/utils/prefers-reduced-motion.d.ts +1 -0
- package/declarations/utils/prefers-reduced-motion.d.ts.map +1 -0
- package/declarations/utils/ref.d.ts +2 -1
- package/declarations/utils/ref.d.ts.map +1 -0
- package/declarations/utils/roving-focus.d.ts +1 -0
- package/declarations/utils/roving-focus.d.ts.map +1 -0
- package/declarations/utils/safe-area.d.ts +1 -0
- package/declarations/utils/safe-area.d.ts.map +1 -0
- package/declarations/utils/safe-styles.d.ts +1 -0
- package/declarations/utils/safe-styles.d.ts.map +1 -0
- package/declarations/utils/selection-indicator.d.ts +1 -0
- package/declarations/utils/selection-indicator.d.ts.map +1 -0
- package/declarations/utils/standard-validator.d.ts +1 -0
- package/declarations/utils/standard-validator.d.ts.map +1 -0
- package/declarations/utils/toggle.d.ts +1 -0
- package/declarations/utils/toggle.d.ts.map +1 -0
- package/dist/components/buttons/button-group.js +26 -1
- package/dist/components/buttons/button-group.js.map +1 -1
- package/dist/components/buttons/button.js +21 -2
- package/dist/components/buttons/button.js.map +1 -1
- package/dist/components/buttons/chip.js +19 -2
- package/dist/components/buttons/chip.js.map +1 -1
- package/dist/components/buttons/close-button.js +18 -2
- package/dist/components/buttons/close-button.js.map +1 -1
- package/dist/components/buttons/segmented-control/item.js.map +1 -1
- package/dist/components/buttons/segmented-control/segmented-control.js +1 -1
- package/dist/components/buttons/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/buttons/toggle-button.js +36 -2
- package/dist/components/buttons/toggle-button.js.map +1 -1
- package/dist/components/collections/calendar/calendar.js +36 -3
- package/dist/components/collections/calendar/calendar.js.map +1 -1
- package/dist/components/collections/calendar/day-cell.js.map +1 -1
- package/dist/components/collections/calendar/header.js +1 -2
- package/dist/components/collections/calendar/header.js.map +1 -1
- package/dist/components/collections/calendar/month-grid.js.map +1 -1
- package/dist/components/collections/calendar/utils.js +1 -1
- package/dist/components/collections/calendar/utils.js.map +1 -1
- package/dist/components/collections/calendar/year-grid.js.map +1 -1
- package/dist/components/collections/command/command.js.map +1 -1
- package/dist/components/collections/command/dialog.js +0 -1
- package/dist/components/collections/command/dialog.js.map +1 -1
- package/dist/components/collections/command/footer.js +1 -1
- package/dist/components/collections/command/footer.js.map +1 -1
- package/dist/components/collections/command/input.js.map +1 -1
- package/dist/components/collections/command/list.js +1 -1
- package/dist/components/collections/command/list.js.map +1 -1
- package/dist/components/collections/dropdown/dropdown.js +114 -11
- package/dist/components/collections/dropdown/dropdown.js.map +1 -1
- package/dist/components/collections/dropdown/menu-context.js +52 -1
- package/dist/components/collections/dropdown/menu-context.js.map +1 -1
- package/dist/components/collections/dropdown/sub.js +2 -9
- package/dist/components/collections/dropdown/sub.js.map +1 -1
- package/dist/components/collections/listbox/group.js +1 -1
- package/dist/components/collections/listbox/group.js.map +1 -1
- package/dist/components/collections/listbox/item.js +78 -13
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/listbox/listbox.js +53 -2
- package/dist/components/collections/listbox/listbox.js.map +1 -1
- package/dist/components/collections/simple-table/body.js.map +1 -1
- package/dist/components/collections/simple-table/cell.js.map +1 -1
- package/dist/components/collections/simple-table/column.js.map +1 -1
- package/dist/components/collections/simple-table/footer.js.map +1 -1
- package/dist/components/collections/simple-table/header.js.map +1 -1
- package/dist/components/collections/simple-table/index.js.map +1 -1
- package/dist/components/collections/simple-table/row.js.map +1 -1
- package/dist/components/collections/table/cell-default.js.map +1 -1
- package/dist/components/collections/table/cell-for.js.map +1 -1
- package/dist/components/collections/table/cell-rendering-context.js.map +1 -1
- package/dist/components/collections/table/checkbox.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +2 -2
- package/dist/components/collections/table/column-visibility.js.map +1 -1
- package/dist/components/collections/table/sort-button.js +1 -1
- package/dist/components/collections/table/sort-button.js.map +1 -1
- package/dist/components/collections/table/table.js +1 -2
- package/dist/components/collections/table/table.js.map +1 -1
- package/dist/components/collections/table/utils.js.map +1 -1
- package/dist/components/disclosure/accordion/accordion.js.map +1 -1
- package/dist/components/disclosure/accordion/item.js +1 -1
- package/dist/components/disclosure/accordion/item.js.map +1 -1
- package/dist/components/forms/autocomplete.js +48 -3
- package/dist/components/forms/autocomplete.js.map +1 -1
- package/dist/components/forms/checkbox-group.js.map +1 -1
- package/dist/components/forms/checkbox.js.map +1 -1
- package/dist/components/forms/date-picker/date-picker.js +301 -0
- package/dist/components/forms/date-picker/date-picker.js.map +1 -0
- package/dist/components/forms/date-picker/end-content.js +21 -0
- package/dist/components/forms/date-picker/end-content.js.map +1 -0
- package/dist/components/forms/date-picker/trigger.js +14 -0
- package/dist/components/forms/date-picker/trigger.js.map +1 -0
- package/dist/components/forms/date-picker/types.js +2 -0
- package/dist/components/forms/date-picker/types.js.map +1 -0
- package/dist/components/forms/date-picker/value.js +97 -0
- package/dist/components/forms/date-picker/value.js.map +1 -0
- package/dist/components/forms/date-picker.js +2 -0
- package/dist/components/forms/date-picker.js.map +1 -0
- package/dist/components/forms/field.js +3 -1
- package/dist/components/forms/field.js.map +1 -1
- package/dist/components/forms/form-control.js +1 -1
- package/dist/components/forms/form-control.js.map +1 -1
- package/dist/components/forms/form-description.js.map +1 -1
- package/dist/components/forms/form-feedback.js +25 -2
- package/dist/components/forms/form-feedback.js.map +1 -1
- package/dist/components/forms/form.js.map +1 -1
- package/dist/components/forms/index.js +2 -0
- package/dist/components/forms/index.js.map +1 -1
- package/dist/components/forms/input-otp.js.map +1 -1
- package/dist/components/forms/input.js +1 -1
- package/dist/components/forms/input.js.map +1 -1
- package/dist/components/forms/label.js.map +1 -1
- package/dist/components/forms/native-select.js +2 -2
- package/dist/components/forms/native-select.js.map +1 -1
- package/dist/components/forms/radio-group.js.map +1 -1
- package/dist/components/forms/radio.js.map +1 -1
- package/dist/components/forms/select/end-content.js +2 -2
- package/dist/components/forms/select/end-content.js.map +1 -1
- package/dist/components/forms/select/native-mirror.js.map +1 -1
- package/dist/components/forms/select/select.js +61 -7
- package/dist/components/forms/select/select.js.map +1 -1
- package/dist/components/forms/select/selected-items.js +1 -1
- package/dist/components/forms/select/selected-items.js.map +1 -1
- package/dist/components/forms/select/trigger.js.map +1 -1
- package/dist/components/forms/switch.js +9 -1
- package/dist/components/forms/switch.js.map +1 -1
- package/dist/components/forms/textarea.js.map +1 -1
- package/dist/components/navigation/external-link.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +2 -2
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/pagination/range.js.map +1 -1
- package/dist/components/navigation/tab-nav/item.js.map +1 -1
- package/dist/components/navigation/tab-nav/tab-nav.js +1 -1
- package/dist/components/navigation/tab-nav/tab-nav.js.map +1 -1
- package/dist/components/navigation/tabs/panel.js.map +1 -1
- package/dist/components/navigation/tabs/tab.js.map +1 -1
- package/dist/components/navigation/tabs/tabs.js +1 -1
- package/dist/components/navigation/tabs/tabs.js.map +1 -1
- package/dist/components/notifications/index.js +2 -2
- package/dist/components/notifications/notification-card.js +2 -2
- package/dist/components/notifications/notifications-container.js +1 -1
- package/dist/components/notifications/notifications-container.js.map +1 -1
- package/dist/components/overlays/backdrop.js +1 -1
- package/dist/components/overlays/backdrop.js.map +1 -1
- package/dist/components/overlays/drawer/body.js.map +1 -1
- package/dist/components/overlays/drawer/drag-handle.js.map +1 -1
- package/dist/components/overlays/drawer/footer.js.map +1 -1
- package/dist/components/overlays/drawer/header.js.map +1 -1
- package/dist/components/overlays/drawer/selectors.js.map +1 -1
- package/dist/components/overlays/drawer.js +4 -4
- package/dist/components/overlays/drawer.js.map +1 -1
- package/dist/components/overlays/modal/body.js.map +1 -1
- package/dist/components/overlays/modal/footer.js.map +1 -1
- package/dist/components/overlays/modal/header.js.map +1 -1
- package/dist/components/overlays/modal.js +1 -1
- package/dist/components/overlays/modal.js.map +1 -1
- package/dist/components/overlays/mount-animation.js.map +1 -1
- package/dist/components/overlays/overlay.js +52 -3
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/overlays/popover.js +2 -2
- package/dist/components/overlays/popover.js.map +1 -1
- package/dist/components/overlays/portal-target.js.map +1 -1
- package/dist/components/overlays/portal.js.map +1 -1
- package/dist/components/overlays/tooltip.js +1 -1
- package/dist/components/overlays/tooltip.js.map +1 -1
- package/dist/components/status/alert.js +29 -20
- package/dist/components/status/alert.js.map +1 -1
- package/dist/components/status/progress-bar.js +9 -1
- package/dist/components/status/progress-bar.js.map +1 -1
- package/dist/components/utilities/avatar.js.map +1 -1
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/components/utilities/divider.js +1 -1
- package/dist/components/utilities/divider.js.map +1 -1
- package/dist/components/utilities/index.js +1 -1
- package/dist/components/utilities/kbd.js +2 -2
- package/dist/components/utilities/kbd.js.map +1 -1
- package/dist/components/utilities/skeleton.js.map +1 -1
- package/dist/components/utilities/spinner.js +26 -7
- package/dist/components/utilities/spinner.js.map +1 -1
- package/dist/components/utilities/visually-hidden.js.map +1 -1
- package/dist/control-blur-C8OnSQR5.js.map +1 -1
- package/dist/deprecated-args-BIUjLA8y.js +32 -0
- package/dist/deprecated-args-BIUjLA8y.js.map +1 -0
- package/dist/dialog-CreV7aPQ.js.map +1 -1
- package/dist/dom-cKWVvtkd.js.map +1 -1
- package/dist/forms.js +2 -0
- package/dist/forms.js.map +1 -1
- package/dist/icons-DZ61nCzv.js +51 -0
- package/dist/icons-DZ61nCzv.js.map +1 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/{manager-CDIZzrQ9.js → manager-jDaRVZ5o.js} +28 -24
- package/dist/manager-jDaRVZ5o.js.map +1 -0
- package/dist/modifiers/drag-to-dismiss.js.map +1 -1
- package/dist/modifiers/press.js.map +1 -1
- package/dist/{notification-card-BHTra4Zh.js → notification-card-dz-eE6z9.js} +26 -23
- package/dist/notification-card-dz-eE6z9.js.map +1 -0
- package/dist/notifications.js +2 -2
- package/dist/runtime--fcdnjmJ-BOdRhmsS.js.map +1 -1
- package/dist/services/notifications.js +1 -1
- package/dist/services/notifications.js.map +1 -1
- package/dist/test-support.js.map +1 -1
- package/dist/utilities.js +1 -1
- package/dist/utils/deferred-work.js.map +1 -1
- package/dist/utils/filter.js.map +1 -1
- package/dist/utils/forms-utils-index.js.map +1 -1
- package/dist/utils/keys.js.map +1 -1
- package/dist/utils/listManager.js +34 -4
- package/dist/utils/listManager.js.map +1 -1
- package/dist/utils/nested-data.js.map +1 -1
- package/dist/utils/prefers-reduced-motion.js.map +1 -1
- package/dist/utils/ref.js +1 -1
- package/dist/utils/ref.js.map +1 -1
- package/dist/utils/roving-focus.js.map +1 -1
- package/dist/utils/safe-area.js.map +1 -1
- package/dist/utils/safe-styles.js.map +1 -1
- package/dist/utils/selection-indicator.js.map +1 -1
- package/dist/utils/standard-validator.js.map +1 -1
- package/dist/utils/toggle.js.map +1 -1
- package/package.json +23 -24
- package/dist/components/collections/calendar/icons.js +0 -23
- package/dist/components/collections/calendar/icons.js.map +0 -1
- package/dist/components/collections/table/icons.js +0 -19
- package/dist/components/collections/table/icons.js.map +0 -1
- package/dist/components/disclosure/icons.js +0 -13
- package/dist/components/disclosure/icons.js.map +0 -1
- package/dist/components/forms/icons.js +0 -13
- package/dist/components/forms/icons.js.map +0 -1
- package/dist/components/navigation/pagination/icons.js +0 -23
- package/dist/components/navigation/pagination/icons.js.map +0 -1
- package/dist/intent-icons-DpEViO8C.js +0 -19
- package/dist/intent-icons-DpEViO8C.js.map +0 -1
- package/dist/manager-CDIZzrQ9.js.map +0 -1
- package/dist/notification-card-BHTra4Zh.js.map +0 -1
- package/dist/template-registry.js +0 -2
- package/dist/template-registry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.js","sources":["../../../src/components/utilities/kbd.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { cached } from '@glimmer/tracking';\nimport { useStyles } from '@frontile/theme';\nimport { parseKeys } from '../../utils/keys';\nimport type { KbdKey, KbdPlatform } from '../../utils/keys';\nimport type { KbdSlots, SlotsToClasses } from '@frontile/theme';\n\nexport interface KbdSignature {\n Args: {\n /**\n * The shortcut to render, as `+`-separated keys: `\"mod+shift+p\"`.\n *\n * Named keys resolve to glyphs (`mod`, `shift`, `enter`, `esc`, `up`, …);\n * anything else renders verbatim, with a single letter capitalised. Use\n * `plus` for a literal `+`. A string with no `+` is one key, rendered as\n * given.\n *\n * Ignored when a block is passed.\n */\n keys?: string;\n\n /**\n * `split` gives each key its own cap; `merged` puts every glyph in one.\n *\n * @defaultValue 'split'\n */\n display?: 'split' | 'merged';\n\n /**\n * Rendered between caps, e.g. `\"+\"`. Only applies when `@display` is\n * `split`.\n */\n separator?: string;\n\n /**\n * @defaultValue 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * @defaultValue '
|
|
1
|
+
{"version":3,"file":"kbd.js","sources":["../../../src/components/utilities/kbd.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { cached } from '@glimmer/tracking';\nimport { useStyles } from '@frontile/theme';\nimport { parseKeys } from '../../utils/keys';\nimport type { KbdKey, KbdPlatform } from '../../utils/keys';\nimport type { KbdSlots, SlotsToClasses } from '@frontile/theme';\n\nexport interface KbdSignature {\n Args: {\n /**\n * The shortcut to render, as `+`-separated keys: `\"mod+shift+p\"`.\n *\n * Named keys resolve to glyphs (`mod`, `shift`, `enter`, `esc`, `up`, …);\n * anything else renders verbatim, with a single letter capitalised. Use\n * `plus` for a literal `+`. A string with no `+` is one key, rendered as\n * given.\n *\n * Ignored when a block is passed.\n */\n keys?: string;\n\n /**\n * `split` gives each key its own cap; `merged` puts every glyph in one.\n *\n * @defaultValue 'split'\n */\n display?: 'split' | 'merged';\n\n /**\n * Rendered between caps, e.g. `\"+\"`. Only applies when `@display` is\n * `split`.\n */\n separator?: string;\n\n /**\n * @defaultValue 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * @defaultValue 'neutral'\n */\n color?:\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * `inherit` follows the colour it sits on, for keycaps on a filled row.\n * `plain` drops the box entirely, for quiet trailing shortcuts.\n *\n * @defaultValue 'solid'\n */\n variant?: 'solid' | 'outline' | 'subtle' | 'inherit' | 'plain';\n\n /**\n * Overrides the platform for this keycap only. Prefer `setKbdPlatform` to\n * set it once for the whole app.\n */\n platform?: KbdPlatform;\n\n /**\n * Custom class name, it will override the default ones using Tailwind Merge\n * library.\n */\n class?: string;\n\n /**\n * Custom CSS classes for styling the individual slots: `base` for the\n * wrapper, `key` for each cap, `separator` for the character between caps.\n */\n classes?: SlotsToClasses<KbdSlots>;\n };\n Element: HTMLElement;\n Blocks: {\n /** Replaces `@keys` with arbitrary content, rendered as a single cap. */\n default: [];\n };\n}\n\n/**\n * Renders keyboard keys and shortcuts.\n *\n * A wrapper `<kbd>` holds one child `<kbd>` per key, which is the HTML\n * specification's own idiom for a key combination.\n */\nclass Kbd extends Component<KbdSignature> {\n get isMerged(): boolean {\n return this.args.display === 'merged';\n }\n\n @cached\n get keys(): KbdKey[] {\n return parseKeys(this.args.keys, this.args.platform);\n }\n\n get mergedGlyph(): string {\n return this.keys.map((key) => key.glyph).join('');\n }\n\n /**\n * The merged cap is read out as its key names, since a run of glyphs like\n * `⌘⇧P` is unintelligible to a screen reader.\n *\n * Undefined when no key in the run needs one, so a merged `esc` is not\n * announced \"Esc Escape\" — the same rule the split branch applies per key.\n */\n get mergedLabel(): string | undefined {\n if (!this.keys.some((key) => key.needsSpokenLabel)) {\n return undefined;\n }\n\n return this.keys.map((key) => key.name ?? key.glyph).join(' ');\n }\n\n /** The merged cap names its keys on hover, as each split cap does. */\n get mergedTitle(): string | undefined {\n const named = this.keys.filter((key) => key.name);\n\n return named.length ? named.map((key) => key.name).join(' ') : undefined;\n }\n\n // Cached because the template reads these once per key, and each read\n // otherwise re-resolves every compound variant in the theme.\n @cached\n get classNames() {\n const { kbd } = useStyles();\n const { classes } = this.args;\n\n const { base, key, separator } = kbd({\n size: this.args.size,\n color: this.args.color,\n variant: this.args.variant,\n isMerged: this.isMerged\n });\n\n return {\n base: base({ class: [classes?.base, this.args.class] }),\n key: key({ class: classes?.key }),\n separator: separator({ class: classes?.separator })\n };\n }\n\n <template>\n <kbd\n class={{this.classNames.base}}\n data-component=\"kbd\"\n data-part=\"base\"\n ...attributes\n >\n {{#if (has-block)}}\n <kbd class={{this.classNames.key}} data-part=\"key\">{{yield}}</kbd>\n {{else if this.isMerged}}\n <kbd\n class={{this.classNames.key}}\n data-part=\"key\"\n title={{this.mergedTitle}}\n >\n {{#if this.mergedLabel}}\n <span aria-hidden=\"true\">{{this.mergedGlyph}}</span>\n <span class=\"sr-only\">{{this.mergedLabel}}</span>\n {{else}}\n {{this.mergedGlyph}}\n {{/if}}\n </kbd>\n {{else}}\n {{#each this.keys as |key index|}}\n {{! index is 0 for the first key, so a separator falls between. }}\n {{#if index}}\n {{#if @separator}}\n <span\n class={{this.classNames.separator}}\n aria-hidden=\"true\"\n data-part=\"separator\"\n >{{@separator}}</span>\n {{/if}}\n {{/if}}\n\n <kbd class={{this.classNames.key}} data-part=\"key\" title={{key.name}}>\n {{#if key.needsSpokenLabel}}\n <span aria-hidden=\"true\">{{key.glyph}}</span>\n <span class=\"sr-only\">{{key.name}}</span>\n {{else}}\n {{key.glyph}}\n {{/if}}\n </kbd>\n {{/each}}\n {{/if}}\n </kbd>\n </template>\n}\n\nexport { Kbd };\nexport default Kbd;\n"],"names":["Kbd","Component","isMerged","args","display","keys","parseKeys","platform","n","prototype","cached","mergedGlyph","map","key","glyph","join","mergedLabel","some","needsSpokenLabel","undefined","name","mergedTitle","named","filter","length","classNames","kbd","useStyles","classes","base","separator","size","color","variant","class","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;;;;AAoFA;;;;;;AAMA,MAAMA,YAAYC,SAAA,CAAU;EAC1B,IAAIC,QAAAA,GAAoB;AACtB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,KAAK,QAAA;AAC/B,EAAA;EAEA,IACIC,OAAiB;AACnB,IAAA,OAAOC,SAAA,CAAU,IAAI,CAACH,IAAI,CAACE,IAAI,EAAE,IAAI,CAACF,IAAI,CAACI,QAAQ,CAAA;AACrD,EAAA;AAAA,EAAA;IAAAC,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,MAAA,EAAA,CAHCC,MAAA,CAAA,CAAA;AAAA;EAKD,IAAIC,WAAAA,GAAsB;AACxB,IAAA,OAAO,IAAI,CAACN,IAAI,CAACO,GAAG,CAAEC,GAAA,IAAQA,GAAA,CAAIC,KAAK,CAAA,CAAEC,IAAI,CAAC,EAAA,CAAA;AAChD,EAAA;AAEA;;;;;;AAMC;EACD,IAAIC,WAAAA,GAAkC;AACpC,IAAA,IAAI,CAAC,IAAI,CAACX,IAAI,CAACY,IAAI,CAAEJ,GAAA,IAAQA,GAAA,CAAIK,gBAAgB,CAAA,EAAG;AAClD,MAAA,OAAOC,SAAA;AACT,IAAA;IAEA,OAAO,IAAI,CAACd,IAAI,CAACO,GAAG,CAAEC,GAAA,IAAQA,GAAA,CAAIO,IAAI,IAAIP,GAAA,CAAIC,KAAK,CAAA,CAAEC,IAAI,CAAC,GAAA,CAAA;AAC5D,EAAA;AAEA;EACA,IAAIM,WAAAA,GAAkC;AACpC,IAAA,MAAMC,KAAA,GAAQ,IAAI,CAACjB,IAAI,CAACkB,MAAM,CAAEV,GAAA,IAAQA,GAAA,CAAIO,IAAI,CAAA;IAEhD,OAAOE,KAAA,CAAME,MAAM,GAAGF,KAAA,CAAMV,GAAG,CAAEC,GAAA,IAAQA,GAAA,CAAIO,IAAI,CAAA,CAAEL,IAAI,CAAC,GAAA,CAAA,GAAOI,SAAA;AACjE,EAAA;AAEA;AACA;EACA,IACIM,UAAAA,GAAa;IACf,MAAM;AAAEC,MAAAA;KAAK,GAAGC,SAAA,EAAA;IAChB,MAAM;AAAEC,MAAAA;KAAS,GAAG,IAAI,CAACzB,IAAI;IAE7B,MAAM;MAAE0B,IAAI;MAAEhB,GAAG;AAAEiB,MAAAA;KAAW,GAAGJ,GAAA,CAAI;AACnCK,MAAAA,IAAA,EAAM,IAAI,CAAC5B,IAAI,CAAC4B,IAAI;AACpBC,MAAAA,KAAA,EAAO,IAAI,CAAC7B,IAAI,CAAC6B,KAAK;AACtBC,MAAAA,OAAA,EAAS,IAAI,CAAC9B,IAAI,CAAC8B,OAAO;MAC1B/B,QAAA,EAAU,IAAI,CAACA;AACjB,KAAA,CAAA;IAEA,OAAO;MACL2B,IAAA,EAAMA,IAAA,CAAK;QAAEK,KAAA,EAAO,CAACN,OAAA,EAASC,IAAA,EAAM,IAAI,CAAC1B,IAAI,CAAC+B,KAAK;AAAE,OAAA,CAAA;MACrDrB,GAAA,EAAKA,GAAA,CAAI;QAAEqB,KAAA,EAAON,OAAA,EAASf;AAAI,OAAA,CAAA;MAC/BiB,SAAA,EAAWA,SAAA,CAAU;QAAEI,KAAA,EAAON,OAAA,EAASE;OAAU;KACnD;AACF,EAAA;AAAA,EAAA;IAAAtB,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CAjBCC,MAAA,CAAA,CAAA;AAAA;AAmBD,EAAA;IAAAyB,oBAAA,CAAAC,kBAAA,CAAA,yrCAAA,EA8CA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.js","sources":["../../../src/components/utilities/skeleton.gts"],"sourcesContent":["import type { TOC } from '@ember/component/template-only';\nimport { useStyles, type SkeletonVariants } from '@frontile/theme';\n\nconst Skeleton: TOC<{\n Args: {\n class?: string;\n /**\n * Shape preset. `text` fills its container at text height; `circle` and\n * `square` are equal-sided and match Avatar's radii; `rounded` and `rect`\n * fill their container for image and card placeholders.\n *\n * @defaultValue 'text'\n */\n shape?: SkeletonVariants['shape'];\n /**\n * Size preset. For `circle` and `square` this sets both dimensions from\n * Avatar's scale; for the other shapes it sets the height.\n *\n * @defaultValue 'md'\n */\n size?: SkeletonVariants['size'];\n /**\n * Animation style for the placeholder.\n *\n * @defaultValue 'shimmer'\n */\n animation?: SkeletonVariants['animation'];\n };\n Element: HTMLDivElement;\n}> = <template>\n {{#let (useStyles) as |styles|}}\n <div\n class={{styles.skeleton\n class=@class\n shape=@shape\n size=@size\n animation=@animation\n }}\n aria-hidden=\"true\"\n data-component=\"skeleton\"\n data-part=\"base\"\n ...attributes\n ></div>\n {{/let}}\n</template>;\n\nexport { Skeleton };\nexport default Skeleton;\n"],"names":["Skeleton","setComponentTemplate","precompileTemplate","strictMode","scope","useStyles","templateOnly"],"mappings":";;;;;AAGA,MAAMA,QA0BD,GAAAC,oBAAA,CAAAC,kBAAA,CAAA,iOAAA,EAeL;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA
|
|
1
|
+
{"version":3,"file":"skeleton.js","sources":["../../../src/components/utilities/skeleton.gts"],"sourcesContent":["import type { TOC } from '@ember/component/template-only';\nimport { useStyles, type SkeletonVariants } from '@frontile/theme';\n\nconst Skeleton: TOC<{\n Args: {\n class?: string;\n /**\n * Shape preset. `text` fills its container at text height; `circle` and\n * `square` are equal-sided and match Avatar's radii; `rounded` and `rect`\n * fill their container for image and card placeholders.\n *\n * @defaultValue 'text'\n */\n shape?: SkeletonVariants['shape'];\n /**\n * Size preset. For `circle` and `square` this sets both dimensions from\n * Avatar's scale; for the other shapes it sets the height.\n *\n * @defaultValue 'md'\n */\n size?: SkeletonVariants['size'];\n /**\n * Animation style for the placeholder.\n *\n * @defaultValue 'shimmer'\n */\n animation?: SkeletonVariants['animation'];\n };\n Element: HTMLDivElement;\n}> = <template>\n {{#let (useStyles) as |styles|}}\n <div\n class={{styles.skeleton\n class=@class\n shape=@shape\n size=@size\n animation=@animation\n }}\n aria-hidden=\"true\"\n data-component=\"skeleton\"\n data-part=\"base\"\n ...attributes\n ></div>\n {{/let}}\n</template>;\n\nexport { Skeleton };\nexport default Skeleton;\n"],"names":["Skeleton","setComponentTemplate","precompileTemplate","strictMode","scope","useStyles","templateOnly"],"mappings":";;;;;AAGA,MAAMA,QA0BD,GAAAC,oBAAA,CAAAC,kBAAA,CAAA,iOAAA,EAeL;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;"}
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
1
2
|
import { useStyles } from '@frontile/theme';
|
|
3
|
+
import { r as renamedArgValue } from '../../deprecated-args-BIUjLA8y.js';
|
|
2
4
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
5
|
import { setComponentTemplate } from '@ember/component';
|
|
4
|
-
import templateOnly from '@ember/component/template-only';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
class Spinner extends Component {
|
|
8
|
+
get classNames() {
|
|
9
|
+
const {
|
|
10
|
+
spinner
|
|
11
|
+
} = useStyles();
|
|
12
|
+
return spinner({
|
|
13
|
+
class: this.args.class,
|
|
14
|
+
size: this.args.size,
|
|
15
|
+
color: renamedArgValue(this.args.color, this.args.intent, {
|
|
16
|
+
default: 'neutral'
|
|
17
|
+
}, {
|
|
18
|
+
component: 'Spinner',
|
|
19
|
+
from: 'intent',
|
|
20
|
+
to: 'color',
|
|
21
|
+
id: 'frontile.spinner.intent'
|
|
22
|
+
}) || 'neutral'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static {
|
|
26
|
+
setComponentTemplate(precompileTemplate("{{!-- A spinner is decorative: the loading state belongs on the region that\nis loading, not on the graphic. Hidden by default so it is not announced as\nan unnamed image; attributes are applied last, so a caller that really wants\nit announced can pass its own aria-hidden and label. --}}\n<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" data-component=\"spinner\" data-part=\"base\" class={{this.classNames}} ...attributes>\n <path d=\"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8z\" fill=\"currentColor\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" />\n\n <path d=\"M7.25.75A.75.75 0 018 0a8 8 0 018 8 .75.75 0 01-1.5 0A6.5 6.5 0 008 1.5a.75.75 0 01-.75-.75z\" fill=\"currentFill\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" />\n</svg>", {
|
|
27
|
+
strictMode: true
|
|
28
|
+
}), this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
12
31
|
|
|
13
32
|
export { Spinner, Spinner as default };
|
|
14
33
|
//# sourceMappingURL=spinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","sources":["../../../src/components/utilities/spinner.gts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"spinner.js","sources":["../../../src/components/utilities/spinner.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles, type SpinnerVariants } from '@frontile/theme';\nimport { renamedArgValue } from '../../-private/deprecated-args';\n\ninterface SpinnerSignature {\n Args: {\n /**\n * Custom class name, it will override the default ones using Tailwind Merge\n * library. Use `fill-*` for the highlighted arc and `text-*` for the track.\n */\n class?: string;\n\n /**\n * The size of the spinner.\n *\n * @defaultValue 'md'\n */\n size?: SpinnerVariants['size'];\n\n /**\n * The color of the spinner.\n *\n * @defaultValue 'neutral'\n */\n color?: SpinnerVariants['color'];\n\n /**\n * @deprecated Use `color`. `default` is now `neutral`.\n */\n intent?:\n | 'default'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n };\n Element: SVGElement;\n}\n\nclass Spinner extends Component<SpinnerSignature> {\n get classNames() {\n const { spinner } = useStyles();\n\n return spinner({\n class: this.args.class,\n size: this.args.size,\n color:\n renamedArgValue(\n this.args.color,\n this.args.intent,\n { default: 'neutral' } as const,\n {\n component: 'Spinner',\n from: 'intent',\n to: 'color',\n id: 'frontile.spinner.intent'\n }\n ) || 'neutral'\n });\n }\n\n <template>\n {{! A spinner is decorative: the loading state belongs on the region that\n is loading, not on the graphic. Hidden by default so it is not announced as\n an unnamed image; attributes are applied last, so a caller that really wants\n it announced can pass its own aria-hidden and label. }}\n <svg\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n data-component=\"spinner\"\n data-part=\"base\"\n class={{this.classNames}}\n ...attributes\n >\n <path\n d=\"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8z\"\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n\n <path\n d=\"M7.25.75A.75.75 0 018 0a8 8 0 018 8 .75.75 0 01-1.5 0A6.5 6.5 0 008 1.5a.75.75 0 01-.75-.75z\"\n fill=\"currentFill\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </template>\n}\n\nexport { Spinner, type SpinnerSignature };\nexport default Spinner;\n"],"names":["Spinner","Component","classNames","spinner","useStyles","class","args","size","color","renamedArgValue","intent","default","component","from","to","id","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;;AAyCA,MAAMA,gBAAgBC,SAAA,CAAU;EAC9B,IAAIC,UAAAA,GAAa;IACf,MAAM;AAAEC,MAAAA;KAAS,GAAGC,SAAA,EAAA;AAEpB,IAAA,OAAOD,OAAA,CAAQ;AACbE,MAAAA,KAAA,EAAO,IAAI,CAACC,IAAI,CAACD,KAAK;AACtBE,MAAAA,IAAA,EAAM,IAAI,CAACD,IAAI,CAACC,IAAI;AACpBC,MAAAA,KAAA,EACEC,eAAA,CACE,IAAI,CAACH,IAAI,CAACE,KAAK,EACf,IAAI,CAACF,IAAI,CAACI,MAAM,EAChB;AAAEC,QAAAA,OAAA,EAAS;AAAU,OAAA,EACrB;AACEC,QAAAA,SAAA,EAAW,SAAA;AACXC,QAAAA,IAAA,EAAM,QAAA;AACNC,QAAAA,EAAA,EAAI,OAAA;AACJC,QAAAA,EAAA,EAAI;AACN,OAAA,CAAA,IACG;AACT,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,syBAAA,EA4BA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visually-hidden.js","sources":["../../../src/components/utilities/visually-hidden.gts"],"sourcesContent":["import type { TOC } from '@ember/component/template-only';\n\nconst VisuallyHidden: TOC<{\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}> = <template>\n <div class=\"sr-only\" ...attributes>\n {{yield}}\n </div>\n</template>;\n\nexport { VisuallyHidden };\nexport default VisuallyHidden;\n"],"names":["VisuallyHidden","setComponentTemplate","precompileTemplate","strictMode","templateOnly"],"mappings":";;;;AAEA,MAAMA,cAKD,GAAAC,oBAAA,CAAAC,kBAAA,CAAA,4DAAA,EAIL;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA
|
|
1
|
+
{"version":3,"file":"visually-hidden.js","sources":["../../../src/components/utilities/visually-hidden.gts"],"sourcesContent":["import type { TOC } from '@ember/component/template-only';\n\nconst VisuallyHidden: TOC<{\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}> = <template>\n <div class=\"sr-only\" ...attributes>\n {{yield}}\n </div>\n</template>;\n\nexport { VisuallyHidden };\nexport default VisuallyHidden;\n"],"names":["VisuallyHidden","setComponentTemplate","precompileTemplate","strictMode","templateOnly"],"mappings":";;;;AAEA,MAAMA,cAKD,GAAAC,oBAAA,CAAAC,kBAAA,CAAA,4DAAA,EAIL;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-blur-C8OnSQR5.js","sources":["../src/-private/control-blur.ts"],"sourcesContent":["import { later, cancel } from '@ember/runloop';\n\n/**\n * How long to wait before deciding that a focus loss with no identifiable\n * destination really left the control.\n *\n * Only the targetless case waits at all (see {@link ControlBlurTracker}): a\n * `focusout` that names where focus went is answered synchronously. Targetless\n * blurs are the ones a click on something unfocusable produces -- the page\n * background, a backdrop, the dropdown's own padding -- and the browser\n * dispatches the rest of that click (mouseup, click) in later tasks, which is\n * where an outside click gets around to closing the popover. Deciding before\n * that would read a control that still looks open and stay silent. A beat is\n * long enough for the click to finish and short enough that blur validation\n * still feels immediate.\n */\nconst FOCUS_SETTLE_MS = 150;\n\ninterface ControlBlurTrackerOptions {\n /**\n * The element the popover's `trigger` modifier is installed on. Its\n * `aria-controls` is how the portaled content is found, so this must be the\n * element that opens the dropdown, not merely something inside the control.\n */\n trigger: () => HTMLElement | null | undefined;\n\n /** The control's outermost element: trigger, chips, clear button and all. */\n container: () => HTMLElement | null | undefined;\n\n /** Whether the control's dropdown is currently open. */\n isOpen: () => boolean;\n\n /** Whether the owning component has been (or is being) destroyed. */\n isDestroyed: () => boolean;\n\n /** Called once each time focus genuinely leaves the control. */\n onBlur: () => void;\n}\n\n/**\n * Decides when a composite control -- a trigger plus a dropdown -- has really\n * lost focus, and reports it once.\n *\n * A trigger's own blur is not the answer. Clicking an option moves focus onto\n * that option, which is *inside* the control as far as the user is concerned\n * but is not a DOM descendant of the trigger: the popover content is portaled\n * to the end of the document. And in multiple selection mode the dropdown\n * stays open across several such clicks, so a trigger-blur-means-blur rule\n * fires mid-interaction -- which is what made blur validation paint \"pick at\n * least three\" under a field the user was still filling in.\n *\n * So the control is treated as two regions, the container and the popover\n * content, and focus leaving one for the other is not a blur:\n *\n * - **`focusout` naming its destination** (`relatedTarget`) is answered\n * immediately, with no timer at all. This covers every deliberate exit --\n * Tab, or a click on another focusable thing -- and every move *into* the\n * dropdown, including the option click that starts a selection.\n * - **A targetless `focusout`** is deferred by {@link FOCUS_SETTLE_MS} and then\n * judged on `document.activeElement`. Focus nowhere (`body`) while the\n * dropdown is open is still part of the interaction -- a click on the\n * dropdown's padding -- so it is not a blur; once the dropdown has closed,\n * the same state means the user clicked away.\n *\n * The portaled content is located through the trigger's `aria-controls`, which\n * the popover's trigger modifier sets to the content's id. That needs no extra\n * plumbing through the popover and stays correct wherever the content is\n * rendered.\n *\n * Callers must call {@link cancel} from `willDestroy`: a pending timer would\n * otherwise resolve against a torn-down component and both write tracked state\n * and call a callback the consumer has stopped expecting.\n */\nclass ControlBlurTracker {\n #timer?: ReturnType<typeof later>;\n\n private readonly options: ControlBlurTrackerOptions;\n\n constructor(options: ControlBlurTrackerOptions) {\n this.options = options;\n }\n\n /**\n * Wire this to `focusout` on the trigger -- not `blur`, whose\n * `relatedTarget` browsers are not obliged to populate.\n */\n handleFocusOut = (event: FocusEvent): void => {\n this.cancel();\n\n const next = event.relatedTarget;\n\n if (next instanceof Element) {\n if (!this.#holdsFocus(next)) {\n this.#report();\n }\n return;\n }\n\n this.#timer = later(this, this.#settle, FOCUS_SETTLE_MS);\n };\n\n /** Cancels a pending decision. Call from the owner's `willDestroy`. */\n cancel = (): void => {\n if (this.#timer) {\n cancel(this.#timer);\n this.#timer = undefined;\n }\n };\n\n #settle = (): void => {\n this.#timer = undefined;\n\n if (this.options.isDestroyed()) {\n return;\n }\n\n const active = document.activeElement;\n\n if (!active || active === document.body) {\n // Focus is nowhere. While the dropdown is open that is the user clicking\n // an unfocusable part of it; once it has closed it is the user having\n // clicked away from the control entirely.\n if (!this.options.isOpen()) {\n this.#report();\n }\n return;\n }\n\n if (!this.#holdsFocus(active)) {\n this.#report();\n }\n };\n\n /** Whether `el` is part of the control: the field itself, or its dropdown. */\n #holdsFocus(el: Element): boolean {\n const container = this.options.container();\n if (container && container.contains(el)) {\n return true;\n }\n\n const content = this.#popoverContent();\n return !!content && content.contains(el);\n }\n\n #popoverContent(): HTMLElement | null {\n const id = this.options.trigger()?.getAttribute('aria-controls');\n return id ? document.getElementById(id) : null;\n }\n\n #report(): void {\n if (this.options.isDestroyed()) {\n return;\n }\n this.options.onBlur();\n }\n}\n\nexport { ControlBlurTracker, type ControlBlurTrackerOptions };\n"],"names":["FOCUS_SETTLE_MS","ControlBlurTracker","options","constructor","handleFocusOut","event","cancel","next","relatedTarget","Element","later","undefined","#settle","isDestroyed","active","document","activeElement","body","isOpen","#holdsFocus","el","container","contains","content","#popoverContent","id","trigger","getAttribute","getElementById","#report","onBlur"],"mappings":"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
|
|
1
|
+
{"version":3,"file":"control-blur-C8OnSQR5.js","sources":["../src/-private/control-blur.ts"],"sourcesContent":["import { later, cancel } from '@ember/runloop';\n\n/**\n * How long to wait before deciding that a focus loss with no identifiable\n * destination really left the control.\n *\n * Only the targetless case waits at all (see {@link ControlBlurTracker}): a\n * `focusout` that names where focus went is answered synchronously. Targetless\n * blurs are the ones a click on something unfocusable produces -- the page\n * background, a backdrop, the dropdown's own padding -- and the browser\n * dispatches the rest of that click (mouseup, click) in later tasks, which is\n * where an outside click gets around to closing the popover. Deciding before\n * that would read a control that still looks open and stay silent. A beat is\n * long enough for the click to finish and short enough that blur validation\n * still feels immediate.\n */\nconst FOCUS_SETTLE_MS = 150;\n\ninterface ControlBlurTrackerOptions {\n /**\n * The element the popover's `trigger` modifier is installed on. Its\n * `aria-controls` is how the portaled content is found, so this must be the\n * element that opens the dropdown, not merely something inside the control.\n */\n trigger: () => HTMLElement | null | undefined;\n\n /** The control's outermost element: trigger, chips, clear button and all. */\n container: () => HTMLElement | null | undefined;\n\n /** Whether the control's dropdown is currently open. */\n isOpen: () => boolean;\n\n /** Whether the owning component has been (or is being) destroyed. */\n isDestroyed: () => boolean;\n\n /** Called once each time focus genuinely leaves the control. */\n onBlur: () => void;\n}\n\n/**\n * Decides when a composite control -- a trigger plus a dropdown -- has really\n * lost focus, and reports it once.\n *\n * A trigger's own blur is not the answer. Clicking an option moves focus onto\n * that option, which is *inside* the control as far as the user is concerned\n * but is not a DOM descendant of the trigger: the popover content is portaled\n * to the end of the document. And in multiple selection mode the dropdown\n * stays open across several such clicks, so a trigger-blur-means-blur rule\n * fires mid-interaction -- which is what made blur validation paint \"pick at\n * least three\" under a field the user was still filling in.\n *\n * So the control is treated as two regions, the container and the popover\n * content, and focus leaving one for the other is not a blur:\n *\n * - **`focusout` naming its destination** (`relatedTarget`) is answered\n * immediately, with no timer at all. This covers every deliberate exit --\n * Tab, or a click on another focusable thing -- and every move *into* the\n * dropdown, including the option click that starts a selection.\n * - **A targetless `focusout`** is deferred by {@link FOCUS_SETTLE_MS} and then\n * judged on `document.activeElement`. Focus nowhere (`body`) while the\n * dropdown is open is still part of the interaction -- a click on the\n * dropdown's padding -- so it is not a blur; once the dropdown has closed,\n * the same state means the user clicked away.\n *\n * The portaled content is located through the trigger's `aria-controls`, which\n * the popover's trigger modifier sets to the content's id. That needs no extra\n * plumbing through the popover and stays correct wherever the content is\n * rendered.\n *\n * Callers must call {@link cancel} from `willDestroy`: a pending timer would\n * otherwise resolve against a torn-down component and both write tracked state\n * and call a callback the consumer has stopped expecting.\n */\nclass ControlBlurTracker {\n #timer?: ReturnType<typeof later>;\n\n private readonly options: ControlBlurTrackerOptions;\n\n constructor(options: ControlBlurTrackerOptions) {\n this.options = options;\n }\n\n /**\n * Wire this to `focusout` on the trigger -- not `blur`, whose\n * `relatedTarget` browsers are not obliged to populate.\n */\n handleFocusOut = (event: FocusEvent): void => {\n this.cancel();\n\n const next = event.relatedTarget;\n\n if (next instanceof Element) {\n if (!this.#holdsFocus(next)) {\n this.#report();\n }\n return;\n }\n\n this.#timer = later(this, this.#settle, FOCUS_SETTLE_MS);\n };\n\n /** Cancels a pending decision. Call from the owner's `willDestroy`. */\n cancel = (): void => {\n if (this.#timer) {\n cancel(this.#timer);\n this.#timer = undefined;\n }\n };\n\n #settle = (): void => {\n this.#timer = undefined;\n\n if (this.options.isDestroyed()) {\n return;\n }\n\n const active = document.activeElement;\n\n if (!active || active === document.body) {\n // Focus is nowhere. While the dropdown is open that is the user clicking\n // an unfocusable part of it; once it has closed it is the user having\n // clicked away from the control entirely.\n if (!this.options.isOpen()) {\n this.#report();\n }\n return;\n }\n\n if (!this.#holdsFocus(active)) {\n this.#report();\n }\n };\n\n /** Whether `el` is part of the control: the field itself, or its dropdown. */\n #holdsFocus(el: Element): boolean {\n const container = this.options.container();\n if (container && container.contains(el)) {\n return true;\n }\n\n const content = this.#popoverContent();\n return !!content && content.contains(el);\n }\n\n #popoverContent(): HTMLElement | null {\n const id = this.options.trigger()?.getAttribute('aria-controls');\n return id ? document.getElementById(id) : null;\n }\n\n #report(): void {\n if (this.options.isDestroyed()) {\n return;\n }\n this.options.onBlur();\n }\n}\n\nexport { ControlBlurTracker, type ControlBlurTrackerOptions };\n"],"names":["FOCUS_SETTLE_MS","ControlBlurTracker","options","constructor","handleFocusOut","event","cancel","next","relatedTarget","Element","later","undefined","#settle","isDestroyed","active","document","activeElement","body","isOpen","#holdsFocus","el","container","contains","content","#popoverContent","id","trigger","getAttribute","getElementById","#report","onBlur"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { deprecate } from '@ember/debug';
|
|
2
|
+
|
|
3
|
+
function warn(options, detail = '') {
|
|
4
|
+
deprecate(`${options.component}: \`@${options.from}\` is deprecated. Use \`@${options.to}\` instead.${detail}`, false, {
|
|
5
|
+
id: options.id,
|
|
6
|
+
until: '0.19.0',
|
|
7
|
+
for: 'frontile',
|
|
8
|
+
since: {
|
|
9
|
+
available: '0.18.0',
|
|
10
|
+
enabled: '0.18.0'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Resolve an argument whose name *and* values moved.
|
|
17
|
+
*
|
|
18
|
+
* `values` maps old spellings to new ones. A legacy value absent from the map
|
|
19
|
+
* kept its name (e.g. Button's `custom`) and passes through untouched — so the
|
|
20
|
+
* map only lists what actually changed.
|
|
21
|
+
*/
|
|
22
|
+
function renamedArgValue(next, legacy, values, options) {
|
|
23
|
+
if (typeof legacy === 'undefined') {
|
|
24
|
+
return next;
|
|
25
|
+
}
|
|
26
|
+
const mapped = values[legacy] ?? legacy;
|
|
27
|
+
warn(options, values[legacy] ? ` \`${legacy}\` is now \`${values[legacy]}\`.` : '');
|
|
28
|
+
return typeof next === 'undefined' ? mapped : next;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { renamedArgValue as r };
|
|
32
|
+
//# sourceMappingURL=deprecated-args-BIUjLA8y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-args-BIUjLA8y.js","sources":["../src/-private/deprecated-args.ts"],"sourcesContent":["import { deprecate } from '@ember/debug';\n\nexport interface RenamedArgOptions {\n /** Component name as it appears to a consumer, e.g. `'Button'`. */\n component: string;\n /** The old argument name, without the `@`. */\n from: string;\n /** The new argument name, without the `@`. */\n to: string;\n /** Deprecation id, e.g. `'frontile.button.appearance'`. */\n id: string;\n}\n\nfunction warn(options: RenamedArgOptions, detail = ''): void {\n deprecate(\n `${options.component}: \\`@${options.from}\\` is deprecated. Use \\`@${options.to}\\` instead.${detail}`,\n false,\n {\n id: options.id,\n until: '0.19.0',\n for: 'frontile',\n since: { available: '0.18.0', enabled: '0.18.0' }\n }\n );\n}\n\n/**\n * Resolve an argument whose name *and* values moved.\n *\n * `values` maps old spellings to new ones. A legacy value absent from the map\n * kept its name (e.g. Button's `custom`) and passes through untouched — so the\n * map only lists what actually changed.\n */\nexport function renamedArgValue<Old extends string, New extends string>(\n next: New | undefined,\n legacy: Old | undefined,\n values: Partial<Record<Old, New>>,\n options: RenamedArgOptions\n): New | undefined {\n if (typeof legacy === 'undefined') {\n return next;\n }\n\n const mapped = values[legacy] ?? (legacy as unknown as New);\n\n warn(\n options,\n values[legacy] ? ` \\`${legacy}\\` is now \\`${values[legacy]}\\`.` : ''\n );\n\n return typeof next === 'undefined' ? mapped : next;\n}\n"],"names":["warn","options","detail","deprecate","component","from","to","id","until","for","since","available","enabled","renamedArgValue","next","legacy","values","mapped"],"mappings":";;AAaA,SAASA,IAAIA,CAACC,OAA0B,EAAEC,MAAM,GAAG,EAAE,EAAQ;AAC3DC,EAAAA,SAAS,CACP,CAAA,EAAGF,OAAO,CAACG,SAAS,CAAA,KAAA,EAAQH,OAAO,CAACI,IAAI,CAAA,yBAAA,EAA4BJ,OAAO,CAACK,EAAE,CAAA,WAAA,EAAcJ,MAAM,CAAA,CAAE,EACpG,KAAK,EACL;IACEK,EAAE,EAAEN,OAAO,CAACM,EAAE;AACdC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,GAAG,EAAE,UAAU;AACfC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,SAAS,EAAE,QAAQ;AAAEC,MAAAA,OAAO,EAAE;AAAS;AAClD,GACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,eAAeA,CAC7BC,IAAqB,EACrBC,MAAuB,EACvBC,MAAiC,EACjCf,OAA0B,EACT;AACjB,EAAA,IAAI,OAAOc,MAAM,KAAK,WAAW,EAAE;AACjC,IAAA,OAAOD,IAAI;AACb,EAAA;AAEA,EAAA,MAAMG,MAAM,GAAGD,MAAM,CAACD,MAAM,CAAC,IAAKA,MAAyB;AAE3Df,EAAAA,IAAI,CACFC,OAAO,EACPe,MAAM,CAACD,MAAM,CAAC,GAAG,CAAA,GAAA,EAAMA,MAAM,CAAA,YAAA,EAAeC,MAAM,CAACD,MAAM,CAAC,CAAA,GAAA,CAAK,GAAG,EACpE,CAAC;AAED,EAAA,OAAO,OAAOD,IAAI,KAAK,WAAW,GAAGG,MAAM,GAAGH,IAAI;AACpD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-CreV7aPQ.js","sources":["../src/-private/dialog.ts"],"sourcesContent":["import { warn } from '@ember/debug';\n\n/**\n * Warns when a dialog ends up with no accessible name at all — no registered\n * `Header`, and no `aria-label`/`aria-labelledby` of the consumer's own.\n * Assistive technology announces such a dialog as just \"dialog\", and nothing\n * else surfaces the mistake at runtime.\n *\n * Consumer-supplied names arrive through `...attributes`, which the component\n * cannot see in its args, so this inspects the rendered element for them. A\n * heading merely carrying `headerId` deliberately does *not* count: nothing\n * points `aria-labelledby` at it, so the dialog really is unnamed, and that is\n * the case most worth surfacing.\n *\n * `warn` is stripped from production builds, so this costs consumers nothing.\n */\nexport function warnIfDialogHasNoAccessibleName(\n element: Element,\n hasRegisteredHeader: boolean,\n component: 'modal' | 'drawer'\n): void {\n const hasName =\n hasRegisteredHeader ||\n !!element.getAttribute('aria-label') ||\n !!element.getAttribute('aria-labelledby');\n\n const name = component === 'modal' ? 'Modal' : 'Drawer';\n const block = component === 'modal' ? 'm' : 'd';\n\n warn(\n `<${name}> has no accessible name: assistive technology will announce it ` +\n `as just \"dialog\". Render the yielded <${block}.Header>, or pass your ` +\n `own aria-label or aria-labelledby to <${name}>. Putting the yielded ` +\n `headerId on a heading of your own is not enough on its own — pass ` +\n `aria-labelledby={{${block}.headerId}} alongside it.`,\n hasName,\n { id: `frontile.${component}.missing-accessible-name` }\n );\n}\n"],"names":["warnIfDialogHasNoAccessibleName","element","hasRegisteredHeader","component","hasName","getAttribute","name","block","warn","id"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,+BAA+BA,CAC7CC,OAAgB,EAChBC,mBAA4B,EAC5BC,SAA6B,EACvB;EACN,MAAMC,OAAO,GACXF,mBAAmB,IACnB,CAAC,CAACD,OAAO,CAACI,YAAY,CAAC,YAAY,CAAC,IACpC,CAAC,CAACJ,OAAO,CAACI,YAAY,CAAC,iBAAiB,CAAC;EAE3C,MAAMC,IAAI,GAAGH,SAAS,KAAK,OAAO,GAAG,OAAO,GAAG,QAAQ;EACvD,MAAMI,KAAK,GAAGJ,SAAS,KAAK,OAAO,GAAG,GAAG,GAAG,GAAG;EAE/CK,IAAI,CACF,IAAIF,IAAI,CAAA,gEAAA,CAAkE,GACxE,CAAA,sCAAA,EAAyCC,KAAK,yBAAyB,GACvE,CAAA,sCAAA,EAAyCD,IAAI,CAAA,uBAAA,CAAyB,GACtE,oEAAoE,GACpE,CAAA,kBAAA,EAAqBC,KAAK,CAAA,yBAAA,CAA2B,EACvDH,OAAO,EACP;IAAEK,EAAE,EAAE,YAAYN,SAAS,CAAA,wBAAA;AAA2B,GACxD,CAAC;AACH
|
|
1
|
+
{"version":3,"file":"dialog-CreV7aPQ.js","sources":["../src/-private/dialog.ts"],"sourcesContent":["import { warn } from '@ember/debug';\n\n/**\n * Warns when a dialog ends up with no accessible name at all — no registered\n * `Header`, and no `aria-label`/`aria-labelledby` of the consumer's own.\n * Assistive technology announces such a dialog as just \"dialog\", and nothing\n * else surfaces the mistake at runtime.\n *\n * Consumer-supplied names arrive through `...attributes`, which the component\n * cannot see in its args, so this inspects the rendered element for them. A\n * heading merely carrying `headerId` deliberately does *not* count: nothing\n * points `aria-labelledby` at it, so the dialog really is unnamed, and that is\n * the case most worth surfacing.\n *\n * `warn` is stripped from production builds, so this costs consumers nothing.\n */\nexport function warnIfDialogHasNoAccessibleName(\n element: Element,\n hasRegisteredHeader: boolean,\n component: 'modal' | 'drawer'\n): void {\n const hasName =\n hasRegisteredHeader ||\n !!element.getAttribute('aria-label') ||\n !!element.getAttribute('aria-labelledby');\n\n const name = component === 'modal' ? 'Modal' : 'Drawer';\n const block = component === 'modal' ? 'm' : 'd';\n\n warn(\n `<${name}> has no accessible name: assistive technology will announce it ` +\n `as just \"dialog\". Render the yielded <${block}.Header>, or pass your ` +\n `own aria-label or aria-labelledby to <${name}>. Putting the yielded ` +\n `headerId on a heading of your own is not enough on its own — pass ` +\n `aria-labelledby={{${block}.headerId}} alongside it.`,\n hasName,\n { id: `frontile.${component}.missing-accessible-name` }\n );\n}\n"],"names":["warnIfDialogHasNoAccessibleName","element","hasRegisteredHeader","component","hasName","getAttribute","name","block","warn","id"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,+BAA+BA,CAC7CC,OAAgB,EAChBC,mBAA4B,EAC5BC,SAA6B,EACvB;EACN,MAAMC,OAAO,GACXF,mBAAmB,IACnB,CAAC,CAACD,OAAO,CAACI,YAAY,CAAC,YAAY,CAAC,IACpC,CAAC,CAACJ,OAAO,CAACI,YAAY,CAAC,iBAAiB,CAAC;EAE3C,MAAMC,IAAI,GAAGH,SAAS,KAAK,OAAO,GAAG,OAAO,GAAG,QAAQ;EACvD,MAAMI,KAAK,GAAGJ,SAAS,KAAK,OAAO,GAAG,GAAG,GAAG,GAAG;EAE/CK,IAAI,CACF,IAAIF,IAAI,CAAA,gEAAA,CAAkE,GACxE,CAAA,sCAAA,EAAyCC,KAAK,yBAAyB,GACvE,CAAA,sCAAA,EAAyCD,IAAI,CAAA,uBAAA,CAAyB,GACtE,oEAAoE,GACpE,CAAA,kBAAA,EAAqBC,KAAK,CAAA,yBAAA,CAA2B,EACvDH,OAAO,EACP;IAAEK,EAAE,EAAE,YAAYN,SAAS,CAAA,wBAAA;AAA2B,GACxD,CAAC;AACH;;"}
|
package/dist/dom-cKWVvtkd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-cKWVvtkd.js","sources":["../src/-private/dom.ts"],"sourcesContent":["import { getOwner } from '@ember/owner';\n\nexport function getDOM(context: object): Document | null {\n if (typeof document !== 'undefined') {\n return document;\n }\n\n const container = getOwner(context);\n if (!container) {\n return null;\n }\n const documentService = container.lookup('service:-document');\n\n if (documentService) {\n return documentService as Document;\n }\n return null;\n}\n\nfunction childNodesOfElement(\n element: Node | Element | null | undefined\n): (Node | Element)[] {\n if (!element) {\n return [];\n }\n\n const children = [];\n let child = element.firstChild;\n while (child) {\n children.push(child);\n child = child.nextSibling;\n }\n return children;\n}\n\n// eslint-disable-next-line no-control-regex\nconst CONTROL_CHARACTERS = /[\\u0000-\\u001f\\u007f]/g;\n\n/**\n * Escapes a value for use inside a *quoted* attribute selector.\n *\n * Values reaching here come from consumers — `Portal @target=\"#some-id\"`, a\n * portal target name — and an id is only required to be non-empty and free of\n * whitespace, so plenty of legal ids (`1foo`, `user.email`, `a:b`) are not\n * valid CSS identifiers. Interpolating them raw either throws a `SyntaxError`\n * and takes the render down, or, for a crafted value like\n * `x], [data-portal-target`, closes the predicate and matches something else\n * entirely.\n *\n * `CSS.escape` would also work here, but it escapes for the *identifier*\n * grammar while every call site interpolates into a *quoted string*\n * (`[attr=\"…\"]`). Two escapers for two grammars in one function is a trap\n * even though both happen to round-trip, and `CSS.escape` is a browser global\n * this module cannot rely on — it also runs against the `-document` service\n * when the app is prerendered. So there is one hand-rolled escaper, complete\n * for the quoted-string position and exercised by every caller on every\n * platform:\n *\n * - `\"` and `\\` are escaped with a backslash; they are the only characters a\n * quoted string cannot carry literally.\n * - Control characters — newline (`\\a`), carriage return (`\\d`), form feed\n * (`\\c`) among them — cannot appear literally in a CSS string either, and\n * get the hex escape the grammar defines, always with the terminating space\n * so the following character is never absorbed into the escape. Substituting\n * a different character for them (a space, say) would silently query for a\n * *different* value and match the wrong element, or none, with no error.\n */\nfunction escapeAttributeValue(value: string): string {\n return value\n .replace(/[\"\\\\]/g, '\\\\$&')\n .replace(\n CONTROL_CHARACTERS,\n (char) => `\\\\${char.charCodeAt(0).toString(16)} `\n );\n}\n\nexport function getElementById(\n doc: Document | Element,\n id: string\n): null | Element {\n // `Document` (and the `-document` service standing in for it) can answer\n // this without a selector at all, which sidesteps escaping entirely.\n // `Element` has no `getElementById`, so those callers keep the selector and\n // node-walking paths below.\n //\n // Intentional asymmetry with `getElementByAttribute`: an empty id is *no id*\n // here (`@target=\"#\"` must resolve to nothing rather than to whichever\n // element happens to carry an `id` first), while an empty value passed to\n // `getElementByAttribute` is a value like any other and is matched\n // literally. Both receivers are reachable, so the two exports disagree by\n // design, not by oversight.\n if (typeof (doc as Document).getElementById === 'function') {\n return id ? (doc as Document).getElementById(id) : null;\n }\n\n return getElementByAttribute(doc, 'id', id);\n}\n\nexport function getElementByAttribute(\n doc: Document | Element,\n attribute: string,\n value: string | undefined = undefined\n): null | Element {\n // Only an omitted value means \"any element carrying this attribute\". An\n // empty string is a value like any other and is matched literally —\n // otherwise `@target=\"#\"` would portal into whatever element happens to\n // carry an `id` first.\n const hasValue = typeof value !== 'undefined';\n\n if (doc.querySelector) {\n if (hasValue) {\n return doc.querySelector(\n `[${attribute}=\"${escapeAttributeValue(value as string)}\"]`\n );\n } else {\n return doc.querySelector(`[${attribute}]`);\n }\n }\n\n let nodes = childNodesOfElement(doc);\n let node;\n\n while (nodes.length) {\n node = nodes.shift();\n\n if (node && isElement(node)) {\n if (hasValue && node.getAttribute(attribute) === value) {\n return node as Element;\n } else if (!hasValue && node.getAttribute(attribute)) {\n return node as Element;\n }\n }\n\n nodes = childNodesOfElement(node).concat(nodes);\n }\n\n return null;\n}\n\nfunction isElement(el: Node | Element): el is Element {\n // @ts-expect-error checking if is an element\n return typeof el.getAttribute == 'function';\n}\n"],"names":["getDOM","context","document","container","getOwner","documentService","lookup","childNodesOfElement","element","children","child","firstChild","push","nextSibling","CONTROL_CHARACTERS","escapeAttributeValue","value","replace","char","charCodeAt","toString","getElementById","doc","id","getElementByAttribute","attribute","undefined","hasValue","querySelector","nodes","node","length","shift","isElement","getAttribute","concat","el"],"mappings":"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
|
|
1
|
+
{"version":3,"file":"dom-cKWVvtkd.js","sources":["../src/-private/dom.ts"],"sourcesContent":["import { getOwner } from '@ember/owner';\n\nexport function getDOM(context: object): Document | null {\n if (typeof document !== 'undefined') {\n return document;\n }\n\n const container = getOwner(context);\n if (!container) {\n return null;\n }\n const documentService = container.lookup('service:-document');\n\n if (documentService) {\n return documentService as Document;\n }\n return null;\n}\n\nfunction childNodesOfElement(\n element: Node | Element | null | undefined\n): (Node | Element)[] {\n if (!element) {\n return [];\n }\n\n const children = [];\n let child = element.firstChild;\n while (child) {\n children.push(child);\n child = child.nextSibling;\n }\n return children;\n}\n\n// eslint-disable-next-line no-control-regex\nconst CONTROL_CHARACTERS = /[\\u0000-\\u001f\\u007f]/g;\n\n/**\n * Escapes a value for use inside a *quoted* attribute selector.\n *\n * Values reaching here come from consumers — `Portal @target=\"#some-id\"`, a\n * portal target name — and an id is only required to be non-empty and free of\n * whitespace, so plenty of legal ids (`1foo`, `user.email`, `a:b`) are not\n * valid CSS identifiers. Interpolating them raw either throws a `SyntaxError`\n * and takes the render down, or, for a crafted value like\n * `x], [data-portal-target`, closes the predicate and matches something else\n * entirely.\n *\n * `CSS.escape` would also work here, but it escapes for the *identifier*\n * grammar while every call site interpolates into a *quoted string*\n * (`[attr=\"…\"]`). Two escapers for two grammars in one function is a trap\n * even though both happen to round-trip, and `CSS.escape` is a browser global\n * this module cannot rely on — it also runs against the `-document` service\n * when the app is prerendered. So there is one hand-rolled escaper, complete\n * for the quoted-string position and exercised by every caller on every\n * platform:\n *\n * - `\"` and `\\` are escaped with a backslash; they are the only characters a\n * quoted string cannot carry literally.\n * - Control characters — newline (`\\a`), carriage return (`\\d`), form feed\n * (`\\c`) among them — cannot appear literally in a CSS string either, and\n * get the hex escape the grammar defines, always with the terminating space\n * so the following character is never absorbed into the escape. Substituting\n * a different character for them (a space, say) would silently query for a\n * *different* value and match the wrong element, or none, with no error.\n */\nfunction escapeAttributeValue(value: string): string {\n return value\n .replace(/[\"\\\\]/g, '\\\\$&')\n .replace(\n CONTROL_CHARACTERS,\n (char) => `\\\\${char.charCodeAt(0).toString(16)} `\n );\n}\n\nexport function getElementById(\n doc: Document | Element,\n id: string\n): null | Element {\n // `Document` (and the `-document` service standing in for it) can answer\n // this without a selector at all, which sidesteps escaping entirely.\n // `Element` has no `getElementById`, so those callers keep the selector and\n // node-walking paths below.\n //\n // Intentional asymmetry with `getElementByAttribute`: an empty id is *no id*\n // here (`@target=\"#\"` must resolve to nothing rather than to whichever\n // element happens to carry an `id` first), while an empty value passed to\n // `getElementByAttribute` is a value like any other and is matched\n // literally. Both receivers are reachable, so the two exports disagree by\n // design, not by oversight.\n if (typeof (doc as Document).getElementById === 'function') {\n return id ? (doc as Document).getElementById(id) : null;\n }\n\n return getElementByAttribute(doc, 'id', id);\n}\n\nexport function getElementByAttribute(\n doc: Document | Element,\n attribute: string,\n value: string | undefined = undefined\n): null | Element {\n // Only an omitted value means \"any element carrying this attribute\". An\n // empty string is a value like any other and is matched literally —\n // otherwise `@target=\"#\"` would portal into whatever element happens to\n // carry an `id` first.\n const hasValue = typeof value !== 'undefined';\n\n if (doc.querySelector) {\n if (hasValue) {\n return doc.querySelector(\n `[${attribute}=\"${escapeAttributeValue(value as string)}\"]`\n );\n } else {\n return doc.querySelector(`[${attribute}]`);\n }\n }\n\n let nodes = childNodesOfElement(doc);\n let node;\n\n while (nodes.length) {\n node = nodes.shift();\n\n if (node && isElement(node)) {\n if (hasValue && node.getAttribute(attribute) === value) {\n return node as Element;\n } else if (!hasValue && node.getAttribute(attribute)) {\n return node as Element;\n }\n }\n\n nodes = childNodesOfElement(node).concat(nodes);\n }\n\n return null;\n}\n\nfunction isElement(el: Node | Element): el is Element {\n // @ts-expect-error checking if is an element\n return typeof el.getAttribute == 'function';\n}\n"],"names":["getDOM","context","document","container","getOwner","documentService","lookup","childNodesOfElement","element","children","child","firstChild","push","nextSibling","CONTROL_CHARACTERS","escapeAttributeValue","value","replace","char","charCodeAt","toString","getElementById","doc","id","getElementByAttribute","attribute","undefined","hasValue","querySelector","nodes","node","length","shift","isElement","getAttribute","concat","el"],"mappings":"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"}
|
package/dist/forms.js
CHANGED
|
@@ -15,6 +15,8 @@ export { Radio } from './components/forms/radio.js';
|
|
|
15
15
|
export { RadioGroup } from './components/forms/radio-group.js';
|
|
16
16
|
export { FormControl } from './components/forms/form-control.js';
|
|
17
17
|
export { Switch } from './components/forms/switch.js';
|
|
18
|
+
export { DatePicker } from './components/forms/date-picker/date-picker.js';
|
|
19
|
+
export { formatValue, isEmptyValue, parseDate, parseRange, toWire } from './components/forms/date-picker/value.js';
|
|
18
20
|
export { StandardValidator } from './utils/standard-validator.js';
|
|
19
21
|
export { deepEqual, flattenData, hasNestedData, unflattenData } from './utils/nested-data.js';
|
|
20
22
|
//# sourceMappingURL=forms.js.map
|
package/dist/forms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forms.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
2
|
+
import { setComponentTemplate } from '@ember/component';
|
|
3
|
+
import templateOnly from '@ember/component/template-only';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Icon components shared across Frontile components (buttons, forms,
|
|
7
|
+
* disclosure, navigation, collections, status/notifications). Kept in one
|
|
8
|
+
* place to avoid duplicating the same SVG in multiple component folders.
|
|
9
|
+
*/
|
|
10
|
+
const ChevronDownIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m19.5 8.25-7.5 7.5-7.5-7.5\" />\n</svg>", {
|
|
11
|
+
strictMode: true
|
|
12
|
+
}), templateOnly());
|
|
13
|
+
const ChevronUpIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m4.5 15.75 7.5-7.5 7.5 7.5\" />\n</svg>", {
|
|
14
|
+
strictMode: true
|
|
15
|
+
}), templateOnly());
|
|
16
|
+
const ChevronLeftIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 19.5 8.25 12l7.5-7.5\" />\n</svg>", {
|
|
17
|
+
strictMode: true
|
|
18
|
+
}), templateOnly());
|
|
19
|
+
const ChevronRightIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m8.25 4.5 7.5 7.5-7.5 7.5\" />\n</svg>", {
|
|
20
|
+
strictMode: true
|
|
21
|
+
}), templateOnly());
|
|
22
|
+
const ChevronDoubleLeftIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5\" />\n</svg>", {
|
|
23
|
+
strictMode: true
|
|
24
|
+
}), templateOnly());
|
|
25
|
+
const ChevronDoubleRightIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5\" />\n</svg>", {
|
|
26
|
+
strictMode: true
|
|
27
|
+
}), templateOnly());
|
|
28
|
+
const IconChevronUpDown = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9\" />\n</svg>", {
|
|
29
|
+
strictMode: true
|
|
30
|
+
}), templateOnly());
|
|
31
|
+
const IconCalendar = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0V11.25A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5\" />\n</svg>", {
|
|
32
|
+
strictMode: true
|
|
33
|
+
}), templateOnly());
|
|
34
|
+
const ColumnVisibilityIcon = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z\" />\n</svg>", {
|
|
35
|
+
strictMode: true
|
|
36
|
+
}), templateOnly());
|
|
37
|
+
const IconInfo = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" data-test-icon=\"info\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M11.25 11.25h.75v4.5h.75M12 8.25h.008v.008H12V8.25ZM21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />\n</svg>", {
|
|
38
|
+
strictMode: true
|
|
39
|
+
}), templateOnly());
|
|
40
|
+
const IconSuccess = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" data-test-icon=\"success\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />\n</svg>", {
|
|
41
|
+
strictMode: true
|
|
42
|
+
}), templateOnly());
|
|
43
|
+
const IconWarning = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" data-test-icon=\"warning\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z\" />\n</svg>", {
|
|
44
|
+
strictMode: true
|
|
45
|
+
}), templateOnly());
|
|
46
|
+
const IconDanger = setComponentTemplate(precompileTemplate("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" data-test-icon=\"danger\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />\n</svg>", {
|
|
47
|
+
strictMode: true
|
|
48
|
+
}), templateOnly());
|
|
49
|
+
|
|
50
|
+
export { ColumnVisibilityIcon as C, IconChevronUpDown as I, ChevronDownIcon as a, ChevronUpIcon as b, ChevronRightIcon as c, ChevronLeftIcon as d, IconCalendar as e, ChevronDoubleRightIcon as f, ChevronDoubleLeftIcon as g, IconDanger as h, IconWarning as i, IconSuccess as j, IconInfo as k };
|
|
51
|
+
//# sourceMappingURL=icons-DZ61nCzv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-DZ61nCzv.js","sources":["../src/-private/icons.gts"],"sourcesContent":["/**\n * Icon components shared across Frontile components (buttons, forms,\n * disclosure, navigation, collections, status/notifications). Kept in one\n * place to avoid duplicating the same SVG in multiple component folders.\n */\nimport type { TOC } from '@ember/component/template-only';\n\nexport interface IconSignature {\n Element: SVGElement;\n}\n\nexport const ChevronDownIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m19.5 8.25-7.5 7.5-7.5-7.5\"\n />\n </svg>\n</template>;\n\nexport const ChevronUpIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m4.5 15.75 7.5-7.5 7.5 7.5\"\n />\n </svg>\n</template>;\n\nexport const ChevronLeftIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 19.5 8.25 12l7.5-7.5\"\n />\n </svg>\n</template>;\n\nexport const ChevronRightIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m8.25 4.5 7.5 7.5-7.5 7.5\"\n />\n </svg>\n</template>;\n\nexport const ChevronDoubleLeftIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5\"\n />\n </svg>\n</template>;\n\nexport const ChevronDoubleRightIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5\"\n />\n </svg>\n</template>;\n\nexport const IconChevronUpDown: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9\"\n />\n </svg>\n</template>;\n\nexport const IconCalendar: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0V11.25A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5\"\n />\n </svg>\n</template>;\n\nexport const ColumnVisibilityIcon: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z\"\n />\n </svg>\n</template>;\n\nexport const IconInfo: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-test-icon=\"info\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M11.25 11.25h.75v4.5h.75M12 8.25h.008v.008H12V8.25ZM21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n />\n </svg>\n</template>;\n\nexport const IconSuccess: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-test-icon=\"success\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n />\n </svg>\n</template>;\n\nexport const IconWarning: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-test-icon=\"warning\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z\"\n />\n </svg>\n</template>;\n\nexport const IconDanger: TOC<IconSignature> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-test-icon=\"danger\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n />\n </svg>\n</template>;\n"],"names":["ChevronDownIcon","setComponentTemplate","precompileTemplate","strictMode","templateOnly","ChevronUpIcon","ChevronLeftIcon","ChevronRightIcon","ChevronDoubleLeftIcon","ChevronDoubleRightIcon","IconChevronUpDown","IconCalendar","ColumnVisibilityIcon","IconInfo","IconSuccess","IconWarning","IconDanger"],"mappings":";;;;AAAA;;;;;MAWaA,eAAqB,GAAAC,oBAAA,CAAiBC,kBAAA,CAAA,wQAAA,EAgBnD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGC,aAAmB,GAAAJ,oBAAA,CAAiBC,kBAAA,CAAA,wQAAA,EAgBjD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGE,eAAqB,GAAAL,oBAAA,CAAiBC,kBAAA,CAAA,yQAAA,EAgBnD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGG,gBAAsB,GAAAN,oBAAA,CAAiBC,kBAAA,CAAA,uQAAA,EAgBpD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGI,qBAA2B,GAAAP,oBAAA,CAAiBC,kBAAA,CAAA,8RAAA,EAgBzD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGK,sBAA4B,GAAAR,oBAAA,CAAiBC,kBAAA,CAAA,4RAAA,EAgB1D;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGM,iBAAuB,GAAAT,oBAAA,CAAiBC,kBAAA,CAAA,+RAAA,EAgBrD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGO,YAAkB,GAAAV,oBAAA,CAAiBC,kBAAA,CAAA,gdAAA,EAgBhD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGQ,oBAA0B,GAAAX,oBAAA,CAAiBC,kBAAA,CAAA,gYAAA,EAexD;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGS,QAAc,GAAAZ,oBAAA,CAAiBC,kBAAA,CAAA,8VAAA,EAiB5C;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGU,WAAiB,GAAAb,oBAAA,CAAiBC,kBAAA,CAAA,uUAAA,EAiB/C;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGW,WAAiB,GAAAd,oBAAA,CAAiBC,kBAAA,CAAA,ybAAA,EAiB/C;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;MAEGY,UAAgB,GAAAf,oBAAA,CAAiBC,kBAAA,CAAA,6UAAA,EAiB9C;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;"}
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,8 @@ export { Radio } from './components/forms/radio.js';
|
|
|
32
32
|
export { RadioGroup } from './components/forms/radio-group.js';
|
|
33
33
|
export { FormControl } from './components/forms/form-control.js';
|
|
34
34
|
export { Switch } from './components/forms/switch.js';
|
|
35
|
+
export { DatePicker } from './components/forms/date-picker/date-picker.js';
|
|
36
|
+
export { formatValue, isEmptyValue, parseDate, parseRange, toWire } from './components/forms/date-picker/value.js';
|
|
35
37
|
export { StandardValidator } from './utils/standard-validator.js';
|
|
36
38
|
export { deepEqual, flattenData, hasNestedData, unflattenData } from './utils/nested-data.js';
|
|
37
39
|
export { Overlay } from './components/overlays/overlay.js';
|
|
@@ -59,7 +61,7 @@ export { Kbd } from './components/utilities/kbd.js';
|
|
|
59
61
|
export { isApplePlatform, parseKeys, resolveKbdPlatform, setKbdPlatform } from './utils/keys.js';
|
|
60
62
|
export { Skeleton } from './components/utilities/skeleton.js';
|
|
61
63
|
export { Spinner } from './components/utilities/spinner.js';
|
|
62
|
-
export { ref } from './utils/ref.js';
|
|
64
|
+
export { Ref, ref } from './utils/ref.js';
|
|
63
65
|
export { toggleState } from './utils/toggle.js';
|
|
64
66
|
export { READY_ATTRIBUTE, selectionIndicator } from './utils/selection-indicator.js';
|
|
65
67
|
export { rovingFocus } from './utils/roving-focus.js';
|
|
@@ -75,9 +77,9 @@ export { Pagination } from './components/navigation/pagination/pagination.js';
|
|
|
75
77
|
export { paginationRange } from './components/navigation/pagination/range.js';
|
|
76
78
|
export { Accordion } from './components/disclosure/accordion/accordion.js';
|
|
77
79
|
export { AccordionItem } from './components/disclosure/accordion/item.js';
|
|
78
|
-
import './manager-
|
|
80
|
+
import './manager-jDaRVZ5o.js';
|
|
79
81
|
import '@ember/service';
|
|
80
|
-
export { N as NotificationCard } from './notification-card-
|
|
82
|
+
export { N as NotificationCard } from './notification-card-dz-eE6z9.js';
|
|
81
83
|
export { NotificationsContainer } from './components/notifications/notifications-container.js';
|
|
82
84
|
export { ListboxGroup } from './components/collections/listbox/group.js';
|
|
83
85
|
export { ListboxItem } from './components/collections/listbox/item.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,6 @@ import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMe
|
|
|
6
6
|
import { getOwner } from '@ember/owner';
|
|
7
7
|
import { isDestroyed } from '@ember/destroyable';
|
|
8
8
|
|
|
9
|
-
/* eslint-disable ember/no-runloop */
|
|
10
9
|
class Timer {
|
|
11
10
|
static {
|
|
12
11
|
decorateFieldV2(this.prototype, "remaining", [tracked]);
|
|
@@ -88,10 +87,10 @@ function toContent(content) {
|
|
|
88
87
|
/**
|
|
89
88
|
* Emit the shared deprecation notice and remap `error` onto `danger`. Used
|
|
90
89
|
* for both the option-level and config-level `appearance` fallbacks in
|
|
91
|
-
* `
|
|
90
|
+
* `resolveStatus`, which must apply the same remap.
|
|
92
91
|
*/
|
|
93
92
|
function mapAppearance(appearance) {
|
|
94
|
-
deprecate('The `appearance` option for notifications is deprecated. Use `
|
|
93
|
+
deprecate('The `appearance` option for notifications is deprecated. Use `status` instead, and `danger` in place of `error`.', false, {
|
|
95
94
|
id: 'frontile.notification-appearance',
|
|
96
95
|
until: '0.19.0',
|
|
97
96
|
for: 'frontile',
|
|
@@ -100,30 +99,33 @@ function mapAppearance(appearance) {
|
|
|
100
99
|
enabled: '0.18.0'
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
|
-
|
|
102
|
+
if (appearance === 'error') return 'danger';
|
|
103
|
+
// `info` folded into `primary` when the axis became `status`.
|
|
104
|
+
if (appearance === 'info') return 'primary';
|
|
105
|
+
return appearance;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
|
-
* Resolve the notification
|
|
109
|
+
* Resolve the notification status from the current option, the deprecated
|
|
108
110
|
* `appearance` option, and the app config, in that order.
|
|
109
111
|
*/
|
|
110
|
-
function
|
|
111
|
-
if (options.
|
|
112
|
-
return options.
|
|
112
|
+
function resolveStatus(config, options) {
|
|
113
|
+
if (options.status) {
|
|
114
|
+
return options.status;
|
|
113
115
|
}
|
|
114
116
|
if (options.appearance) {
|
|
115
117
|
return mapAppearance(options.appearance);
|
|
116
118
|
}
|
|
117
|
-
if (config.
|
|
118
|
-
return config.
|
|
119
|
+
if (config.status) {
|
|
120
|
+
return config.status;
|
|
119
121
|
}
|
|
120
122
|
if (config.appearance) {
|
|
121
123
|
return mapAppearance(config.appearance);
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
// `config.
|
|
126
|
+
// `config.status`/`config.appearance` were already read directly above, so
|
|
125
127
|
// there is no distinct config lookup left to fall back to.
|
|
126
|
-
return '
|
|
128
|
+
return 'neutral';
|
|
127
129
|
}
|
|
128
130
|
class Notification {
|
|
129
131
|
static {
|
|
@@ -139,9 +141,9 @@ class Notification {
|
|
|
139
141
|
}
|
|
140
142
|
#description = (initializeDeferredDecorator(this, "description"), void 0);
|
|
141
143
|
static {
|
|
142
|
-
decorateFieldV2(this.prototype, "
|
|
144
|
+
decorateFieldV2(this.prototype, "status", [tracked]);
|
|
143
145
|
}
|
|
144
|
-
#
|
|
146
|
+
#status = (initializeDeferredDecorator(this, "status"), void 0);
|
|
145
147
|
static {
|
|
146
148
|
decorateFieldV2(this.prototype, "allowClosing", [tracked]);
|
|
147
149
|
}
|
|
@@ -177,7 +179,7 @@ class Notification {
|
|
|
177
179
|
// An object content form owns the description outright; the option is only
|
|
178
180
|
// a convenience for the string form.
|
|
179
181
|
this.description = typeof content === 'string' ? options.description : description;
|
|
180
|
-
this.
|
|
182
|
+
this.status = resolveStatus(config, options);
|
|
181
183
|
this.isLoading = options.isLoading === true;
|
|
182
184
|
this.hideIcon = options.hideIcon === true;
|
|
183
185
|
this.customActions = options.customActions;
|
|
@@ -193,16 +195,19 @@ class Notification {
|
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
/**
|
|
196
|
-
* @deprecated Read `
|
|
198
|
+
* @deprecated Read `status` instead.
|
|
197
199
|
*
|
|
198
200
|
* The return type is widened to include `'default'` because `default` is
|
|
199
201
|
* new vocabulary introduced alongside this getter's deprecation — it has
|
|
200
202
|
* no equivalent in the old `NotificationAppearance` names, so mapping it
|
|
201
|
-
* onto `'info'` here would silently lie about the notification's
|
|
203
|
+
* onto `'info'` here would silently lie about the notification's status.
|
|
202
204
|
* Everything else keeps the old four-value shape.
|
|
203
205
|
*/
|
|
204
206
|
get appearance() {
|
|
205
|
-
|
|
207
|
+
if (this.status === 'danger') return 'error';
|
|
208
|
+
if (this.status === 'neutral') return 'default';
|
|
209
|
+
if (this.status === 'primary') return 'info';
|
|
210
|
+
return this.status;
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
/**
|
|
@@ -217,8 +222,8 @@ class Notification {
|
|
|
217
222
|
if (typeof changes.description !== 'undefined') {
|
|
218
223
|
this.description = changes.description;
|
|
219
224
|
}
|
|
220
|
-
if (typeof changes.
|
|
221
|
-
this.
|
|
225
|
+
if (typeof changes.status !== 'undefined') {
|
|
226
|
+
this.status = changes.status;
|
|
222
227
|
}
|
|
223
228
|
if (typeof changes.allowClosing !== 'undefined') {
|
|
224
229
|
this.allowClosing = changes.allowClosing;
|
|
@@ -235,7 +240,6 @@ class Notification {
|
|
|
235
240
|
}
|
|
236
241
|
}
|
|
237
242
|
|
|
238
|
-
/* eslint-disable ember/no-runloop */
|
|
239
243
|
function resolveMessage(message, value) {
|
|
240
244
|
const resolved = typeof message === 'function' ? message(value) : message;
|
|
241
245
|
return typeof resolved === 'string' ? {
|
|
@@ -310,7 +314,7 @@ class NotificationsManager {
|
|
|
310
314
|
allowClosing: false,
|
|
311
315
|
isLoading: true
|
|
312
316
|
});
|
|
313
|
-
const settle = (content,
|
|
317
|
+
const settle = (content, status) => {
|
|
314
318
|
// The user may have dismissed the toast before the promise settled; in
|
|
315
319
|
// that case there is nothing left to update.
|
|
316
320
|
if (notification.isRemoving) {
|
|
@@ -325,7 +329,7 @@ class NotificationsManager {
|
|
|
325
329
|
// `description` key at all) would leave the loading phase's stale
|
|
326
330
|
// description on screen instead of clearing it.
|
|
327
331
|
description: content.description ?? '',
|
|
328
|
-
|
|
332
|
+
status,
|
|
329
333
|
allowClosing: true,
|
|
330
334
|
isLoading: false
|
|
331
335
|
});
|
|
@@ -385,4 +389,4 @@ class NotificationsManager {
|
|
|
385
389
|
}
|
|
386
390
|
|
|
387
391
|
export { Notification as N, Timer as T, NotificationsManager as a };
|
|
388
|
-
//# sourceMappingURL=manager-
|
|
392
|
+
//# sourceMappingURL=manager-jDaRVZ5o.js.map
|