@rovula/ui 0.1.2 → 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 (52) hide show
  1. package/dist/cjs/bundle.css +294 -73
  2. package/dist/cjs/bundle.js +3 -3
  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/RadioGroup/RadioGroup.stories.d.ts +10 -7
  13. package/dist/components/ActionButton/ActionButton.js +2 -1
  14. package/dist/components/ActionButton/ActionButton.stories.js +40 -7
  15. package/dist/components/ActionButton/ActionButton.styles.js +77 -17
  16. package/dist/components/Button/Button.js +9 -2
  17. package/dist/components/Button/Button.styles.js +51 -14
  18. package/dist/components/Button/Buttons.stories.js +55 -0
  19. package/dist/components/Checkbox/Checkbox.js +6 -7
  20. package/dist/components/Checkbox/Checkbox.stories.js +23 -1
  21. package/dist/components/InputFilter/InputFilter.js +1 -1
  22. package/dist/components/InputFilter/InputFilter.styles.js +1 -1
  23. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  24. package/dist/components/RadioGroup/RadioGroup.stories.js +16 -1
  25. package/dist/esm/bundle.css +294 -73
  26. package/dist/esm/bundle.js +115 -115
  27. package/dist/esm/bundle.js.map +1 -1
  28. package/dist/esm/types/components/ActionButton/ActionButton.d.ts +4 -2
  29. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +30 -8
  30. package/dist/esm/types/components/ActionButton/ActionButton.styles.d.ts +2 -1
  31. package/dist/esm/types/components/Avatar/Avatar.styles.d.ts +1 -1
  32. package/dist/esm/types/components/Button/Button.d.ts +4 -2
  33. package/dist/esm/types/components/Button/Button.styles.d.ts +2 -1
  34. package/dist/esm/types/components/Button/Buttons.stories.d.ts +71 -6
  35. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +13 -9
  36. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +10 -7
  37. package/dist/index.d.ts +6 -3
  38. package/dist/src/theme/global.css +370 -84
  39. package/package.json +1 -1
  40. package/src/components/ActionButton/ActionButton.stories.tsx +105 -149
  41. package/src/components/ActionButton/ActionButton.styles.ts +78 -18
  42. package/src/components/ActionButton/ActionButton.tsx +7 -2
  43. package/src/components/Button/Button.styles.ts +51 -14
  44. package/src/components/Button/Button.tsx +11 -2
  45. package/src/components/Button/Buttons.stories.tsx +235 -0
  46. package/src/components/Checkbox/Checkbox.stories.tsx +50 -4
  47. package/src/components/Checkbox/Checkbox.tsx +12 -8
  48. package/src/components/InputFilter/InputFilter.styles.ts +2 -2
  49. package/src/components/InputFilter/InputFilter.tsx +21 -24
  50. package/src/components/RadioGroup/RadioGroup.stories.tsx +43 -4
  51. package/src/components/RadioGroup/RadioGroup.tsx +1 -1
  52. 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
  };
@@ -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
  };
@@ -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
  };
@@ -8,24 +8,28 @@ export const actionButtonVariants = cva(["box-border flex items-center justify-c
8
8
  "active:bg-action-button-solid-pressed active:border-action-button-solid-pressed active:text-action-button-solid-pressed active:fill-action-button-solid-pressed",
9
9
  ],
10
10
  outline: [
11
- "border",
12
- "bg-action-button-outline-default border-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default",
13
- "hover:bg-action-button-outline-hover hover:border-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover",
14
- "active:bg-action-button-outline-pressed active:border-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed",
11
+ "ring-1 ring-inset",
12
+ "bg-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default ring-[var(--action-button-outline-default-border)]",
13
+ "hover:bg-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover hover:ring-[var(--action-button-outline-hover-border)]",
14
+ "active:bg-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed active:ring-[var(--action-button-outline-pressed-border)]",
15
15
  ],
16
16
  icon: [
17
- "rounded-full",
18
17
  "bg-action-button-icon-default border-action-button-icon-default text-action-button-icon-default fill-action-button-icon-default",
19
18
  "hover:bg-action-button-icon-hover hover:border-action-button-icon-hover hover:text-action-button-icon-hover hover:fill-action-button-icon-hover",
20
19
  "active:bg-action-button-icon-pressed active:border-action-button-icon-pressed active:text-action-button-icon-pressed active:fill-action-button-icon-pressed",
21
20
  ],
22
21
  },
23
22
  size: {
23
+ xxs: "",
24
24
  xs: "",
25
25
  sm: "",
26
26
  md: "",
27
27
  lg: "",
28
28
  },
29
+ shape: {
30
+ round: "",
31
+ capsule: "",
32
+ },
29
33
  disabled: {
30
34
  false: "",
31
35
  },
@@ -47,9 +51,9 @@ export const actionButtonVariants = cva(["box-border flex items-center justify-c
47
51
  variant: "outline",
48
52
  active: true,
49
53
  className: [
50
- "bg-action-button-outline-active border-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active",
51
- "hover:bg-action-button-outline-active-hover hover:border-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover",
52
- "active:bg-action-button-outline-active-pressed active:border-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed",
54
+ "bg-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active ring-[var(--action-button-outline-active-border)]",
55
+ "hover:bg-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover hover:ring-[var(--action-button-outline-active-hover-border)]",
56
+ "active:bg-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed active:ring-[var(--action-button-outline-active-pressed-border)]",
53
57
  ],
54
58
  },
55
59
  {
@@ -64,42 +68,97 @@ export const actionButtonVariants = cva(["box-border flex items-center justify-c
64
68
  {
65
69
  size: "lg",
66
70
  variant: ["solid", "outline"],
67
- className: "px-lg py-md [&_svg]:size-[32px] rounded-md",
71
+ className: "px-[12px] py-[12px] [&_svg]:size-[32px]",
68
72
  },
69
73
  {
70
74
  size: "md",
71
75
  variant: ["solid", "outline"],
72
- className: "px-md py-sm [&_svg]:size-[22px] rounded-md",
76
+ className: "px-[8px] py-[8px] [&_svg]:size-[22px]",
73
77
  },
74
78
  {
75
79
  size: "sm",
76
80
  variant: ["solid", "outline"],
77
- className: "px-sm py-xs [&_svg]:size-[22px] rounded-sm",
81
+ className: "px-[4px] py-[4px] [&_svg]:size-[22px]",
78
82
  },
79
83
  {
80
84
  size: "xs",
81
85
  variant: ["solid", "outline"],
82
- className: "px-xs py-xxs [&_svg]:size-[14px] rounded-xs",
86
+ className: "px-[2px] py-[2px] [&_svg]:size-[14px]",
83
87
  },
84
88
  {
85
89
  size: "lg",
86
90
  variant: "icon",
87
- className: "px-lg py-lg [&_svg]:size-[32px] rounded-full",
91
+ className: "px-[12px] py-[12px] [&_svg]:size-[32px]",
88
92
  },
89
93
  {
90
94
  size: "md",
91
95
  variant: "icon",
92
- className: "px-md py-md [&_svg]:size-[22px] rounded-full",
96
+ className: "px-[8px] py-[8px] [&_svg]:size-[22px]",
93
97
  },
94
98
  {
95
99
  size: "sm",
96
100
  variant: "icon",
97
- className: "px-xs py-xs [&_svg]:size-[22px] rounded-full",
101
+ className: "px-[4px] py-[4px] [&_svg]:size-[22px]",
102
+ },
103
+ {
104
+ size: "xxs",
105
+ variant: "icon",
106
+ className: "px-[1px] py-[1px] [&_svg]:size-[12px]",
98
107
  },
99
108
  {
100
109
  size: "xs",
101
110
  variant: "icon",
102
- className: "px-xxs py-xxs [&_svg]:size-[14px] rounded-full",
111
+ className: "px-[2px] py-[2px] [&_svg]:size-[14px]",
112
+ },
113
+ {
114
+ size: "lg",
115
+ shape: "round",
116
+ className: "rounded-[var(--function-button-l-round)]",
117
+ },
118
+ {
119
+ size: "md",
120
+ shape: "round",
121
+ className: "rounded-[var(--function-button-m-round)]",
122
+ },
123
+ {
124
+ size: "sm",
125
+ shape: "round",
126
+ className: "rounded-[var(--function-button-s-round)]",
127
+ },
128
+ {
129
+ size: "xs",
130
+ shape: "round",
131
+ className: "rounded-[var(--function-button-xs-round)]",
132
+ },
133
+ {
134
+ size: "xxs",
135
+ shape: "round",
136
+ className: "rounded-[var(--function-button-xxs-round)]",
137
+ },
138
+ {
139
+ size: "lg",
140
+ shape: "capsule",
141
+ className: "rounded-[var(--function-button-l-capsule)]",
142
+ },
143
+ {
144
+ size: "md",
145
+ shape: "capsule",
146
+ className: "rounded-[var(--function-button-m-capsule)]",
147
+ },
148
+ {
149
+ size: "sm",
150
+ shape: "capsule",
151
+ className: "rounded-[var(--function-button-s-capsule)]",
152
+ },
153
+ {
154
+ size: "xxs",
155
+ shape: "capsule",
156
+ className: "rounded-[var(--function-button-xxs-capsule)]",
157
+ },
158
+ {
159
+ size: "xs",
160
+ shape: "capsule",
161
+ className: "rounded-[var(--function-button-xs-capsule)]",
103
162
  },
104
163
  {
105
164
  variant: "solid",
@@ -114,7 +173,7 @@ export const actionButtonVariants = cva(["box-border flex items-center justify-c
114
173
  disabled: true,
115
174
  className: [
116
175
  "pointer-events-none",
117
- "bg-action-button-outline-disabled border-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled",
176
+ "bg-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled ring-[var(--action-button-outline-disabled-border)]",
118
177
  ],
119
178
  },
120
179
  {
@@ -129,6 +188,7 @@ export const actionButtonVariants = cva(["box-border flex items-center justify-c
129
188
  defaultVariants: {
130
189
  size: "md",
131
190
  variant: "solid",
191
+ shape: "round",
132
192
  disabled: false,
133
193
  active: false,
134
194
  },