@taiv/ui 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/components/Inputs/Buttons/Button/Button.d.ts +2 -2
  2. package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -1
  3. package/dist/components/Inputs/Buttons/Button/Button.js +3 -3
  4. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
  5. package/dist/components/Inputs/Buttons/Button/Button.stories.js +10 -1
  6. package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts +18 -0
  7. package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts.map +1 -0
  8. package/dist/components/Inputs/Buttons/IconButton/IconButton.js +34 -0
  9. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts +14 -0
  10. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -0
  11. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +180 -0
  12. package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts +19 -0
  13. package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -0
  14. package/dist/components/Inputs/Buttons/IconButton/sizes.js +6 -0
  15. package/dist/components/Inputs/Buttons/shared/variants.d.ts +382 -0
  16. package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -0
  17. package/dist/components/Inputs/Buttons/{Button → shared}/variants.js +58 -1
  18. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -1
  19. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +8 -1
  20. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts +12 -0
  21. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts.map +1 -0
  22. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +63 -0
  23. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.stories.d.ts +12 -0
  24. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.stories.d.ts.map +1 -0
  25. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.stories.js +245 -0
  26. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -1
  27. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +14 -1
  28. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -1
  29. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +8 -1
  30. package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -1
  31. package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +9 -1
  32. package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -1
  33. package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +9 -1
  34. package/dist/components/Layout/Table/Table.d.ts +15 -0
  35. package/dist/components/Layout/Table/Table.d.ts.map +1 -0
  36. package/dist/components/Layout/Table/Table.js +48 -0
  37. package/dist/components/Layout/Table/Table.stories.d.ts +10 -0
  38. package/dist/components/Layout/Table/Table.stories.d.ts.map +1 -0
  39. package/dist/components/Layout/Table/Table.stories.js +257 -0
  40. package/dist/components/index.d.ts +4 -0
  41. package/dist/components/index.d.ts.map +1 -1
  42. package/dist/components/index.js +3 -0
  43. package/dist/constants/colors.d.ts +2 -0
  44. package/dist/constants/colors.d.ts.map +1 -1
  45. package/dist/constants/colors.js +2 -0
  46. package/package.json +5 -1
  47. package/dist/components/Inputs/Buttons/Button/variants.d.ts +0 -191
  48. package/dist/components/Inputs/Buttons/Button/variants.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { ButtonProps as MantineButtonProps } from '@mantine/core';
2
2
  import { componentSizes } from './sizes';
3
- import { componentVariants } from './variants';
3
+ import { buttonVariants } from '../shared/variants';
4
4
  export interface ButtonProps extends MantineButtonProps {
5
5
  onClick?: () => void;
6
6
  size?: keyof typeof componentSizes;
7
- variant?: keyof typeof componentVariants;
7
+ variant?: keyof typeof buttonVariants;
8
8
  fullWidth?: boolean;
9
9
  toggled?: boolean;
10
10
  shadow?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,MAAM,GAAI,0EAAqH,WAAW,4CAmCtJ,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,MAAM,GAAI,0EAAqH,WAAW,4CAmCtJ,CAAC"}
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button as MantineButton } from '@mantine/core';
3
3
  import { fontBase, fontWeight } from '../../../../constants/font';
4
4
  import { componentSizes } from './sizes';
5
- import { componentVariants } from './variants';
5
+ import { buttonVariants } from '../shared/variants';
6
6
  export const Button = ({ onClick, size = 'md', variant = 'primary', fullWidth = false, toggled = false, shadow = false, styles, ...props }) => {
7
- const selectedVariant = componentVariants[variant];
7
+ const selectedVariant = buttonVariants[variant];
8
8
  const selectedSize = componentSizes[size];
9
9
  // Apply active styles for nav variant when isActive is true
10
10
  const getVariantStyles = () => {
@@ -25,7 +25,7 @@ export const Button = ({ onClick, size = 'md', variant = 'primary', fullWidth =
25
25
  padding: selectedSize.padding,
26
26
  minWidth: `${selectedSize.minWidth}rem`,
27
27
  fontSize: selectedSize.fontSize,
28
- boxShadow: shadow ? '0px 1px 3px 0px rgba(0, 0, 0, 0.1)' : 'none',
28
+ boxShadow: shadow ? '0px 4px 6px rgba(0, 0, 0, 0.1)' : 'none',
29
29
  ...getVariantStyles(),
30
30
  },
31
31
  label: {
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA2F7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAsE1B,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAmG7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAsE1B,CAAC"}
@@ -90,6 +90,14 @@ const meta = {
90
90
  type: { summary: '() => void' },
91
91
  },
92
92
  },
93
+ shadow: {
94
+ control: { type: 'boolean' },
95
+ description: 'Adds shadow to the button',
96
+ table: {
97
+ type: { summary: 'boolean' },
98
+ defaultValue: { summary: 'false' },
99
+ }
100
+ }
93
101
  },
94
102
  };
95
103
  export default meta;
@@ -101,6 +109,7 @@ export const Default = {
101
109
  disabled: false,
102
110
  loading: false,
103
111
  fullWidth: false,
112
+ shadow: false,
104
113
  leftIcon: undefined,
105
114
  rightIcon: undefined,
106
115
  styles: {},
@@ -114,7 +123,7 @@ export const Sizes = {
114
123
  render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(Button, { size: "sm", children: "Small" }), _jsx(Button, { size: "md", children: "Medium" }), _jsx(Button, { size: "lg", children: "Large" })] })),
115
124
  };
116
125
  export const States = {
117
- render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(Button, { children: "Normal" }), _jsx(Button, { disabled: true, children: "Disabled" }), _jsx(Button, { loading: true, children: "Loading" })] })),
126
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(Button, { children: "Normal" }), _jsx(Button, { disabled: true, children: "Disabled" }), _jsx(Button, { loading: true, children: "Loading" }), _jsx(Button, { shadow: true, children: "Shadow" })] })),
118
127
  };
119
128
  export const CustomStyles = {
120
129
  render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(Button, { styles: {
@@ -0,0 +1,18 @@
1
+ import { ReactElement } from 'react';
2
+ import { ButtonProps as MantineButtonProps } from '@mantine/core';
3
+ import { componentSizes } from './sizes';
4
+ import { buttonVariants, subtleVariants } from '../shared/variants';
5
+ export interface IconButtonProps extends Omit<MantineButtonProps, 'leftIcon' | 'rightIcon'> {
6
+ onClick?: () => void;
7
+ size?: keyof typeof componentSizes;
8
+ variant?: keyof typeof buttonVariants | keyof typeof subtleVariants;
9
+ toggled?: boolean;
10
+ shadow?: boolean;
11
+ subtle?: boolean;
12
+ tooltip?: string;
13
+ children?: ReactElement<{
14
+ size?: number;
15
+ }>;
16
+ }
17
+ export declare const IconButton: ({ onClick, size, variant, toggled, shadow, subtle, tooltip, styles, children, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,WAAW,CAAC;IACzF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,UAAU,GAAI,0FAA0I,eAAe,4CA0CnL,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button as MantineButton } from '@mantine/core';
3
+ import { componentSizes } from './sizes';
4
+ import { buttonVariants, subtleVariants } from '../shared/variants';
5
+ import { neutral } from '../../../../constants/colors';
6
+ import { Tooltip } from '../../../Info/Tooltips/Tooltip/Tooltip';
7
+ export const IconButton = ({ onClick, size = 'md', variant = 'primary', toggled = false, shadow = false, subtle = false, tooltip = '', styles, children, ...props }) => {
8
+ const selectedVariant = subtle && !props.loading ? subtleVariants[variant] : buttonVariants[variant];
9
+ const selectedSize = componentSizes[size];
10
+ // Apply active styles for nav variant when isActive is true
11
+ const getVariantStyles = () => {
12
+ if (toggled) {
13
+ return {
14
+ ...selectedVariant,
15
+ ...selectedVariant['&:toggled'],
16
+ };
17
+ }
18
+ return selectedVariant;
19
+ };
20
+ const style = {
21
+ root: {
22
+ borderRadius: '8px',
23
+ border: subtle ? `1px solid ${neutral[50]}` : '1px solid white',
24
+ height: `${selectedSize.borderLength}rem`,
25
+ padding: selectedSize.padding,
26
+ width: `${selectedSize.borderLength}rem`,
27
+ boxShadow: shadow ? '0px 4px 6px rgba(0, 0, 0, 0.1)' : 'none',
28
+ ...getVariantStyles(),
29
+ },
30
+ ...styles,
31
+ };
32
+ const Button = (_jsx(MantineButton, { styles: style, size: size, onClick: onClick, loaderPosition: "center", loaderProps: { size: selectedSize.iconSize }, ...props, children: props.loading ? _jsx(_Fragment, {}) : children }));
33
+ return tooltip ? _jsx(Tooltip, { text: tooltip, children: Button }) : Button;
34
+ };
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { IconButton } from './IconButton';
3
+ declare const meta: Meta<typeof IconButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Variants: Story;
8
+ export declare const Subtle: Story;
9
+ export declare const Tooltip: Story;
10
+ export declare const Sizes: Story;
11
+ export declare const States: Story;
12
+ export declare const SubtleStates: Story;
13
+ export declare const CustomStyles: Story;
14
+ //# sourceMappingURL=IconButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/IconButton/IconButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAsFjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAWpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAsE1B,CAAC"}
@@ -0,0 +1,180 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconButton } from './IconButton';
3
+ import { Icon12Hours, Icon24Hours, Icon360View, IconAdjustments, IconAlertCircle, IconArrowLeft, IconArrowRight, IconArrowsMaximize, IconCaretDown, IconCheck, IconClock, IconClock2, IconHistory, IconLoader2 } from '@tabler/icons-react';
4
+ import { Group } from '../../../Layout/Group/Group';
5
+ const meta = {
6
+ title: 'Components/Inputs/Buttons/IconButton',
7
+ component: IconButton,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: "[View Mantine Docs](https://v6.mantine.dev/core/button/)\n\nThe IconButton component is a customizable wrapper around Mantine's Button component that provides consistent styling and behavior across your application. It extends Mantine v6's ButtonProps while adding custom variants and sizing options.",
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ size: {
18
+ control: { type: 'select' },
19
+ options: ['sm', 'md', 'lg'],
20
+ description: "Controls the button's height and padding. These values are square sizes.",
21
+ table: {
22
+ type: { summary: "'sm' | 'md' | 'lg'" },
23
+ defaultValue: { summary: "'md'" },
24
+ },
25
+ },
26
+ variant: {
27
+ control: { type: 'select' },
28
+ options: ['primary', 'secondary', 'cancel', 'success', 'warning', 'text', 'nav'],
29
+ description: "Defines the button's visual style and color scheme",
30
+ table: {
31
+ type: { summary: "'primary' | 'secondary' | 'cancel' | 'success' | 'warning' | 'text' | 'nav'" },
32
+ defaultValue: { summary: "'primary'" },
33
+ },
34
+ },
35
+ children: {
36
+ control: { type: 'object' },
37
+ description: 'Icon to be displayed in the button',
38
+ table: {
39
+ type: { summary: 'ReactNode' },
40
+ defaultValue: { summary: '<IconHistory />' },
41
+ },
42
+ },
43
+ styles: {
44
+ control: { type: 'object' },
45
+ description: 'Custom styles object',
46
+ table: {
47
+ type: { summary: 'MantineStylesObject' },
48
+ },
49
+ },
50
+ disabled: {
51
+ control: { type: 'boolean' },
52
+ description: 'Disabled state',
53
+ table: {
54
+ type: { summary: 'boolean' },
55
+ defaultValue: { summary: 'false' },
56
+ },
57
+ },
58
+ loading: {
59
+ control: { type: 'boolean' },
60
+ description: 'Indicate loading state',
61
+ table: {
62
+ type: { summary: 'boolean' },
63
+ defaultValue: { summary: 'false' },
64
+ },
65
+ },
66
+ onClick: {
67
+ action: 'clicked',
68
+ description: 'Click handler function',
69
+ table: {
70
+ type: { summary: '() => void' },
71
+ },
72
+ },
73
+ shadow: {
74
+ control: { type: 'boolean' },
75
+ description: 'Adds shadow to the button',
76
+ table: {
77
+ type: { summary: 'boolean' },
78
+ defaultValue: { summary: 'false' },
79
+ }
80
+ },
81
+ subtle: {
82
+ control: { type: 'boolean' },
83
+ description: 'Colors the icon instead of the background and reverses the color based on the variant',
84
+ table: {
85
+ type: { summary: 'boolean' },
86
+ defaultValue: { summary: 'false' },
87
+ }
88
+ }
89
+ },
90
+ };
91
+ export default meta;
92
+ export const Default = {
93
+ args: {
94
+ children: _jsx(IconHistory, {}),
95
+ size: 'md',
96
+ variant: 'primary',
97
+ disabled: false,
98
+ loading: false,
99
+ shadow: false,
100
+ subtle: false,
101
+ styles: {},
102
+ onClick: () => { },
103
+ },
104
+ };
105
+ export const Variants = {
106
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { variant: "primary", children: _jsx(Icon12Hours, {}) }), _jsx(IconButton, { variant: "secondary", children: _jsx(Icon24Hours, {}) }), _jsx(IconButton, { variant: "cancel", children: _jsx(IconClock, {}) }), _jsx(IconButton, { variant: "success", children: _jsx(IconCheck, {}) }), _jsx(IconButton, { variant: "warning", children: _jsx(IconAlertCircle, {}) }), _jsx(IconButton, { variant: "text", children: _jsx(IconClock2, {}) })] })),
107
+ };
108
+ export const Subtle = {
109
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { variant: "primary", subtle: true, children: _jsx(Icon12Hours, {}) }), _jsx(IconButton, { variant: "secondary", subtle: true, children: _jsx(Icon24Hours, {}) }), _jsx(IconButton, { variant: "cancel", subtle: true, children: _jsx(IconClock, {}) }), _jsx(IconButton, { variant: "success", subtle: true, children: _jsx(IconCheck, {}) }), _jsx(IconButton, { variant: "warning", subtle: true, children: _jsx(IconAlertCircle, {}) }), _jsx(IconButton, { variant: "text", subtle: true, children: _jsx(IconClock2, {}) })] })),
110
+ };
111
+ export const Tooltip = {
112
+ render: () => (_jsx(Group, { gap: "1.6rem", children: _jsx(IconButton, { tooltip: "Tooltip", children: _jsx(Icon12Hours, {}) }) })),
113
+ };
114
+ export const Sizes = {
115
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { size: "sm", children: _jsx(Icon360View, {}) }), _jsx(IconButton, { size: "md", children: _jsx(IconAdjustments, {}) }), _jsx(IconButton, { size: "lg", children: _jsx(IconArrowsMaximize, {}) })] })),
116
+ };
117
+ export const States = {
118
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { children: _jsx(IconArrowLeft, {}) }), _jsx(IconButton, { disabled: true, children: _jsx(IconCaretDown, {}) }), _jsx(IconButton, { loading: true, children: _jsx(IconLoader2, {}) }), _jsx(IconButton, { shadow: true, children: _jsx(IconArrowLeft, {}) })] })),
119
+ };
120
+ export const SubtleStates = {
121
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { subtle: true, children: _jsx(IconArrowLeft, {}) }), _jsx(IconButton, { subtle: true, disabled: true, children: _jsx(IconCaretDown, {}) }), _jsx(IconButton, { subtle: true, loading: true, children: _jsx(IconLoader2, {}) }), _jsx(IconButton, { subtle: true, shadow: true, children: _jsx(IconArrowLeft, {}) })] })),
122
+ };
123
+ export const CustomStyles = {
124
+ render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(IconButton, { styles: {
125
+ root: {
126
+ borderRadius: '20px',
127
+ background: 'linear-gradient(45deg, #ff6b6b, #ee5a24)',
128
+ '&:hover': {
129
+ background: 'linear-gradient(45deg, #ee5a24, #ff6b6b)',
130
+ },
131
+ },
132
+ }, children: _jsx(IconArrowLeft, {}) }), _jsx(IconButton, { styles: {
133
+ root: {
134
+ borderRadius: '0px',
135
+ background: 'black',
136
+ color: 'white',
137
+ border: '2px solid white',
138
+ '&:hover': {
139
+ background: 'white',
140
+ color: 'black',
141
+ },
142
+ },
143
+ }, children: _jsx(IconArrowRight, {}) })] })),
144
+ parameters: {
145
+ docs: {
146
+ source: {
147
+ code: `<IconButton
148
+ styles={{
149
+ root: {
150
+ borderRadius: '20px',
151
+ background: 'linear-gradient(45deg, #ff6b6b, #ee5a24)',
152
+ '&:hover': {
153
+ background: 'linear-gradient(45deg, #ee5a24, #ff6b6b)',
154
+ },
155
+ },
156
+ }}
157
+ >
158
+ <IconArrowLeft />
159
+ </IconButton>
160
+
161
+ <IconButton
162
+ styles={{
163
+ root: {
164
+ borderRadius: '0px',
165
+ background: 'black',
166
+ color: 'white',
167
+ border: '2px solid white',
168
+ '&:hover': {
169
+ background: 'white',
170
+ color: 'black',
171
+ },
172
+ },
173
+ }}
174
+ >
175
+ <IconArrowRight />
176
+ </IconButton>`,
177
+ },
178
+ },
179
+ },
180
+ };
@@ -0,0 +1,19 @@
1
+ declare const componentSizes: {
2
+ sm: {
3
+ borderLength: number;
4
+ padding: string;
5
+ iconSize: number;
6
+ };
7
+ md: {
8
+ borderLength: number;
9
+ padding: string;
10
+ iconSize: number;
11
+ };
12
+ lg: {
13
+ borderLength: number;
14
+ padding: string;
15
+ iconSize: number;
16
+ };
17
+ };
18
+ export { componentSizes };
19
+ //# sourceMappingURL=sizes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/IconButton/sizes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;CAInB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ const componentSizes = {
2
+ sm: { borderLength: 2.8, padding: '0.4rem', iconSize: 16 },
3
+ md: { borderLength: 3.6, padding: '0.4rem', iconSize: 20 },
4
+ lg: { borderLength: 4.8, padding: '0.4rem', iconSize: 24 },
5
+ };
6
+ export { componentSizes };