@ucdjs-internal/shared-ui 0.1.6 → 0.1.8
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/README.md +0 -3
- package/dist/components/shiki-code.d.mts +2 -2
- package/dist/components/shiki-code.mjs +1 -3
- package/dist/components/theme-toggle.d.mts +3 -3
- package/dist/components/theme-toggle.mjs +1 -3
- package/dist/components/ucd-logo.d.mts +10 -0
- package/dist/components/ucd-logo.mjs +61 -0
- package/dist/components.d.mts +30 -0
- package/dist/components.mjs +30 -0
- package/dist/hooks/index.mjs +2 -3
- package/dist/hooks/use-clipboard.mjs +2 -4
- package/dist/hooks/use-mobile.mjs +1 -3
- package/dist/hooks/use-theme.mjs +1 -3
- package/dist/index.mjs +2 -3
- package/dist/lib/theme-script.mjs +1 -2
- package/dist/lib/utils.mjs +1 -3
- package/dist/ui/alert-dialog.d.mts +17 -17
- package/dist/ui/alert-dialog.mjs +12 -13
- package/dist/ui/avatar.d.mts +11 -11
- package/dist/ui/avatar.mjs +7 -8
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/badge.mjs +1 -3
- package/dist/ui/breadcrumb.d.mts +7 -7
- package/dist/ui/breadcrumb.mjs +2 -3
- package/dist/ui/button.d.mts +8 -8
- package/dist/ui/button.mjs +4 -6
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/card.mjs +2 -3
- package/dist/ui/checkbox.d.mts +5 -5
- package/dist/ui/checkbox.mjs +5 -7
- package/dist/ui/collapsible.d.mts +7 -7
- package/dist/ui/collapsible.mjs +6 -8
- package/dist/ui/combobox.d.mts +20 -20
- package/dist/ui/combobox.mjs +21 -23
- package/dist/ui/command.d.mts +55 -16
- package/dist/ui/command.mjs +327 -89
- package/dist/ui/context-menu.d.mts +24 -24
- package/dist/ui/context-menu.mjs +20 -21
- package/dist/ui/dialog.d.mts +17 -15
- package/dist/ui/dialog.mjs +52 -42
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/dropdown-menu.mjs +2 -3
- package/dist/ui/field.d.mts +13 -13
- package/dist/ui/field.mjs +1 -3
- package/dist/ui/input-group.d.mts +10 -10
- package/dist/ui/input-group.mjs +2 -3
- package/dist/ui/input.d.mts +2 -2
- package/dist/ui/input.mjs +5 -6
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/label.mjs +2 -3
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/scroll-area.mjs +9 -10
- package/dist/ui/select.d.mts +14 -14
- package/dist/ui/select.mjs +18 -19
- package/dist/ui/separator.d.mts +5 -5
- package/dist/ui/separator.mjs +4 -6
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sheet.mjs +2 -3
- package/dist/ui/sidebar.d.mts +23 -23
- package/dist/ui/sidebar.mjs +4 -6
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/skeleton.mjs +1 -3
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/table.mjs +2 -3
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/textarea.mjs +2 -3
- package/dist/ui/tooltip.d.mts +8 -8
- package/dist/ui/tooltip.mjs +9 -11
- package/dist/vscode/syntaxes/ucd.tmLanguage.mjs +1 -2
- package/package.json +22 -44
- package/dist/components/index.d.mts +0 -3
- package/dist/components/index.mjs +0 -4
- package/dist/vendor/cmdk/command-score.mjs +0 -62
- package/dist/vendor/cmdk/index.d.mts +0 -181
- package/dist/vendor/cmdk/index.mjs +0 -713
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { Dialog } from "@base-ui/react";
|
|
4
|
-
|
|
5
|
-
//#region src/vendor/cmdk/index.d.ts
|
|
6
|
-
interface Children {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
type DivProps = React.ComponentPropsWithoutRef<"div">;
|
|
10
|
-
interface RefProp<T> {
|
|
11
|
-
ref?: React.Ref<T>;
|
|
12
|
-
}
|
|
13
|
-
type LoadingProps = Children & DivProps & {
|
|
14
|
-
/** Estimated progress of loading asynchronous options. */progress?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Accessible label for this loading progressbar. Not shown visibly.
|
|
17
|
-
*/
|
|
18
|
-
label?: string;
|
|
19
|
-
};
|
|
20
|
-
type EmptyProps = Children & DivProps & {};
|
|
21
|
-
type SeparatorProps = DivProps & {
|
|
22
|
-
/** Whether this separator should always be rendered. Useful if you disable automatic filtering. */alwaysRender?: boolean;
|
|
23
|
-
};
|
|
24
|
-
type DialogProps = Dialog.Root.Props & CommandProps & {
|
|
25
|
-
/** Provide a className to the Dialog overlay. */overlayClassName?: string; /** Provide a className to the Dialog content. */
|
|
26
|
-
contentClassName?: string; /** Provide a custom element the Dialog should portal into. */
|
|
27
|
-
container?: HTMLElement;
|
|
28
|
-
};
|
|
29
|
-
type ListProps = Children & DivProps & {
|
|
30
|
-
/**
|
|
31
|
-
* Accessible label for this List of suggestions. Not shown visibly.
|
|
32
|
-
*/
|
|
33
|
-
label?: string;
|
|
34
|
-
};
|
|
35
|
-
type ItemProps = Children & Omit<DivProps, "disabled" | "onSelect" | "value"> & {
|
|
36
|
-
/** Whether this item is currently disabled. */disabled?: boolean; /** Event handler for when this item is selected, either via click or keyboard selection. */
|
|
37
|
-
onSelect?: (value: string) => void;
|
|
38
|
-
/**
|
|
39
|
-
* A unique value for this item.
|
|
40
|
-
* If no value is provided, it will be inferred from `children` or the rendered `textContent`. If your `textContent` changes between renders, you _must_ provide a stable, unique `value`.
|
|
41
|
-
*/
|
|
42
|
-
value?: string; /** Optional keywords to match against when filtering. */
|
|
43
|
-
keywords?: string[]; /** Whether this item is forcibly rendered regardless of filtering. */
|
|
44
|
-
forceMount?: boolean;
|
|
45
|
-
};
|
|
46
|
-
type GroupProps = Children & Omit<DivProps, "heading" | "value"> & {
|
|
47
|
-
/** Optional heading to render for this group. */heading?: React.ReactNode; /** If no heading is provided, you must provide a value that is unique for this group. */
|
|
48
|
-
value?: string; /** Whether this group is forcibly rendered regardless of filtering. */
|
|
49
|
-
forceMount?: boolean;
|
|
50
|
-
};
|
|
51
|
-
type InputProps = Omit<React.ComponentPropsWithoutRef<"input">, "value" | "onChange" | "type"> & {
|
|
52
|
-
/**
|
|
53
|
-
* Optional controlled state for the value of the search input.
|
|
54
|
-
*/
|
|
55
|
-
value?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Event handler called when the search value changes.
|
|
58
|
-
*/
|
|
59
|
-
onValueChange?: (search: string) => void;
|
|
60
|
-
};
|
|
61
|
-
type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
62
|
-
type CommandProps = Children & DivProps & {
|
|
63
|
-
/**
|
|
64
|
-
* Accessible label for this command menu. Not shown visibly.
|
|
65
|
-
*/
|
|
66
|
-
label?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Optionally set to `false` to turn off the automatic filtering and sorting.
|
|
69
|
-
* If `false`, you must conditionally render valid items based on the search query yourself.
|
|
70
|
-
*/
|
|
71
|
-
shouldFilter?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Custom filter function for whether each command menu item should matches the given search query.
|
|
74
|
-
* It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
|
|
75
|
-
* By default, uses the `command-score` library.
|
|
76
|
-
*/
|
|
77
|
-
filter?: CommandFilter;
|
|
78
|
-
/**
|
|
79
|
-
* Optional default item value when it is initially rendered.
|
|
80
|
-
*/
|
|
81
|
-
defaultValue?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Optional controlled state of the selected command menu item.
|
|
84
|
-
*/
|
|
85
|
-
value?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Event handler called when the selected item of the menu changes.
|
|
88
|
-
*/
|
|
89
|
-
onValueChange?: (value: string) => void;
|
|
90
|
-
/**
|
|
91
|
-
* Optionally set to `true` to turn on looping around when using the arrow keys.
|
|
92
|
-
*/
|
|
93
|
-
loop?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Optionally set to `true` to disable selection via pointer events.
|
|
96
|
-
*/
|
|
97
|
-
disablePointerSelection?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
|
|
100
|
-
*/
|
|
101
|
-
vimBindings?: boolean;
|
|
102
|
-
};
|
|
103
|
-
declare function Command({
|
|
104
|
-
ref: forwardedRef,
|
|
105
|
-
...props
|
|
106
|
-
}: CommandProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
107
|
-
/**
|
|
108
|
-
* Command menu item. Becomes active on pointer enter or through keyboard navigation.
|
|
109
|
-
* Preferably pass a `value`, otherwise the value will be inferred from `children` or
|
|
110
|
-
* the rendered item's `textContent`.
|
|
111
|
-
*/
|
|
112
|
-
declare function Item({
|
|
113
|
-
ref: forwardedRef,
|
|
114
|
-
...props
|
|
115
|
-
}: ItemProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element | null;
|
|
116
|
-
/**
|
|
117
|
-
* Group command menu items together with a heading.
|
|
118
|
-
* Grouped items are always shown together.
|
|
119
|
-
*/
|
|
120
|
-
declare function Group({
|
|
121
|
-
ref: forwardedRef,
|
|
122
|
-
...props
|
|
123
|
-
}: GroupProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
124
|
-
/**
|
|
125
|
-
* A visual and semantic separator between items or groups.
|
|
126
|
-
* Visible when the search query is empty or `alwaysRender` is true, hidden otherwise.
|
|
127
|
-
*/
|
|
128
|
-
declare function Separator({
|
|
129
|
-
ref: forwardedRef,
|
|
130
|
-
...props
|
|
131
|
-
}: SeparatorProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element | null;
|
|
132
|
-
/**
|
|
133
|
-
* Command menu input.
|
|
134
|
-
* All props are forwarded to the underyling `input` element.
|
|
135
|
-
*/
|
|
136
|
-
declare function Input({
|
|
137
|
-
ref: forwardedRef,
|
|
138
|
-
...props
|
|
139
|
-
}: InputProps & RefProp<HTMLInputElement>): react_jsx_runtime0.JSX.Element;
|
|
140
|
-
/**
|
|
141
|
-
* Contains `Item`, `Group`, and `Separator`.
|
|
142
|
-
* Use the `--cmdk-list-height` CSS variable to animate height based on the number of results.
|
|
143
|
-
*/
|
|
144
|
-
declare function List({
|
|
145
|
-
ref: forwardedRef,
|
|
146
|
-
...props
|
|
147
|
-
}: ListProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
148
|
-
/**
|
|
149
|
-
* Renders the command menu in a Base UI Dialog.
|
|
150
|
-
*/
|
|
151
|
-
declare function Dialog$1({
|
|
152
|
-
ref: forwardedRef,
|
|
153
|
-
...props
|
|
154
|
-
}: DialogProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
155
|
-
/**
|
|
156
|
-
* Automatically renders when there are no results for the search query.
|
|
157
|
-
*/
|
|
158
|
-
declare function Empty({
|
|
159
|
-
ref: forwardedRef,
|
|
160
|
-
...props
|
|
161
|
-
}: EmptyProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element | null;
|
|
162
|
-
/**
|
|
163
|
-
* You should conditionally render this with `progress` while loading asynchronous items.
|
|
164
|
-
*/
|
|
165
|
-
declare function Loading({
|
|
166
|
-
ref: forwardedRef,
|
|
167
|
-
...props
|
|
168
|
-
}: LoadingProps & RefProp<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
169
|
-
declare const pkg: typeof Command & {
|
|
170
|
-
List: typeof List;
|
|
171
|
-
Item: typeof Item;
|
|
172
|
-
Input: typeof Input;
|
|
173
|
-
Group: typeof Group;
|
|
174
|
-
Separator: typeof Separator;
|
|
175
|
-
Dialog: typeof Dialog$1;
|
|
176
|
-
Empty: typeof Empty;
|
|
177
|
-
Loading: typeof Loading;
|
|
178
|
-
};
|
|
179
|
-
/** Run a selector against the store state. */
|
|
180
|
-
//#endregion
|
|
181
|
-
export { pkg };
|