@rovula/ui 0.1.1 → 0.1.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.
Files changed (80) hide show
  1. package/dist/cjs/bundle.css +358 -73
  2. package/dist/cjs/bundle.js +1564 -1570
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/ActionButton/ActionButton.d.ts +4 -2
  5. package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +30 -8
  6. package/dist/cjs/types/components/ActionButton/ActionButton.styles.d.ts +2 -1
  7. package/dist/cjs/types/components/Avatar/Avatar.styles.d.ts +1 -1
  8. package/dist/cjs/types/components/Button/Button.d.ts +4 -2
  9. package/dist/cjs/types/components/Button/Button.styles.d.ts +2 -1
  10. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +71 -6
  11. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +13 -9
  12. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +1 -0
  13. package/dist/cjs/types/components/InputFilter/InputFilter.stories.d.ts +1 -0
  14. package/dist/cjs/types/components/MaskedTextInput/MaskedTextInput.d.ts +1 -0
  15. package/dist/cjs/types/components/MaskedTextInput/MaskedTextInput.stories.d.ts +2 -0
  16. package/dist/cjs/types/components/PasswordInput/PasswordInput.stories.d.ts +1 -0
  17. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +10 -7
  18. package/dist/cjs/types/components/Search/Search.stories.d.ts +1 -0
  19. package/dist/cjs/types/components/TextInput/TextInput.d.ts +2 -0
  20. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +10 -0
  21. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +15 -0
  22. package/dist/components/ActionButton/ActionButton.js +2 -1
  23. package/dist/components/ActionButton/ActionButton.stories.js +40 -7
  24. package/dist/components/ActionButton/ActionButton.styles.js +77 -17
  25. package/dist/components/Button/Button.js +9 -2
  26. package/dist/components/Button/Button.styles.js +51 -14
  27. package/dist/components/Button/Buttons.stories.js +55 -0
  28. package/dist/components/Checkbox/Checkbox.js +6 -7
  29. package/dist/components/Checkbox/Checkbox.stories.js +23 -1
  30. package/dist/components/InputFilter/InputFilter.js +1 -1
  31. package/dist/components/InputFilter/InputFilter.styles.js +1 -1
  32. package/dist/components/PasswordInput/PasswordInput.js +2 -2
  33. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  34. package/dist/components/RadioGroup/RadioGroup.stories.js +16 -1
  35. package/dist/components/TextArea/TextArea.styles.js +1 -1
  36. package/dist/components/TextInput/TextInput.js +33 -24
  37. package/dist/components/TextInput/TextInput.stories.js +14 -2
  38. package/dist/components/TextInput/TextInput.styles.js +25 -10
  39. package/dist/esm/bundle.css +358 -73
  40. package/dist/esm/bundle.js +1564 -1570
  41. package/dist/esm/bundle.js.map +1 -1
  42. package/dist/esm/types/components/ActionButton/ActionButton.d.ts +4 -2
  43. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +30 -8
  44. package/dist/esm/types/components/ActionButton/ActionButton.styles.d.ts +2 -1
  45. package/dist/esm/types/components/Avatar/Avatar.styles.d.ts +1 -1
  46. package/dist/esm/types/components/Button/Button.d.ts +4 -2
  47. package/dist/esm/types/components/Button/Button.styles.d.ts +2 -1
  48. package/dist/esm/types/components/Button/Buttons.stories.d.ts +71 -6
  49. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +13 -9
  50. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +1 -0
  51. package/dist/esm/types/components/InputFilter/InputFilter.stories.d.ts +1 -0
  52. package/dist/esm/types/components/MaskedTextInput/MaskedTextInput.d.ts +1 -0
  53. package/dist/esm/types/components/MaskedTextInput/MaskedTextInput.stories.d.ts +2 -0
  54. package/dist/esm/types/components/PasswordInput/PasswordInput.stories.d.ts +1 -0
  55. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +10 -7
  56. package/dist/esm/types/components/Search/Search.stories.d.ts +1 -0
  57. package/dist/esm/types/components/TextInput/TextInput.d.ts +2 -0
  58. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +10 -0
  59. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +15 -0
  60. package/dist/index.d.ts +9 -3
  61. package/dist/src/theme/global.css +453 -84
  62. package/package.json +1 -1
  63. package/src/components/ActionButton/ActionButton.stories.tsx +105 -149
  64. package/src/components/ActionButton/ActionButton.styles.ts +78 -18
  65. package/src/components/ActionButton/ActionButton.tsx +7 -2
  66. package/src/components/Button/Button.styles.ts +51 -14
  67. package/src/components/Button/Button.tsx +11 -2
  68. package/src/components/Button/Buttons.stories.tsx +235 -0
  69. package/src/components/Checkbox/Checkbox.stories.tsx +50 -4
  70. package/src/components/Checkbox/Checkbox.tsx +12 -8
  71. package/src/components/InputFilter/InputFilter.styles.ts +2 -2
  72. package/src/components/InputFilter/InputFilter.tsx +21 -24
  73. package/src/components/PasswordInput/PasswordInput.tsx +2 -2
  74. package/src/components/RadioGroup/RadioGroup.stories.tsx +43 -4
  75. package/src/components/RadioGroup/RadioGroup.tsx +1 -1
  76. package/src/components/TextArea/TextArea.styles.ts +1 -1
  77. package/src/components/TextInput/TextInput.stories.tsx +60 -2
  78. package/src/components/TextInput/TextInput.styles.ts +36 -19
  79. package/src/components/TextInput/TextInput.tsx +83 -55
  80. package/src/theme/themes/variable.css +1 -1
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  export type ActionButtonProps = {
3
3
  title?: string;
4
- size?: "xs" | "sm" | "md" | "lg";
4
+ size?: "xxs" | "xs" | "sm" | "md" | "lg";
5
+ shape?: "round" | "capsule";
5
6
  variant?: "solid" | "outline" | "icon";
6
7
  disabled?: boolean;
7
8
  active?: boolean;
@@ -10,7 +11,8 @@ export type ActionButtonProps = {
10
11
  } & React.ButtonHTMLAttributes<HTMLButtonElement>;
11
12
  declare const ActionButton: React.ForwardRefExoticComponent<{
12
13
  title?: string;
13
- size?: "xs" | "sm" | "md" | "lg";
14
+ size?: "xxs" | "xs" | "sm" | "md" | "lg";
15
+ shape?: "round" | "capsule";
14
16
  variant?: "solid" | "outline" | "icon";
15
17
  disabled?: boolean;
16
18
  active?: boolean;
@@ -3,7 +3,8 @@ declare const meta: {
3
3
  title: string;
4
4
  component: React.ForwardRefExoticComponent<{
5
5
  title?: string;
6
- size?: "xs" | "sm" | "md" | "lg";
6
+ size?: "xxs" | "xs" | "sm" | "md" | "lg";
7
+ shape?: "round" | "capsule";
7
8
  variant?: "solid" | "outline" | "icon";
8
9
  disabled?: boolean;
9
10
  active?: boolean;
@@ -11,12 +12,21 @@ declare const meta: {
11
12
  className?: string;
12
13
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
13
14
  tags: string[];
15
+ argTypes: {
16
+ shape: {
17
+ control: {
18
+ type: "inline-radio";
19
+ };
20
+ options: string[];
21
+ };
22
+ };
14
23
  parameters: {
15
24
  layout: string;
16
25
  };
17
26
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
18
27
  title?: string | undefined;
19
- size?: "xs" | "sm" | "md" | "lg" | undefined;
28
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | undefined;
29
+ shape?: "round" | "capsule" | undefined;
20
30
  variant?: "solid" | "outline" | "icon" | undefined;
21
31
  disabled?: boolean | undefined;
22
32
  active?: boolean | undefined;
@@ -301,12 +311,24 @@ declare const meta: {
301
311
  export default meta;
302
312
  export declare const Default: {
303
313
  args: {
304
- variant: string;
305
- size: string;
314
+ variant: "solid";
315
+ size: "md";
316
+ shape: "round";
306
317
  };
307
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
318
+ render: (args: {
319
+ title?: string;
320
+ size?: "xxs" | "xs" | "sm" | "md" | "lg";
321
+ shape?: "round" | "capsule";
322
+ variant?: "solid" | "outline" | "icon";
323
+ disabled?: boolean;
324
+ active?: boolean;
325
+ children?: React.ReactNode;
326
+ className?: string;
327
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
328
+ };
329
+ export declare const FigmaPreview: {
330
+ render: () => import("react/jsx-runtime").JSX.Element;
308
331
  };
309
- export declare const Preview: {
310
- args: {};
311
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
332
+ export declare const FigmaPreviewCapsule: {
333
+ render: () => import("react/jsx-runtime").JSX.Element;
312
334
  };
@@ -1,6 +1,7 @@
1
1
  export declare const actionButtonVariants: (props?: ({
2
2
  variant?: "solid" | "outline" | "icon" | null | undefined;
3
- size?: "sm" | "md" | "lg" | "xs" | null | undefined;
3
+ size?: "sm" | "md" | "lg" | "xxs" | "xs" | null | undefined;
4
+ shape?: "round" | "capsule" | null | undefined;
4
5
  disabled?: boolean | null | undefined;
5
6
  active?: boolean | null | undefined;
6
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,4 +1,4 @@
1
1
  export declare const avatarVariants: (props?: ({
2
- size?: "sm" | "md" | "lg" | "xs" | "xxs" | null | undefined;
2
+ size?: "sm" | "md" | "lg" | "xxs" | "xs" | null | undefined;
3
3
  rounded?: "none" | "normal" | "full" | null | undefined;
4
4
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -2,8 +2,9 @@ import React, { ReactElement } from "react";
2
2
  export type ButtonProps = {
3
3
  title?: string;
4
4
  size?: "sm" | "md" | "lg";
5
+ shape?: "round" | "capsule";
5
6
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
6
- variant?: "solid" | "outline" | "flat" | "link";
7
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
7
8
  disabled?: boolean;
8
9
  isLoading?: boolean;
9
10
  fullwidth?: boolean;
@@ -14,8 +15,9 @@ export type ButtonProps = {
14
15
  declare const Button: React.ForwardRefExoticComponent<{
15
16
  title?: string;
16
17
  size?: "sm" | "md" | "lg";
18
+ shape?: "round" | "capsule";
17
19
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
18
- variant?: "solid" | "outline" | "flat" | "link";
20
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
19
21
  disabled?: boolean;
20
22
  isLoading?: boolean;
21
23
  fullwidth?: boolean;
@@ -1,7 +1,8 @@
1
1
  export declare const buttonVariants: (props?: ({
2
2
  color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | null | undefined;
3
3
  size?: "sm" | "md" | "lg" | null | undefined;
4
- variant?: "solid" | "outline" | "link" | "flat" | null | undefined;
4
+ shape?: "round" | "capsule" | null | undefined;
5
+ variant?: "solid" | "outline" | "link" | "text" | "flat" | null | undefined;
5
6
  disabled?: boolean | null | undefined;
6
7
  fullwidth?: boolean | null | undefined;
7
8
  icon?: "sm" | "md" | "lg" | null | undefined;
@@ -4,8 +4,9 @@ declare const meta: {
4
4
  component: React.ForwardRefExoticComponent<{
5
5
  title?: string;
6
6
  size?: "sm" | "md" | "lg";
7
+ shape?: "round" | "capsule";
7
8
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
8
- variant?: "solid" | "outline" | "flat" | "link";
9
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
9
10
  disabled?: boolean;
10
11
  isLoading?: boolean;
11
12
  fullwidth?: boolean;
@@ -14,14 +15,23 @@ declare const meta: {
14
15
  endIcon?: React.ReactElement;
15
16
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
16
17
  tags: string[];
18
+ argTypes: {
19
+ shape: {
20
+ control: {
21
+ type: "inline-radio";
22
+ };
23
+ options: string[];
24
+ };
25
+ };
17
26
  parameters: {
18
27
  layout: string;
19
28
  };
20
29
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
21
30
  title?: string | undefined;
22
31
  size?: "sm" | "md" | "lg" | undefined;
32
+ shape?: "round" | "capsule" | undefined;
23
33
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error" | undefined;
24
- variant?: "solid" | "outline" | "flat" | "link" | undefined;
34
+ variant?: "solid" | "outline" | "flat" | "text" | "link" | undefined;
25
35
  disabled?: boolean | undefined;
26
36
  isLoading?: boolean | undefined;
27
37
  fullwidth?: boolean | undefined;
@@ -310,12 +320,14 @@ export declare const Solid: {
310
320
  title: string;
311
321
  disabled: false;
312
322
  isLoading: false;
323
+ shape: "round";
313
324
  };
314
325
  render: (args: {
315
326
  title?: string;
316
327
  size?: "sm" | "md" | "lg";
328
+ shape?: "round" | "capsule";
317
329
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
318
- variant?: "solid" | "outline" | "flat" | "link";
330
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
319
331
  disabled?: boolean;
320
332
  isLoading?: boolean;
321
333
  fullwidth?: boolean;
@@ -330,12 +342,14 @@ export declare const Outline: {
330
342
  variant: "outline";
331
343
  disabled: false;
332
344
  isLoading: false;
345
+ shape: "round";
333
346
  };
334
347
  render: (args: {
335
348
  title?: string;
336
349
  size?: "sm" | "md" | "lg";
350
+ shape?: "round" | "capsule";
337
351
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
338
- variant?: "solid" | "outline" | "flat" | "link";
352
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
339
353
  disabled?: boolean;
340
354
  isLoading?: boolean;
341
355
  fullwidth?: boolean;
@@ -350,12 +364,36 @@ export declare const Flat: {
350
364
  variant: "flat";
351
365
  disabled: false;
352
366
  isLoading: false;
367
+ shape: "round";
368
+ };
369
+ render: (args: {
370
+ title?: string;
371
+ size?: "sm" | "md" | "lg";
372
+ shape?: "round" | "capsule";
373
+ color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
374
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
375
+ disabled?: boolean;
376
+ isLoading?: boolean;
377
+ fullwidth?: boolean;
378
+ children?: React.ReactNode;
379
+ startIcon?: React.ReactElement;
380
+ endIcon?: React.ReactElement;
381
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
382
+ };
383
+ export declare const Text: {
384
+ args: {
385
+ title: string;
386
+ variant: "text";
387
+ disabled: false;
388
+ isLoading: false;
389
+ shape: "round";
353
390
  };
354
391
  render: (args: {
355
392
  title?: string;
356
393
  size?: "sm" | "md" | "lg";
394
+ shape?: "round" | "capsule";
357
395
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
358
- variant?: "solid" | "outline" | "flat" | "link";
396
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
359
397
  disabled?: boolean;
360
398
  isLoading?: boolean;
361
399
  fullwidth?: boolean;
@@ -370,12 +408,14 @@ export declare const Link: {
370
408
  variant: "link";
371
409
  disabled: false;
372
410
  isLoading: false;
411
+ shape: "round";
373
412
  };
374
413
  render: (args: {
375
414
  title?: string;
376
415
  size?: "sm" | "md" | "lg";
416
+ shape?: "round" | "capsule";
377
417
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
378
- variant?: "solid" | "outline" | "flat" | "link";
418
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
379
419
  disabled?: boolean;
380
420
  isLoading?: boolean;
381
421
  fullwidth?: boolean;
@@ -384,3 +424,28 @@ export declare const Link: {
384
424
  endIcon?: React.ReactElement;
385
425
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
386
426
  };
427
+ export declare const ShapePreview: {
428
+ args: {
429
+ variant: "solid";
430
+ color: "primary";
431
+ };
432
+ render: (args: {
433
+ title?: string;
434
+ size?: "sm" | "md" | "lg";
435
+ shape?: "round" | "capsule";
436
+ color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
437
+ variant?: "solid" | "outline" | "flat" | "text" | "link";
438
+ disabled?: boolean;
439
+ isLoading?: boolean;
440
+ fullwidth?: boolean;
441
+ children?: React.ReactNode;
442
+ startIcon?: React.ReactElement;
443
+ endIcon?: React.ReactElement;
444
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
445
+ };
446
+ export declare const FigmaPreview: {
447
+ render: () => import("react/jsx-runtime").JSX.Element;
448
+ };
449
+ export declare const FigmaPreviewCapsule: {
450
+ render: () => import("react/jsx-runtime").JSX.Element;
451
+ };
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { CheckedState } from "@radix-ui/react-checkbox";
2
3
  declare const meta: {
3
4
  title: string;
4
5
  component: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -244,7 +245,7 @@ declare const meta: {
244
245
  formNoValidate?: boolean | undefined | undefined;
245
246
  formTarget?: string | undefined | undefined;
246
247
  value?: string | number | readonly string[] | undefined;
247
- defaultChecked?: import("@radix-ui/react-checkbox").CheckedState | undefined;
248
+ defaultChecked?: CheckedState | undefined;
248
249
  defaultValue?: string | number | readonly string[] | undefined;
249
250
  suppressContentEditableWarning?: boolean | undefined | undefined;
250
251
  accessKey?: string | undefined | undefined;
@@ -284,26 +285,29 @@ declare const meta: {
284
285
  unselectable?: "on" | "off" | undefined | undefined;
285
286
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
286
287
  is?: string | undefined | undefined;
287
- checked?: import("@radix-ui/react-checkbox").CheckedState | undefined;
288
+ checked?: CheckedState | undefined;
288
289
  required?: boolean | undefined;
289
290
  asChild?: boolean | undefined;
290
- onCheckedChange?: ((checked: import("@radix-ui/react-checkbox").CheckedState) => void) | undefined;
291
+ onCheckedChange?: ((checked: CheckedState) => void) | undefined;
291
292
  ref?: React.LegacyRef<HTMLButtonElement> | undefined;
292
293
  }>) => import("react/jsx-runtime").JSX.Element)[];
293
294
  };
294
295
  export default meta;
295
296
  export declare const Default: {
296
297
  args: {
297
- checked: boolean;
298
- disabled: boolean;
298
+ checked: false;
299
+ disabled: false;
299
300
  };
300
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
301
+ render: (args: Omit<import("@radix-ui/react-checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
301
302
  };
302
303
  export declare const WithText: {
303
304
  args: {};
304
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
305
+ render: (args: Omit<import("@radix-ui/react-checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
305
306
  };
306
- export declare const Diabled: {
307
+ export declare const Disabled: {
307
308
  args: {};
308
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
309
+ render: (args: Omit<import("@radix-ui/react-checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
310
+ };
311
+ export declare const FigmaPreview: {
312
+ render: () => import("react/jsx-runtime").JSX.Element;
309
313
  };
@@ -364,6 +364,7 @@ declare const meta: {
364
364
  src?: string | undefined | undefined;
365
365
  iconMode?: "flat" | "solid" | undefined;
366
366
  keepCloseIconOnValue?: boolean | undefined;
367
+ keepFooterSpace?: boolean | undefined;
367
368
  labelClassName?: string | undefined;
368
369
  classes?: {
369
370
  iconWrapper?: string;
@@ -351,6 +351,7 @@ declare const meta: {
351
351
  src?: string | undefined | undefined;
352
352
  iconMode?: "flat" | "solid" | undefined;
353
353
  keepCloseIconOnValue?: boolean | undefined;
354
+ keepFooterSpace?: boolean | undefined;
354
355
  labelClassName?: string | undefined;
355
356
  classes?: {
356
357
  iconWrapper?: string;
@@ -46,6 +46,7 @@ export declare const MaskedTextInput: React.ForwardRefExoticComponent<{
46
46
  required?: boolean;
47
47
  isFloatingLabel?: boolean;
48
48
  keepCloseIconOnValue?: boolean;
49
+ keepFooterSpace?: boolean;
49
50
  hasClearIcon?: boolean;
50
51
  hasSearchIcon?: boolean;
51
52
  startIcon?: React.ReactNode;
@@ -17,6 +17,7 @@ declare const meta: {
17
17
  required?: boolean;
18
18
  isFloatingLabel?: boolean;
19
19
  keepCloseIconOnValue?: boolean;
20
+ keepFooterSpace?: boolean;
20
21
  hasClearIcon?: boolean;
21
22
  hasSearchIcon?: boolean;
22
23
  startIcon?: React.ReactNode;
@@ -63,6 +64,7 @@ declare const meta: {
63
64
  required?: boolean | undefined;
64
65
  isFloatingLabel?: boolean | undefined;
65
66
  keepCloseIconOnValue?: boolean | undefined;
67
+ keepFooterSpace?: boolean | undefined;
66
68
  hasClearIcon?: boolean | undefined;
67
69
  hasSearchIcon?: boolean | undefined;
68
70
  startIcon?: React.ReactNode;
@@ -320,6 +320,7 @@ declare const meta: {
320
320
  helperText?: string | undefined;
321
321
  errorMessage?: string | undefined;
322
322
  keepCloseIconOnValue?: boolean | undefined;
323
+ keepFooterSpace?: boolean | undefined;
323
324
  labelClassName?: string | undefined;
324
325
  classes?: {
325
326
  iconWrapper?: string;
@@ -288,19 +288,22 @@ declare const meta: {
288
288
  export default meta;
289
289
  export declare const Default: {
290
290
  args: {
291
- disabled: boolean;
291
+ disabled: false;
292
292
  };
293
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
293
+ render: (args: Omit<import("@radix-ui/react-radio-group").RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
294
294
  };
295
- export declare const Diabled: {
295
+ export declare const Disabled: {
296
296
  args: {
297
- disabled: boolean;
297
+ disabled: true;
298
298
  };
299
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
299
+ render: (args: Omit<import("@radix-ui/react-radio-group").RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
300
300
  };
301
301
  export declare const Horizontal: {
302
302
  args: {
303
- disabled: boolean;
303
+ disabled: true;
304
304
  };
305
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
305
+ render: (args: Omit<import("@radix-ui/react-radio-group").RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
306
+ };
307
+ export declare const FigmaPreview: {
308
+ render: () => import("react/jsx-runtime").JSX.Element;
306
309
  };
@@ -345,6 +345,7 @@ declare const meta: {
345
345
  src?: string | undefined | undefined;
346
346
  iconMode?: "flat" | "solid" | undefined;
347
347
  keepCloseIconOnValue?: boolean | undefined;
348
+ keepFooterSpace?: boolean | undefined;
348
349
  labelClassName?: string | undefined;
349
350
  classes?: {
350
351
  iconWrapper?: string;
@@ -15,6 +15,7 @@ export type InputProps = {
15
15
  required?: boolean;
16
16
  isFloatingLabel?: boolean;
17
17
  keepCloseIconOnValue?: boolean;
18
+ keepFooterSpace?: boolean;
18
19
  hasClearIcon?: boolean;
19
20
  hasSearchIcon?: boolean;
20
21
  startIcon?: ReactNode;
@@ -49,6 +50,7 @@ export declare const TextInput: React.ForwardRefExoticComponent<{
49
50
  required?: boolean;
50
51
  isFloatingLabel?: boolean;
51
52
  keepCloseIconOnValue?: boolean;
53
+ keepFooterSpace?: boolean;
52
54
  hasClearIcon?: boolean;
53
55
  hasSearchIcon?: boolean;
54
56
  startIcon?: ReactNode;
@@ -17,6 +17,7 @@ declare const meta: {
17
17
  required?: boolean;
18
18
  isFloatingLabel?: boolean;
19
19
  keepCloseIconOnValue?: boolean;
20
+ keepFooterSpace?: boolean;
20
21
  hasClearIcon?: boolean;
21
22
  hasSearchIcon?: boolean;
22
23
  startIcon?: React.ReactNode;
@@ -55,6 +56,7 @@ declare const meta: {
55
56
  required?: boolean | undefined;
56
57
  isFloatingLabel?: boolean | undefined;
57
58
  keepCloseIconOnValue?: boolean | undefined;
59
+ keepFooterSpace?: boolean | undefined;
58
60
  hasClearIcon?: boolean | undefined;
59
61
  hasSearchIcon?: boolean | undefined;
60
62
  startIcon?: React.ReactNode;
@@ -396,3 +398,11 @@ export declare const CustomIcon: {
396
398
  };
397
399
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
398
400
  };
401
+ export declare const KeepFooterSpace: {
402
+ args: {
403
+ label: string;
404
+ fullwidth: boolean;
405
+ keepFooterSpace: boolean;
406
+ };
407
+ render: () => import("react/jsx-runtime").JSX.Element;
408
+ };
@@ -23,6 +23,21 @@ export declare const helperTextVariant: (props?: ({
23
23
  disabled?: boolean | null | undefined;
24
24
  error?: boolean | null | undefined;
25
25
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
26
+ export declare const inlineEndIconWrapperVariant: (props?: ({
27
+ size?: "sm" | "md" | "lg" | null | undefined;
28
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
29
+ export declare const inlineStartIconWrapperVariant: (props?: ({
30
+ size?: "sm" | "md" | "lg" | null | undefined;
31
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
32
+ export declare const iconActionVariant: (props?: ({
33
+ size?: "sm" | "md" | "lg" | null | undefined;
34
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
35
+ export declare const segmentedIconWrapperVariant: (props?: ({
36
+ size?: "sm" | "md" | "lg" | null | undefined;
37
+ rounded?: "none" | "normal" | "full" | null | undefined;
38
+ error?: boolean | null | undefined;
39
+ position?: "end" | "start" | null | undefined;
40
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
26
41
  export declare const iconWrapperVariant: (props?: ({
27
42
  size?: "sm" | "md" | "lg" | null | undefined;
28
43
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -14,9 +14,10 @@ import { cn } from "@/utils/cn";
14
14
  import { forwardRef } from "react";
15
15
  import { actionButtonVariants } from "./ActionButton.styles";
16
16
  const ActionButton = forwardRef((_a, ref) => {
17
- var { children, disabled, active, className, size, variant } = _a, props = __rest(_a, ["children", "disabled", "active", "className", "size", "variant"]);
17
+ var { children, disabled, active, className, size, shape, variant } = _a, props = __rest(_a, ["children", "disabled", "active", "className", "size", "shape", "variant"]);
18
18
  const actionButtonClassname = actionButtonVariants({
19
19
  size,
20
+ shape,
20
21
  variant,
21
22
  active,
22
23
  disabled,
@@ -6,6 +6,12 @@ const meta = {
6
6
  title: "Components/ActionButton",
7
7
  component: ActionButton,
8
8
  tags: ["autodocs"],
9
+ argTypes: {
10
+ shape: {
11
+ control: { type: "inline-radio" },
12
+ options: ["round", "capsule"],
13
+ },
14
+ },
9
15
  parameters: {
10
16
  layout: "fullscreen",
11
17
  },
@@ -18,18 +24,45 @@ export const Default = {
18
24
  args: {
19
25
  variant: "solid",
20
26
  size: "md",
27
+ shape: "round",
21
28
  },
22
29
  render: (args) => {
23
- console.log("args ", args);
24
30
  const props = Object.assign({}, args);
25
31
  return (_jsx("div", { className: "flex flex-row gap-2 items-start", children: _jsx(ActionButton, Object.assign({}, props, { children: _jsx(Icon, { type: "heroicons", name: "arrow-left" }) })) }));
26
32
  },
27
33
  };
28
- export const Preview = {
29
- args: {},
30
- render: (args) => {
31
- console.log("args ", args);
32
- const props = Object.assign({}, args);
33
- return (_jsxs("div", { className: "flex flex-col gap-2 w-full p-20", children: [_jsxs("div", { className: "flex flex-row justify-between items-center", children: [_jsx("h6", { className: "w-[20px] text-white", children: "Default:" }), _jsxs("div", { className: "flex flex-row gap-2 items-start ", children: [_jsx(ActionButton, { variant: "solid", size: "lg", children: _jsx(Icon, { type: "heroicons", name: "arrows-up-down" }) }), _jsx(ActionButton, { variant: "solid", size: "md", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "sm", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "xs", children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "outline", size: "lg", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "md", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "sm", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "xs", children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "icon", size: "lg", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "md", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "sm", children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "xs", children: _jsx(ArrowsUpDownIcon, {}) })] })] }), _jsxs("div", { className: "flex flex-row justify-between", children: [_jsx("h6", { className: "w-[20px] text-white", children: "Active:" }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "solid", size: "lg", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "md", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "sm", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "xs", active: true, children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "outline", size: "lg", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "md", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "sm", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "xs", active: true, children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "icon", size: "lg", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "md", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "sm", active: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "xs", active: true, children: _jsx(ArrowsUpDownIcon, {}) })] })] }), _jsxs("div", { className: "flex flex-row justify-between", children: [_jsx("h6", { className: "w-[20px] text-white", children: "Disabled:" }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "solid", size: "lg", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "md", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "sm", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "solid", size: "xs", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "outline", size: "lg", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "md", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "sm", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "outline", size: "xs", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) })] }), _jsxs("div", { className: "flex flex-row gap-2 items-start", children: [_jsx(ActionButton, { variant: "icon", size: "lg", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "md", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "sm", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) }), _jsx(ActionButton, { variant: "icon", size: "xs", disabled: true, children: _jsx(ArrowsUpDownIcon, {}) })] })] })] }));
34
+ const previewVariants = [
35
+ { label: "Solid", variant: "solid", sizes: ["lg", "md", "sm"] },
36
+ { label: "Outline", variant: "outline", sizes: ["lg", "md", "sm"] },
37
+ { label: "Icon", variant: "icon", sizes: ["lg", "md", "sm", "xs", "xxs"] },
38
+ ];
39
+ const previewStates = [
40
+ { label: "Default", key: "default" },
41
+ { label: "Hover", key: "hover" },
42
+ { label: "Active", key: "active" },
43
+ { label: "Active - Hover", key: "active-hover" },
44
+ { label: "Disable", key: "disable" },
45
+ ];
46
+ const forcedStateClassName = {
47
+ default: {},
48
+ hover: {
49
+ solid: "!bg-action-button-solid-hover !border-action-button-solid-hover !text-action-button-solid-hover !fill-action-button-solid-hover",
50
+ outline: "!bg-action-button-outline-hover !ring-[var(--action-button-outline-hover-border)] !text-action-button-outline-hover !fill-action-button-outline-hover",
51
+ icon: "!bg-action-button-icon-hover !text-action-button-icon-hover !fill-action-button-icon-hover",
34
52
  },
53
+ active: {},
54
+ "active-hover": {
55
+ solid: "!bg-action-button-solid-active-hover !border-action-button-solid-active-hover !text-action-button-solid-active-hover !fill-action-button-solid-active-hover",
56
+ outline: "!bg-action-button-outline-active-hover !ring-[var(--action-button-outline-active-hover-border)] !text-action-button-outline-active-hover !fill-action-button-outline-active-hover",
57
+ icon: "!bg-action-button-icon-active-hover !text-action-button-icon-active-hover !fill-action-button-icon-active-hover",
58
+ },
59
+ disable: {},
60
+ };
61
+ const icon = _jsx(ArrowsUpDownIcon, {});
62
+ const renderPreview = (shape) => (_jsx("div", { className: "bg-base-bg2 p-8 min-h-screen", children: _jsxs("div", { className: "flex flex-col gap-6", children: [_jsx("h3", { className: "text-xl font-semibold tracking-wide text-text-white", children: "Function button" }), previewStates.map((state) => (_jsxs("div", { className: "grid grid-cols-[120px_repeat(3,minmax(0,1fr))] items-stretch gap-4", children: [_jsx("span", { className: "pt-3 text-sm font-semibold text-text-white", children: state.label }), previewVariants.map((previewVariant) => (_jsxs("div", { className: "h-full rounded-lg border border-base-bg-stroke1 bg-base-bg1 p-3", children: [_jsx("span", { className: "text-xs font-semibold tracking-wide text-text-white uppercase", children: previewVariant.label }), _jsx("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: previewVariant.sizes.map((size) => (_jsx(ActionButton, { variant: previewVariant.variant, size: size, shape: shape, active: state.key === "active" || state.key === "active-hover", disabled: state.key === "disable", className: forcedStateClassName[state.key][previewVariant.variant], children: icon }, `${previewVariant.variant}-${size}-${state.key}`))) })] }, previewVariant.variant)))] }, state.key)))] }) }));
63
+ export const FigmaPreview = {
64
+ render: () => renderPreview("round"),
65
+ };
66
+ export const FigmaPreviewCapsule = {
67
+ render: () => renderPreview("capsule"),
35
68
  };