@zuzjs/ui 1.0.44 → 1.0.46
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/bin.cjs +4 -4
- package/dist/bin.js +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +47 -48
- package/dist/index.d.ts +47 -48
- package/dist/index.js +7 -7
- package/package.json +3 -3
- /package/dist/{chunk-AQS4AW4P.js → chunk-GB67P3F3.js} +0 -0
- /package/dist/{chunk-ABY4WJNX.cjs → chunk-VPTE2LT2.cjs} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX,
|
|
3
|
-
import * as _zuzjs_hooks from '@zuzjs/hooks';
|
|
2
|
+
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX, ComponentPropsWithRef } from 'react';
|
|
4
3
|
import { DragOptions, LineChartProps, MediaItem, useMediaPlayer, ScrollBreakpoint, Command } from '@zuzjs/hooks';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
import { PubSub } from '@zuzjs/core';
|
|
@@ -584,12 +583,12 @@ interface CheckboxHandler {
|
|
|
584
583
|
toggle: (triggerChange?: boolean) => void;
|
|
585
584
|
}
|
|
586
585
|
|
|
587
|
-
declare const CheckBox:
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
586
|
+
declare const CheckBox: {
|
|
587
|
+
({ ref, ...props }: CheckBoxProps & {
|
|
588
|
+
ref?: Ref<CheckboxHandler>;
|
|
589
|
+
}): react_jsx_runtime.JSX.Element;
|
|
590
|
+
displayName: string;
|
|
591
|
+
};
|
|
593
592
|
|
|
594
593
|
interface CodeBlockProps extends ZuzProps {
|
|
595
594
|
ref?: Ref<HTMLPreElement>;
|
|
@@ -975,7 +974,15 @@ declare const Sheet: react.ForwardRefExoticComponent<ZuzProps & {
|
|
|
975
974
|
onHide?: () => void;
|
|
976
975
|
} & react.RefAttributes<SheetHandler>>;
|
|
977
976
|
|
|
977
|
+
type ValidationSchema = Record<string, (value: any, allValues: dynamic) => string | null | boolean>;
|
|
978
|
+
type ValidationResult = {
|
|
979
|
+
[key: string]: {
|
|
980
|
+
valid: boolean;
|
|
981
|
+
value: string;
|
|
982
|
+
};
|
|
983
|
+
};
|
|
978
984
|
type FormProps = Omit<BoxProps, `ref`> & {
|
|
985
|
+
schema?: ValidationSchema;
|
|
979
986
|
/** Name of form, will be appended to --form-{name} in className
|
|
980
987
|
* whitespace will be replaced with dash (-)
|
|
981
988
|
*/
|
|
@@ -989,13 +996,13 @@ type FormProps = Omit<BoxProps, `ref`> & {
|
|
|
989
996
|
/** Additional data to include with form submission */
|
|
990
997
|
withData?: dynamic;
|
|
991
998
|
/** Handler function called before form submission with validated form data */
|
|
992
|
-
beforeSubmit?: (data: FormData | dynamic) => void;
|
|
999
|
+
beforeSubmit?: (data: FormData | dynamic, validationResult: ValidationResult) => void;
|
|
993
1000
|
/** Handler function called on form submission with validated form data */
|
|
994
|
-
onSubmit?: (data: FormData | dynamic) => void;
|
|
1001
|
+
onSubmit?: (data: FormData | dynamic, validationResult: ValidationResult) => void;
|
|
995
1002
|
/** Callback triggered upon successful form submission */
|
|
996
1003
|
onSuccess?: (data: dynamic) => void;
|
|
997
1004
|
/** Callback triggered when form submission encounters an error */
|
|
998
|
-
onError?: (error: any) => void;
|
|
1005
|
+
onError?: (error: any, validationResult: ValidationResult) => void;
|
|
999
1006
|
/** Cover properties to display loading or processing message */
|
|
1000
1007
|
cover?: {
|
|
1001
1008
|
/** Background color of the loading cover */
|
|
@@ -1018,17 +1025,8 @@ interface FormHandler {
|
|
|
1018
1025
|
submit: () => void;
|
|
1019
1026
|
}
|
|
1020
1027
|
|
|
1021
|
-
/**
|
|
1022
|
-
* {@link Form} is a controlled component designed to handle form data submission, validation, and display of loading or error states.
|
|
1023
|
-
* It allows for optional server-side submission through an action endpoint and customizable success/error handling callbacks.
|
|
1024
|
-
*
|
|
1025
|
-
* The component also provides an interface for controlling loading and error states from a parent component using {@link FormHandler}.
|
|
1026
|
-
*
|
|
1027
|
-
* @param props - Properties to configure form behavior, validation messages, submission handling, and visual feedback.
|
|
1028
|
-
* @param ref - Reference to the {@link FormHandler} interface, exposing methods to control loading and error states from the parent.
|
|
1029
|
-
*/
|
|
1030
1028
|
declare const Form: {
|
|
1031
|
-
(
|
|
1029
|
+
(props: FormProps & {
|
|
1032
1030
|
ref?: Ref<FormHandler>;
|
|
1033
1031
|
}): react_jsx_runtime.JSX.Element;
|
|
1034
1032
|
displayName: string;
|
|
@@ -1510,12 +1508,12 @@ declare const Spinner: {
|
|
|
1510
1508
|
displayName: string;
|
|
1511
1509
|
};
|
|
1512
1510
|
|
|
1513
|
-
declare const Switch:
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
}
|
|
1511
|
+
declare const Switch: {
|
|
1512
|
+
({ ref, ...props }: CheckBoxProps & {
|
|
1513
|
+
ref?: Ref<CheckboxHandler>;
|
|
1514
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1515
|
+
displayName: string;
|
|
1516
|
+
};
|
|
1519
1517
|
|
|
1520
1518
|
interface TableController {
|
|
1521
1519
|
setLoading: (mod: boolean) => void;
|
|
@@ -1820,30 +1818,24 @@ declare const Terminal: ({ ref, commands, onCommand, welcomeMessage, prompt, var
|
|
|
1820
1818
|
ref?: Ref<TerminalHandler>;
|
|
1821
1819
|
}) => react_jsx_runtime.JSX.Element;
|
|
1822
1820
|
|
|
1823
|
-
|
|
1821
|
+
type TextFxVariant = 'bounce' | 'wave' | 'slide' | 'fade' | 'glitch' | `glitch-v2` | 'typewriter' | `fog` | `pop` | `reveal` | `shuffle`;
|
|
1822
|
+
type TextProps = Props<`h1` | `h2` | `h3` | `h4` | `h5` | `h6` | `p` | `span` | `div` | `label`> & {
|
|
1823
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
1824
1824
|
h?: number;
|
|
1825
1825
|
html?: ReactNode | string;
|
|
1826
1826
|
lines?: number;
|
|
1827
|
-
|
|
1827
|
+
tfx?: TextFxVariant;
|
|
1828
|
+
duration?: number;
|
|
1829
|
+
stagger?: number;
|
|
1830
|
+
repeat?: boolean;
|
|
1831
|
+
reveal?: boolean;
|
|
1832
|
+
hover?: boolean;
|
|
1833
|
+
};
|
|
1828
1834
|
|
|
1829
|
-
declare const
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
variant?: ValueOf<typeof Variant>;
|
|
1834
|
-
command?: string;
|
|
1835
|
-
commands?: _zuzjs_hooks.Command[];
|
|
1836
|
-
cmd?: (value: string, textarea: HTMLTextAreaElement | HTMLInputElement) => void;
|
|
1837
|
-
renderDropdown?: (props: {
|
|
1838
|
-
show: boolean;
|
|
1839
|
-
position: {
|
|
1840
|
-
top: number;
|
|
1841
|
-
left: number;
|
|
1842
|
-
};
|
|
1843
|
-
commands: _zuzjs_hooks.Command[];
|
|
1844
|
-
onSelect: (value: string) => void;
|
|
1845
|
-
}) => React.ReactNode;
|
|
1846
|
-
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1835
|
+
declare const Text: {
|
|
1836
|
+
({ ref, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
1837
|
+
displayName: string;
|
|
1838
|
+
};
|
|
1847
1839
|
|
|
1848
1840
|
type TextAreaProps = Props<`textarea`> & {
|
|
1849
1841
|
autoResize?: boolean;
|
|
@@ -1864,6 +1856,13 @@ type TextAreaProps = Props<`textarea`> & {
|
|
|
1864
1856
|
}) => React.ReactNode;
|
|
1865
1857
|
};
|
|
1866
1858
|
|
|
1859
|
+
declare const TextArea: {
|
|
1860
|
+
({ ref, ...props }: TextAreaProps & {
|
|
1861
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
1862
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1863
|
+
displayName: string;
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1867
1866
|
type TextWheelProps = Omit<BoxProps, "name"> & {
|
|
1868
1867
|
value?: number | string;
|
|
1869
1868
|
color?: string;
|
|
@@ -2129,4 +2128,4 @@ declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, sta
|
|
|
2129
2128
|
};
|
|
2130
2129
|
declare const getAnimationTransition: (transition: ValueOf<typeof TRANSITIONS>, to?: boolean, from?: boolean) => dynamic;
|
|
2131
2130
|
|
|
2132
|
-
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|
|
2131
|
+
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type ValidationResult, type ValidationSchema, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX,
|
|
3
|
-
import * as _zuzjs_hooks from '@zuzjs/hooks';
|
|
2
|
+
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX, ComponentPropsWithRef } from 'react';
|
|
4
3
|
import { DragOptions, LineChartProps, MediaItem, useMediaPlayer, ScrollBreakpoint, Command } from '@zuzjs/hooks';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
import { PubSub } from '@zuzjs/core';
|
|
@@ -584,12 +583,12 @@ interface CheckboxHandler {
|
|
|
584
583
|
toggle: (triggerChange?: boolean) => void;
|
|
585
584
|
}
|
|
586
585
|
|
|
587
|
-
declare const CheckBox:
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
586
|
+
declare const CheckBox: {
|
|
587
|
+
({ ref, ...props }: CheckBoxProps & {
|
|
588
|
+
ref?: Ref<CheckboxHandler>;
|
|
589
|
+
}): react_jsx_runtime.JSX.Element;
|
|
590
|
+
displayName: string;
|
|
591
|
+
};
|
|
593
592
|
|
|
594
593
|
interface CodeBlockProps extends ZuzProps {
|
|
595
594
|
ref?: Ref<HTMLPreElement>;
|
|
@@ -975,7 +974,15 @@ declare const Sheet: react.ForwardRefExoticComponent<ZuzProps & {
|
|
|
975
974
|
onHide?: () => void;
|
|
976
975
|
} & react.RefAttributes<SheetHandler>>;
|
|
977
976
|
|
|
977
|
+
type ValidationSchema = Record<string, (value: any, allValues: dynamic) => string | null | boolean>;
|
|
978
|
+
type ValidationResult = {
|
|
979
|
+
[key: string]: {
|
|
980
|
+
valid: boolean;
|
|
981
|
+
value: string;
|
|
982
|
+
};
|
|
983
|
+
};
|
|
978
984
|
type FormProps = Omit<BoxProps, `ref`> & {
|
|
985
|
+
schema?: ValidationSchema;
|
|
979
986
|
/** Name of form, will be appended to --form-{name} in className
|
|
980
987
|
* whitespace will be replaced with dash (-)
|
|
981
988
|
*/
|
|
@@ -989,13 +996,13 @@ type FormProps = Omit<BoxProps, `ref`> & {
|
|
|
989
996
|
/** Additional data to include with form submission */
|
|
990
997
|
withData?: dynamic;
|
|
991
998
|
/** Handler function called before form submission with validated form data */
|
|
992
|
-
beforeSubmit?: (data: FormData | dynamic) => void;
|
|
999
|
+
beforeSubmit?: (data: FormData | dynamic, validationResult: ValidationResult) => void;
|
|
993
1000
|
/** Handler function called on form submission with validated form data */
|
|
994
|
-
onSubmit?: (data: FormData | dynamic) => void;
|
|
1001
|
+
onSubmit?: (data: FormData | dynamic, validationResult: ValidationResult) => void;
|
|
995
1002
|
/** Callback triggered upon successful form submission */
|
|
996
1003
|
onSuccess?: (data: dynamic) => void;
|
|
997
1004
|
/** Callback triggered when form submission encounters an error */
|
|
998
|
-
onError?: (error: any) => void;
|
|
1005
|
+
onError?: (error: any, validationResult: ValidationResult) => void;
|
|
999
1006
|
/** Cover properties to display loading or processing message */
|
|
1000
1007
|
cover?: {
|
|
1001
1008
|
/** Background color of the loading cover */
|
|
@@ -1018,17 +1025,8 @@ interface FormHandler {
|
|
|
1018
1025
|
submit: () => void;
|
|
1019
1026
|
}
|
|
1020
1027
|
|
|
1021
|
-
/**
|
|
1022
|
-
* {@link Form} is a controlled component designed to handle form data submission, validation, and display of loading or error states.
|
|
1023
|
-
* It allows for optional server-side submission through an action endpoint and customizable success/error handling callbacks.
|
|
1024
|
-
*
|
|
1025
|
-
* The component also provides an interface for controlling loading and error states from a parent component using {@link FormHandler}.
|
|
1026
|
-
*
|
|
1027
|
-
* @param props - Properties to configure form behavior, validation messages, submission handling, and visual feedback.
|
|
1028
|
-
* @param ref - Reference to the {@link FormHandler} interface, exposing methods to control loading and error states from the parent.
|
|
1029
|
-
*/
|
|
1030
1028
|
declare const Form: {
|
|
1031
|
-
(
|
|
1029
|
+
(props: FormProps & {
|
|
1032
1030
|
ref?: Ref<FormHandler>;
|
|
1033
1031
|
}): react_jsx_runtime.JSX.Element;
|
|
1034
1032
|
displayName: string;
|
|
@@ -1510,12 +1508,12 @@ declare const Spinner: {
|
|
|
1510
1508
|
displayName: string;
|
|
1511
1509
|
};
|
|
1512
1510
|
|
|
1513
|
-
declare const Switch:
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
}
|
|
1511
|
+
declare const Switch: {
|
|
1512
|
+
({ ref, ...props }: CheckBoxProps & {
|
|
1513
|
+
ref?: Ref<CheckboxHandler>;
|
|
1514
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1515
|
+
displayName: string;
|
|
1516
|
+
};
|
|
1519
1517
|
|
|
1520
1518
|
interface TableController {
|
|
1521
1519
|
setLoading: (mod: boolean) => void;
|
|
@@ -1820,30 +1818,24 @@ declare const Terminal: ({ ref, commands, onCommand, welcomeMessage, prompt, var
|
|
|
1820
1818
|
ref?: Ref<TerminalHandler>;
|
|
1821
1819
|
}) => react_jsx_runtime.JSX.Element;
|
|
1822
1820
|
|
|
1823
|
-
|
|
1821
|
+
type TextFxVariant = 'bounce' | 'wave' | 'slide' | 'fade' | 'glitch' | `glitch-v2` | 'typewriter' | `fog` | `pop` | `reveal` | `shuffle`;
|
|
1822
|
+
type TextProps = Props<`h1` | `h2` | `h3` | `h4` | `h5` | `h6` | `p` | `span` | `div` | `label`> & {
|
|
1823
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
1824
1824
|
h?: number;
|
|
1825
1825
|
html?: ReactNode | string;
|
|
1826
1826
|
lines?: number;
|
|
1827
|
-
|
|
1827
|
+
tfx?: TextFxVariant;
|
|
1828
|
+
duration?: number;
|
|
1829
|
+
stagger?: number;
|
|
1830
|
+
repeat?: boolean;
|
|
1831
|
+
reveal?: boolean;
|
|
1832
|
+
hover?: boolean;
|
|
1833
|
+
};
|
|
1828
1834
|
|
|
1829
|
-
declare const
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
variant?: ValueOf<typeof Variant>;
|
|
1834
|
-
command?: string;
|
|
1835
|
-
commands?: _zuzjs_hooks.Command[];
|
|
1836
|
-
cmd?: (value: string, textarea: HTMLTextAreaElement | HTMLInputElement) => void;
|
|
1837
|
-
renderDropdown?: (props: {
|
|
1838
|
-
show: boolean;
|
|
1839
|
-
position: {
|
|
1840
|
-
top: number;
|
|
1841
|
-
left: number;
|
|
1842
|
-
};
|
|
1843
|
-
commands: _zuzjs_hooks.Command[];
|
|
1844
|
-
onSelect: (value: string) => void;
|
|
1845
|
-
}) => React.ReactNode;
|
|
1846
|
-
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1835
|
+
declare const Text: {
|
|
1836
|
+
({ ref, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
1837
|
+
displayName: string;
|
|
1838
|
+
};
|
|
1847
1839
|
|
|
1848
1840
|
type TextAreaProps = Props<`textarea`> & {
|
|
1849
1841
|
autoResize?: boolean;
|
|
@@ -1864,6 +1856,13 @@ type TextAreaProps = Props<`textarea`> & {
|
|
|
1864
1856
|
}) => React.ReactNode;
|
|
1865
1857
|
};
|
|
1866
1858
|
|
|
1859
|
+
declare const TextArea: {
|
|
1860
|
+
({ ref, ...props }: TextAreaProps & {
|
|
1861
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
1862
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1863
|
+
displayName: string;
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1867
1866
|
type TextWheelProps = Omit<BoxProps, "name"> & {
|
|
1868
1867
|
value?: number | string;
|
|
1869
1868
|
color?: string;
|
|
@@ -2129,4 +2128,4 @@ declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, sta
|
|
|
2129
2128
|
};
|
|
2130
2129
|
declare const getAnimationTransition: (transition: ValueOf<typeof TRANSITIONS>, to?: boolean, from?: boolean) => dynamic;
|
|
2131
2130
|
|
|
2132
|
-
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|
|
2131
|
+
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type ValidationResult, type ValidationSchema, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|