@yahoo/uds-v5-wip 1.28.0 → 1.29.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/dist/accordion.config.d.ts +1 -2
- package/dist/components/dist/accordion.d.ts +1 -2
- package/dist/components/dist/accordion.js +9 -9
- package/dist/components/dist/alert.config.d.ts +1 -2
- package/dist/components/dist/alert.d.ts +1 -2
- package/dist/components/dist/alert.js +2 -2
- package/dist/components/dist/anchor.config.d.ts +1 -2
- package/dist/components/dist/anchor.d.ts +1 -2
- package/dist/components/dist/article.d.ts +1 -2
- package/dist/components/dist/aside.d.ts +1 -2
- package/dist/components/dist/avatar-group.config.d.ts +1 -2
- package/dist/components/dist/avatar-group.d.ts +1 -2
- package/dist/components/dist/avatar-group.js +6 -6
- package/dist/components/dist/avatar.config.d.ts +1 -2
- package/dist/components/dist/avatar.d.ts +1 -2
- package/dist/components/dist/avatar.js +3 -3
- package/dist/components/dist/badge.config.d.ts +1 -2
- package/dist/components/dist/badge.d.ts +1 -2
- package/dist/components/dist/badge.js +2 -2
- package/dist/components/dist/box.d.ts +1 -2
- package/dist/components/dist/breadcrumb.config.d.ts +1 -2
- package/dist/components/dist/breadcrumb.d.ts +1 -2
- package/dist/components/dist/breadcrumb.js +17 -17
- package/dist/components/dist/button.config.d.ts +1 -2
- package/dist/components/dist/button.d.ts +1 -2
- package/dist/components/dist/button.js +5 -5
- package/dist/components/dist/card.config.d.ts +1 -2
- package/dist/components/dist/card.d.ts +1 -2
- package/dist/components/dist/card.js +4 -4
- package/dist/components/dist/collapsible.config.d.ts +1 -2
- package/dist/components/dist/collapsible.d.ts +1 -2
- package/dist/components/dist/collapsible.js +3 -3
- package/dist/components/dist/command.config.d.ts +1 -2
- package/dist/components/dist/command.d.ts +1 -2
- package/dist/components/dist/command.js +21 -21
- package/dist/components/dist/control-color.config.d.ts +1 -2
- package/dist/components/dist/control-color.d.ts +1 -2
- package/dist/components/dist/control-color.js +6 -6
- package/dist/components/dist/control-curve.config.d.ts +1 -2
- package/dist/components/dist/control-curve.d.ts +1 -2
- package/dist/components/dist/control-curve.js +4 -4
- package/dist/components/dist/control-folder.config.d.ts +1 -2
- package/dist/components/dist/control-folder.d.ts +1 -2
- package/dist/components/dist/control-folder.js +6 -6
- package/dist/components/dist/control-group.config.d.ts +1 -2
- package/dist/components/dist/control-group.d.ts +1 -2
- package/dist/components/dist/control-group.js +3 -3
- package/dist/components/dist/control-knob.config.d.ts +1 -2
- package/dist/components/dist/control-knob.d.ts +1 -2
- package/dist/components/dist/control-knob.js +8 -8
- package/dist/components/dist/control-panel.config.d.ts +1 -2
- package/dist/components/dist/control-panel.d.ts +1 -2
- package/dist/components/dist/control-panel.js +3 -3
- package/dist/components/dist/control-select.config.d.ts +1 -2
- package/dist/components/dist/control-select.d.ts +1 -2
- package/dist/components/dist/control-select.js +8 -8
- package/dist/components/dist/control-slider.config.d.ts +1 -2
- package/dist/components/dist/control-slider.d.ts +1 -2
- package/dist/components/dist/control-slider.js +8 -8
- package/dist/components/dist/control-spring.config.d.ts +1 -2
- package/dist/components/dist/control-spring.d.ts +1 -2
- package/dist/components/dist/control-spring.js +12 -12
- package/dist/components/dist/control-stepper.config.d.ts +1 -2
- package/dist/components/dist/control-stepper.d.ts +1 -2
- package/dist/components/dist/control-stepper.js +6 -6
- package/dist/components/dist/control-toggle.config.d.ts +1 -2
- package/dist/components/dist/control-toggle.d.ts +1 -2
- package/dist/components/dist/control-toggle.js +3 -3
- package/dist/components/dist/createSlot.d.ts +1 -2
- package/dist/components/dist/createSlot.js +2 -2
- package/dist/components/dist/dropdown.config.d.ts +1 -2
- package/dist/components/dist/dropdown.d.ts +1 -2
- package/dist/components/dist/dropdown.js +10 -10
- package/dist/components/dist/empty-state.config.d.ts +1 -2
- package/dist/components/dist/empty-state.d.ts +1 -2
- package/dist/components/dist/empty-state.js +6 -6
- package/dist/components/dist/footer.d.ts +1 -2
- package/dist/components/dist/grid.d.ts +1 -2
- package/dist/components/dist/grid.js +2 -2
- package/dist/components/dist/header.d.ts +1 -2
- package/dist/components/dist/hstack.d.ts +1 -2
- package/dist/components/dist/hstack.js +1 -1
- package/dist/components/dist/image.d.ts +1 -2
- package/dist/components/dist/input.config.d.ts +1 -2
- package/dist/components/dist/input.d.ts +1 -2
- package/dist/components/dist/input.js +1 -1
- package/dist/components/dist/item.config.d.ts +1 -2
- package/dist/components/dist/item.d.ts +1 -2
- package/dist/components/dist/item.js +8 -8
- package/dist/components/dist/list.d.ts +1 -2
- package/dist/components/dist/list.js +1 -1
- package/dist/components/dist/main.d.ts +1 -2
- package/dist/components/dist/modal.config.d.ts +1 -2
- package/dist/components/dist/modal.d.ts +1 -2
- package/dist/components/dist/modal.js +8 -8
- package/dist/components/dist/nav-header.config.d.ts +1 -2
- package/dist/components/dist/nav-header.d.ts +1 -2
- package/dist/components/dist/nav-header.js +3 -3
- package/dist/components/dist/nav.d.ts +1 -2
- package/dist/components/dist/preset-bar.config.d.ts +1 -2
- package/dist/components/dist/preset-bar.d.ts +1 -2
- package/dist/components/dist/preset-bar.js +10 -10
- package/dist/components/dist/presets/index.d.ts +2 -3
- package/dist/components/dist/presets/index.js +1 -1
- package/dist/components/dist/pressable.d.ts +1 -2
- package/dist/components/dist/progress.config.d.ts +1 -2
- package/dist/components/dist/progress.d.ts +1 -2
- package/dist/components/dist/progress.js +6 -6
- package/dist/components/dist/section.d.ts +1 -2
- package/dist/components/dist/select.config.d.ts +1 -2
- package/dist/components/dist/select.d.ts +1 -2
- package/dist/components/dist/sheet.config.d.ts +1 -2
- package/dist/components/dist/sheet.d.ts +1 -2
- package/dist/components/dist/sheet.js +8 -8
- package/dist/components/dist/sidebar.config.d.ts +1 -2
- package/dist/components/dist/sidebar.d.ts +1 -2
- package/dist/components/dist/sidebar.js +42 -42
- package/dist/components/dist/skeleton.config.d.ts +1 -2
- package/dist/components/dist/skeleton.d.ts +1 -2
- package/dist/components/dist/skeleton.js +1 -1
- package/dist/components/dist/slider.config.d.ts +1 -2
- package/dist/components/dist/slider.d.ts +1 -2
- package/dist/components/dist/slider.js +5 -5
- package/dist/components/dist/spinner.config.d.ts +1 -2
- package/dist/components/dist/spinner.d.ts +1 -2
- package/dist/components/dist/spinner.js +2 -2
- package/dist/components/dist/svg.d.ts +1 -2
- package/dist/components/dist/switch.config.d.ts +1 -2
- package/dist/components/dist/switch.d.ts +1 -2
- package/dist/components/dist/switch.js +5 -5
- package/dist/components/dist/table.d.ts +1 -2
- package/dist/components/dist/tabs.config.d.ts +1 -2
- package/dist/components/dist/tabs.d.ts +1 -2
- package/dist/components/dist/tabs.js +8 -8
- package/dist/components/dist/text.config.d.ts +1 -2
- package/dist/components/dist/text.d.ts +1 -2
- package/dist/components/dist/textarea.config.d.ts +1 -2
- package/dist/components/dist/textarea.d.ts +1 -2
- package/dist/components/dist/toast.config.d.ts +1 -2
- package/dist/components/dist/toast.d.ts +1 -2
- package/dist/components/dist/toast.js +7 -7
- package/dist/components/dist/tooltip.config.d.ts +1 -2
- package/dist/components/dist/tooltip.d.ts +1 -2
- package/dist/components/dist/tooltip.js +3 -3
- package/dist/components/dist/vstack.d.ts +1 -2
- package/dist/components/dist/vstack.js +1 -1
- package/dist/components/presets/index.d.ts +1 -1
- package/dist/components/presets/index.js +1 -1
- package/dist/config/dist/component-resolution.d.ts +1 -1
- package/dist/config/dist/consts/defaultColors.d.ts +1 -2
- package/dist/config/dist/createConfig.d.ts +0 -6
- package/dist/config/dist/propertyGroups.d.ts +0 -5
- package/dist/config/dist/serialize.d.ts +1 -2
- package/dist/config/dist/types.d.ts +1 -2
- package/dist/core/dist/createComponent.js +1 -1
- package/dist/presets/dist/defaultPreset.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/collapsible.d.ts
|
|
6
|
-
//#region src/collapsible.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* @description A headless collapsible primitive with animated expand/collapse
|
|
9
8
|
*/
|
|
@@ -57,6 +56,6 @@ declare const Collapsible: _$react.FC<_$_uds_types0.CreateComponentProps<Compone
|
|
|
57
56
|
trigger: "button";
|
|
58
57
|
content: "div";
|
|
59
58
|
}>>;
|
|
60
|
-
type CollapsibleProps = React.ComponentProps<typeof Collapsible>;
|
|
59
|
+
type CollapsibleProps = React.ComponentProps<typeof Collapsible>;
|
|
61
60
|
//#endregion
|
|
62
61
|
export { Collapsible, CollapsibleProps };
|
|
@@ -20,15 +20,15 @@ const Collapsible = createComponent(({ props, trigger, children, defaultOpen = f
|
|
|
20
20
|
isControlled,
|
|
21
21
|
onOpenChange
|
|
22
22
|
]);
|
|
23
|
-
return
|
|
23
|
+
return jsxs("div", {
|
|
24
24
|
...props.root,
|
|
25
|
-
children: [
|
|
25
|
+
children: [jsx("button", {
|
|
26
26
|
...props.trigger,
|
|
27
27
|
type: "button",
|
|
28
28
|
onClick: toggle,
|
|
29
29
|
"aria-expanded": isOpen,
|
|
30
30
|
children: trigger
|
|
31
|
-
}), isOpen &&
|
|
31
|
+
}), isOpen && jsx("div", {
|
|
32
32
|
...props.content,
|
|
33
33
|
children
|
|
34
34
|
})]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/command.config.d.ts
|
|
3
|
-
//#region src/command.config.d.ts
|
|
4
3
|
declare const commandConfig: ComponentConfig<{
|
|
5
4
|
Command: {
|
|
6
5
|
readonly base: {
|
|
@@ -1609,6 +1608,6 @@ type CommandEmptyConfig = typeof commandEmptyConfig;
|
|
|
1609
1608
|
type CommandGroupConfig = typeof commandGroupConfig;
|
|
1610
1609
|
type CommandItemConfig = typeof commandItemConfig;
|
|
1611
1610
|
type CommandShortcutConfig = typeof commandShortcutConfig;
|
|
1612
|
-
type CommandSeparatorConfig = typeof commandSeparatorConfig;
|
|
1611
|
+
type CommandSeparatorConfig = typeof commandSeparatorConfig;
|
|
1613
1612
|
//#endregion
|
|
1614
1613
|
export { CommandConfig, CommandDialogConfig, CommandEmptyConfig, CommandGroupConfig, CommandInputConfig, CommandItemConfig, CommandListConfig, CommandSeparatorConfig, CommandShortcutConfig, commandConfig, commandDialogConfig, commandEmptyConfig, commandGroupConfig, commandInputConfig, commandItemConfig, commandListConfig, commandSeparatorConfig, commandShortcutConfig };
|
|
@@ -4,7 +4,6 @@ import { ReactNode } from "react";
|
|
|
4
4
|
import * as _$_uds_types0 from "@uds/types";
|
|
5
5
|
|
|
6
6
|
//#region ../components/dist/command.d.ts
|
|
7
|
-
//#region src/command.d.ts
|
|
8
7
|
interface CommandContextValue {
|
|
9
8
|
search: string;
|
|
10
9
|
setSearch: (value: string) => void;
|
|
@@ -1718,6 +1717,6 @@ type CommandEmptyProps = React.ComponentProps<typeof CommandEmpty>;
|
|
|
1718
1717
|
type CommandGroupProps = React.ComponentProps<typeof CommandGroup>;
|
|
1719
1718
|
type CommandItemProps = React.ComponentProps<typeof CommandItem>;
|
|
1720
1719
|
type CommandShortcutProps = React.ComponentProps<typeof CommandShortcut>;
|
|
1721
|
-
type CommandSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
|
|
1720
|
+
type CommandSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
|
|
1722
1721
|
//#endregion
|
|
1723
1722
|
export { Command, CommandContextValue, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandProps, CommandProvider, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps, useCommand };
|
|
@@ -64,7 +64,7 @@ const [CommandProvider, useCommand] = createProvider("Command", ({ children }) =
|
|
|
64
64
|
items: items.current,
|
|
65
65
|
visibleCount
|
|
66
66
|
},
|
|
67
|
-
render:
|
|
67
|
+
render: jsx(Fragment, { children })
|
|
68
68
|
};
|
|
69
69
|
});
|
|
70
70
|
function CommandRoot({ slotProps, label, children }) {
|
|
@@ -96,7 +96,7 @@ function CommandRoot({ slotProps, label, children }) {
|
|
|
96
96
|
container.querySelector("[data-command-item][aria-selected=\"true\"]")?.click();
|
|
97
97
|
}
|
|
98
98
|
}, [ctx]);
|
|
99
|
-
return
|
|
99
|
+
return jsx("div", {
|
|
100
100
|
ref: rootRef,
|
|
101
101
|
role: "listbox",
|
|
102
102
|
"aria-label": label ?? "Command menu",
|
|
@@ -122,9 +122,9 @@ const Command = createComponent(({ props, children, value: controlledValue, onVa
|
|
|
122
122
|
controlledValue,
|
|
123
123
|
onValueChange
|
|
124
124
|
]);
|
|
125
|
-
return
|
|
125
|
+
return jsx(CommandConfigContext.Provider, {
|
|
126
126
|
value: config,
|
|
127
|
-
children:
|
|
127
|
+
children: jsx(CommandProvider, { children: jsx(CommandRoot, {
|
|
128
128
|
slotProps: props,
|
|
129
129
|
label,
|
|
130
130
|
children
|
|
@@ -153,21 +153,21 @@ const CommandDialog = createComponent(({ props, children, open: controlledOpen,
|
|
|
153
153
|
};
|
|
154
154
|
}, [open, setOpen]);
|
|
155
155
|
if (!open) return null;
|
|
156
|
-
return createPortal(
|
|
156
|
+
return createPortal(jsxs("div", {
|
|
157
157
|
...props.overlay,
|
|
158
|
-
children: [
|
|
158
|
+
children: [jsx("button", {
|
|
159
159
|
type: "button",
|
|
160
160
|
"aria-label": "Close command menu",
|
|
161
161
|
tabIndex: -1,
|
|
162
162
|
onClick: () => setOpen(false),
|
|
163
163
|
...props.dismiss
|
|
164
|
-
}),
|
|
164
|
+
}), jsx("div", {
|
|
165
165
|
ref: panelRef,
|
|
166
166
|
role: "dialog",
|
|
167
167
|
"aria-modal": "true",
|
|
168
168
|
tabIndex: -1,
|
|
169
169
|
...props.dialogPanel,
|
|
170
|
-
children:
|
|
170
|
+
children: jsx(Command, {
|
|
171
171
|
filter,
|
|
172
172
|
shouldFilter,
|
|
173
173
|
loop: loop ?? true,
|
|
@@ -190,11 +190,11 @@ const CommandInput = createComponent(({ props, placeholder, value: controlledVal
|
|
|
190
190
|
setSearch(v);
|
|
191
191
|
onValueChange?.(v);
|
|
192
192
|
}, [setSearch, onValueChange]);
|
|
193
|
-
return
|
|
193
|
+
return jsxs("div", {
|
|
194
194
|
...props.inputWrapper,
|
|
195
|
-
children: [
|
|
195
|
+
children: [jsx("span", {
|
|
196
196
|
...props.searchIcon,
|
|
197
|
-
children:
|
|
197
|
+
children: jsxs("svg", {
|
|
198
198
|
width: "16",
|
|
199
199
|
height: "16",
|
|
200
200
|
viewBox: "0 0 24 24",
|
|
@@ -203,18 +203,18 @@ const CommandInput = createComponent(({ props, placeholder, value: controlledVal
|
|
|
203
203
|
strokeWidth: "2",
|
|
204
204
|
strokeLinecap: "round",
|
|
205
205
|
strokeLinejoin: "round",
|
|
206
|
-
children: [
|
|
206
|
+
children: [jsx("circle", {
|
|
207
207
|
cx: "11",
|
|
208
208
|
cy: "11",
|
|
209
209
|
r: "8"
|
|
210
|
-
}),
|
|
210
|
+
}), jsx("line", {
|
|
211
211
|
x1: "21",
|
|
212
212
|
y1: "21",
|
|
213
213
|
x2: "16.65",
|
|
214
214
|
y2: "16.65"
|
|
215
215
|
})]
|
|
216
216
|
})
|
|
217
|
-
}),
|
|
217
|
+
}), jsx("input", {
|
|
218
218
|
type: "text",
|
|
219
219
|
placeholder: placeholder ?? "Type a command or search...",
|
|
220
220
|
value: inputValue,
|
|
@@ -231,7 +231,7 @@ const CommandInput = createComponent(({ props, placeholder, value: controlledVal
|
|
|
231
231
|
* @description Scrollable container for command results
|
|
232
232
|
*/
|
|
233
233
|
const CommandList = createComponent(({ props, children }) => {
|
|
234
|
-
return
|
|
234
|
+
return jsx("fieldset", {
|
|
235
235
|
...props.list,
|
|
236
236
|
children
|
|
237
237
|
});
|
|
@@ -242,7 +242,7 @@ const CommandList = createComponent(({ props, children }) => {
|
|
|
242
242
|
const CommandEmpty = createComponent(({ props, children }) => {
|
|
243
243
|
const ctx = useCommand();
|
|
244
244
|
if (ctx.visibleCount > 0 || !ctx.search) return null;
|
|
245
|
-
return
|
|
245
|
+
return jsx("div", {
|
|
246
246
|
...props.empty,
|
|
247
247
|
children: children ?? "No results found."
|
|
248
248
|
});
|
|
@@ -259,10 +259,10 @@ const CommandGroup = createComponent(({ props, children, heading }) => {
|
|
|
259
259
|
if (el.querySelectorAll("[data-command-item]").length > 0) el.removeAttribute("hidden");
|
|
260
260
|
else el.setAttribute("hidden", "");
|
|
261
261
|
});
|
|
262
|
-
return
|
|
262
|
+
return jsxs("fieldset", {
|
|
263
263
|
ref: groupRef,
|
|
264
264
|
...props.group,
|
|
265
|
-
children: [heading &&
|
|
265
|
+
children: [heading && jsx("div", {
|
|
266
266
|
...props.groupHeading,
|
|
267
267
|
children: heading
|
|
268
268
|
}), children]
|
|
@@ -299,7 +299,7 @@ const CommandItem = createComponent(({ props, children, onSelect, value, keyword
|
|
|
299
299
|
keywords
|
|
300
300
|
]);
|
|
301
301
|
if (!(!ctx.shouldFilter || !ctx.search || ctx.filter(textValue, ctx.search, keywords) > 0)) return null;
|
|
302
|
-
return
|
|
302
|
+
return jsx("div", {
|
|
303
303
|
ref: itemRef,
|
|
304
304
|
role: "option",
|
|
305
305
|
tabIndex: 0,
|
|
@@ -324,7 +324,7 @@ const CommandItem = createComponent(({ props, children, onSelect, value, keyword
|
|
|
324
324
|
* @description Displays a keyboard shortcut hint alongside a command item
|
|
325
325
|
*/
|
|
326
326
|
const CommandShortcut = createComponent(({ props, children }) => {
|
|
327
|
-
return
|
|
327
|
+
return jsx("span", {
|
|
328
328
|
...props.shortcut,
|
|
329
329
|
children
|
|
330
330
|
});
|
|
@@ -335,7 +335,7 @@ const CommandShortcut = createComponent(({ props, children }) => {
|
|
|
335
335
|
const CommandSeparator = createComponent(({ props }) => {
|
|
336
336
|
const ctx = useCommand();
|
|
337
337
|
if (ctx.search && ctx.visibleCount === 0) return null;
|
|
338
|
-
return
|
|
338
|
+
return jsx("hr", { ...props.separator });
|
|
339
339
|
});
|
|
340
340
|
//#endregion
|
|
341
341
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandProvider, CommandSeparator, CommandShortcut, useCommand };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-color.config.d.ts
|
|
3
|
-
//#region src/control-color.config.d.ts
|
|
4
3
|
declare const controlColorConfig: ComponentConfig<{
|
|
5
4
|
ControlColor: {
|
|
6
5
|
readonly base: {
|
|
@@ -975,6 +974,6 @@ declare const controlColorConfig: ComponentConfig<{
|
|
|
975
974
|
};
|
|
976
975
|
};
|
|
977
976
|
}, {}>;
|
|
978
|
-
type ControlColorConfig = typeof controlColorConfig;
|
|
977
|
+
type ControlColorConfig = typeof controlColorConfig;
|
|
979
978
|
//#endregion
|
|
980
979
|
export { ControlColorConfig, controlColorConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-color.d.ts
|
|
6
|
-
//#region src/control-color.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* @description A hex color input with preview swatch and text field
|
|
9
8
|
*/
|
|
@@ -991,6 +990,6 @@ declare const ControlColor: _$react.FC<_$_uds_types0.CreateComponentProps<Compon
|
|
|
991
990
|
input: "input";
|
|
992
991
|
label: "span";
|
|
993
992
|
}>>;
|
|
994
|
-
type ControlColorProps = React.ComponentProps<typeof ControlColor>;
|
|
993
|
+
type ControlColorProps = React.ComponentProps<typeof ControlColor>;
|
|
995
994
|
//#endregion
|
|
996
995
|
export { ControlColor, ControlColorProps };
|
|
@@ -21,19 +21,19 @@ const ControlColor = createComponent(({ props, value, onChange, label }) => {
|
|
|
21
21
|
const val = e.target.value;
|
|
22
22
|
if (HEX_PATTERN.test(val)) onChange(val);
|
|
23
23
|
}, [onChange]);
|
|
24
|
-
return
|
|
24
|
+
return jsxs("div", {
|
|
25
25
|
...props.root,
|
|
26
|
-
children: [label &&
|
|
26
|
+
children: [label && jsx("span", {
|
|
27
27
|
...props.label,
|
|
28
28
|
children: label
|
|
29
|
-
}),
|
|
29
|
+
}), jsxs("div", {
|
|
30
30
|
...props.endContent,
|
|
31
|
-
children: [
|
|
31
|
+
children: [jsx("button", {
|
|
32
32
|
type: "button",
|
|
33
33
|
onClick: handleSwatchClick,
|
|
34
34
|
style: { backgroundColor: value },
|
|
35
35
|
...props.swatch,
|
|
36
|
-
children:
|
|
36
|
+
children: jsx("input", {
|
|
37
37
|
ref: nativeInputRef,
|
|
38
38
|
type: "color",
|
|
39
39
|
value: HEX_PATTERN.test(value) ? value : DEFAULT_HEX,
|
|
@@ -48,7 +48,7 @@ const ControlColor = createComponent(({ props, value, onChange, label }) => {
|
|
|
48
48
|
tabIndex: -1,
|
|
49
49
|
"aria-hidden": true
|
|
50
50
|
})
|
|
51
|
-
}),
|
|
51
|
+
}), jsx("input", {
|
|
52
52
|
type: "text",
|
|
53
53
|
defaultValue: value,
|
|
54
54
|
onBlur: handleTextChange,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-curve.config.d.ts
|
|
3
|
-
//#region src/control-curve.config.d.ts
|
|
4
3
|
declare const controlCurveConfig: ComponentConfig<{
|
|
5
4
|
ControlCurve: {
|
|
6
5
|
readonly base: {
|
|
@@ -14,6 +13,6 @@ declare const controlCurveConfig: ComponentConfig<{
|
|
|
14
13
|
readonly defaultVariants: {};
|
|
15
14
|
};
|
|
16
15
|
}, {}>;
|
|
17
|
-
type ControlCurveConfig = typeof controlCurveConfig;
|
|
16
|
+
type ControlCurveConfig = typeof controlCurveConfig;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { ControlCurveConfig, controlCurveConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-curve.d.ts
|
|
6
|
-
//#region src/control-curve.d.ts
|
|
7
6
|
interface ControlCurveInput {
|
|
8
7
|
stiffness: number;
|
|
9
8
|
damping: number;
|
|
@@ -31,6 +30,6 @@ declare const ControlCurve: _$react.FC<_$_uds_types0.CreateComponentProps<Compon
|
|
|
31
30
|
}, {
|
|
32
31
|
root: "div";
|
|
33
32
|
}>>;
|
|
34
|
-
type ControlCurveProps = React.ComponentProps<typeof ControlCurve>;
|
|
33
|
+
type ControlCurveProps = React.ComponentProps<typeof ControlCurve>;
|
|
35
34
|
//#endregion
|
|
36
35
|
export { ControlCurve, ControlCurveInput, ControlCurveProps };
|
|
@@ -46,9 +46,9 @@ const ControlCurve = createComponent(({ props, config, width: rawWidth = 280, he
|
|
|
46
46
|
height
|
|
47
47
|
]);
|
|
48
48
|
const targetY = height - height * .7;
|
|
49
|
-
return
|
|
49
|
+
return jsx("div", {
|
|
50
50
|
...props.root,
|
|
51
|
-
children:
|
|
51
|
+
children: jsxs("svg", {
|
|
52
52
|
width,
|
|
53
53
|
height,
|
|
54
54
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -57,7 +57,7 @@ const ControlCurve = createComponent(({ props, config, width: rawWidth = 280, he
|
|
|
57
57
|
width: "100%",
|
|
58
58
|
height: "auto"
|
|
59
59
|
},
|
|
60
|
-
children: [
|
|
60
|
+
children: [jsx("line", {
|
|
61
61
|
x1: 0,
|
|
62
62
|
y1: targetY,
|
|
63
63
|
x2: width,
|
|
@@ -66,7 +66,7 @@ const ControlCurve = createComponent(({ props, config, width: rawWidth = 280, he
|
|
|
66
66
|
strokeWidth: .5,
|
|
67
67
|
strokeDasharray: "4 2",
|
|
68
68
|
opacity: .3
|
|
69
|
-
}),
|
|
69
|
+
}), jsx("path", {
|
|
70
70
|
d: path,
|
|
71
71
|
fill: "none",
|
|
72
72
|
stroke: "var(--uds-bg-brand)",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-folder.config.d.ts
|
|
3
|
-
//#region src/control-folder.config.d.ts
|
|
4
3
|
declare const controlFolderConfig: ComponentConfig<{
|
|
5
4
|
ControlFolder: {
|
|
6
5
|
readonly base: {
|
|
@@ -173,6 +172,6 @@ declare const controlFolderConfig: ComponentConfig<{
|
|
|
173
172
|
readonly defaultVariants: {};
|
|
174
173
|
};
|
|
175
174
|
}, {}>;
|
|
176
|
-
type ControlFolderConfig = typeof controlFolderConfig;
|
|
175
|
+
type ControlFolderConfig = typeof controlFolderConfig;
|
|
177
176
|
//#endregion
|
|
178
177
|
export { ControlFolderConfig, controlFolderConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-folder.d.ts
|
|
6
|
-
//#region src/control-folder.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* @description A collapsible folder section with animated expand/collapse
|
|
9
8
|
*/
|
|
@@ -190,6 +189,6 @@ declare const ControlFolder: _$react.FC<_$_uds_types0.CreateComponentProps<Compo
|
|
|
190
189
|
content: "div";
|
|
191
190
|
children: "div";
|
|
192
191
|
}>>;
|
|
193
|
-
type ControlFolderProps = React.ComponentProps<typeof ControlFolder>;
|
|
192
|
+
type ControlFolderProps = React.ComponentProps<typeof ControlFolder>;
|
|
194
193
|
//#endregion
|
|
195
194
|
export { ControlFolder, ControlFolderProps };
|
|
@@ -12,25 +12,25 @@ const ControlFolder = createComponent(({ props, label, defaultOpen = false, chil
|
|
|
12
12
|
const toggle = useCallback(() => {
|
|
13
13
|
setIsOpen((prev) => !prev);
|
|
14
14
|
}, []);
|
|
15
|
-
return
|
|
15
|
+
return jsxs("div", {
|
|
16
16
|
...props.root,
|
|
17
|
-
children: [
|
|
17
|
+
children: [jsxs("button", {
|
|
18
18
|
type: "button",
|
|
19
19
|
onClick: toggle,
|
|
20
20
|
"aria-expanded": isOpen,
|
|
21
21
|
...props.header,
|
|
22
|
-
children: [
|
|
22
|
+
children: [jsx("span", {
|
|
23
23
|
style: { transform: isOpen ? "rotate(90deg)" : "rotate(0deg)" },
|
|
24
24
|
...props.chevron,
|
|
25
25
|
children: "▶"
|
|
26
|
-
}),
|
|
26
|
+
}), jsx("span", {
|
|
27
27
|
...props.label,
|
|
28
28
|
children: label
|
|
29
29
|
})]
|
|
30
|
-
}),
|
|
30
|
+
}), jsx("div", {
|
|
31
31
|
style: { maxHeight: isOpen ? 1e3 : 0 },
|
|
32
32
|
...props.content,
|
|
33
|
-
children:
|
|
33
|
+
children: jsx("div", {
|
|
34
34
|
...props.children,
|
|
35
35
|
children
|
|
36
36
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-group.config.d.ts
|
|
3
|
-
//#region src/control-group.config.d.ts
|
|
4
3
|
declare const controlGroupConfig: ComponentConfig<{
|
|
5
4
|
ControlGroup: {
|
|
6
5
|
readonly base: {
|
|
@@ -855,6 +854,6 @@ declare const controlGroupConfig: ComponentConfig<{
|
|
|
855
854
|
};
|
|
856
855
|
};
|
|
857
856
|
}, {}>;
|
|
858
|
-
type ControlGroupConfig = typeof controlGroupConfig;
|
|
857
|
+
type ControlGroupConfig = typeof controlGroupConfig;
|
|
859
858
|
//#endregion
|
|
860
859
|
export { ControlGroupConfig, controlGroupConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-group.d.ts
|
|
6
|
-
//#region src/control-group.d.ts
|
|
7
6
|
interface ControlGroupOption {
|
|
8
7
|
id: string;
|
|
9
8
|
label: string;
|
|
@@ -877,6 +876,6 @@ declare const ControlGroup: _$react.FC<_$_uds_types0.CreateComponentProps<Compon
|
|
|
877
876
|
activeItem: "button";
|
|
878
877
|
indicator: "div";
|
|
879
878
|
}>>;
|
|
880
|
-
type ControlGroupProps = React.ComponentProps<typeof ControlGroup>;
|
|
879
|
+
type ControlGroupProps = React.ComponentProps<typeof ControlGroup>;
|
|
881
880
|
//#endregion
|
|
882
881
|
export { ControlGroup, ControlGroupOption, ControlGroupProps };
|
|
@@ -56,19 +56,19 @@ const ControlGroup = createComponent(({ props, options, value, onChange, type =
|
|
|
56
56
|
onChange,
|
|
57
57
|
disabled
|
|
58
58
|
]);
|
|
59
|
-
return
|
|
59
|
+
return jsxs("div", {
|
|
60
60
|
ref: rootRef,
|
|
61
61
|
role: type === "single" ? "radiogroup" : "group",
|
|
62
62
|
"data-disabled": disabled || void 0,
|
|
63
63
|
style: { position: "relative" },
|
|
64
64
|
...props.root,
|
|
65
|
-
children: [type === "single" &&
|
|
65
|
+
children: [type === "single" && jsx("div", {
|
|
66
66
|
style: indicatorStyle,
|
|
67
67
|
...props.indicator
|
|
68
68
|
}), options.map((option) => {
|
|
69
69
|
const active = isActive(option.id);
|
|
70
70
|
const className = active ? [props.item?.className, props.activeItem?.className].filter(Boolean).join(" ") : props.item?.className;
|
|
71
|
-
return
|
|
71
|
+
return jsx("button", {
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-pressed": active,
|
|
74
74
|
"data-state": active ? "active" : "inactive",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-knob.config.d.ts
|
|
3
|
-
//#region src/control-knob.config.d.ts
|
|
4
3
|
declare const controlKnobConfig: ComponentConfig<{
|
|
5
4
|
ControlKnob: {
|
|
6
5
|
readonly base: {
|
|
@@ -788,6 +787,6 @@ declare const controlKnobConfig: ComponentConfig<{
|
|
|
788
787
|
};
|
|
789
788
|
};
|
|
790
789
|
}, {}>;
|
|
791
|
-
type ControlKnobConfig = typeof controlKnobConfig;
|
|
790
|
+
type ControlKnobConfig = typeof controlKnobConfig;
|
|
792
791
|
//#endregion
|
|
793
792
|
export { ControlKnobConfig, controlKnobConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-knob.d.ts
|
|
6
|
-
//#region src/control-knob.d.ts
|
|
7
6
|
declare const DIAL_SIZES: {
|
|
8
7
|
readonly sm: 36;
|
|
9
8
|
readonly md: 64;
|
|
@@ -815,6 +814,6 @@ declare const ControlKnob: _$react.FC<_$_uds_types0.CreateComponentProps<Compone
|
|
|
815
814
|
label: "span";
|
|
816
815
|
value: "span";
|
|
817
816
|
}>>;
|
|
818
|
-
type ControlKnobProps = React.ComponentProps<typeof ControlKnob>;
|
|
817
|
+
type ControlKnobProps = React.ComponentProps<typeof ControlKnob>;
|
|
819
818
|
//#endregion
|
|
820
819
|
export { ControlKnob, ControlKnobProps };
|
|
@@ -91,14 +91,14 @@ const ControlKnob = createComponent(({ props, value: rawValue, onChange, min = 0
|
|
|
91
91
|
const trackPath = describeArc(cx, cy, radius, START_ANGLE, END_ANGLE);
|
|
92
92
|
const fillPath = currentAngle > START_ANGLE ? describeArc(cx, cy, radius, START_ANGLE, currentAngle) : "";
|
|
93
93
|
const thumbPos = polarToCartesian(cx, cy, radius, currentAngle);
|
|
94
|
-
return
|
|
94
|
+
return jsxs("div", {
|
|
95
95
|
...props.root,
|
|
96
96
|
children: [
|
|
97
|
-
label &&
|
|
97
|
+
label && jsx("span", {
|
|
98
98
|
...props.label,
|
|
99
99
|
children: label
|
|
100
100
|
}),
|
|
101
|
-
|
|
101
|
+
jsx("div", {
|
|
102
102
|
role: "slider",
|
|
103
103
|
tabIndex: 0,
|
|
104
104
|
"aria-valuemin": min,
|
|
@@ -109,25 +109,25 @@ const ControlKnob = createComponent(({ props, value: rawValue, onChange, min = 0
|
|
|
109
109
|
onPointerMove: handlePointerMove,
|
|
110
110
|
onPointerUp: handlePointerUp,
|
|
111
111
|
style: { touchAction: "none" },
|
|
112
|
-
children:
|
|
112
|
+
children: jsxs("svg", {
|
|
113
113
|
ref: svgRef,
|
|
114
114
|
width: dialSize,
|
|
115
115
|
height: dialSize,
|
|
116
116
|
viewBox: `0 0 ${dialSize} ${dialSize}`,
|
|
117
117
|
children: [
|
|
118
|
-
|
|
118
|
+
jsx("path", {
|
|
119
119
|
d: trackPath,
|
|
120
120
|
strokeWidth,
|
|
121
121
|
strokeLinecap: "round",
|
|
122
122
|
...props.track
|
|
123
123
|
}),
|
|
124
|
-
fillPath &&
|
|
124
|
+
fillPath && jsx("path", {
|
|
125
125
|
d: fillPath,
|
|
126
126
|
strokeWidth,
|
|
127
127
|
strokeLinecap: "round",
|
|
128
128
|
...props.fill
|
|
129
129
|
}),
|
|
130
|
-
|
|
130
|
+
jsx("circle", {
|
|
131
131
|
cx: thumbPos.x,
|
|
132
132
|
cy: thumbPos.y,
|
|
133
133
|
r: thumbRadius,
|
|
@@ -137,7 +137,7 @@ const ControlKnob = createComponent(({ props, value: rawValue, onChange, min = 0
|
|
|
137
137
|
]
|
|
138
138
|
})
|
|
139
139
|
}),
|
|
140
|
-
|
|
140
|
+
jsx("span", {
|
|
141
141
|
...props.value,
|
|
142
142
|
children: value
|
|
143
143
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-panel.config.d.ts
|
|
3
|
-
//#region src/control-panel.config.d.ts
|
|
4
3
|
declare const controlPanelConfig: ComponentConfig<{
|
|
5
4
|
ControlPanel: {
|
|
6
5
|
readonly base: {
|
|
@@ -398,6 +397,6 @@ declare const controlPanelConfig: ComponentConfig<{
|
|
|
398
397
|
};
|
|
399
398
|
};
|
|
400
399
|
}, {}>;
|
|
401
|
-
type ControlPanelConfig = typeof controlPanelConfig;
|
|
400
|
+
type ControlPanelConfig = typeof controlPanelConfig;
|
|
402
401
|
//#endregion
|
|
403
402
|
export { ControlPanelConfig, controlPanelConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-panel.d.ts
|
|
6
|
-
//#region src/control-panel.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* @description A titled container for grouping property controls and settings
|
|
9
8
|
*/
|
|
@@ -411,6 +410,6 @@ declare const ControlPanel: _$react.FC<_$_uds_types0.CreateComponentProps<Compon
|
|
|
411
410
|
title: "span";
|
|
412
411
|
items: "div";
|
|
413
412
|
}>>;
|
|
414
|
-
type ControlPanelProps = React.ComponentProps<typeof ControlPanel>;
|
|
413
|
+
type ControlPanelProps = React.ComponentProps<typeof ControlPanel>;
|
|
415
414
|
//#endregion
|
|
416
415
|
export { ControlPanel, ControlPanelProps };
|
|
@@ -7,12 +7,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* @description A titled container for grouping property controls and settings
|
|
8
8
|
*/
|
|
9
9
|
const ControlPanel = createComponent(({ props, title, children }) => {
|
|
10
|
-
return
|
|
10
|
+
return jsxs("div", {
|
|
11
11
|
...props.root,
|
|
12
|
-
children: [title &&
|
|
12
|
+
children: [title && jsx("span", {
|
|
13
13
|
...props.title,
|
|
14
14
|
children: title
|
|
15
|
-
}),
|
|
15
|
+
}), jsx("div", {
|
|
16
16
|
...props.items,
|
|
17
17
|
children
|
|
18
18
|
})]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentConfig } from "../../config/dist/createConfig.js";
|
|
2
2
|
//#region ../components/dist/control-select.config.d.ts
|
|
3
|
-
//#region src/control-select.config.d.ts
|
|
4
3
|
declare const controlSelectConfig: ComponentConfig<{
|
|
5
4
|
ControlSelect: {
|
|
6
5
|
readonly base: {
|
|
@@ -1172,6 +1171,6 @@ declare const controlSelectConfig: ComponentConfig<{
|
|
|
1172
1171
|
};
|
|
1173
1172
|
};
|
|
1174
1173
|
}, {}>;
|
|
1175
|
-
type ControlSelectConfig = typeof controlSelectConfig;
|
|
1174
|
+
type ControlSelectConfig = typeof controlSelectConfig;
|
|
1176
1175
|
//#endregion
|
|
1177
1176
|
export { ControlSelectConfig, controlSelectConfig };
|
|
@@ -3,7 +3,6 @@ import * as _$react from "react";
|
|
|
3
3
|
import * as _$_uds_types0 from "@uds/types";
|
|
4
4
|
|
|
5
5
|
//#region ../components/dist/control-select.d.ts
|
|
6
|
-
//#region src/control-select.d.ts
|
|
7
6
|
interface SelectOption {
|
|
8
7
|
id: string;
|
|
9
8
|
label: string;
|
|
@@ -1196,6 +1195,6 @@ declare const ControlSelect: _$react.FC<_$_uds_types0.CreateComponentProps<Compo
|
|
|
1196
1195
|
option: "button";
|
|
1197
1196
|
optionLabel: "span";
|
|
1198
1197
|
}>>;
|
|
1199
|
-
type ControlSelectProps = React.ComponentProps<typeof ControlSelect>;
|
|
1198
|
+
type ControlSelectProps = React.ComponentProps<typeof ControlSelect>;
|
|
1200
1199
|
//#endregion
|
|
1201
1200
|
export { ControlSelect, ControlSelectProps, SelectOption };
|