@jfrader/ui 0.5.1 → 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-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-CaGJHy1N.js → avatar-B6idYC59.js} +11 -10
- package/dist/{avatar-group-M1opAQEG.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- 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-DVa17BRC.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-BnUHxviq.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/{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/{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-DN1EAlQA.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/index.js +98 -83
- 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-CZF7XNYG.js +295 -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-DfZNz70v.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-DaldDMX7.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 +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/comment-thread/comment-thread.d.ts +3 -3
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- 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 +29 -5
- 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/photo-grid/index.d.ts +2 -0
- package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
- 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/stretch-refresh/index.d.ts +1 -0
- package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
- 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/{comment-thread → thread}/thread-parts.d.ts +7 -2
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- 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 +14 -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/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-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 +72 -6
- 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,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n, t as
|
|
4
|
-
import { n as
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t, t as n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as a } from "./sx-BJXJ2xJK.js";
|
|
5
6
|
import { n as o, r as s, t as c } from "./roving-focus-CYlo_Kf8.js";
|
|
6
7
|
import { t as l } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
8
|
import { t as u } from "./part-id-D0zksy32.js";
|
|
@@ -57,9 +58,9 @@ var C = {
|
|
|
57
58
|
opacity: .55,
|
|
58
59
|
cursor: "not-allowed"
|
|
59
60
|
},
|
|
60
|
-
"&:focus-visible": { ...
|
|
61
|
-
[
|
|
62
|
-
[
|
|
61
|
+
"&:focus-visible": { ...n },
|
|
62
|
+
[i]: { transitionDuration: "0s" },
|
|
63
|
+
[r]: {
|
|
63
64
|
borderColor: "Canvas",
|
|
64
65
|
"&[aria-selected=\"true\"]": { borderColor: "Highlight" }
|
|
65
66
|
}
|
|
@@ -76,29 +77,29 @@ var C = {
|
|
|
76
77
|
}, O = e({
|
|
77
78
|
color: y.color.text,
|
|
78
79
|
outline: "none",
|
|
79
|
-
"&:focus-visible": { ...
|
|
80
|
+
"&:focus-visible": { ...t },
|
|
80
81
|
"&[hidden]": { display: "none" }
|
|
81
82
|
}), k = e({ paddingBlockStart: y.space[3] });
|
|
82
|
-
function A({ ref: e, value:
|
|
83
|
-
let d = m(), [f, p] = l(n, r
|
|
83
|
+
function A({ ref: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", activation: o = "auto", className: s, sx: c, ...u }) {
|
|
84
|
+
let d = m(), [f, p] = l(t, n, r), [h, _] = v(null), y = g(() => ({
|
|
84
85
|
value: f,
|
|
85
86
|
setValue: p,
|
|
86
87
|
focused: h,
|
|
87
88
|
setFocused: _,
|
|
88
|
-
orientation:
|
|
89
|
+
orientation: i,
|
|
89
90
|
activation: o,
|
|
90
91
|
baseId: d
|
|
91
92
|
}), [
|
|
92
93
|
f,
|
|
93
94
|
p,
|
|
94
95
|
h,
|
|
95
|
-
|
|
96
|
+
i,
|
|
96
97
|
o,
|
|
97
98
|
d
|
|
98
99
|
]);
|
|
99
100
|
return /* @__PURE__ */ b(x.Provider, {
|
|
100
101
|
value: y,
|
|
101
|
-
children: /* @__PURE__ */ b(
|
|
102
|
+
children: /* @__PURE__ */ b(a, {
|
|
102
103
|
className: s,
|
|
103
104
|
styles: w,
|
|
104
105
|
sx: c,
|
|
@@ -106,14 +107,14 @@ function A({ ref: e, value: n, defaultValue: r, onValueChange: i, orientation: a
|
|
|
106
107
|
...u,
|
|
107
108
|
ref: e,
|
|
108
109
|
"data-ui": "tabs-root",
|
|
109
|
-
"data-orientation":
|
|
110
|
+
"data-orientation": i,
|
|
110
111
|
className: t
|
|
111
112
|
})
|
|
112
113
|
})
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
A.displayName = "Tabs";
|
|
116
|
-
function j({ ref: e, onKeyDown:
|
|
117
|
+
function j({ ref: e, onKeyDown: t, className: n, sx: r, ...i }) {
|
|
117
118
|
let { orientation: l, value: u, focused: d, setFocused: f } = S("List"), m = _(null);
|
|
118
119
|
h(e, () => m.current, []), p(() => {
|
|
119
120
|
let e = m.current;
|
|
@@ -122,16 +123,16 @@ function j({ ref: e, onKeyDown: n, className: r, sx: i, ...a }) {
|
|
|
122
123
|
t.length !== 0 && (t.some((e) => e.tabIndex === 0) || f((c(t, u) ?? c(t, d) ?? t[0])?.dataset.value ?? null));
|
|
123
124
|
});
|
|
124
125
|
let g = (e) => {
|
|
125
|
-
|
|
126
|
-
let
|
|
127
|
-
!e.defaultPrevented &&
|
|
126
|
+
t?.(e);
|
|
127
|
+
let n = m.current;
|
|
128
|
+
!e.defaultPrevented && n && o(e, n, l, C);
|
|
128
129
|
};
|
|
129
|
-
return /* @__PURE__ */ b(
|
|
130
|
-
className:
|
|
130
|
+
return /* @__PURE__ */ b(a, {
|
|
131
|
+
className: n,
|
|
131
132
|
styles: T[l],
|
|
132
|
-
sx:
|
|
133
|
+
sx: r,
|
|
133
134
|
children: (e) => /* @__PURE__ */ b("div", {
|
|
134
|
-
...
|
|
135
|
+
...i,
|
|
135
136
|
ref: m,
|
|
136
137
|
role: "tablist",
|
|
137
138
|
"aria-orientation": l,
|
|
@@ -145,58 +146,58 @@ function j({ ref: e, onKeyDown: n, className: r, sx: i, ...a }) {
|
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
j.displayName = "Tabs.List";
|
|
148
|
-
function M({ ref: e, value:
|
|
149
|
-
let { value: d, setValue: f, focused: p, setFocused: m, activation: h, baseId: g, orientation: v } = S("Tab"), y = d ===
|
|
150
|
-
if (
|
|
151
|
-
let
|
|
152
|
-
C.current = !1, !(h === "auto" &&
|
|
149
|
+
function M({ ref: e, value: t, disabled: n, onClick: r, onFocus: i, onPointerDown: o, className: s, sx: c, ...l }) {
|
|
150
|
+
let { value: d, setValue: f, focused: p, setFocused: m, activation: h, baseId: g, orientation: v } = S("Tab"), y = d === t, x = !n && (p === null ? y : p === t), C = _(!1), w = (e) => {
|
|
151
|
+
if (r?.(e), e.defaultPrevented) return;
|
|
152
|
+
let n = C.current;
|
|
153
|
+
C.current = !1, !(h === "auto" && n && e.detail !== 0) && f(t);
|
|
153
154
|
}, T = (e) => {
|
|
154
|
-
|
|
155
|
+
i?.(e), !e.defaultPrevented && (C.current = !0, m(t), h === "auto" && f(t));
|
|
155
156
|
};
|
|
156
|
-
return /* @__PURE__ */ b(
|
|
157
|
+
return /* @__PURE__ */ b(a, {
|
|
157
158
|
className: s,
|
|
158
159
|
styles: [E, D[v]],
|
|
159
160
|
sx: c,
|
|
160
|
-
children: (
|
|
161
|
+
children: (r) => /* @__PURE__ */ b("button", {
|
|
161
162
|
...l,
|
|
162
163
|
ref: e,
|
|
163
164
|
type: "button",
|
|
164
165
|
role: "tab",
|
|
165
|
-
id: u(g, "tab",
|
|
166
|
+
id: u(g, "tab", t),
|
|
166
167
|
"data-ui": "tabs-tab",
|
|
167
|
-
"data-value":
|
|
168
|
+
"data-value": t,
|
|
168
169
|
"data-state": y ? "active" : "inactive",
|
|
169
170
|
"aria-selected": y,
|
|
170
|
-
"aria-controls": u(g, "panel",
|
|
171
|
+
"aria-controls": u(g, "panel", t),
|
|
171
172
|
tabIndex: x ? 0 : -1,
|
|
172
|
-
disabled:
|
|
173
|
+
disabled: n,
|
|
173
174
|
onClick: w,
|
|
174
175
|
onFocus: T,
|
|
175
176
|
onPointerDown: (e) => {
|
|
176
177
|
C.current = !1, o?.(e);
|
|
177
178
|
},
|
|
178
|
-
className:
|
|
179
|
+
className: r
|
|
179
180
|
})
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
M.displayName = "Tabs.Tab";
|
|
183
|
-
function N({ ref: e, value:
|
|
184
|
-
let { value: c, baseId: l, orientation: d } = S("Panel"), f = c ===
|
|
185
|
-
return /* @__PURE__ */ b(
|
|
186
|
-
className:
|
|
184
|
+
function N({ ref: e, value: t, tabIndex: n = 0, "aria-labelledby": r, className: i, sx: o, ...s }) {
|
|
185
|
+
let { value: c, baseId: l, orientation: d } = S("Panel"), f = c === t, p = [r, u(l, "tab", t)].filter(Boolean).join(" ") || void 0;
|
|
186
|
+
return /* @__PURE__ */ b(a, {
|
|
187
|
+
className: i,
|
|
187
188
|
styles: [O, d === "horizontal" && k],
|
|
188
189
|
sx: o,
|
|
189
|
-
children: (
|
|
190
|
+
children: (r) => /* @__PURE__ */ b("div", {
|
|
190
191
|
...s,
|
|
191
192
|
ref: e,
|
|
192
193
|
role: "tabpanel",
|
|
193
|
-
id: u(l, "panel",
|
|
194
|
+
id: u(l, "panel", t),
|
|
194
195
|
"aria-labelledby": p,
|
|
195
|
-
tabIndex:
|
|
196
|
+
tabIndex: n,
|
|
196
197
|
hidden: !f,
|
|
197
198
|
"data-ui": "tabs-panel",
|
|
198
199
|
"data-state": f ? "active" : "inactive",
|
|
199
|
-
className:
|
|
200
|
+
className: r
|
|
200
201
|
})
|
|
201
202
|
});
|
|
202
203
|
}
|
package/dist/tabs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Tabs } from "./tabs-
|
|
2
|
+
export { t as Tabs } from "./tabs-Bb5-noYE.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
3
|
import { t } from "./focus-ring-BK5W5_NY.js";
|
|
4
4
|
import { n, r, t as i } from "./media-8yrN85VT.js";
|
|
5
5
|
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
-
import { t as ee } from "./visually-hidden-
|
|
6
|
+
import { t as ee } from "./visually-hidden-DgVO3NaB.js";
|
|
7
7
|
import { t as te } from "./renderable-DzcIj1Lo.js";
|
|
8
|
-
import { t as ne } from "./icon-wrapper-
|
|
9
|
-
import { t as re } from "./input-control-
|
|
10
|
-
import { a as ie, i as ae, n as oe, r as se, t as ce } from "./field-anatomy-
|
|
8
|
+
import { t as ne } from "./icon-wrapper-C-zMD0uL.js";
|
|
9
|
+
import { t as re } from "./input-control-B6HVBgwl.js";
|
|
10
|
+
import { a as ie, i as ae, n as oe, r as se, t as ce } from "./field-anatomy-BDIP42MI.js";
|
|
11
11
|
import { useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
12
12
|
import { vars as u } from "@jfrader/tokens/vars";
|
|
13
13
|
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
package/dist/tag-input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as TagInput } from "./tag-input-
|
|
2
|
+
export { t as TagInput } from "./tag-input-BQaueKEb.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { t } from "./input-control-
|
|
4
|
-
import { a as n, i as r, n as i, r as a, t as o } from "./field-anatomy-
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./input-control-B6HVBgwl.js";
|
|
4
|
+
import { a as n, i as r, n as i, r as a, t as o } from "./field-anatomy-BDIP42MI.js";
|
|
5
5
|
import { vars as s } from "@jfrader/tokens/vars";
|
|
6
6
|
import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
7
7
|
//#region src/components/text-field/text-field.tsx
|
package/dist/text-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as TextField } from "./text-field-
|
|
2
|
+
export { t as TextField } from "./text-field-D0VP7b4P.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { t } from "./input-control-
|
|
4
|
-
import { a as n, i as r, n as i, r as a, t as o } from "./field-anatomy-
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./input-control-B6HVBgwl.js";
|
|
4
|
+
import { a as n, i as r, n as i, r as a, t as o } from "./field-anatomy-BDIP42MI.js";
|
|
5
5
|
import { vars as s } from "@jfrader/tokens/vars";
|
|
6
6
|
import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
7
7
|
//#region src/components/textarea/textarea.tsx
|
package/dist/textarea.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Textarea } from "./textarea-
|
|
2
|
+
export { t as Textarea } from "./textarea-D1YwEPmn.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { o as e, r as t } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { vars as n } from "@jfrader/tokens/vars";
|
|
4
|
+
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
5
|
+
//#region src/styling/theme.ts
|
|
6
|
+
var i = n;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/theme-provider/theme-provider.tsx
|
|
9
|
+
function a({ theme: e = i, children: n }) {
|
|
10
|
+
return /* @__PURE__ */ r(t, {
|
|
11
|
+
theme: e,
|
|
12
|
+
children: n
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
a.displayName = "ThemeProvider";
|
|
16
|
+
function o() {
|
|
17
|
+
return e();
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as n, i as r, a as t };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./sx-BJXJ2xJK.js";
|
|
3
|
+
import { a as t, i as n, o as r, r as i } from "./theme-scope-DGWy4H0C.js";
|
|
4
|
+
import { r as a, t as o } from "./theme-provider-BvcY-iJu.js";
|
|
5
|
+
import { useContext as s, useMemo as c } from "react";
|
|
6
|
+
import { jsx as l } from "@emotion/react/jsx-runtime";
|
|
7
|
+
import { base as u, light as d } from "@jfrader/tokens";
|
|
8
|
+
//#region src/styling/create-theme.ts
|
|
9
|
+
var f = {
|
|
10
|
+
dark: {
|
|
11
|
+
hoverLightness: .08,
|
|
12
|
+
textMaxLightness: null
|
|
13
|
+
},
|
|
14
|
+
light: {
|
|
15
|
+
hoverLightness: -.06,
|
|
16
|
+
textMaxLightness: .5
|
|
17
|
+
}
|
|
18
|
+
}, p = {
|
|
19
|
+
accentSoft: 22,
|
|
20
|
+
accentSoftHover: 30,
|
|
21
|
+
accentBorder: 50
|
|
22
|
+
}, m = [u.color.accentContrast, d.color.accentContrast], h = 1e-4, g = [
|
|
23
|
+
[
|
|
24
|
+
.4122214708,
|
|
25
|
+
.5363325363,
|
|
26
|
+
.0514459929
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
.2119034982,
|
|
30
|
+
.6806995451,
|
|
31
|
+
.1073969566
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
.0883024619,
|
|
35
|
+
.2817188376,
|
|
36
|
+
.6299787005
|
|
37
|
+
]
|
|
38
|
+
], _ = [
|
|
39
|
+
[
|
|
40
|
+
.2104542553,
|
|
41
|
+
.793617785,
|
|
42
|
+
-.0040720468
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
1.9779984951,
|
|
46
|
+
-2.428592205,
|
|
47
|
+
.4505937099
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
.0259040371,
|
|
51
|
+
.7827717662,
|
|
52
|
+
-.808675766
|
|
53
|
+
]
|
|
54
|
+
], v = [
|
|
55
|
+
.2126,
|
|
56
|
+
.7152,
|
|
57
|
+
.0722
|
|
58
|
+
], y = /^#(?:[\da-f]{3}|[\da-f]{6})$/i, b = (e, t) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2], x = (e) => Math.min(1, Math.max(0, e)), S = (e, t) => Number(e.toFixed(t));
|
|
59
|
+
function C(e) {
|
|
60
|
+
if (!y.test(e)) throw Error(`createTheme: accent must be a #rgb or #rrggbb color, got "${e}".`);
|
|
61
|
+
let [t, n, r] = (e.length === 4 ? [...e.slice(1)].map((e) => e + e) : e.slice(1).match(/../g)).map((e) => {
|
|
62
|
+
let t = Number.parseInt(e, 16) / 255;
|
|
63
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
64
|
+
});
|
|
65
|
+
return [
|
|
66
|
+
t,
|
|
67
|
+
n,
|
|
68
|
+
r
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
function w(e) {
|
|
72
|
+
return b(v, e);
|
|
73
|
+
}
|
|
74
|
+
function T(e, t) {
|
|
75
|
+
return (Math.max(e, t) + .05) / (Math.min(e, t) + .05);
|
|
76
|
+
}
|
|
77
|
+
function E(e) {
|
|
78
|
+
let t = w(e), n = (e) => T(t, w(C(e)));
|
|
79
|
+
return m.reduce((e, t) => n(t) > n(e) ? t : e);
|
|
80
|
+
}
|
|
81
|
+
function D(e) {
|
|
82
|
+
let [t, n, r] = g.map((t) => Math.cbrt(b(t, e))), i = [
|
|
83
|
+
t,
|
|
84
|
+
n,
|
|
85
|
+
r
|
|
86
|
+
], [a, o, s] = _.map((e) => b(e, i)), c = Math.hypot(o, s);
|
|
87
|
+
return {
|
|
88
|
+
lightness: a,
|
|
89
|
+
chroma: c,
|
|
90
|
+
hue: c < h ? 0 : (Math.atan2(s, o) * 180 / Math.PI + 360) % 360
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function O(e, t, n) {
|
|
94
|
+
return `oklch(${S(x(e) * 100, 2)}% ${S(t, 4)} ${S(n, 2)})`;
|
|
95
|
+
}
|
|
96
|
+
function k(e, t) {
|
|
97
|
+
let n = C(e), { lightness: r, chroma: i, hue: a } = D(n), { hoverLightness: o, textMaxLightness: s } = f[t], c = (t) => `color-mix(in oklab, ${e} ${t}%, transparent)`;
|
|
98
|
+
return {
|
|
99
|
+
accent: e,
|
|
100
|
+
accentHover: O(r + o, i, a),
|
|
101
|
+
accentText: s === null ? e : O(Math.min(r, s), i, a),
|
|
102
|
+
accentSoft: c(p.accentSoft),
|
|
103
|
+
accentSoftHover: c(p.accentSoftHover),
|
|
104
|
+
accentBorder: c(p.accentBorder),
|
|
105
|
+
accentContrast: E(n),
|
|
106
|
+
focusRing: e
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function A(e, t) {
|
|
110
|
+
return Object.fromEntries([.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].map((n) => {
|
|
111
|
+
let [r, i] = [e[n], t[n]];
|
|
112
|
+
return [n, typeof r == "object" && typeof i == "object" ? A(r, i) : i ?? r];
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
function j({ base: e = "dark", accent: t, tokens: n = {} } = {}) {
|
|
116
|
+
return A(t === void 0 ? {} : { color: k(t, e) }, n);
|
|
117
|
+
}
|
|
118
|
+
var M = /^var\((--[\w-]+)\)$/;
|
|
119
|
+
function N(e, t) {
|
|
120
|
+
return Object.entries(e).flatMap(([e, n]) => {
|
|
121
|
+
let r = t[e];
|
|
122
|
+
if (typeof n == "object" && typeof r == "object") return N(n, r);
|
|
123
|
+
let i = typeof r == "string" ? M.exec(r)?.[1] : void 0;
|
|
124
|
+
return typeof n == "string" && i ? [[i, n]] : [];
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function P(e) {
|
|
128
|
+
return Object.fromEntries(N(e, a));
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/components/theme-root/theme-root.tsx
|
|
132
|
+
function F({ ref: a, theme: u = "dark", tokens: d, portalContainer: f, className: p, style: m, sx: h, ...g }) {
|
|
133
|
+
let _ = s(i), v = f === void 0 ? _?.portalContainer : f, y = _ && _.theme === u ? _.appearance : "default", b = c(() => d && P(d), [d]) ?? n(_, u), x = c(() => ({
|
|
134
|
+
theme: u,
|
|
135
|
+
appearance: y,
|
|
136
|
+
portalContainer: v,
|
|
137
|
+
tokenStyle: b
|
|
138
|
+
}), [
|
|
139
|
+
u,
|
|
140
|
+
y,
|
|
141
|
+
v,
|
|
142
|
+
b
|
|
143
|
+
]);
|
|
144
|
+
return /* @__PURE__ */ l(i.Provider, {
|
|
145
|
+
value: x,
|
|
146
|
+
children: /* @__PURE__ */ l(o, { children: /* @__PURE__ */ l(e, {
|
|
147
|
+
className: p,
|
|
148
|
+
styles: r,
|
|
149
|
+
sx: h,
|
|
150
|
+
children: (e) => /* @__PURE__ */ l("div", {
|
|
151
|
+
...g,
|
|
152
|
+
ref: a,
|
|
153
|
+
"data-ui": "theme-root",
|
|
154
|
+
"data-theme": u,
|
|
155
|
+
className: e,
|
|
156
|
+
style: t(b, m)
|
|
157
|
+
})
|
|
158
|
+
}) })
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
F.displayName = "ThemeRoot";
|
|
162
|
+
//#endregion
|
|
163
|
+
export { j as n, P as r, F as t };
|
package/dist/theme-root.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ThemeRoot } from "./theme-root-
|
|
2
|
+
export { t as ThemeRoot, n as createTheme, r as themeTokenStyle } from "./theme-root-BrYVcTzt.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { createContext as t, useContext as n, useMemo as r } from "react";
|
|
4
|
+
import { vars as i } from "@jfrader/tokens/vars";
|
|
5
|
+
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/styling/theme-scope.tsx
|
|
7
|
+
var o = t(null);
|
|
8
|
+
function s() {
|
|
9
|
+
return n(o);
|
|
10
|
+
}
|
|
11
|
+
function c(e, t) {
|
|
12
|
+
return e && e.theme === t ? e.tokenStyle : void 0;
|
|
13
|
+
}
|
|
14
|
+
function l(e, t) {
|
|
15
|
+
return e ? {
|
|
16
|
+
...e,
|
|
17
|
+
...t
|
|
18
|
+
} : t;
|
|
19
|
+
}
|
|
20
|
+
function u(e, t) {
|
|
21
|
+
return l(c(n(o), e), t);
|
|
22
|
+
}
|
|
23
|
+
function d(e) {
|
|
24
|
+
let t = n(o);
|
|
25
|
+
return e ?? t?.appearance ?? "default";
|
|
26
|
+
}
|
|
27
|
+
var f = e({
|
|
28
|
+
color: i.color.text,
|
|
29
|
+
colorScheme: "dark",
|
|
30
|
+
"&[data-theme=\"light\"]": { colorScheme: "light" }
|
|
31
|
+
}), p = e({ display: "contents" });
|
|
32
|
+
function m({ theme: e, appearance: t, children: i }) {
|
|
33
|
+
let s = n(o), l = e ?? s?.theme ?? "dark", u = c(s, l), d = r(() => ({
|
|
34
|
+
theme: l,
|
|
35
|
+
appearance: t,
|
|
36
|
+
portalContainer: s?.portalContainer,
|
|
37
|
+
tokenStyle: u
|
|
38
|
+
}), [
|
|
39
|
+
l,
|
|
40
|
+
t,
|
|
41
|
+
s?.portalContainer,
|
|
42
|
+
u
|
|
43
|
+
]);
|
|
44
|
+
return (s ? s.theme === l && s.appearance === t : t === "default") ? i : /* @__PURE__ */ a(o.Provider, {
|
|
45
|
+
value: d,
|
|
46
|
+
children: i
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function h({ children: e }) {
|
|
50
|
+
let t = s();
|
|
51
|
+
return t ? /* @__PURE__ */ a("div", {
|
|
52
|
+
"data-ui": "theme-boundary",
|
|
53
|
+
"data-theme": t.theme,
|
|
54
|
+
"data-appearance": t.appearance,
|
|
55
|
+
style: t.tokenStyle,
|
|
56
|
+
css: [f, p],
|
|
57
|
+
children: e
|
|
58
|
+
}) : e;
|
|
59
|
+
}
|
|
60
|
+
h.displayName = "ThemeBoundary";
|
|
61
|
+
//#endregion
|
|
62
|
+
export { l as a, u as c, c as i, s as l, h as n, f as o, o as r, d as s, m as t };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n, r } from "./media-8yrN85VT.js";
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t, r as n } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as r } from "./sx-BJXJ2xJK.js";
|
|
4
5
|
import { t as i } from "./use-controlled-state-DpeVQZNR.js";
|
|
5
|
-
import { t as a } from "./visually-hidden-
|
|
6
|
+
import { t as a } from "./visually-hidden-DgVO3NaB.js";
|
|
6
7
|
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
7
|
-
import { t as s } from "./switch-
|
|
8
|
+
import { t as s } from "./switch-79-hkQqg.js";
|
|
8
9
|
import { useId as c, useState as l } from "react";
|
|
9
10
|
import { vars as u } from "@jfrader/tokens/vars";
|
|
10
11
|
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
|
@@ -32,11 +33,11 @@ var p = e({
|
|
|
32
33
|
transitionDuration: u.motion.duration.slow,
|
|
33
34
|
transitionTimingFunction: u.motion.easeStandard
|
|
34
35
|
},
|
|
35
|
-
[
|
|
36
|
+
[n]: {
|
|
36
37
|
transform: "none !important",
|
|
37
38
|
transitionDuration: "0s !important"
|
|
38
39
|
},
|
|
39
|
-
[
|
|
40
|
+
[t]: { color: "CanvasText" }
|
|
40
41
|
}), g = e({
|
|
41
42
|
gridArea: "1 / 1",
|
|
42
43
|
display: "inline-flex",
|
|
@@ -53,7 +54,7 @@ var p = e({
|
|
|
53
54
|
transitionDuration: u.motion.duration.base,
|
|
54
55
|
transitionTimingFunction: u.motion.easeStandard
|
|
55
56
|
},
|
|
56
|
-
[
|
|
57
|
+
[n]: {
|
|
57
58
|
transform: "none",
|
|
58
59
|
transitionDuration: "0s !important"
|
|
59
60
|
}
|
|
@@ -87,9 +88,9 @@ var p = e({
|
|
|
87
88
|
focusable: "false",
|
|
88
89
|
children: /* @__PURE__ */ d("path", { d: "M20 15A9 9 0 0 1 9 4a9 9 0 1 0 11 11Z" })
|
|
89
90
|
});
|
|
90
|
-
function b({ value: e, defaultValue:
|
|
91
|
-
let N = c(), P = j ?? N, { iconFrame: F, lightIcon: I, darkIcon: L, ...R } = D ?? {}, [z, B] = i(e,
|
|
92
|
-
return /* @__PURE__ */ d(
|
|
91
|
+
function b({ value: e, defaultValue: t = "light", onValueChange: n, label: u, iconOnly: b = !1, lightIcon: x = v, darkIcon: S = y, transition: C = "reveal", loading: w = !1, className: T, sx: E, slotProps: D, onChange: O, onClick: k, dir: A, id: j, ...M }) {
|
|
92
|
+
let N = c(), P = j ?? N, { iconFrame: F, lightIcon: I, darkIcon: L, ...R } = D ?? {}, [z, B] = i(e, t), [V, H] = l(!1), U = o(u) && u !== "", W = o(x) && x !== "", G = o(S) && S !== "", K = w || M["aria-disabled"] === !0 || M["aria-disabled"] === "true";
|
|
93
|
+
return /* @__PURE__ */ d(r, {
|
|
93
94
|
className: T,
|
|
94
95
|
styles: p,
|
|
95
96
|
sx: E,
|
|
@@ -147,7 +148,7 @@ function b({ value: e, defaultValue: n = "light", onValueChange: r, label: u, ic
|
|
|
147
148
|
onChange: (e) => {
|
|
148
149
|
if (O?.(e), e.defaultPrevented || e.nativeEvent.defaultPrevented || K) return;
|
|
149
150
|
let t = e.currentTarget.checked ? "dark" : "light";
|
|
150
|
-
t !== z && (H(!0), B(t),
|
|
151
|
+
t !== z && (H(!0), B(t), n?.(t, {
|
|
151
152
|
transition: C,
|
|
152
153
|
trigger: e.currentTarget,
|
|
153
154
|
reducedMotion: e.currentTarget.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1
|
package/dist/theme-switch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ThemeSwitch } from "./theme-switch-
|
|
2
|
+
export { t as ThemeSwitch } from "./theme-switch-CP42mVDb.js";
|