@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
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n
|
|
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";
|
|
5
6
|
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
-
import { t as o } from "./visually-hidden-
|
|
7
|
+
import { t as o } from "./visually-hidden-DgVO3NaB.js";
|
|
7
8
|
import { t as s } from "./renderable-DzcIj1Lo.js";
|
|
8
|
-
import { t as c } from "./button-
|
|
9
|
-
import { t as l } from "./radio-group-
|
|
9
|
+
import { t as c } from "./button-C6OV0C7J.js";
|
|
10
|
+
import { t as l } from "./radio-group-DItMf2YM.js";
|
|
10
11
|
import { useEffect as u, useId as ee, useImperativeHandle as te, useLayoutEffect as d, useRef as f, useState as ne } from "react";
|
|
11
12
|
import { vars as p } from "@jfrader/tokens/vars";
|
|
12
13
|
import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
|
|
13
|
-
import { useMergeRefs as re } from "@floating-ui/react";
|
|
14
14
|
import { base as g } from "@jfrader/tokens";
|
|
15
|
+
import { useMergeRefs as re } from "@floating-ui/react";
|
|
15
16
|
//#region src/components/signature-pad/signature-pad.tsx
|
|
16
17
|
var _ = 600, v = 260, ie = 4096, y = 1e5, ae = 1e3, oe = 2, se = 3, ce = 60, le = 8e3, ue = 500, de = [], b = (e) => s(e) && e !== "", x = {
|
|
17
18
|
fine: 2,
|
|
@@ -173,9 +174,9 @@ var be = e({
|
|
|
173
174
|
border: `1px solid ${p.color.borderControl}`,
|
|
174
175
|
borderRadius: p.radius.lg,
|
|
175
176
|
touchAction: "none",
|
|
176
|
-
"&:focus-visible":
|
|
177
|
+
"&:focus-visible": t,
|
|
177
178
|
"&[aria-disabled=\"true\"], &[data-readonly]": { touchAction: "auto" },
|
|
178
|
-
[
|
|
179
|
+
[n]: {
|
|
179
180
|
borderColor: "CanvasText",
|
|
180
181
|
color: "CanvasText"
|
|
181
182
|
}
|
|
@@ -192,15 +193,15 @@ var be = e({
|
|
|
192
193
|
fontSize: p.textSize.xs,
|
|
193
194
|
transitionProperty: "opacity",
|
|
194
195
|
transitionDuration: p.motion.duration.base,
|
|
195
|
-
[
|
|
196
|
+
[r]: { transitionDuration: "0s" }
|
|
196
197
|
}), we = e({
|
|
197
198
|
display: "flex",
|
|
198
199
|
flexWrap: "wrap",
|
|
199
200
|
alignItems: "center",
|
|
200
201
|
gap: p.space[3]
|
|
201
202
|
}), Te = e({ fontWeight: p.fontWeight.medium }), Ee = e({ color: p.color.textMuted }), De = e({ color: p.color.dangerText }), M = (e, t) => e === t || JSON.stringify(e) === JSON.stringify(t);
|
|
202
|
-
function N({ ref: e, apiRef:
|
|
203
|
-
let R = ee(), z = f(null), Ge = re([z, e]), Ke = f(
|
|
203
|
+
function N({ ref: e, apiRef: t, value: n, defaultValue: r = de, onValueChange: s, color: p, defaultColor: g = "black", onColorChange: ie, width: oe, defaultWidth: se = "medium", onWidthChange: C, label: w, description: T, error: E, signer: O, hint: k, disabled: A = !1, readOnly: j = !1, required: N = !1, replay: Oe = !0, download: ke = !1, fileName: Ae = "signature", historyLimit: je = ce, messages: P, icons: Me, exportOptions: F, slotProps: I, className: Ne, sx: Pe, dir: Fe, style: Ie, onPointerDown: Le, onPointerMove: Re, onPointerUp: ze, onPointerCancel: Be, onLostPointerCapture: Ve, onKeyDown: He, "aria-labelledby": Ue, "aria-describedby": We, ...L }) {
|
|
204
|
+
let R = ee(), z = f(null), Ge = re([z, e]), Ke = f(r), [B = de, qe] = a(n, Ke.current, s), [Je = "black", Ye] = a(p, g, ie), [Xe = "medium", Ze] = a(oe, se, C), V = f({
|
|
204
205
|
present: B,
|
|
205
206
|
past: [],
|
|
206
207
|
future: []
|
|
@@ -377,7 +378,7 @@ function N({ ref: e, apiRef: n, value: r, defaultValue: i = de, onValueChange: s
|
|
|
377
378
|
let t = e.currentTarget.querySelectorAll("input[type=\"radio\"]:not(:disabled)"), n = e.key === "Home" ? t[0] : t[t.length - 1];
|
|
378
379
|
n && (e.preventDefault(), n.focus(), n.click());
|
|
379
380
|
}
|
|
380
|
-
te(
|
|
381
|
+
te(t, () => ({
|
|
381
382
|
focus: () => z.current?.focus(),
|
|
382
383
|
clear: ct,
|
|
383
384
|
undo: ot,
|
|
@@ -456,7 +457,7 @@ function N({ ref: e, apiRef: n, value: r, defaultValue: i = de, onValueChange: s
|
|
|
456
457
|
}
|
|
457
458
|
}] : []
|
|
458
459
|
];
|
|
459
|
-
return /* @__PURE__ */ m(
|
|
460
|
+
return /* @__PURE__ */ m(i, {
|
|
460
461
|
className: [Ne, I?.root?.className].filter(Boolean).join(" "),
|
|
461
462
|
styles: [be, I?.root?.css],
|
|
462
463
|
sx: Pe,
|
package/dist/signature-pad.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as SignatureExportError, n as SignaturePad, r as signatureToPng, i as signatureToSvg } from "./signature-pad-
|
|
2
|
+
export { t as SignatureExportError, n as SignaturePad, r as signatureToPng, i as signatureToSvg } from "./signature-pad-khL2yhQI.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { r } from "./media-8yrN85VT.js";
|
|
2
|
+
import { a as e, i as t } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { r as n } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as r } from "./sx-BJXJ2xJK.js";
|
|
4
5
|
import { vars as i } from "@jfrader/tokens/vars";
|
|
5
6
|
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
6
7
|
//#region src/components/skeleton/skeleton.tsx
|
|
@@ -19,7 +20,7 @@ var o = e({
|
|
|
19
20
|
backgroundRepeat: "no-repeat",
|
|
20
21
|
animation: `${o} 1.6s ease-in-out infinite`,
|
|
21
22
|
"&:dir(rtl)": { animationDirection: "reverse" },
|
|
22
|
-
[
|
|
23
|
+
[n]: {
|
|
23
24
|
animation: "none",
|
|
24
25
|
backgroundImage: "none"
|
|
25
26
|
}
|
|
@@ -29,23 +30,23 @@ var o = e({
|
|
|
29
30
|
aspectRatio: "1",
|
|
30
31
|
borderRadius: i.radius.full
|
|
31
32
|
});
|
|
32
|
-
function l({ ref: e, width: t, height:
|
|
33
|
-
return /* @__PURE__ */ a(
|
|
33
|
+
function l({ ref: e, width: t, height: n, circle: i = !1, radius: o, style: l, className: u, sx: d, ...f }) {
|
|
34
|
+
return /* @__PURE__ */ a(r, {
|
|
34
35
|
className: u,
|
|
35
36
|
styles: [s, i && c],
|
|
36
37
|
sx: d,
|
|
37
|
-
children: (
|
|
38
|
+
children: (r) => /* @__PURE__ */ a("div", {
|
|
38
39
|
...f,
|
|
39
40
|
ref: e,
|
|
40
41
|
"aria-hidden": "true",
|
|
41
42
|
"data-ui": "skeleton",
|
|
42
43
|
style: {
|
|
43
44
|
inlineSize: t,
|
|
44
|
-
blockSize:
|
|
45
|
+
blockSize: n,
|
|
45
46
|
borderRadius: i ? void 0 : o,
|
|
46
47
|
...l
|
|
47
48
|
},
|
|
48
|
-
className:
|
|
49
|
+
className: r
|
|
49
50
|
})
|
|
50
51
|
});
|
|
51
52
|
}
|
package/dist/skeleton.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Skeleton } from "./skeleton-
|
|
2
|
+
export { t as Skeleton } from "./skeleton-LJsQsveI.js";
|
|
@@ -0,0 +1,535 @@
|
|
|
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 { useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
10
|
+
import { vars as p } from "@jfrader/tokens/vars";
|
|
11
|
+
import { createElement as m } from "@emotion/react";
|
|
12
|
+
import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { MotionConfig as _, motion as ee, useReducedMotion as v } from "motion/react";
|
|
14
|
+
//#region src/components/slider/use-slider-interaction.ts
|
|
15
|
+
var y = 1e-7, b = "data-slider-thumb";
|
|
16
|
+
function x(e, t) {
|
|
17
|
+
return typeof e == "number" ? e === t : typeof t != "number" && e[0] === t[0] && e[1] === t[1];
|
|
18
|
+
}
|
|
19
|
+
function te(...e) {
|
|
20
|
+
return e.filter(Boolean).join(" ") || void 0;
|
|
21
|
+
}
|
|
22
|
+
function S(e) {
|
|
23
|
+
return s(e) && e !== "";
|
|
24
|
+
}
|
|
25
|
+
function C(e, t) {
|
|
26
|
+
return typeof e == "function" ? e(t) : e;
|
|
27
|
+
}
|
|
28
|
+
function w(e, t, n) {
|
|
29
|
+
let r = u(() => new Intl.NumberFormat(e, t), [e, t]);
|
|
30
|
+
return {
|
|
31
|
+
formatter: r,
|
|
32
|
+
format: (e) => n ? n(e, r) : r.format(e)
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function T(e) {
|
|
36
|
+
let { component: t, range: n, value: r, defaultValue: i, min: o, max: s, step: u, largeStep: p, minStepsBetweenThumbs: m, disabled: h, onValueChange: g, onValueCommit: _, onPointerSample: ee, resolvePointer: v, onGestureEnd: te } = e, S = (s - o) / u;
|
|
37
|
+
if (![
|
|
38
|
+
o,
|
|
39
|
+
s,
|
|
40
|
+
u,
|
|
41
|
+
S
|
|
42
|
+
].every(Number.isFinite) || s <= o || u <= 0 || !Number.isSafeInteger(Math.round(S)) || Math.abs(S - Math.round(S)) > y) throw Error(`${t} requires finite min < max, a positive step, and max aligned to min + n * step.`);
|
|
43
|
+
if (!Number.isInteger(m) || m < 0 || m > Math.round(S)) throw Error(`${t} minStepsBetweenThumbs must be a nonnegative integer that fits the domain.`);
|
|
44
|
+
if (p !== void 0 && (!Number.isFinite(p) || p <= 0)) throw Error(`${t} largeStep must be finite and positive.`);
|
|
45
|
+
let C = m * u, w = Math.max(1, Math.round((p ?? (s - o) / 10) / u)) * u, T = (e) => {
|
|
46
|
+
if (!Number.isFinite(e)) throw Error(`${t} values must be finite.`);
|
|
47
|
+
let n = Math.max(0, Math.min(Math.round(S), Math.round((e - o) / u))), r = o + n * u, i = Number(r.toPrecision(15));
|
|
48
|
+
return Math.abs(i - r) <= u * y ? i : r;
|
|
49
|
+
}, E = (e) => {
|
|
50
|
+
if (!n) {
|
|
51
|
+
if (typeof e != "number") throw Error(`${t} single mode requires a number.`);
|
|
52
|
+
return T(e);
|
|
53
|
+
}
|
|
54
|
+
if (typeof e == "number" || e.length !== 2 || e[0] > e[1]) throw Error(`${t} range requires an ordered [lower, upper] tuple.`);
|
|
55
|
+
let r = T(e[0]), i = T(e[1]);
|
|
56
|
+
if ((i - r) / u + y < m) throw Error(`${t} range values must respect minStepsBetweenThumbs.`);
|
|
57
|
+
return [r, i];
|
|
58
|
+
}, [ne] = f(() => E(i ?? (n ? [o, s] : o))), [re, ie, D] = a(r, ne, g), O = E(re ?? ne), k = typeof O == "number" ? [O] : O, ae = l(), A = d(null), j = d(null), M = d(0), [oe, N] = f(null), P = (e) => n ? [e === 0 ? o : T(k[0] + C), e === 0 ? T(k[1] - C) : s] : [o, s], F = (e, t) => {
|
|
59
|
+
let [r, i] = P(e), a = T(Math.max(r, Math.min(i, t)));
|
|
60
|
+
return n ? e === 0 ? [a, k[1]] : [k[0], a] : a;
|
|
61
|
+
}, I = (e) => {
|
|
62
|
+
x(O, e) || ie(e);
|
|
63
|
+
}, L = (e) => {
|
|
64
|
+
let t = j.current;
|
|
65
|
+
t && (j.current = null, N(null), te?.(e), t.control.hasPointerCapture(t.pointerId) && t.control.releasePointerCapture(t.pointerId), e && !x(t.initial, t.candidate) && _(t.candidate));
|
|
66
|
+
};
|
|
67
|
+
c(() => {
|
|
68
|
+
h && L(!1);
|
|
69
|
+
}, [h]), c(() => () => {
|
|
70
|
+
let e = j.current;
|
|
71
|
+
j.current = null, e?.control.hasPointerCapture(e.pointerId) && e.control.releasePointerCapture(e.pointerId);
|
|
72
|
+
}, []), c(() => {
|
|
73
|
+
let e = A.current?.closest("form");
|
|
74
|
+
if (!e) return;
|
|
75
|
+
let t = (e) => {
|
|
76
|
+
queueMicrotask(() => {
|
|
77
|
+
e.defaultPrevented || (L(!1), D());
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
81
|
+
}, [D]);
|
|
82
|
+
let R = (e) => A.current?.querySelector(`[${b}="${e}"]`)?.focus(), z = () => A.current?.matches(":dir(rtl)") ?? !1, B = (e) => {
|
|
83
|
+
let t = A.current.getBoundingClientRect(), n = t.width > 0 ? (e - t.left) / t.width : 0;
|
|
84
|
+
return o + (z() ? 1 - n : n) * (s - o);
|
|
85
|
+
}, V = (e) => n ? Math.abs(e - k[0]) === Math.abs(e - k[1]) ? M.current : Math.abs(e - k[0]) < Math.abs(e - k[1]) ? 0 : 1 : 0, H = (e) => {
|
|
86
|
+
let t = j.current;
|
|
87
|
+
if (!t || e.pointerId !== t.pointerId || h) return;
|
|
88
|
+
t.coincident && e.clientX !== t.originX && (t.thumb = e.clientX > t.originX === z() ? 0 : 1, t.coincident = !1, N(t.thumb), R(t.thumb));
|
|
89
|
+
let [n, r] = P(t.thumb), i = A.current.getBoundingClientRect().width, a = {
|
|
90
|
+
raw: B(e.clientX - t.offset),
|
|
91
|
+
low: n,
|
|
92
|
+
high: r,
|
|
93
|
+
pxPerUnit: i / (s - o),
|
|
94
|
+
rtl: z(),
|
|
95
|
+
pointerType: e.pointerType
|
|
96
|
+
};
|
|
97
|
+
ee?.(a);
|
|
98
|
+
let c = F(t.thumb, v ? v(a) : a.raw);
|
|
99
|
+
x(t.candidate, c) || (t.candidate = c, I(c));
|
|
100
|
+
}, se = (e) => {
|
|
101
|
+
if (e.defaultPrevented || h || j.current || !e.isPrimary || e.button !== 0) return;
|
|
102
|
+
let t = e.target.closest(`[${b}]`), r = t ? Number(t.getAttribute(b)) : V(B(e.clientX)), i = t?.getBoundingClientRect(), a = i ? e.clientX - (i.left + i.width / 2) : 0;
|
|
103
|
+
j.current = {
|
|
104
|
+
pointerId: e.pointerId,
|
|
105
|
+
thumb: r,
|
|
106
|
+
offset: a,
|
|
107
|
+
originX: e.clientX,
|
|
108
|
+
coincident: n && k[0] === k[1],
|
|
109
|
+
initial: O,
|
|
110
|
+
candidate: O,
|
|
111
|
+
control: e.currentTarget
|
|
112
|
+
}, e.currentTarget.setPointerCapture(e.pointerId), e.preventDefault(), N(r), R(r), t || H(e);
|
|
113
|
+
}, ce = (e, t) => {
|
|
114
|
+
if (h || e.defaultPrevented) return;
|
|
115
|
+
let n = z() ? -1 : 1, r = e.shiftKey ? w : u, [i, a] = P(t), o = {
|
|
116
|
+
ArrowRight: k[t] + r * n,
|
|
117
|
+
ArrowLeft: k[t] - r * n,
|
|
118
|
+
ArrowUp: k[t] + r,
|
|
119
|
+
ArrowDown: k[t] - r,
|
|
120
|
+
PageUp: k[t] + w,
|
|
121
|
+
PageDown: k[t] - w,
|
|
122
|
+
Home: i,
|
|
123
|
+
End: a
|
|
124
|
+
}[e.key];
|
|
125
|
+
if (o === void 0) return;
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
let s = F(t, o);
|
|
128
|
+
x(O, s) || (I(s), _(s));
|
|
129
|
+
};
|
|
130
|
+
return {
|
|
131
|
+
id: ae,
|
|
132
|
+
controlRef: A,
|
|
133
|
+
current: O,
|
|
134
|
+
values: k,
|
|
135
|
+
active: oe,
|
|
136
|
+
bounds: P,
|
|
137
|
+
percent: (e) => (e - o) / (s - o) * 100,
|
|
138
|
+
normalizeMarks: (e) => Array.from(new Map(e.flatMap((e) => {
|
|
139
|
+
let t = typeof e == "number" ? { value: e } : e;
|
|
140
|
+
return Number.isFinite(t.value) && t.value >= o && t.value <= s ? [[T(t.value), {
|
|
141
|
+
...t,
|
|
142
|
+
value: T(t.value)
|
|
143
|
+
}]] : [];
|
|
144
|
+
})).values()),
|
|
145
|
+
controlHandlers: (e) => ({
|
|
146
|
+
ref: (t) => {
|
|
147
|
+
A.current = t;
|
|
148
|
+
let n = e?.ref;
|
|
149
|
+
if (typeof n == "function") return n(t);
|
|
150
|
+
n && (n.current = t);
|
|
151
|
+
},
|
|
152
|
+
onPointerDown: (t) => {
|
|
153
|
+
e?.onPointerDown?.(t), se(t);
|
|
154
|
+
},
|
|
155
|
+
onPointerMove: (t) => {
|
|
156
|
+
e?.onPointerMove?.(t), t.defaultPrevented || H(t);
|
|
157
|
+
},
|
|
158
|
+
onPointerUp: (t) => {
|
|
159
|
+
e?.onPointerUp?.(t), j.current?.pointerId === t.pointerId && L(!0);
|
|
160
|
+
},
|
|
161
|
+
onPointerCancel: (t) => {
|
|
162
|
+
e?.onPointerCancel?.(t), j.current?.pointerId === t.pointerId && L(!1);
|
|
163
|
+
},
|
|
164
|
+
onLostPointerCapture: (t) => {
|
|
165
|
+
e?.onLostPointerCapture?.(t), j.current?.pointerId === t.pointerId && L(!1);
|
|
166
|
+
}
|
|
167
|
+
}),
|
|
168
|
+
handleRootKeyDown: (e) => {
|
|
169
|
+
let t = e.target.closest(`[${b}]`);
|
|
170
|
+
t && A.current?.contains(t) && ce(e, Number(t.getAttribute(b)));
|
|
171
|
+
},
|
|
172
|
+
selectMark: (e) => {
|
|
173
|
+
if (h) return;
|
|
174
|
+
let t = F(V(e), e);
|
|
175
|
+
x(O, t) || (I(t), _(t));
|
|
176
|
+
},
|
|
177
|
+
noteFocus: (e) => {
|
|
178
|
+
M.current = e;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/components/slider/slider-style.ts
|
|
184
|
+
var E = e({
|
|
185
|
+
display: "grid",
|
|
186
|
+
gap: p.space[2],
|
|
187
|
+
minInlineSize: 0,
|
|
188
|
+
inlineSize: "100%",
|
|
189
|
+
fontFamily: p.font.sans,
|
|
190
|
+
fontSize: p.textSize.sm,
|
|
191
|
+
lineHeight: p.lineHeight.base,
|
|
192
|
+
color: p.color.text
|
|
193
|
+
}), ne = e({
|
|
194
|
+
display: "flex",
|
|
195
|
+
flexWrap: "wrap",
|
|
196
|
+
justifyContent: "space-between",
|
|
197
|
+
gap: p.space[2],
|
|
198
|
+
alignItems: "baseline"
|
|
199
|
+
}), re = e({ fontWeight: p.fontWeight.medium }), ie = e({
|
|
200
|
+
fontVariantNumeric: "tabular-nums",
|
|
201
|
+
overflowWrap: "anywhere"
|
|
202
|
+
}), D = e({ color: p.color.textMuted }), O = e({ color: p.color.dangerText }), k = e({
|
|
203
|
+
display: "flex",
|
|
204
|
+
alignItems: "center",
|
|
205
|
+
gap: p.space[3],
|
|
206
|
+
minInlineSize: 0,
|
|
207
|
+
paddingBlockStart: p.space[8]
|
|
208
|
+
}), ae = e({
|
|
209
|
+
position: "relative",
|
|
210
|
+
flex: 1,
|
|
211
|
+
minInlineSize: p.space[8],
|
|
212
|
+
marginInline: p.space[4],
|
|
213
|
+
touchAction: "pan-y",
|
|
214
|
+
userSelect: "none",
|
|
215
|
+
cursor: "pointer",
|
|
216
|
+
"&[data-disabled]": { cursor: "default" }
|
|
217
|
+
}), A = {
|
|
218
|
+
sm: e({ minBlockSize: p.space[8] }),
|
|
219
|
+
md: e({ minBlockSize: p.space[10] })
|
|
220
|
+
}, j = e({
|
|
221
|
+
display: "flex",
|
|
222
|
+
flexWrap: "wrap",
|
|
223
|
+
gap: p.space[2]
|
|
224
|
+
}), M = e({
|
|
225
|
+
minBlockSize: p.space[8],
|
|
226
|
+
minInlineSize: p.space[8],
|
|
227
|
+
paddingBlock: p.space[1],
|
|
228
|
+
paddingInline: p.space[2],
|
|
229
|
+
font: "inherit",
|
|
230
|
+
overflowWrap: "anywhere",
|
|
231
|
+
maxInlineSize: "100%",
|
|
232
|
+
color: p.color.text,
|
|
233
|
+
background: p.color.surfaceRaised,
|
|
234
|
+
border: `1px solid ${p.color.borderControl}`,
|
|
235
|
+
borderRadius: p.radius.md,
|
|
236
|
+
cursor: "pointer",
|
|
237
|
+
"&:focus-visible": t,
|
|
238
|
+
"&:disabled": { cursor: "default" },
|
|
239
|
+
[n]: { borderColor: "ButtonText" }
|
|
240
|
+
}), oe = {
|
|
241
|
+
type: "spring",
|
|
242
|
+
stiffness: 420,
|
|
243
|
+
damping: 30
|
|
244
|
+
}, N = 8, P = e(E, { label: "slider" }), F = e({
|
|
245
|
+
position: "absolute",
|
|
246
|
+
insetInline: 0,
|
|
247
|
+
insetBlockStart: "50%",
|
|
248
|
+
transform: "translateY(-50%)",
|
|
249
|
+
blockSize: p.space[1],
|
|
250
|
+
boxSizing: "border-box",
|
|
251
|
+
border: `1px solid ${p.color.borderControl}`,
|
|
252
|
+
borderRadius: p.radius.full,
|
|
253
|
+
background: p.color.surfaceInset,
|
|
254
|
+
pointerEvents: "none",
|
|
255
|
+
[n]: {
|
|
256
|
+
forcedColorAdjust: "none",
|
|
257
|
+
background: "Canvas",
|
|
258
|
+
borderColor: "CanvasText"
|
|
259
|
+
}
|
|
260
|
+
}), I = e({
|
|
261
|
+
position: "absolute",
|
|
262
|
+
insetBlock: 0,
|
|
263
|
+
background: p.color.accent,
|
|
264
|
+
borderRadius: p.radius.full,
|
|
265
|
+
[n]: { background: "Highlight" }
|
|
266
|
+
}), L = e({
|
|
267
|
+
position: "absolute",
|
|
268
|
+
insetBlockStart: "50%",
|
|
269
|
+
transform: "translate(-50%, -50%)",
|
|
270
|
+
"&:dir(rtl)": { transform: "translate(50%, -50%)" },
|
|
271
|
+
inlineSize: p.space[8],
|
|
272
|
+
blockSize: p.space[8],
|
|
273
|
+
display: "grid",
|
|
274
|
+
placeItems: "center",
|
|
275
|
+
borderRadius: p.radius.full,
|
|
276
|
+
cursor: "grab",
|
|
277
|
+
"&:focus-visible": {
|
|
278
|
+
...t,
|
|
279
|
+
zIndex: 2
|
|
280
|
+
},
|
|
281
|
+
"&[data-dragging]": {
|
|
282
|
+
cursor: "grabbing",
|
|
283
|
+
zIndex: 3
|
|
284
|
+
},
|
|
285
|
+
"&[aria-disabled=\"true\"]": { cursor: "default" }
|
|
286
|
+
}), R = e({
|
|
287
|
+
inlineSize: p.space[6],
|
|
288
|
+
blockSize: p.space[6],
|
|
289
|
+
boxSizing: "border-box",
|
|
290
|
+
border: `2px solid ${p.color.borderControl}`,
|
|
291
|
+
borderRadius: p.radius.full,
|
|
292
|
+
background: p.color.surfaceRaised,
|
|
293
|
+
boxShadow: p.shadow.raised,
|
|
294
|
+
pointerEvents: "none",
|
|
295
|
+
[n]: {
|
|
296
|
+
forcedColorAdjust: "none",
|
|
297
|
+
background: "Canvas",
|
|
298
|
+
borderColor: "CanvasText",
|
|
299
|
+
boxShadow: "none"
|
|
300
|
+
}
|
|
301
|
+
}), z = e({
|
|
302
|
+
position: "absolute",
|
|
303
|
+
insetBlockEnd: `calc(100% + ${p.space[2]})`,
|
|
304
|
+
paddingInline: p.space[2],
|
|
305
|
+
paddingBlock: p.space[1],
|
|
306
|
+
inlineSize: "max-content",
|
|
307
|
+
maxInlineSize: "min(24rem, 80vw)",
|
|
308
|
+
overflowWrap: "anywhere",
|
|
309
|
+
border: `1px solid ${p.color.borderControl}`,
|
|
310
|
+
borderRadius: p.radius.md,
|
|
311
|
+
background: p.color.surfaceRaised,
|
|
312
|
+
color: p.color.text,
|
|
313
|
+
boxShadow: p.shadow.raised,
|
|
314
|
+
pointerEvents: "none",
|
|
315
|
+
fontSize: p.textSize.xs,
|
|
316
|
+
opacity: 0,
|
|
317
|
+
transition: `opacity ${p.motion.duration.fast} ${p.motion.easeStandard}`,
|
|
318
|
+
"[data-dragging] > &, [data-slider-thumb]:focus-visible > &": { opacity: 1 },
|
|
319
|
+
[r]: { transitionDuration: "0s" },
|
|
320
|
+
[n]: {
|
|
321
|
+
borderColor: "CanvasText",
|
|
322
|
+
boxShadow: "none"
|
|
323
|
+
}
|
|
324
|
+
}), B = e({
|
|
325
|
+
position: "absolute",
|
|
326
|
+
insetBlockStart: "50%",
|
|
327
|
+
transform: "translate(-50%, -50%)",
|
|
328
|
+
inlineSize: p.space[1],
|
|
329
|
+
blockSize: p.space[2],
|
|
330
|
+
border: `1px solid ${p.color.borderControl}`,
|
|
331
|
+
background: p.color.surfaceRaised,
|
|
332
|
+
boxSizing: "border-box",
|
|
333
|
+
pointerEvents: "none",
|
|
334
|
+
[n]: {
|
|
335
|
+
background: "Canvas",
|
|
336
|
+
borderColor: "CanvasText"
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
function V(e) {
|
|
340
|
+
let { ref: t, type: n = "single", value: r, defaultValue: a, label: s, description: c, error: l, invalid: u = !1, disabled: d = !1, min: p = 0, max: y = 100, step: b = 1, largeStep: x, minStepsBetweenThumbs: E = 0, marks: V = [], thumbLabels: H, locale: se, formatOptions: ce, formatValue: le, showValue: ue = !0, start: de, end: fe, name: U, size: pe = "md", slotProps: W, onValueChange: me, onValueCommit: he, className: ge, sx: _e, onKeyDown: ve, "aria-label": ye, "aria-labelledby": be, "aria-describedby": xe, "aria-invalid": Se, ...Ce } = e, G = n === "range", K = v(), [we, Te] = f(0), q = T({
|
|
341
|
+
component: "Slider",
|
|
342
|
+
range: G,
|
|
343
|
+
value: r,
|
|
344
|
+
defaultValue: a,
|
|
345
|
+
min: p,
|
|
346
|
+
max: y,
|
|
347
|
+
step: b,
|
|
348
|
+
largeStep: x,
|
|
349
|
+
minStepsBetweenThumbs: E,
|
|
350
|
+
disabled: d,
|
|
351
|
+
onValueChange: (t) => {
|
|
352
|
+
e.type, e.onValueChange?.(t);
|
|
353
|
+
},
|
|
354
|
+
onValueCommit: (t) => {
|
|
355
|
+
e.type, e.onValueCommit?.(t);
|
|
356
|
+
},
|
|
357
|
+
onPointerSample: ({ raw: e, low: t, high: n, rtl: r }) => Te(K ? 0 : Math.max(-8, Math.min(N, (e - Math.max(t, Math.min(n, e))) * (r ? -1 : 1)))),
|
|
358
|
+
onGestureEnd: () => Te(0)
|
|
359
|
+
}), { id: J, current: Y, values: X, active: Ee, bounds: De, percent: Z } = q, { formatter: Oe, format: Q } = w(se, ce, le), ke = typeof Y == "number" ? Q(Y) : !le && "formatRange" in Oe ? Oe.formatRange(Y[0], Y[1]) : `${Q(Y[0])} – ${Q(Y[1])}`, Ae = q.normalizeMarks(V), je = G ? Z(X[0]) : 0, Me = Z(X[+!!G]), Ne = S(s), Pe = S(c), $ = S(l);
|
|
360
|
+
return /* @__PURE__ */ h(_, {
|
|
361
|
+
reducedMotion: "user",
|
|
362
|
+
children: /* @__PURE__ */ h(i, {
|
|
363
|
+
className: ge,
|
|
364
|
+
styles: P,
|
|
365
|
+
sx: _e,
|
|
366
|
+
children: (e) => /* @__PURE__ */ g("div", {
|
|
367
|
+
...Ce,
|
|
368
|
+
ref: t,
|
|
369
|
+
className: e,
|
|
370
|
+
"data-ui": "slider",
|
|
371
|
+
"data-disabled": d || void 0,
|
|
372
|
+
onKeyDown: (e) => {
|
|
373
|
+
ve?.(e), q.handleRootKeyDown(e);
|
|
374
|
+
},
|
|
375
|
+
children: [
|
|
376
|
+
(Ne || ue) && /* @__PURE__ */ g("div", {
|
|
377
|
+
css: ne,
|
|
378
|
+
children: [Ne && /* @__PURE__ */ h("span", {
|
|
379
|
+
...W?.label,
|
|
380
|
+
id: `${J}-label`,
|
|
381
|
+
css: [re, W?.label?.css],
|
|
382
|
+
children: s
|
|
383
|
+
}), ue && /* @__PURE__ */ h("span", {
|
|
384
|
+
...W?.readout,
|
|
385
|
+
"aria-hidden": "true",
|
|
386
|
+
css: [ie, W?.readout?.css],
|
|
387
|
+
children: ke
|
|
388
|
+
})]
|
|
389
|
+
}),
|
|
390
|
+
Pe && /* @__PURE__ */ h("div", {
|
|
391
|
+
...W?.description,
|
|
392
|
+
id: `${J}-description`,
|
|
393
|
+
css: [D, W?.description?.css],
|
|
394
|
+
children: c
|
|
395
|
+
}),
|
|
396
|
+
$ && /* @__PURE__ */ h("div", {
|
|
397
|
+
...W?.error,
|
|
398
|
+
id: `${J}-error`,
|
|
399
|
+
role: "alert",
|
|
400
|
+
css: [O, W?.error?.css],
|
|
401
|
+
children: l
|
|
402
|
+
}),
|
|
403
|
+
/* @__PURE__ */ g("div", {
|
|
404
|
+
css: k,
|
|
405
|
+
children: [
|
|
406
|
+
S(de) && /* @__PURE__ */ h("div", {
|
|
407
|
+
...W?.start,
|
|
408
|
+
children: de
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ g("div", {
|
|
411
|
+
...W?.control,
|
|
412
|
+
...q.controlHandlers(W?.control),
|
|
413
|
+
css: [
|
|
414
|
+
ae,
|
|
415
|
+
A[pe],
|
|
416
|
+
W?.control?.css
|
|
417
|
+
],
|
|
418
|
+
"data-ui": "slider-control",
|
|
419
|
+
"data-disabled": d || void 0,
|
|
420
|
+
children: [
|
|
421
|
+
/* @__PURE__ */ h("div", {
|
|
422
|
+
...W?.track,
|
|
423
|
+
"data-ui": "slider-track",
|
|
424
|
+
"aria-hidden": "true",
|
|
425
|
+
css: [F, W?.track?.css],
|
|
426
|
+
children: /* @__PURE__ */ h("div", {
|
|
427
|
+
...W?.fill,
|
|
428
|
+
"data-ui": "slider-fill",
|
|
429
|
+
css: [I, W?.fill?.css],
|
|
430
|
+
style: {
|
|
431
|
+
...W?.fill?.style,
|
|
432
|
+
insetInlineStart: `${je}%`,
|
|
433
|
+
inlineSize: `${Me - je}%`
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
}),
|
|
437
|
+
Ae.map((e, t) => /* @__PURE__ */ h("span", {
|
|
438
|
+
"aria-hidden": "true",
|
|
439
|
+
css: B,
|
|
440
|
+
style: { insetInlineStart: `${Z(e.value)}%` }
|
|
441
|
+
}, t)),
|
|
442
|
+
X.map((e, t) => {
|
|
443
|
+
let n = C(W?.thumb, t), [r, i] = De(t);
|
|
444
|
+
return /* @__PURE__ */ m("div", {
|
|
445
|
+
...n,
|
|
446
|
+
key: t,
|
|
447
|
+
id: `${J}-thumb-${t}`,
|
|
448
|
+
"data-slider-thumb": t,
|
|
449
|
+
"data-dragging": Ee === t || void 0,
|
|
450
|
+
role: "slider",
|
|
451
|
+
tabIndex: d ? -1 : 0,
|
|
452
|
+
"aria-orientation": "horizontal",
|
|
453
|
+
"aria-disabled": d,
|
|
454
|
+
"aria-invalid": $ || u ? !0 : n?.["aria-invalid"] ?? Se,
|
|
455
|
+
"aria-valuemin": r,
|
|
456
|
+
"aria-valuemax": i,
|
|
457
|
+
"aria-valuenow": e,
|
|
458
|
+
"aria-valuetext": Q(e),
|
|
459
|
+
"aria-label": n?.["aria-label"] ?? (G ? H?.[t] : ye),
|
|
460
|
+
"aria-labelledby": te(be, n?.["aria-labelledby"], G ? `${J}-name-${t}` : Ne && `${J}-label`),
|
|
461
|
+
"aria-describedby": te(xe, n?.["aria-describedby"], Pe && `${J}-description`, $ && `${J}-error`),
|
|
462
|
+
css: [L, n?.css],
|
|
463
|
+
style: {
|
|
464
|
+
...n?.style,
|
|
465
|
+
insetInlineStart: `${Z(e)}%`
|
|
466
|
+
},
|
|
467
|
+
onFocus: (e) => {
|
|
468
|
+
q.noteFocus(t), n?.onFocus?.(e);
|
|
469
|
+
},
|
|
470
|
+
onKeyDown: (e) => {
|
|
471
|
+
n?.onKeyDown?.(e);
|
|
472
|
+
}
|
|
473
|
+
}, /* @__PURE__ */ h(ee.span, {
|
|
474
|
+
"aria-hidden": "true",
|
|
475
|
+
css: R,
|
|
476
|
+
animate: {
|
|
477
|
+
scale: K ? 1 : Ee === t ? .95 : 1,
|
|
478
|
+
x: K ? 0 : Ee === t ? we : 0
|
|
479
|
+
},
|
|
480
|
+
transition: K ? { duration: 0 } : oe
|
|
481
|
+
}), G && /* @__PURE__ */ h("span", {
|
|
482
|
+
id: `${J}-name-${t}`,
|
|
483
|
+
css: o,
|
|
484
|
+
children: H?.[t]
|
|
485
|
+
}), /* @__PURE__ */ h("span", {
|
|
486
|
+
...W?.bubble,
|
|
487
|
+
"data-ui": "slider-bubble",
|
|
488
|
+
"aria-hidden": "true",
|
|
489
|
+
css: [z, W?.bubble?.css],
|
|
490
|
+
style: {
|
|
491
|
+
...W?.bubble?.style,
|
|
492
|
+
...Z(e) <= 50 ? { insetInlineStart: 0 } : { insetInlineEnd: 0 }
|
|
493
|
+
},
|
|
494
|
+
children: Q(e)
|
|
495
|
+
}));
|
|
496
|
+
})
|
|
497
|
+
]
|
|
498
|
+
}),
|
|
499
|
+
S(fe) && /* @__PURE__ */ h("div", {
|
|
500
|
+
...W?.end,
|
|
501
|
+
children: fe
|
|
502
|
+
})
|
|
503
|
+
]
|
|
504
|
+
}),
|
|
505
|
+
Ae.some((e) => S(e.label)) && /* @__PURE__ */ h("div", {
|
|
506
|
+
css: j,
|
|
507
|
+
children: Ae.map((e, t) => {
|
|
508
|
+
if (!S(e.label)) return null;
|
|
509
|
+
let n = C(W?.mark, t);
|
|
510
|
+
return /* @__PURE__ */ m("button", {
|
|
511
|
+
...n,
|
|
512
|
+
key: t,
|
|
513
|
+
type: "button",
|
|
514
|
+
disabled: d,
|
|
515
|
+
css: [M, n?.css],
|
|
516
|
+
onClick: (t) => {
|
|
517
|
+
n?.onClick?.(t), t.defaultPrevented || q.selectMark(e.value);
|
|
518
|
+
}
|
|
519
|
+
}, e.label);
|
|
520
|
+
})
|
|
521
|
+
}),
|
|
522
|
+
U !== void 0 && X.map((e, t) => /* @__PURE__ */ h("input", {
|
|
523
|
+
type: "hidden",
|
|
524
|
+
disabled: d,
|
|
525
|
+
name: typeof U == "string" ? U : U[t],
|
|
526
|
+
value: e
|
|
527
|
+
}, t))
|
|
528
|
+
]
|
|
529
|
+
})
|
|
530
|
+
})
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
V.displayName = "Slider";
|
|
534
|
+
//#endregion
|
|
535
|
+
export { V as t };
|
package/dist/slider.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Slider } from "./slider-
|
|
2
|
+
export { t as Slider } from "./slider-DjAnGmlC.js";
|