bako-ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,313 @@
1
+ import * as react from 'react';
2
+ import react__default, { FC } from 'react';
3
+ import * as _chakra_ui_react from '@chakra-ui/react';
4
+ import { StackProps as StackProps$1, GridProps as GridProps$1, GridItemProps as GridItemProps$1, ButtonProps as ButtonProps$1, Card as Card$1, Clipboard as Clipboard$1, CloseButtonProps as CloseButtonProps$1, ContainerProps as ContainerProps$1, IconButtonProps as IconButtonProps$1, QrCode as QrCode$1, IconProps, LinkProps as LinkProps$1, LinkOverlayProps as LinkOverlayProps$1, Checkbox as Checkbox$1, Combobox as Combobox$1, Portal, InputProps as InputProps$1, RadioGroup as RadioGroup$1, ComboboxRootProps, FieldLabelProps, InputGroupProps, BoxProps, Select as Select$1, Switch as Switch$1, TextareaProps, Avatar as Avatar$1, GroupProps, EmptyState as EmptyState$1, Tooltip as Tooltip$1, Dialog as Dialog$1, Drawer as Drawer$1, Popover as Popover$1, Toast as Toast$1, CreateToasterReturn, Accordion as Accordion$1, Breadcrumb as Breadcrumb$1, List as List$1, Steps as Steps$1, Tabs as Tabs$1, Menu as Menu$1, ChakraProviderProps } from '@chakra-ui/react';
5
+ export { Alert, BadgeProps, Box, BoxProps, ButtonGroup, CardBodyProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardRootProps, CardTitleProps, Center, CenterProps, Icon as ChakraIcon, ClientOnly, ClientOnlyProps, ClipboardTriggerProps, ComboboxClearTriggerProps, ComboboxContentProps, ComboboxControlProps, ComboboxInputProps, ComboboxItemGroupLabelProps, ComboboxItemGroupProps, ComboboxItemProps, ComboboxItemTextProps, ComboboxLabelProps, ComboboxPositionerProps, ComboboxRootProps, ComboboxTriggerProps, DialogActionTriggerProps, DialogBackdropProps, DialogBodyProps, DialogCloseTriggerProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOpenChangeDetails, DialogPositionerProps, DialogRootProps, DialogTitleProps, DialogTriggerProps, DrawerActionTriggerProps, DrawerBackdropProps, DrawerBodyProps, DrawerCloseTriggerProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerOpenChangeDetails, DrawerPositionerProps, DrawerRootProps, DrawerTitleProps, DrawerTriggerProps, EmptyStateContentProps, EmptyStateDescriptionProps, EmptyStateIndicatorProps, EmptyStateRootProps, EmptyStateTitleProps, Field, FieldErrorIconProps, FieldErrorTextProps, FieldHelperTextProps, FieldLabelProps, FieldRootProps, Flex, FlexProps, FormatNumber, Heading, HeadingProps, IconProps, Image, ImageProps, InputAddonProps, InputElementProps, InputGroup, InputGroupProps, ListItemProps, ListRootProps, Spinner as Loader, SpinnerProps as LoaderProps, MenuArrowProps, MenuArrowTipProps, MenuCheckboxItemProps, MenuContentProps, MenuContextTriggerProps, MenuIndicatorProps, MenuItemCommandProps, MenuItemGroupLabelProps, MenuItemGroupProps, MenuItemIndicatorProps, MenuItemProps, MenuItemTextProps, MenuOpenChangeDetails, MenuPositionerProps, MenuRadioItemGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuTriggerItemProps, MenuTriggerProps, Portal, QrCodeRootProps, SelectClearTriggerProps, SelectContentProps, SelectControlProps, SelectIndicatorGroupProps, SelectIndicatorProps, SelectItemGroupLabelProps, SelectItemGroupProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectPositionerProps, SelectRootProps, SelectTriggerProps, SelectValueTextProps, Separator, SeparatorProps, SkeletonCircleProps, SkeletonProps, SkeletonTextProps, Spacer, SpacerProps, Span, SpanProps, Text, TextProps, createIcon, createListCollection, createToaster, useAccordion, useAccordionContext, useAccordionItemContext, useClipboard, useMediaQuery, useSteps, useStepsContext, useStepsItemContext } from '@chakra-ui/react';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ import { FieldValues, FieldPath, UseControllerProps, FieldError } from 'react-hook-form';
8
+ import { Mask, Options } from 'use-mask-input';
9
+
10
+ declare const Stack: react.ForwardRefExoticComponent<_chakra_ui_react.StackProps & react.RefAttributes<HTMLDivElement>>;
11
+ declare const HStack: react.ForwardRefExoticComponent<_chakra_ui_react.StackProps & react.RefAttributes<HTMLDivElement>>;
12
+ declare const VStack: react.ForwardRefExoticComponent<_chakra_ui_react.StackProps & react.RefAttributes<HTMLDivElement>>;
13
+
14
+ type StackProps = StackProps$1;
15
+ type HStackProps = StackProps$1;
16
+ type VStackProps = StackProps$1;
17
+
18
+ interface GridProps extends GridProps$1 {
19
+ }
20
+ interface GridItemProps extends GridItemProps$1 {
21
+ }
22
+
23
+ declare function Grid(props: GridProps): react_jsx_runtime.JSX.Element;
24
+ declare function GridItem(props: GridItemProps$1): react_jsx_runtime.JSX.Element;
25
+
26
+ declare const Badge: react.ForwardRefExoticComponent<_chakra_ui_react.BadgeProps & react.RefAttributes<HTMLSpanElement>>;
27
+
28
+ interface ButtonProps extends ButtonProps$1 {
29
+ }
30
+
31
+ declare function Button({ colorPalette, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
32
+
33
+ declare const Card: typeof Card$1;
34
+
35
+ declare const Clipboard: typeof Clipboard$1;
36
+
37
+ interface CloseButtonProps extends CloseButtonProps$1 {
38
+ }
39
+
40
+ declare const _default$4: react.ForwardRefExoticComponent<CloseButtonProps & react.RefAttributes<HTMLButtonElement>>;
41
+
42
+ interface ContainerProps extends ContainerProps$1 {
43
+ }
44
+
45
+ declare function Container(props: ContainerProps): react_jsx_runtime.JSX.Element;
46
+
47
+ interface IconButtonProps extends IconButtonProps$1 {
48
+ }
49
+
50
+ declare const _default$3: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
51
+
52
+ declare const QrCode: typeof QrCode$1;
53
+
54
+ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
55
+
56
+ interface LinkProps extends LinkProps$1 {
57
+ }
58
+
59
+ declare const _default$2: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
60
+
61
+ interface LinkOverlayProps extends LinkOverlayProps$1 {
62
+ }
63
+
64
+ declare const _default$1: react.ForwardRefExoticComponent<LinkOverlayProps & react.RefAttributes<HTMLAnchorElement>>;
65
+
66
+ declare const Skeleton: react.ForwardRefExoticComponent<_chakra_ui_react.SkeletonProps & react.RefAttributes<HTMLDivElement>>;
67
+ declare const SkeletonCircle: react.ForwardRefExoticComponent<_chakra_ui_react.SkeletonCircleProps & react.RefAttributes<HTMLDivElement>>;
68
+ declare const SkeletonText: react.ForwardRefExoticComponent<_chakra_ui_react.SkeletonTextProps & react.RefAttributes<HTMLDivElement>>;
69
+
70
+ interface CheckboxProps extends Checkbox$1.RootProps {
71
+ icon?: react__default.ReactNode;
72
+ inputProps?: react__default.InputHTMLAttributes<HTMLInputElement>;
73
+ rootRef?: react__default.RefObject<HTMLLabelElement | null>;
74
+ }
75
+
76
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
77
+
78
+ declare const Combobox: typeof Combobox$1 & {
79
+ Portal: typeof Portal;
80
+ };
81
+
82
+ interface InputProps extends InputProps$1 {
83
+ }
84
+
85
+ declare const _default: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
86
+
87
+ interface MoneyFieldProps extends Omit<InputProps$1, 'value' | 'onChange' | 'type'> {
88
+ value: string | number;
89
+ onChange: (value: string) => void;
90
+ /**
91
+ * The character to use as a thousand separator
92
+ * @default ','
93
+ */
94
+ thousandSeparator?: string;
95
+ /**
96
+ * The character to use as a decimal separator
97
+ * @default '.'
98
+ */
99
+ decimalSeparator?: string;
100
+ /**
101
+ * The number of decimal places to allow
102
+ * @default 2
103
+ */
104
+ decimalScale?: number;
105
+ }
106
+
107
+ declare function MoneyField({ value, onChange, thousandSeparator, decimalSeparator, decimalScale, ...props }: MoneyFieldProps): react_jsx_runtime.JSX.Element;
108
+
109
+ interface RadioGroupProps extends RadioGroup$1.RootProps {
110
+ }
111
+ interface RadioProps extends RadioGroup$1.ItemProps {
112
+ inputProps?: react__default.InputHTMLAttributes<HTMLInputElement>;
113
+ }
114
+
115
+ declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>;
116
+ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
117
+
118
+ type EnumOption<T = string> = {
119
+ label: string;
120
+ value: T;
121
+ };
122
+
123
+ type RhfComboboxOptions = (EnumOption & {
124
+ imageUrl?: never;
125
+ }) | (EnumOption & {
126
+ imageUrl: string;
127
+ });
128
+ type RhfComboboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = UseControllerProps<TFieldValues, TName> & {
129
+ options: RhfComboboxOptions[];
130
+ label?: string;
131
+ helperText?: string;
132
+ disabled?: boolean;
133
+ error?: FieldError;
134
+ noOptionsText?: string;
135
+ isLoadingOptions?: boolean;
136
+ openOnFocus?: boolean;
137
+ variant?: ComboboxRootProps['variant'];
138
+ showTrigger?: boolean;
139
+ clearTriggerIcon?: React.ReactNode;
140
+ allowCustomValue?: boolean;
141
+ slotProps?: {
142
+ root?: Omit<ComboboxRootProps, 'collection' | 'openOnClick'>;
143
+ label?: FieldLabelProps;
144
+ input?: Omit<InputProps, 'value' | 'onChange' | 'disabled' | 'type'>;
145
+ };
146
+ };
147
+
148
+ declare function RhfCombobox<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, defaultValue, label, error, options, disabled, helperText, isLoadingOptions, noOptionsText, openOnFocus, slotProps, variant, clearTriggerIcon, showTrigger, allowCustomValue, }: RhfComboboxProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
149
+
150
+ type RhfInputProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = UseControllerProps<TFieldValues, TName> & {
151
+ label: string;
152
+ type?: string;
153
+ helperText?: string;
154
+ disabled?: boolean;
155
+ error?: FieldError;
156
+ slotProps?: {
157
+ inputGroup?: Omit<InputGroupProps, 'children'>;
158
+ input?: Omit<InputProps$1, 'value' | 'onChange' | 'placeholder' | 'name' | 'children' | 'variant'>;
159
+ label?: FieldLabelProps;
160
+ root?: BoxProps;
161
+ };
162
+ };
163
+
164
+ declare function RhfInput<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, defaultValue, name, label, error, type, helperText, slotProps, ...props }: RhfInputProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
165
+
166
+ type RhfMoneyFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = UseControllerProps<TFieldValues, TName> & Omit<MoneyFieldProps, 'value' | 'onChange'> & {
167
+ label: string;
168
+ error?: FieldError;
169
+ helperText?: string;
170
+ slotProps?: {
171
+ inputGroup?: Omit<InputGroupProps, 'children'>;
172
+ label?: FieldLabelProps;
173
+ root?: BoxProps;
174
+ };
175
+ };
176
+
177
+ declare function RhfMoneyField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, defaultValue, name, label, error, thousandSeparator, decimalSeparator, decimalScale, helperText, slotProps, disabled, ...props }: RhfMoneyFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
178
+
179
+ declare const Select: typeof Select$1 & {
180
+ Portal: typeof Portal;
181
+ };
182
+
183
+ interface SwitchProps extends Switch$1.RootProps {
184
+ inputProps?: react__default.InputHTMLAttributes<HTMLInputElement>;
185
+ thumbLabel?: {
186
+ on?: react__default.ReactNode;
187
+ off?: react__default.ReactNode;
188
+ };
189
+ }
190
+
191
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
192
+
193
+ interface TextAreaProps extends TextareaProps {
194
+ }
195
+
196
+ declare function TextArea(props: TextAreaProps): react_jsx_runtime.JSX.Element;
197
+
198
+ interface TextMaskProps extends Omit<InputProps, 'mask'> {
199
+ mask: Mask;
200
+ maskOptions?: Options;
201
+ }
202
+
203
+ declare const TextMask: react.ForwardRefExoticComponent<TextMaskProps & react.RefAttributes<HTMLInputElement>>;
204
+
205
+ interface AvatarProps extends Avatar$1.RootProps {
206
+ /**
207
+ * The name to derive the initials from. If not provided, the fallback will display a generic icon
208
+ */
209
+ name?: string;
210
+ /**
211
+ * The source URL of the avatar image to display.
212
+ */
213
+ src?: string;
214
+ fallback?: React.ReactNode;
215
+ slotProps?: {
216
+ image?: Avatar$1.ImageProps;
217
+ fallback?: Avatar$1.FallbackProps;
218
+ };
219
+ }
220
+ interface AvatarGroupProps extends GroupProps {
221
+ }
222
+
223
+ declare function Avatar(props: AvatarProps): react_jsx_runtime.JSX.Element;
224
+ declare function AvatarGroup(props: AvatarGroupProps): react_jsx_runtime.JSX.Element;
225
+
226
+ declare const EmptyState: typeof EmptyState$1;
227
+
228
+ interface TooltipProps extends Tooltip$1.RootProps {
229
+ content: react__default.ReactNode;
230
+ showArrow?: boolean;
231
+ }
232
+
233
+ declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
234
+
235
+ declare const Dialog: typeof Dialog$1 & {
236
+ Portal: typeof Portal;
237
+ };
238
+
239
+ declare const Drawer: typeof Drawer$1 & {
240
+ Portal: typeof Portal;
241
+ };
242
+
243
+ declare const Popover: typeof Popover$1 & {
244
+ Portal: typeof Portal;
245
+ };
246
+
247
+ declare const toaster: CreateToasterReturn;
248
+ declare const Toast: {
249
+ Toaster: react.FC<_chakra_ui_react.ToasterProps>;
250
+ ActionTrigger: react.ForwardRefExoticComponent<Toast$1.ActionTriggerProps & react.RefAttributes<HTMLButtonElement>>;
251
+ CloseTrigger: react.ForwardRefExoticComponent<Toast$1.CloseTriggerProps & react.RefAttributes<HTMLButtonElement>>;
252
+ Description: react.ForwardRefExoticComponent<Toast$1.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
253
+ Root: react.ForwardRefExoticComponent<Toast$1.RootProps & react.RefAttributes<HTMLDivElement>>;
254
+ Title: react.ForwardRefExoticComponent<Toast$1.TitleProps & react.RefAttributes<HTMLDivElement>>;
255
+ Indicator: react.ForwardRefExoticComponent<Toast$1.IndicatorProps & react.RefAttributes<HTMLSpanElement>>;
256
+ };
257
+
258
+ declare const Accordion: typeof Accordion$1;
259
+
260
+ type AccordionRootProps = React.ComponentProps<typeof Accordion$1.Root>;
261
+ type AccordionItemProps = React.ComponentProps<typeof Accordion$1.Item>;
262
+ type AccordionItemTriggerProps = React.ComponentProps<typeof Accordion$1.ItemTrigger>;
263
+ type AccordionItemContentProps = React.ComponentProps<typeof Accordion$1.ItemContent>;
264
+ type AccordionItemBodyProps = React.ComponentProps<typeof Accordion$1.ItemBody>;
265
+ type AccordionItemIndicatorProps = React.ComponentProps<typeof Accordion$1.ItemIndicator>;
266
+
267
+ declare const Breadcrumb: typeof Breadcrumb$1;
268
+
269
+ type BreadcrumbRootProps = React.ComponentProps<typeof Breadcrumb$1.Root>;
270
+ type BreadcrumbListProps = React.ComponentProps<typeof Breadcrumb$1.List>;
271
+ type BreadcrumbItemProps = React.ComponentProps<typeof Breadcrumb$1.Item>;
272
+ type BreadcrumbLinkProps = React.ComponentProps<typeof Breadcrumb$1.Link>;
273
+ type BreadcrumbCurrentLinkProps = React.ComponentProps<typeof Breadcrumb$1.CurrentLink>;
274
+ type BreadcrumbSeparatorProps = React.ComponentProps<typeof Breadcrumb$1.Separator>;
275
+ type BreadcrumbEllipsisProps = React.ComponentProps<typeof Breadcrumb$1.Ellipsis>;
276
+
277
+ declare const List: typeof List$1;
278
+
279
+ declare const Steps: typeof Steps$1;
280
+
281
+ type StepsRootProps = React.ComponentProps<typeof Steps$1.Root>;
282
+ type StepsListProps = React.ComponentProps<typeof Steps$1.List>;
283
+ type StepsItemProps = React.ComponentProps<typeof Steps$1.Item>;
284
+ type StepsIndicatorProps = React.ComponentProps<typeof Steps$1.Indicator>;
285
+ type StepsTitleProps = React.ComponentProps<typeof Steps$1.Title>;
286
+ type StepsDescriptionProps = React.ComponentProps<typeof Steps$1.Description>;
287
+ type StepsContentProps = React.ComponentProps<typeof Steps$1.Content>;
288
+ type StepsCompletedContentProps = React.ComponentProps<typeof Steps$1.CompletedContent>;
289
+ type StepsTriggerProps = React.ComponentProps<typeof Steps$1.Trigger>;
290
+ type StepsSeparatorProps = React.ComponentProps<typeof Steps$1.Separator>;
291
+ type StepsNextTriggerProps = React.ComponentProps<typeof Steps$1.NextTrigger>;
292
+ type StepsPrevTriggerProps = React.ComponentProps<typeof Steps$1.PrevTrigger>;
293
+ type StepsStatusProps = React.ComponentProps<typeof Steps$1.Status>;
294
+ type StepsNumberProps = React.ComponentProps<typeof Steps$1.Number>;
295
+
296
+ declare const Tabs: typeof Tabs$1;
297
+
298
+ declare const Menu: typeof Menu$1 & {
299
+ Portal: typeof Portal;
300
+ };
301
+
302
+ declare const CheckIcon: FC<IconProps>;
303
+
304
+ declare const CloseIcon: FC<IconProps>;
305
+
306
+ declare const WalletIcon: FC<IconProps>;
307
+
308
+ type ThemeProviderProps = ChakraProviderProps;
309
+ declare const ThemeProvider: (props: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
310
+
311
+ declare const theme: _chakra_ui_react.SystemContext;
312
+
313
+ export { Accordion, type AccordionItemBodyProps, type AccordionItemContentProps, type AccordionItemIndicatorProps, type AccordionItemProps, type AccordionItemTriggerProps, type AccordionRootProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, Breadcrumb, type BreadcrumbCurrentLinkProps, type BreadcrumbEllipsisProps, type BreadcrumbItemProps, type BreadcrumbLinkProps, type BreadcrumbListProps, type BreadcrumbRootProps, type BreadcrumbSeparatorProps, Button, type ButtonProps, Card, CheckIcon, Checkbox, type CheckboxProps, Clipboard, _default$4 as CloseButton, type CloseButtonProps, CloseIcon, Combobox, Container, type ContainerProps, Dialog, Drawer, EmptyState, type EnumOption, Grid, GridItem, type GridItemProps, type GridProps, HStack, type HStackProps, Icon, _default$3 as IconButton, type IconButtonProps, _default as Input, type InputProps, _default$2 as Link, _default$1 as LinkOverlay, type LinkOverlayProps, type LinkProps, List, Menu, MoneyField, type MoneyFieldProps, Popover, QrCode, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RhfCombobox, type RhfComboboxOptions, type RhfComboboxProps, RhfInput, type RhfInputProps, RhfMoneyField, type RhfMoneyFieldProps, Select, Skeleton, SkeletonCircle, SkeletonText, Stack, type StackProps, Steps, type StepsCompletedContentProps, type StepsContentProps, type StepsDescriptionProps, type StepsIndicatorProps, type StepsItemProps, type StepsListProps, type StepsNextTriggerProps, type StepsNumberProps, type StepsPrevTriggerProps, type StepsRootProps, type StepsSeparatorProps, type StepsStatusProps, type StepsTitleProps, type StepsTriggerProps, Switch, type SwitchProps, Tabs, TextArea, type TextAreaProps, TextMask, type TextMaskProps, ThemeProvider, type ThemeProviderProps, Toast, Tooltip, type TooltipProps, VStack, type VStackProps, WalletIcon, theme, toaster };