@techsio/ui-kit 0.45.0 → 0.46.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/atoms/hotkeys.js +52 -0
- package/dist/hotkeys.js +108 -0
- package/dist/internal/molecules/command.context.js +14 -0
- package/dist/molecules/command.js +177 -0
- package/dist/src/atoms/hotkeys.d.ts +29 -0
- package/dist/src/atoms/hotkeys.d.ts.map +1 -0
- package/dist/src/hotkeys.d.ts +19 -0
- package/dist/src/hotkeys.d.ts.map +1 -0
- package/dist/src/internal/molecules/command.context.d.ts +6 -0
- package/dist/src/internal/molecules/command.context.d.ts.map +1 -0
- package/dist/src/molecules/command.d.ts +51 -0
- package/dist/src/molecules/command.d.ts.map +1 -0
- package/dist/src/molecules/toast.d.ts +9 -9
- package/dist/src/types/zag.d.ts +1 -0
- package/dist/src/types/zag.d.ts.map +1 -1
- package/dist/stories/atoms/hotkeys-hydration.fixture.d.ts +6 -0
- package/dist/stories/atoms/hotkeys-hydration.fixture.d.ts.map +1 -0
- package/dist/stories/atoms/hotkeys.stories.d.ts +336 -0
- package/dist/stories/atoms/hotkeys.stories.d.ts.map +1 -0
- package/dist/stories/changelog/changelog.stories.d.ts.map +1 -1
- package/dist/stories/molecules/command-hotkeys.stories.d.ts +38 -0
- package/dist/stories/molecules/command-hotkeys.stories.d.ts.map +1 -0
- package/dist/stories/molecules/command.stories.d.ts +74 -0
- package/dist/stories/molecules/command.stories.d.ts.map +1 -0
- package/dist/test/command-hotkeys.spec.d.ts +2 -0
- package/dist/test/command-hotkeys.spec.d.ts.map +1 -0
- package/dist/test/command.spec.d.ts +2 -0
- package/dist/test/command.spec.d.ts.map +1 -0
- package/dist/test/hotkeys.spec.d.ts +2 -0
- package/dist/test/hotkeys.spec.d.ts.map +1 -0
- package/package.json +6 -1
- package/src/tokens/components/atoms/_hotkeys.css +36 -0
- package/src/tokens/components/components.css +2 -0
- package/src/tokens/components/molecules/_command.css +43 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useFormatHotkey } from "../hotkeys.js";
|
|
3
|
+
import { tv } from "../utils.js";
|
|
4
|
+
const hotkeysStyles = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "inline-flex items-center gap-hotkeys whitespace-nowrap font-hotkeys text-hotkeys-sm",
|
|
7
|
+
key: "hotkeys-key-border-width inline-flex items-center justify-center rounded-hotkeys-key border-hotkeys-key-border bg-hotkeys-key-bg px-hotkeys-key-x py-hotkeys-key-y text-hotkeys-key-fg",
|
|
8
|
+
separator: "text-hotkeys-separator-fg"
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function Hotkeys({ hotkey, formatOptions, children, className, ref, ...props }) {
|
|
12
|
+
const format = useFormatHotkey();
|
|
13
|
+
return /*#__PURE__*/ jsx("span", {
|
|
14
|
+
...props,
|
|
15
|
+
className: hotkeysStyles().root({
|
|
16
|
+
className
|
|
17
|
+
}),
|
|
18
|
+
"data-part": "root",
|
|
19
|
+
"data-scope": "hotkeys",
|
|
20
|
+
ref: ref,
|
|
21
|
+
children: children ?? (void 0 !== hotkey ? /*#__PURE__*/ jsx(Hotkeys.Key, {
|
|
22
|
+
children: format(hotkey, formatOptions)
|
|
23
|
+
}) : null)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
Hotkeys.Key = function({ className, ref, ...props }) {
|
|
27
|
+
return /*#__PURE__*/ jsx("kbd", {
|
|
28
|
+
...props,
|
|
29
|
+
className: hotkeysStyles().key({
|
|
30
|
+
className
|
|
31
|
+
}),
|
|
32
|
+
"data-part": "key",
|
|
33
|
+
"data-scope": "hotkeys",
|
|
34
|
+
ref: ref
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
Hotkeys.Separator = function({ children = "+", className, ref, ...props }) {
|
|
38
|
+
return /*#__PURE__*/ jsx("span", {
|
|
39
|
+
...props,
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
className: hotkeysStyles().separator({
|
|
42
|
+
className
|
|
43
|
+
}),
|
|
44
|
+
"data-part": "separator",
|
|
45
|
+
"data-scope": "hotkeys",
|
|
46
|
+
ref: ref,
|
|
47
|
+
children: children
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
Hotkeys.Root = Hotkeys;
|
|
51
|
+
Hotkeys.displayName = "Hotkeys";
|
|
52
|
+
export { Hotkeys };
|
package/dist/hotkeys.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createHotkeyStore, formatHotkey } from "@zag-js/hotkeys";
|
|
2
|
+
import { useEffect, useId, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
3
|
+
function useHotkey({ store, id, ...command }) {
|
|
4
|
+
const generatedId = useId();
|
|
5
|
+
useHotkeys({
|
|
6
|
+
store,
|
|
7
|
+
commands: [
|
|
8
|
+
{
|
|
9
|
+
...command,
|
|
10
|
+
id: id ?? generatedId
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function sameValues(left, right) {
|
|
16
|
+
if (Object.is(left, right)) return true;
|
|
17
|
+
return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((value, index)=>Object.is(value, right[index]));
|
|
18
|
+
}
|
|
19
|
+
function sameOptions(left, right) {
|
|
20
|
+
return left?.capture === right?.capture && left?.eventType === right?.eventType && left?.preventDefault === right?.preventDefault && left?.stopPropagation === right?.stopPropagation && left?.requireReset === right?.requireReset && left?.enableOnContentEditable === right?.enableOnContentEditable && sameValues(left?.enableOnFormTags, right?.enableOnFormTags) && left?.target === right?.target;
|
|
21
|
+
}
|
|
22
|
+
function sameRegistration(left, right) {
|
|
23
|
+
return left.hotkey === right.hotkey && left.label === right.label && left.description === right.description && left.category === right.category && sameValues(left.scopes, right.scopes) && sameValues(left.keywords, right.keywords) && sameOptions(left.options, right.options);
|
|
24
|
+
}
|
|
25
|
+
function readEnabled(command) {
|
|
26
|
+
const value = command?.enabled;
|
|
27
|
+
return "function" == typeof value ? value() : value ?? false;
|
|
28
|
+
}
|
|
29
|
+
function syncCommand(store, command, previous, getCurrent) {
|
|
30
|
+
const enabled = "function" == typeof command.enabled ? ()=>readEnabled(getCurrent()) : command.enabled ?? true;
|
|
31
|
+
const enabledUnchanged = previous?.enabled === command.enabled || "function" == typeof previous?.enabled && "function" == typeof command.enabled;
|
|
32
|
+
if (previous && sameRegistration(previous, command)) {
|
|
33
|
+
if (!enabledUnchanged) store.setEnabled(command.id, enabled);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (previous) store.unregister(command.id);
|
|
37
|
+
store.register({
|
|
38
|
+
...command,
|
|
39
|
+
action: (event)=>getCurrent()?.action(event),
|
|
40
|
+
enabled
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function useHotkeys({ store, commands }) {
|
|
44
|
+
const current = useRef(commands);
|
|
45
|
+
const registered = useRef(new Map());
|
|
46
|
+
useLayoutEffect(()=>{
|
|
47
|
+
current.current = commands;
|
|
48
|
+
});
|
|
49
|
+
useEffect(()=>{
|
|
50
|
+
const owned = registered.current;
|
|
51
|
+
return ()=>{
|
|
52
|
+
for (const id of owned.keys())store.unregister(id);
|
|
53
|
+
owned.clear();
|
|
54
|
+
};
|
|
55
|
+
}, [
|
|
56
|
+
store
|
|
57
|
+
]);
|
|
58
|
+
useEffect(()=>{
|
|
59
|
+
const owned = registered.current;
|
|
60
|
+
for (const id of owned.keys())if (!commands.some((command)=>command.id === id)) {
|
|
61
|
+
owned.delete(id);
|
|
62
|
+
store.unregister(id);
|
|
63
|
+
}
|
|
64
|
+
for (const command of commands){
|
|
65
|
+
const previous = owned.get(command.id);
|
|
66
|
+
owned.set(command.id, command);
|
|
67
|
+
syncCommand(store, command, previous, ()=>current.current.find((item)=>item.id === command.id));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const emptyRegistrations = [];
|
|
72
|
+
const getServerRegistrations = ()=>emptyRegistrations;
|
|
73
|
+
function useHotkeyRegistrations({ store }) {
|
|
74
|
+
const subscription = useMemo(()=>{
|
|
75
|
+
let snapshot = [];
|
|
76
|
+
const getSnapshot = ()=>{
|
|
77
|
+
const commands = [
|
|
78
|
+
...store.getState().commands.values()
|
|
79
|
+
];
|
|
80
|
+
if (commands.length !== snapshot.length || commands.some((command, index)=>{
|
|
81
|
+
const previous = snapshot[index];
|
|
82
|
+
return !previous || command._registrationOrder !== previous._registrationOrder || command.enabled !== previous.enabled || command.options !== previous.options || command._parsed !== previous._parsed;
|
|
83
|
+
})) snapshot = commands.map((command)=>({
|
|
84
|
+
...command
|
|
85
|
+
}));
|
|
86
|
+
return snapshot;
|
|
87
|
+
};
|
|
88
|
+
return {
|
|
89
|
+
getSnapshot,
|
|
90
|
+
subscribe: (notify)=>store.subscribe(getSnapshot, notify)
|
|
91
|
+
};
|
|
92
|
+
}, [
|
|
93
|
+
store
|
|
94
|
+
]);
|
|
95
|
+
return useSyncExternalStore(subscription.subscribe, subscription.getSnapshot, getServerRegistrations);
|
|
96
|
+
}
|
|
97
|
+
const subscribeToHydration = ()=>()=>{};
|
|
98
|
+
const getClientHydration = ()=>true;
|
|
99
|
+
const getServerHydration = ()=>false;
|
|
100
|
+
function useFormatHotkey() {
|
|
101
|
+
const hydrated = useSyncExternalStore(subscribeToHydration, getClientHydration, getServerHydration);
|
|
102
|
+
const defaultPlatform = hydrated ? "auto" : "windows";
|
|
103
|
+
return (hotkey, options)=>formatHotkey(hotkey, {
|
|
104
|
+
...options,
|
|
105
|
+
platform: options?.platform && "auto" !== options.platform ? options.platform : defaultPlatform
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export { createHotkeyStore, useFormatHotkey, useHotkey, useHotkeyRegistrations, useHotkeys };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const CommandContext = createContext(null);
|
|
3
|
+
const CommandItemContext = createContext(null);
|
|
4
|
+
function useCommandContext() {
|
|
5
|
+
const api = useContext(CommandContext);
|
|
6
|
+
if (!api) throw new Error("Command components must be used within Command.Root");
|
|
7
|
+
return api;
|
|
8
|
+
}
|
|
9
|
+
function useCommandItemContext() {
|
|
10
|
+
const item = useContext(CommandItemContext);
|
|
11
|
+
if (!item) throw new Error("Command.ItemText must be used within Command.Item");
|
|
12
|
+
return item;
|
|
13
|
+
}
|
|
14
|
+
export { CommandContext, CommandItemContext, useCommandContext, useCommandItemContext };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createFilter } from "@zag-js/i18n-utils";
|
|
3
|
+
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
4
|
+
import { useEffect, useId, useMemo, useState } from "react";
|
|
5
|
+
import { Input } from "../atoms/input.js";
|
|
6
|
+
import { Label } from "../atoms/label.js";
|
|
7
|
+
import { CommandContext, CommandItemContext, useCommandContext, useCommandItemContext } from "../internal/molecules/command.context.js";
|
|
8
|
+
import { tv } from "../utils.js";
|
|
9
|
+
import * as __rspack_external__zag_js_combobox_6371d768 from "@zag-js/combobox";
|
|
10
|
+
const commandVariants = tv({
|
|
11
|
+
slots: {
|
|
12
|
+
root: "command-border-width flex w-full flex-col gap-command-gap rounded-command border-command-border bg-command-bg p-command text-command-fg text-command-md",
|
|
13
|
+
control: "relative flex items-center",
|
|
14
|
+
list: "max-h-command-list-max overflow-y-auto overscroll-contain p-command-list",
|
|
15
|
+
item: "flex w-full cursor-pointer select-none items-center gap-command-item-gap rounded-command-item px-command-item-x py-command-item-y data-disabled:cursor-not-allowed data-highlighted:bg-command-item-bg-highlighted data-disabled:text-command-item-fg-disabled",
|
|
16
|
+
itemText: "min-w-0 flex-1",
|
|
17
|
+
itemGroup: "",
|
|
18
|
+
itemGroupLabel: "px-command-item-x py-command-item-y font-command-group-label text-command-group-label-fg",
|
|
19
|
+
empty: "text-center text-command-empty-fg data-empty:p-command-empty"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
function Command({ items, children, id, className, ref, disabled, loopFocus = true, onSelect, locale, inputValue, defaultInputValue = "", onInputValueChange, onEscape }) {
|
|
23
|
+
const generatedId = useId();
|
|
24
|
+
const [uncontrolledQuery, setUncontrolledQuery] = useState(defaultInputValue);
|
|
25
|
+
const query = inputValue ?? uncontrolledQuery;
|
|
26
|
+
const collection = useMemo(()=>{
|
|
27
|
+
const filter = createFilter({
|
|
28
|
+
sensitivity: "base",
|
|
29
|
+
locale
|
|
30
|
+
});
|
|
31
|
+
return __rspack_external__zag_js_combobox_6371d768.collection({
|
|
32
|
+
items: items.filter((item)=>filter.contains(item.label, query) || item.keywords?.some((keyword)=>filter.contains(keyword, query))),
|
|
33
|
+
itemToValue: (item)=>item.value,
|
|
34
|
+
itemToString: (item)=>item.label,
|
|
35
|
+
isItemDisabled: (item)=>!!item.disabled
|
|
36
|
+
});
|
|
37
|
+
}, [
|
|
38
|
+
items,
|
|
39
|
+
query,
|
|
40
|
+
locale
|
|
41
|
+
]);
|
|
42
|
+
const service = useMachine(__rspack_external__zag_js_combobox_6371d768.machine, {
|
|
43
|
+
id: id ?? generatedId,
|
|
44
|
+
collection,
|
|
45
|
+
disabled,
|
|
46
|
+
loopFocus,
|
|
47
|
+
onSelect,
|
|
48
|
+
inputValue: query,
|
|
49
|
+
onInputValueChange (details) {
|
|
50
|
+
if (void 0 === inputValue) setUncontrolledQuery(details.inputValue);
|
|
51
|
+
onInputValueChange?.(details);
|
|
52
|
+
},
|
|
53
|
+
onOpenChange (details) {
|
|
54
|
+
if (!details.open && "escape-key" === details.reason) onEscape?.();
|
|
55
|
+
},
|
|
56
|
+
open: true,
|
|
57
|
+
disableLayer: true,
|
|
58
|
+
inputBehavior: "autohighlight",
|
|
59
|
+
selectionBehavior: "preserve",
|
|
60
|
+
closeOnSelect: false
|
|
61
|
+
});
|
|
62
|
+
const api = __rspack_external__zag_js_combobox_6371d768.connect(service, normalizeProps);
|
|
63
|
+
useEffect(()=>{
|
|
64
|
+
if (api.collection.find(api.highlightedValue)?.disabled) api.clearHighlightValue();
|
|
65
|
+
}, [
|
|
66
|
+
api
|
|
67
|
+
]);
|
|
68
|
+
return /*#__PURE__*/ jsx(CommandContext.Provider, {
|
|
69
|
+
value: api,
|
|
70
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
71
|
+
...api.getRootProps(),
|
|
72
|
+
className: commandVariants().root({
|
|
73
|
+
className
|
|
74
|
+
}),
|
|
75
|
+
ref: ref,
|
|
76
|
+
children: children
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
Command.Root = Command;
|
|
81
|
+
Command.Label = function({ children, ...props }) {
|
|
82
|
+
const api = useCommandContext();
|
|
83
|
+
return /*#__PURE__*/ jsx(Label, {
|
|
84
|
+
...mergeProps(props, api.getLabelProps()),
|
|
85
|
+
children: children
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
Command.Control = function({ className, ...props }) {
|
|
89
|
+
const api = useCommandContext();
|
|
90
|
+
return /*#__PURE__*/ jsx("div", {
|
|
91
|
+
...mergeProps(props, api.getControlProps()),
|
|
92
|
+
className: commandVariants().control({
|
|
93
|
+
className
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
Command.Input = function({ size, ...props }) {
|
|
98
|
+
const api = useCommandContext();
|
|
99
|
+
return /*#__PURE__*/ jsx(Input, {
|
|
100
|
+
...mergeProps(props, api.getInputProps()),
|
|
101
|
+
size: size
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
Command.List = function({ className, ...props }) {
|
|
105
|
+
const api = useCommandContext();
|
|
106
|
+
return /*#__PURE__*/ jsx("div", {
|
|
107
|
+
...mergeProps(props, api.getContentProps()),
|
|
108
|
+
className: commandVariants().list({
|
|
109
|
+
className
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
Command.ItemGroup = function({ id, className, ...props }) {
|
|
114
|
+
const api = useCommandContext();
|
|
115
|
+
return /*#__PURE__*/ jsx("div", {
|
|
116
|
+
...mergeProps(props, api.getItemGroupProps({
|
|
117
|
+
id
|
|
118
|
+
})),
|
|
119
|
+
className: commandVariants().itemGroup({
|
|
120
|
+
className
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
Command.ItemGroupLabel = function({ htmlFor, className, ...props }) {
|
|
125
|
+
const api = useCommandContext();
|
|
126
|
+
return /*#__PURE__*/ jsx("div", {
|
|
127
|
+
...mergeProps(props, api.getItemGroupLabelProps({
|
|
128
|
+
htmlFor
|
|
129
|
+
})),
|
|
130
|
+
className: commandVariants().itemGroupLabel({
|
|
131
|
+
className
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
Command.Item = function({ item, className, ...props }) {
|
|
136
|
+
const api = useCommandContext();
|
|
137
|
+
return /*#__PURE__*/ jsx(CommandItemContext.Provider, {
|
|
138
|
+
value: item,
|
|
139
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
140
|
+
...mergeProps(props, api.getItemProps({
|
|
141
|
+
item
|
|
142
|
+
})),
|
|
143
|
+
className: commandVariants().item({
|
|
144
|
+
className
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
Command.ItemText = function({ className, children, ...props }) {
|
|
150
|
+
const api = useCommandContext();
|
|
151
|
+
const item = useCommandItemContext();
|
|
152
|
+
return /*#__PURE__*/ jsx("span", {
|
|
153
|
+
...mergeProps(props, api.getItemTextProps({
|
|
154
|
+
item
|
|
155
|
+
})),
|
|
156
|
+
className: commandVariants().itemText({
|
|
157
|
+
className
|
|
158
|
+
}),
|
|
159
|
+
children: children ?? item.label
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
Command.Context = function({ children }) {
|
|
163
|
+
return children(useCommandContext());
|
|
164
|
+
};
|
|
165
|
+
Command.Empty = function({ children, className, ...props }) {
|
|
166
|
+
const api = useCommandContext();
|
|
167
|
+
const empty = 0 === api.collection.size;
|
|
168
|
+
return /*#__PURE__*/ jsx("output", {
|
|
169
|
+
...props,
|
|
170
|
+
className: commandVariants().empty({
|
|
171
|
+
className
|
|
172
|
+
}),
|
|
173
|
+
"data-empty": empty || void 0,
|
|
174
|
+
children: empty ? children : null
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
export { Command };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hotkeys — @techsio/ui-kit atom.
|
|
3
|
+
*
|
|
4
|
+
* @component Hotkeys
|
|
5
|
+
* @componentVersion v1.0.1
|
|
6
|
+
* @skill hotkeys-usage
|
|
7
|
+
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentPropsWithoutRef, Ref } from "react";
|
|
10
|
+
import { type HotkeyFormatOptions } from "../hotkeys.js";
|
|
11
|
+
export type HotkeysProps = ComponentPropsWithoutRef<"span"> & {
|
|
12
|
+
hotkey?: string;
|
|
13
|
+
formatOptions?: HotkeyFormatOptions;
|
|
14
|
+
ref?: Ref<HTMLSpanElement>;
|
|
15
|
+
};
|
|
16
|
+
export declare function Hotkeys({ hotkey, formatOptions, children, className, ref, ...props }: HotkeysProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace Hotkeys {
|
|
18
|
+
var Key: ({ className, ref, ...props }: HotkeysKeyProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
var Separator: ({ children, className, ref, ...props }: HotkeysSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
var Root: typeof Hotkeys;
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export type HotkeysKeyProps = ComponentPropsWithoutRef<"kbd"> & {
|
|
24
|
+
ref?: Ref<HTMLElement>;
|
|
25
|
+
};
|
|
26
|
+
export type HotkeysSeparatorProps = ComponentPropsWithoutRef<"span"> & {
|
|
27
|
+
ref?: Ref<HTMLSpanElement>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=hotkeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../../src/atoms/hotkeys.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,KAAK,mBAAmB,EAAmB,MAAM,YAAY,CAAA;AAWtE,MAAM,MAAM,YAAY,GAAG,wBAAwB,CAAC,MAAM,CAAC,GAAG;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;CAC3B,CAAA;AAED,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,YAAY,2CAgBd;yBAvBe,OAAO;4CAiCpB,eAAe;4DAqBf,qBAAqB;;;;AA7BxB,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC9D,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;CACvB,CAAA;AAkBD,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,MAAM,CAAC,GAAG;IACrE,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;CAC3B,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CommandDefinition, type HotkeyCommand, type HotkeyFormatOptions, type HotkeyStore } from "@zag-js/hotkeys";
|
|
2
|
+
export { createHotkeyStore } from "@zag-js/hotkeys";
|
|
3
|
+
export type { CommandDefinition, HotkeyAction, HotkeyCommand, HotkeyFormatOptions, HotkeyOptions, HotkeyStore, HotkeyStoreOptions, } from "@zag-js/hotkeys";
|
|
4
|
+
export type UseHotkeyProps = Omit<CommandDefinition, "id"> & {
|
|
5
|
+
store: HotkeyStore;
|
|
6
|
+
id?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function useHotkey({ store, id, ...command }: UseHotkeyProps): void;
|
|
9
|
+
export type UseHotkeysProps = {
|
|
10
|
+
store: HotkeyStore;
|
|
11
|
+
commands: CommandDefinition[];
|
|
12
|
+
};
|
|
13
|
+
export declare function useHotkeys({ store, commands }: UseHotkeysProps): void;
|
|
14
|
+
export type UseHotkeyRegistrationsProps = {
|
|
15
|
+
store: HotkeyStore;
|
|
16
|
+
};
|
|
17
|
+
export declare function useHotkeyRegistrations({ store }: UseHotkeyRegistrationsProps): HotkeyCommand[];
|
|
18
|
+
export declare function useFormatHotkey(): (hotkey: string, options?: HotkeyFormatOptions) => string;
|
|
19
|
+
//# sourceMappingURL=hotkeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../src/hotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAExB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAWxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,GAAG;IAC3D,KAAK,EAAE,WAAW,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,cAAc,QAGlE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,EAAE,iBAAiB,EAAE,CAAA;CAC9B,CAAA;AA4ED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,eAAe,QAmC9D;AAED,MAAM,MAAM,2BAA2B,GAAG;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,CAAA;AAKhE,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,mBAiC5E;AAQD,wBAAgB,eAAe,KAOrB,QAAQ,MAAM,EAAE,UAAU,mBAAmB,YAQtD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandApi, CommandItem } from "../../molecules/command.js";
|
|
2
|
+
export declare const CommandContext: import("react").Context<CommandApi | null>;
|
|
3
|
+
export declare const CommandItemContext: import("react").Context<CommandItem | null>;
|
|
4
|
+
export declare function useCommandContext(): CommandApi;
|
|
5
|
+
export declare function useCommandItemContext(): CommandItem;
|
|
6
|
+
//# sourceMappingURL=command.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.context.d.ts","sourceRoot":"","sources":["../../../../src/internal/molecules/command.context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEtE,eAAO,MAAM,cAAc,4CAAyC,CAAA;AACpE,eAAO,MAAM,kBAAkB,6CAA0C,CAAA;AAEzE,wBAAgB,iBAAiB,eAMhC;AAED,wBAAgB,qBAAqB,gBAMpC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command — @techsio/ui-kit molecule.
|
|
3
|
+
*
|
|
4
|
+
* @component Command
|
|
5
|
+
* @componentVersion v1.0.1
|
|
6
|
+
* @skill command-usage
|
|
7
|
+
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
|
+
*/
|
|
9
|
+
import * as combobox from "@zag-js/combobox";
|
|
10
|
+
import { type PropTypes } from "@zag-js/react";
|
|
11
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
12
|
+
export type CommandItem = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
group?: string;
|
|
18
|
+
};
|
|
19
|
+
export type CommandApi = combobox.Api<PropTypes, CommandItem>;
|
|
20
|
+
export type CommandProps = Pick<combobox.Props<CommandItem>, "disabled" | "loopFocus" | "onSelect" | "inputValue" | "defaultInputValue" | "onInputValueChange"> & {
|
|
21
|
+
items: CommandItem[];
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
id?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
ref?: ComponentProps<"div">["ref"];
|
|
26
|
+
locale?: string;
|
|
27
|
+
onEscape?: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare function Command({ items, children, id, className, ref, disabled, loopFocus, onSelect, locale, inputValue, defaultInputValue, onInputValueChange, onEscape, }: CommandProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Command {
|
|
31
|
+
var Root: typeof Command;
|
|
32
|
+
var Label: ({ children, ...props }: ComponentProps<typeof import("../atoms/label.js").Label>) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
var Control: ({ className, ...props }: ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
var Input: ({ size, ...props }: ComponentProps<typeof import("../atoms/input.js").Input>) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
var List: ({ className, ...props }: ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
var ItemGroup: ({ id, className, ...props }: ComponentProps<"div"> & {
|
|
37
|
+
id: string;
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
var ItemGroupLabel: ({ htmlFor, className, ...props }: ComponentProps<"div"> & {
|
|
40
|
+
htmlFor: string;
|
|
41
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
var Item: ({ item, className, ...props }: ComponentProps<"div"> & {
|
|
43
|
+
item: CommandItem;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
var ItemText: ({ className, children, ...props }: ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
var Context: ({ children, }: {
|
|
47
|
+
children: (api: CommandApi) => ReactNode;
|
|
48
|
+
}) => ReactNode;
|
|
49
|
+
var Empty: ({ children, className, ...props }: ComponentProps<"output">) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/molecules/command.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AAE5C,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAWd,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;AAC7D,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,EACzB,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,CACvB,GAAG;IACF,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAgBD,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,EAAE,EACF,SAAS,EACT,GAAG,EACH,QAAQ,EACR,SAAgB,EAChB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,iBAAsB,EACtB,kBAAkB,EAClB,QAAQ,GACT,EAAE,YAAY,2CA6Dd;yBA3Ee,OAAO;;wCAkFpB,cAAc,CAAC,qCAAY,CAAC;2CAQ5B,cAAc,CAAC,KAAK,CAAC;oCAarB,cAAc,CAAC,qCAAY,CAAC;wCAQ5B,cAAc,CAAC,KAAK,CAAC;iDAcrB,cAAc,CAAC,KAAK,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;2DActC,cAAc,CAAC,KAAK,CAAC,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;8CAc3C,cAAc,CAAC,KAAK,CAAC,GAAG;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE;sDAgB7C,cAAc,CAAC,MAAM,CAAC;iCAetB;QACD,QAAQ,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,SAAS,CAAA;KACzC;mDAQE,cAAc,CAAC,QAAQ,CAAC"}
|
|
@@ -4,24 +4,24 @@ import type { VariantProps } from "tailwind-variants";
|
|
|
4
4
|
declare const toastVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
[key: string]: {
|
|
6
6
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
7
|
-
title?: import("tailwind-merge").ClassNameValue;
|
|
8
7
|
description?: import("tailwind-merge").ClassNameValue;
|
|
9
|
-
|
|
10
|
-
icon?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
11
9
|
group?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
12
11
|
root?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
13
13
|
closeButton?: import("tailwind-merge").ClassNameValue;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
} | {
|
|
17
17
|
[x: string]: {
|
|
18
18
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
19
|
-
title?: import("tailwind-merge").ClassNameValue;
|
|
20
19
|
description?: import("tailwind-merge").ClassNameValue;
|
|
21
|
-
|
|
22
|
-
icon?: import("tailwind-merge").ClassNameValue;
|
|
20
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
23
21
|
group?: import("tailwind-merge").ClassNameValue;
|
|
22
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
24
23
|
root?: import("tailwind-merge").ClassNameValue;
|
|
24
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
25
25
|
closeButton?: import("tailwind-merge").ClassNameValue;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
@@ -36,12 +36,12 @@ declare const toastVariants: import("tailwind-variants").TVReturnType<{
|
|
|
36
36
|
}, undefined, {
|
|
37
37
|
[key: string]: {
|
|
38
38
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
39
|
-
title?: import("tailwind-merge").ClassNameValue;
|
|
40
39
|
description?: import("tailwind-merge").ClassNameValue;
|
|
41
|
-
|
|
42
|
-
icon?: import("tailwind-merge").ClassNameValue;
|
|
40
|
+
title?: import("tailwind-merge").ClassNameValue;
|
|
43
41
|
group?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
44
43
|
root?: import("tailwind-merge").ClassNameValue;
|
|
44
|
+
icon?: import("tailwind-merge").ClassNameValue;
|
|
45
45
|
closeButton?: import("tailwind-merge").ClassNameValue;
|
|
46
46
|
};
|
|
47
47
|
};
|
package/dist/src/types/zag.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type * as Combobox from "@zag-js/combobox";
|
|
|
6
6
|
export type * as Dialog from "@zag-js/dialog";
|
|
7
7
|
export type * as Drawer from "@zag-js/drawer";
|
|
8
8
|
export type * as FileUpload from "@zag-js/file-upload";
|
|
9
|
+
export type * as Hotkeys from "@zag-js/hotkeys";
|
|
9
10
|
export type * as Menu from "@zag-js/menu";
|
|
10
11
|
export type * as NumberInput from "@zag-js/number-input";
|
|
11
12
|
export type * as Pagination from "@zag-js/pagination";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zag.d.ts","sourceRoot":"","sources":["../../../src/types/zag.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,SAAS,MAAM,mBAAmB,CAAA;AACnD,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,aAAa,MAAM,wBAAwB,CAAA;AAC5D,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACtD,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACxD,YAAY,KAAK,UAAU,MAAM,oBAAoB,CAAA;AACrD,YAAY,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,YAAY,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACtD,YAAY,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACxD,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,KAAK,MAAM,eAAe,CAAA;AAC3C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,KAAK,MAAM,eAAe,CAAA;AAC3C,YAAY,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,QAAQ,MAAM,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"zag.d.ts","sourceRoot":"","sources":["../../../src/types/zag.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,SAAS,MAAM,mBAAmB,CAAA;AACnD,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,aAAa,MAAM,wBAAwB,CAAA;AAC5D,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AACjD,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACtD,YAAY,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACxD,YAAY,KAAK,UAAU,MAAM,oBAAoB,CAAA;AACrD,YAAY,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,YAAY,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACtD,YAAY,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACxD,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,KAAK,MAAM,eAAe,CAAA;AAC3C,YAAY,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAC7C,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,KAAK,MAAM,eAAe,CAAA;AAC3C,YAAY,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC/C,YAAY,KAAK,IAAI,MAAM,cAAc,CAAA;AACzC,YAAY,KAAK,QAAQ,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export declare function HotkeysHydrationFixture(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function HotkeysStrictModeFixture({ children, }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=hotkeys-hydration.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys-hydration.fixture.d.ts","sourceRoot":"","sources":["../../../stories/atoms/hotkeys-hydration.fixture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAA;AAK/E,wBAAgB,uBAAuB,4CA0BtC;AAED,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;CACpB,2CAoBA"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Hotkeys } from "../../src/atoms/hotkeys.js";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Hotkeys;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
controls: {
|
|
10
|
+
disable: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("storybook-react-rsbuild").ReactRenderer, {
|
|
14
|
+
id?: string | undefined | undefined;
|
|
15
|
+
content?: string | undefined | undefined;
|
|
16
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
17
|
+
color?: string | undefined | undefined;
|
|
18
|
+
prefix?: string | undefined | undefined;
|
|
19
|
+
onChange?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
20
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
21
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
22
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
23
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
24
|
+
accessKey?: string | undefined | undefined;
|
|
25
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
26
|
+
autoFocus?: boolean | undefined | undefined;
|
|
27
|
+
className?: string | undefined | undefined;
|
|
28
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
29
|
+
contextMenu?: string | undefined | undefined;
|
|
30
|
+
dir?: string | undefined | undefined;
|
|
31
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
32
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
33
|
+
hidden?: boolean | undefined | undefined;
|
|
34
|
+
lang?: string | undefined | undefined;
|
|
35
|
+
nonce?: string | undefined | undefined;
|
|
36
|
+
slot?: string | undefined | undefined;
|
|
37
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
38
|
+
style?: import("react").CSSProperties | undefined;
|
|
39
|
+
tabIndex?: number | undefined | undefined;
|
|
40
|
+
title?: string | undefined | undefined;
|
|
41
|
+
radioGroup?: string | undefined | undefined;
|
|
42
|
+
role?: import("react").AriaRole | undefined;
|
|
43
|
+
about?: string | undefined | undefined;
|
|
44
|
+
datatype?: string | undefined | undefined;
|
|
45
|
+
inlist?: any;
|
|
46
|
+
property?: string | undefined | undefined;
|
|
47
|
+
rel?: string | undefined | undefined;
|
|
48
|
+
resource?: string | undefined | undefined;
|
|
49
|
+
rev?: string | undefined | undefined;
|
|
50
|
+
typeof?: string | undefined | undefined;
|
|
51
|
+
vocab?: string | undefined | undefined;
|
|
52
|
+
autoCorrect?: string | undefined | undefined;
|
|
53
|
+
autoSave?: string | undefined | undefined;
|
|
54
|
+
itemProp?: string | undefined | undefined;
|
|
55
|
+
itemScope?: boolean | undefined | undefined;
|
|
56
|
+
itemType?: string | undefined | undefined;
|
|
57
|
+
itemID?: string | undefined | undefined;
|
|
58
|
+
itemRef?: string | undefined | undefined;
|
|
59
|
+
results?: number | undefined | undefined;
|
|
60
|
+
security?: string | undefined | undefined;
|
|
61
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
62
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
63
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
64
|
+
popoverTarget?: string | undefined | undefined;
|
|
65
|
+
inert?: boolean | undefined | undefined;
|
|
66
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
67
|
+
is?: string | undefined | undefined;
|
|
68
|
+
exportparts?: string | undefined | undefined;
|
|
69
|
+
part?: string | undefined | undefined;
|
|
70
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
71
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
72
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
73
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
74
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
75
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
76
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
77
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
78
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
79
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
80
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
81
|
+
"aria-controls"?: string | undefined | undefined;
|
|
82
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
83
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
84
|
+
"aria-description"?: string | undefined | undefined;
|
|
85
|
+
"aria-details"?: string | undefined | undefined;
|
|
86
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
88
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
89
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
90
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
91
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
92
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
93
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
94
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
95
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
96
|
+
"aria-label"?: string | undefined | undefined;
|
|
97
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
98
|
+
"aria-level"?: number | undefined | undefined;
|
|
99
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
100
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
102
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
104
|
+
"aria-owns"?: string | undefined | undefined;
|
|
105
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
106
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
107
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
108
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
109
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
110
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
111
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
112
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
113
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
114
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
115
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
116
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
117
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
118
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
119
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
120
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
121
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
122
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
123
|
+
children?: import("react").ReactNode;
|
|
124
|
+
dangerouslySetInnerHTML?: {
|
|
125
|
+
__html: string | TrustedHTML;
|
|
126
|
+
} | undefined | undefined;
|
|
127
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
128
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
129
|
+
onCut?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
130
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
131
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
132
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
|
|
133
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
134
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
135
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
136
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
137
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
138
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
|
|
139
|
+
onFocus?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
|
|
140
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
|
|
141
|
+
onBlur?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
|
|
142
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
|
|
143
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
144
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLSpanElement> | undefined;
|
|
145
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
146
|
+
onInput?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
147
|
+
onInputCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
148
|
+
onReset?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
149
|
+
onResetCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
150
|
+
onSubmit?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
151
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
152
|
+
onInvalid?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
153
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
|
|
154
|
+
onLoad?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
155
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
156
|
+
onError?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
157
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
158
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
159
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
160
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
161
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
162
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
163
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
|
|
164
|
+
onAbort?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
165
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
166
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
167
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
168
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
169
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
170
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
171
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
172
|
+
onEmptied?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
173
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
174
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
175
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
176
|
+
onEnded?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
177
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
178
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
179
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
180
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
181
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
182
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
183
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
184
|
+
onPause?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
185
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
186
|
+
onPlay?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
187
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
188
|
+
onPlaying?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
189
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
190
|
+
onProgress?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
191
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
192
|
+
onRateChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
193
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
194
|
+
onSeeked?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
195
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
196
|
+
onSeeking?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
197
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
198
|
+
onStalled?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
199
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
200
|
+
onSuspend?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
201
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
202
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
203
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
204
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
205
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
206
|
+
onWaiting?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
207
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
208
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
209
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
210
|
+
onClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
211
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
212
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
213
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
214
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
215
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
216
|
+
onDrag?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
217
|
+
onDragCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
218
|
+
onDragEnd?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
219
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
220
|
+
onDragEnter?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
221
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
222
|
+
onDragExit?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
223
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
224
|
+
onDragLeave?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
225
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
226
|
+
onDragOver?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
227
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
228
|
+
onDragStart?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
229
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
230
|
+
onDrop?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
231
|
+
onDropCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
|
|
232
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
233
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
234
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
235
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
236
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
237
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
238
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
239
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
240
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
241
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
242
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
243
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
|
|
244
|
+
onSelect?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
245
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
|
|
246
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
247
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
248
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
249
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
250
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
251
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
252
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
253
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
|
|
254
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
255
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
256
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
257
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
258
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
259
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
260
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
261
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
262
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
263
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
264
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
265
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
266
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
267
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
268
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
269
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
270
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
271
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
|
|
272
|
+
onScroll?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
|
|
273
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
|
|
274
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
|
|
275
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
|
|
276
|
+
onWheel?: import("react").WheelEventHandler<HTMLSpanElement> | undefined;
|
|
277
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLSpanElement> | undefined;
|
|
278
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
279
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
280
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
281
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
282
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
283
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
284
|
+
onToggle?: import("react").ToggleEventHandler<HTMLSpanElement> | undefined;
|
|
285
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLSpanElement> | undefined;
|
|
286
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
287
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
288
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
289
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
290
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
291
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
292
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
293
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
294
|
+
key?: import("react").Key | null | undefined;
|
|
295
|
+
hotkey?: string | undefined;
|
|
296
|
+
formatOptions?: import("@zag-js/hotkeys").HotkeyFormatOptions | undefined;
|
|
297
|
+
ref?: import("react").Ref<HTMLSpanElement> | undefined;
|
|
298
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
299
|
+
argTypes: {
|
|
300
|
+
hotkey: {
|
|
301
|
+
control: "text";
|
|
302
|
+
};
|
|
303
|
+
formatOptions: {
|
|
304
|
+
control: "object";
|
|
305
|
+
};
|
|
306
|
+
ref: {
|
|
307
|
+
table: {
|
|
308
|
+
disable: true;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
children: {
|
|
312
|
+
table: {
|
|
313
|
+
disable: true;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
args: {
|
|
318
|
+
hotkey: string;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
export default meta;
|
|
322
|
+
type Story = StoryObj<typeof meta>;
|
|
323
|
+
export declare const Playground: Story;
|
|
324
|
+
export declare const TokenClassOverride: Story;
|
|
325
|
+
export declare const Platforms: Story;
|
|
326
|
+
export declare const Compound: Story;
|
|
327
|
+
export declare const FormFields: Story;
|
|
328
|
+
export declare const FormFieldsTechnical: Story;
|
|
329
|
+
export declare const Lifecycle: Story;
|
|
330
|
+
export declare const DevelopmentStrictMode: Story;
|
|
331
|
+
export declare const DisplayOnly: Story;
|
|
332
|
+
export declare const FocusedSequence: Story;
|
|
333
|
+
export declare const FocusedSequenceTechnical: Story;
|
|
334
|
+
export declare const Hydration: Story;
|
|
335
|
+
export declare const NativeConflictPolicy: Story;
|
|
336
|
+
//# sourceMappingURL=hotkeys.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.stories.d.ts","sourceRoot":"","sources":["../../../stories/atoms/hotkeys.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAKtD,OAAO,EAAE,OAAO,EAAqB,MAAM,yBAAyB,CAAA;AA8JpE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAA;AA2CD,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAA;AAwCD,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAExB,CAAA;AAgDD,eAAO,MAAM,mBAAmB,EAAE,KAGjC,CAAA;AA2GD,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAA;AACD,eAAO,MAAM,qBAAqB,EAAE,KAOnC,CAAA;AAgBD,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAA;AA4HD,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAGtC,CAAA;AACD,eAAO,MAAM,SAAS,EAAE,KAGvB,CAAA;AAiDD,eAAO,MAAM,oBAAoB,EAAE,KAGlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.stories.d.ts","sourceRoot":"","sources":["../../../stories/changelog/changelog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"changelog.stories.d.ts","sourceRoot":"","sources":["../../../stories/changelog/changelog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AA0NtD,iBAAS,SAAS,4CAUjB;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAKhC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,SAAS,CAAM,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
declare function PaletteExample({ initiallyOpen, showAvailability, }: {
|
|
3
|
+
initiallyOpen?: boolean;
|
|
4
|
+
showAvailability?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: typeof PaletteExample;
|
|
9
|
+
tags: string[];
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
controls: {
|
|
13
|
+
disable: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
initiallyOpen: {
|
|
18
|
+
table: {
|
|
19
|
+
disable: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
showAvailability: {
|
|
23
|
+
table: {
|
|
24
|
+
disable: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
args: {
|
|
29
|
+
initiallyOpen: false;
|
|
30
|
+
showAvailability: false;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Playground: Story;
|
|
36
|
+
export declare const OpenPalette: Story;
|
|
37
|
+
export declare const Availability: Story;
|
|
38
|
+
//# sourceMappingURL=command-hotkeys.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-hotkeys.stories.d.ts","sourceRoot":"","sources":["../../../stories/molecules/command-hotkeys.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAatD,iBAAS,cAAc,CAAC,EACtB,aAAqB,EACrB,gBAAwB,GACzB,EAAE;IACD,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,2CA0MA;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAU6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AACnC,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAG1B,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { type Ref } from "react";
|
|
3
|
+
import { Command, type CommandItem } from "../../src/molecules/command.js";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof Command;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
controls: {
|
|
11
|
+
disable: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("storybook-react-rsbuild").ReactRenderer, {
|
|
15
|
+
disabled?: boolean | undefined | undefined;
|
|
16
|
+
onSelect?: ((details: import("@zag-js/combobox").SelectionDetails) => void) | undefined | undefined;
|
|
17
|
+
loopFocus?: boolean | undefined | undefined;
|
|
18
|
+
inputValue?: string | undefined | undefined;
|
|
19
|
+
defaultInputValue?: string | undefined | undefined;
|
|
20
|
+
onInputValueChange?: ((details: import("@zag-js/combobox").InputValueChangeDetails) => void) | undefined | undefined;
|
|
21
|
+
items: CommandItem[];
|
|
22
|
+
children: import("react").ReactNode;
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
26
|
+
locale?: string | undefined;
|
|
27
|
+
onEscape?: (() => void) | undefined;
|
|
28
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
29
|
+
argTypes: {
|
|
30
|
+
disabled: {
|
|
31
|
+
control: "boolean";
|
|
32
|
+
};
|
|
33
|
+
loopFocus: {
|
|
34
|
+
control: "boolean";
|
|
35
|
+
};
|
|
36
|
+
locale: {
|
|
37
|
+
control: "text";
|
|
38
|
+
};
|
|
39
|
+
id: {
|
|
40
|
+
table: {
|
|
41
|
+
disable: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
ref: {
|
|
45
|
+
table: {
|
|
46
|
+
disable: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
children: {
|
|
50
|
+
table: {
|
|
51
|
+
disable: true;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
args: {
|
|
56
|
+
items: CommandItem[];
|
|
57
|
+
disabled: false;
|
|
58
|
+
loopFocus: true;
|
|
59
|
+
onSelect: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
60
|
+
children: null;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export default meta;
|
|
64
|
+
type Story = StoryObj<typeof meta>;
|
|
65
|
+
export declare const Playground: Story;
|
|
66
|
+
export declare const States: Story;
|
|
67
|
+
export declare const Grouped: Story;
|
|
68
|
+
export declare const DisabledItems: Story;
|
|
69
|
+
export declare const Localized: Story;
|
|
70
|
+
export declare const ChangingItems: Story;
|
|
71
|
+
export declare const InlineFocus: Story;
|
|
72
|
+
export declare const ControlledQuery: Story;
|
|
73
|
+
export declare const InDialog: Story;
|
|
74
|
+
//# sourceMappingURL=command.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.stories.d.ts","sourceRoot":"","sources":["../../../stories/molecules/command.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,KAAK,GAAG,EAAoB,MAAM,OAAO,CAAA;AAIlD,OAAO,EACL,OAAO,EACP,KAAK,WAAW,EAEjB,MAAM,6BAA6B,CAAA;AAsHpC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAYpB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAevB,CAAA;AAiDD,eAAO,MAAM,aAAa,EAAE,KAG3B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA;AAmBD,eAAO,MAAM,eAAe,EAAE,KAG7B,CAAA;AAmCD,eAAO,MAAM,QAAQ,EAAE,KAAyD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-hotkeys.spec.d.ts","sourceRoot":"","sources":["../../test/command-hotkeys.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.spec.d.ts","sourceRoot":"","sources":["../../test/command.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotkeys.spec.d.ts","sourceRoot":"","sources":["../../test/hotkeys.spec.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techsio/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"directory": "libs/ui"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
|
+
"./hotkeys": {
|
|
13
|
+
"types": "./dist/src/hotkeys.d.ts",
|
|
14
|
+
"import": "./dist/hotkeys.js"
|
|
15
|
+
},
|
|
12
16
|
"./types/zag": {
|
|
13
17
|
"types": "./dist/src/types/zag.d.ts",
|
|
14
18
|
"import": "./dist/types/zag.js"
|
|
@@ -111,6 +115,7 @@
|
|
|
111
115
|
"@zag-js/dialog": "1.43.3",
|
|
112
116
|
"@zag-js/drawer": "1.43.3",
|
|
113
117
|
"@zag-js/file-upload": "1.43.3",
|
|
118
|
+
"@zag-js/hotkeys": "1.43.3",
|
|
114
119
|
"@zag-js/i18n-utils": "1.43.3",
|
|
115
120
|
"@zag-js/menu": "1.43.3",
|
|
116
121
|
"@zag-js/number-input": "1.43.3",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* BASE COLOR MAPPING */
|
|
3
|
+
--color-hotkeys-surface: var(--color-surface);
|
|
4
|
+
--color-hotkeys-text: var(--color-fg-secondary);
|
|
5
|
+
--color-hotkeys-outline: var(--color-border-primary);
|
|
6
|
+
|
|
7
|
+
/* DERIVED COLORS */
|
|
8
|
+
--color-hotkeys-key-bg: var(--color-hotkeys-surface);
|
|
9
|
+
--color-hotkeys-key-fg: var(--color-hotkeys-text);
|
|
10
|
+
--color-hotkeys-key-border: var(--color-hotkeys-outline);
|
|
11
|
+
--color-hotkeys-separator-fg: var(--color-hotkeys-text);
|
|
12
|
+
|
|
13
|
+
/* SPACING */
|
|
14
|
+
--gap-hotkeys: var(--spacing-50);
|
|
15
|
+
--padding-hotkeys-key-x: var(--spacing-100);
|
|
16
|
+
--padding-hotkeys-key-y: var(--spacing-50);
|
|
17
|
+
|
|
18
|
+
/* TYPOGRAPHY */
|
|
19
|
+
--text-hotkeys-sm: var(--text-xs);
|
|
20
|
+
--font-weight-hotkeys: var(--font-weight-medium);
|
|
21
|
+
|
|
22
|
+
/* BORDERS & RADIUS */
|
|
23
|
+
--border-width-hotkeys-key: var(--border-width-sm);
|
|
24
|
+
--radius-hotkeys-key: var(--radius-sm);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@utility hotkeys-key-border-width {
|
|
28
|
+
border-width: var(--border-width-hotkeys-key);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@utility hotkeys-target-focus {
|
|
32
|
+
outline-style: var(--default-ring-style);
|
|
33
|
+
outline-width: var(--default-ring-width);
|
|
34
|
+
outline-color: var(--color-primary);
|
|
35
|
+
outline-offset: var(--default-ring-offset);
|
|
36
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@import "./atoms/_button.css";
|
|
6
6
|
@import "./atoms/_status-text.css";
|
|
7
7
|
@import "./atoms/_checkbox.css";
|
|
8
|
+
@import "./atoms/_hotkeys.css";
|
|
8
9
|
@import "./atoms/_icon.css";
|
|
9
10
|
@import "./atoms/_image.css";
|
|
10
11
|
@import "./atoms/_input.css";
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
@import "./molecules/_chart.css";
|
|
24
25
|
@import "./molecules/_color-select.css";
|
|
25
26
|
@import "./molecules/_combobox.css";
|
|
27
|
+
@import "./molecules/_command.css";
|
|
26
28
|
@import "./molecules/_date-picker.css";
|
|
27
29
|
@import "./molecules/_dialog.css";
|
|
28
30
|
@import "./molecules/_drawer.css";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* BASE COLOR MAPPING */
|
|
3
|
+
--color-command-surface: var(--color-popup-bg);
|
|
4
|
+
--color-command-foreground: var(--color-popup-item-fg);
|
|
5
|
+
--color-command-muted: var(--color-popup-item-fg-muted);
|
|
6
|
+
--color-command-highlight: var(--color-popup-item-bg-hover);
|
|
7
|
+
|
|
8
|
+
/* DERIVED COLORS */
|
|
9
|
+
--color-command-bg: var(--color-command-surface);
|
|
10
|
+
--color-command-fg: var(--color-command-foreground);
|
|
11
|
+
--color-command-border: var(--color-popup-border);
|
|
12
|
+
--color-command-group-label-fg: var(--color-command-muted);
|
|
13
|
+
--color-command-empty-fg: var(--color-command-muted);
|
|
14
|
+
|
|
15
|
+
/* STATE VARIATIONS */
|
|
16
|
+
--color-command-item-bg-highlighted: var(--color-command-highlight);
|
|
17
|
+
|
|
18
|
+
/* DISABLED STATES */
|
|
19
|
+
--color-command-item-fg-disabled: var(--color-popup-item-fg-disabled);
|
|
20
|
+
|
|
21
|
+
/* SPACING */
|
|
22
|
+
--spacing-command-gap: var(--spacing-100);
|
|
23
|
+
--spacing-command-item-gap: var(--spacing-popup-item-md);
|
|
24
|
+
--spacing-command-list-max: var(--container-xs);
|
|
25
|
+
--padding-command: var(--spacing-150);
|
|
26
|
+
--padding-command-list: var(--padding-popup-viewport);
|
|
27
|
+
--padding-command-item-x: var(--padding-popup-item-x-md);
|
|
28
|
+
--padding-command-item-y: var(--padding-popup-item-y-md);
|
|
29
|
+
--padding-command-empty: var(--spacing-300);
|
|
30
|
+
|
|
31
|
+
/* TYPOGRAPHY */
|
|
32
|
+
--text-command-md: var(--text-sm);
|
|
33
|
+
--font-weight-command-group-label: var(--font-weight-medium);
|
|
34
|
+
|
|
35
|
+
/* BORDERS & RADIUS */
|
|
36
|
+
--border-width-command: var(--border-width-popup);
|
|
37
|
+
--radius-command: var(--radius-popup);
|
|
38
|
+
--radius-command-item: var(--radius-popup-item);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@utility command-border-width {
|
|
42
|
+
border-width: var(--border-width-command);
|
|
43
|
+
}
|