@jfrader/ui 0.4.0 → 0.5.1
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 +2 -0
- package/dist/accordion-DLul6vIl.js +205 -0
- package/dist/accordion.js +1 -1
- package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/announcement-bar-Dlbq5-9D.js +382 -0
- package/dist/announcement-bar.js +2 -0
- package/dist/avatar-CaGJHy1N.js +145 -0
- package/dist/avatar-group-M1opAQEG.js +138 -0
- package/dist/avatar-group.js +2 -0
- package/dist/avatar.js +1 -1
- package/dist/badge-CjM5Agqk.js +119 -0
- package/dist/badge.js +1 -1
- package/dist/bottom-sheet-DjZOPq4k.js +674 -0
- package/dist/bottom-sheet.js +2 -0
- package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-BDK_LiwH.js} +11 -4
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-P2e7_44z.js → button-NLY0h6EJ.js} +8 -8
- package/dist/button.js +1 -1
- package/dist/calendar-BzJdv_SZ.js +449 -0
- package/dist/calendar.js +1 -1
- package/dist/card-Ca4KQKYQ.js +154 -0
- package/dist/card.js +1 -1
- package/dist/carousel-B7OrvD6J.js +474 -0
- package/dist/carousel.js +2 -0
- package/dist/{checkbox-COYG6L7d.js → checkbox-DKSzExj2.js} +17 -16
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-DjQ0_6Y9.js +290 -0
- package/dist/chip-group.js +2 -0
- package/dist/code-block/shiki.js +147 -0
- package/dist/code-block-B5we2lZa.js +293 -0
- package/dist/code-block.js +2 -0
- package/dist/collection-registry-k6JcD3Jr.js +44 -0
- package/dist/combobox-DFFqOBCi.js +339 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BmQu2w4H.js +391 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-ASaXDcGo.js +1410 -0
- package/dist/comment-thread.js +2 -0
- package/dist/context-menu-__1c2Dk9.js +370 -0
- package/dist/context-menu.js +2 -0
- package/dist/copy-button-DCSLcYS-.js +252 -0
- package/dist/copy-button.js +2 -0
- package/dist/countdown-Dp_TD1VP.js +293 -0
- package/dist/countdown.js +2 -0
- package/dist/date-picker-BiPN7yeK.js +255 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-DQpUeKqV.js +570 -0
- package/dist/date-range-picker.js +2 -0
- package/dist/{dialog-xaydbXl2.js → dialog-BX1zYMs-.js} +21 -20
- package/dist/dialog.js +1 -1
- package/dist/{divider-DYoJf0I_.js → divider-Cp7aNbhM.js} +21 -20
- package/dist/divider.js +1 -1
- package/dist/drawer-DsASTiP-.js +553 -0
- package/dist/drawer.js +2 -0
- package/dist/elastic-slider-BG6K019r.js +395 -0
- package/dist/elastic-slider.js +2 -0
- package/dist/empty-state-CDgrjPPf.js +142 -0
- package/dist/empty-state.js +2 -0
- package/dist/expandable-card-rUATve0o.js +347 -0
- package/dist/expandable-card.js +2 -0
- package/dist/expanding-search-BxOwtdwt.js +238 -0
- package/dist/expanding-search.js +2 -0
- package/dist/field-anatomy-COVdNpf5.js +84 -0
- package/dist/file-dropzone-BuXm3Tea.js +457 -0
- package/dist/file-dropzone.js +2 -0
- package/dist/filter-toolbar-Cy5Hqur-.js +314 -0
- package/dist/filter-toolbar.js +2 -0
- package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
- package/dist/hold-to-confirm.js +2 -0
- package/dist/hover-card-CoMJKg1g.js +347 -0
- package/dist/hover-card.js +2 -0
- package/dist/image-compare-BxY8Ykzt.js +415 -0
- package/dist/image-compare.js +2 -0
- package/dist/index.js +84 -38
- package/dist/inline-edit-C0eeml65.js +535 -0
- package/dist/inline-edit.js +2 -0
- package/dist/input-control-DmMuAuPS.js +34 -0
- package/dist/json-viewer-DgWqyU75.js +802 -0
- package/dist/json-viewer.js +2 -0
- package/dist/listbox-style-WX-RASp1.js +59 -0
- package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
- package/dist/mention-input-sq61si9L.js +600 -0
- package/dist/mention-input.js +2 -0
- package/dist/menu-DDKgmK2F.js +295 -0
- package/dist/menu.js +1 -1
- package/dist/metric-card--lVTz5Wn.js +118 -0
- package/dist/metric-card.js +2 -0
- package/dist/multi-select-DG1BCFX7.js +598 -0
- package/dist/multi-select.js +2 -0
- package/dist/{navigation-DhnKriOp.js → navigation-CC26JDr-.js} +24 -18
- package/dist/navigation.js +1 -1
- package/dist/overlay-layer-qEbpEtb8.js +78 -0
- package/dist/overlay-portal-C4JZFq2M.js +15 -0
- package/dist/{pagination-DYdwsxwe.js → pagination-BfkeWbmP.js} +24 -23
- package/dist/pagination.js +1 -1
- package/dist/password-field-03pWRkuY.js +250 -0
- package/dist/password-field.js +2 -0
- package/dist/pill-BaS-uIbn.js +58 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CErIw2q3.js +125 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-BpJswTG4.js → progress-DAQkfhPd.js} +5 -5
- package/dist/progress.js +1 -1
- package/dist/radio-cards-Cu9cBssN.js +456 -0
- package/dist/radio-cards.js +2 -0
- package/dist/{radio-group-Ce0_IWQr.js → radio-group-TIK0-iPX.js} +22 -19
- package/dist/radio-group.js +1 -1
- package/dist/resizable-panels-DUpQEpwG.js +520 -0
- package/dist/resizable-panels.js +2 -0
- package/dist/scroll-area-CcZyiSOQ.js +371 -0
- package/dist/scroll-area.js +2 -0
- package/dist/search-field-DMvho0KQ.js +274 -0
- package/dist/search-field.js +2 -0
- package/dist/segmented-control-8ZUGnsZm.js +327 -0
- package/dist/segmented-control.js +2 -0
- package/dist/select-D5rhJ8gi.js +293 -0
- package/dist/select.js +1 -1
- package/dist/signature-pad-_bTeguN9.js +645 -0
- package/dist/signature-pad.js +2 -0
- package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider-DVG6-Awh.js +308 -0
- package/dist/slider.js +2 -0
- package/dist/sortable-data-table-CYKT_Ng7.js +365 -0
- package/dist/sortable-data-table.js +2 -0
- package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
- package/dist/spinner.js +1 -1
- package/dist/split-button-BCw4zZom.js +262 -0
- package/dist/split-button.js +2 -0
- package/dist/stepper-CruHbXxX.js +480 -0
- package/dist/stepper.js +2 -0
- package/dist/swipe-actions-CBuJREU1.js +420 -0
- package/dist/swipe-actions.js +2 -0
- package/dist/switch-C1WrKrf-.js +145 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-XluwRjgg.js +210 -0
- package/dist/tabs.js +1 -1
- package/dist/tag-input-DSRCyrX2.js +418 -0
- package/dist/tag-input.js +2 -0
- package/dist/{text-field-D60ok14S.js → text-field-hU72iSVS.js} +20 -17
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DyfjtP0A.js → textarea-3k4Y0QQ3.js} +23 -20
- package/dist/textarea.js +1 -1
- package/dist/theme-root.js +1 -1
- package/dist/theme-switch-C505TtU8.js +166 -0
- package/dist/theme-switch.js +2 -0
- package/dist/time-picker-CPlhW0tr.js +311 -0
- package/dist/time-picker.js +2 -0
- package/dist/timeline-B0uAAVfT.js +624 -0
- package/dist/timeline.js +2 -0
- package/dist/toast-B7wo3sX1.js +371 -0
- package/dist/toast-stack-B40VpS4M.js +197 -0
- package/dist/toast-stack.js +2 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-CI0e7hFm.js → toggle-group-B2fpFZwV.js} +5 -5
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-BvgVTCTN.js +120 -0
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-j8qLqkb_.js +364 -0
- package/dist/tree-view.js +2 -0
- package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
- package/dist/types/components/announcement-bar/index.d.ts +2 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
- package/dist/types/components/avatar-group/index.d.ts +2 -0
- package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
- package/dist/types/components/bottom-sheet/index.d.ts +2 -0
- package/dist/types/components/calendar/calendar.d.ts +25 -1
- package/dist/types/components/calendar/index.d.ts +1 -1
- package/dist/types/components/carousel/carousel.d.ts +73 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/chip-group/chip-group.d.ts +54 -0
- package/dist/types/components/chip-group/index.d.ts +1 -0
- package/dist/types/components/code-block/code-block.d.ts +58 -0
- package/dist/types/components/code-block/index.d.ts +1 -0
- package/dist/types/components/code-block/shiki.d.ts +3 -0
- package/dist/types/components/combobox/combobox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +2 -2
- package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
- package/dist/types/components/comment-thread/index.d.ts +1 -0
- package/dist/types/components/comment-thread/thread-core.d.ts +96 -0
- package/dist/types/components/comment-thread/thread-parts.d.ts +114 -0
- package/dist/types/components/context-menu/context-menu.d.ts +55 -0
- package/dist/types/components/context-menu/index.d.ts +2 -0
- package/dist/types/components/copy-button/copy-button.d.ts +49 -0
- package/dist/types/components/copy-button/index.d.ts +2 -0
- package/dist/types/components/countdown/countdown.d.ts +37 -0
- package/dist/types/components/countdown/index.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -1
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
- package/dist/types/components/date-range-picker/index.d.ts +2 -0
- package/dist/types/components/drawer/drawer.d.ts +59 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +53 -0
- package/dist/types/components/elastic-slider/index.d.ts +1 -0
- package/dist/types/components/empty-state/empty-state.d.ts +36 -0
- package/dist/types/components/empty-state/index.d.ts +2 -0
- package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
- package/dist/types/components/expandable-card/index.d.ts +2 -0
- package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
- package/dist/types/components/expanding-search/index.d.ts +1 -0
- package/dist/types/components/field/field-anatomy.d.ts +4 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
- package/dist/types/components/file-dropzone/index.d.ts +2 -0
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
- package/dist/types/components/filter-toolbar/index.d.ts +1 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
- package/dist/types/components/hover-card/hover-card.d.ts +97 -0
- package/dist/types/components/hover-card/index.d.ts +2 -0
- package/dist/types/components/image-compare/image-compare.d.ts +54 -0
- package/dist/types/components/image-compare/index.d.ts +1 -0
- package/dist/types/components/inline-edit/index.d.ts +2 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
- package/dist/types/components/json-viewer/index.d.ts +2 -0
- package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
- package/dist/types/components/mention-input/index.d.ts +2 -0
- package/dist/types/components/mention-input/mention-input.d.ts +87 -0
- package/dist/types/components/menu/menu.d.ts +68 -7
- package/dist/types/components/metric-card/index.d.ts +1 -0
- package/dist/types/components/metric-card/metric-card.d.ts +37 -0
- package/dist/types/components/multi-select/index.d.ts +2 -0
- package/dist/types/components/multi-select/multi-select.d.ts +73 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/password-field/index.d.ts +2 -0
- package/dist/types/components/password-field/password-field.d.ts +34 -0
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/radio-cards/index.d.ts +1 -0
- package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
- package/dist/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/types/components/resizable-panels/index.d.ts +2 -0
- package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
- package/dist/types/components/scroll-area/index.d.ts +2 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
- package/dist/types/components/search-field/index.d.ts +1 -0
- package/dist/types/components/search-field/search-field.d.ts +31 -0
- package/dist/types/components/segmented-control/index.d.ts +2 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/signature-pad/index.d.ts +2 -0
- package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +62 -0
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/sortable-data-table/index.d.ts +1 -0
- package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
- package/dist/types/components/split-button/index.d.ts +2 -0
- package/dist/types/components/split-button/split-button.d.ts +55 -0
- package/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/components/stepper/stepper.d.ts +85 -0
- package/dist/types/components/swipe-actions/index.d.ts +2 -0
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components/tag-input/index.d.ts +2 -0
- package/dist/types/components/tag-input/tag-input.d.ts +66 -0
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/theme-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/time-picker/index.d.ts +2 -0
- package/dist/types/components/time-picker/time-picker.d.ts +48 -0
- package/dist/types/components/timeline/index.d.ts +2 -0
- package/dist/types/components/timeline/timeline.d.ts +66 -0
- package/dist/types/components/toast/toast.d.ts +37 -2
- package/dist/types/components/toast-stack/index.d.ts +2 -0
- package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree-view/index.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.d.ts +47 -0
- package/dist/types/components/usage-meter/index.d.ts +2 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
- package/dist/types/index.d.ts +45 -0
- package/dist/types/overlay/overlay-layer.d.ts +53 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +19 -2
- package/dist/types/styling/media.d.ts +1 -0
- package/dist/types/styling/theme.d.ts +12 -0
- package/dist/types/utils/use-controlled-state.d.ts +2 -1
- package/dist/usage-meter-qyQ3rYVv.js +463 -0
- package/dist/usage-meter.js +2 -0
- package/dist/use-controlled-state-DpeVQZNR.js +20 -0
- package/dist/use-latest-callback-cj1OOQL6.js +11 -0
- package/dist/use-overlay-floating-Bx2jBKAA.js +33 -0
- package/dist/use-slider-interaction-ChL-208h.js +234 -0
- package/package.json +195 -3
- package/dist/accordion-Bd-j04hW.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/calendar-C9Yad_-w.js +0 -394
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/collection-registry-BTYi6zGh.js +0 -98
- package/dist/combobox-DiMC2g_u.js +0 -327
- package/dist/command-palette-V_2pEay7.js +0 -379
- package/dist/date-picker-C29Uo4Tx.js +0 -250
- package/dist/field-anatomy-D2ToMeRa.js +0 -109
- package/dist/menu-CGPTNRnF.js +0 -216
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-CdRXjQqI.js +0 -113
- package/dist/select-BgG7WgSh.js +0 -286
- package/dist/switch-Dr-qjmT4.js +0 -142
- package/dist/tabs-CK_g1RKa.js +0 -203
- package/dist/toast-CjmELMZZ.js +0 -283
- package/dist/tooltip-CaL3rKbV.js +0 -108
- package/dist/use-controlled-state-CVXDa-qM.js +0 -21
- package/dist/use-overlay-floating-Bit-f0FU.js +0 -31
- package/dist/{theme-root-BbTBuLMQ.js → theme-root-Bs1U3uPA.js} +2 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { FloatingNode as n, FloatingTree as r, useDismiss as i, useFloatingNodeId as a, useFloatingParentNodeId as o, useFloatingTree as s } from "@floating-ui/react";
|
|
5
|
+
import { getDeepestNode as c } from "@floating-ui/react/utils";
|
|
6
|
+
//#region src/overlay/overlay-layer.tsx
|
|
7
|
+
var l = {
|
|
8
|
+
escapeKey: !0,
|
|
9
|
+
outsidePress: !0,
|
|
10
|
+
bubbles: !1
|
|
11
|
+
}, u = {
|
|
12
|
+
container: l,
|
|
13
|
+
leaf: {
|
|
14
|
+
...l,
|
|
15
|
+
capture: {
|
|
16
|
+
escapeKey: !0,
|
|
17
|
+
outsidePress: !0
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function d(t, n) {
|
|
22
|
+
let r = s(), { nodeId: i } = t;
|
|
23
|
+
return e(() => {
|
|
24
|
+
if (!n || !r) return {};
|
|
25
|
+
let e = (e) => {
|
|
26
|
+
if (e.key !== "Escape" || e.nativeEvent.isComposing) return;
|
|
27
|
+
let t = c(r.nodesRef.current, i);
|
|
28
|
+
t && t.id !== i && t.context?.onOpenChange(!1, e.nativeEvent, "escape-key");
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
reference: { onKeyDown: e },
|
|
32
|
+
floating: { onKeyDown: e }
|
|
33
|
+
};
|
|
34
|
+
}, [
|
|
35
|
+
n,
|
|
36
|
+
r,
|
|
37
|
+
i
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
function f(e, t) {
|
|
41
|
+
return [d(e, t === "container"), i(e, u[t])];
|
|
42
|
+
}
|
|
43
|
+
function p({ children: e }) {
|
|
44
|
+
let r = a();
|
|
45
|
+
return /* @__PURE__ */ t(n, {
|
|
46
|
+
id: r,
|
|
47
|
+
children: e(r)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function m({ children: e }) {
|
|
51
|
+
let n = s(), i = /* @__PURE__ */ t(p, { children: e });
|
|
52
|
+
return n ? i : /* @__PURE__ */ t(r, { children: i });
|
|
53
|
+
}
|
|
54
|
+
m.displayName = "OverlayLayer";
|
|
55
|
+
function h({ children: e }) {
|
|
56
|
+
return /* @__PURE__ */ t(m, { children: (r) => /* @__PURE__ */ t(n, {
|
|
57
|
+
id: void 0,
|
|
58
|
+
children: e(r)
|
|
59
|
+
}) });
|
|
60
|
+
}
|
|
61
|
+
h.displayName = "MenuLayer";
|
|
62
|
+
function g({ nodeId: e, children: r }) {
|
|
63
|
+
return /* @__PURE__ */ t(n, {
|
|
64
|
+
id: e,
|
|
65
|
+
children: r
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
g.displayName = "LayerContent";
|
|
69
|
+
function _({ children: e }) {
|
|
70
|
+
let i = s(), a = o();
|
|
71
|
+
return !i && !a ? e : /* @__PURE__ */ t(r, { children: /* @__PURE__ */ t(n, {
|
|
72
|
+
id: void 0,
|
|
73
|
+
children: e
|
|
74
|
+
}) });
|
|
75
|
+
}
|
|
76
|
+
_.displayName = "IsolatedOverlay";
|
|
77
|
+
//#endregion
|
|
78
|
+
export { f as a, m as i, g as n, h as r, _ as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { i as e, t } from "./theme-scope-t7nAKc2c.js";
|
|
3
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { FloatingPortal as r } from "@floating-ui/react";
|
|
5
|
+
//#region src/overlay/overlay-portal.tsx
|
|
6
|
+
function i({ children: i }) {
|
|
7
|
+
let a = e();
|
|
8
|
+
return /* @__PURE__ */ n(r, {
|
|
9
|
+
root: a?.portalContainer,
|
|
10
|
+
children: /* @__PURE__ */ n(t, { children: i })
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
i.displayName = "OverlayPortal";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
3
|
import { n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import {
|
|
4
|
+
import { r } from "./media-8yrN85VT.js";
|
|
5
5
|
import { t as i } from "./visually-hidden-BJdvqqvn.js";
|
|
6
6
|
import { useImperativeHandle as a, useLayoutEffect as o, useMemo as s, useRef as c } from "react";
|
|
7
7
|
import { vars as l } from "@jfrader/tokens/vars";
|
|
@@ -76,27 +76,28 @@ var _ = e({
|
|
|
76
76
|
display: "inline-block",
|
|
77
77
|
"&:dir(rtl)": { transform: "scaleX(-1)" }
|
|
78
78
|
});
|
|
79
|
-
function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p = 1, label: h = "Pagination", previousLabel: S = "Previous page", nextLabel: C = "Next page", locale: w = typeof navigator > "u" ? void 0 : navigator.language, className: T, sx: E,
|
|
80
|
-
let
|
|
81
|
-
a(e, () =>
|
|
82
|
-
let
|
|
79
|
+
function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p = 1, label: h = "Pagination", previousLabel: S = "Previous page", nextLabel: C = "Next page", locale: w = typeof navigator > "u" ? void 0 : navigator.language, className: T, sx: E, "aria-label": D, "aria-labelledby": O, ...k }) {
|
|
80
|
+
let A = m(r), j = Math.min(Math.max(m(n), 1), Math.max(A, 1)), M = g(j, A, Math.min(m(p), f)), N = s(() => new Intl.NumberFormat(w), [w]), P = c(null);
|
|
81
|
+
a(e, () => P.current, []);
|
|
82
|
+
let F = c(!1);
|
|
83
83
|
o(() => {
|
|
84
|
-
let e =
|
|
85
|
-
if (!
|
|
86
|
-
|
|
84
|
+
let e = P.current;
|
|
85
|
+
if (!F.current || !e) return;
|
|
86
|
+
F.current = !1;
|
|
87
87
|
let t = e.ownerDocument.activeElement;
|
|
88
88
|
(t === e.ownerDocument.body || t && e.contains(t) && t.matches(":disabled")) && e.querySelector("[aria-current=\"page\"]")?.focus();
|
|
89
|
-
}, [
|
|
90
|
-
let
|
|
91
|
-
|
|
89
|
+
}, [j]);
|
|
90
|
+
let I = (e, t = !1) => {
|
|
91
|
+
F.current = t && (e <= 1 || e >= A), e !== j && l?.(e);
|
|
92
92
|
};
|
|
93
93
|
return /* @__PURE__ */ u(t, {
|
|
94
94
|
className: T,
|
|
95
95
|
sx: E,
|
|
96
96
|
children: (e) => /* @__PURE__ */ u("nav", {
|
|
97
|
-
...
|
|
98
|
-
ref:
|
|
99
|
-
"aria-label": h,
|
|
97
|
+
...k,
|
|
98
|
+
ref: P,
|
|
99
|
+
"aria-label": D ?? (O === void 0 ? h : void 0),
|
|
100
|
+
"aria-labelledby": O,
|
|
100
101
|
"data-ui": "pagination",
|
|
101
102
|
className: e,
|
|
102
103
|
children: /* @__PURE__ */ d("ul", {
|
|
@@ -104,8 +105,8 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
|
|
|
104
105
|
children: [
|
|
105
106
|
/* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
|
|
106
107
|
type: "button",
|
|
107
|
-
disabled:
|
|
108
|
-
onClick: () =>
|
|
108
|
+
disabled: j <= 1,
|
|
109
|
+
onClick: () => I(j - 1, !0),
|
|
109
110
|
"data-ui": "pagination-previous",
|
|
110
111
|
css: [v, y],
|
|
111
112
|
children: [/* @__PURE__ */ u("span", {
|
|
@@ -117,14 +118,14 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
|
|
|
117
118
|
children: S
|
|
118
119
|
})]
|
|
119
120
|
}) }),
|
|
120
|
-
|
|
121
|
+
M.map((e) => typeof e == "number" ? /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
|
|
121
122
|
type: "button",
|
|
122
|
-
"aria-current": e ===
|
|
123
|
-
"aria-label":
|
|
124
|
-
onClick: () =>
|
|
123
|
+
"aria-current": e === j ? "page" : void 0,
|
|
124
|
+
"aria-label": N.format(e),
|
|
125
|
+
onClick: () => I(e),
|
|
125
126
|
"data-ui": "pagination-page",
|
|
126
127
|
css: [v, y],
|
|
127
|
-
children:
|
|
128
|
+
children: N.format(e)
|
|
128
129
|
}) }, e) : /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("span", {
|
|
129
130
|
"aria-hidden": "true",
|
|
130
131
|
"data-ui": "pagination-ellipsis",
|
|
@@ -133,8 +134,8 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
|
|
|
133
134
|
}) }, e)),
|
|
134
135
|
/* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
|
|
135
136
|
type: "button",
|
|
136
|
-
disabled:
|
|
137
|
-
onClick: () =>
|
|
137
|
+
disabled: j >= A,
|
|
138
|
+
onClick: () => I(j + 1, !0),
|
|
138
139
|
"data-ui": "pagination-next",
|
|
139
140
|
css: [v, y],
|
|
140
141
|
children: [/* @__PURE__ */ u("span", {
|
package/dist/pagination.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Pagination } from "./pagination-
|
|
2
|
+
export { t as Pagination } from "./pagination-BfkeWbmP.js";
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { r as e } from "./sx-Dx9JUKp5.js";
|
|
3
|
+
import { t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n, r, t as i } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
+
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
7
|
+
import { t as s } from "./icon-wrapper-stN8sD7R.js";
|
|
8
|
+
import { t as c } from "./input-control-DmMuAuPS.js";
|
|
9
|
+
import { a as l, i as u, n as ee, r as d, t as f } from "./field-anatomy-COVdNpf5.js";
|
|
10
|
+
import { useEffect as p, useId as m, useRef as h } from "react";
|
|
11
|
+
import { vars as g } from "@jfrader/tokens/vars";
|
|
12
|
+
import { jsx as _, jsxs as v } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { useMergeRefs as y } from "@floating-ui/react";
|
|
14
|
+
//#region src/components/password-field/password-field.tsx
|
|
15
|
+
var b = { reveal: "Show password" }, x = e({
|
|
16
|
+
position: "relative",
|
|
17
|
+
minInlineSize: 0
|
|
18
|
+
}), S = {
|
|
19
|
+
sm: e({
|
|
20
|
+
blockSize: g.space[8],
|
|
21
|
+
paddingInlineStart: g.space[3],
|
|
22
|
+
paddingInlineEnd: g.space[8],
|
|
23
|
+
fontSize: g.textSize.sm
|
|
24
|
+
}),
|
|
25
|
+
md: e({
|
|
26
|
+
blockSize: g.space[10],
|
|
27
|
+
paddingInlineStart: g.space[4],
|
|
28
|
+
paddingInlineEnd: g.space[10],
|
|
29
|
+
fontSize: g.textSize.sm
|
|
30
|
+
}),
|
|
31
|
+
lg: e({
|
|
32
|
+
blockSize: g.space[12],
|
|
33
|
+
paddingInlineStart: g.space[4],
|
|
34
|
+
paddingInlineEnd: g.space[12],
|
|
35
|
+
fontSize: g.textSize.md
|
|
36
|
+
})
|
|
37
|
+
}, C = e({
|
|
38
|
+
lineHeight: g.lineHeight.base,
|
|
39
|
+
[i]: { fontSize: g.textSize.md }
|
|
40
|
+
}), w = e({
|
|
41
|
+
position: "absolute",
|
|
42
|
+
insetBlock: 0,
|
|
43
|
+
insetInlineEnd: g.space[1],
|
|
44
|
+
marginBlock: "auto",
|
|
45
|
+
display: "inline-grid",
|
|
46
|
+
placeItems: "center",
|
|
47
|
+
padding: 0,
|
|
48
|
+
border: 0,
|
|
49
|
+
borderRadius: g.radius.sm,
|
|
50
|
+
backgroundColor: "transparent",
|
|
51
|
+
color: g.color.textMuted,
|
|
52
|
+
cursor: "pointer",
|
|
53
|
+
transitionProperty: "background-color, color, transform",
|
|
54
|
+
transitionDuration: g.motion.duration.fast,
|
|
55
|
+
transitionTimingFunction: g.motion.easeStandard,
|
|
56
|
+
"&:hover:not(:disabled)": {
|
|
57
|
+
backgroundColor: g.color.surfaceHover,
|
|
58
|
+
color: g.color.text
|
|
59
|
+
},
|
|
60
|
+
"&:active:not(:disabled)": { transform: "scale(0.94)" },
|
|
61
|
+
"&:focus-visible": t,
|
|
62
|
+
"&:disabled": {
|
|
63
|
+
opacity: .55,
|
|
64
|
+
cursor: "not-allowed"
|
|
65
|
+
},
|
|
66
|
+
[r]: {
|
|
67
|
+
transitionDuration: "0s",
|
|
68
|
+
"&:active:not(:disabled)": { transform: "none" }
|
|
69
|
+
},
|
|
70
|
+
[n]: { "&[aria-pressed=\"true\"]": {
|
|
71
|
+
backgroundColor: "Highlight",
|
|
72
|
+
color: "HighlightText"
|
|
73
|
+
} }
|
|
74
|
+
}), T = {
|
|
75
|
+
sm: e({
|
|
76
|
+
inlineSize: g.space[6],
|
|
77
|
+
blockSize: g.space[6],
|
|
78
|
+
fontSize: g.textSize.md
|
|
79
|
+
}),
|
|
80
|
+
md: e({
|
|
81
|
+
inlineSize: g.space[8],
|
|
82
|
+
blockSize: g.space[8],
|
|
83
|
+
fontSize: g.textSize.lg
|
|
84
|
+
}),
|
|
85
|
+
lg: e({
|
|
86
|
+
inlineSize: g.space[10],
|
|
87
|
+
blockSize: g.space[10],
|
|
88
|
+
fontSize: g.textSize.xl
|
|
89
|
+
})
|
|
90
|
+
}, E = e({
|
|
91
|
+
"& [data-slash]": {
|
|
92
|
+
strokeDasharray: "1 2",
|
|
93
|
+
strokeDashoffset: 1,
|
|
94
|
+
transitionProperty: "stroke-dashoffset",
|
|
95
|
+
transitionDuration: g.motion.duration.base,
|
|
96
|
+
transitionTimingFunction: g.motion.easeStandard
|
|
97
|
+
},
|
|
98
|
+
"&[data-state=\"on\"] [data-slash]": { strokeDashoffset: 0 },
|
|
99
|
+
[r]: { "& [data-slash]": { transitionDuration: "0s" } }
|
|
100
|
+
}), D = "M3 3l18 18";
|
|
101
|
+
function O({ revealed: e }) {
|
|
102
|
+
let t = `password-field-mask-${m().replace(/[^\w-]/g, "_")}`;
|
|
103
|
+
return /* @__PURE__ */ v("svg", {
|
|
104
|
+
viewBox: "0 0 24 24",
|
|
105
|
+
fill: "none",
|
|
106
|
+
stroke: "currentColor",
|
|
107
|
+
strokeWidth: 1.75,
|
|
108
|
+
strokeLinecap: "round",
|
|
109
|
+
strokeLinejoin: "round",
|
|
110
|
+
"data-state": e ? "on" : "off",
|
|
111
|
+
css: E,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ v("mask", {
|
|
114
|
+
id: t,
|
|
115
|
+
maskUnits: "userSpaceOnUse",
|
|
116
|
+
x: "0",
|
|
117
|
+
y: "0",
|
|
118
|
+
width: "24",
|
|
119
|
+
height: "24",
|
|
120
|
+
children: [/* @__PURE__ */ _("rect", {
|
|
121
|
+
width: "24",
|
|
122
|
+
height: "24",
|
|
123
|
+
fill: "white",
|
|
124
|
+
stroke: "none"
|
|
125
|
+
}), /* @__PURE__ */ _("path", {
|
|
126
|
+
d: D,
|
|
127
|
+
pathLength: 1,
|
|
128
|
+
stroke: "black",
|
|
129
|
+
strokeWidth: 5,
|
|
130
|
+
"data-slash": ""
|
|
131
|
+
})]
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ v("g", {
|
|
134
|
+
mask: `url(#${t})`,
|
|
135
|
+
children: [/* @__PURE__ */ _("path", { d: "M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0" }), /* @__PURE__ */ _("circle", {
|
|
136
|
+
cx: "12",
|
|
137
|
+
cy: "12",
|
|
138
|
+
r: "3"
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ _("path", {
|
|
142
|
+
d: D,
|
|
143
|
+
pathLength: 1,
|
|
144
|
+
"data-slash": ""
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function k({ ref: e, value: t, defaultValue: n, onChange: r, onValueChange: i, revealed: m, defaultRevealed: g = !1, onRevealedChange: E, label: D, description: k, error: A, size: j = "md", messages: M, revealIcon: N, slotProps: P, className: F, sx: I, dir: L, disabled: R, required: z, form: B, id: V, "aria-labelledby": H, "aria-describedby": U, "aria-invalid": W, ...G }) {
|
|
150
|
+
let K = l({
|
|
151
|
+
id: V,
|
|
152
|
+
description: k,
|
|
153
|
+
error: A,
|
|
154
|
+
"aria-describedby": U,
|
|
155
|
+
"aria-invalid": W
|
|
156
|
+
}), [q, J, Y] = a(m, g, E), X = q ?? !1, Z = h(null), Q = y([Z, e]), te = {
|
|
157
|
+
...b,
|
|
158
|
+
...M
|
|
159
|
+
}, $ = `${K.id}-label`, ne = H === void 0 ? void 0 : [H, o(D) && $].filter(Boolean).join(" ");
|
|
160
|
+
p(() => {
|
|
161
|
+
let e = Z.current?.form;
|
|
162
|
+
if (!e) return;
|
|
163
|
+
let t = (e) => {
|
|
164
|
+
queueMicrotask(() => {
|
|
165
|
+
e.defaultPrevented || Y();
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
169
|
+
}, [B, Y]);
|
|
170
|
+
let re = (e) => {
|
|
171
|
+
r?.(e), i?.(e.currentTarget.value);
|
|
172
|
+
};
|
|
173
|
+
return /* @__PURE__ */ v(u, {
|
|
174
|
+
"data-ui": "password-field",
|
|
175
|
+
dir: L,
|
|
176
|
+
className: F,
|
|
177
|
+
sx: I,
|
|
178
|
+
part: P?.root,
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ _(d, {
|
|
181
|
+
id: $,
|
|
182
|
+
htmlFor: K.id,
|
|
183
|
+
required: z,
|
|
184
|
+
part: P?.label,
|
|
185
|
+
children: D
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ v("div", {
|
|
188
|
+
className: P?.shell?.className,
|
|
189
|
+
css: [x, P?.shell?.css],
|
|
190
|
+
children: [/* @__PURE__ */ _("input", {
|
|
191
|
+
autoCapitalize: "none",
|
|
192
|
+
autoCorrect: "off",
|
|
193
|
+
spellCheck: !1,
|
|
194
|
+
...G,
|
|
195
|
+
ref: Q,
|
|
196
|
+
id: K.id,
|
|
197
|
+
type: X ? "text" : "password",
|
|
198
|
+
value: t,
|
|
199
|
+
defaultValue: n,
|
|
200
|
+
dir: L,
|
|
201
|
+
disabled: R,
|
|
202
|
+
required: z,
|
|
203
|
+
form: B,
|
|
204
|
+
"aria-labelledby": ne,
|
|
205
|
+
"aria-describedby": K.describedBy,
|
|
206
|
+
"aria-invalid": K.ariaInvalid,
|
|
207
|
+
onChange: re,
|
|
208
|
+
className: P?.control?.className,
|
|
209
|
+
css: [
|
|
210
|
+
c,
|
|
211
|
+
C,
|
|
212
|
+
S[j],
|
|
213
|
+
P?.control?.css
|
|
214
|
+
]
|
|
215
|
+
}), /* @__PURE__ */ _("button", {
|
|
216
|
+
type: "button",
|
|
217
|
+
disabled: R,
|
|
218
|
+
"aria-label": te.reveal,
|
|
219
|
+
"aria-pressed": X,
|
|
220
|
+
"aria-controls": K.id,
|
|
221
|
+
onClick: () => J(!X),
|
|
222
|
+
className: P?.reveal?.className,
|
|
223
|
+
css: [
|
|
224
|
+
w,
|
|
225
|
+
T[j],
|
|
226
|
+
P?.reveal?.css
|
|
227
|
+
],
|
|
228
|
+
children: /* @__PURE__ */ _("span", {
|
|
229
|
+
"aria-hidden": !0,
|
|
230
|
+
css: s,
|
|
231
|
+
children: N ? N(X) : /* @__PURE__ */ _(O, { revealed: X })
|
|
232
|
+
})
|
|
233
|
+
})]
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ _(f, {
|
|
236
|
+
id: K.descriptionId,
|
|
237
|
+
part: P?.description,
|
|
238
|
+
children: k
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ _(ee, {
|
|
241
|
+
id: K.errorId,
|
|
242
|
+
part: P?.error,
|
|
243
|
+
children: A
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
k.displayName = "PasswordField";
|
|
249
|
+
//#endregion
|
|
250
|
+
export { k as t };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
+
import { n } from "./media-8yrN85VT.js";
|
|
4
|
+
import { vars as r } from "@jfrader/tokens/vars";
|
|
5
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/components/pill/pill.tsx
|
|
7
|
+
var a = e({
|
|
8
|
+
display: "inline-flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
boxSizing: "border-box",
|
|
11
|
+
blockSize: r.space[5],
|
|
12
|
+
paddingInline: r.space[2],
|
|
13
|
+
borderRadius: r.radius.full,
|
|
14
|
+
fontSize: r.textSize.xs,
|
|
15
|
+
fontWeight: r.fontWeight.medium,
|
|
16
|
+
lineHeight: 1,
|
|
17
|
+
whiteSpace: "nowrap",
|
|
18
|
+
verticalAlign: "middle",
|
|
19
|
+
[n]: { outline: "1px solid CanvasText" }
|
|
20
|
+
}), o = {
|
|
21
|
+
neutral: e({
|
|
22
|
+
backgroundColor: r.color.surfaceHover,
|
|
23
|
+
color: r.color.textMuted
|
|
24
|
+
}),
|
|
25
|
+
accent: e({
|
|
26
|
+
backgroundColor: r.color.accentSoft,
|
|
27
|
+
color: r.color.accentText
|
|
28
|
+
}),
|
|
29
|
+
success: e({
|
|
30
|
+
backgroundColor: r.color.successSoft,
|
|
31
|
+
color: r.color.success
|
|
32
|
+
}),
|
|
33
|
+
warning: e({
|
|
34
|
+
backgroundColor: r.color.warningSoft,
|
|
35
|
+
color: r.color.warning
|
|
36
|
+
}),
|
|
37
|
+
danger: e({
|
|
38
|
+
backgroundColor: r.color.dangerSoft,
|
|
39
|
+
color: r.color.dangerText
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
function s({ ref: e, tone: n = "neutral", className: r, sx: s, ...c }) {
|
|
43
|
+
return /* @__PURE__ */ i(t, {
|
|
44
|
+
className: r,
|
|
45
|
+
styles: [a, o[n]],
|
|
46
|
+
sx: s,
|
|
47
|
+
children: (t) => /* @__PURE__ */ i("span", {
|
|
48
|
+
...c,
|
|
49
|
+
ref: e,
|
|
50
|
+
"data-ui": "pill",
|
|
51
|
+
"data-tone": n,
|
|
52
|
+
className: t
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
s.displayName = "Pill";
|
|
57
|
+
//#endregion
|
|
58
|
+
export { s as t };
|
package/dist/pill.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Pill } from "./pill-
|
|
2
|
+
export { t as Pill } from "./pill-BaS-uIbn.js";
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
+
import { t as n } from "./use-controlled-state-DpeVQZNR.js";
|
|
4
|
+
import { n as r } from "./surface-DZ4d-2aL.js";
|
|
5
|
+
import { t as i } from "./trigger-style-B1KVC8O1.js";
|
|
6
|
+
import { a, i as o } from "./overlay-layer-qEbpEtb8.js";
|
|
7
|
+
import { t as s } from "./overlay-portal-C4JZFq2M.js";
|
|
8
|
+
import { t as c } from "./use-overlay-floating-Bx2jBKAA.js";
|
|
9
|
+
import { createContext as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
10
|
+
import { vars as h } from "@jfrader/tokens/vars";
|
|
11
|
+
import { jsx as g } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { FloatingFocusManager as _, useClick as v, useInteractions as y, useMergeRefs as b, useRole as x } from "@floating-ui/react";
|
|
13
|
+
//#region src/components/popover/popover.tsx
|
|
14
|
+
var S = l(null);
|
|
15
|
+
function C(e) {
|
|
16
|
+
let t = u(S);
|
|
17
|
+
if (!t) throw Error(`Popover.${e} must be rendered inside <Popover>.`);
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
var w = e({
|
|
21
|
+
...r,
|
|
22
|
+
borderRadius: h.radius.lg,
|
|
23
|
+
boxShadow: h.shadow.overlay,
|
|
24
|
+
padding: h.space[4],
|
|
25
|
+
minInlineSize: "200px",
|
|
26
|
+
maxInlineSize: "min(360px, calc(100vw - 32px))",
|
|
27
|
+
fontSize: h.textSize.sm,
|
|
28
|
+
overflowY: "auto"
|
|
29
|
+
});
|
|
30
|
+
function T({ nodeId: e, open: t, defaultOpen: r = !1, onOpenChange: i, placement: o = "bottom", children: s }) {
|
|
31
|
+
let [l = !1, u] = n(t, r, i), h = p(!1), [_, b] = m(), { refs: C, floatingStyles: w, context: T } = c({
|
|
32
|
+
open: l,
|
|
33
|
+
placement: o,
|
|
34
|
+
nodeId: e,
|
|
35
|
+
onAvailableSize: ({ height: e }) => b(Math.max(0, e)),
|
|
36
|
+
onOpenChange: (e, t, n) => {
|
|
37
|
+
e || (h.current = n === "escape-key"), u(e);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
d(() => {
|
|
41
|
+
!l && h.current && (h.current = !1, C.domReference.current?.focus());
|
|
42
|
+
}, [l, C]);
|
|
43
|
+
let E = v(T), D = a(T, "container"), O = x(T, { role: "dialog" }), { getReferenceProps: k, getFloatingProps: A } = y([
|
|
44
|
+
E,
|
|
45
|
+
...D,
|
|
46
|
+
O
|
|
47
|
+
]), j = f(() => ({
|
|
48
|
+
open: l,
|
|
49
|
+
refs: C,
|
|
50
|
+
floatingContext: T,
|
|
51
|
+
floatingStyles: {
|
|
52
|
+
...w,
|
|
53
|
+
maxBlockSize: _
|
|
54
|
+
},
|
|
55
|
+
getReferenceProps: k,
|
|
56
|
+
getFloatingProps: A
|
|
57
|
+
}), [
|
|
58
|
+
l,
|
|
59
|
+
C,
|
|
60
|
+
T,
|
|
61
|
+
w,
|
|
62
|
+
_,
|
|
63
|
+
k,
|
|
64
|
+
A
|
|
65
|
+
]);
|
|
66
|
+
return /* @__PURE__ */ g(S.Provider, {
|
|
67
|
+
value: j,
|
|
68
|
+
children: s
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function E(e) {
|
|
72
|
+
return /* @__PURE__ */ g(o, { children: (t) => /* @__PURE__ */ g(T, {
|
|
73
|
+
...e,
|
|
74
|
+
nodeId: t
|
|
75
|
+
}) });
|
|
76
|
+
}
|
|
77
|
+
E.displayName = "Popover";
|
|
78
|
+
function D({ ref: e, className: n, sx: r, ...a }) {
|
|
79
|
+
let { refs: o, getReferenceProps: s } = C("Trigger"), c = b([o.setReference, e]);
|
|
80
|
+
return /* @__PURE__ */ g(t, {
|
|
81
|
+
className: n,
|
|
82
|
+
styles: i,
|
|
83
|
+
sx: r,
|
|
84
|
+
children: (e) => /* @__PURE__ */ g("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
...s(a),
|
|
87
|
+
ref: c,
|
|
88
|
+
"data-ui": "popover-trigger",
|
|
89
|
+
className: e
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
D.displayName = "Popover.Trigger";
|
|
94
|
+
function O({ ref: e, style: n, className: r, sx: i, ...a }) {
|
|
95
|
+
let { open: o, refs: c, floatingContext: l, floatingStyles: u, getFloatingProps: d } = C("Content"), f = b([c.setFloating, e]);
|
|
96
|
+
return o ? /* @__PURE__ */ g(s, { children: /* @__PURE__ */ g(_, {
|
|
97
|
+
context: l,
|
|
98
|
+
modal: !1,
|
|
99
|
+
initialFocus: -1,
|
|
100
|
+
returnFocus: !1,
|
|
101
|
+
closeOnFocusOut: !1,
|
|
102
|
+
children: /* @__PURE__ */ g(t, {
|
|
103
|
+
className: r,
|
|
104
|
+
styles: w,
|
|
105
|
+
sx: i,
|
|
106
|
+
children: (e) => /* @__PURE__ */ g("div", {
|
|
107
|
+
...d(a),
|
|
108
|
+
ref: f,
|
|
109
|
+
"data-ui": "popover",
|
|
110
|
+
style: {
|
|
111
|
+
...n,
|
|
112
|
+
...u
|
|
113
|
+
},
|
|
114
|
+
className: e
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
}) }) : null;
|
|
118
|
+
}
|
|
119
|
+
O.displayName = "Popover.Content";
|
|
120
|
+
var k = Object.assign(E, {
|
|
121
|
+
Trigger: D,
|
|
122
|
+
Content: O
|
|
123
|
+
});
|
|
124
|
+
//#endregion
|
|
125
|
+
export { k as t };
|
package/dist/popover.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Popover } from "./popover-
|
|
2
|
+
export { t as Popover } from "./popover-CErIw2q3.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { i as e, r as t, t as n } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { n as r,
|
|
3
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
4
4
|
import { t as a } from "./visually-hidden-BJdvqqvn.js";
|
|
5
5
|
import { t as o } from "./renderable-DzcIj1Lo.js";
|
|
6
6
|
import { useId as s } from "react";
|
|
@@ -29,8 +29,8 @@ var d = "40%", f = "1.4s ease-in-out infinite", p = 100, m = e({
|
|
|
29
29
|
transitionProperty: "width",
|
|
30
30
|
transitionDuration: c.motion.duration.base,
|
|
31
31
|
transitionTimingFunction: c.motion.easeStandard,
|
|
32
|
-
[
|
|
33
|
-
[
|
|
32
|
+
[i]: { transitionDuration: "0s" },
|
|
33
|
+
[r]: {
|
|
34
34
|
forcedColorAdjust: "none",
|
|
35
35
|
backgroundColor: "Highlight"
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ var d = "40%", f = "1.4s ease-in-out infinite", p = 100, m = e({
|
|
|
38
38
|
inlineSize: d,
|
|
39
39
|
animation: `${m} ${f}`,
|
|
40
40
|
"&:dir(rtl)": { animation: `${h} ${f}` },
|
|
41
|
-
[
|
|
41
|
+
[i]: {
|
|
42
42
|
"&, &:dir(rtl)": { animation: "none" },
|
|
43
43
|
opacity: .7
|
|
44
44
|
}
|
|
@@ -66,7 +66,7 @@ function b({ ref: e, value: t, max: r = p, label: i, getValueLabel: c, slotProps
|
|
|
66
66
|
"aria-valuemin": 0,
|
|
67
67
|
"aria-valuemax": T,
|
|
68
68
|
"aria-valuenow": w,
|
|
69
|
-
"aria-valuetext": w === void 0 ? void 0 : c?.(w, T),
|
|
69
|
+
"aria-valuetext": b["aria-valuetext"] ?? (w === void 0 ? void 0 : c?.(w, T)),
|
|
70
70
|
className: t,
|
|
71
71
|
children: [S && /* @__PURE__ */ l("span", {
|
|
72
72
|
id: x,
|
package/dist/progress.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Progress } from "./progress-
|
|
2
|
+
export { t as Progress } from "./progress-DAQkfhPd.js";
|