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