sparkdesign 0.4.7 → 0.4.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/cli/registry/basic/alert-dialog.tsx +3 -6
- package/cli/registry/basic/button.tsx +19 -6
- package/cli/registry/basic/card.tsx +20 -8
- package/cli/registry/basic/collapsible-card.tsx +2 -4
- package/cli/registry/basic/combobox.tsx +104 -46
- package/cli/registry/basic/context-menu.tsx +2 -3
- package/cli/registry/basic/date-picker.tsx +78 -7
- package/cli/registry/basic/dialog.tsx +3 -8
- package/cli/registry/basic/drawer.tsx +3 -5
- package/cli/registry/basic/dropdown-menu.tsx +2 -3
- package/cli/registry/basic/hover-card.tsx +2 -3
- package/cli/registry/basic/icon-button.tsx +18 -11
- package/cli/registry/basic/input-group.tsx +4 -4
- package/cli/registry/basic/input.tsx +29 -13
- package/cli/registry/basic/popover.tsx +2 -3
- package/cli/registry/basic/select.tsx +24 -4
- package/cli/registry/basic/spinner.tsx +20 -5
- package/cli/registry/basic/textarea.tsx +30 -12
- package/cli/registry/basic/tooltip.tsx +2 -1
- package/cli/registry/meta.json +97 -30
- package/dist/registry/basic/alert-dialog.d.ts +1 -1
- package/dist/registry/basic/avatar.d.ts +1 -1
- package/dist/registry/basic/button.d.ts +3 -1
- package/dist/registry/basic/card.d.ts +9 -4
- package/dist/registry/basic/combobox.d.ts +20 -9
- package/dist/registry/basic/date-picker.d.ts +18 -9
- package/dist/registry/basic/dialog.d.ts +1 -1
- package/dist/registry/basic/icon-button.d.ts +2 -1
- package/dist/registry/basic/input-group.d.ts +5 -3
- package/dist/registry/basic/input.d.ts +8 -3
- package/dist/registry/basic/item.d.ts +2 -2
- package/dist/registry/basic/resizable.d.ts +48 -48
- package/dist/registry/basic/select.d.ts +7 -2
- package/dist/registry/basic/spinner.d.ts +6 -2
- package/dist/registry/basic/tag.d.ts +1 -1
- package/dist/registry/basic/textarea.d.ts +9 -3
- package/dist/registry/basic/toggle.d.ts +1 -1
- package/dist/scale/computed.css +11 -0
- package/dist/scale/config.css +11 -0
- package/dist/scale/presets/compact.css +7 -0
- package/dist/scale/presets/dense.css +7 -0
- package/dist/scale/presets/sharp.css +7 -0
- package/dist/scale/presets/soft.css +7 -0
- package/dist/spark-design.cjs.js +35 -35
- package/dist/spark-design.es.js +5151 -3767
- package/dist/sparkdesign.css +1 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/lib/index.d.ts +1 -1
- package/dist/src/lib/motion.d.ts +79 -0
- package/dist/theme-base.css +22 -0
- package/dist/themes/dark-mint.css +6 -0
- package/dist/themes/dark-parchment.css +6 -0
- package/dist/themes/light-parchment.css +6 -0
- package/dist/tokens/scale/computed.css +11 -0
- package/dist/tokens/scale/config.css +11 -0
- package/dist/tokens/scale/presets/compact.css +7 -0
- package/dist/tokens/scale/presets/dense.css +7 -0
- package/dist/tokens/scale/presets/sharp.css +7 -0
- package/dist/tokens/scale/presets/soft.css +7 -0
- package/dist/tokens/theme-base.css +22 -0
- package/dist/tokens/themes/dark-mint.css +6 -0
- package/dist/tokens/themes/dark-parchment.css +6 -0
- package/dist/tokens/themes/light-parchment.css +6 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [WHO]: Combobox —
|
|
3
|
-
* [FROM]: React
|
|
2
|
+
* [WHO]: Combobox — Popover + Command composition for searchable single-select inputs.
|
|
3
|
+
* [FROM]: React, registry/basic/button, registry/basic/command, registry/basic/popover, registry/lib/utils.
|
|
4
4
|
* [TO]: sparkdesign package consumers; output of CLI `add combobox` when registered.
|
|
5
|
-
* [HERE]: registry/basic/combobox.tsx — Spark Design source;
|
|
5
|
+
* [HERE]: registry/basic/combobox.tsx — Spark Design source; tokenized shadcn-compatible combobox.
|
|
6
6
|
*
|
|
7
7
|
* [PROTOCOL]:
|
|
8
|
-
* 1.
|
|
9
|
-
* 2.
|
|
8
|
+
* 1. Keep the trigger a Button (tokenized) so product surfaces inherit Spark typography/spacing.
|
|
9
|
+
* 2. Use Command for filtering so keyboard navigation and empty states remain consistent with the palette primitive.
|
|
10
10
|
* 3. Follow design tokens and explicit type exports.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
@@ -14,13 +14,24 @@ export interface ComboboxOption {
|
|
|
14
14
|
value: string;
|
|
15
15
|
label: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
keywords?: string[];
|
|
17
18
|
}
|
|
18
|
-
export interface ComboboxProps
|
|
19
|
+
export interface ComboboxProps {
|
|
19
20
|
options: ComboboxOption[];
|
|
20
21
|
value?: string;
|
|
22
|
+
defaultValue?: string;
|
|
21
23
|
onValueChange?: (value: string) => void;
|
|
22
|
-
placeholder?:
|
|
23
|
-
|
|
24
|
+
placeholder?: React.ReactNode;
|
|
25
|
+
searchPlaceholder?: string;
|
|
26
|
+
emptyText?: React.ReactNode;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
align?: 'start' | 'center' | 'end';
|
|
31
|
+
triggerClassName?: string;
|
|
32
|
+
id?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
'aria-label'?: string;
|
|
24
35
|
}
|
|
25
|
-
declare function Combobox({ options, value, onValueChange, placeholder, emptyText, className,
|
|
36
|
+
declare function Combobox({ options, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, disabled, className, contentClassName, triggerClassName, align, id, name, 'aria-label': ariaLabel, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
26
37
|
export { Combobox };
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [WHO]: DatePicker —
|
|
3
|
-
* [FROM]: React
|
|
2
|
+
* [WHO]: DatePicker — Popover + Calendar composition matching shadcn parity.
|
|
3
|
+
* [FROM]: React, date-fns, registry/basic/button, registry/basic/calendar, registry/basic/popover, registry/lib/utils.
|
|
4
4
|
* [TO]: sparkdesign package consumers; output of CLI `add date-picker` when registered.
|
|
5
|
-
* [HERE]: registry/basic/date-picker.tsx — Spark Design source;
|
|
5
|
+
* [HERE]: registry/basic/date-picker.tsx — Spark Design source; tokenized shadcn-compatible date picker.
|
|
6
6
|
*
|
|
7
7
|
* [PROTOCOL]:
|
|
8
|
-
* 1.
|
|
9
|
-
* 2.
|
|
8
|
+
* 1. Render a Button trigger that surfaces the selected date using project typography/tokens.
|
|
9
|
+
* 2. Use the shared Calendar primitive inside a PopoverContent for the day grid; never fall back to native pickers.
|
|
10
10
|
* 3. Follow design tokens and explicit type exports.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export interface DatePickerProps {
|
|
14
|
+
value?: Date;
|
|
15
|
+
defaultValue?: Date;
|
|
16
|
+
onChange?: (date: Date | undefined) => void;
|
|
17
|
+
placeholder?: React.ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
align?: 'start' | 'center' | 'end';
|
|
21
|
+
formatString?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
'aria-label'?: string;
|
|
16
25
|
}
|
|
17
|
-
declare
|
|
26
|
+
declare function DatePicker({ value, defaultValue, onChange, placeholder, disabled, className, align, formatString, id, name, 'aria-label': ariaLabel, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
27
|
export { DatePicker };
|
|
@@ -19,7 +19,7 @@ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
|
19
19
|
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
20
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare const contentVariants: (props?: ({
|
|
22
|
-
size?: "
|
|
22
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
23
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
24
|
export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof contentVariants> {
|
|
25
25
|
size?: 'sm' | 'default' | 'lg' | 'xl';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const iconButtonVariants: (props?: ({
|
|
4
|
-
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "iconOnly" | null | undefined;
|
|
4
|
+
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "destructive" | "iconOnly" | null | undefined;
|
|
5
5
|
rounded?: "square" | "pill" | null | undefined;
|
|
6
6
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
9
9
|
icon: ReactNode;
|
|
10
|
+
asChild?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
13
|
export { iconButtonVariants };
|
|
@@ -12,16 +12,18 @@
|
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
import { type VariantProps } from "class-variance-authority";
|
|
14
14
|
import { Button } from "./button";
|
|
15
|
+
import { type InputProps } from "./input";
|
|
16
|
+
import { type TextareaProps } from "./textarea";
|
|
15
17
|
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
declare const inputGroupAddonVariants: (props?: ({
|
|
17
19
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
18
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
21
|
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
declare const inputGroupButtonVariants: (props?: ({
|
|
21
|
-
size?: "
|
|
23
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
22
24
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
25
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
declare function InputGroupInput({ className, ...props }:
|
|
26
|
-
declare function InputGroupTextarea({ className, ...props }:
|
|
27
|
+
declare function InputGroupInput({ className, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function InputGroupTextarea({ className, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* [WHO]: Input — accessible text input with token-driven styling.
|
|
3
|
-
* [FROM]: React + `@/lib/utils` cn.
|
|
3
|
+
* [FROM]: React + `@/lib/utils` cn + CVA.
|
|
4
4
|
* [TO]: sparkdesign package consumers; output of CLI `add input` when registered.
|
|
5
5
|
* [HERE]: registry/basic/input.tsx — Spark Design source; keep aligned with the main library.
|
|
6
6
|
*
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
* 3. Follow design tokens and explicit type exports.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
|
|
13
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
14
|
+
declare const inputVariants: (props?: ({
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
18
|
+
}
|
|
14
19
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
-
export { Input };
|
|
20
|
+
export { Input, inputVariants };
|
|
@@ -4,8 +4,8 @@ import { Separator } from "./separator";
|
|
|
4
4
|
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare const itemVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "
|
|
7
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
11
|
asChild?: boolean;
|
|
@@ -19,61 +19,16 @@ declare const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePane
|
|
|
19
19
|
export type ResizablePanelProps = PanelProps;
|
|
20
20
|
declare const ResizablePanel: React.ForwardRefExoticComponent<{
|
|
21
21
|
className?: string | undefined | undefined;
|
|
22
|
-
children?: React.ReactNode | Iterable<React.ReactNode>;
|
|
23
|
-
defaultChecked?: boolean | undefined | undefined;
|
|
24
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
25
|
-
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
26
22
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
27
|
-
|
|
28
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
29
|
-
autoFocus?: boolean | undefined | undefined;
|
|
30
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
31
|
-
contextMenu?: string | undefined | undefined;
|
|
32
|
-
dir?: string | undefined | undefined;
|
|
33
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
34
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
35
|
-
hidden?: boolean | undefined | undefined;
|
|
23
|
+
color?: string | undefined | undefined;
|
|
36
24
|
id?: string | undefined | undefined;
|
|
37
25
|
lang?: string | undefined | undefined;
|
|
38
26
|
nonce?: string | undefined | undefined;
|
|
27
|
+
part?: string | undefined | undefined;
|
|
39
28
|
slot?: string | undefined | undefined;
|
|
40
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
41
29
|
style?: React.CSSProperties | undefined;
|
|
42
|
-
tabIndex?: number | undefined | undefined;
|
|
43
|
-
title?: string | undefined | undefined;
|
|
44
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
45
|
-
radioGroup?: string | undefined | undefined;
|
|
46
30
|
role?: React.AriaRole | undefined;
|
|
47
|
-
|
|
48
|
-
content?: string | undefined | undefined;
|
|
49
|
-
datatype?: string | undefined | undefined;
|
|
50
|
-
inlist?: any;
|
|
51
|
-
prefix?: string | undefined | undefined;
|
|
52
|
-
property?: string | undefined | undefined;
|
|
53
|
-
rel?: string | undefined | undefined;
|
|
54
|
-
resource?: string | undefined | undefined;
|
|
55
|
-
rev?: string | undefined | undefined;
|
|
56
|
-
typeof?: string | undefined | undefined;
|
|
57
|
-
vocab?: string | undefined | undefined;
|
|
58
|
-
autoCorrect?: string | undefined | undefined;
|
|
59
|
-
autoSave?: string | undefined | undefined;
|
|
60
|
-
color?: string | undefined | undefined;
|
|
61
|
-
itemProp?: string | undefined | undefined;
|
|
62
|
-
itemScope?: boolean | undefined | undefined;
|
|
63
|
-
itemType?: string | undefined | undefined;
|
|
64
|
-
itemID?: string | undefined | undefined;
|
|
65
|
-
itemRef?: string | undefined | undefined;
|
|
66
|
-
results?: number | undefined | undefined;
|
|
67
|
-
security?: string | undefined | undefined;
|
|
68
|
-
unselectable?: "on" | "off" | undefined | undefined;
|
|
69
|
-
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
70
|
-
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
71
|
-
popoverTarget?: string | undefined | undefined;
|
|
72
|
-
inert?: boolean | undefined | undefined;
|
|
73
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
74
|
-
is?: string | undefined | undefined;
|
|
75
|
-
exportparts?: string | undefined | undefined;
|
|
76
|
-
part?: string | undefined | undefined;
|
|
31
|
+
tabIndex?: number | undefined | undefined;
|
|
77
32
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
78
33
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
79
34
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
@@ -127,6 +82,7 @@ declare const ResizablePanel: React.ForwardRefExoticComponent<{
|
|
|
127
82
|
"aria-valuemin"?: number | undefined | undefined;
|
|
128
83
|
"aria-valuenow"?: number | undefined | undefined;
|
|
129
84
|
"aria-valuetext"?: string | undefined | undefined;
|
|
85
|
+
children?: React.ReactNode | Iterable<React.ReactNode>;
|
|
130
86
|
dangerouslySetInnerHTML?: {
|
|
131
87
|
__html: string | TrustedHTML;
|
|
132
88
|
} | undefined | undefined;
|
|
@@ -298,6 +254,50 @@ declare const ResizablePanel: React.ForwardRefExoticComponent<{
|
|
|
298
254
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
299
255
|
onTransitionStart?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
300
256
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
258
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
259
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
260
|
+
accessKey?: string | undefined | undefined;
|
|
261
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
262
|
+
autoFocus?: boolean | undefined | undefined;
|
|
263
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
264
|
+
contextMenu?: string | undefined | undefined;
|
|
265
|
+
dir?: string | undefined | undefined;
|
|
266
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
267
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
268
|
+
hidden?: boolean | undefined | undefined;
|
|
269
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
270
|
+
title?: string | undefined | undefined;
|
|
271
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
272
|
+
radioGroup?: string | undefined | undefined;
|
|
273
|
+
about?: string | undefined | undefined;
|
|
274
|
+
content?: string | undefined | undefined;
|
|
275
|
+
datatype?: string | undefined | undefined;
|
|
276
|
+
inlist?: any;
|
|
277
|
+
prefix?: string | undefined | undefined;
|
|
278
|
+
property?: string | undefined | undefined;
|
|
279
|
+
rel?: string | undefined | undefined;
|
|
280
|
+
resource?: string | undefined | undefined;
|
|
281
|
+
rev?: string | undefined | undefined;
|
|
282
|
+
typeof?: string | undefined | undefined;
|
|
283
|
+
vocab?: string | undefined | undefined;
|
|
284
|
+
autoCorrect?: string | undefined | undefined;
|
|
285
|
+
autoSave?: string | undefined | undefined;
|
|
286
|
+
itemProp?: string | undefined | undefined;
|
|
287
|
+
itemScope?: boolean | undefined | undefined;
|
|
288
|
+
itemType?: string | undefined | undefined;
|
|
289
|
+
itemID?: string | undefined | undefined;
|
|
290
|
+
itemRef?: string | undefined | undefined;
|
|
291
|
+
results?: number | undefined | undefined;
|
|
292
|
+
security?: string | undefined | undefined;
|
|
293
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
294
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
295
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
296
|
+
popoverTarget?: string | undefined | undefined;
|
|
297
|
+
inert?: boolean | undefined | undefined;
|
|
298
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
299
|
+
is?: string | undefined | undefined;
|
|
300
|
+
exportparts?: string | undefined | undefined;
|
|
301
301
|
} & {
|
|
302
302
|
className?: string | undefined;
|
|
303
303
|
collapsedSize?: number | string | undefined;
|
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
14
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
14
15
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
15
16
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
17
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
-
|
|
18
|
+
declare const selectTriggerVariants: (props?: ({
|
|
19
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export interface SelectTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'size'>, VariantProps<typeof selectTriggerVariants> {
|
|
18
22
|
triggerIcon?: React.ReactNode;
|
|
23
|
+
size?: 'sm' | 'md' | 'lg';
|
|
19
24
|
}
|
|
20
25
|
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
26
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -34,4 +39,4 @@ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.S
|
|
|
34
39
|
itemIndicatorIcon?: React.ReactNode;
|
|
35
40
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
36
41
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
42
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const spinnerVariants: (props?: ({
|
|
4
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof spinnerVariants> {
|
|
4
7
|
}
|
|
5
8
|
export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export { spinnerVariants };
|
|
@@ -13,7 +13,7 @@ import * as React from 'react';
|
|
|
13
13
|
import { type VariantProps } from 'class-variance-authority';
|
|
14
14
|
declare const tagVariants: (props?: ({
|
|
15
15
|
appearance?: "outline" | "filled" | null | undefined;
|
|
16
|
-
color?: "
|
|
16
|
+
color?: "link" | "primary" | "blue" | "lavender" | "orange" | "pink" | "purple" | "teal" | "yellow" | "error" | "warning" | "success" | "info" | "mauve" | "slate" | "sage" | null | undefined;
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
18
|
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof tagVariants> {
|
|
19
19
|
closable?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* [WHO]: Textarea — multi-line text input with token-driven styling.
|
|
3
|
-
* [FROM]: React + `@/lib/utils` cn.
|
|
3
|
+
* [FROM]: React + `@/lib/utils` cn + CVA.
|
|
4
4
|
* [TO]: sparkdesign package consumers; output of CLI `add textarea` when registered.
|
|
5
5
|
* [HERE]: registry/basic/textarea.tsx — Spark Design source; keep aligned with the main library.
|
|
6
6
|
*
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
* 3. Follow design tokens and explicit type exports.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
|
|
13
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
14
|
+
declare const textareaVariants: (props?: ({
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, VariantProps<typeof textareaVariants> {
|
|
18
|
+
size?: 'sm' | 'md' | 'lg';
|
|
19
|
+
}
|
|
14
20
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
15
|
-
export { Textarea };
|
|
21
|
+
export { Textarea, textareaVariants };
|
|
@@ -3,7 +3,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
3
3
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
4
|
import { type VariantProps } from 'class-variance-authority';
|
|
5
5
|
declare const toggleVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "outline" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
rounded?: "square" | "pill" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
package/dist/scale/computed.css
CHANGED
|
@@ -100,4 +100,15 @@
|
|
|
100
100
|
--motion-ease-standard: var(--config-motion-ease-standard);
|
|
101
101
|
--motion-ease-emphasized: var(--config-motion-ease-emphasized);
|
|
102
102
|
--motion-ease-out: var(--config-motion-ease-out);
|
|
103
|
+
|
|
104
|
+
/* ============================================
|
|
105
|
+
Motion Multiplier (从配置映射)
|
|
106
|
+
============================================ */
|
|
107
|
+
--motion-multiplier: var(--config-motion-multiplier);
|
|
108
|
+
|
|
109
|
+
/* ============================================
|
|
110
|
+
Border Width (从配置映射)
|
|
111
|
+
============================================ */
|
|
112
|
+
--border-width: var(--config-border-width);
|
|
113
|
+
--border-width-thick: var(--config-border-width-thick);
|
|
103
114
|
}
|
package/dist/scale/config.css
CHANGED
|
@@ -102,6 +102,17 @@
|
|
|
102
102
|
--config-motion-ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
103
103
|
--config-motion-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
104
104
|
|
|
105
|
+
/* ============================================
|
|
106
|
+
Motion Multiplier (preset 可覆盖,<1 更快,>1 更慢)
|
|
107
|
+
============================================ */
|
|
108
|
+
--config-motion-multiplier: 1;
|
|
109
|
+
|
|
110
|
+
/* ============================================
|
|
111
|
+
Border Width 配置
|
|
112
|
+
============================================ */
|
|
113
|
+
--config-border-width: 1px;
|
|
114
|
+
--config-border-width-thick: 2px;
|
|
115
|
+
|
|
105
116
|
/* ============================================
|
|
106
117
|
Font Family 配置
|
|
107
118
|
============================================ */
|