@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,395 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { i as e, r as t, t as n } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { n as r } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n as i, r as a, t as o } from "./media-8yrN85VT.js";
|
|
5
|
-
import { a as ee, c as te, d as ne, f as re, g as ie, h as ae, i as oe, l as se, m as s, n as c, o as ce, p as le, r as l, s as ue, t as u, u as de } from "./use-slider-interaction-ChL-208h.js";
|
|
6
|
-
import { useEffect as d, useRef as f, useState as fe } from "react";
|
|
7
|
-
import { vars as p } from "@jfrader/tokens/vars";
|
|
8
|
-
import { createElement as m } from "@emotion/react";
|
|
9
|
-
import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { MotionConfig as pe, motion as me, useMotionValue as he, useMotionValueEvent as _, useReducedMotion as ge, useSpring as v, useTransform as _e, useVelocity as ve } from "motion/react";
|
|
11
|
-
//#region src/components/elastic-slider/elastic-slider.tsx
|
|
12
|
-
var y = 26, ye = 1.15, be = 7, xe = 10, Se = 6, Ce = .02, we = 10, Te = {
|
|
13
|
-
stiffness: 380,
|
|
14
|
-
damping: 26
|
|
15
|
-
}, Ee = {
|
|
16
|
-
stiffness: 300,
|
|
17
|
-
damping: 20
|
|
18
|
-
}, De = {
|
|
19
|
-
type: "spring",
|
|
20
|
-
stiffness: 420,
|
|
21
|
-
damping: 28
|
|
22
|
-
}, b = "--elastic-slider-stretch-start", x = "--elastic-slider-stretch-end", S = "--elastic-slider-squash", C = "--elastic-slider-shift", w = "--elastic-slider-tilt", T = e({
|
|
23
|
-
"0%": { scale: "1" },
|
|
24
|
-
"45%": { scale: "1.8" },
|
|
25
|
-
"100%": { scale: "1" }
|
|
26
|
-
}), Oe = t(s, { label: "elastic-slider" }), ke = t({ marginInline: p.space[6] }), Ae = t({
|
|
27
|
-
position: "absolute",
|
|
28
|
-
insetInline: 0,
|
|
29
|
-
insetBlock: 0,
|
|
30
|
-
marginBlock: "auto",
|
|
31
|
-
blockSize: p.space[2],
|
|
32
|
-
borderRadius: p.radius.full,
|
|
33
|
-
background: p.color.surfaceInset,
|
|
34
|
-
pointerEvents: "none",
|
|
35
|
-
[i]: {
|
|
36
|
-
forcedColorAdjust: "none",
|
|
37
|
-
background: "Canvas"
|
|
38
|
-
}
|
|
39
|
-
}), je = t({
|
|
40
|
-
position: "absolute",
|
|
41
|
-
insetInlineStart: `calc(-1 * var(${b}, 0px))`,
|
|
42
|
-
insetInlineEnd: `calc(-1 * var(${x}, 0px))`,
|
|
43
|
-
insetBlock: 0,
|
|
44
|
-
marginBlock: "auto",
|
|
45
|
-
blockSize: p.space[2],
|
|
46
|
-
boxSizing: "border-box",
|
|
47
|
-
overflow: "hidden",
|
|
48
|
-
border: `1px solid ${p.color.borderControl}`,
|
|
49
|
-
borderRadius: p.radius.full,
|
|
50
|
-
scale: `1 var(${S}, 1)`,
|
|
51
|
-
pointerEvents: "none",
|
|
52
|
-
[a]: {
|
|
53
|
-
insetInline: 0,
|
|
54
|
-
scale: "none"
|
|
55
|
-
},
|
|
56
|
-
[i]: {
|
|
57
|
-
forcedColorAdjust: "none",
|
|
58
|
-
borderColor: "CanvasText"
|
|
59
|
-
}
|
|
60
|
-
}), Me = t({
|
|
61
|
-
position: "absolute",
|
|
62
|
-
insetBlock: 0,
|
|
63
|
-
insetInlineStart: 0,
|
|
64
|
-
background: p.color.accent,
|
|
65
|
-
[i]: { background: "Highlight" }
|
|
66
|
-
}), Ne = t({
|
|
67
|
-
position: "absolute",
|
|
68
|
-
insetBlock: 0,
|
|
69
|
-
marginBlock: "auto",
|
|
70
|
-
marginInlineStart: `calc(${p.space[1]} / -2)`,
|
|
71
|
-
inlineSize: p.space[1],
|
|
72
|
-
blockSize: p.space[3],
|
|
73
|
-
boxSizing: "border-box",
|
|
74
|
-
border: `1px solid ${p.color.borderControl}`,
|
|
75
|
-
borderRadius: p.radius.full,
|
|
76
|
-
background: p.color.surfaceRaised,
|
|
77
|
-
pointerEvents: "none",
|
|
78
|
-
"&[data-latched]": {
|
|
79
|
-
blockSize: p.space[4],
|
|
80
|
-
background: p.color.accent,
|
|
81
|
-
animation: `${T} ${p.motion.duration.slow} ${p.motion.easeStandard}`
|
|
82
|
-
},
|
|
83
|
-
[a]: { "&[data-latched]": { animation: "none" } },
|
|
84
|
-
[i]: {
|
|
85
|
-
forcedColorAdjust: "none",
|
|
86
|
-
background: "Canvas",
|
|
87
|
-
borderColor: "CanvasText",
|
|
88
|
-
"&[data-latched]": { background: "Highlight" }
|
|
89
|
-
}
|
|
90
|
-
}), Pe = t({
|
|
91
|
-
position: "absolute",
|
|
92
|
-
insetBlock: 0,
|
|
93
|
-
marginBlock: "auto",
|
|
94
|
-
marginInlineStart: `calc(${p.space[8]} / -2)`,
|
|
95
|
-
inlineSize: p.space[8],
|
|
96
|
-
blockSize: p.space[8],
|
|
97
|
-
display: "grid",
|
|
98
|
-
placeItems: "center",
|
|
99
|
-
borderRadius: p.radius.full,
|
|
100
|
-
translate: `var(${C}, 0px)`,
|
|
101
|
-
cursor: "grab",
|
|
102
|
-
"&:focus-visible": {
|
|
103
|
-
...r,
|
|
104
|
-
zIndex: 2
|
|
105
|
-
},
|
|
106
|
-
[a]: { translate: "none" },
|
|
107
|
-
"&[data-dragging]": {
|
|
108
|
-
cursor: "grabbing",
|
|
109
|
-
zIndex: 3
|
|
110
|
-
},
|
|
111
|
-
"&[aria-disabled=\"true\"]": { cursor: "default" }
|
|
112
|
-
}), Fe = t({
|
|
113
|
-
inlineSize: p.space[6],
|
|
114
|
-
blockSize: p.space[6],
|
|
115
|
-
boxSizing: "border-box",
|
|
116
|
-
border: `2px solid ${p.color.borderControl}`,
|
|
117
|
-
borderRadius: p.radius.full,
|
|
118
|
-
background: p.color.surfaceRaised,
|
|
119
|
-
boxShadow: p.shadow.raised,
|
|
120
|
-
pointerEvents: "none",
|
|
121
|
-
[i]: {
|
|
122
|
-
forcedColorAdjust: "none",
|
|
123
|
-
background: "Canvas",
|
|
124
|
-
borderColor: "CanvasText",
|
|
125
|
-
boxShadow: "none"
|
|
126
|
-
}
|
|
127
|
-
}), Ie = t({
|
|
128
|
-
position: "absolute",
|
|
129
|
-
insetBlockEnd: `calc(100% + ${p.space[2]})`,
|
|
130
|
-
paddingInline: p.space[2],
|
|
131
|
-
paddingBlock: p.space[1],
|
|
132
|
-
inlineSize: "max-content",
|
|
133
|
-
maxInlineSize: "min(24rem, 80vw)",
|
|
134
|
-
overflowWrap: "anywhere",
|
|
135
|
-
border: `1px solid ${p.color.borderControl}`,
|
|
136
|
-
borderRadius: p.radius.md,
|
|
137
|
-
background: p.color.surfaceRaised,
|
|
138
|
-
color: p.color.text,
|
|
139
|
-
boxShadow: p.shadow.raised,
|
|
140
|
-
fontSize: p.textSize.xs,
|
|
141
|
-
fontVariantNumeric: "tabular-nums",
|
|
142
|
-
pointerEvents: "none",
|
|
143
|
-
transformOrigin: "bottom center",
|
|
144
|
-
rotate: `var(${w}, 0deg)`,
|
|
145
|
-
opacity: 0,
|
|
146
|
-
transition: `opacity ${p.motion.duration.fast} ${p.motion.easeStandard}`,
|
|
147
|
-
"[data-dragging] > &, [data-slider-thumb]:focus-visible > &": { opacity: 1 },
|
|
148
|
-
[o]: { insetBlockEnd: `calc(100% + ${p.space[4]})` },
|
|
149
|
-
[a]: { rotate: "none" },
|
|
150
|
-
[i]: {
|
|
151
|
-
borderColor: "CanvasText",
|
|
152
|
-
boxShadow: "none"
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
function Le(e) {
|
|
156
|
-
return Math.sign(e) * y * (1 - Math.exp(-Math.abs(e) / y));
|
|
157
|
-
}
|
|
158
|
-
function E(e) {
|
|
159
|
-
let { ref: t, value: r, defaultValue: i, onValueChange: a, onValueCommit: o, label: s, description: p, error: T, invalid: E = !1, disabled: D = !1, min: O = 0, max: k = 100, step: A = 1, largeStep: Re, marks: ze = [], locale: Be, formatOptions: Ve, formatValue: He, showValue: j = !0, start: M, end: N, haptics: Ue = !1, name: P, size: We = "md", slotProps: F, className: Ge, sx: Ke, onKeyDown: qe, "aria-label": Je, "aria-labelledby": Ye, "aria-describedby": Xe, "aria-invalid": Ze, ...Qe } = e, I = ge() ?? !1, L = v(0, Te), R = f(null), z = f(!1), [$e, B] = fe(null), V = (e) => {
|
|
160
|
-
R.current = e, B(e);
|
|
161
|
-
}, et = (e) => {
|
|
162
|
-
if (!Ue || I || e !== "touch") return;
|
|
163
|
-
let t = H.controlRef.current?.ownerDocument.defaultView?.navigator;
|
|
164
|
-
if (typeof t?.vibrate == "function") try {
|
|
165
|
-
t.vibrate(Se);
|
|
166
|
-
} catch {}
|
|
167
|
-
}, H = ee({
|
|
168
|
-
component: "ElasticSlider",
|
|
169
|
-
range: !1,
|
|
170
|
-
value: r,
|
|
171
|
-
defaultValue: i,
|
|
172
|
-
min: O,
|
|
173
|
-
max: k,
|
|
174
|
-
step: A,
|
|
175
|
-
largeStep: Re,
|
|
176
|
-
minStepsBetweenThumbs: 0,
|
|
177
|
-
disabled: D,
|
|
178
|
-
onValueChange: (e) => a?.(e),
|
|
179
|
-
onValueCommit: (e) => o?.(e),
|
|
180
|
-
onPointerSample: ({ raw: e, low: t, high: n, pxPerUnit: r, rtl: i }) => {
|
|
181
|
-
z.current = i, L.set(I ? 0 : Le((e - Math.max(t, Math.min(n, e))) * r));
|
|
182
|
-
},
|
|
183
|
-
resolvePointer: ({ raw: e, pxPerUnit: t, pointerType: n }) => {
|
|
184
|
-
let r = (n) => Math.abs(e - n) * t, i = R.current;
|
|
185
|
-
if (i !== null && r(i) > xe && (i = null), i === null) {
|
|
186
|
-
for (let e of Y) r(e) <= be && (i === null || r(e) < r(i)) && (i = e);
|
|
187
|
-
i !== null && et(n);
|
|
188
|
-
}
|
|
189
|
-
return i !== R.current && V(i), i ?? e;
|
|
190
|
-
},
|
|
191
|
-
onGestureEnd: () => {
|
|
192
|
-
L.set(0), V(null);
|
|
193
|
-
}
|
|
194
|
-
}), { id: U, controlRef: W, current: tt, percent: G } = H, K = tt, { format: q } = oe(Be, Ve, He), J = H.normalizeMarks(ze), Y = J.map((e) => e.value).sort((e, t) => e - t), nt = [
|
|
195
|
-
O,
|
|
196
|
-
k,
|
|
197
|
-
A,
|
|
198
|
-
...Y
|
|
199
|
-
].join(" ");
|
|
200
|
-
d(() => {
|
|
201
|
-
R.current = null, B(null), L.jump(0);
|
|
202
|
-
}, [nt]);
|
|
203
|
-
let rt = he(G(K));
|
|
204
|
-
d(() => rt.set(G(K)), [
|
|
205
|
-
K,
|
|
206
|
-
O,
|
|
207
|
-
k
|
|
208
|
-
]);
|
|
209
|
-
let it = v(_e(ve(rt), (e) => {
|
|
210
|
-
let t = W.current?.matches(":dir(rtl)") ? e : -e;
|
|
211
|
-
return Math.max(-10, Math.min(we, t * Ce));
|
|
212
|
-
}), Ee), X = (e, t) => W.current?.style.setProperty(e, t);
|
|
213
|
-
_(L, "change", (e) => {
|
|
214
|
-
X(b, `${Math.max(0, -e)}px`), X(x, `${Math.max(0, e)}px`), X(S, String(1 - .4 * Math.min(1, Math.abs(e) / y))), X(C, `${z.current ? -e : e}px`);
|
|
215
|
-
}), _(it, "change", (e) => X(w, `${I ? 0 : e}deg`));
|
|
216
|
-
let Z = u(s), at = u(p), Q = u(T), $ = F?.thumb, ot = H.active === 0;
|
|
217
|
-
return /* @__PURE__ */ h(pe, {
|
|
218
|
-
reducedMotion: "user",
|
|
219
|
-
children: /* @__PURE__ */ h(n, {
|
|
220
|
-
className: Ge,
|
|
221
|
-
styles: Oe,
|
|
222
|
-
sx: Ke,
|
|
223
|
-
children: (e) => /* @__PURE__ */ g("div", {
|
|
224
|
-
...Qe,
|
|
225
|
-
ref: t,
|
|
226
|
-
className: e,
|
|
227
|
-
"data-ui": "elastic-slider",
|
|
228
|
-
"data-disabled": D || void 0,
|
|
229
|
-
onKeyDown: (e) => {
|
|
230
|
-
qe?.(e), H.handleRootKeyDown(e);
|
|
231
|
-
},
|
|
232
|
-
children: [
|
|
233
|
-
(Z || j) && /* @__PURE__ */ g("div", {
|
|
234
|
-
css: se,
|
|
235
|
-
children: [Z && /* @__PURE__ */ h("span", {
|
|
236
|
-
...F?.label,
|
|
237
|
-
id: `${U}-label`,
|
|
238
|
-
css: [de, F?.label?.css],
|
|
239
|
-
children: s
|
|
240
|
-
}), j && /* @__PURE__ */ h("span", {
|
|
241
|
-
...F?.readout,
|
|
242
|
-
"aria-hidden": "true",
|
|
243
|
-
"data-ui": "elastic-slider-readout",
|
|
244
|
-
css: [le, F?.readout?.css],
|
|
245
|
-
children: q(K)
|
|
246
|
-
})]
|
|
247
|
-
}),
|
|
248
|
-
at && /* @__PURE__ */ h("div", {
|
|
249
|
-
...F?.description,
|
|
250
|
-
id: `${U}-description`,
|
|
251
|
-
css: [ue, F?.description?.css],
|
|
252
|
-
children: p
|
|
253
|
-
}),
|
|
254
|
-
Q && /* @__PURE__ */ h("div", {
|
|
255
|
-
...F?.error,
|
|
256
|
-
id: `${U}-error`,
|
|
257
|
-
role: "alert",
|
|
258
|
-
css: [te, F?.error?.css],
|
|
259
|
-
children: T
|
|
260
|
-
}),
|
|
261
|
-
/* @__PURE__ */ g("div", {
|
|
262
|
-
css: ae,
|
|
263
|
-
children: [
|
|
264
|
-
u(M) && /* @__PURE__ */ h("div", {
|
|
265
|
-
...F?.start,
|
|
266
|
-
children: M
|
|
267
|
-
}),
|
|
268
|
-
/* @__PURE__ */ g("div", {
|
|
269
|
-
...F?.control,
|
|
270
|
-
...H.controlHandlers(F?.control),
|
|
271
|
-
css: [
|
|
272
|
-
ce,
|
|
273
|
-
ke,
|
|
274
|
-
ie[We],
|
|
275
|
-
F?.control?.css
|
|
276
|
-
],
|
|
277
|
-
"data-ui": "elastic-slider-control",
|
|
278
|
-
"data-disabled": D || void 0,
|
|
279
|
-
children: [
|
|
280
|
-
/* @__PURE__ */ h("div", {
|
|
281
|
-
...F?.rail,
|
|
282
|
-
"data-ui": "elastic-slider-rail",
|
|
283
|
-
"aria-hidden": "true",
|
|
284
|
-
css: [Ae, F?.rail?.css]
|
|
285
|
-
}),
|
|
286
|
-
/* @__PURE__ */ h("div", {
|
|
287
|
-
...F?.track,
|
|
288
|
-
"data-ui": "elastic-slider-track",
|
|
289
|
-
"aria-hidden": "true",
|
|
290
|
-
css: [je, F?.track?.css],
|
|
291
|
-
children: /* @__PURE__ */ h("div", {
|
|
292
|
-
...F?.fill,
|
|
293
|
-
"data-ui": "elastic-slider-fill",
|
|
294
|
-
css: [Me, F?.fill?.css],
|
|
295
|
-
style: {
|
|
296
|
-
...F?.fill?.style,
|
|
297
|
-
inlineSize: `${G(K)}%`
|
|
298
|
-
}
|
|
299
|
-
})
|
|
300
|
-
}),
|
|
301
|
-
J.map((e, t) => {
|
|
302
|
-
let n = c(F?.tick, t);
|
|
303
|
-
return /* @__PURE__ */ m("span", {
|
|
304
|
-
...n,
|
|
305
|
-
key: e.value,
|
|
306
|
-
"data-ui": "elastic-slider-tick",
|
|
307
|
-
"data-latched": $e === e.value || void 0,
|
|
308
|
-
"aria-hidden": "true",
|
|
309
|
-
css: [Ne, n?.css],
|
|
310
|
-
style: {
|
|
311
|
-
...n?.style,
|
|
312
|
-
insetInlineStart: `${G(e.value)}%`
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
}),
|
|
316
|
-
/* @__PURE__ */ g("div", {
|
|
317
|
-
...$,
|
|
318
|
-
id: `${U}-thumb`,
|
|
319
|
-
"data-slider-thumb": 0,
|
|
320
|
-
"data-dragging": ot || void 0,
|
|
321
|
-
role: "slider",
|
|
322
|
-
tabIndex: D ? -1 : 0,
|
|
323
|
-
"aria-orientation": "horizontal",
|
|
324
|
-
"aria-disabled": D,
|
|
325
|
-
"aria-invalid": Q || E ? !0 : $?.["aria-invalid"] ?? Ze,
|
|
326
|
-
"aria-valuemin": O,
|
|
327
|
-
"aria-valuemax": k,
|
|
328
|
-
"aria-valuenow": K,
|
|
329
|
-
"aria-valuetext": q(K),
|
|
330
|
-
"aria-label": $?.["aria-label"] ?? Je,
|
|
331
|
-
"aria-labelledby": l(Ye, $?.["aria-labelledby"], Z && `${U}-label`),
|
|
332
|
-
"aria-describedby": l(Xe, $?.["aria-describedby"], at && `${U}-description`, Q && `${U}-error`),
|
|
333
|
-
css: [Pe, $?.css],
|
|
334
|
-
style: {
|
|
335
|
-
...$?.style,
|
|
336
|
-
insetInlineStart: `${G(K)}%`
|
|
337
|
-
},
|
|
338
|
-
children: [/* @__PURE__ */ h(me.span, {
|
|
339
|
-
"aria-hidden": "true",
|
|
340
|
-
"data-ui": "elastic-slider-thumb-visual",
|
|
341
|
-
css: Fe,
|
|
342
|
-
animate: { scale: !I && ot ? ye : 1 },
|
|
343
|
-
transition: I ? { duration: 0 } : De
|
|
344
|
-
}), /* @__PURE__ */ h("span", {
|
|
345
|
-
...F?.bubble,
|
|
346
|
-
"data-ui": "elastic-slider-bubble",
|
|
347
|
-
"aria-hidden": "true",
|
|
348
|
-
css: [Ie, F?.bubble?.css],
|
|
349
|
-
style: {
|
|
350
|
-
...F?.bubble?.style,
|
|
351
|
-
...G(K) <= 50 ? { insetInlineStart: 0 } : { insetInlineEnd: 0 }
|
|
352
|
-
},
|
|
353
|
-
children: q(K)
|
|
354
|
-
})]
|
|
355
|
-
})
|
|
356
|
-
]
|
|
357
|
-
}),
|
|
358
|
-
u(N) && /* @__PURE__ */ h("div", {
|
|
359
|
-
...F?.end,
|
|
360
|
-
children: N
|
|
361
|
-
})
|
|
362
|
-
]
|
|
363
|
-
}),
|
|
364
|
-
J.some((e) => u(e.label)) && /* @__PURE__ */ h("div", {
|
|
365
|
-
css: re,
|
|
366
|
-
children: J.map((e, t) => {
|
|
367
|
-
if (!u(e.label)) return null;
|
|
368
|
-
let n = c(F?.mark, t);
|
|
369
|
-
return /* @__PURE__ */ m("button", {
|
|
370
|
-
...n,
|
|
371
|
-
key: e.value,
|
|
372
|
-
type: "button",
|
|
373
|
-
disabled: D,
|
|
374
|
-
"data-ui": "elastic-slider-mark",
|
|
375
|
-
css: [ne, n?.css],
|
|
376
|
-
onClick: (t) => {
|
|
377
|
-
n?.onClick?.(t), t.defaultPrevented || H.selectMark(e.value);
|
|
378
|
-
}
|
|
379
|
-
}, e.label);
|
|
380
|
-
})
|
|
381
|
-
}),
|
|
382
|
-
P !== void 0 && /* @__PURE__ */ h("input", {
|
|
383
|
-
type: "hidden",
|
|
384
|
-
disabled: D,
|
|
385
|
-
name: P,
|
|
386
|
-
value: K
|
|
387
|
-
})
|
|
388
|
-
]
|
|
389
|
-
})
|
|
390
|
-
})
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
E.displayName = "ElasticSlider";
|
|
394
|
-
//#endregion
|
|
395
|
-
export { E as t };
|
package/dist/elastic-slider.js
DELETED
package/dist/slider-DVG6-Awh.js
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
5
|
-
import { t as ee } from "./visually-hidden-BJdvqqvn.js";
|
|
6
|
-
import { a as te, c as a, d as o, f as ne, g as s, h as re, i as ie, l as ae, m as c, n as l, o as oe, p as se, r as u, s as ce, t as d, u as le } from "./use-slider-interaction-ChL-208h.js";
|
|
7
|
-
import { useState as ue } from "react";
|
|
8
|
-
import { vars as f } from "@jfrader/tokens/vars";
|
|
9
|
-
import { createElement as p } from "@emotion/react";
|
|
10
|
-
import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
|
|
11
|
-
import { MotionConfig as g, motion as _, useReducedMotion as de } from "motion/react";
|
|
12
|
-
//#region src/components/slider/slider.tsx
|
|
13
|
-
var fe = {
|
|
14
|
-
type: "spring",
|
|
15
|
-
stiffness: 420,
|
|
16
|
-
damping: 30
|
|
17
|
-
}, pe = 8, me = e(c, { label: "slider" }), he = e({
|
|
18
|
-
position: "absolute",
|
|
19
|
-
insetInline: 0,
|
|
20
|
-
insetBlockStart: "50%",
|
|
21
|
-
transform: "translateY(-50%)",
|
|
22
|
-
blockSize: f.space[1],
|
|
23
|
-
boxSizing: "border-box",
|
|
24
|
-
border: `1px solid ${f.color.borderControl}`,
|
|
25
|
-
borderRadius: f.radius.full,
|
|
26
|
-
background: f.color.surfaceInset,
|
|
27
|
-
pointerEvents: "none",
|
|
28
|
-
[r]: {
|
|
29
|
-
forcedColorAdjust: "none",
|
|
30
|
-
background: "Canvas",
|
|
31
|
-
borderColor: "CanvasText"
|
|
32
|
-
}
|
|
33
|
-
}), ge = e({
|
|
34
|
-
position: "absolute",
|
|
35
|
-
insetBlock: 0,
|
|
36
|
-
background: f.color.accent,
|
|
37
|
-
borderRadius: f.radius.full,
|
|
38
|
-
[r]: { background: "Highlight" }
|
|
39
|
-
}), _e = e({
|
|
40
|
-
position: "absolute",
|
|
41
|
-
insetBlockStart: "50%",
|
|
42
|
-
transform: "translate(-50%, -50%)",
|
|
43
|
-
"&:dir(rtl)": { transform: "translate(50%, -50%)" },
|
|
44
|
-
inlineSize: f.space[8],
|
|
45
|
-
blockSize: f.space[8],
|
|
46
|
-
display: "grid",
|
|
47
|
-
placeItems: "center",
|
|
48
|
-
borderRadius: f.radius.full,
|
|
49
|
-
cursor: "grab",
|
|
50
|
-
"&:focus-visible": {
|
|
51
|
-
...n,
|
|
52
|
-
zIndex: 2
|
|
53
|
-
},
|
|
54
|
-
"&[data-dragging]": {
|
|
55
|
-
cursor: "grabbing",
|
|
56
|
-
zIndex: 3
|
|
57
|
-
},
|
|
58
|
-
"&[aria-disabled=\"true\"]": { cursor: "default" }
|
|
59
|
-
}), ve = e({
|
|
60
|
-
inlineSize: f.space[6],
|
|
61
|
-
blockSize: f.space[6],
|
|
62
|
-
boxSizing: "border-box",
|
|
63
|
-
border: `2px solid ${f.color.borderControl}`,
|
|
64
|
-
borderRadius: f.radius.full,
|
|
65
|
-
background: f.color.surfaceRaised,
|
|
66
|
-
boxShadow: f.shadow.raised,
|
|
67
|
-
pointerEvents: "none",
|
|
68
|
-
[r]: {
|
|
69
|
-
forcedColorAdjust: "none",
|
|
70
|
-
background: "Canvas",
|
|
71
|
-
borderColor: "CanvasText",
|
|
72
|
-
boxShadow: "none"
|
|
73
|
-
}
|
|
74
|
-
}), ye = e({
|
|
75
|
-
position: "absolute",
|
|
76
|
-
insetBlockEnd: `calc(100% + ${f.space[2]})`,
|
|
77
|
-
paddingInline: f.space[2],
|
|
78
|
-
paddingBlock: f.space[1],
|
|
79
|
-
inlineSize: "max-content",
|
|
80
|
-
maxInlineSize: "min(24rem, 80vw)",
|
|
81
|
-
overflowWrap: "anywhere",
|
|
82
|
-
border: `1px solid ${f.color.borderControl}`,
|
|
83
|
-
borderRadius: f.radius.md,
|
|
84
|
-
background: f.color.surfaceRaised,
|
|
85
|
-
color: f.color.text,
|
|
86
|
-
boxShadow: f.shadow.raised,
|
|
87
|
-
pointerEvents: "none",
|
|
88
|
-
fontSize: f.textSize.xs,
|
|
89
|
-
opacity: 0,
|
|
90
|
-
transition: `opacity ${f.motion.duration.fast} ${f.motion.easeStandard}`,
|
|
91
|
-
"[data-dragging] > &, [data-slider-thumb]:focus-visible > &": { opacity: 1 },
|
|
92
|
-
[i]: { transitionDuration: "0s" },
|
|
93
|
-
[r]: {
|
|
94
|
-
borderColor: "CanvasText",
|
|
95
|
-
boxShadow: "none"
|
|
96
|
-
}
|
|
97
|
-
}), be = e({
|
|
98
|
-
position: "absolute",
|
|
99
|
-
insetBlockStart: "50%",
|
|
100
|
-
transform: "translate(-50%, -50%)",
|
|
101
|
-
inlineSize: f.space[1],
|
|
102
|
-
blockSize: f.space[2],
|
|
103
|
-
border: `1px solid ${f.color.borderControl}`,
|
|
104
|
-
background: f.color.surfaceRaised,
|
|
105
|
-
boxSizing: "border-box",
|
|
106
|
-
pointerEvents: "none",
|
|
107
|
-
[r]: {
|
|
108
|
-
background: "Canvas",
|
|
109
|
-
borderColor: "CanvasText"
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
function v(e) {
|
|
113
|
-
let { ref: n, type: r = "single", value: i, defaultValue: c, label: f, description: v, error: y, invalid: b = !1, disabled: x = !1, min: S = 0, max: C = 100, step: w = 1, largeStep: T, minStepsBetweenThumbs: E = 0, marks: D = [], thumbLabels: O, locale: k, formatOptions: A, formatValue: j, showValue: M = !0, start: N, end: P, name: F, size: I = "md", slotProps: L, onValueChange: xe, onValueCommit: Se, className: Ce, sx: we, onKeyDown: Te, "aria-label": Ee, "aria-labelledby": De, "aria-describedby": Oe, "aria-invalid": ke, ...Ae } = e, R = r === "range", z = de(), [je, B] = ue(0), V = te({
|
|
114
|
-
component: "Slider",
|
|
115
|
-
range: R,
|
|
116
|
-
value: i,
|
|
117
|
-
defaultValue: c,
|
|
118
|
-
min: S,
|
|
119
|
-
max: C,
|
|
120
|
-
step: w,
|
|
121
|
-
largeStep: T,
|
|
122
|
-
minStepsBetweenThumbs: E,
|
|
123
|
-
disabled: x,
|
|
124
|
-
onValueChange: (t) => {
|
|
125
|
-
e.type, e.onValueChange?.(t);
|
|
126
|
-
},
|
|
127
|
-
onValueCommit: (t) => {
|
|
128
|
-
e.type, e.onValueCommit?.(t);
|
|
129
|
-
},
|
|
130
|
-
onPointerSample: ({ raw: e, low: t, high: n, rtl: r }) => B(z ? 0 : Math.max(-8, Math.min(pe, (e - Math.max(t, Math.min(n, e))) * (r ? -1 : 1)))),
|
|
131
|
-
onGestureEnd: () => B(0)
|
|
132
|
-
}), { id: H, current: U, values: W, active: G, bounds: Me, percent: K } = V, { formatter: q, format: J } = ie(k, A, j), Ne = typeof U == "number" ? J(U) : !j && "formatRange" in q ? q.formatRange(U[0], U[1]) : `${J(U[0])} – ${J(U[1])}`, Y = V.normalizeMarks(D), X = R ? K(W[0]) : 0, Pe = K(W[+!!R]), Z = d(f), Q = d(v), $ = d(y);
|
|
133
|
-
return /* @__PURE__ */ m(g, {
|
|
134
|
-
reducedMotion: "user",
|
|
135
|
-
children: /* @__PURE__ */ m(t, {
|
|
136
|
-
className: Ce,
|
|
137
|
-
styles: me,
|
|
138
|
-
sx: we,
|
|
139
|
-
children: (e) => /* @__PURE__ */ h("div", {
|
|
140
|
-
...Ae,
|
|
141
|
-
ref: n,
|
|
142
|
-
className: e,
|
|
143
|
-
"data-ui": "slider",
|
|
144
|
-
"data-disabled": x || void 0,
|
|
145
|
-
onKeyDown: (e) => {
|
|
146
|
-
Te?.(e), V.handleRootKeyDown(e);
|
|
147
|
-
},
|
|
148
|
-
children: [
|
|
149
|
-
(Z || M) && /* @__PURE__ */ h("div", {
|
|
150
|
-
css: ae,
|
|
151
|
-
children: [Z && /* @__PURE__ */ m("span", {
|
|
152
|
-
...L?.label,
|
|
153
|
-
id: `${H}-label`,
|
|
154
|
-
css: [le, L?.label?.css],
|
|
155
|
-
children: f
|
|
156
|
-
}), M && /* @__PURE__ */ m("span", {
|
|
157
|
-
...L?.readout,
|
|
158
|
-
"aria-hidden": "true",
|
|
159
|
-
css: [se, L?.readout?.css],
|
|
160
|
-
children: Ne
|
|
161
|
-
})]
|
|
162
|
-
}),
|
|
163
|
-
Q && /* @__PURE__ */ m("div", {
|
|
164
|
-
...L?.description,
|
|
165
|
-
id: `${H}-description`,
|
|
166
|
-
css: [ce, L?.description?.css],
|
|
167
|
-
children: v
|
|
168
|
-
}),
|
|
169
|
-
$ && /* @__PURE__ */ m("div", {
|
|
170
|
-
...L?.error,
|
|
171
|
-
id: `${H}-error`,
|
|
172
|
-
role: "alert",
|
|
173
|
-
css: [a, L?.error?.css],
|
|
174
|
-
children: y
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ h("div", {
|
|
177
|
-
css: re,
|
|
178
|
-
children: [
|
|
179
|
-
d(N) && /* @__PURE__ */ m("div", {
|
|
180
|
-
...L?.start,
|
|
181
|
-
children: N
|
|
182
|
-
}),
|
|
183
|
-
/* @__PURE__ */ h("div", {
|
|
184
|
-
...L?.control,
|
|
185
|
-
...V.controlHandlers(L?.control),
|
|
186
|
-
css: [
|
|
187
|
-
oe,
|
|
188
|
-
s[I],
|
|
189
|
-
L?.control?.css
|
|
190
|
-
],
|
|
191
|
-
"data-ui": "slider-control",
|
|
192
|
-
"data-disabled": x || void 0,
|
|
193
|
-
children: [
|
|
194
|
-
/* @__PURE__ */ m("div", {
|
|
195
|
-
...L?.track,
|
|
196
|
-
"data-ui": "slider-track",
|
|
197
|
-
"aria-hidden": "true",
|
|
198
|
-
css: [he, L?.track?.css],
|
|
199
|
-
children: /* @__PURE__ */ m("div", {
|
|
200
|
-
...L?.fill,
|
|
201
|
-
"data-ui": "slider-fill",
|
|
202
|
-
css: [ge, L?.fill?.css],
|
|
203
|
-
style: {
|
|
204
|
-
...L?.fill?.style,
|
|
205
|
-
insetInlineStart: `${X}%`,
|
|
206
|
-
inlineSize: `${Pe - X}%`
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
}),
|
|
210
|
-
Y.map((e, t) => /* @__PURE__ */ m("span", {
|
|
211
|
-
"aria-hidden": "true",
|
|
212
|
-
css: be,
|
|
213
|
-
style: { insetInlineStart: `${K(e.value)}%` }
|
|
214
|
-
}, t)),
|
|
215
|
-
W.map((e, t) => {
|
|
216
|
-
let n = l(L?.thumb, t), [r, i] = Me(t);
|
|
217
|
-
return /* @__PURE__ */ p("div", {
|
|
218
|
-
...n,
|
|
219
|
-
key: t,
|
|
220
|
-
id: `${H}-thumb-${t}`,
|
|
221
|
-
"data-slider-thumb": t,
|
|
222
|
-
"data-dragging": G === t || void 0,
|
|
223
|
-
role: "slider",
|
|
224
|
-
tabIndex: x ? -1 : 0,
|
|
225
|
-
"aria-orientation": "horizontal",
|
|
226
|
-
"aria-disabled": x,
|
|
227
|
-
"aria-invalid": $ || b ? !0 : n?.["aria-invalid"] ?? ke,
|
|
228
|
-
"aria-valuemin": r,
|
|
229
|
-
"aria-valuemax": i,
|
|
230
|
-
"aria-valuenow": e,
|
|
231
|
-
"aria-valuetext": J(e),
|
|
232
|
-
"aria-label": n?.["aria-label"] ?? (R ? O?.[t] : Ee),
|
|
233
|
-
"aria-labelledby": u(De, n?.["aria-labelledby"], R ? `${H}-name-${t}` : Z && `${H}-label`),
|
|
234
|
-
"aria-describedby": u(Oe, n?.["aria-describedby"], Q && `${H}-description`, $ && `${H}-error`),
|
|
235
|
-
css: [_e, n?.css],
|
|
236
|
-
style: {
|
|
237
|
-
...n?.style,
|
|
238
|
-
insetInlineStart: `${K(e)}%`
|
|
239
|
-
},
|
|
240
|
-
onFocus: (e) => {
|
|
241
|
-
V.noteFocus(t), n?.onFocus?.(e);
|
|
242
|
-
},
|
|
243
|
-
onKeyDown: (e) => {
|
|
244
|
-
n?.onKeyDown?.(e);
|
|
245
|
-
}
|
|
246
|
-
}, /* @__PURE__ */ m(_.span, {
|
|
247
|
-
"aria-hidden": "true",
|
|
248
|
-
css: ve,
|
|
249
|
-
animate: {
|
|
250
|
-
scale: z ? 1 : G === t ? .95 : 1,
|
|
251
|
-
x: z ? 0 : G === t ? je : 0
|
|
252
|
-
},
|
|
253
|
-
transition: z ? { duration: 0 } : fe
|
|
254
|
-
}), R && /* @__PURE__ */ m("span", {
|
|
255
|
-
id: `${H}-name-${t}`,
|
|
256
|
-
css: ee,
|
|
257
|
-
children: O?.[t]
|
|
258
|
-
}), /* @__PURE__ */ m("span", {
|
|
259
|
-
...L?.bubble,
|
|
260
|
-
"data-ui": "slider-bubble",
|
|
261
|
-
"aria-hidden": "true",
|
|
262
|
-
css: [ye, L?.bubble?.css],
|
|
263
|
-
style: {
|
|
264
|
-
...L?.bubble?.style,
|
|
265
|
-
...K(e) <= 50 ? { insetInlineStart: 0 } : { insetInlineEnd: 0 }
|
|
266
|
-
},
|
|
267
|
-
children: J(e)
|
|
268
|
-
}));
|
|
269
|
-
})
|
|
270
|
-
]
|
|
271
|
-
}),
|
|
272
|
-
d(P) && /* @__PURE__ */ m("div", {
|
|
273
|
-
...L?.end,
|
|
274
|
-
children: P
|
|
275
|
-
})
|
|
276
|
-
]
|
|
277
|
-
}),
|
|
278
|
-
Y.some((e) => d(e.label)) && /* @__PURE__ */ m("div", {
|
|
279
|
-
css: ne,
|
|
280
|
-
children: Y.map((e, t) => {
|
|
281
|
-
if (!d(e.label)) return null;
|
|
282
|
-
let n = l(L?.mark, t);
|
|
283
|
-
return /* @__PURE__ */ p("button", {
|
|
284
|
-
...n,
|
|
285
|
-
key: t,
|
|
286
|
-
type: "button",
|
|
287
|
-
disabled: x,
|
|
288
|
-
css: [o, n?.css],
|
|
289
|
-
onClick: (t) => {
|
|
290
|
-
n?.onClick?.(t), t.defaultPrevented || V.selectMark(e.value);
|
|
291
|
-
}
|
|
292
|
-
}, e.label);
|
|
293
|
-
})
|
|
294
|
-
}),
|
|
295
|
-
F !== void 0 && W.map((e, t) => /* @__PURE__ */ m("input", {
|
|
296
|
-
type: "hidden",
|
|
297
|
-
disabled: x,
|
|
298
|
-
name: typeof F == "string" ? F : F[t],
|
|
299
|
-
value: e
|
|
300
|
-
}, t))
|
|
301
|
-
]
|
|
302
|
-
})
|
|
303
|
-
})
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
v.displayName = "Slider";
|
|
307
|
-
//#endregion
|
|
308
|
-
export { v as t };
|