@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
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e } from "./css-BYJhdGh-.js";
|
|
3
|
+
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n, r } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as i } from "./sx-BJXJ2xJK.js";
|
|
6
|
+
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
7
|
+
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
8
|
+
import { i as s, n as c, r as l, t as u } from "./surface-C69kwSuk.js";
|
|
9
|
+
import { t as d } from "./trigger-style-CtOrdPk4.js";
|
|
10
|
+
import { i as f, n as p, r as m, t as h } from "./use-native-dialog-FB0p7lkg.js";
|
|
11
|
+
import { t as g } from "./presence-spring-4zwtUDQN.js";
|
|
12
|
+
import { c as _, o as v, s as y, t as b } from "./theme-scope-DGWy4H0C.js";
|
|
13
|
+
import { createContext as x, useCallback as S, useContext as C, useEffect as w, useId as T, useMemo as E, useRef as D, useState as O } from "react";
|
|
14
|
+
import { vars as k } from "@jfrader/tokens/vars";
|
|
15
|
+
import { jsx as A } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { animate as j } from "motion/react";
|
|
17
|
+
import { useMergeRefs as M } from "@floating-ui/react";
|
|
18
|
+
//#region src/components/drawer/drawer.tsx
|
|
19
|
+
var N = x(null), P = x(null);
|
|
20
|
+
function F(e) {
|
|
21
|
+
let t = C(N);
|
|
22
|
+
if (!t) throw Error(`Drawer.${e} must be rendered inside <Drawer>.`);
|
|
23
|
+
return t;
|
|
24
|
+
}
|
|
25
|
+
var I = 1 / 3, ee = 500, L = .2, R = 100, te = {
|
|
26
|
+
type: "spring",
|
|
27
|
+
stiffness: 400,
|
|
28
|
+
damping: 40,
|
|
29
|
+
mass: 1
|
|
30
|
+
}, z = [
|
|
31
|
+
"button",
|
|
32
|
+
"a[href]",
|
|
33
|
+
"input",
|
|
34
|
+
"select",
|
|
35
|
+
"textarea",
|
|
36
|
+
"label",
|
|
37
|
+
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
38
|
+
"[data-ui~=\"drawer-title\"]",
|
|
39
|
+
"[data-ui~=\"drawer-description\"]"
|
|
40
|
+
].join(", "), ne = "[aria-expanded=\"true\"][aria-haspopup]", B = {
|
|
41
|
+
sm: "22rem",
|
|
42
|
+
md: "30rem",
|
|
43
|
+
lg: "38rem"
|
|
44
|
+
}, V = "32rem", H = k.space[3], U = "@media (max-width: 40rem)", W = k.space[6], G = k.space[5], K = {
|
|
45
|
+
top: "env(safe-area-inset-top, 0px)",
|
|
46
|
+
bottom: "env(safe-area-inset-bottom, 0px)"
|
|
47
|
+
}, re = e({
|
|
48
|
+
...u,
|
|
49
|
+
position: "fixed",
|
|
50
|
+
inset: 0,
|
|
51
|
+
margin: 0,
|
|
52
|
+
inlineSize: "100%",
|
|
53
|
+
blockSize: "100%",
|
|
54
|
+
maxInlineSize: "none",
|
|
55
|
+
maxBlockSize: "none",
|
|
56
|
+
overflow: "clip",
|
|
57
|
+
"&::backdrop": { opacity: "var(--drawer-presence, 1)" },
|
|
58
|
+
"&[open]": { display: "flex" }
|
|
59
|
+
}), ie = {
|
|
60
|
+
"inline-start": e({
|
|
61
|
+
flexDirection: "row",
|
|
62
|
+
justifyContent: "flex-start"
|
|
63
|
+
}),
|
|
64
|
+
"inline-end": e({
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
justifyContent: "flex-end"
|
|
67
|
+
}),
|
|
68
|
+
top: e({
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
justifyContent: "flex-start"
|
|
71
|
+
}),
|
|
72
|
+
bottom: e({
|
|
73
|
+
flexDirection: "column",
|
|
74
|
+
justifyContent: "flex-end"
|
|
75
|
+
})
|
|
76
|
+
}, ae = e({
|
|
77
|
+
...c,
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
minBlockSize: 0,
|
|
81
|
+
borderWidth: 0,
|
|
82
|
+
boxShadow: k.shadow.floating,
|
|
83
|
+
[n]: {
|
|
84
|
+
boxShadow: "none",
|
|
85
|
+
borderColor: "CanvasText"
|
|
86
|
+
}
|
|
87
|
+
}), q = {
|
|
88
|
+
blockSize: "100%",
|
|
89
|
+
paddingBlockStart: K.top
|
|
90
|
+
}, oe = {
|
|
91
|
+
"inline-start": e({
|
|
92
|
+
...q,
|
|
93
|
+
borderInlineEndWidth: "1px",
|
|
94
|
+
borderStartEndRadius: k.radius.lg,
|
|
95
|
+
borderEndEndRadius: k.radius.lg,
|
|
96
|
+
[n]: { borderInlineEndWidth: "2px" }
|
|
97
|
+
}),
|
|
98
|
+
"inline-end": e({
|
|
99
|
+
...q,
|
|
100
|
+
borderInlineStartWidth: "1px",
|
|
101
|
+
borderStartStartRadius: k.radius.lg,
|
|
102
|
+
borderEndStartRadius: k.radius.lg,
|
|
103
|
+
[n]: { borderInlineStartWidth: "2px" }
|
|
104
|
+
}),
|
|
105
|
+
top: e({
|
|
106
|
+
inlineSize: "100%",
|
|
107
|
+
maxBlockSize: `min(${V}, 100dvh)`,
|
|
108
|
+
paddingBlockStart: K.top,
|
|
109
|
+
borderBlockEndWidth: "1px",
|
|
110
|
+
borderEndStartRadius: k.radius.lg,
|
|
111
|
+
borderEndEndRadius: k.radius.lg,
|
|
112
|
+
[n]: { borderBlockEndWidth: "2px" }
|
|
113
|
+
}),
|
|
114
|
+
bottom: e({
|
|
115
|
+
inlineSize: "100%",
|
|
116
|
+
maxBlockSize: `min(${V}, 100dvh)`,
|
|
117
|
+
borderBlockStartWidth: "1px",
|
|
118
|
+
borderStartStartRadius: k.radius.lg,
|
|
119
|
+
borderStartEndRadius: k.radius.lg,
|
|
120
|
+
[n]: { borderBlockStartWidth: "2px" }
|
|
121
|
+
})
|
|
122
|
+
}, se = Object.fromEntries(Object.entries(B).map(([t, n]) => [t, e({
|
|
123
|
+
inlineSize: `min(${n}, calc(100% - ${H}))`,
|
|
124
|
+
[U]: { inlineSize: `calc(100% - ${H})` }
|
|
125
|
+
})])), J = {
|
|
126
|
+
paddingInline: W,
|
|
127
|
+
[U]: { paddingInline: G }
|
|
128
|
+
}, ce = e({
|
|
129
|
+
...J,
|
|
130
|
+
display: "grid",
|
|
131
|
+
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
132
|
+
alignItems: "start",
|
|
133
|
+
columnGap: k.space[4],
|
|
134
|
+
flexShrink: 0,
|
|
135
|
+
paddingBlock: W,
|
|
136
|
+
borderBlockEnd: `1px solid ${k.color.border}`,
|
|
137
|
+
"& > *": { gridColumn: 1 },
|
|
138
|
+
"& > [data-ui~=\"drawer-close\"]": {
|
|
139
|
+
gridColumn: 2,
|
|
140
|
+
gridRow: 1
|
|
141
|
+
},
|
|
142
|
+
[U]: { paddingBlock: G }
|
|
143
|
+
}), le = e({
|
|
144
|
+
cursor: "grab",
|
|
145
|
+
touchAction: "none",
|
|
146
|
+
"&[data-dragging]": { cursor: "grabbing" },
|
|
147
|
+
[r]: {
|
|
148
|
+
cursor: "auto",
|
|
149
|
+
touchAction: "auto"
|
|
150
|
+
}
|
|
151
|
+
}), Y = { "&:last-child": {
|
|
152
|
+
paddingBlockEnd: `calc(${W} + ${K.bottom})`,
|
|
153
|
+
[U]: { paddingBlockEnd: `calc(${G} + ${K.bottom})` }
|
|
154
|
+
} }, ue = e({
|
|
155
|
+
...J,
|
|
156
|
+
flex: "1 1 auto",
|
|
157
|
+
minBlockSize: 0,
|
|
158
|
+
overflow: "auto",
|
|
159
|
+
overscrollBehavior: "contain",
|
|
160
|
+
paddingBlock: k.space[5],
|
|
161
|
+
fontSize: k.textSize.sm,
|
|
162
|
+
...Y
|
|
163
|
+
}), de = e({
|
|
164
|
+
...J,
|
|
165
|
+
display: "flex",
|
|
166
|
+
flexWrap: "wrap",
|
|
167
|
+
justifyContent: "flex-end",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
gap: k.space[3],
|
|
170
|
+
flexShrink: 0,
|
|
171
|
+
paddingBlock: k.space[4],
|
|
172
|
+
borderBlockStart: `1px solid ${k.color.border}`,
|
|
173
|
+
...Y
|
|
174
|
+
}), fe = e({
|
|
175
|
+
margin: 0,
|
|
176
|
+
fontSize: k.textSize.lg,
|
|
177
|
+
fontWeight: k.fontWeight.semibold,
|
|
178
|
+
lineHeight: k.lineHeight.tight
|
|
179
|
+
}), pe = e({
|
|
180
|
+
margin: 0,
|
|
181
|
+
marginBlockStart: k.space[2],
|
|
182
|
+
fontSize: k.textSize.sm,
|
|
183
|
+
color: k.color.textMuted
|
|
184
|
+
}), me = e({
|
|
185
|
+
appearance: "none",
|
|
186
|
+
display: "inline-flex",
|
|
187
|
+
alignItems: "center",
|
|
188
|
+
justifyContent: "center",
|
|
189
|
+
gap: k.space[2],
|
|
190
|
+
boxSizing: "border-box",
|
|
191
|
+
minBlockSize: k.space[8],
|
|
192
|
+
minInlineSize: k.space[8],
|
|
193
|
+
border: "1px solid transparent",
|
|
194
|
+
borderRadius: k.radius.md,
|
|
195
|
+
backgroundColor: "transparent",
|
|
196
|
+
paddingBlock: k.space[1],
|
|
197
|
+
paddingInline: k.space[3],
|
|
198
|
+
font: "inherit",
|
|
199
|
+
fontSize: k.textSize.sm,
|
|
200
|
+
fontWeight: k.fontWeight.medium,
|
|
201
|
+
color: k.color.textMuted,
|
|
202
|
+
cursor: "pointer",
|
|
203
|
+
transitionProperty: "background-color, color",
|
|
204
|
+
transitionDuration: k.motion.duration.fast,
|
|
205
|
+
transitionTimingFunction: k.motion.easeStandard,
|
|
206
|
+
"&:hover:not(:disabled)": {
|
|
207
|
+
backgroundColor: k.color.surfaceHover,
|
|
208
|
+
color: k.color.text
|
|
209
|
+
},
|
|
210
|
+
"&:focus-visible": { ...t },
|
|
211
|
+
"&:disabled": {
|
|
212
|
+
opacity: .55,
|
|
213
|
+
cursor: "not-allowed"
|
|
214
|
+
},
|
|
215
|
+
[r]: { transitionDuration: "0s" },
|
|
216
|
+
[n]: {
|
|
217
|
+
borderColor: "ButtonText",
|
|
218
|
+
"&:focus-visible": { outlineColor: "Highlight" }
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
function he(e) {
|
|
222
|
+
return o(e) && e !== "";
|
|
223
|
+
}
|
|
224
|
+
function ge({ open: e, defaultOpen: t = !1, onOpenChange: n, side: r = "inline-end", size: i = "md", draggable: o = !1, children: s }) {
|
|
225
|
+
let c = T(), [l = !1, u] = a(e, t, n), { setDialogElement: d, setOpen: p, requestClose: m, repairToken: h } = f(l, u), [g, _] = O(!1), [v, y] = O(!1), b = E(() => ({
|
|
226
|
+
open: l,
|
|
227
|
+
setOpen: p,
|
|
228
|
+
requestClose: m,
|
|
229
|
+
repairToken: h,
|
|
230
|
+
setDialogElement: d,
|
|
231
|
+
side: r,
|
|
232
|
+
size: i,
|
|
233
|
+
draggable: o,
|
|
234
|
+
titleId: `${c}-title`,
|
|
235
|
+
descriptionId: `${c}-description`,
|
|
236
|
+
hasTitle: g,
|
|
237
|
+
hasDescription: v,
|
|
238
|
+
setHasTitle: _,
|
|
239
|
+
setHasDescription: y
|
|
240
|
+
}), [
|
|
241
|
+
l,
|
|
242
|
+
p,
|
|
243
|
+
m,
|
|
244
|
+
h,
|
|
245
|
+
d,
|
|
246
|
+
r,
|
|
247
|
+
i,
|
|
248
|
+
o,
|
|
249
|
+
c,
|
|
250
|
+
g,
|
|
251
|
+
v
|
|
252
|
+
]);
|
|
253
|
+
return /* @__PURE__ */ A(N.Provider, {
|
|
254
|
+
value: b,
|
|
255
|
+
children: s
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
ge.displayName = "Drawer";
|
|
259
|
+
function _e({ ref: e, onClick: t, className: n, sx: r, ...a }) {
|
|
260
|
+
let { open: o, setOpen: s } = F("Trigger"), c = (e) => {
|
|
261
|
+
t?.(e), e.defaultPrevented || s(!0);
|
|
262
|
+
};
|
|
263
|
+
return /* @__PURE__ */ A(i, {
|
|
264
|
+
className: n,
|
|
265
|
+
styles: d,
|
|
266
|
+
sx: r,
|
|
267
|
+
children: (t) => /* @__PURE__ */ A("button", {
|
|
268
|
+
type: "button",
|
|
269
|
+
...a,
|
|
270
|
+
ref: e,
|
|
271
|
+
"data-ui": "drawer-trigger",
|
|
272
|
+
"aria-haspopup": "dialog",
|
|
273
|
+
"aria-expanded": o,
|
|
274
|
+
onClick: c,
|
|
275
|
+
className: t
|
|
276
|
+
})
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
_e.displayName = "Drawer.Trigger";
|
|
280
|
+
var ve = "(prefers-reduced-motion: reduce)", ye = {
|
|
281
|
+
"inline-start": "x",
|
|
282
|
+
"inline-end": "x",
|
|
283
|
+
top: "y",
|
|
284
|
+
bottom: "y"
|
|
285
|
+
};
|
|
286
|
+
function be(e, t) {
|
|
287
|
+
return e === "top" ? -1 : e === "bottom" ? 1 : e === "inline-end" === t ? -1 : 1;
|
|
288
|
+
}
|
|
289
|
+
function X(e, t) {
|
|
290
|
+
let n = ye[t], r = e.getBoundingClientRect();
|
|
291
|
+
return {
|
|
292
|
+
axis: n,
|
|
293
|
+
sign: be(t, getComputedStyle(e).direction === "rtl"),
|
|
294
|
+
extent: n === "x" ? r.width : r.height
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function Z(e) {
|
|
298
|
+
return e.ownerDocument.defaultView?.matchMedia(ve).matches ?? !1;
|
|
299
|
+
}
|
|
300
|
+
function xe(e, t) {
|
|
301
|
+
let n = t * e.sign;
|
|
302
|
+
return t === 0 ? "" : e.axis === "x" ? `${n}px` : `0 ${n}px`;
|
|
303
|
+
}
|
|
304
|
+
function Se(e, t, n, r, i) {
|
|
305
|
+
let a = D(null), o = D(null), s = D(0), c = D(0), l = D(!1), u = S((e, t) => {
|
|
306
|
+
s.current = t, r.current && (r.current.style.translate = xe(e, t));
|
|
307
|
+
let i = 1 - Math.min(1, Math.max(0, t / Math.max(1, e.extent)));
|
|
308
|
+
i === 1 ? n.current?.style.removeProperty("--drawer-presence") : n.current?.style.setProperty("--drawer-presence", String(i));
|
|
309
|
+
}, [n, r]), d = S((e, t, n, r = 0) => (o.current?.stop(), o.current = j(s.current, t, {
|
|
310
|
+
...n,
|
|
311
|
+
velocity: r,
|
|
312
|
+
onUpdate: (t) => u(e, t)
|
|
313
|
+
}), o.current), [u]), f = S(() => {
|
|
314
|
+
o.current?.stop(), o.current = null, a.current?.header.removeAttribute("data-dragging"), a.current = null, c.current = 0, l.current = !1, s.current = 0, r.current && (r.current.style.translate = ""), n.current?.style.removeProperty("--drawer-presence");
|
|
315
|
+
}, [n, r]);
|
|
316
|
+
w(() => f, [f]);
|
|
317
|
+
let p = E(() => ({
|
|
318
|
+
enter: () => {
|
|
319
|
+
let e = r.current;
|
|
320
|
+
if (l.current = !1, c.current = 0, !e || Z(e)) {
|
|
321
|
+
f();
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
let n = X(e, t);
|
|
325
|
+
s.current <= 0 && u(n, n.extent), d(n, 0, g);
|
|
326
|
+
},
|
|
327
|
+
exit: () => {
|
|
328
|
+
let e = r.current;
|
|
329
|
+
if (!e || Z(e)) return;
|
|
330
|
+
a.current?.header.removeAttribute("data-dragging"), a.current = null, l.current = !0;
|
|
331
|
+
let n = X(e, t), i = c.current;
|
|
332
|
+
return c.current = 0, d(n, n.extent, g, i).finished;
|
|
333
|
+
}
|
|
334
|
+
}), [
|
|
335
|
+
t,
|
|
336
|
+
r,
|
|
337
|
+
u,
|
|
338
|
+
d,
|
|
339
|
+
f
|
|
340
|
+
]);
|
|
341
|
+
return {
|
|
342
|
+
headerGesture: E(() => {
|
|
343
|
+
if (!e) return null;
|
|
344
|
+
let n = (e, t) => {
|
|
345
|
+
let n = a.current;
|
|
346
|
+
if (!n || n.pointerId !== e.pointerId) return;
|
|
347
|
+
a.current = null, n.header.removeAttribute("data-dragging");
|
|
348
|
+
let r = n.axis === "x" ? e.clientX : e.clientY, o = [...n.samples, {
|
|
349
|
+
position: r,
|
|
350
|
+
time: e.timeStamp
|
|
351
|
+
}].filter((t) => e.timeStamp - t.time <= R), s = o[0], u = o.at(-1), f = s && u ? (u.time - s.time) / 1e3 : 0, p = s && u && f > 0 ? (u.position - s.position) * n.sign / f : 0;
|
|
352
|
+
t && (n.offset >= n.extent * I || p >= ee) && (c.current = p, i()), n.offset !== 0 && !l.current && d(n, 0, te, p);
|
|
353
|
+
};
|
|
354
|
+
return {
|
|
355
|
+
onPointerDown: (e) => {
|
|
356
|
+
let n = r.current;
|
|
357
|
+
if (!e.isPrimary || e.button !== 0 || !n || l.current || e.target instanceof Element && e.target.closest(z) || Z(n)) return;
|
|
358
|
+
o.current?.stop();
|
|
359
|
+
let i = X(n, t), c = i.axis === "x" ? e.clientX : e.clientY, u = s.current;
|
|
360
|
+
a.current = {
|
|
361
|
+
...i,
|
|
362
|
+
pointerId: e.pointerId,
|
|
363
|
+
header: e.currentTarget,
|
|
364
|
+
start: c - u * i.sign,
|
|
365
|
+
offset: u,
|
|
366
|
+
samples: [{
|
|
367
|
+
position: c,
|
|
368
|
+
time: e.timeStamp
|
|
369
|
+
}]
|
|
370
|
+
}, e.currentTarget.setPointerCapture?.(e.pointerId), e.currentTarget.setAttribute("data-dragging", "");
|
|
371
|
+
},
|
|
372
|
+
onPointerMove: (e) => {
|
|
373
|
+
let t = a.current;
|
|
374
|
+
if (!t || t.pointerId !== e.pointerId) return;
|
|
375
|
+
let n = t.axis === "x" ? e.clientX : e.clientY, r = (n - t.start) * t.sign;
|
|
376
|
+
t.offset = r >= 0 ? r : r * L, t.samples = [...t.samples, {
|
|
377
|
+
position: n,
|
|
378
|
+
time: e.timeStamp
|
|
379
|
+
}].filter((t) => e.timeStamp - t.time <= R), u(t, t.offset);
|
|
380
|
+
},
|
|
381
|
+
onPointerUp: (e) => n(e, !0),
|
|
382
|
+
onPointerCancel: (e) => n(e, !1),
|
|
383
|
+
onLostPointerCapture: (e) => n(e, !1)
|
|
384
|
+
};
|
|
385
|
+
}, [
|
|
386
|
+
e,
|
|
387
|
+
t,
|
|
388
|
+
r,
|
|
389
|
+
i,
|
|
390
|
+
u,
|
|
391
|
+
d
|
|
392
|
+
]),
|
|
393
|
+
reset: f,
|
|
394
|
+
transition: p
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
function Ce({ ref: e, className: t, sx: n, ...r }) {
|
|
398
|
+
let { children: a, onCancel: o, onClick: s, onClose: c, onKeyDownCapture: l, onKeyUp: u, "aria-labelledby": d, "aria-describedby": f, withDescription: g = !0, ..._ } = h(r), v = F("Content"), { setOpen: y, titleId: b, descriptionId: x, hasTitle: C, hasDescription: w, side: T, draggable: O } = v, k = D(null), j = D(null), M = D(!1), N = S(() => {
|
|
399
|
+
p(k.current, y);
|
|
400
|
+
}, [y]), { headerGesture: I, reset: ee, transition: L } = Se(O, T, k, j, N), R = (e) => {
|
|
401
|
+
M.current ? (M.current = !1, e.preventDefault()) : o?.(e);
|
|
402
|
+
}, te = (e) => {
|
|
403
|
+
ee(), c?.(e);
|
|
404
|
+
}, z = m({
|
|
405
|
+
...v,
|
|
406
|
+
requestClose: N
|
|
407
|
+
}, {
|
|
408
|
+
onCancel: R,
|
|
409
|
+
onClick: s,
|
|
410
|
+
onClose: te
|
|
411
|
+
}, e, k, L), B = (e, t) => (n) => n.target === k.current ? e(n) : t?.(n), V = {
|
|
412
|
+
...z,
|
|
413
|
+
onCancel: B(z.onCancel, o),
|
|
414
|
+
onClose: B(z.onClose, c),
|
|
415
|
+
onKeyDownCapture: (e) => {
|
|
416
|
+
l?.(e), e.key === "Escape" && (M.current = !!k.current?.querySelector(ne));
|
|
417
|
+
},
|
|
418
|
+
onKeyUp: (e) => {
|
|
419
|
+
u?.(e), e.key === "Escape" && (M.current = !1);
|
|
420
|
+
}
|
|
421
|
+
}, H = E(() => ({
|
|
422
|
+
requestClose: N,
|
|
423
|
+
panelRef: j,
|
|
424
|
+
headerGesture: I
|
|
425
|
+
}), [N, I]), U = [d, C && b].filter(Boolean).join(" ") || void 0, W = [f, g && w && x].filter(Boolean).join(" ") || void 0;
|
|
426
|
+
return /* @__PURE__ */ A(i, {
|
|
427
|
+
className: t,
|
|
428
|
+
styles: [re, ie[T]],
|
|
429
|
+
sx: n,
|
|
430
|
+
children: (e) => /* @__PURE__ */ A("dialog", {
|
|
431
|
+
..._,
|
|
432
|
+
...V,
|
|
433
|
+
"data-ui": "drawer",
|
|
434
|
+
"data-side": T,
|
|
435
|
+
"aria-modal": "true",
|
|
436
|
+
"aria-labelledby": U,
|
|
437
|
+
"aria-describedby": W,
|
|
438
|
+
className: e,
|
|
439
|
+
children: /* @__PURE__ */ A(P.Provider, {
|
|
440
|
+
value: H,
|
|
441
|
+
children: a
|
|
442
|
+
})
|
|
443
|
+
})
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
Ce.displayName = "Drawer.Content";
|
|
447
|
+
function we({ ref: e, className: t, appearance: n = "contrast", style: r, sx: a, ...o }) {
|
|
448
|
+
let { side: c, size: u } = F("Panel"), d = C(P)?.panelRef, f = M([d, e]), p = c === "inline-start" || c === "inline-end", m = y(n), h = s(n), g = _(h, r);
|
|
449
|
+
return /* @__PURE__ */ A(b, {
|
|
450
|
+
theme: h,
|
|
451
|
+
appearance: m,
|
|
452
|
+
children: /* @__PURE__ */ A(i, {
|
|
453
|
+
className: t,
|
|
454
|
+
styles: [
|
|
455
|
+
ae,
|
|
456
|
+
oe[c],
|
|
457
|
+
p && se[u],
|
|
458
|
+
h && v
|
|
459
|
+
],
|
|
460
|
+
sx: a,
|
|
461
|
+
children: (e) => /* @__PURE__ */ A("div", {
|
|
462
|
+
...o,
|
|
463
|
+
ref: f,
|
|
464
|
+
"data-ui": "drawer-panel",
|
|
465
|
+
...l(n),
|
|
466
|
+
className: e,
|
|
467
|
+
style: g
|
|
468
|
+
})
|
|
469
|
+
})
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
we.displayName = "Drawer.Panel";
|
|
473
|
+
function Te({ ref: e, className: t, sx: n, ...r }) {
|
|
474
|
+
F("Header");
|
|
475
|
+
let a = C(P)?.headerGesture ?? null, o = a && Object.fromEntries(Object.keys(a).map((e) => [e, (t) => {
|
|
476
|
+
r[e]?.(t), a[e]?.(t);
|
|
477
|
+
}]));
|
|
478
|
+
return /* @__PURE__ */ A(i, {
|
|
479
|
+
className: t,
|
|
480
|
+
styles: [ce, a && le],
|
|
481
|
+
sx: n,
|
|
482
|
+
children: (t) => /* @__PURE__ */ A("div", {
|
|
483
|
+
...r,
|
|
484
|
+
...o,
|
|
485
|
+
ref: e,
|
|
486
|
+
"data-ui": "drawer-header",
|
|
487
|
+
"data-draggable": a ? "" : void 0,
|
|
488
|
+
className: t
|
|
489
|
+
})
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
Te.displayName = "Drawer.Header";
|
|
493
|
+
function Q({ ref: e, className: t, sx: n, ...r }) {
|
|
494
|
+
return F("Body"), /* @__PURE__ */ A(i, {
|
|
495
|
+
className: t,
|
|
496
|
+
styles: ue,
|
|
497
|
+
sx: n,
|
|
498
|
+
children: (t) => /* @__PURE__ */ A("div", {
|
|
499
|
+
...r,
|
|
500
|
+
ref: e,
|
|
501
|
+
"data-ui": "drawer-body",
|
|
502
|
+
className: t
|
|
503
|
+
})
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
Q.displayName = "Drawer.Body";
|
|
507
|
+
function Ee({ ref: e, className: t, sx: n, ...r }) {
|
|
508
|
+
return F("Footer"), /* @__PURE__ */ A(i, {
|
|
509
|
+
className: t,
|
|
510
|
+
styles: de,
|
|
511
|
+
sx: n,
|
|
512
|
+
children: (t) => /* @__PURE__ */ A("div", {
|
|
513
|
+
...r,
|
|
514
|
+
ref: e,
|
|
515
|
+
"data-ui": "drawer-footer",
|
|
516
|
+
className: t
|
|
517
|
+
})
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
Ee.displayName = "Drawer.Footer";
|
|
521
|
+
function De({ ref: e, className: t, sx: n, children: r, ...a }) {
|
|
522
|
+
let { titleId: o, setHasTitle: s } = F("Title"), c = he(r);
|
|
523
|
+
return w(() => {
|
|
524
|
+
if (c) return s(!0), () => s(!1);
|
|
525
|
+
}, [c, s]), c ? /* @__PURE__ */ A(i, {
|
|
526
|
+
className: t,
|
|
527
|
+
styles: fe,
|
|
528
|
+
sx: n,
|
|
529
|
+
children: (t) => /* @__PURE__ */ A("h2", {
|
|
530
|
+
...a,
|
|
531
|
+
ref: e,
|
|
532
|
+
id: o,
|
|
533
|
+
"data-ui": "drawer-title",
|
|
534
|
+
className: t,
|
|
535
|
+
children: r
|
|
536
|
+
})
|
|
537
|
+
}) : null;
|
|
538
|
+
}
|
|
539
|
+
De.displayName = "Drawer.Title";
|
|
540
|
+
function Oe({ ref: e, className: t, sx: n, children: r, ...a }) {
|
|
541
|
+
let { descriptionId: o, setHasDescription: s } = F("Description"), c = he(r);
|
|
542
|
+
return w(() => {
|
|
543
|
+
if (c) return s(!0), () => s(!1);
|
|
544
|
+
}, [c, s]), c ? /* @__PURE__ */ A(i, {
|
|
545
|
+
className: t,
|
|
546
|
+
styles: pe,
|
|
547
|
+
sx: n,
|
|
548
|
+
children: (t) => /* @__PURE__ */ A("p", {
|
|
549
|
+
...a,
|
|
550
|
+
ref: e,
|
|
551
|
+
id: o,
|
|
552
|
+
"data-ui": "drawer-description",
|
|
553
|
+
className: t,
|
|
554
|
+
children: r
|
|
555
|
+
})
|
|
556
|
+
}) : null;
|
|
557
|
+
}
|
|
558
|
+
Oe.displayName = "Drawer.Description";
|
|
559
|
+
function $({ ref: e, onClick: t, className: n, sx: r, ...a }) {
|
|
560
|
+
let { setOpen: o } = F("Close"), s = C(P)?.requestClose, c = (e) => {
|
|
561
|
+
t?.(e), !e.defaultPrevented && (s ? s() : o(!1));
|
|
562
|
+
};
|
|
563
|
+
return /* @__PURE__ */ A(i, {
|
|
564
|
+
className: n,
|
|
565
|
+
styles: me,
|
|
566
|
+
sx: r,
|
|
567
|
+
children: (t) => /* @__PURE__ */ A("button", {
|
|
568
|
+
type: "button",
|
|
569
|
+
...a,
|
|
570
|
+
ref: e,
|
|
571
|
+
"data-ui": "drawer-close",
|
|
572
|
+
onClick: c,
|
|
573
|
+
className: t
|
|
574
|
+
})
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
$.displayName = "Drawer.Close";
|
|
578
|
+
var ke = Object.assign(ge, {
|
|
579
|
+
Trigger: _e,
|
|
580
|
+
Content: Ce,
|
|
581
|
+
Panel: we,
|
|
582
|
+
Header: Te,
|
|
583
|
+
Body: Q,
|
|
584
|
+
Footer: Ee,
|
|
585
|
+
Title: De,
|
|
586
|
+
Description: Oe,
|
|
587
|
+
Close: $
|
|
588
|
+
});
|
|
589
|
+
//#endregion
|
|
590
|
+
export { ke as t };
|
package/dist/drawer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Drawer } from "./drawer-
|
|
2
|
+
export { t as Drawer } from "./drawer-CceaEhCr.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";
|
package/dist/empty-state.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as EmptyState } from "./empty-state-
|
|
2
|
+
export { t as EmptyState } from "./empty-state-DO0ApylK.js";
|