@sikka/hawa 0.2.40-next → 0.2.42-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,11 +1,14 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React from 'react';
3
- import React__default, { FC, ReactNode } from 'react';
3
+ import React__default, { FC, ReactNode, ChangeEvent, RefObject } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as DialogPrimitive from '@radix-ui/react-dialog';
6
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
7
7
  import * as ToastPrimitives from '@radix-ui/react-toast';
8
8
  import * as SwitchPrimitives from '@radix-ui/react-switch';
9
+ import * as LabelPrimitive from '@radix-ui/react-label';
10
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
11
+ import * as SliderPrimitive from '@radix-ui/react-slider';
9
12
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
10
13
 
11
14
  declare const buttonVariants: (props?: ({
@@ -157,6 +160,74 @@ type RadioTypes = {
157
160
  };
158
161
  declare const Radio: FC<RadioTypes>;
159
162
 
163
+ interface SkeletonProps extends React__default.HTMLAttributes<HTMLDivElement> {
164
+ className?: string;
165
+ animation?: "pulse" | "shimmer";
166
+ }
167
+ declare function Skeleton({ className, animation, ...props }: SkeletonProps): React__default.JSX.Element;
168
+
169
+ type TChipTypes = {
170
+ /** The text inside the chip */
171
+ label: string;
172
+ /** The small icon before the chip label */
173
+ icon?: JSX.Element;
174
+ /** The color of the chip, must be a tailwind color */
175
+ color?: string;
176
+ /** The size of the chip */
177
+ size?: "small" | "normal" | "large";
178
+ /** Enable/Disable the dot before the label of the chip */
179
+ dot?: boolean;
180
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
181
+ dotType?: "available" | "unavailable";
182
+ variant?: "default" | "outline";
183
+ };
184
+ declare const Chip: FC<TChipTypes>;
185
+
186
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
187
+
188
+ type AlertTypes = {
189
+ severity?: "info" | "warning" | "error" | "success";
190
+ /** The title of the alert placed above the text of the alert. Can be used alone */
191
+ title?: any;
192
+ /** The text of the alert placed below the title of the alert. Can be used alone */
193
+ text: any;
194
+ /** The duration for the alert to stay on the screen */
195
+ duration?: number;
196
+ variant?: "normal" | "solid" | "top-accent" | "left-accent" | "right-accent" | "bottom-accent";
197
+ direction?: "rtl" | "ltr";
198
+ actions?: [
199
+ {
200
+ label: string;
201
+ onClick: any;
202
+ variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
203
+ }
204
+ ];
205
+ persistant?: boolean;
206
+ icon?: any;
207
+ className?: any;
208
+ };
209
+ declare const Alert: React__default.FunctionComponent<AlertTypes>;
210
+
211
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
212
+ interface PopoverProps {
213
+ side?: "top" | "right" | "bottom" | "left";
214
+ align?: "start" | "center" | "end";
215
+ trigger: React.ReactNode;
216
+ children: React.ReactNode;
217
+ className?: string;
218
+ sideOffset?: number;
219
+ disableTrigger?: any;
220
+ open?: boolean;
221
+ }
222
+ type HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;
223
+ declare const Popover: React.FC<HawaPopoverTypes>;
224
+
225
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
226
+ }
227
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
228
+
229
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
230
+
160
231
  type ExtendedDropdownMenuContentProps = Partial<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>> & {};
161
232
  type ExtendedDropdownMenuTriggerProps = Partial<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>> & {};
162
233
  type SubItem = {
@@ -173,7 +244,7 @@ type MenuItemType = {
173
244
  value?: any;
174
245
  end?: any;
175
246
  presist?: boolean;
176
- type?: "separator" | "label";
247
+ itemType?: "separator" | "label" | string;
177
248
  action?: () => void;
178
249
  highlighted?: boolean;
179
250
  subitems?: SubItem[];
@@ -195,6 +266,28 @@ interface DropdownMenuProps {
195
266
  }
196
267
  declare const DropdownMenu: React.FC<DropdownMenuProps>;
197
268
 
269
+ type ColorPickerTypes = {
270
+ /** The hex code for the color */
271
+ color?: any;
272
+ /** Fires everytime the color changes */
273
+ handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
274
+ };
275
+ declare const ColorPicker: FC<ColorPickerTypes>;
276
+
277
+ type PinInputTypes = {
278
+ /** Label text to display for the Pin Input */
279
+ label?: string;
280
+ /** Icon element to be displayed next to the Pin Input */
281
+ icon?: JSX.Element;
282
+ /** Number of digits in the Pin Input */
283
+ digits: number;
284
+ /** Width of the Pin Input - either 'normal' or 'full' */
285
+ width?: "normal" | "full";
286
+ /** Function to get the value of pins */
287
+ getPins?: (pins: string[]) => void;
288
+ };
289
+ declare const PinInput: FC<PinInputTypes>;
290
+
198
291
  type ImageCardTypes = {
199
292
  children: any;
200
293
  align?: any;
@@ -207,4 +300,63 @@ type ImageCardTypes = {
207
300
  };
208
301
  declare const ActionCard: FC<ImageCardTypes>;
209
302
 
210
- export { ActionCard, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, Loading, MenuItemType, Radio, SubItem, Switch, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, buttonVariants };
303
+ type FileDropzoneTypes = {
304
+ /** The text label above the component. Consistant with the other form input fields */
305
+ label?: string;
306
+ files: [File];
307
+ setFiles: any;
308
+ setDeletedFiles: any;
309
+ maxFiles: number;
310
+ accept: any;
311
+ onAcceptedFiles: any;
312
+ showPreview: any;
313
+ onDeleteFile: any;
314
+ onClearFiles: any;
315
+ maxSize: number;
316
+ errorMessages: string;
317
+ disclaimer?: boolean;
318
+ termsLink?: string;
319
+ privacyLink?: string;
320
+ /** The translation object, use this to replace the default text with any translated text you want.*/
321
+ texts: {
322
+ errorUploading: any;
323
+ clickHereToUpload: any;
324
+ maxFileSize: any;
325
+ tooManyFiles: any;
326
+ fileTooLarge: any;
327
+ acceptedFileTypes: any;
328
+ invalidFileType: any;
329
+ terms?: string;
330
+ privacyPolicy?: string;
331
+ disclaimer?: string;
332
+ and?: string;
333
+ };
334
+ };
335
+ declare const FileDropzone: React__default.FunctionComponent<FileDropzoneTypes>;
336
+
337
+ type PhoneInputTypes = {
338
+ preferredCountry?: any;
339
+ helperText?: any;
340
+ label?: string;
341
+ value?: any;
342
+ country?: any;
343
+ handleChange?: any;
344
+ };
345
+ declare const PhoneInput: FC<PhoneInputTypes>;
346
+
347
+ type StoreButtonsTypes = {
348
+ store: "apple" | "google";
349
+ mode: "dark" | "light";
350
+ };
351
+ declare const AppStores: FC<StoreButtonsTypes>;
352
+
353
+ type BackToTopTypes = {
354
+ paddingX?: number;
355
+ paddingY?: number;
356
+ paddingThreshold?: number;
357
+ corner?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
358
+ anchor: RefObject<HTMLInputElement>;
359
+ };
360
+ declare const BackToTop: FC<BackToTopTypes>;
361
+
362
+ export { ActionCard, Alert, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, CodeBlock, ColorPicker, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, FileDropzone, Label, Loading, MenuItemType, PhoneInput, PinInput, Popover, PopoverContent, Radio, Skeleton, Slider, SubItem, Switch, Textarea, TextareaProps, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, buttonVariants };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React from 'react';
3
- import React__default, { FC, ReactNode } from 'react';
3
+ import React__default, { FC, ReactNode, ChangeEvent, RefObject } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as DialogPrimitive from '@radix-ui/react-dialog';
6
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
7
7
  import * as ToastPrimitives from '@radix-ui/react-toast';
8
8
  import * as SwitchPrimitives from '@radix-ui/react-switch';
9
+ import * as LabelPrimitive from '@radix-ui/react-label';
10
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
11
+ import * as SliderPrimitive from '@radix-ui/react-slider';
9
12
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
10
13
 
11
14
  declare const buttonVariants: (props?: ({
@@ -157,6 +160,74 @@ type RadioTypes = {
157
160
  };
158
161
  declare const Radio: FC<RadioTypes>;
159
162
 
163
+ interface SkeletonProps extends React__default.HTMLAttributes<HTMLDivElement> {
164
+ className?: string;
165
+ animation?: "pulse" | "shimmer";
166
+ }
167
+ declare function Skeleton({ className, animation, ...props }: SkeletonProps): React__default.JSX.Element;
168
+
169
+ type TChipTypes = {
170
+ /** The text inside the chip */
171
+ label: string;
172
+ /** The small icon before the chip label */
173
+ icon?: JSX.Element;
174
+ /** The color of the chip, must be a tailwind color */
175
+ color?: string;
176
+ /** The size of the chip */
177
+ size?: "small" | "normal" | "large";
178
+ /** Enable/Disable the dot before the label of the chip */
179
+ dot?: boolean;
180
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
181
+ dotType?: "available" | "unavailable";
182
+ variant?: "default" | "outline";
183
+ };
184
+ declare const Chip: FC<TChipTypes>;
185
+
186
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
187
+
188
+ type AlertTypes = {
189
+ severity?: "info" | "warning" | "error" | "success";
190
+ /** The title of the alert placed above the text of the alert. Can be used alone */
191
+ title?: any;
192
+ /** The text of the alert placed below the title of the alert. Can be used alone */
193
+ text: any;
194
+ /** The duration for the alert to stay on the screen */
195
+ duration?: number;
196
+ variant?: "normal" | "solid" | "top-accent" | "left-accent" | "right-accent" | "bottom-accent";
197
+ direction?: "rtl" | "ltr";
198
+ actions?: [
199
+ {
200
+ label: string;
201
+ onClick: any;
202
+ variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
203
+ }
204
+ ];
205
+ persistant?: boolean;
206
+ icon?: any;
207
+ className?: any;
208
+ };
209
+ declare const Alert: React__default.FunctionComponent<AlertTypes>;
210
+
211
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
212
+ interface PopoverProps {
213
+ side?: "top" | "right" | "bottom" | "left";
214
+ align?: "start" | "center" | "end";
215
+ trigger: React.ReactNode;
216
+ children: React.ReactNode;
217
+ className?: string;
218
+ sideOffset?: number;
219
+ disableTrigger?: any;
220
+ open?: boolean;
221
+ }
222
+ type HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;
223
+ declare const Popover: React.FC<HawaPopoverTypes>;
224
+
225
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
226
+ }
227
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
228
+
229
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
230
+
160
231
  type ExtendedDropdownMenuContentProps = Partial<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>> & {};
161
232
  type ExtendedDropdownMenuTriggerProps = Partial<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>> & {};
162
233
  type SubItem = {
@@ -173,7 +244,7 @@ type MenuItemType = {
173
244
  value?: any;
174
245
  end?: any;
175
246
  presist?: boolean;
176
- type?: "separator" | "label";
247
+ itemType?: "separator" | "label" | string;
177
248
  action?: () => void;
178
249
  highlighted?: boolean;
179
250
  subitems?: SubItem[];
@@ -195,6 +266,28 @@ interface DropdownMenuProps {
195
266
  }
196
267
  declare const DropdownMenu: React.FC<DropdownMenuProps>;
197
268
 
269
+ type ColorPickerTypes = {
270
+ /** The hex code for the color */
271
+ color?: any;
272
+ /** Fires everytime the color changes */
273
+ handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
274
+ };
275
+ declare const ColorPicker: FC<ColorPickerTypes>;
276
+
277
+ type PinInputTypes = {
278
+ /** Label text to display for the Pin Input */
279
+ label?: string;
280
+ /** Icon element to be displayed next to the Pin Input */
281
+ icon?: JSX.Element;
282
+ /** Number of digits in the Pin Input */
283
+ digits: number;
284
+ /** Width of the Pin Input - either 'normal' or 'full' */
285
+ width?: "normal" | "full";
286
+ /** Function to get the value of pins */
287
+ getPins?: (pins: string[]) => void;
288
+ };
289
+ declare const PinInput: FC<PinInputTypes>;
290
+
198
291
  type ImageCardTypes = {
199
292
  children: any;
200
293
  align?: any;
@@ -207,4 +300,63 @@ type ImageCardTypes = {
207
300
  };
208
301
  declare const ActionCard: FC<ImageCardTypes>;
209
302
 
210
- export { ActionCard, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, Loading, MenuItemType, Radio, SubItem, Switch, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, buttonVariants };
303
+ type FileDropzoneTypes = {
304
+ /** The text label above the component. Consistant with the other form input fields */
305
+ label?: string;
306
+ files: [File];
307
+ setFiles: any;
308
+ setDeletedFiles: any;
309
+ maxFiles: number;
310
+ accept: any;
311
+ onAcceptedFiles: any;
312
+ showPreview: any;
313
+ onDeleteFile: any;
314
+ onClearFiles: any;
315
+ maxSize: number;
316
+ errorMessages: string;
317
+ disclaimer?: boolean;
318
+ termsLink?: string;
319
+ privacyLink?: string;
320
+ /** The translation object, use this to replace the default text with any translated text you want.*/
321
+ texts: {
322
+ errorUploading: any;
323
+ clickHereToUpload: any;
324
+ maxFileSize: any;
325
+ tooManyFiles: any;
326
+ fileTooLarge: any;
327
+ acceptedFileTypes: any;
328
+ invalidFileType: any;
329
+ terms?: string;
330
+ privacyPolicy?: string;
331
+ disclaimer?: string;
332
+ and?: string;
333
+ };
334
+ };
335
+ declare const FileDropzone: React__default.FunctionComponent<FileDropzoneTypes>;
336
+
337
+ type PhoneInputTypes = {
338
+ preferredCountry?: any;
339
+ helperText?: any;
340
+ label?: string;
341
+ value?: any;
342
+ country?: any;
343
+ handleChange?: any;
344
+ };
345
+ declare const PhoneInput: FC<PhoneInputTypes>;
346
+
347
+ type StoreButtonsTypes = {
348
+ store: "apple" | "google";
349
+ mode: "dark" | "light";
350
+ };
351
+ declare const AppStores: FC<StoreButtonsTypes>;
352
+
353
+ type BackToTopTypes = {
354
+ paddingX?: number;
355
+ paddingY?: number;
356
+ paddingThreshold?: number;
357
+ corner?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
358
+ anchor: RefObject<HTMLInputElement>;
359
+ };
360
+ declare const BackToTop: FC<BackToTopTypes>;
361
+
362
+ export { ActionCard, Alert, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, CodeBlock, ColorPicker, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, FileDropzone, Label, Loading, MenuItemType, PhoneInput, PinInput, Popover, PopoverContent, Radio, Skeleton, Slider, SubItem, Switch, Textarea, TextareaProps, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, buttonVariants };