@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
package/dist/tabs-CK_g1RKa.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { n, t as r } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n as i } from "./media-D_eA_I-e.js";
|
|
5
|
-
import { n as a, r as o, t as s } from "./roving-focus-CYlo_Kf8.js";
|
|
6
|
-
import { t as c } from "./use-controlled-state-CVXDa-qM.js";
|
|
7
|
-
import { t as l } from "./part-id-D0zksy32.js";
|
|
8
|
-
import { createContext as u, useContext as d, useEffect as f, useId as p, useImperativeHandle as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
9
|
-
import { vars as v } from "@jfrader/tokens/vars";
|
|
10
|
-
import { jsx as y } from "@emotion/react/jsx-runtime";
|
|
11
|
-
//#region src/components/tabs/tabs.tsx
|
|
12
|
-
var b = u(null);
|
|
13
|
-
function x(e) {
|
|
14
|
-
let t = d(b);
|
|
15
|
-
if (!t) throw Error(`Tabs.${e} must be rendered inside <Tabs>.`);
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
var S = {
|
|
19
|
-
itemSelector: "[role=\"tab\"]:not([disabled])",
|
|
20
|
-
ownerSelector: "[role=\"tablist\"]"
|
|
21
|
-
}, C = e({ "&[data-orientation=\"vertical\"]": {
|
|
22
|
-
display: "flex",
|
|
23
|
-
alignItems: "flex-start",
|
|
24
|
-
gap: v.space[4]
|
|
25
|
-
} }), w = {
|
|
26
|
-
horizontal: e({
|
|
27
|
-
display: "inline-flex",
|
|
28
|
-
gap: v.space[1],
|
|
29
|
-
borderBlockEnd: `1px solid ${v.color.border}`
|
|
30
|
-
}),
|
|
31
|
-
vertical: e({
|
|
32
|
-
display: "inline-flex",
|
|
33
|
-
flexDirection: "column",
|
|
34
|
-
alignItems: "stretch",
|
|
35
|
-
borderInlineEnd: `1px solid ${v.color.border}`
|
|
36
|
-
})
|
|
37
|
-
}, T = e({
|
|
38
|
-
appearance: "none",
|
|
39
|
-
border: 0,
|
|
40
|
-
background: "transparent",
|
|
41
|
-
cursor: "pointer",
|
|
42
|
-
paddingBlock: v.space[2],
|
|
43
|
-
paddingInline: v.space[3],
|
|
44
|
-
font: "inherit",
|
|
45
|
-
fontSize: v.textSize.sm,
|
|
46
|
-
fontWeight: v.fontWeight.medium,
|
|
47
|
-
color: v.color.textMuted,
|
|
48
|
-
transitionProperty: "color, border-color",
|
|
49
|
-
transitionDuration: v.motion.duration.fast,
|
|
50
|
-
transitionTimingFunction: v.motion.easeStandard,
|
|
51
|
-
"&:hover:not(:disabled):not([aria-selected=\"true\"])": { color: v.color.text },
|
|
52
|
-
"&[aria-selected=\"true\"]": {
|
|
53
|
-
color: v.color.text,
|
|
54
|
-
borderColor: v.color.accent
|
|
55
|
-
},
|
|
56
|
-
"&:disabled": {
|
|
57
|
-
opacity: .55,
|
|
58
|
-
cursor: "not-allowed"
|
|
59
|
-
},
|
|
60
|
-
"&:focus-visible": { ...r },
|
|
61
|
-
[i]: { transitionDuration: "0s" }
|
|
62
|
-
}), E = {
|
|
63
|
-
horizontal: e({
|
|
64
|
-
borderBlockEnd: "2px solid transparent",
|
|
65
|
-
marginBlockEnd: "-1px"
|
|
66
|
-
}),
|
|
67
|
-
vertical: e({
|
|
68
|
-
borderInlineEnd: "2px solid transparent",
|
|
69
|
-
marginInlineEnd: "-1px",
|
|
70
|
-
textAlign: "start"
|
|
71
|
-
})
|
|
72
|
-
}, D = e({
|
|
73
|
-
color: v.color.text,
|
|
74
|
-
outline: "none",
|
|
75
|
-
"&:focus-visible": { ...n },
|
|
76
|
-
"&[hidden]": { display: "none" }
|
|
77
|
-
}), O = e({ paddingBlockStart: v.space[3] });
|
|
78
|
-
function k({ ref: e, value: n, defaultValue: r, onValueChange: i, orientation: a = "horizontal", activation: o = "auto", className: s, sx: l, ...u }) {
|
|
79
|
-
let d = p(), [f, m] = c(n, r, i), [g, v] = _(null), x = h(() => ({
|
|
80
|
-
value: f,
|
|
81
|
-
setValue: m,
|
|
82
|
-
focused: g,
|
|
83
|
-
setFocused: v,
|
|
84
|
-
orientation: a,
|
|
85
|
-
activation: o,
|
|
86
|
-
baseId: d
|
|
87
|
-
}), [
|
|
88
|
-
f,
|
|
89
|
-
m,
|
|
90
|
-
g,
|
|
91
|
-
a,
|
|
92
|
-
o,
|
|
93
|
-
d
|
|
94
|
-
]);
|
|
95
|
-
return /* @__PURE__ */ y(b.Provider, {
|
|
96
|
-
value: x,
|
|
97
|
-
children: /* @__PURE__ */ y(t, {
|
|
98
|
-
className: s,
|
|
99
|
-
styles: C,
|
|
100
|
-
sx: l,
|
|
101
|
-
children: (t) => /* @__PURE__ */ y("div", {
|
|
102
|
-
...u,
|
|
103
|
-
ref: e,
|
|
104
|
-
"data-ui": "tabs-root",
|
|
105
|
-
"data-orientation": a,
|
|
106
|
-
className: t
|
|
107
|
-
})
|
|
108
|
-
})
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
k.displayName = "Tabs";
|
|
112
|
-
function A({ ref: e, onKeyDown: n, className: r, sx: i, ...c }) {
|
|
113
|
-
let { orientation: l, value: u, focused: d, setFocused: p } = x("List"), h = g(null);
|
|
114
|
-
m(e, () => h.current, []), f(() => {
|
|
115
|
-
let e = h.current;
|
|
116
|
-
if (!e) return;
|
|
117
|
-
let t = o(e, S);
|
|
118
|
-
t.length !== 0 && (t.some((e) => e.tabIndex === 0) || p((s(t, u) ?? s(t, d) ?? t[0])?.dataset.value ?? null));
|
|
119
|
-
});
|
|
120
|
-
let _ = (e) => {
|
|
121
|
-
n?.(e);
|
|
122
|
-
let t = h.current;
|
|
123
|
-
!e.defaultPrevented && t && a(e, t, l, S);
|
|
124
|
-
};
|
|
125
|
-
return /* @__PURE__ */ y(t, {
|
|
126
|
-
className: r,
|
|
127
|
-
styles: w[l],
|
|
128
|
-
sx: i,
|
|
129
|
-
children: (e) => /* @__PURE__ */ y("div", {
|
|
130
|
-
...c,
|
|
131
|
-
ref: h,
|
|
132
|
-
role: "tablist",
|
|
133
|
-
"aria-orientation": l,
|
|
134
|
-
"data-ui": "tabs-list",
|
|
135
|
-
"data-orientation": l,
|
|
136
|
-
"data-roving": d ?? "",
|
|
137
|
-
"data-selected": u ?? "",
|
|
138
|
-
onKeyDown: _,
|
|
139
|
-
className: e
|
|
140
|
-
})
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
A.displayName = "Tabs.List";
|
|
144
|
-
function j({ ref: e, value: n, disabled: r, onClick: i, onFocus: a, className: o, sx: s, ...c }) {
|
|
145
|
-
let { value: u, setValue: d, focused: f, setFocused: p, activation: m, baseId: h, orientation: _ } = x("Tab"), v = u === n, b = !r && (f === null ? v : f === n), S = g(!1), C = (e) => {
|
|
146
|
-
if (i?.(e), e.defaultPrevented) return;
|
|
147
|
-
let t = S.current;
|
|
148
|
-
S.current = !1, !(m === "auto" && t) && d(n);
|
|
149
|
-
}, w = (e) => {
|
|
150
|
-
a?.(e), !e.defaultPrevented && (S.current = !0, p(n), m === "auto" && d(n));
|
|
151
|
-
};
|
|
152
|
-
return /* @__PURE__ */ y(t, {
|
|
153
|
-
className: o,
|
|
154
|
-
styles: [T, E[_]],
|
|
155
|
-
sx: s,
|
|
156
|
-
children: (t) => /* @__PURE__ */ y("button", {
|
|
157
|
-
...c,
|
|
158
|
-
ref: e,
|
|
159
|
-
type: "button",
|
|
160
|
-
role: "tab",
|
|
161
|
-
id: l(h, "tab", n),
|
|
162
|
-
"data-ui": "tabs-tab",
|
|
163
|
-
"data-value": n,
|
|
164
|
-
"data-state": v ? "active" : "inactive",
|
|
165
|
-
"aria-selected": v,
|
|
166
|
-
"aria-controls": l(h, "panel", n),
|
|
167
|
-
tabIndex: b ? 0 : -1,
|
|
168
|
-
disabled: r,
|
|
169
|
-
onClick: C,
|
|
170
|
-
onFocus: w,
|
|
171
|
-
className: t
|
|
172
|
-
})
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
j.displayName = "Tabs.Tab";
|
|
176
|
-
function M({ ref: e, value: n, tabIndex: r = 0, "aria-labelledby": i, className: a, sx: o, ...s }) {
|
|
177
|
-
let { value: c, baseId: u, orientation: d } = x("Panel"), f = c === n, p = [i, l(u, "tab", n)].filter(Boolean).join(" ") || void 0;
|
|
178
|
-
return /* @__PURE__ */ y(t, {
|
|
179
|
-
className: a,
|
|
180
|
-
styles: [D, d === "horizontal" && O],
|
|
181
|
-
sx: o,
|
|
182
|
-
children: (t) => /* @__PURE__ */ y("div", {
|
|
183
|
-
...s,
|
|
184
|
-
ref: e,
|
|
185
|
-
role: "tabpanel",
|
|
186
|
-
id: l(u, "panel", n),
|
|
187
|
-
"aria-labelledby": p,
|
|
188
|
-
tabIndex: r,
|
|
189
|
-
hidden: !f,
|
|
190
|
-
"data-ui": "tabs-panel",
|
|
191
|
-
"data-state": f ? "active" : "inactive",
|
|
192
|
-
className: t
|
|
193
|
-
})
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
M.displayName = "Tabs.Panel";
|
|
197
|
-
var N = Object.assign(k, {
|
|
198
|
-
List: A,
|
|
199
|
-
Tab: j,
|
|
200
|
-
Panel: M
|
|
201
|
-
});
|
|
202
|
-
//#endregion
|
|
203
|
-
export { N as t };
|
package/dist/toast-CjmELMZZ.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { n } from "./media-D_eA_I-e.js";
|
|
4
|
-
import { t as r } from "./renderable-DzcIj1Lo.js";
|
|
5
|
-
import { t as i } from "./button-P2e7_44z.js";
|
|
6
|
-
import { i as a, t as o } from "./theme-scope-t7nAKc2c.js";
|
|
7
|
-
import { createContext as s, useCallback as c, useContext as l, useEffect as u, useId as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
8
|
-
import { vars as h } from "@jfrader/tokens/vars";
|
|
9
|
-
import { Fragment as g, jsx as _, jsxs as v } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { createPortal as y } from "react-dom";
|
|
11
|
-
//#region src/components/toast/toast.tsx
|
|
12
|
-
var b = 4, x = 5e3, S = "Dismiss", C = 100, w = "min(380px, calc(100vw - 32px))", T = "3px", E = s(null), D = s(null), O = e({
|
|
13
|
-
position: "fixed",
|
|
14
|
-
insetBlockEnd: 0,
|
|
15
|
-
insetInlineEnd: 0,
|
|
16
|
-
display: "flex",
|
|
17
|
-
flexDirection: "column",
|
|
18
|
-
gap: h.space[2],
|
|
19
|
-
inlineSize: w,
|
|
20
|
-
margin: 0,
|
|
21
|
-
paddingInlineEnd: h.space[4],
|
|
22
|
-
paddingBlockEnd: h.space[4],
|
|
23
|
-
pointerEvents: "none",
|
|
24
|
-
fontFamily: h.font.sans
|
|
25
|
-
}), k = e({
|
|
26
|
-
boxSizing: "border-box",
|
|
27
|
-
display: "grid",
|
|
28
|
-
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
29
|
-
alignItems: "start",
|
|
30
|
-
gap: h.space[2],
|
|
31
|
-
backgroundColor: h.color.surfaceRaised,
|
|
32
|
-
border: `1px solid ${h.color.border}`,
|
|
33
|
-
borderRadius: h.radius.lg,
|
|
34
|
-
boxShadow: h.shadow.floating,
|
|
35
|
-
padding: h.space[3],
|
|
36
|
-
color: h.color.text,
|
|
37
|
-
lineHeight: h.lineHeight.base,
|
|
38
|
-
pointerEvents: "auto",
|
|
39
|
-
transitionProperty: "opacity, transform",
|
|
40
|
-
transitionDuration: h.motion.duration.base,
|
|
41
|
-
transitionTimingFunction: h.motion.easeStandard,
|
|
42
|
-
"&[data-populated=\"false\"]": { opacity: 0 },
|
|
43
|
-
"&[data-state=\"closing\"]": {
|
|
44
|
-
opacity: 0,
|
|
45
|
-
transform: `translateY(${h.space[2]})`,
|
|
46
|
-
pointerEvents: "none"
|
|
47
|
-
},
|
|
48
|
-
[n]: { transitionDuration: "0s" }
|
|
49
|
-
}), A = {
|
|
50
|
-
neutral: e({ borderInlineStart: `${T} solid ${h.color.borderStrong}` }),
|
|
51
|
-
success: e({ borderInlineStart: `${T} solid ${h.color.success}` }),
|
|
52
|
-
danger: e({ borderInlineStart: `${T} solid ${h.color.danger}` })
|
|
53
|
-
}, j = e({
|
|
54
|
-
display: "grid",
|
|
55
|
-
gap: h.space[1],
|
|
56
|
-
alignSelf: "center",
|
|
57
|
-
minInlineSize: 0
|
|
58
|
-
}), M = e({
|
|
59
|
-
margin: 0,
|
|
60
|
-
fontSize: h.textSize.sm,
|
|
61
|
-
fontWeight: h.fontWeight.semibold
|
|
62
|
-
}), N = e({
|
|
63
|
-
margin: 0,
|
|
64
|
-
fontSize: h.textSize.sm,
|
|
65
|
-
color: h.color.textMuted
|
|
66
|
-
}), P = e({
|
|
67
|
-
gridColumn: 2,
|
|
68
|
-
gridRow: 1,
|
|
69
|
-
inlineSize: "32px",
|
|
70
|
-
paddingInline: 0
|
|
71
|
-
}), F = e({ display: "contents" }), I = e({
|
|
72
|
-
gridColumn: "1 / -1",
|
|
73
|
-
display: "flex",
|
|
74
|
-
gap: h.space[2]
|
|
75
|
-
});
|
|
76
|
-
function L(e) {
|
|
77
|
-
let t = l(D);
|
|
78
|
-
if (!t) throw Error(`Toast.${e} must be rendered inside <Toast.Provider>.`);
|
|
79
|
-
return t;
|
|
80
|
-
}
|
|
81
|
-
function R() {
|
|
82
|
-
let e = l(E);
|
|
83
|
-
if (!e) throw Error("useToast() must be called inside <Toast.Provider>.");
|
|
84
|
-
return e;
|
|
85
|
-
}
|
|
86
|
-
function z({ children: e, max: t = b, duration: n = x, dismissLabel: r = S }) {
|
|
87
|
-
let i = d(), a = p(0), [o, s] = m([]), l = p([]), u = p(/* @__PURE__ */ new Map()), h = Math.max(1, Math.floor(Number.isFinite(t) ? t : b)), g = c((e, t) => {
|
|
88
|
-
t ? u.current.set(e, t) : u.current.delete(e);
|
|
89
|
-
}, []), v = c((e, t) => {
|
|
90
|
-
let n = new Set(t.filter((e) => e.state === "open").map((e) => u.current.get(e.id)));
|
|
91
|
-
for (let t of e) {
|
|
92
|
-
let e = u.current.get(t.id);
|
|
93
|
-
if (e?.contains(e.ownerDocument.activeElement)) {
|
|
94
|
-
Array.from(e.parentElement?.querySelectorAll("[data-ui=\"toast\"]") ?? []).find((e) => n.has(e))?.querySelector("[data-toast-dismiss]")?.focus();
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}, []), y = c((e) => {
|
|
99
|
-
a.current += 1;
|
|
100
|
-
let t = `${i}toast-${a.current}`, r = {
|
|
101
|
-
id: t,
|
|
102
|
-
options: {
|
|
103
|
-
...e,
|
|
104
|
-
duration: e.duration === void 0 ? n : e.duration
|
|
105
|
-
},
|
|
106
|
-
state: "open"
|
|
107
|
-
}, o = l.current, c = [...o, r].slice(-h);
|
|
108
|
-
return v(o.filter((e) => !c.includes(e)), c), l.current = c, s(c), t;
|
|
109
|
-
}, [
|
|
110
|
-
i,
|
|
111
|
-
h,
|
|
112
|
-
n,
|
|
113
|
-
v
|
|
114
|
-
]), C = c((e) => {
|
|
115
|
-
let t = l.current;
|
|
116
|
-
v(t.filter((t) => t.id === e), t.filter((t) => t.id !== e));
|
|
117
|
-
let n = t.map((t) => t.id === e && t.state === "open" ? {
|
|
118
|
-
...t,
|
|
119
|
-
state: "closing"
|
|
120
|
-
} : t);
|
|
121
|
-
l.current = n, s(n);
|
|
122
|
-
}, [v]), w = c((e) => {
|
|
123
|
-
let t = l.current, n = t.filter((t) => t.id !== e);
|
|
124
|
-
v(t.filter((t) => t.id === e), n), l.current = n, s(n);
|
|
125
|
-
}, [v]), T = f(() => ({
|
|
126
|
-
toast: y,
|
|
127
|
-
dismiss: C
|
|
128
|
-
}), [y, C]), O = f(() => ({
|
|
129
|
-
toasts: o,
|
|
130
|
-
dismiss: C,
|
|
131
|
-
remove: w,
|
|
132
|
-
registerRoot: g,
|
|
133
|
-
dismissLabel: r
|
|
134
|
-
}), [
|
|
135
|
-
o,
|
|
136
|
-
C,
|
|
137
|
-
w,
|
|
138
|
-
g,
|
|
139
|
-
r
|
|
140
|
-
]);
|
|
141
|
-
return /* @__PURE__ */ _(E.Provider, {
|
|
142
|
-
value: T,
|
|
143
|
-
children: /* @__PURE__ */ _(D.Provider, {
|
|
144
|
-
value: O,
|
|
145
|
-
children: e
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
z.displayName = "Toast.Provider";
|
|
150
|
-
function B({ ref: e, className: n, sx: r, ...i }) {
|
|
151
|
-
let { toasts: s } = L("Viewport"), c = p(null), [l, d] = m(null), f = a()?.portalContainer, h = f === void 0 ? l : f;
|
|
152
|
-
return u(() => {
|
|
153
|
-
d(c.current?.ownerDocument.body ?? null);
|
|
154
|
-
}, []), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
|
|
155
|
-
hidden: !0,
|
|
156
|
-
ref: c
|
|
157
|
-
}), h && y(/* @__PURE__ */ _(o, { children: /* @__PURE__ */ _(t, {
|
|
158
|
-
className: n,
|
|
159
|
-
styles: O,
|
|
160
|
-
sx: r,
|
|
161
|
-
children: (t) => /* @__PURE__ */ _("div", {
|
|
162
|
-
...i,
|
|
163
|
-
ref: e,
|
|
164
|
-
"data-ui": "toast-viewport",
|
|
165
|
-
className: t,
|
|
166
|
-
children: s.map((e) => /* @__PURE__ */ _(V, { record: e }, e.id))
|
|
167
|
-
})
|
|
168
|
-
}) }), h)] });
|
|
169
|
-
}
|
|
170
|
-
B.displayName = "Toast.Viewport";
|
|
171
|
-
function V({ record: e }) {
|
|
172
|
-
let { dismiss: t, remove: n, registerRoot: a, dismissLabel: o } = L("Viewport"), { id: s, options: l, state: d } = e, { title: f, description: h, tone: y = "neutral", action: b } = l, x = l.duration, S = p(null), w = c((e) => {
|
|
173
|
-
S.current = e, a(s, e);
|
|
174
|
-
}, [s, a]), [T, E] = m(!1), [D, O] = m(!1), [R, z] = m(!1), B = p(x ?? 0);
|
|
175
|
-
u(() => {
|
|
176
|
-
let e = setTimeout(() => E(!0), C);
|
|
177
|
-
return () => clearTimeout(e);
|
|
178
|
-
}, []);
|
|
179
|
-
let V = T && d === "open" && x !== null && !D && !R;
|
|
180
|
-
return u(() => {
|
|
181
|
-
if (!V) return;
|
|
182
|
-
let e = performance.now(), n = setTimeout(() => t(s), B.current);
|
|
183
|
-
return () => {
|
|
184
|
-
clearTimeout(n), B.current -= performance.now() - e;
|
|
185
|
-
};
|
|
186
|
-
}, [
|
|
187
|
-
V,
|
|
188
|
-
t,
|
|
189
|
-
s
|
|
190
|
-
]), u(() => {
|
|
191
|
-
if (d !== "closing") return;
|
|
192
|
-
let e = S.current, t = e && typeof e.getAnimations == "function" ? e.getAnimations() : [], r = !1;
|
|
193
|
-
return Promise.allSettled(t.map((e) => e.finished)).then(() => {
|
|
194
|
-
r || n(s);
|
|
195
|
-
}), () => {
|
|
196
|
-
r = !0;
|
|
197
|
-
};
|
|
198
|
-
}, [
|
|
199
|
-
d,
|
|
200
|
-
n,
|
|
201
|
-
s
|
|
202
|
-
]), /* @__PURE__ */ v("div", {
|
|
203
|
-
ref: w,
|
|
204
|
-
inert: d === "closing",
|
|
205
|
-
"data-ui": "toast",
|
|
206
|
-
"data-tone": y,
|
|
207
|
-
"data-state": d,
|
|
208
|
-
"data-populated": T,
|
|
209
|
-
onPointerEnter: () => O(!0),
|
|
210
|
-
onPointerLeave: () => O(!1),
|
|
211
|
-
onFocus: () => z(!0),
|
|
212
|
-
onBlur: (e) => {
|
|
213
|
-
e.currentTarget.contains(e.relatedTarget) || z(!1);
|
|
214
|
-
},
|
|
215
|
-
css: [k, A[y]],
|
|
216
|
-
children: [/* @__PURE__ */ _("div", {
|
|
217
|
-
role: y === "danger" ? "alert" : "status",
|
|
218
|
-
"aria-atomic": "true",
|
|
219
|
-
css: j,
|
|
220
|
-
children: T && /* @__PURE__ */ v(g, { children: [r(f) && /* @__PURE__ */ _("div", {
|
|
221
|
-
css: M,
|
|
222
|
-
children: f
|
|
223
|
-
}), r(h) && /* @__PURE__ */ _("div", {
|
|
224
|
-
css: N,
|
|
225
|
-
children: h
|
|
226
|
-
})] })
|
|
227
|
-
}), T && /* @__PURE__ */ v("div", {
|
|
228
|
-
css: F,
|
|
229
|
-
children: [/* @__PURE__ */ _(i, {
|
|
230
|
-
variant: "ghost",
|
|
231
|
-
size: "sm",
|
|
232
|
-
"aria-label": o,
|
|
233
|
-
"data-toast-dismiss": "",
|
|
234
|
-
onClick: () => t(s),
|
|
235
|
-
css: P,
|
|
236
|
-
children: /* @__PURE__ */ _(H, {})
|
|
237
|
-
}), b && /* @__PURE__ */ _("div", {
|
|
238
|
-
css: I,
|
|
239
|
-
children: /* @__PURE__ */ _(i, {
|
|
240
|
-
variant: "outline",
|
|
241
|
-
size: "sm",
|
|
242
|
-
onClick: (e) => {
|
|
243
|
-
b?.onClick(e), e.defaultPrevented || t(s);
|
|
244
|
-
},
|
|
245
|
-
children: b.label
|
|
246
|
-
})
|
|
247
|
-
})]
|
|
248
|
-
})]
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
function H() {
|
|
252
|
-
return /* @__PURE__ */ v("svg", {
|
|
253
|
-
"aria-hidden": "true",
|
|
254
|
-
viewBox: "0 0 16 16",
|
|
255
|
-
width: "16",
|
|
256
|
-
height: "16",
|
|
257
|
-
fill: "none",
|
|
258
|
-
stroke: "currentColor",
|
|
259
|
-
strokeWidth: "2",
|
|
260
|
-
strokeLinecap: "round",
|
|
261
|
-
children: [/* @__PURE__ */ _("line", {
|
|
262
|
-
x1: "4",
|
|
263
|
-
y1: "4",
|
|
264
|
-
x2: "12",
|
|
265
|
-
y2: "12"
|
|
266
|
-
}), /* @__PURE__ */ _("line", {
|
|
267
|
-
x1: "12",
|
|
268
|
-
y1: "4",
|
|
269
|
-
x2: "4",
|
|
270
|
-
y2: "12"
|
|
271
|
-
})]
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
function U(e) {
|
|
275
|
-
return /* @__PURE__ */ _(z, { ...e });
|
|
276
|
-
}
|
|
277
|
-
U.displayName = "Toast";
|
|
278
|
-
var W = Object.assign(U, {
|
|
279
|
-
Provider: z,
|
|
280
|
-
Viewport: B
|
|
281
|
-
});
|
|
282
|
-
//#endregion
|
|
283
|
-
export { R as n, W as t };
|
package/dist/tooltip-CaL3rKbV.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
-
import { t as n } from "./use-controlled-state-CVXDa-qM.js";
|
|
4
|
-
import { t as r } from "./trigger-style-B1KVC8O1.js";
|
|
5
|
-
import { n as i, t as a } from "./use-overlay-floating-Bit-f0FU.js";
|
|
6
|
-
import { createContext as o, useContext as s, useMemo as c } from "react";
|
|
7
|
-
import { vars as l } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
9
|
-
import { useDismiss as d, useFocus as f, useHover as p, useInteractions as m, useMergeRefs as h, useRole as g } from "@floating-ui/react";
|
|
10
|
-
//#region src/components/tooltip/tooltip.tsx
|
|
11
|
-
var _ = 300, v = 100, y = o(null);
|
|
12
|
-
function b(e) {
|
|
13
|
-
let t = s(y);
|
|
14
|
-
if (!t) throw Error(`Tooltip.${e} must be rendered inside <Tooltip>.`);
|
|
15
|
-
return t;
|
|
16
|
-
}
|
|
17
|
-
var x = e({
|
|
18
|
-
boxSizing: "border-box",
|
|
19
|
-
backgroundColor: l.color.bgSoft,
|
|
20
|
-
border: `1px solid ${l.color.border}`,
|
|
21
|
-
borderRadius: l.radius.sm,
|
|
22
|
-
boxShadow: l.shadow.raised,
|
|
23
|
-
padding: `${l.space[1]} ${l.space[2]}`,
|
|
24
|
-
maxInlineSize: "260px",
|
|
25
|
-
color: l.color.text,
|
|
26
|
-
fontFamily: l.font.sans,
|
|
27
|
-
fontSize: l.textSize.sm,
|
|
28
|
-
lineHeight: l.lineHeight.base
|
|
29
|
-
});
|
|
30
|
-
function S({ open: e, defaultOpen: t = !1, onOpenChange: r, placement: i = "top", openDelay: o = _, closeDelay: s = v, children: l }) {
|
|
31
|
-
let [h = !1, b] = n(e, t, r), { refs: x, floatingStyles: S, context: C } = a({
|
|
32
|
-
open: h,
|
|
33
|
-
placement: i,
|
|
34
|
-
onOpenChange: b
|
|
35
|
-
}), w = p(C, {
|
|
36
|
-
delay: {
|
|
37
|
-
open: o,
|
|
38
|
-
close: s
|
|
39
|
-
},
|
|
40
|
-
move: !1
|
|
41
|
-
}), T = f(C), E = d(C, { escapeKey: !0 }), D = g(C, { role: "tooltip" }), { getReferenceProps: O, getFloatingProps: k } = m([
|
|
42
|
-
w,
|
|
43
|
-
T,
|
|
44
|
-
E,
|
|
45
|
-
D
|
|
46
|
-
]), A = c(() => ({
|
|
47
|
-
open: h,
|
|
48
|
-
refs: x,
|
|
49
|
-
floatingStyles: S,
|
|
50
|
-
getReferenceProps: O,
|
|
51
|
-
getFloatingProps: k
|
|
52
|
-
}), [
|
|
53
|
-
h,
|
|
54
|
-
x,
|
|
55
|
-
S,
|
|
56
|
-
O,
|
|
57
|
-
k
|
|
58
|
-
]);
|
|
59
|
-
return /* @__PURE__ */ u(y.Provider, {
|
|
60
|
-
value: A,
|
|
61
|
-
children: l
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
S.displayName = "Tooltip";
|
|
65
|
-
function C({ ref: e, "aria-describedby": n, className: i, sx: a, ...o }) {
|
|
66
|
-
let { refs: s, getReferenceProps: c } = b("Trigger"), l = h([s.setReference, e]), d = c(o), f = [n, d["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
67
|
-
return /* @__PURE__ */ u(t, {
|
|
68
|
-
className: i,
|
|
69
|
-
styles: r,
|
|
70
|
-
sx: a,
|
|
71
|
-
children: (e) => /* @__PURE__ */ u("button", {
|
|
72
|
-
type: "button",
|
|
73
|
-
...d,
|
|
74
|
-
ref: l,
|
|
75
|
-
"aria-describedby": f,
|
|
76
|
-
"data-ui": "tooltip-trigger",
|
|
77
|
-
className: e
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
C.displayName = "Tooltip.Trigger";
|
|
82
|
-
function w({ ref: e, style: n, className: r, sx: a, ...o }) {
|
|
83
|
-
let { open: s, refs: c, floatingStyles: l, getFloatingProps: d } = b("Content"), f = h([c.setFloating, e]);
|
|
84
|
-
if (!s) return null;
|
|
85
|
-
let { tabIndex: p, ...m } = d(o);
|
|
86
|
-
return /* @__PURE__ */ u(i, { children: /* @__PURE__ */ u(t, {
|
|
87
|
-
className: r,
|
|
88
|
-
styles: x,
|
|
89
|
-
sx: a,
|
|
90
|
-
children: (e) => /* @__PURE__ */ u("div", {
|
|
91
|
-
...m,
|
|
92
|
-
ref: f,
|
|
93
|
-
"data-ui": "tooltip",
|
|
94
|
-
style: {
|
|
95
|
-
...n,
|
|
96
|
-
...l
|
|
97
|
-
},
|
|
98
|
-
className: e
|
|
99
|
-
})
|
|
100
|
-
}) });
|
|
101
|
-
}
|
|
102
|
-
w.displayName = "Tooltip.Content";
|
|
103
|
-
var T = Object.assign(S, {
|
|
104
|
-
Trigger: C,
|
|
105
|
-
Content: w
|
|
106
|
-
});
|
|
107
|
-
//#endregion
|
|
108
|
-
export { T as t };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
-
//#region src/utils/use-latest-callback.ts
|
|
4
|
-
function i(r) {
|
|
5
|
-
let i = n(r);
|
|
6
|
-
return t(() => {
|
|
7
|
-
i.current = r;
|
|
8
|
-
}), e((...e) => i.current?.(...e), []);
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/utils/use-controlled-state.ts
|
|
12
|
-
function a(t, a, o) {
|
|
13
|
-
let s = t !== void 0, [c, l] = r(a), u = s ? t : c, d = n(u);
|
|
14
|
-
d.current = u;
|
|
15
|
-
let f = i(o);
|
|
16
|
-
return [u, e((e) => {
|
|
17
|
-
e !== d.current && (s || l(e), f(e));
|
|
18
|
-
}, [s, f])];
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { i as n, a as t };
|
|
@@ -1,31 +0,0 @@
|
|
|
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, autoUpdate as i, flip as a, offset as o, shift as s, useFloating as c } from "@floating-ui/react";
|
|
5
|
-
//#region src/overlay/overlay-portal.tsx
|
|
6
|
-
function l({ 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
|
-
l.displayName = "OverlayPortal";
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/overlay/use-overlay-floating.ts
|
|
16
|
-
var u = 8, d = 8;
|
|
17
|
-
function f({ open: e, onOpenChange: t, placement: n }) {
|
|
18
|
-
return c({
|
|
19
|
-
open: e,
|
|
20
|
-
onOpenChange: t,
|
|
21
|
-
placement: n,
|
|
22
|
-
middleware: [
|
|
23
|
-
o(u),
|
|
24
|
-
a({ padding: d }),
|
|
25
|
-
s({ padding: d })
|
|
26
|
-
],
|
|
27
|
-
whileElementsMounted: i
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { l as n, f as t };
|
|
@@ -32,10 +32,10 @@ function f({ ref: e, theme: t = "dark", portalContainer: s, className: l, sx: d,
|
|
|
32
32
|
styles: i,
|
|
33
33
|
sx: d,
|
|
34
34
|
children: (n) => /* @__PURE__ */ c("div", {
|
|
35
|
-
"data-ui": "theme-root",
|
|
36
|
-
"data-theme": t,
|
|
37
35
|
...f,
|
|
38
36
|
ref: e,
|
|
37
|
+
"data-ui": "theme-root",
|
|
38
|
+
"data-theme": t,
|
|
39
39
|
className: n
|
|
40
40
|
})
|
|
41
41
|
}) })
|