@adea-ai/ui 0.110.0 → 0.111.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/dist/components/composites/account-menu/account-menu.js +1 -1
- package/dist/components/composites/action-button/action-button.js +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +17 -2
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +47 -122
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +0 -4
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +60 -68
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/index.js +1 -1
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +5 -2
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts.map +1 -1
- package/dist/components/theme/appearance-panel.js +0 -3
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +2 -2
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.js +1 -1
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +2 -2
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +17 -11
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/drawer/drawer.js +1 -1
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +22 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +79 -30
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
- package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar/menubar.js +2 -2
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts +7 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.js +34 -20
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/sheet/sheet.js +1 -1
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts +16 -6
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +17 -6
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/overlay.d.ts +30 -1
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +37 -2
- package/dist/lib/overlay.js.map +1 -1
- package/dist/r/dialog.json +1 -0
- package/dist/r/registry.json +2 -1
- package/dist/r/split-layout.json +1 -1
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +4 -3
- package/dist/r/src/components/theme/appearance-panel.tsx +0 -1
- package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
- package/dist/r/src/components/ui/combobox/combobox.tsx +3 -1
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +6 -2
- package/dist/r/src/components/ui/dialog/dialog.tsx +19 -12
- package/dist/r/src/components/ui/drawer/drawer.tsx +1 -1
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
- package/dist/r/src/components/ui/dropdown-menu/index.ts +1 -0
- package/dist/r/src/components/ui/menubar/menubar.tsx +6 -2
- package/dist/r/src/components/ui/select/index.ts +1 -0
- package/dist/r/src/components/ui/select/select.tsx +31 -6
- package/dist/r/src/components/ui/sheet/sheet.tsx +1 -1
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +34 -3
- package/dist/r/src/lib/overlay.ts +45 -1
- package/package.json +1 -1
- package/registry.json +2 -1
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
- package/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
- package/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
- package/src/components/layout/split-layout/split-layout.tsx +4 -3
- package/src/components/theme/appearance-panel.tsx +0 -1
- package/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
- package/src/components/ui/combobox/combobox.tsx +3 -1
- package/src/components/ui/context-menu/context-menu.tsx +6 -2
- package/src/components/ui/dialog/dialog.tsx +19 -12
- package/src/components/ui/drawer/drawer.tsx +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
- package/src/components/ui/dropdown-menu/index.ts +1 -0
- package/src/components/ui/menubar/menubar.tsx +6 -2
- package/src/components/ui/select/index.ts +1 -0
- package/src/components/ui/select/select.tsx +31 -6
- package/src/components/ui/sheet/sheet.tsx +1 -1
- package/src/components/ui/tooltip/tooltip.tsx +34 -3
- package/src/lib/overlay.ts +45 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
2
|
import { Button } from "../../ui/button/button.js";
|
|
3
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../ui/dropdown-menu/dropdown-menu.js";
|
|
4
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip/tooltip.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../ui/dropdown-menu/dropdown-menu.js";
|
|
5
5
|
import { SideRailButton } from "../../layout/side-rail/side-rail.js";
|
|
6
6
|
import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
|
|
7
7
|
import { CircleHelp, Info, LogIn, LogOut, Megaphone, RefreshCw, Settings2, Smartphone, UserRound } from "lucide-solid";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "../../ui/button/button.js";
|
|
2
|
-
import { Spinner } from "../../ui/spinner/spinner.js";
|
|
3
2
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip/tooltip.js";
|
|
3
|
+
import { Spinner } from "../../ui/spinner/spinner.js";
|
|
4
4
|
import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
|
|
5
5
|
import { Show, createSignal, splitProps } from "solid-js";
|
|
6
6
|
//#region src/components/composites/action-button/action-button.tsx
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const PRIMARY_ACCENT_IDS: readonly ["blue", "green", "amber", "cyan", "pink"];
|
|
2
1
|
type AccentOption = Readonly<{
|
|
3
2
|
id: string;
|
|
4
3
|
label: string;
|
|
@@ -7,10 +6,26 @@ type AccentOption = Readonly<{
|
|
|
7
6
|
}>;
|
|
8
7
|
type AccentSwatchGroupsProps = {
|
|
9
8
|
accentOptions: readonly AccentOption[];
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Accepted for host compatibility and no longer rendered. The picker offers
|
|
11
|
+
* one theme-scoped group — the theme's own primary followed by the presets —
|
|
12
|
+
* instead of splitting additional presets and the theme pair's accent slots
|
|
13
|
+
* into labelled groups of their own. A stored theme-accent id still resolves
|
|
14
|
+
* (`resolveAccentPreset`) and is still described by the row; it is just no
|
|
15
|
+
* longer offered as a swatch, and a host can stop feeding this list.
|
|
16
|
+
*/
|
|
17
|
+
themeAccentOptions?: readonly AccentOption[];
|
|
11
18
|
resolvedAppearance: 'light' | 'dark';
|
|
12
19
|
themeDefaultColor: string;
|
|
13
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* The accent choices, as ONE group: the theme's own primary first, then every
|
|
23
|
+
* preset the host feeds, each painted with its value for the resolved
|
|
24
|
+
* appearance — which is what makes the group theme-scoped rather than a
|
|
25
|
+
* catalogue table. The custom-color entry is the host's (`AccentChoices`
|
|
26
|
+
* renders it beside this grid), because whether a free-form colour is accepted
|
|
27
|
+
* is the host's validation to own.
|
|
28
|
+
*/
|
|
14
29
|
export declare function AccentSwatchGroups(props: AccentSwatchGroupsProps): import("solid-js").JSX.Element;
|
|
15
30
|
export {};
|
|
16
31
|
//# sourceMappingURL=accent-swatch-groups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accent-swatch-groups.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/accent-swatch-groups.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accent-swatch-groups.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/accent-swatch-groups.tsx"],"names":[],"mappings":"AA0BA,KAAK,YAAY,GAAG,QAAQ,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,KAAK,uBAAuB,GAAG;IAC7B,aAAa,EAAE,SAAS,YAAY,EAAE,CAAA;IACtC;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAC5C,kBAAkB,EAAE,OAAO,GAAG,MAAM,CAAA;IACpC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,kCAiBhE"}
|
|
@@ -1,111 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { For, Show } from "solid-js";
|
|
1
|
+
import { createComponent, effect, insert, setStyleProperty, template } from "solid-js/web";
|
|
2
|
+
import { For } from "solid-js";
|
|
4
3
|
import { RadioGroup } from "@kobalte/core/radio-group";
|
|
5
4
|
//#region src/components/composites/appearance-editor/accent-swatch-groups.tsx
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/ template(`<div class="grid grid-cols-
|
|
7
|
-
var _tmpl$2 = /*#__PURE__*/ template(`<
|
|
8
|
-
var _tmpl$3 = /*#__PURE__*/ template(`<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
];
|
|
18
|
-
var primaryAccentIds = new Set(PRIMARY_ACCENT_IDS);
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class="grid grid-cols-4 gap-2"data-accent-grid>`);
|
|
6
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<span class="block size-full rounded-full"aria-hidden=true>`);
|
|
7
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<span class=sr-only>`);
|
|
8
|
+
/**
|
|
9
|
+
* The accent choices, as ONE group: the theme's own primary first, then every
|
|
10
|
+
* preset the host feeds, each painted with its value for the resolved
|
|
11
|
+
* appearance — which is what makes the group theme-scoped rather than a
|
|
12
|
+
* catalogue table. The custom-color entry is the host's (`AccentChoices`
|
|
13
|
+
* renders it beside this grid), because whether a free-form colour is accepted
|
|
14
|
+
* is the host's validation to own.
|
|
15
|
+
*/
|
|
19
16
|
function AccentSwatchGroups(props) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
insert(_el$, createComponent(AccentSwatch, {
|
|
29
|
-
id: "theme",
|
|
30
|
-
label: "Theme default",
|
|
31
|
-
get color() {
|
|
32
|
-
return props.themeDefaultColor;
|
|
33
|
-
},
|
|
34
|
-
group: "primary"
|
|
35
|
-
}), null);
|
|
36
|
-
insert(_el$, createComponent(For, {
|
|
37
|
-
get each() {
|
|
38
|
-
return primaryAccents();
|
|
39
|
-
},
|
|
40
|
-
children: (option) => createComponent(AccentSwatch, {
|
|
41
|
-
get id() {
|
|
42
|
-
return option.id;
|
|
43
|
-
},
|
|
44
|
-
get label() {
|
|
45
|
-
return option.label;
|
|
46
|
-
},
|
|
47
|
-
get color() {
|
|
48
|
-
return (props.resolvedAppearance === "light" ? option.light : option.dark) ?? "";
|
|
49
|
-
},
|
|
50
|
-
group: "primary"
|
|
51
|
-
})
|
|
52
|
-
}), null);
|
|
53
|
-
return _el$;
|
|
54
|
-
})(),
|
|
55
|
-
createComponent(Show, {
|
|
56
|
-
get when() {
|
|
57
|
-
return additionalAccents().length > 0;
|
|
58
|
-
},
|
|
59
|
-
get children() {
|
|
60
|
-
var _el$2 = _tmpl$2(), _el$4 = _el$2.firstChild.nextSibling;
|
|
61
|
-
insert(_el$4, createComponent(For, {
|
|
62
|
-
get each() {
|
|
63
|
-
return additionalAccents();
|
|
64
|
-
},
|
|
65
|
-
children: (option) => createComponent(AccentSwatch, {
|
|
66
|
-
get id() {
|
|
67
|
-
return option.id;
|
|
68
|
-
},
|
|
69
|
-
get label() {
|
|
70
|
-
return option.label;
|
|
71
|
-
},
|
|
72
|
-
get color() {
|
|
73
|
-
return (props.resolvedAppearance === "light" ? option.light : option.dark) ?? "";
|
|
74
|
-
},
|
|
75
|
-
group: "additional"
|
|
76
|
-
})
|
|
77
|
-
}));
|
|
78
|
-
return _el$2;
|
|
17
|
+
const presets = () => props.accentOptions.filter((option) => option.id !== "theme");
|
|
18
|
+
return (() => {
|
|
19
|
+
var _el$ = _tmpl$();
|
|
20
|
+
insert(_el$, createComponent(AccentSwatch, {
|
|
21
|
+
id: "theme",
|
|
22
|
+
label: "Theme default",
|
|
23
|
+
get color() {
|
|
24
|
+
return props.themeDefaultColor;
|
|
79
25
|
}
|
|
80
|
-
}),
|
|
81
|
-
createComponent(
|
|
82
|
-
get
|
|
83
|
-
return
|
|
26
|
+
}), null);
|
|
27
|
+
insert(_el$, createComponent(For, {
|
|
28
|
+
get each() {
|
|
29
|
+
return presets();
|
|
84
30
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return (props.resolvedAppearance === "light" ? option.light : option.dark) ?? "";
|
|
100
|
-
},
|
|
101
|
-
group: "theme",
|
|
102
|
-
dashed: true
|
|
103
|
-
})
|
|
104
|
-
}));
|
|
105
|
-
return _el$5;
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
];
|
|
31
|
+
children: (option) => createComponent(AccentSwatch, {
|
|
32
|
+
get id() {
|
|
33
|
+
return option.id;
|
|
34
|
+
},
|
|
35
|
+
get label() {
|
|
36
|
+
return option.label;
|
|
37
|
+
},
|
|
38
|
+
get color() {
|
|
39
|
+
return (props.resolvedAppearance === "light" ? option.light : option.dark) ?? "";
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
}), null);
|
|
43
|
+
return _el$;
|
|
44
|
+
})();
|
|
109
45
|
}
|
|
110
46
|
function AccentSwatch(props) {
|
|
111
47
|
return createComponent(RadioGroup.Item, {
|
|
@@ -115,30 +51,19 @@ function AccentSwatch(props) {
|
|
|
115
51
|
get ["data-accent-option"]() {
|
|
116
52
|
return props.id;
|
|
117
53
|
},
|
|
118
|
-
get ["data-primary-accent"]() {
|
|
119
|
-
return memo(() => props.group === "primary")() ? props.id : void 0;
|
|
120
|
-
},
|
|
121
|
-
get ["data-additional-accent"]() {
|
|
122
|
-
return memo(() => props.group === "additional")() ? props.id : void 0;
|
|
123
|
-
},
|
|
124
|
-
get ["data-theme-accent"]() {
|
|
125
|
-
return memo(() => props.group === "theme")() ? props.id : void 0;
|
|
126
|
-
},
|
|
127
54
|
"class": "rounded-full focus-within:ring-3 focus-within:ring-ring/50",
|
|
128
55
|
get children() {
|
|
129
56
|
return [createComponent(RadioGroup.ItemInput, {}), createComponent(RadioGroup.ItemLabel, {
|
|
130
|
-
|
|
131
|
-
return cn("block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary", { "border-dashed data-[checked]:border-solid": props.dashed });
|
|
132
|
-
},
|
|
57
|
+
"class": "block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary",
|
|
133
58
|
get children() {
|
|
134
59
|
return [(() => {
|
|
135
|
-
var _el$
|
|
136
|
-
effect((_$p) => setStyleProperty(_el$
|
|
137
|
-
return _el$
|
|
60
|
+
var _el$2 = _tmpl$2();
|
|
61
|
+
effect((_$p) => setStyleProperty(_el$2, "background-color", props.color));
|
|
62
|
+
return _el$2;
|
|
138
63
|
})(), (() => {
|
|
139
|
-
var _el$
|
|
140
|
-
insert(_el$
|
|
141
|
-
return _el$
|
|
64
|
+
var _el$3 = _tmpl$3();
|
|
65
|
+
insert(_el$3, () => props.label);
|
|
66
|
+
return _el$3;
|
|
142
67
|
})()];
|
|
143
68
|
}
|
|
144
69
|
})];
|
|
@@ -146,6 +71,6 @@ function AccentSwatch(props) {
|
|
|
146
71
|
});
|
|
147
72
|
}
|
|
148
73
|
//#endregion
|
|
149
|
-
export { AccentSwatchGroups
|
|
74
|
+
export { AccentSwatchGroups };
|
|
150
75
|
|
|
151
76
|
//# sourceMappingURL=accent-swatch-groups.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accent-swatch-groups.js","names":["RadioGroup","Radio","For","
|
|
1
|
+
{"version":3,"file":"accent-swatch-groups.js","names":["RadioGroup","Radio","For","AccentOption","Readonly","id","label","light","dark","AccentSwatchGroupsProps","accentOptions","themeAccentOptions","resolvedAppearance","themeDefaultColor","AccentSwatchGroups","props","presets","filter","option","_el$","_tmpl$","_$insert","_$createComponent","AccentSwatch","color","each","children","Item","value","data-accent-option","ItemInput","ItemLabel","_el$2","_tmpl$2","_$effect","_$p","_$setStyleProperty","_el$3","_tmpl$3","_$createComponent","Radio","_$setStyleProperty"],"sources":["../../../../src/components/composites/appearance-editor/accent-swatch-groups.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { For } from 'solid-js'\n\ntype AccentOption = Readonly<{\n id: string\n label: string\n light?: string\n dark?: string\n}>\n\ntype AccentSwatchGroupsProps = {\n accentOptions: readonly AccentOption[]\n /**\n * Accepted for host compatibility and no longer rendered. The picker offers\n * one theme-scoped group — the theme's own primary followed by the presets —\n * instead of splitting additional presets and the theme pair's accent slots\n * into labelled groups of their own. A stored theme-accent id still resolves\n * (`resolveAccentPreset`) and is still described by the row; it is just no\n * longer offered as a swatch, and a host can stop feeding this list.\n */\n themeAccentOptions?: readonly AccentOption[]\n resolvedAppearance: 'light' | 'dark'\n themeDefaultColor: string\n}\n\n/**\n * The accent choices, as ONE group: the theme's own primary first, then every\n * preset the host feeds, each painted with its value for the resolved\n * appearance — which is what makes the group theme-scoped rather than a\n * catalogue table. The custom-color entry is the host's (`AccentChoices`\n * renders it beside this grid), because whether a free-form colour is accepted\n * is the host's validation to own.\n */\nexport function AccentSwatchGroups(props: AccentSwatchGroupsProps) {\n const presets = () => props.accentOptions.filter((option) => option.id !== 'theme')\n\n return (\n <div class=\"grid grid-cols-4 gap-2\" data-accent-grid>\n <AccentSwatch id=\"theme\" label=\"Theme default\" color={props.themeDefaultColor} />\n <For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n />\n )}\n </For>\n </div>\n )\n}\n\nfunction AccentSwatch(props: { id: string; label: string; color: string }) {\n return (\n <Radio.Item\n value={props.id}\n data-accent-option={props.id}\n class=\"rounded-full focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n <span class=\"sr-only\">{props.label}</span>\n </Radio.ItemLabel>\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AAA,EAAA,CAAA,CAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAI1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAa/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,kCAyCvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAOpE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAa/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,kCAyCvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAOpE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,kCAwCzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,kCA6BxD"}
|
|
@@ -114,7 +114,6 @@ function isCustomAccent(props) {
|
|
|
114
114
|
}
|
|
115
115
|
function AccentChoices(props) {
|
|
116
116
|
const resolvedAppearance = () => props.draft.mode === "system" ? props.resolvedAppearance : props.draft.mode;
|
|
117
|
-
const themeAccents = () => props.themeAccentOptions ?? [];
|
|
118
117
|
const accentSelection = () => isCustomAccent(props) ? "custom" : props.draft.accent;
|
|
119
118
|
return createComponent(RadioGroup, {
|
|
120
119
|
get value() {
|
|
@@ -132,9 +131,6 @@ function AccentChoices(props) {
|
|
|
132
131
|
get accentOptions() {
|
|
133
132
|
return props.accentOptions;
|
|
134
133
|
},
|
|
135
|
-
get themeAccentOptions() {
|
|
136
|
-
return themeAccents();
|
|
137
|
-
},
|
|
138
134
|
get resolvedAppearance() {
|
|
139
135
|
return resolvedAppearance();
|
|
140
136
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-choices.js","names":["RadioGroup","Radio","For","Show","isThemeAccentId","AccentSwatchGroups","AppearanceEditorProps","ThemeMiniature","ThemeMiniatureSplit","MODES","value","label","const","SURFACES","ModeChoices","props","_$createComponent","draft","mode","disabled","saving","orientation","onChange","option","find","candidate","children","each","Item","data-mode","ItemInput","ItemLabel","_el$","_tmpl$","_$insert","when","fallback","theme","_$memo","lightTheme","darkTheme","light","dark","_el$2","_tmpl$2","isCustomAccent","accent","accentOptions","some","id","AccentChoices","resolvedAppearance","themeAccents","themeAccentOptions","accentSelection","customAccentValue","themeDefaultColor","colors","_el$3","_tmpl$3","_el$4","firstChild","GlassChoices","surface","surfaceCapability","frosted","_$createComponent","Radio","_$memo"],"sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Pinned mode-card, accent-swatch, and glass-chip composition. Kobalte replaces\n// the app port's manual roving focus; it does not replace the donor hierarchy.\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { For, Show } from 'solid-js'\nimport { isThemeAccentId } from '#lib/theme-accents'\nimport { AccentSwatchGroups } from './accent-swatch-groups'\nimport type { AppearanceEditorProps } from './appearance-types'\nimport { ThemeMiniature, ThemeMiniatureSplit } from './theme-preview'\n\nconst MODES = [\n { value: 'system', label: 'System' },\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n] as const\nconst SURFACES = [\n { value: 'theme', label: 'Theme default' },\n { value: 'frosted', label: 'Frosted' },\n { value: 'opaque', label: 'Opaque' },\n] as const\nexport function ModeChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.mode}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Appearance mode\"\n onChange={(mode) => {\n const option = MODES.find((candidate) => candidate.value === mode)\n if (option) props.onChange({ mode: option.value })\n }}\n class=\"grid grid-cols-1 gap-3 px-4 py-4 sm:grid-cols-3\"\n >\n <For each={MODES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n data-mode={option.value}\n class=\"min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex cursor-pointer flex-col gap-2 rounded-lg border p-2 text-center text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n <span class=\"block h-20 w-full\">\n <Show\n when={option.value === 'system'}\n fallback={\n <ThemeMiniature\n theme={option.value === 'light' ? props.lightTheme : props.darkTheme}\n />\n }\n >\n <ThemeMiniatureSplit light={props.lightTheme} dark={props.darkTheme} />\n </Show>\n </span>\n <span>{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n\n/**\n * Whether the draft accent is the host's custom colour: not the theme default,\n * not a preset, and not a theme accent id. A theme accent id counts as known even\n * when the current pair cannot offer it — it is a stored role, not a colour the\n * user typed, and showing it in the custom field would invite editing `ansi-blue`.\n */\nexport function isCustomAccent(props: AppearanceEditorProps): boolean {\n const accent = props.draft.accent\n return (\n accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === accent) &&\n !isThemeAccentId(accent)\n )\n}\n\nexport function AccentChoices(props: AppearanceEditorProps) {\n // The resolved appearance decides which side of a preset pair — and which\n // theme accent — the swatches paint, so the row previews each choice as the\n // user will see it.\n const resolvedAppearance = () =>\n props.draft.mode === 'system' ? props.resolvedAppearance : props.draft.mode\n // The accents the previewed theme pair carries, offered after the presets.\n const themeAccents = () => props.themeAccentOptions ?? []\n const accentSelection = () => (isCustomAccent(props) ? 'custom' : props.draft.accent)\n return (\n <Radio\n value={accentSelection()}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n onChange={(accent) =>\n props.onChange({\n accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,\n })\n }\n >\n <AccentSwatchGroups\n accentOptions={props.accentOptions}\n themeAccentOptions={themeAccents()}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor={\n resolvedAppearance() === 'light'\n ? props.lightTheme.colors.accent\n : props.darkTheme.colors.accent\n }\n />\n <div class=\"flex flex-col gap-1\">\n <span class=\"text-xs font-medium text-muted-foreground\">Custom</span>\n <Radio.Item value=\"custom\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Custom\n </Radio.ItemLabel>\n </Radio.Item>\n </div>\n </Radio>\n )\n}\n\nexport function GlassChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.surface}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Glass\"\n class=\"flex flex-wrap gap-1\"\n onChange={(surface) => {\n const option = SURFACES.find((candidate) => candidate.value === surface)\n if (option) props.onChange({ surface: option.value })\n }}\n >\n <For each={SURFACES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n disabled={option.value === 'frosted' && !props.surfaceCapability.frosted}\n class=\"rounded-md focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n {option.label}\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n"],"mappings":";;;;;;;;;;AAgCA,IAAMS,QAAQ;CACZ;EAAEC,OAAO;EAAUC,OAAO;CAAS;CACnC;EAAED,OAAO;EAASC,OAAO;CAAQ;CACjC;EAAED,OAAO;EAAQC,OAAO;CAAO;AAAC;AAElC,IAAME,WAAW;CACf;EAAEH,OAAO;EAASC,OAAO;CAAgB;CACzC;EAAED,OAAO;EAAWC,OAAO;CAAU;CACrC;EAAED,OAAO;EAAUC,OAAO;CAAS;AAAC;AAEtC,SAAgBG,YAAYC,OAA8B;CACxD,OAAAC,gBACGf,YAAK;EAAA,IACJS,QAAK;GAAA,OAAEK,MAAME,MAAMC;EAAI;EAAA,IACvBC,WAAQ;GAAA,OAAEJ,MAAMK;EAAM;EACtBC,aAAW;EAAA,cAAA;EAEXC,WAAWJ,SAAS;GAClB,MAAMK,SAASd,MAAMe,MAAMC,cAAcA,UAAUf,UAAUQ,IAAI;GACjE,IAAIK,QAAQR,MAAMO,SAAS,EAAEJ,MAAMK,OAAOb,MAAM,CAAC;EACnD;EAAC,SAAA;EAAA,IAAAgB,WAAA;GAA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zD,OAAAC,gBACGf,YAAK;EAAA,IACJS,QAAK;GAAA,OAAEK,MAAME,MAAM8C;EAAO;EAAA,IAC1B5C,WAAQ;GAAA,OAAEJ,MAAMK;EAAM;EACtBC,aAAW;EAAA,cAAA;EAAA,SAAA;EAGXC,WAAWyC,YAAY;GACrB,MAAMxC,SAASV,SAASW,MAAMC,cAAcA,UAAUf,UAAUqD,OAAO;GACvE,IAAIxC,QAAQR,MAAMO,SAAS,EAAEyC,SAASxC,OAAOb,MAAM,CAAC;EACtD;EAAC,IAAAgB,WAAA;GAAA,OAAAV,gBAEAd,KAAG;IAACyB,MAAMd;IAAQa,WACfH,WAAMP,gBACLf,WAAM2B,MAAI;KAAA,IACTlB,QAAK;MAAA,OAAEa,OAAOb;KAAK;KAAA,IACnBS,WAAQ;MAAA,OAAEmB,WAAAf,OAAOb,UAAU,SAAS,CAAA,CAAA,KAAI,CAACK,MAAMiD,kBAAkBC;KAAO;KAAA,SAAA;KAAA,IAAAvC,WAAA;MAAA,OAAA,CAAAV,gBAGvEf,WAAM6B,WAAS,CAAA,CAAA,GAAAd,gBACff,WAAM8B,WAAS;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OACbH,OAAOZ;OAAK;MAAA,CAAA,CAAA;KAAA;IAAA,CAAA;GAGlB,CAAA;EAAA;CAAA,CAAA;AAIT"}
|
|
1
|
+
{"version":3,"file":"appearance-choices.js","names":["RadioGroup","Radio","For","Show","isThemeAccentId","AccentSwatchGroups","AppearanceEditorProps","ThemeMiniature","ThemeMiniatureSplit","MODES","value","label","const","SURFACES","ModeChoices","props","_$createComponent","draft","mode","disabled","saving","orientation","onChange","option","find","candidate","children","each","Item","data-mode","ItemInput","ItemLabel","_el$","_tmpl$","_$insert","when","fallback","theme","_$memo","lightTheme","darkTheme","light","dark","_el$2","_tmpl$2","isCustomAccent","accent","accentOptions","some","id","AccentChoices","resolvedAppearance","accentSelection","customAccentValue","themeDefaultColor","colors","_el$3","_tmpl$3","_el$4","firstChild","GlassChoices","surface","surfaceCapability","frosted","_$createComponent","Radio","_$memo"],"sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Pinned mode-card, accent-swatch, and glass-chip composition. Kobalte replaces\n// the app port's manual roving focus; it does not replace the donor hierarchy.\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { For, Show } from 'solid-js'\nimport { isThemeAccentId } from '#lib/theme-accents'\nimport { AccentSwatchGroups } from './accent-swatch-groups'\nimport type { AppearanceEditorProps } from './appearance-types'\nimport { ThemeMiniature, ThemeMiniatureSplit } from './theme-preview'\n\nconst MODES = [\n { value: 'system', label: 'System' },\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n] as const\nconst SURFACES = [\n { value: 'theme', label: 'Theme default' },\n { value: 'frosted', label: 'Frosted' },\n { value: 'opaque', label: 'Opaque' },\n] as const\nexport function ModeChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.mode}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Appearance mode\"\n onChange={(mode) => {\n const option = MODES.find((candidate) => candidate.value === mode)\n if (option) props.onChange({ mode: option.value })\n }}\n class=\"grid grid-cols-1 gap-3 px-4 py-4 sm:grid-cols-3\"\n >\n <For each={MODES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n data-mode={option.value}\n class=\"min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex cursor-pointer flex-col gap-2 rounded-lg border p-2 text-center text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n <span class=\"block h-20 w-full\">\n <Show\n when={option.value === 'system'}\n fallback={\n <ThemeMiniature\n theme={option.value === 'light' ? props.lightTheme : props.darkTheme}\n />\n }\n >\n <ThemeMiniatureSplit light={props.lightTheme} dark={props.darkTheme} />\n </Show>\n </span>\n <span>{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n\n/**\n * Whether the draft accent is the host's custom colour: not the theme default,\n * not a preset, and not a theme accent id. A theme accent id counts as known even\n * when the current pair cannot offer it — it is a stored role, not a colour the\n * user typed, and showing it in the custom field would invite editing `ansi-blue`.\n */\nexport function isCustomAccent(props: AppearanceEditorProps): boolean {\n const accent = props.draft.accent\n return (\n accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === accent) &&\n !isThemeAccentId(accent)\n )\n}\n\nexport function AccentChoices(props: AppearanceEditorProps) {\n // The resolved appearance decides which side of a preset pair — and which\n // theme accent — the swatches paint, so the row previews each choice as the\n // user will see it.\n const resolvedAppearance = () =>\n props.draft.mode === 'system' ? props.resolvedAppearance : props.draft.mode\n const accentSelection = () => (isCustomAccent(props) ? 'custom' : props.draft.accent)\n return (\n <Radio\n value={accentSelection()}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n onChange={(accent) =>\n props.onChange({\n accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,\n })\n }\n >\n <AccentSwatchGroups\n accentOptions={props.accentOptions}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor={\n resolvedAppearance() === 'light'\n ? props.lightTheme.colors.accent\n : props.darkTheme.colors.accent\n }\n />\n <div class=\"flex flex-col gap-1\">\n <span class=\"text-xs font-medium text-muted-foreground\">Custom</span>\n <Radio.Item value=\"custom\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Custom\n </Radio.ItemLabel>\n </Radio.Item>\n </div>\n </Radio>\n )\n}\n\nexport function GlassChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.surface}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Glass\"\n class=\"flex flex-wrap gap-1\"\n onChange={(surface) => {\n const option = SURFACES.find((candidate) => candidate.value === surface)\n if (option) props.onChange({ surface: option.value })\n }}\n >\n <For each={SURFACES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n disabled={option.value === 'frosted' && !props.surfaceCapability.frosted}\n class=\"rounded-md focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n {option.label}\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n"],"mappings":";;;;;;;;;;AAgCA,IAAMS,QAAQ;CACZ;EAAEC,OAAO;EAAUC,OAAO;CAAS;CACnC;EAAED,OAAO;EAASC,OAAO;CA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CAAA;KAAA;IAAA,CAAA;GAGlB,CAAA;EAAA;CAAA,CAAA;AAIT"}
|
|
@@ -4,9 +4,9 @@ import { Input } from "../../ui/input/input.js";
|
|
|
4
4
|
import { Sheet, SheetBody, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "../../ui/sheet/sheet.js";
|
|
5
5
|
import { Switch } from "../../ui/switch/switch.js";
|
|
6
6
|
import { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from "../../../lib/appearance-font-settings.js";
|
|
7
|
-
import { SettingsRow, TerminalRow, ThemeRow } from "./appearance-rows.js";
|
|
8
7
|
import { AppearanceFontSettingsGroup } from "./font-settings-group.js";
|
|
9
8
|
import { AccentChoices, GlassChoices, ModeChoices, isCustomAccent } from "./appearance-choices.js";
|
|
9
|
+
import { SettingsRow, TerminalRow, ThemeRow } from "./appearance-rows.js";
|
|
10
10
|
import { className, createComponent, effect, insert, memo, mergeProps, setAttribute, template } from "solid-js/web";
|
|
11
11
|
import { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from "lucide-solid";
|
|
12
12
|
import { Show, createSignal, createUniqueId } from "solid-js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font-settings-group.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/font-settings-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"font-settings-group.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/font-settings-group.tsx"],"names":[],"mappings":"AAaA,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,+BAA+B,CAAA;AAEtC,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,EAAE,4BAA4B,CAAA;IACtC,eAAe,CAAC,EAAE,WAAW,CAAA;IAC7B,QAAQ,EAAE,CAAC,QAAQ,EAAE,4BAA4B,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAyND,mFAAmF;AACnF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,kCAoHlF"}
|
|
@@ -3,14 +3,13 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenu
|
|
|
3
3
|
import { InputControl } from "../../ui/input/input-control.js";
|
|
4
4
|
import { fontOptions } from "../../../lib/font-catalog.js";
|
|
5
5
|
import { normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize } from "../../../lib/appearance-font-settings.js";
|
|
6
|
-
import {
|
|
7
|
-
import { createComponent, insert, setAttribute, template } from "solid-js/web";
|
|
6
|
+
import { createComponent, effect, insert, setAttribute, template } from "solid-js/web";
|
|
8
7
|
import { BookOpen, ChevronDown, Code2, PanelsTopLeft } from "lucide-solid";
|
|
9
8
|
import { For, createMemo, createSignal, createUniqueId } from "solid-js";
|
|
10
9
|
//#region src/components/composites/appearance-editor/font-settings-group.tsx
|
|
11
10
|
var _tmpl$ = /*#__PURE__*/ template(`<span class=truncate>`);
|
|
12
11
|
var _tmpl$2 = /*#__PURE__*/ template(`<div class=global-appearance-font-settings>`);
|
|
13
|
-
var _tmpl$3 = /*#__PURE__*/ template(`<
|
|
12
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<section class="flex items-center gap-3 px-4 py-4"><span class="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-foreground/5 text-muted-foreground [&_svg]:size-4"aria-hidden=true></span><div class="min-w-0 flex-1"><h3 class="text-sm font-medium"></h3><div class="mt-0.5 truncate text-xs text-muted-foreground"></div></div><div class="flex shrink-0 items-center gap-2"><div class="flex items-center gap-1"><span aria-hidden=true class="text-xs text-muted-foreground">px</span></div><span class=sr-only>Enter a whole number from <!> to <!> pixels.`);
|
|
14
13
|
var FONT_ROWS = [
|
|
15
14
|
{
|
|
16
15
|
axis: "ui",
|
|
@@ -88,7 +87,7 @@ function FontFamilyMenu(props) {
|
|
|
88
87
|
get disabled() {
|
|
89
88
|
return props.disabled;
|
|
90
89
|
},
|
|
91
|
-
"class": "w-
|
|
90
|
+
"class": "w-32 max-w-full justify-between",
|
|
92
91
|
get children() {
|
|
93
92
|
return [(() => {
|
|
94
93
|
var _el$ = _tmpl$();
|
|
@@ -235,70 +234,63 @@ function AppearanceFontSettingsGroup(props) {
|
|
|
235
234
|
const parsed = Number(draft);
|
|
236
235
|
return !Number.isFinite(parsed) || !Number.isInteger(parsed) || parsed < 10 || parsed > 32;
|
|
237
236
|
};
|
|
238
|
-
return
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
"
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}), _el$5);
|
|
296
|
-
setAttribute(_el$6, "id", sizeHintId);
|
|
297
|
-
insert(_el$6, 10, _el$1);
|
|
298
|
-
insert(_el$6, 32, _el$10);
|
|
299
|
-
return _el$3;
|
|
300
|
-
}
|
|
301
|
-
});
|
|
237
|
+
return (() => {
|
|
238
|
+
var _el$3 = _tmpl$3(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$9.nextSibling, _el$14 = _el$1.firstChild.nextSibling, _el$15 = _el$14.nextSibling.nextSibling;
|
|
239
|
+
_el$15.nextSibling;
|
|
240
|
+
insert(_el$4, createComponent(Icon, {}));
|
|
241
|
+
insert(_el$6, () => row.label);
|
|
242
|
+
insert(_el$7, () => row.description);
|
|
243
|
+
insert(_el$8, createComponent(FontFamilyMenu, {
|
|
244
|
+
get label() {
|
|
245
|
+
return row.label;
|
|
246
|
+
},
|
|
247
|
+
get family() {
|
|
248
|
+
return value().family;
|
|
249
|
+
},
|
|
250
|
+
get menuPortalMount() {
|
|
251
|
+
return props.menuPortalMount;
|
|
252
|
+
},
|
|
253
|
+
get disabled() {
|
|
254
|
+
return props.disabled;
|
|
255
|
+
},
|
|
256
|
+
onSelect: (family) => updateAxis(row.axis, { family })
|
|
257
|
+
}), _el$9);
|
|
258
|
+
insert(_el$9, createComponent(InputControl, {
|
|
259
|
+
type: "number",
|
|
260
|
+
min: 10,
|
|
261
|
+
max: 32,
|
|
262
|
+
step: 1,
|
|
263
|
+
get value() {
|
|
264
|
+
return inputValue();
|
|
265
|
+
},
|
|
266
|
+
get disabled() {
|
|
267
|
+
return props.disabled;
|
|
268
|
+
},
|
|
269
|
+
get ["aria-label"]() {
|
|
270
|
+
return `${row.label} font size in pixels`;
|
|
271
|
+
},
|
|
272
|
+
"aria-describedby": sizeHintId,
|
|
273
|
+
get ["aria-invalid"]() {
|
|
274
|
+
return sizeIsInvalid();
|
|
275
|
+
},
|
|
276
|
+
"class": "w-12",
|
|
277
|
+
onInput: (event) => setSizeDrafts((current) => ({
|
|
278
|
+
...current,
|
|
279
|
+
[row.axis]: event.currentTarget.value
|
|
280
|
+
})),
|
|
281
|
+
onBlur: () => commitSize(row.axis),
|
|
282
|
+
onKeyDown: (event) => {
|
|
283
|
+
if (event.key !== "Enter") return;
|
|
284
|
+
event.preventDefault();
|
|
285
|
+
commitSize(row.axis);
|
|
286
|
+
}
|
|
287
|
+
}), _el$0);
|
|
288
|
+
setAttribute(_el$1, "id", sizeHintId);
|
|
289
|
+
insert(_el$1, 10, _el$14);
|
|
290
|
+
insert(_el$1, 32, _el$15);
|
|
291
|
+
effect(() => setAttribute(_el$3, "data-font-settings-row", row.axis));
|
|
292
|
+
return _el$3;
|
|
293
|
+
})();
|
|
302
294
|
}
|
|
303
295
|
}));
|
|
304
296
|
return _el$2;
|