@jfrader/ui 0.5.0 → 0.6.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 +18 -1
- package/dist/accordion-D6myONB9.js +206 -0
- 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-B58xempt.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/avatar-B6idYC59.js +146 -0
- package/dist/{avatar-group-DOQQuV51.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge-CfhTcA-Z.js +120 -0
- 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-DPJBFkie.js → bottom-sheet-BFQKO0Wo.js} +287 -268
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-CG3akw-b.js} +28 -20
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-C92uYFJW.js → button-C6OV0C7J.js} +21 -20
- 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-lTH4Foke.js +475 -0
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DVa17BRC.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-cFquiSdy.js → checkbox-CClE61GV.js} +23 -21
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DTQd_M-G.js → chip-group-BZUX9KPF.js} +19 -17
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-ahnRi-g8.js → code-block-CYP89_6h.js} +99 -97
- package/dist/code-block.js +1 -1
- package/dist/{combobox-Bhzvu9ma.js → combobox-D2Oc-co7.js} +131 -125
- 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-BnUHxviq.js +772 -0
- package/dist/comment-thread.js +2 -0
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/context-menu-I4i0LRpm.js +371 -0
- package/dist/context-menu.js +2 -0
- package/dist/{copy-button-ByiA6D3R.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-5zKSSuFF.js → date-picker-D-bn-iHs.js} +15 -14
- 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-DYoJf0I_.js → divider-zOJzkcHh.js} +23 -21
- package/dist/divider.js +1 -1
- package/dist/drawer-CceaEhCr.js +590 -0
- package/dist/drawer.js +1 -1
- package/dist/{empty-state-CDgrjPPf.js → empty-state-DO0ApylK.js} +2 -1
- package/dist/empty-state.js +1 -1
- package/dist/{expandable-card-C-qJcZ14.js → expandable-card-W97vjix9.js} +59 -51
- package/dist/expandable-card.js +1 -1
- package/dist/expanding-search-Bb2_YfNx.js +239 -0
- package/dist/expanding-search.js +2 -0
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/file-dropzone-Bi5ikRIz.js +458 -0
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-QRnC4S_H.js} +36 -33
- 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/{hold-to-confirm-DjB2EVjM.js → hold-to-confirm-CVBA0wNT.js} +18 -17
- package/dist/hold-to-confirm.js +1 -1
- package/dist/{hover-card-B-nrCIy2.js → hover-card-DN1EAlQA.js} +26 -25
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-ciuhPtQZ.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/index.js +98 -78
- 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-BcySQfjZ.js → json-viewer-Dro3WrjS.js} +34 -29
- 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-CZF7XNYG.js +295 -0
- package/dist/locale-switcher.js +2 -0
- package/dist/mention-input-BjjAbJCf.js +600 -0
- package/dist/mention-input.js +1 -1
- package/dist/menu-CVzpsyXn.js +312 -0
- package/dist/menu.js +1 -1
- package/dist/{metric-card-Bh9K4fZs.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-Pce_IYnz.js → multi-select-B3puEVo0.js} +78 -69
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-sP5fiuQS.js → navigation-C_JD43gA.js} +56 -49
- 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-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
- package/dist/overlay-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-DmXZ8E85.js → pagination-Dkh4bJQh.js} +31 -29
- 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-Dd7pog19.js +59 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CUMOcMtj.js +126 -0
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-CbOWBUdA.js → progress-Bcuz3Ob4.js} +12 -11
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-D2QZENI_.js → radio-cards-FkAhESb5.js} +65 -63
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-E6mMRgo7.js → radio-group-DItMf2YM.js} +32 -28
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-61h9hA3B.js} +16 -14
- 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-IxF0IJXm.js → search-field-CbsajaZb.js} +94 -93
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-yO1K1nbi.js → segmented-control-DCh-4ca-.js} +28 -26
- package/dist/segmented-control.js +1 -1
- package/dist/{select-n_H52W1Z.js → select-SrcQqZjo.js} +29 -27
- 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-khL2yhQI.js +646 -0
- 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-tirqlLY2.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-Cb3EHs64.js → split-button-Bu41f2AY.js} +88 -93
- 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-DiZC57-3.js → swipe-actions-1H5UOZKE.js} +29 -26
- package/dist/swipe-actions.js +1 -1
- package/dist/switch-79-hkQqg.js +146 -0
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/tabs-Bb5-noYE.js +211 -0
- 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-C8TWG-tY.js → text-field-D0VP7b4P.js} +18 -16
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BrW0XcG_.js → textarea-D1YwEPmn.js} +21 -19
- 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-CP42mVDb.js +167 -0
- package/dist/theme-switch.js +2 -0
- package/dist/thread-parts-DfZNz70v.js +683 -0
- package/dist/{time-picker-Db8D49cP.js → time-picker-Tnd-JBLC.js} +39 -32
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-k3nURuCP.js → timeline-DaldDMX7.js} +28 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-BHxI32ZA.js → toast-CSAbl5yK.js} +107 -87
- package/dist/{toast-stack-DqrAzdg5.js → toast-stack-BCR4Cu7V.js} +25 -10
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-fcjzpifI.js → toggle-group-C7ye1v4s.js} +24 -23
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-IajLwdUb.js +129 -0
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-C2liIxqy.js → tree-view-CoW4oJIZ.js} +18 -13
- 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 +115 -0
- package/dist/types/components/activity-rings/index.d.ts +2 -0
- 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-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 +4 -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/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
- package/dist/types/components/comment-thread/index.d.ts +1 -0
- package/dist/types/components/context-menu/context-menu.d.ts +55 -0
- package/dist/types/components/context-menu/index.d.ts +2 -0
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
- package/dist/types/components/expanding-search/index.d.ts +1 -0
- 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 +94 -0
- package/dist/types/components/locale-switcher/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +58 -0
- package/dist/types/components/menu/menu.d.ts +74 -7
- package/dist/types/components/next/emotion-registry.d.ts +16 -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/pagination/pagination.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/radio-cards/radio-cards.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.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 +78 -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/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +2 -10
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/split-button/split-button.d.ts +2 -2
- 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/tabs/tabs.d.ts +1 -1
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/theme-root/index.d.ts +1 -0
- package/dist/types/components/theme-root/theme-root.d.ts +9 -1
- package/dist/types/components/theme-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/thread/thread-core.d.ts +96 -0
- package/dist/types/components/thread/thread-parts.d.ts +119 -0
- package/dist/types/components/tooltip/tooltip.d.ts +9 -2
- package/dist/types/components/usage-meter/usage-meter.d.ts +2 -12
- 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 +119 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/overlay/exit-motion.d.ts +24 -0
- package/dist/types/overlay/overlay-layer.d.ts +20 -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/overlay/use-overlay-floating.d.ts +9 -2
- package/dist/types/styling/create-theme.d.ts +24 -0
- package/dist/types/styling/css.d.ts +1 -1
- package/dist/types/styling/overlay-motion.d.ts +95 -0
- package/dist/types/styling/surface.d.ts +7 -0
- package/dist/types/styling/theme-scope.d.ts +29 -3
- package/dist/types/styling/theme.d.ts +5 -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-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
- package/dist/use-scroll-lock-40gXwwAy.js +23 -0
- package/dist/user-menu-DzELTg1x.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 +88 -2
- package/dist/accordion-xCI_u0BV.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/calendar-B3Svu0X2.js +0 -447
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/carousel-IvPqN-oM.js +0 -472
- package/dist/command-palette-BQ5LleGb.js +0 -384
- package/dist/date-range-picker-B5uFWsm-.js +0 -562
- package/dist/dialog-ciiv9H2b.js +0 -218
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/file-dropzone-pR4v7owg.js +0 -457
- package/dist/mention-input-BcQKX2EJ.js +0 -599
- package/dist/menu-xwOOUtWP.js +0 -275
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-QHcEvf9c.js +0 -119
- package/dist/signature-pad-q2SAsrdD.js +0 -640
- package/dist/slider-t0B5cecO.js +0 -477
- package/dist/switch-qwv8jQnR.js +0 -142
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/tabs-CAVJndX1.js +0 -203
- package/dist/theme-root-BbTBuLMQ.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/tooltip-CkeiW9C1.js +0 -113
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as SortableDataTable } from "./sortable-data-table-
|
|
2
|
+
export { t as SortableDataTable } from "./sortable-data-table-Bpitup_d.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { r as t } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as n } from "./sx-BJXJ2xJK.js";
|
|
5
|
+
import { t as r } from "./visually-hidden-DgVO3NaB.js";
|
|
6
|
+
import { n as i, t as a } from "./loading-ring-D0lGrK8z.js";
|
|
6
7
|
import { vars as o } from "@jfrader/tokens/vars";
|
|
7
8
|
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
8
9
|
//#region src/components/spinner/spinner.tsx
|
|
@@ -14,7 +15,7 @@ var l = e({
|
|
|
14
15
|
...a,
|
|
15
16
|
flexShrink: 0,
|
|
16
17
|
boxSizing: "border-box",
|
|
17
|
-
[
|
|
18
|
+
[t]: { animation: `${i} 1.6s ease-in-out infinite alternate` }
|
|
18
19
|
}), d = {
|
|
19
20
|
sm: e({
|
|
20
21
|
inlineSize: o.space[4],
|
|
@@ -29,21 +30,21 @@ var l = e({
|
|
|
29
30
|
blockSize: o.space[6]
|
|
30
31
|
})
|
|
31
32
|
};
|
|
32
|
-
function f({ ref: e, size:
|
|
33
|
-
return /* @__PURE__ */ s(
|
|
33
|
+
function f({ ref: e, size: t = "md", label: i = "Loading", className: a, sx: o, ...f }) {
|
|
34
|
+
return /* @__PURE__ */ s(n, {
|
|
34
35
|
className: a,
|
|
35
36
|
styles: l,
|
|
36
37
|
sx: o,
|
|
37
|
-
children: (
|
|
38
|
+
children: (n) => /* @__PURE__ */ c("span", {
|
|
38
39
|
...f,
|
|
39
40
|
ref: e,
|
|
40
41
|
role: "status",
|
|
41
42
|
"data-ui": "spinner",
|
|
42
|
-
className:
|
|
43
|
+
className: n,
|
|
43
44
|
children: [/* @__PURE__ */ s("span", {
|
|
44
45
|
"aria-hidden": "true",
|
|
45
46
|
"data-ui": "spinner-indicator",
|
|
46
|
-
css: [u, d[
|
|
47
|
+
css: [u, d[t]]
|
|
47
48
|
}), /* @__PURE__ */ s("span", {
|
|
48
49
|
css: r,
|
|
49
50
|
children: i
|
package/dist/spinner.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Spinner } from "./spinner-
|
|
2
|
+
export { t as Spinner } from "./spinner-CvzajSg9.js";
|
|
@@ -1,113 +1,108 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n
|
|
2
|
+
import { a as e, i as t } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n, r } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as i } from "./sx-BJXJ2xJK.js";
|
|
4
5
|
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
5
6
|
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
6
|
-
import { t as s } from "./button-
|
|
7
|
-
import { s as c } from "./listbox-style-
|
|
8
|
-
import { a as l,
|
|
9
|
-
import { createContext as
|
|
10
|
-
import { vars as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { useMergeRefs as
|
|
7
|
+
import { t as s } from "./button-C6OV0C7J.js";
|
|
8
|
+
import { s as c } from "./listbox-style-DNOxAulu.js";
|
|
9
|
+
import { a as l, d as u, f as d, o as f, r as p, s as m, t as h, u as g } from "./menu-CVzpsyXn.js";
|
|
10
|
+
import { createContext as _, useContext as v, useEffect as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
11
|
+
import { vars as w } from "@jfrader/tokens/vars";
|
|
12
|
+
import { jsx as T, jsxs as E } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { useMergeRefs as D } from "@floating-ui/react";
|
|
13
14
|
//#region src/components/split-button/split-button.tsx
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let t =
|
|
17
|
-
if (!t) throw Error(`${
|
|
15
|
+
var O = "SplitButton", k = _(null);
|
|
16
|
+
function A(e) {
|
|
17
|
+
let t = v(k);
|
|
18
|
+
if (!t) throw Error(`${O}.${e} must be rendered inside <${O}>.`);
|
|
18
19
|
return t;
|
|
19
20
|
}
|
|
20
|
-
var
|
|
21
|
+
var j = {
|
|
21
22
|
solid: "soft",
|
|
22
23
|
soft: "soft",
|
|
23
24
|
outline: "outline",
|
|
24
25
|
ghost: "ghost"
|
|
25
|
-
},
|
|
26
|
+
}, M = {
|
|
26
27
|
sm: "32px",
|
|
27
28
|
md: "40px",
|
|
28
29
|
lg: "48px"
|
|
29
|
-
},
|
|
30
|
+
}, N = t({
|
|
30
31
|
label: "split-button",
|
|
31
32
|
display: "inline-flex",
|
|
32
33
|
alignItems: "stretch",
|
|
33
34
|
maxInlineSize: "100%",
|
|
34
35
|
verticalAlign: "middle",
|
|
35
36
|
isolation: "isolate"
|
|
36
|
-
}),
|
|
37
|
+
}), P = { "&:focus-visible": {
|
|
37
38
|
position: "relative",
|
|
38
39
|
zIndex: 1
|
|
39
|
-
} },
|
|
40
|
+
} }, F = t({
|
|
40
41
|
label: "split-button-action",
|
|
41
42
|
flex: "0 1 auto",
|
|
42
43
|
minInlineSize: 0,
|
|
43
44
|
blockSize: "auto",
|
|
44
|
-
paddingBlock:
|
|
45
|
+
paddingBlock: w.space[1],
|
|
45
46
|
whiteSpace: "normal",
|
|
46
47
|
textAlign: "center",
|
|
47
48
|
borderStartEndRadius: 0,
|
|
48
49
|
borderEndEndRadius: 0,
|
|
49
50
|
borderInlineEndWidth: 0,
|
|
50
|
-
...
|
|
51
|
-
[
|
|
52
|
-
}),
|
|
51
|
+
...P,
|
|
52
|
+
[n]: { borderColor: "ButtonText" }
|
|
53
|
+
}), I = t({
|
|
53
54
|
label: "split-button-trigger",
|
|
54
55
|
flexShrink: 0,
|
|
55
56
|
blockSize: "auto",
|
|
56
57
|
paddingInline: 0,
|
|
57
58
|
borderStartStartRadius: 0,
|
|
58
59
|
borderEndStartRadius: 0,
|
|
59
|
-
borderInlineStartColor:
|
|
60
|
-
...
|
|
61
|
-
[
|
|
62
|
-
}),
|
|
60
|
+
borderInlineStartColor: w.color.borderControl,
|
|
61
|
+
...P,
|
|
62
|
+
[n]: { borderColor: "ButtonText" }
|
|
63
|
+
}), L = Object.fromEntries(Object.entries(M).map(([e, n]) => [e, t({ minBlockSize: n })])), R = Object.fromEntries(Object.entries(M).map(([e, n]) => [e, t({
|
|
63
64
|
minBlockSize: n,
|
|
64
65
|
inlineSize: n
|
|
65
|
-
})])),
|
|
66
|
+
})])), z = t({
|
|
66
67
|
display: "inline-flex",
|
|
67
68
|
transitionProperty: "transform",
|
|
68
|
-
transitionDuration:
|
|
69
|
-
transitionTimingFunction:
|
|
69
|
+
transitionDuration: w.motion.duration.fast,
|
|
70
|
+
transitionTimingFunction: w.motion.easeStandard,
|
|
70
71
|
"& svg": {
|
|
71
72
|
inlineSize: "1em",
|
|
72
73
|
blockSize: "1em"
|
|
73
74
|
},
|
|
74
75
|
"[aria-expanded=\"true\"] > &": { transform: "rotate(180deg)" },
|
|
75
|
-
[
|
|
76
|
+
[r]: {
|
|
76
77
|
transitionDuration: "0s",
|
|
77
78
|
"[aria-expanded=\"true\"] > &": { transform: "none" }
|
|
78
79
|
},
|
|
79
|
-
[
|
|
80
|
-
}),
|
|
80
|
+
[n]: { color: "ButtonText" }
|
|
81
|
+
}), B = e({
|
|
81
82
|
from: { opacity: 0 },
|
|
82
83
|
to: { opacity: 1 }
|
|
83
|
-
}),
|
|
84
|
+
}), V = t({
|
|
84
85
|
display: "inline-grid",
|
|
85
86
|
justifyItems: "center",
|
|
86
87
|
"& > *": { gridArea: "1 / 1" }
|
|
87
|
-
}),
|
|
88
|
-
"&[data-swapped]": { animation: `${
|
|
89
|
-
[
|
|
90
|
-
}),
|
|
91
|
-
neutral: t({}),
|
|
92
|
-
danger: t({
|
|
93
|
-
color: C.color.dangerText,
|
|
94
|
-
"&:hover:not([aria-disabled=\"true\"]), &[data-active]:not([aria-disabled=\"true\"])": { backgroundColor: C.color.dangerSoft }
|
|
95
|
-
})
|
|
96
|
-
}, W = /* @__PURE__ */ w("svg", {
|
|
88
|
+
}), H = t({ visibility: "hidden" }), U = t({
|
|
89
|
+
"&[data-swapped]": { animation: `${B} ${w.motion.duration.base} ${w.motion.easeStandard}` },
|
|
90
|
+
[r]: { "&[data-swapped]": { animation: "none" } }
|
|
91
|
+
}), W = /* @__PURE__ */ T("svg", {
|
|
97
92
|
viewBox: "0 0 16 16",
|
|
98
93
|
fill: "none",
|
|
99
94
|
stroke: "currentColor",
|
|
100
95
|
strokeWidth: "1.5",
|
|
101
96
|
strokeLinecap: "round",
|
|
102
97
|
strokeLinejoin: "round",
|
|
103
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ T("path", { d: "M4 6l4 4 4-4" })
|
|
104
99
|
});
|
|
105
|
-
function G({ ref: e, variant: t = "solid", tone:
|
|
106
|
-
let [g = !1, _] = a(s, c, l),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, [g]),
|
|
110
|
-
o ? g && !
|
|
100
|
+
function G({ ref: e, variant: t = "solid", tone: n = "accent", size: r = "md", disabled: o = !1, open: s, defaultOpen: c = !1, onOpenChange: l, placement: u = "bottom-end", className: d, sx: f, children: p, ...m }) {
|
|
101
|
+
let [g = !1, _] = a(s, c, l), v = S(null), w = D([v, e]), [E, O] = C(), [A, j] = C(), M = S(!1);
|
|
102
|
+
b(() => {
|
|
103
|
+
v.current && O(getComputedStyle(v.current).direction === "rtl" ? "rtl" : "ltr");
|
|
104
|
+
}, [g]), y(() => {
|
|
105
|
+
o ? g && !M.current && (M.current = !0, _(!1)) : M.current = !1;
|
|
111
106
|
}, [
|
|
112
107
|
o,
|
|
113
108
|
g,
|
|
@@ -115,35 +110,35 @@ function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", d
|
|
|
115
110
|
]);
|
|
116
111
|
let P = (e) => {
|
|
117
112
|
e && o || _(e);
|
|
118
|
-
}, F =
|
|
113
|
+
}, F = x(() => ({
|
|
119
114
|
variant: t,
|
|
120
|
-
tone:
|
|
121
|
-
size:
|
|
115
|
+
tone: n,
|
|
116
|
+
size: r,
|
|
122
117
|
disabled: o,
|
|
123
|
-
direction:
|
|
118
|
+
direction: E,
|
|
124
119
|
triggerLabelledBy: A,
|
|
125
120
|
setTriggerLabelledBy: j
|
|
126
121
|
}), [
|
|
127
122
|
t,
|
|
123
|
+
n,
|
|
128
124
|
r,
|
|
129
|
-
i,
|
|
130
125
|
o,
|
|
131
|
-
|
|
126
|
+
E,
|
|
132
127
|
A
|
|
133
128
|
]);
|
|
134
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ T(h, {
|
|
135
130
|
open: g,
|
|
136
131
|
onOpenChange: P,
|
|
137
132
|
placement: u,
|
|
138
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ T(k.Provider, {
|
|
139
134
|
value: F,
|
|
140
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ T(i, {
|
|
141
136
|
className: d,
|
|
142
|
-
styles:
|
|
137
|
+
styles: N,
|
|
143
138
|
sx: f,
|
|
144
|
-
children: (e) => /* @__PURE__ */
|
|
139
|
+
children: (e) => /* @__PURE__ */ T("div", {
|
|
145
140
|
...m,
|
|
146
|
-
ref:
|
|
141
|
+
ref: w,
|
|
147
142
|
role: "group",
|
|
148
143
|
"data-ui": "split-button",
|
|
149
144
|
className: e,
|
|
@@ -156,24 +151,24 @@ function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", d
|
|
|
156
151
|
G.displayName = "SplitButton";
|
|
157
152
|
var K = (e) => typeof e == "string" || typeof e == "number" ? String(e) : void 0;
|
|
158
153
|
function q({ reserveLabels: e, children: t }) {
|
|
159
|
-
let n = K(t), [r, i] =
|
|
160
|
-
return n !== r && (i(n), o(!0)), /* @__PURE__ */
|
|
161
|
-
css:
|
|
154
|
+
let n = K(t), [r, i] = C(n), [a, o] = C(!1);
|
|
155
|
+
return n !== r && (i(n), o(!0)), /* @__PURE__ */ E("span", {
|
|
156
|
+
css: V,
|
|
162
157
|
"data-ui": "split-button-label",
|
|
163
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
164
|
-
css:
|
|
158
|
+
children: [e.map((e) => /* @__PURE__ */ T("span", {
|
|
159
|
+
css: H,
|
|
165
160
|
"aria-hidden": !0,
|
|
166
161
|
children: e
|
|
167
|
-
}, e)), /* @__PURE__ */
|
|
168
|
-
css:
|
|
162
|
+
}, e)), /* @__PURE__ */ T("span", {
|
|
163
|
+
css: U,
|
|
169
164
|
"data-swapped": a || void 0,
|
|
170
165
|
children: t
|
|
171
166
|
}, n)]
|
|
172
167
|
});
|
|
173
168
|
}
|
|
174
169
|
function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabels: a, children: o, className: c, sx: l, ...u }) {
|
|
175
|
-
let d =
|
|
176
|
-
return /* @__PURE__ */
|
|
170
|
+
let d = A("Action"), f = d.disabled || i, p = r ?? d.size;
|
|
171
|
+
return /* @__PURE__ */ T(s, {
|
|
177
172
|
...u,
|
|
178
173
|
ref: e,
|
|
179
174
|
variant: t ?? d.variant,
|
|
@@ -181,16 +176,16 @@ function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabe
|
|
|
181
176
|
size: p,
|
|
182
177
|
disabled: f,
|
|
183
178
|
"data-ui": "split-button-action",
|
|
184
|
-
css: [
|
|
179
|
+
css: [F, L[p]],
|
|
185
180
|
className: c,
|
|
186
181
|
sx: l,
|
|
187
|
-
render: ({ "data-ui": e, ...t }) => /* @__PURE__ */
|
|
182
|
+
render: ({ "data-ui": e, ...t }) => /* @__PURE__ */ T("button", {
|
|
188
183
|
...t,
|
|
189
184
|
type: t.type ?? "button",
|
|
190
185
|
"data-ui": e,
|
|
191
186
|
disabled: f
|
|
192
187
|
}),
|
|
193
|
-
children: a !== void 0 && a.length > 0 ? /* @__PURE__ */
|
|
188
|
+
children: a !== void 0 && a.length > 0 ? /* @__PURE__ */ T(q, {
|
|
194
189
|
reserveLabels: a,
|
|
195
190
|
children: o
|
|
196
191
|
}) : o
|
|
@@ -198,28 +193,28 @@ function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabe
|
|
|
198
193
|
}
|
|
199
194
|
J.displayName = "SplitButton.Action";
|
|
200
195
|
function Y({ ref: e, disabled: t = !1, children: n = W, className: r, sx: i, ...a }) {
|
|
201
|
-
let c =
|
|
202
|
-
return
|
|
196
|
+
let c = A("Trigger"), l = c.disabled || t, u = "aria-labelledby" in a ? a["aria-labelledby"] : void 0, { setTriggerLabelledBy: d } = c;
|
|
197
|
+
return b(() => (d(u), () => d(void 0)), [u, d]), /* @__PURE__ */ T(s, {
|
|
203
198
|
...a,
|
|
204
199
|
ref: e,
|
|
205
|
-
variant:
|
|
200
|
+
variant: j[c.variant],
|
|
206
201
|
tone: c.tone,
|
|
207
202
|
size: c.size,
|
|
208
|
-
disabled:
|
|
203
|
+
disabled: l,
|
|
209
204
|
"data-ui": "split-button-trigger",
|
|
210
|
-
css: [
|
|
205
|
+
css: [I, R[c.size]],
|
|
211
206
|
className: r,
|
|
212
207
|
sx: i,
|
|
213
|
-
render: ({ "data-ui": e, ref: t, ...n }) => /* @__PURE__ */
|
|
208
|
+
render: ({ "data-ui": e, ref: t, ...n }) => /* @__PURE__ */ T(m, {
|
|
214
209
|
...n,
|
|
215
210
|
ref: t,
|
|
216
211
|
type: "button",
|
|
217
|
-
disabled:
|
|
218
|
-
family:
|
|
212
|
+
disabled: l,
|
|
213
|
+
family: O,
|
|
219
214
|
marker: e
|
|
220
215
|
}),
|
|
221
|
-
children: o(n) && n !== "" && /* @__PURE__ */
|
|
222
|
-
css:
|
|
216
|
+
children: o(n) && n !== "" && /* @__PURE__ */ T("span", {
|
|
217
|
+
css: z,
|
|
223
218
|
"aria-hidden": !0,
|
|
224
219
|
children: n
|
|
225
220
|
})
|
|
@@ -227,33 +222,33 @@ function Y({ ref: e, disabled: t = !1, children: n = W, className: r, sx: i, ...
|
|
|
227
222
|
}
|
|
228
223
|
Y.displayName = "SplitButton.Trigger";
|
|
229
224
|
function X({ dir: e, "aria-labelledby": t, ...n }) {
|
|
230
|
-
let { direction: r, triggerLabelledBy: i } =
|
|
231
|
-
return /* @__PURE__ */
|
|
225
|
+
let { direction: r, triggerLabelledBy: i } = A("Content"), a = [t, n["aria-label"] === void 0 ? i : void 0].filter(Boolean).join(" ");
|
|
226
|
+
return /* @__PURE__ */ T(p, {
|
|
232
227
|
...n,
|
|
233
228
|
"aria-labelledby": a || void 0,
|
|
234
229
|
dir: e ?? r,
|
|
235
|
-
family:
|
|
230
|
+
family: O,
|
|
236
231
|
marker: "split-button-content",
|
|
237
232
|
styles: c
|
|
238
233
|
});
|
|
239
234
|
}
|
|
240
235
|
X.displayName = "SplitButton.Content";
|
|
241
236
|
function Z({ tone: e = "neutral", disabled: t = !1, ...n }) {
|
|
242
|
-
let r =
|
|
243
|
-
return /* @__PURE__ */
|
|
237
|
+
let r = A("Item");
|
|
238
|
+
return /* @__PURE__ */ T(l, {
|
|
244
239
|
...n,
|
|
245
240
|
disabled: r.disabled || t,
|
|
246
|
-
family:
|
|
241
|
+
family: O,
|
|
247
242
|
marker: "split-button-item",
|
|
248
|
-
styles: [
|
|
243
|
+
styles: [g, u[e]]
|
|
249
244
|
});
|
|
250
245
|
}
|
|
251
246
|
Z.displayName = "SplitButton.Item";
|
|
252
247
|
function Q(e) {
|
|
253
|
-
return
|
|
248
|
+
return A("Separator"), /* @__PURE__ */ T(f, {
|
|
254
249
|
...e,
|
|
255
250
|
marker: "split-button-separator",
|
|
256
|
-
styles:
|
|
251
|
+
styles: d
|
|
257
252
|
});
|
|
258
253
|
}
|
|
259
254
|
Q.displayName = "SplitButton.Separator";
|
package/dist/split-button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as SplitButton } from "./split-button-
|
|
2
|
+
export { t as SplitButton } from "./split-button-Bu41f2AY.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./sx-
|
|
3
|
-
import { t } from "./layout-style-
|
|
2
|
+
import { t as e } from "./sx-BJXJ2xJK.js";
|
|
3
|
+
import { t } from "./layout-style-BE0gSqrH.js";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
5
|
//#region src/components/stack/stack.tsx
|
|
6
6
|
function r({ ref: r, gap: i = "md", align: a, justify: o, wrap: s, className: c, sx: l, ...u }) {
|
package/dist/stack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Stack } from "./stack-
|
|
2
|
+
export { t as Stack } from "./stack-Bac4sJeI.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
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
9
|
import { t as c } from "./part-id-D0zksy32.js";
|
|
9
10
|
import { useId as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
@@ -132,7 +133,7 @@ var ae = e({
|
|
|
132
133
|
transitionProperty: "background-color, transform",
|
|
133
134
|
transitionDuration: p.motion.duration.base,
|
|
134
135
|
transitionTimingFunction: p.motion.easeStandard,
|
|
135
|
-
[
|
|
136
|
+
[r]: { transitionDuration: "0s" }
|
|
136
137
|
}), A = {
|
|
137
138
|
horizontal: e({ gridColumn: 1 }),
|
|
138
139
|
vertical: e({ gridColumn: "1 / -1" })
|
|
@@ -141,8 +142,8 @@ var ae = e({
|
|
|
141
142
|
"&[aria-disabled=\"true\"]": { cursor: "default" },
|
|
142
143
|
"&:not([aria-disabled=\"true\"]):hover": { backgroundColor: p.color.surfaceHover },
|
|
143
144
|
"&:not([aria-disabled=\"true\"]):active": { transform: "scale(0.98)" },
|
|
144
|
-
"&:focus-visible":
|
|
145
|
-
[
|
|
145
|
+
"&:focus-visible": t,
|
|
146
|
+
[r]: { "&:not([aria-disabled=\"true\"]):active": { transform: "none" } }
|
|
146
147
|
}), j = e({
|
|
147
148
|
boxSizing: "border-box",
|
|
148
149
|
display: "inline-flex",
|
|
@@ -187,8 +188,8 @@ var ae = e({
|
|
|
187
188
|
backgroundColor: p.color.dangerSoft,
|
|
188
189
|
color: p.color.dangerText
|
|
189
190
|
},
|
|
190
|
-
[
|
|
191
|
-
[
|
|
191
|
+
[r]: { transitionDuration: "0s" },
|
|
192
|
+
[n]: {
|
|
192
193
|
borderColor: "CanvasText",
|
|
193
194
|
"&[data-state=\"current\"], &[data-state=\"error\"]": {
|
|
194
195
|
borderColor: "Highlight",
|
|
@@ -245,8 +246,8 @@ var ae = e({
|
|
|
245
246
|
transitionTimingFunction: p.motion.easeStandard
|
|
246
247
|
},
|
|
247
248
|
"&[data-state=\"complete\"]::after": { transform: "none" },
|
|
248
|
-
[
|
|
249
|
-
[
|
|
249
|
+
[r]: { "&::after": { transitionDuration: "0s" } },
|
|
250
|
+
[n]: {
|
|
250
251
|
forcedColorAdjust: "none",
|
|
251
252
|
backgroundColor: "CanvasText",
|
|
252
253
|
"&::after": { backgroundColor: "Highlight" }
|
|
@@ -289,17 +290,17 @@ var ae = e({
|
|
|
289
290
|
fontWeight: p.fontWeight.medium
|
|
290
291
|
});
|
|
291
292
|
function N(e) {
|
|
292
|
-
let { ref:
|
|
293
|
+
let { ref: t, steps: n, value: r, defaultValue: p = 0, onValueChange: y, interactive: x = !1, orientation: S = "horizontal", details: C = "all", compact: w = !1, responsive: T = !0, size: E = "md", label: D = _, completeLabel: N = v, locale: P, getStepLabel: F, getChangeLabel: I, announceChanges: L = !1, slotProps: R, className: ge, sx: _e, "aria-label": ve, "aria-labelledby": z, ...ye } = e, B = n.length, be = l(), [xe, Se] = a(O(r, B), O(p, B), y), V = O(xe, B) ?? 0, H = n[V] ?? null, Ce = B > 0 && H === null, U = new Intl.NumberFormat(P), W = F ?? ee(U), we = I ?? b(U), [Te, Ee] = f(V), [De, Oe] = f("");
|
|
293
294
|
Te !== V && (Ee(V), L && Oe(we(H, V, B)));
|
|
294
|
-
let ke = (e) => e === V || e < V &&
|
|
295
|
+
let ke = (e) => e === V || e < V && n[e]?.disabled !== !0, G = x ? n.flatMap((e, t) => ke(t) ? [t] : []) : [], [Ae, je] = f(null), K = n.findIndex((e) => e.id === Ae), q = G.includes(K) ? K : G.includes(V) ? V : G[0], J = d(/* @__PURE__ */ new Map()), Y = d(!1);
|
|
295
296
|
u(() => {
|
|
296
297
|
if (!Y.current) return;
|
|
297
298
|
Y.current = !1;
|
|
298
|
-
let e = q === void 0 ? void 0 : J.current.get(
|
|
299
|
+
let e = q === void 0 ? void 0 : J.current.get(n[q]?.id ?? ""), t = e?.ownerDocument.activeElement;
|
|
299
300
|
e && (!t || t === e.ownerDocument.body) && e.focus();
|
|
300
301
|
});
|
|
301
302
|
let Me = (e, t) => {
|
|
302
|
-
let
|
|
303
|
+
let r = getComputedStyle(e.currentTarget).direction === "rtl", [i, a] = S === "vertical" ? ["ArrowUp", "ArrowDown"] : r ? ["ArrowRight", "ArrowLeft"] : ["ArrowLeft", "ArrowRight"], o = G.indexOf(G.includes(t) ? t : q ?? -1), s = {
|
|
303
304
|
[i]: G[Math.max(o - 1, 0)],
|
|
304
305
|
[a]: G[Math.min(o + 1, G.length - 1)],
|
|
305
306
|
Home: G[0],
|
|
@@ -307,16 +308,16 @@ function N(e) {
|
|
|
307
308
|
};
|
|
308
309
|
if (!(e.key in s)) return;
|
|
309
310
|
e.preventDefault();
|
|
310
|
-
let c = s[e.key], l = c === void 0 ? void 0 :
|
|
311
|
+
let c = s[e.key], l = c === void 0 ? void 0 : n[c];
|
|
311
312
|
l && J.current.get(l.id)?.focus();
|
|
312
313
|
}, Ne = (e) => {
|
|
313
|
-
e < V &&
|
|
314
|
+
e < V && n[e]?.disabled !== !0 && Se(e);
|
|
314
315
|
}, { className: X, css: Z, onClick: Pe, onKeyDown: Fe, onFocus: Ie, "aria-describedby": Le, ...Re } = R?.head ?? {}, ze = /* @__PURE__ */ h("ol", {
|
|
315
316
|
role: "list",
|
|
316
317
|
"data-ui": "stepper-list",
|
|
317
318
|
className: R?.list?.className,
|
|
318
319
|
css: [se[S], R?.list?.css],
|
|
319
|
-
children:
|
|
320
|
+
children: n.map((e, t) => {
|
|
320
321
|
let n = te(e, t, V), r = t === V, i = W(e, t, B, n), a = n === "error", l = a || s(e.description) && (C === "all" || r), u = c(be, "detail", e.id), d = s(e.icon), f = n === "complete" ? /* @__PURE__ */ h(re, {}) : a ? /* @__PURE__ */ h(ie, {}) : null, p = d || f ? void 0 : U.format(t + 1), _ = /* @__PURE__ */ g(m, { children: [
|
|
321
322
|
/* @__PURE__ */ h("span", {
|
|
322
323
|
"aria-hidden": "true",
|
|
@@ -453,7 +454,7 @@ function N(e) {
|
|
|
453
454
|
children: De
|
|
454
455
|
})
|
|
455
456
|
] });
|
|
456
|
-
return /* @__PURE__ */ h(
|
|
457
|
+
return /* @__PURE__ */ h(i, {
|
|
457
458
|
className: [R?.root?.className, ge].filter(Boolean).join(" ") || void 0,
|
|
458
459
|
styles: [
|
|
459
460
|
ae,
|
|
@@ -463,12 +464,12 @@ function N(e) {
|
|
|
463
464
|
sx: _e,
|
|
464
465
|
children: (e) => x ? /* @__PURE__ */ h("nav", {
|
|
465
466
|
...Q,
|
|
466
|
-
ref:
|
|
467
|
+
ref: t,
|
|
467
468
|
className: e,
|
|
468
469
|
children: $
|
|
469
470
|
}) : /* @__PURE__ */ h("div", {
|
|
470
471
|
...Q,
|
|
471
|
-
ref:
|
|
472
|
+
ref: t,
|
|
472
473
|
role: "group",
|
|
473
474
|
className: e,
|
|
474
475
|
children: $
|
package/dist/stepper.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Stepper } from "./stepper-
|
|
2
|
+
export { t as Stepper } from "./stepper-C8Ncavbr.js";
|