@jfrader/ui 0.5.1 → 0.7.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/README.md +28 -7
- package/dist/{accordion-DLul6vIl.js → accordion-D6myONB9.js} +36 -35
- package/dist/accordion.js +1 -1
- package/dist/activity-rings-Uszvwqdl.js +528 -0
- package/dist/activity-rings.js +2 -0
- package/dist/{alert-DS_einpy.js → alert-Bhj-qSMs.js} +15 -14
- package/dist/alert.js +1 -1
- package/dist/{announcement-bar-Dlbq5-9D.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/{avatar-group-M1opAQEG.js → avatar-group-BlMLNw4J.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar-sPxDqFiZ.js +133 -0
- package/dist/avatar.js +1 -1
- package/dist/{badge-CjM5Agqk.js → badge-CfhTcA-Z.js} +10 -9
- package/dist/badge.js +1 -1
- package/dist/billing-toggle-CgC7yxxo.js +349 -0
- package/dist/billing-toggle.js +2 -0
- package/dist/{bottom-sheet-DjZOPq4k.js → bottom-sheet-BFQKO0Wo.js} +282 -264
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-BDK_LiwH.js → breadcrumbs-CG3akw-b.js} +19 -18
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-NLY0h6EJ.js → button-C6OV0C7J.js} +14 -13
- package/dist/button-group-B9wP2ddS.js +611 -0
- package/dist/button-group.js +2 -0
- package/dist/button.js +1 -1
- package/dist/calendar-Bg6D2sul.js +377 -0
- package/dist/calendar.js +1 -1
- package/dist/calendar.utils-azmB4Ej7.js +79 -0
- package/dist/card-C008OQCp.js +164 -0
- package/dist/card.js +1 -1
- package/dist/{carousel-B7OrvD6J.js → carousel-lTH4Foke.js} +13 -12
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DkB-WMWJ.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-DKSzExj2.js → checkbox-CClE61GV.js} +9 -8
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DjQ0_6Y9.js → chip-group-BZUX9KPF.js} +17 -16
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-B5we2lZa.js → code-block-CYP89_6h.js} +35 -34
- package/dist/code-block.js +1 -1
- package/dist/{combobox-DFFqOBCi.js → combobox-D2Oc-co7.js} +21 -20
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BrT1n9bb.js +394 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-DXfqgRNI.js +772 -0
- package/dist/comment-thread.js +1 -1
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/{context-menu-__1c2Dk9.js → context-menu-I4i0LRpm.js} +52 -51
- package/dist/context-menu.js +1 -1
- package/dist/{copy-button-DCSLcYS-.js → copy-button-C0p_qrgf.js} +4 -4
- package/dist/copy-button.js +1 -1
- package/dist/{countdown-Dp_TD1VP.js → countdown-EcpV6rXy.js} +18 -17
- package/dist/countdown.js +1 -1
- package/dist/css-BYJhdGh-.js +2 -0
- package/dist/{date-picker-BiPN7yeK.js → date-picker-D-bn-iHs.js} +14 -13
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-rXcZsI1Y.js +589 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/dialog-CR1xdkrC.js +222 -0
- package/dist/dialog.js +1 -1
- package/dist/{divider-Cp7aNbhM.js → divider-zOJzkcHh.js} +7 -6
- package/dist/divider.js +1 -1
- package/dist/drawer-CceaEhCr.js +590 -0
- package/dist/drawer.js +1 -1
- package/dist/emblem-DnXmpZCh.js +166 -0
- package/dist/emblem.js +2 -0
- package/dist/{empty-state-CDgrjPPf.js → empty-state-DO0ApylK.js} +2 -1
- package/dist/empty-state.js +1 -1
- package/dist/{expandable-card-rUATve0o.js → expandable-card-W97vjix9.js} +52 -51
- package/dist/expandable-card.js +1 -1
- package/dist/{expanding-search-BxOwtdwt.js → expanding-search-Bb2_YfNx.js} +16 -15
- package/dist/expanding-search.js +1 -1
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/{file-dropzone-BuXm3Tea.js → file-dropzone-Bi5ikRIz.js} +14 -13
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-Cy5Hqur-.js → filter-toolbar-QRnC4S_H.js} +33 -32
- package/dist/filter-toolbar.js +1 -1
- package/dist/{flex-Dh-_J5-U.js → flex-CS7eMRcK.js} +2 -2
- package/dist/flex.js +1 -1
- package/dist/game-card-Oeu74giK.js +194 -0
- package/dist/game-card.js +2 -0
- package/dist/{hold-to-confirm-DjB2EVjM.js → hold-to-confirm-CVBA0wNT.js} +18 -17
- package/dist/hold-to-confirm.js +1 -1
- package/dist/{hover-card-CoMJKg1g.js → hover-card-Dgu2CwMD.js} +20 -19
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-BxY8Ykzt.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/in-view-title-BUZCMqge.js +225 -0
- package/dist/in-view-title.js +2 -0
- package/dist/index.js +102 -83
- package/dist/initials-DEdwNe9_.js +18 -0
- package/dist/{inline-edit-C0eeml65.js → inline-edit-D-pR2RPC.js} +22 -21
- package/dist/inline-edit.js +1 -1
- package/dist/{input-control-DmMuAuPS.js → input-control-B6HVBgwl.js} +1 -1
- package/dist/{json-viewer-DgWqyU75.js → json-viewer-Dro3WrjS.js} +31 -30
- package/dist/json-viewer.js +1 -1
- package/dist/{kbd-C3ACoMoE.js → kbd-BI_9qzYr.js} +2 -1
- package/dist/kbd.js +1 -1
- package/dist/keycap-keyboard-Cdx-OAS1.js +311 -0
- package/dist/keycap-keyboard.js +2 -0
- package/dist/{layout-style-Cbd1Vilw.js → layout-style-BE0gSqrH.js} +1 -1
- package/dist/lightbox-gallery-D0YaSTut.js +777 -0
- package/dist/lightbox-gallery.js +2 -0
- package/dist/link-unfurl-CReyIjyy.js +695 -0
- package/dist/link-unfurl.js +2 -0
- package/dist/{listbox-style-WX-RASp1.js → listbox-style-DNOxAulu.js} +1 -1
- package/dist/{loading-ring-B8-30Dl1.js → loading-ring-D0lGrK8z.js} +1 -1
- package/dist/locale-switcher-DTkySKsM.js +375 -0
- package/dist/locale-switcher.js +2 -0
- package/dist/{mention-input-sq61si9L.js → mention-input-BjjAbJCf.js} +6 -6
- package/dist/mention-input.js +1 -1
- package/dist/{menu-DDKgmK2F.js → menu-CVzpsyXn.js} +113 -96
- package/dist/menu.js +1 -1
- package/dist/{metric-card--lVTz5Wn.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-DG1BCFX7.js → multi-select-B3puEVo0.js} +67 -66
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-CC26JDr-.js → navigation-C_JD43gA.js} +41 -40
- package/dist/navigation.js +1 -1
- package/dist/next.js +65 -0
- package/dist/now-playing-DjVm1Phm.js +439 -0
- package/dist/now-playing.js +2 -0
- package/dist/overlay-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-BfkeWbmP.js → pagination-Dkh4bJQh.js} +10 -9
- package/dist/pagination.js +1 -1
- package/dist/{password-field-03pWRkuY.js → password-field-Da58GP1g.js} +4 -4
- package/dist/password-field.js +1 -1
- package/dist/photo-grid-Dtl17D74.js +830 -0
- package/dist/photo-grid.js +2 -0
- package/dist/{pill-BaS-uIbn.js → pill-Dd7pog19.js} +10 -9
- package/dist/pill.js +1 -1
- package/dist/{popover-CErIw2q3.js → popover-CUMOcMtj.js} +5 -4
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-DAQkfhPd.js → progress-Bcuz3Ob4.js} +11 -10
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-Cu9cBssN.js → radio-cards-FkAhESb5.js} +35 -34
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-TIK0-iPX.js → radio-group-DItMf2YM.js} +18 -17
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-DUpQEpwG.js → resizable-panels-61h9hA3B.js} +13 -12
- package/dist/resizable-panels.js +1 -1
- package/dist/{scroll-area-CcZyiSOQ.js → scroll-area-B8KkCPOM.js} +16 -15
- package/dist/scroll-area.js +1 -1
- package/dist/{search-field-DMvho0KQ.js → search-field-CbsajaZb.js} +93 -92
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-8ZUGnsZm.js → segmented-control-DCh-4ca-.js} +26 -25
- package/dist/segmented-control.js +1 -1
- package/dist/{select-D5rhJ8gi.js → select-SrcQqZjo.js} +27 -26
- package/dist/select.js +1 -1
- package/dist/sheet-stack-DYX1SGSB.js +820 -0
- package/dist/sheet-stack.js +2 -0
- package/dist/shortcut-recorder-VgTQdjjn.js +688 -0
- package/dist/shortcut-recorder.js +2 -0
- package/dist/{signature-pad-_bTeguN9.js → signature-pad-khL2yhQI.js} +15 -14
- package/dist/signature-pad.js +1 -1
- package/dist/{skeleton-XQQDkCHd.js → skeleton-LJsQsveI.js} +9 -8
- package/dist/skeleton.js +1 -1
- package/dist/slider-DjAnGmlC.js +535 -0
- package/dist/slider.js +1 -1
- package/dist/{sortable-data-table-CYKT_Ng7.js → sortable-data-table-Bpitup_d.js} +29 -28
- package/dist/sortable-data-table.js +1 -1
- package/dist/{spinner-DtxvDPdM.js → spinner-CvzajSg9.js} +11 -10
- package/dist/spinner.js +1 -1
- package/dist/{split-button-BCw4zZom.js → split-button-Bu41f2AY.js} +20 -19
- package/dist/split-button.js +1 -1
- package/dist/{stack-DC3IbtWk.js → stack-Bac4sJeI.js} +2 -2
- package/dist/stack.js +1 -1
- package/dist/{stepper-CruHbXxX.js → stepper-C8Ncavbr.js} +22 -21
- package/dist/stepper.js +1 -1
- package/dist/stretch-refresh-OrnTEj7P.js +349 -0
- package/dist/stretch-refresh.js +2 -0
- package/dist/{surface-DZ4d-2aL.js → surface-C69kwSuk.js} +13 -3
- package/dist/{swipe-actions-CBuJREU1.js → swipe-actions-1H5UOZKE.js} +26 -25
- package/dist/swipe-actions.js +1 -1
- package/dist/{switch-C1WrKrf-.js → switch-79-hkQqg.js} +15 -14
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/{tabs-XluwRjgg.js → tabs-Bb5-noYE.js} +43 -42
- package/dist/tabs.js +1 -1
- package/dist/{tag-input-DSRCyrX2.js → tag-input-BQaueKEb.js} +5 -5
- package/dist/tag-input.js +1 -1
- package/dist/{text-field-hU72iSVS.js → text-field-D0VP7b4P.js} +3 -3
- package/dist/text-field.js +1 -1
- package/dist/{textarea-3k4Y0QQ3.js → textarea-D1YwEPmn.js} +3 -3
- package/dist/textarea.js +1 -1
- package/dist/theme-provider-BvcY-iJu.js +20 -0
- package/dist/theme-root-BrYVcTzt.js +163 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-DGWy4H0C.js +62 -0
- package/dist/{theme-switch-C505TtU8.js → theme-switch-CP42mVDb.js} +12 -11
- package/dist/theme-switch.js +1 -1
- package/dist/thread-parts-Cpktor6D.js +683 -0
- package/dist/{time-picker-CPlhW0tr.js → time-picker-Tnd-JBLC.js} +16 -15
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-B0uAAVfT.js → timeline-BcF46lG9.js} +22 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-B7wo3sX1.js → toast-CSAbl5yK.js} +12 -11
- package/dist/{toast-stack-B40VpS4M.js → toast-stack-BCR4Cu7V.js} +10 -9
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-B2fpFZwV.js → toggle-group-C7ye1v4s.js} +23 -22
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-BvgVTCTN.js → tooltip-IajLwdUb.js} +48 -39
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-j8qLqkb_.js → tree-view-CoW4oJIZ.js} +15 -14
- package/dist/tree-view.js +1 -1
- package/dist/{trigger-style-B1KVC8O1.js → trigger-style-CtOrdPk4.js} +1 -1
- package/dist/types/components/activity-rings/activity-rings.d.ts +113 -0
- package/dist/types/components/activity-rings/index.d.ts +2 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +3 -3
- package/dist/types/components/billing-toggle/billing-toggle.d.ts +57 -0
- package/dist/types/components/billing-toggle/index.d.ts +2 -0
- package/dist/types/components/button/button.d.ts +7 -7
- package/dist/types/components/button-group/button-group.d.ts +72 -0
- package/dist/types/components/button-group/index.d.ts +2 -0
- package/dist/types/components/card/card.d.ts +7 -1
- package/dist/types/components/chat-thread/chat-thread.d.ts +130 -0
- package/dist/types/components/chat-thread/index.d.ts +2 -0
- package/dist/types/components/chip-group/chip-group.d.ts +2 -2
- package/dist/types/components/combobox/combobox.d.ts +2 -2
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +7 -7
- package/dist/types/components/copy-button/copy-button.d.ts +6 -6
- package/dist/types/components/countdown/countdown.d.ts +2 -2
- package/dist/types/components/dialog/dialog.d.ts +18 -20
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- package/dist/types/components/emblem/emblem.d.ts +59 -0
- package/dist/types/components/emblem/index.d.ts +2 -0
- package/dist/types/components/empty-state/empty-state.d.ts +2 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +3 -4
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +2 -2
- package/dist/types/components/game-card/card-frame.d.ts +16 -0
- package/dist/types/components/game-card/decks.d.ts +27 -0
- package/dist/types/components/game-card/game-card.d.ts +37 -0
- package/dist/types/components/game-card/index.d.ts +4 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +1 -1
- package/dist/types/components/hover-card/hover-card.d.ts +5 -5
- package/dist/types/components/in-view-title/in-view-title.d.ts +23 -0
- package/dist/types/components/in-view-title/index.d.ts +1 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +6 -6
- package/dist/types/components/json-viewer/json-viewer.d.ts +7 -9
- package/dist/types/components/keycap-keyboard/index.d.ts +2 -0
- package/dist/types/components/keycap-keyboard/keycap-keyboard.d.ts +32 -0
- package/dist/types/components/lightbox-gallery/index.d.ts +2 -0
- package/dist/types/components/lightbox-gallery/lightbox-gallery.d.ts +74 -0
- package/dist/types/components/link-unfurl/index.d.ts +2 -0
- package/dist/types/components/link-unfurl/link-unfurl.d.ts +104 -0
- package/dist/types/components/locale-switcher/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +64 -0
- package/dist/types/components/mention-input/mention-input.d.ts +7 -7
- package/dist/types/components/menu/menu.d.ts +29 -5
- package/dist/types/components/metric-card/metric-card.d.ts +2 -2
- package/dist/types/components/navigation/navigation.d.ts +1 -1
- package/dist/types/components/next/emotion-registry.d.ts +14 -0
- package/dist/types/components/next/index.d.ts +2 -0
- package/dist/types/components/next/registry.d.ts +21 -0
- package/dist/types/components/now-playing/index.d.ts +1 -0
- package/dist/types/components/now-playing/now-playing.d.ts +88 -0
- package/dist/types/components/password-field/password-field.d.ts +1 -1
- package/dist/types/components/photo-grid/index.d.ts +2 -0
- package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/sheet-stack/index.d.ts +2 -0
- package/dist/types/components/sheet-stack/sheet-stack.d.ts +81 -0
- package/dist/types/components/shortcut-recorder/index.d.ts +2 -0
- package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +117 -0
- package/dist/types/components/signature-pad/signature-pad.d.ts +2 -2
- package/dist/types/components/split-button/split-button.d.ts +3 -4
- package/dist/types/components/stretch-refresh/index.d.ts +1 -0
- package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +1 -2
- package/dist/types/components/tag-input/tag-input.d.ts +2 -3
- package/dist/types/components/theme-root/index.d.ts +1 -0
- package/dist/types/components/theme-root/theme-root.d.ts +10 -3
- package/dist/types/components/theme-switch/theme-switch.d.ts +3 -3
- package/dist/types/components/{comment-thread → thread}/thread-parts.d.ts +7 -2
- package/dist/types/components/time-picker/time-picker.d.ts +2 -2
- package/dist/types/components/timeline/timeline.d.ts +4 -4
- package/dist/types/components/toast/toast.d.ts +3 -3
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- package/dist/types/components/tree-view/tree-view.d.ts +4 -3
- package/dist/types/components/typewriter-terminal/index.d.ts +2 -0
- package/dist/types/components/typewriter-terminal/typewriter-terminal.d.ts +87 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +6 -16
- package/dist/types/components/usage-meter/usage-model.d.ts +30 -0
- package/dist/types/components/user-menu/index.d.ts +2 -0
- package/dist/types/components/user-menu/user-menu.d.ts +118 -0
- package/dist/types/index.d.ts +18 -1
- package/dist/types/overlay/exit-motion.d.ts +24 -0
- package/dist/types/overlay/presence-spring.d.ts +12 -0
- package/dist/types/overlay/use-native-dialog.d.ts +10 -1
- package/dist/types/styling/create-theme.d.ts +24 -0
- package/dist/types/styling/css.d.ts +1 -1
- package/dist/types/styling/motion-timings.d.ts +5 -0
- package/dist/types/styling/overlay-motion.d.ts +95 -0
- package/dist/types/styling/surface.d.ts +7 -0
- package/dist/types/styling/sx.d.ts +1 -1
- package/dist/types/styling/theme-scope.d.ts +29 -3
- package/dist/types/styling/theme.d.ts +15 -0
- package/dist/types/utils/initials.d.ts +2 -0
- package/dist/typewriter-terminal-BUEsMzo3.js +588 -0
- package/dist/typewriter-terminal.js +2 -0
- package/dist/{usage-meter-qyQ3rYVv.js → usage-meter-CYvlB6l3.js} +165 -175
- package/dist/usage-meter.js +1 -1
- package/dist/usage-model-C0fS47w4.js +32 -0
- package/dist/use-native-dialog-FB0p7lkg.js +93 -0
- package/dist/use-scroll-lock-40gXwwAy.js +23 -0
- package/dist/user-menu-MctRu_Lh.js +757 -0
- package/dist/user-menu.js +2 -0
- package/dist/{visually-hidden-BJdvqqvn.js → visually-hidden-DgVO3NaB.js} +1 -1
- package/package.json +87 -5
- package/dist/avatar-CaGJHy1N.js +0 -145
- package/dist/calendar-BzJdv_SZ.js +0 -449
- package/dist/card-Ca4KQKYQ.js +0 -154
- package/dist/command-palette-BmQu2w4H.js +0 -391
- package/dist/comment-thread-ASaXDcGo.js +0 -1410
- package/dist/date-range-picker-DQpUeKqV.js +0 -570
- package/dist/dialog-BX1zYMs-.js +0 -219
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/elastic-slider-BG6K019r.js +0 -395
- package/dist/elastic-slider.js +0 -2
- package/dist/slider-DVG6-Awh.js +0 -308
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/theme-root-Bs1U3uPA.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +0 -53
- package/dist/types/components/elastic-slider/index.d.ts +0 -1
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
- package/dist/use-slider-interaction-ChL-208h.js +0 -234
- /package/dist/types/components/{comment-thread → thread}/thread-core.d.ts +0 -0
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n, r } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as i } from "./sx-BJXJ2xJK.js";
|
|
6
|
+
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
|
+
import { t as o } from "./visually-hidden-DgVO3NaB.js";
|
|
8
|
+
import { t as s } from "./renderable-DzcIj1Lo.js";
|
|
9
|
+
import { t as c } from "./button-C6OV0C7J.js";
|
|
10
|
+
import { a as ee, i as te, n as l, t as u } from "./field-anatomy-BDIP42MI.js";
|
|
11
|
+
import { t as ne } from "./text-field-D0VP7b4P.js";
|
|
12
|
+
import { t as d } from "./kbd-BI_9qzYr.js";
|
|
13
|
+
import { useEffect as f, useId as re, useMemo as ie, useRef as p, useState as m, useSyncExternalStore as h } from "react";
|
|
14
|
+
import { vars as g } from "@jfrader/tokens/vars";
|
|
15
|
+
import { Fragment as ae, jsx as _, jsxs as v } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useMergeRefs as oe } from "@floating-ui/react";
|
|
17
|
+
//#region src/components/shortcut-recorder/shortcut-recorder.tsx
|
|
18
|
+
var y = [
|
|
19
|
+
"mod",
|
|
20
|
+
"ctrl",
|
|
21
|
+
"alt",
|
|
22
|
+
"shift",
|
|
23
|
+
"meta"
|
|
24
|
+
], se = {
|
|
25
|
+
Comma: ",",
|
|
26
|
+
Equal: "=",
|
|
27
|
+
Minus: "-",
|
|
28
|
+
Period: ".",
|
|
29
|
+
Slash: "/",
|
|
30
|
+
Semicolon: ";",
|
|
31
|
+
Quote: "'",
|
|
32
|
+
BracketLeft: "[",
|
|
33
|
+
BracketRight: "]",
|
|
34
|
+
Backslash: "\\",
|
|
35
|
+
Backquote: "`",
|
|
36
|
+
Space: "space",
|
|
37
|
+
Escape: "escape",
|
|
38
|
+
Backspace: "backspace",
|
|
39
|
+
Delete: "delete",
|
|
40
|
+
Enter: "enter",
|
|
41
|
+
ArrowUp: "arrowup",
|
|
42
|
+
ArrowDown: "arrowdown",
|
|
43
|
+
ArrowLeft: "arrowleft",
|
|
44
|
+
ArrowRight: "arrowright",
|
|
45
|
+
Home: "home",
|
|
46
|
+
End: "end",
|
|
47
|
+
PageUp: "pageup",
|
|
48
|
+
PageDown: "pagedown",
|
|
49
|
+
Insert: "insert"
|
|
50
|
+
}, ce = new Set(Object.values(se)), b = {
|
|
51
|
+
ctrl: "Control",
|
|
52
|
+
alt: "Alt",
|
|
53
|
+
shift: "Shift",
|
|
54
|
+
meta: "Meta",
|
|
55
|
+
space: "Space",
|
|
56
|
+
escape: "Escape",
|
|
57
|
+
backspace: "Backspace",
|
|
58
|
+
delete: "Delete",
|
|
59
|
+
enter: "Enter",
|
|
60
|
+
arrowup: "Up arrow",
|
|
61
|
+
arrowdown: "Down arrow",
|
|
62
|
+
arrowleft: "Left arrow",
|
|
63
|
+
arrowright: "Right arrow",
|
|
64
|
+
pageup: "Page Up",
|
|
65
|
+
pagedown: "Page Down",
|
|
66
|
+
home: "Home",
|
|
67
|
+
end: "End",
|
|
68
|
+
insert: "Insert",
|
|
69
|
+
",": "Comma",
|
|
70
|
+
"=": "Equals",
|
|
71
|
+
"-": "Minus",
|
|
72
|
+
".": "Period",
|
|
73
|
+
"/": "Slash",
|
|
74
|
+
";": "Semicolon",
|
|
75
|
+
"'": "Quote",
|
|
76
|
+
"[": "Left bracket",
|
|
77
|
+
"]": "Right bracket",
|
|
78
|
+
"\\": "Backslash",
|
|
79
|
+
"`": "Backquote"
|
|
80
|
+
}, x = {
|
|
81
|
+
ctrl: "⌃",
|
|
82
|
+
alt: "⌥",
|
|
83
|
+
shift: "⇧",
|
|
84
|
+
meta: "⌘"
|
|
85
|
+
}, S = (e) => /^[a-z0-9]$/.test(e) || /^f(?:[1-9]|1[0-9]|2[0-4])$/.test(e) || ce.has(e), C = (e) => e === "mac" ? "meta" : "ctrl";
|
|
86
|
+
function w(e, t) {
|
|
87
|
+
let n = e.toLowerCase().split("+").map((e) => e.trim()), r = n.at(-1);
|
|
88
|
+
if (!r || !S(r)) return null;
|
|
89
|
+
let i = n.slice(0, -1);
|
|
90
|
+
if (i.some((e) => !y.some((t) => t === e))) return null;
|
|
91
|
+
let a = i.map((e) => e === C(t) ? "mod" : e);
|
|
92
|
+
return new Set(a).size === a.length ? [...y.filter((e) => a.includes(e)), r].join("+") : null;
|
|
93
|
+
}
|
|
94
|
+
function T(e, t) {
|
|
95
|
+
return y.filter((n) => ({
|
|
96
|
+
mod: t === "mac" ? e.metaKey : e.ctrlKey,
|
|
97
|
+
ctrl: t === "mac" && e.ctrlKey,
|
|
98
|
+
alt: e.altKey,
|
|
99
|
+
shift: e.shiftKey,
|
|
100
|
+
meta: t === "other" && e.metaKey
|
|
101
|
+
})[n]);
|
|
102
|
+
}
|
|
103
|
+
function E(e, t) {
|
|
104
|
+
if (e.repeat || e.isComposing || [
|
|
105
|
+
"Dead",
|
|
106
|
+
"Process",
|
|
107
|
+
"Unidentified",
|
|
108
|
+
"AltGraph"
|
|
109
|
+
].includes(e.key) || e.getModifierState?.("AltGraph")) return null;
|
|
110
|
+
let n = se[e.code] ?? (/^Key[A-Z]$/.test(e.code) ? e.code.slice(3).toLowerCase() : /^Digit[0-9]$/.test(e.code) ? e.code.slice(5) : e.code.toLowerCase());
|
|
111
|
+
return S(n) ? [...T(e, t), n].join("+") : null;
|
|
112
|
+
}
|
|
113
|
+
function le(e, t, n) {
|
|
114
|
+
let r = w(t, n);
|
|
115
|
+
return r !== null && r === E(e, n);
|
|
116
|
+
}
|
|
117
|
+
function ue(e, t) {
|
|
118
|
+
return `${new Intl.NumberFormat(t).format(e)} ${new Intl.PluralRules(t).select(e) === "one" ? "shortcut" : "shortcuts"}`;
|
|
119
|
+
}
|
|
120
|
+
var D = {
|
|
121
|
+
placeholder: "Record shortcut",
|
|
122
|
+
recording: "Recording",
|
|
123
|
+
canceled: "Recording canceled",
|
|
124
|
+
cleared: "Shortcut cleared",
|
|
125
|
+
noShortcut: "No shortcut",
|
|
126
|
+
clearLabel: "Clear shortcut",
|
|
127
|
+
cancelLabel: "Cancel",
|
|
128
|
+
confirmLabel: "Use anyway",
|
|
129
|
+
reset: (e) => `Reset to ${e}`,
|
|
130
|
+
set: (e) => `Shortcut set to ${e}`,
|
|
131
|
+
requireModifier: (e) => `Use ${e === "mac" ? "Command, Control" : "Control, Meta"} or Alt, or a function key`,
|
|
132
|
+
conflict: (e, t, n) => `${e}: ${n ? "Reserved shortcut" : "Already assigned"} — ${t.label}`,
|
|
133
|
+
listLabel: "Keyboard shortcuts",
|
|
134
|
+
searchLabel: "Search shortcuts",
|
|
135
|
+
searchPlaceholder: "Search shortcuts",
|
|
136
|
+
empty: "No shortcuts found",
|
|
137
|
+
results: ue,
|
|
138
|
+
keyName: (e, t) => {
|
|
139
|
+
let n = e === "mod" ? C(t) : e, r = n === "meta" && t === "mac" ? "Command" : n === "alt" && t === "mac" ? "Option" : b[n] ?? n.toUpperCase();
|
|
140
|
+
return {
|
|
141
|
+
label: t === "mac" ? x[n] ?? (n.length === 1 ? n.toUpperCase() : r) : n.length === 1 ? n.toUpperCase() : r,
|
|
142
|
+
spoken: r
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
function O(e, t, n = D) {
|
|
147
|
+
let r = w(e, t)?.split("+").map((e) => n.keyName(e, t)) ?? [];
|
|
148
|
+
return {
|
|
149
|
+
text: r.map((e) => e.label).join(" + "),
|
|
150
|
+
spoken: r.length ? r.map((e) => e.spoken).join(" + ") : n.noShortcut
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
var de = () => () => {}, k = () => "other", A = () => /Mac|iPhone|iPad/.test(globalThis.navigator?.platform ?? "") ? "mac" : "other";
|
|
154
|
+
function fe(e) {
|
|
155
|
+
let t = h(de, A, k);
|
|
156
|
+
return e ?? t;
|
|
157
|
+
}
|
|
158
|
+
function j(e, t) {
|
|
159
|
+
let [n, r] = m(/* @__PURE__ */ new Set());
|
|
160
|
+
return f(() => {
|
|
161
|
+
let n = t ?? (typeof window > "u" ? void 0 : window);
|
|
162
|
+
if (!e || !n) {
|
|
163
|
+
r(/* @__PURE__ */ new Set());
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
let i = (e) => {
|
|
167
|
+
if (e.isComposing || e.getModifierState("AltGraph")) return;
|
|
168
|
+
let t = E(e, "other"), n = T(e, "other").map((e) => e === "mod" ? "ctrl" : e), i = t?.split("+").at(-1);
|
|
169
|
+
r((e) => /* @__PURE__ */ new Set([
|
|
170
|
+
...e,
|
|
171
|
+
...n,
|
|
172
|
+
...i ? [i] : []
|
|
173
|
+
]));
|
|
174
|
+
}, a = () => r(/* @__PURE__ */ new Set()), o = (e) => {
|
|
175
|
+
if (e.key === "Meta") {
|
|
176
|
+
a();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let t = E({
|
|
180
|
+
code: e.code,
|
|
181
|
+
key: e.key,
|
|
182
|
+
ctrlKey: !1,
|
|
183
|
+
altKey: !1,
|
|
184
|
+
shiftKey: !1,
|
|
185
|
+
metaKey: !1
|
|
186
|
+
}, "other"), n = {
|
|
187
|
+
Control: "ctrl",
|
|
188
|
+
Alt: "alt",
|
|
189
|
+
Shift: "shift"
|
|
190
|
+
}[e.key] ?? t;
|
|
191
|
+
r((e) => new Set([...e].filter((e) => e !== n)));
|
|
192
|
+
}, s = () => {
|
|
193
|
+
n.document.visibilityState !== "visible" && a();
|
|
194
|
+
};
|
|
195
|
+
return n.addEventListener("keydown", i), n.addEventListener("keyup", o), n.addEventListener("blur", a), n.document.addEventListener("visibilitychange", s), () => {
|
|
196
|
+
n.removeEventListener("keydown", i), n.removeEventListener("keyup", o), n.removeEventListener("blur", a), n.document.removeEventListener("visibilitychange", s);
|
|
197
|
+
};
|
|
198
|
+
}, [e, t]), n;
|
|
199
|
+
}
|
|
200
|
+
function pe(e = !0) {
|
|
201
|
+
return j(e);
|
|
202
|
+
}
|
|
203
|
+
var me = e({
|
|
204
|
+
display: "flex",
|
|
205
|
+
alignItems: "center",
|
|
206
|
+
flexWrap: "wrap",
|
|
207
|
+
gap: g.space[2],
|
|
208
|
+
minInlineSize: 0,
|
|
209
|
+
maxInlineSize: "100%"
|
|
210
|
+
}), M = e({
|
|
211
|
+
minBlockSize: g.space[8],
|
|
212
|
+
blockSize: "auto",
|
|
213
|
+
maxInlineSize: "100%",
|
|
214
|
+
whiteSpace: "normal",
|
|
215
|
+
paddingBlock: g.space[1]
|
|
216
|
+
}), he = e({
|
|
217
|
+
display: "inline-flex",
|
|
218
|
+
flexWrap: "wrap",
|
|
219
|
+
alignItems: "center",
|
|
220
|
+
gap: g.space[1],
|
|
221
|
+
direction: "ltr",
|
|
222
|
+
maxInlineSize: "100%"
|
|
223
|
+
}), ge = e({
|
|
224
|
+
"@starting-style": { opacity: 0 },
|
|
225
|
+
transitionProperty: "border-color, color, opacity",
|
|
226
|
+
transitionDuration: g.motion.duration.fast,
|
|
227
|
+
transitionTimingFunction: g.motion.easeStandard,
|
|
228
|
+
"&[data-pressed=\"true\"]": {
|
|
229
|
+
borderColor: g.color.borderControl,
|
|
230
|
+
color: g.color.accentText
|
|
231
|
+
},
|
|
232
|
+
[r]: { transitionDuration: "0s" },
|
|
233
|
+
[n]: {
|
|
234
|
+
borderColor: "ButtonText",
|
|
235
|
+
"&[data-pressed=\"true\"]": {
|
|
236
|
+
borderBlockEndColor: "Highlight",
|
|
237
|
+
color: "Highlight"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}), _e = e({
|
|
241
|
+
fontSize: g.textSize.xs,
|
|
242
|
+
paddingInline: g.space[1]
|
|
243
|
+
}), ve = e({
|
|
244
|
+
display: "inline-flex",
|
|
245
|
+
flexWrap: "wrap",
|
|
246
|
+
alignItems: "center",
|
|
247
|
+
gap: g.space[2],
|
|
248
|
+
boxSizing: "border-box",
|
|
249
|
+
maxInlineSize: "100%",
|
|
250
|
+
paddingBlock: g.space[1],
|
|
251
|
+
paddingInline: g.space[3],
|
|
252
|
+
border: `1px solid ${g.color.borderControl}`,
|
|
253
|
+
borderRadius: g.radius.sm,
|
|
254
|
+
backgroundColor: g.color.surface,
|
|
255
|
+
color: g.color.text,
|
|
256
|
+
fontFamily: g.font.sans,
|
|
257
|
+
lineHeight: g.lineHeight.base,
|
|
258
|
+
cursor: "pointer",
|
|
259
|
+
transitionProperty: "background-color, border-color",
|
|
260
|
+
transitionDuration: g.motion.duration.fast,
|
|
261
|
+
transitionTimingFunction: g.motion.easeStandard,
|
|
262
|
+
"&:focus-visible": t,
|
|
263
|
+
"&[aria-pressed=\"true\"]": { backgroundColor: g.color.accentSoft },
|
|
264
|
+
"&:disabled, &[aria-disabled=\"true\"]": { cursor: "not-allowed" },
|
|
265
|
+
[r]: { transitionDuration: "0s" },
|
|
266
|
+
[n]: { borderColor: "ButtonText" }
|
|
267
|
+
}), ye = {
|
|
268
|
+
sm: e({
|
|
269
|
+
minBlockSize: g.space[8],
|
|
270
|
+
fontSize: g.textSize.sm
|
|
271
|
+
}),
|
|
272
|
+
md: e({
|
|
273
|
+
minBlockSize: g.space[10],
|
|
274
|
+
fontSize: g.textSize.sm
|
|
275
|
+
}),
|
|
276
|
+
lg: e({
|
|
277
|
+
minBlockSize: g.space[12],
|
|
278
|
+
fontSize: g.textSize.md
|
|
279
|
+
})
|
|
280
|
+
}, be = e({
|
|
281
|
+
color: g.color.text,
|
|
282
|
+
fontSize: g.textSize.sm,
|
|
283
|
+
fontWeight: g.fontWeight.medium
|
|
284
|
+
}), xe = e({
|
|
285
|
+
color: g.color.text,
|
|
286
|
+
backgroundColor: g.color.warningSoft,
|
|
287
|
+
padding: g.space[2],
|
|
288
|
+
borderRadius: g.radius.sm,
|
|
289
|
+
transitionProperty: "opacity",
|
|
290
|
+
transitionDuration: g.motion.duration.fast,
|
|
291
|
+
transitionTimingFunction: g.motion.easeStandard,
|
|
292
|
+
"@starting-style": { opacity: 0 },
|
|
293
|
+
[r]: { transitionDuration: "0s" }
|
|
294
|
+
}), N = e({
|
|
295
|
+
display: "grid",
|
|
296
|
+
gap: g.space[4],
|
|
297
|
+
color: g.color.text
|
|
298
|
+
}), Se = e({
|
|
299
|
+
display: "grid",
|
|
300
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))",
|
|
301
|
+
gap: g.space[6]
|
|
302
|
+
}), Ce = e({
|
|
303
|
+
display: "flex",
|
|
304
|
+
justifyContent: "space-between",
|
|
305
|
+
alignItems: "center",
|
|
306
|
+
flexWrap: "wrap",
|
|
307
|
+
gap: g.space[2],
|
|
308
|
+
paddingBlock: g.space[2]
|
|
309
|
+
}), we = e({
|
|
310
|
+
listStyle: "none",
|
|
311
|
+
padding: 0,
|
|
312
|
+
margin: 0
|
|
313
|
+
}), Te = e({
|
|
314
|
+
fontSize: g.textSize.md,
|
|
315
|
+
margin: 0
|
|
316
|
+
});
|
|
317
|
+
function P({ shortcut: e, platform: t, pressed: n, size: r = "md", messages: a = D, locale: o, slotProps: s, className: c, sx: ee, ...te }) {
|
|
318
|
+
let l = fe(t), u = w(e, l);
|
|
319
|
+
return /* @__PURE__ */ _(i, {
|
|
320
|
+
className: c,
|
|
321
|
+
styles: he,
|
|
322
|
+
sx: ee,
|
|
323
|
+
children: (t) => /* @__PURE__ */ _("span", {
|
|
324
|
+
role: "img",
|
|
325
|
+
"aria-label": O(e, l, a).spoken,
|
|
326
|
+
...te,
|
|
327
|
+
"data-ui": "shortcut-recorder-keys",
|
|
328
|
+
className: t,
|
|
329
|
+
children: /* @__PURE__ */ _(d.Group, {
|
|
330
|
+
"aria-hidden": !0,
|
|
331
|
+
css: he,
|
|
332
|
+
children: u?.split("+").map((e) => /* @__PURE__ */ _(d, {
|
|
333
|
+
"data-pressed": n?.has(e) || n?.has(e === "mod" ? C(l) : e) || void 0,
|
|
334
|
+
className: s?.key?.className,
|
|
335
|
+
css: [
|
|
336
|
+
ge,
|
|
337
|
+
r === "sm" && _e,
|
|
338
|
+
s?.key?.css
|
|
339
|
+
],
|
|
340
|
+
children: a.keyName(e, l).label
|
|
341
|
+
}, e))
|
|
342
|
+
})
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
P.displayName = "ShortcutRecorder.Keys";
|
|
347
|
+
function Ee({ ref: e, value: t, defaultValue: n = null, onValueChange: r, recording: i, defaultRecording: ne = !1, onRecordingChange: ie, resetValue: h, bindings: g = [], reservedBindings: y = [], warnReserved: se = !0, requireModifier: ce = !0, platform: b, label: x, description: S, error: C, hideLabel: le = !1, size: ue = "md", locale: de, messages: k = D, readOnly: A = !1, disabled: j = !1, name: pe, dir: _e, slotProps: N, className: Se, sx: Ce, onClick: we, onKeyDown: Te, onKeyUp: Ee, onBlur: De, onFocus: Oe, "aria-labelledby": ke, "aria-describedby": Ae, "aria-invalid": je, id: Me, children: Ne, ...F }) {
|
|
348
|
+
let I = fe(b), L = (e) => e === null ? null : w(e, I), Pe = p({
|
|
349
|
+
value: n,
|
|
350
|
+
recording: ne
|
|
351
|
+
}), R = p(void 0), [z, Fe] = a(t === void 0 ? void 0 : L(t), L(n), (e) => r?.(e, R.current ? { replaced: R.current } : {})), [B, Ie] = a(i, ne, ie), [V, H] = m(null), [Le, U] = m(""), [Re, W] = m(""), [ze, G] = m(null), [Be, K] = m([]), [Ve, He] = m(!1), q = p(null), Ue = oe([q, e]), J = p(!1), Y = p(!1), We = p(!1), Ge = s(x) && x !== "", X = ee({
|
|
352
|
+
id: Me,
|
|
353
|
+
description: S === "" ? void 0 : S,
|
|
354
|
+
error: C === "" ? void 0 : C,
|
|
355
|
+
"aria-describedby": Ae,
|
|
356
|
+
"aria-invalid": je
|
|
357
|
+
}), Ke = re(), qe = `${Ke}-summary`, Je = `${Ke}-label`, Ye = `${Ke}-conflict`, Z = !j && !A, Q = () => {
|
|
358
|
+
Ie(!1), K([]), W("");
|
|
359
|
+
}, $ = (e, t) => {
|
|
360
|
+
R.current = t, Fe(e), R.current = void 0;
|
|
361
|
+
}, Xe = () => {
|
|
362
|
+
H(null), Q(), $(null), U(""), G({
|
|
363
|
+
value: null,
|
|
364
|
+
text: k.cleared
|
|
365
|
+
});
|
|
366
|
+
}, Ze = () => {
|
|
367
|
+
H(null), G(null), U(k.canceled), q.current?.focus();
|
|
368
|
+
};
|
|
369
|
+
f(() => {
|
|
370
|
+
let e = q.current;
|
|
371
|
+
if (!e) return;
|
|
372
|
+
let t = e.ownerDocument.defaultView, n = () => {
|
|
373
|
+
K([]), J.current = !1, He(!1);
|
|
374
|
+
}, r = () => {
|
|
375
|
+
e.ownerDocument.visibilityState !== "visible" && n();
|
|
376
|
+
};
|
|
377
|
+
return t?.addEventListener("blur", n), e.ownerDocument.addEventListener("visibilitychange", r), () => {
|
|
378
|
+
t?.removeEventListener("blur", n), e.ownerDocument.removeEventListener("visibilitychange", r);
|
|
379
|
+
};
|
|
380
|
+
}, []), f(() => {
|
|
381
|
+
let e = q.current?.form, n = () => {
|
|
382
|
+
t === void 0 && Fe(L(Pe.current.value)), i === void 0 && Ie(Pe.current.recording), H(null), K([]), J.current = !1, U(""), G(null), W("");
|
|
383
|
+
};
|
|
384
|
+
return e?.addEventListener("reset", n), () => e?.removeEventListener("reset", n);
|
|
385
|
+
});
|
|
386
|
+
let Qe = V ? k.conflict(O(V.shortcut, I, k).spoken, V.binding, V.reserved) : "", $e = L(h === void 0 ? Pe.current.value : h), et = z ? O(z, I, k).spoken : k.noShortcut;
|
|
387
|
+
return /* @__PURE__ */ v(te, {
|
|
388
|
+
"data-ui": "shortcut-recorder",
|
|
389
|
+
dir: _e,
|
|
390
|
+
className: Se,
|
|
391
|
+
sx: Ce,
|
|
392
|
+
part: N?.root,
|
|
393
|
+
children: [
|
|
394
|
+
Ge && /* @__PURE__ */ _("span", {
|
|
395
|
+
id: Je,
|
|
396
|
+
className: N?.label?.className,
|
|
397
|
+
css: [
|
|
398
|
+
be,
|
|
399
|
+
le && o,
|
|
400
|
+
N?.label?.css
|
|
401
|
+
],
|
|
402
|
+
children: x
|
|
403
|
+
}),
|
|
404
|
+
/* @__PURE__ */ v("div", {
|
|
405
|
+
className: N?.control?.className,
|
|
406
|
+
css: [me, N?.control?.css],
|
|
407
|
+
children: [/* @__PURE__ */ v("button", {
|
|
408
|
+
...F,
|
|
409
|
+
ref: Ue,
|
|
410
|
+
id: X.id,
|
|
411
|
+
type: "button",
|
|
412
|
+
disabled: j,
|
|
413
|
+
"aria-disabled": A || F["aria-disabled"],
|
|
414
|
+
"aria-pressed": B ?? !1,
|
|
415
|
+
"aria-invalid": X.ariaInvalid,
|
|
416
|
+
"aria-labelledby": [
|
|
417
|
+
ke,
|
|
418
|
+
Ge && Je,
|
|
419
|
+
(ke || Ge || !F["aria-label"]) && qe
|
|
420
|
+
].filter(Boolean).join(" ") || void 0,
|
|
421
|
+
"aria-describedby": [X.describedBy, V && Ye].filter(Boolean).join(" ") || void 0,
|
|
422
|
+
className: N?.recorder?.className,
|
|
423
|
+
css: [
|
|
424
|
+
ve,
|
|
425
|
+
ye[ue],
|
|
426
|
+
N?.recorder?.css
|
|
427
|
+
],
|
|
428
|
+
onFocus: (e) => {
|
|
429
|
+
He(!0), We.current = !1, Oe?.(e);
|
|
430
|
+
},
|
|
431
|
+
onBlur: (e) => {
|
|
432
|
+
He(!1), J.current = !1, Y.current = !1, We.current ? K([]) : Q(), We.current = !1, De?.(e);
|
|
433
|
+
},
|
|
434
|
+
onClick: (e) => {
|
|
435
|
+
we?.(e), !Z || e.defaultPrevented || Y.current ? Y.current = !1 : (H(null), K([]), G(null), W(""), J.current = !1, Ie(!B), U(B ? k.canceled : ""));
|
|
436
|
+
},
|
|
437
|
+
onKeyDown: (e) => {
|
|
438
|
+
if (Te?.(e), !Z || e.defaultPrevented || !Ve || e.currentTarget.ownerDocument.activeElement !== e.currentTarget) return;
|
|
439
|
+
let t = e.nativeEvent;
|
|
440
|
+
if (t.isComposing || t.repeat || [
|
|
441
|
+
"Dead",
|
|
442
|
+
"Process",
|
|
443
|
+
"Unidentified",
|
|
444
|
+
"AltGraph"
|
|
445
|
+
].includes(t.key) || t.getModifierState("AltGraph")) return;
|
|
446
|
+
let n = !e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey;
|
|
447
|
+
if (e.key === "Tab") {
|
|
448
|
+
B && (We.current = !0, Q());
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
if (n && e.key === "Escape" && (B || V)) {
|
|
452
|
+
e.preventDefault(), e.stopPropagation(), V ? Ze() : (Q(), U(k.canceled));
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (n && ["Backspace", "Delete"].includes(e.key)) {
|
|
456
|
+
e.preventDefault(), e.stopPropagation(), J.current || (J.current = !0, Xe());
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (!B) return;
|
|
460
|
+
n && ["Enter", " "].includes(e.key) && (e.preventDefault(), Y.current = e.key === " "), K(T(t, I));
|
|
461
|
+
let r = E(t, I);
|
|
462
|
+
if (!r || J.current) return;
|
|
463
|
+
if (ce && !e.ctrlKey && !e.altKey && !e.metaKey && !/^f\d+$/.test(r)) {
|
|
464
|
+
W(k.requireModifier(I));
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
e.preventDefault(), e.stopPropagation(), J.current = !0, Q();
|
|
468
|
+
let i = g.find((e) => w(e.shortcut, I) === r), a = !i && se ? y.find((e) => w(e.shortcut, I) === r) : void 0;
|
|
469
|
+
i || a ? H({
|
|
470
|
+
shortcut: r,
|
|
471
|
+
binding: i ?? a,
|
|
472
|
+
reserved: !!a
|
|
473
|
+
}) : ($(r), U(""), G({
|
|
474
|
+
value: r,
|
|
475
|
+
text: k.set(O(r, I, k).spoken)
|
|
476
|
+
}));
|
|
477
|
+
},
|
|
478
|
+
onKeyUp: (e) => {
|
|
479
|
+
Ee?.(e), J.current = !1, Y.current && e.key === " " && e.preventDefault(), Y.current = !1, B && K(e.key === "Meta" ? [] : T(e.nativeEvent, I));
|
|
480
|
+
},
|
|
481
|
+
children: [/* @__PURE__ */ _("span", {
|
|
482
|
+
id: qe,
|
|
483
|
+
css: o,
|
|
484
|
+
children: B ? [
|
|
485
|
+
k.recording,
|
|
486
|
+
...Be.map((e) => k.keyName(e, I).spoken),
|
|
487
|
+
et
|
|
488
|
+
].join(" ") : z ? et : `${k.placeholder} ${et}`
|
|
489
|
+
}), /* @__PURE__ */ _("span", {
|
|
490
|
+
"aria-hidden": !0,
|
|
491
|
+
css: he,
|
|
492
|
+
children: B ? /* @__PURE__ */ v(ae, { children: [k.recording, Be.map((e) => /* @__PURE__ */ _(d, {
|
|
493
|
+
css: [ge, N?.key?.css],
|
|
494
|
+
className: N?.key?.className,
|
|
495
|
+
children: k.keyName(e, I).label
|
|
496
|
+
}, e))] }) : z ? /* @__PURE__ */ _(P, {
|
|
497
|
+
shortcut: z,
|
|
498
|
+
platform: I,
|
|
499
|
+
messages: k,
|
|
500
|
+
locale: de,
|
|
501
|
+
"aria-hidden": !0,
|
|
502
|
+
role: "presentation",
|
|
503
|
+
slotProps: { key: N?.key }
|
|
504
|
+
}) : k.placeholder
|
|
505
|
+
})]
|
|
506
|
+
}), /* @__PURE__ */ v("div", {
|
|
507
|
+
css: [me, N?.actions?.css],
|
|
508
|
+
className: N?.actions?.className,
|
|
509
|
+
children: [/* @__PURE__ */ _(c, {
|
|
510
|
+
size: "sm",
|
|
511
|
+
variant: "outline",
|
|
512
|
+
disabled: j,
|
|
513
|
+
"aria-disabled": A,
|
|
514
|
+
css: [M, N?.reset?.css],
|
|
515
|
+
className: N?.reset?.className,
|
|
516
|
+
onClick: () => {
|
|
517
|
+
Z && (Q(), H(null), G(null), $($e));
|
|
518
|
+
},
|
|
519
|
+
children: k.reset($e ? O($e, I, k).spoken : k.noShortcut)
|
|
520
|
+
}), /* @__PURE__ */ _(c, {
|
|
521
|
+
size: "sm",
|
|
522
|
+
variant: "outline",
|
|
523
|
+
disabled: j,
|
|
524
|
+
"aria-disabled": A,
|
|
525
|
+
css: [M, N?.clear?.css],
|
|
526
|
+
className: N?.clear?.className,
|
|
527
|
+
onClick: () => {
|
|
528
|
+
Z && Xe();
|
|
529
|
+
},
|
|
530
|
+
children: k.clearLabel
|
|
531
|
+
})]
|
|
532
|
+
})]
|
|
533
|
+
}),
|
|
534
|
+
/* @__PURE__ */ _(u, {
|
|
535
|
+
id: X.descriptionId,
|
|
536
|
+
part: N?.description,
|
|
537
|
+
children: S === "" ? void 0 : S
|
|
538
|
+
}),
|
|
539
|
+
/* @__PURE__ */ _(l, {
|
|
540
|
+
id: X.errorId,
|
|
541
|
+
part: N?.error,
|
|
542
|
+
children: C === "" ? void 0 : C
|
|
543
|
+
}),
|
|
544
|
+
V && /* @__PURE__ */ v("div", {
|
|
545
|
+
onKeyDown: (e) => {
|
|
546
|
+
e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), Ze());
|
|
547
|
+
},
|
|
548
|
+
children: [/* @__PURE__ */ _("div", {
|
|
549
|
+
id: Ye,
|
|
550
|
+
css: [xe, N?.message?.css],
|
|
551
|
+
className: N?.message?.className,
|
|
552
|
+
children: Qe
|
|
553
|
+
}), /* @__PURE__ */ v("div", {
|
|
554
|
+
css: me,
|
|
555
|
+
children: [/* @__PURE__ */ _(c, {
|
|
556
|
+
size: "sm",
|
|
557
|
+
disabled: j,
|
|
558
|
+
"aria-disabled": A,
|
|
559
|
+
css: [M, N?.confirm?.css],
|
|
560
|
+
className: N?.confirm?.className,
|
|
561
|
+
onClick: () => {
|
|
562
|
+
Z && ($(V.shortcut, V.reserved ? void 0 : V.binding), H(null), U(""), G({
|
|
563
|
+
value: V.shortcut,
|
|
564
|
+
text: k.set(O(V.shortcut, I, k).spoken)
|
|
565
|
+
}), q.current?.focus());
|
|
566
|
+
},
|
|
567
|
+
children: k.confirmLabel
|
|
568
|
+
}), /* @__PURE__ */ _(c, {
|
|
569
|
+
size: "sm",
|
|
570
|
+
disabled: j,
|
|
571
|
+
"aria-disabled": A,
|
|
572
|
+
css: [M, N?.cancel?.css],
|
|
573
|
+
className: N?.cancel?.className,
|
|
574
|
+
onClick: Ze,
|
|
575
|
+
children: k.cancelLabel
|
|
576
|
+
})]
|
|
577
|
+
})]
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ _("span", {
|
|
580
|
+
role: "status",
|
|
581
|
+
"aria-live": "polite",
|
|
582
|
+
"aria-atomic": "true",
|
|
583
|
+
css: [o, N?.status?.css],
|
|
584
|
+
className: N?.status?.className,
|
|
585
|
+
children: Qe || (B ? Re || k.recording : ze && z === ze.value ? ze.text : Le)
|
|
586
|
+
}),
|
|
587
|
+
pe !== void 0 && /* @__PURE__ */ _("input", {
|
|
588
|
+
type: "hidden",
|
|
589
|
+
name: pe,
|
|
590
|
+
value: z ?? "",
|
|
591
|
+
disabled: j,
|
|
592
|
+
form: F.form
|
|
593
|
+
})
|
|
594
|
+
]
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
Ee.displayName = "ShortcutRecorder";
|
|
598
|
+
function De({ groups: e, searchable: t = !0, highlightPressed: n = !0, platform: r, locale: s, messages: c = D, inputValue: ee, defaultInputValue: te = "", onInputChange: l, slotProps: u, className: d, sx: f, ref: re, ...p }) {
|
|
599
|
+
let [h, g] = a(ee, te, l), [ae, y] = m(null), se = oe([re, y]), ce = j(n, ae?.ownerDocument.defaultView), b = ie(() => {
|
|
600
|
+
let t = new Intl.Collator(s, {
|
|
601
|
+
usage: "search",
|
|
602
|
+
sensitivity: "base"
|
|
603
|
+
}), n = h ?? "", r = Array.from(n), i = (e) => {
|
|
604
|
+
let i = Array.from(e);
|
|
605
|
+
return !n || i.some((e, a) => t.compare(i.slice(a, a + r.length).join(""), n) === 0);
|
|
606
|
+
};
|
|
607
|
+
return e.map((e) => ({
|
|
608
|
+
...e,
|
|
609
|
+
items: e.items.filter((e) => i(`${e.label} ${e.keywords ?? ""} ${e.shortcut}`))
|
|
610
|
+
})).filter((e) => e.items.length);
|
|
611
|
+
}, [
|
|
612
|
+
s,
|
|
613
|
+
h,
|
|
614
|
+
e
|
|
615
|
+
]), x = b.reduce((e, t) => e + t.items.length, 0), S = c.results === ue ? ue(x, s) : c.results(x);
|
|
616
|
+
return /* @__PURE__ */ _(i, {
|
|
617
|
+
className: [d, u?.root?.className].filter(Boolean).join(" "),
|
|
618
|
+
styles: [N, u?.root?.css],
|
|
619
|
+
sx: f,
|
|
620
|
+
children: (e) => /* @__PURE__ */ v("section", {
|
|
621
|
+
"aria-label": c.listLabel,
|
|
622
|
+
...p,
|
|
623
|
+
ref: se,
|
|
624
|
+
"data-ui": "shortcut-recorder-list",
|
|
625
|
+
className: e,
|
|
626
|
+
children: [
|
|
627
|
+
t && /* @__PURE__ */ _(ne, {
|
|
628
|
+
label: c.searchLabel,
|
|
629
|
+
placeholder: c.searchPlaceholder,
|
|
630
|
+
value: h ?? "",
|
|
631
|
+
onValueChange: g,
|
|
632
|
+
slotProps: { control: u?.search },
|
|
633
|
+
onKeyDown: (e) => {
|
|
634
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), g(""));
|
|
635
|
+
}
|
|
636
|
+
}),
|
|
637
|
+
/* @__PURE__ */ _("div", {
|
|
638
|
+
css: [Se, u?.groups?.css],
|
|
639
|
+
className: u?.groups?.className,
|
|
640
|
+
children: b.map((e) => /* @__PURE__ */ v("div", {
|
|
641
|
+
css: u?.group?.css,
|
|
642
|
+
className: u?.group?.className,
|
|
643
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
644
|
+
css: [Te, u?.heading?.css],
|
|
645
|
+
className: u?.heading?.className,
|
|
646
|
+
children: e.label
|
|
647
|
+
}), /* @__PURE__ */ _("ul", {
|
|
648
|
+
css: we,
|
|
649
|
+
children: e.items.map((e) => /* @__PURE__ */ v("li", {
|
|
650
|
+
css: [Ce, u?.item?.css],
|
|
651
|
+
className: u?.item?.className,
|
|
652
|
+
children: [/* @__PURE__ */ _("span", { children: e.label }), /* @__PURE__ */ _(P, {
|
|
653
|
+
shortcut: e.shortcut,
|
|
654
|
+
platform: r,
|
|
655
|
+
locale: s,
|
|
656
|
+
messages: c,
|
|
657
|
+
pressed: n ? ce : void 0,
|
|
658
|
+
css: u?.keys?.css,
|
|
659
|
+
className: u?.keys?.className
|
|
660
|
+
})]
|
|
661
|
+
}, e.label))
|
|
662
|
+
})]
|
|
663
|
+
}, e.label))
|
|
664
|
+
}),
|
|
665
|
+
!x && /* @__PURE__ */ _("p", {
|
|
666
|
+
css: u?.empty?.css,
|
|
667
|
+
className: u?.empty?.className,
|
|
668
|
+
children: c.empty
|
|
669
|
+
}),
|
|
670
|
+
/* @__PURE__ */ _("span", {
|
|
671
|
+
role: "status",
|
|
672
|
+
"aria-live": "polite",
|
|
673
|
+
"aria-atomic": "true",
|
|
674
|
+
css: [o, u?.status?.css],
|
|
675
|
+
className: u?.status?.className,
|
|
676
|
+
children: S
|
|
677
|
+
})
|
|
678
|
+
]
|
|
679
|
+
})
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
De.displayName = "ShortcutRecorder.List";
|
|
683
|
+
var Oe = Object.assign(Ee, {
|
|
684
|
+
Keys: P,
|
|
685
|
+
List: De
|
|
686
|
+
});
|
|
687
|
+
//#endregion
|
|
688
|
+
export { w as a, le as i, D as n, pe as o, O as r, fe as s, Oe as t };
|