@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,17 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { t
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./disclosure-caret-C5T3fcl6.js";
|
|
4
|
+
import { t as n } from "./focus-ring-BK5W5_NY.js";
|
|
5
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
6
|
+
import { t as a } from "./sx-BJXJ2xJK.js";
|
|
6
7
|
import { t as o } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
8
|
import { t as s } from "./renderable-DzcIj1Lo.js";
|
|
8
|
-
import { n as c } from "./surface-
|
|
9
|
+
import { n as c } from "./surface-C69kwSuk.js";
|
|
9
10
|
import { createContext as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
10
11
|
import { vars as _ } from "@jfrader/tokens/vars";
|
|
11
12
|
import { jsx as v, jsxs as y } from "@emotion/react/jsx-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { MotionConfig as b, animate as x, useMotionValue as S, useReducedMotion as C } from "motion/react";
|
|
14
|
+
import { base as w } from "@jfrader/tokens";
|
|
15
|
+
import { useMergeRefs as T } from "@floating-ui/react";
|
|
15
16
|
//#region src/components/expandable-card/expandable-card.tsx
|
|
16
17
|
var E = l(null);
|
|
17
18
|
function D(e) {
|
|
@@ -25,7 +26,7 @@ var O = {
|
|
|
25
26
|
damping: 40,
|
|
26
27
|
mass: 1
|
|
27
28
|
}, k = {
|
|
28
|
-
duration: Number.parseFloat(
|
|
29
|
+
duration: Number.parseFloat(w.motion.duration.fast) / 1e3,
|
|
29
30
|
ease: [
|
|
30
31
|
.2,
|
|
31
32
|
.6,
|
|
@@ -68,13 +69,13 @@ var O = {
|
|
|
68
69
|
overflowWrap: "anywhere"
|
|
69
70
|
},
|
|
70
71
|
"&::after": {
|
|
71
|
-
...
|
|
72
|
+
...t,
|
|
72
73
|
gridColumn: 2,
|
|
73
74
|
gridRow: "1 / span 2"
|
|
74
75
|
},
|
|
75
76
|
"&[aria-expanded=\"true\"]::after": { transform: "rotate(90deg)" },
|
|
76
77
|
"&[aria-expanded=\"true\"]:dir(rtl)::after": { transform: "rotate(-90deg)" },
|
|
77
|
-
"&:focus-visible":
|
|
78
|
+
"&:focus-visible": n,
|
|
78
79
|
"&:hover:not(:disabled)": { backgroundColor: _.color.surfaceHover },
|
|
79
80
|
"&:disabled": {
|
|
80
81
|
cursor: "not-allowed",
|
|
@@ -84,8 +85,8 @@ var O = {
|
|
|
84
85
|
minBlockSize: _.space[12],
|
|
85
86
|
padding: _.space[3]
|
|
86
87
|
},
|
|
87
|
-
[
|
|
88
|
-
[
|
|
88
|
+
[i]: { "&::after": { transitionDuration: "0s" } },
|
|
89
|
+
[r]: {
|
|
89
90
|
"&:focus-visible": { outlineColor: "Highlight" },
|
|
90
91
|
"&::after": {
|
|
91
92
|
forcedColorAdjust: "none",
|
|
@@ -122,8 +123,8 @@ function R(e) {
|
|
|
122
123
|
function z(...e) {
|
|
123
124
|
return e.filter(Boolean).join(" ") || void 0;
|
|
124
125
|
}
|
|
125
|
-
function B({ ref: e, open:
|
|
126
|
-
let [k, M] = o(n, r
|
|
126
|
+
function B({ ref: e, open: t, defaultOpen: n = !1, onOpenChange: r, collapsedInlineSize: i, expandedInlineSize: s, size: c = "md", disabled: l = !1, headingLevel: u = 3, className: d, sx: _, onKeyDown: y, children: w, ...D }) {
|
|
127
|
+
let [k, M] = o(t, n, r), N = !!k, P = f(), F = h(null), I = h(null), L = h(null), z = T([I, e]), [B, V] = g(!1), [H, U] = g(!1), [W, G] = g(), [K, ee] = g(0), q = C(), J = S(0), Y = h(!1), X = R(i), Z = R(s) ?? X, Q = W === void 0 ? void 0 : Math.min(W, (N ? Z : X) ?? W), $ = W === void 0 ? void 0 : Math.max(0, Math.min(W, Z ?? W) - K);
|
|
127
128
|
p(() => {
|
|
128
129
|
let e = L.current;
|
|
129
130
|
if (!e) return;
|
|
@@ -143,7 +144,7 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
143
144
|
let t = (t) => {
|
|
144
145
|
e.style.inlineSize = `${t}px`;
|
|
145
146
|
}, n = J.on("change", t);
|
|
146
|
-
return !Y.current || q ? (J.jump(Q), t(Q), Y.current = !0) :
|
|
147
|
+
return !Y.current || q ? (J.jump(Q), t(Q), Y.current = !0) : x(J, Q, O), () => {
|
|
147
148
|
n(), J.stop();
|
|
148
149
|
};
|
|
149
150
|
}, [
|
|
@@ -176,14 +177,14 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
176
177
|
H,
|
|
177
178
|
$
|
|
178
179
|
]);
|
|
179
|
-
return /* @__PURE__ */ v(
|
|
180
|
+
return /* @__PURE__ */ v(b, {
|
|
180
181
|
reducedMotion: "user",
|
|
181
182
|
children: /* @__PURE__ */ v(E.Provider, {
|
|
182
183
|
value: te,
|
|
183
184
|
children: /* @__PURE__ */ v("div", {
|
|
184
185
|
ref: L,
|
|
185
186
|
css: j,
|
|
186
|
-
children: /* @__PURE__ */ v(
|
|
187
|
+
children: /* @__PURE__ */ v(a, {
|
|
187
188
|
className: d,
|
|
188
189
|
styles: A,
|
|
189
190
|
sx: _,
|
|
@@ -199,7 +200,7 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
199
200
|
let t = e.target, n = t.closest("dialog, [role=\"dialog\"], [role=\"menu\"], [role=\"listbox\"]");
|
|
200
201
|
t.closest("[data-ui=\"expandable-card\"]") !== e.currentTarget || n && e.currentTarget.contains(n) || (e.preventDefault(), M(!1));
|
|
201
202
|
},
|
|
202
|
-
children:
|
|
203
|
+
children: w
|
|
203
204
|
})
|
|
204
205
|
})
|
|
205
206
|
})
|
|
@@ -207,15 +208,15 @@ function B({ ref: e, open: n, defaultOpen: r = !1, onOpenChange: i, collapsedInl
|
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
210
|
B.displayName = "ExpandableCard";
|
|
210
|
-
function V({ ref: e, className:
|
|
211
|
-
let l = D("Trigger"), u =
|
|
211
|
+
function V({ ref: e, className: t, sx: n, onClick: r, disabled: i, "aria-labelledby": o, "aria-describedby": s, ...c }) {
|
|
212
|
+
let l = D("Trigger"), u = T([l.triggerRef, e]), d = `h${l.headingLevel}`;
|
|
212
213
|
return /* @__PURE__ */ v(d, {
|
|
213
214
|
css: M,
|
|
214
215
|
"aria-labelledby": l.triggerId,
|
|
215
|
-
children: /* @__PURE__ */ v(
|
|
216
|
-
className:
|
|
216
|
+
children: /* @__PURE__ */ v(a, {
|
|
217
|
+
className: t,
|
|
217
218
|
styles: N,
|
|
218
|
-
sx:
|
|
219
|
+
sx: n,
|
|
219
220
|
children: (e) => /* @__PURE__ */ v("button", {
|
|
220
221
|
...c,
|
|
221
222
|
ref: u,
|
|
@@ -223,62 +224,62 @@ function V({ ref: e, className: n, sx: r, onClick: i, disabled: a, "aria-labelle
|
|
|
223
224
|
id: l.triggerId,
|
|
224
225
|
"data-ui": "expandable-card-trigger",
|
|
225
226
|
className: e,
|
|
226
|
-
disabled: l.disabled ||
|
|
227
|
+
disabled: l.disabled || i,
|
|
227
228
|
"aria-expanded": l.open,
|
|
228
229
|
"aria-controls": l.panelId,
|
|
229
230
|
"aria-labelledby": z(o, l.hasTitle && l.titleId, l.hasDescription && l.descriptionId),
|
|
230
231
|
"aria-describedby": z(s),
|
|
231
232
|
onClick: (e) => {
|
|
232
|
-
|
|
233
|
+
r?.(e), e.defaultPrevented || l.request(!l.open);
|
|
233
234
|
}
|
|
234
235
|
})
|
|
235
236
|
})
|
|
236
237
|
});
|
|
237
238
|
}
|
|
238
239
|
V.displayName = "ExpandableCard.Trigger";
|
|
239
|
-
function H({ ref: e, className:
|
|
240
|
-
let { titleId: o, setHasTitle: c } = D("Title"), l = s(
|
|
241
|
-
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(
|
|
242
|
-
className:
|
|
240
|
+
function H({ ref: e, className: t, sx: n, children: r, ...i }) {
|
|
241
|
+
let { titleId: o, setHasTitle: c } = D("Title"), l = s(r);
|
|
242
|
+
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(a, {
|
|
243
|
+
className: t,
|
|
243
244
|
styles: P,
|
|
244
|
-
sx:
|
|
245
|
+
sx: n,
|
|
245
246
|
children: (t) => /* @__PURE__ */ v("span", {
|
|
246
|
-
...
|
|
247
|
+
...i,
|
|
247
248
|
ref: e,
|
|
248
249
|
id: o,
|
|
249
250
|
className: t,
|
|
250
251
|
"data-ui": "expandable-card-title",
|
|
251
|
-
children:
|
|
252
|
+
children: r
|
|
252
253
|
})
|
|
253
254
|
}) : null;
|
|
254
255
|
}
|
|
255
256
|
H.displayName = "ExpandableCard.Title";
|
|
256
|
-
function U({ ref: e, className:
|
|
257
|
-
let { descriptionId: o, setHasDescription: c } = D("Description"), l = s(
|
|
258
|
-
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(
|
|
259
|
-
className:
|
|
257
|
+
function U({ ref: e, className: t, sx: n, children: r, ...i }) {
|
|
258
|
+
let { descriptionId: o, setHasDescription: c } = D("Description"), l = s(r);
|
|
259
|
+
return d(() => (c(l), () => c(!1)), [l, c]), l ? /* @__PURE__ */ v(a, {
|
|
260
|
+
className: t,
|
|
260
261
|
styles: F,
|
|
261
|
-
sx:
|
|
262
|
+
sx: n,
|
|
262
263
|
children: (t) => /* @__PURE__ */ y("span", {
|
|
263
|
-
...
|
|
264
|
+
...i,
|
|
264
265
|
ref: e,
|
|
265
266
|
id: o,
|
|
266
267
|
className: t,
|
|
267
268
|
"data-ui": "expandable-card-description",
|
|
268
|
-
children: [" ",
|
|
269
|
+
children: [" ", r]
|
|
269
270
|
})
|
|
270
271
|
}) : null;
|
|
271
272
|
}
|
|
272
273
|
U.displayName = "ExpandableCard.Description";
|
|
273
|
-
function W({ ref: e, className:
|
|
274
|
-
let c = D("Content"), l = h(null), u = h(null), d =
|
|
274
|
+
function W({ ref: e, className: t, sx: n, children: r, "aria-labelledby": i, "aria-describedby": o, ...s }) {
|
|
275
|
+
let c = D("Content"), l = h(null), u = h(null), d = T([l, e]), f = S(0), m = S(+!!c.open), g = C(), _ = h(!1);
|
|
275
276
|
return p(() => {
|
|
276
277
|
let e = l.current, t = u.current;
|
|
277
278
|
if (!e || !t) return;
|
|
278
279
|
let n = 0, r = !1;
|
|
279
280
|
if (!c.open && e.contains(e.ownerDocument.activeElement) && c.triggerRef.current?.focus(), e.inert = !c.open, e.hidden = !c.open && !_.current, c.expandedWidth === void 0) return;
|
|
280
281
|
let i = (t) => {
|
|
281
|
-
e.style.blockSize = `${t}px`, c.open && t > 0 && m.get() === 0 && !m.isAnimating() &&
|
|
282
|
+
e.style.blockSize = `${t}px`, c.open && t > 0 && m.get() === 0 && !m.isAnimating() && x(m, 1, k);
|
|
282
283
|
}, a = f.on("change", i), o = m.on("change", (t) => {
|
|
283
284
|
e.style.opacity = String(t);
|
|
284
285
|
}), s = () => {
|
|
@@ -287,13 +288,13 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
287
288
|
let s = () => {
|
|
288
289
|
!r && a === n && !c.open && (e.hidden = !0);
|
|
289
290
|
};
|
|
290
|
-
!_.current || g ? (m.jump(+!!c.open), e.style.opacity = String(m.get()), f.jump(o), i(o), s(), _.current = !0) : c.open ? (f.get() > 0 &&
|
|
291
|
+
!_.current || g ? (m.jump(+!!c.open), e.style.opacity = String(m.get()), f.jump(o), i(o), s(), _.current = !0) : c.open ? (f.get() > 0 && x(m, 1, k), x(f, o, {
|
|
291
292
|
...O,
|
|
292
293
|
onComplete: s
|
|
293
|
-
})) :
|
|
294
|
+
})) : x(m, 0, {
|
|
294
295
|
...k,
|
|
295
296
|
onComplete: () => {
|
|
296
|
-
!r && a === n &&
|
|
297
|
+
!r && a === n && x(f, o, {
|
|
297
298
|
...O,
|
|
298
299
|
onComplete: s
|
|
299
300
|
});
|
|
@@ -312,10 +313,10 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
312
313
|
f,
|
|
313
314
|
m,
|
|
314
315
|
g
|
|
315
|
-
]), /* @__PURE__ */ v(
|
|
316
|
-
className:
|
|
316
|
+
]), /* @__PURE__ */ v(a, {
|
|
317
|
+
className: t,
|
|
317
318
|
styles: I,
|
|
318
|
-
sx:
|
|
319
|
+
sx: n,
|
|
319
320
|
children: (e) => /* @__PURE__ */ v("div", {
|
|
320
321
|
...s,
|
|
321
322
|
ref: d,
|
|
@@ -325,13 +326,13 @@ function W({ ref: e, className: n, sx: r, children: i, "aria-labelledby": a, "ar
|
|
|
325
326
|
"data-ui": "expandable-card-content",
|
|
326
327
|
hidden: !c.open,
|
|
327
328
|
"aria-hidden": !c.open || void 0,
|
|
328
|
-
"aria-labelledby": z(
|
|
329
|
+
"aria-labelledby": z(i, c.hasTitle ? c.titleId : c.triggerId),
|
|
329
330
|
"aria-describedby": z(o, c.hasDescription && c.descriptionId),
|
|
330
331
|
children: /* @__PURE__ */ v("div", {
|
|
331
332
|
ref: u,
|
|
332
333
|
css: L,
|
|
333
334
|
style: { inlineSize: c.expandedWidth },
|
|
334
|
-
children:
|
|
335
|
+
children: r
|
|
335
336
|
})
|
|
336
337
|
})
|
|
337
338
|
});
|
package/dist/expandable-card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ExpandableCard } from "./expandable-card-
|
|
2
|
+
export { t as ExpandableCard } from "./expandable-card-W97vjix9.js";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { n } from "./media-8yrN85VT.js";
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./media-8yrN85VT.js";
|
|
4
|
+
import { t as n } from "./sx-BJXJ2xJK.js";
|
|
4
5
|
import { t as r } from "./use-controlled-state-DpeVQZNR.js";
|
|
5
6
|
import { t as i } from "./renderable-DzcIj1Lo.js";
|
|
6
|
-
import { t as a } from "./button-
|
|
7
|
-
import { t as o } from "./search-field-
|
|
7
|
+
import { t as a } from "./button-C6OV0C7J.js";
|
|
8
|
+
import { t as o } from "./search-field-CbsajaZb.js";
|
|
8
9
|
import { useId as ee, useLayoutEffect as s, useRef as c, useState as te } from "react";
|
|
9
10
|
import { vars as l } from "@jfrader/tokens/vars";
|
|
10
11
|
import { jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { animate as f, useMotionValue as p } from "motion/react";
|
|
13
|
+
import { base as m } from "@jfrader/tokens";
|
|
14
|
+
import { useMergeRefs as h } from "@floating-ui/react";
|
|
14
15
|
//#region src/components/expanding-search/expanding-search.tsx
|
|
15
16
|
var g = {
|
|
16
17
|
type: "spring",
|
|
17
|
-
visualDuration: Number.parseFloat(
|
|
18
|
+
visualDuration: Number.parseFloat(m.motion.duration.slow) / 1e3,
|
|
18
19
|
bounce: 0
|
|
19
20
|
}, ne = "(prefers-reduced-motion: reduce)", re = e({
|
|
20
21
|
position: "relative",
|
|
@@ -62,7 +63,7 @@ var g = {
|
|
|
62
63
|
borderRadius: "var(--expanding-search-radius)",
|
|
63
64
|
borderColor: l.color.borderControl,
|
|
64
65
|
backgroundColor: l.color.surfaceRaised,
|
|
65
|
-
[
|
|
66
|
+
[t]: {
|
|
66
67
|
borderColor: "ButtonText",
|
|
67
68
|
color: "ButtonText"
|
|
68
69
|
}
|
|
@@ -88,8 +89,8 @@ var g = {
|
|
|
88
89
|
r: "6.5"
|
|
89
90
|
}), /* @__PURE__ */ u("path", { d: "m16 16 5 5" })]
|
|
90
91
|
}), le = (e, t) => e?.expanded === t.expanded && e.size === t.size && e.radius === t.radius;
|
|
91
|
-
function b({ ref: e, inputRef:
|
|
92
|
-
let [V = !1, H] = r(b, ue, x), U = c(null), W = c(null), G = c(null), K = c(null), q = c(null), he =
|
|
92
|
+
function b({ ref: e, inputRef: t, triggerLabel: m, open: b, defaultOpen: ue = !1, onOpenChange: x, anchor: S = "end", expandedWidth: C = `calc(${l.space[12]} * 8)`, size: w = "md", disabled: T, value: de, defaultValue: fe, onValueChange: pe, label: E, description: D, error: O, clearable: k, messages: A, searchIcon: j = y, clearIcon: M, slotProps: N, inputProps: P, className: F, sx: I, dir: L, style: R, onKeyDown: z, onBlur: B, ...me }) {
|
|
93
|
+
let [V = !1, H] = r(b, ue, x), U = c(null), W = c(null), G = c(null), K = c(null), q = c(null), he = h([U, e]), ge = h([G, t]), J = ee(), Y = c(null), [X, _e] = te(), Z = p(0), Q = p(0), $ = c(void 0);
|
|
93
94
|
s(() => {
|
|
94
95
|
let e = U.current, t = q.current;
|
|
95
96
|
if (!e || !t) return;
|
|
@@ -120,7 +121,7 @@ function b({ ref: e, inputRef: n, triggerLabel: h, open: b, defaultOpen: ue = !1
|
|
|
120
121
|
}, r = () => {
|
|
121
122
|
Z.jump(t.width), Q.jump(t.radius), n();
|
|
122
123
|
}, i = [Z.on("change", n), Q.on("change", n)], a = e.ownerDocument.defaultView?.matchMedia(ne);
|
|
123
|
-
$.current === void 0 || $.current === V || a?.matches ? r() : (
|
|
124
|
+
$.current === void 0 || $.current === V || a?.matches ? r() : (f(Z, t.width, g), f(Q, t.radius, g)), $.current = V;
|
|
124
125
|
let o = () => {
|
|
125
126
|
a?.matches && r();
|
|
126
127
|
};
|
|
@@ -138,8 +139,8 @@ function b({ ref: e, inputRef: n, triggerLabel: h, open: b, defaultOpen: ue = !1
|
|
|
138
139
|
let t = e.ownerDocument.activeElement;
|
|
139
140
|
V && Y.current === "input" ? (Y.current = null, (e.contains(t) || t === e.ownerDocument.body) && G.current?.focus()) : !V && Y.current === "trigger" && (Y.current = null, (e.contains(t) || t === e.ownerDocument.body) && K.current?.focus());
|
|
140
141
|
}, [V]);
|
|
141
|
-
let ve = P?.["aria-label"] ?? (!i(E) || E === "" ?
|
|
142
|
-
return /* @__PURE__ */ u(
|
|
142
|
+
let ve = P?.["aria-label"] ?? (!i(E) || E === "" ? m : void 0);
|
|
143
|
+
return /* @__PURE__ */ u(n, {
|
|
143
144
|
className: F,
|
|
144
145
|
styles: [re, ie[w]],
|
|
145
146
|
sx: I,
|
|
@@ -182,7 +183,7 @@ function b({ ref: e, inputRef: n, triggerLabel: h, open: b, defaultOpen: ue = !1
|
|
|
182
183
|
size: w,
|
|
183
184
|
variant: "outline",
|
|
184
185
|
disabled: T,
|
|
185
|
-
"aria-label":
|
|
186
|
+
"aria-label": m,
|
|
186
187
|
"aria-expanded": V,
|
|
187
188
|
"aria-controls": J,
|
|
188
189
|
css: oe,
|
package/dist/expanding-search.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ExpandingSearch } from "./expanding-search-
|
|
2
|
+
export { t as ExpandingSearch } from "./expanding-search-Bb2_YfNx.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { t } from "./sx-BJXJ2xJK.js";
|
|
3
4
|
import { t as n } from "./renderable-DzcIj1Lo.js";
|
|
4
5
|
import { useId as r } from "react";
|
|
5
6
|
import { vars as i } from "@jfrader/tokens/vars";
|
|
@@ -1,13 +1,14 @@
|
|
|
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-latest-callback-cj1OOQL6.js";
|
|
6
7
|
import { t as ee } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
|
-
import { t as te } from "./visually-hidden-
|
|
8
|
+
import { t as te } from "./visually-hidden-DgVO3NaB.js";
|
|
8
9
|
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
9
|
-
import { t as ne } from "./button-
|
|
10
|
-
import { t as re } from "./progress-
|
|
10
|
+
import { t as ne } from "./button-C6OV0C7J.js";
|
|
11
|
+
import { t as re } from "./progress-Bcuz3Ob4.js";
|
|
11
12
|
import { useEffect as s, useId as ie, useRef as c, useState as l } from "react";
|
|
12
13
|
import { vars as u } from "@jfrader/tokens/vars";
|
|
13
14
|
import { createElement as ae } from "@emotion/react";
|
|
@@ -33,13 +34,13 @@ var oe = e({
|
|
|
33
34
|
transitionProperty: "background-color, border-color",
|
|
34
35
|
transitionDuration: u.motion.duration.fast,
|
|
35
36
|
transitionTimingFunction: u.motion.easeStandard,
|
|
36
|
-
"&:has(input:focus-visible)":
|
|
37
|
+
"&:has(input:focus-visible)": t,
|
|
37
38
|
"&[data-dragging=\"true\"]": {
|
|
38
39
|
borderStyle: "solid",
|
|
39
40
|
backgroundColor: u.color.surfaceHover
|
|
40
41
|
},
|
|
41
|
-
[
|
|
42
|
-
[
|
|
42
|
+
[r]: { transitionDuration: "0s" },
|
|
43
|
+
[n]: { borderColor: "ButtonText" }
|
|
43
44
|
}), ce = e({
|
|
44
45
|
display: "grid",
|
|
45
46
|
justifyItems: "center",
|
|
@@ -138,8 +139,8 @@ function ke(e, t) {
|
|
|
138
139
|
maximumFractionDigits: 1
|
|
139
140
|
}).format(e / h ** Math.max(0, n));
|
|
140
141
|
}
|
|
141
|
-
function v({ ref: e, value:
|
|
142
|
-
let j = ie(), qe = c(
|
|
142
|
+
function v({ ref: e, value: t, defaultValue: n = Ce, onValueChange: r, onReject: u, accept: h, multiple: g = !0, maxFiles: v = we, maxSize: y, validate: Ae, onUpload: b, listPlacement: x = "below", compactAt: S, label: C, description: w, note: je, dropLabel: T, error: E, messages: D, locale: Me, disabled: O = !1, readOnly: k = !1, required: Ne = !1, size: Pe = "md", paste: Fe = !0, renderFileIcon: Ie, name: Le, inputRef: Re, slotProps: A, className: ze, sx: Be, onDragEnter: Ve, onDragOver: He, onDragLeave: Ue, onDrop: We, onPaste: Ge, ...Ke }) {
|
|
143
|
+
let j = ie(), qe = c(n), [M = Ce, Je, Ye] = ee(t, qe.current, r), N = c(null), P = c(null), Xe = p([P, e]), Ze = p([N, Re]), F = c(/* @__PURE__ */ new Map()), I = c(/* @__PURE__ */ new Map()), L = c(/* @__PURE__ */ new Map()), R = c(null), [, Qe] = l(0), z = () => Qe((e) => e + 1), [B, V] = l(!1), H = c(0), [U, $e] = l([]), [et, W] = l(""), [tt, nt] = l(/* @__PURE__ */ new Set()), G = O || k, K = o(C) && C !== "", rt = o(w), q = o(je), J = o(E) || U.length > 0, Y = A?.input, it = Y?.id ?? `${j}-input`, at = [
|
|
143
144
|
Y?.["aria-describedby"],
|
|
144
145
|
rt && `${j}-description`,
|
|
145
146
|
q && `${j}-note`,
|
|
@@ -194,7 +195,7 @@ function v({ ref: e, value: n, defaultValue: r = Ce, onValueChange: i, onReject:
|
|
|
194
195
|
L.current.clear(), I.current.clear();
|
|
195
196
|
}, []);
|
|
196
197
|
let lt = a(() => {
|
|
197
|
-
I.current.clear(), $e([]), W(""),
|
|
198
|
+
I.current.clear(), $e([]), W(""), t === void 0 ? Ye() : X(qe.current);
|
|
198
199
|
});
|
|
199
200
|
s(() => {
|
|
200
201
|
let e = N.current?.form, t = (e) => {
|
|
@@ -325,7 +326,7 @@ function v({ ref: e, value: n, defaultValue: r = Ce, onValueChange: i, onReject:
|
|
|
325
326
|
}));
|
|
326
327
|
})
|
|
327
328
|
}), $ = S !== void 0 && S > 0 && M.length >= S && !B;
|
|
328
|
-
return /* @__PURE__ */ d(
|
|
329
|
+
return /* @__PURE__ */ d(i, {
|
|
329
330
|
className: [A?.root?.className, ze].filter(Boolean).join(" "),
|
|
330
331
|
styles: [oe, A?.root?.css],
|
|
331
332
|
sx: Be,
|
package/dist/file-dropzone.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as FileDropzone } from "./file-dropzone-
|
|
2
|
+
export { t as FileDropzone } from "./file-dropzone-Bi5ikRIz.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
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 } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as r } from "./sx-BJXJ2xJK.js";
|
|
5
6
|
import { t as i } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
7
|
import { t as a } from "./renderable-DzcIj1Lo.js";
|
|
7
|
-
import { t as o } from "./button-
|
|
8
|
+
import { t as o } from "./button-C6OV0C7J.js";
|
|
8
9
|
import { createContext as s, useContext as c, useLayoutEffect as l, useMemo as u, useRef as d } from "react";
|
|
9
10
|
import { vars as f } from "@jfrader/tokens/vars";
|
|
10
11
|
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
@@ -58,8 +59,8 @@ var T = e({
|
|
|
58
59
|
color: f.color.text,
|
|
59
60
|
fontFamily: f.font.sans,
|
|
60
61
|
fontSize: f.textSize.sm,
|
|
61
|
-
"&:focus":
|
|
62
|
-
[
|
|
62
|
+
"&:focus": t,
|
|
63
|
+
[n]: {
|
|
63
64
|
borderColor: "CanvasText",
|
|
64
65
|
backgroundColor: "Canvas",
|
|
65
66
|
color: "CanvasText"
|
|
@@ -79,7 +80,7 @@ var T = e({
|
|
|
79
80
|
borderRadius: f.radius.full,
|
|
80
81
|
backgroundColor: f.color.surfaceHover,
|
|
81
82
|
color: f.color.text,
|
|
82
|
-
[
|
|
83
|
+
[n]: {
|
|
83
84
|
borderColor: "CanvasText",
|
|
84
85
|
backgroundColor: "Canvas",
|
|
85
86
|
color: "CanvasText"
|
|
@@ -97,7 +98,7 @@ var T = e({
|
|
|
97
98
|
padding: 0,
|
|
98
99
|
borderRadius: f.radius.full,
|
|
99
100
|
color: f.color.text,
|
|
100
|
-
[
|
|
101
|
+
[n]: { borderColor: "ButtonText" }
|
|
101
102
|
}), N = e({
|
|
102
103
|
alignSelf: "flex-start",
|
|
103
104
|
maxInlineSize: "100%",
|
|
@@ -107,7 +108,7 @@ var T = e({
|
|
|
107
108
|
whiteSpace: "normal",
|
|
108
109
|
overflowWrap: "anywhere",
|
|
109
110
|
borderColor: f.color.borderControl,
|
|
110
|
-
[
|
|
111
|
+
[n]: { borderColor: "ButtonText" }
|
|
111
112
|
}), P = e({
|
|
112
113
|
margin: 0,
|
|
113
114
|
minInlineSize: 0,
|
|
@@ -116,8 +117,8 @@ var T = e({
|
|
|
116
117
|
fontSize: f.textSize.sm,
|
|
117
118
|
lineHeight: f.lineHeight.base
|
|
118
119
|
});
|
|
119
|
-
function F({ ref: e, value:
|
|
120
|
-
let [O = g, k] = i(
|
|
120
|
+
function F({ ref: e, value: t, defaultValue: n = g, onValueChange: a, disabled: o = !1, label: s = "Filters", messages: c, className: f, sx: m, children: y, "aria-label": b, "aria-labelledby": w, tabIndex: T = -1, ...D }) {
|
|
121
|
+
let [O = g, k] = i(t, n, a), A = u(() => x(O), [O]), j = d(null), M = h([j, e]), N = d(null), P = u(() => ({
|
|
121
122
|
...v,
|
|
122
123
|
...c
|
|
123
124
|
}), [c]), F = u(() => {
|
|
@@ -166,7 +167,7 @@ function F({ ref: e, value: n, defaultValue: r = g, onValueChange: a, disabled:
|
|
|
166
167
|
(a ?? o ?? t).focus();
|
|
167
168
|
}, [A]), /* @__PURE__ */ p(C.Provider, {
|
|
168
169
|
value: F,
|
|
169
|
-
children: /* @__PURE__ */ p(
|
|
170
|
+
children: /* @__PURE__ */ p(r, {
|
|
170
171
|
className: f,
|
|
171
172
|
styles: E,
|
|
172
173
|
sx: m,
|
|
@@ -186,12 +187,12 @@ function F({ ref: e, value: n, defaultValue: r = g, onValueChange: a, disabled:
|
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
F.displayName = "FilterToolbar";
|
|
189
|
-
function I({ children: e, className:
|
|
190
|
+
function I({ children: e, className: t, sx: n, ...i }) {
|
|
190
191
|
let { value: a, disabled: o, onValueChange: s } = w("Controls");
|
|
191
|
-
return /* @__PURE__ */ p(
|
|
192
|
-
className:
|
|
192
|
+
return /* @__PURE__ */ p(r, {
|
|
193
|
+
className: t,
|
|
193
194
|
styles: T,
|
|
194
|
-
sx:
|
|
195
|
+
sx: n,
|
|
195
196
|
children: (t) => /* @__PURE__ */ p("div", {
|
|
196
197
|
...i,
|
|
197
198
|
"data-ui": "filter-toolbar-controls",
|
|
@@ -205,29 +206,29 @@ function I({ children: e, className: n, sx: r, ...i }) {
|
|
|
205
206
|
});
|
|
206
207
|
}
|
|
207
208
|
I.displayName = "FilterToolbar.Controls";
|
|
208
|
-
function L({ empty: e, slotProps:
|
|
209
|
+
function L({ empty: e, slotProps: t, className: n, sx: i, ...s }) {
|
|
209
210
|
let { value: c, disabled: l, messages: u, remove: d } = w("ActiveFilters");
|
|
210
|
-
return /* @__PURE__ */ p(
|
|
211
|
-
className:
|
|
211
|
+
return /* @__PURE__ */ p(r, {
|
|
212
|
+
className: n,
|
|
212
213
|
styles: T,
|
|
213
214
|
sx: i,
|
|
214
|
-
children: (
|
|
215
|
+
children: (n) => /* @__PURE__ */ p("div", {
|
|
215
216
|
...s,
|
|
216
217
|
"data-ui": "filter-toolbar-active-filters",
|
|
217
|
-
className:
|
|
218
|
+
className: n,
|
|
218
219
|
children: c.length > 0 ? /* @__PURE__ */ p("ul", {
|
|
219
|
-
className:
|
|
220
|
+
className: t?.list?.className,
|
|
220
221
|
css: [
|
|
221
222
|
T,
|
|
222
223
|
D,
|
|
223
|
-
|
|
224
|
+
t?.list?.css
|
|
224
225
|
],
|
|
225
226
|
children: c.map((e) => /* @__PURE__ */ m("li", {
|
|
226
|
-
className:
|
|
227
|
-
css: [O,
|
|
227
|
+
className: t?.chip?.className,
|
|
228
|
+
css: [O, t?.chip?.css],
|
|
228
229
|
children: [/* @__PURE__ */ m("span", {
|
|
229
|
-
className:
|
|
230
|
-
css: [k,
|
|
230
|
+
className: t?.label?.className,
|
|
231
|
+
css: [k, t?.label?.css],
|
|
231
232
|
children: [/* @__PURE__ */ m("span", {
|
|
232
233
|
css: A,
|
|
233
234
|
children: [e.label, ": "]
|
|
@@ -242,8 +243,8 @@ function L({ empty: e, slotProps: n, className: r, sx: i, ...s }) {
|
|
|
242
243
|
"aria-label": u.remove(e),
|
|
243
244
|
"data-ui": "filter-toolbar-remove",
|
|
244
245
|
"data-filter-id": e.id,
|
|
245
|
-
className:
|
|
246
|
-
css: [M,
|
|
246
|
+
className: t?.remove?.className,
|
|
247
|
+
css: [M, t?.remove?.css],
|
|
247
248
|
onClick: (t) => d(e, t.currentTarget),
|
|
248
249
|
render: (e) => /* @__PURE__ */ p("button", {
|
|
249
250
|
...e,
|
|
@@ -284,10 +285,10 @@ function R({ children: e, onClick: t, disabled: n = !1, css: r, ...i }) {
|
|
|
284
285
|
});
|
|
285
286
|
}
|
|
286
287
|
R.displayName = "FilterToolbar.Clear";
|
|
287
|
-
function z({ count: e, locale:
|
|
288
|
+
function z({ count: e, locale: t, formatCount: n = b, loading: i = !1, loadingLabel: a = "Loading results", unknownLabel: o = "Results unavailable", className: s, sx: c, ...l }) {
|
|
288
289
|
w("ResultCount");
|
|
289
|
-
let u = e !== null && Number.isFinite(e) && Number.isInteger(e) && e >= 0 ?
|
|
290
|
-
return /* @__PURE__ */ p(
|
|
290
|
+
let u = e !== null && Number.isFinite(e) && Number.isInteger(e) && e >= 0 ? n(e, new Intl.NumberFormat(t).format(e)) : o;
|
|
291
|
+
return /* @__PURE__ */ p(r, {
|
|
291
292
|
className: s,
|
|
292
293
|
styles: P,
|
|
293
294
|
sx: c,
|
package/dist/filter-toolbar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as FilterToolbar } from "./filter-toolbar-
|
|
2
|
+
export { t as FilterToolbar } from "./filter-toolbar-QRnC4S_H.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/flex/flex.tsx
|
|
6
6
|
function r({ ref: r, direction: i, wrap: a, inline: o, align: s, justify: c, gap: l, className: u, sx: d, ...f }) {
|
package/dist/flex.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Flex } from "./flex-
|
|
2
|
+
export { t as Flex } from "./flex-CS7eMRcK.js";
|