@ember-joinery/primitives 0.0.0-stage → 1.0.1
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/CHANGELOG.md +472 -0
- package/LICENSE.md +9 -0
- package/NOTICE +532 -0
- package/README.md +11 -2
- package/addon-main.cjs +4 -0
- package/declarations/-private/combobox-list.d.ts +59 -0
- package/declarations/-private/combobox-list.d.ts.map +1 -0
- package/declarations/-private/command-score.d.ts +33 -0
- package/declarations/-private/command-score.d.ts.map +1 -0
- package/declarations/-private/delay-group.d.ts +47 -0
- package/declarations/-private/delay-group.d.ts.map +1 -0
- package/declarations/-private/dialog.d.ts +180 -0
- package/declarations/-private/dialog.d.ts.map +1 -0
- package/declarations/-private/form-control.d.ts +70 -0
- package/declarations/-private/form-control.d.ts.map +1 -0
- package/declarations/-private/form-data.d.ts +14 -0
- package/declarations/-private/form-data.d.ts.map +1 -0
- package/declarations/-private/hover-intent.d.ts +48 -0
- package/declarations/-private/hover-intent.d.ts.map +1 -0
- package/declarations/-private/image-loading.d.ts +77 -0
- package/declarations/-private/image-loading.d.ts.map +1 -0
- package/declarations/-private/indicator.d.ts +27 -0
- package/declarations/-private/indicator.d.ts.map +1 -0
- package/declarations/-private/instances.d.ts +11 -0
- package/declarations/-private/instances.d.ts.map +1 -0
- package/declarations/-private/layout-styles.d.ts +34 -0
- package/declarations/-private/layout-styles.d.ts.map +1 -0
- package/declarations/-private/menu.d.ts +616 -0
- package/declarations/-private/menu.d.ts.map +1 -0
- package/declarations/-private/observers.d.ts +35 -0
- package/declarations/-private/observers.d.ts.map +1 -0
- package/declarations/-private/popper.d.ts +149 -0
- package/declarations/-private/popper.d.ts.map +1 -0
- package/declarations/-private/presence-chart.d.ts +39 -0
- package/declarations/-private/presence-chart.d.ts.map +1 -0
- package/declarations/-private/promise-state.d.ts +41 -0
- package/declarations/-private/promise-state.d.ts.map +1 -0
- package/declarations/-private/scroll-end.d.ts +16 -0
- package/declarations/-private/scroll-end.d.ts.map +1 -0
- package/declarations/-private/scroll-visibility.d.ts +68 -0
- package/declarations/-private/scroll-visibility.d.ts.map +1 -0
- package/declarations/-private/toast.d.ts +119 -0
- package/declarations/-private/toast.d.ts.map +1 -0
- package/declarations/-private/typeahead-search.d.ts +29 -0
- package/declarations/-private/typeahead-search.d.ts.map +1 -0
- package/declarations/accordion.d.ts +284 -0
- package/declarations/accordion.d.ts.map +1 -0
- package/declarations/alert-dialog.d.ts +80 -0
- package/declarations/alert-dialog.d.ts.map +1 -0
- package/declarations/anchor/component.d.ts +63 -0
- package/declarations/anchor/component.d.ts.map +1 -0
- package/declarations/anchor/index.d.ts +7 -0
- package/declarations/anchor/index.d.ts.map +1 -0
- package/declarations/anchor/middleware.d.ts +46 -0
- package/declarations/anchor/middleware.d.ts.map +1 -0
- package/declarations/anchor/modifier.d.ts +34 -0
- package/declarations/anchor/modifier.d.ts.map +1 -0
- package/declarations/anchor/options.d.ts +112 -0
- package/declarations/anchor/options.d.ts.map +1 -0
- package/declarations/anchor/position.d.ts +36 -0
- package/declarations/anchor/position.d.ts.map +1 -0
- package/declarations/anchor.d.ts +2 -0
- package/declarations/as.d.ts +33 -0
- package/declarations/as.d.ts.map +1 -0
- package/declarations/aspect-ratio.d.ts +34 -0
- package/declarations/aspect-ratio.d.ts.map +1 -0
- package/declarations/avatar.d.ts +178 -0
- package/declarations/avatar.d.ts.map +1 -0
- package/declarations/body-class.d.ts +30 -0
- package/declarations/body-class.d.ts.map +1 -0
- package/declarations/breadcrumb.d.ts +64 -0
- package/declarations/breadcrumb.d.ts.map +1 -0
- package/declarations/calendar/dates.d.ts +142 -0
- package/declarations/calendar/dates.d.ts.map +1 -0
- package/declarations/calendar/index.d.ts +59 -0
- package/declarations/calendar/index.d.ts.map +1 -0
- package/declarations/calendar/state.d.ts +415 -0
- package/declarations/calendar/state.d.ts.map +1 -0
- package/declarations/calendar.d.ts +3 -0
- package/declarations/checkbox.d.ts +71 -0
- package/declarations/checkbox.d.ts.map +1 -0
- package/declarations/collapsible.d.ts +216 -0
- package/declarations/collapsible.d.ts.map +1 -0
- package/declarations/color-scheme.d.ts +115 -0
- package/declarations/color-scheme.d.ts.map +1 -0
- package/declarations/combobox.d.ts +569 -0
- package/declarations/combobox.d.ts.map +1 -0
- package/declarations/command.d.ts +410 -0
- package/declarations/command.d.ts.map +1 -0
- package/declarations/context-menu.d.ts +155 -0
- package/declarations/context-menu.d.ts.map +1 -0
- package/declarations/controllable-state.d.ts +85 -0
- package/declarations/controllable-state.d.ts.map +1 -0
- package/declarations/dialog.d.ts +80 -0
- package/declarations/dialog.d.ts.map +1 -0
- package/declarations/direction.d.ts +55 -0
- package/declarations/direction.d.ts.map +1 -0
- package/declarations/dismiss.d.ts +111 -0
- package/declarations/dismiss.d.ts.map +1 -0
- package/declarations/dom-context.d.ts +74 -0
- package/declarations/dom-context.d.ts.map +1 -0
- package/declarations/drawer/controller.d.ts +174 -0
- package/declarations/drawer/controller.d.ts.map +1 -0
- package/declarations/drawer/index.d.ts +105 -0
- package/declarations/drawer/index.d.ts.map +1 -0
- package/declarations/drawer/machine.d.ts +139 -0
- package/declarations/drawer/machine.d.ts.map +1 -0
- package/declarations/drawer/parts.d.ts +85 -0
- package/declarations/drawer/parts.d.ts.map +1 -0
- package/declarations/drawer.d.ts +2 -0
- package/declarations/dropdown-menu.d.ts +169 -0
- package/declarations/dropdown-menu.d.ts.map +1 -0
- package/declarations/external-link.d.ts +26 -0
- package/declarations/external-link.d.ts.map +1 -0
- package/declarations/file-drop.d.ts +119 -0
- package/declarations/file-drop.d.ts.map +1 -0
- package/declarations/focus-scope.d.ts +105 -0
- package/declarations/focus-scope.d.ts.map +1 -0
- package/declarations/focus.d.ts +114 -0
- package/declarations/focus.d.ts.map +1 -0
- package/declarations/head.d.ts +20 -0
- package/declarations/head.d.ts.map +1 -0
- package/declarations/heading.d.ts +59 -0
- package/declarations/heading.d.ts.map +1 -0
- package/declarations/hero.d.ts +32 -0
- package/declarations/hero.d.ts.map +1 -0
- package/declarations/hide-others.d.ts +35 -0
- package/declarations/hide-others.d.ts.map +1 -0
- package/declarations/hover-card.d.ts +148 -0
- package/declarations/hover-card.d.ts.map +1 -0
- package/declarations/i18n.d.ts +47 -0
- package/declarations/i18n.d.ts.map +1 -0
- package/declarations/id.d.ts +15 -0
- package/declarations/id.d.ts.map +1 -0
- package/declarations/iframe.d.ts +12 -0
- package/declarations/iframe.d.ts.map +1 -0
- package/declarations/incremental-each.d.ts +81 -0
- package/declarations/incremental-each.d.ts.map +1 -0
- package/declarations/index.d.ts +108 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/input-otp.d.ts +201 -0
- package/declarations/input-otp.d.ts.map +1 -0
- package/declarations/keys.d.ts +50 -0
- package/declarations/keys.d.ts.map +1 -0
- package/declarations/label.d.ts +36 -0
- package/declarations/label.d.ts.map +1 -0
- package/declarations/layer.d.ts +56 -0
- package/declarations/layer.d.ts.map +1 -0
- package/declarations/link-helper.d.ts +73 -0
- package/declarations/link-helper.d.ts.map +1 -0
- package/declarations/link.d.ts +60 -0
- package/declarations/link.d.ts.map +1 -0
- package/declarations/load.d.ts +47 -0
- package/declarations/load.d.ts.map +1 -0
- package/declarations/menubar.d.ts +231 -0
- package/declarations/menubar.d.ts.map +1 -0
- package/declarations/message-scroller/components.d.ts +229 -0
- package/declarations/message-scroller/components.d.ts.map +1 -0
- package/declarations/message-scroller/geometry.d.ts +95 -0
- package/declarations/message-scroller/geometry.d.ts.map +1 -0
- package/declarations/message-scroller/index.d.ts +4 -0
- package/declarations/message-scroller/index.d.ts.map +1 -0
- package/declarations/message-scroller/state.d.ts +124 -0
- package/declarations/message-scroller/state.d.ts.map +1 -0
- package/declarations/message-scroller.d.ts +2 -0
- package/declarations/messages.d.ts +166 -0
- package/declarations/messages.d.ts.map +1 -0
- package/declarations/narrowing.d.ts +24 -0
- package/declarations/narrowing.d.ts.map +1 -0
- package/declarations/native-form.d.ts +56 -0
- package/declarations/native-form.d.ts.map +1 -0
- package/declarations/native-value.d.ts +47 -0
- package/declarations/native-value.d.ts.map +1 -0
- package/declarations/navigation-menu.d.ts +406 -0
- package/declarations/navigation-menu.d.ts.map +1 -0
- package/declarations/on-resize.d.ts +32 -0
- package/declarations/on-resize.d.ts.map +1 -0
- package/declarations/part.d.ts +99 -0
- package/declarations/part.d.ts.map +1 -0
- package/declarations/popover.d.ts +236 -0
- package/declarations/popover.d.ts.map +1 -0
- package/declarations/portal/index.d.ts +3 -0
- package/declarations/portal/index.d.ts.map +1 -0
- package/declarations/portal/portal.d.ts +46 -0
- package/declarations/portal/portal.d.ts.map +1 -0
- package/declarations/portal/targets.d.ts +40 -0
- package/declarations/portal/targets.d.ts.map +1 -0
- package/declarations/portal.d.ts +2 -0
- package/declarations/presence.d.ts +80 -0
- package/declarations/presence.d.ts.map +1 -0
- package/declarations/progress.d.ts +98 -0
- package/declarations/progress.d.ts.map +1 -0
- package/declarations/proper-links.d.ts +69 -0
- package/declarations/proper-links.d.ts.map +1 -0
- package/declarations/qp.d.ts +55 -0
- package/declarations/qp.d.ts.map +1 -0
- package/declarations/questionnaire/components.d.ts +348 -0
- package/declarations/questionnaire/components.d.ts.map +1 -0
- package/declarations/questionnaire/index.d.ts +4 -0
- package/declarations/questionnaire/index.d.ts.map +1 -0
- package/declarations/questionnaire/state.d.ts +400 -0
- package/declarations/questionnaire/state.d.ts.map +1 -0
- package/declarations/questionnaire/utils.d.ts +65 -0
- package/declarations/questionnaire/utils.d.ts.map +1 -0
- package/declarations/questionnaire.d.ts +2 -0
- package/declarations/radio-group.d.ts +115 -0
- package/declarations/radio-group.d.ts.map +1 -0
- package/declarations/rating.d.ts +214 -0
- package/declarations/rating.d.ts.map +1 -0
- package/declarations/resizable/components.d.ts +107 -0
- package/declarations/resizable/components.d.ts.map +1 -0
- package/declarations/resizable/index.d.ts +4 -0
- package/declarations/resizable/index.d.ts.map +1 -0
- package/declarations/resizable/layout.d.ts +93 -0
- package/declarations/resizable/layout.d.ts.map +1 -0
- package/declarations/resizable/state.d.ts +211 -0
- package/declarations/resizable/state.d.ts.map +1 -0
- package/declarations/resizable.d.ts +2 -0
- package/declarations/resize-observer.d.ts +40 -0
- package/declarations/resize-observer.d.ts.map +1 -0
- package/declarations/roving-focus.d.ts +204 -0
- package/declarations/roving-focus.d.ts.map +1 -0
- package/declarations/scroll-area/components.d.ts +125 -0
- package/declarations/scroll-area/components.d.ts.map +1 -0
- package/declarations/scroll-area/index.d.ts +3 -0
- package/declarations/scroll-area/index.d.ts.map +1 -0
- package/declarations/scroll-area/state.d.ts +147 -0
- package/declarations/scroll-area/state.d.ts.map +1 -0
- package/declarations/scroll-area.d.ts +2 -0
- package/declarations/scroll-lock.d.ts +69 -0
- package/declarations/scroll-lock.d.ts.map +1 -0
- package/declarations/scroller.d.ts +71 -0
- package/declarations/scroller.d.ts.map +1 -0
- package/declarations/select.d.ts +459 -0
- package/declarations/select.d.ts.map +1 -0
- package/declarations/separator.d.ts +71 -0
- package/declarations/separator.d.ts.map +1 -0
- package/declarations/service.d.ts +83 -0
- package/declarations/service.d.ts.map +1 -0
- package/declarations/shadowed.d.ts +63 -0
- package/declarations/shadowed.d.ts.map +1 -0
- package/declarations/slider.d.ts +283 -0
- package/declarations/slider.d.ts.map +1 -0
- package/declarations/sticky-footer.d.ts +43 -0
- package/declarations/sticky-footer.d.ts.map +1 -0
- package/declarations/store.d.ts +47 -0
- package/declarations/store.d.ts.map +1 -0
- package/declarations/switch.d.ts +76 -0
- package/declarations/switch.d.ts.map +1 -0
- package/declarations/tabs.d.ts +250 -0
- package/declarations/tabs.d.ts.map +1 -0
- package/declarations/toast/icons.d.ts +29 -0
- package/declarations/toast/icons.d.ts.map +1 -0
- package/declarations/toast/index.d.ts +4 -0
- package/declarations/toast/index.d.ts.map +1 -0
- package/declarations/toast/item.d.ts +162 -0
- package/declarations/toast/item.d.ts.map +1 -0
- package/declarations/toast/state.d.ts +276 -0
- package/declarations/toast/state.d.ts.map +1 -0
- package/declarations/toast/styles.d.ts +20 -0
- package/declarations/toast/styles.d.ts.map +1 -0
- package/declarations/toast/toaster.d.ts +173 -0
- package/declarations/toast/toaster.d.ts.map +1 -0
- package/declarations/toast.d.ts +2 -0
- package/declarations/toggle-group.d.ts +161 -0
- package/declarations/toggle-group.d.ts.map +1 -0
- package/declarations/toggle.d.ts +70 -0
- package/declarations/toggle.d.ts.map +1 -0
- package/declarations/tooltip.d.ts +227 -0
- package/declarations/tooltip.d.ts.map +1 -0
- package/declarations/typeahead.d.ts +97 -0
- package/declarations/typeahead.d.ts.map +1 -0
- package/declarations/viewport.d.ts +109 -0
- package/declarations/viewport.d.ts.map +1 -0
- package/declarations/visually-hidden.d.ts +42 -0
- package/declarations/visually-hidden.d.ts.map +1 -0
- package/declarations/zoetrope.d.ts +120 -0
- package/declarations/zoetrope.d.ts.map +1 -0
- package/dist/accordion.js +367 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert-dialog.js +122 -0
- package/dist/alert-dialog.js.map +1 -0
- package/dist/anchor.js +2 -0
- package/dist/anchor.js.map +1 -0
- package/dist/as.js +60 -0
- package/dist/as.js.map +1 -0
- package/dist/aspect-ratio.js +59 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/avatar.js +464 -0
- package/dist/avatar.js.map +1 -0
- package/dist/body-class.js +57 -0
- package/dist/body-class.js.map +1 -0
- package/dist/breadcrumb.js +59 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/calendar.js +1494 -0
- package/dist/calendar.js.map +1 -0
- package/dist/checkbox.js +81 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/collapsible.js +255 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/color-scheme.js +306 -0
- package/dist/color-scheme.js.map +1 -0
- package/dist/combobox.js +1413 -0
- package/dist/combobox.js.map +1 -0
- package/dist/command.js +1054 -0
- package/dist/command.js.map +1 -0
- package/dist/component-DqLt83fo.js +886 -0
- package/dist/component-DqLt83fo.js.map +1 -0
- package/dist/components-CWfg0cFs.js +1745 -0
- package/dist/components-CWfg0cFs.js.map +1 -0
- package/dist/components-DBWszEI3.js +1285 -0
- package/dist/components-DBWszEI3.js.map +1 -0
- package/dist/components-DI8Azu05.js +1542 -0
- package/dist/components-DI8Azu05.js.map +1 -0
- package/dist/components-F0Ini448.js +875 -0
- package/dist/components-F0Ini448.js.map +1 -0
- package/dist/context-menu.js +207 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/controllable-state.js +134 -0
- package/dist/controllable-state.js.map +1 -0
- package/dist/delay-group-B1K03gBL.js +75 -0
- package/dist/delay-group-B1K03gBL.js.map +1 -0
- package/dist/dialog-3gfz_8NA.js +349 -0
- package/dist/dialog-3gfz_8NA.js.map +1 -0
- package/dist/dialog.js +57 -0
- package/dist/dialog.js.map +1 -0
- package/dist/direction.js +75 -0
- package/dist/direction.js.map +1 -0
- package/dist/dismiss.js +329 -0
- package/dist/dismiss.js.map +1 -0
- package/dist/dom-context.js +104 -0
- package/dist/dom-context.js.map +1 -0
- package/dist/drawer.js +1456 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown-menu.js +201 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/external-link.js +21 -0
- package/dist/external-link.js.map +1 -0
- package/dist/file-drop.js +183 -0
- package/dist/file-drop.js.map +1 -0
- package/dist/focus-scope.js +292 -0
- package/dist/focus-scope.js.map +1 -0
- package/dist/focus.js +307 -0
- package/dist/focus.js.map +1 -0
- package/dist/form-control-Ca_KHSKK.js +177 -0
- package/dist/form-control-Ca_KHSKK.js.map +1 -0
- package/dist/head.js +25 -0
- package/dist/head.js.map +1 -0
- package/dist/heading.js +152 -0
- package/dist/heading.js.map +1 -0
- package/dist/hero.js +36 -0
- package/dist/hero.js.map +1 -0
- package/dist/hide-others.js +108 -0
- package/dist/hide-others.js.map +1 -0
- package/dist/hover-card.js +246 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/hover-intent-Bxb83fgX.js +92 -0
- package/dist/hover-intent-Bxb83fgX.js.map +1 -0
- package/dist/i18n.js +72 -0
- package/dist/i18n.js.map +1 -0
- package/dist/id.js +24 -0
- package/dist/id.js.map +1 -0
- package/dist/iframe.js +19 -0
- package/dist/iframe.js.map +1 -0
- package/dist/incremental-each.js +181 -0
- package/dist/incremental-each.js.map +1 -0
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -0
- package/dist/indicator-sYuRuFJA.js +26 -0
- package/dist/indicator-sYuRuFJA.js.map +1 -0
- package/dist/input-otp.js +611 -0
- package/dist/input-otp.js.map +1 -0
- package/dist/keys.js +65 -0
- package/dist/keys.js.map +1 -0
- package/dist/label.js +41 -0
- package/dist/label.js.map +1 -0
- package/dist/layer.js +157 -0
- package/dist/layer.js.map +1 -0
- package/dist/layout-styles-DY86so8a.js +81 -0
- package/dist/layout-styles-DY86so8a.js.map +1 -0
- package/dist/link-helper.js +122 -0
- package/dist/link-helper.js.map +1 -0
- package/dist/link.js +39 -0
- package/dist/link.js.map +1 -0
- package/dist/load.js +54 -0
- package/dist/load.js.map +1 -0
- package/dist/menu-Da1LFCet.js +1109 -0
- package/dist/menu-Da1LFCet.js.map +1 -0
- package/dist/menubar.js +357 -0
- package/dist/menubar.js.map +1 -0
- package/dist/message-scroller.js +2 -0
- package/dist/message-scroller.js.map +1 -0
- package/dist/messages.js +168 -0
- package/dist/messages.js.map +1 -0
- package/dist/narrowing.js +29 -0
- package/dist/narrowing.js.map +1 -0
- package/dist/native-form.js +134 -0
- package/dist/native-form.js.map +1 -0
- package/dist/native-value.js +125 -0
- package/dist/native-value.js.map +1 -0
- package/dist/navigation-menu.js +872 -0
- package/dist/navigation-menu.js.map +1 -0
- package/dist/observers-aItWe029.js +113 -0
- package/dist/observers-aItWe029.js.map +1 -0
- package/dist/on-resize.js +47 -0
- package/dist/on-resize.js.map +1 -0
- package/dist/part.js +291 -0
- package/dist/part.js.map +1 -0
- package/dist/popover.js +419 -0
- package/dist/popover.js.map +1 -0
- package/dist/popper-BbTzV8dP.js +323 -0
- package/dist/popper-BbTzV8dP.js.map +1 -0
- package/dist/portal-U554WDI9.js +214 -0
- package/dist/portal-U554WDI9.js.map +1 -0
- package/dist/portal.js +2 -0
- package/dist/portal.js.map +1 -0
- package/dist/presence.js +243 -0
- package/dist/presence.js.map +1 -0
- package/dist/progress.js +106 -0
- package/dist/progress.js.map +1 -0
- package/dist/promise-state-BMi2zVoT.js +91 -0
- package/dist/promise-state-BMi2zVoT.js.map +1 -0
- package/dist/proper-links.js +136 -0
- package/dist/proper-links.js.map +1 -0
- package/dist/qp.js +77 -0
- package/dist/qp.js.map +1 -0
- package/dist/questionnaire.js +2 -0
- package/dist/questionnaire.js.map +1 -0
- package/dist/radio-group.js +149 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/rating.js +261 -0
- package/dist/rating.js.map +1 -0
- package/dist/resizable.js +2 -0
- package/dist/resizable.js.map +1 -0
- package/dist/resize-observer.js +85 -0
- package/dist/resize-observer.js.map +1 -0
- package/dist/roving-focus.js +355 -0
- package/dist/roving-focus.js.map +1 -0
- package/dist/scroll-area.js +2 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/scroll-end-Cer8JSIB.js +87 -0
- package/dist/scroll-end-Cer8JSIB.js.map +1 -0
- package/dist/scroll-lock.js +267 -0
- package/dist/scroll-lock.js.map +1 -0
- package/dist/scroller.js +117 -0
- package/dist/scroller.js.map +1 -0
- package/dist/select.js +1223 -0
- package/dist/select.js.map +1 -0
- package/dist/separator.js +80 -0
- package/dist/separator.js.map +1 -0
- package/dist/service.js +160 -0
- package/dist/service.js.map +1 -0
- package/dist/shadowed.js +70 -0
- package/dist/shadowed.js.map +1 -0
- package/dist/slider.js +586 -0
- package/dist/slider.js.map +1 -0
- package/dist/sticky-footer.js +40 -0
- package/dist/sticky-footer.js.map +1 -0
- package/dist/store-BjiAd-KP.js +93 -0
- package/dist/store-BjiAd-KP.js.map +1 -0
- package/dist/store.js +4 -0
- package/dist/store.js.map +1 -0
- package/dist/switch.js +58 -0
- package/dist/switch.js.map +1 -0
- package/dist/tabs.js +458 -0
- package/dist/tabs.js.map +1 -0
- package/dist/toast.js +2 -0
- package/dist/toast.js.map +1 -0
- package/dist/toaster-DwprFZ1J.js +1518 -0
- package/dist/toaster-DwprFZ1J.js.map +1 -0
- package/dist/toggle-group.js +221 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.js +78 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tooltip.js +422 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/typeahead.js +233 -0
- package/dist/typeahead.js.map +1 -0
- package/dist/viewport.js +138 -0
- package/dist/viewport.js.map +1 -0
- package/dist/visually-hidden.js +49 -0
- package/dist/visually-hidden.js.map +1 -0
- package/dist/zoetrope.js +336 -0
- package/dist/zoetrope.js.map +1 -0
- package/package.json +101 -3
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { TOC } from '@ember/component/template-only';
|
|
3
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
4
|
+
import { type TagName } from './as';
|
|
5
|
+
import type { AnchorOptions } from './anchor/index.ts';
|
|
6
|
+
import { type ControllableArgs } from './controllable-state.ts';
|
|
7
|
+
import { type DismissReason, type FocusOutsideEvent, type PointerDownOutsideEvent } from './dismiss.ts';
|
|
8
|
+
import { type PartModifier } from './part.ts';
|
|
9
|
+
import { ElementRef, PlacedData, type PopperContentArgs } from './-private/popper';
|
|
10
|
+
/** What a hover card's Content takes: where it goes (Radix's Popper arguments) and what it does. */
|
|
11
|
+
export interface HoverCardContentArgs extends PopperContentArgs {
|
|
12
|
+
/** The tag to render. Default `div`. */
|
|
13
|
+
as?: TagName;
|
|
14
|
+
/** Keep it rendered while closed, for animating it yourself. */
|
|
15
|
+
forceMount?: boolean;
|
|
16
|
+
/** Escape was pressed. `preventDefault()` keeps it open. */
|
|
17
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
18
|
+
/** A pointer went down outside it. `preventDefault()` keeps it open. */
|
|
19
|
+
onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
|
|
20
|
+
/** Focus moved outside it (it stays open: the trigger's blur closes it). */
|
|
21
|
+
onFocusOutside?: (event: FocusOutsideEvent) => void;
|
|
22
|
+
/** Either of the last two, after its own handler. `preventDefault()` keeps it open. */
|
|
23
|
+
onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
24
|
+
}
|
|
25
|
+
interface TriggerSignature {
|
|
26
|
+
Args: {
|
|
27
|
+
part: PartModifier;
|
|
28
|
+
as?: TagName;
|
|
29
|
+
};
|
|
30
|
+
Blocks: {
|
|
31
|
+
default: [];
|
|
32
|
+
};
|
|
33
|
+
Element: HTMLAnchorElement;
|
|
34
|
+
}
|
|
35
|
+
/** An `<a>`, or `@as`, that opens the card while the pointer rests on it or it has focus. */
|
|
36
|
+
declare const HoverCardTrigger: TOC<TriggerSignature>;
|
|
37
|
+
export interface HoverCardContentSignature {
|
|
38
|
+
Args: HoverCardContentArgs & {
|
|
39
|
+
/** @internal Bound by the hover card. */
|
|
40
|
+
card: HoverCard;
|
|
41
|
+
};
|
|
42
|
+
Blocks: {
|
|
43
|
+
default: [];
|
|
44
|
+
};
|
|
45
|
+
Element: HTMLDivElement;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The card itself: in the top layer while it is open (and while it animates out), placed
|
|
49
|
+
* against its trigger (below it, by default) and flipped to stay in view. The pointer can move
|
|
50
|
+
* onto it, and Escape or a press outside closes it.
|
|
51
|
+
*/
|
|
52
|
+
declare class HoverCardContent extends Component<HoverCardContentSignature> {
|
|
53
|
+
get anchorOptions(): AnchorOptions;
|
|
54
|
+
onEscapeKeyDown: (event: KeyboardEvent) => void;
|
|
55
|
+
onPointerDownOutside: (event: PointerDownOutsideEvent) => void;
|
|
56
|
+
onFocusOutside: (event: FocusOutsideEvent) => void;
|
|
57
|
+
onInteractOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
58
|
+
}
|
|
59
|
+
export interface HoverCardArrowSignature {
|
|
60
|
+
Args: {
|
|
61
|
+
/** @internal Bound by the hover card. */
|
|
62
|
+
card: HoverCard;
|
|
63
|
+
/** Its width, in pixels. Default 10. */
|
|
64
|
+
width?: number;
|
|
65
|
+
/** Its height, in pixels. Default 5. */
|
|
66
|
+
height?: number;
|
|
67
|
+
};
|
|
68
|
+
/** A shape of your own instead of the triangle, inside the `<svg>`. */
|
|
69
|
+
Blocks: {
|
|
70
|
+
default: [];
|
|
71
|
+
};
|
|
72
|
+
Element: SVGSVGElement;
|
|
73
|
+
}
|
|
74
|
+
/** Radix's `HoverCard.Arrow`: an `<svg>` triangle on the card's edge, pointing at the trigger. */
|
|
75
|
+
declare const HoverCardArrow: TOC<HoverCardArrowSignature>;
|
|
76
|
+
/** What a `<HoverCard>` takes. */
|
|
77
|
+
export type HoverCardArgs = ControllableArgs<'open', boolean> & {
|
|
78
|
+
/** How long the pointer rests on the trigger (or focus stays on it) before it opens, in ms. Default 700. */
|
|
79
|
+
openDelay?: number;
|
|
80
|
+
/** How long after the pointer leaves the trigger and the card (or focus leaves) it closes, in ms. Default 300. */
|
|
81
|
+
closeDelay?: number;
|
|
82
|
+
/** Its name, for `HoverCardHarness` (`data-test-jn-name`). */
|
|
83
|
+
name?: string;
|
|
84
|
+
};
|
|
85
|
+
/** What a `<HoverCard>` yields. */
|
|
86
|
+
export interface HoverCardBlockParams {
|
|
87
|
+
/** An `<a>` that opens the card (`@as` for another tag). */
|
|
88
|
+
Trigger: WithBoundArgs<typeof HoverCardTrigger, 'part'>;
|
|
89
|
+
/** The card itself, in the top layer while it is open. */
|
|
90
|
+
Content: WithBoundArgs<typeof HoverCardContent, 'card'>;
|
|
91
|
+
/** An arrow on the card's edge, pointing at the trigger. Put it inside the Content. */
|
|
92
|
+
Arrow: WithBoundArgs<typeof HoverCardArrow, 'card'>;
|
|
93
|
+
/** Makes your own element or component the trigger: `<Button {{h.trigger}}>`. */
|
|
94
|
+
trigger: PartModifier;
|
|
95
|
+
/** Whether it is open. */
|
|
96
|
+
isOpen: boolean;
|
|
97
|
+
/** Opens (`true`) or closes (`false`) it, at once. */
|
|
98
|
+
setOpen: (open: boolean) => void;
|
|
99
|
+
}
|
|
100
|
+
export interface HoverCardSignature {
|
|
101
|
+
Args: HoverCardArgs;
|
|
102
|
+
Blocks: {
|
|
103
|
+
default: [HoverCardBlockParams];
|
|
104
|
+
};
|
|
105
|
+
/** An element with `display: contents`, so it doesn't change the layout. */
|
|
106
|
+
Element: HTMLDivElement;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* A preview of what is behind a link, for sighted users with a pointer, as Radix's HoverCard
|
|
110
|
+
* (which shadcn's is built on). It renders no box of its own, and yields its parts:
|
|
111
|
+
*
|
|
112
|
+
* <HoverCard @openDelay={{100}} @closeDelay={{200}} as |h|>
|
|
113
|
+
* <h.Trigger href="/@nextjs">@nextjs</h.Trigger>
|
|
114
|
+
* <h.Content @side="top" @align="start">…</h.Content>
|
|
115
|
+
* </HoverCard>
|
|
116
|
+
*
|
|
117
|
+
* It opens once the pointer has rested on the trigger for `@openDelay` (or the trigger has had
|
|
118
|
+
* focus as long), and closes `@closeDelay` after the pointer has left both the trigger and the
|
|
119
|
+
* card (or focus left), unless the user is selecting text in it; Escape and a press outside
|
|
120
|
+
* close it at once. Touch doesn't open it. The state is its own, or yours with `@open` and
|
|
121
|
+
* `@onOpenChange`.
|
|
122
|
+
*/
|
|
123
|
+
export declare class HoverCard extends Component<HoverCardSignature> {
|
|
124
|
+
openState: import("./controllable-state.ts").ControllableState<NonNullable<boolean | undefined>>;
|
|
125
|
+
triggerRef: ElementRef<HTMLElement>;
|
|
126
|
+
arrowRef: ElementRef<HTMLElement>;
|
|
127
|
+
placed: PlacedData;
|
|
128
|
+
intent: import("./-private/hover-intent.ts").HoverIntent;
|
|
129
|
+
/** Whether the user selected text in the card, which keeps it open. */
|
|
130
|
+
hasSelection: boolean;
|
|
131
|
+
/** Whether a press inside the card is still down, which keeps it open. */
|
|
132
|
+
isPointerDownOnContent: boolean;
|
|
133
|
+
get id(): string;
|
|
134
|
+
get isOpen(): boolean;
|
|
135
|
+
get state(): 'open' | 'closed';
|
|
136
|
+
get reference(): Element | null;
|
|
137
|
+
get openDelay(): number;
|
|
138
|
+
get closeDelay(): number;
|
|
139
|
+
get isHeld(): boolean;
|
|
140
|
+
handleOpen: () => void;
|
|
141
|
+
handleClose: () => void;
|
|
142
|
+
setOpen: (open: boolean) => void;
|
|
143
|
+
dismiss: (_reason: DismissReason) => void;
|
|
144
|
+
trigger: PartModifier;
|
|
145
|
+
content: PartModifier;
|
|
146
|
+
}
|
|
147
|
+
export default HoverCard;
|
|
148
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../src/hover-card.gts"],"names":[],"mappings":"AAmXA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAI1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAM,KAAK,OAAO,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC7E,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAGnD,OAAO,EACL,UAAU,EACV,UAAU,EAMV,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAA;AAE9B,oGAAoG;AACpG,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,wCAAwC;IACxC,EAAE,CAAC,EAAE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AAoB,CAAC,CAAA;KAAE,CAAA;IAC3C,4EAA4E;IAC5E,OAAO,EAAE,cAAc,CAAA;CACxB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC1D,SAAS,wFAAoC;IAC7C,UAAU,0BAAmB;IAC7B,QAAQ,0BAAmB;IAC3B,MAAM,aAAmB;IACzB,MAAM,mDAA0B;IAChC,uEAAuE;IACvE,YAAY,UAAQ;IACpB,0EAA0E;IAC1E,sBAAsB,UAAQ;IAE9B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,QAAQ,CAE7B;IAED,IAAI,SAAS,IAAI,OAAO,GAAG,IAAI,CAE9B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,UAAU,QAAO,IAAI,CAAuB;IAE5C,WAAW,QAAO,IAAI,CAAuB;IAE7C,OAAO,GAAI,MAAM,OAAO,KAAG,IAAI,CAG9B;IAED,OAAO,GAAI,SAAS,aAAa,KAAG,IAAI,CAAuB;IAE/D,OAAO,EAAE,YAAY,CAclB;IAEH,OAAO,EAAE,YAAY,CAWlB;CA6BJ;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A built-in string: a calendar's "Previous month", a dialog's "Close". Every package exports
|
|
3
|
+
* its own from `<package>/messages`, as data for a translation catalog.
|
|
4
|
+
*/
|
|
5
|
+
export interface Message {
|
|
6
|
+
/** Stable key, `joinery.<component>.<name>`: `joinery.calendar.previousMonth`. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** English text, and the gettext msgid. Placeholders are `{name}`. */
|
|
9
|
+
message: string;
|
|
10
|
+
/** English plural, and the gettext msgid_plural. Chosen by `values.count`. */
|
|
11
|
+
plural?: string;
|
|
12
|
+
/** gettext msgctxt, to tell apart equal English strings with different meanings. */
|
|
13
|
+
context?: string;
|
|
14
|
+
/** A note for translators (gettext `#.` comment, ICU description). */
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* What translates Joinery's built-in strings, registered as `translator:main`:
|
|
19
|
+
*
|
|
20
|
+
* owner.register('translator:main', translator, { instantiate: false })
|
|
21
|
+
*/
|
|
22
|
+
export interface Translator {
|
|
23
|
+
/** BCP 47 locale. Make it tracked, so a locale change re-renders. */
|
|
24
|
+
readonly locale: string;
|
|
25
|
+
/** The translated, interpolated string. Falls back to English itself when it has none. */
|
|
26
|
+
t(message: Message, values?: Record<string, unknown>): string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A message in English: `plural` when `values.count` is a number English doesn't call one,
|
|
30
|
+
* with each `{name}` replaced by `String(values[name])` (an unknown one is left as written).
|
|
31
|
+
*/
|
|
32
|
+
export declare function format(message: Message, values?: Record<string, unknown>): string;
|
|
33
|
+
/** The app's `translator:main`, if it registered one. */
|
|
34
|
+
export declare function translator(context: unknown): Translator | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* A built-in string in the app's language: its translator's, or English without one. Pass the
|
|
37
|
+
* component (or anything with an owner) as the context.
|
|
38
|
+
*
|
|
39
|
+
* translate(this, messages.breadcrumbLabel)
|
|
40
|
+
*/
|
|
41
|
+
export declare function translate(context: unknown, message: Message, values?: Record<string, unknown>): string;
|
|
42
|
+
/**
|
|
43
|
+
* `translate` for a template, where a template-only component has no `this` to pass:
|
|
44
|
+
* `{{t messages.dialogClose}}`, or `{{t messages.carouselSlide (hash index=1 count=3)}}`.
|
|
45
|
+
*/
|
|
46
|
+
export declare const t: (message: Message, values?: Record<string, unknown>) => string;
|
|
47
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAA;IACV,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,0FAA0F;IAC1F,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAA;CAC9D;AAID;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAYjF;AAED,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAER;AAyBD;;;GAGG;AACH,eAAO,MAAM,CAAC,EAA4B,CACxC,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,MAAM,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An id that stays the same for an object's whole life, made the first time it is asked for:
|
|
3
|
+
* `jn-1`, `jn-2`… on the page. Give a part's name to get an id derived from it, so one
|
|
4
|
+
* component names all the parts its ARIA ties together (`aria-controls`, `aria-labelledby`):
|
|
5
|
+
*
|
|
6
|
+
* idFor(this) // 'jn-7', the root
|
|
7
|
+
* idFor(this, 'content') // 'jn-7-content'
|
|
8
|
+
* idFor(this, 'title') // 'jn-7-title'
|
|
9
|
+
*
|
|
10
|
+
* It works as a template helper too: `id={{idFor this "content"}}`. A caller's `@id` should
|
|
11
|
+
* win: `this.args.id ?? idFor(this, 'content')`. For a one-off id with no object to keep it,
|
|
12
|
+
* use Ember's built-in `uniqueId` from `@ember/helper`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function idFor(object: object, part?: string): string;
|
|
15
|
+
//# sourceMappingURL=id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAI3D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the page is running inside a frame (an `<iframe>`, or an embed on another site).
|
|
3
|
+
* Call it in JavaScript or in a template:
|
|
4
|
+
*
|
|
5
|
+
* {{#if (inIframe)}}<a href={{this.fullPageURL}} target="_top">Open the full page</a>{{/if}}
|
|
6
|
+
*
|
|
7
|
+
* It is ember-primitives' `inIframe`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function inIframe(): boolean;
|
|
10
|
+
/** Whether the page is the top-level window, not inside a frame: the opposite of `inIframe`. */
|
|
11
|
+
export declare function notInIframe(): boolean;
|
|
12
|
+
//# sourceMappingURL=iframe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../src/iframe.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,gGAAgG;AAChG,wBAAgB,WAAW,IAAI,OAAO,CAErC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type Owner from '@ember/owner';
|
|
3
|
+
/** How many batches have rendered, and of which collection. */
|
|
4
|
+
interface Progress<T> {
|
|
5
|
+
items: readonly T[] | undefined;
|
|
6
|
+
batches: number;
|
|
7
|
+
}
|
|
8
|
+
/** One batch of items, each with its index in the whole collection. */
|
|
9
|
+
interface Batch<T> {
|
|
10
|
+
index: number;
|
|
11
|
+
entries: {
|
|
12
|
+
value: T;
|
|
13
|
+
index: number;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export interface IncrementalEachSignature<T = unknown> {
|
|
17
|
+
Args: {
|
|
18
|
+
/** The items to render. A new array (not a change to this one) starts again from the first batch. */
|
|
19
|
+
items: readonly T[];
|
|
20
|
+
/**
|
|
21
|
+
* How many items each batch adds. Larger batches finish sooner; smaller ones give the
|
|
22
|
+
* browser back more often. Default 50; it must be more than 0.
|
|
23
|
+
*/
|
|
24
|
+
batchSize?: number;
|
|
25
|
+
/**
|
|
26
|
+
* When the first batch renders: `sync` (the default), in the same render as the component
|
|
27
|
+
* (or the new `@items`), so the first paint has content; or `lazy`, a batch later like the
|
|
28
|
+
* rest, so the first paint is empty, for a first batch too slow to hold the paint up for.
|
|
29
|
+
*/
|
|
30
|
+
initial?: 'sync' | 'lazy';
|
|
31
|
+
/**
|
|
32
|
+
* Called, with no arguments, once every item has rendered: after the last batch, not the
|
|
33
|
+
* ones before. It is called again for each new `@items`, and never for an empty one.
|
|
34
|
+
*/
|
|
35
|
+
onDone?: () => void;
|
|
36
|
+
};
|
|
37
|
+
Blocks: {
|
|
38
|
+
/** Each item, with its index in `@items`, as `{{#each}}` yields them. */
|
|
39
|
+
default: [item: T, index: number];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* `{{#each}}` for a long list, as ember-primitives' `IncrementalEach`: it renders the items a
|
|
44
|
+
* batch at a time, one batch each time the browser is idle, so the page stays responsive
|
|
45
|
+
* (clicks, scrolling, hovering) while the rest of the list fills in. Every item ends up in the
|
|
46
|
+
* document, so find in page, links to an item, screen readers, printing and search engines
|
|
47
|
+
* see the whole list.
|
|
48
|
+
*
|
|
49
|
+
* <ul>
|
|
50
|
+
* <IncrementalEach @items={{this.rows}} @batchSize={{100}} as |row index|>
|
|
51
|
+
* <li>{{index}}: {{row.label}}</li>
|
|
52
|
+
* </IncrementalEach>
|
|
53
|
+
* </ul>
|
|
54
|
+
*
|
|
55
|
+
* It renders no element of its own. For a scrolling box with rows of a known height, a virtual
|
|
56
|
+
* list keeps less in the document. Don't nest one inside another: each level waits for its
|
|
57
|
+
* own batches, so the inner rows fill in late; make only the outer loop incremental.
|
|
58
|
+
*
|
|
59
|
+
* While batches are pending it holds a test waiter, so `await render()` and `await settled()`
|
|
60
|
+
* wait for the whole list.
|
|
61
|
+
*/
|
|
62
|
+
export declare class IncrementalEach<T = unknown> extends Component<IncrementalEachSignature<T>> {
|
|
63
|
+
#private;
|
|
64
|
+
progress: Progress<T>;
|
|
65
|
+
constructor(owner: Owner, args: IncrementalEachSignature<T>['Args']);
|
|
66
|
+
get items(): readonly T[];
|
|
67
|
+
get batchSize(): number;
|
|
68
|
+
get initial(): 'sync' | 'lazy';
|
|
69
|
+
/** The items in batches. A change to an item doesn't make new batches, so only that item re-renders. */
|
|
70
|
+
get batches(): Batch<T>[];
|
|
71
|
+
/** How many batches are in the document: a new collection starts with none or one. */
|
|
72
|
+
get rendered(): number;
|
|
73
|
+
isRendered: (batch: Batch<T>) => boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Called as the template renders, and again each time a batch goes in: it asks for the next
|
|
76
|
+
* batch, or, once every batch is in, reports that the list is done.
|
|
77
|
+
*/
|
|
78
|
+
next: () => void;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=inc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AI,KAAK,IAAI,SAAS,CAAC,EAAE,CAIxB;IAED,IAAI,SAAS,IAAI,MAAM,CAItB;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,MAAM,CAO7B;IAED,wGAAwG;IACxG,IACI,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAWxB;IAED,sFAAsF;IACtF,IAAI,QAAQ,IAAI,MAAM,CAIrB;IAED,UAAU,GAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAG,OAAO,CAA+B;IAEtE;;;OAGG;IACH,IAAI,QAAO,IAAI,CAoCd;CA6BF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './alert-dialog';
|
|
3
|
+
export * from './anchor/index.ts';
|
|
4
|
+
export * from './as';
|
|
5
|
+
export * from './aspect-ratio';
|
|
6
|
+
export { default as Avatar } from './avatar';
|
|
7
|
+
export * from './avatar';
|
|
8
|
+
export * from './body-class.ts';
|
|
9
|
+
export { default as Breadcrumb } from './breadcrumb';
|
|
10
|
+
export * from './breadcrumb';
|
|
11
|
+
export { default as Calendar } from './calendar/index';
|
|
12
|
+
export * from './calendar/index';
|
|
13
|
+
export { default as Checkbox } from './checkbox';
|
|
14
|
+
export * from './checkbox';
|
|
15
|
+
export * from './collapsible';
|
|
16
|
+
export * from './color-scheme.ts';
|
|
17
|
+
export { default as Combobox } from './combobox';
|
|
18
|
+
export * from './combobox';
|
|
19
|
+
export { default as Command } from './command';
|
|
20
|
+
export * from './command';
|
|
21
|
+
export { default as ContextMenu } from './context-menu';
|
|
22
|
+
export * from './context-menu';
|
|
23
|
+
export * from './controllable-state.ts';
|
|
24
|
+
export * from './dialog';
|
|
25
|
+
export * from './direction';
|
|
26
|
+
export * from './dismiss.ts';
|
|
27
|
+
export * from './dom-context';
|
|
28
|
+
export * from './drawer/index';
|
|
29
|
+
export { default as DropdownMenu } from './dropdown-menu';
|
|
30
|
+
export * from './dropdown-menu';
|
|
31
|
+
export * from './external-link';
|
|
32
|
+
export { default as FileDrop } from './file-drop';
|
|
33
|
+
export * from './file-drop';
|
|
34
|
+
export * from './focus-scope';
|
|
35
|
+
export * from './focus.ts';
|
|
36
|
+
export * from './head';
|
|
37
|
+
export * from './heading';
|
|
38
|
+
export * from './hero';
|
|
39
|
+
export * from './hide-others.ts';
|
|
40
|
+
export { default as HoverCard } from './hover-card';
|
|
41
|
+
export * from './hover-card';
|
|
42
|
+
export * from './i18n.ts';
|
|
43
|
+
export * from './id.ts';
|
|
44
|
+
export * from './iframe.ts';
|
|
45
|
+
export * from './incremental-each';
|
|
46
|
+
export * from './input-otp';
|
|
47
|
+
export * from './keys';
|
|
48
|
+
export * from './label';
|
|
49
|
+
export * from './layer.ts';
|
|
50
|
+
export * from './link-helper.ts';
|
|
51
|
+
export * from './link';
|
|
52
|
+
export * from './load';
|
|
53
|
+
export { default as Menubar } from './menubar';
|
|
54
|
+
export * from './menubar';
|
|
55
|
+
export * from './message-scroller/index.ts';
|
|
56
|
+
export * from './messages.ts';
|
|
57
|
+
export * from './narrowing.ts';
|
|
58
|
+
export { default as NativeForm } from './native-form';
|
|
59
|
+
export * from './native-form';
|
|
60
|
+
export * from './native-value.ts';
|
|
61
|
+
export { default as NavigationMenu } from './navigation-menu';
|
|
62
|
+
export * from './navigation-menu';
|
|
63
|
+
export * from './on-resize.ts';
|
|
64
|
+
export * from './part.ts';
|
|
65
|
+
export { default as Popover } from './popover';
|
|
66
|
+
export * from './popover';
|
|
67
|
+
export * from './portal/index.ts';
|
|
68
|
+
export * from './presence';
|
|
69
|
+
export { default as Progress } from './progress';
|
|
70
|
+
export * from './progress';
|
|
71
|
+
export * from './proper-links.ts';
|
|
72
|
+
export * from './qp.ts';
|
|
73
|
+
export * from './questionnaire/index.ts';
|
|
74
|
+
export { default as RadioGroup } from './radio-group';
|
|
75
|
+
export * from './radio-group';
|
|
76
|
+
export { default as Rating } from './rating';
|
|
77
|
+
export * from './rating';
|
|
78
|
+
export * from './resizable/index.ts';
|
|
79
|
+
export * from './resize-observer.ts';
|
|
80
|
+
export * from './roving-focus';
|
|
81
|
+
export * from './scroll-area/index.ts';
|
|
82
|
+
export * from './scroll-lock.ts';
|
|
83
|
+
export * from './scroller';
|
|
84
|
+
export { default as Select } from './select';
|
|
85
|
+
export * from './select';
|
|
86
|
+
export * from './separator';
|
|
87
|
+
export * from './service.ts';
|
|
88
|
+
export * from './shadowed';
|
|
89
|
+
export { default as Slider } from './slider';
|
|
90
|
+
export * from './slider';
|
|
91
|
+
export * from './sticky-footer';
|
|
92
|
+
export * from './store.ts';
|
|
93
|
+
export { default as Switch } from './switch';
|
|
94
|
+
export * from './switch';
|
|
95
|
+
export { default as Tabs } from './tabs';
|
|
96
|
+
export * from './tabs';
|
|
97
|
+
export * from './toast/index.ts';
|
|
98
|
+
export { default as ToggleGroup } from './toggle-group';
|
|
99
|
+
export * from './toggle-group';
|
|
100
|
+
export { default as Toggle } from './toggle';
|
|
101
|
+
export * from './toggle';
|
|
102
|
+
export { default as Tooltip } from './tooltip';
|
|
103
|
+
export * from './tooltip';
|
|
104
|
+
export * from './typeahead.ts';
|
|
105
|
+
export * from './viewport';
|
|
106
|
+
export * from './visually-hidden';
|
|
107
|
+
export * from './zoetrope';
|
|
108
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,cAAc,kBAAkB,CA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B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,YAAY,CAAA;AAC5C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC3D,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { TOC } from '@ember/component/template-only';
|
|
3
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
4
|
+
import { type TagName } from './as';
|
|
5
|
+
/** Only digits: `@pattern={{REGEXP_ONLY_DIGITS}}`. */
|
|
6
|
+
export declare const REGEXP_ONLY_DIGITS = "^\\d+$";
|
|
7
|
+
/** Only Latin letters. */
|
|
8
|
+
export declare const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
|
|
9
|
+
/** Digits and Latin letters. */
|
|
10
|
+
export declare const REGEXP_ONLY_DIGITS_AND_CHARS = "^[a-zA-Z0-9]+$";
|
|
11
|
+
/** The input's name when nothing else names it, in English (the translator's, when there is one). */
|
|
12
|
+
export declare const INPUT_OTP_LABEL: string;
|
|
13
|
+
/** What one slot shows: a character of the code, or where the next one goes. */
|
|
14
|
+
export interface OTPSlot {
|
|
15
|
+
/** Its position in the code, from 0. */
|
|
16
|
+
readonly index: number;
|
|
17
|
+
/** The character there, or `null` while there is none. */
|
|
18
|
+
readonly char: string | null;
|
|
19
|
+
/** The `@placeholder`'s character for it, while the code is empty. */
|
|
20
|
+
readonly placeholderChar: string | null;
|
|
21
|
+
/** Whether the selection is on it: the character typing replaces, or where it goes next. */
|
|
22
|
+
readonly isActive: boolean;
|
|
23
|
+
/** Whether to draw a caret in it: it is active and empty. */
|
|
24
|
+
readonly hasFakeCaret: boolean;
|
|
25
|
+
}
|
|
26
|
+
type SelectionDirection = 'forward' | 'backward' | 'none';
|
|
27
|
+
/** The side of the slots the input reaches past for a password manager's badge. */
|
|
28
|
+
type BadgeSide = 'left' | 'right';
|
|
29
|
+
export interface InputOTPSlotSignature {
|
|
30
|
+
Args: {
|
|
31
|
+
/** Which character of the code it shows, from 0. */
|
|
32
|
+
index: number;
|
|
33
|
+
/** @internal Bound by `InputOTP`. */
|
|
34
|
+
slots: readonly OTPSlot[];
|
|
35
|
+
/** The tag to render instead of `div`. */
|
|
36
|
+
as?: TagName;
|
|
37
|
+
};
|
|
38
|
+
Blocks: {
|
|
39
|
+
/** What it shows, given its state; without a block, its character. */
|
|
40
|
+
default: [slot: OTPSlot];
|
|
41
|
+
};
|
|
42
|
+
Element: HTMLElement;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One character's box: a `div` (or `@as`) with `data-active` (`"true"` while the selection is
|
|
46
|
+
* on it), and its character inside, or whatever its block draws from the slot it yields (a
|
|
47
|
+
* caret, say).
|
|
48
|
+
*/
|
|
49
|
+
export declare const InputOTPSlot: TOC<InputOTPSlotSignature>;
|
|
50
|
+
export interface InputOTPSignature {
|
|
51
|
+
Args: {
|
|
52
|
+
/** How many characters the code has. */
|
|
53
|
+
maxLength: number;
|
|
54
|
+
/** The code, when you control it. A change someone makes goes to `@onValueChange`. */
|
|
55
|
+
value?: string;
|
|
56
|
+
/** The code it starts with when you don't control it. */
|
|
57
|
+
defaultValue?: string;
|
|
58
|
+
/** Called with the new code whenever someone changes it, controlled or not. */
|
|
59
|
+
onValueChange?: (value: string) => void;
|
|
60
|
+
/** Called with the code when it becomes complete (`@maxLength` characters). */
|
|
61
|
+
onComplete?: (value: string) => void;
|
|
62
|
+
/**
|
|
63
|
+
* What the code may hold, as a regular expression or its source (`REGEXP_ONLY_DIGITS`). A
|
|
64
|
+
* change that would leave a code it doesn't match is refused.
|
|
65
|
+
*/
|
|
66
|
+
pattern?: string | RegExp;
|
|
67
|
+
/** Turns pasted text into the code to insert: strip a pasted code's dashes, say. */
|
|
68
|
+
pasteTransformer?: (pasted: string) => string;
|
|
69
|
+
/** Shown in the slots, a character each, while the code is empty. */
|
|
70
|
+
placeholder?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Submits the input's form (`requestSubmit()`, so the form validates) as soon as the code is
|
|
73
|
+
* complete, as ember-primitives' `@autoSubmit`. Default `false`.
|
|
74
|
+
*/
|
|
75
|
+
autoSubmit?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The input's name when nothing else names it (an `aria-label`, `aria-labelledby` or a
|
|
78
|
+
* `<label>`). Pass it to name it so whatever else there is. Default `One-time password`.
|
|
79
|
+
*/
|
|
80
|
+
label?: string;
|
|
81
|
+
/** Where the (invisible) text sits in the input. Default `left`. */
|
|
82
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
83
|
+
/**
|
|
84
|
+
* `increase-width` (the default) lets the input reach 40px past the slots, at their inline
|
|
85
|
+
* end (the right, or the left right to left), where the viewport leaves room, so a password
|
|
86
|
+
* manager's badge sits beyond the last one; `none` doesn't.
|
|
87
|
+
*/
|
|
88
|
+
pushPasswordManagerStrategy?: 'increase-width' | 'none';
|
|
89
|
+
/** Classes for the container that holds the slots and the input. */
|
|
90
|
+
containerClass?: string;
|
|
91
|
+
/** Its name, for `InputOTPHarness` (`data-test-jn-name`). Its form field name is `name`. */
|
|
92
|
+
name?: string;
|
|
93
|
+
};
|
|
94
|
+
Blocks: {
|
|
95
|
+
default: [
|
|
96
|
+
otp: {
|
|
97
|
+
/** Each slot's state, one per character of `@maxLength`. */
|
|
98
|
+
slots: readonly OTPSlot[];
|
|
99
|
+
/** A slot, bound to this input: `<otp.Slot @index={{0}} />`. */
|
|
100
|
+
Slot: WithBoundArgs<typeof InputOTPSlot, 'slots'>;
|
|
101
|
+
/** The code now. */
|
|
102
|
+
value: string;
|
|
103
|
+
/** Whether the code has `@maxLength` characters. */
|
|
104
|
+
isComplete: boolean;
|
|
105
|
+
/** Whether the input has focus. */
|
|
106
|
+
isFocused: boolean;
|
|
107
|
+
/** Whether the pointer is over it (and it isn't disabled). */
|
|
108
|
+
isHovering: boolean;
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The one native `<input>` that holds the code, laid over the slots, invisible: give it `id`,
|
|
114
|
+
* `name`, `disabled`, `required`, `aria-*` and listeners, as upstream's props go on its input.
|
|
115
|
+
*/
|
|
116
|
+
Element: HTMLInputElement;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A one-time code field, as the `input-otp` library under shadcn's Input OTP has it, which also
|
|
120
|
+
* covers ember-primitives' `OTP`: one native `<input>`, invisible, laid over slots you render
|
|
121
|
+
* from its state, so typing, deleting, paste, the browser's autofill of a code it was sent (the
|
|
122
|
+
* input has `autocomplete="one-time-code"`), and a form all work as on any input. Its selection
|
|
123
|
+
* is kept to one character, the one typing replaces, and the slot under it is active:
|
|
124
|
+
*
|
|
125
|
+
* <InputOTP @maxLength={{6}} @onComplete={{this.verify}} as |otp|>
|
|
126
|
+
* {{#each otp.slots as |slot|}}
|
|
127
|
+
* <otp.Slot @index={{slot.index}} class="my-slot" />
|
|
128
|
+
* {{/each}}
|
|
129
|
+
* </InputOTP>
|
|
130
|
+
*
|
|
131
|
+
* Its code is controlled or not, as in Radix (`@value`, `@defaultValue`, `@onValueChange`);
|
|
132
|
+
* `@pattern` refuses what it doesn't match, and a paste goes through `@pasteTransformer`.
|
|
133
|
+
*/
|
|
134
|
+
export declare class InputOTP extends Component<InputOTPSignature> {
|
|
135
|
+
#private;
|
|
136
|
+
code: import("./controllable-state.ts").ControllableState<string>;
|
|
137
|
+
isFocused: boolean;
|
|
138
|
+
isHovering: boolean;
|
|
139
|
+
selectionStart: number | null;
|
|
140
|
+
selectionEnd: number | null;
|
|
141
|
+
/** The side the input reaches past the slots for a password manager's badge, if it does. */
|
|
142
|
+
badgeSide: BadgeSide | null;
|
|
143
|
+
/** The selection last seen, for telling which way it moved. */
|
|
144
|
+
previousSelection: [number | null, number | null, SelectionDirection];
|
|
145
|
+
get value(): string;
|
|
146
|
+
get maxLength(): number;
|
|
147
|
+
get isComplete(): boolean;
|
|
148
|
+
/** Where the input reaches past the slots, unless `@pushPasswordManagerStrategy` is `none`. */
|
|
149
|
+
get reach(): BadgeSide | null;
|
|
150
|
+
get regexp(): RegExp | null;
|
|
151
|
+
get slots(): readonly OTPSlot[];
|
|
152
|
+
/** Whether `code` is one the input may hold. */
|
|
153
|
+
accepts(code: string): boolean;
|
|
154
|
+
/** Puts the code in the input, unless it shows it already (which would move the caret). */
|
|
155
|
+
show(input: HTMLInputElement): void;
|
|
156
|
+
/** Sets the slots' selection, touching tracked state only when it changed. */
|
|
157
|
+
mirror(start: number | null, end: number | null): void;
|
|
158
|
+
/**
|
|
159
|
+
* Keeps the selection on one character, as input-otp does on every `selectionchange`: a caret
|
|
160
|
+
* inside the code selects the character after it (or, moving back, before it), so typing
|
|
161
|
+
* replaces it; a caret after the last character stays there, to add one.
|
|
162
|
+
*/
|
|
163
|
+
syncSelection(input: HTMLInputElement): void;
|
|
164
|
+
/** @internal What the input showed first, so a change from it can complete the code. */
|
|
165
|
+
started(value: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Notes the code the input holds now. When it has just become complete, calls `@onComplete`
|
|
168
|
+
* and, with `@autoSubmit`, submits the form: at once after someone's change, or after the
|
|
169
|
+
* render when the caller changed `@value` (a render can't run callbacks that change state).
|
|
170
|
+
*/
|
|
171
|
+
settle(input: HTMLInputElement, { later }?: {
|
|
172
|
+
later?: boolean | undefined;
|
|
173
|
+
}): void;
|
|
174
|
+
/**
|
|
175
|
+
* Every change, typed, deleted, pasted or autofilled: cut to `@maxLength`, refused when
|
|
176
|
+
* `@pattern` doesn't match it. It listens in the capture phase, so it runs ahead of the
|
|
177
|
+
* caller's own `input` listeners, which never hear a change it refused.
|
|
178
|
+
*/
|
|
179
|
+
handleInput: (event: Event) => void;
|
|
180
|
+
/**
|
|
181
|
+
* Every paste goes into the code here, as input-otp does on iOS (and ember-primitives does
|
|
182
|
+
* everywhere): through `@pasteTransformer`, into the selection, cut to `@maxLength`, and
|
|
183
|
+
* refused whole when the code wouldn't match `@pattern`. An `input` event follows, as a
|
|
184
|
+
* native paste's does.
|
|
185
|
+
*/
|
|
186
|
+
handlePaste: (event: ClipboardEvent) => void;
|
|
187
|
+
handleFocus: (event: FocusEvent) => void;
|
|
188
|
+
handleBlur: () => void;
|
|
189
|
+
/**
|
|
190
|
+
* Right to left, the slots run from the right, but a code is a left-to-right run (digits and
|
|
191
|
+
* Latin letters), so the browser's arrows would move the selection the wrong way across them.
|
|
192
|
+
* There, ArrowLeft goes on to the next character and ArrowRight back to the one before, as
|
|
193
|
+
* the browser's ArrowRight and ArrowLeft do left to right. Home and End go to the first and
|
|
194
|
+
* the last either way, as the browser's do.
|
|
195
|
+
*/
|
|
196
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
197
|
+
handleMouseOver: (event: MouseEvent) => void;
|
|
198
|
+
handleMouseLeave: () => void;
|
|
199
|
+
}
|
|
200
|
+
export {};
|
|
201
|
+
//# sourceMappingURL=input-otp.d.ts.map
|