frontile 0.18.0-alpha.9 → 0.18.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declarations/-private/control-blur.d.ts +63 -0
- package/declarations/-private/dialog.d.ts +15 -0
- package/declarations/-private/intent-icons.d.ts +9 -0
- package/declarations/-private/manager.d.ts +10 -3
- package/declarations/-private/notification-stack.d.ts +76 -0
- package/declarations/-private/notification.d.ts +33 -8
- package/declarations/-private/types.d.ts +69 -3
- package/declarations/components/buttons/button.d.ts +30 -1
- package/declarations/components/buttons/chip.d.ts +36 -5
- package/declarations/components/buttons/index.d.ts +1 -0
- package/declarations/components/buttons/segmented-control/item.d.ts +50 -0
- package/declarations/components/buttons/segmented-control/segmented-control.d.ts +210 -0
- package/declarations/components/buttons/segmented-control.d.ts +3 -0
- package/declarations/components/collections/calendar/calendar.d.ts +585 -0
- package/declarations/components/collections/calendar/day-cell.d.ts +19 -0
- package/declarations/components/collections/calendar/header.d.ts +56 -0
- package/declarations/components/collections/calendar/icons.d.ts +14 -0
- package/declarations/components/collections/calendar/month-grid.d.ts +36 -0
- package/declarations/components/collections/calendar/types.d.ts +94 -0
- package/declarations/components/collections/calendar/utils.d.ts +51 -0
- package/declarations/components/collections/calendar/year-grid.d.ts +32 -0
- package/declarations/components/collections/calendar.d.ts +3 -0
- package/declarations/components/collections/command/command.d.ts +195 -0
- package/declarations/components/collections/command/dialog.d.ts +44 -0
- package/declarations/components/collections/command/footer.d.ts +61 -0
- package/declarations/components/collections/command/index.d.ts +6 -0
- package/declarations/components/collections/command/input.d.ts +131 -0
- package/declarations/components/collections/command/list.d.ts +135 -0
- package/declarations/components/collections/command.d.ts +2 -0
- package/declarations/components/collections/dropdown/dropdown.d.ts +190 -0
- package/declarations/components/collections/dropdown/menu-context.d.ts +64 -0
- package/declarations/components/collections/dropdown/sub.d.ts +195 -0
- package/declarations/components/collections/dropdown.d.ts +2 -99
- package/declarations/components/collections/index.d.ts +2 -0
- package/declarations/components/collections/listbox/group.d.ts +62 -0
- package/declarations/components/collections/listbox/item.d.ts +90 -2
- package/declarations/components/collections/listbox/listbox.d.ts +38 -11
- package/declarations/components/collections/simple-table/body.d.ts +55 -2
- package/declarations/components/collections/simple-table/cell.d.ts +52 -0
- package/declarations/components/collections/simple-table/column.d.ts +52 -0
- package/declarations/components/collections/simple-table/footer.d.ts +52 -0
- package/declarations/components/collections/simple-table/header.d.ts +52 -0
- package/declarations/components/collections/simple-table/index.d.ts +52 -0
- package/declarations/components/collections/simple-table/row.d.ts +54 -1
- package/declarations/components/collections/table/column-visibility.d.ts +53 -1
- package/declarations/components/collections/table/sort-button.d.ts +52 -0
- package/declarations/components/collections/table/table.d.ts +83 -11
- package/declarations/components/collections/table/types.d.ts +15 -3
- package/declarations/components/collections/table/utils.d.ts +3 -3
- package/declarations/components/disclosure/accordion/accordion.d.ts +247 -0
- package/declarations/components/disclosure/accordion/item.d.ts +96 -0
- package/declarations/components/disclosure/accordion.d.ts +3 -0
- package/declarations/components/disclosure/icons.d.ts +9 -0
- package/declarations/components/disclosure/index.d.ts +1 -0
- package/declarations/components/forms/autocomplete.d.ts +57 -13
- package/declarations/components/forms/checkbox-group.d.ts +20 -0
- package/declarations/components/forms/checkbox.d.ts +22 -0
- package/declarations/components/forms/field.d.ts +2 -0
- package/declarations/components/forms/form-control.d.ts +54 -0
- package/declarations/components/forms/form-description.d.ts +12 -0
- package/declarations/components/forms/form-feedback.d.ts +43 -1
- package/declarations/components/forms/form.d.ts +5 -4
- package/declarations/components/forms/index.d.ts +1 -0
- package/declarations/components/forms/input-otp.d.ts +321 -0
- package/declarations/components/forms/input.d.ts +44 -1
- package/declarations/components/forms/label.d.ts +13 -0
- package/declarations/components/forms/native-select.d.ts +103 -6
- package/declarations/components/forms/radio-group.d.ts +21 -0
- package/declarations/components/forms/radio.d.ts +27 -0
- package/declarations/components/forms/select/end-content.d.ts +31 -0
- package/declarations/components/forms/select/native-mirror.d.ts +44 -0
- package/declarations/components/forms/select/select.d.ts +454 -0
- package/declarations/components/forms/select/selected-items.d.ts +80 -0
- package/declarations/components/forms/select/trigger.d.ts +81 -0
- package/declarations/components/forms/select/types.d.ts +431 -0
- package/declarations/components/forms/select.d.ts +2 -531
- package/declarations/components/forms/switch.d.ts +16 -16
- package/declarations/components/forms/textarea.d.ts +35 -0
- package/declarations/components/navigation/external-link.d.ts +94 -0
- package/declarations/components/navigation/index.d.ts +4 -0
- package/declarations/components/navigation/pagination/icons.d.ts +13 -0
- package/declarations/components/navigation/pagination/pagination.d.ts +279 -0
- package/declarations/components/navigation/pagination/range.d.ts +34 -0
- package/declarations/components/navigation/pagination.d.ts +3 -0
- package/declarations/components/navigation/tab-nav/item.d.ts +79 -0
- package/declarations/components/navigation/tab-nav/tab-nav.d.ts +165 -0
- package/declarations/components/navigation/tab-nav.d.ts +3 -0
- package/declarations/components/navigation/tabs/panel.d.ts +28 -0
- package/declarations/components/navigation/tabs/tab.d.ts +46 -0
- package/declarations/components/navigation/tabs/tabs.d.ts +227 -0
- package/declarations/components/navigation/tabs.d.ts +4 -0
- package/declarations/components/notifications/icons.d.ts +9 -0
- package/declarations/components/notifications/index.d.ts +6 -3
- package/declarations/components/notifications/notification-card.d.ts +63 -12
- package/declarations/components/notifications/notifications-container.d.ts +109 -7
- package/declarations/components/overlays/drawer/drag-handle.d.ts +26 -0
- package/declarations/components/overlays/drawer/header.d.ts +120 -1
- package/declarations/components/overlays/drawer/selectors.d.ts +22 -0
- package/declarations/components/overlays/drawer.d.ts +180 -12
- package/declarations/components/overlays/index.d.ts +3 -1
- package/declarations/components/overlays/modal/header.d.ts +14 -0
- package/declarations/components/overlays/modal.d.ts +35 -13
- package/declarations/components/overlays/mount-animation.d.ts +81 -0
- package/declarations/components/overlays/overlay.d.ts +59 -2
- package/declarations/components/overlays/popover.d.ts +292 -5
- package/declarations/components/overlays/portal-target.d.ts +5 -1
- package/declarations/components/overlays/tooltip.d.ts +401 -0
- package/declarations/components/status/alert.d.ts +134 -0
- package/declarations/components/status/index.d.ts +1 -0
- package/declarations/components/status/progress-bar.d.ts +28 -3
- package/declarations/components/utilities/avatar.d.ts +6 -6
- package/declarations/components/utilities/collapsible.d.ts +20 -1
- package/declarations/components/utilities/divider.d.ts +14 -0
- package/declarations/components/utilities/index.d.ts +6 -0
- package/declarations/components/utilities/kbd.d.ts +92 -0
- package/declarations/components/utilities/skeleton.d.ts +31 -0
- package/declarations/components/utilities/spinner.d.ts +8 -0
- package/declarations/disclosure.d.ts +1 -0
- package/declarations/index.d.ts +3 -1
- package/declarations/modifiers/drag-to-dismiss.d.ts +22 -0
- package/declarations/navigation.d.ts +1 -0
- package/declarations/services/notifications.d.ts +3 -2
- package/declarations/template-registry.d.ts +20 -6
- package/declarations/test-support.d.ts +1 -0
- package/declarations/utils/deferred-work.d.ts +24 -0
- package/declarations/utils/filter.d.ts +87 -0
- package/declarations/utils/keys.d.ts +52 -0
- package/declarations/utils/listManager.d.ts +92 -13
- package/declarations/utils/prefers-reduced-motion.d.ts +3 -0
- package/declarations/utils/roving-focus.d.ts +66 -0
- package/declarations/utils/safe-area.d.ts +52 -0
- package/declarations/utils/selection-indicator.d.ts +65 -0
- package/declarations/utils/standard-validator.d.ts +28 -3
- package/dist/buttons.js +2 -0
- package/dist/buttons.js.map +1 -1
- package/dist/collections.js +8 -1
- package/dist/collections.js.map +1 -1
- package/dist/components/buttons/button-group.js +1 -1
- package/dist/components/buttons/button-group.js.map +1 -1
- package/dist/components/buttons/button.js +72 -7
- package/dist/components/buttons/button.js.map +1 -1
- package/dist/components/buttons/chip.js +1 -1
- package/dist/components/buttons/chip.js.map +1 -1
- package/dist/components/buttons/close-button.js +3 -3
- package/dist/components/buttons/close-button.js.map +1 -1
- package/dist/components/buttons/index.js +2 -0
- package/dist/components/buttons/index.js.map +1 -1
- package/dist/components/buttons/segmented-control/item.js +55 -0
- package/dist/components/buttons/segmented-control/item.js.map +1 -0
- package/dist/components/buttons/segmented-control/segmented-control.js +175 -0
- package/dist/components/buttons/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/buttons/segmented-control.js +3 -0
- package/dist/components/buttons/segmented-control.js.map +1 -0
- package/dist/components/buttons/toggle-button.js +2 -2
- package/dist/components/buttons/toggle-button.js.map +1 -1
- package/dist/components/collections/calendar/calendar.js +808 -0
- package/dist/components/collections/calendar/calendar.js.map +1 -0
- package/dist/components/collections/calendar/day-cell.js +16 -0
- package/dist/components/collections/calendar/day-cell.js.map +1 -0
- package/dist/components/collections/calendar/header.js +48 -0
- package/dist/components/collections/calendar/header.js.map +1 -0
- package/dist/components/collections/calendar/icons.js +23 -0
- package/dist/components/collections/calendar/icons.js.map +1 -0
- package/dist/components/collections/calendar/month-grid.js +14 -0
- package/dist/components/collections/calendar/month-grid.js.map +1 -0
- package/dist/components/collections/calendar/types.js +2 -0
- package/dist/components/collections/calendar/types.js.map +1 -0
- package/dist/components/collections/calendar/utils.js +199 -0
- package/dist/components/collections/calendar/utils.js.map +1 -0
- package/dist/components/collections/calendar/year-grid.js +117 -0
- package/dist/components/collections/calendar/year-grid.js.map +1 -0
- package/dist/components/collections/calendar.js +2 -0
- package/dist/components/collections/calendar.js.map +1 -0
- package/dist/components/collections/command/command.js +263 -0
- package/dist/components/collections/command/command.js.map +1 -0
- package/dist/components/collections/command/dialog.js +100 -0
- package/dist/components/collections/command/dialog.js.map +1 -0
- package/dist/components/collections/command/footer.js +60 -0
- package/dist/components/collections/command/footer.js.map +1 -0
- package/dist/components/collections/command/index.js +6 -0
- package/dist/components/collections/command/index.js.map +1 -0
- package/dist/components/collections/command/input.js +45 -0
- package/dist/components/collections/command/input.js.map +1 -0
- package/dist/components/collections/command/list.js +70 -0
- package/dist/components/collections/command/list.js.map +1 -0
- package/dist/components/collections/command.js +6 -0
- package/dist/components/collections/command.js.map +1 -0
- package/dist/components/collections/dropdown/dropdown.js +206 -0
- package/dist/components/collections/dropdown/dropdown.js.map +1 -0
- package/dist/components/collections/dropdown/menu-context.js +62 -0
- package/dist/components/collections/dropdown/menu-context.js.map +1 -0
- package/dist/components/collections/dropdown/sub.js +256 -0
- package/dist/components/collections/dropdown/sub.js.map +1 -0
- package/dist/components/collections/dropdown.js +1 -93
- package/dist/components/collections/dropdown.js.map +1 -1
- package/dist/components/collections/index.js +8 -1
- package/dist/components/collections/index.js.map +1 -1
- package/dist/components/collections/listbox/group.js +60 -0
- package/dist/components/collections/listbox/group.js.map +1 -0
- package/dist/components/collections/listbox/item.js +102 -12
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/listbox/listbox.js +106 -28
- package/dist/components/collections/listbox/listbox.js.map +1 -1
- package/dist/components/collections/listbox.js +1 -0
- package/dist/components/collections/listbox.js.map +1 -1
- package/dist/components/collections/simple-table/body.js +1 -1
- package/dist/components/collections/simple-table/body.js.map +1 -1
- package/dist/components/collections/simple-table/cell.js +1 -1
- package/dist/components/collections/simple-table/cell.js.map +1 -1
- package/dist/components/collections/simple-table/column.js +1 -1
- package/dist/components/collections/simple-table/column.js.map +1 -1
- package/dist/components/collections/simple-table/footer.js +1 -1
- package/dist/components/collections/simple-table/footer.js.map +1 -1
- package/dist/components/collections/simple-table/header.js +1 -1
- package/dist/components/collections/simple-table/header.js.map +1 -1
- package/dist/components/collections/simple-table/index.js +1 -1
- package/dist/components/collections/simple-table/index.js.map +1 -1
- package/dist/components/collections/simple-table/row.js +1 -1
- package/dist/components/collections/simple-table/row.js.map +1 -1
- package/dist/components/collections/table/cell-default.js +1 -1
- package/dist/components/collections/table/cell-default.js.map +1 -1
- package/dist/components/collections/table/cell-for.js +1 -1
- package/dist/components/collections/table/cell-for.js.map +1 -1
- package/dist/components/collections/table/checkbox.js +2 -2
- package/dist/components/collections/table/checkbox.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +3 -3
- package/dist/components/collections/table/column-visibility.js.map +1 -1
- package/dist/components/collections/table/icons.js +3 -3
- package/dist/components/collections/table/icons.js.map +1 -1
- package/dist/components/collections/table/sort-button.js +2 -2
- package/dist/components/collections/table/sort-button.js.map +1 -1
- package/dist/components/collections/table/table.js +100 -54
- package/dist/components/collections/table/table.js.map +1 -1
- package/dist/components/collections/table/utils.js +1 -1
- package/dist/components/collections/table/utils.js.map +1 -1
- package/dist/components/disclosure/accordion/accordion.js +225 -0
- package/dist/components/disclosure/accordion/accordion.js.map +1 -0
- package/dist/components/disclosure/accordion/item.js +86 -0
- package/dist/components/disclosure/accordion/item.js.map +1 -0
- package/dist/components/disclosure/accordion.js +3 -0
- package/dist/components/disclosure/accordion.js.map +1 -0
- package/dist/components/disclosure/icons.js +13 -0
- package/dist/components/disclosure/icons.js.map +1 -0
- package/dist/components/disclosure/index.js +3 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/forms/autocomplete.js +44 -31
- package/dist/components/forms/autocomplete.js.map +1 -1
- package/dist/components/forms/checkbox-group.js +1 -1
- package/dist/components/forms/checkbox-group.js.map +1 -1
- package/dist/components/forms/checkbox.js +2 -2
- package/dist/components/forms/checkbox.js.map +1 -1
- package/dist/components/forms/field.js +5 -3
- package/dist/components/forms/field.js.map +1 -1
- package/dist/components/forms/form-control.js +12 -3
- package/dist/components/forms/form-control.js.map +1 -1
- package/dist/components/forms/form-description.js +1 -1
- package/dist/components/forms/form-description.js.map +1 -1
- package/dist/components/forms/form-feedback.js +25 -8
- package/dist/components/forms/form-feedback.js.map +1 -1
- package/dist/components/forms/form.js +13 -9
- package/dist/components/forms/form.js.map +1 -1
- package/dist/components/forms/icons.js +2 -2
- package/dist/components/forms/icons.js.map +1 -1
- package/dist/components/forms/index.js +3 -2
- package/dist/components/forms/index.js.map +1 -1
- package/dist/components/forms/input-otp.js +407 -0
- package/dist/components/forms/input-otp.js.map +1 -0
- package/dist/components/forms/input.js +34 -3
- package/dist/components/forms/input.js.map +1 -1
- package/dist/components/forms/label.js +1 -1
- package/dist/components/forms/label.js.map +1 -1
- package/dist/components/forms/native-select.js +3 -3
- package/dist/components/forms/native-select.js.map +1 -1
- package/dist/components/forms/radio-group.js +1 -1
- package/dist/components/forms/radio-group.js.map +1 -1
- package/dist/components/forms/radio.js +2 -2
- package/dist/components/forms/radio.js.map +1 -1
- package/dist/components/forms/select/end-content.js +24 -0
- package/dist/components/forms/select/end-content.js.map +1 -0
- package/dist/components/forms/select/native-mirror.js +29 -0
- package/dist/components/forms/select/native-mirror.js.map +1 -0
- package/dist/components/forms/select/select.js +629 -0
- package/dist/components/forms/select/select.js.map +1 -0
- package/dist/components/forms/select/selected-items.js +63 -0
- package/dist/components/forms/select/selected-items.js.map +1 -0
- package/dist/components/forms/select/trigger.js +30 -0
- package/dist/components/forms/select/trigger.js.map +1 -0
- package/dist/components/forms/select/types.js +2 -0
- package/dist/components/forms/select/types.js.map +1 -0
- package/dist/components/forms/select.js +1 -387
- package/dist/components/forms/select.js.map +1 -1
- package/dist/components/forms/switch.js +2 -2
- package/dist/components/forms/switch.js.map +1 -1
- package/dist/components/forms/textarea.js +2 -2
- package/dist/components/forms/textarea.js.map +1 -1
- package/dist/components/navigation/external-link.js +107 -0
- package/dist/components/navigation/external-link.js.map +1 -0
- package/dist/components/navigation/index.js +9 -0
- package/dist/components/navigation/index.js.map +1 -0
- package/dist/components/navigation/pagination/icons.js +23 -0
- package/dist/components/navigation/pagination/icons.js.map +1 -0
- package/dist/components/navigation/pagination/pagination.js +216 -0
- package/dist/components/navigation/pagination/pagination.js.map +1 -0
- package/dist/components/navigation/pagination/range.js +58 -0
- package/dist/components/navigation/pagination/range.js.map +1 -0
- package/dist/components/navigation/pagination.js +3 -0
- package/dist/components/navigation/pagination.js.map +1 -0
- package/dist/components/navigation/tab-nav/item.js +90 -0
- package/dist/components/navigation/tab-nav/item.js.map +1 -0
- package/dist/components/navigation/tab-nav/tab-nav.js +79 -0
- package/dist/components/navigation/tab-nav/tab-nav.js.map +1 -0
- package/dist/components/navigation/tab-nav.js +3 -0
- package/dist/components/navigation/tab-nav.js.map +1 -0
- package/dist/components/navigation/tabs/panel.js +23 -0
- package/dist/components/navigation/tabs/panel.js.map +1 -0
- package/dist/components/navigation/tabs/tab.js +45 -0
- package/dist/components/navigation/tabs/tab.js.map +1 -0
- package/dist/components/navigation/tabs/tabs.js +156 -0
- package/dist/components/navigation/tabs/tabs.js.map +1 -0
- package/dist/components/navigation/tabs.js +4 -0
- package/dist/components/navigation/tabs.js.map +1 -0
- package/dist/components/notifications/index.js +2 -2
- package/dist/components/notifications/notification-card.js +15 -108
- package/dist/components/notifications/notification-card.js.map +1 -1
- package/dist/components/notifications/notifications-container.js +231 -23
- 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 +1 -1
- package/dist/components/overlays/drawer/body.js.map +1 -1
- package/dist/components/overlays/drawer/drag-handle.js +18 -0
- package/dist/components/overlays/drawer/drag-handle.js.map +1 -0
- package/dist/components/overlays/drawer/footer.js +1 -1
- package/dist/components/overlays/drawer/footer.js.map +1 -1
- package/dist/components/overlays/drawer/header.js +46 -3
- package/dist/components/overlays/drawer/header.js.map +1 -1
- package/dist/components/overlays/drawer/selectors.js +29 -0
- package/dist/components/overlays/drawer/selectors.js.map +1 -0
- package/dist/components/overlays/drawer.js +116 -2
- package/dist/components/overlays/drawer.js.map +1 -1
- package/dist/components/overlays/index.js +5 -3
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/overlays/modal/body.js +1 -1
- package/dist/components/overlays/modal/body.js.map +1 -1
- package/dist/components/overlays/modal/footer.js +1 -1
- package/dist/components/overlays/modal/footer.js.map +1 -1
- package/dist/components/overlays/modal/header.js +8 -1
- package/dist/components/overlays/modal/header.js.map +1 -1
- package/dist/components/overlays/modal.js +69 -1
- package/dist/components/overlays/modal.js.map +1 -1
- package/dist/components/overlays/mount-animation.js +146 -0
- package/dist/components/overlays/mount-animation.js.map +1 -0
- package/dist/components/overlays/overlay.js +139 -24
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/overlays/popover.js +451 -36
- package/dist/components/overlays/popover.js.map +1 -1
- package/dist/components/overlays/portal-target.js +1 -1
- package/dist/components/overlays/portal-target.js.map +1 -1
- package/dist/components/overlays/portal.js +110 -8
- package/dist/components/overlays/portal.js.map +1 -1
- package/dist/components/overlays/tooltip.js +377 -0
- package/dist/components/overlays/tooltip.js.map +1 -0
- package/dist/components/status/alert.js +146 -0
- package/dist/components/status/alert.js.map +1 -0
- package/dist/components/status/index.js +1 -0
- package/dist/components/status/index.js.map +1 -1
- package/dist/components/status/progress-bar.js +47 -6
- package/dist/components/status/progress-bar.js.map +1 -1
- package/dist/components/utilities/avatar.js +1 -1
- package/dist/components/utilities/avatar.js.map +1 -1
- package/dist/components/utilities/collapsible.js +110 -12
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/components/utilities/divider.js +8 -2
- package/dist/components/utilities/divider.js.map +1 -1
- package/dist/components/utilities/index.js +7 -1
- package/dist/components/utilities/index.js.map +1 -1
- package/dist/components/utilities/kbd.js +88 -0
- package/dist/components/utilities/kbd.js.map +1 -0
- package/dist/components/utilities/skeleton.js +14 -0
- package/dist/components/utilities/skeleton.js.map +1 -0
- package/dist/components/utilities/spinner.js +1 -1
- package/dist/components/utilities/spinner.js.map +1 -1
- package/dist/components/utilities/visually-hidden.js +1 -1
- package/dist/components/utilities/visually-hidden.js.map +1 -1
- package/dist/control-blur-C8OnSQR5.js +124 -0
- package/dist/control-blur-C8OnSQR5.js.map +1 -0
- package/dist/dialog-CreV7aPQ.js +27 -0
- package/dist/dialog-CreV7aPQ.js.map +1 -0
- package/dist/disclosure.js +3 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/dom-cKWVvtkd.js +116 -0
- package/dist/dom-cKWVvtkd.js.map +1 -0
- package/dist/forms.js +3 -2
- package/dist/forms.js.map +1 -1
- package/dist/index.js +38 -9
- package/dist/index.js.map +1 -1
- package/dist/intent-icons-DpEViO8C.js +19 -0
- package/dist/intent-icons-DpEViO8C.js.map +1 -0
- package/dist/manager-CDIZzrQ9.js +388 -0
- package/dist/manager-CDIZzrQ9.js.map +1 -0
- package/dist/modifiers/drag-to-dismiss.js +392 -0
- package/dist/modifiers/drag-to-dismiss.js.map +1 -0
- package/dist/modifiers/press.js +51 -16
- package/dist/modifiers/press.js.map +1 -1
- package/dist/navigation.js +9 -0
- package/dist/navigation.js.map +1 -0
- package/dist/notification-card-D5fd-Sxa.js +330 -0
- package/dist/notification-card-D5fd-Sxa.js.map +1 -0
- package/dist/notifications.js +2 -2
- package/dist/overlays.js +5 -3
- package/dist/overlays.js.map +1 -1
- package/dist/{runtime-BPCpkOf1-B5Lbloj7.js → runtime--fcdnjmJ-BOdRhmsS.js} +2 -2
- package/dist/runtime--fcdnjmJ-BOdRhmsS.js.map +1 -0
- package/dist/services/notifications.js +6 -3
- package/dist/services/notifications.js.map +1 -1
- package/dist/status.js +1 -0
- package/dist/status.js.map +1 -1
- package/dist/test-support.js +10 -31
- package/dist/test-support.js.map +1 -1
- package/dist/utilities.js +7 -1
- package/dist/utilities.js.map +1 -1
- package/dist/utils/deferred-work.js +66 -0
- package/dist/utils/deferred-work.js.map +1 -0
- package/dist/utils/filter.js +166 -0
- package/dist/utils/filter.js.map +1 -0
- package/dist/utils/keys.js +259 -0
- package/dist/utils/keys.js.map +1 -0
- package/dist/utils/listManager.js +486 -109
- package/dist/utils/listManager.js.map +1 -1
- package/dist/utils/nested-data.js +60 -1
- package/dist/utils/nested-data.js.map +1 -1
- package/dist/utils/prefers-reduced-motion.js +21 -0
- package/dist/utils/prefers-reduced-motion.js.map +1 -0
- package/dist/utils/ref.js +1 -1
- package/dist/utils/ref.js.map +1 -1
- package/dist/utils/roving-focus.js +206 -0
- package/dist/utils/roving-focus.js.map +1 -0
- package/dist/utils/safe-area.js +133 -0
- package/dist/utils/safe-area.js.map +1 -0
- package/dist/utils/selection-indicator.js +189 -0
- package/dist/utils/selection-indicator.js.map +1 -0
- package/dist/utils/standard-validator.js +36 -6
- package/dist/utils/standard-validator.js.map +1 -1
- package/dist/utils/toggle.js +1 -1
- package/dist/utils/toggle.js.map +1 -1
- package/package.json +33 -22
- package/dist/manager-C1Vyhk-A.js +0 -175
- package/dist/manager-C1Vyhk-A.js.map +0 -1
- package/dist/portal-BTKv9EEY.js +0 -168
- package/dist/portal-BTKv9EEY.js.map +0 -1
- package/dist/runtime-BPCpkOf1-B5Lbloj7.js.map +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type SlotsToClasses } from '@frontile/theme';
|
|
3
|
+
import AccordionItem from './item';
|
|
4
|
+
import type { AccordionSlots, AccordionVariants } from '@frontile/theme';
|
|
5
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
6
|
+
type HeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
interface AccordionArgs {
|
|
8
|
+
/**
|
|
9
|
+
* Whether one item or several may be open at a time.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue 'single'
|
|
12
|
+
*/
|
|
13
|
+
selectionMode?: 'single' | 'multiple';
|
|
14
|
+
/**
|
|
15
|
+
* The keys of the open items.
|
|
16
|
+
*
|
|
17
|
+
* *Passing* this argument at all puts the component in controlled mode --
|
|
18
|
+
* passing it as `undefined` included. Omit it entirely to let `Accordion`
|
|
19
|
+
* track the open items itself.
|
|
20
|
+
*/
|
|
21
|
+
keys?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Seeds the open items when uncontrolled. Takes precedence over any item's
|
|
24
|
+
* `@isDefaultOpen`.
|
|
25
|
+
*/
|
|
26
|
+
defaultKeys?: string[];
|
|
27
|
+
/** Called with the new set of open keys whenever an item is toggled. */
|
|
28
|
+
onChange?: (keys: string[]) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the open item can be closed again in `single` mode. Has no effect
|
|
31
|
+
* in `multiple` mode.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue true
|
|
34
|
+
*/
|
|
35
|
+
isCollapsible?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Disables every item.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue false
|
|
40
|
+
*/
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The container treatment.
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue 'outlined'
|
|
46
|
+
*/
|
|
47
|
+
variant?: AccordionVariants['variant'];
|
|
48
|
+
/**
|
|
49
|
+
* Drives padding and text size.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue 'md'
|
|
52
|
+
*/
|
|
53
|
+
size?: AccordionVariants['size'];
|
|
54
|
+
/**
|
|
55
|
+
* Hides the chevron on every item.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue false
|
|
58
|
+
*/
|
|
59
|
+
hideIndicator?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The heading level each trigger is wrapped in. Pick the one that fits the
|
|
62
|
+
* surrounding page outline.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue 3
|
|
65
|
+
*/
|
|
66
|
+
headingLevel?: HeadingLevel;
|
|
67
|
+
/** Class names for each slot of the component, merged with the theme's. */
|
|
68
|
+
classes?: SlotsToClasses<AccordionSlots>;
|
|
69
|
+
}
|
|
70
|
+
interface AccordionContext {
|
|
71
|
+
itemClass: string;
|
|
72
|
+
headingClass: string;
|
|
73
|
+
triggerClass: string;
|
|
74
|
+
startContentClass: string;
|
|
75
|
+
titleWrapperClass: string;
|
|
76
|
+
titleClass: string;
|
|
77
|
+
subtitleClass: string;
|
|
78
|
+
indicatorClass: string;
|
|
79
|
+
contentClass: string;
|
|
80
|
+
contentBodyClass: string;
|
|
81
|
+
isGroupDisabled: boolean;
|
|
82
|
+
hideIndicator: boolean;
|
|
83
|
+
headingLevel: HeadingLevel;
|
|
84
|
+
isOpen: (key: string) => boolean;
|
|
85
|
+
toggle: (key: string) => void;
|
|
86
|
+
registerDefaultOpen: (key: string) => void;
|
|
87
|
+
unregisterDefaultOpen: (key: string) => void;
|
|
88
|
+
focusSibling: (from: HTMLElement, key: string) => void;
|
|
89
|
+
}
|
|
90
|
+
interface AccordionSignature {
|
|
91
|
+
Args: AccordionArgs;
|
|
92
|
+
Blocks: {
|
|
93
|
+
default: [
|
|
94
|
+
{
|
|
95
|
+
Item: WithBoundArgs<typeof AccordionItem, 'context'>;
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
};
|
|
99
|
+
Element: HTMLDivElement;
|
|
100
|
+
}
|
|
101
|
+
declare class Accordion extends Component<AccordionSignature> {
|
|
102
|
+
#private;
|
|
103
|
+
/**
|
|
104
|
+
* Uncontrolled mode's own state. `undefined` means "not interacted with
|
|
105
|
+
* yet", which is what lets `@defaultKeys` and the items' own
|
|
106
|
+
* `@isDefaultOpen` seed the initial state without ever writing tracked state
|
|
107
|
+
* during render.
|
|
108
|
+
*/
|
|
109
|
+
private _keys;
|
|
110
|
+
setupRoot: import("ember-modifier").FunctionBasedModifier<{
|
|
111
|
+
Args: {
|
|
112
|
+
Positional: unknown[];
|
|
113
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
114
|
+
};
|
|
115
|
+
Element: HTMLElement;
|
|
116
|
+
}>;
|
|
117
|
+
get styles(): {
|
|
118
|
+
base: (slotProps?: ({
|
|
119
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
120
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
121
|
+
isDisabled?: boolean | undefined;
|
|
122
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
123
|
+
item: (slotProps?: ({
|
|
124
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
125
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
126
|
+
isDisabled?: boolean | undefined;
|
|
127
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
128
|
+
heading: (slotProps?: ({
|
|
129
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
130
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
131
|
+
isDisabled?: boolean | undefined;
|
|
132
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
133
|
+
trigger: (slotProps?: ({
|
|
134
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
135
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
136
|
+
isDisabled?: boolean | undefined;
|
|
137
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
138
|
+
startContent: (slotProps?: ({
|
|
139
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
140
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
141
|
+
isDisabled?: boolean | undefined;
|
|
142
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
143
|
+
titleWrapper: (slotProps?: ({
|
|
144
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
145
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
146
|
+
isDisabled?: boolean | undefined;
|
|
147
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
148
|
+
title: (slotProps?: ({
|
|
149
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
150
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
151
|
+
isDisabled?: boolean | undefined;
|
|
152
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
153
|
+
subtitle: (slotProps?: ({
|
|
154
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
155
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
156
|
+
isDisabled?: boolean | undefined;
|
|
157
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
158
|
+
indicator: (slotProps?: ({
|
|
159
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
160
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
161
|
+
isDisabled?: boolean | undefined;
|
|
162
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
163
|
+
content: (slotProps?: ({
|
|
164
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
165
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
166
|
+
isDisabled?: boolean | undefined;
|
|
167
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
168
|
+
contentBody: (slotProps?: ({
|
|
169
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
170
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
171
|
+
isDisabled?: boolean | undefined;
|
|
172
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
173
|
+
} & {
|
|
174
|
+
base: (slotProps?: ({
|
|
175
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
176
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
177
|
+
isDisabled?: boolean | undefined;
|
|
178
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
179
|
+
item: (slotProps?: ({
|
|
180
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
181
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
182
|
+
isDisabled?: boolean | undefined;
|
|
183
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
184
|
+
heading: (slotProps?: ({
|
|
185
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
186
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
187
|
+
isDisabled?: boolean | undefined;
|
|
188
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
189
|
+
trigger: (slotProps?: ({
|
|
190
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
191
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
192
|
+
isDisabled?: boolean | undefined;
|
|
193
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
194
|
+
startContent: (slotProps?: ({
|
|
195
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
196
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
197
|
+
isDisabled?: boolean | undefined;
|
|
198
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
199
|
+
titleWrapper: (slotProps?: ({
|
|
200
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
201
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
202
|
+
isDisabled?: boolean | undefined;
|
|
203
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
204
|
+
title: (slotProps?: ({
|
|
205
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
206
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
207
|
+
isDisabled?: boolean | undefined;
|
|
208
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
209
|
+
subtitle: (slotProps?: ({
|
|
210
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
211
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
212
|
+
isDisabled?: boolean | undefined;
|
|
213
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
214
|
+
indicator: (slotProps?: ({
|
|
215
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
216
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
217
|
+
isDisabled?: boolean | undefined;
|
|
218
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
219
|
+
content: (slotProps?: ({
|
|
220
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
221
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
222
|
+
isDisabled?: boolean | undefined;
|
|
223
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
224
|
+
contentBody: (slotProps?: ({
|
|
225
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
226
|
+
variant?: "outlined" | "faded" | "ghost" | "enclosed" | undefined;
|
|
227
|
+
isDisabled?: boolean | undefined;
|
|
228
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
229
|
+
} & {};
|
|
230
|
+
get selectionMode(): 'single' | 'multiple';
|
|
231
|
+
/**
|
|
232
|
+
* Whether `@keys` was *passed* decides the mode -- not whether it holds a
|
|
233
|
+
* value. Glimmer's named-args object carries a key for every argument
|
|
234
|
+
* written in the invoking template, so `in` distinguishes `@keys={{undefined}}`
|
|
235
|
+
* from an omitted `@keys`.
|
|
236
|
+
*/
|
|
237
|
+
get isControlled(): boolean;
|
|
238
|
+
get openKeys(): string[];
|
|
239
|
+
isOpen: (key: string) => boolean;
|
|
240
|
+
toggle: (key: string) => void;
|
|
241
|
+
registerDefaultOpen: (key: string) => void;
|
|
242
|
+
unregisterDefaultOpen: (key: string) => void;
|
|
243
|
+
focusSibling: (from: HTMLElement, key: string) => void;
|
|
244
|
+
get context(): AccordionContext;
|
|
245
|
+
}
|
|
246
|
+
export { Accordion, type AccordionSignature, type AccordionArgs, type AccordionContext, type HeadingLevel };
|
|
247
|
+
export default Accordion;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { AccordionContext } from './accordion';
|
|
3
|
+
import type Owner from '@ember/owner';
|
|
4
|
+
interface AccordionItemArgs {
|
|
5
|
+
/**
|
|
6
|
+
* Names this item so it can be addressed from outside -- `@keys`,
|
|
7
|
+
* `@defaultKeys`, a query param, persisted state. Optional: without one the
|
|
8
|
+
* item still works, it is simply not externally addressable.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue a generated unique id
|
|
11
|
+
*/
|
|
12
|
+
key?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Opens this item initially, without needing a key anywhere. Ignored when
|
|
15
|
+
* the accordion is controlled or when `@defaultKeys` is passed. In `single`
|
|
16
|
+
* mode, if several items declare it, the first in document order wins.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue false
|
|
19
|
+
*/
|
|
20
|
+
isDefaultOpen?: boolean;
|
|
21
|
+
/** Shorthand for the `title` block. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Shorthand for the `subtitle` block. */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Disables this item alone: it cannot be toggled and arrow-key navigation
|
|
27
|
+
* steps over it.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
isDisabled?: boolean;
|
|
32
|
+
/** Class names appended to this item's theme classes. */
|
|
33
|
+
class?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Supplied by Accordion. Not part of the public API.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
context: AccordionContext;
|
|
40
|
+
}
|
|
41
|
+
interface AccordionItemSignature {
|
|
42
|
+
Args: AccordionItemArgs;
|
|
43
|
+
Blocks: {
|
|
44
|
+
default: [{
|
|
45
|
+
isOpen: boolean;
|
|
46
|
+
toggle: () => void;
|
|
47
|
+
}];
|
|
48
|
+
content: [{
|
|
49
|
+
isOpen: boolean;
|
|
50
|
+
toggle: () => void;
|
|
51
|
+
}];
|
|
52
|
+
title: [{
|
|
53
|
+
isOpen: boolean;
|
|
54
|
+
toggle: () => void;
|
|
55
|
+
}];
|
|
56
|
+
subtitle: [{
|
|
57
|
+
isOpen: boolean;
|
|
58
|
+
toggle: () => void;
|
|
59
|
+
}];
|
|
60
|
+
startContent: [{
|
|
61
|
+
isOpen: boolean;
|
|
62
|
+
toggle: () => void;
|
|
63
|
+
}];
|
|
64
|
+
indicator: [{
|
|
65
|
+
isOpen: boolean;
|
|
66
|
+
toggle: () => void;
|
|
67
|
+
}];
|
|
68
|
+
};
|
|
69
|
+
Element: HTMLDivElement;
|
|
70
|
+
}
|
|
71
|
+
declare class AccordionItem extends Component<AccordionItemSignature> {
|
|
72
|
+
/**
|
|
73
|
+
* Identity. Falls back to a guid rather than an index: an index silently
|
|
74
|
+
* reassigns open state the moment an item sits behind an `{{#if}}`.
|
|
75
|
+
*/
|
|
76
|
+
readonly key: string;
|
|
77
|
+
constructor(owner: Owner, args: AccordionItemArgs);
|
|
78
|
+
willDestroy(): void;
|
|
79
|
+
get isOpen(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* A collapsed `Collapsible` is `height: 0; overflow: hidden` -- gone to the
|
|
82
|
+
* eye, but its focusable children are still in the tab order. `inert` is
|
|
83
|
+
* what actually removes them. Glimmer normalizes a dynamic attribute bound
|
|
84
|
+
* to `false` or `undefined` to `removeAttribute`, so both render identically;
|
|
85
|
+
* `undefined` is chosen because it directly states the intent for a boolean
|
|
86
|
+
* attribute.
|
|
87
|
+
*/
|
|
88
|
+
get inert(): true | undefined;
|
|
89
|
+
get isDisabled(): boolean;
|
|
90
|
+
get triggerId(): string;
|
|
91
|
+
get panelId(): string;
|
|
92
|
+
toggle: () => void;
|
|
93
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
94
|
+
}
|
|
95
|
+
export { AccordionItem, type AccordionItemSignature, type AccordionItemArgs };
|
|
96
|
+
export default AccordionItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './accordion';
|
|
@@ -3,8 +3,10 @@ import type Owner from '@ember/owner';
|
|
|
3
3
|
import { type ListItem } from './native-select';
|
|
4
4
|
import { type ListboxSignature } from '../collections/listbox';
|
|
5
5
|
import { type AutocompleteSlots, type AutocompleteVariants, type SlotsToClasses } from '@frontile/theme';
|
|
6
|
+
import { ControlBlurTracker } from '../../-private/control-blur';
|
|
6
7
|
import { type PopoverSignature, type ContentSignature } from '../overlays/popover';
|
|
7
8
|
import { type FormControlSharedArgs } from './form-control';
|
|
9
|
+
import { type FilterFn } from '../../utils/filter';
|
|
8
10
|
interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement' | 'flipOptions' | 'middleware' | 'shiftOptions' | 'offsetOptions' | 'strategy' | 'didClose'>, Pick<ListboxSignature<T>['Args'], 'appearance' | 'intent' | 'disabledKeys' | 'allowEmpty' | 'items' | 'onAction'>, Pick<ContentSignature['Args'], 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition' | 'transition'>, FormControlSharedArgs {
|
|
9
11
|
/**
|
|
10
12
|
* The currently selected key.
|
|
@@ -89,13 +91,16 @@ interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement'
|
|
|
89
91
|
onInputChange?: (value: string) => void;
|
|
90
92
|
/**
|
|
91
93
|
* Function to filter the items against the current input text.
|
|
92
|
-
*
|
|
94
|
+
*
|
|
95
|
+
* The default implementation ranks by relevance, so the closest match is
|
|
96
|
+
* listed first rather than whichever match came first in `@items`.
|
|
93
97
|
*
|
|
94
98
|
* @param itemValue - The label of an item in the dropdown.
|
|
95
99
|
* @param inputValue - The user's input text.
|
|
96
|
-
* @returns A
|
|
100
|
+
* @returns A number to rank (higher first, `0` means no match) or a boolean
|
|
101
|
+
* to filter only, preserving the order of `@items`.
|
|
97
102
|
*/
|
|
98
|
-
filter?:
|
|
103
|
+
filter?: FilterFn;
|
|
99
104
|
/**
|
|
100
105
|
* Disables the built-in filtering, rendering `@items` as-is.
|
|
101
106
|
* Use together with `inputValue`/`onInputChange` when filtering happens
|
|
@@ -141,7 +146,14 @@ interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement'
|
|
|
141
146
|
/**
|
|
142
147
|
* Whether to include a clear button in the autocomplete component.
|
|
143
148
|
* If enabled, this allows users to clear the selection and input text.
|
|
144
|
-
*
|
|
149
|
+
*
|
|
150
|
+
* This option deliberately overrides `allowEmpty`: that argument governs
|
|
151
|
+
* deselecting an *option* in the listbox, while this is a separate affordance
|
|
152
|
+
* you opt into for exactly the purpose of emptying the field. Since
|
|
153
|
+
* `allowEmpty` defaults to false, honouring it here would render the button
|
|
154
|
+
* dead by default.
|
|
155
|
+
*
|
|
156
|
+
* No clear button is rendered on a disabled Autocomplete.
|
|
145
157
|
*
|
|
146
158
|
* @defaultValue false
|
|
147
159
|
*/
|
|
@@ -175,7 +187,16 @@ interface AutocompleteArgs<T> extends Pick<PopoverSignature['Args'], 'placement'
|
|
|
175
187
|
*/
|
|
176
188
|
searchMessage?: string;
|
|
177
189
|
/**
|
|
178
|
-
* Callback fired when
|
|
190
|
+
* Callback fired when focus leaves the Autocomplete.
|
|
191
|
+
*
|
|
192
|
+
* "Leaves the Autocomplete" means the whole control: the input *and* its
|
|
193
|
+
* dropdown, which is rendered outside the input in the DOM. Moving focus
|
|
194
|
+
* between them -- which is what clicking an option does -- is not a blur, so
|
|
195
|
+
* this does not fire while the user is picking an option. It fires once, when
|
|
196
|
+
* focus lands somewhere outside the control (or nowhere, with the dropdown
|
|
197
|
+
* closed).
|
|
198
|
+
*
|
|
199
|
+
* This is what `Field` drives blur validation from.
|
|
179
200
|
*/
|
|
180
201
|
onBlur?: () => void;
|
|
181
202
|
}
|
|
@@ -214,9 +235,6 @@ interface AutocompleteSignature<T> {
|
|
|
214
235
|
* static list (built-in filtering), an externally filtered list
|
|
215
236
|
* (`disableFiltering` + `onInputChange`), or an async source (`onSearch`).
|
|
216
237
|
*
|
|
217
|
-
* Selection state follows the same two-way data binding pattern as `Select`:
|
|
218
|
-
* internal tracked state gives immediate UI updates, while `onSelectionChange`
|
|
219
|
-
* notifies the parent, whose arg updates sync back through modifiers.
|
|
220
238
|
*/
|
|
221
239
|
declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<T>> {
|
|
222
240
|
#private;
|
|
@@ -240,8 +258,6 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
240
258
|
isSearchPending: boolean;
|
|
241
259
|
/** Element id of the currently active (highlighted) option, for aria-activedescendant. */
|
|
242
260
|
activeDescendant?: string;
|
|
243
|
-
/** The currently active (highlighted) option. */
|
|
244
|
-
activeItem?: ListItem;
|
|
245
261
|
/**
|
|
246
262
|
* Label of the selected key, captured at selection time. Needed in async
|
|
247
263
|
* mode, where the selected item may no longer be present in the currently
|
|
@@ -250,7 +266,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
250
266
|
selectedLabel?: string;
|
|
251
267
|
containerRef: {
|
|
252
268
|
current: HTMLDivElement | undefined;
|
|
253
|
-
"__#
|
|
269
|
+
"__#6@#onChange"?: ((el: HTMLDivElement | undefined) => void) | undefined;
|
|
254
270
|
setup: import("ember-modifier").FunctionBasedModifier<{
|
|
255
271
|
Args: {
|
|
256
272
|
Positional: unknown[];
|
|
@@ -261,7 +277,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
261
277
|
};
|
|
262
278
|
triggerRef: {
|
|
263
279
|
current: HTMLInputElement | undefined;
|
|
264
|
-
"__#
|
|
280
|
+
"__#6@#onChange"?: ((el: HTMLInputElement | undefined) => void) | undefined;
|
|
265
281
|
setup: import("ember-modifier").FunctionBasedModifier<{
|
|
266
282
|
Args: {
|
|
267
283
|
Positional: unknown[];
|
|
@@ -288,7 +304,12 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
288
304
|
get blockScroll(): boolean;
|
|
289
305
|
get disableFocusTrap(): boolean;
|
|
290
306
|
onAction: (key: string) => void;
|
|
291
|
-
|
|
307
|
+
/**
|
|
308
|
+
* Reports focus leaving the *whole* control -- the input and its portaled
|
|
309
|
+
* dropdown -- rather than the input, which blurs on the way into the
|
|
310
|
+
* dropdown whenever an option is clicked. See `ControlBlurTracker`.
|
|
311
|
+
*/
|
|
312
|
+
blurTracker: ControlBlurTracker;
|
|
292
313
|
clearSelectedKeys: () => void;
|
|
293
314
|
onItemsChange: (nodes: ListItem[], _: "add" | "remove") => void;
|
|
294
315
|
didClose: () => void;
|
|
@@ -304,6 +325,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
304
325
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
305
326
|
hasStartContent?: boolean | undefined;
|
|
306
327
|
hasEndContent?: boolean | undefined;
|
|
328
|
+
hasChips?: boolean | undefined;
|
|
307
329
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
308
330
|
innerContainer: (slotProps?: ({
|
|
309
331
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -311,6 +333,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
311
333
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
312
334
|
hasStartContent?: boolean | undefined;
|
|
313
335
|
hasEndContent?: boolean | undefined;
|
|
336
|
+
hasChips?: boolean | undefined;
|
|
314
337
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
315
338
|
startContent: (slotProps?: ({
|
|
316
339
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -318,6 +341,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
318
341
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
319
342
|
hasStartContent?: boolean | undefined;
|
|
320
343
|
hasEndContent?: boolean | undefined;
|
|
344
|
+
hasChips?: boolean | undefined;
|
|
321
345
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
322
346
|
endContent: (slotProps?: ({
|
|
323
347
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -325,6 +349,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
325
349
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
326
350
|
hasStartContent?: boolean | undefined;
|
|
327
351
|
hasEndContent?: boolean | undefined;
|
|
352
|
+
hasChips?: boolean | undefined;
|
|
328
353
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
329
354
|
input: (slotProps?: ({
|
|
330
355
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -332,6 +357,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
332
357
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
333
358
|
hasStartContent?: boolean | undefined;
|
|
334
359
|
hasEndContent?: boolean | undefined;
|
|
360
|
+
hasChips?: boolean | undefined;
|
|
335
361
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
336
362
|
} & {
|
|
337
363
|
base: (slotProps?: ({
|
|
@@ -340,6 +366,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
340
366
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
341
367
|
hasStartContent?: boolean | undefined;
|
|
342
368
|
hasEndContent?: boolean | undefined;
|
|
369
|
+
hasChips?: boolean | undefined;
|
|
343
370
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
344
371
|
listbox: (slotProps?: ({
|
|
345
372
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -347,6 +374,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
347
374
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
348
375
|
hasStartContent?: boolean | undefined;
|
|
349
376
|
hasEndContent?: boolean | undefined;
|
|
377
|
+
hasChips?: boolean | undefined;
|
|
350
378
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
351
379
|
icon: (slotProps?: ({
|
|
352
380
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -354,6 +382,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
354
382
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
355
383
|
hasStartContent?: boolean | undefined;
|
|
356
384
|
hasEndContent?: boolean | undefined;
|
|
385
|
+
hasChips?: boolean | undefined;
|
|
357
386
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
358
387
|
clearButton: (slotProps?: ({
|
|
359
388
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -361,6 +390,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
361
390
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
362
391
|
hasStartContent?: boolean | undefined;
|
|
363
392
|
hasEndContent?: boolean | undefined;
|
|
393
|
+
hasChips?: boolean | undefined;
|
|
364
394
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
365
395
|
input: (slotProps?: ({
|
|
366
396
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -368,6 +398,7 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
368
398
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
369
399
|
hasStartContent?: boolean | undefined;
|
|
370
400
|
hasEndContent?: boolean | undefined;
|
|
401
|
+
hasChips?: boolean | undefined;
|
|
371
402
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
372
403
|
emptyContent: (slotProps?: ({
|
|
373
404
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -375,8 +406,21 @@ declare class Autocomplete<T = unknown> extends Component<AutocompleteSignature<
|
|
|
375
406
|
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
376
407
|
hasStartContent?: boolean | undefined;
|
|
377
408
|
hasEndContent?: boolean | undefined;
|
|
409
|
+
hasChips?: boolean | undefined;
|
|
378
410
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
379
411
|
} & {};
|
|
412
|
+
/**
|
|
413
|
+
* Whether the clear button takes the chevron's place: something to clear,
|
|
414
|
+
* and a control that can act on it.
|
|
415
|
+
*
|
|
416
|
+
* `@allowEmpty` is deliberately not consulted -- it governs deselecting an
|
|
417
|
+
* *option* in the listbox, while `@isClearable` is a separate affordance the
|
|
418
|
+
* consumer opts into for exactly this purpose (and `@allowEmpty` defaults to
|
|
419
|
+
* false, so honouring it here would leave the button dead by default). A
|
|
420
|
+
* disabled Autocomplete shows no clear button at all: it carries no disabled
|
|
421
|
+
* state of its own, so it would be a focusable button that clears a field
|
|
422
|
+
* the user is not allowed to change.
|
|
423
|
+
*/
|
|
380
424
|
get isClearable(): boolean | undefined;
|
|
381
425
|
get isLoading(): boolean;
|
|
382
426
|
get filteredItems(): T[] | undefined;
|
|
@@ -4,10 +4,30 @@ import { type FormControlSharedArgs } from './form-control';
|
|
|
4
4
|
import { type CheckboxGroupVariants, type CheckboxGroupSlots, type SlotsToClasses } from '@frontile/theme';
|
|
5
5
|
import type { WithBoundArgs } from '@glint/template';
|
|
6
6
|
interface Args extends FormControlSharedArgs {
|
|
7
|
+
/**
|
|
8
|
+
* The name attribute applied to every checkbox in the group, so they are
|
|
9
|
+
* submitted together as one field.
|
|
10
|
+
*/
|
|
7
11
|
name?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Callback when a checkbox in the group is toggled. It is bound onto every
|
|
14
|
+
* yielded Checkbox, so a checkbox that sets its own `@onChange` replaces this
|
|
15
|
+
* one rather than running alongside it.
|
|
16
|
+
*/
|
|
8
17
|
onChange?: CheckboxSignature['Args']['onChange'];
|
|
18
|
+
/**
|
|
19
|
+
* The size applied to every checkbox in the group and to the group's label.
|
|
20
|
+
*/
|
|
9
21
|
size?: CheckboxGroupVariants['size'];
|
|
22
|
+
/**
|
|
23
|
+
* Class names for each slot of the component, merged with the theme's.
|
|
24
|
+
*/
|
|
10
25
|
classes?: SlotsToClasses<CheckboxGroupSlots>;
|
|
26
|
+
/**
|
|
27
|
+
* How the checkboxes are laid out.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue 'vertical'
|
|
30
|
+
*/
|
|
11
31
|
orientation?: 'horizontal' | 'vertical';
|
|
12
32
|
}
|
|
13
33
|
interface CheckboxGroupSignature {
|
|
@@ -2,11 +2,33 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { type FormControlSharedArgs } from './form-control';
|
|
3
3
|
import { type CheckboxVariants, type CheckboxSlots, type SlotsToClasses } from '@frontile/theme';
|
|
4
4
|
interface Args extends FormControlSharedArgs {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the checkbox is checked. Pair with `onChange` to control the
|
|
7
|
+
* checkbox; leave it unset to let the element track its own state.
|
|
8
|
+
*/
|
|
5
9
|
checked?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The name attribute of the underlying input, used when the checkbox is
|
|
12
|
+
* submitted as part of a form.
|
|
13
|
+
*/
|
|
6
14
|
name?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The size of the checkbox and its label.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue 'md'
|
|
19
|
+
*/
|
|
7
20
|
size?: CheckboxVariants['size'];
|
|
21
|
+
/**
|
|
22
|
+
* Class names for each slot of the component, merged with the theme's.
|
|
23
|
+
*/
|
|
8
24
|
classes?: SlotsToClasses<CheckboxSlots>;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when onchange is triggered
|
|
27
|
+
*/
|
|
9
28
|
onChange?: (value: boolean, event: Event) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback when onblur is triggered
|
|
31
|
+
*/
|
|
10
32
|
onBlur?: () => void;
|
|
11
33
|
}
|
|
12
34
|
interface CheckboxSignature {
|
|
@@ -2,6 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import Checkbox from './checkbox';
|
|
3
3
|
import CheckboxGroup from './checkbox-group';
|
|
4
4
|
import Input from './input';
|
|
5
|
+
import InputOtp from './input-otp';
|
|
5
6
|
import Radio from './radio';
|
|
6
7
|
import RadioGroup from './radio-group';
|
|
7
8
|
import Switch from './switch';
|
|
@@ -34,6 +35,7 @@ interface FieldSignature<T extends Record<string, unknown> = FormDataCompiled> {
|
|
|
34
35
|
Checkbox: WithBoundArgs<typeof Checkbox, 'name' | 'errors' | 'checked' | 'onChange' | 'onBlur' | 'isDisabled'>;
|
|
35
36
|
CheckboxGroup: WithBoundArgs<typeof CheckboxGroup, 'name' | 'errors' | 'isDisabled'>;
|
|
36
37
|
Input: WithBoundArgs<typeof Input, 'name' | 'errors' | 'value' | 'onChange' | 'onInput' | 'onBlur' | 'isDisabled'>;
|
|
38
|
+
InputOtp: WithBoundArgs<typeof InputOtp, 'name' | 'errors' | 'value' | 'onChange' | 'onInput' | 'onBlur' | 'isDisabled'>;
|
|
37
39
|
Radio: WithBoundArgs<typeof Radio, 'name' | 'errors' | 'checkedValue' | 'onChange' | 'onBlur' | 'isDisabled'>;
|
|
38
40
|
RadioGroup: WithBoundArgs<typeof RadioGroup, 'name' | 'errors' | 'value' | 'onChange' | 'isDisabled'>;
|
|
39
41
|
SingleSelect: BoundSingleSelect;
|