react-semaphor 0.1.508 → 0.1.509
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/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +181 -172
- package/dist/chunks/{dashboard-briefing-launcher-B9l0ZAbv.js → dashboard-briefing-launcher-B5AQu-Vb.js} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-C4zsM3Hd.cjs → dashboard-briefing-launcher-BoXFrqq0.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-BCQv4xWM.js → dashboard-controls-CKKkSXEX.js} +3 -3
- package/dist/chunks/{dashboard-controls-CWwllVOe.cjs → dashboard-controls-gUVkQm8o.cjs} +1 -1
- package/dist/chunks/{dashboard-json-DVj2xLsH.cjs → dashboard-json-B7fSi6_b.cjs} +1 -1
- package/dist/chunks/{dashboard-json-BtU_q_0A.js → dashboard-json-CAJJquVx.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CO2IVBOq.cjs → edit-dashboard-visual-AZetLUv1.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-RgFUx-py.js → edit-dashboard-visual-DCnbqRRn.js} +2 -2
- package/dist/chunks/{editor-action-buttons-BE8Fby6n.cjs → editor-action-buttons-CBQsVYdt.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-D-MaqTIs.js → editor-action-buttons-DDA5JGwO.js} +1 -1
- package/dist/chunks/{index-ByiS9sB4.js → index-CL2lvhwk.js} +31577 -31491
- package/dist/chunks/{index-BaIrLSBb.cjs → index-DkEAikW8.cjs} +242 -244
- package/dist/chunks/{report-preferences-dialog-BbkXcnnn.js → report-preferences-dialog-Bv2VIOKc.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-C9rpWgQZ.cjs → report-preferences-dialog-Wg9g9fIj.cjs} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +12 -3
- package/dist/types/components/visual/matrix-table/matrix-window-viewer.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +0 -3
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +0 -4
- package/dist/types/lib/matrix-table/{use-matrix-selection.d.ts → use-matrix-cell-focus.d.ts} +13 -17
- package/dist/types/lib/matrix-table/use-matrix.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/lib/matrix-table/matrix-clipboard.d.ts +0 -45
- package/dist/types/lib/matrix-table/matrix-selection.d.ts +0 -20
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as d, jsx as r, Fragment as
|
|
1
|
+
import { jsxs as d, jsx as r, Fragment as le } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as K, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as se, S as ue, d as je, T as Je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q, V as ee, W as re, X as he, Y as oe, Z as ae, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-CD4uGTZI.js";
|
|
4
4
|
import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as ne, X as Xe } from "../chunks/x-CXDkqdur.js";
|
|
6
6
|
import "../chunks/card-config-utils-Bq1enstT.js";
|
|
7
7
|
import "../chunks/validators-BDYzZFgs.js";
|
|
8
8
|
import "../chunks/matrix-operation-contract-xL8IhFzp.js";
|
|
@@ -18,7 +18,7 @@ import { L as er } from "../chunks/layout-grid-CiubineE.js";
|
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
const rr =
|
|
21
|
+
const rr = ne("Ban", [
|
|
22
22
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
23
23
|
["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }]
|
|
24
24
|
]);
|
|
@@ -28,7 +28,7 @@ const rr = ae("Ban", [
|
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
const or =
|
|
31
|
+
const or = ne("Clipboard", [
|
|
32
32
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
33
33
|
[
|
|
34
34
|
"path",
|
|
@@ -44,7 +44,7 @@ const or = ae("Clipboard", [
|
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const ar =
|
|
47
|
+
const ar = ne("Pipette", [
|
|
48
48
|
["path", { d: "m2 22 1-1h3l9-9", key: "1sre89" }],
|
|
49
49
|
["path", { d: "M3 21v-3l9-9", key: "hpe2y6" }],
|
|
50
50
|
[
|
|
@@ -248,43 +248,43 @@ function tr(e, n) {
|
|
|
248
248
|
if (!t)
|
|
249
249
|
return e;
|
|
250
250
|
const c = O(e);
|
|
251
|
-
return
|
|
251
|
+
return pe(c.schemes.light, t.light), pe(c.schemes.dark, t.dark), c;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.selection = n.selection, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border,
|
|
253
|
+
function pe(e, n) {
|
|
254
|
+
e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.selection = n.selection, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function p(e, n) {
|
|
257
257
|
e.components[n] = O(e.components.table);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function W(e, n, t) {
|
|
260
260
|
switch (e.tokens.color[n] = t, n) {
|
|
261
261
|
case "background":
|
|
262
262
|
e.components.dashboard.background = t, e.components.interactive.toolbarBackground = t;
|
|
263
263
|
break;
|
|
264
264
|
case "foreground":
|
|
265
|
-
e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t,
|
|
265
|
+
e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
266
266
|
break;
|
|
267
267
|
case "card":
|
|
268
|
-
e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t,
|
|
268
|
+
e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
269
269
|
break;
|
|
270
270
|
case "cardForeground":
|
|
271
271
|
e.components.card.foreground = t;
|
|
272
272
|
break;
|
|
273
273
|
case "muted":
|
|
274
|
-
e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t,
|
|
274
|
+
e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
275
275
|
break;
|
|
276
276
|
case "mutedForeground":
|
|
277
|
-
e.components.table.header.foreground = t, e.components.chart.axisColor = t,
|
|
277
|
+
e.components.table.header.foreground = t, e.components.chart.axisColor = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
278
278
|
break;
|
|
279
279
|
case "border":
|
|
280
|
-
e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t,
|
|
280
|
+
e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
281
281
|
break;
|
|
282
282
|
case "accent":
|
|
283
|
-
e.components.table.row.hoverBackground = t,
|
|
283
|
+
e.components.table.row.hoverBackground = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
284
284
|
break;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function H(e, n, t) {
|
|
288
288
|
switch (e.tokens.radius[n] = t, n) {
|
|
289
289
|
case "control":
|
|
290
290
|
e.components.interactive.borderRadius = t, e.components.pagination.borderRadius = t;
|
|
@@ -293,14 +293,14 @@ function W(e, n, t) {
|
|
|
293
293
|
e.components.card.borderRadius = t;
|
|
294
294
|
break;
|
|
295
295
|
case "table":
|
|
296
|
-
e.components.table.container.borderRadius = t,
|
|
296
|
+
e.components.table.container.borderRadius = t, p(e, "aggregateTable"), p(e, "pivotTable");
|
|
297
297
|
break;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
function dr(e) {
|
|
301
301
|
var n, t;
|
|
302
302
|
for (const c of ["light", "dark"]) {
|
|
303
|
-
const l = e.schemes[c], s = l.tokens, i = s.color,
|
|
303
|
+
const l = e.schemes[c], s = l.tokens, i = s.color, v = (n = l.components) == null ? void 0 : n.aggregateTable, x = (t = l.components) == null ? void 0 : t.pivotTable, S = {
|
|
304
304
|
fontFamily: "",
|
|
305
305
|
headingFontFamily: "",
|
|
306
306
|
monoFontFamily: "",
|
|
@@ -315,7 +315,7 @@ function dr(e) {
|
|
|
315
315
|
badge: 999
|
|
316
316
|
};
|
|
317
317
|
s.radius = { ...f, ...s.radius };
|
|
318
|
-
const
|
|
318
|
+
const b = {
|
|
319
319
|
dashboardPadding: 16,
|
|
320
320
|
gridGap: 12,
|
|
321
321
|
cardPadding: 16,
|
|
@@ -323,7 +323,7 @@ function dr(e) {
|
|
|
323
323
|
tableCellX: 12,
|
|
324
324
|
tableCellY: 8
|
|
325
325
|
};
|
|
326
|
-
s.spacing = { ...
|
|
326
|
+
s.spacing = { ...b, ...s.spacing };
|
|
327
327
|
const T = {
|
|
328
328
|
card: "none",
|
|
329
329
|
popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
|
|
@@ -380,9 +380,9 @@ function dr(e) {
|
|
|
380
380
|
l.components.chart = { ...$, ...l.components.chart }, l.components.table = {
|
|
381
381
|
...B(i, s),
|
|
382
382
|
...l.components.table
|
|
383
|
-
}, l.components.aggregateTable =
|
|
383
|
+
}, l.components.aggregateTable = v ? {
|
|
384
384
|
...B(i, s),
|
|
385
|
-
...
|
|
385
|
+
...v
|
|
386
386
|
} : O(l.components.table), l.components.pivotTable = x ? {
|
|
387
387
|
...B(i, s),
|
|
388
388
|
...x
|
|
@@ -450,7 +450,6 @@ const ir = [
|
|
|
450
450
|
["primaryForeground", "Primary text"],
|
|
451
451
|
["accent", "Accent"],
|
|
452
452
|
["accentForeground", "Accent text"],
|
|
453
|
-
["selection", "Selection"],
|
|
454
453
|
["muted", "Muted"],
|
|
455
454
|
["mutedForeground", "Muted text"],
|
|
456
455
|
["border", "Border"],
|
|
@@ -458,7 +457,7 @@ const ir = [
|
|
|
458
457
|
["negative", "Negative"],
|
|
459
458
|
["warning", "Warning"],
|
|
460
459
|
["info", "Info"]
|
|
461
|
-
], cr = [0, 1, 2, 3, 4, 5],
|
|
460
|
+
], cr = [0, 1, 2, 3, 4, 5], X = We, lr = [
|
|
462
461
|
"#ffffff",
|
|
463
462
|
"#f8fafc",
|
|
464
463
|
"#f4f4f5",
|
|
@@ -480,22 +479,22 @@ function Br({
|
|
|
480
479
|
error: l = null,
|
|
481
480
|
className: s,
|
|
482
481
|
onDraftChange: i,
|
|
483
|
-
onSave:
|
|
482
|
+
onSave: v,
|
|
484
483
|
onClearConfig: x,
|
|
485
484
|
onCancel: S
|
|
486
485
|
}) {
|
|
487
|
-
const [f,
|
|
486
|
+
const [f, b] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
|
|
488
487
|
"idle"
|
|
489
|
-
), [
|
|
488
|
+
), [te, Se] = m.useState(!1), [D, _] = m.useState(""), [I, h] = m.useState(null), de = m.useRef(null), j = m.useRef(i), A = m.useRef(!1);
|
|
490
489
|
m.useEffect(() => {
|
|
491
490
|
j.current = i;
|
|
492
491
|
}, [i]), m.useEffect(() => {
|
|
493
492
|
if (e === void 0) {
|
|
494
|
-
A.current = !0,
|
|
493
|
+
A.current = !0, b(null);
|
|
495
494
|
return;
|
|
496
495
|
}
|
|
497
496
|
const o = J(e);
|
|
498
|
-
A.current = !0,
|
|
497
|
+
A.current = !0, b(o), F("light"), h(null);
|
|
499
498
|
}, [e]), m.useEffect(() => {
|
|
500
499
|
var o;
|
|
501
500
|
if (f) {
|
|
@@ -513,21 +512,21 @@ function Br({
|
|
|
513
512
|
}
|
|
514
513
|
}
|
|
515
514
|
}, [f]);
|
|
516
|
-
const
|
|
517
|
-
() =>
|
|
518
|
-
[
|
|
515
|
+
const u = f == null ? void 0 : f.schemes[T], V = c || $, Te = m.useMemo(
|
|
516
|
+
() => u ? pr(u.tokens.radius.control) : void 0,
|
|
517
|
+
[u]
|
|
519
518
|
), Fe = (o) => {
|
|
520
|
-
|
|
519
|
+
b((a) => {
|
|
521
520
|
if (!a) return a;
|
|
522
521
|
const k = gr(a);
|
|
523
522
|
return o(k), k;
|
|
524
523
|
});
|
|
525
|
-
},
|
|
524
|
+
}, g = (o) => {
|
|
526
525
|
Fe((a) => {
|
|
527
526
|
o(a.schemes[T]);
|
|
528
527
|
});
|
|
529
528
|
}, Pe = async () => {
|
|
530
|
-
if (!f || !
|
|
529
|
+
if (!f || !v) return;
|
|
531
530
|
let o;
|
|
532
531
|
try {
|
|
533
532
|
o = L(f);
|
|
@@ -539,18 +538,18 @@ function Br({
|
|
|
539
538
|
}
|
|
540
539
|
z(!0);
|
|
541
540
|
try {
|
|
542
|
-
await
|
|
541
|
+
await v(o);
|
|
543
542
|
} finally {
|
|
544
543
|
z(!1);
|
|
545
544
|
}
|
|
546
545
|
}, Be = () => {
|
|
547
546
|
const o = J(null);
|
|
548
|
-
R("idle"),
|
|
547
|
+
R("idle"), b(o);
|
|
549
548
|
}, Oe = async () => {
|
|
550
549
|
if (x) {
|
|
551
550
|
z(!0), h(null), R("idle");
|
|
552
551
|
try {
|
|
553
|
-
await x(), A.current = !0,
|
|
552
|
+
await x(), A.current = !0, b(J(null)), F("light");
|
|
554
553
|
} catch (o) {
|
|
555
554
|
h(
|
|
556
555
|
o instanceof Error ? o.message : "Unable to clear organization appearance"
|
|
@@ -559,10 +558,10 @@ function Br({
|
|
|
559
558
|
z(!1);
|
|
560
559
|
}
|
|
561
560
|
}
|
|
562
|
-
},
|
|
561
|
+
}, ie = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Re = (o) => {
|
|
563
562
|
if (Se(o), o)
|
|
564
563
|
try {
|
|
565
|
-
_(
|
|
564
|
+
_(ie()), h(null);
|
|
566
565
|
} catch (a) {
|
|
567
566
|
h(
|
|
568
567
|
a instanceof Error ? a.message : "Appearance is invalid"
|
|
@@ -571,19 +570,19 @@ function Br({
|
|
|
571
570
|
}, Ae = async () => {
|
|
572
571
|
if (f)
|
|
573
572
|
try {
|
|
574
|
-
const o =
|
|
573
|
+
const o = te && D ? D : ie();
|
|
575
574
|
await navigator.clipboard.writeText(o), h(null), R("copied");
|
|
576
575
|
} catch (o) {
|
|
577
576
|
h(
|
|
578
577
|
o instanceof Error ? o.message : "Unable to copy brand spec"
|
|
579
578
|
);
|
|
580
579
|
}
|
|
581
|
-
},
|
|
580
|
+
}, ce = (o) => {
|
|
582
581
|
const a = JSON.parse(o), k = J(a), P = L(k);
|
|
583
|
-
R("idle"), F("light"),
|
|
582
|
+
R("idle"), F("light"), b(k), _(JSON.stringify(P, null, 2));
|
|
584
583
|
}, Ee = () => {
|
|
585
584
|
try {
|
|
586
|
-
|
|
585
|
+
ce(D);
|
|
587
586
|
} catch (o) {
|
|
588
587
|
h(
|
|
589
588
|
o instanceof Error ? o.message : "Brand spec must be valid JSON"
|
|
@@ -594,7 +593,7 @@ function Br({
|
|
|
594
593
|
const a = (k = o.target.files) == null ? void 0 : k[0];
|
|
595
594
|
if (o.target.value = "", !!a)
|
|
596
595
|
try {
|
|
597
|
-
|
|
596
|
+
ce(await br(a));
|
|
598
597
|
} catch (P) {
|
|
599
598
|
h(
|
|
600
599
|
P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
|
|
@@ -604,7 +603,7 @@ function Br({
|
|
|
604
603
|
return /* @__PURE__ */ d(
|
|
605
604
|
"div",
|
|
606
605
|
{
|
|
607
|
-
className:
|
|
606
|
+
className: K(
|
|
608
607
|
"flex min-h-0 flex-1 flex-col bg-background text-foreground",
|
|
609
608
|
s
|
|
610
609
|
),
|
|
@@ -622,7 +621,7 @@ function Br({
|
|
|
622
621
|
/* @__PURE__ */ d(
|
|
623
622
|
ge,
|
|
624
623
|
{
|
|
625
|
-
open:
|
|
624
|
+
open: te,
|
|
626
625
|
onOpenChange: Re,
|
|
627
626
|
children: [
|
|
628
627
|
/* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !f, children: [
|
|
@@ -663,7 +662,7 @@ function Br({
|
|
|
663
662
|
variant: "ghost",
|
|
664
663
|
onClick: () => {
|
|
665
664
|
var o;
|
|
666
|
-
return (o =
|
|
665
|
+
return (o = de.current) == null ? void 0 : o.click();
|
|
667
666
|
},
|
|
668
667
|
children: [
|
|
669
668
|
/* @__PURE__ */ r(De, { className: "h-3.5 w-3.5" }),
|
|
@@ -697,7 +696,7 @@ function Br({
|
|
|
697
696
|
/* @__PURE__ */ r(
|
|
698
697
|
"input",
|
|
699
698
|
{
|
|
700
|
-
ref:
|
|
699
|
+
ref: de,
|
|
701
700
|
"aria-label": "Upload brand spec",
|
|
702
701
|
type: "file",
|
|
703
702
|
accept: "application/json,.json",
|
|
@@ -739,9 +738,9 @@ function Br({
|
|
|
739
738
|
type: "button",
|
|
740
739
|
size: "xs",
|
|
741
740
|
onClick: Pe,
|
|
742
|
-
disabled: !f || V || !!I || !
|
|
741
|
+
disabled: !f || V || !!I || !v,
|
|
743
742
|
children: [
|
|
744
|
-
V ? /* @__PURE__ */ r(
|
|
743
|
+
V ? /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
|
|
745
744
|
"Save"
|
|
746
745
|
]
|
|
747
746
|
}
|
|
@@ -758,10 +757,10 @@ function Br({
|
|
|
758
757
|
)
|
|
759
758
|
] }),
|
|
760
759
|
/* @__PURE__ */ d("div", { className: "flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2", children: [
|
|
761
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: I ? /* @__PURE__ */ d(
|
|
762
|
-
/* @__PURE__ */ r(
|
|
760
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: I ? /* @__PURE__ */ d(le, { children: [
|
|
761
|
+
/* @__PURE__ */ r(ue, { className: "h-3.5 w-3.5 text-destructive" }),
|
|
763
762
|
"Preview keeps the last valid draft"
|
|
764
|
-
] }) : /* @__PURE__ */ d(
|
|
763
|
+
] }) : /* @__PURE__ */ d(le, { children: [
|
|
765
764
|
/* @__PURE__ */ r(je, { className: "h-3.5 w-3.5 text-emerald-500" }),
|
|
766
765
|
"Draft is applied to the live dashboard preview"
|
|
767
766
|
] }) }),
|
|
@@ -769,7 +768,7 @@ function Br({
|
|
|
769
768
|
"button",
|
|
770
769
|
{
|
|
771
770
|
type: "button",
|
|
772
|
-
className:
|
|
771
|
+
className: K(
|
|
773
772
|
"h-full px-2.5 text-[12px] capitalize transition-colors",
|
|
774
773
|
T === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
775
774
|
),
|
|
@@ -780,7 +779,7 @@ function Br({
|
|
|
780
779
|
)) })
|
|
781
780
|
] }),
|
|
782
781
|
I && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: I }),
|
|
783
|
-
t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(
|
|
782
|
+
t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(se, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : l ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: l }) : f && u ? /* @__PURE__ */ d(Je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
|
|
784
783
|
/* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Le, { variant: "underline", className: "w-full gap-5", children: [
|
|
785
784
|
/* @__PURE__ */ r(U, { value: "style", children: "Style" }),
|
|
786
785
|
/* @__PURE__ */ r(U, { value: "surfaces", children: "Surfaces" }),
|
|
@@ -801,7 +800,7 @@ function Br({
|
|
|
801
800
|
className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
|
|
802
801
|
onClick: () => {
|
|
803
802
|
const a = tr(f, o.id);
|
|
804
|
-
|
|
803
|
+
b(a);
|
|
805
804
|
},
|
|
806
805
|
children: [
|
|
807
806
|
/* @__PURE__ */ d("div", { className: "flex h-7 w-10 overflow-hidden rounded-control border border-border/70", children: [
|
|
@@ -837,12 +836,12 @@ function Br({
|
|
|
837
836
|
title: "Color",
|
|
838
837
|
description: `Editing the ${T} scheme.`,
|
|
839
838
|
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: ir.map(([o, a]) => /* @__PURE__ */ r(
|
|
840
|
-
|
|
839
|
+
y,
|
|
841
840
|
{
|
|
842
841
|
label: a,
|
|
843
|
-
value:
|
|
844
|
-
onChange: (k) =>
|
|
845
|
-
|
|
842
|
+
value: u.tokens.color[o],
|
|
843
|
+
onChange: (k) => g((P) => {
|
|
844
|
+
W(P, o, k);
|
|
846
845
|
})
|
|
847
846
|
},
|
|
848
847
|
o
|
|
@@ -859,8 +858,8 @@ function Br({
|
|
|
859
858
|
/* @__PURE__ */ r(
|
|
860
859
|
sr,
|
|
861
860
|
{
|
|
862
|
-
value:
|
|
863
|
-
onChange: (o) =>
|
|
861
|
+
value: u.tokens.typography.fontFamily,
|
|
862
|
+
onChange: (o) => g((a) => {
|
|
864
863
|
a.tokens.typography.fontFamily = o, a.tokens.typography.headingFontFamily = o;
|
|
865
864
|
})
|
|
866
865
|
}
|
|
@@ -870,26 +869,26 @@ function Br({
|
|
|
870
869
|
w,
|
|
871
870
|
{
|
|
872
871
|
label: "Base size",
|
|
873
|
-
value:
|
|
872
|
+
value: u.tokens.typography.baseFontSize,
|
|
874
873
|
min: 11,
|
|
875
874
|
max: 18,
|
|
876
|
-
onChange: (o) =>
|
|
875
|
+
onChange: (o) => g((a) => {
|
|
877
876
|
a.tokens.typography.baseFontSize = o;
|
|
878
877
|
})
|
|
879
878
|
}
|
|
880
879
|
),
|
|
881
880
|
/* @__PURE__ */ r(
|
|
882
|
-
|
|
881
|
+
Z,
|
|
883
882
|
{
|
|
884
883
|
label: "Density",
|
|
885
|
-
value:
|
|
884
|
+
value: u.tokens.typography.density,
|
|
886
885
|
options: [
|
|
887
886
|
["compact", "Compact"],
|
|
888
887
|
["comfortable", "Comfortable"],
|
|
889
888
|
["spacious", "Spacious"]
|
|
890
889
|
],
|
|
891
|
-
onChange: (o) =>
|
|
892
|
-
a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density,
|
|
890
|
+
onChange: (o) => g((a) => {
|
|
891
|
+
a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
893
892
|
})
|
|
894
893
|
}
|
|
895
894
|
)
|
|
@@ -912,10 +911,10 @@ function Br({
|
|
|
912
911
|
{
|
|
913
912
|
label: "Canvas pad",
|
|
914
913
|
tooltip: "Outer padding around the dashboard canvas before cards begin.",
|
|
915
|
-
value:
|
|
914
|
+
value: u.tokens.spacing.dashboardPadding,
|
|
916
915
|
min: 0,
|
|
917
916
|
max: 48,
|
|
918
|
-
onChange: (o) =>
|
|
917
|
+
onChange: (o) => g((a) => {
|
|
919
918
|
a.tokens.spacing.dashboardPadding = o, a.components.dashboard.padding = o;
|
|
920
919
|
})
|
|
921
920
|
}
|
|
@@ -925,10 +924,10 @@ function Br({
|
|
|
925
924
|
{
|
|
926
925
|
label: "Grid gap",
|
|
927
926
|
tooltip: "Spacing between dashboard cards in the grid.",
|
|
928
|
-
value:
|
|
927
|
+
value: u.tokens.spacing.gridGap,
|
|
929
928
|
min: 0,
|
|
930
929
|
max: 32,
|
|
931
|
-
onChange: (o) =>
|
|
930
|
+
onChange: (o) => g((a) => {
|
|
932
931
|
a.tokens.spacing.gridGap = o;
|
|
933
932
|
})
|
|
934
933
|
}
|
|
@@ -938,10 +937,10 @@ function Br({
|
|
|
938
937
|
{
|
|
939
938
|
label: "Card pad",
|
|
940
939
|
tooltip: "Inner padding inside card/widget frames around titles, controls, and visual content.",
|
|
941
|
-
value:
|
|
940
|
+
value: u.tokens.spacing.cardPadding,
|
|
942
941
|
min: 0,
|
|
943
942
|
max: 32,
|
|
944
|
-
onChange: (o) =>
|
|
943
|
+
onChange: (o) => g((a) => {
|
|
945
944
|
a.tokens.spacing.cardPadding = o, a.components.card.padding = o;
|
|
946
945
|
})
|
|
947
946
|
}
|
|
@@ -953,11 +952,11 @@ function Br({
|
|
|
953
952
|
{
|
|
954
953
|
label: "Control radius",
|
|
955
954
|
tooltip: "Corner radius for buttons, inputs, selects, checkboxes, segmented controls, and similar interactive controls.",
|
|
956
|
-
value:
|
|
955
|
+
value: u.tokens.radius.control,
|
|
957
956
|
min: 0,
|
|
958
957
|
max: 12,
|
|
959
|
-
onChange: (o) =>
|
|
960
|
-
|
|
958
|
+
onChange: (o) => g((a) => {
|
|
959
|
+
H(a, "control", o);
|
|
961
960
|
})
|
|
962
961
|
}
|
|
963
962
|
),
|
|
@@ -966,11 +965,11 @@ function Br({
|
|
|
966
965
|
{
|
|
967
966
|
label: "Card/widget radius",
|
|
968
967
|
tooltip: "Corner radius for dashboard card frames and widget containers.",
|
|
969
|
-
value:
|
|
968
|
+
value: u.tokens.radius.card,
|
|
970
969
|
min: 0,
|
|
971
970
|
max: 12,
|
|
972
|
-
onChange: (o) =>
|
|
973
|
-
|
|
971
|
+
onChange: (o) => g((a) => {
|
|
972
|
+
H(a, "card", o);
|
|
974
973
|
})
|
|
975
974
|
}
|
|
976
975
|
),
|
|
@@ -979,11 +978,11 @@ function Br({
|
|
|
979
978
|
{
|
|
980
979
|
label: "Table radius",
|
|
981
980
|
tooltip: "Corner radius for table containers, table chrome, and table pagination surfaces.",
|
|
982
|
-
value:
|
|
981
|
+
value: u.tokens.radius.table,
|
|
983
982
|
min: 0,
|
|
984
983
|
max: 12,
|
|
985
|
-
onChange: (o) =>
|
|
986
|
-
|
|
984
|
+
onChange: (o) => g((a) => {
|
|
985
|
+
H(a, "table", o);
|
|
987
986
|
})
|
|
988
987
|
}
|
|
989
988
|
)
|
|
@@ -994,51 +993,51 @@ function Br({
|
|
|
994
993
|
/* @__PURE__ */ r(
|
|
995
994
|
N,
|
|
996
995
|
{
|
|
997
|
-
icon:
|
|
996
|
+
icon: ue,
|
|
998
997
|
title: "Filters and Controls",
|
|
999
998
|
description: "Dashboard filter/control toolbar, chip states, menus, and settings panels.",
|
|
1000
999
|
children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1001
1000
|
/* @__PURE__ */ r(
|
|
1002
|
-
|
|
1001
|
+
y,
|
|
1003
1002
|
{
|
|
1004
1003
|
label: "Toolbar background",
|
|
1005
1004
|
tooltip: "Background color for the dashboard filter/control toolbar strip. This is separate from chip state colors.",
|
|
1006
|
-
value:
|
|
1007
|
-
onChange: (o) =>
|
|
1005
|
+
value: u.components.interactive.toolbarBackground || u.tokens.color.background,
|
|
1006
|
+
onChange: (o) => g((a) => {
|
|
1008
1007
|
a.components.interactive.toolbarBackground = o;
|
|
1009
1008
|
})
|
|
1010
1009
|
}
|
|
1011
1010
|
),
|
|
1012
1011
|
/* @__PURE__ */ r(
|
|
1013
|
-
|
|
1012
|
+
y,
|
|
1014
1013
|
{
|
|
1015
1014
|
label: "Default state",
|
|
1016
1015
|
tooltip: "Unselected filter/control chips plus the base surface for their menus, dialogs, and pagination fallback.",
|
|
1017
|
-
value:
|
|
1018
|
-
onChange: (o) =>
|
|
1016
|
+
value: u.components.interactive.background || u.tokens.color.card,
|
|
1017
|
+
onChange: (o) => g((a) => {
|
|
1019
1018
|
a.components.interactive.background = o, a.components.pagination.background = o;
|
|
1020
1019
|
})
|
|
1021
1020
|
}
|
|
1022
1021
|
),
|
|
1023
1022
|
/* @__PURE__ */ r(
|
|
1024
|
-
|
|
1023
|
+
y,
|
|
1025
1024
|
{
|
|
1026
1025
|
label: "Border",
|
|
1027
1026
|
tooltip: "Border color for filter/control chips, runtime inputs, settings panels, and related popover chrome.",
|
|
1028
|
-
value:
|
|
1029
|
-
onChange: (o) =>
|
|
1027
|
+
value: u.components.interactive.borderColor || u.tokens.color.border,
|
|
1028
|
+
onChange: (o) => g((a) => {
|
|
1030
1029
|
a.components.interactive.borderColor = o, a.components.pagination.borderColor = o;
|
|
1031
1030
|
})
|
|
1032
1031
|
}
|
|
1033
1032
|
),
|
|
1034
1033
|
/* @__PURE__ */ r(
|
|
1035
|
-
|
|
1034
|
+
y,
|
|
1036
1035
|
{
|
|
1037
1036
|
label: "Selected state",
|
|
1038
1037
|
tooltip: "Selected filter/control chips and hover feedback. This keeps a lighter default state and a stronger selected state.",
|
|
1039
|
-
value:
|
|
1040
|
-
onChange: (o) =>
|
|
1041
|
-
|
|
1038
|
+
value: u.tokens.color.accent,
|
|
1039
|
+
onChange: (o) => g((a) => {
|
|
1040
|
+
W(a, "accent", o);
|
|
1042
1041
|
})
|
|
1043
1042
|
}
|
|
1044
1043
|
)
|
|
@@ -1055,11 +1054,11 @@ function Br({
|
|
|
1055
1054
|
description: "Palette and semantic chart text/grid colors.",
|
|
1056
1055
|
children: [
|
|
1057
1056
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: cr.map((o) => /* @__PURE__ */ r(
|
|
1058
|
-
|
|
1057
|
+
y,
|
|
1059
1058
|
{
|
|
1060
1059
|
label: `Series ${o + 1}`,
|
|
1061
|
-
value:
|
|
1062
|
-
onChange: (a) =>
|
|
1060
|
+
value: u.components.chart.palette[o] || "#000000",
|
|
1061
|
+
onChange: (a) => g((k) => {
|
|
1063
1062
|
k.components.chart.palette[o] = a;
|
|
1064
1063
|
})
|
|
1065
1064
|
},
|
|
@@ -1067,21 +1066,21 @@ function Br({
|
|
|
1067
1066
|
)) }),
|
|
1068
1067
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1069
1068
|
/* @__PURE__ */ r(
|
|
1070
|
-
|
|
1069
|
+
y,
|
|
1071
1070
|
{
|
|
1072
1071
|
label: "Grid",
|
|
1073
|
-
value:
|
|
1074
|
-
onChange: (o) =>
|
|
1072
|
+
value: u.components.chart.gridColor,
|
|
1073
|
+
onChange: (o) => g((a) => {
|
|
1075
1074
|
a.components.chart.gridColor = o;
|
|
1076
1075
|
})
|
|
1077
1076
|
}
|
|
1078
1077
|
),
|
|
1079
1078
|
/* @__PURE__ */ r(
|
|
1080
|
-
|
|
1079
|
+
y,
|
|
1081
1080
|
{
|
|
1082
1081
|
label: "Axis",
|
|
1083
|
-
value:
|
|
1084
|
-
onChange: (o) =>
|
|
1082
|
+
value: u.components.chart.axisColor,
|
|
1083
|
+
onChange: (o) => g((a) => {
|
|
1085
1084
|
a.components.chart.axisColor = o;
|
|
1086
1085
|
})
|
|
1087
1086
|
}
|
|
@@ -1099,84 +1098,94 @@ function Br({
|
|
|
1099
1098
|
children: [
|
|
1100
1099
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1101
1100
|
/* @__PURE__ */ r(
|
|
1102
|
-
|
|
1101
|
+
Z,
|
|
1103
1102
|
{
|
|
1104
1103
|
label: "Density",
|
|
1105
|
-
value:
|
|
1104
|
+
value: u.components.table.density,
|
|
1106
1105
|
options: [
|
|
1107
1106
|
["compact", "Compact"],
|
|
1108
1107
|
["comfortable", "Comfortable"],
|
|
1109
1108
|
["spacious", "Spacious"]
|
|
1110
1109
|
],
|
|
1111
|
-
onChange: (o) =>
|
|
1112
|
-
a.components.table.density = o,
|
|
1110
|
+
onChange: (o) => g((a) => {
|
|
1111
|
+
a.components.table.density = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1113
1112
|
})
|
|
1114
1113
|
}
|
|
1115
1114
|
),
|
|
1116
1115
|
/* @__PURE__ */ r(
|
|
1117
|
-
|
|
1116
|
+
Z,
|
|
1118
1117
|
{
|
|
1119
1118
|
label: "Cell wrap",
|
|
1120
|
-
value:
|
|
1119
|
+
value: u.components.table.cell.wrap,
|
|
1121
1120
|
options: [
|
|
1122
1121
|
["nowrap", "No wrap"],
|
|
1123
1122
|
["wrap", "Wrap"]
|
|
1124
1123
|
],
|
|
1125
|
-
onChange: (o) =>
|
|
1126
|
-
a.components.table.cell.wrap = o,
|
|
1124
|
+
onChange: (o) => g((a) => {
|
|
1125
|
+
a.components.table.cell.wrap = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1127
1126
|
})
|
|
1128
1127
|
}
|
|
1129
1128
|
)
|
|
1130
1129
|
] }),
|
|
1131
1130
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1132
1131
|
/* @__PURE__ */ r(
|
|
1133
|
-
|
|
1132
|
+
y,
|
|
1134
1133
|
{
|
|
1135
1134
|
label: "Header",
|
|
1136
|
-
value:
|
|
1137
|
-
onChange: (o) =>
|
|
1138
|
-
a.components.table.header.background = o,
|
|
1135
|
+
value: u.components.table.header.background,
|
|
1136
|
+
onChange: (o) => g((a) => {
|
|
1137
|
+
a.components.table.header.background = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1139
1138
|
})
|
|
1140
1139
|
}
|
|
1141
1140
|
),
|
|
1142
1141
|
/* @__PURE__ */ r(
|
|
1143
|
-
|
|
1142
|
+
y,
|
|
1144
1143
|
{
|
|
1145
1144
|
label: "Divider",
|
|
1146
|
-
value:
|
|
1147
|
-
onChange: (o) =>
|
|
1148
|
-
a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o,
|
|
1145
|
+
value: u.components.table.row.dividerColor,
|
|
1146
|
+
onChange: (o) => g((a) => {
|
|
1147
|
+
a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1148
|
+
})
|
|
1149
|
+
}
|
|
1150
|
+
),
|
|
1151
|
+
/* @__PURE__ */ r(
|
|
1152
|
+
y,
|
|
1153
|
+
{
|
|
1154
|
+
label: "Selection",
|
|
1155
|
+
value: u.tokens.color.selection,
|
|
1156
|
+
onChange: (o) => g((a) => {
|
|
1157
|
+
W(a, "selection", o);
|
|
1149
1158
|
})
|
|
1150
1159
|
}
|
|
1151
1160
|
)
|
|
1152
1161
|
] }),
|
|
1153
1162
|
/* @__PURE__ */ r(
|
|
1154
|
-
|
|
1163
|
+
q,
|
|
1155
1164
|
{
|
|
1156
1165
|
label: "Zebra rows",
|
|
1157
|
-
checked:
|
|
1158
|
-
onCheckedChange: (o) =>
|
|
1159
|
-
a.components.table.row.zebra = o,
|
|
1166
|
+
checked: u.components.table.row.zebra,
|
|
1167
|
+
onCheckedChange: (o) => g((a) => {
|
|
1168
|
+
a.components.table.row.zebra = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1160
1169
|
})
|
|
1161
1170
|
}
|
|
1162
1171
|
),
|
|
1163
1172
|
/* @__PURE__ */ r(
|
|
1164
|
-
|
|
1173
|
+
q,
|
|
1165
1174
|
{
|
|
1166
1175
|
label: "Sticky headers",
|
|
1167
|
-
checked:
|
|
1168
|
-
onCheckedChange: (o) =>
|
|
1169
|
-
a.components.table.header.sticky = o,
|
|
1176
|
+
checked: u.components.table.header.sticky,
|
|
1177
|
+
onCheckedChange: (o) => g((a) => {
|
|
1178
|
+
a.components.table.header.sticky = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1170
1179
|
})
|
|
1171
1180
|
}
|
|
1172
1181
|
),
|
|
1173
1182
|
/* @__PURE__ */ r(
|
|
1174
|
-
|
|
1183
|
+
q,
|
|
1175
1184
|
{
|
|
1176
1185
|
label: "Uppercase headers",
|
|
1177
|
-
checked:
|
|
1178
|
-
onCheckedChange: (o) =>
|
|
1179
|
-
a.components.table.header.uppercase = o,
|
|
1186
|
+
checked: u.components.table.header.uppercase,
|
|
1187
|
+
onCheckedChange: (o) => g((a) => {
|
|
1188
|
+
a.components.table.header.uppercase = o, p(a, "aggregateTable"), p(a, "pivotTable");
|
|
1180
1189
|
})
|
|
1181
1190
|
}
|
|
1182
1191
|
)
|
|
@@ -1213,7 +1222,7 @@ function sr({
|
|
|
1213
1222
|
onChange: n
|
|
1214
1223
|
}) {
|
|
1215
1224
|
var c;
|
|
1216
|
-
const t = (c =
|
|
1225
|
+
const t = (c = X.find((l) => l.value === e)) == null ? void 0 : c.id;
|
|
1217
1226
|
return /* @__PURE__ */ d("div", { children: [
|
|
1218
1227
|
/* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
|
|
1219
1228
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
|
|
@@ -1222,14 +1231,14 @@ function sr({
|
|
|
1222
1231
|
{
|
|
1223
1232
|
value: t,
|
|
1224
1233
|
onValueChange: (l) => {
|
|
1225
|
-
const s =
|
|
1234
|
+
const s = X.find(
|
|
1226
1235
|
(i) => i.id === l
|
|
1227
1236
|
);
|
|
1228
1237
|
s && n(s.value);
|
|
1229
1238
|
},
|
|
1230
1239
|
children: [
|
|
1231
1240
|
/* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ye, { placeholder: "Select font" }) }),
|
|
1232
|
-
/* @__PURE__ */ r(ve, { children:
|
|
1241
|
+
/* @__PURE__ */ r(ve, { children: X.map((l) => /* @__PURE__ */ r(Ce, { value: l.id, children: l.label }, l.id)) })
|
|
1233
1242
|
]
|
|
1234
1243
|
}
|
|
1235
1244
|
),
|
|
@@ -1244,20 +1253,20 @@ function sr({
|
|
|
1244
1253
|
] })
|
|
1245
1254
|
] });
|
|
1246
1255
|
}
|
|
1247
|
-
function
|
|
1256
|
+
function y({
|
|
1248
1257
|
label: e,
|
|
1249
1258
|
tooltip: n,
|
|
1250
1259
|
value: t,
|
|
1251
1260
|
onChange: c
|
|
1252
1261
|
}) {
|
|
1253
|
-
const [l, s] = m.useState(!1), [i,
|
|
1254
|
-
s(
|
|
1262
|
+
const [l, s] = m.useState(!1), [i, v] = m.useState(t), x = ur(t), S = t !== i, f = (b) => {
|
|
1263
|
+
s(b), b && v(t);
|
|
1255
1264
|
};
|
|
1256
1265
|
return /* @__PURE__ */ d("div", { className: "block", children: [
|
|
1257
1266
|
/* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
|
|
1258
1267
|
/* @__PURE__ */ r(E, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
|
|
1259
|
-
n ? /* @__PURE__ */ r(
|
|
1260
|
-
/* @__PURE__ */ r(
|
|
1268
|
+
n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
|
|
1269
|
+
/* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1261
1270
|
"button",
|
|
1262
1271
|
{
|
|
1263
1272
|
type: "button",
|
|
@@ -1266,7 +1275,7 @@ function v({
|
|
|
1266
1275
|
children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
|
|
1267
1276
|
}
|
|
1268
1277
|
) }),
|
|
1269
|
-
/* @__PURE__ */ r(
|
|
1278
|
+
/* @__PURE__ */ r(oe, { side: "top", className: "max-w-64", children: n })
|
|
1270
1279
|
] }) }) : null
|
|
1271
1280
|
] }),
|
|
1272
1281
|
/* @__PURE__ */ d("div", { className: "flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
|
|
@@ -1301,7 +1310,7 @@ function v({
|
|
|
1301
1310
|
"aria-label": `${e} native color picker`,
|
|
1302
1311
|
type: "color",
|
|
1303
1312
|
value: x,
|
|
1304
|
-
onChange: (
|
|
1313
|
+
onChange: (b) => c(b.target.value),
|
|
1305
1314
|
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
1306
1315
|
}
|
|
1307
1316
|
),
|
|
@@ -1312,8 +1321,8 @@ function v({
|
|
|
1312
1321
|
/* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
|
|
1313
1322
|
/* @__PURE__ */ d("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
|
|
1314
1323
|
/* @__PURE__ */ r(E, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
|
|
1315
|
-
/* @__PURE__ */ r(
|
|
1316
|
-
/* @__PURE__ */ r(
|
|
1324
|
+
/* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
|
|
1325
|
+
/* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1317
1326
|
"button",
|
|
1318
1327
|
{
|
|
1319
1328
|
type: "button",
|
|
@@ -1324,46 +1333,46 @@ function v({
|
|
|
1324
1333
|
children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
|
|
1325
1334
|
}
|
|
1326
1335
|
) }),
|
|
1327
|
-
/* @__PURE__ */ r(
|
|
1336
|
+
/* @__PURE__ */ r(oe, { side: "top", children: "Reset to previous value" })
|
|
1328
1337
|
] }) })
|
|
1329
1338
|
] }),
|
|
1330
1339
|
/* @__PURE__ */ r(
|
|
1331
|
-
|
|
1340
|
+
ae,
|
|
1332
1341
|
{
|
|
1333
1342
|
size: "xs",
|
|
1334
1343
|
"aria-label": `${e} popover color value`,
|
|
1335
1344
|
value: t,
|
|
1336
|
-
onChange: (
|
|
1345
|
+
onChange: (b) => c(b.target.value),
|
|
1337
1346
|
className: "font-mono"
|
|
1338
1347
|
}
|
|
1339
1348
|
)
|
|
1340
1349
|
] })
|
|
1341
1350
|
] }),
|
|
1342
|
-
/* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((
|
|
1351
|
+
/* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((b) => /* @__PURE__ */ r(
|
|
1343
1352
|
"button",
|
|
1344
1353
|
{
|
|
1345
1354
|
type: "button",
|
|
1346
|
-
"aria-label": `Set ${e} to ${
|
|
1347
|
-
className:
|
|
1355
|
+
"aria-label": `Set ${e} to ${b}`,
|
|
1356
|
+
className: K(
|
|
1348
1357
|
"h-6 rounded-control border border-border/70 shadow-sm",
|
|
1349
|
-
t.toLowerCase() ===
|
|
1358
|
+
t.toLowerCase() === b && "ring-2 ring-ring"
|
|
1350
1359
|
),
|
|
1351
|
-
style: { backgroundColor:
|
|
1352
|
-
onClick: () => c(
|
|
1360
|
+
style: { backgroundColor: b },
|
|
1361
|
+
onClick: () => c(b)
|
|
1353
1362
|
},
|
|
1354
|
-
|
|
1363
|
+
b
|
|
1355
1364
|
)) })
|
|
1356
1365
|
]
|
|
1357
1366
|
}
|
|
1358
1367
|
)
|
|
1359
1368
|
] }),
|
|
1360
1369
|
/* @__PURE__ */ r(
|
|
1361
|
-
|
|
1370
|
+
ae,
|
|
1362
1371
|
{
|
|
1363
1372
|
size: "xs",
|
|
1364
1373
|
"aria-label": `${e} color value`,
|
|
1365
1374
|
value: t,
|
|
1366
|
-
onChange: (
|
|
1375
|
+
onChange: (b) => c(b.target.value),
|
|
1367
1376
|
className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
|
|
1368
1377
|
}
|
|
1369
1378
|
)
|
|
@@ -1372,9 +1381,9 @@ function v({
|
|
|
1372
1381
|
}
|
|
1373
1382
|
function ur(e) {
|
|
1374
1383
|
const n = He(e);
|
|
1375
|
-
return n ? `#${
|
|
1384
|
+
return n ? `#${Y(n.r)}${Y(n.g)}${Y(n.b)}` : "#000000";
|
|
1376
1385
|
}
|
|
1377
|
-
function
|
|
1386
|
+
function Y(e) {
|
|
1378
1387
|
return Math.round(e).toString(16).padStart(2, "0");
|
|
1379
1388
|
}
|
|
1380
1389
|
function w({
|
|
@@ -1396,8 +1405,8 @@ function w({
|
|
|
1396
1405
|
children: e
|
|
1397
1406
|
}
|
|
1398
1407
|
),
|
|
1399
|
-
n ? /* @__PURE__ */ r(
|
|
1400
|
-
/* @__PURE__ */ r(
|
|
1408
|
+
n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
|
|
1409
|
+
/* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1401
1410
|
"button",
|
|
1402
1411
|
{
|
|
1403
1412
|
type: "button",
|
|
@@ -1406,11 +1415,11 @@ function w({
|
|
|
1406
1415
|
children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
|
|
1407
1416
|
}
|
|
1408
1417
|
) }),
|
|
1409
|
-
/* @__PURE__ */ r(
|
|
1418
|
+
/* @__PURE__ */ r(oe, { side: "top", className: "max-w-56", children: n })
|
|
1410
1419
|
] }) }) : null
|
|
1411
1420
|
] }),
|
|
1412
1421
|
/* @__PURE__ */ r(
|
|
1413
|
-
|
|
1422
|
+
ae,
|
|
1414
1423
|
{
|
|
1415
1424
|
id: i,
|
|
1416
1425
|
size: "xs",
|
|
@@ -1418,15 +1427,15 @@ function w({
|
|
|
1418
1427
|
min: c,
|
|
1419
1428
|
max: l,
|
|
1420
1429
|
value: t,
|
|
1421
|
-
onChange: (
|
|
1422
|
-
const x = Number(
|
|
1430
|
+
onChange: (v) => {
|
|
1431
|
+
const x = Number(v.target.value);
|
|
1423
1432
|
Number.isNaN(x) || s(x);
|
|
1424
1433
|
}
|
|
1425
1434
|
}
|
|
1426
1435
|
)
|
|
1427
1436
|
] });
|
|
1428
1437
|
}
|
|
1429
|
-
function
|
|
1438
|
+
function Z({
|
|
1430
1439
|
label: e,
|
|
1431
1440
|
value: n,
|
|
1432
1441
|
options: t,
|
|
@@ -1440,7 +1449,7 @@ function Y({
|
|
|
1440
1449
|
] })
|
|
1441
1450
|
] });
|
|
1442
1451
|
}
|
|
1443
|
-
function
|
|
1452
|
+
function q({
|
|
1444
1453
|
label: e,
|
|
1445
1454
|
checked: n,
|
|
1446
1455
|
onCheckedChange: t
|
|
@@ -1472,5 +1481,5 @@ export {
|
|
|
1472
1481
|
tr as applyBrandStudioPreset,
|
|
1473
1482
|
L as buildAppearanceSpecFromDraft,
|
|
1474
1483
|
J as createBrandStudioDraft,
|
|
1475
|
-
|
|
1484
|
+
p as mirrorTableAppearance
|
|
1476
1485
|
};
|