@me1a/ui 2.2.1 → 2.2.3
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/accordion/index.d.mts +94 -0
- package/dist/accordion/index.mjs +2 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/avatar/index.d.mts +34 -0
- package/dist/avatar/index.mjs +2 -0
- package/dist/avatar/index.mjs.map +1 -0
- package/dist/badge/index.d.mts +41 -0
- package/dist/badge/index.mjs +2 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/box/index.d.mts +50 -0
- package/dist/box/index.mjs +2 -0
- package/dist/box/index.mjs.map +1 -0
- package/dist/breadcrumb/index.d.mts +35 -0
- package/dist/breadcrumb/index.mjs +2 -0
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/{tooltip-B4jzaurK.d.mts → button/index.d.mts} +3 -25
- package/dist/button/index.mjs +2 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/card/index.d.mts +127 -0
- package/dist/card/index.mjs +2 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/checkbox/index.d.mts +21 -0
- package/dist/checkbox/index.mjs +2 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/collapsible/index.d.mts +26 -0
- package/dist/collapsible/index.mjs +2 -0
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/command/index.d.mts +122 -0
- package/dist/command/index.mjs +2 -0
- package/dist/command/index.mjs.map +1 -0
- package/dist/container/index.d.mts +33 -0
- package/dist/container/index.mjs +2 -0
- package/dist/container/index.mjs.map +1 -0
- package/dist/dialog/index.d.mts +35 -0
- package/dist/dialog/index.mjs +2 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/drawer/index.d.mts +63 -0
- package/dist/drawer/index.mjs +2 -0
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/dropdown-menu/index.d.mts +335 -0
- package/dist/dropdown-menu/index.mjs +2 -0
- package/dist/dropdown-menu/index.mjs.map +1 -0
- package/dist/form/index.d.mts +96 -0
- package/dist/form/index.mjs +2 -0
- package/dist/form/index.mjs.map +1 -0
- package/dist/{hooks.d.mts → hooks/index.d.mts} +10 -4
- package/dist/hooks/index.mjs +2 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.d.mts +2739 -30
- package/dist/index.mjs +47 -0
- package/dist/{index.esm.js.map → index.mjs.map} +1 -1
- package/dist/input/index.d.mts +12 -0
- package/dist/input/index.mjs +2 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/label/index.d.mts +18 -0
- package/dist/label/index.mjs +2 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/navigation-menu/index.d.mts +104 -0
- package/dist/navigation-menu/index.mjs +2 -0
- package/dist/navigation-menu/index.mjs.map +1 -0
- package/dist/page-loader/index.d.mts +29 -0
- package/dist/page-loader/index.mjs +2 -0
- package/dist/page-loader/index.mjs.map +1 -0
- package/dist/pagination/index.d.mts +105 -0
- package/dist/pagination/index.mjs +2 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/popover/index.d.mts +30 -0
- package/dist/popover/index.mjs +2 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/{checkbox-DxgDKaHx.d.mts → radio-group/index.d.mts} +5 -51
- package/dist/radio-group/index.mjs +2 -0
- package/dist/radio-group/index.mjs.map +1 -0
- package/dist/resizable/index.d.mts +53 -0
- package/dist/resizable/index.mjs +2 -0
- package/dist/resizable/index.mjs.map +1 -0
- package/dist/rhf-checkbox/index.d.mts +57 -0
- package/dist/rhf-checkbox/index.mjs +2 -0
- package/dist/rhf-checkbox/index.mjs.map +1 -0
- package/dist/rhf-multi-select/index.d.mts +84 -0
- package/dist/rhf-multi-select/index.mjs +2 -0
- package/dist/rhf-multi-select/index.mjs.map +1 -0
- package/dist/rhf-radio-button-group/index.d.mts +73 -0
- package/dist/rhf-radio-button-group/index.mjs +2 -0
- package/dist/rhf-radio-button-group/index.mjs.map +1 -0
- package/dist/rhf-radio-group/index.d.mts +103 -0
- package/dist/rhf-radio-group/index.mjs +2 -0
- package/dist/rhf-radio-group/index.mjs.map +1 -0
- package/dist/rhf-select/index.d.mts +80 -0
- package/dist/rhf-select/index.mjs +2 -0
- package/dist/rhf-select/index.mjs.map +1 -0
- package/dist/rhf-switch/index.d.mts +57 -0
- package/dist/rhf-switch/index.mjs +2 -0
- package/dist/rhf-switch/index.mjs.map +1 -0
- package/dist/rhf-textarea/index.d.mts +66 -0
- package/dist/rhf-textarea/index.mjs +2 -0
- package/dist/rhf-textarea/index.mjs.map +1 -0
- package/dist/separator/index.d.mts +13 -0
- package/dist/separator/index.mjs +2 -0
- package/dist/separator/index.mjs.map +1 -0
- package/dist/sheet/index.d.mts +42 -0
- package/dist/sheet/index.mjs +2 -0
- package/dist/sheet/index.mjs.map +1 -0
- package/dist/sidebar/index.d.mts +328 -0
- package/dist/sidebar/index.mjs +2 -0
- package/dist/sidebar/index.mjs.map +1 -0
- package/dist/skeleton/index.d.mts +17 -0
- package/dist/skeleton/index.mjs +2 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/stack/index.d.mts +121 -0
- package/dist/stack/index.mjs +2 -0
- package/dist/stack/index.mjs.map +1 -0
- package/dist/switch/index.d.mts +21 -0
- package/dist/switch/index.mjs +2 -0
- package/dist/switch/index.mjs.map +1 -0
- package/dist/table/index.d.mts +53 -0
- package/dist/table/index.mjs +2 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/tabs/index.d.mts +97 -0
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/text-field/index.d.mts +65 -0
- package/dist/text-field/index.mjs +2 -0
- package/dist/text-field/index.mjs.map +1 -0
- package/dist/textarea/index.d.mts +24 -0
- package/dist/textarea/index.mjs +2 -0
- package/dist/textarea/index.mjs.map +1 -0
- package/dist/{toast-2xT7L1tJ.d.mts → toast/index.d.mts} +3 -3
- package/dist/toast/index.mjs +2 -0
- package/dist/toast/index.mjs.map +1 -0
- package/dist/toaster/index.d.mts +26 -0
- package/dist/toaster/index.mjs +2 -0
- package/dist/toaster/index.mjs.map +1 -0
- package/dist/tooltip/index.d.mts +25 -0
- package/dist/tooltip/index.mjs +2 -0
- package/dist/tooltip/index.mjs.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/{index.cjs.js.map → types/index.mjs.map} +1 -1
- package/dist/typography/index.d.mts +24 -0
- package/dist/typography/index.mjs +2 -0
- package/dist/typography/index.mjs.map +1 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +199 -34
- package/dist/atoms.cjs.js +0 -2
- package/dist/atoms.cjs.js.map +0 -1
- package/dist/atoms.d.mts +0 -1051
- package/dist/atoms.d.ts +0 -1051
- package/dist/atoms.esm.js +0 -2
- package/dist/atoms.esm.js.map +0 -1
- package/dist/checkbox-DxgDKaHx.d.ts +0 -108
- package/dist/chunk-23T2PH5G.esm.js +0 -2
- package/dist/chunk-23T2PH5G.esm.js.map +0 -1
- package/dist/chunk-2QG3QTSW.cjs.js +0 -2
- package/dist/chunk-2QG3QTSW.cjs.js.map +0 -1
- package/dist/chunk-C26U3FL4.esm.js +0 -2
- package/dist/chunk-C26U3FL4.esm.js.map +0 -1
- package/dist/chunk-DTM5LZHM.cjs.js +0 -2
- package/dist/chunk-DTM5LZHM.cjs.js.map +0 -1
- package/dist/chunk-HW32JE75.cjs.js +0 -2
- package/dist/chunk-HW32JE75.cjs.js.map +0 -1
- package/dist/chunk-JIRS6MWF.cjs.js +0 -2
- package/dist/chunk-JIRS6MWF.cjs.js.map +0 -1
- package/dist/chunk-JKTYFZ5M.esm.js +0 -2
- package/dist/chunk-JKTYFZ5M.esm.js.map +0 -1
- package/dist/chunk-JUZG25DH.esm.js +0 -2
- package/dist/chunk-JUZG25DH.esm.js.map +0 -1
- package/dist/chunk-KOYJODOP.cjs.js +0 -2
- package/dist/chunk-KOYJODOP.cjs.js.map +0 -1
- package/dist/chunk-M4S5YZ56.esm.js +0 -2
- package/dist/chunk-M4S5YZ56.esm.js.map +0 -1
- package/dist/chunk-MOYOCJW6.esm.js +0 -2
- package/dist/chunk-MOYOCJW6.esm.js.map +0 -1
- package/dist/chunk-MVWMLXLL.cjs.js +0 -2
- package/dist/chunk-MVWMLXLL.cjs.js.map +0 -1
- package/dist/chunk-SL2ZUI4G.cjs.js +0 -2
- package/dist/chunk-SL2ZUI4G.cjs.js.map +0 -1
- package/dist/chunk-STRDPP3B.esm.js +0 -2
- package/dist/chunk-STRDPP3B.esm.js.map +0 -1
- package/dist/chunk-U4NMIMU7.esm.js +0 -2
- package/dist/chunk-U4NMIMU7.esm.js.map +0 -1
- package/dist/chunk-UK47BFA3.cjs.js +0 -2
- package/dist/chunk-UK47BFA3.cjs.js.map +0 -1
- package/dist/chunk-UTVXFZLD.esm.js +0 -2
- package/dist/chunk-UTVXFZLD.esm.js.map +0 -1
- package/dist/chunk-WJNYKJP6.cjs.js +0 -2
- package/dist/chunk-WJNYKJP6.cjs.js.map +0 -1
- package/dist/chunk-YEZB7AOJ.esm.js +0 -2
- package/dist/chunk-YEZB7AOJ.esm.js.map +0 -1
- package/dist/chunk-YGLYFSF6.cjs.js +0 -2
- package/dist/chunk-YGLYFSF6.cjs.js.map +0 -1
- package/dist/hooks.cjs.js +0 -2
- package/dist/hooks.cjs.js.map +0 -1
- package/dist/hooks.d.ts +0 -51
- package/dist/hooks.esm.js +0 -2
- package/dist/hooks.esm.js.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.d.ts +0 -30
- package/dist/index.esm.js +0 -2
- package/dist/molecules.cjs.js +0 -2
- package/dist/molecules.cjs.js.map +0 -1
- package/dist/molecules.d.mts +0 -201
- package/dist/molecules.d.ts +0 -201
- package/dist/molecules.esm.js +0 -2
- package/dist/molecules.esm.js.map +0 -1
- package/dist/organisms.cjs.js +0 -2
- package/dist/organisms.cjs.js.map +0 -1
- package/dist/organisms.d.mts +0 -673
- package/dist/organisms.d.ts +0 -673
- package/dist/organisms.esm.js +0 -2
- package/dist/organisms.esm.js.map +0 -1
- package/dist/rhf.cjs.js +0 -2
- package/dist/rhf.cjs.js.map +0 -1
- package/dist/rhf.d.mts +0 -408
- package/dist/rhf.d.ts +0 -408
- package/dist/rhf.esm.js +0 -2
- package/dist/rhf.esm.js.map +0 -1
- package/dist/toast-2xT7L1tJ.d.ts +0 -18
- package/dist/tooltip-B4jzaurK.d.ts +0 -104
- package/dist/types.cjs.js +0 -2
- package/dist/types.cjs.js.map +0 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.esm.js +0 -2
- package/dist/types.esm.js.map +0 -1
- package/dist/utils.cjs.js +0 -2
- package/dist/utils.cjs.js.map +0 -1
- package/dist/utils.d.ts +0 -5
- package/dist/utils.esm.js +0 -2
- package/dist/utils.esm.js.map +0 -1
- /package/dist/{types.d.mts → types/index.d.mts} +0 -0
- /package/dist/{utils.d.mts → utils/index.d.mts} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,30 +1,2739 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import '
|
|
10
|
-
import 'react';
|
|
11
|
-
import '
|
|
12
|
-
import '@radix-ui/react-
|
|
13
|
-
import 'react
|
|
14
|
-
import '@radix-ui/react-
|
|
15
|
-
import '@radix-ui/react-
|
|
16
|
-
import '
|
|
17
|
-
import 'react-
|
|
18
|
-
import '@radix-ui/react-
|
|
19
|
-
import '@radix-ui/react-
|
|
20
|
-
import '
|
|
21
|
-
import '@radix-ui/react-
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
-
import '@radix-ui/react-
|
|
25
|
-
import '
|
|
26
|
-
import '
|
|
27
|
-
import '@radix-ui/react-
|
|
28
|
-
import '
|
|
29
|
-
import '
|
|
30
|
-
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { ComponentProps, ComponentPropsWithoutRef, ElementRef, TextareaHTMLAttributes } from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
8
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
9
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
11
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
13
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
14
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
15
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
16
|
+
import { Command as Command$1 } from 'cmdk';
|
|
17
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
18
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
19
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
20
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
21
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
22
|
+
import * as vaul from 'vaul';
|
|
23
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
24
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
25
|
+
import * as react_hook_form from 'react-hook-form';
|
|
26
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
27
|
+
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
28
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
29
|
+
import { ClassValue } from 'clsx';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Props interface for the Button component.
|
|
33
|
+
* Extends the native button HTML attributes and adds support for variants and asChild prop.
|
|
34
|
+
* Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.
|
|
35
|
+
*
|
|
36
|
+
* @interface ButtonProps
|
|
37
|
+
* @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}
|
|
38
|
+
* @extends {VariantProps<typeof buttonVariants>}
|
|
39
|
+
*
|
|
40
|
+
* @property {boolean} [asChild] - When true, renders the button as a child component using Radix UI's Slot.
|
|
41
|
+
* @property {ButtonVariant} [variant] - The visual style variant of the button.
|
|
42
|
+
* @property {ButtonSize} [size] - The size variant of the button.
|
|
43
|
+
* @property {string} [className] - Additional CSS classes to apply to the button.
|
|
44
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the button text.
|
|
45
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the button text.
|
|
46
|
+
* @property {boolean} [loading] - Whether the button is in a loading state.
|
|
47
|
+
* @property {string} [type] - The type of button (button, submit, reset). Defaults to "button".
|
|
48
|
+
* @property {string} [aria-label] - Accessible label for the button. Falls back to button text if not provided.
|
|
49
|
+
*/
|
|
50
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
51
|
+
asChild?: boolean;
|
|
52
|
+
startIcon?: React$1.ReactNode;
|
|
53
|
+
endIcon?: React$1.ReactNode;
|
|
54
|
+
loading?: boolean;
|
|
55
|
+
type?: "button" | "submit" | "reset";
|
|
56
|
+
"aria-label"?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Button variant styles using class-variance-authority.
|
|
61
|
+
* Defines the visual styles for different button variants and sizes.
|
|
62
|
+
* Follows WCAG 2.1 Level AA guidelines for accessibility.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Button variant="primary" size="lg">Click me</Button>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const buttonVariants: (props?: ({
|
|
70
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
71
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
72
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
73
|
+
/**
|
|
74
|
+
* A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.
|
|
75
|
+
* Built on top of Radix UI's Slot primitive for maximum flexibility.
|
|
76
|
+
* Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.
|
|
77
|
+
*
|
|
78
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-button--docs
|
|
79
|
+
*
|
|
80
|
+
* @component
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* // Default button
|
|
84
|
+
* <Button>Click me</Button>
|
|
85
|
+
*
|
|
86
|
+
* // Destructive button with small size
|
|
87
|
+
* <Button variant="destructive" size="sm">Delete</Button>
|
|
88
|
+
*
|
|
89
|
+
* // As a link
|
|
90
|
+
* <Button variant="link" asChild>
|
|
91
|
+
* <a href="/about">About</a>
|
|
92
|
+
* </Button>
|
|
93
|
+
*
|
|
94
|
+
* // With icons
|
|
95
|
+
* <Button startIcon={<Icon />}>With Start Icon</Button>
|
|
96
|
+
* <Button endIcon={<Icon />}>With End Icon</Button>
|
|
97
|
+
*
|
|
98
|
+
* // Loading state
|
|
99
|
+
* <Button loading>Loading</Button>
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @param {ButtonProps} props - The component props
|
|
103
|
+
* @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref
|
|
104
|
+
* @returns {JSX.Element} A button element
|
|
105
|
+
*/
|
|
106
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Props interface for the TextField component.
|
|
110
|
+
* Extends the native input HTML attributes and adds support for variants and icons.
|
|
111
|
+
*
|
|
112
|
+
* @interface TextFieldProps
|
|
113
|
+
* @extends {React.InputHTMLAttributes<HTMLInputElement>}
|
|
114
|
+
* @extends {VariantProps<typeof textFieldVariants>}
|
|
115
|
+
*
|
|
116
|
+
* @property {string} [variant] - The visual style variant of the text field.
|
|
117
|
+
* @property {string} [size] - The size variant of the text field.
|
|
118
|
+
* @property {string} [className] - Additional CSS classes to apply to the text field.
|
|
119
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the input.
|
|
120
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the input.
|
|
121
|
+
* @property {boolean} [loading] - Whether the text field is in a loading state.
|
|
122
|
+
* @property {string} [error] - Error message to display below the text field.
|
|
123
|
+
* @property {string} [label] - Label text for the text field.
|
|
124
|
+
* @property {string} [helperText] - Helper text to display below the text field.
|
|
125
|
+
*/
|
|
126
|
+
interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof textFieldVariants> {
|
|
127
|
+
startIcon?: React$1.ReactNode;
|
|
128
|
+
endIcon?: React$1.ReactNode;
|
|
129
|
+
loading?: boolean;
|
|
130
|
+
error?: string;
|
|
131
|
+
label?: string;
|
|
132
|
+
helperText?: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Text field variant styles using class-variance-authority.
|
|
137
|
+
* Defines the visual styles for different text field variants and sizes.
|
|
138
|
+
*/
|
|
139
|
+
declare const textFieldVariants: (props?: ({
|
|
140
|
+
variant?: "default" | "error" | null | undefined;
|
|
141
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
142
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
143
|
+
/**
|
|
144
|
+
* A versatile text field component that supports multiple variants, sizes, and icons.
|
|
145
|
+
* Built on top of shadcn/ui's Input component.
|
|
146
|
+
*
|
|
147
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-text-field--docs
|
|
148
|
+
*
|
|
149
|
+
* @component
|
|
150
|
+
* @example
|
|
151
|
+
* ```tsx
|
|
152
|
+
* // Default text field
|
|
153
|
+
* <TextField placeholder="Enter text" />
|
|
154
|
+
*
|
|
155
|
+
* // With icons
|
|
156
|
+
* <TextField startIcon={<SearchIcon />} placeholder="Search..." />
|
|
157
|
+
* <TextField endIcon={<CalendarIcon />} placeholder="Select date" />
|
|
158
|
+
*
|
|
159
|
+
* // With loading state
|
|
160
|
+
* <TextField loading placeholder="Loading..." />
|
|
161
|
+
*
|
|
162
|
+
* // With error
|
|
163
|
+
* <TextField error="Invalid input" placeholder="Enter text" />
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
167
|
+
|
|
168
|
+
interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
169
|
+
/**
|
|
170
|
+
* The maximum width of the container.
|
|
171
|
+
* - "sm": 640px
|
|
172
|
+
* - "md": 768px
|
|
173
|
+
* - "lg": 1024px
|
|
174
|
+
* - "xl": 1280px
|
|
175
|
+
* - "full": 100%
|
|
176
|
+
* - false: No max-width (fluid)
|
|
177
|
+
*
|
|
178
|
+
* @default "lg"
|
|
179
|
+
*/
|
|
180
|
+
maxWidth?: "sm" | "md" | "lg" | "xl" | "full" | false;
|
|
181
|
+
/**
|
|
182
|
+
* Whether to disable the default horizontal padding.
|
|
183
|
+
* When true, removes the default padding (px-4 sm:px-6 lg:px-8).
|
|
184
|
+
*
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
disablePadding?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Whether to make the container fluid (no max-width).
|
|
190
|
+
* When true, the container will expand to fill its parent's width.
|
|
191
|
+
*
|
|
192
|
+
* @default false
|
|
193
|
+
*/
|
|
194
|
+
fluid?: boolean;
|
|
195
|
+
}
|
|
196
|
+
declare const Container: React$1.ForwardRefExoticComponent<ContainerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Box is a fundamental layout component that serves as a building block for other components.
|
|
200
|
+
* It's a polymorphic component that can render as different HTML elements while maintaining
|
|
201
|
+
* consistent styling and behavior.
|
|
202
|
+
*
|
|
203
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-box--docs
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* // Basic usage
|
|
208
|
+
* <Box>Content</Box>
|
|
209
|
+
*
|
|
210
|
+
* // As a different element
|
|
211
|
+
* <Box as="section">Section content</Box>
|
|
212
|
+
*
|
|
213
|
+
* // With custom className
|
|
214
|
+
* <Box className="bg-primary text-white p-4">Styled content</Box>
|
|
215
|
+
*
|
|
216
|
+
* // With custom dimensions
|
|
217
|
+
* <Box width="100px" height="200px">Fixed size content</Box>
|
|
218
|
+
* <Box width="50%" height="auto">Responsive content</Box>
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
type BoxComponent = "div" | "span" | "section" | "article" | "main" | "aside" | "header" | "footer" | "nav";
|
|
223
|
+
type DimensionValue = string | number;
|
|
224
|
+
interface BoxProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
225
|
+
/**
|
|
226
|
+
* The HTML element to render the Box as.
|
|
227
|
+
* This allows for semantic HTML while maintaining consistent styling.
|
|
228
|
+
*
|
|
229
|
+
* @default "div"
|
|
230
|
+
*/
|
|
231
|
+
as?: BoxComponent;
|
|
232
|
+
/**
|
|
233
|
+
* The width of the Box component.
|
|
234
|
+
* Can be a number (interpreted as pixels) or a string (e.g., "100%", "50px", "10rem").
|
|
235
|
+
*/
|
|
236
|
+
width?: DimensionValue;
|
|
237
|
+
/**
|
|
238
|
+
* The height of the Box component.
|
|
239
|
+
* Can be a number (interpreted as pixels) or a string (e.g., "100%", "50px", "10rem").
|
|
240
|
+
*/
|
|
241
|
+
height?: DimensionValue;
|
|
242
|
+
}
|
|
243
|
+
declare const Box: React$1.ForwardRefExoticComponent<BoxProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Stack is a layout component that arranges its children in a vertical or horizontal stack
|
|
247
|
+
* with consistent spacing between items. It's built on top of Flexbox and provides
|
|
248
|
+
* a simple way to create consistent layouts.
|
|
249
|
+
*
|
|
250
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-stack--docs
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```tsx
|
|
254
|
+
* // Basic vertical stack
|
|
255
|
+
* <Stack>
|
|
256
|
+
* <div>Item 1</div>
|
|
257
|
+
* <div>Item 2</div>
|
|
258
|
+
* <div>Item 3</div>
|
|
259
|
+
* </Stack>
|
|
260
|
+
*
|
|
261
|
+
* // Horizontal stack with custom spacing
|
|
262
|
+
* <Stack direction="horizontal" spacing="lg">
|
|
263
|
+
* <div>Item 1</div>
|
|
264
|
+
* <div>Item 2</div>
|
|
265
|
+
* </Stack>
|
|
266
|
+
*
|
|
267
|
+
* // Centered stack with wrapping
|
|
268
|
+
* <Stack direction="horizontal" center wrap>
|
|
269
|
+
* <div>Item 1</div>
|
|
270
|
+
* <div>Item 2</div>
|
|
271
|
+
* <div>Item 3</div>
|
|
272
|
+
* </Stack>
|
|
273
|
+
*
|
|
274
|
+
* // Stack with custom alignment
|
|
275
|
+
* <Stack align="center" justify="between">
|
|
276
|
+
* <div>Left</div>
|
|
277
|
+
* <div>Center</div>
|
|
278
|
+
* <div>Right</div>
|
|
279
|
+
* </Stack>
|
|
280
|
+
*
|
|
281
|
+
* // Stack with custom dimensions
|
|
282
|
+
* <Stack width="100%" height="200px">
|
|
283
|
+
* <div>Full width, fixed height stack</div>
|
|
284
|
+
* </Stack>
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
interface StackProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
289
|
+
/**
|
|
290
|
+
* The direction in which to stack the items.
|
|
291
|
+
* - "vertical": Items are stacked top to bottom
|
|
292
|
+
* - "horizontal": Items are stacked left to right
|
|
293
|
+
*
|
|
294
|
+
* @default "vertical"
|
|
295
|
+
*/
|
|
296
|
+
direction?: "vertical" | "horizontal";
|
|
297
|
+
/**
|
|
298
|
+
* The spacing between items in the stack.
|
|
299
|
+
* - "none": 0px
|
|
300
|
+
* - "xs": 0.25rem (4px)
|
|
301
|
+
* - "sm": 0.5rem (8px)
|
|
302
|
+
* - "md": 1rem (16px)
|
|
303
|
+
* - "lg": 1.5rem (24px)
|
|
304
|
+
* - "xl": 2rem (32px)
|
|
305
|
+
*
|
|
306
|
+
* @default "md"
|
|
307
|
+
*/
|
|
308
|
+
spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
309
|
+
/**
|
|
310
|
+
* Whether to allow items to wrap to the next line when they don't fit.
|
|
311
|
+
* Only applies to horizontal stacks.
|
|
312
|
+
*
|
|
313
|
+
* @default false
|
|
314
|
+
*/
|
|
315
|
+
wrap?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Whether to center items both horizontally and vertically.
|
|
318
|
+
* This is a shorthand for setting both align and justify to "center".
|
|
319
|
+
*
|
|
320
|
+
* @default false
|
|
321
|
+
*/
|
|
322
|
+
center?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* How to justify items along the main axis.
|
|
325
|
+
* - "start": Items are packed toward the start
|
|
326
|
+
* - "end": Items are packed toward the end
|
|
327
|
+
* - "center": Items are centered
|
|
328
|
+
* - "between": Items are evenly distributed with first item at start and last at end
|
|
329
|
+
* - "around": Items are evenly distributed with equal space around them
|
|
330
|
+
* - "evenly": Items are distributed so that the spacing between any two items is equal
|
|
331
|
+
*
|
|
332
|
+
* @default undefined
|
|
333
|
+
*/
|
|
334
|
+
justify?: "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
335
|
+
/**
|
|
336
|
+
* How to align items along the cross axis.
|
|
337
|
+
* - "start": Items are aligned at the start
|
|
338
|
+
* - "end": Items are aligned at the end
|
|
339
|
+
* - "center": Items are centered
|
|
340
|
+
* - "stretch": Items are stretched to fill the container
|
|
341
|
+
* - "baseline": Items are aligned at their baselines
|
|
342
|
+
*
|
|
343
|
+
* @default undefined
|
|
344
|
+
*/
|
|
345
|
+
align?: "start" | "end" | "center" | "stretch" | "baseline";
|
|
346
|
+
/**
|
|
347
|
+
* The width of the stack container.
|
|
348
|
+
* Can be any valid CSS width value (e.g., "100%", "200px", "50vw").
|
|
349
|
+
*
|
|
350
|
+
* @default undefined
|
|
351
|
+
*/
|
|
352
|
+
width?: string;
|
|
353
|
+
/**
|
|
354
|
+
* The height of the stack container.
|
|
355
|
+
* Can be any valid CSS height value (e.g., "100%", "200px", "50vh").
|
|
356
|
+
*
|
|
357
|
+
* @default undefined
|
|
358
|
+
*/
|
|
359
|
+
height?: string;
|
|
360
|
+
}
|
|
361
|
+
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Dialog component for creating accessible dialogs with overlay and content.
|
|
365
|
+
* Built on top of Radix UI's Dialog primitive.
|
|
366
|
+
*
|
|
367
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dialog--docs
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* ```tsx
|
|
371
|
+
* <Dialog>
|
|
372
|
+
* <DialogTrigger>Open Dialog</DialogTrigger>
|
|
373
|
+
* <DialogContent>Dialog Content</DialogContent>
|
|
374
|
+
* </Dialog>
|
|
375
|
+
*/
|
|
376
|
+
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
377
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
378
|
+
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
379
|
+
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
380
|
+
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
381
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
382
|
+
declare const DialogHeader: {
|
|
383
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
384
|
+
displayName: string;
|
|
385
|
+
};
|
|
386
|
+
declare const DialogFooter: {
|
|
387
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
388
|
+
displayName: string;
|
|
389
|
+
};
|
|
390
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
391
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Input component for creating accessible input fields.
|
|
395
|
+
* Built on top of shadcn/ui's Input component.
|
|
396
|
+
*
|
|
397
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs
|
|
398
|
+
*
|
|
399
|
+
*/
|
|
400
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Separator component for creating horizontal or vertical dividers.
|
|
404
|
+
* Built on top of Radix UI's Separator primitive.
|
|
405
|
+
*
|
|
406
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-separator--docs
|
|
407
|
+
*
|
|
408
|
+
*/
|
|
409
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Sheet component for creating accessible sheets with overlay and content.
|
|
413
|
+
* Built on top of Radix UI's Sheet primitive.
|
|
414
|
+
*
|
|
415
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-sheet--docs
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```tsx
|
|
419
|
+
* <Sheet>
|
|
420
|
+
* <SheetTrigger>Open Sheet</SheetTrigger>
|
|
421
|
+
* <SheetContent>Sheet Content</SheetContent>
|
|
422
|
+
* </Sheet>
|
|
423
|
+
*/
|
|
424
|
+
declare const Sheet: React$1.FC<DialogPrimitive.DialogProps>;
|
|
425
|
+
declare const SheetTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
426
|
+
declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
427
|
+
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
428
|
+
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
429
|
+
declare const sheetVariants: (props?: ({
|
|
430
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
431
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
432
|
+
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
433
|
+
}
|
|
434
|
+
declare const SheetContent: React$1.ForwardRefExoticComponent<SheetContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
435
|
+
declare const SheetHeader: {
|
|
436
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
437
|
+
displayName: string;
|
|
438
|
+
};
|
|
439
|
+
declare const SheetFooter: {
|
|
440
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
441
|
+
displayName: string;
|
|
442
|
+
};
|
|
443
|
+
declare const SheetTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
444
|
+
declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Skeleton component for creating a loading state.
|
|
448
|
+
* Built on top of shadcn/ui's Skeleton component.
|
|
449
|
+
*
|
|
450
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-skeleton--docs
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```tsx
|
|
454
|
+
* <Skeleton className="w-10 h-10" />
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
declare function Skeleton({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Avatar component that displays a user's profile picture or fallback.
|
|
461
|
+
* Built on top of Radix UI's Avatar primitive.
|
|
462
|
+
*
|
|
463
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-avatar--docs
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```tsx
|
|
467
|
+
* <Avatar>
|
|
468
|
+
* <AvatarImage src="/path/to/image.jpg" alt="User avatar" />
|
|
469
|
+
* <AvatarFallback>JD</AvatarFallback>
|
|
470
|
+
* </Avatar>
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
474
|
+
/**
|
|
475
|
+
* AvatarImage component that displays the user's profile picture.
|
|
476
|
+
* Falls back to AvatarFallback if the image fails to load.
|
|
477
|
+
*/
|
|
478
|
+
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
479
|
+
/**
|
|
480
|
+
* AvatarFallback component that displays when the image fails to load.
|
|
481
|
+
* Typically shows the user's initials or a placeholder icon.
|
|
482
|
+
*/
|
|
483
|
+
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
484
|
+
|
|
485
|
+
type AvatarProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>;
|
|
486
|
+
type AvatarImageProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>;
|
|
487
|
+
type AvatarFallbackProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* TooltipProvider component for creating accessible tooltips.
|
|
491
|
+
* Built on top of Radix UI's Tooltip primitive.
|
|
492
|
+
*
|
|
493
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```tsx
|
|
497
|
+
* <TooltipProvider>
|
|
498
|
+
* <Tooltip>
|
|
499
|
+
* <TooltipTrigger>Hover me</TooltipTrigger>
|
|
500
|
+
* <TooltipContent>Tooltip content</TooltipContent>
|
|
501
|
+
* </Tooltip>
|
|
502
|
+
* </TooltipProvider>
|
|
503
|
+
* ```
|
|
504
|
+
*/
|
|
505
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
506
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
507
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
508
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
509
|
+
|
|
510
|
+
declare const badgeVariants: (props?: ({
|
|
511
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "info" | null | undefined;
|
|
512
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
513
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
514
|
+
|
|
515
|
+
interface BadgeProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
516
|
+
/**
|
|
517
|
+
* The content to display inside the badge
|
|
518
|
+
*/
|
|
519
|
+
children: React__default.ReactNode;
|
|
520
|
+
/**
|
|
521
|
+
* Optional icon to display before the badge content
|
|
522
|
+
*/
|
|
523
|
+
icon?: React__default.ReactNode;
|
|
524
|
+
/**
|
|
525
|
+
* Optional icon to display after the badge content
|
|
526
|
+
*/
|
|
527
|
+
iconAfter?: React__default.ReactNode;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Badge component for displaying status, counts, or labels.
|
|
532
|
+
* Supports various variants, sizes, and optional icons.
|
|
533
|
+
*
|
|
534
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-badge--docs
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```tsx
|
|
538
|
+
* <Badge variant="success">Active</Badge>
|
|
539
|
+
* <Badge variant="warning" icon={<AlertIcon />}>Warning</Badge>
|
|
540
|
+
* <Badge variant="info" size="lg" iconAfter={<ArrowIcon />}>New</Badge>
|
|
541
|
+
* ```
|
|
542
|
+
*/
|
|
543
|
+
declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
544
|
+
|
|
545
|
+
declare const typographyVariants: (props?: ({
|
|
546
|
+
variant?: "list" | "small" | "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "muted" | "large" | "lead" | null | undefined;
|
|
547
|
+
align?: "center" | "left" | "right" | "justify" | null | undefined;
|
|
548
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
549
|
+
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
|
|
550
|
+
as?: React$1.ElementType;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Typography component for creating accessible text elements.
|
|
554
|
+
* Built on top of shadcn/ui's Typography component.
|
|
555
|
+
*
|
|
556
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-typography--docs
|
|
557
|
+
*
|
|
558
|
+
*/
|
|
559
|
+
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLElement>>;
|
|
560
|
+
|
|
561
|
+
type TypographyVariant = NonNullable<VariantProps<typeof typographyVariants>["variant"]>;
|
|
562
|
+
type TypographyAlign = NonNullable<VariantProps<typeof typographyVariants>["align"]>;
|
|
563
|
+
|
|
564
|
+
type PageLoaderProps = {
|
|
565
|
+
/**
|
|
566
|
+
* Optional className to extend the component's styles
|
|
567
|
+
*/
|
|
568
|
+
className?: string;
|
|
569
|
+
/**
|
|
570
|
+
* Optional size of the loader (default: "default")
|
|
571
|
+
*/
|
|
572
|
+
size?: "sm" | "default" | "lg";
|
|
573
|
+
/**
|
|
574
|
+
* Optional text to display below the loader
|
|
575
|
+
*/
|
|
576
|
+
text?: string;
|
|
577
|
+
/**
|
|
578
|
+
* Optional color of the loader (default: "primary")
|
|
579
|
+
*/
|
|
580
|
+
color?: "primary" | "secondary" | "accent" | "muted" | "destructive" | string;
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* PageLoader component for displaying a loading indicator.
|
|
584
|
+
*
|
|
585
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-page-loader--docs
|
|
586
|
+
*
|
|
587
|
+
*/
|
|
588
|
+
declare function PageLoader({ className, size, text, color }: PageLoaderProps): react_jsx_runtime.JSX.Element;
|
|
589
|
+
|
|
590
|
+
declare const labelVariants: (props?: class_variance_authority_dist_types.ClassProp | undefined) => string;
|
|
591
|
+
interface LabelProps extends React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Label component for creating accessible labels.
|
|
595
|
+
* Built on top of Radix UI's Label primitive.
|
|
596
|
+
*
|
|
597
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs
|
|
598
|
+
*
|
|
599
|
+
*/
|
|
600
|
+
declare const Label: React$1.ForwardRefExoticComponent<LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
601
|
+
|
|
602
|
+
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
603
|
+
declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
604
|
+
declare const Toast$1: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
605
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
606
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
|
|
607
|
+
declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
608
|
+
declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
609
|
+
declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
610
|
+
declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
611
|
+
type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast$1>;
|
|
612
|
+
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Toaster component for managing and displaying toast notifications.
|
|
616
|
+
* Built on top of the Toast primitive components.
|
|
617
|
+
*
|
|
618
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toaster--docs
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```tsx
|
|
622
|
+
* // Add Toaster to your app's root layout
|
|
623
|
+
* <Toaster />
|
|
624
|
+
*
|
|
625
|
+
* // Use the toast hook to show notifications
|
|
626
|
+
* const { toast } = useToast()
|
|
627
|
+
*
|
|
628
|
+
* toast({
|
|
629
|
+
* title: "Success",
|
|
630
|
+
* description: "Your changes have been saved.",
|
|
631
|
+
* action: <ToastAction altText="Undo">Undo</ToastAction>
|
|
632
|
+
* })
|
|
633
|
+
* ```
|
|
634
|
+
*/
|
|
635
|
+
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
636
|
+
|
|
637
|
+
interface TableProps extends React$1.HTMLAttributes<HTMLTableElement> {
|
|
638
|
+
}
|
|
639
|
+
interface TableHeaderProps extends React$1.HTMLAttributes<HTMLTableSectionElement> {
|
|
640
|
+
}
|
|
641
|
+
interface TableBodyProps extends React$1.HTMLAttributes<HTMLTableSectionElement> {
|
|
642
|
+
}
|
|
643
|
+
interface TableFooterProps extends React$1.HTMLAttributes<HTMLTableSectionElement> {
|
|
644
|
+
}
|
|
645
|
+
interface TableRowProps extends React$1.HTMLAttributes<HTMLTableRowElement> {
|
|
646
|
+
}
|
|
647
|
+
interface TableHeadProps extends React$1.ThHTMLAttributes<HTMLTableCellElement> {
|
|
648
|
+
}
|
|
649
|
+
interface TableCellProps extends React$1.TdHTMLAttributes<HTMLTableCellElement> {
|
|
650
|
+
}
|
|
651
|
+
interface TableCaptionProps extends React$1.HTMLAttributes<HTMLTableCaptionElement> {
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Table component that provides a structured way to display data in rows and columns.
|
|
656
|
+
* Built on top of native HTML table elements with enhanced styling and accessibility.
|
|
657
|
+
*
|
|
658
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-table--docs
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```tsx
|
|
662
|
+
* <Table>
|
|
663
|
+
* <TableHeader>
|
|
664
|
+
* <TableRow>
|
|
665
|
+
* <TableHead>Name</TableHead>
|
|
666
|
+
* <TableHead>Email</TableHead>
|
|
667
|
+
* </TableRow>
|
|
668
|
+
* </TableHeader>
|
|
669
|
+
* <TableBody>
|
|
670
|
+
* <TableRow>
|
|
671
|
+
* <TableCell>John Doe</TableCell>
|
|
672
|
+
* <TableCell>john@example.com</TableCell>
|
|
673
|
+
* </TableRow>
|
|
674
|
+
* </TableBody>
|
|
675
|
+
* </Table>
|
|
676
|
+
* ```
|
|
677
|
+
*/
|
|
678
|
+
declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
679
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<TableHeaderProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
680
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<TableBodyProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
681
|
+
declare const TableFooter: React$1.ForwardRefExoticComponent<TableFooterProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
682
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
683
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
684
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
685
|
+
declare const TableCaption: React$1.ForwardRefExoticComponent<TableCaptionProps & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Resizable component that provides resizable panel functionality.
|
|
689
|
+
* Built on top of react-resizable-panels.
|
|
690
|
+
*
|
|
691
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-resizable--docs
|
|
692
|
+
*
|
|
693
|
+
* @example
|
|
694
|
+
* ```tsx
|
|
695
|
+
* <ResizablePanelGroup>
|
|
696
|
+
* <ResizablePanel defaultSize={20}>
|
|
697
|
+
* <div>Left Panel</div>
|
|
698
|
+
* </ResizablePanel>
|
|
699
|
+
* <ResizableHandle withHandle />
|
|
700
|
+
* <ResizablePanel defaultSize={80}>
|
|
701
|
+
* <div>Right Panel</div>
|
|
702
|
+
* </ResizablePanel>
|
|
703
|
+
* </ResizablePanelGroup>
|
|
704
|
+
* ```
|
|
705
|
+
*/
|
|
706
|
+
declare const ResizablePanelGroup: ({ className, ...props }: ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
|
|
707
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLSpanElement | HTMLInputElement | HTMLLabelElement | HTMLObjectElement | HTMLLinkElement | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
708
|
+
className?: string;
|
|
709
|
+
collapsedSize?: number | undefined;
|
|
710
|
+
collapsible?: boolean | undefined;
|
|
711
|
+
defaultSize?: number | undefined;
|
|
712
|
+
id?: string;
|
|
713
|
+
maxSize?: number | undefined;
|
|
714
|
+
minSize?: number | undefined;
|
|
715
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
716
|
+
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
717
|
+
onResize?: ResizablePrimitive.PanelOnResize;
|
|
718
|
+
order?: number;
|
|
719
|
+
style?: object;
|
|
720
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
721
|
+
} & {
|
|
722
|
+
children?: React$1.ReactNode | undefined;
|
|
723
|
+
} & React$1.RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
724
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
725
|
+
withHandle?: boolean;
|
|
726
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
727
|
+
|
|
728
|
+
type ResizablePanelGroupProps = ComponentProps<typeof ResizablePrimitive.PanelGroup>;
|
|
729
|
+
type ResizablePanelProps = ComponentProps<typeof ResizablePrimitive.Panel>;
|
|
730
|
+
type ResizableHandleProps = ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
731
|
+
withHandle?: boolean;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
type SelectOption = {
|
|
735
|
+
id: string;
|
|
736
|
+
label: string;
|
|
737
|
+
startIcon?: React$1.ReactNode;
|
|
738
|
+
endIcon?: React$1.ReactNode;
|
|
739
|
+
className?: string;
|
|
740
|
+
disabled?: boolean;
|
|
741
|
+
};
|
|
742
|
+
type SelectProps = {
|
|
743
|
+
/** Whether the select is searchable */
|
|
744
|
+
searchable?: boolean;
|
|
745
|
+
/** Whether the select should take up the full width of its container */
|
|
746
|
+
fullWidth?: boolean;
|
|
747
|
+
/** Currently selected value */
|
|
748
|
+
value: string;
|
|
749
|
+
/** Array of options to display in the select */
|
|
750
|
+
options: SelectOption[];
|
|
751
|
+
/** Callback fired when the value changes */
|
|
752
|
+
onChange: (value: string) => void;
|
|
753
|
+
/** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */
|
|
754
|
+
renderCommandList?: (options: SelectOption[]) => React$1.ReactNode;
|
|
755
|
+
/** Placeholder text to show when no value is selected */
|
|
756
|
+
placeholder?: string;
|
|
757
|
+
/** Whether the select is disabled */
|
|
758
|
+
disabled?: boolean;
|
|
759
|
+
/** Whether the select is required */
|
|
760
|
+
required?: boolean;
|
|
761
|
+
/** Error message to display */
|
|
762
|
+
error?: string;
|
|
763
|
+
/** Additional class name for the select */
|
|
764
|
+
className?: string;
|
|
765
|
+
/** ID for the select element */
|
|
766
|
+
id?: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* SearchableSelect component that provides a searchable dropdown select input.
|
|
770
|
+
* Built on top of Radix UI's Select primitive.
|
|
771
|
+
*
|
|
772
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs-atoms-select--docs
|
|
773
|
+
*
|
|
774
|
+
* @example
|
|
775
|
+
* ```tsx
|
|
776
|
+
* <Select
|
|
777
|
+
* options={[
|
|
778
|
+
* { id: "1", label: "Option 1" },
|
|
779
|
+
* { id: "2", label: "Option 2" }
|
|
780
|
+
* ]}
|
|
781
|
+
* value="1"
|
|
782
|
+
* onChange={setValue}
|
|
783
|
+
* required
|
|
784
|
+
* />
|
|
785
|
+
* ```
|
|
786
|
+
*/
|
|
787
|
+
declare function Select({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, renderCommandList }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
788
|
+
|
|
789
|
+
type MultiSelectOption = {
|
|
790
|
+
id: string;
|
|
791
|
+
label: string;
|
|
792
|
+
startIcon?: React$1.ReactNode;
|
|
793
|
+
endIcon?: React$1.ReactNode;
|
|
794
|
+
className?: string;
|
|
795
|
+
disabled?: boolean;
|
|
796
|
+
};
|
|
797
|
+
type MultiSelectProps = {
|
|
798
|
+
/** Whether the select is searchable */
|
|
799
|
+
searchable?: boolean;
|
|
800
|
+
/** Whether the select should take up the full width of its container */
|
|
801
|
+
fullWidth?: boolean;
|
|
802
|
+
/** Array of options to display in the select */
|
|
803
|
+
options: MultiSelectOption[];
|
|
804
|
+
/** Currently selected values */
|
|
805
|
+
value: string[];
|
|
806
|
+
/** Callback fired when the values change */
|
|
807
|
+
onChange: (value: string[]) => void;
|
|
808
|
+
/** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */
|
|
809
|
+
renderCommandList?: (options: MultiSelectOption[]) => React$1.ReactNode;
|
|
810
|
+
/** Placeholder text to show when no value is selected */
|
|
811
|
+
placeholder?: string;
|
|
812
|
+
/** Whether the select is disabled */
|
|
813
|
+
disabled?: boolean;
|
|
814
|
+
/** Whether the select is required */
|
|
815
|
+
required?: boolean;
|
|
816
|
+
/** Error message to display */
|
|
817
|
+
error?: string;
|
|
818
|
+
/** Additional class name for the select */
|
|
819
|
+
className?: string;
|
|
820
|
+
/** ID for the select element */
|
|
821
|
+
id?: string;
|
|
822
|
+
/** Maximum number of selections allowed */
|
|
823
|
+
maxSelections?: number;
|
|
824
|
+
/** Whether to show the select all option */
|
|
825
|
+
showSelectAll?: boolean;
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* MultiSelect component that provides a searchable dropdown select input with multiple selection.
|
|
829
|
+
* Built on top of Radix UI's Select primitive.
|
|
830
|
+
*
|
|
831
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs-atoms-multiselect--docs
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
834
|
+
* ```tsx
|
|
835
|
+
* <MultiSelect
|
|
836
|
+
* options={[
|
|
837
|
+
* { id: "1", label: "Option 1" },
|
|
838
|
+
* { id: "2", label: "Option 2" }
|
|
839
|
+
* ]}
|
|
840
|
+
* value={["1"]}
|
|
841
|
+
* onChange={setValue}
|
|
842
|
+
* showSelectAll
|
|
843
|
+
* />
|
|
844
|
+
* ```
|
|
845
|
+
*/
|
|
846
|
+
declare function MultiSelect({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, maxSelections, showSelectAll, renderCommandList }: MultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Switch component that provides a toggle input control.
|
|
850
|
+
* Built on top of Radix UI's Switch primitive.
|
|
851
|
+
*
|
|
852
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-switch--docs
|
|
853
|
+
*
|
|
854
|
+
* @example
|
|
855
|
+
* ```tsx
|
|
856
|
+
* <Switch />
|
|
857
|
+
* <Switch defaultChecked />
|
|
858
|
+
* <Switch disabled />
|
|
859
|
+
* ```
|
|
860
|
+
*/
|
|
861
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
862
|
+
|
|
863
|
+
type SwitchProps = React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Collapsible component that allows content to be expanded and collapsed.
|
|
867
|
+
* Built on top of Radix UI's Collapsible primitive.
|
|
868
|
+
*
|
|
869
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-collapsible--docs
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* ```tsx
|
|
873
|
+
* <Collapsible>
|
|
874
|
+
* <CollapsibleTrigger>Toggle</CollapsibleTrigger>
|
|
875
|
+
* <CollapsibleContent>Content</CollapsibleContent>
|
|
876
|
+
* </Collapsible>
|
|
877
|
+
* ```
|
|
878
|
+
*/
|
|
879
|
+
declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
880
|
+
declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
881
|
+
declare const CollapsibleContent: React$1.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
882
|
+
|
|
883
|
+
type CollapsibleProps = React$1.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;
|
|
884
|
+
type CollapsibleTriggerProps = React$1.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>;
|
|
885
|
+
type CollapsibleContentProps = React$1.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content>;
|
|
886
|
+
|
|
887
|
+
type CommandProps = ComponentPropsWithoutRef<typeof Command$1>;
|
|
888
|
+
type CommandRef = ElementRef<typeof Command$1>;
|
|
889
|
+
type CommandDialogProps = DialogProps;
|
|
890
|
+
type CommandInputProps = ComponentPropsWithoutRef<typeof Command$1.Input>;
|
|
891
|
+
type CommandInputRef = ElementRef<typeof Command$1.Input>;
|
|
892
|
+
type CommandListProps = ComponentPropsWithoutRef<typeof Command$1.List>;
|
|
893
|
+
type CommandListRef = ElementRef<typeof Command$1.List>;
|
|
894
|
+
type CommandEmptyProps = ComponentPropsWithoutRef<typeof Command$1.Empty>;
|
|
895
|
+
type CommandEmptyRef = ElementRef<typeof Command$1.Empty>;
|
|
896
|
+
type CommandGroupProps = ComponentPropsWithoutRef<typeof Command$1.Group>;
|
|
897
|
+
type CommandGroupRef = ElementRef<typeof Command$1.Group>;
|
|
898
|
+
type CommandSeparatorProps = ComponentPropsWithoutRef<typeof Command$1.Separator>;
|
|
899
|
+
type CommandSeparatorRef = ElementRef<typeof Command$1.Separator>;
|
|
900
|
+
type CommandItemProps = ComponentPropsWithoutRef<typeof Command$1.Item>;
|
|
901
|
+
type CommandItemRef = ElementRef<typeof Command$1.Item>;
|
|
902
|
+
type CommandShortcutProps = React$1.HTMLAttributes<HTMLSpanElement>;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Command component that provides a command palette interface.
|
|
906
|
+
* Built on top of cmdk and Radix UI's Dialog primitive.
|
|
907
|
+
*
|
|
908
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-command--docs
|
|
909
|
+
*
|
|
910
|
+
* @example
|
|
911
|
+
* ```tsx
|
|
912
|
+
* <Command>
|
|
913
|
+
* <CommandInput placeholder="Search..." />
|
|
914
|
+
* <CommandList>
|
|
915
|
+
* <CommandEmpty>No results found.</CommandEmpty>
|
|
916
|
+
* <CommandGroup heading="Suggestions">
|
|
917
|
+
* <CommandItem>Calendar</CommandItem>
|
|
918
|
+
* <CommandItem>Search</CommandItem>
|
|
919
|
+
* </CommandGroup>
|
|
920
|
+
* </CommandList>
|
|
921
|
+
* </Command>
|
|
922
|
+
* ```
|
|
923
|
+
*/
|
|
924
|
+
declare const Command: React$1.ForwardRefExoticComponent<Omit<{
|
|
925
|
+
children?: React$1.ReactNode;
|
|
926
|
+
} & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
927
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
928
|
+
} & {
|
|
929
|
+
asChild?: boolean;
|
|
930
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
931
|
+
label?: string;
|
|
932
|
+
shouldFilter?: boolean;
|
|
933
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
934
|
+
defaultValue?: string;
|
|
935
|
+
value?: string;
|
|
936
|
+
onValueChange?: (value: string) => void;
|
|
937
|
+
loop?: boolean;
|
|
938
|
+
disablePointerSelection?: boolean;
|
|
939
|
+
vimBindings?: boolean;
|
|
940
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
941
|
+
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => react_jsx_runtime.JSX.Element;
|
|
942
|
+
declare const CommandInput: React$1.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React$1.InputHTMLAttributes<HTMLInputElement>> & {
|
|
943
|
+
ref?: React$1.Ref<HTMLInputElement>;
|
|
944
|
+
} & {
|
|
945
|
+
asChild?: boolean;
|
|
946
|
+
}, "asChild" | "key" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
947
|
+
value?: string;
|
|
948
|
+
onValueChange?: (search: string) => void;
|
|
949
|
+
} & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
950
|
+
declare const CommandList: React$1.ForwardRefExoticComponent<Omit<{
|
|
951
|
+
children?: React$1.ReactNode;
|
|
952
|
+
} & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
953
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
954
|
+
} & {
|
|
955
|
+
asChild?: boolean;
|
|
956
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
957
|
+
label?: string;
|
|
958
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
959
|
+
declare const CommandEmpty: React$1.ForwardRefExoticComponent<Omit<{
|
|
960
|
+
children?: React$1.ReactNode;
|
|
961
|
+
} & Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
962
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
963
|
+
} & {
|
|
964
|
+
asChild?: boolean;
|
|
965
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
966
|
+
declare const CommandGroup: React$1.ForwardRefExoticComponent<Omit<{
|
|
967
|
+
children?: React$1.ReactNode;
|
|
968
|
+
} & Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
969
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
970
|
+
} & {
|
|
971
|
+
asChild?: boolean;
|
|
972
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
973
|
+
heading?: React$1.ReactNode;
|
|
974
|
+
value?: string;
|
|
975
|
+
forceMount?: boolean;
|
|
976
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
977
|
+
declare const CommandSeparator: React$1.ForwardRefExoticComponent<Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
978
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
979
|
+
} & {
|
|
980
|
+
asChild?: boolean;
|
|
981
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
982
|
+
alwaysRender?: boolean;
|
|
983
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
984
|
+
declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
|
|
985
|
+
children?: React$1.ReactNode;
|
|
986
|
+
} & Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
987
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
988
|
+
} & {
|
|
989
|
+
asChild?: boolean;
|
|
990
|
+
}, "asChild" | "key" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
991
|
+
disabled?: boolean;
|
|
992
|
+
onSelect?: (value: string) => void;
|
|
993
|
+
value?: string;
|
|
994
|
+
keywords?: string[];
|
|
995
|
+
forceMount?: boolean;
|
|
996
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
997
|
+
declare const CommandShortcut: {
|
|
998
|
+
({ className, ...props }: CommandShortcutProps): react_jsx_runtime.JSX.Element;
|
|
999
|
+
displayName: string;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Pagination component that provides navigation controls for paginated content.
|
|
1004
|
+
* Built on top of shadcn/ui's button component.
|
|
1005
|
+
*
|
|
1006
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-pagination--docs
|
|
1007
|
+
*
|
|
1008
|
+
* @example
|
|
1009
|
+
* ```tsx
|
|
1010
|
+
* <Pagination>
|
|
1011
|
+
* <PaginationContent>
|
|
1012
|
+
* <PaginationItem>
|
|
1013
|
+
* <PaginationPrevious href="#" />
|
|
1014
|
+
* </PaginationItem>
|
|
1015
|
+
* <PaginationItem>
|
|
1016
|
+
* <PaginationLink href="#" isActive>1</PaginationLink>
|
|
1017
|
+
* </PaginationItem>
|
|
1018
|
+
* <PaginationItem>
|
|
1019
|
+
* <PaginationEllipsis />
|
|
1020
|
+
* </PaginationItem>
|
|
1021
|
+
* <PaginationItem>
|
|
1022
|
+
* <PaginationNext href="#" />
|
|
1023
|
+
* </PaginationItem>
|
|
1024
|
+
* </PaginationContent>
|
|
1025
|
+
* </Pagination>
|
|
1026
|
+
* ```
|
|
1027
|
+
*/
|
|
1028
|
+
declare const Pagination: {
|
|
1029
|
+
({ className, ...props }: React$1.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
|
|
1030
|
+
displayName: string;
|
|
1031
|
+
};
|
|
1032
|
+
declare const PaginationContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
1033
|
+
declare const PaginationItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
1034
|
+
type PaginationLinkProps$1 = {
|
|
1035
|
+
isActive?: boolean;
|
|
1036
|
+
} & Pick<ButtonProps, "size"> & React$1.ComponentProps<"a">;
|
|
1037
|
+
declare const PaginationLink: {
|
|
1038
|
+
({ className, isActive, size, children, ...props }: PaginationLinkProps$1): react_jsx_runtime.JSX.Element;
|
|
1039
|
+
displayName: string;
|
|
1040
|
+
};
|
|
1041
|
+
declare const PaginationPrevious: {
|
|
1042
|
+
({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
1043
|
+
displayName: string;
|
|
1044
|
+
};
|
|
1045
|
+
declare const PaginationNext: {
|
|
1046
|
+
({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
1047
|
+
displayName: string;
|
|
1048
|
+
};
|
|
1049
|
+
declare const PaginationEllipsis: {
|
|
1050
|
+
({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1051
|
+
displayName: string;
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
type PaginationLinkProps = {
|
|
1055
|
+
isActive?: boolean;
|
|
1056
|
+
} & Pick<ButtonProps, "size"> & React$1.ComponentProps<"a">;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* RadioGroup component that allows users to select a single option from a list.
|
|
1060
|
+
* Built on top of Radix UI's RadioGroup primitive.
|
|
1061
|
+
*
|
|
1062
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-radio-group--docs
|
|
1063
|
+
*
|
|
1064
|
+
* @example
|
|
1065
|
+
* ```tsx
|
|
1066
|
+
* <RadioGroup defaultValue="option-1">
|
|
1067
|
+
* <RadioGroupItem value="option-1">Option 1</RadioGroupItem>
|
|
1068
|
+
* <RadioGroupItem value="option-2">Option 2</RadioGroupItem>
|
|
1069
|
+
* </RadioGroup>
|
|
1070
|
+
* ```
|
|
1071
|
+
*/
|
|
1072
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1073
|
+
/**
|
|
1074
|
+
* RadioGroupItem component that represents a single option in a RadioGroup.
|
|
1075
|
+
* Built on top of Radix UI's RadioGroupItem primitive.
|
|
1076
|
+
*
|
|
1077
|
+
* @example
|
|
1078
|
+
* ```tsx
|
|
1079
|
+
* <RadioGroupItem value="option-1">Option 1</RadioGroupItem>
|
|
1080
|
+
* ```
|
|
1081
|
+
*/
|
|
1082
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1083
|
+
/**
|
|
1084
|
+
* RadioItemContainer component that provides a container for radio group items with proper spacing and layout.
|
|
1085
|
+
*
|
|
1086
|
+
* @example
|
|
1087
|
+
* ```tsx
|
|
1088
|
+
* <RadioItemContainer>
|
|
1089
|
+
* <RadioGroupItem value="option-1">Option 1</RadioGroupItem>
|
|
1090
|
+
* <RadioGroupItem value="option-2">Option 2</RadioGroupItem>
|
|
1091
|
+
* </RadioItemContainer>
|
|
1092
|
+
* ```
|
|
1093
|
+
*/
|
|
1094
|
+
declare const RadioItemContainer: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1095
|
+
/**
|
|
1096
|
+
* RadioItemLabel component that provides a label for individual radio items.
|
|
1097
|
+
* Built on top of the Label component.
|
|
1098
|
+
*
|
|
1099
|
+
* @example
|
|
1100
|
+
* ```tsx
|
|
1101
|
+
* <RadioItemLabel>Select an option</RadioItemLabel>
|
|
1102
|
+
* ```
|
|
1103
|
+
*/
|
|
1104
|
+
declare const RadioItemLabel: React$1.ForwardRefExoticComponent<Omit<LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1105
|
+
|
|
1106
|
+
type RadioGroupProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
1107
|
+
type RadioGroupItemProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Props for a single-item accordion
|
|
1111
|
+
*/
|
|
1112
|
+
type AccordionSingleProps = React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
|
|
1113
|
+
/** The type of accordion - must be "single" for this variant */
|
|
1114
|
+
type: "single";
|
|
1115
|
+
/** The default value of the accordion item */
|
|
1116
|
+
defaultValue?: string;
|
|
1117
|
+
/** The controlled value of the accordion item */
|
|
1118
|
+
value?: string;
|
|
1119
|
+
/** Callback fired when the value changes */
|
|
1120
|
+
onValueChange?: (_value: string) => void;
|
|
1121
|
+
/** Whether the accordion item can be collapsed */
|
|
1122
|
+
collapsible?: boolean;
|
|
1123
|
+
};
|
|
1124
|
+
/**
|
|
1125
|
+
* Props for a multiple-item accordion
|
|
1126
|
+
*/
|
|
1127
|
+
type AccordionMultipleProps = React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
|
|
1128
|
+
/** The type of accordion - must be "multiple" for this variant */
|
|
1129
|
+
type: "multiple";
|
|
1130
|
+
/** The default values of the accordion items */
|
|
1131
|
+
defaultValue?: string[];
|
|
1132
|
+
/** The controlled values of the accordion items */
|
|
1133
|
+
value?: string[];
|
|
1134
|
+
/** Callback fired when the values change */
|
|
1135
|
+
onValueChange?: (_value: string[]) => void;
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* Props for the Accordion component
|
|
1139
|
+
*/
|
|
1140
|
+
type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
|
|
1141
|
+
/**
|
|
1142
|
+
* Props for an individual accordion item
|
|
1143
|
+
*/
|
|
1144
|
+
interface AccordionItemProps extends React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> {
|
|
1145
|
+
/** The value of the accordion item */
|
|
1146
|
+
value: string;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Props for the accordion trigger button
|
|
1150
|
+
*/
|
|
1151
|
+
interface AccordionTriggerProps extends React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
|
|
1152
|
+
/** The content of the accordion trigger */
|
|
1153
|
+
children: React$1.ReactNode;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Props for the accordion content panel
|
|
1157
|
+
*/
|
|
1158
|
+
interface AccordionContentProps extends React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {
|
|
1159
|
+
/** The content of the accordion panel */
|
|
1160
|
+
children: React$1.ReactNode;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* Accordion component that displays a list of expandable/collapsible sections.
|
|
1165
|
+
* Built on top of Radix UI's Accordion primitive.
|
|
1166
|
+
*
|
|
1167
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-accordion--docs
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```tsx
|
|
1171
|
+
* <Accordion type="single" collapsible>
|
|
1172
|
+
* <AccordionItem value="item-1">
|
|
1173
|
+
* <AccordionTrigger>Section 1</AccordionTrigger>
|
|
1174
|
+
* <AccordionContent>Content 1</AccordionContent>
|
|
1175
|
+
* </AccordionItem>
|
|
1176
|
+
* <AccordionItem value="item-2">
|
|
1177
|
+
* <AccordionTrigger>Section 2</AccordionTrigger>
|
|
1178
|
+
* <AccordionContent>Content 2</AccordionContent>
|
|
1179
|
+
* </AccordionItem>
|
|
1180
|
+
* </Accordion>
|
|
1181
|
+
* ```
|
|
1182
|
+
*/
|
|
1183
|
+
declare const Accordion: React$1.ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1184
|
+
type: "single";
|
|
1185
|
+
defaultValue?: string;
|
|
1186
|
+
value?: string;
|
|
1187
|
+
onValueChange?: (_value: string) => void;
|
|
1188
|
+
collapsible?: boolean;
|
|
1189
|
+
}) | (Omit<AccordionPrimitive.AccordionMultipleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1190
|
+
type: "multiple";
|
|
1191
|
+
defaultValue?: string[];
|
|
1192
|
+
value?: string[];
|
|
1193
|
+
onValueChange?: (_value: string[]) => void;
|
|
1194
|
+
})) & React$1.RefAttributes<HTMLDivElement>>;
|
|
1195
|
+
declare const AccordionItem: React$1.ForwardRefExoticComponent<AccordionItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1196
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1197
|
+
declare const AccordionContent: React$1.ForwardRefExoticComponent<AccordionContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Checkbox component built on top of Radix UI's Checkbox primitive.
|
|
1201
|
+
* Provides a customizable checkbox input with proper accessibility and keyboard navigation.
|
|
1202
|
+
*
|
|
1203
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-checkbox--docs
|
|
1204
|
+
*
|
|
1205
|
+
* @example
|
|
1206
|
+
* ```tsx
|
|
1207
|
+
* <Checkbox id="terms" name="terms" />
|
|
1208
|
+
* <label htmlFor="terms">Accept terms and conditions</label>
|
|
1209
|
+
* ```
|
|
1210
|
+
*/
|
|
1211
|
+
|
|
1212
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1213
|
+
|
|
1214
|
+
type CheckboxProps = React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;
|
|
1215
|
+
|
|
1216
|
+
interface BreadcrumbProps extends React$1.ComponentPropsWithoutRef<"nav"> {
|
|
1217
|
+
separator?: React$1.ReactNode;
|
|
1218
|
+
}
|
|
1219
|
+
interface BreadcrumbListProps extends React$1.ComponentPropsWithoutRef<"ol"> {
|
|
1220
|
+
}
|
|
1221
|
+
interface BreadcrumbItemProps extends React$1.ComponentPropsWithoutRef<"li"> {
|
|
1222
|
+
}
|
|
1223
|
+
interface BreadcrumbLinkProps extends React$1.ComponentPropsWithoutRef<"a"> {
|
|
1224
|
+
asChild?: boolean;
|
|
1225
|
+
}
|
|
1226
|
+
interface BreadcrumbPageProps extends React$1.ComponentPropsWithoutRef<"span"> {
|
|
1227
|
+
}
|
|
1228
|
+
interface BreadcrumbSeparatorProps extends React$1.ComponentProps<"li"> {
|
|
1229
|
+
}
|
|
1230
|
+
interface BreadcrumbEllipsisProps extends React$1.ComponentProps<"span"> {
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
declare const Breadcrumb: React$1.ForwardRefExoticComponent<BreadcrumbProps & React$1.RefAttributes<HTMLElement>>;
|
|
1234
|
+
declare const BreadcrumbList: React$1.ForwardRefExoticComponent<BreadcrumbListProps & React$1.RefAttributes<HTMLOListElement>>;
|
|
1235
|
+
declare const BreadcrumbItem: React$1.ForwardRefExoticComponent<BreadcrumbItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
1236
|
+
declare const BreadcrumbLink: React$1.ForwardRefExoticComponent<BreadcrumbLinkProps & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
1237
|
+
declare const BreadcrumbPage: React$1.ForwardRefExoticComponent<BreadcrumbPageProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1238
|
+
declare const BreadcrumbSeparator: {
|
|
1239
|
+
({ children, className, ...props }: BreadcrumbSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
1240
|
+
displayName: string;
|
|
1241
|
+
};
|
|
1242
|
+
declare const BreadcrumbEllipsis: {
|
|
1243
|
+
({ className, ...props }: BreadcrumbEllipsisProps): react_jsx_runtime.JSX.Element;
|
|
1244
|
+
displayName: string;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Props interface for the Card component.
|
|
1249
|
+
* Extends the native div HTML attributes and adds support for custom styling.
|
|
1250
|
+
*
|
|
1251
|
+
* @interface CardProps
|
|
1252
|
+
* @extends {React.HTMLAttributes<HTMLDivElement>}
|
|
1253
|
+
*/
|
|
1254
|
+
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Props interface for the CardHeader component.
|
|
1258
|
+
* Extends the native div HTML attributes and adds support for custom styling.
|
|
1259
|
+
*
|
|
1260
|
+
* @interface CardHeaderProps
|
|
1261
|
+
* @extends {React.HTMLAttributes<HTMLDivElement>}
|
|
1262
|
+
*/
|
|
1263
|
+
interface CardHeaderProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Props interface for the CardTitle component.
|
|
1267
|
+
* Extends the native heading HTML attributes and adds support for custom styling.
|
|
1268
|
+
*
|
|
1269
|
+
* @interface CardTitleProps
|
|
1270
|
+
* @extends {React.HTMLAttributes<HTMLHeadingElement>}
|
|
1271
|
+
*/
|
|
1272
|
+
interface CardTitleProps extends React$1.HTMLAttributes<HTMLHeadingElement> {
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Props interface for the CardDescription component.
|
|
1276
|
+
* Extends the native paragraph HTML attributes and adds support for custom styling.
|
|
1277
|
+
*
|
|
1278
|
+
* @interface CardDescriptionProps
|
|
1279
|
+
* @extends {React.HTMLAttributes<HTMLParagraphElement>}
|
|
1280
|
+
*/
|
|
1281
|
+
interface CardDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Props interface for the CardContent component.
|
|
1285
|
+
* Extends the native div HTML attributes and adds support for custom styling.
|
|
1286
|
+
*
|
|
1287
|
+
* @interface CardContentProps
|
|
1288
|
+
* @extends {React.HTMLAttributes<HTMLDivElement>}
|
|
1289
|
+
*/
|
|
1290
|
+
interface CardContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Props interface for the CardFooter component.
|
|
1294
|
+
* Extends the native div HTML attributes and adds support for custom styling.
|
|
1295
|
+
*
|
|
1296
|
+
* @interface CardFooterProps
|
|
1297
|
+
* @extends {React.HTMLAttributes<HTMLDivElement>}
|
|
1298
|
+
*/
|
|
1299
|
+
interface CardFooterProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Card is a flexible container component that can be used to group related content and actions.
|
|
1304
|
+
* It provides a consistent visual style with a subtle border, shadow, and rounded corners.
|
|
1305
|
+
*
|
|
1306
|
+
*/
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* The main card container component.
|
|
1310
|
+
* Provides the base styling for the card including border, shadow, and rounded corners.
|
|
1311
|
+
* * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-card--docs
|
|
1312
|
+
*
|
|
1313
|
+
* @example
|
|
1314
|
+
* ```tsx
|
|
1315
|
+
* // Basic card
|
|
1316
|
+
* <Card>
|
|
1317
|
+
* <CardHeader>
|
|
1318
|
+
* <CardTitle>Card Title</CardTitle>
|
|
1319
|
+
* <CardDescription>Card Description</CardDescription>
|
|
1320
|
+
* </CardHeader>
|
|
1321
|
+
* <CardContent>
|
|
1322
|
+
* <p>Card content goes here.</p>
|
|
1323
|
+
* </CardContent>
|
|
1324
|
+
* <CardFooter>
|
|
1325
|
+
* <Button>Action</Button>
|
|
1326
|
+
* </CardFooter>
|
|
1327
|
+
* </Card>
|
|
1328
|
+
*
|
|
1329
|
+
* // Card with custom styling
|
|
1330
|
+
* <Card className="bg-primary text-primary-foreground">
|
|
1331
|
+
* <CardHeader>
|
|
1332
|
+
* <CardTitle>Custom Styled Card</CardTitle>
|
|
1333
|
+
* </CardHeader>
|
|
1334
|
+
* <CardContent>
|
|
1335
|
+
* <p>This card has custom background and text colors.</p>
|
|
1336
|
+
* </CardContent>
|
|
1337
|
+
* </Card>
|
|
1338
|
+
* ```
|
|
1339
|
+
*/
|
|
1340
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1341
|
+
/**
|
|
1342
|
+
* Header section of the card.
|
|
1343
|
+
* Typically contains the card title and description.
|
|
1344
|
+
* Includes padding and spacing for consistent layout.
|
|
1345
|
+
*/
|
|
1346
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<CardHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Title component for the card.
|
|
1349
|
+
* Should be used within CardHeader.
|
|
1350
|
+
* Provides consistent typography styling for card titles.
|
|
1351
|
+
*/
|
|
1352
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<CardTitleProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Description component for the card.
|
|
1355
|
+
* Should be used within CardHeader.
|
|
1356
|
+
* Provides consistent typography styling for card descriptions.
|
|
1357
|
+
*/
|
|
1358
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<CardDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Main content section of the card.
|
|
1361
|
+
* Includes padding and removes top padding to maintain consistent spacing with the header.
|
|
1362
|
+
*/
|
|
1363
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<CardContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Footer section of the card.
|
|
1366
|
+
* Typically contains action buttons or additional information.
|
|
1367
|
+
* Includes padding and removes top padding to maintain consistent spacing with the content.
|
|
1368
|
+
*/
|
|
1369
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1370
|
+
|
|
1371
|
+
declare const navigationMenuTriggerStyle: (props?: ({
|
|
1372
|
+
variant?: "default" | "ghost" | "link" | "mobile" | null | undefined;
|
|
1373
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1374
|
+
|
|
1375
|
+
interface NavigationMenuProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> {
|
|
1376
|
+
/**
|
|
1377
|
+
* The content of the navigation menu
|
|
1378
|
+
*/
|
|
1379
|
+
children: React__default.ReactNode;
|
|
1380
|
+
/**
|
|
1381
|
+
* Optional className for the root element
|
|
1382
|
+
*/
|
|
1383
|
+
className?: string;
|
|
1384
|
+
}
|
|
1385
|
+
interface NavigationMenuListProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List> {
|
|
1386
|
+
/**
|
|
1387
|
+
* Optional className for the list element
|
|
1388
|
+
*/
|
|
1389
|
+
className?: string;
|
|
1390
|
+
}
|
|
1391
|
+
interface NavigationMenuItemProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item> {
|
|
1392
|
+
/**
|
|
1393
|
+
* Optional className for the item element
|
|
1394
|
+
*/
|
|
1395
|
+
className?: string;
|
|
1396
|
+
}
|
|
1397
|
+
interface NavigationMenuTriggerProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>, VariantProps<typeof navigationMenuTriggerStyle> {
|
|
1398
|
+
/**
|
|
1399
|
+
* Optional className for the trigger element
|
|
1400
|
+
*/
|
|
1401
|
+
className?: string;
|
|
1402
|
+
}
|
|
1403
|
+
interface NavigationMenuContentProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content> {
|
|
1404
|
+
/**
|
|
1405
|
+
* Optional className for the content element
|
|
1406
|
+
*/
|
|
1407
|
+
className?: string;
|
|
1408
|
+
}
|
|
1409
|
+
interface NavigationMenuLinkProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link> {
|
|
1410
|
+
/**
|
|
1411
|
+
* Optional className for the link element
|
|
1412
|
+
*/
|
|
1413
|
+
className?: string;
|
|
1414
|
+
}
|
|
1415
|
+
interface NavigationMenuViewportProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport> {
|
|
1416
|
+
/**
|
|
1417
|
+
* Optional className for the viewport element
|
|
1418
|
+
*/
|
|
1419
|
+
className?: string;
|
|
1420
|
+
}
|
|
1421
|
+
interface NavigationMenuIndicatorProps extends React__default.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator> {
|
|
1422
|
+
/**
|
|
1423
|
+
* Optional className for the indicator element
|
|
1424
|
+
*/
|
|
1425
|
+
className?: string;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* NavigationMenu component for creating accessible navigation menus with dropdowns.
|
|
1430
|
+
* Built on top of Radix UI's NavigationMenu primitive.
|
|
1431
|
+
*
|
|
1432
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-navigation-menu--docs
|
|
1433
|
+
*
|
|
1434
|
+
* @example
|
|
1435
|
+
* ```
|
|
1436
|
+
* <NavigationMenu>
|
|
1437
|
+
* <NavigationMenuList>
|
|
1438
|
+
* <NavigationMenuItem>
|
|
1439
|
+
* <NavigationMenuTrigger>Getting Started</NavigationMenuTrigger>
|
|
1440
|
+
* <NavigationMenuContent>
|
|
1441
|
+
* <ul className="grid gap-3 p-4 md:w-[400px] lg:w-[500px]">
|
|
1442
|
+
* <li className="row-span-3">
|
|
1443
|
+
* <NavigationMenuLink asChild>
|
|
1444
|
+
* <a className="flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md">
|
|
1445
|
+
* <div className="mb-2 mt-4 text-lg font-medium">shadcn/ui</div>
|
|
1446
|
+
* <p className="text-sm leading-tight text-muted-foreground">
|
|
1447
|
+
* Beautifully designed components built with Radix UI and Tailwind CSS.
|
|
1448
|
+
* </p>
|
|
1449
|
+
* </a>
|
|
1450
|
+
* </NavigationMenuLink>
|
|
1451
|
+
* </li>
|
|
1452
|
+
* </ul>
|
|
1453
|
+
* </NavigationMenuContent>
|
|
1454
|
+
* </NavigationMenuItem>
|
|
1455
|
+
* </NavigationMenuList>
|
|
1456
|
+
* </NavigationMenu>
|
|
1457
|
+
* ```
|
|
1458
|
+
*/
|
|
1459
|
+
declare const NavigationMenu: React$1.ForwardRefExoticComponent<NavigationMenuProps & React$1.RefAttributes<HTMLElement>>;
|
|
1460
|
+
declare const NavigationMenuList: React$1.ForwardRefExoticComponent<NavigationMenuListProps & React$1.RefAttributes<HTMLUListElement>>;
|
|
1461
|
+
declare const NavigationMenuItem: React$1.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
1462
|
+
declare const NavigationMenuTrigger: React$1.ForwardRefExoticComponent<NavigationMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1463
|
+
declare const NavigationMenuContent: React$1.ForwardRefExoticComponent<NavigationMenuContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1464
|
+
declare const NavigationMenuLink: React$1.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
1465
|
+
declare const NavigationMenuViewport: React$1.ForwardRefExoticComponent<NavigationMenuViewportProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1466
|
+
declare const NavigationMenuIndicator: React$1.ForwardRefExoticComponent<NavigationMenuIndicatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1467
|
+
|
|
1468
|
+
interface TabsProps extends React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
|
|
1469
|
+
/**
|
|
1470
|
+
* The value of the tab that should be active when initially rendered.
|
|
1471
|
+
* Use when you do not need to control the state of the tabs.
|
|
1472
|
+
*/
|
|
1473
|
+
defaultValue?: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* The controlled value of the tab to activate.
|
|
1476
|
+
* Should be used with onValueChange.
|
|
1477
|
+
*/
|
|
1478
|
+
value?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Event handler called when the value changes.
|
|
1481
|
+
*/
|
|
1482
|
+
onValueChange?: (value: string) => void;
|
|
1483
|
+
/**
|
|
1484
|
+
* The orientation of the tabs.
|
|
1485
|
+
* @default "horizontal"
|
|
1486
|
+
*/
|
|
1487
|
+
orientation?: "horizontal" | "vertical";
|
|
1488
|
+
/**
|
|
1489
|
+
* The direction of the tabs.
|
|
1490
|
+
* @default "ltr"
|
|
1491
|
+
*/
|
|
1492
|
+
dir?: "ltr" | "rtl";
|
|
1493
|
+
}
|
|
1494
|
+
interface TabsListProps extends React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
|
|
1495
|
+
/**
|
|
1496
|
+
* Additional CSS class names to apply to the tabs list.
|
|
1497
|
+
*/
|
|
1498
|
+
className?: string;
|
|
1499
|
+
}
|
|
1500
|
+
interface TabsTriggerProps extends React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {
|
|
1501
|
+
/**
|
|
1502
|
+
* Additional CSS class names to apply to the tab trigger.
|
|
1503
|
+
*/
|
|
1504
|
+
className?: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* The value of the tab trigger.
|
|
1507
|
+
* Must be unique within the tabs component.
|
|
1508
|
+
*/
|
|
1509
|
+
value: string;
|
|
1510
|
+
/**
|
|
1511
|
+
* Whether the tab trigger is disabled.
|
|
1512
|
+
* @default false
|
|
1513
|
+
*/
|
|
1514
|
+
disabled?: boolean;
|
|
1515
|
+
}
|
|
1516
|
+
interface TabsContentProps extends Omit<React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, "forceMount"> {
|
|
1517
|
+
/**
|
|
1518
|
+
* Additional CSS class names to apply to the tab content.
|
|
1519
|
+
*/
|
|
1520
|
+
className?: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* The value of the tab content.
|
|
1523
|
+
* Must match the value of the corresponding TabsTrigger.
|
|
1524
|
+
*/
|
|
1525
|
+
value: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* Whether to force mounting the content when the tab is not active.
|
|
1528
|
+
* @default false
|
|
1529
|
+
*/
|
|
1530
|
+
forceMount?: true;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* Tabs component provides a way to organize content into separate views where only one view is visible at a time.
|
|
1535
|
+
* It follows the WAI-ARIA Tabs Pattern for accessibility.
|
|
1536
|
+
*
|
|
1537
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-tabs--docs
|
|
1538
|
+
*
|
|
1539
|
+
* @example
|
|
1540
|
+
* ```tsx
|
|
1541
|
+
* <Tabs defaultValue="account">
|
|
1542
|
+
* <TabsList>
|
|
1543
|
+
* <TabsTrigger value="account">Account</TabsTrigger>
|
|
1544
|
+
* <TabsTrigger value="password">Password</TabsTrigger>
|
|
1545
|
+
* </TabsList>
|
|
1546
|
+
* <TabsContent value="account">
|
|
1547
|
+
* <p>Account settings content</p>
|
|
1548
|
+
* </TabsContent>
|
|
1549
|
+
* <TabsContent value="password">
|
|
1550
|
+
* <p>Password settings content</p>
|
|
1551
|
+
* </TabsContent>
|
|
1552
|
+
* </Tabs>
|
|
1553
|
+
* ```
|
|
1554
|
+
*/
|
|
1555
|
+
|
|
1556
|
+
declare const Tabs: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1557
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1558
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1559
|
+
declare const TabsContent: React$1.ForwardRefExoticComponent<TabsContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1560
|
+
|
|
1561
|
+
declare const Drawer: {
|
|
1562
|
+
({ shouldScaleBackground, ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
1563
|
+
displayName: string;
|
|
1564
|
+
};
|
|
1565
|
+
/**
|
|
1566
|
+
* The trigger element that opens the drawer.
|
|
1567
|
+
* Should be used with the `asChild` prop to wrap your own trigger element.
|
|
1568
|
+
*/
|
|
1569
|
+
declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1570
|
+
/**
|
|
1571
|
+
* Portal component that renders the drawer content outside the DOM hierarchy.
|
|
1572
|
+
* This ensures proper stacking context and accessibility.
|
|
1573
|
+
*/
|
|
1574
|
+
declare const DrawerPortal: typeof vaul.Portal;
|
|
1575
|
+
/**
|
|
1576
|
+
* Close button component for the drawer.
|
|
1577
|
+
* Should be used with the `asChild` prop to wrap your own close button.
|
|
1578
|
+
*/
|
|
1579
|
+
declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1580
|
+
/**
|
|
1581
|
+
* Overlay component that appears behind the drawer.
|
|
1582
|
+
* Provides a semi-transparent backdrop and handles click-outside behavior.
|
|
1583
|
+
*/
|
|
1584
|
+
declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1585
|
+
/**
|
|
1586
|
+
* The main content container for the drawer.
|
|
1587
|
+
* Includes the handle bar at the top and manages the slide-up animation.
|
|
1588
|
+
*/
|
|
1589
|
+
declare const DrawerContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Header section of the drawer.
|
|
1592
|
+
* Typically contains the title and description.
|
|
1593
|
+
*/
|
|
1594
|
+
declare const DrawerHeader: {
|
|
1595
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1596
|
+
displayName: string;
|
|
1597
|
+
};
|
|
1598
|
+
/**
|
|
1599
|
+
* Footer section of the drawer.
|
|
1600
|
+
* Typically contains action buttons.
|
|
1601
|
+
*/
|
|
1602
|
+
declare const DrawerFooter: {
|
|
1603
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1604
|
+
displayName: string;
|
|
1605
|
+
};
|
|
1606
|
+
/**
|
|
1607
|
+
* Title component for the drawer.
|
|
1608
|
+
* Should be used within DrawerHeader.
|
|
1609
|
+
*/
|
|
1610
|
+
declare const DrawerTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1611
|
+
/**
|
|
1612
|
+
* Description component for the drawer.
|
|
1613
|
+
* Should be used within DrawerHeader.
|
|
1614
|
+
*/
|
|
1615
|
+
declare const DrawerDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1616
|
+
|
|
1617
|
+
type SidebarContextProps$1 = {
|
|
1618
|
+
state: "expanded" | "collapsed";
|
|
1619
|
+
open: boolean;
|
|
1620
|
+
setOpen: (open: boolean) => void;
|
|
1621
|
+
openMobile: boolean;
|
|
1622
|
+
setOpenMobile: (open: boolean) => void;
|
|
1623
|
+
isMobile: boolean;
|
|
1624
|
+
toggleSidebar: () => void;
|
|
1625
|
+
};
|
|
1626
|
+
declare function useSidebar(): SidebarContextProps$1;
|
|
1627
|
+
declare const SidebarProvider: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
1628
|
+
defaultOpen?: boolean;
|
|
1629
|
+
open?: boolean;
|
|
1630
|
+
onOpenChange?: (open: boolean) => void;
|
|
1631
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1632
|
+
/**
|
|
1633
|
+
* A flexible sidebar component that supports various layouts and configurations.
|
|
1634
|
+
* The sidebar can be positioned on either side of the screen and supports different
|
|
1635
|
+
* visual styles and collapse behaviors.
|
|
1636
|
+
*
|
|
1637
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1638
|
+
*
|
|
1639
|
+
* @example
|
|
1640
|
+
* ```tsx
|
|
1641
|
+
* <Sidebar>
|
|
1642
|
+
* <SidebarHeader>
|
|
1643
|
+
* <SidebarTitle>Dashboard</SidebarTitle>
|
|
1644
|
+
* </SidebarHeader>
|
|
1645
|
+
* <SidebarContent>
|
|
1646
|
+
* <SidebarMenu>
|
|
1647
|
+
* <SidebarMenuItem icon={<HomeIcon />}>Home</SidebarMenuItem>
|
|
1648
|
+
* <SidebarMenuItem icon={<SettingsIcon />}>Settings</SidebarMenuItem>
|
|
1649
|
+
* </SidebarMenu>
|
|
1650
|
+
* </SidebarContent>
|
|
1651
|
+
* <SidebarFooter>
|
|
1652
|
+
* <SidebarTrigger />
|
|
1653
|
+
* </SidebarFooter>
|
|
1654
|
+
* </Sidebar>
|
|
1655
|
+
* ```
|
|
1656
|
+
*/
|
|
1657
|
+
declare const Sidebar: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
1658
|
+
side?: "left" | "right";
|
|
1659
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
1660
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
1661
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1662
|
+
declare const SidebarTrigger: React$1.ForwardRefExoticComponent<Omit<ButtonProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1663
|
+
declare const SidebarRail: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1664
|
+
declare const SidebarInset: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1665
|
+
declare const SidebarInput: React$1.ForwardRefExoticComponent<Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1666
|
+
declare const SidebarHeader: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1667
|
+
declare const SidebarFooter: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1668
|
+
declare const SidebarSeparator: React$1.ForwardRefExoticComponent<Omit<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1669
|
+
declare const SidebarContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1670
|
+
declare const SidebarGroup: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1671
|
+
declare const SidebarGroupLabel: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
1672
|
+
asChild?: boolean;
|
|
1673
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1674
|
+
declare const SidebarGroupAction: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
1675
|
+
asChild?: boolean;
|
|
1676
|
+
}, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1677
|
+
declare const SidebarGroupContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1678
|
+
declare const SidebarMenu: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
1679
|
+
declare const SidebarMenuItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
1680
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
1681
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1682
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
1683
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1684
|
+
declare const SidebarMenuButton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
1685
|
+
asChild?: boolean;
|
|
1686
|
+
isActive?: boolean;
|
|
1687
|
+
tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
|
|
1688
|
+
} & VariantProps<(props?: ({
|
|
1689
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1690
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
1691
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1692
|
+
declare const SidebarMenuAction: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
1693
|
+
asChild?: boolean;
|
|
1694
|
+
showOnHover?: boolean;
|
|
1695
|
+
}, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1696
|
+
declare const SidebarMenuBadge: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1697
|
+
declare const SidebarMenuSkeleton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
1698
|
+
showIcon?: boolean;
|
|
1699
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1700
|
+
declare const SidebarMenuSub: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
1701
|
+
declare const SidebarMenuSubItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
1702
|
+
declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLAnchorElement> & React$1.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
1703
|
+
asChild?: boolean;
|
|
1704
|
+
size?: "sm" | "md";
|
|
1705
|
+
isActive?: boolean;
|
|
1706
|
+
}, "ref"> & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* Context props for the Sidebar component that manages its state and behavior.
|
|
1710
|
+
* This context provides the necessary state and methods to control the sidebar's
|
|
1711
|
+
* expansion, collapse, and mobile responsiveness.
|
|
1712
|
+
*
|
|
1713
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1714
|
+
*/
|
|
1715
|
+
type SidebarContextProps = {
|
|
1716
|
+
/** Current state of the sidebar - either expanded or collapsed */
|
|
1717
|
+
state: "expanded" | "collapsed";
|
|
1718
|
+
/** Whether the sidebar is currently open */
|
|
1719
|
+
open: boolean;
|
|
1720
|
+
/** Function to control the sidebar's open state */
|
|
1721
|
+
setOpen: (open: boolean) => void;
|
|
1722
|
+
/** Whether the mobile sidebar is currently open */
|
|
1723
|
+
openMobile: boolean;
|
|
1724
|
+
/** Function to control the mobile sidebar's open state */
|
|
1725
|
+
setOpenMobile: (open: boolean) => void;
|
|
1726
|
+
/** Whether the sidebar is being viewed on a mobile device */
|
|
1727
|
+
isMobile: boolean;
|
|
1728
|
+
/** Function to toggle the sidebar's state */
|
|
1729
|
+
toggleSidebar: () => void;
|
|
1730
|
+
};
|
|
1731
|
+
/**
|
|
1732
|
+
* Props for the main Sidebar component.
|
|
1733
|
+
* Extends the base div props and adds sidebar-specific configuration options.
|
|
1734
|
+
*
|
|
1735
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1736
|
+
*
|
|
1737
|
+
* @example
|
|
1738
|
+
* ```tsx
|
|
1739
|
+
* <Sidebar
|
|
1740
|
+
* side="left"
|
|
1741
|
+
* variant="sidebar"
|
|
1742
|
+
* collapsible="icon"
|
|
1743
|
+
* >
|
|
1744
|
+
* <SidebarContent>...</SidebarContent>
|
|
1745
|
+
* </Sidebar>
|
|
1746
|
+
* ```
|
|
1747
|
+
*/
|
|
1748
|
+
type SidebarProps = React$1.ComponentProps<"div"> & {
|
|
1749
|
+
/** Position of the sidebar relative to the main content */
|
|
1750
|
+
side?: "left" | "right";
|
|
1751
|
+
/** Visual style variant of the sidebar */
|
|
1752
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
1753
|
+
/** Collapse behavior of the sidebar */
|
|
1754
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
1755
|
+
};
|
|
1756
|
+
/**
|
|
1757
|
+
* Props for the SidebarProvider component that manages sidebar state.
|
|
1758
|
+
* Provides controlled and uncontrolled state management options.
|
|
1759
|
+
*
|
|
1760
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1761
|
+
*
|
|
1762
|
+
* @example
|
|
1763
|
+
* ```tsx
|
|
1764
|
+
* <SidebarProvider defaultOpen={true}>
|
|
1765
|
+
* <Sidebar>...</Sidebar>
|
|
1766
|
+
* </SidebarProvider>
|
|
1767
|
+
* ```
|
|
1768
|
+
*/
|
|
1769
|
+
type SidebarProviderProps = React$1.ComponentProps<"div"> & {
|
|
1770
|
+
/** Initial open state for uncontrolled usage */
|
|
1771
|
+
defaultOpen?: boolean;
|
|
1772
|
+
/** Controlled open state */
|
|
1773
|
+
open?: boolean;
|
|
1774
|
+
/** Callback when open state changes */
|
|
1775
|
+
onOpenChange?: (open: boolean) => void;
|
|
1776
|
+
};
|
|
1777
|
+
/**
|
|
1778
|
+
* Props for the SidebarMenuButton component.
|
|
1779
|
+
* Extends button props with additional styling and behavior options.
|
|
1780
|
+
*
|
|
1781
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1782
|
+
*
|
|
1783
|
+
* @example
|
|
1784
|
+
* ```tsx
|
|
1785
|
+
* <SidebarMenuButton
|
|
1786
|
+
* isActive={true}
|
|
1787
|
+
* tooltip="Dashboard"
|
|
1788
|
+
* >
|
|
1789
|
+
* <DashboardIcon />
|
|
1790
|
+
* </SidebarMenuButton>
|
|
1791
|
+
* ```
|
|
1792
|
+
*/
|
|
1793
|
+
type SidebarMenuButtonProps = React$1.ComponentProps<"button"> & {
|
|
1794
|
+
/** Whether to render as a child component */
|
|
1795
|
+
asChild?: boolean;
|
|
1796
|
+
/** Whether the button is currently active */
|
|
1797
|
+
isActive?: boolean;
|
|
1798
|
+
/** Tooltip content or configuration */
|
|
1799
|
+
tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
|
|
1800
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>;
|
|
1801
|
+
/**
|
|
1802
|
+
* Props for the SidebarMenuAction component.
|
|
1803
|
+
* Used for action buttons within the sidebar menu.
|
|
1804
|
+
*
|
|
1805
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1806
|
+
*
|
|
1807
|
+
* @example
|
|
1808
|
+
* ```tsx
|
|
1809
|
+
* <SidebarMenuAction showOnHover>
|
|
1810
|
+
* <PlusIcon />
|
|
1811
|
+
* </SidebarMenuAction>
|
|
1812
|
+
* ```
|
|
1813
|
+
*/
|
|
1814
|
+
type SidebarMenuActionProps = React$1.ComponentProps<"button"> & {
|
|
1815
|
+
/** Whether to render as a child component */
|
|
1816
|
+
asChild?: boolean;
|
|
1817
|
+
/** Whether to only show the action on hover */
|
|
1818
|
+
showOnHover?: boolean;
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
* Props for the SidebarMenuSubButton component.
|
|
1822
|
+
* Used for secondary navigation items within the sidebar.
|
|
1823
|
+
*
|
|
1824
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1825
|
+
*
|
|
1826
|
+
* @example
|
|
1827
|
+
* ```tsx
|
|
1828
|
+
* <SidebarMenuSubButton
|
|
1829
|
+
* size="sm"
|
|
1830
|
+
* isActive={true}
|
|
1831
|
+
* href="/settings/profile"
|
|
1832
|
+
* >
|
|
1833
|
+
* Profile Settings
|
|
1834
|
+
* </SidebarMenuSubButton>
|
|
1835
|
+
* ```
|
|
1836
|
+
*/
|
|
1837
|
+
type SidebarMenuSubButtonProps = React$1.ComponentProps<"a"> & {
|
|
1838
|
+
/** Whether to render as a child component */
|
|
1839
|
+
asChild?: boolean;
|
|
1840
|
+
/** Size variant of the sub-button */
|
|
1841
|
+
size?: "sm" | "md";
|
|
1842
|
+
/** Whether the sub-button is currently active */
|
|
1843
|
+
isActive?: boolean;
|
|
1844
|
+
};
|
|
1845
|
+
/**
|
|
1846
|
+
* Props for the SidebarMenuSkeleton component.
|
|
1847
|
+
* Used to show loading states in the sidebar menu.
|
|
1848
|
+
*
|
|
1849
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1850
|
+
*
|
|
1851
|
+
* @example
|
|
1852
|
+
* ```tsx
|
|
1853
|
+
* <SidebarMenuSkeleton showIcon />
|
|
1854
|
+
* ```
|
|
1855
|
+
*/
|
|
1856
|
+
type SidebarMenuSkeletonProps = React$1.ComponentProps<"div"> & {
|
|
1857
|
+
/** Whether to show an icon skeleton */
|
|
1858
|
+
showIcon?: boolean;
|
|
1859
|
+
};
|
|
1860
|
+
/**
|
|
1861
|
+
* Props for the SidebarGroupLabel component.
|
|
1862
|
+
* Used to display section labels within the sidebar.
|
|
1863
|
+
*
|
|
1864
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1865
|
+
*
|
|
1866
|
+
* @example
|
|
1867
|
+
* ```tsx
|
|
1868
|
+
* <SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
1869
|
+
* ```
|
|
1870
|
+
*/
|
|
1871
|
+
type SidebarGroupLabelProps = React$1.ComponentProps<"div"> & {
|
|
1872
|
+
/** Whether to render as a child component */
|
|
1873
|
+
asChild?: boolean;
|
|
1874
|
+
};
|
|
1875
|
+
/**
|
|
1876
|
+
* Props for the SidebarGroupAction component.
|
|
1877
|
+
* Used for action buttons within sidebar groups.
|
|
1878
|
+
*
|
|
1879
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-sidebar--docs
|
|
1880
|
+
*
|
|
1881
|
+
* @example
|
|
1882
|
+
* ```tsx
|
|
1883
|
+
* <SidebarGroupAction>
|
|
1884
|
+
* <SettingsIcon />
|
|
1885
|
+
* </SidebarGroupAction>
|
|
1886
|
+
* ```
|
|
1887
|
+
*/
|
|
1888
|
+
type SidebarGroupActionProps = React$1.ComponentProps<"button"> & {
|
|
1889
|
+
/** Whether to render as a child component */
|
|
1890
|
+
asChild?: boolean;
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* DropdownMenu component for creating accessible dropdown menus.
|
|
1895
|
+
* Built on top of Radix UI's DropdownMenu primitive.
|
|
1896
|
+
*
|
|
1897
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/organisms-dropdown-menu--docs
|
|
1898
|
+
*
|
|
1899
|
+
* @example
|
|
1900
|
+
* ```tsx
|
|
1901
|
+
* <DropdownMenu>
|
|
1902
|
+
* <DropdownMenuTrigger>Open Menu</DropdownMenuTrigger>
|
|
1903
|
+
* <DropdownMenuContent>
|
|
1904
|
+
* <DropdownMenuItem>Item 1</DropdownMenuItem>
|
|
1905
|
+
* <DropdownMenuItem>Item 2</DropdownMenuItem>
|
|
1906
|
+
* <DropdownMenuItem>Item 3</DropdownMenuItem>
|
|
1907
|
+
* </DropdownMenuContent>
|
|
1908
|
+
* </DropdownMenu>
|
|
1909
|
+
* ```
|
|
1910
|
+
*/
|
|
1911
|
+
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
1912
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1913
|
+
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1914
|
+
declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
1915
|
+
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
1916
|
+
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1917
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1918
|
+
inset?: boolean;
|
|
1919
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1920
|
+
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1921
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1922
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1923
|
+
inset?: boolean;
|
|
1924
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1925
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1926
|
+
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1927
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1928
|
+
inset?: boolean;
|
|
1929
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1930
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1931
|
+
declare const DropdownMenuShortcut: {
|
|
1932
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
1933
|
+
displayName: string;
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
declare const dropdownMenuTriggerStyle: (props?: ({
|
|
1937
|
+
variant?: "default" | "outline" | "ghost" | "link" | null | undefined;
|
|
1938
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
1939
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1940
|
+
|
|
1941
|
+
type DropdownMenuTriggerVariants = VariantProps<typeof dropdownMenuTriggerStyle>;
|
|
1942
|
+
interface DropdownMenuProps {
|
|
1943
|
+
/**
|
|
1944
|
+
* The content of the dropdown menu
|
|
1945
|
+
*/
|
|
1946
|
+
children: React.ReactNode;
|
|
1947
|
+
/**
|
|
1948
|
+
* The open state of the dropdown menu
|
|
1949
|
+
*/
|
|
1950
|
+
open?: boolean;
|
|
1951
|
+
/**
|
|
1952
|
+
* The default open state of the dropdown menu
|
|
1953
|
+
*/
|
|
1954
|
+
defaultOpen?: boolean;
|
|
1955
|
+
/**
|
|
1956
|
+
* The controlled open state of the dropdown menu
|
|
1957
|
+
*/
|
|
1958
|
+
onOpenChange?: (open: boolean) => void;
|
|
1959
|
+
/**
|
|
1960
|
+
* The modal state of the dropdown menu
|
|
1961
|
+
*/
|
|
1962
|
+
modal?: boolean;
|
|
1963
|
+
}
|
|
1964
|
+
interface DropdownMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, DropdownMenuTriggerVariants {
|
|
1965
|
+
/**
|
|
1966
|
+
* The content of the trigger
|
|
1967
|
+
*/
|
|
1968
|
+
children: React.ReactNode;
|
|
1969
|
+
/**
|
|
1970
|
+
* The variant of the trigger
|
|
1971
|
+
*/
|
|
1972
|
+
variant?: DropdownMenuTriggerVariants["variant"];
|
|
1973
|
+
/**
|
|
1974
|
+
* The size of the trigger
|
|
1975
|
+
*/
|
|
1976
|
+
size?: DropdownMenuTriggerVariants["size"];
|
|
1977
|
+
}
|
|
1978
|
+
interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1979
|
+
/**
|
|
1980
|
+
* The content of the dropdown menu
|
|
1981
|
+
*/
|
|
1982
|
+
children: React.ReactNode;
|
|
1983
|
+
/**
|
|
1984
|
+
* The side offset of the dropdown menu
|
|
1985
|
+
*/
|
|
1986
|
+
sideOffset?: number;
|
|
1987
|
+
/**
|
|
1988
|
+
* The align offset of the dropdown menu
|
|
1989
|
+
*/
|
|
1990
|
+
alignOffset?: number;
|
|
1991
|
+
/**
|
|
1992
|
+
* The side of the dropdown menu
|
|
1993
|
+
*/
|
|
1994
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
1995
|
+
/**
|
|
1996
|
+
* The alignment of the dropdown menu
|
|
1997
|
+
*/
|
|
1998
|
+
align?: "start" | "center" | "end";
|
|
1999
|
+
/**
|
|
2000
|
+
* The collision padding of the dropdown menu
|
|
2001
|
+
*/
|
|
2002
|
+
collisionPadding?: number;
|
|
2003
|
+
/**
|
|
2004
|
+
* The collision boundary of the dropdown menu
|
|
2005
|
+
*/
|
|
2006
|
+
collisionBoundary?: Element | null | Array<Element | null>;
|
|
2007
|
+
/**
|
|
2008
|
+
* The arrow padding of the dropdown menu
|
|
2009
|
+
*/
|
|
2010
|
+
arrowPadding?: number;
|
|
2011
|
+
/**
|
|
2012
|
+
* The sticky state of the dropdown menu
|
|
2013
|
+
*/
|
|
2014
|
+
sticky?: "partial" | "always";
|
|
2015
|
+
/**
|
|
2016
|
+
* The hide when detached state of the dropdown menu
|
|
2017
|
+
*/
|
|
2018
|
+
hideWhenDetached?: boolean;
|
|
2019
|
+
/**
|
|
2020
|
+
* The update position strategy of the dropdown menu
|
|
2021
|
+
*/
|
|
2022
|
+
updatePositionStrategy?: "optimized" | "always";
|
|
2023
|
+
/**
|
|
2024
|
+
* The force mount state of the dropdown menu
|
|
2025
|
+
*/
|
|
2026
|
+
forceMount?: boolean;
|
|
2027
|
+
/**
|
|
2028
|
+
* The container of the dropdown menu
|
|
2029
|
+
*/
|
|
2030
|
+
container?: HTMLElement;
|
|
2031
|
+
}
|
|
2032
|
+
interface DropdownMenuItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2033
|
+
/**
|
|
2034
|
+
* The content of the dropdown menu item
|
|
2035
|
+
*/
|
|
2036
|
+
children: React.ReactNode;
|
|
2037
|
+
/**
|
|
2038
|
+
* The inset state of the dropdown menu item
|
|
2039
|
+
*/
|
|
2040
|
+
inset?: boolean;
|
|
2041
|
+
/**
|
|
2042
|
+
* The disabled state of the dropdown menu item
|
|
2043
|
+
*/
|
|
2044
|
+
disabled?: boolean;
|
|
2045
|
+
/**
|
|
2046
|
+
* The selected state of the dropdown menu item
|
|
2047
|
+
*/
|
|
2048
|
+
selected?: boolean;
|
|
2049
|
+
}
|
|
2050
|
+
interface DropdownMenuCheckboxItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2051
|
+
/**
|
|
2052
|
+
* The content of the dropdown menu checkbox item
|
|
2053
|
+
*/
|
|
2054
|
+
children: React.ReactNode;
|
|
2055
|
+
/**
|
|
2056
|
+
* The checked state of the dropdown menu checkbox item
|
|
2057
|
+
*/
|
|
2058
|
+
checked?: boolean;
|
|
2059
|
+
/**
|
|
2060
|
+
* The disabled state of the dropdown menu checkbox item
|
|
2061
|
+
*/
|
|
2062
|
+
disabled?: boolean;
|
|
2063
|
+
/**
|
|
2064
|
+
* The on checked change handler of the dropdown menu checkbox item
|
|
2065
|
+
*/
|
|
2066
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2067
|
+
}
|
|
2068
|
+
interface DropdownMenuRadioItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2069
|
+
/**
|
|
2070
|
+
* The content of the dropdown menu radio item
|
|
2071
|
+
*/
|
|
2072
|
+
children: React.ReactNode;
|
|
2073
|
+
/**
|
|
2074
|
+
* The value of the dropdown menu radio item
|
|
2075
|
+
*/
|
|
2076
|
+
value: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* The disabled state of the dropdown menu radio item
|
|
2079
|
+
*/
|
|
2080
|
+
disabled?: boolean;
|
|
2081
|
+
}
|
|
2082
|
+
interface DropdownMenuLabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2083
|
+
/**
|
|
2084
|
+
* The content of the dropdown menu label
|
|
2085
|
+
*/
|
|
2086
|
+
children: React.ReactNode;
|
|
2087
|
+
/**
|
|
2088
|
+
* The inset state of the dropdown menu label
|
|
2089
|
+
*/
|
|
2090
|
+
inset?: boolean;
|
|
2091
|
+
}
|
|
2092
|
+
interface DropdownMenuSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2093
|
+
}
|
|
2094
|
+
interface DropdownMenuShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
2095
|
+
/**
|
|
2096
|
+
* The content of the dropdown menu shortcut
|
|
2097
|
+
*/
|
|
2098
|
+
children: React.ReactNode;
|
|
2099
|
+
}
|
|
2100
|
+
interface DropdownMenuGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2101
|
+
/**
|
|
2102
|
+
* The content of the dropdown menu group
|
|
2103
|
+
*/
|
|
2104
|
+
children: React.ReactNode;
|
|
2105
|
+
}
|
|
2106
|
+
interface DropdownMenuPortalProps {
|
|
2107
|
+
/**
|
|
2108
|
+
* The content of the dropdown menu portal
|
|
2109
|
+
*/
|
|
2110
|
+
children: React.ReactNode;
|
|
2111
|
+
/**
|
|
2112
|
+
* The container of the dropdown menu portal
|
|
2113
|
+
*/
|
|
2114
|
+
container?: HTMLElement;
|
|
2115
|
+
}
|
|
2116
|
+
interface DropdownMenuSubProps {
|
|
2117
|
+
/**
|
|
2118
|
+
* The content of the dropdown menu sub
|
|
2119
|
+
*/
|
|
2120
|
+
children: React.ReactNode;
|
|
2121
|
+
/**
|
|
2122
|
+
* The open state of the dropdown menu sub
|
|
2123
|
+
*/
|
|
2124
|
+
open?: boolean;
|
|
2125
|
+
/**
|
|
2126
|
+
* The default open state of the dropdown menu sub
|
|
2127
|
+
*/
|
|
2128
|
+
defaultOpen?: boolean;
|
|
2129
|
+
/**
|
|
2130
|
+
* The controlled open state of the dropdown menu sub
|
|
2131
|
+
*/
|
|
2132
|
+
onOpenChange?: (open: boolean) => void;
|
|
2133
|
+
}
|
|
2134
|
+
interface DropdownMenuSubContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2135
|
+
/**
|
|
2136
|
+
* The content of the dropdown menu sub content
|
|
2137
|
+
*/
|
|
2138
|
+
children: React.ReactNode;
|
|
2139
|
+
/**
|
|
2140
|
+
* The side offset of the dropdown menu sub content
|
|
2141
|
+
*/
|
|
2142
|
+
sideOffset?: number;
|
|
2143
|
+
/**
|
|
2144
|
+
* The align offset of the dropdown menu sub content
|
|
2145
|
+
*/
|
|
2146
|
+
alignOffset?: number;
|
|
2147
|
+
/**
|
|
2148
|
+
* The side of the dropdown menu sub content
|
|
2149
|
+
*/
|
|
2150
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
2151
|
+
/**
|
|
2152
|
+
* The alignment of the dropdown menu sub content
|
|
2153
|
+
*/
|
|
2154
|
+
align?: "start" | "center" | "end";
|
|
2155
|
+
/**
|
|
2156
|
+
* The collision padding of the dropdown menu sub content
|
|
2157
|
+
*/
|
|
2158
|
+
collisionPadding?: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* The collision boundary of the dropdown menu sub content
|
|
2161
|
+
*/
|
|
2162
|
+
collisionBoundary?: Element | null | Array<Element | null>;
|
|
2163
|
+
/**
|
|
2164
|
+
* The arrow padding of the dropdown menu sub content
|
|
2165
|
+
*/
|
|
2166
|
+
arrowPadding?: number;
|
|
2167
|
+
/**
|
|
2168
|
+
* The sticky state of the dropdown menu sub content
|
|
2169
|
+
*/
|
|
2170
|
+
sticky?: "partial" | "always";
|
|
2171
|
+
/**
|
|
2172
|
+
* The hide when detached state of the dropdown menu sub content
|
|
2173
|
+
*/
|
|
2174
|
+
hideWhenDetached?: boolean;
|
|
2175
|
+
/**
|
|
2176
|
+
* The update position strategy of the dropdown menu sub content
|
|
2177
|
+
*/
|
|
2178
|
+
updatePositionStrategy?: "optimized" | "always";
|
|
2179
|
+
/**
|
|
2180
|
+
* The force mount state of the dropdown menu sub content
|
|
2181
|
+
*/
|
|
2182
|
+
forceMount?: boolean;
|
|
2183
|
+
/**
|
|
2184
|
+
* The container of the dropdown menu sub content
|
|
2185
|
+
*/
|
|
2186
|
+
container?: HTMLElement;
|
|
2187
|
+
}
|
|
2188
|
+
interface DropdownMenuSubTriggerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2189
|
+
/**
|
|
2190
|
+
* The content of the dropdown menu sub trigger
|
|
2191
|
+
*/
|
|
2192
|
+
children: React.ReactNode;
|
|
2193
|
+
/**
|
|
2194
|
+
* The inset state of the dropdown menu sub trigger
|
|
2195
|
+
*/
|
|
2196
|
+
inset?: boolean;
|
|
2197
|
+
/**
|
|
2198
|
+
* The disabled state of the dropdown menu sub trigger
|
|
2199
|
+
*/
|
|
2200
|
+
disabled?: boolean;
|
|
2201
|
+
}
|
|
2202
|
+
interface DropdownMenuRadioGroupProps {
|
|
2203
|
+
/**
|
|
2204
|
+
* The content of the dropdown menu radio group
|
|
2205
|
+
*/
|
|
2206
|
+
children: React.ReactNode;
|
|
2207
|
+
/**
|
|
2208
|
+
* The value of the dropdown menu radio group
|
|
2209
|
+
*/
|
|
2210
|
+
value?: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* The default value of the dropdown menu radio group
|
|
2213
|
+
*/
|
|
2214
|
+
defaultValue?: string;
|
|
2215
|
+
/**
|
|
2216
|
+
* The controlled value of the dropdown menu radio group
|
|
2217
|
+
*/
|
|
2218
|
+
onValueChange?: (value: string) => void;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
interface RHFTextFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof Input>, "name"> {
|
|
2222
|
+
/** The name of the field in the form */
|
|
2223
|
+
name: TName;
|
|
2224
|
+
/** Optional label for the field */
|
|
2225
|
+
label?: string;
|
|
2226
|
+
/** Optional description text below the field */
|
|
2227
|
+
description?: string;
|
|
2228
|
+
/** Optional warning text to display */
|
|
2229
|
+
warningText?: string;
|
|
2230
|
+
/** Whether the field is required */
|
|
2231
|
+
required?: boolean;
|
|
2232
|
+
/** Whether the field is disabled */
|
|
2233
|
+
disabled?: boolean;
|
|
2234
|
+
/** Whether the field is read-only */
|
|
2235
|
+
readOnly?: boolean;
|
|
2236
|
+
/** The type of input (text, number, email, etc.) */
|
|
2237
|
+
type?: React$1.HTMLInputTypeAttribute;
|
|
2238
|
+
/** Optional placeholder text */
|
|
2239
|
+
placeholder?: string;
|
|
2240
|
+
/** Optional aria-label for accessibility */
|
|
2241
|
+
"aria-label"?: string;
|
|
2242
|
+
/** Optional aria-describedby for accessibility */
|
|
2243
|
+
"aria-describedby"?: string;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
/**
|
|
2247
|
+
* A text field component that integrates with React Hook Form.
|
|
2248
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2249
|
+
*
|
|
2250
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs
|
|
2251
|
+
*
|
|
2252
|
+
* * @example
|
|
2253
|
+
* ```tsx
|
|
2254
|
+
* <Form>
|
|
2255
|
+
* <RHFTextField name="name" label="Name" />
|
|
2256
|
+
* <RHFTextField name="email" label="Email" />
|
|
2257
|
+
* </Form>
|
|
2258
|
+
* ```
|
|
2259
|
+
*/
|
|
2260
|
+
declare function RHFTextField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, type, warningText, required, disabled, readOnly, placeholder, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, onBlur, ...other }: RHFTextFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2261
|
+
|
|
2262
|
+
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
2263
|
+
/**
|
|
2264
|
+
* Whether the textarea should automatically resize
|
|
2265
|
+
*/
|
|
2266
|
+
autoResize?: boolean;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* Textarea component for creating accessible text areas.
|
|
2271
|
+
* Built on top of shadcn/ui's Textarea component.
|
|
2272
|
+
*
|
|
2273
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs
|
|
2274
|
+
*
|
|
2275
|
+
* @example
|
|
2276
|
+
* ```tsx
|
|
2277
|
+
* <Textarea placeholder="Enter text" />
|
|
2278
|
+
* ```
|
|
2279
|
+
*/
|
|
2280
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
2281
|
+
|
|
2282
|
+
interface RHFTextareaProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof Textarea>, "name"> {
|
|
2283
|
+
/** The name of the field in the form */
|
|
2284
|
+
name: TName;
|
|
2285
|
+
/** Optional label for the field */
|
|
2286
|
+
label?: string;
|
|
2287
|
+
/** Optional description text below the field */
|
|
2288
|
+
description?: string;
|
|
2289
|
+
/** Optional warning text to display */
|
|
2290
|
+
warningText?: string;
|
|
2291
|
+
/** Whether the field is required */
|
|
2292
|
+
required?: boolean;
|
|
2293
|
+
/** Whether the field is disabled */
|
|
2294
|
+
disabled?: boolean;
|
|
2295
|
+
/** Whether the field is read-only */
|
|
2296
|
+
readOnly?: boolean;
|
|
2297
|
+
/** Optional placeholder text */
|
|
2298
|
+
placeholder?: string;
|
|
2299
|
+
/** Optional aria-label for accessibility */
|
|
2300
|
+
"aria-label"?: string;
|
|
2301
|
+
/** Optional aria-describedby for accessibility */
|
|
2302
|
+
"aria-describedby"?: string;
|
|
2303
|
+
/** Whether the textarea should automatically resize */
|
|
2304
|
+
autoResize?: boolean;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
/**
|
|
2308
|
+
* A textarea component that integrates with React Hook Form.
|
|
2309
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2310
|
+
*
|
|
2311
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextarea--docs
|
|
2312
|
+
*
|
|
2313
|
+
* @example
|
|
2314
|
+
* ```tsx
|
|
2315
|
+
* <Form>
|
|
2316
|
+
* <RHFTextarea name="description" label="Description" />
|
|
2317
|
+
* </Form>
|
|
2318
|
+
* ```
|
|
2319
|
+
*/
|
|
2320
|
+
declare function RHFTextarea<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, placeholder, autoResize, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, onBlur, ...other }: RHFTextareaProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2321
|
+
|
|
2322
|
+
interface RHFCheckboxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof Checkbox>, "name"> {
|
|
2323
|
+
/** The name of the field in the form */
|
|
2324
|
+
name: TName;
|
|
2325
|
+
/** Optional label for the field */
|
|
2326
|
+
label?: string;
|
|
2327
|
+
/** Optional description text below the field */
|
|
2328
|
+
description?: string;
|
|
2329
|
+
/** Optional warning text to display */
|
|
2330
|
+
warningText?: string;
|
|
2331
|
+
/** Whether the field is required */
|
|
2332
|
+
required?: boolean;
|
|
2333
|
+
/** Whether the field is disabled */
|
|
2334
|
+
disabled?: boolean;
|
|
2335
|
+
/** Whether the field is read-only */
|
|
2336
|
+
readOnly?: boolean;
|
|
2337
|
+
/** Optional aria-label for accessibility */
|
|
2338
|
+
"aria-label"?: string;
|
|
2339
|
+
/** Optional aria-describedby for accessibility */
|
|
2340
|
+
"aria-describedby"?: string;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/**
|
|
2344
|
+
* A checkbox component that integrates with React Hook Form.
|
|
2345
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2346
|
+
*
|
|
2347
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfcheckbox--docs
|
|
2348
|
+
*
|
|
2349
|
+
* @example
|
|
2350
|
+
* ```tsx
|
|
2351
|
+
* <Form>
|
|
2352
|
+
* <RHFCheckbox name="terms" label="Accept terms and conditions" />
|
|
2353
|
+
* </Form>
|
|
2354
|
+
* ```
|
|
2355
|
+
*/
|
|
2356
|
+
declare function RHFCheckbox<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, ...other }: RHFCheckboxProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2357
|
+
|
|
2358
|
+
interface RHFSwitchProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof Switch>, "name"> {
|
|
2359
|
+
/** The name of the field in the form */
|
|
2360
|
+
name: TName;
|
|
2361
|
+
/** Optional label for the field */
|
|
2362
|
+
label?: string;
|
|
2363
|
+
/** Optional description text below the field */
|
|
2364
|
+
description?: string;
|
|
2365
|
+
/** Optional warning text to display */
|
|
2366
|
+
warningText?: string;
|
|
2367
|
+
/** Whether the field is required */
|
|
2368
|
+
required?: boolean;
|
|
2369
|
+
/** Whether the field is disabled */
|
|
2370
|
+
disabled?: boolean;
|
|
2371
|
+
/** Whether the field is read-only */
|
|
2372
|
+
readOnly?: boolean;
|
|
2373
|
+
/** Optional aria-label for accessibility */
|
|
2374
|
+
"aria-label"?: string;
|
|
2375
|
+
/** Optional aria-describedby for accessibility */
|
|
2376
|
+
"aria-describedby"?: string;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
/**
|
|
2380
|
+
* A switch component that integrates with React Hook Form.
|
|
2381
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2382
|
+
*
|
|
2383
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfswitch--docs
|
|
2384
|
+
*
|
|
2385
|
+
* @example
|
|
2386
|
+
* ```tsx
|
|
2387
|
+
* <Form>
|
|
2388
|
+
* <RHFSwitch name="notifications" label="Enable notifications" />
|
|
2389
|
+
* </Form>
|
|
2390
|
+
* ```
|
|
2391
|
+
*/
|
|
2392
|
+
declare function RHFSwitch<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, ...other }: RHFSwitchProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2393
|
+
|
|
2394
|
+
interface RHFRadioGroupOption {
|
|
2395
|
+
label: string;
|
|
2396
|
+
id: string;
|
|
2397
|
+
}
|
|
2398
|
+
interface RHFRadioGroupWithChildrenProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof RadioGroup>, "name"> {
|
|
2399
|
+
/** The name of the field in the form */
|
|
2400
|
+
name: TName;
|
|
2401
|
+
/** Optional label for the field */
|
|
2402
|
+
label?: string;
|
|
2403
|
+
/** Optional description text below the field */
|
|
2404
|
+
description?: string;
|
|
2405
|
+
/** Optional warning text to display */
|
|
2406
|
+
warningText?: string;
|
|
2407
|
+
/** Whether the field is required */
|
|
2408
|
+
required?: boolean;
|
|
2409
|
+
/** Whether the field is disabled */
|
|
2410
|
+
disabled?: boolean;
|
|
2411
|
+
/** Whether the field is read-only */
|
|
2412
|
+
readOnly?: boolean;
|
|
2413
|
+
/** Optional aria-label for accessibility */
|
|
2414
|
+
"aria-label"?: string;
|
|
2415
|
+
/** Optional aria-describedby for accessibility */
|
|
2416
|
+
"aria-describedby"?: string;
|
|
2417
|
+
/** Children must be RadioGroupItem components */
|
|
2418
|
+
children: React$1.ReactNode;
|
|
2419
|
+
}
|
|
2420
|
+
interface RHFRadioGroupWithOptionsProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof RadioGroup>, "name"> {
|
|
2421
|
+
/** The name of the field in the form */
|
|
2422
|
+
name: TName;
|
|
2423
|
+
/** Optional label for the field */
|
|
2424
|
+
label?: string;
|
|
2425
|
+
/** radio group options */
|
|
2426
|
+
options: RHFRadioGroupOption[];
|
|
2427
|
+
/** Optional description text below the field */
|
|
2428
|
+
description?: string;
|
|
2429
|
+
/** Optional warning text to display */
|
|
2430
|
+
warningText?: string;
|
|
2431
|
+
/** Whether the field is required */
|
|
2432
|
+
required?: boolean;
|
|
2433
|
+
/** Whether the field is disabled */
|
|
2434
|
+
disabled?: boolean;
|
|
2435
|
+
/** Whether the field is read-only */
|
|
2436
|
+
readOnly?: boolean;
|
|
2437
|
+
/** Optional aria-label for accessibility */
|
|
2438
|
+
"aria-label"?: string;
|
|
2439
|
+
/** Optional aria-describedby for accessibility */
|
|
2440
|
+
"aria-describedby"?: string;
|
|
2441
|
+
}
|
|
2442
|
+
type RHFRadioGroupProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = RHFRadioGroupWithChildrenProps<TFieldValues, TName> | RHFRadioGroupWithOptionsProps<TFieldValues, TName>;
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* A radio group component that integrates with React Hook Form.
|
|
2446
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2447
|
+
*
|
|
2448
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiogroup--docs
|
|
2449
|
+
*
|
|
2450
|
+
* @example
|
|
2451
|
+
* ```tsx
|
|
2452
|
+
* // Using children
|
|
2453
|
+
* <Form>
|
|
2454
|
+
* <RHFRadioGroup name="preference" label="Select your preference">
|
|
2455
|
+
* <RadioGroupItem value="option1" label="Option 1" />
|
|
2456
|
+
* <RadioGroupItem value="option2" label="Option 2" />
|
|
2457
|
+
* </RHFRadioGroup>
|
|
2458
|
+
* </Form>
|
|
2459
|
+
*
|
|
2460
|
+
* // Using options prop
|
|
2461
|
+
* <Form>
|
|
2462
|
+
* <RHFRadioGroup
|
|
2463
|
+
* name="preference"
|
|
2464
|
+
* label="Select your preference"
|
|
2465
|
+
* options={[
|
|
2466
|
+
* { id: "option1", label: "Option 1" },
|
|
2467
|
+
* { id: "option2", label: "Option 2" }
|
|
2468
|
+
* ]}
|
|
2469
|
+
* />
|
|
2470
|
+
* </Form>
|
|
2471
|
+
* ```
|
|
2472
|
+
*/
|
|
2473
|
+
declare function RHFRadioGroup<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, children, ...other }: RHFRadioGroupProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2474
|
+
|
|
2475
|
+
interface RHFRadioButtonGroupOption {
|
|
2476
|
+
label: string;
|
|
2477
|
+
id: string;
|
|
2478
|
+
size?: "default" | "sm" | "lg";
|
|
2479
|
+
}
|
|
2480
|
+
interface RHFRadioButtonGroupProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React$1.ComponentProps<typeof RadioGroup>, "name"> {
|
|
2481
|
+
/** The name of the field in the form */
|
|
2482
|
+
name: TName;
|
|
2483
|
+
/** Optional label for the field */
|
|
2484
|
+
label?: string;
|
|
2485
|
+
/** Optional description text below the field */
|
|
2486
|
+
description?: string;
|
|
2487
|
+
/** Optional warning text to display */
|
|
2488
|
+
warningText?: string;
|
|
2489
|
+
/** Whether the field is required */
|
|
2490
|
+
required?: boolean;
|
|
2491
|
+
/** Whether the field is disabled */
|
|
2492
|
+
disabled?: boolean;
|
|
2493
|
+
/** Whether the field is read-only */
|
|
2494
|
+
readOnly?: boolean;
|
|
2495
|
+
/** Optional aria-label for accessibility */
|
|
2496
|
+
"aria-label"?: string;
|
|
2497
|
+
/** Optional aria-describedby for accessibility */
|
|
2498
|
+
"aria-describedby"?: string;
|
|
2499
|
+
/** Radio button group options */
|
|
2500
|
+
options: RHFRadioButtonGroupOption[];
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* A radio button group component that integrates with React Hook Form.
|
|
2505
|
+
* Uses buttons instead of traditional radio inputs for a more modern look.
|
|
2506
|
+
*
|
|
2507
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiobuttongroup--docs
|
|
2508
|
+
*
|
|
2509
|
+
* @example
|
|
2510
|
+
* ```tsx
|
|
2511
|
+
* <Form>
|
|
2512
|
+
* <RHFRadioButtonGroup
|
|
2513
|
+
* name="preference"
|
|
2514
|
+
* label="Select your preference"
|
|
2515
|
+
* options={[
|
|
2516
|
+
* { value: "option1", label: "Option 1" },
|
|
2517
|
+
* { value: "option2", label: "Option 2" },
|
|
2518
|
+
* { value: "option3", label: "Option 3" }
|
|
2519
|
+
* ]}
|
|
2520
|
+
* />
|
|
2521
|
+
* </Form>
|
|
2522
|
+
* ```
|
|
2523
|
+
*/
|
|
2524
|
+
declare function RHFRadioButtonGroup<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, options, ...other }: RHFRadioButtonGroupProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2525
|
+
|
|
2526
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
2527
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
2528
|
+
declare const useFormField: () => {
|
|
2529
|
+
invalid: boolean;
|
|
2530
|
+
isDirty: boolean;
|
|
2531
|
+
isTouched: boolean;
|
|
2532
|
+
isValidating: boolean;
|
|
2533
|
+
error?: react_hook_form.FieldError;
|
|
2534
|
+
id: string;
|
|
2535
|
+
name: string;
|
|
2536
|
+
formItemId: string;
|
|
2537
|
+
formDescriptionId: string;
|
|
2538
|
+
formMessageId: string;
|
|
2539
|
+
};
|
|
2540
|
+
declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2541
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
2542
|
+
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
2543
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
2544
|
+
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
2545
|
+
|
|
2546
|
+
/**
|
|
2547
|
+
* Props interface for the Form component.
|
|
2548
|
+
* Extends react-hook-form's FormProvider props.
|
|
2549
|
+
*/
|
|
2550
|
+
interface FormProps<TFieldValues extends FieldValues = FieldValues> {
|
|
2551
|
+
/**
|
|
2552
|
+
* The form context value
|
|
2553
|
+
*/
|
|
2554
|
+
context: React$1.Context<TFieldValues>;
|
|
2555
|
+
/**
|
|
2556
|
+
* The form children
|
|
2557
|
+
*/
|
|
2558
|
+
children: React$1.ReactNode;
|
|
2559
|
+
}
|
|
2560
|
+
/**
|
|
2561
|
+
* Props interface for the FormField component.
|
|
2562
|
+
* Extends react-hook-form's Controller props.
|
|
2563
|
+
*/
|
|
2564
|
+
interface FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends ControllerProps<TFieldValues, TName> {
|
|
2565
|
+
}
|
|
2566
|
+
/**
|
|
2567
|
+
* Props interface for the FormItem component.
|
|
2568
|
+
* Extends HTML div attributes.
|
|
2569
|
+
*/
|
|
2570
|
+
interface FormItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2571
|
+
}
|
|
2572
|
+
/**
|
|
2573
|
+
* Props interface for the FormLabel component.
|
|
2574
|
+
* Extends Radix UI Label props.
|
|
2575
|
+
*/
|
|
2576
|
+
interface FormLabelProps extends React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
2577
|
+
}
|
|
2578
|
+
/**
|
|
2579
|
+
* Props interface for the FormControl component.
|
|
2580
|
+
* Extends Radix UI Slot props.
|
|
2581
|
+
*/
|
|
2582
|
+
interface FormControlProps extends React$1.ComponentPropsWithoutRef<typeof Slot> {
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Props interface for the FormDescription component.
|
|
2586
|
+
* Extends HTML paragraph attributes.
|
|
2587
|
+
*/
|
|
2588
|
+
interface FormDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* Props interface for the FormMessage component.
|
|
2592
|
+
* Extends HTML paragraph attributes.
|
|
2593
|
+
*/
|
|
2594
|
+
interface FormMessageProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
2595
|
+
/**
|
|
2596
|
+
* The message content
|
|
2597
|
+
*/
|
|
2598
|
+
children?: React$1.ReactNode;
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Context value type for form field context
|
|
2602
|
+
*/
|
|
2603
|
+
type FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
2604
|
+
name: TName;
|
|
2605
|
+
};
|
|
2606
|
+
/**
|
|
2607
|
+
* Context value type for form item context
|
|
2608
|
+
*/
|
|
2609
|
+
type FormItemContextValue = {
|
|
2610
|
+
id: string;
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2613
|
+
interface RHFMultiSelectProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<MultiSelectProps, "name" | "value" | "onChange"> {
|
|
2614
|
+
/** The name of the field in the form */
|
|
2615
|
+
name: TName;
|
|
2616
|
+
/** Optional label for the field */
|
|
2617
|
+
label?: string;
|
|
2618
|
+
/** Optional description text below the field */
|
|
2619
|
+
description?: string;
|
|
2620
|
+
/** Optional warning text to display */
|
|
2621
|
+
warningText?: string;
|
|
2622
|
+
/** Whether the field is read-only */
|
|
2623
|
+
readOnly?: boolean;
|
|
2624
|
+
/** Optional aria-label for accessibility */
|
|
2625
|
+
"aria-label"?: string;
|
|
2626
|
+
/** Optional aria-describedby for accessibility */
|
|
2627
|
+
"aria-describedby"?: string;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* A multi-select component that integrates with React Hook Form.
|
|
2632
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2633
|
+
*
|
|
2634
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfmultiselect--docs
|
|
2635
|
+
*
|
|
2636
|
+
* @example
|
|
2637
|
+
* ```tsx
|
|
2638
|
+
* <Form>
|
|
2639
|
+
* <RHFMultiSelect
|
|
2640
|
+
* name="countries"
|
|
2641
|
+
* label="Countries"
|
|
2642
|
+
* options={[
|
|
2643
|
+
* { id: "us", label: "United States" },
|
|
2644
|
+
* { id: "ca", label: "Canada" }
|
|
2645
|
+
* ]}
|
|
2646
|
+
*
|
|
2647
|
+
* />
|
|
2648
|
+
* </Form>
|
|
2649
|
+
* ```
|
|
2650
|
+
*/
|
|
2651
|
+
declare function RHFMultiSelect<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, placeholder, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, options, ...other }: RHFMultiSelectProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2652
|
+
|
|
2653
|
+
type RHFSelectOption = SelectOption;
|
|
2654
|
+
interface RHFSelectProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<SelectProps, "name" | "value" | "onChange"> {
|
|
2655
|
+
/** The name of the field in the form */
|
|
2656
|
+
name: TName;
|
|
2657
|
+
/** Optional label for the field */
|
|
2658
|
+
label?: string;
|
|
2659
|
+
/** Optional description text below the field */
|
|
2660
|
+
description?: string;
|
|
2661
|
+
/** Optional warning text to display */
|
|
2662
|
+
warningText?: string;
|
|
2663
|
+
/** Whether the field is read-only */
|
|
2664
|
+
readOnly?: boolean;
|
|
2665
|
+
/** Optional aria-label for accessibility */
|
|
2666
|
+
"aria-label"?: string;
|
|
2667
|
+
/** Optional aria-describedby for accessibility */
|
|
2668
|
+
"aria-describedby"?: string;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* A select component that integrates with React Hook Form.
|
|
2673
|
+
* Provides form validation, error handling, and accessibility features.
|
|
2674
|
+
*
|
|
2675
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfselect--docs
|
|
2676
|
+
*
|
|
2677
|
+
* @example
|
|
2678
|
+
* ```tsx
|
|
2679
|
+
* <Form>
|
|
2680
|
+
* <RHFSelect
|
|
2681
|
+
* name="country"
|
|
2682
|
+
* label="Country"
|
|
2683
|
+
* options={[
|
|
2684
|
+
* { id: "us", label: "United States" },
|
|
2685
|
+
* { id: "ca", label: "Canada" }
|
|
2686
|
+
* ]}
|
|
2687
|
+
* />
|
|
2688
|
+
* </Form>
|
|
2689
|
+
* ```
|
|
2690
|
+
*/
|
|
2691
|
+
declare function RHFSelect<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, placeholder, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, options, ...other }: RHFSelectProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2692
|
+
|
|
2693
|
+
declare function useIsMobile(): boolean;
|
|
2694
|
+
|
|
2695
|
+
type ToasterToast = ToastProps & {
|
|
2696
|
+
id: string;
|
|
2697
|
+
title?: React$1.ReactNode;
|
|
2698
|
+
description?: React$1.ReactNode;
|
|
2699
|
+
action?: ToastActionElement;
|
|
2700
|
+
};
|
|
2701
|
+
declare const actionTypes: {
|
|
2702
|
+
readonly ADD_TOAST: "ADD_TOAST";
|
|
2703
|
+
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
|
2704
|
+
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
|
2705
|
+
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
|
2706
|
+
};
|
|
2707
|
+
type ActionType = typeof actionTypes;
|
|
2708
|
+
type Action = {
|
|
2709
|
+
type: ActionType["ADD_TOAST"];
|
|
2710
|
+
toast: ToasterToast;
|
|
2711
|
+
} | {
|
|
2712
|
+
type: ActionType["UPDATE_TOAST"];
|
|
2713
|
+
toast: Partial<ToasterToast>;
|
|
2714
|
+
} | {
|
|
2715
|
+
type: ActionType["DISMISS_TOAST"];
|
|
2716
|
+
toastId?: ToasterToast["id"];
|
|
2717
|
+
} | {
|
|
2718
|
+
type: ActionType["REMOVE_TOAST"];
|
|
2719
|
+
toastId?: ToasterToast["id"];
|
|
2720
|
+
};
|
|
2721
|
+
interface State {
|
|
2722
|
+
toasts: ToasterToast[];
|
|
2723
|
+
}
|
|
2724
|
+
declare const reducer: (state: State, action: Action) => State;
|
|
2725
|
+
type Toast = Omit<ToasterToast, "id">;
|
|
2726
|
+
declare function toast({ ...props }: Toast): {
|
|
2727
|
+
id: string;
|
|
2728
|
+
dismiss: () => void;
|
|
2729
|
+
update: (props: ToasterToast) => void;
|
|
2730
|
+
};
|
|
2731
|
+
declare function useToast(): {
|
|
2732
|
+
toast: typeof toast;
|
|
2733
|
+
dismiss: (toastId?: string) => void;
|
|
2734
|
+
toasts: ToasterToast[];
|
|
2735
|
+
};
|
|
2736
|
+
|
|
2737
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
2738
|
+
|
|
2739
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, type CommandEmptyRef, CommandGroup, type CommandGroupProps, type CommandGroupRef, CommandInput, type CommandInputProps, type CommandInputRef, CommandItem, type CommandItemProps, type CommandItemRef, CommandList, type CommandListProps, type CommandListRef, type CommandProps, type CommandRef, CommandSeparator, type CommandSeparatorProps, type CommandSeparatorRef, CommandShortcut, type CommandShortcutProps, Container, type ContainerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, type FormFieldContextValue, type FormFieldProps, FormItem, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps, Input, Label, type LabelProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, PageLoader, type PageLoaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, RHFCheckbox, RHFMultiSelect, RHFRadioButtonGroup, type RHFRadioButtonGroupOption, type RHFRadioButtonGroupProps, RHFRadioGroup, RHFSelect, type RHFSelectOption, type RHFSelectProps, RHFSwitch, RHFTextField, RHFTextarea, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioItemContainer, RadioItemLabel, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, Select, type SelectOption, type SelectProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Stack, type StackProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TextField, type TextFieldProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, type TypographyAlign, type TypographyProps, type TypographyVariant, badgeVariants, buttonVariants, cn, reducer, sidebarMenuButtonVariants, toast, typographyVariants, useFormField, useIsMobile, useSidebar, useToast };
|