@splenddev/kreativ-ui 0.2.8 → 0.3.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/index.d.ts CHANGED
@@ -1,131 +1,29 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, ButtonHTMLAttributes, ReactElement, InputHTMLAttributes, HTMLAttributes, TextareaHTMLAttributes, RefObject, JSX } from 'react';
2
+ import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, CSSProperties, ReactElement, InputHTMLAttributes, TextareaHTMLAttributes, ElementType, ComponentPropsWithoutRef, LabelHTMLAttributes, JSX, RefObject } from 'react';
3
+ import { BaseProps, ColorProps, BaseColor, VariantProps, BaseVariant, DisabledProps, LoadingProps, FullWidthProps, TypographyProps, SizeValue, SizeProps, OrientationProps, Orientation, ThemeTogglerTransition, ClearableProps, UndoRedoProps, ValueProps, StateProps, TrimProps, FormFieldStatus, EmbeddedProps, ValidateProps, Styleable, StatusProps, ControlledProps, Size, ResponsiveValue, RecipeDefinition, RecipeCollection, DeepPartial, DefaultRecipeCollection, Typography, ThemeOverride as ThemeOverride$1, TokenValue, SemanticToken, SemanticTokens, DesignTokens, Theme } from '@splenddev/kreativ-core/types';
4
+ export * from '@splenddev/kreativ-core/types';
5
+ import { FormFieldStatus as FormFieldStatus$1, ThemeOverride, ColorMode } from '@splenddev/kreativ-core';
6
+ export { ThemeContext } from '@splenddev/kreativ-core';
7
+ export * from '@splenddev/kreativ-core/hooks';
3
8
  import { ClassValue } from 'clsx';
4
9
 
5
- type Size = "xs" | "sm" | "md" | "lg" | "xl";
6
- type Orientation = "horizontal" | "vertical";
7
- type SizeValue = Size | (string & {});
8
- type BaseVariant = "solid" | "outline" | "ghost" | "soft";
9
- type BaseColor = "brand" | "destructive" | "success" | "warning" | "info" | "neutral" | "white";
10
- type Variant = BaseVariant;
11
- interface Styleable {
12
- className?: string;
13
- }
14
- type BaseTransition = "none" | "fade" | "rotate" | "slide" | "scale";
15
- type DeepPartial<T> = {
16
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
17
- };
18
- type CSSPropertiesWithVars = CSSProperties & {
19
- [key: `--${string}`]: string | number | undefined;
20
- };
21
- interface BaseProps {
22
- /**
23
- * Additional CSS classes.
24
- */
25
- className?: string;
26
- /**
27
- * Inline styles.
28
- */
29
- style?: CSSProperties;
30
- /**
31
- * Component content.
32
- */
10
+ interface AdornmentProps extends HTMLAttributes<HTMLSpanElement> {
33
11
  children?: ReactNode;
34
- /**
35
- * Removes the component's default styling.
36
- */
37
- unstyled?: boolean;
38
- }
39
- interface SizeProps {
40
- /**
41
- * Component size.
42
- */
43
- size?: SizeValue;
44
- }
45
- interface ColorProps<Color extends string = string> {
46
- /**
47
- * Component color.
48
- */
49
- color?: Color;
50
- }
51
- interface VariantProps<Variant extends string = string> {
52
- /**
53
- * Visual variant.
54
- */
55
- variant?: Variant;
56
- }
57
- interface TypographyProps {
58
- /**
59
- * Defines the typography style to apply to the component.
60
- * The value must match a typography style registered in the theme.
61
- */
62
- typography?: string;
63
- }
64
- interface DisabledProps {
65
- /**
66
- * Disables the component.
67
- */
68
- disabled?: boolean;
69
- }
70
- interface LoadingProps {
71
- /**
72
- * Displays a loading state and prevents interaction.
73
- */
74
- isLoading?: boolean;
75
- }
76
- interface FullWidthProps {
77
- /**
78
- * Makes the component span the available width.
79
- */
80
- fullWidth?: boolean;
81
- }
82
- interface ClearableProps {
83
- /**
84
- * Allows the current value to be cleared.
85
- */
86
- clearable?: boolean;
87
- /**
88
- * Called when the current value is cleared.
89
- */
90
- onClear?: () => void;
91
- }
92
- interface StateProps {
93
- /**
94
- * Displays an error state.
95
- */
96
- error?: boolean;
97
- /**
98
- * Displays a success state.
99
- */
100
- success?: boolean;
101
- }
102
- interface ValueProps {
103
- /**
104
- * Passed value
105
- */
106
- value?: string;
107
- /**
108
- * For uncontrolled form control
109
- */
110
- defaultValue?: string;
111
- /**
112
- * Called when value is changed
113
- *
114
- * @param newValue
115
- * @returns void
116
- */
117
- onValueChange?: (newValue: string) => void;
12
+ position?: "start" | "end";
118
13
  }
119
14
 
15
+ declare const Adornment: react.ForwardRefExoticComponent<AdornmentProps & react.RefAttributes<HTMLSpanElement>>;
16
+
120
17
  type ButtonSize = SizeValue | "icon";
121
18
  type ButtonVariant = BaseVariant | "link";
122
19
  type ButtonColor = BaseColor;
123
- interface ButtonRenderProps {
20
+ interface ButtonRenderProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "color"> {
124
21
  className?: string;
125
22
  style?: CSSProperties;
126
23
  disabled?: boolean;
127
24
  "aria-disabled"?: boolean;
128
25
  "aria-busy"?: boolean;
26
+ "data-kui-responsive"?: string;
129
27
  children?: ReactNode;
130
28
  }
131
29
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "color">, BaseProps, ColorProps<ButtonColor>, VariantProps<ButtonVariant>, DisabledProps, LoadingProps, FullWidthProps, TypographyProps {
@@ -162,686 +60,76 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onD
162
60
 
163
61
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
164
62
 
165
- /**
166
- * A CSS class name or a string containing multiple class names.
167
- * Typically used to apply styles generated by a styling solution (e.g., CSS Modules, Tailwind, Panda CSS).
168
- *
169
- * @example
170
- * ```ts
171
- * const baseStyle: RecipeStyle = "btn btn-primary";
172
- * const variantStyle: RecipeStyle = "bg-blue-500 hover:bg-blue-600";
173
- * ```
174
- */
175
- type RecipeStyle = string;
176
- type RecipeVariantValue = string | boolean | number;
177
- /**
178
- * A mapping of variant key to a CSS class string.
179
- * Each variant option maps to a specific style.
180
- *
181
- * @example
182
- * ```ts
183
- * const colorVariants: RecipeVariant = {
184
- * brand: "bg-brand text-white",
185
- * destructive: "bg-red-500 text-white",
186
- * outline: "border-2 border-current bg-transparent",
187
- * };
188
- * ```
189
- */
190
- type RecipeVariant = Record<string, RecipeStyle>;
191
- /**
192
- * Defines a compound variant: a set of conditions (multiple variant keys)
193
- * that together produce a specific className.
194
- *
195
- * This is useful when you need to apply styles only when two or more
196
- * variant values are combined (e.g., `variant="solid"` AND `color="brand"`).
197
- *
198
- * @property conditions - A record where keys are variant names and values are the variant values.
199
- * @property className - The style to apply when all conditions match.
200
- *
201
- * @example
202
- * ```ts
203
- * const compound: RecipeCompoundVariant = {
204
- * conditions: { variant: "solid", color: "brand" },
205
- * className: "shadow-lg bg-brand-dark",
206
- * };
207
- * ```
208
- */
209
- interface RecipeCompoundVariant {
210
- conditions: Record<string, RecipeVariantValue>;
211
- className: RecipeStyle;
212
- }
213
- /**
214
- * Defines the complete styling recipe for a single component.
215
- *
216
- * A recipe consists of:
217
- * - **base**: styles applied to every instance of the component.
218
- * - **variants**: a set of variant groups (e.g., `size`, `color`, `variant`).
219
- * - **defaultVariants**: which variant values to use when none are provided.
220
- * - **compoundVariants**: conditional styles that apply when multiple variant conditions are met.
221
- *
222
- * @example
223
- * ```ts
224
- * const buttonRecipe: RecipeDefinition = {
225
- * base: "inline-flex items-center justify-center rounded font-medium transition-colors",
226
- * variants: {
227
- * variant: {
228
- * solid: "bg-brand text-white hover:bg-brand-dark",
229
- * outline: "border-2 border-brand text-brand hover:bg-brand/10",
230
- * ghost: "text-brand hover:bg-brand/10",
231
- * },
232
- * size: {
233
- * sm: "px-3 py-1 text-sm",
234
- * md: "px-4 py-2 text-base",
235
- * lg: "px-6 py-3 text-lg",
236
- * },
237
- * },
238
- * defaultVariants: {
239
- * variant: "solid",
240
- * size: "md",
241
- * },
242
- * compoundVariants: [
243
- * {
244
- * conditions: { variant: "solid", size: "lg" },
245
- * className: "shadow-lg",
246
- * },
247
- * ],
248
- * };
249
- * ```
250
- */
251
- interface RecipeDefinition {
252
- /**
253
- * Base classes applied to every component.
254
- * These are combined with the variant classes.
255
- *
256
- * @example
257
- * ```ts
258
- * base: "flex items-center gap-2"
259
- * ```
260
- */
261
- base?: RecipeStyle;
262
- /**
263
- * Variant groups.
264
- * Each key defines a variant prop name (e.g., `size`, `color`).
265
- * The value is a map of variant option → CSS classes.
266
- *
267
- * @example
268
- * ```ts
269
- * variants: {
270
- * size: {
271
- * sm: "text-sm px-3 py-1",
272
- * md: "text-base px-4 py-2",
273
- * },
274
- * color: {
275
- * brand: "bg-brand text-white",
276
- * destructive: "bg-red-500 text-white",
277
- * },
278
- * }
279
- * ```
280
- */
281
- variants?: Record<string, RecipeVariant>;
63
+ type ButtonGroupSpacing = "none" | "sm" | "md" | "lg";
64
+ interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "color" | "size">, Omit<BaseProps, "unstyled">, SizeProps, OrientationProps {
282
65
  /**
283
- * Variants used when no explicit prop is provided.
66
+ * Whether adjacent buttons should visually connect.
284
67
  *
285
- * Supports string, boolean, and numeric values.
286
- *
287
- * @example
288
- * ```ts
289
- * defaultVariants: {
290
- * size: "md",
291
- * rounded: false,
292
- * }
293
- * ```
68
+ * @default false
294
69
  */
295
- defaultVariants?: Record<string, RecipeVariantValue>;
70
+ attached?: boolean;
296
71
  /**
297
- * Classes applied when multiple variant conditions match.
298
- * This is useful for special combinations that require additional styling.
72
+ * Space between group items when not attached.
299
73
  *
300
- * @example
301
- * ```ts
302
- * compoundVariants: [
303
- * {
304
- * conditions: { variant: "solid", color: "brand" },
305
- * className: "shadow-lg",
306
- * },
307
- * {
308
- * conditions: { size: "lg", color: "destructive" },
309
- * className: "uppercase",
310
- * },
311
- * ]
312
- * ```
74
+ * @default "md"
313
75
  */
314
- compoundVariants?: RecipeCompoundVariant[];
315
- }
316
- /**
317
- * A collection of component recipes, keyed by component name.
318
- * Each component has its own `RecipeDefinition`.
319
- *
320
- * @example
321
- * ```ts
322
- * const recipes: RecipeCollection = {
323
- * Button: buttonRecipe,
324
- * Card: cardRecipe,
325
- * Input: inputRecipe,
326
- * };
327
- * ```
328
- */
329
- type RecipeCollection = Record<string, RecipeDefinition>;
330
-
331
- /**
332
- * The primitive value type for any design token.
333
- * Can be a CSS value as a string (e.g., "16px", "#fff", "1.5rem")
334
- * or a unitless number (e.g., 0, 1.5, 4).
335
- *
336
- * @example
337
- * ```ts
338
- * const fontSize: TokenValue = "1.25rem";
339
- * const opacity: TokenValue = 0.8;
340
- * ```
341
- */
342
- type TokenValue = string | number;
343
- /**
344
- * A wrapper around a single design value.
345
- * @template T - The specific TokenValue type (defaults to string | number).
346
- *
347
- * Every leaf in the token tree is a TokenDefinition.
348
- *
349
- * @example
350
- * ```ts
351
- * const blue500: TokenDefinition<string> = { value: "#3b82f6" };
352
- * const spacing4: TokenDefinition<number> = { value: 4 };
353
- * ```
354
- */
355
- interface TokenDefinition<T extends TokenValue = TokenValue> {
356
- value: T;
76
+ spacing?: ButtonGroupSpacing;
357
77
  }
358
- /**
359
- * A recursive structure that allows nested token collections.
360
- * Keys are arbitrary strings and values are either a leaf (TokenDefinition)
361
- * or another nested group.
362
- *
363
- * This enables hierarchical paths like:
364
- * - colors.blue.500
365
- * - spacing.4
366
- * - radii.md
367
- *
368
- * @example
369
- * ```ts
370
- * const tokens: TokenGroup = {
371
- * colors: {
372
- * blue: {
373
- * 50: { value: "#eff6ff" },
374
- * 500: { value: "#3b82f6" },
375
- * },
376
- * red: { value: "#ef4444" }, // direct leaf
377
- * },
378
- * spacing: {
379
- * sm: { value: "8px" },
380
- * md: { value: "16px" },
381
- * },
382
- * };
383
- * ```
384
- */
385
- interface TokenGroup {
386
- [key: string]: TokenDefinition | TokenGroup;
78
+ interface ButtonGroupSeparatorProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, OrientationProps {
387
79
  }
388
- /**
389
- * A flat collection of color values for a single color family.
390
- * Keys typically represent shades (e.g., "50", "100", "500", "900").
391
- * Each value is a TokenDefinition<string> representing a CSS color.
392
- *
393
- * @example
394
- * ```ts
395
- * const blueScale: ColorScale = {
396
- * 50: { value: "#eff6ff" },
397
- * 100: { value: "#dbeafe" },
398
- * 500: { value: "#3b82f6" },
399
- * 900: { value: "#1e3a8a" },
400
- * };
401
- * ```
402
- */
403
- interface ColorScale {
404
- [key: string]: TokenDefinition<string>;
80
+ interface ButtonGroupTextProps extends HTMLAttributes<HTMLSpanElement>, Omit<BaseProps, "unstyled"> {
405
81
  }
406
- /**
407
- * A collection of color scales and/or direct color tokens.
408
- * Keys are colour family names (e.g., "blue", "gray", "brand").
409
- * Values can be a full ColorScale or a single TokenDefinition<string>.
410
- *
411
- * @example
412
- * ```ts
413
- * const colors: ColorTokens = {
414
- * blue: { 50: { value: "#eff6ff" }, 500: { value: "#3b82f6" } },
415
- * gray: { 100: { value: "#f3f4f6" }, 900: { value: "#111827" } },
416
- * brand: { value: "#2563eb" }, // flat single color
417
- * };
418
- * ```
419
- */
420
- interface ColorTokens {
421
- [key: string]: ColorScale | TokenDefinition<string>;
82
+ interface ButtonGroupLabelProps extends HTMLAttributes<HTMLSpanElement>, Omit<BaseProps, "unstyled"> {
422
83
  }
423
- /**
424
- * A flat map of spacing tokens.
425
- * Keys describe the spacing size (e.g., "xs", "md", "lg", "4").
426
- * Values are TokenDefinition<string> containing a CSS length.
427
- *
428
- * @example
429
- * ```ts
430
- * const spacing: SpacingTokens = {
431
- * xs: { value: "4px" },
432
- * md: { value: "16px" },
433
- * lg: { value: "24px" },
434
- * };
435
- * ```
436
- */
437
- interface SpacingTokens {
438
- [key: string]: TokenDefinition<string>;
84
+ interface ButtonGroupItemProps extends HTMLAttributes<HTMLDivElement> {
439
85
  }
440
- /**
441
- * A flat map of border‑radius tokens.
442
- * Keys describe the radius size (e.g., "sm", "md", "full").
443
- * Values are TokenDefinition<string> containing a CSS length.
444
- */
445
- interface RadiusTokens {
446
- [key: string]: TokenDefinition<string>;
447
- }
448
- /**
449
- * A flat map of font‑family tokens.
450
- * Keys describe the font name (e.g., "body", "heading", "mono").
451
- * Values are TokenDefinition<string> containing a CSS font‑family value.
452
- */
453
- interface FontTokens {
454
- [key: string]: TokenDefinition<string>;
455
- }
456
- /**
457
- * A flat map of font‑size tokens.
458
- * Keys describe the size name (e.g., "xs", "sm", "base", "xl").
459
- * Values are TokenDefinition<string> containing a CSS font‑size.
460
- */
461
- interface FontSizeTokens {
462
- [key: string]: TokenDefinition<string>;
463
- }
464
- /**
465
- * A flat map of font‑weight tokens.
466
- * Keys describe the weight name (e.g., "normal", "medium", "bold").
467
- * Values are TokenDefinition<string> containing a CSS font‑weight (e.g., "400", "700").
468
- */
469
- interface FontWeightTokens {
470
- [key: string]: TokenDefinition<string>;
471
- }
472
- /**
473
- * A flat map of line‑height tokens.
474
- * Keys describe the line‑height name (e.g., "tight", "normal", "loose").
475
- * Values are TokenDefinition<string> containing a CSS line‑height.
476
- */
477
- interface LineHeightTokens {
478
- [key: string]: TokenDefinition<string>;
479
- }
480
- /**
481
- * A flat map of letter‑spacing tokens.
482
- * Keys describe the spacing name (e.g., "tight", "wide", "wider").
483
- * Values are TokenDefinition<string> containing a CSS letter‑spacing.
484
- */
485
- interface LetterSpacingTokens {
486
- [key: string]: TokenDefinition<string>;
487
- }
488
- /**
489
- * A flat map of shadow tokens.
490
- * Keys describe the shadow name (e.g., "sm", "md", "lg", "xl").
491
- * Values are TokenDefinition<string> containing a CSS box‑shadow value.
492
- */
493
- interface ShadowTokens {
494
- [key: string]: TokenDefinition<string>;
495
- }
496
- /**
497
- * A flat map of animation tokens.
498
- * Keys describe the animation name (e.g., "fade", "slide", "spin").
499
- * Values are TokenDefinition<string> containing a CSS animation shorthand or keyframes name.
500
- */
501
- interface AnimationTokens {
502
- [key: string]: TokenDefinition<string>;
503
- }
504
- /**
505
- * Primitive (raw) design tokens.
506
- * These are mode‑agnostic values that serve as the foundation for semantic tokens.
507
- * Each category is optional; you may define only the ones you need.
508
- *
509
- * The index signature allows custom token groups (e.g., "zIndices", "borders", "opacities")
510
- * to be added as the design system evolves.
511
- *
512
- * @example
513
- * ```ts
514
- * const tokens: DesignTokens = {
515
- * colors: {
516
- * blue: { 50: { value: "#eff6ff" }, 500: { value: "#3b82f6" } },
517
- * gray: { 100: { value: "#f3f4f6" }, 900: { value: "#111827" } },
518
- * },
519
- * spacing: { sm: { value: "8px" }, md: { value: "16px" } },
520
- * radii: { md: { value: "8px" } },
521
- * };
522
- * ```
523
- */
524
- interface DesignTokens {
525
- colors?: ColorTokens;
526
- spacing?: SpacingTokens;
527
- radii?: RadiusTokens;
528
- fonts?: FontTokens;
529
- fontSizes?: FontSizeTokens;
530
- fontWeights?: FontWeightTokens;
531
- lineHeights?: LineHeightTokens;
532
- letterSpacings?: LetterSpacingTokens;
533
- shadows?: ShadowTokens;
534
- animations?: AnimationTokens;
535
- [key: string]: unknown;
536
- }
537
- /**
538
- * A value that can differ between light and dark color modes.
539
- * @template T - The type of the value (defaults to string).
540
- *
541
- * @example
542
- * ```ts
543
- * const brandColor: ColorModeValue = {
544
- * light: "#3b82f6",
545
- * dark: "#60a5fa",
546
- * };
547
- * ```
548
- */
549
- type ColorModeValue<T = string> = {
550
- light: T;
551
- dark: T;
86
+
87
+ declare const ButtonGroup: react.ForwardRefExoticComponent<ButtonGroupProps & react.RefAttributes<HTMLDivElement>> & {
88
+ Separator: react.ForwardRefExoticComponent<ButtonGroupSeparatorProps & react.RefAttributes<HTMLDivElement>>;
89
+ Text: react.ForwardRefExoticComponent<ButtonGroupTextProps & react.RefAttributes<HTMLSpanElement>>;
90
+ Label: react.ForwardRefExoticComponent<ButtonGroupLabelProps & react.RefAttributes<HTMLSpanElement>>;
91
+ Item: react.ForwardRefExoticComponent<ButtonGroupItemProps & react.RefAttributes<HTMLDivElement>>;
552
92
  };
553
- /**
554
- * A semantic token that can be either a static value or a mode‑dependent value.
555
- * @template T - The TokenValue type (defaults to string).
556
- *
557
- * Semantic tokens represent a role (e.g., "background", "text", "border")
558
- * rather than a raw value. They are used to create themes that adapt to color mode.
559
- *
560
- * @example
561
- * ```ts
562
- * const surfaceToken: SemanticToken = {
563
- * value: { light: "#ffffff", dark: "#1e293b" }
564
- * };
565
- * const dangerToken: SemanticToken = { value: "#ef4444" }; // static
566
- * ```
567
- */
568
- interface SemanticToken<T extends TokenValue = string> {
569
- value: T | ColorModeValue<T>;
570
- }
571
- /**
572
- * A flat record of semantic color tokens.
573
- * Keys describe the color role (e.g., "brand", "surface", "text", "danger").
574
- * Values are SemanticToken<string> that resolve to a CSS color.
575
- *
576
- * @example
577
- * ```ts
578
- * const semanticColors: SemanticColorTokens = {
579
- * brand: { value: { light: "#3b82f6", dark: "#60a5fa" } },
580
- * surface: { value: { light: "#ffffff", dark: "#1e293b" } },
581
- * text: { value: { light: "#111827", dark: "#f1f5f9" } },
582
- * danger: { value: "#ef4444" }, // static
583
- * };
584
- * ```
585
- */
586
- interface SemanticColorTokens {
587
- [key: string]: SemanticToken<string>;
588
- }
589
- /**
590
- * Container for all semantic tokens.
591
- * Currently only `colors` is defined, but the index signature allows
592
- * future categories like `shadows`, `borders`, or `opacities`.
593
- */
594
- interface SemanticTokens {
595
- colors?: SemanticColorTokens;
596
- [key: string]: unknown;
597
- }
598
- /**
599
- * A set of CSS properties that define a typography style.
600
- * All properties are optional – you can compose styles incrementally.
601
- *
602
- * @example
603
- * ```ts
604
- * const headingStyle: TextStyle = {
605
- * fontFamily: "Inter, sans-serif",
606
- * fontSize: "2rem",
607
- * fontWeight: 700,
608
- * lineHeight: "1.2",
609
- * letterSpacing: "-0.02em",
610
- * };
611
- * ```
612
- */
613
- interface TypographyStyle {
614
- fontFamily?: string;
615
- fontSize?: string;
616
- fontWeight?: string | number;
617
- lineHeight?: string;
618
- letterSpacing?: string;
619
- }
620
- /**
621
- * A collection of named text styles.
622
- * Keys are style names (e.g., "heading", "body", "caption", "label").
623
- *
624
- * @example
625
- * ```ts
626
- * const typography: Typography = {
627
- * heading: { fontSize: "2rem", fontWeight: 700 },
628
- * body: { fontSize: "1rem", lineHeight: "1.5" },
629
- * };
630
- * ```
631
- */
632
- type Typography = Record<string, TypographyStyle>;
633
- /**
634
- * A set of CSS properties that define the dimensions and spacing
635
- * for a component at a specific size.
636
- *
637
- * Used to build size‑variant scales for components (e.g., "sm", "md", "lg").
638
- *
639
- * @example
640
- * ```ts
641
- * const buttonSize: SizeToken = {
642
- * height: "40px",
643
- * paddingX: "16px",
644
- * fontSize: "1rem",
645
- * iconSize: "20px",
646
- * radius: "8px",
647
- * };
648
- * ```
649
- */
650
- interface SizeToken {
651
- height?: string;
652
- width?: string;
653
- paddingX?: string;
654
- paddingY?: string;
655
- fontSize?: string;
656
- gap?: string;
657
- iconSize?: string;
658
- radius?: string;
659
- }
660
- /**
661
- * A collection of named size tokens.
662
- * Keys are size names (e.g., "sm", "md", "lg", "xl").
663
- *
664
- * @example
665
- * ```ts
666
- * const sizes: SizeScale = {
667
- * sm: { height: "32px", paddingX: "12px", fontSize: "0.875rem" },
668
- * md: { height: "40px", paddingX: "16px", fontSize: "1rem" },
669
- * lg: { height: "48px", paddingX: "24px", fontSize: "1.125rem" },
670
- * };
671
- * ```
672
- */
673
- type SizeScale = Record<string, SizeToken>;
674
- /**
675
- * Defines the transition properties for a theme change.
676
- * `type` refers to a base transition key (imported from BaseTransition).
677
- * `duration` and `delay` are in milliseconds.
678
- * `easing` is a CSS easing function.
679
- */
680
- interface ThemeTransition {
681
- type?: BaseTransition;
682
- duration?: number;
683
- delay?: number;
684
- easing?: string;
93
+
94
+ interface ButtonGroupContextValue {
95
+ orientation: Orientation;
96
+ attached: boolean;
97
+ spacing: ButtonGroupSpacing;
98
+ size?: ButtonProps["size"];
685
99
  }
686
- /**
687
- * The complete theme object provided by the design system.
688
- * It combines primitive tokens, semantic tokens, text styles,
689
- * component recipes, a global intensity, legacy tokens, and size scales.
690
- *
691
- * @property tokens - Raw design values (colors, spacing, radii, etc.).
692
- * @property semanticTokens - Role‑based tokens that adapt to color mode.
693
- * @property typography - Reusable typography styles.
694
- * @property recipes - Component‑specific styles (from RecipeCollection).
695
- * @property intensity - A global multiplier for visual prominence (e.g., 0.8, 1, 1.2).
696
- * @property light - Legacy theme tokens for light mode (kept for migration).
697
- * @property dark - Legacy theme tokens for dark mode (kept for migration).
698
- * @property sizes - Legacy component size scale (will move to recipes).
699
- */
700
- interface Theme {
701
- tokens: DesignTokens;
702
- semanticTokens: SemanticTokens;
703
- typography: Typography;
704
- recipes: RecipeCollection;
705
- intensity: number;
706
- sizes: SizeScale;
100
+ interface ButtonGroupItemContextValue {
101
+ embedded: true;
707
102
  }
103
+ declare const ButtonGroupContext: react.Context<ButtonGroupContextValue>;
104
+ declare const ButtonGroupItemContext: react.Context<ButtonGroupItemContextValue | null>;
708
105
  /**
709
- * A flat record of resolved token values, typically CSS‑ready strings.
710
- * Used internally for injecting variables.
106
+ * Hook to consume the button group context.
107
+ * Throws an error if used outside of a `ButtonGroup` provider.
711
108
  */
712
- type ResolvedTokens = Record<string, string>;
109
+ declare function useButtonGroupContext(): ButtonGroupContextValue;
713
110
  /**
714
- * Defines three standard intensity levels.
715
- * Useful for scaling effects like shadows, saturation, or contrast.
111
+ * Hook to consume the button group context without throwing.
112
+ * Returns the default context if used outside a provider.
716
113
  */
717
- interface IntensityMap {
718
- subtle: number;
719
- default: number;
720
- bold: number;
721
- }
722
- interface ThemeOverride {
723
- /**
724
- * Override primitive design tokens.
725
- * Allows partial updates to raw values like colors, spacing, radii, etc.
726
- *
727
- * @example
728
- * ```ts
729
- * tokens: {
730
- * colors: { blue: { 500: { value: "#1d4ed8" } } },
731
- * spacing: { md: { value: "20px" } },
732
- * }
733
- * ```
734
- */
735
- tokens?: DeepPartial<DesignTokens>;
736
- /**
737
- * Override semantic tokens.
738
- * Allows partial updates to role‑based tokens (brand, surface, text, etc.)
739
- * that can adapt to light/dark modes.
740
- *
741
- * @example
742
- * ```ts
743
- * semanticTokens: {
744
- * colors: {
745
- * brand: { value: { light: "#1d4ed8", dark: "#60a5fa" } },
746
- * surface: { value: { light: "#ffffff", dark: "#0f172a" } },
747
- * },
748
- * }
749
- * ```
750
- */
751
- semanticTokens?: DeepPartial<SemanticTokens>;
752
- /**
753
- * Override reusable text styles.
754
- * Allows partial updates to typography presets like heading, body, caption, etc.
755
- *
756
- * @example
757
- * ```ts
758
- * typography: {
759
- * heading: { fontSize: "2.5rem", fontWeight: 800 },
760
- * body: { fontSize: "1.125rem", lineHeight: "1.75" },
761
- * }
762
- * ```
763
- */
764
- typography?: DeepPartial<Typography>;
765
- /**
766
- * Override component recipes.
767
- * Allows modifying the base styles, variants, default variants, and compound variants
768
- * for any component (e.g., Button, Card, Input) without rewriting the entire theme.
769
- *
770
- * Each key is a component name, and the value is a deep partial of its RecipeDefinition.
771
- * This means you can override only specific variants or classes while keeping the rest intact.
772
- *
773
- * @example
774
- * ```ts
775
- * recipes: {
776
- * Button: {
777
- * base: "custom-base-class inline-flex items-center",
778
- * variants: {
779
- * size: {
780
- * md: "px-6 py-3 text-lg", // override only the "md" size
781
- * },
782
- * },
783
- * compoundVariants: [
784
- * {
785
- * conditions: { variant: "solid", color: "brand" },
786
- * className: "shadow-lg custom-brand-shadow",
787
- * },
788
- * ],
789
- * },
790
- * Card: {
791
- * base: "rounded-xl p-6 bg-surface",
792
- * },
793
- * }
794
- * ```
795
- */
796
- recipes?: DeepPartial<RecipeCollection>;
797
- /**
798
- * Override the global visual intensity.
799
- * A multiplier for effects like shadows, saturation, or contrast.
800
- * Typical values: 0.8 (subtle), 1.0 (default), 1.2 (bold).
801
- *
802
- * @example
803
- * ```ts
804
- * intensity: 1.1 // Slightly bolder than default
805
- * ```
806
- */
807
- intensity?: number;
808
- /**
809
- * Override legacy component size scales.
810
- * Allows updating specific size tokens (height, padding, fontSize, etc.)
811
- * for a given size name (e.g., "sm", "md", "lg").
812
- *
813
- * This will eventually be replaced by component‑specific size variants in recipes.
814
- *
815
- * @example
816
- * ```ts
817
- * sizes: {
818
- * md: { height: "44px", paddingX: "20px" }, // override only "md" size
819
- * lg: { height: "52px", fontSize: "1.25rem" },
820
- * }
821
- * ```
822
- */
823
- sizes?: Record<string, Partial<SizeToken>>;
824
- }
114
+ declare function useOptionalButtonGroupContext(): ButtonGroupContextValue;
825
115
  /**
826
- * Represents the active color mode.
827
- * - "light": force light mode.
828
- * - "dark": force dark mode.
829
- * - "system": follow the user's operating system preference.
116
+ * Hook to check if a button is embedded inside a `ButtonGroupItem`.
117
+ * Returns `true` if used inside an item, otherwise `false`.
830
118
  */
831
- type ColorMode = "light" | "dark" | "system";
119
+ declare function useButtonGroupItemContext(): boolean;
120
+ declare function useOptionalButtonGroupItemContext(): ButtonGroupItemContextValue | null;
832
121
 
833
- type ThemeTogglerVariant = Exclude<ButtonVariant, 'link'>;
122
+ type ThemeTogglerVariant = Exclude<ButtonVariant, "link">;
834
123
  type ThemeTogglerDisplay = "buttons" | "cycle";
835
124
  type ThemeTogglerColor = Exclude<BaseColor, "destructive" | "warning" | "success" | "white" | "info">;
836
- interface ThemeTogglerProps extends Omit<BaseProps, "children"> {
837
- variant?: ThemeTogglerVariant;
838
- activeVariant?: ThemeTogglerVariant;
125
+ interface ThemeTogglerProps extends Omit<BaseProps, "style">, OrientationProps, VariantProps<ButtonVariant> {
126
+ variant?: ButtonVariant;
839
127
  color?: ButtonProps["color"];
128
+ activeVariant?: ButtonVariant;
840
129
  activeColor?: ButtonProps["color"];
841
130
  size?: ButtonProps["size"];
842
131
  iconOnly?: boolean;
843
132
  allowSystem?: boolean;
844
- orientation?: Orientation;
845
133
  rounded?: boolean;
846
134
  labels?: {
847
135
  light?: string;
@@ -849,21 +137,24 @@ interface ThemeTogglerProps extends Omit<BaseProps, "children"> {
849
137
  system?: string;
850
138
  };
851
139
  icons?: {
852
- light?: React.ReactNode;
853
- dark?: React.ReactNode;
854
- system?: React.ReactNode;
140
+ light?: ReactNode;
141
+ dark?: ReactNode;
142
+ system?: ReactNode;
855
143
  };
856
- buttonProps?: Omit<ButtonProps, "variant" | "color" | "size" | "children">;
857
- display?: ThemeTogglerDisplay;
858
- transition?: ThemeTransition;
144
+ buttonProps?: ButtonProps;
145
+ display?: "buttons" | "cycle";
146
+ animated?: boolean;
147
+ transition?: ThemeTogglerTransition;
148
+ indicatorClassName?: string;
149
+ indicatorStyle?: CSSProperties;
859
150
  }
860
151
 
861
- declare function ThemeToggler({ variant, activeVariant, color, activeColor, size, iconOnly, allowSystem, orientation, rounded, unstyled, labels, icons, className, buttonProps, display, transition, }: ThemeTogglerProps): react.JSX.Element;
152
+ declare function ThemeToggler({ variant, color, activeVariant, activeColor, size, iconOnly, allowSystem, orientation, rounded, unstyled, labels, icons, className, buttonProps, display, animated, transition, }: ThemeTogglerProps): react.JSX.Element;
862
153
 
863
154
  type InputVariant = "outline" | "filled" | "ghost";
864
- type InputSize = "sm" | "md" | "lg";
155
+ type InputSize = "xs" | "sm" | "md" | "lg";
865
156
  type InputKind = "text" | "email" | "tel" | "url" | "search" | "numeric" | "password-current" | "password-new" | "number" | "date" | "time" | "datetime-local" | "month" | "week";
866
- interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, BaseProps, SizeProps, VariantProps<InputVariant>, DisabledProps, LoadingProps, FullWidthProps, ClearableProps, StateProps {
157
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue">, BaseProps, SizeProps, VariantProps<InputVariant>, DisabledProps, LoadingProps, FullWidthProps, ClearableProps, UndoRedoProps, ValueProps<string | number | undefined>, StateProps, TrimProps, TypographyProps {
867
158
  inputClassName?: string;
868
159
  kind?: InputKind;
869
160
  rounded?: boolean;
@@ -884,15 +175,18 @@ type InputKindDefaults = Record<InputKind, {
884
175
 
885
176
  declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
886
177
 
887
- declare const inputKindDefaults: InputKindDefaults;
888
-
889
178
  interface FormFieldProps extends Omit<BaseProps, "unstyled"> {
890
179
  id?: string;
891
180
  error?: string;
181
+ message?: ReactNode;
182
+ status?: FormFieldStatus;
892
183
  required?: boolean;
893
184
  }
185
+ interface FormFieldMessageProps {
186
+ children?: ReactNode;
187
+ }
894
188
 
895
- declare function FormField({ id: externalId, error, required, className, children, }: FormFieldProps): react.JSX.Element;
189
+ declare function FormField({ id: externalId, status, message: formMessage, required, className, children, }: FormFieldProps): react.JSX.Element;
896
190
  declare namespace FormField {
897
191
  var Label: typeof FormFieldLabel;
898
192
  var Control: typeof FormFieldControl;
@@ -909,9 +203,7 @@ declare function FormFieldDescription({ children, }: {
909
203
  children: React.ReactNode;
910
204
  }): react.JSX.Element;
911
205
 
912
- declare function FormFieldMessage({ children }: {
913
- children: React.ReactNode;
914
- }): react.JSX.Element;
206
+ declare function FormFieldMessage({ children }: FormFieldMessageProps): react.JSX.Element | null;
915
207
 
916
208
  type FormFieldControlProps<T = Record<string, unknown>> = {
917
209
  children: ReactElement<T>;
@@ -959,7 +251,7 @@ interface SelectLabelProps {
959
251
  className?: string;
960
252
  }
961
253
 
962
- declare function SelectContent({ className, children, ...props }: SelectContentProps): react.JSX.Element | null;
254
+ declare function SelectContent({ className, children, ...props }: SelectContentProps): react.JSX.Element;
963
255
 
964
256
  declare function SelectItem({ value, disabled, children, className, ...props }: SelectItemProps): react.JSX.Element;
965
257
 
@@ -981,45 +273,6 @@ declare namespace Select {
981
273
 
982
274
  declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
983
275
 
984
- interface SelectItemMeta {
985
- label: ReactNode;
986
- disabled?: boolean;
987
- }
988
- interface SelectContextValue {
989
- value?: string;
990
- onValueChange: (value: string) => void;
991
- disabled: boolean;
992
- variant: InputVariant;
993
- size: InputSize;
994
- rounded?: boolean;
995
- open: boolean;
996
- setOpen: (open: boolean) => void;
997
- triggerId: string;
998
- triggerRef: React.RefObject<HTMLDivElement | null>;
999
- contentId: string;
1000
- describedBy?: string;
1001
- selectedLabel?: React.ReactNode;
1002
- labelId: string | undefined;
1003
- tabIndex?: number;
1004
- required?: boolean;
1005
- isInvalid: boolean;
1006
- isSuccess: boolean;
1007
- activeValue: string | undefined;
1008
- setActiveValue: (value: string | undefined) => void;
1009
- items: Map<string, SelectItemMeta>;
1010
- registerItem: (value: string, meta: SelectItemMeta) => () => void;
1011
- optionId: (value: string) => string;
1012
- placeholder?: string;
1013
- clearable: boolean;
1014
- onClear: () => void;
1015
- }
1016
- declare const SelectContext: react.Context<SelectContextValue | null>;
1017
- declare function useSelectContext(componentName: string): SelectContextValue;
1018
- declare const SelectGroupContext: react.Context<{
1019
- labelId: string;
1020
- setHasLabel: (id: string) => void;
1021
- } | null>;
1022
-
1023
276
  type MarkdownEditorTabs = "write" | "preview";
1024
277
  interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoResize"> {
1025
278
  /** Renders the Preview tab. Omit and Preview shows raw text with a dev warning. */
@@ -1031,15 +284,13 @@ interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoRe
1031
284
  }
1032
285
 
1033
286
  type TextareaResize = "none" | "both" | "horizontal" | "vertical";
1034
- interface TextareaCoreProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "defaultValue" | "value">, Omit<BaseProps, "unstyled" | "style">, SizeProps, StateProps, VariantProps<InputVariant>, ClearableProps, ValueProps, FullWidthProps {
287
+ interface TextareaCoreProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "defaultValue" | "value">, Omit<BaseProps, "unstyled" | "style">, SizeProps, StateProps, VariantProps<InputVariant>, ClearableProps, ValueProps, FullWidthProps, EmbeddedProps, StateProps, TrimProps, ValidateProps<string>, TypographyProps {
1035
288
  resize?: TextareaResize;
1036
289
  autoResize?: boolean;
1037
290
  minRows?: number;
1038
291
  maxRows?: number;
1039
292
  characterCounter?: boolean;
1040
293
  debounceDelay?: number;
1041
- trimOnBlur?: boolean;
1042
- onValidate?: (value: string) => boolean | string;
1043
294
  }
1044
295
  type TextareaProps = ({
1045
296
  allowMarkdown?: false;
@@ -1047,20 +298,13 @@ type TextareaProps = ({
1047
298
  allowMarkdown: true;
1048
299
  } & Omit<TextareaCoreProps, "resize"> & MarkdownEditorProps);
1049
300
 
1050
- declare const TextareaCore: react.ForwardRefExoticComponent<TextareaCoreProps & react.RefAttributes<HTMLTextAreaElement>>;
1051
-
1052
301
  declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
1053
302
 
1054
303
  declare const MarkdownEditor: react.ForwardRefExoticComponent<MarkdownEditorProps & react.RefAttributes<HTMLTextAreaElement>>;
1055
304
 
1056
- interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable {
1057
- checked?: boolean;
1058
- defaultChecked?: boolean;
1059
- onCheckedChange?: (checked: boolean) => void;
305
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable, StateProps, StatusProps, ControlledProps<boolean, "checked", "defaultChecked", "onCheckedChange"> {
1060
306
  indeterminate?: boolean;
1061
307
  size?: InputSize;
1062
- error?: boolean;
1063
- success?: boolean;
1064
308
  disabled?: boolean;
1065
309
  label?: ReactNode;
1066
310
  description?: ReactNode;
@@ -1094,39 +338,26 @@ declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, nam
1094
338
 
1095
339
  declare function Radio({ value, disabled: itemDisabled, label, description, className, ...props }: RadioProps): react.JSX.Element;
1096
340
 
341
+ type SwitchSize = "xs" | "sm" | "md" | "lg";
1097
342
  interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable {
1098
343
  checked?: boolean;
1099
344
  defaultChecked?: boolean;
1100
345
  onCheckedChange?: (checked: boolean) => void;
1101
- size?: InputSize;
346
+ size?: SwitchSize;
1102
347
  error?: boolean;
1103
348
  success?: boolean;
1104
- required?: boolean;
1105
- disabled?: boolean;
1106
349
  label?: ReactNode;
1107
350
  description?: ReactNode;
1108
351
  }
1109
352
 
1110
- declare function Switch({ checked: checkedProp, defaultChecked, onCheckedChange, size, disabled, label, description, className, id: externalId, onChange: onChangeProp, ...props }: SwitchProps): react.JSX.Element;
353
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
1111
354
 
1112
- interface ComboboxProps extends Styleable {
1113
- value?: string;
1114
- onValueChange?: (value: string | undefined) => void;
1115
- inputValue?: string;
1116
- defaultInputValue?: string;
1117
- onInputChange?: (input: string) => void;
1118
- disabled?: boolean;
355
+ interface ComboboxProps extends Omit<BaseProps, "unstyled">, ValueProps<string | undefined>, ControlledProps<string | undefined, "inputValue", "defaultInputValue", "onInputChange">, DisabledProps, VariantProps<BaseVariant>, SizeProps, ClearableProps, StatusProps, StateProps {
1119
356
  required?: boolean;
1120
- error?: boolean;
1121
- success?: boolean;
1122
357
  rounded?: boolean;
1123
358
  name?: string;
1124
- variant?: InputVariant;
1125
- size?: InputSize;
1126
359
  placeholder?: string;
1127
- clearable?: boolean;
1128
360
  allowFreeText?: boolean;
1129
- children: ReactNode;
1130
361
  }
1131
362
  interface ComboboxItemProps {
1132
363
  value: string;
@@ -1134,13 +365,8 @@ interface ComboboxItemProps {
1134
365
  children: ReactNode;
1135
366
  className?: string;
1136
367
  }
1137
- interface ComboboxInputProps {
1138
- variant?: InputVariant;
1139
- size?: InputSize;
1140
- placeholder?: string;
1141
- clearable?: boolean;
368
+ interface ComboboxInputProps extends InputProps {
1142
369
  allowFreeText?: boolean;
1143
- className?: string;
1144
370
  }
1145
371
 
1146
372
  declare function ComboboxItem({ value, disabled, children, className, }: ComboboxItemProps): react.JSX.Element | null;
@@ -1217,281 +443,416 @@ declare const MultiSelectTrigger: react.ForwardRefExoticComponent<{
1217
443
  className?: string;
1218
444
  } & react.RefAttributes<HTMLButtonElement>>;
1219
445
 
1220
- interface MultiSelectItemMeta {
1221
- label: React.ReactNode;
1222
- disabled?: boolean;
446
+ interface ContainerProps extends BaseProps {
447
+ /**
448
+ * Max-width of the container, mapped to the Container recipe's `size` variant.
449
+ * @default "lg"
450
+ */
451
+ maxWidth?: Size | (string & {});
452
+ /**
453
+ * Horizontal padding. Token-based (Size) or a raw responsive CSS value.
454
+ */
455
+ padding?: ResponsiveValue<Size | (string & {})>;
456
+ /**
457
+ * Centers the container horizontally via margin-inline: auto.
458
+ * @default true
459
+ */
460
+ centered?: boolean;
461
+ /**
462
+ * Element type to render as.
463
+ * @default "div"
464
+ */
465
+ as?: ElementType;
466
+ children?: ReactNode;
1223
467
  }
1224
- interface MultiSelectContextValue {
1225
- value: string[];
1226
- toggleValue: (v: string) => void;
1227
- removeValue: (v: string) => void;
1228
- disabled: boolean;
1229
- variant: InputVariant;
1230
- size: InputSize;
1231
- open: boolean;
1232
- setOpen: (open: boolean) => void;
1233
- triggerId: string;
1234
- contentId: string;
1235
- triggerRef: RefObject<HTMLDivElement | null>;
1236
- isInvalid: boolean;
1237
- isSuccess?: boolean;
1238
- describedBy?: string;
1239
- required?: boolean;
1240
- placeholder?: string;
1241
- maxVisibleChips?: number;
1242
- activeValue: string | undefined;
1243
- setActiveValue: (v: string | undefined) => void;
1244
- items: Map<string, MultiSelectItemMeta>;
1245
- registerItem: (value: string, meta: MultiSelectItemMeta) => () => void;
1246
- optionId: (value: string) => string;
1247
- onClear: () => void;
1248
- rounded?: boolean;
1249
- clearable?: boolean;
468
+
469
+ declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLDivElement>>;
470
+
471
+ interface FlexProps extends BaseProps {
472
+ /** @default "row" */
473
+ direction?: ResponsiveValue<CSSProperties["flexDirection"]>;
474
+ /** @default "nowrap" */
475
+ wrap?: ResponsiveValue<CSSProperties["flexWrap"]>;
476
+ align?: ResponsiveValue<CSSProperties["alignItems"]>;
477
+ justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
478
+ /** Token-based gap, e.g. "sm" | "md" | raw CSS length */
479
+ gap?: ResponsiveValue<Size | (string & {})>;
480
+ as?: ElementType;
481
+ children?: ReactNode;
1250
482
  }
1251
- declare const MultiSelectContext: react.Context<MultiSelectContextValue | null>;
1252
- declare function useMultiSelectContext(componentName: string): MultiSelectContextValue;
1253
483
 
1254
- interface UIProviderProps {
1255
- children: ReactNode;
1256
- theme?: ThemeOverride;
1257
- defaultMode?: ColorMode;
1258
- as?: keyof JSX.IntrinsicElements;
1259
- fallbackSize?: string;
484
+ declare const Flex: react.ForwardRefExoticComponent<FlexProps & react.RefAttributes<HTMLDivElement>>;
485
+
486
+ interface StackProps extends BaseProps {
487
+ /**
488
+ * Layout direction of the stack.
489
+ * @default "vertical"
490
+ */
491
+ orientation?: Orientation;
492
+ gap?: ResponsiveValue<Size | (string & {})>;
493
+ align?: ResponsiveValue<CSSProperties["alignItems"]>;
494
+ justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
495
+ wrap?: ResponsiveValue<CSSProperties["flexWrap"]>;
496
+ /** Renders between each child. */
497
+ divider?: ReactNode;
498
+ as?: ElementType;
499
+ children?: ReactNode;
1260
500
  }
1261
- declare function UIProvider({ children, theme: themeOverride, defaultMode, as, fallbackSize, }: UIProviderProps): JSX.Element;
1262
-
1263
- interface ThemeContextValue {
1264
- theme: Theme;
1265
- mode: ColorMode;
1266
- resolvedMode: "light" | "dark";
1267
- setMode: (mode: ColorMode) => void;
1268
- fallbackSize: string;
1269
- tokens: ResolvedTokens;
501
+
502
+ declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<HTMLDivElement>>;
503
+
504
+ interface GridProps extends BaseProps {
505
+ /**
506
+ * Shorthand for equal-width columns, e.g. `columns={3}` → repeat(3, 1fr).
507
+ * Ignored if `templateColumns` is set.
508
+ */
509
+ columns?: ResponsiveValue<number>;
510
+ /** Raw escape hatch for gridTemplateColumns, e.g. "200px 1fr 1fr". */
511
+ templateColumns?: ResponsiveValue<string>;
512
+ /** Raw escape hatch for gridTemplateRows. */
513
+ templateRows?: ResponsiveValue<string>;
514
+ /** Raw escape hatch for gridTemplateAreas. Not responsive — rarely varies by breakpoint. */
515
+ templateAreas?: string;
516
+ gap?: ResponsiveValue<Size | (string & {})>;
517
+ columnGap?: ResponsiveValue<Size | (string & {})>;
518
+ rowGap?: ResponsiveValue<Size | (string & {})>;
519
+ align?: ResponsiveValue<CSSProperties["alignItems"]>;
520
+ justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
521
+ as?: ElementType;
522
+ children?: ReactNode;
1270
523
  }
1271
- declare const ThemeContext: react.Context<ThemeContextValue | null>;
1272
524
 
1273
- declare const defaultSizes: SizeScale;
1274
- declare const defaultRecipes: RecipeCollection;
1275
- declare const defaultTheme: Theme;
525
+ declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement>>;
526
+
527
+ type CardVariant = "solid" | "outline" | "ghost" | "elevated" | "compact";
528
+ type CardSize = "sm" | "md" | "lg";
529
+ interface CardProps extends ComponentPropsWithoutRef<"div"> {
530
+ /**
531
+ * Visual style of the card.
532
+ */
533
+ variant?: CardVariant;
534
+ /**
535
+ * Controls the card's padding and overall density.
536
+ */
537
+ size?: CardSize;
538
+ /**
539
+ * Indicates that the card contains an image.
540
+ */
541
+ hasImage?: boolean;
542
+ /**
543
+ * Makes the card span the full available width.
544
+ */
545
+ fullWidth?: boolean;
546
+ /**
547
+ * Removes the card's default padding.
548
+ */
549
+ noPadding?: boolean;
550
+ /**
551
+ * Card content.
552
+ */
553
+ children?: ReactNode;
554
+ }
555
+ interface CardHeaderProps extends ComponentPropsWithoutRef<"div"> {
556
+ children?: ReactNode;
557
+ }
558
+ interface CardBodyProps extends ComponentPropsWithoutRef<"div"> {
559
+ children?: ReactNode;
560
+ }
561
+ interface CardFooterProps extends ComponentPropsWithoutRef<"div"> {
562
+ children?: ReactNode;
563
+ }
1276
564
 
1277
- declare function tokensToCssVars(tokens: ResolvedTokens, mode: "light" | "dark", intensity: number): Record<string, string>;
565
+ declare function Card({ variant, size, hasImage, fullWidth, noPadding, className, children, ...props }: CardProps): react.JSX.Element;
566
+ declare namespace Card {
567
+ var Header: typeof CardHeader;
568
+ var Body: typeof CardBody;
569
+ var Footer: typeof CardFooter;
570
+ }
571
+ declare function CardHeader({ className, children, ...props }: CardHeaderProps): react.JSX.Element;
572
+ declare function CardBody({ className, children, ...props }: CardBodyProps): react.JSX.Element;
573
+ declare function CardFooter({ className, children, ...props }: CardFooterProps): react.JSX.Element;
1278
574
 
1279
- declare function useTheme(): ThemeContextValue;
575
+ type SkeletonShape = {
576
+ rows?: number;
577
+ avatar?: boolean | {
578
+ size?: Extract<Size, "xs" | "sm" | "md">;
579
+ shape?: "circle" | "square";
580
+ };
581
+ width?: string | number;
582
+ height?: string | number;
583
+ radius?: string | number;
584
+ gap?: string | number;
585
+ };
1280
586
 
1281
- declare const BREAKPOINTS: {
1282
- readonly sm: 640;
1283
- readonly md: 768;
1284
- readonly lg: 1024;
1285
- readonly xl: 1280;
1286
- readonly "2xl": 1536;
587
+ type SkeletonResolver<P = any> = (props: Partial<P>) => SkeletonShape;
588
+ type SkeletonDefinition<P = any> = {
589
+ resolve: SkeletonResolver<P>;
590
+ defaults?: SkeletonShape;
1287
591
  };
1288
- type Breakpoint = keyof typeof BREAKPOINTS;
1289
- /** Returns whether the viewport is at or above the given breakpoint. */
1290
- declare function useBreakpoint(breakpoint: Breakpoint): boolean;
1291
592
 
1292
- interface ResolvedSize {
1293
- style: CSSProperties;
1294
- iconSize?: string;
593
+ declare const cardSkeleton: SkeletonDefinition<CardProps>;
594
+
595
+ /**
596
+ * Represents the visual state of the field for feedback and styling.
597
+ */
598
+ interface InputFieldProps extends InputProps {
599
+ /**
600
+ * The primary label for the input. Supports React nodes for rich formatting
601
+ * (e.g., icons, badges, or custom typography).
602
+ */
603
+ label?: ReactNode;
604
+ /**
605
+ * Helper text displayed near the input (usually below the label or the input itself).
606
+ * Use this for permanent instructions or contextual guidance.
607
+ */
608
+ description?: ReactNode;
609
+ /**
610
+ * Content (e.g., an icon, badge, or avatar) rendered inline at the start of the label.
611
+ */
612
+ labelStart?: ReactNode;
613
+ /**
614
+ * Content (e.g., a badge, status indicator, or small action button)
615
+ * rendered inline at the end of the label.
616
+ */
617
+ labelEnd?: ReactNode;
618
+ /**
619
+ * An optional tooltip, info icon, or popover trigger rendered next to the label.
620
+ * Ideal for providing supplementary explanations without cluttering the UI.
621
+ */
622
+ tooltip?: ReactNode;
623
+ /**
624
+ * The current validation or status state of the field.
625
+ * Drives the visual appearance (border color, label color, message styling).
626
+ *
627
+ * @default 'none'
628
+ */
629
+ status?: FormFieldStatus$1;
630
+ /**
631
+ * Feedback message displayed below the input.
632
+ * Typically paired with `status` to show success confirmations or error details.
633
+ *
634
+ * @example "Please enter a valid email address."
635
+ */
636
+ message?: string;
637
+ /**
638
+ * A subtle, temporary hint displayed below the input, distinct from `description`.
639
+ * Great for showing formatting rules, password requirements, or dynamic suggestions.
640
+ */
641
+ hint?: ReactNode;
642
+ /**
643
+ * Marks the field as required. Automatically appends a required indicator
644
+ * (e.g., an asterisk `*`) to the label.
645
+ *
646
+ * @default false
647
+ */
648
+ required?: boolean;
649
+ /**
650
+ * Controls whether the field displays an optional indicator
651
+ * (e.g., "(optional)") next to the label.
652
+ * This is typically ignored if `required` is `true`.
653
+ *
654
+ * @default false
655
+ */
656
+ optional?: boolean;
657
+ /**
658
+ * Visually hides the label while keeping it accessible to screen readers.
659
+ * Useful for search bars or compact forms where layout space is limited.
660
+ *
661
+ * @default false
662
+ */
663
+ labelHidden?: boolean;
664
+ /**
665
+ * Defines the layout relationship between the label and the input.
666
+ * - `'vertical'`: Label sits above the input (default for most forms).
667
+ * - `'horizontal'`: Label and input sit side-by-side (common in admin panels).
668
+ *
669
+ * @default 'vertical'
670
+ */
671
+ orientation?: "vertical" | "horizontal";
672
+ /**
673
+ * Enables a character counter (e.g., "0 / 100") displayed near the input.
674
+ * Automatically uses the `maxLength` prop from the underlying `InputProps`.
675
+ *
676
+ * @default false
677
+ */
678
+ showCounter?: boolean;
679
+ /**
680
+ * The unique ID for the underlying input element.
681
+ * Used to link the `<label>` (via `htmlFor`) and description/error messages
682
+ * (via `aria-describedby`) for improved screen-reader support.
683
+ */
684
+ id?: string;
685
+ /**
686
+ * Props forwarded directly to the underlying `<label>` element,
687
+ * allowing fine-grained control over attributes like `className` or `onClick`.
688
+ */
689
+ labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
690
+ /**
691
+ * Custom class name applied to the root wrapper container of the entire field.
692
+ */
693
+ wrapperClassName?: string;
694
+ /**
695
+ * Custom class name applied specifically to the label element.
696
+ */
697
+ labelClassName?: string;
698
+ /**
699
+ * Custom class name applied to the container holding the description,
700
+ * feedback message, and hint.
701
+ */
702
+ messageClassName?: string;
703
+ /**
704
+ * Custom class name applied to the wrapper around the input element itself.
705
+ * Useful for adding padding, backgrounds, or borders to the input's parent.
706
+ */
707
+ inputWrapperClassName?: string;
1295
708
  }
1296
- interface UseSizeStyleOptions {
1297
- includeHeight?: boolean;
709
+
710
+ declare const InputField: react.ForwardRefExoticComponent<InputFieldProps & react.RefAttributes<HTMLInputElement>>;
711
+
712
+ interface TextProps extends TypographyProps {
713
+ as?: ElementType;
714
+ color?: BaseColor | string;
715
+ align?: "left" | "center" | "right" | "justify";
716
+ truncate?: boolean;
717
+ clampLines?: number;
718
+ weight?: "normal" | "medium" | "semibold" | "bold";
719
+ italic?: boolean;
720
+ className?: string;
721
+ style?: CSSProperties;
722
+ children?: ReactNode;
1298
723
  }
1299
- declare function useSizeStyle(size: string, iconOnly?: boolean, component?: string, options?: UseSizeStyleOptions): ResolvedSize;
724
+
725
+ interface UIProviderProps {
726
+ children: ReactNode;
727
+ theme?: ThemeOverride;
728
+ defaultMode?: ColorMode;
729
+ as?: keyof JSX.IntrinsicElements;
730
+ fallbackSize?: string;
731
+ themeTransition?: boolean;
732
+ themeTransitionDuration?: number;
733
+ }
734
+ declare function UIProvider({ children, theme: themeOverride, defaultMode, as, fallbackSize, themeTransition, themeTransitionDuration, }: UIProviderProps): JSX.Element;
1300
735
 
1301
736
  declare function useFloatingSide(triggerRef: RefObject<HTMLElement | null>, open: boolean): {
1302
737
  contentRef: RefObject<HTMLDivElement | null>;
1303
738
  side: "bottom" | "top";
1304
739
  };
1305
740
 
1306
- type State = "none" | "error" | "success";
1307
- type TransitionState = Exclude<State, "none"> | undefined;
1308
- declare function useStateTransition(state: State): TransitionState;
741
+ type TransitionStatus = Exclude<FormFieldStatus, "none"> | undefined;
742
+ declare function useStatusTransition(status: FormFieldStatus): TransitionStatus;
743
+
744
+ type ClearableFieldOptions = {
745
+ onClear?: () => void;
746
+ onUndo?: (value: string) => void;
747
+ onRedo?: (value: string) => void;
748
+ };
749
+ declare function useClearableField<T extends HTMLInputElement | HTMLTextAreaElement>(elementRef: RefObject<T | null>, initialValue: unknown, { onClear, onUndo, onRedo }?: ClearableFieldOptions): {
750
+ hasValue: boolean;
751
+ setHasValue: react.Dispatch<react.SetStateAction<boolean>>;
752
+ clear: () => void;
753
+ undo: () => void;
754
+ redo: () => void;
755
+ canUndo: boolean;
756
+ canRedo: boolean;
757
+ };
1309
758
 
1310
- declare function useTypography(name?: string): react.CSSProperties;
759
+ type ShortcutHandler = (event: KeyboardEvent) => void;
760
+ declare function useKeyboardShortcuts(enabled: boolean, shortcuts: Record<string, ShortcutHandler>, deps?: any[]): react.RefObject<HTMLInputElement | null>;
1311
761
 
1312
762
  declare function cn(...inputs: ClassValue[]): string;
1313
763
 
1314
764
  /**
1315
- * Converts an RGB color string to a hex color.
1316
- *
1317
- * Supports:
1318
- * - "26 128 230"
1319
- * - "26, 128, 230"
1320
- * - "rgb(26, 128, 230)"
765
+ * Converts an RGB colour string to a 6‑digit uppercase hex string.
766
+ * Supports the following input formats:
767
+ * - Hex: `"#fff"`, `"#FFFFFF"`
768
+ * - CSS rgb/rgba: `"rgb(255, 0, 0)"`, `"rgba(255, 0, 0, 0.5)"`
769
+ * - Space‑separated numbers: `"255 0 0"`
770
+ * - Comma‑separated numbers: `"255,0,0"`
1321
771
  *
1322
- * Returns an empty string when the value is not a valid RGB color.
772
+ * @param value - The colour string to convert.
773
+ * @returns A 6‑digit uppercase hex string (e.g. `"#FF0000"`).
774
+ * If the input cannot be parsed, returns `"#000000"`.
1323
775
  */
1324
776
  declare function rgbToHex(value: string): string;
1325
777
  declare function hexToRgbString(hex: string): string | null;
1326
778
 
1327
- declare const buttonBase: string;
1328
- declare const buttonVariants: {
1329
- readonly solid: "";
1330
- readonly outline: "border bg-transparent";
1331
- readonly ghost: "bg-transparent";
1332
- readonly soft: "";
1333
- readonly link: "bg-transparent p-0 h-auto hover:underline";
1334
- };
1335
- declare const buttonColors: {
1336
- readonly brand: {
1337
- readonly solid: "bg-brand text-brand-fg hover:bg-brand-hover";
1338
- readonly outline: "border-brand text-brand hover:bg-brand/10";
1339
- readonly ghost: "text-brand hover:bg-brand/10";
1340
- readonly soft: "bg-brand/10 text-brand hover:bg-brand/20";
1341
- readonly link: "text-brand";
1342
- };
1343
- readonly destructive: {
1344
- readonly solid: "bg-destructive text-destructive-fg hover:bg-destructive-hover";
1345
- readonly outline: "border-destructive text-destructive hover:bg-destructive/10";
1346
- readonly ghost: "text-destructive hover:bg-destructive/10";
1347
- readonly soft: "bg-destructive/10 text-destructive hover:bg-destructive/20";
1348
- readonly link: "text-destructive";
1349
- };
1350
- readonly success: {
1351
- readonly solid: "bg-success text-success-fg hover:bg-success-hover";
1352
- readonly outline: "border-success text-success hover:bg-success/10";
1353
- readonly ghost: "text-success hover:bg-success/10";
1354
- readonly soft: "bg-success/10 text-success hover:bg-success/20";
1355
- readonly link: "text-success";
1356
- };
1357
- readonly warning: {
1358
- readonly solid: "bg-warning text-warning-fg hover:bg-warning-hover";
1359
- readonly outline: "border-warning text-warning hover:bg-warning/10";
1360
- readonly ghost: "text-warning hover:bg-warning/10";
1361
- readonly soft: "bg-warning/10 text-warning hover:bg-warning/20";
1362
- readonly link: "text-warning";
1363
- };
1364
- readonly info: {
1365
- readonly solid: "bg-info text-info-fg hover:bg-info-hover";
1366
- readonly outline: "border-info text-info hover:bg-info/10";
1367
- readonly ghost: "text-info hover:bg-info/10";
1368
- readonly soft: "bg-info/10 text-info hover:bg-info/20";
1369
- readonly link: "text-info";
1370
- };
1371
- readonly white: {
1372
- readonly solid: "bg-white text-black hover:bg-gray-50";
1373
- readonly outline: "border-white/30 text-white hover:bg-white/10";
1374
- readonly ghost: "text-white hover:bg-white/10";
1375
- readonly soft: "bg-white/10 text-white hover:bg-white/20";
1376
- readonly link: "text-white";
1377
- };
1378
- readonly neutral: {
1379
- readonly solid: "bg-surface-raised text-text hover:bg-surface-sunken";
1380
- readonly outline: "border-border text-text hover:bg-surface-raised";
1381
- readonly ghost: "text-text hover:bg-surface-raised";
1382
- readonly soft: "bg-surface-raised text-text hover:bg-surface-sunken";
1383
- readonly link: "text-text";
1384
- };
1385
- };
1386
- declare const buttonRecipe: {
1387
- base: string;
1388
- variants: {
1389
- variant: {
1390
- readonly solid: "";
1391
- readonly outline: "border bg-transparent";
1392
- readonly ghost: "bg-transparent";
1393
- readonly soft: "";
1394
- readonly link: "bg-transparent p-0 h-auto hover:underline";
1395
- };
1396
- color: Record<string, string>;
1397
- };
1398
- defaultVariants: {
1399
- variant: string;
1400
- color: string;
1401
- };
1402
- compoundVariants: {
1403
- conditions: Record<string, string>;
1404
- className: string;
1405
- }[];
1406
- };
1407
-
1408
- declare const inputBase: string;
1409
- declare const inputRecipe: {
1410
- base: string;
1411
- variants: {
1412
- variant: {
1413
- outline: string;
1414
- filled: string;
1415
- ghost: string;
1416
- };
1417
- };
1418
- defaultVariants: {
1419
- variant: string;
1420
- };
1421
- };
1422
-
1423
- declare const formControlBase: string;
1424
- declare const formControlVariants: {
1425
- readonly outline: "border border-border bg-transparent text-text hover:border-brand";
1426
- readonly filled: "border border-transparent bg-surface-raised text-text hover:bg-surface";
1427
- readonly ghost: "border border-transparent bg-transparent text-text hover:bg-surface-raised";
1428
- };
1429
- declare const formControlStates: {
1430
- readonly none: "focus-within:ring-brand/20";
1431
- readonly error: "border-destructive focus-within:ring-destructive/20";
1432
- readonly success: "border-success focus-within:ring-success/20";
1433
- };
1434
- declare const formControlRecipe: {
1435
- base: string;
1436
- variants: {
1437
- variant: {
1438
- readonly outline: "border border-border bg-transparent text-text hover:border-brand";
1439
- readonly filled: "border border-transparent bg-surface-raised text-text hover:bg-surface";
1440
- readonly ghost: "border border-transparent bg-transparent text-text hover:bg-surface-raised";
1441
- };
1442
- state: {
1443
- readonly none: "focus-within:ring-brand/20";
1444
- readonly error: "border-destructive focus-within:ring-destructive/20";
1445
- readonly success: "border-success focus-within:ring-success/20";
1446
- };
1447
- rounded: {
1448
- true: string;
1449
- false: string;
1450
- };
1451
- fullWidth: {
1452
- true: string;
1453
- false: string;
1454
- };
1455
- disabled: {
1456
- true: string;
1457
- false: string;
1458
- };
1459
- hasAdornment: {
1460
- true: string;
1461
- false: string;
1462
- };
1463
- };
1464
- defaultVariants: {
1465
- variant: string;
1466
- state: string;
1467
- rounded: false;
1468
- fullWidth: true;
1469
- disabled: false;
1470
- hasAdornment: false;
1471
- };
1472
- };
1473
-
1474
779
  declare function defineRecipe<T extends RecipeDefinition>(recipe: T): T;
1475
780
 
1476
- declare function mergeRecipes(base: RecipeCollection, override?: ThemeOverride["recipes"]): RecipeCollection;
781
+ /**
782
+ * Overrides a single component's recipe against the built-in default
783
+ * for that component. For overriding just one recipe inline, without
784
+ * constructing a partial keyed-by-component-name object.
785
+ */
786
+ declare function extendRecipe<K extends keyof RecipeCollection>(name: K, override?: DeepPartial<RecipeCollection[K]>): RecipeCollection[K];
787
+ /**
788
+ * Overrides the theme's full recipe collection against the built-in
789
+ * defaults. Thin wrapper over extendRecipe — the actual merge logic
790
+ * lives in exactly one place.
791
+ */
792
+ declare function extendRecipes(override?: DeepPartial<RecipeCollection>): RecipeCollection;
1477
793
 
1478
- interface RecipeProps {
1479
- [key: string]: RecipeVariantValue | undefined;
1480
- }
1481
- declare function resolveRecipe(recipe: RecipeDefinition | undefined, props?: RecipeProps): string;
794
+ declare function getRecipeNames(): (keyof DefaultRecipeCollection)[];
1482
795
 
1483
- declare function resolveTypography(typography: TypographyStyle | undefined, tokens: DesignTokens): CSSProperties;
796
+ declare function defineTypography<T extends Typography>(typography: T): T;
1484
797
 
1485
- declare function defineTypography(typography: TypographyStyle): TypographyStyle;
798
+ declare function extendTypography(override?: ThemeOverride$1["typography"]): Typography;
1486
799
 
1487
- declare function defineToken<T>(value: T): {
800
+ declare function defineToken<T extends TokenValue>(value: T): {
1488
801
  value: T;
1489
802
  };
1490
- declare function defineSemanticToken<T>(light: T, dark: T): {
1491
- value: {
1492
- light: T;
1493
- dark: T;
1494
- };
803
+ declare function defineTokens<T extends Record<string, TokenValue>>(tokens: T): { [K in keyof T]: ReturnType<typeof defineToken<T[K]>>; };
804
+ /**
805
+ * Defines a semantic token that shares a single value across both light and dark modes.
806
+ */
807
+ declare function defineSemanticToken<T extends TokenValue>(value: T): SemanticToken<T>;
808
+ declare function defineSemanticToken<T extends TokenValue>(light: T, dark: T): SemanticToken<T>;
809
+ type SemanticTokenInput<T extends TokenValue> = T | {
810
+ light: T;
811
+ dark: T;
1495
812
  };
813
+ declare function defineSemanticTokens<T extends Record<string, SemanticTokenInput<TokenValue>>>(tokens: T): {
814
+ [K in keyof T]: SemanticToken<T[K] extends {
815
+ light: infer V;
816
+ dark: infer _;
817
+ } ? V extends TokenValue ? V : never : T[K] extends TokenValue ? T[K] : never>;
818
+ };
819
+
820
+ declare function extendTokens(override?: ThemeOverride$1["tokens"]): DesignTokens;
821
+ declare function extendSemanticTokens(override?: ThemeOverride$1["semanticTokens"]): SemanticTokens;
822
+
823
+ declare function extendTheme(override?: ThemeOverride$1): Theme;
824
+
825
+ /**
826
+ * Defines a Kreativ UI theme.
827
+ *
828
+ * This function provides a type-safe boundary for creating themes while
829
+ * preserving the exact structure and types of the supplied theme.
830
+ *
831
+ * It does not merge with the default theme or mutate the provided object.
832
+ * Theme extension and resolution are handled separately.
833
+ *
834
+ * @example
835
+ * ```ts
836
+ * export const myTheme = defineTheme({
837
+ * tokens: {
838
+ * // ...
839
+ * },
840
+ * semanticTokens: {
841
+ * // ...
842
+ * },
843
+ * typography: {
844
+ * // ...
845
+ * },
846
+ * recipes: {
847
+ * // ...
848
+ * },
849
+ * intensity: 50,
850
+ * sizes: {
851
+ * // ...
852
+ * },
853
+ * });
854
+ * ```
855
+ */
856
+ declare function defineTheme<T extends Theme>(theme: T): T;
1496
857
 
1497
- export { type AnimationTokens, type BaseColor, type BaseProps, type BaseTransition, type BaseVariant, Button, type ButtonProps, type CSSPropertiesWithVars, Checkbox, type CheckboxProps, type ClearableProps, type ColorMode, type ColorModeValue, type ColorProps, type ColorScale, type ColorTokens, Combobox, ComboboxContent, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, type DeepPartial, type DesignTokens, type DisabledProps, type FontSizeTokens, type FontTokens, type FontWeightTokens, FormField, FormFieldControl, FormFieldDescription, FormFieldLabel, FormFieldMessage, type FormFieldProps, type FullWidthProps, Input, type InputKind, type InputKindDefaults, type InputProps, type InputSize, type InputVariant, type IntensityMap, type LetterSpacingTokens, type LineHeightTokens, type LoadingProps, MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorTabs, MultiSelect, MultiSelectContent, MultiSelectContext, type MultiSelectContextValue, MultiSelectItem, type MultiSelectItemMeta, type MultiSelectItemProps, type MultiSelectProps, MultiSelectTrigger, type Orientation, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, type RadiusTokens, type RecipeCollection, type RecipeCompoundVariant, type RecipeDefinition, type RecipeProps, type RecipeStyle, type RecipeVariant, type RecipeVariantValue, type ResolvedSize, type ResolvedTokens, Select, SelectContent, type SelectContentProps, SelectContext, type SelectContextValue, SelectGroup, SelectGroupContext, type SelectGroupProps, SelectItem, type SelectItemMeta, type SelectItemProps, type SelectLabelProps, type SelectProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SemanticColorTokens, type SemanticToken, type SemanticTokens, type ShadowTokens, type Size, type SizeProps, type SizeScale, type SizeToken, type SizeValue, type SpacingTokens, type StateProps, type Styleable, Switch, type SwitchProps, Textarea, TextareaCore, type TextareaCoreProps, type TextareaProps, type TextareaResize, type Theme, ThemeContext, type ThemeContextValue, type ThemeOverride, ThemeToggler, type ThemeTogglerColor, type ThemeTogglerDisplay, type ThemeTogglerProps, type ThemeTogglerVariant, type ThemeTransition, type TokenDefinition, type TokenGroup, type TokenValue, type Typography, type TypographyProps, type TypographyStyle, UIProvider, type UIProviderProps, type UseSizeStyleOptions, type ValueProps, type Variant, type VariantProps, buttonBase, buttonColors, buttonRecipe, buttonVariants, cn, defaultRecipes, defaultSizes, defaultTheme, defineRecipe, defineSemanticToken, defineToken, defineTypography, formControlBase, formControlRecipe, formControlStates, formControlVariants, hexToRgbString, inputBase, inputKindDefaults, inputRecipe, mergeRecipes, resolveRecipe, resolveTypography, rgbToHex, tokensToCssVars, useBreakpoint, useFloatingSide, useMultiSelectContext, useSelectContext, useSizeStyle, useStateTransition, useTheme, useTypography };
858
+ export { Adornment, type AdornmentProps, Button, ButtonGroup, ButtonGroupContext, type ButtonGroupContextValue, ButtonGroupItemContext, type ButtonGroupItemContextValue, type ButtonGroupItemProps, type ButtonGroupLabelProps, type ButtonGroupProps, type ButtonGroupSeparatorProps, type ButtonGroupSpacing, type ButtonGroupTextProps, type ButtonProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, type CardSize, type CardVariant, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, Container, type ContainerProps, Flex, type FlexProps, FormField, FormFieldControl, FormFieldDescription, FormFieldLabel, FormFieldMessage, type FormFieldMessageProps, type FormFieldProps, Grid, type GridProps, Input, InputField, type InputFieldProps, type InputKind, type InputKindDefaults, type InputProps, type InputSize, type InputVariant, MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorTabs, MultiSelect, MultiSelectContent, MultiSelectItem, type MultiSelectItemProps, type MultiSelectProps, MultiSelectTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, type SelectLabelProps, type SelectProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Stack, type StackProps, Switch, type SwitchProps, type SwitchSize, type TextProps, Textarea, type TextareaCoreProps, type TextareaProps, type TextareaResize, ThemeToggler, type ThemeTogglerColor, type ThemeTogglerDisplay, type ThemeTogglerProps, type ThemeTogglerVariant, UIProvider, type UIProviderProps, cardSkeleton, cn, defineRecipe, defineSemanticToken, defineSemanticTokens, defineTheme, defineToken, defineTokens, defineTypography, extendRecipe, extendRecipes, extendSemanticTokens, extendTheme, extendTokens, extendTypography, getRecipeNames, hexToRgbString, rgbToHex, useButtonGroupContext, useButtonGroupItemContext, useClearableField, useFloatingSide, useKeyboardShortcuts, useOptionalButtonGroupContext, useOptionalButtonGroupItemContext, useStatusTransition };