@arcanewizards/sigil 0.1.4 → 0.1.5
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/{chunk-CHVABPET.cjs → chunk-5CAFJT5T.cjs} +38 -22
- package/dist/{chunk-E3VUC3Q4.js → chunk-LKKN6DFB.js} +34 -18
- package/dist/frontend/appearance.cjs +5 -5
- package/dist/frontend/appearance.js +1 -1
- package/dist/frontend/controls/index.cjs +4 -2
- package/dist/frontend/controls/index.d.cts +17 -13
- package/dist/frontend/controls/index.d.ts +17 -13
- package/dist/frontend/controls/index.js +3 -1
- package/dist/frontend/dialogs.cjs +2 -2
- package/dist/frontend/dialogs.js +1 -1
- package/dist/frontend.cjs +4 -4
- package/dist/frontend.js +1 -1
- package/package.json +1 -1
|
@@ -247,7 +247,7 @@ ControlParagraph.displayName = "ControlParagraph";
|
|
|
247
247
|
var ControlLabel = _react.forwardRef.call(void 0,
|
|
248
248
|
({ className, disabled, nonMicro, position = "label", subgrid, ...props }, ref) => {
|
|
249
249
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
250
|
-
"
|
|
250
|
+
"label",
|
|
251
251
|
{
|
|
252
252
|
...props,
|
|
253
253
|
ref,
|
|
@@ -507,19 +507,9 @@ var ControlSelect = ({
|
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
509
|
};
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
teal: { label: "Teal", value: "teal" },
|
|
514
|
-
green: { label: "Green", value: "green" },
|
|
515
|
-
yellow: { label: "Yellow", value: "yellow" },
|
|
516
|
-
purple: { label: "Purple", value: "purple" },
|
|
517
|
-
orange: { label: "Orange", value: "orange" },
|
|
518
|
-
brown: { label: "Brown", value: "brown" },
|
|
519
|
-
gray: { label: "Gray", value: "gray" }
|
|
520
|
-
};
|
|
521
|
-
var ControlColorSelect = ({
|
|
522
|
-
color,
|
|
510
|
+
var ControlColoredSelect = ({
|
|
511
|
+
options,
|
|
512
|
+
value,
|
|
523
513
|
onChange,
|
|
524
514
|
variant,
|
|
525
515
|
position,
|
|
@@ -527,13 +517,13 @@ var ControlColorSelect = ({
|
|
|
527
517
|
placeholder,
|
|
528
518
|
...props
|
|
529
519
|
}) => {
|
|
530
|
-
const
|
|
531
|
-
const selectedColor = _chunkTZJ4UXR3cjs.sigilColorUsage.call(void 0, color
|
|
520
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
521
|
+
const selectedColor = _chunkTZJ4UXR3cjs.sigilColorUsage.call(void 0, _nullishCoalesce(_optionalChain([selectedOption, 'optionalAccess', _6 => _6.color]), () => ( "gray")));
|
|
532
522
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
533
523
|
ControlSelect,
|
|
534
524
|
{
|
|
535
525
|
options,
|
|
536
|
-
value
|
|
526
|
+
value,
|
|
537
527
|
onChange,
|
|
538
528
|
triggerButton: (option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
539
529
|
_radixui.Select.Trigger,
|
|
@@ -542,7 +532,7 @@ var ControlColorSelect = ({
|
|
|
542
532
|
className: clsControlButton({
|
|
543
533
|
variant,
|
|
544
534
|
position,
|
|
545
|
-
active: _optionalChain([option, 'optionalAccess',
|
|
535
|
+
active: _optionalChain([option, 'optionalAccess', _7 => _7.active])
|
|
546
536
|
}),
|
|
547
537
|
style: controlButtonColorVariables({
|
|
548
538
|
bg: selectedColor.background,
|
|
@@ -569,7 +559,7 @@ var ControlColorSelect = ({
|
|
|
569
559
|
)
|
|
570
560
|
] }),
|
|
571
561
|
children: [
|
|
572
|
-
_nullishCoalesce(_optionalChain([option, 'optionalAccess',
|
|
562
|
+
_nullishCoalesce(_optionalChain([option, 'optionalAccess', _8 => _8.label]), () => ( placeholder)),
|
|
573
563
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
574
564
|
_core.Icon,
|
|
575
565
|
{
|
|
@@ -587,7 +577,7 @@ var ControlColorSelect = ({
|
|
|
587
577
|
{
|
|
588
578
|
className: "",
|
|
589
579
|
style: {
|
|
590
|
-
color: `var(--sigil-usage-${option.
|
|
580
|
+
color: `var(--sigil-usage-${option.color}-foreground)`
|
|
591
581
|
},
|
|
592
582
|
children: option.label
|
|
593
583
|
}
|
|
@@ -599,6 +589,31 @@ var ControlColorSelect = ({
|
|
|
599
589
|
}
|
|
600
590
|
);
|
|
601
591
|
};
|
|
592
|
+
var COLOR_OPTIONS = {
|
|
593
|
+
red: { label: "Red", value: "red", color: "red" },
|
|
594
|
+
blue: { label: "Blue", value: "blue", color: "blue" },
|
|
595
|
+
teal: { label: "Teal", value: "teal", color: "teal" },
|
|
596
|
+
green: { label: "Green", value: "green", color: "green" },
|
|
597
|
+
yellow: { label: "Yellow", value: "yellow", color: "yellow" },
|
|
598
|
+
purple: { label: "Purple", value: "purple", color: "purple" },
|
|
599
|
+
orange: { label: "Orange", value: "orange", color: "orange" },
|
|
600
|
+
brown: { label: "Brown", value: "brown", color: "brown" },
|
|
601
|
+
gray: { label: "Gray", value: "gray", color: "gray" }
|
|
602
|
+
};
|
|
603
|
+
var COLOR_OPTIONS_ARRAY = Object.values(COLOR_OPTIONS);
|
|
604
|
+
var ControlColorSelect = ({
|
|
605
|
+
color,
|
|
606
|
+
...props
|
|
607
|
+
}) => {
|
|
608
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
609
|
+
ControlColoredSelect,
|
|
610
|
+
{
|
|
611
|
+
options: COLOR_OPTIONS_ARRAY,
|
|
612
|
+
value: color,
|
|
613
|
+
...props
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
};
|
|
602
617
|
|
|
603
618
|
// src/frontend/dialogs.tsx
|
|
604
619
|
|
|
@@ -653,7 +668,7 @@ var Dialog = ({
|
|
|
653
668
|
if (!dialogRef) return;
|
|
654
669
|
dialogRef.showModal();
|
|
655
670
|
}, [dialogRef]);
|
|
656
|
-
const close = () => _optionalChain([dialogRef, 'optionalAccess',
|
|
671
|
+
const close = () => _optionalChain([dialogRef, 'optionalAccess', _9 => _9.close, 'call', _10 => _10()]);
|
|
657
672
|
const onClose = (event) => {
|
|
658
673
|
if (closable) {
|
|
659
674
|
dialogClosed();
|
|
@@ -768,4 +783,5 @@ var DialogProvider = ({ children }) => {
|
|
|
768
783
|
|
|
769
784
|
|
|
770
785
|
|
|
771
|
-
|
|
786
|
+
|
|
787
|
+
exports.clsControlPosition = clsControlPosition; exports.clsControlSubgridPosition = clsControlSubgridPosition; exports.controlPositionClass = controlPositionClass; exports.controlButtonColorVariable = controlButtonColorVariable; exports.controlButtonColorVariables = controlButtonColorVariables; exports.clsControlButton = clsControlButton; exports.ControlButton = ControlButton; exports.CheckboxControlButton = CheckboxControlButton; exports.LongPressableControlButton = LongPressableControlButton; exports.ControlButtonGroup = ControlButtonGroup; exports.ControlParagraph = ControlParagraph; exports.ControlLabel = ControlLabel; exports.ControlDetails = ControlDetails; exports.InputSpanningTitle = InputSpanningTitle; exports.DialogContext = DialogContext; exports.DialogTitle = DialogTitle; exports.DialogButtons = DialogButtons; exports.Dialog = Dialog; exports.DialogProvider = DialogProvider; exports.ControlDialogButtons = ControlDialogButtons; exports.ControlDialog = ControlDialog; exports.InputWithDelayedPropagation = InputWithDelayedPropagation; exports.ControlInput = ControlInput; exports.ControlPercent = ControlPercent; exports.ControlSelect = ControlSelect; exports.ControlColoredSelect = ControlColoredSelect; exports.ControlColorSelect = ControlColorSelect;
|
|
@@ -247,7 +247,7 @@ ControlParagraph.displayName = "ControlParagraph";
|
|
|
247
247
|
var ControlLabel = forwardRef2(
|
|
248
248
|
({ className, disabled, nonMicro, position = "label", subgrid, ...props }, ref) => {
|
|
249
249
|
return /* @__PURE__ */ jsx2(
|
|
250
|
-
"
|
|
250
|
+
"label",
|
|
251
251
|
{
|
|
252
252
|
...props,
|
|
253
253
|
ref,
|
|
@@ -507,19 +507,9 @@ var ControlSelect = ({
|
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
509
|
};
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
teal: { label: "Teal", value: "teal" },
|
|
514
|
-
green: { label: "Green", value: "green" },
|
|
515
|
-
yellow: { label: "Yellow", value: "yellow" },
|
|
516
|
-
purple: { label: "Purple", value: "purple" },
|
|
517
|
-
orange: { label: "Orange", value: "orange" },
|
|
518
|
-
brown: { label: "Brown", value: "brown" },
|
|
519
|
-
gray: { label: "Gray", value: "gray" }
|
|
520
|
-
};
|
|
521
|
-
var ControlColorSelect = ({
|
|
522
|
-
color,
|
|
510
|
+
var ControlColoredSelect = ({
|
|
511
|
+
options,
|
|
512
|
+
value,
|
|
523
513
|
onChange,
|
|
524
514
|
variant,
|
|
525
515
|
position,
|
|
@@ -527,13 +517,13 @@ var ControlColorSelect = ({
|
|
|
527
517
|
placeholder,
|
|
528
518
|
...props
|
|
529
519
|
}) => {
|
|
530
|
-
const
|
|
531
|
-
const selectedColor = sigilColorUsage(color
|
|
520
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
521
|
+
const selectedColor = sigilColorUsage(selectedOption?.color ?? "gray");
|
|
532
522
|
return /* @__PURE__ */ jsx5(
|
|
533
523
|
ControlSelect,
|
|
534
524
|
{
|
|
535
525
|
options,
|
|
536
|
-
value
|
|
526
|
+
value,
|
|
537
527
|
onChange,
|
|
538
528
|
triggerButton: (option) => /* @__PURE__ */ jsx5(
|
|
539
529
|
Select.Trigger,
|
|
@@ -587,7 +577,7 @@ var ControlColorSelect = ({
|
|
|
587
577
|
{
|
|
588
578
|
className: "",
|
|
589
579
|
style: {
|
|
590
|
-
color: `var(--sigil-usage-${option.
|
|
580
|
+
color: `var(--sigil-usage-${option.color}-foreground)`
|
|
591
581
|
},
|
|
592
582
|
children: option.label
|
|
593
583
|
}
|
|
@@ -599,6 +589,31 @@ var ControlColorSelect = ({
|
|
|
599
589
|
}
|
|
600
590
|
);
|
|
601
591
|
};
|
|
592
|
+
var COLOR_OPTIONS = {
|
|
593
|
+
red: { label: "Red", value: "red", color: "red" },
|
|
594
|
+
blue: { label: "Blue", value: "blue", color: "blue" },
|
|
595
|
+
teal: { label: "Teal", value: "teal", color: "teal" },
|
|
596
|
+
green: { label: "Green", value: "green", color: "green" },
|
|
597
|
+
yellow: { label: "Yellow", value: "yellow", color: "yellow" },
|
|
598
|
+
purple: { label: "Purple", value: "purple", color: "purple" },
|
|
599
|
+
orange: { label: "Orange", value: "orange", color: "orange" },
|
|
600
|
+
brown: { label: "Brown", value: "brown", color: "brown" },
|
|
601
|
+
gray: { label: "Gray", value: "gray", color: "gray" }
|
|
602
|
+
};
|
|
603
|
+
var COLOR_OPTIONS_ARRAY = Object.values(COLOR_OPTIONS);
|
|
604
|
+
var ControlColorSelect = ({
|
|
605
|
+
color,
|
|
606
|
+
...props
|
|
607
|
+
}) => {
|
|
608
|
+
return /* @__PURE__ */ jsx5(
|
|
609
|
+
ControlColoredSelect,
|
|
610
|
+
{
|
|
611
|
+
options: COLOR_OPTIONS_ARRAY,
|
|
612
|
+
value: color,
|
|
613
|
+
...props
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
};
|
|
602
617
|
|
|
603
618
|
// src/frontend/dialogs.tsx
|
|
604
619
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -767,5 +782,6 @@ export {
|
|
|
767
782
|
ControlInput,
|
|
768
783
|
ControlPercent,
|
|
769
784
|
ControlSelect,
|
|
785
|
+
ControlColoredSelect,
|
|
770
786
|
ControlColorSelect
|
|
771
787
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk5CAFJT5Tcjs = require('../chunk-5CAFJT5T.cjs');
|
|
5
5
|
require('../chunk-PEARNJ5G.cjs');
|
|
6
6
|
require('../chunk-RI33QVOD.cjs');
|
|
7
7
|
require('../chunk-TZJ4UXR3.cjs');
|
|
@@ -35,7 +35,7 @@ var AppearanceSwitcher = ({
|
|
|
35
35
|
);
|
|
36
36
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "control-grid-pos-all flex flex-wrap items-stretch gap-2", children: [
|
|
37
37
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
38
|
-
|
|
38
|
+
_chunk5CAFJT5Tcjs.ControlButton,
|
|
39
39
|
{
|
|
40
40
|
onClick: selectDarkMode,
|
|
41
41
|
active: colorSchemePreference === "dark",
|
|
@@ -48,7 +48,7 @@ var AppearanceSwitcher = ({
|
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
51
|
-
|
|
51
|
+
_chunk5CAFJT5Tcjs.ControlButton,
|
|
52
52
|
{
|
|
53
53
|
onClick: selectLightMode,
|
|
54
54
|
active: colorSchemePreference === "light",
|
|
@@ -61,7 +61,7 @@ var AppearanceSwitcher = ({
|
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
64
|
-
|
|
64
|
+
_chunk5CAFJT5Tcjs.ControlButton,
|
|
65
65
|
{
|
|
66
66
|
onClick: selectSystemMode,
|
|
67
67
|
active: colorSchemePreference === "auto",
|
|
@@ -74,7 +74,7 @@ var AppearanceSwitcher = ({
|
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
76
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
77
|
-
|
|
77
|
+
_chunk5CAFJT5Tcjs.ControlColorSelect,
|
|
78
78
|
{
|
|
79
79
|
color,
|
|
80
80
|
onChange: updateHintColor,
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
var _chunk5CAFJT5Tcjs = require('../../chunk-5CAFJT5T.cjs');
|
|
24
25
|
require('../../chunk-PEARNJ5G.cjs');
|
|
25
26
|
require('../../chunk-RI33QVOD.cjs');
|
|
26
27
|
require('../../chunk-TZJ4UXR3.cjs');
|
|
@@ -46,4 +47,5 @@ require('../../chunk-TZJ4UXR3.cjs');
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
exports.CheckboxControlButton = _chunk5CAFJT5Tcjs.CheckboxControlButton; exports.ControlButton = _chunk5CAFJT5Tcjs.ControlButton; exports.ControlButtonGroup = _chunk5CAFJT5Tcjs.ControlButtonGroup; exports.ControlColorSelect = _chunk5CAFJT5Tcjs.ControlColorSelect; exports.ControlColoredSelect = _chunk5CAFJT5Tcjs.ControlColoredSelect; exports.ControlDetails = _chunk5CAFJT5Tcjs.ControlDetails; exports.ControlDialog = _chunk5CAFJT5Tcjs.ControlDialog; exports.ControlDialogButtons = _chunk5CAFJT5Tcjs.ControlDialogButtons; exports.ControlInput = _chunk5CAFJT5Tcjs.ControlInput; exports.ControlLabel = _chunk5CAFJT5Tcjs.ControlLabel; exports.ControlParagraph = _chunk5CAFJT5Tcjs.ControlParagraph; exports.ControlPercent = _chunk5CAFJT5Tcjs.ControlPercent; exports.ControlSelect = _chunk5CAFJT5Tcjs.ControlSelect; exports.InputSpanningTitle = _chunk5CAFJT5Tcjs.InputSpanningTitle; exports.InputWithDelayedPropagation = _chunk5CAFJT5Tcjs.InputWithDelayedPropagation; exports.LongPressableControlButton = _chunk5CAFJT5Tcjs.LongPressableControlButton; exports.clsControlButton = _chunk5CAFJT5Tcjs.clsControlButton; exports.clsControlPosition = _chunk5CAFJT5Tcjs.clsControlPosition; exports.clsControlSubgridPosition = _chunk5CAFJT5Tcjs.clsControlSubgridPosition; exports.controlButtonColorVariable = _chunk5CAFJT5Tcjs.controlButtonColorVariable; exports.controlButtonColorVariables = _chunk5CAFJT5Tcjs.controlButtonColorVariables; exports.controlPositionClass = _chunk5CAFJT5Tcjs.controlPositionClass;
|
|
@@ -86,18 +86,18 @@ declare const ControlParagraph: react.ForwardRefExoticComponent<Omit<react.Detai
|
|
|
86
86
|
position?: ControlPosition;
|
|
87
87
|
mode?: ControlParagraphMode;
|
|
88
88
|
} & react.RefAttributes<HTMLParagraphElement>>;
|
|
89
|
-
type ControlLabelProps = ComponentPropsWithoutRef<'
|
|
89
|
+
type ControlLabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
90
90
|
subgrid?: boolean;
|
|
91
91
|
position?: ControlPosition;
|
|
92
92
|
disabled?: boolean;
|
|
93
93
|
nonMicro?: boolean;
|
|
94
94
|
};
|
|
95
|
-
declare const ControlLabel: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.
|
|
95
|
+
declare const ControlLabel: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
96
96
|
subgrid?: boolean;
|
|
97
97
|
position?: ControlPosition;
|
|
98
98
|
disabled?: boolean;
|
|
99
99
|
nonMicro?: boolean;
|
|
100
|
-
} & react.RefAttributes<
|
|
100
|
+
} & react.RefAttributes<HTMLLabelElement>>;
|
|
101
101
|
type ControlDetailsProps = ComponentPropsWithoutRef<'div'> & {
|
|
102
102
|
position?: ControlPosition;
|
|
103
103
|
align?: 'start' | 'center' | 'end';
|
|
@@ -146,13 +146,13 @@ type SelectOption<T> = {
|
|
|
146
146
|
*/
|
|
147
147
|
active?: boolean;
|
|
148
148
|
};
|
|
149
|
-
type SelectProps<T extends string | null
|
|
150
|
-
options:
|
|
149
|
+
type SelectProps<T extends string | null, O extends SelectOption<T>> = {
|
|
150
|
+
options: O[];
|
|
151
151
|
value: T | '';
|
|
152
152
|
onChange: (value: T) => void;
|
|
153
|
-
triggerText?: (option:
|
|
154
|
-
triggerButton?: (option: null |
|
|
155
|
-
option?: (option:
|
|
153
|
+
triggerText?: (option: O) => ReactNode;
|
|
154
|
+
triggerButton?: (option: null | O) => ReactNode;
|
|
155
|
+
option?: (option: O) => ReactNode;
|
|
156
156
|
variant: ControlButtonVariant;
|
|
157
157
|
position?: ControlPosition;
|
|
158
158
|
disabled?: boolean;
|
|
@@ -160,11 +160,15 @@ type SelectProps<T extends string | null> = {
|
|
|
160
160
|
placeholder?: ReactNode;
|
|
161
161
|
triggerClassName?: string;
|
|
162
162
|
};
|
|
163
|
-
declare const ControlSelect: <T extends string | null>({ options, value, onChange, triggerText, triggerButton, option, variant, position, disabled, tooltip, placeholder, triggerClassName: className, }: SelectProps<T>) => react_jsx_runtime.JSX.Element;
|
|
163
|
+
declare const ControlSelect: <T extends string | null, O extends SelectOption<T> = SelectOption<T>>({ options, value, onChange, triggerText, triggerButton, option, variant, position, disabled, tooltip, placeholder, triggerClassName: className, }: SelectProps<T, O>) => react_jsx_runtime.JSX.Element;
|
|
164
|
+
type SigilOptionWithColor<T> = SelectOption<T> & {
|
|
165
|
+
color: SigilColor;
|
|
166
|
+
};
|
|
167
|
+
type ControlColoredSelectProps<T extends string | null, O extends SigilOptionWithColor<T>> = SelectProps<T, O>;
|
|
168
|
+
declare const ControlColoredSelect: <T extends string | null, O extends SigilOptionWithColor<T> = SigilOptionWithColor<T>>({ options, value, onChange, variant, position, disabled, placeholder, ...props }: ControlColoredSelectProps<T, O>) => react_jsx_runtime.JSX.Element;
|
|
164
169
|
type ControlColorSelectProps = {
|
|
165
170
|
color: SigilColor | '';
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
declare const ControlColorSelect: ({ color, onChange, variant, position, disabled, placeholder, ...props }: ControlColorSelectProps) => react_jsx_runtime.JSX.Element;
|
|
171
|
+
} & Omit<ControlColoredSelectProps<SigilColor, SigilOptionWithColor<SigilColor>>, 'value' | 'options'>;
|
|
172
|
+
declare const ControlColorSelect: ({ color, ...props }: ControlColorSelectProps) => react_jsx_runtime.JSX.Element;
|
|
169
173
|
|
|
170
|
-
export { CheckboxControlButton, type CheckboxControlButtonProps, ControlButton, ControlButtonGroup, type ControlButtonGroupProps, type ControlButtonProps, type ControlButtonVariant, ControlColorSelect, ControlDetails, type ControlDetailsProps, ControlDialog, ControlDialogButtons, ControlInput, type ControlInputProps, ControlLabel, type ControlLabelProps, ControlParagraph, type ControlParagraphMode, type ControlParagraphProps, ControlPercent, type ControlPercentProps, type ControlPosition, ControlSelect, InputSpanningTitle, type InputSpanningTitleProps, InputWithDelayedPropagation, LongPressableControlButton, type LongPressableControlButtonProps, type SelectOption, clsControlButton, clsControlPosition, clsControlSubgridPosition, controlButtonColorVariable, controlButtonColorVariables, controlPositionClass };
|
|
174
|
+
export { CheckboxControlButton, type CheckboxControlButtonProps, ControlButton, ControlButtonGroup, type ControlButtonGroupProps, type ControlButtonProps, type ControlButtonVariant, ControlColorSelect, ControlColoredSelect, ControlDetails, type ControlDetailsProps, ControlDialog, ControlDialogButtons, ControlInput, type ControlInputProps, ControlLabel, type ControlLabelProps, ControlParagraph, type ControlParagraphMode, type ControlParagraphProps, ControlPercent, type ControlPercentProps, type ControlPosition, ControlSelect, InputSpanningTitle, type InputSpanningTitleProps, InputWithDelayedPropagation, LongPressableControlButton, type LongPressableControlButtonProps, type SelectOption, clsControlButton, clsControlPosition, clsControlSubgridPosition, controlButtonColorVariable, controlButtonColorVariables, controlPositionClass };
|
|
@@ -86,18 +86,18 @@ declare const ControlParagraph: react.ForwardRefExoticComponent<Omit<react.Detai
|
|
|
86
86
|
position?: ControlPosition;
|
|
87
87
|
mode?: ControlParagraphMode;
|
|
88
88
|
} & react.RefAttributes<HTMLParagraphElement>>;
|
|
89
|
-
type ControlLabelProps = ComponentPropsWithoutRef<'
|
|
89
|
+
type ControlLabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
90
90
|
subgrid?: boolean;
|
|
91
91
|
position?: ControlPosition;
|
|
92
92
|
disabled?: boolean;
|
|
93
93
|
nonMicro?: boolean;
|
|
94
94
|
};
|
|
95
|
-
declare const ControlLabel: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.
|
|
95
|
+
declare const ControlLabel: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
96
96
|
subgrid?: boolean;
|
|
97
97
|
position?: ControlPosition;
|
|
98
98
|
disabled?: boolean;
|
|
99
99
|
nonMicro?: boolean;
|
|
100
|
-
} & react.RefAttributes<
|
|
100
|
+
} & react.RefAttributes<HTMLLabelElement>>;
|
|
101
101
|
type ControlDetailsProps = ComponentPropsWithoutRef<'div'> & {
|
|
102
102
|
position?: ControlPosition;
|
|
103
103
|
align?: 'start' | 'center' | 'end';
|
|
@@ -146,13 +146,13 @@ type SelectOption<T> = {
|
|
|
146
146
|
*/
|
|
147
147
|
active?: boolean;
|
|
148
148
|
};
|
|
149
|
-
type SelectProps<T extends string | null
|
|
150
|
-
options:
|
|
149
|
+
type SelectProps<T extends string | null, O extends SelectOption<T>> = {
|
|
150
|
+
options: O[];
|
|
151
151
|
value: T | '';
|
|
152
152
|
onChange: (value: T) => void;
|
|
153
|
-
triggerText?: (option:
|
|
154
|
-
triggerButton?: (option: null |
|
|
155
|
-
option?: (option:
|
|
153
|
+
triggerText?: (option: O) => ReactNode;
|
|
154
|
+
triggerButton?: (option: null | O) => ReactNode;
|
|
155
|
+
option?: (option: O) => ReactNode;
|
|
156
156
|
variant: ControlButtonVariant;
|
|
157
157
|
position?: ControlPosition;
|
|
158
158
|
disabled?: boolean;
|
|
@@ -160,11 +160,15 @@ type SelectProps<T extends string | null> = {
|
|
|
160
160
|
placeholder?: ReactNode;
|
|
161
161
|
triggerClassName?: string;
|
|
162
162
|
};
|
|
163
|
-
declare const ControlSelect: <T extends string | null>({ options, value, onChange, triggerText, triggerButton, option, variant, position, disabled, tooltip, placeholder, triggerClassName: className, }: SelectProps<T>) => react_jsx_runtime.JSX.Element;
|
|
163
|
+
declare const ControlSelect: <T extends string | null, O extends SelectOption<T> = SelectOption<T>>({ options, value, onChange, triggerText, triggerButton, option, variant, position, disabled, tooltip, placeholder, triggerClassName: className, }: SelectProps<T, O>) => react_jsx_runtime.JSX.Element;
|
|
164
|
+
type SigilOptionWithColor<T> = SelectOption<T> & {
|
|
165
|
+
color: SigilColor;
|
|
166
|
+
};
|
|
167
|
+
type ControlColoredSelectProps<T extends string | null, O extends SigilOptionWithColor<T>> = SelectProps<T, O>;
|
|
168
|
+
declare const ControlColoredSelect: <T extends string | null, O extends SigilOptionWithColor<T> = SigilOptionWithColor<T>>({ options, value, onChange, variant, position, disabled, placeholder, ...props }: ControlColoredSelectProps<T, O>) => react_jsx_runtime.JSX.Element;
|
|
164
169
|
type ControlColorSelectProps = {
|
|
165
170
|
color: SigilColor | '';
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
declare const ControlColorSelect: ({ color, onChange, variant, position, disabled, placeholder, ...props }: ControlColorSelectProps) => react_jsx_runtime.JSX.Element;
|
|
171
|
+
} & Omit<ControlColoredSelectProps<SigilColor, SigilOptionWithColor<SigilColor>>, 'value' | 'options'>;
|
|
172
|
+
declare const ControlColorSelect: ({ color, ...props }: ControlColorSelectProps) => react_jsx_runtime.JSX.Element;
|
|
169
173
|
|
|
170
|
-
export { CheckboxControlButton, type CheckboxControlButtonProps, ControlButton, ControlButtonGroup, type ControlButtonGroupProps, type ControlButtonProps, type ControlButtonVariant, ControlColorSelect, ControlDetails, type ControlDetailsProps, ControlDialog, ControlDialogButtons, ControlInput, type ControlInputProps, ControlLabel, type ControlLabelProps, ControlParagraph, type ControlParagraphMode, type ControlParagraphProps, ControlPercent, type ControlPercentProps, type ControlPosition, ControlSelect, InputSpanningTitle, type InputSpanningTitleProps, InputWithDelayedPropagation, LongPressableControlButton, type LongPressableControlButtonProps, type SelectOption, clsControlButton, clsControlPosition, clsControlSubgridPosition, controlButtonColorVariable, controlButtonColorVariables, controlPositionClass };
|
|
174
|
+
export { CheckboxControlButton, type CheckboxControlButtonProps, ControlButton, ControlButtonGroup, type ControlButtonGroupProps, type ControlButtonProps, type ControlButtonVariant, ControlColorSelect, ControlColoredSelect, ControlDetails, type ControlDetailsProps, ControlDialog, ControlDialogButtons, ControlInput, type ControlInputProps, ControlLabel, type ControlLabelProps, ControlParagraph, type ControlParagraphMode, type ControlParagraphProps, ControlPercent, type ControlPercentProps, type ControlPosition, ControlSelect, InputSpanningTitle, type InputSpanningTitleProps, InputWithDelayedPropagation, LongPressableControlButton, type LongPressableControlButtonProps, type SelectOption, clsControlButton, clsControlPosition, clsControlSubgridPosition, controlButtonColorVariable, controlButtonColorVariables, controlPositionClass };
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ControlButton,
|
|
4
4
|
ControlButtonGroup,
|
|
5
5
|
ControlColorSelect,
|
|
6
|
+
ControlColoredSelect,
|
|
6
7
|
ControlDetails,
|
|
7
8
|
ControlDialog,
|
|
8
9
|
ControlDialogButtons,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
controlButtonColorVariable,
|
|
21
22
|
controlButtonColorVariables,
|
|
22
23
|
controlPositionClass
|
|
23
|
-
} from "../../chunk-
|
|
24
|
+
} from "../../chunk-LKKN6DFB.js";
|
|
24
25
|
import "../../chunk-BIY5HAXP.js";
|
|
25
26
|
import "../../chunk-4PMRDURG.js";
|
|
26
27
|
import "../../chunk-WYUGJOEB.js";
|
|
@@ -29,6 +30,7 @@ export {
|
|
|
29
30
|
ControlButton,
|
|
30
31
|
ControlButtonGroup,
|
|
31
32
|
ControlColorSelect,
|
|
33
|
+
ControlColoredSelect,
|
|
32
34
|
ControlDetails,
|
|
33
35
|
ControlDialog,
|
|
34
36
|
ControlDialogButtons,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk5CAFJT5Tcjs = require('../chunk-5CAFJT5T.cjs');
|
|
8
8
|
require('../chunk-PEARNJ5G.cjs');
|
|
9
9
|
require('../chunk-RI33QVOD.cjs');
|
|
10
10
|
require('../chunk-TZJ4UXR3.cjs');
|
|
@@ -14,4 +14,4 @@ require('../chunk-TZJ4UXR3.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Dialog =
|
|
17
|
+
exports.Dialog = _chunk5CAFJT5Tcjs.Dialog; exports.DialogButtons = _chunk5CAFJT5Tcjs.DialogButtons; exports.DialogContext = _chunk5CAFJT5Tcjs.DialogContext; exports.DialogProvider = _chunk5CAFJT5Tcjs.DialogProvider; exports.DialogTitle = _chunk5CAFJT5Tcjs.DialogTitle;
|
package/dist/frontend/dialogs.js
CHANGED
package/dist/frontend.cjs
CHANGED
|
@@ -16,7 +16,7 @@ var _chunkCAYKPJIXcjs = require('./chunk-CAYKPJIX.cjs');
|
|
|
16
16
|
var _chunkVZ4A6RRTcjs = require('./chunk-VZ4A6RRT.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk5CAFJT5Tcjs = require('./chunk-5CAFJT5T.cjs');
|
|
20
20
|
require('./chunk-PEARNJ5G.cjs');
|
|
21
21
|
require('./chunk-RI33QVOD.cjs');
|
|
22
22
|
|
|
@@ -242,7 +242,7 @@ var Debugger = ({ title, className }) => {
|
|
|
242
242
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "grow px-1", children: title }),
|
|
243
243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkA5LYYZERcjs.ToolbarDivider, {}),
|
|
244
244
|
openDevTools && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
245
|
-
|
|
245
|
+
_chunk5CAFJT5Tcjs.ControlButton,
|
|
246
246
|
{
|
|
247
247
|
onClick: openDevTools,
|
|
248
248
|
variant: "toolbar",
|
|
@@ -251,7 +251,7 @@ var Debugger = ({ title, className }) => {
|
|
|
251
251
|
}
|
|
252
252
|
),
|
|
253
253
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
254
|
-
|
|
254
|
+
_chunk5CAFJT5Tcjs.ControlButton,
|
|
255
255
|
{
|
|
256
256
|
onClick: handleRequestScrollToBottom,
|
|
257
257
|
variant: "toolbar",
|
|
@@ -259,7 +259,7 @@ var Debugger = ({ title, className }) => {
|
|
|
259
259
|
children: "Scroll to Bottom"
|
|
260
260
|
}
|
|
261
261
|
),
|
|
262
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
262
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5CAFJT5Tcjs.ControlButton, { onClick: exportLogs, variant: "toolbar", icon: "publish", children: "Export Logs" })
|
|
263
263
|
] }) }),
|
|
264
264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
265
265
|
"pre",
|
package/dist/frontend.js
CHANGED