@jfrader/ui 0.3.0 → 0.5.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 +2 -0
- package/dist/{accordion-Bd-j04hW.js → accordion-xCI_u0BV.js} +2 -2
- 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-B58xempt.js +382 -0
- package/dist/announcement-bar.js +2 -0
- package/dist/avatar-group-DOQQuV51.js +138 -0
- package/dist/avatar-group.js +2 -0
- package/dist/bottom-sheet-DPJBFkie.js +673 -0
- package/dist/bottom-sheet.js +2 -0
- package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-Cfw_hgt2.js} +1 -1
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-P2e7_44z.js → button-C92uYFJW.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-B3Svu0X2.js +447 -0
- package/dist/calendar.js +1 -1
- package/dist/carousel-IvPqN-oM.js +472 -0
- package/dist/carousel.js +2 -0
- package/dist/{checkbox-COYG6L7d.js → checkbox-cFquiSdy.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-DTQd_M-G.js +289 -0
- package/dist/chip-group.js +2 -0
- package/dist/code-block/shiki.js +147 -0
- package/dist/code-block-ahnRi-g8.js +292 -0
- package/dist/code-block.js +2 -0
- package/dist/collection-registry-k6JcD3Jr.js +44 -0
- package/dist/combobox-Bhzvu9ma.js +334 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BQ5LleGb.js +384 -0
- package/dist/command-palette.js +1 -1
- package/dist/copy-button-ByiA6D3R.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-5zKSSuFF.js +255 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-B5uFWsm-.js +562 -0
- package/dist/date-range-picker.js +2 -0
- package/dist/{dialog-xaydbXl2.js → dialog-ciiv9H2b.js} +19 -19
- package/dist/dialog.js +1 -1
- package/dist/drawer-DsASTiP-.js +553 -0
- package/dist/drawer.js +2 -0
- package/dist/empty-state-CDgrjPPf.js +142 -0
- package/dist/empty-state.js +2 -0
- package/dist/expandable-card-C-qJcZ14.js +340 -0
- package/dist/expandable-card.js +2 -0
- package/dist/field-anatomy-COVdNpf5.js +84 -0
- package/dist/file-dropzone-pR4v7owg.js +457 -0
- package/dist/file-dropzone.js +2 -0
- package/dist/filter-toolbar-D5KEKTSe.js +312 -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-B-nrCIy2.js +347 -0
- package/dist/hover-card.js +2 -0
- package/dist/image-compare-ciuhPtQZ.js +415 -0
- package/dist/image-compare.js +2 -0
- package/dist/index.js +79 -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-BcySQfjZ.js +798 -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-BcQKX2EJ.js +599 -0
- package/dist/mention-input.js +2 -0
- package/dist/menu-xwOOUtWP.js +275 -0
- package/dist/menu.js +1 -1
- package/dist/metric-card-Bh9K4fZs.js +118 -0
- package/dist/metric-card.js +2 -0
- package/dist/multi-select-Pce_IYnz.js +590 -0
- package/dist/multi-select.js +2 -0
- package/dist/{navigation-DhnKriOp.js → navigation-sP5fiuQS.js} +4 -4
- package/dist/navigation.js +1 -1
- package/dist/overlay-layer-SeUyyEPD.js +64 -0
- package/dist/overlay-portal-C4JZFq2M.js +15 -0
- package/dist/{pagination-DYdwsxwe.js → pagination-DmXZ8E85.js} +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-field-03pWRkuY.js +250 -0
- package/dist/password-field.js +2 -0
- package/dist/popover-QHcEvf9c.js +119 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-BpJswTG4.js → progress-CbOWBUdA.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/radio-cards-D2QZENI_.js +455 -0
- package/dist/radio-cards.js +2 -0
- package/dist/{radio-group-Ce0_IWQr.js → radio-group-E6mMRgo7.js} +4 -4
- package/dist/radio-group.js +1 -1
- package/dist/resizable-panels-BhjUVXZZ.js +519 -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-IxF0IJXm.js +274 -0
- package/dist/search-field.js +2 -0
- package/dist/segmented-control-yO1K1nbi.js +326 -0
- package/dist/segmented-control.js +2 -0
- package/dist/select-n_H52W1Z.js +292 -0
- package/dist/select.js +1 -1
- package/dist/signature-pad-q2SAsrdD.js +640 -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-t0B5cecO.js +477 -0
- package/dist/slider.js +2 -0
- package/dist/sortable-data-table-tirqlLY2.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-Cb3EHs64.js +268 -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-DiZC57-3.js +418 -0
- package/dist/swipe-actions.js +2 -0
- package/dist/{switch-Dr-qjmT4.js → switch-qwv8jQnR.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{tabs-CK_g1RKa.js → tabs-CAVJndX1.js} +2 -2
- 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-C8TWG-tY.js} +6 -5
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DyfjtP0A.js → textarea-BrW0XcG_.js} +6 -5
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BbTBuLMQ.js +46 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-t7nAKc2c.js +27 -0
- package/dist/time-picker-Db8D49cP.js +305 -0
- package/dist/time-picker.js +2 -0
- package/dist/timeline-k3nURuCP.js +618 -0
- package/dist/timeline.js +2 -0
- package/dist/toast-BHxI32ZA.js +352 -0
- package/dist/toast-stack-DqrAzdg5.js +183 -0
- package/dist/toast-stack.js +2 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-CI0e7hFm.js → toggle-group-fcjzpifI.js} +4 -4
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CkeiW9C1.js +113 -0
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-C2liIxqy.js +360 -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/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 +1 -1
- 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/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/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 +23 -5
- 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/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/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.d.ts +70 -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/tag-input/index.d.ts +2 -0
- package/dist/types/components/tag-input/tag-input.d.ts +66 -0
- package/dist/types/components/theme-root/theme-root.d.ts +9 -3
- 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 +1 -1
- 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 +40 -0
- package/dist/types/overlay/overlay-layer.d.ts +33 -0
- package/dist/types/overlay/overlay-portal.d.ts +7 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +11 -1
- package/dist/types/styling/media.d.ts +1 -0
- package/dist/types/styling/theme-scope.d.ts +19 -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-DvJifLpF.js +31 -0
- package/package.json +175 -3
- package/dist/calendar-C9Yad_-w.js +0 -394
- package/dist/collection-registry-BTYi6zGh.js +0 -98
- package/dist/combobox-DrmjBbo7.js +0 -327
- package/dist/command-palette-V_2pEay7.js +0 -379
- package/dist/date-picker-ClUYBIBh.js +0 -250
- package/dist/field-anatomy-D2ToMeRa.js +0 -109
- package/dist/menu-DU60SMdt.js +0 -216
- package/dist/popover-BtN_0ejj.js +0 -113
- package/dist/select-BCS0-LVW.js +0 -286
- package/dist/theme-root-BiXXvQvr.js +0 -42
- package/dist/toast-iqelR-r0.js +0 -282
- package/dist/tooltip-CB-HC1js.js +0 -108
- package/dist/use-controlled-state-CVXDa-qM.js +0 -21
- package/dist/use-overlay-floating-efeqppiw.js +0 -19
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
|
+
import { t as n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
5
|
+
import { t as a } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
+
import { t as o } from "./part-id-D0zksy32.js";
|
|
7
|
+
import { Children as s, Fragment as c, createContext as l, isValidElement as u, useCallback as d, useContext as f, useEffect as p, useId as m, useLayoutEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
8
|
+
import { vars as y } from "@jfrader/tokens/vars";
|
|
9
|
+
import { jsx as b, jsxs as ee } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { animate as te, useReducedMotion as ne } from "motion/react";
|
|
11
|
+
//#region src/components/resizable-panels/resizable-panels.tsx
|
|
12
|
+
var re = 80, ie = 16, ae = 64, oe = 44, se = 90, x = .5, ce = .5, le = 160, ue = {
|
|
13
|
+
type: "spring",
|
|
14
|
+
stiffness: 400,
|
|
15
|
+
damping: 40,
|
|
16
|
+
mass: 1
|
|
17
|
+
}, S = 1e4, C = .001, w = "--resizable-panels-size", de = ":scope > [data-ui=\"resizable-panels-panel\"]", fe = ":scope > [data-ui=\"resizable-panels-separator\"]", pe = [
|
|
18
|
+
"border-left-width",
|
|
19
|
+
"border-right-width",
|
|
20
|
+
"padding-left",
|
|
21
|
+
"padding-right"
|
|
22
|
+
], me = e({
|
|
23
|
+
label: "resizable-panels",
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "row",
|
|
26
|
+
boxSizing: "border-box",
|
|
27
|
+
inlineSize: "100%",
|
|
28
|
+
blockSize: "100%",
|
|
29
|
+
minInlineSize: 0,
|
|
30
|
+
minBlockSize: 0,
|
|
31
|
+
overflow: "hidden",
|
|
32
|
+
border: `1px solid ${y.color.border}`,
|
|
33
|
+
borderRadius: y.radius.md,
|
|
34
|
+
backgroundColor: y.color.surface,
|
|
35
|
+
color: y.color.text,
|
|
36
|
+
fontFamily: y.font.sans,
|
|
37
|
+
fontSize: y.textSize.sm,
|
|
38
|
+
lineHeight: y.lineHeight.base,
|
|
39
|
+
"&[data-dragging]": {
|
|
40
|
+
userSelect: "none",
|
|
41
|
+
cursor: "col-resize"
|
|
42
|
+
}
|
|
43
|
+
}), T = e({
|
|
44
|
+
label: "resizable-panels-panel",
|
|
45
|
+
display: "flex",
|
|
46
|
+
flex: `var(${w}) 1 0px`,
|
|
47
|
+
minInlineSize: 0,
|
|
48
|
+
minBlockSize: 0,
|
|
49
|
+
overflow: "hidden"
|
|
50
|
+
}), he = e({
|
|
51
|
+
flex: "1 1 auto",
|
|
52
|
+
minInlineSize: 0,
|
|
53
|
+
overflow: "auto",
|
|
54
|
+
"&[inert]": { overflow: "hidden" }
|
|
55
|
+
}), E = "& > [data-ui=\"resizable-panels-grip\"]", D = "&:hover > [data-ui=\"resizable-panels-grip\"], &[data-state=\"dragging\"] > [data-ui=\"resizable-panels-grip\"]", ge = e({
|
|
56
|
+
label: "resizable-panels-separator",
|
|
57
|
+
position: "relative",
|
|
58
|
+
flex: "0 0 auto",
|
|
59
|
+
boxSizing: "border-box",
|
|
60
|
+
inlineSize: y.space[8],
|
|
61
|
+
display: "grid",
|
|
62
|
+
placeItems: "center",
|
|
63
|
+
cursor: "col-resize",
|
|
64
|
+
touchAction: "none",
|
|
65
|
+
userSelect: "none",
|
|
66
|
+
color: y.color.text,
|
|
67
|
+
"&::before": {
|
|
68
|
+
content: "\"\"",
|
|
69
|
+
position: "absolute",
|
|
70
|
+
insetBlock: 0,
|
|
71
|
+
insetInline: 0,
|
|
72
|
+
marginInline: "auto",
|
|
73
|
+
inlineSize: "1px",
|
|
74
|
+
backgroundColor: y.color.borderControl
|
|
75
|
+
},
|
|
76
|
+
"&:focus-visible": n,
|
|
77
|
+
"&[aria-disabled=\"true\"]": { cursor: "default" },
|
|
78
|
+
[E]: {
|
|
79
|
+
position: "relative",
|
|
80
|
+
inlineSize: y.space[1],
|
|
81
|
+
blockSize: y.space[8],
|
|
82
|
+
borderRadius: y.radius.full,
|
|
83
|
+
backgroundColor: y.color.borderControl,
|
|
84
|
+
transition: `transform ${y.motion.duration.fast} ${y.motion.easeStandard}, background-color ${y.motion.duration.fast} ${y.motion.easeStandard}`
|
|
85
|
+
},
|
|
86
|
+
[D]: {
|
|
87
|
+
backgroundColor: y.color.textMuted,
|
|
88
|
+
transform: "scaleY(1.25)"
|
|
89
|
+
},
|
|
90
|
+
[i]: {
|
|
91
|
+
[E]: { transition: "none" },
|
|
92
|
+
[D]: { transform: "none" }
|
|
93
|
+
},
|
|
94
|
+
[r]: {
|
|
95
|
+
"&::before": {
|
|
96
|
+
forcedColorAdjust: "none",
|
|
97
|
+
backgroundColor: "CanvasText"
|
|
98
|
+
},
|
|
99
|
+
[E]: {
|
|
100
|
+
forcedColorAdjust: "none",
|
|
101
|
+
backgroundColor: "CanvasText"
|
|
102
|
+
},
|
|
103
|
+
[D]: { backgroundColor: "Highlight" }
|
|
104
|
+
}
|
|
105
|
+
}), _e = e({
|
|
106
|
+
position: "relative",
|
|
107
|
+
display: "grid",
|
|
108
|
+
placeItems: "center",
|
|
109
|
+
boxSizing: "border-box",
|
|
110
|
+
inlineSize: y.space[6],
|
|
111
|
+
blockSize: y.space[6],
|
|
112
|
+
border: `1px solid ${y.color.borderControl}`,
|
|
113
|
+
borderRadius: y.radius.full,
|
|
114
|
+
backgroundColor: y.color.surfaceRaised,
|
|
115
|
+
boxShadow: y.shadow.raised,
|
|
116
|
+
color: y.color.text,
|
|
117
|
+
"&::before": {
|
|
118
|
+
content: "\"\"",
|
|
119
|
+
borderBlock: `${y.space[1]} solid transparent`
|
|
120
|
+
},
|
|
121
|
+
"&[data-side=\"start\"]::before": { borderInlineStart: `${y.space[1]} solid currentColor` },
|
|
122
|
+
"&[data-side=\"end\"]::before": { borderInlineEnd: `${y.space[1]} solid currentColor` },
|
|
123
|
+
[r]: {
|
|
124
|
+
borderColor: "CanvasText",
|
|
125
|
+
boxShadow: "none",
|
|
126
|
+
color: "CanvasText"
|
|
127
|
+
}
|
|
128
|
+
}), ve = l(null), O = (e) => e.reduce((e, t) => e + t, 0), k = (e, t, n) => Math.min(n, Math.max(t, e)), A = (e) => Math.round(e * S) / S, ye = (e) => Math.round(e * 100) / 100, j = (e, t) => e.length === t.length && e.every((e, n) => Math.abs(e - t[n]) < .5 / S), be = (e, t) => e.length === t.length && e.every((e, n) => Math.abs(e - t[n]) < 1e-4);
|
|
129
|
+
function xe(e, t) {
|
|
130
|
+
if (e.length !== t || !e.every((e) => Number.isFinite(e) && e >= 0)) throw Error(`ResizablePanels value needs ${t} finite nonnegative weights, one per panel.`);
|
|
131
|
+
let n = O(e);
|
|
132
|
+
if (n <= 0) throw Error("ResizablePanels value needs at least one positive weight.");
|
|
133
|
+
return e.map((e) => A(e / n * 100));
|
|
134
|
+
}
|
|
135
|
+
var M = (e) => {
|
|
136
|
+
let t = O(e);
|
|
137
|
+
return e.map((e) => A(t > 0 ? e / t * 100 : 0));
|
|
138
|
+
};
|
|
139
|
+
function Se(e, t) {
|
|
140
|
+
let n = typeof e == "function" ? e(t) : void 0;
|
|
141
|
+
return e && typeof e != "function" && (e.current = t), () => {
|
|
142
|
+
typeof n == "function" ? n() : typeof e == "function" ? e(null) : e && (e.current = null);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function Ce(e, t) {
|
|
146
|
+
let n = [];
|
|
147
|
+
for (let t of s.toArray(e)) {
|
|
148
|
+
if (!u(t) || t.type !== V) throw Error("ResizablePanels accepts only ResizablePanels.Panel children.");
|
|
149
|
+
n.push(t);
|
|
150
|
+
}
|
|
151
|
+
if (n.length === 0) throw Error("ResizablePanels needs at least one ResizablePanels.Panel.");
|
|
152
|
+
let r = /* @__PURE__ */ new Set();
|
|
153
|
+
return {
|
|
154
|
+
elements: n,
|
|
155
|
+
configs: n.map(({ props: e }) => {
|
|
156
|
+
let { value: n, minSize: i = re, maxSize: a, collapsible: s = !1 } = e;
|
|
157
|
+
if (typeof n != "string" || n === "") throw Error("ResizablePanels.Panel needs a nonempty string value.");
|
|
158
|
+
if (r.has(n)) throw Error(`ResizablePanels.Panel values must be unique: "${n}".`);
|
|
159
|
+
if (r.add(n), !e["aria-label"] && !e["aria-labelledby"]) throw Error(`ResizablePanels.Panel "${n}" needs aria-label or aria-labelledby.`);
|
|
160
|
+
if (!Number.isFinite(i) || i < 0) throw Error(`ResizablePanels.Panel "${n}" minSize must be finite and nonnegative.`);
|
|
161
|
+
if (a !== void 0 && (!Number.isFinite(a) || a < i)) throw Error(`ResizablePanels.Panel "${n}" maxSize must be finite and at least minSize.`);
|
|
162
|
+
return {
|
|
163
|
+
value: n,
|
|
164
|
+
id: e.id ?? o(t, "panel", n),
|
|
165
|
+
min: i,
|
|
166
|
+
max: a ?? Infinity,
|
|
167
|
+
collapsible: s,
|
|
168
|
+
label: e["aria-label"],
|
|
169
|
+
labelledBy: e["aria-labelledby"]
|
|
170
|
+
};
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function N(e, t, n) {
|
|
175
|
+
let r = O(e.map((e, n) => t[n] ? e.min : 0)), i = r > n ? n / r : 1;
|
|
176
|
+
return {
|
|
177
|
+
low: e.map((e, n) => t[n] ? e.min * i : 0),
|
|
178
|
+
high: e.map((e, r) => t[r] ? Math.min(e.max, n) : 0)
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function P(e, t, n) {
|
|
182
|
+
let { low: r, high: i } = N(t, t.map((t, n) => !(t.collapsible && e[n] === 0)), n), a = e.map((e, t) => k(e / 100 * n, r[t], i[t])), o = n - O(a), s = a.map((e, t) => o > 0 ? i[t] - e : e - r[t]), c = O(s);
|
|
183
|
+
if (Math.abs(o) > C && c > 0) {
|
|
184
|
+
let e = Math.min(1, Math.abs(o) / c);
|
|
185
|
+
return a.map((t, n) => t + Math.sign(o) * s[n] * e);
|
|
186
|
+
}
|
|
187
|
+
return a;
|
|
188
|
+
}
|
|
189
|
+
function F(e, t, n, r) {
|
|
190
|
+
let i = n[t], a = n[t + 1], { low: o, high: s } = N(n, n.map((n, r) => r === t || r === t + 1 || !(n.collapsible && e[r] <= C)), r), c = e[t], l = c + e[t + 1], u = Math.max(o[t], l - s[t + 1]), d = Math.min(s[t], l - o[t + 1]);
|
|
191
|
+
return {
|
|
192
|
+
index: t,
|
|
193
|
+
total: l,
|
|
194
|
+
size: c,
|
|
195
|
+
lower: u,
|
|
196
|
+
upper: d,
|
|
197
|
+
feasible: u <= d + C,
|
|
198
|
+
minPrimary: o[t],
|
|
199
|
+
minSecondary: o[t + 1],
|
|
200
|
+
primaryCollapsible: i.collapsible,
|
|
201
|
+
secondaryCollapsible: a.collapsible,
|
|
202
|
+
primaryCollapsed: i.collapsible && c <= C,
|
|
203
|
+
secondaryCollapsed: a.collapsible && l - c <= C,
|
|
204
|
+
canCollapsePrimary: i.collapsible && l <= s[t + 1] + C,
|
|
205
|
+
canCollapseSecondary: a.collapsible && l <= s[t] + C
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
var I = (e, t, n) => e.map((e, r) => r === t.index ? n : r === t.index + 1 ? t.total - n : e), we = (e) => e.canCollapsePrimary ? 0 : e.feasible ? e.lower : e.size, Te = (e) => e.canCollapseSecondary ? e.total : e.feasible ? e.upper : e.size;
|
|
209
|
+
function L(e, t) {
|
|
210
|
+
return e.canCollapsePrimary && t < e.minPrimary * x ? 0 : e.canCollapseSecondary && e.total - t < e.minSecondary * x ? e.total : e.feasible ? k(t, e.lower, e.upper) : e.size;
|
|
211
|
+
}
|
|
212
|
+
var Ee = (e) => Math.sign(e) * oe * (1 - 1 / (1 + Math.abs(e) / oe));
|
|
213
|
+
function R(e, t, n) {
|
|
214
|
+
return e.primaryCollapsed ? n > 0 ? t.primary : e.size : e.secondaryCollapsed ? n < 0 ? t.secondary : e.size : e.feasible ? n < 0 && e.size <= e.lower + C && e.canCollapsePrimary ? 0 : n > 0 && e.size >= e.upper - C && e.canCollapseSecondary ? e.total : k(e.size + n, e.lower, e.upper) : e.size;
|
|
215
|
+
}
|
|
216
|
+
function z(e, t) {
|
|
217
|
+
return e.primaryCollapsible ? e.primaryCollapsed ? t.primary : e.canCollapsePrimary ? 0 : e.size : e.secondaryCollapsible ? e.secondaryCollapsed ? t.secondary : e.canCollapseSecondary ? e.total : e.size : e.size;
|
|
218
|
+
}
|
|
219
|
+
var De = {
|
|
220
|
+
ArrowLeft: (e, t, n) => R(e, t, -n),
|
|
221
|
+
ArrowRight: R,
|
|
222
|
+
Home: (e) => e.feasible ? e.lower : e.size,
|
|
223
|
+
End: (e) => e.feasible ? e.upper : e.size,
|
|
224
|
+
Enter: z
|
|
225
|
+
};
|
|
226
|
+
function B({ ref: e, children: n, value: r, defaultValue: i, onValueChange: s, onValueCommit: l, disabled: u = !1, locale: f, getValueText: y, slotProps: re, className: oe, sx: x, ...S }) {
|
|
227
|
+
let T = m(), { elements: he, configs: E } = Ce(n, T), D = E.length, [A] = v(() => xe(i ?? r ?? E.map(() => 1), D)), [N, R] = a(r, A, (e) => s?.([...e])), z = xe(N ?? A, D), B = r !== void 0, V = ne() ?? !1, [H, Oe] = v(0), [ke, Ae] = v(null), U = _(null), W = _(null), G = _(null), K = _(null), je = _(/* @__PURE__ */ new Map()), Me = g(() => new Intl.NumberFormat(f, {
|
|
228
|
+
style: "percent",
|
|
229
|
+
maximumFractionDigits: 0
|
|
230
|
+
}), [f]), q = H > 0 ? P(z, E, H) : null, J = q ? q.map((e) => e / H) : z.map((e) => e / 100), Ne = J.map((e) => e.toFixed(5)).join(" "), Pe = (e) => o(T, "separator", E[e].value), Fe = d((t) => {
|
|
231
|
+
U.current = t;
|
|
232
|
+
let n = Se(e, t);
|
|
233
|
+
return () => {
|
|
234
|
+
U.current = null, n();
|
|
235
|
+
};
|
|
236
|
+
}, [e]), Y = (e) => {
|
|
237
|
+
U.current?.querySelectorAll(de).forEach((t, n) => t.style.setProperty(w, String(Math.max(0, e[n] ?? 0))));
|
|
238
|
+
}, X = () => {
|
|
239
|
+
let e = G.current;
|
|
240
|
+
G.current = null, e?.controls?.stop();
|
|
241
|
+
}, Z = (e, t) => {
|
|
242
|
+
if (X(), V || be(e, t)) {
|
|
243
|
+
Y(t);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
let n = {
|
|
247
|
+
controls: null,
|
|
248
|
+
visual: [...e]
|
|
249
|
+
};
|
|
250
|
+
G.current = n, Y(e), n.controls = te(0, 1, {
|
|
251
|
+
...ue,
|
|
252
|
+
onUpdate: (r) => {
|
|
253
|
+
G.current === n && (n.visual = e.map((e, n) => Math.max(0, e + (t[n] - e) * r)), Y(n.visual));
|
|
254
|
+
},
|
|
255
|
+
onComplete: () => {
|
|
256
|
+
G.current === n && (G.current = null, Y(t));
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}, Q = () => G.current?.visual ?? W.current?.visual ?? J;
|
|
260
|
+
h(() => {
|
|
261
|
+
let e = U.current, t = e?.ownerDocument.defaultView;
|
|
262
|
+
if (!e || !t) return;
|
|
263
|
+
let n = () => {
|
|
264
|
+
let n = t.getComputedStyle(e), r = e.getBoundingClientRect().width - O(pe.map((e) => parseFloat(n.getPropertyValue(e)) || 0)), i = O(Array.from(e.querySelectorAll(fe), (e) => e.getBoundingClientRect().width)), a = Math.max(0, Math.round((r - i) * 100) / 100);
|
|
265
|
+
Oe((e) => Math.abs(e - a) < .01 ? e : a);
|
|
266
|
+
};
|
|
267
|
+
n();
|
|
268
|
+
let r = new t.ResizeObserver(n);
|
|
269
|
+
return r.observe(e), () => r.disconnect();
|
|
270
|
+
}, [D]), h(() => {
|
|
271
|
+
let e = K.current;
|
|
272
|
+
K.current = null;
|
|
273
|
+
let t = W.current?.visual;
|
|
274
|
+
t ? (X(), Y(t)) : e && be(e.to, J) ? Z(e.from, J) : (X(), Y(J));
|
|
275
|
+
}, [Ne]);
|
|
276
|
+
let Ie = (e) => {
|
|
277
|
+
window.cancelAnimationFrame(e.frame), e.target.hasPointerCapture(e.pointerId) && e.target.releasePointerCapture(e.pointerId);
|
|
278
|
+
};
|
|
279
|
+
p(() => () => {
|
|
280
|
+
let e = W.current;
|
|
281
|
+
W.current = null, e && Ie(e), G.current?.controls?.stop(), G.current = null;
|
|
282
|
+
}, []);
|
|
283
|
+
let Le = (e, t, n) => E.forEach((r, i) => {
|
|
284
|
+
r.collapsible && e[i] > C && t[i] <= C && je.current.set(r.value, e[i] / n * 100);
|
|
285
|
+
}), Re = (e, t, n) => {
|
|
286
|
+
if (!q) return null;
|
|
287
|
+
let r = M(e);
|
|
288
|
+
return j(r, M(q)) ? null : (Le(t, e, H), n && (K.current = {
|
|
289
|
+
from: [...Q()],
|
|
290
|
+
to: e.map((e) => e / H)
|
|
291
|
+
}), R(r), r);
|
|
292
|
+
}, ze = (e) => {
|
|
293
|
+
let t = (e, t) => {
|
|
294
|
+
let n = je.current.get(E[e].value);
|
|
295
|
+
return n === void 0 ? t : n / 100 * H;
|
|
296
|
+
};
|
|
297
|
+
return {
|
|
298
|
+
primary: e.feasible ? k(t(e.index, e.minPrimary), e.lower, e.upper) : e.size,
|
|
299
|
+
secondary: e.feasible ? k(e.total - t(e.index + 1, e.minSecondary), e.lower, e.upper) : e.size
|
|
300
|
+
};
|
|
301
|
+
}, Be = () => {
|
|
302
|
+
if (!q) return;
|
|
303
|
+
let e = Re(P(A, E, H), q, !0);
|
|
304
|
+
e && l?.([...e]);
|
|
305
|
+
}, Ve = (e) => {
|
|
306
|
+
e.pending = !1;
|
|
307
|
+
let t = e.candidate;
|
|
308
|
+
if (!t) return;
|
|
309
|
+
let n = M(t);
|
|
310
|
+
j(n, e.last) || (Le(P(e.originLayout, E, e.usable), t, e.usable), e.last = n, R(n));
|
|
311
|
+
}, He = (e, t) => {
|
|
312
|
+
let n = P(e.originLayout, E, H), r = F(n, e.index, E, H), i = (t.clientX - e.originX) * e.direction;
|
|
313
|
+
e.usable = H, e.samples = [...e.samples, {
|
|
314
|
+
position: i,
|
|
315
|
+
time: t.timeStamp
|
|
316
|
+
}].filter((e) => t.timeStamp - e.time <= se);
|
|
317
|
+
let a = r.size + i, o = L(r, a);
|
|
318
|
+
e.candidate = I(n, r, o);
|
|
319
|
+
let s = a - k(a, we(r), Te(r));
|
|
320
|
+
return e.visual = B || V || Math.abs(s) <= C ? null : I(n, r, k(o + Ee(s), 0, r.total)).map((e) => e / H), {
|
|
321
|
+
origin: n,
|
|
322
|
+
pair: r,
|
|
323
|
+
desired: a
|
|
324
|
+
};
|
|
325
|
+
}, Ue = (e) => {
|
|
326
|
+
W.current = null, Ie(e), Ae(null);
|
|
327
|
+
}, $ = () => {
|
|
328
|
+
let e = W.current;
|
|
329
|
+
if (!e) return;
|
|
330
|
+
Ue(e);
|
|
331
|
+
let t = e.visual ?? Q();
|
|
332
|
+
!j(e.last, e.start) || !j(z, e.originLayout) ? (K.current = {
|
|
333
|
+
from: [...t],
|
|
334
|
+
to: P(e.originLayout, E, H).map((e) => e / H)
|
|
335
|
+
}, R(e.originLayout)) : e.visual && Z(e.visual, J);
|
|
336
|
+
};
|
|
337
|
+
p(() => {
|
|
338
|
+
u && $();
|
|
339
|
+
}, [u]);
|
|
340
|
+
let We = (e, t) => {
|
|
341
|
+
if (u || e.defaultPrevented || W.current || !q || !e.isPrimary || e.pointerType === "mouse" && e.button !== 0) return;
|
|
342
|
+
e.preventDefault(), e.currentTarget.focus({ preventScroll: !0 }), X(), Y(J);
|
|
343
|
+
let n = M(q);
|
|
344
|
+
W.current = {
|
|
345
|
+
pointerId: e.pointerId,
|
|
346
|
+
index: t,
|
|
347
|
+
originX: e.clientX,
|
|
348
|
+
direction: getComputedStyle(e.currentTarget).direction === "rtl" ? -1 : 1,
|
|
349
|
+
originLayout: z,
|
|
350
|
+
start: n,
|
|
351
|
+
last: n,
|
|
352
|
+
candidate: null,
|
|
353
|
+
pending: !1,
|
|
354
|
+
frame: 0,
|
|
355
|
+
samples: [{
|
|
356
|
+
position: 0,
|
|
357
|
+
time: e.timeStamp
|
|
358
|
+
}],
|
|
359
|
+
visual: null,
|
|
360
|
+
target: e.currentTarget,
|
|
361
|
+
usable: H
|
|
362
|
+
}, e.currentTarget.setPointerCapture(e.pointerId), Ae(t);
|
|
363
|
+
}, Ge = (e) => {
|
|
364
|
+
let t = W.current;
|
|
365
|
+
t && e.pointerId === t.pointerId && (He(t, e), t.visual && Y(t.visual), t.pending || (t.pending = !0, t.frame = window.requestAnimationFrame(() => {
|
|
366
|
+
W.current === t && Ve(t);
|
|
367
|
+
})));
|
|
368
|
+
}, Ke = (e) => {
|
|
369
|
+
let t = W.current;
|
|
370
|
+
if (!t || e.pointerId !== t.pointerId) return;
|
|
371
|
+
let { origin: n, pair: r, desired: i } = He(t, e), a = t.samples[0], o = t.samples.at(-1), s = o.time - a.time, c = s > 0 ? (o.position - a.position) / s : 0, u = !1;
|
|
372
|
+
if (Math.abs(c) >= ce) {
|
|
373
|
+
let e = L(r, i + c * le);
|
|
374
|
+
(e === 0 || e === r.total) && e !== L(r, i) && (t.candidate = I(n, r, e), u = !0);
|
|
375
|
+
}
|
|
376
|
+
let d = t.visual;
|
|
377
|
+
Ue(t);
|
|
378
|
+
let f = t.last;
|
|
379
|
+
t.candidate && (d || u) && (K.current = {
|
|
380
|
+
from: [...d ?? Q()],
|
|
381
|
+
to: t.candidate.map((e) => e / H)
|
|
382
|
+
}), Ve(t), t.last === f && (K.current = null, d && Z(d, J)), j(t.last, t.start) || l?.([...t.last]);
|
|
383
|
+
}, qe = (e) => {
|
|
384
|
+
W.current?.pointerId === e.pointerId && $();
|
|
385
|
+
}, Je = (e, t) => {
|
|
386
|
+
if (u || e.defaultPrevented) return;
|
|
387
|
+
if (W.current) {
|
|
388
|
+
e.key === "Escape" && (e.preventDefault(), $());
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
if (!q) return;
|
|
392
|
+
if (e.key === "Home" && (e.ctrlKey || e.metaKey)) {
|
|
393
|
+
e.preventDefault(), Be();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
let n = F(q, t, E, H), r = ze(n), i = getComputedStyle(e.currentTarget).direction === "rtl" ? -1 : 1, a = De[e.key];
|
|
397
|
+
if (!a) return;
|
|
398
|
+
e.preventDefault();
|
|
399
|
+
let o = I(q, n, a(n, r, (e.shiftKey ? ae : ie) * i)), s = o.some((e, t) => e <= C != q[t] <= C), c = Re(o, q, s);
|
|
400
|
+
c && l?.([...c]);
|
|
401
|
+
}, Ye = (e) => {
|
|
402
|
+
u || e.defaultPrevented || Be();
|
|
403
|
+
}, Xe = (e, t, n) => y ? y(e, E[t].value, n) : Me.format(e / 100), Ze = (e) => {
|
|
404
|
+
let t = re?.separator, n = E[e], r = q ? F(q, e, E, H) : null, i = (e) => ye(e / H * 100), a = r ? i(r.size) : ye(z[e]), o = Math.min(a, r ? i(we(r)) : 0), s = Math.max(a, r ? i(Te(r)) : ye(z[e] + z[e + 1])), c = r ? r.primaryCollapsed : n.collapsible && z[e] === 0, l = r ? r.secondaryCollapsed : E[e + 1].collapsible && z[e + 1] === 0, d = c ? "start" : l ? "end" : void 0, f = [t?.["aria-labelledby"], n.labelledBy].filter(Boolean).join(" ") || void 0;
|
|
405
|
+
return /* @__PURE__ */ b("div", {
|
|
406
|
+
...t,
|
|
407
|
+
id: Pe(e),
|
|
408
|
+
role: "separator",
|
|
409
|
+
tabIndex: u ? -1 : 0,
|
|
410
|
+
"aria-orientation": "vertical",
|
|
411
|
+
"aria-controls": n.id,
|
|
412
|
+
"aria-valuenow": a,
|
|
413
|
+
"aria-valuemin": o,
|
|
414
|
+
"aria-valuemax": s,
|
|
415
|
+
"aria-valuetext": Xe(a, e, c),
|
|
416
|
+
"aria-label": t?.["aria-label"] ?? (f ? void 0 : n.label),
|
|
417
|
+
"aria-labelledby": f,
|
|
418
|
+
"aria-disabled": u || void 0,
|
|
419
|
+
"data-ui": "resizable-panels-separator",
|
|
420
|
+
"data-state": ke === e ? "dragging" : "idle",
|
|
421
|
+
"data-collapsed": d,
|
|
422
|
+
css: [ge, t?.css],
|
|
423
|
+
onPointerDown: (n) => {
|
|
424
|
+
t?.onPointerDown?.(n), We(n, e);
|
|
425
|
+
},
|
|
426
|
+
onPointerMove: (e) => {
|
|
427
|
+
t?.onPointerMove?.(e), Ge(e);
|
|
428
|
+
},
|
|
429
|
+
onPointerUp: (e) => {
|
|
430
|
+
t?.onPointerUp?.(e), Ke(e);
|
|
431
|
+
},
|
|
432
|
+
onPointerCancel: (e) => {
|
|
433
|
+
t?.onPointerCancel?.(e), W.current?.pointerId === e.pointerId && $();
|
|
434
|
+
},
|
|
435
|
+
onLostPointerCapture: (e) => {
|
|
436
|
+
t?.onLostPointerCapture?.(e), qe(e);
|
|
437
|
+
},
|
|
438
|
+
onKeyDown: (n) => {
|
|
439
|
+
t?.onKeyDown?.(n), Je(n, e);
|
|
440
|
+
},
|
|
441
|
+
onDoubleClick: (e) => {
|
|
442
|
+
t?.onDoubleClick?.(e), Ye(e);
|
|
443
|
+
},
|
|
444
|
+
children: d ? /* @__PURE__ */ b("span", {
|
|
445
|
+
"aria-hidden": "true",
|
|
446
|
+
"data-ui": "resizable-panels-restore",
|
|
447
|
+
"data-side": d,
|
|
448
|
+
css: _e
|
|
449
|
+
}) : /* @__PURE__ */ b("span", {
|
|
450
|
+
"aria-hidden": "true",
|
|
451
|
+
"data-ui": "resizable-panels-grip"
|
|
452
|
+
})
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
return /* @__PURE__ */ b(t, {
|
|
456
|
+
className: oe,
|
|
457
|
+
styles: me,
|
|
458
|
+
sx: x,
|
|
459
|
+
children: (e) => /* @__PURE__ */ b("div", {
|
|
460
|
+
role: "group",
|
|
461
|
+
...S,
|
|
462
|
+
ref: Fe,
|
|
463
|
+
className: e,
|
|
464
|
+
"data-ui": "resizable-panels",
|
|
465
|
+
"data-disabled": u || void 0,
|
|
466
|
+
"data-dragging": ke !== null || void 0,
|
|
467
|
+
children: E.map((e, t) => /* @__PURE__ */ ee(c, { children: [/* @__PURE__ */ b(ve.Provider, {
|
|
468
|
+
value: {
|
|
469
|
+
id: e.id,
|
|
470
|
+
size: J[t],
|
|
471
|
+
collapsed: e.collapsible && (q ? q[t] <= C : z[t] === 0),
|
|
472
|
+
repairId: D > 1 ? Pe(t < D - 1 ? t : t - 1) : void 0
|
|
473
|
+
},
|
|
474
|
+
children: he[t]
|
|
475
|
+
}), t < D - 1 && Ze(t)] }, e.value))
|
|
476
|
+
})
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
B.displayName = "ResizablePanels";
|
|
480
|
+
function V({ ref: e, value: n, minSize: r, maxSize: i, collapsible: a, className: o, sx: s, style: c, children: l, ...u }) {
|
|
481
|
+
let d = f(ve);
|
|
482
|
+
if (!d) throw Error("ResizablePanels.Panel must be rendered inside ResizablePanels.");
|
|
483
|
+
let p = _(null), { collapsed: m, repairId: g } = d;
|
|
484
|
+
return h(() => {
|
|
485
|
+
let e = p.current;
|
|
486
|
+
if (!m || !e || !g) return;
|
|
487
|
+
let t = e.getRootNode();
|
|
488
|
+
e.contains(t.activeElement) && t.getElementById(g)?.focus();
|
|
489
|
+
}, [m, g]), /* @__PURE__ */ b(t, {
|
|
490
|
+
className: o,
|
|
491
|
+
styles: T,
|
|
492
|
+
sx: s,
|
|
493
|
+
children: (t) => /* @__PURE__ */ b("div", {
|
|
494
|
+
role: "group",
|
|
495
|
+
...u,
|
|
496
|
+
ref: e,
|
|
497
|
+
id: d.id,
|
|
498
|
+
className: t,
|
|
499
|
+
"data-ui": "resizable-panels-panel",
|
|
500
|
+
"data-state": m ? "collapsed" : "open",
|
|
501
|
+
style: {
|
|
502
|
+
...c,
|
|
503
|
+
[w]: d.size
|
|
504
|
+
},
|
|
505
|
+
children: /* @__PURE__ */ b("div", {
|
|
506
|
+
ref: p,
|
|
507
|
+
css: he,
|
|
508
|
+
"data-ui": "resizable-panels-content",
|
|
509
|
+
inert: m,
|
|
510
|
+
"aria-hidden": m || void 0,
|
|
511
|
+
children: l
|
|
512
|
+
})
|
|
513
|
+
})
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
V.displayName = "ResizablePanels.Panel";
|
|
517
|
+
var H = Object.assign(B, { Panel: V });
|
|
518
|
+
//#endregion
|
|
519
|
+
export { H as t };
|