frontile 0.18.0-alpha.8 → 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 +91 -2
- package/declarations/components/collections/listbox/listbox.d.ts +39 -12
- 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 +446 -0
- 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 +2 -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 +21 -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 +93 -9
- 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 +105 -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 +351 -0
- package/dist/components/forms/autocomplete.js.map +1 -0
- 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 +4 -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 +4 -2
- package/dist/forms.js.map +1 -1
- package/dist/index.js +39 -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 +490 -105
- 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,79 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { cached } from '@glimmer/tracking';
|
|
3
|
+
import { hash } from '@ember/helper';
|
|
4
|
+
import { modifier } from 'ember-modifier';
|
|
5
|
+
import { useStyles } from '@frontile/theme';
|
|
6
|
+
import { selectionIndicator } from '../../../utils/selection-indicator.js';
|
|
7
|
+
import { TabNavItem } from './item.js';
|
|
8
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
9
|
+
import { setComponentTemplate } from '@ember/component';
|
|
10
|
+
import { a as decorateMethodV2 } from '../../../runtime--fcdnjmJ-BOdRhmsS.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A navigation bar styled like `Tabs`, for links that change the page.
|
|
14
|
+
*
|
|
15
|
+
* It deliberately does **not** use `rovingFocus`: these are links, so every one
|
|
16
|
+
* of them stays individually reachable by Tab and the arrow keys are left to
|
|
17
|
+
* the browser. The ARIA tabs pattern covers in-page panel switching only, and
|
|
18
|
+
* applying it to navigation would remove links from the tab order for no gain.
|
|
19
|
+
*/
|
|
20
|
+
class TabNav extends Component {
|
|
21
|
+
indicator = selectionIndicator();
|
|
22
|
+
get styles() {
|
|
23
|
+
const {
|
|
24
|
+
tabs
|
|
25
|
+
} = useStyles();
|
|
26
|
+
return tabs({
|
|
27
|
+
variant: this.args.variant,
|
|
28
|
+
intent: this.args.intent,
|
|
29
|
+
size: this.args.size,
|
|
30
|
+
orientation: this.args.orientation,
|
|
31
|
+
isFullWidth: this.args.isFullWidth
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
static {
|
|
35
|
+
decorateMethodV2(this.prototype, "styles", [cached]);
|
|
36
|
+
}
|
|
37
|
+
get itemClass() {
|
|
38
|
+
return this.styles.tab({
|
|
39
|
+
class: this.args.classes?.tab
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Marks an element as the active link and hands its geometry to the
|
|
44
|
+
* indicator. Yielded so a consumer can bring their own link component --
|
|
45
|
+
* `ember-link`, a custom `<AppLink>`, a plain `<a>` -- and still get both the
|
|
46
|
+
* animation and the correct ARIA. `TabNav.Item` applies this internally, so
|
|
47
|
+
* there is exactly one definition of what "active" writes to the DOM.
|
|
48
|
+
*/
|
|
49
|
+
static {
|
|
50
|
+
decorateMethodV2(this.prototype, "itemClass", [cached]);
|
|
51
|
+
}
|
|
52
|
+
setupItem = modifier((element, [isActive]) => {
|
|
53
|
+
element.setAttribute('data-selected', String(Boolean(isActive)));
|
|
54
|
+
if (isActive) {
|
|
55
|
+
// Ember's `LinkTo` has never set `aria-current` -- it publishes only a
|
|
56
|
+
// CSS class -- so this is the component's own contribution, not a
|
|
57
|
+
// duplicate of something the framework already does.
|
|
58
|
+
element.setAttribute('aria-current', 'page');
|
|
59
|
+
this.indicator.claim(element);
|
|
60
|
+
} else {
|
|
61
|
+
element.removeAttribute('aria-current');
|
|
62
|
+
}
|
|
63
|
+
return () => {
|
|
64
|
+
this.indicator.release(element);
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
static {
|
|
68
|
+
setComponentTemplate(precompileTemplate("<nav aria-label={{@label}} class=\"group/tabs {{this.styles.list class=@classes.list}}\" {{this.indicator.setupContainer}} ...attributes>\n <span aria-hidden=\"true\" class={{this.styles.indicator class=@classes.indicator}}></span>\n\n {{yield (hash Item=(component TabNavItem itemClass=this.itemClass setupItem=this.setupItem) itemClass=this.itemClass setupItem=this.setupItem)}}\n</nav>", {
|
|
69
|
+
strictMode: true,
|
|
70
|
+
scope: () => ({
|
|
71
|
+
hash,
|
|
72
|
+
TabNavItem
|
|
73
|
+
})
|
|
74
|
+
}), this);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { TabNav, TabNav as default };
|
|
79
|
+
//# sourceMappingURL=tab-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-nav.js","sources":["../../../../src/components/navigation/tab-nav/tab-nav.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { cached } from '@glimmer/tracking';\nimport { hash } from '@ember/helper';\nimport { modifier } from 'ember-modifier';\nimport { useStyles, type SlotsToClasses } from '@frontile/theme';\nimport { selectionIndicator } from '../../../utils/selection-indicator';\nimport TabNavItem from './item';\nimport type { TabsSlots, TabsVariants } from '@frontile/theme';\nimport type { WithBoundArgs } from '@glint/template';\n\ninterface TabNavArgs {\n /** Accessible name for the navigation landmark. */\n label?: string;\n\n /**\n * The visual style of the navigation bar.\n *\n * @defaultValue 'solid'\n */\n variant?: TabsVariants['variant'];\n\n /**\n * The colour intent applied to the indicator.\n *\n * @defaultValue 'default'\n */\n intent?: TabsVariants['intent'];\n\n /**\n * The size of the links, driving padding and text size.\n *\n * @defaultValue 'md'\n */\n size?: TabsVariants['size'];\n\n /**\n * Lays the links out in a row or a column.\n *\n * @defaultValue 'horizontal'\n */\n orientation?: TabsVariants['orientation'];\n\n /**\n * Stretches the bar to its container and gives every link equal width.\n *\n * @defaultValue false\n */\n isFullWidth?: boolean;\n\n /** Class names for each slot of the component, merged with the theme's. */\n classes?: SlotsToClasses<TabsSlots>;\n}\n\ninterface TabNavSignature {\n Args: TabNavArgs;\n Blocks: {\n default: [\n {\n Item: WithBoundArgs<typeof TabNavItem, 'itemClass' | 'setupItem'>;\n itemClass: string;\n setupItem: TabNav['setupItem'];\n }\n ];\n };\n Element: HTMLElement;\n}\n\n/**\n * A navigation bar styled like `Tabs`, for links that change the page.\n *\n * It deliberately does **not** use `rovingFocus`: these are links, so every one\n * of them stays individually reachable by Tab and the arrow keys are left to\n * the browser. The ARIA tabs pattern covers in-page panel switching only, and\n * applying it to navigation would remove links from the tab order for no gain.\n */\nclass TabNav extends Component<TabNavSignature> {\n indicator = selectionIndicator();\n\n @cached\n get styles() {\n const { tabs } = useStyles();\n\n return tabs({\n variant: this.args.variant,\n intent: this.args.intent,\n size: this.args.size,\n orientation: this.args.orientation,\n isFullWidth: this.args.isFullWidth\n });\n }\n\n @cached\n get itemClass(): string {\n return this.styles.tab({ class: this.args.classes?.tab });\n }\n\n /**\n * Marks an element as the active link and hands its geometry to the\n * indicator. Yielded so a consumer can bring their own link component --\n * `ember-link`, a custom `<AppLink>`, a plain `<a>` -- and still get both the\n * animation and the correct ARIA. `TabNav.Item` applies this internally, so\n * there is exactly one definition of what \"active\" writes to the DOM.\n */\n setupItem = modifier((element: HTMLElement, [isActive]: [boolean]) => {\n element.setAttribute('data-selected', String(Boolean(isActive)));\n\n if (isActive) {\n // Ember's `LinkTo` has never set `aria-current` -- it publishes only a\n // CSS class -- so this is the component's own contribution, not a\n // duplicate of something the framework already does.\n element.setAttribute('aria-current', 'page');\n this.indicator.claim(element);\n } else {\n element.removeAttribute('aria-current');\n }\n\n return (): void => {\n this.indicator.release(element);\n };\n });\n\n <template>\n <nav\n aria-label={{@label}}\n class=\"group/tabs {{this.styles.list class=@classes.list}}\"\n {{this.indicator.setupContainer}}\n ...attributes\n >\n <span\n aria-hidden=\"true\"\n class={{this.styles.indicator class=@classes.indicator}}\n ></span>\n\n {{yield\n (hash\n Item=(component\n TabNavItem itemClass=this.itemClass setupItem=this.setupItem\n )\n itemClass=this.itemClass\n setupItem=this.setupItem\n )\n }}\n </nav>\n </template>\n}\n\nexport { TabNav, type TabNavSignature, type TabNavArgs };\nexport default TabNav;\n"],"names":["TabNav","Component","indicator","selectionIndicator","styles","tabs","useStyles","variant","args","intent","size","orientation","isFullWidth","n","prototype","cached","itemClass","tab","class","classes","setupItem","modifier","element","isActive","setAttribute","String","Boolean","claim","removeAttribute","release","setComponent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ACrC,MAAA,IAAI,CAACtB,SAAS,CAACyB,KAAK,CAACL,OAAA,CAAA;AACvB,IAAA,CAAA,MAAO;AACLA,MAAAA,OAAA,CAAQM,eAAe,CAAC,cAAA,CAAA;AAC1B,IAAA;AAEA,IAAA,OAAO,MAAQ;AACb,MAAA,IAAI,CAAC1B,SAAS,CAAC2B,OAAO,CAACP,OAAA,CAAA;IACzB,CAAA;AACF,EAAA,CAAA,CAAA;AAEA,EAAA;IAAAQ,oBAAA,CAAAC,kBAAA,CAAA,wYAAA,EAsBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-nav.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
|
+
import { setComponentTemplate } from '@ember/component';
|
|
4
|
+
|
|
5
|
+
class TabsPanel extends Component {
|
|
6
|
+
get isSelected() {
|
|
7
|
+
return this.args.context.isSelected(this.args.value);
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return this.args.context.idFor(this.args.value, 'panel');
|
|
11
|
+
}
|
|
12
|
+
get tabId() {
|
|
13
|
+
return this.args.context.idFor(this.args.value, 'tab');
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
setComponentTemplate(precompileTemplate("{{#if this.isSelected}}\n <div role=\"tabpanel\" id={{this.id}} aria-labelledby={{this.tabId}} tabindex=\"0\" class=\"{{@context.panelClass}} {{@class}}\" ...attributes>\n {{yield}}\n </div>\n{{/if}}", {
|
|
17
|
+
strictMode: true
|
|
18
|
+
}), this);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { TabsPanel, TabsPanel as default };
|
|
23
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sources":["../../../../src/components/navigation/tabs/panel.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport type { TabsContext } from './tabs';\n\ninterface TabsPanelArgs<T> {\n /** The value this panel is paired with; must match a `Tab`'s `@value`. */\n value: T;\n\n /** Class names appended to this panel's theme classes. */\n class?: string;\n\n /**\n * Supplied by Tabs. Not part of the public API.\n *\n * @internal\n */\n context: TabsContext<T>;\n}\n\ninterface TabsPanelSignature<T> {\n Args: TabsPanelArgs<T>;\n Blocks: { default: [] };\n Element: HTMLDivElement;\n}\n\nclass TabsPanel<T> extends Component<TabsPanelSignature<T>> {\n get isSelected(): boolean {\n return this.args.context.isSelected(this.args.value);\n }\n\n get id(): string {\n return this.args.context.idFor(this.args.value, 'panel');\n }\n\n get tabId(): string {\n return this.args.context.idFor(this.args.value, 'tab');\n }\n\n <template>\n {{#if this.isSelected}}\n <div\n role=\"tabpanel\"\n id={{this.id}}\n aria-labelledby={{this.tabId}}\n tabindex=\"0\"\n class=\"{{@context.panelClass}} {{@class}}\"\n ...attributes\n >\n {{yield}}\n </div>\n {{/if}}\n </template>\n}\n\nexport { TabsPanel, type TabsPanelSignature, type TabsPanelArgs };\nexport default TabsPanel;\n"],"names":["TabsPanel","Component","isSelected","args","context","value","id","idFor","tabId","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;AAwBA,MAAMA,SAAA,SAAqBC,SAAA,CAA6B;EACtD,IAAIC,UAAAA,GAAsB;AACxB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,CAACF,UAAU,CAAC,IAAI,CAACC,IAAI,CAACE,KAAK,CAAA;AACrD,EAAA;EAEA,IAAIC,EAAAA,GAAa;AACf,IAAA,OAAO,IAAI,CAACH,IAAI,CAACC,OAAO,CAACG,KAAK,CAAC,IAAI,CAACJ,IAAI,CAACE,KAAK,EAAE,OAAA,CAAA;AAClD,EAAA;EAEA,IAAIG,KAAAA,GAAgB;AAClB,IAAA,OAAO,IAAI,CAACL,IAAI,CAACC,OAAO,CAACG,KAAK,CAAC,IAAI,CAACJ,IAAI,CAACE,KAAK,EAAE,KAAA,CAAA;AAClD,EAAA;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,8MAAA,EAaA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { hash } from '@ember/helper';
|
|
3
|
+
import { on } from '@ember/modifier';
|
|
4
|
+
import { modifier } from 'ember-modifier';
|
|
5
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
6
|
+
import { setComponentTemplate } from '@ember/component';
|
|
7
|
+
|
|
8
|
+
class TabsTab extends Component {
|
|
9
|
+
get isSelected() {
|
|
10
|
+
return this.args.context.isSelected(this.args.value);
|
|
11
|
+
}
|
|
12
|
+
get isDisabled() {
|
|
13
|
+
return this.args.isDisabled || this.args.context.isGroupDisabled;
|
|
14
|
+
}
|
|
15
|
+
get id() {
|
|
16
|
+
return this.args.context.idFor(this.args.value, 'tab');
|
|
17
|
+
}
|
|
18
|
+
get panelId() {
|
|
19
|
+
return this.args.context.idFor(this.args.value, 'panel');
|
|
20
|
+
}
|
|
21
|
+
registerValue = modifier((element, [value]) => {
|
|
22
|
+
this.args.context.registerValue(element, value);
|
|
23
|
+
return () => {
|
|
24
|
+
this.args.context.unregisterValue(element);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
handleClick = () => {
|
|
28
|
+
if (this.isDisabled) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this.args.context.select(this.args.value);
|
|
32
|
+
};
|
|
33
|
+
static {
|
|
34
|
+
setComponentTemplate(precompileTemplate("<button type=\"button\" role=\"tab\" id={{this.id}} aria-selected=\"{{this.isSelected}}\" aria-controls={{this.panelId}} aria-disabled=\"{{this.isDisabled}}\" data-selected=\"{{this.isSelected}}\" data-disabled=\"{{this.isDisabled}}\" class=\"{{@context.tabClass}} {{@class}}\" {{this.registerValue @value}} {{@context.indicator.setupTarget this.isSelected}} {{@context.roving.setupItem}} {{on \"click\" this.handleClick}} ...attributes>\n {{yield (hash isSelected=this.isSelected)}}\n</button>", {
|
|
35
|
+
strictMode: true,
|
|
36
|
+
scope: () => ({
|
|
37
|
+
on,
|
|
38
|
+
hash
|
|
39
|
+
})
|
|
40
|
+
}), this);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { TabsTab, TabsTab as default };
|
|
45
|
+
//# sourceMappingURL=tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../../../src/components/navigation/tabs/tab.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { modifier } from 'ember-modifier';\nimport type { TabsContext } from './tabs';\n\ninterface TabsTabArgs<T> {\n /** The value this tab represents, paired with a `Panel` of the same value. */\n value: T;\n\n /**\n * Disables this tab alone: it cannot be activated and keyboard navigation\n * skips over it.\n *\n * @defaultValue false\n */\n isDisabled?: boolean;\n\n /** Class names appended to this tab's theme classes. */\n class?: string;\n\n /**\n * Supplied by Tabs. Not part of the public API.\n *\n * @internal\n */\n context: TabsContext<T>;\n}\n\ninterface TabsTabSignature<T> {\n Args: TabsTabArgs<T>;\n Blocks: { default: [{ isSelected: boolean }] };\n Element: HTMLButtonElement;\n}\n\nclass TabsTab<T> extends Component<TabsTabSignature<T>> {\n get isSelected(): boolean {\n return this.args.context.isSelected(this.args.value);\n }\n\n get isDisabled(): boolean {\n return this.args.isDisabled || this.args.context.isGroupDisabled;\n }\n\n get id(): string {\n return this.args.context.idFor(this.args.value, 'tab');\n }\n\n get panelId(): string {\n return this.args.context.idFor(this.args.value, 'panel');\n }\n\n registerValue = modifier((element: HTMLElement, [value]: [T]) => {\n this.args.context.registerValue(element, value);\n\n return (): void => {\n this.args.context.unregisterValue(element);\n };\n });\n\n handleClick = (): void => {\n if (this.isDisabled) {\n return;\n }\n this.args.context.select(this.args.value);\n };\n\n <template>\n <button\n type=\"button\"\n role=\"tab\"\n id={{this.id}}\n aria-selected=\"{{this.isSelected}}\"\n aria-controls={{this.panelId}}\n aria-disabled=\"{{this.isDisabled}}\"\n data-selected=\"{{this.isSelected}}\"\n data-disabled=\"{{this.isDisabled}}\"\n class=\"{{@context.tabClass}} {{@class}}\"\n {{this.registerValue @value}}\n {{@context.indicator.setupTarget this.isSelected}}\n {{@context.roving.setupItem}}\n {{on \"click\" this.handleClick}}\n ...attributes\n >\n {{yield (hash isSelected=this.isSelected)}}\n </button>\n </template>\n}\n\nexport { TabsTab, type TabsTabSignature, type TabsTabArgs };\nexport default TabsTab;\n"],"names":["TabsTab","Component","isSelected","args","context","value","isDisabled","isGroupDisabled","id","idFor","panelId","registerValue","modifier","element","unregisterValue","handleClick","select","setComponentTemplate","precompileTemplate","strictMode","scope","on","hash"],"mappings":";;;;;;;AAmCA,MAAMA,OAAA,SAAmBC,SAAA,CAA2B;EAClD,IAAIC,UAAAA,GAAsB;AACxB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,CAACF,UAAU,CAAC,IAAI,CAACC,IAAI,CAACE,KAAK,CAAA;AACrD,EAAA;EAEA,IAAIC,UAAAA,GAAsB;AACxB,IAAA,OAAO,IAAI,CAACH,IAAI,CAACG,UAAU,IAAI,IAAI,CAACH,IAAI,CAACC,OAAO,CAACG,eAAe;AAClE,EAAA;EAEA,IAAIC,EAAAA,GAAa;AACf,IAAA,OAAO,IAAI,CAACL,IAAI,CAACC,OAAO,CAACK,KAAK,CAAC,IAAI,CAACN,IAAI,CAACE,KAAK,EAAE,KAAA,CAAA;AAClD,EAAA;EAEA,IAAIK,OAAAA,GAAkB;AACpB,IAAA,OAAO,IAAI,CAACP,IAAI,CAACC,OAAO,CAACK,KAAK,CAAC,IAAI,CAACN,IAAI,CAACE,KAAK,EAAE,OAAA,CAAA;AAClD,EAAA;EAEAM,aAAA,GAAgBC,SAAS,CAACC,OAAS,EAAa,CAACR,MAAW,KAAA;IAC1D,IAAI,CAACF,IAAI,CAACC,OAAO,CAACO,aAAa,CAACE,OAAA,EAASR,KAAA,CAAA;AAEzC,IAAA,OAAO,MAAQ;MACb,IAAI,CAACF,IAAI,CAACC,OAAO,CAACU,eAAe,CAACD,OAAA,CAAA;IACpC,CAAA;AACF,EAAA,CAAA,CAAA;EAEAE,WAAA,GAAcA,MAAQ;IACpB,IAAI,IAAI,CAACT,UAAU,EAAE;AACnB,MAAA;AACF,IAAA;AACA,IAAA,IAAI,CAACH,IAAI,CAACC,OAAO,CAACY,MAAM,CAAC,IAAI,CAACb,IAAI,CAACE,KAAK,CAAA;EAC1C,CAAA;AAEA,EAAA;IAAAY,oBAAA,CAAAC,kBAAA,CAAA,ifAAA,EAmBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,EAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked, cached } from '@glimmer/tracking';
|
|
3
|
+
import { hash } from '@ember/helper';
|
|
4
|
+
import { guidFor } from '@ember/object/internals';
|
|
5
|
+
import { useStyles } from '@frontile/theme';
|
|
6
|
+
import { selectionIndicator } from '../../../utils/selection-indicator.js';
|
|
7
|
+
import { rovingFocus } from '../../../utils/roving-focus.js';
|
|
8
|
+
import { TabsTab } from './tab.js';
|
|
9
|
+
import { TabsPanel } from './panel.js';
|
|
10
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
+
import { setComponentTemplate } from '@ember/component';
|
|
12
|
+
import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../../../runtime--fcdnjmJ-BOdRhmsS.js';
|
|
13
|
+
|
|
14
|
+
// A class rather than a template-only component: `TOC` values are not
|
|
15
|
+
// themselves generic, so `WithBoundArgs<typeof TabsList<T>, 'context'>` below
|
|
16
|
+
// would not type-check against a `TOC`-typed constant. A plain class with no
|
|
17
|
+
// state, mirroring how `Tab` is generic, gives Glint something it can
|
|
18
|
+
// actually parameterize.
|
|
19
|
+
class TabsList extends Component {
|
|
20
|
+
static {
|
|
21
|
+
setComponentTemplate(precompileTemplate("<div role=\"tablist\" aria-orientation={{@context.orientation}} aria-label={{@label}} class=\"group/tabs {{@context.listClass}}\" {{@context.indicator.setupContainer}} ...attributes>\n <span aria-hidden=\"true\" class={{@context.indicatorClass}}></span>\n {{yield}}\n</div>", {
|
|
22
|
+
strictMode: true
|
|
23
|
+
}), this);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
class Tabs extends Component {
|
|
27
|
+
indicator = selectionIndicator();
|
|
28
|
+
roving = rovingFocus(() => ({
|
|
29
|
+
orientation: this.orientation,
|
|
30
|
+
activationMode: this.args.activationMode ?? 'automatic',
|
|
31
|
+
onActivate: this.activateElement
|
|
32
|
+
}));
|
|
33
|
+
// Uncontrolled mode's own selection, seeded from `@defaultValue`. Written on
|
|
34
|
+
// every `select` regardless of mode -- the getter ignores it when controlled
|
|
35
|
+
// -- so both modes share one code path, exactly as `SegmentedControl` does.
|
|
36
|
+
static {
|
|
37
|
+
decorateFieldV2(this.prototype, "_value", [tracked]);
|
|
38
|
+
}
|
|
39
|
+
#_value = (initializeDeferredDecorator(this, "_value"), void 0);
|
|
40
|
+
#values = new Map();
|
|
41
|
+
// Values are given an index on first sight and ids are derived from it,
|
|
42
|
+
// rather than from the value's `String()` form: two distinct values that
|
|
43
|
+
// stringify alike would otherwise collide into one id and silently break the
|
|
44
|
+
// `aria-controls` round trip. Untracked, so populating it during render
|
|
45
|
+
// raises no backtracking assertion.
|
|
46
|
+
#indices = new Map();
|
|
47
|
+
constructor(owner, args) {
|
|
48
|
+
super(owner, args);
|
|
49
|
+
this._value = this.args.defaultValue;
|
|
50
|
+
}
|
|
51
|
+
get styles() {
|
|
52
|
+
const {
|
|
53
|
+
tabs
|
|
54
|
+
} = useStyles();
|
|
55
|
+
return tabs({
|
|
56
|
+
variant: this.args.variant,
|
|
57
|
+
intent: this.args.intent,
|
|
58
|
+
size: this.args.size,
|
|
59
|
+
orientation: this.args.orientation,
|
|
60
|
+
isFullWidth: this.args.isFullWidth,
|
|
61
|
+
isDisabled: this.args.isDisabled
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
decorateMethodV2(this.prototype, "styles", [cached]);
|
|
66
|
+
}
|
|
67
|
+
get orientation() {
|
|
68
|
+
return this.args.orientation ?? 'horizontal';
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Whether `@value` was *passed* decides the mode -- not whether it holds a
|
|
72
|
+
* value. `T` is generic, so `undefined` is a legitimate selection meaning
|
|
73
|
+
* "nothing is selected". Glimmer's named-args object carries a key for every
|
|
74
|
+
* argument written in the invoking template, so `in` distinguishes
|
|
75
|
+
* `@value={{undefined}}` from an omitted `@value`.
|
|
76
|
+
*/
|
|
77
|
+
get isControlled() {
|
|
78
|
+
return 'value' in this.args;
|
|
79
|
+
}
|
|
80
|
+
get selectedValue() {
|
|
81
|
+
return this.isControlled ? this.args.value : this._value;
|
|
82
|
+
}
|
|
83
|
+
isSelected = value => this.selectedValue === value;
|
|
84
|
+
select = value => {
|
|
85
|
+
if (this.args.isDisabled) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this._value = value;
|
|
89
|
+
this.args.onChange?.(value);
|
|
90
|
+
};
|
|
91
|
+
registerValue = (element, value) => {
|
|
92
|
+
this.#values.set(element, value);
|
|
93
|
+
};
|
|
94
|
+
unregisterValue = element => {
|
|
95
|
+
this.#values.delete(element);
|
|
96
|
+
};
|
|
97
|
+
activateElement = element => {
|
|
98
|
+
// `has`, not a `!== undefined` check: `T` may itself be `undefined`, so
|
|
99
|
+
// only membership distinguishes "not registered" from "registered against
|
|
100
|
+
// an undefined value".
|
|
101
|
+
if (!this.#values.has(element)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.select(this.#values.get(element));
|
|
105
|
+
};
|
|
106
|
+
idFor = (value, kind) => {
|
|
107
|
+
let index = this.#indices.get(value);
|
|
108
|
+
if (index === undefined) {
|
|
109
|
+
index = this.#indices.size;
|
|
110
|
+
this.#indices.set(value, index);
|
|
111
|
+
}
|
|
112
|
+
return `${guidFor(this)}-${kind}-${index}`;
|
|
113
|
+
};
|
|
114
|
+
get context() {
|
|
115
|
+
return {
|
|
116
|
+
indicator: this.indicator,
|
|
117
|
+
orientation: this.orientation,
|
|
118
|
+
listClass: this.styles.list({
|
|
119
|
+
class: this.args.classes?.list
|
|
120
|
+
}),
|
|
121
|
+
indicatorClass: this.styles.indicator({
|
|
122
|
+
class: this.args.classes?.indicator
|
|
123
|
+
}),
|
|
124
|
+
tabClass: this.styles.tab({
|
|
125
|
+
class: this.args.classes?.tab
|
|
126
|
+
}),
|
|
127
|
+
panelClass: this.styles.panel({
|
|
128
|
+
class: this.args.classes?.panel
|
|
129
|
+
}),
|
|
130
|
+
isGroupDisabled: this.args.isDisabled ?? false,
|
|
131
|
+
isSelected: this.isSelected,
|
|
132
|
+
select: this.select,
|
|
133
|
+
registerValue: this.registerValue,
|
|
134
|
+
unregisterValue: this.unregisterValue,
|
|
135
|
+
idFor: this.idFor,
|
|
136
|
+
roving: this.roving
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static {
|
|
140
|
+
decorateMethodV2(this.prototype, "context", [cached]);
|
|
141
|
+
}
|
|
142
|
+
static {
|
|
143
|
+
setComponentTemplate(precompileTemplate("<div class={{this.styles.base class=@classes.base}} ...attributes>\n {{#let (component TabsList context=this.context) (component TabsTab context=this.context) (component TabsPanel context=this.context) as |TabList TabItem TabPanel|}}\n {{!-- @glint-ignore: WithBoundArgs vs. a generic component --}}\n {{yield (hash List=TabList Tab=TabItem Panel=TabPanel)}}\n {{/let}}\n</div>", {
|
|
144
|
+
strictMode: true,
|
|
145
|
+
scope: () => ({
|
|
146
|
+
TabsList,
|
|
147
|
+
TabsTab,
|
|
148
|
+
TabsPanel,
|
|
149
|
+
hash
|
|
150
|
+
})
|
|
151
|
+
}), this);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { Tabs, TabsList, Tabs as default };
|
|
156
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../../../src/components/navigation/tabs/tabs.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { cached, tracked } from '@glimmer/tracking';\nimport { hash } from '@ember/helper';\nimport { guidFor } from '@ember/object/internals';\nimport { useStyles, type SlotsToClasses } from '@frontile/theme';\nimport {\n selectionIndicator,\n type SelectionIndicator\n} from '../../../utils/selection-indicator';\nimport { rovingFocus, type RovingFocus } from '../../../utils/roving-focus';\nimport TabsTab from './tab';\nimport TabsPanel from './panel';\nimport type { TabsSlots, TabsVariants } from '@frontile/theme';\nimport type Owner from '@ember/owner';\nimport type { WithBoundArgs } from '@glint/template';\n\ninterface TabsArgs<T> {\n /**\n * The visual style of the tab list.\n *\n * @defaultValue 'solid'\n */\n variant?: TabsVariants['variant'];\n\n /**\n * The colour intent applied to the indicator.\n *\n * @defaultValue 'default'\n */\n intent?: TabsVariants['intent'];\n\n /**\n * The size of the tabs, driving padding and text size.\n *\n * @defaultValue 'md'\n */\n size?: TabsVariants['size'];\n\n /**\n * Lays the tabs out in a row or a column, and switches the arrow keys that\n * move between them to match.\n *\n * @defaultValue 'horizontal'\n */\n orientation?: TabsVariants['orientation'];\n\n /**\n * Stretches the tab list to its container and gives every tab equal width.\n *\n * @defaultValue false\n */\n isFullWidth?: boolean;\n\n /**\n * Disables every tab.\n *\n * @defaultValue false\n */\n isDisabled?: boolean;\n\n /**\n * The currently selected value. Compared against each tab's `@value` with\n * `===`, so object values must be referentially stable.\n *\n * *Passing* this argument at all puts the component in controlled mode --\n * passing it as `undefined` included. Omit it entirely to let `Tabs` track\n * the selection itself, seeded by `@defaultValue`.\n */\n value?: T;\n\n /** Sets the initially selected value when uncontrolled. */\n defaultValue?: T;\n\n /** Called with the newly selected value when a tab is chosen. */\n onChange?: (value: T) => void;\n\n /**\n * `automatic` moves selection with focus, which the APG recommends when\n * panel content is already loaded. `manual` moves focus only and waits for\n * Enter or Space.\n *\n * @defaultValue 'automatic'\n */\n activationMode?: 'automatic' | 'manual';\n\n /** Class names for each slot of the component, merged with the theme's. */\n classes?: SlotsToClasses<TabsSlots>;\n}\n\ninterface TabsContext<T> {\n indicator: SelectionIndicator;\n orientation: 'horizontal' | 'vertical';\n listClass: string;\n indicatorClass: string;\n tabClass: string;\n panelClass: string;\n isGroupDisabled: boolean;\n isSelected: (value: T) => boolean;\n select: (value: T) => void;\n registerValue: (element: HTMLElement, value: T) => void;\n unregisterValue: (element: HTMLElement) => void;\n idFor: (value: T, kind: 'tab' | 'panel') => string;\n roving: RovingFocus;\n}\n\ninterface TabsListArgs<T> {\n /** Accessible name for the tab list. */\n label?: string;\n\n /**\n * Supplied by Tabs. Not part of the public API.\n *\n * @internal\n */\n context: TabsContext<T>;\n}\n\ninterface TabsListSignature<T> {\n Args: TabsListArgs<T>;\n Blocks: { default: [] };\n Element: HTMLDivElement;\n}\n\n// A class rather than a template-only component: `TOC` values are not\n// themselves generic, so `WithBoundArgs<typeof TabsList<T>, 'context'>` below\n// would not type-check against a `TOC`-typed constant. A plain class with no\n// state, mirroring how `Tab` is generic, gives Glint something it can\n// actually parameterize.\nclass TabsList<T> extends Component<TabsListSignature<T>> {\n <template>\n <div\n role=\"tablist\"\n aria-orientation={{@context.orientation}}\n aria-label={{@label}}\n class=\"group/tabs {{@context.listClass}}\"\n {{@context.indicator.setupContainer}}\n ...attributes\n >\n <span aria-hidden=\"true\" class={{@context.indicatorClass}}></span>\n {{yield}}\n </div>\n </template>\n}\n\ninterface TabsSignature<T> {\n Args: TabsArgs<T>;\n Blocks: {\n default: [\n {\n List: WithBoundArgs<typeof TabsList<T>, 'context'>;\n Tab: WithBoundArgs<typeof TabsTab<T>, 'context'>;\n Panel: WithBoundArgs<typeof TabsPanel<T>, 'context'>;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nclass Tabs<T> extends Component<TabsSignature<T>> {\n indicator = selectionIndicator();\n\n roving = rovingFocus(() => ({\n orientation: this.orientation,\n activationMode: this.args.activationMode ?? 'automatic',\n onActivate: this.activateElement\n }));\n\n // Uncontrolled mode's own selection, seeded from `@defaultValue`. Written on\n // every `select` regardless of mode -- the getter ignores it when controlled\n // -- so both modes share one code path, exactly as `SegmentedControl` does.\n @tracked _value: T | undefined;\n\n #values = new Map<HTMLElement, T>();\n\n // Values are given an index on first sight and ids are derived from it,\n // rather than from the value's `String()` form: two distinct values that\n // stringify alike would otherwise collide into one id and silently break the\n // `aria-controls` round trip. Untracked, so populating it during render\n // raises no backtracking assertion.\n #indices = new Map<T, number>();\n\n constructor(owner: Owner, args: TabsSignature<T>['Args']) {\n super(owner, args);\n this._value = this.args.defaultValue;\n }\n\n @cached\n get styles() {\n const { tabs } = useStyles();\n\n return tabs({\n variant: this.args.variant,\n intent: this.args.intent,\n size: this.args.size,\n orientation: this.args.orientation,\n isFullWidth: this.args.isFullWidth,\n isDisabled: this.args.isDisabled\n });\n }\n\n get orientation(): 'horizontal' | 'vertical' {\n return this.args.orientation ?? 'horizontal';\n }\n\n /**\n * Whether `@value` was *passed* decides the mode -- not whether it holds a\n * value. `T` is generic, so `undefined` is a legitimate selection meaning\n * \"nothing is selected\". Glimmer's named-args object carries a key for every\n * argument written in the invoking template, so `in` distinguishes\n * `@value={{undefined}}` from an omitted `@value`.\n */\n get isControlled(): boolean {\n return 'value' in this.args;\n }\n\n get selectedValue(): T | undefined {\n return this.isControlled ? this.args.value : this._value;\n }\n\n isSelected = (value: T): boolean => this.selectedValue === value;\n\n select = (value: T): void => {\n if (this.args.isDisabled) {\n return;\n }\n this._value = value;\n this.args.onChange?.(value);\n };\n\n registerValue = (element: HTMLElement, value: T): void => {\n this.#values.set(element, value);\n };\n\n unregisterValue = (element: HTMLElement): void => {\n this.#values.delete(element);\n };\n\n activateElement = (element: HTMLElement): void => {\n // `has`, not a `!== undefined` check: `T` may itself be `undefined`, so\n // only membership distinguishes \"not registered\" from \"registered against\n // an undefined value\".\n if (!this.#values.has(element)) {\n return;\n }\n this.select(this.#values.get(element) as T);\n };\n\n idFor = (value: T, kind: 'tab' | 'panel'): string => {\n let index = this.#indices.get(value);\n if (index === undefined) {\n index = this.#indices.size;\n this.#indices.set(value, index);\n }\n return `${guidFor(this)}-${kind}-${index}`;\n };\n\n @cached\n get context(): TabsContext<T> {\n return {\n indicator: this.indicator,\n orientation: this.orientation,\n listClass: this.styles.list({ class: this.args.classes?.list }),\n indicatorClass: this.styles.indicator({\n class: this.args.classes?.indicator\n }),\n tabClass: this.styles.tab({ class: this.args.classes?.tab }),\n panelClass: this.styles.panel({ class: this.args.classes?.panel }),\n isGroupDisabled: this.args.isDisabled ?? false,\n isSelected: this.isSelected,\n select: this.select,\n registerValue: this.registerValue,\n unregisterValue: this.unregisterValue,\n idFor: this.idFor,\n roving: this.roving\n };\n }\n\n <template>\n <div class={{this.styles.base class=@classes.base}} ...attributes>\n {{#let\n (component TabsList context=this.context)\n (component TabsTab context=this.context)\n (component TabsPanel context=this.context)\n as |TabList TabItem TabPanel|\n }}\n {{! @glint-ignore: WithBoundArgs vs. a generic component }}\n {{yield (hash List=TabList Tab=TabItem Panel=TabPanel)}}\n {{/let}}\n </div>\n </template>\n}\n\nexport { Tabs, TabsList, type TabsSignature, type TabsArgs, type TabsContext };\nexport default Tabs;\n"],"names":["TabsList","Component","setComponentTemplate","precompileTemplate","strictMode","Tabs","indicator","selectionIndicator","roving","rovingFocus","orientation","activationMode","args","onActivate","activateElement","g","prototype","tracked","i","Map","constructor","owner","_value","defaultValue","styles","tabs","useStyles","variant","intent","size","isFullWidth","isDisabled","n","cached","isControlled","selectedValue","value","isSelected","select","onChange","registerValue","element","set","unregisterValue","delete","has","get","idFor","kind","index","undefined","guidFor","context","listClass","list","class","classes","indicatorClass","tabClass","tab","panelClass","panel","isGroupDisabled","scope","TabsTab","TabsPanel","hash"],"mappings":";;;;;;;;;;;;;AA2HA;AACA;AACA;AACA;AACA;AACA,MAAMA,QAAA,SAAoBC,SAAA,CAA4B;AACpD,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,qRAAA,EAYA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;AAgBA,MAAMC,IAAA,SAAgBJ,SAAA,CAAwB;EAC5CK,SAAA,GAAYC,kBAAA,EAAA;EAEZC,MAAA,GAASC,WAAA,CAAY,OAAO;IAC1BC,WAAA,EAAa,IAAI,CAACA,WAAW;AAC7BC,IAAAA,cAAA,EAAgB,IAAI,CAACC,IAAI,CAACD,cAAc,IAAI,WAAA;IAC5CE,UAAA,EAAY,IAAI,CAACC;AACnB,GAAC,CAAA,CAAA;AAED;AACA;AACA;AAAA,EAAA;IAAAC,eAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CACCC,OAAA,CAAA,CAAA;AAAA;EAAA,OAAA,IAAAC,2BAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,MAAA;AAED,EAAA,OAAO,GAAG,IAAIC,GAAA,EAAiB;AAE/B;AACA;AACA;AACA;AACA;AACA,EAAA,QAAQ,GAAG,IAAIA,GAAA,EAAa;AAE5BC,EAAAA,WAAAA,CAAYC,KAAY,EAAET,IAA8B,EAAE;AACxD,IAAA,KAAK,CAACS,KAAA,EAAOT,IAAA,CAAA;AACb,IAAA,IAAI,CAACU,MAAM,GAAG,IAAI,CAACV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1
|
-
export { N as Notification, T as Timer } from '../../manager-
|
|
1
|
+
export { N as Notification, T as Timer } from '../../manager-CDIZzrQ9.js';
|
|
2
2
|
import '@ember/service';
|
|
3
|
-
export { NotificationCard } from '
|
|
3
|
+
export { N as NotificationCard, a as NotificationStack } from '../../notification-card-D5fd-Sxa.js';
|
|
4
4
|
export { NotificationsContainer } from './notifications-container.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,109 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
/* eslint-disable ember/no-runloop */
|
|
17
|
-
class NotificationCard extends Component {
|
|
18
|
-
static {
|
|
19
|
-
decorateFieldV2(this.prototype, "notifications", [service]);
|
|
20
|
-
}
|
|
21
|
-
#notifications = (initializeDeferredDecorator(this, "notifications"), void 0);
|
|
22
|
-
static {
|
|
23
|
-
decorateFieldV2(this.prototype, "hasEntered", [tracked], function () {
|
|
24
|
-
return false;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
#hasEntered = (initializeDeferredDecorator(this, "hasEntered"), void 0);
|
|
28
|
-
get styles() {
|
|
29
|
-
const styles = [`transition-duration: ${this.args.notification.transitionDuration}ms`];
|
|
30
|
-
if (!this.hasEntered) {
|
|
31
|
-
styles.push(`transition-delay: ${this.args.notification.transitionDuration}ms`);
|
|
32
|
-
}
|
|
33
|
-
return htmlSafe(styles.join('; '));
|
|
34
|
-
}
|
|
35
|
-
transitionIn = modifier(element => {
|
|
36
|
-
const spacing = typeof this.args.spacing === 'undefined' ? 16 : this.args.spacing;
|
|
37
|
-
const expectedHeight = element.offsetHeight + spacing;
|
|
38
|
-
const duration = this.args.notification.transitionDuration / 2;
|
|
39
|
-
requestAnimationFrame(() => {
|
|
40
|
-
element.style.height = '0';
|
|
41
|
-
const transition = `height ${duration}ms ease-in ${duration}ms`;
|
|
42
|
-
element.style.transition = transition;
|
|
43
|
-
requestAnimationFrame(() => {
|
|
44
|
-
element.style.height = `${expectedHeight}px`;
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
later(this, () => {
|
|
48
|
-
this.hasEntered = true;
|
|
49
|
-
}, this.args.notification.transitionDuration);
|
|
50
|
-
});
|
|
51
|
-
transitionOut = modifier((element, [isExiting, ..._]) => {
|
|
52
|
-
if (isExiting) {
|
|
53
|
-
element.style.height = '0';
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
remove = () => {
|
|
57
|
-
this.notifications.remove(this.args.notification);
|
|
58
|
-
};
|
|
59
|
-
pause = () => {
|
|
60
|
-
if (this.args.notification.timer) {
|
|
61
|
-
this.args.notification.timer.pause();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
resume = () => {
|
|
65
|
-
if (this.args.notification.timer) {
|
|
66
|
-
this.args.notification.timer.resume();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
handleClickCustomAction = customAction => {
|
|
70
|
-
customAction.onClick();
|
|
71
|
-
this.notifications.remove(this.args.notification);
|
|
72
|
-
};
|
|
73
|
-
get classes() {
|
|
74
|
-
const {
|
|
75
|
-
notificationCard
|
|
76
|
-
} = useStyles();
|
|
77
|
-
let {
|
|
78
|
-
base,
|
|
79
|
-
message,
|
|
80
|
-
customActions,
|
|
81
|
-
customActionButton,
|
|
82
|
-
closeButton
|
|
83
|
-
} = notificationCard({
|
|
84
|
-
appearance: this.args.notification.appearance
|
|
85
|
-
});
|
|
86
|
-
return {
|
|
87
|
-
base: base(),
|
|
88
|
-
message: message(),
|
|
89
|
-
customActions: customActions(),
|
|
90
|
-
customActionButton: customActionButton(),
|
|
91
|
-
closeButton: closeButton()
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
static {
|
|
95
|
-
setComponentTemplate(precompileTemplate("\n {{!-- template-lint-disable no-invalid-interactive --}}\n {{!-- template-lint-disable no-unnecessary-concat --}}\n {{!-- template-lint-disable no-inline-styles --}}\n {{!-- template-lint-disable style-concatenation --}}\n <div {{this.transitionIn}} {{this.transitionOut @notification.isRemoving}}>\n {{#unless @notification.isRemoving}}\n <div {{on \"mouseenter\" this.pause}} {{on \"mouseleave\" this.resume}} {{cssTransition (concat \"notification-transition--slide-from-\" @placement) isEnabled=true}} class={{this.classes.base}} style=\"{{this.styles}}\" ...attributes>\n <div class={{this.classes.message}}>\n {{@notification.message}}\n </div>\n\n {{#if @notification.customActions}}\n <div class={{this.classes.customActions}}>\n {{#each @notification.customActions as |customAction|}}\n <button type=\"button\" class={{this.classes.customActionButton}} {{on \"click\" (fn this.handleClickCustomAction customAction)}}>\n {{customAction.label}}\n </button>\n {{/each}}\n </div>\n {{/if}}\n\n {{#if @notification.allowClosing}}\n <CloseButton @onPress={{this.remove}} @size=\"sm\" @class={{this.classes.closeButton}} />\n {{/if}}\n </div>\n {{/unless}}\n </div>\n ", {
|
|
96
|
-
strictMode: true,
|
|
97
|
-
scope: () => ({
|
|
98
|
-
on,
|
|
99
|
-
cssTransition,
|
|
100
|
-
concat,
|
|
101
|
-
fn,
|
|
102
|
-
CloseButton
|
|
103
|
-
})
|
|
104
|
-
}), this);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export { NotificationCard, NotificationCard as default };
|
|
1
|
+
import '@glimmer/component';
|
|
2
|
+
import '@glimmer/tracking';
|
|
3
|
+
import 'ember-modifier';
|
|
4
|
+
import '@ember/service';
|
|
5
|
+
import '@ember/template';
|
|
6
|
+
import '@ember/helper';
|
|
7
|
+
import '../buttons/close-button.js';
|
|
8
|
+
import '../buttons/button.js';
|
|
9
|
+
import '../utilities/spinner.js';
|
|
10
|
+
import '../../intent-icons-DpEViO8C.js';
|
|
11
|
+
import '@frontile/theme';
|
|
12
|
+
export { N as NotificationCard, N as default } from '../../notification-card-D5fd-Sxa.js';
|
|
13
|
+
import '@ember/template-compilation';
|
|
14
|
+
import '@ember/component';
|
|
15
|
+
import '../../runtime--fcdnjmJ-BOdRhmsS.js';
|
|
109
16
|
//# sourceMappingURL=notification-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-card.js","sources":[
|
|
1
|
+
{"version":3,"file":"notification-card.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|