@splenddev/kreativ-ui 0.3.0 → 0.3.2
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.cjs +21794 -3385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1076 -220
- package/dist/index.d.ts +1076 -220
- package/dist/index.js +21724 -3354
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, CSSProperties, ReactElement,
|
|
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,
|
|
2
|
+
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, CSSProperties, ReactElement, ComponentPropsWithoutRef, HTMLInputTypeAttribute, TextareaHTMLAttributes, InputHTMLAttributes, ElementType, UIEvent, RefObject, LabelHTMLAttributes, JSX } from 'react';
|
|
3
|
+
import { BaseProps, ColorProps, BaseColor, VariantProps, BaseVariant, DisabledProps, LoadingProps, FullWidthProps, TypographyProps, SizeValue, SizeProps, OrientationProps, Orientation, ThemeTogglerTransition, ClearableProps, UndoRedoProps, ValueProps, StateProps, TrimProps, FormFieldStatus, ValidateOn, EmbeddedProps, ValidateProps, Styleable as Styleable$1, StatusProps, MotionGatedProps as MotionGatedProps$1, ControlledProps, Size, ResponsiveValue, RecipeCollection, DeepPartial, DefaultRecipeCollection, ThemeOverride as ThemeOverride$1, Typography, SemanticTokens, DesignTokens, Theme } from '@splenddev/kreativ-core/types';
|
|
4
4
|
export * from '@splenddev/kreativ-core/types';
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import * as _splenddev_kreativ_core from '@splenddev/kreativ-core';
|
|
6
|
+
import { MotionGatedProps, KuiComponent, BaseProps as BaseProps$1, SizeProps as SizeProps$1, ValueProps as ValueProps$1, VariantProps as VariantProps$1, DisabledProps as DisabledProps$1, ClearableProps as ClearableProps$1, StateProps as StateProps$1, Styleable, FormFieldStatus as FormFieldStatus$1, ThemeOverride, ColorMode } from '@splenddev/kreativ-core';
|
|
7
|
+
export { PersistMode, PersistModeProps, ThemeContext, defineRecipe, defineSemanticToken, defineSemanticTokens, defineTheme, defineToken, defineTokens, defineTypography, resolveTypography } from '@splenddev/kreativ-core';
|
|
8
|
+
import { z } from 'zod';
|
|
7
9
|
export * from '@splenddev/kreativ-core/hooks';
|
|
8
10
|
import { ClassValue } from 'clsx';
|
|
9
11
|
|
|
@@ -16,7 +18,7 @@ declare const Adornment: react.ForwardRefExoticComponent<AdornmentProps & react.
|
|
|
16
18
|
|
|
17
19
|
type ButtonSize = SizeValue | "icon";
|
|
18
20
|
type ButtonVariant = BaseVariant | "link";
|
|
19
|
-
type ButtonColor = BaseColor;
|
|
21
|
+
type ButtonColor = BaseColor | "black";
|
|
20
22
|
interface ButtonRenderProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "color"> {
|
|
21
23
|
className?: string;
|
|
22
24
|
style?: CSSProperties;
|
|
@@ -149,106 +151,165 @@ interface ThemeTogglerProps extends Omit<BaseProps, "style">, OrientationProps,
|
|
|
149
151
|
indicatorStyle?: CSSProperties;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
declare
|
|
154
|
+
declare const ThemeToggler: _splenddev_kreativ_core.KuiComponent<ThemeTogglerProps & MotionGatedProps, HTMLElement>;
|
|
153
155
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Internal. Not part of the public API — do not re-export from the package index.
|
|
158
|
+
* Callers resolve `type` themselves. This function has no password concept.
|
|
159
|
+
*/
|
|
160
|
+
type BaseInputExtraAdornmentContext = {
|
|
161
|
+
iconSize: string | number;
|
|
162
|
+
/** Motion-gated icon-button classes. Transition styles are omitted when motion is off. */
|
|
163
|
+
iconButtonClass: string;
|
|
164
|
+
};
|
|
165
|
+
type BaseInputProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "type"> & BaseProps & SizeProps & VariantProps<InputVariant> & DisabledProps & LoadingProps & FullWidthProps & ClearableProps & UndoRedoProps & ValueProps<string | number> & StateProps & TrimProps & TypographyProps & {
|
|
166
|
+
type: HTMLInputTypeAttribute;
|
|
158
167
|
inputClassName?: string;
|
|
159
|
-
|
|
160
|
-
rounded?: boolean;
|
|
168
|
+
scrollIntoViewOnError?: boolean;
|
|
161
169
|
startIcon?: ReactNode;
|
|
162
170
|
endIcon?: ReactNode;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
rounded?: boolean;
|
|
172
|
+
motion?: boolean;
|
|
173
|
+
validatePattern?: string | RegExp;
|
|
174
|
+
patternMessage?: string;
|
|
175
|
+
embedded?: boolean;
|
|
176
|
+
extraEndAdornment?: ReactNode | ((ctx: BaseInputExtraAdornmentContext) => ReactNode);
|
|
177
|
+
};
|
|
178
|
+
type InputVariant = "outline" | "filled" | "ghost";
|
|
179
|
+
type InputSize = "xs" | "sm" | "md" | "lg";
|
|
180
|
+
type InputKind = "text" | "email" | "tel" | "url" | "search" | "numeric" | "number" | "date" | "time" | "datetime-local" | "month" | "week";
|
|
181
|
+
type PasswordKind = "password-current" | "password-new";
|
|
182
|
+
type KindDefaultBase = {
|
|
166
183
|
type?: string;
|
|
167
|
-
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
168
184
|
autoComplete?: string;
|
|
169
185
|
placeholder?: string;
|
|
170
186
|
pattern?: string;
|
|
171
187
|
min?: number;
|
|
172
188
|
max?: number;
|
|
173
189
|
step?: number;
|
|
190
|
+
};
|
|
191
|
+
type InputKindDefaults = Record<InputKind, KindDefaultBase & {
|
|
192
|
+
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
174
193
|
}>;
|
|
194
|
+
type PasswordInputKindDefaults = Record<PasswordKind, KindDefaultBase & {
|
|
195
|
+
inputMode?: "none" | "text";
|
|
196
|
+
}>;
|
|
197
|
+
type InputProps = Omit<BaseInputProps, "type" | "extraEndAdornment" | "motion"> & {
|
|
198
|
+
kind?: InputKind;
|
|
199
|
+
hideKindIcon?: boolean;
|
|
200
|
+
type?: HTMLInputTypeAttribute;
|
|
201
|
+
motion?: boolean;
|
|
202
|
+
};
|
|
203
|
+
type PasswordInputProps = Omit<BaseInputProps, "type" | "extraEndAdornment" | "motion"> & {
|
|
204
|
+
motion?: boolean;
|
|
205
|
+
kind?: PasswordKind;
|
|
206
|
+
visible?: boolean;
|
|
207
|
+
defaultVisible?: boolean;
|
|
208
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
209
|
+
};
|
|
175
210
|
|
|
176
|
-
declare const Input:
|
|
211
|
+
declare const Input: _splenddev_kreativ_core.KuiComponent<InputProps, HTMLInputElement>;
|
|
177
212
|
|
|
178
|
-
interface
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
213
|
+
interface FormFieldControlProps {
|
|
214
|
+
children: react.ReactElement;
|
|
215
|
+
}
|
|
216
|
+
declare const FormFieldControl: _splenddev_kreativ_core.KuiComponent<FormFieldControlProps, unknown>;
|
|
217
|
+
|
|
218
|
+
type SingleFormControlComponent<P extends object = any> = KuiComponent<P, any> & {
|
|
219
|
+
__kui: {
|
|
220
|
+
formControl: "single";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
type ValuePropConvention = "value" | "checked";
|
|
224
|
+
/** Token names that map to `--kui-spacing-<token>`. */
|
|
225
|
+
type SpaceToken = "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | (string & {});
|
|
226
|
+
/**
|
|
227
|
+
* - `"sm"` / `"md"` / … → `var(--kui-spacing-sm)`
|
|
228
|
+
* - `24` → `"24px"`
|
|
229
|
+
* - `"24px"` / `"1rem"` → used as-is
|
|
230
|
+
*/
|
|
231
|
+
type SpaceValue = SpaceToken | number | (string & {});
|
|
232
|
+
/** Any color token (`"brand"`, `"surface-raised"`) or raw CSS color. */
|
|
233
|
+
type RadiusValue = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | (string & {});
|
|
234
|
+
|
|
235
|
+
interface FormFieldError {
|
|
236
|
+
name: string;
|
|
237
|
+
message: react.ReactNode;
|
|
238
|
+
}
|
|
239
|
+
interface FormFieldMessageProps extends react.HTMLAttributes<HTMLParagraphElement> {
|
|
240
|
+
children?: react.ReactNode;
|
|
241
|
+
forceMount?: boolean;
|
|
242
|
+
"data-kui-motion-gated"?: "true" | "false";
|
|
184
243
|
}
|
|
185
244
|
interface FormFieldMessageProps {
|
|
186
245
|
children?: ReactNode;
|
|
187
246
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
declare namespace FormField {
|
|
191
|
-
var Label: typeof FormFieldLabel;
|
|
192
|
-
var Control: typeof FormFieldControl;
|
|
193
|
-
var Description: typeof FormFieldDescription;
|
|
194
|
-
var Message: typeof FormFieldMessage;
|
|
247
|
+
interface FormFieldLabelProps extends react.LabelHTMLAttributes<HTMLLabelElement> {
|
|
248
|
+
children?: react.ReactNode;
|
|
195
249
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
250
|
+
interface FormFieldDescriptionProps extends react.HTMLAttributes<HTMLParagraphElement> {
|
|
251
|
+
children?: react.ReactNode;
|
|
252
|
+
}
|
|
253
|
+
interface FormFieldRootProps {
|
|
254
|
+
id?: string;
|
|
255
|
+
name?: string;
|
|
256
|
+
status?: FormFieldStatus;
|
|
257
|
+
message?: react.ReactNode;
|
|
258
|
+
required?: boolean;
|
|
259
|
+
disabled?: boolean;
|
|
260
|
+
invalid?: boolean;
|
|
199
261
|
className?: string;
|
|
200
|
-
|
|
262
|
+
children?: react.ReactNode;
|
|
263
|
+
validateOn?: ValidateOn;
|
|
264
|
+
valuePropConvention?: ValuePropConvention;
|
|
265
|
+
}
|
|
266
|
+
interface FormFieldProps$1<P extends object = Record<string, never>> extends Omit<FormFieldRootProps, "children"> {
|
|
267
|
+
as?: SingleFormControlComponent<P>;
|
|
268
|
+
controlProps?: Partial<P>;
|
|
269
|
+
label?: react.ReactNode;
|
|
270
|
+
description?: react.ReactNode;
|
|
271
|
+
message?: react.ReactNode;
|
|
272
|
+
children?: react.ReactNode;
|
|
273
|
+
}
|
|
201
274
|
|
|
202
|
-
declare
|
|
203
|
-
|
|
204
|
-
})
|
|
275
|
+
declare const FormField: (<P extends object>(props: FormFieldProps$1<P> & {
|
|
276
|
+
ref?: react.Ref<unknown>;
|
|
277
|
+
}) => react.ReactElement | null) & {
|
|
278
|
+
Root: _splenddev_kreativ_core.KuiComponent<FormFieldRootProps, HTMLDivElement>;
|
|
279
|
+
Label: _splenddev_kreativ_core.KuiComponent<FormFieldLabelProps, HTMLLabelElement>;
|
|
280
|
+
Description: _splenddev_kreativ_core.KuiComponent<FormFieldDescriptionProps, HTMLParagraphElement>;
|
|
281
|
+
Message: _splenddev_kreativ_core.KuiComponent<FormFieldMessageProps, HTMLParagraphElement>;
|
|
282
|
+
Control: _splenddev_kreativ_core.KuiComponent<FormFieldControlProps, unknown>;
|
|
283
|
+
};
|
|
205
284
|
|
|
206
|
-
declare
|
|
285
|
+
declare const FormFieldLabel: _splenddev_kreativ_core.KuiComponent<FormFieldLabelProps, HTMLLabelElement>;
|
|
207
286
|
|
|
208
|
-
|
|
209
|
-
children: ReactElement<T>;
|
|
210
|
-
};
|
|
211
|
-
declare function FormFieldControl<T = Record<string, unknown>>({ children, }: FormFieldControlProps<T>): react.JSX.Element;
|
|
287
|
+
declare const FormFieldDescription: _splenddev_kreativ_core.KuiComponent<FormFieldDescriptionProps, HTMLParagraphElement>;
|
|
212
288
|
|
|
213
|
-
|
|
214
|
-
|
|
289
|
+
declare const FormFieldMessage: _splenddev_kreativ_core.KuiComponent<FormFieldMessageProps, HTMLParagraphElement>;
|
|
290
|
+
|
|
291
|
+
interface SelectRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "children" | "defaultValue">, Omit<BaseProps$1, "children">, Omit<SizeProps$1, "size">, ValueProps$1<string | undefined>, VariantProps$1<InputVariant>, DisabledProps$1, Omit<ClearableProps$1, "onClear">, Omit<StateProps$1, "warning" | "scrollIntoViewOnError"> {
|
|
215
292
|
rounded?: boolean;
|
|
216
|
-
error?: boolean;
|
|
217
|
-
success?: boolean;
|
|
218
|
-
value?: string;
|
|
219
293
|
placeholder?: string;
|
|
220
|
-
defaultValue?: string;
|
|
221
|
-
onValueChange?(value: string | undefined): void;
|
|
222
294
|
required?: boolean;
|
|
223
295
|
name?: string;
|
|
224
|
-
disabled?: boolean;
|
|
225
|
-
clearable?: boolean;
|
|
226
|
-
variant?: InputVariant;
|
|
227
296
|
size?: InputSize;
|
|
228
297
|
children: ReactNode;
|
|
229
298
|
}
|
|
230
|
-
interface SelectTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"
|
|
231
|
-
className?: string;
|
|
299
|
+
interface SelectTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value" | "className">, Styleable {
|
|
232
300
|
}
|
|
233
|
-
interface SelectContentProps extends HTMLAttributes<HTMLDivElement
|
|
234
|
-
className?: string;
|
|
301
|
+
interface SelectContentProps extends Omit<HTMLAttributes<HTMLDivElement>, "className">, Styleable {
|
|
235
302
|
}
|
|
236
|
-
interface SelectItemProps extends HTMLAttributes<HTMLDivElement
|
|
303
|
+
interface SelectItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "className">, DisabledProps$1, Styleable {
|
|
237
304
|
value: string;
|
|
238
|
-
disabled?: boolean;
|
|
239
305
|
children: ReactNode;
|
|
240
306
|
}
|
|
241
|
-
interface SelectValueProps {
|
|
307
|
+
interface SelectValueProps extends Styleable {
|
|
242
308
|
placeholder?: string;
|
|
243
|
-
className?: string;
|
|
244
309
|
}
|
|
245
|
-
interface SelectGroupProps {
|
|
246
|
-
children: ReactNode;
|
|
247
|
-
className?: string;
|
|
310
|
+
interface SelectGroupProps extends Styleable, Required<Pick<BaseProps$1, "children">> {
|
|
248
311
|
}
|
|
249
|
-
interface SelectLabelProps {
|
|
250
|
-
children: ReactNode;
|
|
251
|
-
className?: string;
|
|
312
|
+
interface SelectLabelProps extends Styleable, Required<Pick<BaseProps$1, "children">> {
|
|
252
313
|
}
|
|
253
314
|
|
|
254
315
|
declare function SelectContent({ className, children, ...props }: SelectContentProps): react.JSX.Element;
|
|
@@ -261,27 +322,32 @@ declare function SelectGroup({ children, className }: SelectGroupProps): react.J
|
|
|
261
322
|
|
|
262
323
|
declare function SelectLabel({ children, className }: SelectLabelProps): react.JSX.Element;
|
|
263
324
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
325
|
+
interface SelectOption {
|
|
326
|
+
value: string;
|
|
327
|
+
label: react.ReactNode;
|
|
328
|
+
disabled?: boolean;
|
|
329
|
+
}
|
|
330
|
+
interface SelectProps extends Omit<SelectRootProps, "children"> {
|
|
331
|
+
options?: SelectOption[];
|
|
332
|
+
children?: react.ReactNode;
|
|
333
|
+
label?: string | react.ReactNode;
|
|
272
334
|
}
|
|
335
|
+
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLDivElement>> & {
|
|
336
|
+
Root: _splenddev_kreativ_core.KuiComponent<SelectRootProps, HTMLDivElement>;
|
|
337
|
+
Trigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
338
|
+
Content: typeof SelectContent;
|
|
339
|
+
Item: typeof SelectItem;
|
|
340
|
+
Value: typeof SelectValue;
|
|
341
|
+
Group: typeof SelectGroup;
|
|
342
|
+
Label: typeof SelectLabel;
|
|
343
|
+
__kui: {
|
|
344
|
+
formControl: "compound";
|
|
345
|
+
};
|
|
346
|
+
};
|
|
273
347
|
|
|
274
348
|
declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
275
349
|
|
|
276
|
-
|
|
277
|
-
interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoResize"> {
|
|
278
|
-
/** Renders the Preview tab. Omit and Preview shows raw text with a dev warning. */
|
|
279
|
-
renderMarkdown?: (value: string) => ReactNode;
|
|
280
|
-
tab?: MarkdownEditorTabs;
|
|
281
|
-
defaultTab?: MarkdownEditorTabs;
|
|
282
|
-
onTabChange?: (tab: MarkdownEditorTabs) => void;
|
|
283
|
-
hint?: ReactNode;
|
|
284
|
-
}
|
|
350
|
+
declare const SelectRoot: _splenddev_kreativ_core.KuiComponent<SelectRootProps, HTMLDivElement>;
|
|
285
351
|
|
|
286
352
|
type TextareaResize = "none" | "both" | "horizontal" | "vertical";
|
|
287
353
|
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 {
|
|
@@ -292,17 +358,23 @@ interface TextareaCoreProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElem
|
|
|
292
358
|
characterCounter?: boolean;
|
|
293
359
|
debounceDelay?: number;
|
|
294
360
|
}
|
|
295
|
-
type TextareaProps =
|
|
296
|
-
allowMarkdown?: false;
|
|
297
|
-
} & TextareaCoreProps) | ({
|
|
298
|
-
allowMarkdown: true;
|
|
299
|
-
} & Omit<TextareaCoreProps, "resize"> & MarkdownEditorProps);
|
|
361
|
+
type TextareaProps = TextareaCoreProps;
|
|
300
362
|
|
|
301
|
-
declare const Textarea:
|
|
363
|
+
declare const Textarea: _splenddev_kreativ_core.KuiComponent<TextareaCoreProps, HTMLTextAreaElement>;
|
|
302
364
|
|
|
303
|
-
|
|
365
|
+
type MarkdownEditorTabs = "write" | "preview";
|
|
366
|
+
interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoResize"> {
|
|
367
|
+
/** Renders the Preview tab. Omit and Preview shows raw text with a dev warning. */
|
|
368
|
+
renderMarkdown?: (value: string) => ReactNode;
|
|
369
|
+
tab?: MarkdownEditorTabs;
|
|
370
|
+
defaultTab?: MarkdownEditorTabs;
|
|
371
|
+
onTabChange?: (tab: MarkdownEditorTabs) => void;
|
|
372
|
+
hint?: ReactNode;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare const MarkdownEditor: _splenddev_kreativ_core.KuiComponent<MarkdownEditorProps & MotionGatedProps, HTMLTextAreaElement>;
|
|
304
376
|
|
|
305
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable, StateProps, StatusProps, ControlledProps<boolean, "checked", "defaultChecked", "onCheckedChange"> {
|
|
377
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "children">, Styleable$1, StateProps, StatusProps, MotionGatedProps$1, ControlledProps<boolean, "checked", "defaultChecked", "onCheckedChange"> {
|
|
306
378
|
indeterminate?: boolean;
|
|
307
379
|
size?: InputSize;
|
|
308
380
|
disabled?: boolean;
|
|
@@ -310,17 +382,17 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "siz
|
|
|
310
382
|
description?: ReactNode;
|
|
311
383
|
}
|
|
312
384
|
|
|
313
|
-
declare const Checkbox:
|
|
385
|
+
declare const Checkbox: _splenddev_kreativ_core.KuiComponent<CheckboxProps, HTMLInputElement>;
|
|
314
386
|
|
|
315
387
|
type RadioSize = "sm" | "md" | "lg";
|
|
316
|
-
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "onChange" | "name" | "value">, Styleable {
|
|
388
|
+
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "onChange" | "name" | "value">, Styleable$1 {
|
|
317
389
|
value: string;
|
|
318
390
|
disabled?: boolean;
|
|
319
391
|
label?: ReactNode;
|
|
320
392
|
description?: ReactNode;
|
|
321
393
|
}
|
|
322
394
|
|
|
323
|
-
interface RadioGroupProps extends Styleable {
|
|
395
|
+
interface RadioGroupProps extends Styleable$1 {
|
|
324
396
|
value?: string;
|
|
325
397
|
defaultValue?: string;
|
|
326
398
|
onValueChange?: (value: string) => void;
|
|
@@ -339,7 +411,7 @@ declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, nam
|
|
|
339
411
|
declare function Radio({ value, disabled: itemDisabled, label, description, className, ...props }: RadioProps): react.JSX.Element;
|
|
340
412
|
|
|
341
413
|
type SwitchSize = "xs" | "sm" | "md" | "lg";
|
|
342
|
-
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable {
|
|
414
|
+
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable$1 {
|
|
343
415
|
checked?: boolean;
|
|
344
416
|
defaultChecked?: boolean;
|
|
345
417
|
onCheckedChange?: (checked: boolean) => void;
|
|
@@ -350,7 +422,7 @@ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"
|
|
|
350
422
|
description?: ReactNode;
|
|
351
423
|
}
|
|
352
424
|
|
|
353
|
-
declare const Switch:
|
|
425
|
+
declare const Switch: _splenddev_kreativ_core.KuiComponent<SwitchProps & MotionGatedProps$1, HTMLInputElement>;
|
|
354
426
|
|
|
355
427
|
interface ComboboxProps extends Omit<BaseProps, "unstyled">, ValueProps<string | undefined>, ControlledProps<string | undefined, "inputValue", "defaultInputValue", "onInputChange">, DisabledProps, VariantProps<BaseVariant>, SizeProps, ClearableProps, StatusProps, StateProps {
|
|
356
428
|
required?: boolean;
|
|
@@ -399,7 +471,7 @@ declare namespace Combobox {
|
|
|
399
471
|
|
|
400
472
|
declare const ComboboxInput: react.ForwardRefExoticComponent<ComboboxInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
401
473
|
|
|
402
|
-
interface MultiSelectProps extends Styleable {
|
|
474
|
+
interface MultiSelectProps extends Styleable$1 {
|
|
403
475
|
value?: string[];
|
|
404
476
|
defaultValue?: string[];
|
|
405
477
|
onValueChange?: (value: string[]) => void;
|
|
@@ -443,25 +515,415 @@ declare const MultiSelectTrigger: react.ForwardRefExoticComponent<{
|
|
|
443
515
|
className?: string;
|
|
444
516
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
445
517
|
|
|
446
|
-
|
|
518
|
+
type FormValues = Record<string, unknown>;
|
|
519
|
+
type FormErrors = Record<string, react.ReactNode | undefined>;
|
|
520
|
+
interface FormContextValue {
|
|
521
|
+
values: FormValues;
|
|
522
|
+
isSubmitting: boolean;
|
|
523
|
+
isDirty: boolean;
|
|
524
|
+
schema: unknown;
|
|
525
|
+
setValue: (name: string, value: unknown) => void;
|
|
526
|
+
getValue: (name: string) => unknown;
|
|
527
|
+
setFieldError: (name: string, message: react.ReactNode | undefined) => void;
|
|
528
|
+
registerField: (name: string, element: HTMLElement | null) => void;
|
|
529
|
+
submit: () => void;
|
|
530
|
+
reset: () => void;
|
|
531
|
+
errors: FormErrors;
|
|
532
|
+
errorList: FormFieldError[];
|
|
533
|
+
}
|
|
534
|
+
declare function useFormContext(): FormContextValue | null;
|
|
535
|
+
|
|
536
|
+
interface SchemaLike {
|
|
537
|
+
safeParse: (values: FormValues) => {
|
|
538
|
+
success: true;
|
|
539
|
+
data: FormValues;
|
|
540
|
+
} | {
|
|
541
|
+
success: false;
|
|
542
|
+
error: {
|
|
543
|
+
issues: Array<{
|
|
544
|
+
path: PropertyKey[];
|
|
545
|
+
message: string;
|
|
546
|
+
}>;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
type ManualValidator = (values: FormValues) => FormErrors | undefined | Promise<FormErrors | undefined>;
|
|
551
|
+
interface FormRootProps {
|
|
552
|
+
schema?: SchemaLike;
|
|
553
|
+
validate?: ManualValidator;
|
|
554
|
+
defaultValues?: FormValues;
|
|
555
|
+
onSubmit?: (values: FormValues) => void | Promise<void>;
|
|
556
|
+
onSubmitCapture?: (event: react.FormEvent<HTMLFormElement>) => void;
|
|
557
|
+
scrollToFirstOnError?: boolean;
|
|
558
|
+
className?: string;
|
|
559
|
+
children: react.ReactNode;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
interface FormSubmitButtonProps {
|
|
563
|
+
children: react.ReactElement;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* asChild-style: injects type="submit" + disabled (while invalid or
|
|
567
|
+
* submitting) + aria-busy (while submitting) onto the supplied child.
|
|
568
|
+
* Owns no visual content/spinner of its own — pending state is
|
|
569
|
+
* exposed for the child's own Button to react to.
|
|
570
|
+
*
|
|
571
|
+
* Not a createComponent. It renders no DOM node of its own; the ref is
|
|
572
|
+
* forwarded onto the child. Submit is a one-shot action and is not a
|
|
573
|
+
* video.controlled value.
|
|
574
|
+
*/
|
|
575
|
+
declare const FormSubmitButton: react.ForwardRefExoticComponent<FormSubmitButtonProps & react.RefAttributes<unknown>>;
|
|
576
|
+
interface FormResetButtonProps {
|
|
577
|
+
children: react.ReactElement;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* asChild-style: injects type="button" + an internal reset handler
|
|
581
|
+
* (native type="reset" isn't used since Form's values are
|
|
582
|
+
* controlled/context-owned, not native-form-reset-compatible) +
|
|
583
|
+
* disabled gated on isDirty rather than validity — resetting an
|
|
584
|
+
* invalid, untouched form is a no-op state that should read as
|
|
585
|
+
* disabled; resetting a dirty form should be available regardless of
|
|
586
|
+
* validity.
|
|
587
|
+
*
|
|
588
|
+
* Not a createComponent. Same reason as FormSubmitButton. Reset is a
|
|
589
|
+
* one-shot action and is not a video.controlled value.
|
|
590
|
+
*/
|
|
591
|
+
declare const FormResetButton: react.ForwardRefExoticComponent<FormResetButtonProps & react.RefAttributes<unknown>>;
|
|
592
|
+
|
|
593
|
+
interface NumberStepperValidationResult {
|
|
594
|
+
valid: boolean;
|
|
595
|
+
value: number | null;
|
|
596
|
+
errors: Array<"required" | "invalid" | "min" | "max" | "step">;
|
|
597
|
+
}
|
|
598
|
+
type NumberStepperClampOn = "change" | "blur" | "commit" | "never";
|
|
599
|
+
type NumberStepperButtonLayout = "vertical" | "horizontal";
|
|
600
|
+
interface NumberStepperProps {
|
|
601
|
+
value?: number;
|
|
602
|
+
defaultValue?: number;
|
|
603
|
+
onValueChange?: BaseInputProps["onValueChange"];
|
|
604
|
+
min?: number;
|
|
605
|
+
max?: number;
|
|
606
|
+
step?: number;
|
|
607
|
+
precision?: number;
|
|
608
|
+
variant?: InputVariant;
|
|
609
|
+
hideKindIcon?: InputProps["hideKindIcon"];
|
|
610
|
+
error?: boolean;
|
|
611
|
+
success?: boolean;
|
|
612
|
+
rounded?: boolean;
|
|
613
|
+
fullWidth?: boolean;
|
|
614
|
+
clampOn?: NumberStepperClampOn;
|
|
615
|
+
onValidate?: (result: NumberStepperValidationResult) => void;
|
|
616
|
+
buttonLayout?: NumberStepperButtonLayout;
|
|
617
|
+
disabled?: boolean;
|
|
618
|
+
required?: boolean;
|
|
619
|
+
name?: string;
|
|
620
|
+
size?: "sm" | "md" | "lg";
|
|
621
|
+
className?: string;
|
|
622
|
+
style?: react.CSSProperties;
|
|
623
|
+
"aria-label"?: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
interface ComponentPropsMap {
|
|
627
|
+
input: InputProps;
|
|
628
|
+
select: SelectProps;
|
|
629
|
+
switch: SwitchProps;
|
|
630
|
+
textarea: TextareaProps;
|
|
631
|
+
checkbox: CheckboxProps;
|
|
632
|
+
'number-stepper': NumberStepperProps;
|
|
633
|
+
}
|
|
634
|
+
type ComponentKey = keyof ComponentPropsMap;
|
|
635
|
+
|
|
636
|
+
interface FormControlProps {
|
|
637
|
+
id: string;
|
|
638
|
+
"aria-invalid": boolean | undefined;
|
|
639
|
+
"aria-required": boolean | undefined;
|
|
640
|
+
"aria-describedby": string | undefined;
|
|
641
|
+
disabled: boolean;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
interface KuiFormControlValueProps<T = unknown> {
|
|
645
|
+
value?: T;
|
|
646
|
+
onValueChange: (value: T) => void;
|
|
647
|
+
}
|
|
648
|
+
type KuiFormControlComponent<P extends KuiFormControlValueProps<any> = KuiFormControlValueProps<any>> = react.ComponentType<P> & {
|
|
649
|
+
__kui: {
|
|
650
|
+
formControl: "single" | "compound";
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
interface FieldState {
|
|
654
|
+
error?: react.ReactNode;
|
|
655
|
+
invalid: boolean;
|
|
656
|
+
isDirty: boolean;
|
|
657
|
+
}
|
|
658
|
+
interface FieldApi<T = unknown> {
|
|
659
|
+
value: T;
|
|
660
|
+
onChange: (value: T) => void;
|
|
661
|
+
onBlur: () => void;
|
|
662
|
+
name: string;
|
|
663
|
+
}
|
|
664
|
+
type CustomFieldRenderer<T = unknown> = (args: {
|
|
665
|
+
field: FieldApi<T>;
|
|
666
|
+
fieldState: FieldState;
|
|
667
|
+
controlProps: FormControlProps;
|
|
668
|
+
}) => react.ReactNode;
|
|
669
|
+
interface FormFieldProps {
|
|
670
|
+
tone?: "default" | "warning" | "info";
|
|
671
|
+
orientation?: "vertical" | "horizontal";
|
|
672
|
+
}
|
|
673
|
+
interface UISectionSchema {
|
|
674
|
+
label?: react.ReactNode;
|
|
675
|
+
description?: react.ReactNode;
|
|
676
|
+
fields: string[];
|
|
677
|
+
layout?: string;
|
|
678
|
+
columns?: string;
|
|
679
|
+
order?: number;
|
|
680
|
+
}
|
|
681
|
+
interface UIFieldSchemaWidgetKey<K extends ComponentKey = ComponentKey> extends UIFieldSchemaBase {
|
|
682
|
+
widget: K;
|
|
683
|
+
props?: Partial<ComponentPropsMap[K]>;
|
|
684
|
+
render?: never;
|
|
685
|
+
}
|
|
686
|
+
interface UIFieldSchemaWidgetComponent<P extends KuiFormControlValueProps = KuiFormControlValueProps> extends UIFieldSchemaBase {
|
|
687
|
+
widget: KuiFormControlComponent<P>;
|
|
688
|
+
props?: Partial<P>;
|
|
689
|
+
render?: never;
|
|
690
|
+
}
|
|
691
|
+
interface UIFieldSchemaWidgetInferred extends UIFieldSchemaBase {
|
|
692
|
+
widget?: never;
|
|
693
|
+
props?: never;
|
|
694
|
+
render?: never;
|
|
695
|
+
}
|
|
696
|
+
interface UIFieldSchemaRender<T = unknown> extends UIFieldSchemaBase {
|
|
697
|
+
widget?: never;
|
|
698
|
+
props?: never;
|
|
699
|
+
render: CustomFieldRenderer<T>;
|
|
700
|
+
}
|
|
701
|
+
interface UIFieldSchemaBase {
|
|
702
|
+
label?: react.ReactNode;
|
|
703
|
+
description?: react.ReactNode;
|
|
704
|
+
order?: number;
|
|
705
|
+
hidden?: boolean;
|
|
706
|
+
formField?: FormFieldProps;
|
|
707
|
+
}
|
|
708
|
+
interface UIFieldSchemaBase {
|
|
709
|
+
label?: react.ReactNode;
|
|
710
|
+
description?: react.ReactNode;
|
|
711
|
+
order?: number;
|
|
712
|
+
hidden?: boolean;
|
|
713
|
+
formField?: FormFieldProps;
|
|
447
714
|
/**
|
|
448
|
-
*
|
|
449
|
-
*
|
|
715
|
+
* CSS `grid-area` name used to place this field inside a `$sections`
|
|
716
|
+
* grid. Only honored for leaf fields (widgets, inferred, custom
|
|
717
|
+
* renderers) — object and array groups ignore it. When the field is
|
|
718
|
+
* claimed by a section, the section's own `layout` grid takes precedence.
|
|
450
719
|
*/
|
|
451
|
-
|
|
720
|
+
gridArea?: string;
|
|
721
|
+
}
|
|
722
|
+
type UIFieldSchema<K extends ComponentKey = ComponentKey, P extends KuiFormControlValueProps = KuiFormControlValueProps, T = unknown> = UIFieldSchemaWidgetKey<K> | UIFieldSchemaWidgetComponent<P> | UIFieldSchemaWidgetInferred | UIFieldSchemaRender<T>;
|
|
723
|
+
type UIFieldSchemaFor<V> = V extends Array<infer Item> ? UIArraySchemaFor<Item> : V extends object ? UIObjectSchemaForShape<V> | UIFieldSchema<ComponentKey, any, V> : UIFieldSchema<ComponentKey, any, V>;
|
|
724
|
+
type UIObjectSchema = {
|
|
725
|
+
[key: string]: UIFieldSchema | UIObjectSchema | UIArraySchema;
|
|
726
|
+
} & {
|
|
727
|
+
$sections?: UISectionSchema[];
|
|
728
|
+
};
|
|
729
|
+
interface UIArraySchema {
|
|
730
|
+
label?: react.ReactNode;
|
|
731
|
+
description?: react.ReactNode;
|
|
732
|
+
item: UIFieldSchema | UIObjectSchema;
|
|
733
|
+
addLabel?: react.ReactNode;
|
|
734
|
+
itemLabel?: string;
|
|
735
|
+
removable?: boolean;
|
|
736
|
+
reorderable?: boolean;
|
|
452
737
|
/**
|
|
453
|
-
*
|
|
738
|
+
* CSS `grid-area` name used to place this field inside a `$sections`
|
|
739
|
+
* grid. Only honored for leaf fields (widgets, inferred, custom
|
|
740
|
+
* renderers) — object and array groups ignore it. When the field is
|
|
741
|
+
* claimed by a section, the section's own `layout` grid takes precedence.
|
|
454
742
|
*/
|
|
455
|
-
|
|
743
|
+
gridArea?: string;
|
|
744
|
+
}
|
|
745
|
+
type UIObjectSchemaFor<Schema extends z.ZodObject<any>> = {
|
|
746
|
+
[K in keyof z.infer<Schema>]?: UIFieldSchemaFor<z.infer<Schema>[K]>;
|
|
747
|
+
} & {
|
|
748
|
+
$sections?: UISectionSchema[];
|
|
749
|
+
};
|
|
750
|
+
type UIObjectSchemaForShape<V> = {
|
|
751
|
+
[K in keyof V]?: UIFieldSchemaFor<V[K]>;
|
|
752
|
+
};
|
|
753
|
+
type UIArraySchemaFor<Item> = {
|
|
754
|
+
label?: react.ReactNode;
|
|
755
|
+
description?: react.ReactNode;
|
|
756
|
+
item: UIFieldSchemaFor<Item>;
|
|
757
|
+
addLabel?: react.ReactNode;
|
|
758
|
+
itemLabel?: string;
|
|
759
|
+
removable?: boolean;
|
|
760
|
+
reorderable?: boolean;
|
|
456
761
|
/**
|
|
457
|
-
*
|
|
458
|
-
*
|
|
762
|
+
* CSS `grid-area` name used to place this field inside a `$sections`
|
|
763
|
+
* grid. Only honored for leaf fields (widgets, inferred, custom
|
|
764
|
+
* renderers) — object and array groups ignore it. When the field is
|
|
765
|
+
* claimed by a section, the section's own `layout` grid takes precedence.
|
|
459
766
|
*/
|
|
460
|
-
|
|
767
|
+
gridArea?: string;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* Object schema shape with unconstrained keys.
|
|
771
|
+
*
|
|
772
|
+
* @deprecated Use {@link UIObjectSchemaFor} for strict, Zod-inferred key and
|
|
773
|
+
* widget checking. `UIObjectSchema` accepts any string key and any
|
|
774
|
+
* `UIFieldSchema`, so it won't catch typos or wrong widget names — it exists
|
|
775
|
+
* only as the fallback shape when no Zod schema is in scope (e.g. inside a
|
|
776
|
+
* `<Form>` when `Schema` isn't supplied as a type argument). Prefer typing
|
|
777
|
+
* `uiSchema` against the inferred shape:
|
|
778
|
+
*
|
|
779
|
+
* @example
|
|
780
|
+
* const ui: UIObjectSchemaFor<typeof profileSchema> = { ... };
|
|
781
|
+
*/
|
|
782
|
+
type UISchema = UIObjectSchema;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Props for using Form.FromSchema inside a parent `<Form schema={...}>`.
|
|
786
|
+
* The schema comes from context, so `schema` is typed `never` here — passing
|
|
787
|
+
* one is a compile error rather than a silent override.
|
|
788
|
+
*/
|
|
789
|
+
interface FormFromSchemaContextProps<Schema extends z.ZodObject<any>> {
|
|
461
790
|
/**
|
|
462
|
-
*
|
|
463
|
-
*
|
|
791
|
+
* Zod object schema to generate fields from. When omitted, the enclosing
|
|
792
|
+
* `<Form>`'s schema is used. Providing it here also drives inference of
|
|
793
|
+
* `Schema` for `uiSchema`.
|
|
794
|
+
*/
|
|
795
|
+
uiSchema?: UIObjectSchemaFor<Schema>;
|
|
796
|
+
/**
|
|
797
|
+
* Presentation overlay keyed by the schema's field names. When `Schema`
|
|
798
|
+
* is known, keys and per-field props are checked against the inferred
|
|
799
|
+
* shape; otherwise keys are unconstrained.
|
|
464
800
|
*/
|
|
801
|
+
schema?: never;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Props for using Form.FromSchema on its own, with `schema` passed directly.
|
|
805
|
+
*/
|
|
806
|
+
interface FormFromSchemaStandaloneProps<Schema extends z.ZodObject<any>> {
|
|
807
|
+
/**
|
|
808
|
+
* Zod object schema to generate fields from. When omitted, the enclosing
|
|
809
|
+
* `<Form>`'s schema is used. Providing it here also drives inference of
|
|
810
|
+
* `Schema` for `uiSchema`.
|
|
811
|
+
*/
|
|
812
|
+
uiSchema?: UIObjectSchemaFor<Schema>;
|
|
813
|
+
/**
|
|
814
|
+
* Presentation overlay keyed by the schema's field names. When `Schema`
|
|
815
|
+
* is known, keys and per-field props are checked against the inferred
|
|
816
|
+
* shape; otherwise keys are unconstrained.
|
|
817
|
+
*/
|
|
818
|
+
schema: Schema;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Props for `<Form.FromSchema>`.
|
|
822
|
+
*
|
|
823
|
+
* `Schema` is inferred from the `schema` prop in standalone mode; when used
|
|
824
|
+
* inside a `<Form>`, supply it explicitly as a type argument to get
|
|
825
|
+
* key-checking on `uiSchema`. Otherwise `uiSchema` falls back to the
|
|
826
|
+
* unconstrained `UIObjectSchema` shape.
|
|
827
|
+
*
|
|
828
|
+
* ### Strict vs. loose `uiSchema` typing
|
|
829
|
+
*
|
|
830
|
+
* - **Strict**: type `uiSchema` as `UIObjectSchemaFor<typeof schema>` (or let
|
|
831
|
+
* it be inferred by passing `schema` directly). Keys, nested field names,
|
|
832
|
+
* widget keys, and per-field `props` are all checked against the Zod
|
|
833
|
+
* output. This is what you want almost everywhere.
|
|
834
|
+
* - **Loose**: `UIObjectSchema` / `UISchema`. Any string key, any
|
|
835
|
+
* `UIFieldSchema`. Used only as the fallback when `Schema` can't be
|
|
836
|
+
* inferred (e.g. `<Form.FromSchema uiSchema={...} />` inside a `<Form>`).
|
|
837
|
+
* Wrong keys, misspelled widgets, and mismatched `props` all type-check.
|
|
838
|
+
*
|
|
839
|
+
* `UISchema` is deprecated for this reason — reach for `UIObjectSchemaFor`
|
|
840
|
+
* whenever you have a Zod schema available.
|
|
841
|
+
*/
|
|
842
|
+
type FormFromSchemaProps<Schema extends z.ZodObject<any> = z.ZodObject<any>> = FormFromSchemaContextProps<Schema> | FormFromSchemaStandaloneProps<Schema>;
|
|
843
|
+
/**
|
|
844
|
+
* Generates a set of fields from a Zod object schema.
|
|
845
|
+
*
|
|
846
|
+
* Write the shape once in Zod, optionally layer presentation on top with a
|
|
847
|
+
* `uiSchema`, and skip writing a `<Field>` for every property. Fields you
|
|
848
|
+
* don't mention in `uiSchema` still render — the generator picks a widget
|
|
849
|
+
* based on the Zod type. Use `uiSchema` only for the ones you want to
|
|
850
|
+
* override.
|
|
851
|
+
*
|
|
852
|
+
* `Schema` is inferred automatically when you pass `schema` directly
|
|
853
|
+
* (standalone mode) — `uiSchema`'s keys are checked against that schema's
|
|
854
|
+
* shape with no extra annotation needed. Inside a `<Form>`, there's no
|
|
855
|
+
* `schema` prop for inference to key off, so `Schema` must be supplied
|
|
856
|
+
* explicitly as a type argument for `uiSchema` to get the same
|
|
857
|
+
* key-checking; omitted, it falls back to the unconstrained shape.
|
|
858
|
+
*
|
|
859
|
+
* Schema resolution, in order:
|
|
860
|
+
* 1. The `schema` prop, if you passed one.
|
|
861
|
+
* 2. The enclosing `<Form>`'s schema, if there is one.
|
|
862
|
+
*
|
|
863
|
+
* If neither exists, or the result isn't a `z.object({...})`, this throws.
|
|
864
|
+
* Errors are prefixed `[kreativ-ui/Form.FromSchema]` so they're easy to
|
|
865
|
+
* grep for.
|
|
866
|
+
*
|
|
867
|
+
* Renders a fragment — no wrapper element — so the fields land directly
|
|
868
|
+
* inside whatever container you put this in.
|
|
869
|
+
*
|
|
870
|
+
* @example
|
|
871
|
+
* // Schema from context — Schema isn't inferable here, so uiSchema is
|
|
872
|
+
* // checked against profileSchema only if you supply the type argument:
|
|
873
|
+
* <Form schema={profileSchema}>
|
|
874
|
+
* <Form.FromSchema<typeof profileSchema> uiSchema={profileUiSchema} />
|
|
875
|
+
* </Form>
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* // Schema passed in — Schema is inferred from `schema`, uiSchema is
|
|
879
|
+
* // checked automatically, no type argument needed:
|
|
880
|
+
* <Form.FromSchema schema={profileSchema} uiSchema={profileUiSchema} />
|
|
881
|
+
*/
|
|
882
|
+
declare function FormFromSchema<Schema extends z.ZodObject<any> = z.ZodObject<any>>({ uiSchema, schema: standaloneSchema }: FormFromSchemaProps<Schema>): react.JSX.Element;
|
|
883
|
+
|
|
884
|
+
declare function defineUIField<K extends ComponentKey>(field: UIFieldSchemaWidgetKey<K>): UIFieldSchemaWidgetKey<K>;
|
|
885
|
+
declare function defineUIField<P extends KuiFormControlValueProps<any>>(field: UIFieldSchemaWidgetComponent<P>): UIFieldSchemaWidgetComponent<P>;
|
|
886
|
+
declare function defineUIField(field: UIFieldSchemaWidgetInferred): UIFieldSchemaWidgetInferred;
|
|
887
|
+
declare function defineUIField<T>(field: UIFieldSchemaRender<T>): UIFieldSchemaRender<T>;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Form owns real orchestration, not a thin semantic <form> wrapper —
|
|
891
|
+
* submit handling, validation orchestration across its FormFields,
|
|
892
|
+
* and error aggregation are all Form's responsibility. It provides a
|
|
893
|
+
* FormContext that FormField reads to auto-wire validation/errors/
|
|
894
|
+
* disabled state.
|
|
895
|
+
*
|
|
896
|
+
* Usage:
|
|
897
|
+
* ```tsx
|
|
898
|
+
* <Form schema={zodSchema} onSubmit={handleSubmit}>
|
|
899
|
+
* <FormField name="email" as={Input} label="Email" />
|
|
900
|
+
* <Form.SubmitButton><Button>Submit</Button></Form.SubmitButton>
|
|
901
|
+
* </Form>
|
|
902
|
+
*```
|
|
903
|
+
* Or, schema-driven field generation:
|
|
904
|
+
* ```tsx
|
|
905
|
+
* <Form schema={zodSchema} onSubmit={handleSubmit}>
|
|
906
|
+
* <Form.FromSchema uiSchema={uiSchema} />
|
|
907
|
+
* <Form.SubmitButton><Button>Submit</Button></Form.SubmitButton>
|
|
908
|
+
* </Form>
|
|
909
|
+
* ```
|
|
910
|
+
*/
|
|
911
|
+
declare const Form: react.ForwardRefExoticComponent<FormRootProps & react.RefAttributes<HTMLFormElement>> & {
|
|
912
|
+
__kui: _splenddev_kreativ_core.KuiMeta<FormRootProps>;
|
|
913
|
+
providerRequired?: _splenddev_kreativ_core.KuiProviderRequirement;
|
|
914
|
+
} & {
|
|
915
|
+
SubmitButton: react.ForwardRefExoticComponent<FormSubmitButtonProps & react.RefAttributes<unknown>>;
|
|
916
|
+
ResetButton: react.ForwardRefExoticComponent<FormResetButtonProps & react.RefAttributes<unknown>>;
|
|
917
|
+
FromSchema: typeof FormFromSchema;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
interface ContainerProps extends BaseProps {
|
|
921
|
+
/** @default "lg" */
|
|
922
|
+
maxWidth?: Size | (string & {});
|
|
923
|
+
/** Token name ("sm"), pixel number (24), or raw length ("24px"). */
|
|
924
|
+
padding?: ResponsiveValue<SpaceValue>;
|
|
925
|
+
/** @default true */
|
|
926
|
+
centered?: boolean;
|
|
465
927
|
as?: ElementType;
|
|
466
928
|
children?: ReactNode;
|
|
467
929
|
}
|
|
@@ -469,19 +931,79 @@ interface ContainerProps extends BaseProps {
|
|
|
469
931
|
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLDivElement>>;
|
|
470
932
|
|
|
471
933
|
interface FlexProps extends BaseProps {
|
|
472
|
-
/**
|
|
934
|
+
/**
|
|
935
|
+
* `display: inline-flex` instead of `flex`.
|
|
936
|
+
* Use when the container should sit in a line of text or shrink to its content.
|
|
937
|
+
* @default false
|
|
938
|
+
*/
|
|
939
|
+
inline?: boolean;
|
|
940
|
+
/**
|
|
941
|
+
* `flex-direction`. Main axis of the items.
|
|
942
|
+
* @default "row"
|
|
943
|
+
*/
|
|
473
944
|
direction?: ResponsiveValue<CSSProperties["flexDirection"]>;
|
|
474
|
-
/**
|
|
945
|
+
/**
|
|
946
|
+
* `flex-wrap`. Whether items stay on one line or wrap onto new lines.
|
|
947
|
+
* @default "nowrap"
|
|
948
|
+
*/
|
|
475
949
|
wrap?: ResponsiveValue<CSSProperties["flexWrap"]>;
|
|
950
|
+
/**
|
|
951
|
+
* `align-items`. Alignment on the cross axis.
|
|
952
|
+
* `"stretch"` fills the cross size; `"center"` centers; `"start"` / `"end"` pin to an edge.
|
|
953
|
+
*/
|
|
476
954
|
align?: ResponsiveValue<CSSProperties["alignItems"]>;
|
|
955
|
+
/**
|
|
956
|
+
* `justify-content`. Distribution on the main axis.
|
|
957
|
+
* `"between"` pushes the first and last items to the edges; `"center"` groups them in the middle.
|
|
958
|
+
*/
|
|
477
959
|
justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
|
|
478
|
-
/**
|
|
479
|
-
|
|
960
|
+
/**
|
|
961
|
+
* `gap` on both axes. Token (`"sm"`), pixel number (`24`), or raw length (`"24px"`).
|
|
962
|
+
* Overridden per axis by `gapX` / `gapY`.
|
|
963
|
+
*/
|
|
964
|
+
gap?: ResponsiveValue<SpaceValue>;
|
|
965
|
+
/**
|
|
966
|
+
* `column-gap`. Space between items on the inline axis.
|
|
967
|
+
* Overrides `gap` for that axis only.
|
|
968
|
+
*/
|
|
969
|
+
gapX?: ResponsiveValue<SpaceValue>;
|
|
970
|
+
/**
|
|
971
|
+
* `row-gap`. Space between items on the block axis.
|
|
972
|
+
* Overrides `gap` for that axis only.
|
|
973
|
+
*/
|
|
974
|
+
gapY?: ResponsiveValue<SpaceValue>;
|
|
975
|
+
/**
|
|
976
|
+
* `flex-grow`. How much free space this item takes on the main axis.
|
|
977
|
+
* - `true` is `1` (share leftover space).
|
|
978
|
+
* - `false` is `0` (do not grow).
|
|
979
|
+
* - A number, or a responsive map, is passed through.
|
|
980
|
+
*/
|
|
981
|
+
grow?: ResponsiveValue<CSSProperties["flexGrow"]> | boolean;
|
|
982
|
+
/**
|
|
983
|
+
* `flex-shrink`. How readily this item gives up space when the line is tight.
|
|
984
|
+
* - `true` is `1` (may shrink; the CSS default).
|
|
985
|
+
* - `false` is `0` (keep its size).
|
|
986
|
+
* - A number, or a responsive map, is passed through.
|
|
987
|
+
*/
|
|
988
|
+
shrink?: ResponsiveValue<CSSProperties["flexShrink"]> | boolean;
|
|
989
|
+
/**
|
|
990
|
+
* `flex-basis`. Starting size before free space is distributed.
|
|
991
|
+
* `"auto"` uses the item's width/height. `"0"` ignores content size and shares space by `grow`.
|
|
992
|
+
* Also accepts `"content"`, a length, or a percentage.
|
|
993
|
+
*/
|
|
994
|
+
basis?: ResponsiveValue<CSSProperties["flexBasis"]>;
|
|
995
|
+
/** `width: 100%`. */
|
|
996
|
+
fullWidth?: boolean;
|
|
997
|
+
/** `height: 100%`. */
|
|
998
|
+
fullHeight?: boolean;
|
|
999
|
+
/**
|
|
1000
|
+
* Element to render.
|
|
1001
|
+
* @default "div"
|
|
1002
|
+
*/
|
|
480
1003
|
as?: ElementType;
|
|
481
|
-
children?: ReactNode;
|
|
482
1004
|
}
|
|
483
1005
|
|
|
484
|
-
declare const Flex:
|
|
1006
|
+
declare const Flex: _splenddev_kreativ_core.KuiComponent<FlexProps, HTMLDivElement>;
|
|
485
1007
|
|
|
486
1008
|
interface StackProps extends BaseProps {
|
|
487
1009
|
/**
|
|
@@ -503,26 +1025,77 @@ declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttri
|
|
|
503
1025
|
|
|
504
1026
|
interface GridProps extends BaseProps {
|
|
505
1027
|
/**
|
|
506
|
-
*
|
|
507
|
-
*
|
|
1028
|
+
* Equal columns. `columns={3}` is `repeat(3, minmax(0, 1fr))`.
|
|
1029
|
+
* Do not combine with `minChildWidth` or `templateColumns`.
|
|
508
1030
|
*/
|
|
509
1031
|
columns?: ResponsiveValue<number>;
|
|
510
|
-
/**
|
|
1032
|
+
/**
|
|
1033
|
+
* Wrap columns to the container. `minChildWidth="200px"` is
|
|
1034
|
+
* `repeat(auto-fit, minmax(200px, 1fr))`.
|
|
1035
|
+
* Do not combine with `columns` or `templateColumns`.
|
|
1036
|
+
*/
|
|
1037
|
+
minChildWidth?: ResponsiveValue<Size | (string & {})>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Raw `grid-template-columns`. Wins over `columns` and `minChildWidth`.
|
|
1040
|
+
*/
|
|
511
1041
|
templateColumns?: ResponsiveValue<string>;
|
|
512
|
-
/** Raw
|
|
1042
|
+
/** Raw `grid-template-rows`. */
|
|
513
1043
|
templateRows?: ResponsiveValue<string>;
|
|
514
|
-
/**
|
|
1044
|
+
/**
|
|
1045
|
+
* Raw `grid-template-areas`.
|
|
1046
|
+
* Not responsive. Areas rarely change by breakpoint.
|
|
1047
|
+
*/
|
|
515
1048
|
templateAreas?: string;
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
1049
|
+
/**
|
|
1050
|
+
* `grid-auto-flow`. `"row dense"` packs holes.
|
|
1051
|
+
*/
|
|
1052
|
+
autoFlow?: ResponsiveValue<CSSProperties["gridAutoFlow"]>;
|
|
1053
|
+
/**
|
|
1054
|
+
* `gap` on both axes. Token, pixel number, or raw length.
|
|
1055
|
+
* Overridden per axis by `gapX` / `gapY`.
|
|
1056
|
+
*/
|
|
1057
|
+
gap?: ResponsiveValue<SpaceValue>;
|
|
1058
|
+
/** `column-gap`. Overrides `gap` on the inline axis. */
|
|
1059
|
+
gapX?: ResponsiveValue<SpaceValue>;
|
|
1060
|
+
/** `row-gap`. Overrides `gap` on the block axis. */
|
|
1061
|
+
gapY?: ResponsiveValue<SpaceValue>;
|
|
1062
|
+
/** `align-items`. Alignment inside the cell, on the block axis. */
|
|
519
1063
|
align?: ResponsiveValue<CSSProperties["alignItems"]>;
|
|
520
|
-
justify
|
|
1064
|
+
/** `justify-items`. Alignment inside the cell, on the inline axis. */
|
|
1065
|
+
justifyItems?: ResponsiveValue<CSSProperties["justifyItems"]>;
|
|
1066
|
+
/**
|
|
1067
|
+
* `display: inline-grid` instead of `grid`.
|
|
1068
|
+
* @default false
|
|
1069
|
+
*/
|
|
1070
|
+
inline?: boolean;
|
|
1071
|
+
/**
|
|
1072
|
+
* Element to render.
|
|
1073
|
+
* @default "div"
|
|
1074
|
+
*/
|
|
1075
|
+
as?: ElementType;
|
|
1076
|
+
}
|
|
1077
|
+
interface GridItemProps extends BaseProps {
|
|
1078
|
+
/**
|
|
1079
|
+
* `grid-column`. A number is `span <n>`. `"full"` is `1 / -1`.
|
|
1080
|
+
*/
|
|
1081
|
+
span?: ResponsiveValue<number | "full">;
|
|
1082
|
+
/**
|
|
1083
|
+
* `grid-row`. A number is `span <n>`. `"full"` is `1 / -1`.
|
|
1084
|
+
*/
|
|
1085
|
+
rowSpan?: ResponsiveValue<number | "full">;
|
|
1086
|
+
/**
|
|
1087
|
+
* Element to render.
|
|
1088
|
+
* @default "div"
|
|
1089
|
+
*/
|
|
521
1090
|
as?: ElementType;
|
|
522
|
-
children?: ReactNode;
|
|
523
1091
|
}
|
|
524
1092
|
|
|
525
|
-
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement
|
|
1093
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement>> & {
|
|
1094
|
+
__kui: _splenddev_kreativ_core.KuiMeta<GridProps>;
|
|
1095
|
+
providerRequired?: _splenddev_kreativ_core.KuiProviderRequirement;
|
|
1096
|
+
} & {
|
|
1097
|
+
Item: _splenddev_kreativ_core.KuiComponent<GridItemProps, HTMLDivElement>;
|
|
1098
|
+
};
|
|
526
1099
|
|
|
527
1100
|
type CardVariant = "solid" | "outline" | "ghost" | "elevated" | "compact";
|
|
528
1101
|
type CardSize = "sm" | "md" | "lg";
|
|
@@ -532,65 +1105,401 @@ interface CardProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
532
1105
|
*/
|
|
533
1106
|
variant?: CardVariant;
|
|
534
1107
|
/**
|
|
535
|
-
* Controls
|
|
1108
|
+
* Controls each section's padding and overall density. Read by
|
|
1109
|
+
* Card.Header/Card.Body/Card.Footer, not applied by Card itself.
|
|
536
1110
|
*/
|
|
537
1111
|
size?: CardSize;
|
|
538
|
-
/**
|
|
539
|
-
* Indicates that the card contains an image.
|
|
540
|
-
*/
|
|
541
|
-
hasImage?: boolean;
|
|
542
1112
|
/**
|
|
543
1113
|
* Makes the card span the full available width.
|
|
544
1114
|
*/
|
|
545
1115
|
fullWidth?: boolean;
|
|
546
|
-
/**
|
|
547
|
-
* Removes the card's default padding.
|
|
548
|
-
*/
|
|
549
|
-
noPadding?: boolean;
|
|
550
1116
|
/**
|
|
551
1117
|
* Card content.
|
|
552
1118
|
*/
|
|
553
1119
|
children?: ReactNode;
|
|
554
1120
|
}
|
|
555
1121
|
interface CardHeaderProps extends ComponentPropsWithoutRef<"div"> {
|
|
1122
|
+
/**
|
|
1123
|
+
* Controls this section's padding. Defaults to the nearest Card's
|
|
1124
|
+
* `size`, settable per-section when it needs to differ.
|
|
1125
|
+
*/
|
|
1126
|
+
size?: CardSize;
|
|
1127
|
+
/**
|
|
1128
|
+
* Removes this section's padding — for a section that should bleed,
|
|
1129
|
+
* independent of its siblings.
|
|
1130
|
+
*/
|
|
1131
|
+
noPadding?: boolean;
|
|
556
1132
|
children?: ReactNode;
|
|
557
1133
|
}
|
|
558
1134
|
interface CardBodyProps extends ComponentPropsWithoutRef<"div"> {
|
|
1135
|
+
size?: CardSize;
|
|
1136
|
+
noPadding?: boolean;
|
|
559
1137
|
children?: ReactNode;
|
|
560
1138
|
}
|
|
561
1139
|
interface CardFooterProps extends ComponentPropsWithoutRef<"div"> {
|
|
1140
|
+
size?: CardSize;
|
|
1141
|
+
noPadding?: boolean;
|
|
562
1142
|
children?: ReactNode;
|
|
563
1143
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
1144
|
+
type CardMediaFit = "cover" | "contain" | "fill" | "none";
|
|
1145
|
+
type CardMediaBlend = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten";
|
|
1146
|
+
interface CardMediaProps extends ComponentPropsWithoutRef<"div"> {
|
|
1147
|
+
/**
|
|
1148
|
+
* Image source, rendered by Media's internal `<img>`.
|
|
1149
|
+
*/
|
|
1150
|
+
src: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* Alt text for the internal `<img>`.
|
|
1153
|
+
*/
|
|
1154
|
+
alt: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* Controls how the image fills Media's box, mirroring `object-fit`.
|
|
1157
|
+
*/
|
|
1158
|
+
fit?: CardMediaFit;
|
|
1159
|
+
/**
|
|
1160
|
+
* Blend mode applied to the image, mirroring `mix-blend-mode`.
|
|
1161
|
+
*/
|
|
1162
|
+
blend?: CardMediaBlend;
|
|
1163
|
+
/**
|
|
1164
|
+
* Fixed aspect ratio for Media's box (e.g. `16 / 9`). Media is the
|
|
1165
|
+
* sizing context for the card's media area — content stacked inside it
|
|
1166
|
+
* (Card.Overlay, custom children) positions against this box.
|
|
1167
|
+
*/
|
|
1168
|
+
aspectRatio?: number | string;
|
|
1169
|
+
/**
|
|
1170
|
+
* Content stacked on top of the image — Card.Overlay, text, controls.
|
|
1171
|
+
*/
|
|
1172
|
+
children?: ReactNode;
|
|
1173
|
+
}
|
|
1174
|
+
type CardOverlayGradientEdge = "top" | "bottom" | "left" | "right";
|
|
1175
|
+
interface CardOverlayRadialGradient {
|
|
1176
|
+
type: "radial";
|
|
1177
|
+
/**
|
|
1178
|
+
* CSS position for the radial's center (e.g. "center", "top left").
|
|
1179
|
+
* Defaults to "center".
|
|
1180
|
+
*/
|
|
1181
|
+
position?: string;
|
|
1182
|
+
}
|
|
1183
|
+
type CardOverlayGradient = CardOverlayGradientEdge | CardOverlayRadialGradient;
|
|
1184
|
+
interface CardOverlayProps extends ComponentPropsWithoutRef<"div"> {
|
|
1185
|
+
/**
|
|
1186
|
+
* Scrim tint color drawn over the underlying layer. When `gradient` is
|
|
1187
|
+
* set, this is the gradient's solid stop color rather than a flat wash.
|
|
1188
|
+
*/
|
|
1189
|
+
color?: string;
|
|
1190
|
+
/**
|
|
1191
|
+
* Opacity of the scrim tint, 0–1. When `gradient` is set, this is the
|
|
1192
|
+
* gradient's starting-stop opacity rather than a uniform multiply.
|
|
1193
|
+
*/
|
|
1194
|
+
opacity?: number;
|
|
1195
|
+
/**
|
|
1196
|
+
* Blur applied over the composited layer beneath the overlay. Independent
|
|
1197
|
+
* of `gradient` — the two compose freely (a frosted panel that also
|
|
1198
|
+
* fades out).
|
|
1199
|
+
*/
|
|
1200
|
+
blur?: number | string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Fades `color` to transparent instead of painting a uniform flat wash —
|
|
1203
|
+
* either linear from a named edge, or radial from a position (default
|
|
1204
|
+
* "center").
|
|
1205
|
+
*/
|
|
1206
|
+
gradient?: CardOverlayGradient;
|
|
1207
|
+
/**
|
|
1208
|
+
* Content rendered above the overlay (title, actions, etc.). Usable
|
|
1209
|
+
* inside Card.Media (over an image) or inside Card.Header/Body/Footer
|
|
1210
|
+
* (as a decorative background layer behind section content) — any of
|
|
1211
|
+
* these are a positioned ancestor Overlay can fill.
|
|
1212
|
+
*/
|
|
1213
|
+
children?: ReactNode;
|
|
570
1214
|
}
|
|
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;
|
|
574
1215
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
1216
|
+
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>> & {
|
|
1217
|
+
__kui: _splenddev_kreativ_core.KuiMeta<CardProps>;
|
|
1218
|
+
providerRequired?: _splenddev_kreativ_core.KuiProviderRequirement;
|
|
1219
|
+
} & {
|
|
1220
|
+
Header: _splenddev_kreativ_core.KuiComponent<CardHeaderProps, HTMLDivElement>;
|
|
1221
|
+
Body: _splenddev_kreativ_core.KuiComponent<CardBodyProps, HTMLDivElement>;
|
|
1222
|
+
Footer: _splenddev_kreativ_core.KuiComponent<CardFooterProps, HTMLDivElement>;
|
|
1223
|
+
Media: _splenddev_kreativ_core.KuiComponent<CardMediaProps, HTMLDivElement>;
|
|
1224
|
+
Overlay: _splenddev_kreativ_core.KuiComponent<CardOverlayProps, HTMLDivElement>;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
declare const CardOverlay: _splenddev_kreativ_core.KuiComponent<CardOverlayProps, HTMLDivElement>;
|
|
1228
|
+
|
|
1229
|
+
/** Scroll axis. `"both"` overflows on x and y. */
|
|
1230
|
+
type ScrollDirection = "vertical" | "horizontal" | "both";
|
|
1231
|
+
/**
|
|
1232
|
+
* When the scrollbar is painted.
|
|
1233
|
+
* `"auto"` follows the platform. `"hover"` shows it only while the area is hovered.
|
|
1234
|
+
* `"always"` keeps it visible. `"never"` hides it; scrolling still works.
|
|
1235
|
+
*/
|
|
1236
|
+
type ScrollbarVisibility = "auto" | "always" | "hover" | "never";
|
|
1237
|
+
/** Scrollbar thickness. `"thin"` is the compact track. */
|
|
1238
|
+
type ScrollbarVariant = "thin" | "default";
|
|
1239
|
+
/** An edge of the scrollport. */
|
|
1240
|
+
type ScrollEdge = "top" | "bottom" | "left" | "right";
|
|
1241
|
+
/**
|
|
1242
|
+
* `scroll-snap-type` strictness.
|
|
1243
|
+
* `"proximity"` snaps when close. `"mandatory"` always settles on a snap point.
|
|
1244
|
+
*/
|
|
1245
|
+
type ScrollSnap = "none" | "proximity" | "mandatory";
|
|
1246
|
+
/** `scroll-snap-align` for snap targets. */
|
|
1247
|
+
type ScrollSnapAlign = "start" | "center" | "end";
|
|
1248
|
+
/**
|
|
1249
|
+
* How a Scene measures its own progress.
|
|
1250
|
+
* `"through"` is 0 when the scene enters the scrollport and 1 when it leaves.
|
|
1251
|
+
* `"pinned"` holds at 1 while the scene covers the scrollport.
|
|
1252
|
+
*/
|
|
1253
|
+
type SceneRange = "through" | "pinned";
|
|
1254
|
+
/** Per-edge fade. A missing edge is off. */
|
|
1255
|
+
interface FadeEdgesConfig {
|
|
1256
|
+
top?: boolean;
|
|
1257
|
+
bottom?: boolean;
|
|
1258
|
+
left?: boolean;
|
|
1259
|
+
right?: boolean;
|
|
1260
|
+
}
|
|
1261
|
+
/** `0` → `1` on each axis. `0` when that axis does not overflow. */
|
|
1262
|
+
type ScrollProgress = {
|
|
1263
|
+
x: number;
|
|
1264
|
+
y: number;
|
|
585
1265
|
};
|
|
1266
|
+
/**
|
|
1267
|
+
* External store for a value that changes outside React render.
|
|
1268
|
+
* `get` is a live layout read: use it in effects and handlers, not during render.
|
|
1269
|
+
*/
|
|
1270
|
+
interface ProgressStore<T> {
|
|
1271
|
+
get(): T;
|
|
1272
|
+
subscribe(fn: (value: T) => void): () => void;
|
|
1273
|
+
}
|
|
1274
|
+
interface ScrollAreaProps extends BaseProps {
|
|
1275
|
+
/**
|
|
1276
|
+
* `max-height`. Caps the vertical scrollport.
|
|
1277
|
+
* Token, pixel number, or raw length. Responsive maps are resolved to breakpoint styles.
|
|
1278
|
+
*/
|
|
1279
|
+
maxHeight?: ResponsiveValue<string | number>;
|
|
1280
|
+
/**
|
|
1281
|
+
* `max-width`. Caps the horizontal scrollport.
|
|
1282
|
+
* Token, pixel number, or raw length. Responsive maps are resolved to breakpoint styles.
|
|
1283
|
+
*/
|
|
1284
|
+
maxWidth?: ResponsiveValue<string | number>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Which axis overflows.
|
|
1287
|
+
* @default "vertical"
|
|
1288
|
+
*/
|
|
1289
|
+
direction?: ScrollDirection;
|
|
1290
|
+
/**
|
|
1291
|
+
* When the scrollbar is shown. Scrolling is unaffected.
|
|
1292
|
+
* @default "auto"
|
|
1293
|
+
*/
|
|
1294
|
+
showScrollbar?: ScrollbarVisibility;
|
|
1295
|
+
/**
|
|
1296
|
+
* Scrollbar thickness.
|
|
1297
|
+
* @default "thin"
|
|
1298
|
+
*/
|
|
1299
|
+
scrollbarVariant?: ScrollbarVariant;
|
|
1300
|
+
/**
|
|
1301
|
+
* Edge fade on axes that still have room to scroll.
|
|
1302
|
+
* `true` fades every eligible edge. An object turns on specific edges.
|
|
1303
|
+
* A fade is omitted when that edge is already at the end, or the axis does not overflow.
|
|
1304
|
+
* @default false
|
|
1305
|
+
*/
|
|
1306
|
+
fadeEdges?: boolean | FadeEdgesConfig;
|
|
1307
|
+
/**
|
|
1308
|
+
* Length of the edge fade. Number is pixels.
|
|
1309
|
+
* @default "24px"
|
|
1310
|
+
*/
|
|
1311
|
+
fadeSize?: string | number;
|
|
1312
|
+
/**
|
|
1313
|
+
* `overscroll-behavior`. `"contain"` stops scroll chaining to the parent.
|
|
1314
|
+
* @default "contain"
|
|
1315
|
+
*/
|
|
1316
|
+
overscrollBehavior?: "auto" | "contain" | "none";
|
|
1317
|
+
/**
|
|
1318
|
+
* `scroll-snap-type`. `"none"` disables snapping.
|
|
1319
|
+
* With `"mandatory"`, drag-to-scroll settles on the nearest item on release.
|
|
1320
|
+
* @default "none"
|
|
1321
|
+
*/
|
|
1322
|
+
snap?: ScrollSnap;
|
|
1323
|
+
/**
|
|
1324
|
+
* `scroll-snap-align` used by snap targets and `scrollToIndex`.
|
|
1325
|
+
* @default "start"
|
|
1326
|
+
*/
|
|
1327
|
+
snapAlign?: ScrollSnapAlign;
|
|
1328
|
+
/**
|
|
1329
|
+
* Pointer-drag scrolling. Off by default so text selection still works.
|
|
1330
|
+
* @default false
|
|
1331
|
+
*/
|
|
1332
|
+
dragToScroll?: boolean;
|
|
1333
|
+
/** Native scroll event, after the area has recorded its position. */
|
|
1334
|
+
onScroll?: (e: UIEvent<HTMLElement>) => void;
|
|
1335
|
+
/**
|
|
1336
|
+
* Fires when a scroll gesture settles on an edge, within `endThreshold`.
|
|
1337
|
+
* The edge is the one that was reached (`"bottom"` for a vertical list at the end).
|
|
1338
|
+
*/
|
|
1339
|
+
onScrollEnd?: (edge: ScrollEdge) => void;
|
|
1340
|
+
/**
|
|
1341
|
+
* Distance from an edge, in pixels, that still counts as "at the edge".
|
|
1342
|
+
* @default 0
|
|
1343
|
+
*/
|
|
1344
|
+
endThreshold?: number;
|
|
1345
|
+
/**
|
|
1346
|
+
* Publish scroll progress for Scene and other consumers.
|
|
1347
|
+
* Off by default; progress reads are idle unless something subscribes.
|
|
1348
|
+
* @default false
|
|
1349
|
+
*/
|
|
1350
|
+
trackProgress?: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* Makes the scrollport focusable so it can be scrolled by keyboard.
|
|
1353
|
+
* Omit to use `0` while content overflows, and no tab stop when it does not.
|
|
1354
|
+
*/
|
|
1355
|
+
tabIndex?: number;
|
|
1356
|
+
/**
|
|
1357
|
+
* Element to render.
|
|
1358
|
+
* @default "div"
|
|
1359
|
+
*/
|
|
1360
|
+
as?: ElementType;
|
|
1361
|
+
}
|
|
1362
|
+
/** Options for `scrollNext` / `scrollPrev`. */
|
|
1363
|
+
interface ScrollStepOptions {
|
|
1364
|
+
/** Axis to step on. Defaults to the area's main axis (`"y"` unless `direction` is `"horizontal"`). */
|
|
1365
|
+
axis?: "x" | "y";
|
|
1366
|
+
/**
|
|
1367
|
+
* `"page"` moves by one client width/height.
|
|
1368
|
+
* `"item"` moves to the next snap target past the current offset.
|
|
1369
|
+
* @default "page"
|
|
1370
|
+
*/
|
|
1371
|
+
step?: "page" | "item";
|
|
1372
|
+
/** Native scroll behavior. `"auto"` if omitted. */
|
|
1373
|
+
behavior?: ScrollBehavior;
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Imperative handle. The ref is this handle, not the DOM node.
|
|
1377
|
+
* Use `getElement()` for the scrollport.
|
|
1378
|
+
*/
|
|
1379
|
+
interface ScrollAreaHandle {
|
|
1380
|
+
/** The scrollport element, or `null` before mount. */
|
|
1381
|
+
getElement: () => HTMLElement | null;
|
|
1382
|
+
/** Re-read overflow and edge state. */
|
|
1383
|
+
measure: () => void;
|
|
1384
|
+
/** Native `scrollTo`. */
|
|
1385
|
+
scrollTo: (opts: ScrollToOptions) => void;
|
|
1386
|
+
scrollToTop: (behavior?: ScrollBehavior) => void;
|
|
1387
|
+
scrollToBottom: (behavior?: ScrollBehavior) => void;
|
|
1388
|
+
/** Scroll so the given edge of the content meets the scrollport. */
|
|
1389
|
+
scrollToEdge: (edge: ScrollEdge, behavior?: ScrollBehavior) => void;
|
|
1390
|
+
/** Step forward by a page or to the next item. */
|
|
1391
|
+
scrollNext: (opts?: ScrollStepOptions) => void;
|
|
1392
|
+
/** Step backward by a page or to the previous item. */
|
|
1393
|
+
scrollPrev: (opts?: ScrollStepOptions) => void;
|
|
1394
|
+
/**
|
|
1395
|
+
* Scroll so the nth direct child aligns to `snapAlign`.
|
|
1396
|
+
* No-op if the index is out of range.
|
|
1397
|
+
*/
|
|
1398
|
+
scrollToIndex: (index: number, opts?: Omit<ScrollStepOptions, "step">) => void;
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Publishes its own travel through the scrollport as `--kui-scene-progress` (`0` → `1`),
|
|
1402
|
+
* inherited by every descendant.
|
|
1403
|
+
*/
|
|
1404
|
+
interface ScrollAreaSceneProps extends HTMLAttributes<HTMLElement> {
|
|
1405
|
+
/**
|
|
1406
|
+
* How progress is measured.
|
|
1407
|
+
* `"through"` runs `0` → `1` as the scene crosses the scrollport.
|
|
1408
|
+
* `"pinned"` stays at `1` while the scene covers it.
|
|
1409
|
+
*/
|
|
1410
|
+
range?: SceneRange;
|
|
1411
|
+
/** Axis to measure. Defaults to the ScrollArea's main axis. */
|
|
1412
|
+
axis?: "x" | "y";
|
|
1413
|
+
/**
|
|
1414
|
+
* Element to render.
|
|
1415
|
+
* @default "div"
|
|
1416
|
+
*/
|
|
1417
|
+
as?: ElementType;
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* `position: sticky` inside the ScrollArea.
|
|
1421
|
+
* With no offset, sticks to the start of the scroll axis: `top` when vertical,
|
|
1422
|
+
* `left` when horizontal, both when `direction` is `"both"`.
|
|
1423
|
+
* An explicit `top` / `right` / `bottom` / `left` wins.
|
|
1424
|
+
* Does nothing if an ancestor between this node and the ScrollArea has `overflow` other than `visible`.
|
|
1425
|
+
*/
|
|
1426
|
+
interface ScrollAreaStickyProps extends HTMLAttributes<HTMLElement> {
|
|
1427
|
+
/** Inset from the top edge while stuck. Number is pixels. */
|
|
1428
|
+
top?: number | string;
|
|
1429
|
+
/** Inset from the bottom edge while stuck. Number is pixels. */
|
|
1430
|
+
bottom?: number | string;
|
|
1431
|
+
/** Inset from the left edge while stuck. Number is pixels. */
|
|
1432
|
+
left?: number | string;
|
|
1433
|
+
/** Inset from the right edge while stuck. Number is pixels. */
|
|
1434
|
+
right?: number | string;
|
|
1435
|
+
/**
|
|
1436
|
+
* `z-index` while in the scrollport.
|
|
1437
|
+
* @default 1
|
|
1438
|
+
*/
|
|
1439
|
+
zIndex?: number;
|
|
1440
|
+
/** Called when the sticky node starts or stops being stuck. */
|
|
1441
|
+
onStuckChange?: (stuck: boolean) => void;
|
|
1442
|
+
/**
|
|
1443
|
+
* Element to render.
|
|
1444
|
+
* @default "div"
|
|
1445
|
+
*/
|
|
1446
|
+
as?: ElementType;
|
|
1447
|
+
}
|
|
586
1448
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
1449
|
+
declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & MotionGatedProps & react.RefAttributes<ScrollAreaHandle>> & {
|
|
1450
|
+
__kui: _splenddev_kreativ_core.KuiMeta<ScrollAreaProps & MotionGatedProps>;
|
|
1451
|
+
providerRequired?: _splenddev_kreativ_core.KuiProviderRequirement;
|
|
1452
|
+
} & {
|
|
1453
|
+
Scene: _splenddev_kreativ_core.KuiComponent<ScrollAreaSceneProps & MotionGatedProps, HTMLElement>;
|
|
1454
|
+
Sticky: _splenddev_kreativ_core.KuiComponent<ScrollAreaStickyProps, HTMLElement>;
|
|
591
1455
|
};
|
|
592
1456
|
|
|
593
|
-
|
|
1457
|
+
/** Container progress. Subscribe-based, so it never re-renders anything by itself. */
|
|
1458
|
+
declare function useScrollProgress(): ProgressStore<ScrollProgress>;
|
|
1459
|
+
interface ScrollSceneOptions {
|
|
1460
|
+
range?: SceneRange;
|
|
1461
|
+
axis?: "x" | "y";
|
|
1462
|
+
}
|
|
1463
|
+
/** Progress of an element through the surrounding ScrollArea's viewport. */
|
|
1464
|
+
declare function useElementScrollProgress(ref: RefObject<HTMLElement | null>, { range, axis }?: ScrollSceneOptions): ProgressStore<number>;
|
|
1465
|
+
|
|
1466
|
+
interface BoxProps extends BaseProps {
|
|
1467
|
+
/**
|
|
1468
|
+
* Element to render.
|
|
1469
|
+
* @default "div"
|
|
1470
|
+
*/
|
|
1471
|
+
as?: ElementType;
|
|
1472
|
+
/** Padding. Token, pixel number, or raw length. */
|
|
1473
|
+
p?: ResponsiveValue<SpaceValue>;
|
|
1474
|
+
/** Padding on the inline axis. Overrides `p`. */
|
|
1475
|
+
px?: ResponsiveValue<SpaceValue>;
|
|
1476
|
+
/** Padding on the block axis. Overrides `p`. */
|
|
1477
|
+
py?: ResponsiveValue<SpaceValue>;
|
|
1478
|
+
/** Margin. `"auto"` centers on that axis. */
|
|
1479
|
+
m?: ResponsiveValue<SpaceValue | "auto">;
|
|
1480
|
+
/** Margin on the inline axis. Overrides `m`. */
|
|
1481
|
+
mx?: ResponsiveValue<SpaceValue | "auto">;
|
|
1482
|
+
/** Margin on the block axis. Overrides `m`. */
|
|
1483
|
+
my?: ResponsiveValue<SpaceValue | "auto">;
|
|
1484
|
+
/** Background. Token or raw CSS color. */
|
|
1485
|
+
bg?: ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
1486
|
+
/** Foreground. Token or raw CSS color. */
|
|
1487
|
+
color?: ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Border. `true` is a 1px solid line in the default border color.
|
|
1490
|
+
* A color paints that line in the given color.
|
|
1491
|
+
* @default false
|
|
1492
|
+
*/
|
|
1493
|
+
border?: boolean | ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
1494
|
+
/** Corner radius. */
|
|
1495
|
+
rounded?: ResponsiveValue<RadiusValue>;
|
|
1496
|
+
/** Width. `"full"` is 100%, `"fit"` is max-content. */
|
|
1497
|
+
w?: ResponsiveValue<SpaceValue | "auto" | "full" | "fit">;
|
|
1498
|
+
/** Height. `"full"` is 100%, `"fit"` is max-content. */
|
|
1499
|
+
h?: ResponsiveValue<SpaceValue | "auto" | "full" | "fit">;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
declare const Box: _splenddev_kreativ_core.KuiComponent<BoxProps, HTMLDivElement>;
|
|
594
1503
|
|
|
595
1504
|
/**
|
|
596
1505
|
* Represents the visual state of the field for feedback and styling.
|
|
@@ -728,10 +1637,12 @@ interface UIProviderProps {
|
|
|
728
1637
|
defaultMode?: ColorMode;
|
|
729
1638
|
as?: keyof JSX.IntrinsicElements;
|
|
730
1639
|
fallbackSize?: string;
|
|
731
|
-
|
|
732
|
-
|
|
1640
|
+
background?: string;
|
|
1641
|
+
textColor?: string;
|
|
1642
|
+
className?: string;
|
|
1643
|
+
style?: React.CSSProperties;
|
|
733
1644
|
}
|
|
734
|
-
declare function
|
|
1645
|
+
declare function KreativUIProvider({ children, theme: themeOverride, defaultMode, as, fallbackSize, textColor, background, style, className, }: UIProviderProps): JSX.Element;
|
|
735
1646
|
|
|
736
1647
|
declare function useFloatingSide(triggerRef: RefObject<HTMLElement | null>, open: boolean): {
|
|
737
1648
|
contentRef: RefObject<HTMLDivElement | null>;
|
|
@@ -739,7 +1650,9 @@ declare function useFloatingSide(triggerRef: RefObject<HTMLElement | null>, open
|
|
|
739
1650
|
};
|
|
740
1651
|
|
|
741
1652
|
type TransitionStatus = Exclude<FormFieldStatus, "none"> | undefined;
|
|
742
|
-
declare function useStatusTransition(status: FormFieldStatus
|
|
1653
|
+
declare function useStatusTransition(status: FormFieldStatus, options?: {
|
|
1654
|
+
enabled?: boolean;
|
|
1655
|
+
}): TransitionStatus;
|
|
743
1656
|
|
|
744
1657
|
type ClearableFieldOptions = {
|
|
745
1658
|
onClear?: () => void;
|
|
@@ -776,8 +1689,6 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
776
1689
|
declare function rgbToHex(value: string): string;
|
|
777
1690
|
declare function hexToRgbString(hex: string): string | null;
|
|
778
1691
|
|
|
779
|
-
declare function defineRecipe<T extends RecipeDefinition>(recipe: T): T;
|
|
780
|
-
|
|
781
1692
|
/**
|
|
782
1693
|
* Overrides a single component's recipe against the built-in default
|
|
783
1694
|
* for that component. For overriding just one recipe inline, without
|
|
@@ -793,66 +1704,11 @@ declare function extendRecipes(override?: DeepPartial<RecipeCollection>): Recipe
|
|
|
793
1704
|
|
|
794
1705
|
declare function getRecipeNames(): (keyof DefaultRecipeCollection)[];
|
|
795
1706
|
|
|
796
|
-
declare function defineTypography<T extends Typography>(typography: T): T;
|
|
797
|
-
|
|
798
1707
|
declare function extendTypography(override?: ThemeOverride$1["typography"]): Typography;
|
|
799
1708
|
|
|
800
|
-
declare function defineToken<T extends TokenValue>(value: T): {
|
|
801
|
-
value: T;
|
|
802
|
-
};
|
|
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;
|
|
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
1709
|
declare function extendTokens(override?: ThemeOverride$1["tokens"]): DesignTokens;
|
|
821
1710
|
declare function extendSemanticTokens(override?: ThemeOverride$1["semanticTokens"]): SemanticTokens;
|
|
822
1711
|
|
|
823
1712
|
declare function extendTheme(override?: ThemeOverride$1): Theme;
|
|
824
1713
|
|
|
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;
|
|
857
|
-
|
|
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 };
|
|
1714
|
+
export { Adornment, type AdornmentProps, type BaseInputExtraAdornmentContext, type BaseInputProps, Box, type BoxProps, 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 CardMediaBlend, type CardMediaFit, type CardMediaProps, CardOverlay, type CardOverlayGradient, type CardOverlayGradientEdge, type CardOverlayProps, type CardOverlayRadialGradient, type CardProps, type CardSize, type CardVariant, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, type ComponentKey, type ComponentPropsMap, Container, type ContainerProps, type CustomFieldRenderer, type FadeEdgesConfig, Flex, type FlexProps, Form, type FormContextValue, type FormControlProps, type FormErrors, FormField, FormFieldControl, FormFieldDescription, type FormFieldDescriptionProps, FormFieldLabel, type FormFieldLabelProps, FormFieldMessage, type FormFieldMessageProps, type FormFieldProps$1 as FormFieldProps, type FormFieldRootProps, FormResetButton, type FormResetButtonProps, type FormRootProps, FormSubmitButton, type FormSubmitButtonProps, type FormValues, Grid, type GridProps, Input, InputField, type InputFieldProps, type InputKind, type InputKindDefaults, type InputProps, type InputSize, type InputVariant, KreativUIProvider, type KuiFormControlComponent, type ManualValidator, MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorTabs, MultiSelect, MultiSelectContent, MultiSelectItem, type MultiSelectItemProps, type MultiSelectProps, MultiSelectTrigger, type PasswordInputKindDefaults, type PasswordInputProps, type PasswordKind, type ProgressStore, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, type RadiusValue, type SceneRange, type SchemaLike, ScrollArea, type ScrollAreaHandle, type ScrollAreaProps, type ScrollAreaSceneProps, type ScrollAreaStickyProps, type ScrollDirection, type ScrollEdge, type ScrollProgress, type ScrollSnap, type ScrollSnapAlign, type ScrollStepOptions, type ScrollbarVariant, type ScrollbarVisibility, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SingleFormControlComponent, type SpaceToken, type SpaceValue, 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, type UIArraySchema, type UIArraySchemaFor, type UIFieldSchema, type UIFieldSchemaFor, type UIFieldSchemaRender, type UIObjectSchema, type UIObjectSchemaFor, type UIObjectSchemaForShape, type UIProviderProps, type UISchema, type ValuePropConvention, cn, defineUIField, extendRecipe, extendRecipes, extendSemanticTokens, extendTheme, extendTokens, extendTypography, getRecipeNames, hexToRgbString, rgbToHex, useButtonGroupContext, useButtonGroupItemContext, useClearableField, useElementScrollProgress, useFloatingSide, useFormContext, useKeyboardShortcuts, useOptionalButtonGroupContext, useOptionalButtonGroupItemContext, useScrollProgress, useStatusTransition };
|