@graphty/compact-mantine 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 +197 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +213 -61
- package/dist/index.js +1485 -1387
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CloseButton as
|
|
2
|
-
import {
|
|
3
|
-
import { useUncontrolled as
|
|
4
|
-
import { X as
|
|
5
|
-
import {
|
|
6
|
-
import { createPortal as
|
|
7
|
-
const
|
|
1
|
+
import { DEFAULT_THEME as Ee, CloseButton as Ae, ActionIcon as V, Button as nt, RangeSlider as ot, Radio as rt, Slider as ce, Switch as st, Checkbox as De, SegmentedControl as Oe, Kbd as at, Indicator as it, ThemeIcon as lt, Avatar as ct, Pill as dt, Badge as pt, Text as M, RingProgress as ut, Progress as ft, Loader as gt, InputClearButton as mt, JsonInput as ht, FileInput as xt, PillsInput as vt, TagsInput as bt, MultiSelect as Pt, Autocomplete as Ct, PasswordInput as zt, Textarea as yt, Select as Fe, NumberInput as pe, TextInput as Ve, Tabs as St, Stepper as wt, Pagination as It, NavLink as kt, Burger as Tt, Anchor as Et, HoverCard as At, Popover as Dt, Tooltip as Ot, Menu as Ft, mergeMantineTheme as Vt, createTheme as Bt, Box as B, Group as E, Paper as Rt, ColorSwatch as Lt, ColorPicker as Mt, Stack as K, Divider as Be, Collapse as Re, useComputedColorScheme as _t, rem as ee } from "@mantine/core";
|
|
2
|
+
import { jsx as o, jsxs as y, Fragment as Le } from "react/jsx-runtime";
|
|
3
|
+
import { useUncontrolled as W, useDisclosure as Me } from "@mantine/hooks";
|
|
4
|
+
import { X as ue, ChevronDown as fe, ChevronRight as _e, Plus as Nt, Minus as Ht } from "lucide-react";
|
|
5
|
+
import { useRef as R, isValidElement as Ne, cloneElement as He, createContext as ge, useContext as re, useEffect as _, useState as L, useCallback as z, useMemo as $e, useId as Ue, forwardRef as $t } from "react";
|
|
6
|
+
import { createPortal as Ut } from "react-dom";
|
|
7
|
+
const Gt = [
|
|
8
8
|
"#d5d7da",
|
|
9
9
|
// 0 - lightest (light mode text)
|
|
10
10
|
"#a3a8b1",
|
|
@@ -25,215 +25,270 @@ const Lt = [
|
|
|
25
25
|
// 8
|
|
26
26
|
"#0d1117"
|
|
27
27
|
// 9 - darkest (main background)
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
], jt = {
|
|
29
|
+
...Ee.colors,
|
|
30
|
+
dark: Gt
|
|
31
|
+
}, Xt = {
|
|
32
|
+
"--button-height": "24px",
|
|
33
|
+
"--button-fz": "11px",
|
|
34
|
+
"--button-padding-x": "8px"
|
|
35
|
+
}, Kt = {
|
|
36
|
+
"--ai-size": "24px"
|
|
37
|
+
}, Wt = {
|
|
38
|
+
"--cb-size": "16px",
|
|
39
|
+
"--cb-icon-size": "12px"
|
|
40
|
+
}, Zt = {
|
|
41
|
+
Button: nt.extend({
|
|
42
|
+
defaultProps: {
|
|
43
|
+
size: "sm"
|
|
44
|
+
},
|
|
45
|
+
vars: () => ({
|
|
46
|
+
root: Xt
|
|
47
|
+
})
|
|
39
48
|
}),
|
|
40
|
-
ActionIcon:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
ActionIcon: V.extend({
|
|
50
|
+
defaultProps: {
|
|
51
|
+
size: "sm",
|
|
52
|
+
variant: "subtle"
|
|
53
|
+
},
|
|
54
|
+
vars: () => ({
|
|
55
|
+
root: Kt
|
|
56
|
+
})
|
|
46
57
|
}),
|
|
47
|
-
CloseButton:
|
|
58
|
+
CloseButton: Ae.extend({
|
|
48
59
|
defaultProps: {
|
|
49
|
-
size: "
|
|
60
|
+
size: "xs"
|
|
50
61
|
},
|
|
51
|
-
vars: (
|
|
52
|
-
root:
|
|
53
|
-
|
|
54
|
-
"--cb-icon-size": "12px"
|
|
55
|
-
}
|
|
56
|
-
} : { root: {} }
|
|
62
|
+
vars: () => ({
|
|
63
|
+
root: Wt
|
|
64
|
+
})
|
|
57
65
|
})
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
}, qt = {
|
|
67
|
+
"--switch-height": "16px",
|
|
68
|
+
"--switch-width": "28px",
|
|
69
|
+
"--switch-thumb-size": "12px",
|
|
70
|
+
"--switch-track-label-padding": "2px",
|
|
71
|
+
"--switch-label-font-size": "5px"
|
|
72
|
+
}, Yt = {
|
|
73
|
+
"--checkbox-size": "16px"
|
|
74
|
+
}, Jt = {
|
|
75
|
+
"--radio-size": "16px",
|
|
76
|
+
"--radio-icon-size": "6px"
|
|
77
|
+
}, ye = {
|
|
78
|
+
"--slider-size": "4px",
|
|
79
|
+
"--slider-thumb-size": "12px"
|
|
80
|
+
}, Qt = {
|
|
81
|
+
"--sc-font-size": "10px",
|
|
82
|
+
"--sc-padding": "4px 8px"
|
|
83
|
+
}, en = {
|
|
84
|
+
backgroundColor: "transparent"
|
|
85
|
+
}, tn = {
|
|
86
|
+
backgroundColor: "light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-6))"
|
|
87
|
+
}, ae = {
|
|
88
|
+
fontSize: 11
|
|
89
|
+
}, Se = {
|
|
90
|
+
fontSize: 10,
|
|
91
|
+
marginTop: 2
|
|
92
|
+
}, nn = {
|
|
93
|
+
SegmentedControl: Oe.extend({
|
|
94
|
+
defaultProps: {
|
|
95
|
+
size: "sm",
|
|
96
|
+
withItemsBorders: !1
|
|
97
|
+
},
|
|
98
|
+
vars: () => ({
|
|
99
|
+
root: Qt
|
|
100
|
+
}),
|
|
101
|
+
styles: {
|
|
102
|
+
root: en,
|
|
103
|
+
indicator: tn
|
|
104
|
+
}
|
|
66
105
|
}),
|
|
67
|
-
Checkbox:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} : {}
|
|
106
|
+
Checkbox: De.extend({
|
|
107
|
+
defaultProps: {
|
|
108
|
+
size: "sm"
|
|
109
|
+
},
|
|
110
|
+
vars: () => ({
|
|
111
|
+
root: Yt
|
|
112
|
+
}),
|
|
113
|
+
styles: {
|
|
114
|
+
label: ae
|
|
115
|
+
}
|
|
78
116
|
}),
|
|
79
|
-
Switch:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
styles: (t, e) => e.size === "compact" ? {
|
|
90
|
-
label: {
|
|
91
|
-
fontSize: 11
|
|
92
|
-
}
|
|
93
|
-
} : {}
|
|
117
|
+
Switch: st.extend({
|
|
118
|
+
defaultProps: {
|
|
119
|
+
size: "sm"
|
|
120
|
+
},
|
|
121
|
+
vars: () => ({
|
|
122
|
+
root: qt
|
|
123
|
+
}),
|
|
124
|
+
styles: {
|
|
125
|
+
label: ae
|
|
126
|
+
}
|
|
94
127
|
}),
|
|
95
|
-
Slider:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
styles:
|
|
103
|
-
markLabel:
|
|
104
|
-
|
|
105
|
-
marginTop: 2
|
|
106
|
-
}
|
|
107
|
-
} : {}
|
|
128
|
+
Slider: ce.extend({
|
|
129
|
+
defaultProps: {
|
|
130
|
+
size: "sm"
|
|
131
|
+
},
|
|
132
|
+
vars: () => ({
|
|
133
|
+
root: ye
|
|
134
|
+
}),
|
|
135
|
+
styles: {
|
|
136
|
+
markLabel: Se
|
|
137
|
+
}
|
|
108
138
|
}),
|
|
109
|
-
Radio:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
styles:
|
|
117
|
-
label:
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
} : {}
|
|
139
|
+
Radio: rt.extend({
|
|
140
|
+
defaultProps: {
|
|
141
|
+
size: "sm"
|
|
142
|
+
},
|
|
143
|
+
vars: () => ({
|
|
144
|
+
root: Jt
|
|
145
|
+
}),
|
|
146
|
+
styles: {
|
|
147
|
+
label: ae
|
|
148
|
+
}
|
|
121
149
|
}),
|
|
122
|
-
RangeSlider:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
styles:
|
|
130
|
-
markLabel:
|
|
131
|
-
|
|
132
|
-
marginTop: 2
|
|
133
|
-
}
|
|
134
|
-
} : {}
|
|
150
|
+
RangeSlider: ot.extend({
|
|
151
|
+
defaultProps: {
|
|
152
|
+
size: "sm"
|
|
153
|
+
},
|
|
154
|
+
vars: () => ({
|
|
155
|
+
root: ye
|
|
156
|
+
}),
|
|
157
|
+
styles: {
|
|
158
|
+
markLabel: Se
|
|
159
|
+
}
|
|
135
160
|
})
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
161
|
+
}, on = {
|
|
162
|
+
"--badge-height": "14px",
|
|
163
|
+
"--badge-fz": "9px",
|
|
164
|
+
"--badge-padding-x": "4px"
|
|
165
|
+
}, rn = {
|
|
166
|
+
"--avatar-size": "24px"
|
|
167
|
+
}, sn = {
|
|
168
|
+
"--ti-size": "24px"
|
|
169
|
+
}, an = {
|
|
170
|
+
"--indicator-size": "8px"
|
|
171
|
+
}, ln = {
|
|
172
|
+
"--kbd-fz": "10px",
|
|
173
|
+
"--kbd-padding": "2px 4px"
|
|
174
|
+
}, cn = {
|
|
175
|
+
"--pill-height": "16px",
|
|
176
|
+
"--pill-fz": "10px"
|
|
177
|
+
}, dn = {
|
|
178
|
+
Text: M.extend({
|
|
179
|
+
// Text does NOT set a default size or vars - it uses the global fontSizes
|
|
180
|
+
// from the theme (compactFontSizes) which are already set correctly.
|
|
181
|
+
// This allows size="xs", "sm", "md", "lg", "xl" to work as expected.
|
|
144
182
|
}),
|
|
145
|
-
Badge:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} : { root: {} }
|
|
183
|
+
Badge: pt.extend({
|
|
184
|
+
defaultProps: {
|
|
185
|
+
size: "sm"
|
|
186
|
+
},
|
|
187
|
+
vars: () => ({
|
|
188
|
+
root: on
|
|
189
|
+
})
|
|
153
190
|
}),
|
|
154
|
-
Pill:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
191
|
+
Pill: dt.extend({
|
|
192
|
+
defaultProps: {
|
|
193
|
+
size: "sm"
|
|
194
|
+
},
|
|
195
|
+
vars: () => ({
|
|
196
|
+
root: cn
|
|
197
|
+
})
|
|
161
198
|
}),
|
|
162
|
-
Avatar:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
199
|
+
Avatar: ct.extend({
|
|
200
|
+
defaultProps: {
|
|
201
|
+
size: "sm"
|
|
202
|
+
},
|
|
203
|
+
vars: () => ({
|
|
204
|
+
root: rn
|
|
205
|
+
})
|
|
168
206
|
}),
|
|
169
|
-
ThemeIcon:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
207
|
+
ThemeIcon: lt.extend({
|
|
208
|
+
defaultProps: {
|
|
209
|
+
size: "sm"
|
|
210
|
+
},
|
|
211
|
+
vars: () => ({
|
|
212
|
+
root: sn
|
|
213
|
+
})
|
|
175
214
|
}),
|
|
176
|
-
Indicator:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
215
|
+
Indicator: it.extend({
|
|
216
|
+
defaultProps: {
|
|
217
|
+
size: "sm"
|
|
218
|
+
},
|
|
219
|
+
vars: () => ({
|
|
220
|
+
root: an
|
|
221
|
+
})
|
|
182
222
|
}),
|
|
183
|
-
Kbd:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
223
|
+
Kbd: at.extend({
|
|
224
|
+
defaultProps: {
|
|
225
|
+
size: "sm"
|
|
226
|
+
},
|
|
227
|
+
vars: () => ({
|
|
228
|
+
root: ln
|
|
229
|
+
})
|
|
190
230
|
})
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
231
|
+
}, pn = {
|
|
232
|
+
"--loader-size": "18px"
|
|
233
|
+
}, un = {
|
|
234
|
+
"--progress-size": "4px"
|
|
235
|
+
}, fn = {
|
|
236
|
+
label: {
|
|
237
|
+
fontSize: 9
|
|
238
|
+
}
|
|
239
|
+
}, gn = {
|
|
240
|
+
Loader: gt.extend({
|
|
241
|
+
defaultProps: {
|
|
242
|
+
size: "sm"
|
|
243
|
+
},
|
|
244
|
+
vars: () => ({
|
|
245
|
+
root: pn
|
|
246
|
+
})
|
|
198
247
|
}),
|
|
199
|
-
Progress:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
fontSize: 9
|
|
208
|
-
}
|
|
209
|
-
} : {}
|
|
248
|
+
Progress: ft.extend({
|
|
249
|
+
defaultProps: {
|
|
250
|
+
size: "sm"
|
|
251
|
+
},
|
|
252
|
+
vars: () => ({
|
|
253
|
+
root: un
|
|
254
|
+
}),
|
|
255
|
+
styles: fn
|
|
210
256
|
}),
|
|
211
257
|
// Note: RingProgress uses numeric size directly in SVG calculations,
|
|
212
|
-
// so we can't use CSS variables
|
|
213
|
-
|
|
214
|
-
|
|
258
|
+
// so we can't use CSS variables or string size prop.
|
|
259
|
+
// Use size={48} in components for compact-equivalent sizing.
|
|
260
|
+
RingProgress: ut.extend({
|
|
261
|
+
// No defaultProps - RingProgress requires numeric size
|
|
262
|
+
// Use size={48} in your components for compact sizing
|
|
215
263
|
})
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
264
|
+
}, we = 1e3, N = 1100, mn = 8, io = 4, X = {
|
|
265
|
+
"--input-height": "24px",
|
|
266
|
+
"--input-size": "24px",
|
|
267
|
+
// For components that use this variable
|
|
268
|
+
"--input-fz": "11px",
|
|
269
|
+
"--input-bg": "var(--mantine-color-default)",
|
|
270
|
+
"--input-bd": "none"
|
|
271
|
+
}, te = {
|
|
272
|
+
"--input-fz": "11px",
|
|
273
|
+
"--input-bg": "var(--mantine-color-default)",
|
|
274
|
+
"--input-bd": "none"
|
|
275
|
+
}, J = {
|
|
276
|
+
fontSize: 11,
|
|
277
|
+
color: "var(--mantine-color-dimmed)",
|
|
278
|
+
marginBottom: 1,
|
|
279
|
+
lineHeight: 1.2
|
|
280
|
+
}, me = {
|
|
281
|
+
paddingLeft: 8,
|
|
282
|
+
paddingRight: 8,
|
|
283
|
+
border: "none",
|
|
284
|
+
backgroundColor: "var(--mantine-color-default)"
|
|
285
|
+
}, Y = {
|
|
286
|
+
label: J,
|
|
287
|
+
input: me
|
|
288
|
+
}, Ie = {
|
|
289
|
+
label: J,
|
|
290
|
+
input: me
|
|
291
|
+
}, ne = {
|
|
237
292
|
dropdown: {
|
|
238
293
|
padding: 4,
|
|
239
294
|
border: "none",
|
|
@@ -255,754 +310,401 @@ const Lt = [
|
|
|
255
310
|
fontSize: 11,
|
|
256
311
|
padding: "8px"
|
|
257
312
|
}
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
313
|
+
}, ie = {
|
|
314
|
+
input: {
|
|
315
|
+
...Y.input,
|
|
316
|
+
minHeight: 24,
|
|
317
|
+
height: "auto",
|
|
318
|
+
display: "flex",
|
|
319
|
+
alignItems: "center",
|
|
320
|
+
paddingTop: 4,
|
|
321
|
+
paddingBottom: 4
|
|
322
|
+
},
|
|
323
|
+
pillsList: {
|
|
324
|
+
columnGap: 4,
|
|
325
|
+
rowGap: 2
|
|
326
|
+
},
|
|
327
|
+
pill: {
|
|
328
|
+
// Only set margin, not padding. Pill component controls its own height/centering.
|
|
329
|
+
margin: 0
|
|
330
|
+
}
|
|
331
|
+
}, hn = {
|
|
332
|
+
TextInput: Ve.extend({
|
|
333
|
+
defaultProps: {
|
|
334
|
+
size: "sm",
|
|
335
|
+
variant: "filled"
|
|
336
|
+
},
|
|
337
|
+
vars: () => ({
|
|
338
|
+
root: {},
|
|
339
|
+
wrapper: X
|
|
340
|
+
}),
|
|
341
|
+
styles: Y
|
|
262
342
|
}),
|
|
263
|
-
NumberInput:
|
|
264
|
-
|
|
343
|
+
NumberInput: pe.extend({
|
|
344
|
+
defaultProps: {
|
|
345
|
+
size: "sm",
|
|
346
|
+
variant: "filled"
|
|
347
|
+
},
|
|
348
|
+
vars: () => ({
|
|
265
349
|
root: {},
|
|
266
350
|
wrapper: {
|
|
267
|
-
|
|
268
|
-
"--input-fz": "11px",
|
|
269
|
-
"--input-bg": "var(--mantine-color-default)",
|
|
270
|
-
"--input-bd": "none",
|
|
351
|
+
...X,
|
|
271
352
|
"--input-right-section-width": "24px"
|
|
272
353
|
},
|
|
273
354
|
controls: {
|
|
274
355
|
"--ni-chevron-size": "10px"
|
|
275
356
|
}
|
|
276
|
-
}
|
|
277
|
-
styles:
|
|
278
|
-
|
|
357
|
+
}),
|
|
358
|
+
styles: {
|
|
359
|
+
label: J,
|
|
360
|
+
input: me,
|
|
279
361
|
control: {
|
|
280
362
|
borderColor: "transparent"
|
|
281
363
|
}
|
|
282
|
-
}
|
|
364
|
+
}
|
|
283
365
|
}),
|
|
284
|
-
Select:
|
|
366
|
+
Select: Fe.extend({
|
|
285
367
|
defaultProps: {
|
|
286
|
-
|
|
368
|
+
size: "sm",
|
|
369
|
+
variant: "filled",
|
|
370
|
+
comboboxProps: { zIndex: N }
|
|
287
371
|
},
|
|
288
|
-
vars: (
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
372
|
+
vars: () => ({
|
|
373
|
+
root: {},
|
|
374
|
+
wrapper: X
|
|
375
|
+
}),
|
|
376
|
+
styles: {
|
|
377
|
+
...Y,
|
|
378
|
+
...ne
|
|
379
|
+
}
|
|
293
380
|
}),
|
|
294
|
-
Textarea:
|
|
295
|
-
|
|
381
|
+
Textarea: yt.extend({
|
|
382
|
+
defaultProps: {
|
|
383
|
+
size: "sm",
|
|
384
|
+
variant: "filled"
|
|
385
|
+
},
|
|
386
|
+
vars: () => ({
|
|
296
387
|
root: {},
|
|
297
|
-
wrapper:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
"--input-bd": "none"
|
|
301
|
-
}
|
|
302
|
-
} : { root: {}, wrapper: {} },
|
|
303
|
-
styles: (t, e) => e.size === "compact" ? B : {}
|
|
388
|
+
wrapper: te
|
|
389
|
+
}),
|
|
390
|
+
styles: Ie
|
|
304
391
|
}),
|
|
305
|
-
PasswordInput:
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
392
|
+
PasswordInput: zt.extend({
|
|
393
|
+
defaultProps: {
|
|
394
|
+
size: "sm",
|
|
395
|
+
variant: "filled"
|
|
396
|
+
},
|
|
397
|
+
vars: () => ({
|
|
398
|
+
root: {},
|
|
399
|
+
wrapper: X
|
|
400
|
+
}),
|
|
401
|
+
styles: {
|
|
402
|
+
...Y,
|
|
309
403
|
innerInput: {
|
|
310
404
|
paddingLeft: 8,
|
|
311
405
|
paddingRight: 8
|
|
312
406
|
}
|
|
313
|
-
}
|
|
314
|
-
}),
|
|
315
|
-
Autocomplete: pt.extend({
|
|
316
|
-
defaultProps: {
|
|
317
|
-
comboboxProps: { zIndex: V }
|
|
318
|
-
},
|
|
319
|
-
vars: (t, e) => e.size === "compact" ? ee : { root: {}, wrapper: {} },
|
|
320
|
-
styles: (t, e) => e.size === "compact" ? {
|
|
321
|
-
...B,
|
|
322
|
-
...re
|
|
323
|
-
} : {}
|
|
407
|
+
}
|
|
324
408
|
}),
|
|
325
|
-
|
|
326
|
-
// (ColorInput requires eyeDropperIcon, eyeDropperButton, colorPreview CSS vars)
|
|
327
|
-
ColorInput: Pe.extend({
|
|
409
|
+
Autocomplete: Ct.extend({
|
|
328
410
|
defaultProps: {
|
|
329
|
-
|
|
411
|
+
size: "sm",
|
|
412
|
+
variant: "filled",
|
|
413
|
+
comboboxProps: { zIndex: N }
|
|
330
414
|
},
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
wrapper:
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
} : {}
|
|
415
|
+
vars: () => ({
|
|
416
|
+
root: {},
|
|
417
|
+
wrapper: X
|
|
418
|
+
}),
|
|
419
|
+
styles: {
|
|
420
|
+
...Y,
|
|
421
|
+
...ne
|
|
422
|
+
}
|
|
340
423
|
}),
|
|
341
|
-
MultiSelect:
|
|
424
|
+
MultiSelect: Pt.extend({
|
|
342
425
|
defaultProps: {
|
|
343
|
-
|
|
426
|
+
size: "sm",
|
|
427
|
+
variant: "filled",
|
|
428
|
+
comboboxProps: { zIndex: N }
|
|
344
429
|
},
|
|
345
|
-
vars: (
|
|
430
|
+
vars: () => ({
|
|
346
431
|
root: {},
|
|
347
432
|
wrapper: {
|
|
348
|
-
|
|
349
|
-
"--input-bg": "var(--mantine-color-default)",
|
|
350
|
-
"--input-bd": "none",
|
|
351
|
-
"--input-size": "24px",
|
|
433
|
+
...X,
|
|
352
434
|
"--combobox-chevron-size": "12px"
|
|
353
435
|
}
|
|
354
|
-
}
|
|
355
|
-
styles:
|
|
356
|
-
|
|
357
|
-
...
|
|
358
|
-
|
|
359
|
-
...B.input,
|
|
360
|
-
minHeight: 24,
|
|
361
|
-
height: "auto",
|
|
362
|
-
display: "flex",
|
|
363
|
-
alignItems: "center",
|
|
364
|
-
paddingTop: 4,
|
|
365
|
-
paddingBottom: 4
|
|
366
|
-
},
|
|
436
|
+
}),
|
|
437
|
+
styles: {
|
|
438
|
+
label: J,
|
|
439
|
+
...ne,
|
|
440
|
+
...ie,
|
|
367
441
|
inputField: {
|
|
368
442
|
minWidth: 60,
|
|
369
443
|
flexBasis: 60
|
|
370
|
-
},
|
|
371
|
-
pillsList: {
|
|
372
|
-
columnGap: 4,
|
|
373
|
-
rowGap: 2
|
|
374
|
-
},
|
|
375
|
-
pill: {
|
|
376
|
-
margin: 0,
|
|
377
|
-
paddingTop: 2,
|
|
378
|
-
paddingBottom: 2
|
|
379
444
|
}
|
|
380
|
-
}
|
|
445
|
+
}
|
|
381
446
|
}),
|
|
382
|
-
TagsInput:
|
|
447
|
+
TagsInput: bt.extend({
|
|
383
448
|
defaultProps: {
|
|
384
|
-
|
|
449
|
+
size: "sm",
|
|
450
|
+
variant: "filled",
|
|
451
|
+
comboboxProps: { zIndex: N }
|
|
385
452
|
},
|
|
386
|
-
vars: (
|
|
453
|
+
vars: () => ({
|
|
387
454
|
root: {},
|
|
388
|
-
wrapper:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
styles: (t, e) => e.size === "compact" ? {
|
|
395
|
-
...B,
|
|
396
|
-
...re,
|
|
397
|
-
input: {
|
|
398
|
-
...B.input,
|
|
399
|
-
minHeight: 24,
|
|
400
|
-
height: "auto",
|
|
401
|
-
display: "flex",
|
|
402
|
-
alignItems: "center",
|
|
403
|
-
paddingTop: 4,
|
|
404
|
-
paddingBottom: 4
|
|
405
|
-
},
|
|
455
|
+
wrapper: te
|
|
456
|
+
}),
|
|
457
|
+
styles: {
|
|
458
|
+
label: J,
|
|
459
|
+
...ne,
|
|
460
|
+
...ie,
|
|
406
461
|
inputField: {
|
|
407
462
|
minWidth: 30,
|
|
408
463
|
flexBasis: 30
|
|
409
|
-
},
|
|
410
|
-
pillsList: {
|
|
411
|
-
columnGap: 4,
|
|
412
|
-
rowGap: 2
|
|
413
|
-
},
|
|
414
|
-
pill: {
|
|
415
|
-
margin: 0,
|
|
416
|
-
paddingTop: 2,
|
|
417
|
-
paddingBottom: 2
|
|
418
464
|
}
|
|
419
|
-
}
|
|
465
|
+
}
|
|
420
466
|
}),
|
|
421
|
-
PillsInput:
|
|
422
|
-
|
|
467
|
+
PillsInput: vt.extend({
|
|
468
|
+
defaultProps: {
|
|
469
|
+
size: "sm",
|
|
470
|
+
variant: "filled"
|
|
471
|
+
},
|
|
472
|
+
vars: () => ({
|
|
423
473
|
root: {},
|
|
424
|
-
wrapper:
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
styles: (t, e) => e.size === "compact" ? {
|
|
431
|
-
...B,
|
|
432
|
-
input: {
|
|
433
|
-
...B.input,
|
|
434
|
-
minHeight: 24,
|
|
435
|
-
height: "auto",
|
|
436
|
-
display: "flex",
|
|
437
|
-
alignItems: "center",
|
|
438
|
-
paddingTop: 4,
|
|
439
|
-
paddingBottom: 4
|
|
440
|
-
},
|
|
441
|
-
inputField: {
|
|
442
|
-
minWidth: 30,
|
|
443
|
-
flexBasis: 30
|
|
444
|
-
},
|
|
445
|
-
pillsList: {
|
|
446
|
-
columnGap: 4,
|
|
447
|
-
rowGap: 2
|
|
448
|
-
},
|
|
449
|
-
pill: {
|
|
450
|
-
margin: 0,
|
|
451
|
-
paddingTop: 2,
|
|
452
|
-
paddingBottom: 2
|
|
453
|
-
}
|
|
454
|
-
} : {}
|
|
474
|
+
wrapper: te
|
|
475
|
+
}),
|
|
476
|
+
styles: {
|
|
477
|
+
label: J,
|
|
478
|
+
...ie
|
|
479
|
+
}
|
|
455
480
|
}),
|
|
456
|
-
FileInput:
|
|
457
|
-
|
|
458
|
-
|
|
481
|
+
FileInput: xt.extend({
|
|
482
|
+
defaultProps: {
|
|
483
|
+
size: "sm",
|
|
484
|
+
variant: "filled"
|
|
485
|
+
},
|
|
486
|
+
vars: () => ({
|
|
487
|
+
root: {},
|
|
488
|
+
wrapper: X
|
|
489
|
+
}),
|
|
490
|
+
styles: Y
|
|
459
491
|
}),
|
|
460
|
-
JsonInput:
|
|
461
|
-
|
|
492
|
+
JsonInput: ht.extend({
|
|
493
|
+
defaultProps: {
|
|
494
|
+
size: "sm",
|
|
495
|
+
variant: "filled"
|
|
496
|
+
},
|
|
497
|
+
vars: () => ({
|
|
462
498
|
root: {},
|
|
463
|
-
wrapper:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
"--input-bd": "none"
|
|
467
|
-
}
|
|
468
|
-
} : { root: {}, wrapper: {} },
|
|
469
|
-
styles: (t, e) => e.size === "compact" ? B : {}
|
|
499
|
+
wrapper: te
|
|
500
|
+
}),
|
|
501
|
+
styles: Ie
|
|
470
502
|
}),
|
|
471
|
-
InputClearButton:
|
|
503
|
+
InputClearButton: mt.extend({
|
|
472
504
|
defaultProps: {
|
|
473
|
-
size: "
|
|
505
|
+
size: "xs"
|
|
474
506
|
},
|
|
475
|
-
vars: (
|
|
507
|
+
vars: () => ({
|
|
476
508
|
root: {
|
|
477
509
|
"--cb-size": "16px",
|
|
478
510
|
"--cb-icon-size": "12px"
|
|
479
511
|
}
|
|
480
|
-
}
|
|
512
|
+
})
|
|
481
513
|
})
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}),
|
|
512
|
-
Pagination: ht.extend({
|
|
513
|
-
vars: (t, e) => e.size === "compact" ? {
|
|
514
|
-
root: {
|
|
515
|
-
"--pagination-control-size": "24px",
|
|
516
|
-
"--pagination-control-fz": "11px"
|
|
517
|
-
}
|
|
518
|
-
} : { root: {} }
|
|
519
|
-
}),
|
|
520
|
-
Stepper: gt.extend({
|
|
521
|
-
vars: (t, e) => e.size === "compact" ? {
|
|
522
|
-
root: {
|
|
523
|
-
"--stepper-icon-size": "24px",
|
|
524
|
-
"--stepper-fz": "11px",
|
|
525
|
-
"--stepper-spacing": "8px"
|
|
526
|
-
}
|
|
527
|
-
} : { root: {} }
|
|
528
|
-
}),
|
|
529
|
-
// Tabs uses styles since it doesn't have a size prop and the CSS vars
|
|
530
|
-
// for tabs are limited to --tabs-color and --tabs-radius.
|
|
531
|
-
// Apply styles based on custom variant prop.
|
|
532
|
-
Tabs: mt.extend({
|
|
533
|
-
styles: (t, e) => e.variant === "compact" ? {
|
|
534
|
-
tab: {
|
|
535
|
-
fontSize: 11,
|
|
536
|
-
padding: "6px 10px"
|
|
537
|
-
}
|
|
538
|
-
} : {}
|
|
539
|
-
})
|
|
540
|
-
}, jt = {
|
|
541
|
-
Menu: wt.extend({
|
|
514
|
+
}, xn = {
|
|
515
|
+
"--pagination-control-size": "24px",
|
|
516
|
+
"--pagination-control-fz": "11px"
|
|
517
|
+
}, vn = {
|
|
518
|
+
"--stepper-icon-size": "24px",
|
|
519
|
+
"--stepper-fz": "11px",
|
|
520
|
+
"--stepper-spacing": "8px"
|
|
521
|
+
}, bn = {
|
|
522
|
+
"--burger-size": "18px",
|
|
523
|
+
"--burger-line-size": "2px"
|
|
524
|
+
}, Pn = {
|
|
525
|
+
root: {
|
|
526
|
+
fontSize: 11
|
|
527
|
+
}
|
|
528
|
+
}, Cn = {
|
|
529
|
+
root: {
|
|
530
|
+
fontSize: 11,
|
|
531
|
+
minHeight: 28
|
|
532
|
+
},
|
|
533
|
+
label: {
|
|
534
|
+
fontSize: 11
|
|
535
|
+
}
|
|
536
|
+
}, zn = {
|
|
537
|
+
tab: {
|
|
538
|
+
fontSize: 11,
|
|
539
|
+
padding: "6px 10px"
|
|
540
|
+
}
|
|
541
|
+
}, yn = {
|
|
542
|
+
Anchor: Et.extend({
|
|
542
543
|
defaultProps: {
|
|
543
|
-
|
|
544
|
-
}
|
|
544
|
+
size: "sm"
|
|
545
|
+
},
|
|
546
|
+
styles: Pn
|
|
545
547
|
}),
|
|
546
|
-
|
|
548
|
+
Burger: Tt.extend({
|
|
547
549
|
defaultProps: {
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
+
size: "sm"
|
|
551
|
+
},
|
|
552
|
+
vars: () => ({
|
|
553
|
+
root: bn
|
|
554
|
+
})
|
|
550
555
|
}),
|
|
551
|
-
|
|
556
|
+
NavLink: kt.extend({
|
|
557
|
+
// NavLink does not have a size prop, only styles for compact appearance
|
|
558
|
+
styles: Cn
|
|
559
|
+
}),
|
|
560
|
+
Pagination: It.extend({
|
|
552
561
|
defaultProps: {
|
|
553
|
-
|
|
554
|
-
}
|
|
562
|
+
size: "sm"
|
|
563
|
+
},
|
|
564
|
+
vars: () => ({
|
|
565
|
+
root: xn
|
|
566
|
+
})
|
|
555
567
|
}),
|
|
556
|
-
|
|
568
|
+
Stepper: wt.extend({
|
|
557
569
|
defaultProps: {
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
size: 14,
|
|
679
|
-
radius: 2,
|
|
680
|
-
style: {
|
|
681
|
-
border: "1px solid var(--mantine-color-default-border)"
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
)
|
|
685
|
-
}
|
|
686
|
-
) }),
|
|
687
|
-
/* @__PURE__ */ o(oe.Dropdown, { p: "xs", children: /* @__PURE__ */ o(
|
|
688
|
-
St,
|
|
689
|
-
{
|
|
690
|
-
format: "hexa",
|
|
691
|
-
value: p(),
|
|
692
|
-
onChange: q,
|
|
693
|
-
swatches: [...Xt]
|
|
694
|
-
}
|
|
695
|
-
) })
|
|
696
|
-
] }),
|
|
697
|
-
/* @__PURE__ */ o(
|
|
698
|
-
ye,
|
|
699
|
-
{
|
|
700
|
-
size: "compact",
|
|
701
|
-
value: O,
|
|
702
|
-
onChange: m,
|
|
703
|
-
onBlur: P,
|
|
704
|
-
"aria-label": "Color hex value",
|
|
705
|
-
"data-is-default": u ? "true" : "false",
|
|
706
|
-
w: 72,
|
|
707
|
-
styles: {
|
|
708
|
-
input: {
|
|
709
|
-
borderRadius: c ? 0 : "0 4px 4px 0",
|
|
710
|
-
fontFamily: "monospace",
|
|
711
|
-
textTransform: "uppercase",
|
|
712
|
-
...u ? {
|
|
713
|
-
fontStyle: "italic",
|
|
714
|
-
color: "var(--mantine-color-dimmed)"
|
|
715
|
-
} : {}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
),
|
|
720
|
-
c && /* @__PURE__ */ S(Bt, { children: [
|
|
721
|
-
/* @__PURE__ */ o(
|
|
722
|
-
A,
|
|
723
|
-
{
|
|
724
|
-
style: {
|
|
725
|
-
width: 1,
|
|
726
|
-
height: 24,
|
|
727
|
-
backgroundColor: "var(--mantine-color-default-border)"
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
),
|
|
731
|
-
/* @__PURE__ */ o(
|
|
732
|
-
le,
|
|
733
|
-
{
|
|
734
|
-
size: "compact",
|
|
735
|
-
value: $,
|
|
736
|
-
onChange: w,
|
|
737
|
-
onBlur: M,
|
|
738
|
-
min: 0,
|
|
739
|
-
max: 100,
|
|
740
|
-
hideControls: !0,
|
|
741
|
-
suffix: "%",
|
|
742
|
-
"aria-label": "Opacity",
|
|
743
|
-
"data-is-default": f ? "true" : "false",
|
|
744
|
-
w: 54,
|
|
745
|
-
styles: {
|
|
746
|
-
input: {
|
|
747
|
-
borderRadius: "0 4px 4px 0",
|
|
748
|
-
textAlign: "right",
|
|
749
|
-
...f ? {
|
|
750
|
-
fontStyle: "italic",
|
|
751
|
-
color: "var(--mantine-color-dimmed)"
|
|
752
|
-
} : {}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
)
|
|
757
|
-
] })
|
|
758
|
-
] }),
|
|
759
|
-
!F && /* @__PURE__ */ o(
|
|
760
|
-
D,
|
|
761
|
-
{
|
|
762
|
-
variant: "subtle",
|
|
763
|
-
size: "xs",
|
|
764
|
-
c: "dimmed",
|
|
765
|
-
"aria-label": `Reset ${s ?? "color"} to default`,
|
|
766
|
-
onClick: K,
|
|
767
|
-
children: /* @__PURE__ */ o(ne, { size: 12 })
|
|
768
|
-
}
|
|
769
|
-
)
|
|
770
|
-
] });
|
|
771
|
-
return s ? /* @__PURE__ */ S(W, { gap: 0, children: [
|
|
772
|
-
/* @__PURE__ */ o(H, { size: "xs", c: "dimmed", mb: 1, lh: 1.2, children: s }),
|
|
773
|
-
N
|
|
774
|
-
] }) : N;
|
|
775
|
-
}
|
|
776
|
-
function Sr({ label: t, actions: e, children: n }) {
|
|
777
|
-
return /* @__PURE__ */ S(A, { children: [
|
|
778
|
-
/* @__PURE__ */ o(Ce, { color: "gray.7", mt: 8, mb: 0 }),
|
|
779
|
-
/* @__PURE__ */ S(R, { justify: "space-between", py: 8, children: [
|
|
780
|
-
/* @__PURE__ */ o(H, { size: "xs", fw: 500, lh: 1.2, children: t }),
|
|
781
|
-
e && /* @__PURE__ */ o(R, { gap: 4, children: e })
|
|
782
|
-
] }),
|
|
783
|
-
/* @__PURE__ */ o(W, { gap: 0, children: n })
|
|
784
|
-
] });
|
|
785
|
-
}
|
|
786
|
-
function Tr({
|
|
787
|
-
label: t,
|
|
788
|
-
defaultOpen: e = !0,
|
|
789
|
-
children: n,
|
|
790
|
-
hasConfiguredValues: i = !1
|
|
791
|
-
}) {
|
|
792
|
-
const [a, { toggle: r }] = Se(e);
|
|
793
|
-
return /* @__PURE__ */ S(A, { children: [
|
|
794
|
-
/* @__PURE__ */ o(Ce, { color: "gray.7", mt: 8, mb: 0 }),
|
|
795
|
-
/* @__PURE__ */ o(R, { justify: "space-between", py: 8, style: { cursor: "pointer" }, onClick: r, children: /* @__PURE__ */ S(R, { gap: 4, children: [
|
|
796
|
-
/* @__PURE__ */ o(
|
|
797
|
-
D,
|
|
798
|
-
{
|
|
799
|
-
variant: "subtle",
|
|
800
|
-
size: "xs",
|
|
801
|
-
c: "dimmed",
|
|
802
|
-
"aria-label": a ? `Collapse ${t}` : `Expand ${t}`,
|
|
803
|
-
children: a ? /* @__PURE__ */ o(ce, { size: 12 }) : /* @__PURE__ */ o(Te, { size: 12 })
|
|
804
|
-
}
|
|
805
|
-
),
|
|
806
|
-
/* @__PURE__ */ o(H, { size: "xs", fw: 500, lh: 1.2, children: t }),
|
|
807
|
-
i && /* @__PURE__ */ o(
|
|
808
|
-
A,
|
|
809
|
-
{
|
|
810
|
-
"aria-label": `${t} has configured values`,
|
|
811
|
-
style: {
|
|
812
|
-
width: 6,
|
|
813
|
-
height: 6,
|
|
814
|
-
borderRadius: "50%",
|
|
815
|
-
backgroundColor: "var(--mantine-color-blue-5)",
|
|
816
|
-
marginLeft: 4
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
)
|
|
820
|
-
] }) }),
|
|
821
|
-
/* @__PURE__ */ o(Tt, { in: a, children: /* @__PURE__ */ o(W, { gap: 0, children: n }) })
|
|
822
|
-
] });
|
|
823
|
-
}
|
|
824
|
-
function _r({ label: t, defaultOpen: e = !1, children: n }) {
|
|
825
|
-
const [i, { toggle: a }] = Se(e);
|
|
826
|
-
return /* @__PURE__ */ S(A, { children: [
|
|
827
|
-
/* @__PURE__ */ S(R, { gap: 4, py: 4, style: { cursor: "pointer" }, onClick: a, children: [
|
|
828
|
-
/* @__PURE__ */ o(
|
|
829
|
-
D,
|
|
830
|
-
{
|
|
831
|
-
variant: "subtle",
|
|
832
|
-
size: "xs",
|
|
833
|
-
c: "dimmed",
|
|
834
|
-
"aria-label": i ? `Collapse ${t}` : `Expand ${t}`,
|
|
835
|
-
children: i ? /* @__PURE__ */ o(ce, { size: 10 }) : /* @__PURE__ */ o(Te, { size: 10 })
|
|
836
|
-
}
|
|
837
|
-
),
|
|
838
|
-
/* @__PURE__ */ o(H, { size: "xs", c: "dimmed", lh: 1.2, children: t })
|
|
839
|
-
] }),
|
|
840
|
-
i && /* @__PURE__ */ o(A, { pl: "md", children: /* @__PURE__ */ o(W, { gap: 4, children: n }) })
|
|
841
|
-
] });
|
|
842
|
-
}
|
|
843
|
-
function Ir({
|
|
844
|
-
label: t,
|
|
845
|
-
checked: e,
|
|
846
|
-
defaultChecked: n,
|
|
847
|
-
onChange: i,
|
|
848
|
-
children: a
|
|
849
|
-
}) {
|
|
850
|
-
const [r, s] = Z({
|
|
851
|
-
value: e,
|
|
852
|
-
defaultValue: n,
|
|
853
|
-
finalValue: !1,
|
|
854
|
-
onChange: i
|
|
855
|
-
});
|
|
856
|
-
return /* @__PURE__ */ S(W, { gap: 4, children: [
|
|
857
|
-
/* @__PURE__ */ o(
|
|
858
|
-
ve,
|
|
859
|
-
{
|
|
860
|
-
size: "compact",
|
|
861
|
-
label: t,
|
|
862
|
-
checked: r,
|
|
863
|
-
onChange: (c) => {
|
|
864
|
-
s(c.currentTarget.checked);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
),
|
|
868
|
-
r && /* @__PURE__ */ o(A, { "data-testid": "effect-toggle-children", pl: "md", children: /* @__PURE__ */ o(W, { gap: 4, children: a }) })
|
|
869
|
-
] });
|
|
870
|
-
}
|
|
871
|
-
function Zt() {
|
|
872
|
-
return crypto.randomUUID().slice(0, 8);
|
|
873
|
-
}
|
|
874
|
-
function se(t, e) {
|
|
875
|
-
return {
|
|
876
|
-
id: Zt(),
|
|
877
|
-
offset: t,
|
|
878
|
-
color: e
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
function Kt() {
|
|
882
|
-
return [se(0, "#6366F1"), se(1, "#06B6D4")];
|
|
883
|
-
}
|
|
884
|
-
function kr({
|
|
885
|
-
stops: t,
|
|
886
|
-
defaultStops: e,
|
|
887
|
-
direction: n,
|
|
888
|
-
defaultDirection: i = 0,
|
|
889
|
-
showDirection: a = !0,
|
|
890
|
-
onChange: r
|
|
891
|
-
}) {
|
|
892
|
-
const [s, c] = Z({
|
|
893
|
-
value: t,
|
|
894
|
-
defaultValue: e,
|
|
895
|
-
finalValue: Kt(),
|
|
896
|
-
onChange: (l) => r == null ? void 0 : r(l, g)
|
|
897
|
-
}), [g, b] = Z({
|
|
898
|
-
value: n,
|
|
899
|
-
defaultValue: i,
|
|
900
|
-
finalValue: 0,
|
|
901
|
-
onChange: (l) => r == null ? void 0 : r(s, l)
|
|
902
|
-
}), z = (l, x) => {
|
|
903
|
-
const v = [...s];
|
|
904
|
-
v[l] = { ...v[l], color: x }, c(v), r == null || r(v, g);
|
|
905
|
-
}, h = (l, x) => {
|
|
906
|
-
const v = [...s];
|
|
907
|
-
v[l] = { ...v[l], offset: x / 100 }, c(v), r == null || r(v, g);
|
|
908
|
-
}, u = (l) => {
|
|
909
|
-
b(l), r == null || r(s, l);
|
|
910
|
-
}, f = () => {
|
|
911
|
-
if (s.length >= 5)
|
|
912
|
-
return;
|
|
913
|
-
const l = s.length > 0 ? (s[s.length - 1].offset + 1) / 2 : 0.5, x = [...s, se(l, Wt)];
|
|
914
|
-
x.sort((v, _) => v.offset - _.offset), c(x), r == null || r(x, g);
|
|
915
|
-
}, F = (l) => {
|
|
916
|
-
if (s.length <= 2)
|
|
917
|
-
return;
|
|
918
|
-
const x = s.filter((v, _) => _ !== l);
|
|
919
|
-
c(x), r == null || r(x, g);
|
|
920
|
-
};
|
|
921
|
-
return /* @__PURE__ */ S(W, { gap: "xs", children: [
|
|
922
|
-
/* @__PURE__ */ S(R, { justify: "space-between", align: "center", children: [
|
|
923
|
-
/* @__PURE__ */ o(H, { size: "xs", c: "dimmed", children: "Color Stops" }),
|
|
924
|
-
/* @__PURE__ */ o(
|
|
925
|
-
D,
|
|
926
|
-
{
|
|
927
|
-
size: "compact",
|
|
928
|
-
variant: "subtle",
|
|
929
|
-
color: "gray",
|
|
930
|
-
onClick: f,
|
|
931
|
-
disabled: s.length >= 5,
|
|
932
|
-
"aria-label": "Add color stop",
|
|
933
|
-
children: /* @__PURE__ */ o(Rt, { size: 12 })
|
|
934
|
-
}
|
|
935
|
-
)
|
|
936
|
-
] }),
|
|
937
|
-
s.map((l, x) => /* @__PURE__ */ S(R, { gap: "xs", align: "flex-end", children: [
|
|
938
|
-
/* @__PURE__ */ o(A, { style: { flex: 1 }, children: /* @__PURE__ */ o(
|
|
939
|
-
Pe,
|
|
940
|
-
{
|
|
941
|
-
size: "compact",
|
|
942
|
-
value: l.color,
|
|
943
|
-
onChange: (v) => {
|
|
944
|
-
z(x, v);
|
|
945
|
-
},
|
|
946
|
-
"aria-label": `Color stop ${x + 1}`
|
|
947
|
-
}
|
|
948
|
-
) }),
|
|
949
|
-
/* @__PURE__ */ o(A, { style: { width: "80px" }, children: /* @__PURE__ */ o(
|
|
950
|
-
ae,
|
|
951
|
-
{
|
|
952
|
-
size: "compact",
|
|
953
|
-
min: 0,
|
|
954
|
-
max: 100,
|
|
955
|
-
value: l.offset * 100,
|
|
956
|
-
onChange: (v) => {
|
|
957
|
-
h(x, v);
|
|
958
|
-
},
|
|
959
|
-
label: (v) => `${Math.round(v)}%`,
|
|
960
|
-
"aria-label": `Stop ${x + 1} position`
|
|
961
|
-
}
|
|
962
|
-
) }),
|
|
963
|
-
/* @__PURE__ */ o(
|
|
964
|
-
D,
|
|
965
|
-
{
|
|
966
|
-
size: "compact",
|
|
967
|
-
variant: "subtle",
|
|
968
|
-
color: "gray",
|
|
969
|
-
onClick: () => {
|
|
970
|
-
F(x);
|
|
971
|
-
},
|
|
972
|
-
disabled: s.length <= 2,
|
|
973
|
-
"aria-label": `Remove color stop ${x + 1}`,
|
|
974
|
-
children: /* @__PURE__ */ o(Ft, { size: 12 })
|
|
975
|
-
}
|
|
976
|
-
)
|
|
977
|
-
] }, l.id)),
|
|
978
|
-
a && /* @__PURE__ */ S(A, { children: [
|
|
979
|
-
/* @__PURE__ */ o(H, { size: "xs", c: "dimmed", mb: 4, children: "Direction" }),
|
|
980
|
-
/* @__PURE__ */ o(
|
|
981
|
-
ae,
|
|
982
|
-
{
|
|
983
|
-
size: "compact",
|
|
984
|
-
min: 0,
|
|
985
|
-
max: 360,
|
|
986
|
-
value: g,
|
|
987
|
-
onChange: u,
|
|
988
|
-
label: (l) => `${l}°`,
|
|
989
|
-
"aria-label": "Gradient direction",
|
|
990
|
-
marks: [
|
|
991
|
-
{ value: 0, label: "0°" },
|
|
992
|
-
{ value: 90, label: "90°" },
|
|
993
|
-
{ value: 180, label: "180°" },
|
|
994
|
-
{ value: 270, label: "270°" },
|
|
995
|
-
{ value: 360, label: "360°" }
|
|
996
|
-
]
|
|
997
|
-
}
|
|
998
|
-
)
|
|
999
|
-
] })
|
|
1000
|
-
] });
|
|
570
|
+
size: "sm"
|
|
571
|
+
},
|
|
572
|
+
vars: () => ({
|
|
573
|
+
root: vn
|
|
574
|
+
})
|
|
575
|
+
}),
|
|
576
|
+
Tabs: St.extend({
|
|
577
|
+
// Tabs does not have a size prop, only styles for compact appearance
|
|
578
|
+
styles: zn
|
|
579
|
+
})
|
|
580
|
+
}, Sn = {
|
|
581
|
+
"--menu-item-fz": "11px"
|
|
582
|
+
}, wn = {
|
|
583
|
+
tooltip: {
|
|
584
|
+
fontSize: 11,
|
|
585
|
+
padding: "4px 8px"
|
|
586
|
+
}
|
|
587
|
+
}, In = {
|
|
588
|
+
dropdown: {
|
|
589
|
+
padding: 8
|
|
590
|
+
}
|
|
591
|
+
}, kn = {
|
|
592
|
+
dropdown: {
|
|
593
|
+
padding: 8
|
|
594
|
+
}
|
|
595
|
+
}, Tn = {
|
|
596
|
+
Menu: Ft.extend({
|
|
597
|
+
defaultProps: {
|
|
598
|
+
zIndex: N
|
|
599
|
+
},
|
|
600
|
+
vars: () => ({
|
|
601
|
+
dropdown: Sn
|
|
602
|
+
})
|
|
603
|
+
}),
|
|
604
|
+
Tooltip: Ot.extend({
|
|
605
|
+
defaultProps: {
|
|
606
|
+
zIndex: N
|
|
607
|
+
},
|
|
608
|
+
styles: wn
|
|
609
|
+
}),
|
|
610
|
+
Popover: Dt.extend({
|
|
611
|
+
defaultProps: {
|
|
612
|
+
zIndex: N
|
|
613
|
+
},
|
|
614
|
+
styles: In
|
|
615
|
+
}),
|
|
616
|
+
HoverCard: At.extend({
|
|
617
|
+
defaultProps: {
|
|
618
|
+
zIndex: N
|
|
619
|
+
},
|
|
620
|
+
styles: kn
|
|
621
|
+
})
|
|
622
|
+
}, En = {
|
|
623
|
+
xs: "10px",
|
|
624
|
+
sm: "11px",
|
|
625
|
+
// Our compact default
|
|
626
|
+
md: "13px",
|
|
627
|
+
lg: "14px",
|
|
628
|
+
xl: "16px"
|
|
629
|
+
}, An = {
|
|
630
|
+
xs: "4px",
|
|
631
|
+
sm: "6px",
|
|
632
|
+
md: "8px",
|
|
633
|
+
lg: "12px",
|
|
634
|
+
xl: "16px"
|
|
635
|
+
}, Dn = {
|
|
636
|
+
xs: "2px",
|
|
637
|
+
sm: "4px",
|
|
638
|
+
md: "6px",
|
|
639
|
+
lg: "8px",
|
|
640
|
+
xl: "12px"
|
|
641
|
+
}, On = Bt({
|
|
642
|
+
colors: jt,
|
|
643
|
+
fontSizes: En,
|
|
644
|
+
spacing: An,
|
|
645
|
+
radius: Dn,
|
|
646
|
+
// Disable focus ring outlines globally for a cleaner UI
|
|
647
|
+
// This is appropriate for dense/professional interfaces like design tools
|
|
648
|
+
focusRing: "never",
|
|
649
|
+
// Spread all component extensions into the theme
|
|
650
|
+
// Each extension object provides compact size support for a category of components
|
|
651
|
+
components: {
|
|
652
|
+
...hn,
|
|
653
|
+
...Zt,
|
|
654
|
+
...nn,
|
|
655
|
+
...dn,
|
|
656
|
+
...gn,
|
|
657
|
+
...yn,
|
|
658
|
+
...Tn
|
|
659
|
+
}
|
|
660
|
+
}), lo = Vt(Ee, On), Fn = [
|
|
661
|
+
"#5B8FF9FF",
|
|
662
|
+
"#FF6B6BFF",
|
|
663
|
+
"#61D095FF",
|
|
664
|
+
"#F7B731FF",
|
|
665
|
+
"#9B59B6FF",
|
|
666
|
+
"#5B8FF980",
|
|
667
|
+
"#FF6B6B80",
|
|
668
|
+
"#61D09580",
|
|
669
|
+
"#F7B73180",
|
|
670
|
+
"#9B59B680"
|
|
671
|
+
], le = "#888888", Ge = 255, je = 100;
|
|
672
|
+
function Xe(e) {
|
|
673
|
+
return Math.round(parseInt(e, 16) / Ge * je);
|
|
674
|
+
}
|
|
675
|
+
function Ke(e) {
|
|
676
|
+
return Math.round(e / je * Ge).toString(16).padStart(2, "0");
|
|
677
|
+
}
|
|
678
|
+
function co(e) {
|
|
679
|
+
let t = e.replace("#", "");
|
|
680
|
+
t.length === 3 ? t = `${t.split("").map((s) => s + s).join("")}ff` : t.length === 4 ? t = t.split("").map((s) => s + s).join("") : t.length === 6 && (t = `${t}ff`);
|
|
681
|
+
const a = `#${t.slice(0, 6)}`, n = t.slice(6, 8), i = Xe(n);
|
|
682
|
+
return { hex: a, opacity: i };
|
|
683
|
+
}
|
|
684
|
+
function po(e, t) {
|
|
685
|
+
const a = e.replace("#", ""), n = Ke(t);
|
|
686
|
+
return `#${a}${n}`;
|
|
687
|
+
}
|
|
688
|
+
function uo(e) {
|
|
689
|
+
return /^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e);
|
|
1001
690
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
691
|
+
const We = ge(null);
|
|
692
|
+
function Vn() {
|
|
693
|
+
return re(We);
|
|
1004
694
|
}
|
|
1005
|
-
|
|
695
|
+
function Bn({ children: e }) {
|
|
696
|
+
const t = R(null);
|
|
697
|
+
if (!Ne(e))
|
|
698
|
+
throw new Error("PopoutAnchor requires a single valid React element as its child");
|
|
699
|
+
const n = He(e, {
|
|
700
|
+
ref: t
|
|
701
|
+
});
|
|
702
|
+
return /* @__PURE__ */ o(We.Provider, { value: { anchorRef: t }, children: n });
|
|
703
|
+
}
|
|
704
|
+
function Rn({ children: e }) {
|
|
705
|
+
return /* @__PURE__ */ o(B, { p: "sm", children: e });
|
|
706
|
+
}
|
|
707
|
+
const Ln = [
|
|
1006
708
|
// Mantine portal containers
|
|
1007
709
|
"[data-portal]",
|
|
1008
710
|
// Combobox/Select dropdowns
|
|
@@ -1020,492 +722,431 @@ const qt = [
|
|
|
1020
722
|
// Modal (just in case)
|
|
1021
723
|
"[data-modal]"
|
|
1022
724
|
].join(", ");
|
|
1023
|
-
function
|
|
1024
|
-
|
|
1025
|
-
if (!
|
|
725
|
+
function Mn(e, t = !0) {
|
|
726
|
+
_(() => {
|
|
727
|
+
if (!t)
|
|
1026
728
|
return;
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
|
|
729
|
+
const a = (n) => {
|
|
730
|
+
const i = n.target;
|
|
731
|
+
i.closest('[role="dialog"]') || i.closest("[data-popout-trigger]") || i.closest("[data-popout-portal-container]") || i.closest(Ln) || e();
|
|
1030
732
|
};
|
|
1031
|
-
return document.addEventListener("mousedown",
|
|
1032
|
-
document.removeEventListener("mousedown",
|
|
733
|
+
return document.addEventListener("mousedown", a), () => {
|
|
734
|
+
document.removeEventListener("mousedown", a);
|
|
1033
735
|
};
|
|
1034
|
-
}, [
|
|
736
|
+
}, [e, t]);
|
|
1035
737
|
}
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1038
|
-
if (!
|
|
738
|
+
function _n(e, t = !0) {
|
|
739
|
+
_(() => {
|
|
740
|
+
if (!t)
|
|
1039
741
|
return;
|
|
1040
|
-
const
|
|
1041
|
-
|
|
742
|
+
const a = (n) => {
|
|
743
|
+
n.key === "Escape" && (n.preventDefault(), e());
|
|
1042
744
|
};
|
|
1043
|
-
return document.addEventListener("keydown",
|
|
1044
|
-
document.removeEventListener("keydown",
|
|
745
|
+
return document.addEventListener("keydown", a), () => {
|
|
746
|
+
document.removeEventListener("keydown", a);
|
|
1045
747
|
};
|
|
1046
|
-
}, [
|
|
748
|
+
}, [e, t]);
|
|
1047
749
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1050
|
-
const
|
|
1051
|
-
if (!
|
|
750
|
+
const he = ge(null), Ze = ge(null);
|
|
751
|
+
function xe() {
|
|
752
|
+
const e = re(he);
|
|
753
|
+
if (!e)
|
|
1052
754
|
throw new Error("usePopoutContext must be used within a Popout component");
|
|
1053
|
-
return
|
|
755
|
+
return e;
|
|
1054
756
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
757
|
+
function Nn() {
|
|
758
|
+
return re(he);
|
|
1057
759
|
}
|
|
1058
|
-
function
|
|
1059
|
-
const
|
|
1060
|
-
if (!
|
|
760
|
+
function Hn() {
|
|
761
|
+
const e = re(Ze);
|
|
762
|
+
if (!e)
|
|
1061
763
|
throw new Error("usePopoutManagerContext must be used within a PopoutManager");
|
|
1062
|
-
return
|
|
764
|
+
return e;
|
|
1063
765
|
}
|
|
1064
|
-
function
|
|
1065
|
-
const
|
|
766
|
+
function $n({ children: e, parentId: t = null }) {
|
|
767
|
+
const a = Ue(), [n, i] = L(!1), s = R(null), l = $e(
|
|
1066
768
|
() => ({
|
|
1067
|
-
id:
|
|
1068
|
-
isOpen:
|
|
769
|
+
id: a,
|
|
770
|
+
isOpen: n,
|
|
1069
771
|
open: () => {
|
|
1070
|
-
|
|
772
|
+
i(!0);
|
|
1071
773
|
},
|
|
1072
774
|
close: () => {
|
|
1073
|
-
|
|
775
|
+
i(!1);
|
|
1074
776
|
},
|
|
1075
777
|
toggle: () => {
|
|
1076
|
-
|
|
778
|
+
i((d) => !d);
|
|
1077
779
|
},
|
|
1078
|
-
triggerRef:
|
|
1079
|
-
parentId:
|
|
780
|
+
triggerRef: s,
|
|
781
|
+
parentId: t
|
|
1080
782
|
}),
|
|
1081
|
-
[
|
|
783
|
+
[a, n, t]
|
|
1082
784
|
);
|
|
1083
|
-
return /* @__PURE__ */ o(
|
|
785
|
+
return /* @__PURE__ */ o(he.Provider, { value: l, children: e });
|
|
1084
786
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const [
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
break;
|
|
1101
|
-
}
|
|
1102
|
-
y = Y ?? null;
|
|
1103
|
-
}
|
|
787
|
+
function Un({ children: e }) {
|
|
788
|
+
const [t, a] = L(null), n = R([]), i = R(/* @__PURE__ */ new Map()), s = R(/* @__PURE__ */ new Map()), [l, d] = L(0), b = z((c) => {
|
|
789
|
+
const r = [];
|
|
790
|
+
for (const p of n.current)
|
|
791
|
+
(s.current.get(p) ?? null) === c && r.push(p);
|
|
792
|
+
return r;
|
|
793
|
+
}, []), h = z((c) => {
|
|
794
|
+
const r = [];
|
|
795
|
+
for (const p of n.current) {
|
|
796
|
+
let g = p;
|
|
797
|
+
for (; g; ) {
|
|
798
|
+
const O = s.current.get(g) ?? null;
|
|
799
|
+
if (O === c) {
|
|
800
|
+
r.push(p);
|
|
801
|
+
break;
|
|
1104
802
|
}
|
|
1105
|
-
|
|
1106
|
-
(w = a.current.get(k)) == null || w();
|
|
1107
|
-
(M = a.current.get(d)) == null || M();
|
|
803
|
+
g = O;
|
|
1108
804
|
}
|
|
1109
|
-
i.current = [...i.current.filter((d) => !N.includes(d) && !N.some((E) => {
|
|
1110
|
-
let k = d;
|
|
1111
|
-
for (; k; ) {
|
|
1112
|
-
const y = r.current.get(k);
|
|
1113
|
-
if (y === E)
|
|
1114
|
-
return !0;
|
|
1115
|
-
k = y ?? null;
|
|
1116
|
-
}
|
|
1117
|
-
return !1;
|
|
1118
|
-
})), p], a.current.set(p, m), r.current.set(p, P ?? null), c((d) => d + 1);
|
|
1119
805
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
for (
|
|
1134
|
-
|
|
1135
|
-
|
|
806
|
+
return r;
|
|
807
|
+
}, []), x = z((c) => {
|
|
808
|
+
let r = 0, p = c;
|
|
809
|
+
for (; p; ) {
|
|
810
|
+
const g = s.current.get(p) ?? null;
|
|
811
|
+
if (!g)
|
|
812
|
+
break;
|
|
813
|
+
r++, p = g;
|
|
814
|
+
}
|
|
815
|
+
return r;
|
|
816
|
+
}, []), m = z((c) => {
|
|
817
|
+
var p;
|
|
818
|
+
const r = [...c].sort((g, O) => x(O) - x(g));
|
|
819
|
+
for (const g of r)
|
|
820
|
+
(p = i.current.get(g)) == null || p();
|
|
821
|
+
}, [x]), u = z((c, r, p) => {
|
|
822
|
+
if (n.current.includes(c))
|
|
823
|
+
return;
|
|
824
|
+
const g = p ?? null, O = b(g), G = [];
|
|
825
|
+
for (const S of O)
|
|
826
|
+
G.push(S), G.push(...h(S));
|
|
827
|
+
m(G);
|
|
828
|
+
const q = new Set(G);
|
|
829
|
+
n.current = n.current.filter((S) => !q.has(S)), n.current.push(c), i.current.set(c, r), s.current.set(c, g), d((S) => S + 1);
|
|
830
|
+
}, [b, h, m]), P = z((c) => {
|
|
831
|
+
n.current = n.current.filter((r) => r !== c), i.current.delete(c), s.current.delete(c), d((r) => r + 1);
|
|
832
|
+
}, []), A = z((c) => {
|
|
833
|
+
const r = n.current.indexOf(c);
|
|
834
|
+
return r >= 0 ? we + r : we;
|
|
835
|
+
}, []), f = z((c) => {
|
|
836
|
+
const r = n.current, p = r.indexOf(c);
|
|
837
|
+
p === -1 || p === r.length - 1 || (n.current = [
|
|
838
|
+
...r.filter((g) => g !== c),
|
|
839
|
+
c
|
|
840
|
+
], d((g) => g + 1));
|
|
841
|
+
}, []), v = z((c) => s.current.get(c) ?? null, []), C = z((c, r) => {
|
|
842
|
+
let p = r;
|
|
843
|
+
for (; p; ) {
|
|
844
|
+
const g = s.current.get(p);
|
|
845
|
+
if (g === c)
|
|
1136
846
|
return !0;
|
|
1137
|
-
|
|
847
|
+
p = g ?? null;
|
|
1138
848
|
}
|
|
1139
849
|
return !1;
|
|
1140
|
-
}, []),
|
|
1141
|
-
const
|
|
1142
|
-
for (const
|
|
1143
|
-
|
|
1144
|
-
return
|
|
1145
|
-
}, [
|
|
1146
|
-
const
|
|
1147
|
-
for (const
|
|
1148
|
-
const
|
|
1149
|
-
|
|
850
|
+
}, []), w = z((c) => {
|
|
851
|
+
const r = [], p = n.current;
|
|
852
|
+
for (const g of p)
|
|
853
|
+
C(c, g) && r.push(g);
|
|
854
|
+
return r;
|
|
855
|
+
}, [C]), D = z((c) => {
|
|
856
|
+
const r = w(c);
|
|
857
|
+
for (const p of [...r].reverse()) {
|
|
858
|
+
const g = i.current.get(p);
|
|
859
|
+
g == null || g();
|
|
1150
860
|
}
|
|
1151
|
-
}, [
|
|
1152
|
-
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
}, [
|
|
1156
|
-
const
|
|
1157
|
-
for (const
|
|
1158
|
-
if (
|
|
861
|
+
}, [w]), k = z((c) => {
|
|
862
|
+
D(c);
|
|
863
|
+
const r = i.current.get(c);
|
|
864
|
+
r == null || r();
|
|
865
|
+
}, [D]), T = z((c, r) => {
|
|
866
|
+
const p = n.current;
|
|
867
|
+
for (const g of p) {
|
|
868
|
+
if (g === c)
|
|
1159
869
|
continue;
|
|
1160
|
-
|
|
870
|
+
s.current.get(g) === r && k(g);
|
|
1161
871
|
}
|
|
1162
|
-
}, [
|
|
1163
|
-
const
|
|
1164
|
-
if (
|
|
872
|
+
}, [k]), F = z(() => {
|
|
873
|
+
const c = n.current;
|
|
874
|
+
if (c.length === 0)
|
|
1165
875
|
return;
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1168
|
-
}, []),
|
|
1169
|
-
const
|
|
1170
|
-
for (const
|
|
1171
|
-
const
|
|
1172
|
-
|
|
876
|
+
const r = c[c.length - 1], p = i.current.get(r);
|
|
877
|
+
p == null || p();
|
|
878
|
+
}, []), H = z(() => {
|
|
879
|
+
const c = [...n.current];
|
|
880
|
+
for (const r of c) {
|
|
881
|
+
const p = i.current.get(r);
|
|
882
|
+
p == null || p();
|
|
1173
883
|
}
|
|
1174
|
-
}, []),
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
}, [
|
|
1178
|
-
const
|
|
884
|
+
}, []), Z = z(() => n.current.length > 0, []), [$, U] = L(!1);
|
|
885
|
+
_(() => {
|
|
886
|
+
U(n.current.length > 0);
|
|
887
|
+
}, [l]), _n(F, $), Mn(H, $);
|
|
888
|
+
const Q = $e(
|
|
1179
889
|
() => ({
|
|
1180
|
-
register:
|
|
1181
|
-
unregister:
|
|
1182
|
-
getZIndex:
|
|
1183
|
-
bringToFront:
|
|
1184
|
-
portalContainer:
|
|
1185
|
-
zIndexVersion:
|
|
1186
|
-
closeFocused:
|
|
1187
|
-
closeAll:
|
|
1188
|
-
hasOpenPopouts:
|
|
1189
|
-
closeWithDescendants:
|
|
1190
|
-
closeDescendants:
|
|
1191
|
-
closeSiblings:
|
|
1192
|
-
getParentId:
|
|
1193
|
-
isAncestor:
|
|
890
|
+
register: u,
|
|
891
|
+
unregister: P,
|
|
892
|
+
getZIndex: A,
|
|
893
|
+
bringToFront: f,
|
|
894
|
+
portalContainer: t,
|
|
895
|
+
zIndexVersion: l,
|
|
896
|
+
closeFocused: F,
|
|
897
|
+
closeAll: H,
|
|
898
|
+
hasOpenPopouts: Z,
|
|
899
|
+
closeWithDescendants: k,
|
|
900
|
+
closeDescendants: D,
|
|
901
|
+
closeSiblings: T,
|
|
902
|
+
getParentId: v,
|
|
903
|
+
isAncestor: C
|
|
1194
904
|
}),
|
|
1195
|
-
[
|
|
905
|
+
[u, P, A, f, t, l, F, H, Z, k, D, T, v, C]
|
|
1196
906
|
);
|
|
1197
|
-
return /* @__PURE__ */
|
|
1198
|
-
|
|
1199
|
-
/* @__PURE__ */ o("div", { ref:
|
|
907
|
+
return /* @__PURE__ */ y(Ze.Provider, { value: Q, children: [
|
|
908
|
+
e,
|
|
909
|
+
/* @__PURE__ */ o("div", { ref: a, "data-popout-portal-container": !0 })
|
|
1200
910
|
] });
|
|
1201
911
|
}
|
|
1202
|
-
function
|
|
1203
|
-
const { isOpen:
|
|
912
|
+
function Gn(e) {
|
|
913
|
+
const { isOpen: t, onDragStart: a } = e, [n, i] = L({ left: 0, top: 0 }), s = R(!1), l = R({
|
|
1204
914
|
x: 0,
|
|
1205
915
|
y: 0,
|
|
1206
916
|
offsetLeft: 0,
|
|
1207
917
|
offsetTop: 0
|
|
1208
|
-
}),
|
|
1209
|
-
|
|
1210
|
-
}, []),
|
|
1211
|
-
(
|
|
1212
|
-
const u =
|
|
1213
|
-
u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.tagName === "BUTTON" || u.tagName === "SELECT" || u.closest("button") || u.closest("input") || u.closest("textarea") || u.closest("select") || (
|
|
1214
|
-
x:
|
|
1215
|
-
y:
|
|
1216
|
-
offsetLeft:
|
|
1217
|
-
offsetTop:
|
|
1218
|
-
},
|
|
918
|
+
}), d = z(() => {
|
|
919
|
+
i({ left: 0, top: 0 });
|
|
920
|
+
}, []), b = z(
|
|
921
|
+
(m) => {
|
|
922
|
+
const u = m.target;
|
|
923
|
+
u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.tagName === "BUTTON" || u.tagName === "SELECT" || u.closest("button") || u.closest("input") || u.closest("textarea") || u.closest("select") || (s.current = !0, l.current = {
|
|
924
|
+
x: m.clientX,
|
|
925
|
+
y: m.clientY,
|
|
926
|
+
offsetLeft: n.left,
|
|
927
|
+
offsetTop: n.top
|
|
928
|
+
}, a == null || a(), m.target.setPointerCapture(m.pointerId));
|
|
1219
929
|
},
|
|
1220
|
-
[
|
|
1221
|
-
),
|
|
1222
|
-
if (!
|
|
930
|
+
[n.left, n.top, a]
|
|
931
|
+
), h = z((m) => {
|
|
932
|
+
if (!s.current)
|
|
1223
933
|
return;
|
|
1224
|
-
const u =
|
|
1225
|
-
|
|
1226
|
-
left:
|
|
1227
|
-
top:
|
|
934
|
+
const u = m.clientX - l.current.x, P = m.clientY - l.current.y;
|
|
935
|
+
i({
|
|
936
|
+
left: l.current.offsetLeft + u,
|
|
937
|
+
top: l.current.offsetTop + P
|
|
1228
938
|
});
|
|
1229
|
-
}, []),
|
|
1230
|
-
|
|
939
|
+
}, []), x = z((m) => {
|
|
940
|
+
s.current && (s.current = !1, m.target.releasePointerCapture(m.pointerId));
|
|
1231
941
|
}, []);
|
|
1232
|
-
return
|
|
942
|
+
return t ? {
|
|
1233
943
|
dragTriggerProps: {
|
|
1234
944
|
"data-drag-trigger": !0,
|
|
1235
|
-
onPointerDown:
|
|
1236
|
-
onPointerMove:
|
|
1237
|
-
onPointerUp:
|
|
945
|
+
onPointerDown: b,
|
|
946
|
+
onPointerMove: h,
|
|
947
|
+
onPointerUp: x,
|
|
1238
948
|
style: {
|
|
1239
949
|
cursor: "grab",
|
|
1240
950
|
userSelect: "none",
|
|
1241
951
|
touchAction: "none"
|
|
1242
952
|
}
|
|
1243
953
|
},
|
|
1244
|
-
dragOffset:
|
|
1245
|
-
resetDragOffset:
|
|
954
|
+
dragOffset: n,
|
|
955
|
+
resetDragOffset: d
|
|
1246
956
|
} : {
|
|
1247
957
|
dragTriggerProps: {},
|
|
1248
958
|
dragOffset: { left: 0, top: 0 },
|
|
1249
|
-
resetDragOffset:
|
|
959
|
+
resetDragOffset: d
|
|
1250
960
|
};
|
|
1251
961
|
}
|
|
1252
|
-
function
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
onClick: i,
|
|
1261
|
-
px: "xs",
|
|
1262
|
-
py: 3,
|
|
1263
|
-
style: {
|
|
1264
|
-
fontSize: "11px",
|
|
1265
|
-
fontWeight: n ? 500 : 400,
|
|
1266
|
-
color: n ? "var(--mantine-color-text)" : "var(--mantine-color-dimmed)",
|
|
1267
|
-
borderBottom: n ? "2px solid var(--mantine-color-blue-filled)" : "2px solid transparent",
|
|
1268
|
-
cursor: "pointer"
|
|
1269
|
-
},
|
|
1270
|
-
children: e
|
|
1271
|
-
}
|
|
1272
|
-
);
|
|
1273
|
-
}
|
|
1274
|
-
function ar({
|
|
1275
|
-
config: t,
|
|
1276
|
-
onClose: e,
|
|
1277
|
-
dragTriggerProps: n = {},
|
|
1278
|
-
actions: i = [],
|
|
1279
|
-
activeTab: a,
|
|
1280
|
-
onTabChange: r,
|
|
1281
|
-
titleId: s
|
|
962
|
+
function jn({
|
|
963
|
+
config: e,
|
|
964
|
+
onClose: t,
|
|
965
|
+
dragTriggerProps: a = {},
|
|
966
|
+
actions: n = [],
|
|
967
|
+
activeTab: i,
|
|
968
|
+
onTabChange: s,
|
|
969
|
+
titleId: l
|
|
1282
970
|
}) {
|
|
1283
971
|
var u;
|
|
1284
|
-
const { style:
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
972
|
+
const { style: d, ...b } = a, x = e.variant === "tabs" ? e : null, m = (x == null ? void 0 : x.tabs.map((P) => ({
|
|
973
|
+
value: P.id,
|
|
974
|
+
label: P.label
|
|
975
|
+
}))) ?? [];
|
|
976
|
+
return /* @__PURE__ */ y(
|
|
977
|
+
E,
|
|
1289
978
|
{
|
|
1290
979
|
justify: "space-between",
|
|
1291
980
|
px: "sm",
|
|
1292
981
|
py: "xs",
|
|
1293
|
-
...
|
|
982
|
+
...b,
|
|
1294
983
|
style: {
|
|
1295
|
-
...
|
|
984
|
+
...d
|
|
1296
985
|
},
|
|
1297
986
|
children: [
|
|
1298
|
-
|
|
1299
|
-
/* @__PURE__ */ o("span", { id:
|
|
1300
|
-
|
|
1301
|
-
|
|
987
|
+
e.variant === "title" ? /* @__PURE__ */ o(M, { id: l, size: "sm", fw: 500, children: e.title }) : /* @__PURE__ */ y(Le, { children: [
|
|
988
|
+
/* @__PURE__ */ o("span", { id: l, style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0, 0, 0, 0)" }, children: ((u = x == null ? void 0 : x.tabs[0]) == null ? void 0 : u.label) ?? "Settings" }),
|
|
989
|
+
/* @__PURE__ */ o(
|
|
990
|
+
Oe,
|
|
1302
991
|
{
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
},
|
|
1310
|
-
f.id
|
|
1311
|
-
))
|
|
992
|
+
data: m,
|
|
993
|
+
value: i,
|
|
994
|
+
onChange: (P) => s == null ? void 0 : s(P),
|
|
995
|
+
size: "xs"
|
|
996
|
+
}
|
|
997
|
+
)
|
|
1312
998
|
] }),
|
|
1313
|
-
/* @__PURE__ */
|
|
1314
|
-
|
|
1315
|
-
|
|
999
|
+
/* @__PURE__ */ y(E, { gap: 4, children: [
|
|
1000
|
+
n.map((P) => /* @__PURE__ */ o(
|
|
1001
|
+
V,
|
|
1316
1002
|
{
|
|
1317
1003
|
variant: "subtle",
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
children: f.icon
|
|
1004
|
+
onClick: P.onClick,
|
|
1005
|
+
"aria-label": P.label,
|
|
1006
|
+
children: P.icon
|
|
1322
1007
|
},
|
|
1323
|
-
|
|
1008
|
+
P.id
|
|
1324
1009
|
)),
|
|
1325
|
-
/* @__PURE__ */ o(
|
|
1010
|
+
/* @__PURE__ */ o(Ae, { size: "sm", onClick: t, "aria-label": "Close panel" })
|
|
1326
1011
|
] })
|
|
1327
1012
|
]
|
|
1328
1013
|
}
|
|
1329
1014
|
);
|
|
1330
1015
|
}
|
|
1331
|
-
function
|
|
1332
|
-
const { placement:
|
|
1333
|
-
let
|
|
1334
|
-
switch (
|
|
1016
|
+
function Xn(e, t, a = mn, n = {}) {
|
|
1017
|
+
const { placement: i = "left", alignment: s = "start", panelHeight: l = 0 } = n;
|
|
1018
|
+
let d, b;
|
|
1019
|
+
switch (i) {
|
|
1335
1020
|
case "left":
|
|
1336
|
-
|
|
1021
|
+
d = e.left - t - a, b = ke(e, s, l);
|
|
1337
1022
|
break;
|
|
1338
1023
|
case "right":
|
|
1339
|
-
|
|
1024
|
+
d = e.right + a, b = ke(e, s, l);
|
|
1340
1025
|
break;
|
|
1341
1026
|
case "top":
|
|
1342
|
-
|
|
1027
|
+
d = Te(e, s, t), b = e.top - l - a;
|
|
1343
1028
|
break;
|
|
1344
1029
|
case "bottom":
|
|
1345
|
-
|
|
1030
|
+
d = Te(e, s, t), b = e.bottom + a;
|
|
1346
1031
|
break;
|
|
1347
1032
|
default: {
|
|
1348
|
-
const
|
|
1349
|
-
throw new Error(`Unknown placement: ${String(
|
|
1033
|
+
const h = i;
|
|
1034
|
+
throw new Error(`Unknown placement: ${String(h)}`);
|
|
1350
1035
|
}
|
|
1351
1036
|
}
|
|
1352
|
-
return { left:
|
|
1037
|
+
return { left: d, top: b };
|
|
1353
1038
|
}
|
|
1354
|
-
function
|
|
1355
|
-
switch (
|
|
1039
|
+
function ke(e, t, a) {
|
|
1040
|
+
switch (t) {
|
|
1356
1041
|
case "start":
|
|
1357
|
-
return
|
|
1042
|
+
return e.top;
|
|
1358
1043
|
case "center":
|
|
1359
|
-
return
|
|
1044
|
+
return e.top + e.height / 2 - a / 2;
|
|
1360
1045
|
case "end":
|
|
1361
|
-
return
|
|
1046
|
+
return e.bottom - a;
|
|
1362
1047
|
default: {
|
|
1363
|
-
const
|
|
1364
|
-
throw new Error(`Unknown alignment: ${String(
|
|
1048
|
+
const n = t;
|
|
1049
|
+
throw new Error(`Unknown alignment: ${String(n)}`);
|
|
1365
1050
|
}
|
|
1366
1051
|
}
|
|
1367
1052
|
}
|
|
1368
|
-
function
|
|
1369
|
-
switch (
|
|
1053
|
+
function Te(e, t, a) {
|
|
1054
|
+
switch (t) {
|
|
1370
1055
|
case "start":
|
|
1371
|
-
return
|
|
1056
|
+
return e.left;
|
|
1372
1057
|
case "center":
|
|
1373
|
-
return
|
|
1058
|
+
return e.left + e.width / 2 - a / 2;
|
|
1374
1059
|
case "end":
|
|
1375
|
-
return
|
|
1060
|
+
return e.right - a;
|
|
1376
1061
|
default: {
|
|
1377
|
-
const
|
|
1378
|
-
throw new Error(`Unknown alignment: ${String(
|
|
1062
|
+
const n = t;
|
|
1063
|
+
throw new Error(`Unknown alignment: ${String(n)}`);
|
|
1379
1064
|
}
|
|
1380
1065
|
}
|
|
1381
1066
|
}
|
|
1382
|
-
function
|
|
1383
|
-
width:
|
|
1384
|
-
height:
|
|
1385
|
-
header:
|
|
1386
|
-
children:
|
|
1387
|
-
anchorRef:
|
|
1388
|
-
placement:
|
|
1389
|
-
alignment:
|
|
1390
|
-
gap:
|
|
1391
|
-
actions:
|
|
1067
|
+
function Kn({
|
|
1068
|
+
width: e,
|
|
1069
|
+
height: t,
|
|
1070
|
+
header: a,
|
|
1071
|
+
children: n,
|
|
1072
|
+
anchorRef: i,
|
|
1073
|
+
placement: s = "left",
|
|
1074
|
+
alignment: l = "start",
|
|
1075
|
+
gap: d = 0,
|
|
1076
|
+
actions: b
|
|
1392
1077
|
}) {
|
|
1393
|
-
var
|
|
1394
|
-
const { isOpen:
|
|
1395
|
-
|
|
1396
|
-
}, [
|
|
1397
|
-
isOpen:
|
|
1398
|
-
onDragStart:
|
|
1399
|
-
}),
|
|
1400
|
-
(
|
|
1401
|
-
var
|
|
1402
|
-
|
|
1078
|
+
var Ce, ze;
|
|
1079
|
+
const { isOpen: h, close: x, triggerRef: m, id: u, parentId: P } = xe(), { getZIndex: A, portalContainer: f, register: v, unregister: C, bringToFront: w, zIndexVersion: D, closeWithDescendants: k, closeDescendants: T } = Hn(), F = Vn(), H = Ue(), Z = `popout-panel-${u}`, $ = `popout-title-${H}`, [U, Q] = L(null), c = R(!1), r = R(null), p = z(() => {
|
|
1080
|
+
w(u);
|
|
1081
|
+
}, [w, u]), { dragTriggerProps: g, dragOffset: O, resetDragOffset: G } = Gn({
|
|
1082
|
+
isOpen: h,
|
|
1083
|
+
onDragStart: p
|
|
1084
|
+
}), q = a.variant === "tabs", S = q ? a : null, se = (S == null ? void 0 : S.defaultTab) ?? ((Ce = S == null ? void 0 : S.tabs[0]) == null ? void 0 : Ce.id), [ve, be] = L(se), qe = z(
|
|
1085
|
+
(I) => {
|
|
1086
|
+
var j;
|
|
1087
|
+
be(I), (j = S == null ? void 0 : S.onTabChange) == null || j.call(S, I);
|
|
1403
1088
|
},
|
|
1404
|
-
[
|
|
1405
|
-
),
|
|
1406
|
-
(
|
|
1407
|
-
|
|
1089
|
+
[S]
|
|
1090
|
+
), Ye = z(
|
|
1091
|
+
(I) => {
|
|
1092
|
+
I.stopPropagation(), T(u), w(u);
|
|
1408
1093
|
},
|
|
1409
|
-
[
|
|
1410
|
-
),
|
|
1411
|
-
|
|
1412
|
-
}, [
|
|
1413
|
-
if (
|
|
1414
|
-
|
|
1415
|
-
}), [
|
|
1416
|
-
if (
|
|
1417
|
-
let
|
|
1418
|
-
if (!
|
|
1419
|
-
const
|
|
1420
|
-
placement:
|
|
1421
|
-
alignment:
|
|
1422
|
-
panelHeight:
|
|
1094
|
+
[T, w, u]
|
|
1095
|
+
), Je = z(() => {
|
|
1096
|
+
k(u);
|
|
1097
|
+
}, [k, u]);
|
|
1098
|
+
if (_(() => (h ? v(u, x, P) : C(u), () => {
|
|
1099
|
+
C(u);
|
|
1100
|
+
}), [h, u, v, C, x, P]), _(() => {
|
|
1101
|
+
if (h) {
|
|
1102
|
+
let I = (i == null ? void 0 : i.current) ?? null;
|
|
1103
|
+
if (!I && (F != null && F.anchorRef.current) && (I = F.anchorRef.current), !I && P && (I = document.querySelector(`[data-popout-id="${P}"]`)), I || (I = m.current), I) {
|
|
1104
|
+
const j = I.getBoundingClientRect(), tt = Xn(j, e, d, {
|
|
1105
|
+
placement: s,
|
|
1106
|
+
alignment: l,
|
|
1107
|
+
panelHeight: t
|
|
1423
1108
|
});
|
|
1424
|
-
|
|
1109
|
+
Q(tt), c.current || (G(), q && be(se));
|
|
1425
1110
|
}
|
|
1426
1111
|
}
|
|
1427
|
-
|
|
1428
|
-
}, [
|
|
1429
|
-
if (
|
|
1430
|
-
const
|
|
1431
|
-
var
|
|
1432
|
-
(
|
|
1112
|
+
c.current = h;
|
|
1113
|
+
}, [h, e, t, d, m, i, s, l, G, q, se, P, F]), _(() => {
|
|
1114
|
+
if (h && r.current) {
|
|
1115
|
+
const I = setTimeout(() => {
|
|
1116
|
+
var j;
|
|
1117
|
+
(j = r.current) == null || j.focus();
|
|
1433
1118
|
}, 0);
|
|
1434
1119
|
return () => {
|
|
1435
|
-
clearTimeout(
|
|
1120
|
+
clearTimeout(I);
|
|
1436
1121
|
};
|
|
1437
|
-
} else !
|
|
1438
|
-
}, [
|
|
1122
|
+
} else !h && m.current && m.current.focus();
|
|
1123
|
+
}, [h, m]), !h || !f || !U)
|
|
1439
1124
|
return null;
|
|
1440
|
-
const
|
|
1441
|
-
left:
|
|
1442
|
-
top:
|
|
1443
|
-
},
|
|
1444
|
-
|
|
1445
|
-
borderRight: r === "left" ? te : J,
|
|
1446
|
-
borderBottom: r === "top" ? te : J,
|
|
1447
|
-
borderLeft: r === "right" ? te : J
|
|
1448
|
-
} : { border: J }, Ne = () => {
|
|
1449
|
-
if (!ie)
|
|
1450
|
-
return {};
|
|
1451
|
-
const C = 8;
|
|
1452
|
-
switch (r) {
|
|
1453
|
-
case "left":
|
|
1454
|
-
return {
|
|
1455
|
-
borderTopLeftRadius: C,
|
|
1456
|
-
borderBottomLeftRadius: C,
|
|
1457
|
-
borderTopRightRadius: 0,
|
|
1458
|
-
borderBottomRightRadius: 0
|
|
1459
|
-
};
|
|
1460
|
-
case "right":
|
|
1461
|
-
return {
|
|
1462
|
-
borderTopLeftRadius: 0,
|
|
1463
|
-
borderBottomLeftRadius: 0,
|
|
1464
|
-
borderTopRightRadius: C,
|
|
1465
|
-
borderBottomRightRadius: C
|
|
1466
|
-
};
|
|
1467
|
-
case "top":
|
|
1468
|
-
return {
|
|
1469
|
-
borderTopLeftRadius: C,
|
|
1470
|
-
borderTopRightRadius: C,
|
|
1471
|
-
borderBottomLeftRadius: 0,
|
|
1472
|
-
borderBottomRightRadius: 0
|
|
1473
|
-
};
|
|
1474
|
-
case "bottom":
|
|
1475
|
-
return {
|
|
1476
|
-
borderTopLeftRadius: 0,
|
|
1477
|
-
borderTopRightRadius: 0,
|
|
1478
|
-
borderBottomLeftRadius: C,
|
|
1479
|
-
borderBottomRightRadius: C
|
|
1480
|
-
};
|
|
1481
|
-
default:
|
|
1482
|
-
return {};
|
|
1483
|
-
}
|
|
1484
|
-
}, Ve = /* @__PURE__ */ S(
|
|
1485
|
-
It,
|
|
1125
|
+
const Qe = A(u), Pe = {
|
|
1126
|
+
left: U.left + O.left,
|
|
1127
|
+
top: U.top + O.top
|
|
1128
|
+
}, et = /* @__PURE__ */ y(
|
|
1129
|
+
Rt,
|
|
1486
1130
|
{
|
|
1487
|
-
ref:
|
|
1488
|
-
id:
|
|
1131
|
+
ref: r,
|
|
1132
|
+
id: Z,
|
|
1489
1133
|
role: "dialog",
|
|
1490
1134
|
"aria-modal": "false",
|
|
1491
|
-
"aria-labelledby":
|
|
1135
|
+
"aria-labelledby": $,
|
|
1492
1136
|
tabIndex: -1,
|
|
1493
|
-
radius:
|
|
1494
|
-
onClick:
|
|
1137
|
+
radius: 8,
|
|
1138
|
+
onClick: Ye,
|
|
1495
1139
|
"data-popout-id": u,
|
|
1496
|
-
...
|
|
1140
|
+
...P && { "data-parent-id": P },
|
|
1497
1141
|
style: {
|
|
1498
1142
|
position: "fixed",
|
|
1499
|
-
left:
|
|
1500
|
-
top:
|
|
1501
|
-
|
|
1502
|
-
...
|
|
1503
|
-
zIndex:
|
|
1143
|
+
left: Pe.left,
|
|
1144
|
+
top: Pe.top,
|
|
1145
|
+
minWidth: e,
|
|
1146
|
+
...t !== void 0 && { minHeight: t },
|
|
1147
|
+
zIndex: Qe,
|
|
1504
1148
|
backgroundColor: "var(--mantine-color-body)",
|
|
1505
|
-
|
|
1506
|
-
...Me(),
|
|
1507
|
-
// Conditional border radius - flatten corners on snapping side
|
|
1508
|
-
...Ne(),
|
|
1149
|
+
border: "1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12))",
|
|
1509
1150
|
// Figma-style shadows: tight, hard near edges, softer further out
|
|
1510
1151
|
boxShadow: [
|
|
1511
1152
|
"0 1px 2px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4))",
|
|
@@ -1520,116 +1161,536 @@ function lr({
|
|
|
1520
1161
|
},
|
|
1521
1162
|
children: [
|
|
1522
1163
|
/* @__PURE__ */ o(
|
|
1523
|
-
|
|
1164
|
+
jn,
|
|
1524
1165
|
{
|
|
1525
|
-
config:
|
|
1526
|
-
onClose:
|
|
1527
|
-
dragTriggerProps:
|
|
1528
|
-
activeTab:
|
|
1529
|
-
onTabChange:
|
|
1530
|
-
actions:
|
|
1531
|
-
titleId:
|
|
1166
|
+
config: a,
|
|
1167
|
+
onClose: Je,
|
|
1168
|
+
dragTriggerProps: g,
|
|
1169
|
+
activeTab: ve,
|
|
1170
|
+
onTabChange: qe,
|
|
1171
|
+
actions: b,
|
|
1172
|
+
titleId: $
|
|
1532
1173
|
}
|
|
1533
1174
|
),
|
|
1534
|
-
/* @__PURE__ */ o(
|
|
1175
|
+
/* @__PURE__ */ o(B, { children: q ? (ze = S == null ? void 0 : S.tabs.find((I) => I.id === ve)) == null ? void 0 : ze.content : n })
|
|
1535
1176
|
]
|
|
1536
1177
|
}
|
|
1537
1178
|
);
|
|
1538
|
-
return
|
|
1179
|
+
return Ut(et, f);
|
|
1539
1180
|
}
|
|
1540
|
-
function
|
|
1541
|
-
const { toggle:
|
|
1542
|
-
(
|
|
1543
|
-
|
|
1181
|
+
function Wn({ children: e }) {
|
|
1182
|
+
const { toggle: t, triggerRef: a, isOpen: n, id: i } = xe(), s = z(
|
|
1183
|
+
(b) => {
|
|
1184
|
+
b.stopPropagation(), t();
|
|
1544
1185
|
},
|
|
1545
|
-
[
|
|
1186
|
+
[t]
|
|
1546
1187
|
);
|
|
1547
|
-
if (!
|
|
1188
|
+
if (!Ne(e))
|
|
1548
1189
|
throw new Error("PopoutTrigger requires a single valid React element as its child");
|
|
1549
|
-
const
|
|
1550
|
-
return
|
|
1551
|
-
onClick: (
|
|
1552
|
-
var
|
|
1553
|
-
(
|
|
1190
|
+
const l = `popout-panel-${i}`, d = e;
|
|
1191
|
+
return He(d, {
|
|
1192
|
+
onClick: (b) => {
|
|
1193
|
+
var h, x;
|
|
1194
|
+
(x = (h = d.props).onClick) == null || x.call(h, b), s(b);
|
|
1554
1195
|
},
|
|
1555
|
-
ref:
|
|
1196
|
+
ref: a,
|
|
1556
1197
|
// Mark this element as a popout trigger for click-outside detection
|
|
1557
1198
|
"data-popout-trigger": !0,
|
|
1558
1199
|
// ARIA attributes for accessibility
|
|
1559
|
-
"aria-expanded":
|
|
1560
|
-
"aria-controls":
|
|
1200
|
+
"aria-expanded": n,
|
|
1201
|
+
"aria-controls": l,
|
|
1561
1202
|
"aria-haspopup": "dialog"
|
|
1562
1203
|
});
|
|
1563
1204
|
}
|
|
1564
|
-
function
|
|
1565
|
-
const
|
|
1566
|
-
return /* @__PURE__ */ o(
|
|
1205
|
+
function Zn({ children: e }) {
|
|
1206
|
+
const t = Nn(), a = (t == null ? void 0 : t.id) ?? null;
|
|
1207
|
+
return /* @__PURE__ */ o($n, { parentId: a, children: e });
|
|
1208
|
+
}
|
|
1209
|
+
const oe = Object.assign(Zn, {
|
|
1210
|
+
Trigger: Wn,
|
|
1211
|
+
Panel: Kn,
|
|
1212
|
+
Content: Rn,
|
|
1213
|
+
Anchor: Bn
|
|
1214
|
+
}), fo = $t(
|
|
1215
|
+
function({ icon: t, size: a = "xs", ...n }, i) {
|
|
1216
|
+
const { isOpen: s } = xe();
|
|
1217
|
+
return /* @__PURE__ */ o(
|
|
1218
|
+
V,
|
|
1219
|
+
{
|
|
1220
|
+
ref: i,
|
|
1221
|
+
variant: s ? "light" : "subtle",
|
|
1222
|
+
size: a,
|
|
1223
|
+
c: s ? void 0 : "dimmed",
|
|
1224
|
+
...n,
|
|
1225
|
+
children: t
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1229
|
+
);
|
|
1230
|
+
function go({ children: e }) {
|
|
1231
|
+
return /* @__PURE__ */ o(Un, { children: e });
|
|
1232
|
+
}
|
|
1233
|
+
function qn({
|
|
1234
|
+
color: e,
|
|
1235
|
+
defaultColor: t,
|
|
1236
|
+
opacity: a,
|
|
1237
|
+
defaultOpacity: n = 100,
|
|
1238
|
+
onColorChange: i,
|
|
1239
|
+
onOpacityChange: s,
|
|
1240
|
+
label: l,
|
|
1241
|
+
showOpacity: d = !0
|
|
1242
|
+
}) {
|
|
1243
|
+
const [b, h] = W({
|
|
1244
|
+
value: e,
|
|
1245
|
+
defaultValue: void 0,
|
|
1246
|
+
finalValue: void 0,
|
|
1247
|
+
onChange: i
|
|
1248
|
+
}), [x, m] = W({
|
|
1249
|
+
value: a,
|
|
1250
|
+
defaultValue: void 0,
|
|
1251
|
+
finalValue: void 0,
|
|
1252
|
+
onChange: s
|
|
1253
|
+
}), u = b === void 0, P = x === void 0, A = u && (!d || P), f = b ?? t, v = x ?? n, [C, w] = L(f.replace("#", "").toUpperCase()), [D, k] = L(v);
|
|
1254
|
+
_(() => {
|
|
1255
|
+
w(f.replace("#", "").toUpperCase());
|
|
1256
|
+
}, [f]), _(() => {
|
|
1257
|
+
k(v);
|
|
1258
|
+
}, [v]);
|
|
1259
|
+
const T = (r) => {
|
|
1260
|
+
if (r.length === 9) {
|
|
1261
|
+
const p = r.slice(0, 7).toUpperCase(), g = r.slice(7, 9), O = Xe(g);
|
|
1262
|
+
h(p), d && m(O);
|
|
1263
|
+
} else
|
|
1264
|
+
h(r.toUpperCase());
|
|
1265
|
+
}, F = () => {
|
|
1266
|
+
const r = Ke(v);
|
|
1267
|
+
return `${f}${r}`.toUpperCase();
|
|
1268
|
+
}, H = (r) => {
|
|
1269
|
+
w(r.currentTarget.value.toUpperCase());
|
|
1270
|
+
}, Z = () => {
|
|
1271
|
+
let r = C.toUpperCase();
|
|
1272
|
+
r && !r.startsWith("#") && (r = `#${r}`), /^#[0-9A-F]{6}$/i.test(r) && r !== f ? h(r) : w(f.replace("#", "").toUpperCase());
|
|
1273
|
+
}, $ = (r) => {
|
|
1274
|
+
k(r);
|
|
1275
|
+
}, U = () => {
|
|
1276
|
+
const r = typeof D == "string" ? parseFloat(D) : D;
|
|
1277
|
+
if (isNaN(r))
|
|
1278
|
+
k(v);
|
|
1279
|
+
else {
|
|
1280
|
+
const p = Math.min(100, Math.max(0, r));
|
|
1281
|
+
p !== v && m(p);
|
|
1282
|
+
}
|
|
1283
|
+
}, Q = () => {
|
|
1284
|
+
h(void 0), d && m(void 0);
|
|
1285
|
+
}, c = /* @__PURE__ */ y(E, { gap: 4, wrap: "nowrap", children: [
|
|
1286
|
+
/* @__PURE__ */ y(E, { gap: 0, children: [
|
|
1287
|
+
/* @__PURE__ */ y(oe, { children: [
|
|
1288
|
+
/* @__PURE__ */ o(oe.Trigger, { children: /* @__PURE__ */ o(
|
|
1289
|
+
V,
|
|
1290
|
+
{
|
|
1291
|
+
variant: "filled",
|
|
1292
|
+
size: 24,
|
|
1293
|
+
radius: 0,
|
|
1294
|
+
style: {
|
|
1295
|
+
backgroundColor: "var(--mantine-color-default)",
|
|
1296
|
+
borderRadius: "4px 0 0 4px"
|
|
1297
|
+
},
|
|
1298
|
+
"aria-label": "Color swatch",
|
|
1299
|
+
children: /* @__PURE__ */ o(
|
|
1300
|
+
Lt,
|
|
1301
|
+
{
|
|
1302
|
+
color: f,
|
|
1303
|
+
size: 14,
|
|
1304
|
+
radius: 2,
|
|
1305
|
+
style: {
|
|
1306
|
+
border: "1px solid var(--mantine-color-default-border)"
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
)
|
|
1310
|
+
}
|
|
1311
|
+
) }),
|
|
1312
|
+
/* @__PURE__ */ o(
|
|
1313
|
+
oe.Panel,
|
|
1314
|
+
{
|
|
1315
|
+
width: 220,
|
|
1316
|
+
header: { variant: "title", title: l ?? "Color" },
|
|
1317
|
+
placement: "bottom",
|
|
1318
|
+
alignment: "start",
|
|
1319
|
+
gap: 4,
|
|
1320
|
+
children: /* @__PURE__ */ o(oe.Content, { children: /* @__PURE__ */ o(
|
|
1321
|
+
Mt,
|
|
1322
|
+
{
|
|
1323
|
+
format: "hexa",
|
|
1324
|
+
value: F(),
|
|
1325
|
+
onChange: T,
|
|
1326
|
+
swatches: [...Fn]
|
|
1327
|
+
}
|
|
1328
|
+
) })
|
|
1329
|
+
}
|
|
1330
|
+
)
|
|
1331
|
+
] }),
|
|
1332
|
+
/* @__PURE__ */ o(
|
|
1333
|
+
Ve,
|
|
1334
|
+
{
|
|
1335
|
+
value: C,
|
|
1336
|
+
onChange: H,
|
|
1337
|
+
onBlur: Z,
|
|
1338
|
+
"aria-label": "Color hex value",
|
|
1339
|
+
"data-is-default": u ? "true" : "false",
|
|
1340
|
+
w: 72,
|
|
1341
|
+
styles: {
|
|
1342
|
+
input: {
|
|
1343
|
+
borderRadius: d ? 0 : "0 4px 4px 0",
|
|
1344
|
+
fontFamily: "monospace",
|
|
1345
|
+
textTransform: "uppercase",
|
|
1346
|
+
...u ? {
|
|
1347
|
+
fontStyle: "italic",
|
|
1348
|
+
color: "var(--mantine-color-dimmed)"
|
|
1349
|
+
} : {}
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
),
|
|
1354
|
+
d && /* @__PURE__ */ y(Le, { children: [
|
|
1355
|
+
/* @__PURE__ */ o(
|
|
1356
|
+
B,
|
|
1357
|
+
{
|
|
1358
|
+
style: {
|
|
1359
|
+
width: 1,
|
|
1360
|
+
height: 24,
|
|
1361
|
+
backgroundColor: "var(--mantine-color-default-border)"
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
),
|
|
1365
|
+
/* @__PURE__ */ o(
|
|
1366
|
+
pe,
|
|
1367
|
+
{
|
|
1368
|
+
value: D,
|
|
1369
|
+
onChange: $,
|
|
1370
|
+
onBlur: U,
|
|
1371
|
+
min: 0,
|
|
1372
|
+
max: 100,
|
|
1373
|
+
hideControls: !0,
|
|
1374
|
+
suffix: "%",
|
|
1375
|
+
"aria-label": "Opacity",
|
|
1376
|
+
"data-is-default": P ? "true" : "false",
|
|
1377
|
+
w: 54,
|
|
1378
|
+
styles: {
|
|
1379
|
+
input: {
|
|
1380
|
+
borderRadius: "0 4px 4px 0",
|
|
1381
|
+
textAlign: "right",
|
|
1382
|
+
...P ? {
|
|
1383
|
+
fontStyle: "italic",
|
|
1384
|
+
color: "var(--mantine-color-dimmed)"
|
|
1385
|
+
} : {}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
)
|
|
1390
|
+
] })
|
|
1391
|
+
] }),
|
|
1392
|
+
!A && /* @__PURE__ */ o(
|
|
1393
|
+
V,
|
|
1394
|
+
{
|
|
1395
|
+
variant: "subtle",
|
|
1396
|
+
size: "xs",
|
|
1397
|
+
c: "dimmed",
|
|
1398
|
+
"aria-label": `Reset ${l ?? "color"} to default`,
|
|
1399
|
+
onClick: Q,
|
|
1400
|
+
children: /* @__PURE__ */ o(ue, { size: 12 })
|
|
1401
|
+
}
|
|
1402
|
+
)
|
|
1403
|
+
] });
|
|
1404
|
+
return l ? /* @__PURE__ */ y(K, { gap: 0, children: [
|
|
1405
|
+
/* @__PURE__ */ o(M, { size: "xs", c: "dimmed", mb: 1, lh: 1.2, children: l }),
|
|
1406
|
+
c
|
|
1407
|
+
] }) : c;
|
|
1408
|
+
}
|
|
1409
|
+
function mo({ label: e, actions: t, children: a, bleed: n }) {
|
|
1410
|
+
return /* @__PURE__ */ y(B, { children: [
|
|
1411
|
+
/* @__PURE__ */ o(Be, { color: "var(--mantine-color-default-border)", mt: 8, mb: 0, mx: n ? "calc(-1 * var(--mantine-spacing-sm) - 1px)" : void 0 }),
|
|
1412
|
+
/* @__PURE__ */ y(E, { justify: "space-between", py: 8, px: 8, children: [
|
|
1413
|
+
/* @__PURE__ */ o(M, { size: "xs", fw: 500, lh: 1.2, children: e }),
|
|
1414
|
+
t && /* @__PURE__ */ o(E, { gap: 4, children: t })
|
|
1415
|
+
] }),
|
|
1416
|
+
/* @__PURE__ */ o(K, { gap: 0, px: 8, children: a })
|
|
1417
|
+
] });
|
|
1567
1418
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1419
|
+
function ho({
|
|
1420
|
+
label: e,
|
|
1421
|
+
defaultOpen: t = !0,
|
|
1422
|
+
children: a,
|
|
1423
|
+
hasConfiguredValues: n = !1
|
|
1424
|
+
}) {
|
|
1425
|
+
const [i, { toggle: s }] = Me(t), l = (d) => {
|
|
1426
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), s());
|
|
1427
|
+
};
|
|
1428
|
+
return /* @__PURE__ */ y(B, { children: [
|
|
1429
|
+
/* @__PURE__ */ o(Be, { color: "var(--mantine-color-default-border)", mt: 8, mb: 0, mx: 8 }),
|
|
1430
|
+
/* @__PURE__ */ o(
|
|
1431
|
+
E,
|
|
1432
|
+
{
|
|
1433
|
+
justify: "space-between",
|
|
1434
|
+
py: 8,
|
|
1435
|
+
px: 8,
|
|
1436
|
+
style: { cursor: "pointer" },
|
|
1437
|
+
onClick: s,
|
|
1438
|
+
role: "button",
|
|
1439
|
+
tabIndex: 0,
|
|
1440
|
+
"aria-expanded": i,
|
|
1441
|
+
"aria-label": i ? `Collapse ${e}` : `Expand ${e}`,
|
|
1442
|
+
onKeyDown: l,
|
|
1443
|
+
children: /* @__PURE__ */ y(E, { gap: 4, children: [
|
|
1444
|
+
/* @__PURE__ */ o(
|
|
1445
|
+
V,
|
|
1446
|
+
{
|
|
1447
|
+
variant: "subtle",
|
|
1448
|
+
size: "xs",
|
|
1449
|
+
c: "dimmed",
|
|
1450
|
+
tabIndex: -1,
|
|
1451
|
+
"aria-hidden": "true",
|
|
1452
|
+
children: i ? /* @__PURE__ */ o(fe, { size: 12 }) : /* @__PURE__ */ o(_e, { size: 12 })
|
|
1453
|
+
}
|
|
1454
|
+
),
|
|
1455
|
+
/* @__PURE__ */ o(M, { size: "xs", fw: 500, lh: 1.2, children: e }),
|
|
1456
|
+
n && /* @__PURE__ */ o(
|
|
1457
|
+
B,
|
|
1458
|
+
{
|
|
1459
|
+
"aria-label": `${e} has configured values`,
|
|
1460
|
+
style: {
|
|
1461
|
+
width: 6,
|
|
1462
|
+
height: 6,
|
|
1463
|
+
borderRadius: "50%",
|
|
1464
|
+
backgroundColor: "var(--mantine-color-blue-5)",
|
|
1465
|
+
marginLeft: 4
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
)
|
|
1469
|
+
] })
|
|
1470
|
+
}
|
|
1471
|
+
),
|
|
1472
|
+
/* @__PURE__ */ o(Re, { in: i, children: /* @__PURE__ */ o(K, { gap: 0, children: a }) })
|
|
1473
|
+
] });
|
|
1575
1474
|
}
|
|
1576
|
-
function
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1475
|
+
function xo({ label: e, defaultOpen: t = !1, children: a }) {
|
|
1476
|
+
const [n, { toggle: i }] = Me(t), s = (l) => {
|
|
1477
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), i());
|
|
1478
|
+
};
|
|
1479
|
+
return /* @__PURE__ */ y(B, { children: [
|
|
1480
|
+
/* @__PURE__ */ y(
|
|
1481
|
+
E,
|
|
1482
|
+
{
|
|
1483
|
+
gap: 4,
|
|
1484
|
+
py: 4,
|
|
1485
|
+
style: { cursor: "pointer" },
|
|
1486
|
+
onClick: i,
|
|
1487
|
+
role: "button",
|
|
1488
|
+
tabIndex: 0,
|
|
1489
|
+
"aria-expanded": n,
|
|
1490
|
+
"aria-label": n ? `Collapse ${e}` : `Expand ${e}`,
|
|
1491
|
+
onKeyDown: s,
|
|
1492
|
+
children: [
|
|
1493
|
+
/* @__PURE__ */ o(
|
|
1494
|
+
V,
|
|
1495
|
+
{
|
|
1496
|
+
variant: "subtle",
|
|
1497
|
+
size: "xs",
|
|
1498
|
+
c: "dimmed",
|
|
1499
|
+
tabIndex: -1,
|
|
1500
|
+
"aria-hidden": "true",
|
|
1501
|
+
children: n ? /* @__PURE__ */ o(fe, { size: 10 }) : /* @__PURE__ */ o(_e, { size: 10 })
|
|
1502
|
+
}
|
|
1503
|
+
),
|
|
1504
|
+
/* @__PURE__ */ o(M, { size: "xs", c: "dimmed", lh: 1.2, children: e })
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
),
|
|
1508
|
+
/* @__PURE__ */ o(Re, { in: n, children: /* @__PURE__ */ o(B, { pl: "md", children: /* @__PURE__ */ o(K, { gap: 4, children: a }) }) })
|
|
1580
1509
|
] });
|
|
1581
1510
|
}
|
|
1582
|
-
function
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1511
|
+
function Yn() {
|
|
1512
|
+
return crypto.randomUUID().slice(0, 8);
|
|
1513
|
+
}
|
|
1514
|
+
function de(e, t) {
|
|
1515
|
+
return {
|
|
1516
|
+
id: Yn(),
|
|
1517
|
+
offset: e,
|
|
1518
|
+
color: t
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
function Jn() {
|
|
1522
|
+
return [de(0, "#6366F1"), de(1, "#06B6D4")];
|
|
1523
|
+
}
|
|
1524
|
+
function vo({
|
|
1525
|
+
stops: e,
|
|
1526
|
+
defaultStops: t,
|
|
1527
|
+
direction: a,
|
|
1528
|
+
defaultDirection: n = 0,
|
|
1529
|
+
showDirection: i = !0,
|
|
1530
|
+
onChange: s
|
|
1593
1531
|
}) {
|
|
1594
|
-
const [
|
|
1532
|
+
const [l, d] = W({
|
|
1595
1533
|
value: e,
|
|
1534
|
+
defaultValue: t,
|
|
1535
|
+
finalValue: Jn(),
|
|
1536
|
+
onChange: (f) => s == null ? void 0 : s(f, b)
|
|
1537
|
+
}), [b, h] = W({
|
|
1538
|
+
value: a,
|
|
1539
|
+
defaultValue: n,
|
|
1540
|
+
finalValue: 0,
|
|
1541
|
+
onChange: (f) => s == null ? void 0 : s(l, f)
|
|
1542
|
+
}), x = (f, v) => {
|
|
1543
|
+
const C = [...l];
|
|
1544
|
+
C[f] = { ...C[f], color: v }, d(C);
|
|
1545
|
+
}, m = (f, v) => {
|
|
1546
|
+
const C = [...l];
|
|
1547
|
+
C[f] = { ...C[f], offset: v / 100 }, d(C);
|
|
1548
|
+
}, u = (f) => {
|
|
1549
|
+
h(f);
|
|
1550
|
+
}, P = () => {
|
|
1551
|
+
if (l.length >= 5)
|
|
1552
|
+
return;
|
|
1553
|
+
const f = l.length > 0 ? (l[l.length - 1].offset + 1) / 2 : 0.5, v = [...l, de(f, le)];
|
|
1554
|
+
v.sort((C, w) => C.offset - w.offset), d(v);
|
|
1555
|
+
}, A = (f) => {
|
|
1556
|
+
if (l.length <= 2)
|
|
1557
|
+
return;
|
|
1558
|
+
const v = l.filter((C, w) => w !== f);
|
|
1559
|
+
d(v);
|
|
1560
|
+
};
|
|
1561
|
+
return /* @__PURE__ */ y(K, { gap: "xs", children: [
|
|
1562
|
+
/* @__PURE__ */ y(E, { justify: "space-between", align: "center", children: [
|
|
1563
|
+
/* @__PURE__ */ o(M, { size: "xs", c: "dimmed", children: "Color Stops" }),
|
|
1564
|
+
/* @__PURE__ */ o(
|
|
1565
|
+
V,
|
|
1566
|
+
{
|
|
1567
|
+
variant: "subtle",
|
|
1568
|
+
color: "gray",
|
|
1569
|
+
onClick: P,
|
|
1570
|
+
disabled: l.length >= 5,
|
|
1571
|
+
"aria-label": "Add color stop",
|
|
1572
|
+
children: /* @__PURE__ */ o(Nt, { size: 12 })
|
|
1573
|
+
}
|
|
1574
|
+
)
|
|
1575
|
+
] }),
|
|
1576
|
+
l.map((f, v) => /* @__PURE__ */ y(E, { gap: "xs", align: "flex-end", children: [
|
|
1577
|
+
/* @__PURE__ */ o(
|
|
1578
|
+
qn,
|
|
1579
|
+
{
|
|
1580
|
+
color: f.color,
|
|
1581
|
+
defaultColor: le,
|
|
1582
|
+
onColorChange: (C) => {
|
|
1583
|
+
x(v, C ?? le);
|
|
1584
|
+
},
|
|
1585
|
+
showOpacity: !1
|
|
1586
|
+
}
|
|
1587
|
+
),
|
|
1588
|
+
/* @__PURE__ */ o(B, { style: { width: "80px" }, children: /* @__PURE__ */ o(
|
|
1589
|
+
ce,
|
|
1590
|
+
{
|
|
1591
|
+
min: 0,
|
|
1592
|
+
max: 100,
|
|
1593
|
+
value: f.offset * 100,
|
|
1594
|
+
onChange: (C) => {
|
|
1595
|
+
m(v, C);
|
|
1596
|
+
},
|
|
1597
|
+
label: (C) => `${Math.round(C)}%`,
|
|
1598
|
+
"aria-label": `Stop ${v + 1} position`
|
|
1599
|
+
}
|
|
1600
|
+
) }),
|
|
1601
|
+
/* @__PURE__ */ o(
|
|
1602
|
+
V,
|
|
1603
|
+
{
|
|
1604
|
+
variant: "subtle",
|
|
1605
|
+
color: "gray",
|
|
1606
|
+
onClick: () => {
|
|
1607
|
+
A(v);
|
|
1608
|
+
},
|
|
1609
|
+
disabled: l.length <= 2,
|
|
1610
|
+
"aria-label": `Remove color stop ${v + 1}`,
|
|
1611
|
+
children: /* @__PURE__ */ o(Ht, { size: 12 })
|
|
1612
|
+
}
|
|
1613
|
+
)
|
|
1614
|
+
] }, f.id)),
|
|
1615
|
+
i && /* @__PURE__ */ y(B, { pb: "md", children: [
|
|
1616
|
+
/* @__PURE__ */ o(M, { size: "xs", c: "dimmed", mb: 4, children: "Direction" }),
|
|
1617
|
+
/* @__PURE__ */ o(
|
|
1618
|
+
ce,
|
|
1619
|
+
{
|
|
1620
|
+
min: 0,
|
|
1621
|
+
max: 360,
|
|
1622
|
+
value: b,
|
|
1623
|
+
onChange: u,
|
|
1624
|
+
label: (f) => `${f}°`,
|
|
1625
|
+
"aria-label": "Gradient direction",
|
|
1626
|
+
marks: [
|
|
1627
|
+
{ value: 0, label: "0°" },
|
|
1628
|
+
{ value: 90, label: "90°" },
|
|
1629
|
+
{ value: 180, label: "180°" },
|
|
1630
|
+
{ value: 270, label: "270°" },
|
|
1631
|
+
{ value: 360, label: "360°" }
|
|
1632
|
+
]
|
|
1633
|
+
}
|
|
1634
|
+
)
|
|
1635
|
+
] })
|
|
1636
|
+
] });
|
|
1637
|
+
}
|
|
1638
|
+
function bo({ label: e, value: t }) {
|
|
1639
|
+
return /* @__PURE__ */ y(E, { justify: "space-between", py: 4, children: [
|
|
1640
|
+
/* @__PURE__ */ o(M, { size: "sm", c: "dimmed", children: e }),
|
|
1641
|
+
/* @__PURE__ */ o(M, { size: "sm", c: "var(--mantine-color-text)", fw: 500, children: String(t) })
|
|
1642
|
+
] });
|
|
1643
|
+
}
|
|
1644
|
+
function Po({
|
|
1645
|
+
label: e,
|
|
1646
|
+
value: t,
|
|
1647
|
+
defaultValue: a,
|
|
1648
|
+
onChange: n,
|
|
1649
|
+
min: i,
|
|
1650
|
+
max: s,
|
|
1651
|
+
step: l,
|
|
1652
|
+
decimalScale: d,
|
|
1653
|
+
suffix: b,
|
|
1654
|
+
hideControls: h = !0
|
|
1655
|
+
}) {
|
|
1656
|
+
const [x, m] = W({
|
|
1657
|
+
value: t,
|
|
1596
1658
|
defaultValue: void 0,
|
|
1597
1659
|
// Start with undefined (using default)
|
|
1598
1660
|
finalValue: void 0,
|
|
1599
|
-
onChange:
|
|
1600
|
-
}), u =
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
}, [
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
},
|
|
1607
|
-
const
|
|
1608
|
-
if (isNaN(
|
|
1609
|
-
|
|
1661
|
+
onChange: n
|
|
1662
|
+
}), u = x === void 0, P = x ?? a, A = R(!1), [f, v] = L(P);
|
|
1663
|
+
_(() => {
|
|
1664
|
+
A.current || v(x ?? a), A.current = !1;
|
|
1665
|
+
}, [x, a]);
|
|
1666
|
+
const C = (k) => {
|
|
1667
|
+
A.current = !0, v(k);
|
|
1668
|
+
}, w = () => {
|
|
1669
|
+
const k = typeof f == "string" ? parseFloat(f) : f;
|
|
1670
|
+
if (isNaN(k))
|
|
1671
|
+
v(x ?? a);
|
|
1610
1672
|
else {
|
|
1611
|
-
let
|
|
1612
|
-
|
|
1673
|
+
let T = k;
|
|
1674
|
+
i !== void 0 && T < i && (T = i), s !== void 0 && T > s && (T = s), T !== x && m(T), v(T);
|
|
1613
1675
|
}
|
|
1614
|
-
},
|
|
1615
|
-
|
|
1676
|
+
}, D = () => {
|
|
1677
|
+
m(void 0);
|
|
1616
1678
|
};
|
|
1617
|
-
return /* @__PURE__ */
|
|
1679
|
+
return /* @__PURE__ */ y(E, { gap: 4, wrap: "nowrap", align: "flex-end", children: [
|
|
1618
1680
|
/* @__PURE__ */ o(
|
|
1619
|
-
|
|
1681
|
+
pe,
|
|
1620
1682
|
{
|
|
1621
|
-
label:
|
|
1622
|
-
"aria-label":
|
|
1623
|
-
value:
|
|
1624
|
-
onChange:
|
|
1625
|
-
onBlur:
|
|
1626
|
-
min:
|
|
1627
|
-
max:
|
|
1628
|
-
step:
|
|
1629
|
-
decimalScale:
|
|
1630
|
-
suffix:
|
|
1631
|
-
hideControls:
|
|
1632
|
-
size: "compact",
|
|
1683
|
+
label: e,
|
|
1684
|
+
"aria-label": e,
|
|
1685
|
+
value: f,
|
|
1686
|
+
onChange: C,
|
|
1687
|
+
onBlur: w,
|
|
1688
|
+
min: i,
|
|
1689
|
+
max: s,
|
|
1690
|
+
step: l,
|
|
1691
|
+
decimalScale: d,
|
|
1692
|
+
suffix: b,
|
|
1693
|
+
hideControls: h,
|
|
1633
1694
|
"data-is-default": u ? "true" : "false",
|
|
1634
1695
|
styles: {
|
|
1635
1696
|
input: u ? {
|
|
@@ -1641,47 +1702,46 @@ function Er({
|
|
|
1641
1702
|
}
|
|
1642
1703
|
),
|
|
1643
1704
|
!u && /* @__PURE__ */ o(
|
|
1644
|
-
|
|
1705
|
+
V,
|
|
1645
1706
|
{
|
|
1646
1707
|
variant: "subtle",
|
|
1647
1708
|
size: "xs",
|
|
1648
1709
|
c: "dimmed",
|
|
1649
|
-
"aria-label": `Reset ${
|
|
1650
|
-
onClick:
|
|
1710
|
+
"aria-label": `Reset ${e} to default`,
|
|
1711
|
+
onClick: D,
|
|
1651
1712
|
style: { marginBottom: 2 },
|
|
1652
|
-
children: /* @__PURE__ */ o(
|
|
1713
|
+
children: /* @__PURE__ */ o(ue, { size: 12 })
|
|
1653
1714
|
}
|
|
1654
1715
|
)
|
|
1655
1716
|
] });
|
|
1656
1717
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const [
|
|
1659
|
-
value:
|
|
1718
|
+
function Co({ label: e, value: t, defaultValue: a, options: n, onChange: i }) {
|
|
1719
|
+
const [s, l] = W({
|
|
1720
|
+
value: t,
|
|
1660
1721
|
defaultValue: void 0,
|
|
1661
1722
|
// Start with undefined (using default)
|
|
1662
1723
|
finalValue: void 0,
|
|
1663
|
-
onChange:
|
|
1664
|
-
}),
|
|
1665
|
-
|
|
1666
|
-
},
|
|
1667
|
-
|
|
1724
|
+
onChange: i
|
|
1725
|
+
}), d = s === void 0, b = s ?? a, h = (m) => {
|
|
1726
|
+
m !== null && l(m);
|
|
1727
|
+
}, x = () => {
|
|
1728
|
+
l(void 0);
|
|
1668
1729
|
};
|
|
1669
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ y(E, { gap: 4, wrap: "nowrap", align: "flex-end", children: [
|
|
1670
1731
|
/* @__PURE__ */ o(
|
|
1671
|
-
|
|
1732
|
+
Fe,
|
|
1672
1733
|
{
|
|
1673
|
-
label:
|
|
1674
|
-
"aria-label":
|
|
1675
|
-
value:
|
|
1676
|
-
onChange:
|
|
1677
|
-
data:
|
|
1678
|
-
size:
|
|
1679
|
-
rightSection: /* @__PURE__ */ o(ce, { size: 14 }),
|
|
1734
|
+
label: e,
|
|
1735
|
+
"aria-label": e,
|
|
1736
|
+
value: b,
|
|
1737
|
+
onChange: h,
|
|
1738
|
+
data: n,
|
|
1739
|
+
rightSection: /* @__PURE__ */ o(fe, { size: 14 }),
|
|
1680
1740
|
rightSectionPointerEvents: "none",
|
|
1681
|
-
"data-is-default":
|
|
1741
|
+
"data-is-default": d ? "true" : "false",
|
|
1682
1742
|
allowDeselect: !1,
|
|
1683
1743
|
styles: {
|
|
1684
|
-
input:
|
|
1744
|
+
input: d ? {
|
|
1685
1745
|
fontStyle: "italic",
|
|
1686
1746
|
color: "var(--mantine-color-dimmed)"
|
|
1687
1747
|
} : void 0
|
|
@@ -1689,61 +1749,99 @@ function Or({ label: t, value: e, defaultValue: n, options: i, onChange: a }) {
|
|
|
1689
1749
|
style: { flex: 1 }
|
|
1690
1750
|
}
|
|
1691
1751
|
),
|
|
1692
|
-
!
|
|
1693
|
-
|
|
1752
|
+
!d && /* @__PURE__ */ o(
|
|
1753
|
+
V,
|
|
1694
1754
|
{
|
|
1695
1755
|
variant: "subtle",
|
|
1696
1756
|
size: "xs",
|
|
1697
1757
|
c: "dimmed",
|
|
1698
|
-
"aria-label": `Reset ${
|
|
1699
|
-
onClick:
|
|
1758
|
+
"aria-label": `Reset ${e} to default`,
|
|
1759
|
+
onClick: x,
|
|
1700
1760
|
style: { marginBottom: 2 },
|
|
1701
|
-
children: /* @__PURE__ */ o(
|
|
1761
|
+
children: /* @__PURE__ */ o(ue, { size: 12 })
|
|
1702
1762
|
}
|
|
1703
1763
|
)
|
|
1704
1764
|
] });
|
|
1705
1765
|
}
|
|
1706
|
-
function
|
|
1707
|
-
|
|
1766
|
+
function zo({
|
|
1767
|
+
label: e,
|
|
1768
|
+
checked: t,
|
|
1769
|
+
defaultChecked: a,
|
|
1770
|
+
onChange: n,
|
|
1771
|
+
children: i
|
|
1772
|
+
}) {
|
|
1773
|
+
const [s, l] = W({
|
|
1774
|
+
value: t,
|
|
1775
|
+
defaultValue: a,
|
|
1776
|
+
finalValue: !1,
|
|
1777
|
+
onChange: n
|
|
1778
|
+
});
|
|
1779
|
+
return /* @__PURE__ */ y(K, { gap: 4, children: [
|
|
1780
|
+
/* @__PURE__ */ o(
|
|
1781
|
+
De,
|
|
1782
|
+
{
|
|
1783
|
+
label: e,
|
|
1784
|
+
checked: s,
|
|
1785
|
+
onChange: (d) => {
|
|
1786
|
+
l(d.currentTarget.checked);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
),
|
|
1790
|
+
s && /* @__PURE__ */ o(B, { "data-testid": "toggle-with-content-children", pl: "md", children: /* @__PURE__ */ o(K, { gap: 4, children: i }) })
|
|
1791
|
+
] });
|
|
1792
|
+
}
|
|
1793
|
+
function yo(e = "dark") {
|
|
1794
|
+
return _t(e);
|
|
1708
1795
|
}
|
|
1709
|
-
const
|
|
1710
|
-
xs:
|
|
1711
|
-
sm:
|
|
1712
|
-
md:
|
|
1713
|
-
lg:
|
|
1714
|
-
xl:
|
|
1715
|
-
},
|
|
1796
|
+
const So = {
|
|
1797
|
+
xs: ee(4),
|
|
1798
|
+
sm: ee(8),
|
|
1799
|
+
md: ee(16),
|
|
1800
|
+
lg: ee(24),
|
|
1801
|
+
xl: ee(32)
|
|
1802
|
+
}, wo = {
|
|
1803
|
+
/** Standard compact component height (inputs, buttons, icons) in pixels */
|
|
1804
|
+
HEIGHT: 24,
|
|
1805
|
+
/** Standard compact font size in pixels */
|
|
1806
|
+
FONT_SIZE: 11,
|
|
1807
|
+
/** Standard padding for control elements in pixels */
|
|
1808
|
+
CONTROL_PADDING: 8,
|
|
1809
|
+
/** Gap between items in sections/lists in pixels */
|
|
1810
|
+
SECTION_GAP: 4
|
|
1811
|
+
}, Io = "0.1.0";
|
|
1716
1812
|
export {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1813
|
+
wo as COMPACT_SIZING,
|
|
1814
|
+
qn as CompactColorInput,
|
|
1815
|
+
mo as ControlGroup,
|
|
1816
|
+
ho as ControlSection,
|
|
1817
|
+
xo as ControlSubGroup,
|
|
1818
|
+
le as DEFAULT_GRADIENT_STOP_COLOR,
|
|
1819
|
+
vo as GradientEditor,
|
|
1820
|
+
So as MANTINE_SPACING,
|
|
1821
|
+
Ge as MAX_ALPHA_HEX,
|
|
1822
|
+
je as MAX_OPACITY_PERCENT,
|
|
1823
|
+
mn as POPOUT_GAP,
|
|
1824
|
+
io as POPOUT_NESTED_GAP,
|
|
1825
|
+
we as POPOUT_Z_INDEX_BASE,
|
|
1826
|
+
oe as Popout,
|
|
1827
|
+
fo as PopoutButton,
|
|
1828
|
+
go as PopoutManager,
|
|
1829
|
+
Fn as SWATCH_COLORS_HEXA,
|
|
1830
|
+
bo as StatRow,
|
|
1831
|
+
Po as StyleNumberInput,
|
|
1832
|
+
Co as StyleSelect,
|
|
1833
|
+
zo as ToggleWithContent,
|
|
1834
|
+
Io as VERSION,
|
|
1835
|
+
jt as compactColors,
|
|
1836
|
+
Gt as compactDarkColors,
|
|
1837
|
+
lo as compactTheme,
|
|
1838
|
+
On as compactThemeOverride,
|
|
1839
|
+
de as createColorStop,
|
|
1840
|
+
Jn as createDefaultGradientStops,
|
|
1841
|
+
uo as isValidHex,
|
|
1842
|
+
Ke as opacityToAlphaHex,
|
|
1843
|
+
Xe as parseAlphaFromHexa,
|
|
1844
|
+
co as parseHexaColor,
|
|
1845
|
+
po as toHexaColor,
|
|
1846
|
+
yo as useActualColorScheme
|
|
1749
1847
|
};
|