@rovula/ui 0.0.10 → 0.0.11

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.
Files changed (56) hide show
  1. package/dist/cjs/bundle.css +14 -0
  2. package/dist/cjs/bundle.js +1 -1
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/Button/Button.d.ts +14 -3
  5. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +8 -6
  6. package/dist/cjs/types/components/DataTable/DataTable.d.ts +14 -0
  7. package/dist/cjs/types/components/DataTable/DataTable.stories.d.ts +19 -0
  8. package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +29 -3
  9. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +31 -30
  10. package/dist/cjs/types/components/Label/Label.stories.d.ts +1 -1
  11. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +1 -1
  12. package/dist/cjs/types/components/Text/Text.d.ts +3 -3
  13. package/dist/cjs/types/components/Text/Text.stories.d.ts +3 -9
  14. package/dist/cjs/types/components/TextInput/TextInput.d.ts +20 -2
  15. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +28 -1
  16. package/dist/cjs/types/components/ui/table.d.ts +10 -0
  17. package/dist/cjs/types/index.d.ts +3 -0
  18. package/dist/components/Button/Button.js +4 -3
  19. package/dist/components/DataTable/DataTable.js +32 -0
  20. package/dist/components/DataTable/DataTable.stories.js +66 -0
  21. package/dist/components/Dropdown/Dropdown.js +15 -5
  22. package/dist/components/Dropdown/Dropdown.stories.js +48 -0
  23. package/dist/components/Text/Text.js +3 -2
  24. package/dist/components/TextInput/TextInput.js +5 -7
  25. package/dist/components/TextInput/TextInput.stories.js +22 -0
  26. package/dist/components/ui/table.js +66 -0
  27. package/dist/esm/bundle.css +14 -0
  28. package/dist/esm/bundle.js +1 -1
  29. package/dist/esm/bundle.js.map +1 -1
  30. package/dist/esm/types/components/Button/Button.d.ts +14 -3
  31. package/dist/esm/types/components/Button/Buttons.stories.d.ts +8 -6
  32. package/dist/esm/types/components/DataTable/DataTable.d.ts +14 -0
  33. package/dist/esm/types/components/DataTable/DataTable.stories.d.ts +19 -0
  34. package/dist/esm/types/components/Dropdown/Dropdown.d.ts +29 -3
  35. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +31 -30
  36. package/dist/esm/types/components/Label/Label.stories.d.ts +1 -1
  37. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +1 -1
  38. package/dist/esm/types/components/Text/Text.d.ts +3 -3
  39. package/dist/esm/types/components/Text/Text.stories.d.ts +3 -9
  40. package/dist/esm/types/components/TextInput/TextInput.d.ts +20 -2
  41. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +28 -1
  42. package/dist/esm/types/components/ui/table.d.ts +10 -0
  43. package/dist/esm/types/index.d.ts +3 -0
  44. package/dist/index.d.ts +61 -7
  45. package/dist/src/theme/global.css +18 -0
  46. package/package.json +2 -1
  47. package/src/components/Button/Button.tsx +47 -39
  48. package/src/components/DataTable/DataTable.stories.tsx +76 -0
  49. package/src/components/DataTable/DataTable.tsx +105 -0
  50. package/src/components/Dropdown/Dropdown.stories.tsx +87 -3
  51. package/src/components/Dropdown/Dropdown.tsx +147 -109
  52. package/src/components/Text/Text.tsx +21 -19
  53. package/src/components/TextInput/TextInput.stories.tsx +46 -1
  54. package/src/components/TextInput/TextInput.tsx +7 -7
  55. package/src/components/ui/table.tsx +117 -0
  56. package/src/index.ts +5 -0
@@ -1,5 +1,5 @@
1
- import React, { FC, ReactElement } from "react";
2
- type ButtonProps = {
1
+ import React, { ReactElement } from "react";
2
+ export type ButtonProps = {
3
3
  title?: string;
4
4
  size?: "sm" | "md" | "lg";
5
5
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
@@ -11,5 +11,16 @@ type ButtonProps = {
11
11
  startIcon?: ReactElement;
12
12
  endIcon?: ReactElement;
13
13
  } & React.ButtonHTMLAttributes<HTMLButtonElement>;
14
- declare const Button: FC<ButtonProps>;
14
+ declare const Button: React.ForwardRefExoticComponent<{
15
+ title?: string | undefined;
16
+ size?: "sm" | "md" | "lg" | undefined;
17
+ color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | undefined;
18
+ variant?: "solid" | "outline" | "flat" | "link" | undefined;
19
+ disabled?: boolean | undefined;
20
+ isLoading?: boolean | undefined;
21
+ fullwidth?: boolean | undefined;
22
+ children?: React.ReactNode;
23
+ startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
24
+ endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
25
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
15
26
  export default Button;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: React.FC<{
4
+ component: React.ForwardRefExoticComponent<{
5
5
  title?: string | undefined;
6
6
  size?: "sm" | "md" | "lg" | undefined;
7
7
  color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | undefined;
@@ -12,7 +12,7 @@ declare const meta: {
12
12
  children?: React.ReactNode;
13
13
  startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
14
14
  endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
15
- } & React.ButtonHTMLAttributes<HTMLButtonElement>>;
15
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
16
16
  tags: string[];
17
17
  parameters: {
18
18
  layout: string;
@@ -299,6 +299,8 @@ declare const meta: {
299
299
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
300
300
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
301
301
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
302
+ ref?: React.LegacyRef<HTMLButtonElement> | undefined;
303
+ key?: React.Key | null | undefined;
302
304
  }>) => import("react/jsx-runtime").JSX.Element)[];
303
305
  };
304
306
  export default meta;
@@ -317,7 +319,7 @@ export declare const Solid: {
317
319
  children?: React.ReactNode;
318
320
  startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
319
321
  endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
320
- } & React.ButtonHTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
322
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
321
323
  };
322
324
  export declare const Outline: {
323
325
  args: {
@@ -335,7 +337,7 @@ export declare const Outline: {
335
337
  children?: React.ReactNode;
336
338
  startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
337
339
  endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
338
- } & React.ButtonHTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
340
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
339
341
  };
340
342
  export declare const Flat: {
341
343
  args: {
@@ -353,7 +355,7 @@ export declare const Flat: {
353
355
  children?: React.ReactNode;
354
356
  startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
355
357
  endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
356
- } & React.ButtonHTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
358
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
357
359
  };
358
360
  export declare const Link: {
359
361
  args: {
@@ -371,5 +373,5 @@ export declare const Link: {
371
373
  children?: React.ReactNode;
372
374
  startIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
373
375
  endIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
374
- } & React.ButtonHTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
376
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
375
377
  };
@@ -0,0 +1,14 @@
1
+ import { ColumnDef } from "@tanstack/react-table";
2
+ export type Payment = {
3
+ id: string;
4
+ amount: number;
5
+ status: "pending" | "processing" | "success" | "failed";
6
+ email: string;
7
+ };
8
+ export declare const columns: ColumnDef<Payment>[];
9
+ interface DataTableProps<TData, TValue> {
10
+ columns: ColumnDef<TData, TValue>[];
11
+ data: TData[];
12
+ }
13
+ export declare function DataTable<TData, TValue>({ columns, data, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,19 @@
1
+ import { DataTable } from "./DataTable";
2
+ import { ColumnDef } from "@tanstack/react-table";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof DataTable;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
11
+ columns: ColumnDef<unknown, unknown>[];
12
+ data: unknown[];
13
+ }>) => import("react/jsx-runtime").JSX.Element)[];
14
+ };
15
+ export default meta;
16
+ export declare const Default: {
17
+ args: {};
18
+ render: (args: {}) => import("react/jsx-runtime").JSX.Element;
19
+ };
@@ -1,9 +1,17 @@
1
+ import React, { ReactNode } from "react";
1
2
  import { InputProps } from "../TextInput/TextInput";
2
- type Options = {
3
+ type RenderLabelCallbackArg = {
3
4
  value: string;
4
5
  label: string;
6
+ handleOnClick: () => void;
7
+ className: string;
5
8
  };
6
- type DropdownProps = {
9
+ export type Options = {
10
+ value: string;
11
+ label: string;
12
+ renderLabel?: (config: RenderLabelCallbackArg) => ReactNode;
13
+ };
14
+ export type DropdownProps = {
7
15
  id?: string;
8
16
  label?: string;
9
17
  size?: "sm" | "md" | "lg";
@@ -22,5 +30,23 @@ type DropdownProps = {
22
30
  onChangeText?: InputProps["onChange"];
23
31
  onSelect?: (value: Options) => void;
24
32
  } & Omit<InputProps, "value">;
25
- declare const Dropdown: ({ id, options, value, label, size, rounded, variant, helperText, errorMessage, fullwidth, disabled, error, filterMode, required, onChangeText, onSelect, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
33
+ declare const Dropdown: React.ForwardRefExoticComponent<{
34
+ id?: string | undefined;
35
+ label?: string | undefined;
36
+ size?: "sm" | "md" | "lg" | undefined;
37
+ rounded?: "none" | "normal" | "full" | undefined;
38
+ variant?: "outline" | "flat" | "underline" | undefined;
39
+ helperText?: string | undefined;
40
+ errorMessage?: string | undefined;
41
+ filterMode?: boolean | undefined;
42
+ fullwidth?: boolean | undefined;
43
+ disabled?: boolean | undefined;
44
+ error?: boolean | undefined;
45
+ required?: boolean | undefined;
46
+ className?: string | undefined;
47
+ options: Options[];
48
+ value?: Options | undefined;
49
+ onChangeText?: InputProps["onChange"];
50
+ onSelect?: ((value: Options) => void) | undefined;
51
+ } & Omit<InputProps, "value"> & React.RefAttributes<HTMLInputElement>>;
26
52
  export default Dropdown;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import { Options } from "./Dropdown";
2
3
  declare const meta: {
3
4
  title: string;
4
- component: ({ id, options, value, label, size, rounded, variant, helperText, errorMessage, fullwidth, disabled, error, filterMode, required, onChangeText, onSelect, ...props }: {
5
+ component: React.ForwardRefExoticComponent<{
5
6
  id?: string | undefined;
6
7
  label?: string | undefined;
7
8
  size?: "sm" | "md" | "lg" | undefined;
@@ -15,20 +16,11 @@ declare const meta: {
15
16
  error?: boolean | undefined;
16
17
  required?: boolean | undefined;
17
18
  className?: string | undefined;
18
- options: {
19
- value: string;
20
- label: string;
21
- }[];
22
- value?: {
23
- value: string;
24
- label: string;
25
- } | undefined;
19
+ options: Options[];
20
+ value?: Options | undefined;
26
21
  onChangeText?: React.ChangeEventHandler<HTMLInputElement> | undefined;
27
- onSelect?: ((value: {
28
- value: string;
29
- label: string;
30
- }) => void) | undefined;
31
- } & Omit<import("../TextInput/TextInput").InputProps, "value">) => import("react/jsx-runtime").JSX.Element;
22
+ onSelect?: ((value: Options) => void) | undefined;
23
+ } & Omit<import("../..").InputProps, "value"> & React.RefAttributes<HTMLInputElement>>;
32
24
  tags: string[];
33
25
  parameters: {
34
26
  layout: string;
@@ -47,19 +39,10 @@ declare const meta: {
47
39
  error?: boolean | undefined;
48
40
  required?: boolean | undefined;
49
41
  className?: string | undefined;
50
- options: {
51
- value: string;
52
- label: string;
53
- }[];
54
- value?: {
55
- value: string;
56
- label: string;
57
- } | undefined;
42
+ options: Options[];
43
+ value?: Options | undefined;
58
44
  onChangeText?: React.ChangeEventHandler<HTMLInputElement> | undefined;
59
- onSelect?: (((value: {
60
- value: string;
61
- label: string;
62
- }) => void) & React.ReactEventHandler<HTMLInputElement>) | undefined;
45
+ onSelect?: (((value: Options) => void) & React.ReactEventHandler<HTMLInputElement>) | undefined;
63
46
  color?: string | undefined;
64
47
  title?: string | undefined;
65
48
  children?: React.ReactNode;
@@ -351,6 +334,9 @@ declare const meta: {
351
334
  src?: string | undefined;
352
335
  step?: string | number | undefined;
353
336
  width?: string | number | undefined;
337
+ labelClassName?: string | undefined;
338
+ ref?: React.LegacyRef<HTMLInputElement> | undefined;
339
+ key?: React.Key | null | undefined;
354
340
  }>) => import("react/jsx-runtime").JSX.Element)[];
355
341
  };
356
342
  export default meta;
@@ -358,10 +344,25 @@ export declare const Default: {
358
344
  args: {
359
345
  label: string;
360
346
  fullwidth: boolean;
361
- options: {
362
- value: string;
363
- label: string;
364
- }[];
347
+ options: Options[];
348
+ };
349
+ render: (args: {}) => import("react/jsx-runtime").JSX.Element;
350
+ };
351
+ export declare const WithRef: {
352
+ args: {
353
+ label: string;
354
+ fullwidth: boolean;
355
+ options: Options[];
356
+ filterMode: boolean;
357
+ };
358
+ render: (args: {}) => import("react/jsx-runtime").JSX.Element;
359
+ };
360
+ export declare const CustomOption: {
361
+ args: {
362
+ label: string;
363
+ fullwidth: boolean;
364
+ options: Options[];
365
+ filterMode: boolean;
365
366
  };
366
367
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
367
368
  };
@@ -273,8 +273,8 @@ declare const meta: {
273
273
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLLabelElement> | undefined;
274
274
  onTransitionEnd?: React.TransitionEventHandler<HTMLLabelElement> | undefined;
275
275
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLLabelElement> | undefined;
276
- key?: React.Key | null | undefined;
277
276
  htmlFor?: string | undefined;
277
+ key?: React.Key | null | undefined;
278
278
  asChild?: boolean | undefined;
279
279
  ref?: React.LegacyRef<HTMLLabelElement> | undefined;
280
280
  }>) => import("react/jsx-runtime").JSX.Element)[];
@@ -276,8 +276,8 @@ declare const meta: {
276
276
  onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
277
277
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
278
278
  required?: boolean | undefined;
279
- key?: React.Key | null | undefined;
280
279
  orientation?: "horizontal" | "vertical" | undefined;
280
+ key?: React.Key | null | undefined;
281
281
  asChild?: boolean | undefined;
282
282
  loop?: boolean | undefined;
283
283
  onValueChange?: ((value: string) => void) | undefined;
@@ -1,5 +1,5 @@
1
- import React, { FC } from "react";
2
- type TextProps = {
1
+ import React from "react";
2
+ export type TextProps = {
3
3
  variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitile1" | "subtitile2" | "subtitile3" | "subtitile4" | "subtitile5" | "subtitile6" | "body1" | "body2" | "body3" | "body4" | "small1" | "small2" | "small3" | "label1" | "label2";
4
4
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
5
5
  children?: React.ReactNode;
@@ -8,5 +8,5 @@ type TextProps = {
8
8
  style?: React.CSSProperties;
9
9
  id?: string;
10
10
  };
11
- declare const Text: FC<TextProps>;
11
+ declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<keyof JSX.IntrinsicElements | undefined>>;
12
12
  export default Text;
@@ -1,15 +1,7 @@
1
1
  import React from "react";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: React.FC<{
5
- variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitile1" | "subtitile2" | "subtitile3" | "subtitile4" | "subtitile5" | "subtitile6" | "body1" | "body2" | "body3" | "body4" | "small1" | "small2" | "small3" | "label1" | "label2" | undefined;
6
- color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | undefined;
7
- children?: React.ReactNode;
8
- className?: string | undefined;
9
- tag?: keyof JSX.IntrinsicElements | undefined;
10
- style?: React.CSSProperties | undefined;
11
- id?: string | undefined;
12
- }>;
4
+ component: React.ForwardRefExoticComponent<import("./Text").TextProps & React.RefAttributes<keyof JSX.IntrinsicElements | undefined>>;
13
5
  tags: string[];
14
6
  parameters: {
15
7
  layout: string;
@@ -22,6 +14,8 @@ declare const meta: {
22
14
  tag?: keyof JSX.IntrinsicElements | undefined;
23
15
  style?: React.CSSProperties | undefined;
24
16
  id?: string | undefined;
17
+ ref?: React.LegacyRef<keyof JSX.IntrinsicElements | undefined> | undefined;
18
+ key?: React.Key | null | undefined;
25
19
  }>) => import("react/jsx-runtime").JSX.Element)[];
26
20
  };
27
21
  export default meta;
@@ -1,4 +1,4 @@
1
- import React, { FC, ReactNode } from "react";
1
+ import React, { ReactNode } from "react";
2
2
  export type InputProps = {
3
3
  id?: string;
4
4
  label?: string;
@@ -15,6 +15,24 @@ export type InputProps = {
15
15
  hasClearIcon?: boolean;
16
16
  endIcon?: ReactNode;
17
17
  className?: string;
18
+ labelClassName?: string;
18
19
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
19
- declare const TextInput: FC<InputProps>;
20
+ export declare const TextInput: React.ForwardRefExoticComponent<{
21
+ id?: string | undefined;
22
+ label?: string | undefined;
23
+ size?: "sm" | "md" | "lg" | undefined;
24
+ rounded?: "none" | "normal" | "full" | undefined;
25
+ variant?: "outline" | "flat" | "underline" | undefined;
26
+ type?: React.HTMLInputTypeAttribute | undefined;
27
+ helperText?: string | undefined;
28
+ errorMessage?: string | undefined;
29
+ fullwidth?: boolean | undefined;
30
+ disabled?: boolean | undefined;
31
+ error?: boolean | undefined;
32
+ required?: boolean | undefined;
33
+ hasClearIcon?: boolean | undefined;
34
+ endIcon?: ReactNode;
35
+ className?: string | undefined;
36
+ labelClassName?: string | undefined;
37
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
20
38
  export default TextInput;
@@ -1,7 +1,24 @@
1
1
  import React from "react";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: React.FC<import("./TextInput").InputProps>;
4
+ component: React.ForwardRefExoticComponent<{
5
+ id?: string | undefined;
6
+ label?: string | undefined;
7
+ size?: "sm" | "md" | "lg" | undefined;
8
+ rounded?: "none" | "normal" | "full" | undefined;
9
+ variant?: "outline" | "flat" | "underline" | undefined;
10
+ type?: React.HTMLInputTypeAttribute | undefined;
11
+ helperText?: string | undefined;
12
+ errorMessage?: string | undefined;
13
+ fullwidth?: boolean | undefined;
14
+ disabled?: boolean | undefined;
15
+ error?: boolean | undefined;
16
+ required?: boolean | undefined;
17
+ hasClearIcon?: boolean | undefined;
18
+ endIcon?: React.ReactNode;
19
+ className?: string | undefined;
20
+ labelClassName?: string | undefined;
21
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
5
22
  tags: string[];
6
23
  parameters: {
7
24
  layout: string;
@@ -22,6 +39,7 @@ declare const meta: {
22
39
  hasClearIcon?: boolean | undefined;
23
40
  endIcon?: React.ReactNode;
24
41
  className?: string | undefined;
42
+ labelClassName?: string | undefined;
25
43
  color?: string | undefined;
26
44
  title?: string | undefined;
27
45
  children?: React.ReactNode;
@@ -312,6 +330,8 @@ declare const meta: {
312
330
  src?: string | undefined;
313
331
  step?: string | number | undefined;
314
332
  width?: string | number | undefined;
333
+ ref?: React.LegacyRef<HTMLInputElement> | undefined;
334
+ key?: React.Key | null | undefined;
315
335
  }>) => import("react/jsx-runtime").JSX.Element)[];
316
336
  };
317
337
  export default meta;
@@ -322,3 +342,10 @@ export declare const Default: {
322
342
  };
323
343
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
324
344
  };
345
+ export declare const CustomLabel: {
346
+ args: {
347
+ label: string;
348
+ fullwidth: boolean;
349
+ };
350
+ render: (args: {}) => import("react/jsx-runtime").JSX.Element;
351
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
+ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
+ declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -10,5 +10,8 @@ export { Input } from "./components/Input/Input";
10
10
  export * from "./components/Table/Table";
11
11
  export * from "./components/Dialog/Dialog";
12
12
  export * from "./components/AlertDialog/AlertDialog";
13
+ export type { ButtonProps } from "./components/Button/Button";
14
+ export type { InputProps } from "./components/TextInput/TextInput";
15
+ export type { DropdownProps } from "./components/Dropdown/Dropdown";
13
16
  export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./utils/datetime";
14
17
  export { cn } from "./utils/cn";
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import React__default, { FC, ReactElement, ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default, { ReactElement, ReactNode } from 'react';
4
3
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
5
4
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
6
5
  import * as LabelPrimitive from '@radix-ui/react-label';
7
6
  import { VariantProps } from 'class-variance-authority';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
9
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
10
  import { ClassValue } from 'clsx';
@@ -21,7 +21,18 @@ type ButtonProps = {
21
21
  startIcon?: ReactElement;
22
22
  endIcon?: ReactElement;
23
23
  } & React__default.ButtonHTMLAttributes<HTMLButtonElement>;
24
- declare const Button: FC<ButtonProps>;
24
+ declare const Button: React__default.ForwardRefExoticComponent<{
25
+ title?: string | undefined;
26
+ size?: "sm" | "md" | "lg" | undefined;
27
+ color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | undefined;
28
+ variant?: "solid" | "outline" | "flat" | "link" | undefined;
29
+ disabled?: boolean | undefined;
30
+ isLoading?: boolean | undefined;
31
+ fullwidth?: boolean | undefined;
32
+ children?: React__default.ReactNode;
33
+ startIcon?: React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | undefined;
34
+ endIcon?: React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | undefined;
35
+ } & React__default.ButtonHTMLAttributes<HTMLButtonElement> & React__default.RefAttributes<HTMLButtonElement>>;
25
36
 
26
37
  type InputProps$1 = {
27
38
  id?: string;
@@ -39,8 +50,26 @@ type InputProps$1 = {
39
50
  hasClearIcon?: boolean;
40
51
  endIcon?: ReactNode;
41
52
  className?: string;
53
+ labelClassName?: string;
42
54
  } & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size">;
43
- declare const TextInput: FC<InputProps$1>;
55
+ declare const TextInput: React__default.ForwardRefExoticComponent<{
56
+ id?: string | undefined;
57
+ label?: string | undefined;
58
+ size?: "sm" | "md" | "lg" | undefined;
59
+ rounded?: "none" | "normal" | "full" | undefined;
60
+ variant?: "outline" | "flat" | "underline" | undefined;
61
+ type?: React__default.HTMLInputTypeAttribute | undefined;
62
+ helperText?: string | undefined;
63
+ errorMessage?: string | undefined;
64
+ fullwidth?: boolean | undefined;
65
+ disabled?: boolean | undefined;
66
+ error?: boolean | undefined;
67
+ required?: boolean | undefined;
68
+ hasClearIcon?: boolean | undefined;
69
+ endIcon?: ReactNode;
70
+ className?: string | undefined;
71
+ labelClassName?: string | undefined;
72
+ } & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & React__default.RefAttributes<HTMLInputElement>>;
44
73
 
45
74
  type TextProps = {
46
75
  variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitile1" | "subtitile2" | "subtitile3" | "subtitile4" | "subtitile5" | "subtitile6" | "body1" | "body2" | "body3" | "body4" | "small1" | "small2" | "small3" | "label1" | "label2";
@@ -51,7 +80,7 @@ type TextProps = {
51
80
  style?: React__default.CSSProperties;
52
81
  id?: string;
53
82
  };
54
- declare const Text: FC<TextProps>;
83
+ declare const Text: React__default.ForwardRefExoticComponent<TextProps & React__default.RefAttributes<keyof JSX.IntrinsicElements | undefined>>;
55
84
 
56
85
  type Tab = {
57
86
  label: string;
@@ -65,9 +94,16 @@ type TabsProps = {
65
94
  };
66
95
  declare const Tabs: React__default.FC<TabsProps>;
67
96
 
97
+ type RenderLabelCallbackArg = {
98
+ value: string;
99
+ label: string;
100
+ handleOnClick: () => void;
101
+ className: string;
102
+ };
68
103
  type Options = {
69
104
  value: string;
70
105
  label: string;
106
+ renderLabel?: (config: RenderLabelCallbackArg) => ReactNode;
71
107
  };
72
108
  type DropdownProps = {
73
109
  id?: string;
@@ -88,7 +124,25 @@ type DropdownProps = {
88
124
  onChangeText?: InputProps$1["onChange"];
89
125
  onSelect?: (value: Options) => void;
90
126
  } & Omit<InputProps$1, "value">;
91
- declare const Dropdown: ({ id, options, value, label, size, rounded, variant, helperText, errorMessage, fullwidth, disabled, error, filterMode, required, onChangeText, onSelect, ...props }: DropdownProps) => react_jsx_runtime.JSX.Element;
127
+ declare const Dropdown: React__default.ForwardRefExoticComponent<{
128
+ id?: string | undefined;
129
+ label?: string | undefined;
130
+ size?: "sm" | "md" | "lg" | undefined;
131
+ rounded?: "none" | "normal" | "full" | undefined;
132
+ variant?: "outline" | "flat" | "underline" | undefined;
133
+ helperText?: string | undefined;
134
+ errorMessage?: string | undefined;
135
+ filterMode?: boolean | undefined;
136
+ fullwidth?: boolean | undefined;
137
+ disabled?: boolean | undefined;
138
+ error?: boolean | undefined;
139
+ required?: boolean | undefined;
140
+ className?: string | undefined;
141
+ options: Options[];
142
+ value?: Options | undefined;
143
+ onChangeText?: InputProps$1["onChange"];
144
+ onSelect?: ((value: Options) => void) | undefined;
145
+ } & Omit<InputProps$1, "value"> & React__default.RefAttributes<HTMLInputElement>>;
92
146
 
93
147
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
94
148
 
@@ -153,4 +207,4 @@ declare const getTimestampUTC: (date: Date) => number;
153
207
 
154
208
  declare function cn(...inputs: ClassValue[]): string;
155
209
 
156
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, Input, Label, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
210
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, type ButtonProps, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownProps, Input, type InputProps$1 as InputProps, Label, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
@@ -1030,6 +1030,10 @@ body {
1030
1030
  height: 3rem;
1031
1031
  }
1032
1032
 
1033
+ .h-24 {
1034
+ height: 6rem;
1035
+ }
1036
+
1033
1037
  .h-4 {
1034
1038
  height: 1rem;
1035
1039
  }
@@ -1141,6 +1145,10 @@ body {
1141
1145
  justify-content: center;
1142
1146
  }
1143
1147
 
1148
+ .justify-between {
1149
+ justify-content: space-between;
1150
+ }
1151
+
1144
1152
  .gap-1 {
1145
1153
  gap: 0.25rem;
1146
1154
  }
@@ -1902,6 +1910,11 @@ body {
1902
1910
  --tw-ring-offset-color: hsl(var(--background));
1903
1911
  }
1904
1912
 
1913
+ .blur {
1914
+ --tw-blur: blur(8px);
1915
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1916
+ }
1917
+
1905
1918
  .filter {
1906
1919
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1907
1920
  }
@@ -2364,6 +2377,11 @@ body {
2364
2377
  background-color: rgb(var(--input-label-background-color) / var(--tw-bg-opacity));
2365
2378
  }
2366
2379
 
2380
+ .peer:focus ~ .peer-focus\:bg-red-500 {
2381
+ --tw-bg-opacity: 1;
2382
+ background-color: rgb(239 68 68 / var(--tw-bg-opacity));
2383
+ }
2384
+
2367
2385
  .peer:focus ~ .peer-focus\:text-input-text-active {
2368
2386
  --tw-text-opacity: 1;
2369
2387
  color: rgb(var(--input-active-text-color) / var(--tw-text-opacity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -74,6 +74,7 @@
74
74
  "@radix-ui/react-label": "^2.0.2",
75
75
  "@radix-ui/react-radio-group": "^1.1.3",
76
76
  "@radix-ui/react-slot": "^1.0.2",
77
+ "@tanstack/react-table": "^8.17.3",
77
78
  "@types/react": "^18.3.2",
78
79
  "axios": "^1.6.4",
79
80
  "class-variance-authority": "^0.7.0",