@splenddev/kreativ-ui 0.2.8 → 0.2.9

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,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, ButtonHTMLAttributes, ReactElement, InputHTMLAttributes, HTMLAttributes, TextareaHTMLAttributes, RefObject, JSX } from 'react';
2
+ import { CSSProperties, ReactNode, ButtonHTMLAttributes, ReactElement, InputHTMLAttributes, HTMLAttributes, TextareaHTMLAttributes, LabelHTMLAttributes, JSX, RefObject } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
 
5
5
  type Size = "xs" | "sm" | "md" | "lg" | "xl";
@@ -18,6 +18,10 @@ type DeepPartial<T> = {
18
18
  type CSSPropertiesWithVars = CSSProperties & {
19
19
  [key: `--${string}`]: string | number | undefined;
20
20
  };
21
+ type ReportedValidity = {
22
+ invalid: boolean;
23
+ message?: string;
24
+ };
21
25
  interface BaseProps {
22
26
  /**
23
27
  * Additional CSS classes.
@@ -98,23 +102,65 @@ interface StateProps {
98
102
  * Displays a success state.
99
103
  */
100
104
  success?: boolean;
105
+ /**
106
+ * Displays a warning state.
107
+ */
108
+ warning?: boolean;
101
109
  }
102
- interface ValueProps {
110
+ interface StatusProps {
103
111
  /**
104
- * Passed value
112
+ * Can be `'success'` or `'error'` or `'warning'` or `'none'`
105
113
  */
106
- value?: string;
114
+ status?: FormFieldStatus;
115
+ }
116
+ /**
117
+ * Generic controlled/uncontrolled props with custom property names.
118
+ */
119
+ type ControlledProps<T, TValueProp extends string = "value", TDefaultProp extends string = "defaultValue", TOnChangeProp extends string = "onValueChange"> = {
120
+ [K in TValueProp]?: T;
121
+ } & {
122
+ [K in TDefaultProp]?: T;
123
+ } & {
124
+ [K in TOnChangeProp]?: (value: T) => void;
125
+ };
126
+ /**
127
+ * Props for a string‑based value (e.g. input, select).
128
+ */
129
+ type ValueProps<T = string> = ControlledProps<T, 'value', 'defaultValue', 'onValueChange'>;
130
+ interface TrimProps {
107
131
  /**
108
- * For uncontrolled form control
132
+ * Removes leading and trailing whitespace from the value
133
+ * when the value is committed.
134
+ *
135
+ * @default false
109
136
  */
110
- defaultValue?: string;
137
+ trim?: boolean;
138
+ }
139
+ interface EmbeddedProps {
111
140
  /**
112
- * Called when value is changed
141
+ * Renders the component as part of a parent component's visual container.
113
142
  *
114
- * @param newValue
115
- * @returns void
143
+ * Removes standalone container styling such as borders, radius,
144
+ * and focus ring.
116
145
  */
117
- onValueChange?: (newValue: string) => void;
146
+ embedded?: boolean;
147
+ }
148
+ type ValidationResult = boolean | string;
149
+ type ValidateOn = "change" | "blur" | "both";
150
+ interface ValidateProps<T = string> {
151
+ /**
152
+ * Validates the current value.
153
+ *
154
+ * Return `true` when valid, or `false`/a string when invalid.
155
+ * A returned string is used as the validation message.
156
+ */
157
+ validate?: (value: T) => ValidationResult;
158
+ /**
159
+ * Determines when validation runs.
160
+ *
161
+ * @default "blur"
162
+ */
163
+ validateOn?: ValidateOn;
118
164
  }
119
165
 
120
166
  type ButtonSize = SizeValue | "icon";
@@ -861,9 +907,9 @@ interface ThemeTogglerProps extends Omit<BaseProps, "children"> {
861
907
  declare function ThemeToggler({ variant, activeVariant, color, activeColor, size, iconOnly, allowSystem, orientation, rounded, unstyled, labels, icons, className, buttonProps, display, transition, }: ThemeTogglerProps): react.JSX.Element;
862
908
 
863
909
  type InputVariant = "outline" | "filled" | "ghost";
864
- type InputSize = "sm" | "md" | "lg";
910
+ type InputSize = "xs" | "sm" | "md" | "lg";
865
911
  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 {
912
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue">, BaseProps, SizeProps, VariantProps<InputVariant>, DisabledProps, LoadingProps, FullWidthProps, ClearableProps, ValueProps<string | number | undefined>, StateProps, TrimProps {
867
913
  inputClassName?: string;
868
914
  kind?: InputKind;
869
915
  rounded?: boolean;
@@ -884,15 +930,19 @@ type InputKindDefaults = Record<InputKind, {
884
930
 
885
931
  declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
886
932
 
887
- declare const inputKindDefaults: InputKindDefaults;
888
-
933
+ type FormFieldStatus = "none" | "error" | "success" | "warning";
889
934
  interface FormFieldProps extends Omit<BaseProps, "unstyled"> {
890
935
  id?: string;
891
936
  error?: string;
937
+ message?: ReactNode;
938
+ status?: FormFieldStatus;
892
939
  required?: boolean;
893
940
  }
941
+ interface FormFieldMessageProps {
942
+ children?: ReactNode;
943
+ }
894
944
 
895
- declare function FormField({ id: externalId, error, required, className, children, }: FormFieldProps): react.JSX.Element;
945
+ declare function FormField({ id: externalId, status, message: formMessage, required, className, children, }: FormFieldProps): react.JSX.Element;
896
946
  declare namespace FormField {
897
947
  var Label: typeof FormFieldLabel;
898
948
  var Control: typeof FormFieldControl;
@@ -909,9 +959,7 @@ declare function FormFieldDescription({ children, }: {
909
959
  children: React.ReactNode;
910
960
  }): react.JSX.Element;
911
961
 
912
- declare function FormFieldMessage({ children }: {
913
- children: React.ReactNode;
914
- }): react.JSX.Element;
962
+ declare function FormFieldMessage({ children }: FormFieldMessageProps): react.JSX.Element | null;
915
963
 
916
964
  type FormFieldControlProps<T = Record<string, unknown>> = {
917
965
  children: ReactElement<T>;
@@ -981,45 +1029,6 @@ declare namespace Select {
981
1029
 
982
1030
  declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
983
1031
 
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
1032
  type MarkdownEditorTabs = "write" | "preview";
1024
1033
  interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoResize"> {
1025
1034
  /** Renders the Preview tab. Omit and Preview shows raw text with a dev warning. */
@@ -1031,15 +1040,13 @@ interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoRe
1031
1040
  }
1032
1041
 
1033
1042
  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 {
1043
+ 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> {
1035
1044
  resize?: TextareaResize;
1036
1045
  autoResize?: boolean;
1037
1046
  minRows?: number;
1038
1047
  maxRows?: number;
1039
1048
  characterCounter?: boolean;
1040
1049
  debounceDelay?: number;
1041
- trimOnBlur?: boolean;
1042
- onValidate?: (value: string) => boolean | string;
1043
1050
  }
1044
1051
  type TextareaProps = ({
1045
1052
  allowMarkdown?: false;
@@ -1047,20 +1054,13 @@ type TextareaProps = ({
1047
1054
  allowMarkdown: true;
1048
1055
  } & Omit<TextareaCoreProps, "resize"> & MarkdownEditorProps);
1049
1056
 
1050
- declare const TextareaCore: react.ForwardRefExoticComponent<TextareaCoreProps & react.RefAttributes<HTMLTextAreaElement>>;
1051
-
1052
1057
  declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
1053
1058
 
1054
1059
  declare const MarkdownEditor: react.ForwardRefExoticComponent<MarkdownEditorProps & react.RefAttributes<HTMLTextAreaElement>>;
1055
1060
 
1056
- interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable {
1057
- checked?: boolean;
1058
- defaultChecked?: boolean;
1059
- onCheckedChange?: (checked: boolean) => void;
1061
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable, StateProps, StatusProps, ControlledProps<boolean, "checked", "defaultChecked", "onCheckedChange"> {
1060
1062
  indeterminate?: boolean;
1061
1063
  size?: InputSize;
1062
- error?: boolean;
1063
- success?: boolean;
1064
1064
  disabled?: boolean;
1065
1065
  label?: ReactNode;
1066
1066
  description?: ReactNode;
@@ -1217,39 +1217,122 @@ declare const MultiSelectTrigger: react.ForwardRefExoticComponent<{
1217
1217
  className?: string;
1218
1218
  } & react.RefAttributes<HTMLButtonElement>>;
1219
1219
 
1220
- interface MultiSelectItemMeta {
1221
- label: React.ReactNode;
1222
- disabled?: boolean;
1223
- }
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;
1220
+ /**
1221
+ * Represents the visual state of the field for feedback and styling.
1222
+ */
1223
+ interface InputFieldProps extends InputProps {
1224
+ /**
1225
+ * The primary label for the input. Supports React nodes for rich formatting
1226
+ * (e.g., icons, badges, or custom typography).
1227
+ */
1228
+ label?: ReactNode;
1229
+ /**
1230
+ * Helper text displayed near the input (usually below the label or the input itself).
1231
+ * Use this for permanent instructions or contextual guidance.
1232
+ */
1233
+ description?: ReactNode;
1234
+ /**
1235
+ * Content (e.g., an icon, badge, or avatar) rendered inline at the start of the label.
1236
+ */
1237
+ labelStart?: ReactNode;
1238
+ /**
1239
+ * Content (e.g., a badge, status indicator, or small action button)
1240
+ * rendered inline at the end of the label.
1241
+ */
1242
+ labelEnd?: ReactNode;
1243
+ /**
1244
+ * An optional tooltip, info icon, or popover trigger rendered next to the label.
1245
+ * Ideal for providing supplementary explanations without cluttering the UI.
1246
+ */
1247
+ tooltip?: ReactNode;
1248
+ /**
1249
+ * The current validation or status state of the field.
1250
+ * Drives the visual appearance (border color, label color, message styling).
1251
+ *
1252
+ * @default 'none'
1253
+ */
1254
+ status?: FormFieldStatus;
1255
+ /**
1256
+ * Feedback message displayed below the input.
1257
+ * Typically paired with `status` to show success confirmations or error details.
1258
+ *
1259
+ * @example "Please enter a valid email address."
1260
+ */
1261
+ message?: string;
1262
+ /**
1263
+ * A subtle, temporary hint displayed below the input, distinct from `description`.
1264
+ * Great for showing formatting rules, password requirements, or dynamic suggestions.
1265
+ */
1266
+ hint?: ReactNode;
1267
+ /**
1268
+ * Marks the field as required. Automatically appends a required indicator
1269
+ * (e.g., an asterisk `*`) to the label.
1270
+ *
1271
+ * @default false
1272
+ */
1239
1273
  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;
1274
+ /**
1275
+ * Controls whether the field displays an optional indicator
1276
+ * (e.g., "(optional)") next to the label.
1277
+ * This is typically ignored if `required` is `true`.
1278
+ *
1279
+ * @default false
1280
+ */
1281
+ optional?: boolean;
1282
+ /**
1283
+ * Visually hides the label while keeping it accessible to screen readers.
1284
+ * Useful for search bars or compact forms where layout space is limited.
1285
+ *
1286
+ * @default false
1287
+ */
1288
+ labelHidden?: boolean;
1289
+ /**
1290
+ * Defines the layout relationship between the label and the input.
1291
+ * - `'vertical'`: Label sits above the input (default for most forms).
1292
+ * - `'horizontal'`: Label and input sit side-by-side (common in admin panels).
1293
+ *
1294
+ * @default 'vertical'
1295
+ */
1296
+ orientation?: "vertical" | "horizontal";
1297
+ /**
1298
+ * Enables a character counter (e.g., "0 / 100") displayed near the input.
1299
+ * Automatically uses the `maxLength` prop from the underlying `InputProps`.
1300
+ *
1301
+ * @default false
1302
+ */
1303
+ showCounter?: boolean;
1304
+ /**
1305
+ * The unique ID for the underlying input element.
1306
+ * Used to link the `<label>` (via `htmlFor`) and description/error messages
1307
+ * (via `aria-describedby`) for improved screen-reader support.
1308
+ */
1309
+ id?: string;
1310
+ /**
1311
+ * Props forwarded directly to the underlying `<label>` element,
1312
+ * allowing fine-grained control over attributes like `className` or `onClick`.
1313
+ */
1314
+ labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
1315
+ /**
1316
+ * Custom class name applied to the root wrapper container of the entire field.
1317
+ */
1318
+ wrapperClassName?: string;
1319
+ /**
1320
+ * Custom class name applied specifically to the label element.
1321
+ */
1322
+ labelClassName?: string;
1323
+ /**
1324
+ * Custom class name applied to the container holding the description,
1325
+ * feedback message, and hint.
1326
+ */
1327
+ messageClassName?: string;
1328
+ /**
1329
+ * Custom class name applied to the wrapper around the input element itself.
1330
+ * Useful for adding padding, backgrounds, or borders to the input's parent.
1331
+ */
1332
+ inputWrapperClassName?: string;
1250
1333
  }
1251
- declare const MultiSelectContext: react.Context<MultiSelectContextValue | null>;
1252
- declare function useMultiSelectContext(componentName: string): MultiSelectContextValue;
1334
+
1335
+ declare const InputField: react.ForwardRefExoticComponent<InputFieldProps & react.RefAttributes<HTMLInputElement>>;
1253
1336
 
1254
1337
  interface UIProviderProps {
1255
1338
  children: ReactNode;
@@ -1270,12 +1353,6 @@ interface ThemeContextValue {
1270
1353
  }
1271
1354
  declare const ThemeContext: react.Context<ThemeContextValue | null>;
1272
1355
 
1273
- declare const defaultSizes: SizeScale;
1274
- declare const defaultRecipes: RecipeCollection;
1275
- declare const defaultTheme: Theme;
1276
-
1277
- declare function tokensToCssVars(tokens: ResolvedTokens, mode: "light" | "dark", intensity: number): Record<string, string>;
1278
-
1279
1356
  declare function useTheme(): ThemeContextValue;
1280
1357
 
1281
1358
  declare const BREAKPOINTS: {
@@ -1291,24 +1368,35 @@ declare function useBreakpoint(breakpoint: Breakpoint): boolean;
1291
1368
 
1292
1369
  interface ResolvedSize {
1293
1370
  style: CSSProperties;
1294
- iconSize?: string;
1371
+ iconSize?: CSSProperties["width"];
1372
+ fontSize?: CSSProperties["fontSize"];
1373
+ gap?: CSSProperties["gap"];
1295
1374
  }
1296
1375
  interface UseSizeStyleOptions {
1297
1376
  includeHeight?: boolean;
1377
+ widthFromHeight?: boolean;
1378
+ sizeOffset?: string;
1379
+ fontSizeOffset?: string;
1380
+ iconSizeOffset?: string;
1298
1381
  }
1299
- declare function useSizeStyle(size: string, iconOnly?: boolean, component?: string, options?: UseSizeStyleOptions): ResolvedSize;
1382
+ declare function useSizeStyle(size: string, iconOnly?: boolean, componentName?: string, options?: UseSizeStyleOptions): ResolvedSize;
1300
1383
 
1301
1384
  declare function useFloatingSide(triggerRef: RefObject<HTMLElement | null>, open: boolean): {
1302
1385
  contentRef: RefObject<HTMLDivElement | null>;
1303
1386
  side: "bottom" | "top";
1304
1387
  };
1305
1388
 
1306
- type State = "none" | "error" | "success";
1307
- type TransitionState = Exclude<State, "none"> | undefined;
1308
- declare function useStateTransition(state: State): TransitionState;
1389
+ type TransitionStatus = Exclude<FormFieldStatus, "none"> | undefined;
1390
+ declare function useStatusTransition(status: FormFieldStatus): TransitionStatus;
1309
1391
 
1310
1392
  declare function useTypography(name?: string): react.CSSProperties;
1311
1393
 
1394
+ declare function useClearableField<T extends HTMLInputElement | HTMLTextAreaElement>(elementRef: RefObject<T | null>, initialValue: unknown, onClear?: () => void): {
1395
+ hasValue: boolean;
1396
+ setHasValue: react.Dispatch<react.SetStateAction<boolean>>;
1397
+ clear: () => void;
1398
+ };
1399
+
1312
1400
  declare function cn(...inputs: ClassValue[]): string;
1313
1401
 
1314
1402
  /**
@@ -1324,165 +1412,13 @@ declare function cn(...inputs: ClassValue[]): string;
1324
1412
  declare function rgbToHex(value: string): string;
1325
1413
  declare function hexToRgbString(hex: string): string | null;
1326
1414
 
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
1415
  declare function defineRecipe<T extends RecipeDefinition>(recipe: T): T;
1475
1416
 
1476
- declare function mergeRecipes(base: RecipeCollection, override?: ThemeOverride["recipes"]): RecipeCollection;
1417
+ declare function extendRecipes(override?: ThemeOverride["recipes"]): RecipeCollection;
1477
1418
 
1478
- interface RecipeProps {
1479
- [key: string]: RecipeVariantValue | undefined;
1480
- }
1481
- declare function resolveRecipe(recipe: RecipeDefinition | undefined, props?: RecipeProps): string;
1482
-
1483
- declare function resolveTypography(typography: TypographyStyle | undefined, tokens: DesignTokens): CSSProperties;
1419
+ declare function defineTypography<T extends Typography>(typography: T): T;
1484
1420
 
1485
- declare function defineTypography(typography: TypographyStyle): TypographyStyle;
1421
+ declare function extendTypography(override?: ThemeOverride["typography"]): Typography;
1486
1422
 
1487
1423
  declare function defineToken<T>(value: T): {
1488
1424
  value: T;
@@ -1494,4 +1430,9 @@ declare function defineSemanticToken<T>(light: T, dark: T): {
1494
1430
  };
1495
1431
  };
1496
1432
 
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 };
1433
+ declare function extendTokens(override?: ThemeOverride["tokens"]): DesignTokens;
1434
+ declare function extendSemanticTokens(override?: ThemeOverride["semanticTokens"]): SemanticTokens;
1435
+
1436
+ declare function extendTheme(override?: ThemeOverride): Theme;
1437
+
1438
+ 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 ControlledProps, type DeepPartial, type DesignTokens, type DisabledProps, type EmbeddedProps, type FontSizeTokens, type FontTokens, type FontWeightTokens, FormField, FormFieldControl, FormFieldDescription, FormFieldLabel, FormFieldMessage, type FormFieldMessageProps, type FormFieldProps, type FormFieldStatus, type FullWidthProps, Input, InputField, type InputFieldProps, 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, MultiSelectItem, type MultiSelectItemProps, type MultiSelectProps, MultiSelectTrigger, type Orientation, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, type RadiusTokens, type RecipeCollection, type RecipeCompoundVariant, type RecipeDefinition, type RecipeStyle, type RecipeVariant, type RecipeVariantValue, type ReportedValidity, type ResolvedSize, type ResolvedTokens, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, 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 StatusProps, type Styleable, Switch, type SwitchProps, Textarea, type TextareaCoreProps, type TextareaProps, type TextareaResize, type Theme, ThemeContext, type ThemeOverride, ThemeToggler, type ThemeTogglerColor, type ThemeTogglerDisplay, type ThemeTogglerProps, type ThemeTogglerVariant, type ThemeTransition, type TokenDefinition, type TokenGroup, type TokenValue, type TrimProps, type Typography, type TypographyProps, type TypographyStyle, UIProvider, type UIProviderProps, type UseSizeStyleOptions, type ValidateOn, type ValidateProps, type ValidationResult, type ValueProps, type Variant, type VariantProps, cn, defineRecipe, defineSemanticToken, defineToken, defineTypography, extendRecipes, extendSemanticTokens, extendTheme, extendTokens, extendTypography, hexToRgbString, rgbToHex, useBreakpoint, useClearableField, useFloatingSide, useSizeStyle, useStatusTransition, useTheme, useTypography };