adnbn-ui 0.0.1 → 0.0.2

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 (145) hide show
  1. package/.prettierignore +3 -0
  2. package/.prettierrc +28 -0
  3. package/.storybook/main.ts +22 -0
  4. package/.storybook/preview.tsx +100 -0
  5. package/.storybook/styles/custom.scss +59 -0
  6. package/.storybook/styles/preview.css +58 -0
  7. package/.storybook/vitest.setup.ts +9 -0
  8. package/eslint.config.js +39 -0
  9. package/package.json +77 -2
  10. package/src/components/Avatar/Avatar.stories.tsx +118 -0
  11. package/src/components/Avatar/Avatar.tsx +65 -0
  12. package/src/components/Avatar/avatar.module.scss +77 -0
  13. package/src/components/Avatar/index.ts +2 -0
  14. package/src/components/BaseButton/BaseButton.tsx +36 -0
  15. package/src/components/BaseButton/base-button.module.scss +24 -0
  16. package/src/components/BaseButton/index.ts +2 -0
  17. package/src/components/Button/Button.stories.tsx +148 -0
  18. package/src/components/Button/Button.tsx +73 -0
  19. package/src/components/Button/button.module.scss +140 -0
  20. package/src/components/Button/index.ts +2 -0
  21. package/src/components/Checkbox/Checkbox.stories.tsx +180 -0
  22. package/src/components/Checkbox/Checkbox.tsx +71 -0
  23. package/src/components/Checkbox/checkbox.module.scss +82 -0
  24. package/src/components/Checkbox/index.ts +2 -0
  25. package/src/components/Dialog/Dialog.tsx +125 -0
  26. package/src/components/Dialog/dialog.module.scss +55 -0
  27. package/src/components/Dialog/index.ts +2 -0
  28. package/src/components/Drawer/Drawer.stories.tsx +89 -0
  29. package/src/components/Drawer/Drawer.tsx +57 -0
  30. package/src/components/Drawer/drawer.module.scss +170 -0
  31. package/src/components/Drawer/index.ts +2 -0
  32. package/src/components/Footer/Footer.stories.tsx +118 -0
  33. package/src/components/Footer/Footer.tsx +58 -0
  34. package/src/components/Footer/footer.module.scss +44 -0
  35. package/src/components/Footer/index.ts +2 -0
  36. package/src/components/Header/Header.stories.tsx +49 -0
  37. package/src/components/Header/Header.tsx +73 -0
  38. package/src/components/Header/header.module.scss +56 -0
  39. package/src/components/Header/index.ts +2 -0
  40. package/src/components/Highlight/Highlight.stories.tsx +83 -0
  41. package/src/components/Highlight/Highlight.tsx +40 -0
  42. package/src/components/Highlight/highlight.module.scss +47 -0
  43. package/src/components/Highlight/index.ts +2 -0
  44. package/src/components/Icon/Icon.tsx +46 -0
  45. package/src/components/Icon/icon.module.scss +17 -0
  46. package/src/components/Icon/index.ts +2 -0
  47. package/src/components/IconButton/IconButton.stories.tsx +179 -0
  48. package/src/components/IconButton/IconButton.tsx +65 -0
  49. package/src/components/IconButton/icon-button.module.scss +86 -0
  50. package/src/components/IconButton/index.ts +2 -0
  51. package/src/components/Layout/Layout.stories.tsx +88 -0
  52. package/src/components/Layout/Provider.tsx +47 -0
  53. package/src/components/Layout/context.ts +24 -0
  54. package/src/components/Layout/index.ts +2 -0
  55. package/src/components/Layout/layout.module.scss +17 -0
  56. package/src/components/List/List.stories.tsx +81 -0
  57. package/src/components/List/List.tsx +24 -0
  58. package/src/components/List/index.ts +2 -0
  59. package/src/components/List/list.module.scss +8 -0
  60. package/src/components/ListItem/ListItem.tsx +75 -0
  61. package/src/components/ListItem/index.ts +2 -0
  62. package/src/components/ListItem/list-item.module.scss +36 -0
  63. package/src/components/Modal/Modal.stories.tsx +95 -0
  64. package/src/components/Modal/Modal.tsx +94 -0
  65. package/src/components/Modal/index.ts +2 -0
  66. package/src/components/Modal/modal.module.scss +97 -0
  67. package/src/components/Odometer/Odometer.stories.tsx +66 -0
  68. package/src/components/Odometer/Odometer.tsx +45 -0
  69. package/src/components/Odometer/hooks/useOdometer.tsx +24 -0
  70. package/src/components/Odometer/index.ts +3 -0
  71. package/src/components/Odometer/odometer.module.scss +81 -0
  72. package/src/components/Odometer/odometr.d.ts +9 -0
  73. package/src/components/ScrollArea/ScrollArea.stories.tsx +58 -0
  74. package/src/components/ScrollArea/ScrollArea.tsx +63 -0
  75. package/src/components/ScrollArea/index.ts +2 -0
  76. package/src/components/ScrollArea/scroll-area.module.scss +54 -0
  77. package/src/components/SvgSprite/SvgSprite.tsx +21 -0
  78. package/src/components/SvgSprite/index.ts +2 -0
  79. package/src/components/Switch/Switch.stories.tsx +25 -0
  80. package/src/components/Switch/Switch.tsx +23 -0
  81. package/src/components/Switch/index.ts +2 -0
  82. package/src/components/Switch/switch.module.scss +65 -0
  83. package/src/components/Tag/Tag.stories.tsx +157 -0
  84. package/src/components/Tag/Tag.tsx +71 -0
  85. package/src/components/Tag/index.ts +2 -0
  86. package/src/components/Tag/tag.module.scss +118 -0
  87. package/src/components/TextArea/TextArea.stories.tsx +145 -0
  88. package/src/components/TextArea/TextArea.tsx +143 -0
  89. package/src/components/TextArea/index.ts +2 -0
  90. package/src/components/TextArea/text-area.module.scss +88 -0
  91. package/src/components/TextField/TextField.stories.tsx +177 -0
  92. package/src/components/TextField/TextField.tsx +162 -0
  93. package/src/components/TextField/index.ts +2 -0
  94. package/src/components/TextField/text-field.module.scss +129 -0
  95. package/src/components/Toast/Toast.stories.tsx +209 -0
  96. package/src/components/Toast/Toast.tsx +142 -0
  97. package/src/components/Toast/index.ts +2 -0
  98. package/src/components/Toast/toast.module.scss +267 -0
  99. package/src/components/Tooltip/Tooltip.stories.tsx +80 -0
  100. package/src/components/Tooltip/Tooltip.tsx +79 -0
  101. package/src/components/Tooltip/index.ts +2 -0
  102. package/src/components/Tooltip/tooltip.module.scss +93 -0
  103. package/src/components/View/View.stories.tsx +47 -0
  104. package/src/components/View/View.tsx +68 -0
  105. package/src/components/View/index.ts +2 -0
  106. package/src/components/View/view.module.scss +38 -0
  107. package/src/components/ViewDrawer/ViewDrawer.stories.tsx +75 -0
  108. package/src/components/ViewDrawer/ViewDrawer.tsx +24 -0
  109. package/src/components/ViewDrawer/index.ts +2 -0
  110. package/src/components/ViewModal/ViewModal.stories.tsx +68 -0
  111. package/src/components/ViewModal/ViewModal.tsx +24 -0
  112. package/src/components/ViewModal/index.ts +2 -0
  113. package/src/components/index.ts +29 -0
  114. package/src/components/types.ts +65 -0
  115. package/src/config/default.ts +3 -0
  116. package/src/config/index.ts +26 -0
  117. package/src/declaration.d.ts +8 -0
  118. package/src/index.ts +3 -0
  119. package/src/plugin/builder/ConfigBuilder.ts +32 -0
  120. package/src/plugin/builder/StyleBuilder.ts +34 -0
  121. package/src/plugin/builder/virtual.config.ts +7 -0
  122. package/src/plugin/finder/ConfigFinder.ts +26 -0
  123. package/src/plugin/finder/Finder.ts +76 -0
  124. package/src/plugin/finder/StyleFinder.ts +23 -0
  125. package/src/plugin/index.ts +70 -0
  126. package/src/plugin/types.ts +8 -0
  127. package/src/providers/UIProvider.tsx +26 -0
  128. package/src/providers/icons/IconsProvider.tsx +34 -0
  129. package/src/providers/icons/context.ts +22 -0
  130. package/src/providers/icons/index.ts +3 -0
  131. package/src/providers/index.ts +3 -0
  132. package/src/providers/theme/ThemeProvider.tsx +39 -0
  133. package/src/providers/theme/context.ts +30 -0
  134. package/src/providers/theme/index.ts +2 -0
  135. package/src/providers/theme/styles/default.scss +95 -0
  136. package/src/providers/theme/styles/reset.css +111 -0
  137. package/src/styles/mixins.scss +23 -0
  138. package/src/types/theme.ts +4 -0
  139. package/src/utils/index.ts +2 -0
  140. package/src/utils/react.ts +21 -0
  141. package/src/utils/utils.ts +12 -0
  142. package/tsconfig.json +18 -0
  143. package/vite.config.ts +11 -0
  144. package/vitest.workspace.ts +19 -0
  145. package/components/Button/index.ts +0 -0
@@ -0,0 +1,145 @@
1
+ import {Fragment} from "react";
2
+ import {Meta, StoryObj} from "@storybook/react";
3
+
4
+ import {capitalizeFirstLetter, hideInTable} from "../../utils";
5
+
6
+ import TextAreaComponent, {TextAreaRadius, TextAreaSize, TextAreaVariant} from "./TextArea";
7
+
8
+ const variants: TextAreaVariant[] = [TextAreaVariant.Regular, TextAreaVariant.Outlined, TextAreaVariant.Filled];
9
+ const sizes: (TextAreaSize | "default")[] = [TextAreaSize.Small, "default", TextAreaSize.Medium, TextAreaSize.Large];
10
+ const radius: (TextAreaRadius | "default")[] = [
11
+ TextAreaRadius.None,
12
+ TextAreaRadius.Small,
13
+ "default",
14
+ TextAreaRadius.Medium,
15
+ TextAreaRadius.Large,
16
+ ];
17
+
18
+ const meta: Meta<typeof TextAreaComponent> = {
19
+ title: "Components/TextArea",
20
+ component: TextAreaComponent,
21
+ tags: ["autodocs"],
22
+ argTypes: {
23
+ variant: {
24
+ options: variants,
25
+ control: {type: "select"},
26
+ },
27
+ size: {
28
+ options: sizes,
29
+ control: {type: "select"},
30
+ },
31
+ radius: {
32
+ options: radius,
33
+ control: {type: "select"},
34
+ },
35
+
36
+ label: hideInTable,
37
+ children: hideInTable,
38
+ },
39
+ };
40
+
41
+ export default meta;
42
+
43
+ export const TextArea: StoryObj<typeof TextAreaComponent> = {
44
+ args: {
45
+ placeholder: "Enter text",
46
+ disabled: false,
47
+ fullWidth: false,
48
+ },
49
+ };
50
+
51
+ export const Variant = () => {
52
+ return (
53
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(3, auto)"}}>
54
+ {variants.map(variant => (
55
+ <div key={variant}>
56
+ <TextAreaComponent variant={variant} placeholder={capitalizeFirstLetter(variant)} />
57
+ </div>
58
+ ))}
59
+ </div>
60
+ );
61
+ };
62
+
63
+ export const Size = () => {
64
+ return (
65
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(4, auto)"}}>
66
+ {sizes.map(size => (
67
+ <div key={size}>
68
+ <TextAreaComponent
69
+ size={size !== "default" ? size : undefined}
70
+ placeholder={capitalizeFirstLetter(size)}
71
+ />
72
+ </div>
73
+ ))}
74
+ </div>
75
+ );
76
+ };
77
+
78
+ export const Radius = () => {
79
+ return (
80
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(3, auto)"}}>
81
+ {radius.map(radius => (
82
+ <div key={radius}>
83
+ <TextAreaComponent
84
+ radius={radius !== "default" ? radius : undefined}
85
+ placeholder={capitalizeFirstLetter(radius)}
86
+ />
87
+ </div>
88
+ ))}
89
+ </div>
90
+ );
91
+ };
92
+
93
+ export const VariantRadius = () => {
94
+ return (
95
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(5, auto)"}}>
96
+ <span className="item-card__title"> Variant \ Radius</span>
97
+ {radius.slice(1).map(radius => (
98
+ <span key={radius} className="item-card__title">
99
+ {capitalizeFirstLetter(radius)} radius
100
+ </span>
101
+ ))}
102
+ {variants.map(variant => (
103
+ <Fragment key={variant}>
104
+ <span className="item-card__title">{capitalizeFirstLetter(variant)}</span>
105
+ {radius.slice(1).map(radius => (
106
+ <div key={`${radius}-${variant}`} className="item-card">
107
+ <TextAreaComponent
108
+ variant={variant}
109
+ radius={radius !== "default" ? radius : undefined}
110
+ placeholder="Enter value"
111
+ />
112
+ </div>
113
+ ))}
114
+ </Fragment>
115
+ ))}
116
+ </div>
117
+ );
118
+ };
119
+
120
+ export const VariantSize = () => {
121
+ return (
122
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(5, auto)"}}>
123
+ <span className="item-card__title"> Variant \ Size</span>
124
+ {sizes.map(size => (
125
+ <span key={size} className="item-card__title">
126
+ {capitalizeFirstLetter(size)} size
127
+ </span>
128
+ ))}
129
+ {variants.map(variant => (
130
+ <Fragment key={variant}>
131
+ <span className="item-card__title">{capitalizeFirstLetter(variant)}</span>
132
+ {sizes.map(size => (
133
+ <div key={`${size}-${variant}`} className="item-card">
134
+ <TextAreaComponent
135
+ variant={variant}
136
+ size={size !== "default" ? size : undefined}
137
+ placeholder="Enter value"
138
+ />
139
+ </div>
140
+ ))}
141
+ </Fragment>
142
+ ))}
143
+ </div>
144
+ );
145
+ };
@@ -0,0 +1,143 @@
1
+ import React, {
2
+ ChangeEventHandler,
3
+ ComponentProps,
4
+ forwardRef,
5
+ memo,
6
+ useCallback,
7
+ useEffect,
8
+ useImperativeHandle,
9
+ useRef,
10
+ useState,
11
+ } from "react";
12
+
13
+ import classnames from "classnames";
14
+ import autosize from "autosize";
15
+
16
+ import {useComponentProps} from "../../providers";
17
+
18
+ import styles from "./text-area.module.scss";
19
+
20
+ export enum TextAreaVariant {
21
+ Regular = "regular",
22
+ Outlined = "outlined",
23
+ Filled = "filled",
24
+ }
25
+
26
+ export enum TextAreaSize {
27
+ Small = "small",
28
+ Medium = "medium",
29
+ Large = "large",
30
+ }
31
+
32
+ export enum TextAreaRadius {
33
+ None = "none",
34
+ Small = "small",
35
+ Medium = "medium",
36
+ Large = "large",
37
+ }
38
+
39
+ export interface TextAreaActions {
40
+ select(): void;
41
+
42
+ focus(): void;
43
+
44
+ setValue(value: string): void;
45
+ }
46
+
47
+ export interface TextAreaProps extends ComponentProps<"textarea"> {
48
+ variant?: TextAreaVariant;
49
+ radius?: TextAreaRadius;
50
+ size?: TextAreaSize;
51
+ fullWidth?: boolean;
52
+ label?: string;
53
+ children?: string | ReadonlyArray<string> | number | undefined;
54
+ }
55
+
56
+ const TextArea = forwardRef<TextAreaActions, TextAreaProps>((props, ref) => {
57
+ const {
58
+ variant = TextAreaVariant.Regular,
59
+ radius,
60
+ size,
61
+ fullWidth,
62
+ label,
63
+ id,
64
+ name,
65
+ rows = 4,
66
+ value: propValue = "",
67
+ children,
68
+ onChange,
69
+ className,
70
+ ...other
71
+ } = {...useComponentProps("textArea"), ...props};
72
+
73
+ const [value, setValue] = useState(propValue || children);
74
+
75
+ const textareaRef = useRef<HTMLTextAreaElement | null>(null);
76
+
77
+ const handleChange = useCallback<ChangeEventHandler<HTMLTextAreaElement>>(
78
+ event => {
79
+ onChange?.(event);
80
+ setValue(event.currentTarget.value);
81
+ },
82
+ [onChange]
83
+ );
84
+
85
+ useImperativeHandle(
86
+ ref,
87
+ () => ({
88
+ select() {
89
+ textareaRef.current?.select();
90
+ },
91
+ focus() {
92
+ textareaRef.current?.focus();
93
+ },
94
+ setValue(value: string) {
95
+ setValue(value);
96
+ },
97
+ }),
98
+ []
99
+ );
100
+
101
+ useEffect(() => {
102
+ const textarea = textareaRef.current;
103
+
104
+ if (textarea) {
105
+ autosize(textarea);
106
+ }
107
+
108
+ return () => {
109
+ if (textarea) {
110
+ autosize.destroy(textarea);
111
+ }
112
+ };
113
+ }, []);
114
+
115
+ useEffect(() => {
116
+ setValue(propValue || children);
117
+ }, [propValue, children]);
118
+
119
+ return (
120
+ <textarea
121
+ {...other}
122
+ ref={textareaRef}
123
+ id={id}
124
+ name={name || id}
125
+ value={value}
126
+ rows={rows}
127
+ aria-label={label}
128
+ onChange={handleChange}
129
+ className={classnames(
130
+ styles["text-area"],
131
+ {
132
+ [styles[`text-area--${variant}`]]: variant,
133
+ [styles[`text-area--${size}-size`]]: size,
134
+ [styles[`text-area--${radius}-radius`]]: radius,
135
+ [styles["text-area--full-width"]]: fullWidth,
136
+ },
137
+ className
138
+ )}
139
+ />
140
+ );
141
+ });
142
+
143
+ export default memo(TextArea);
@@ -0,0 +1,2 @@
1
+ export {default as TextArea, TextAreaVariant, TextAreaSize} from "./TextArea";
2
+ export type {TextAreaProps, TextAreaActions} from "./TextArea";
@@ -0,0 +1,88 @@
1
+ $root: text-area;
2
+
3
+ .#{$root} {
4
+ outline: none;
5
+ box-sizing: border-box;
6
+ font-family: var(--text-area-font-family, var(--font-family)), sans-serif;
7
+ font-weight: var(--text-area-font-weight, 400);
8
+ font-size: var(--text-area-font-size, 14px);
9
+ letter-spacing: var(--text-area-letter-spacing, 0.5px);
10
+ line-height: var(--text-area-line-height, 18px);
11
+ padding: var(--text-area-padding, 8px 12px);
12
+ border-radius: var(--text-area-border-radius, 8px);
13
+ min-width: var(--text-area-min-width, 200px);
14
+ transition:
15
+ border-color var(--transition-speed-sm),
16
+ box-shadow var(--transition-speed-sm),
17
+ background var(--transition-speed-sm);
18
+
19
+ &:focus {
20
+ border-color: var(--text-area-focus-border-color, color-mix(in srgb, white 40%, var(--primary-color)));
21
+ box-shadow: var(--text-area-focus-shadow, 0 0 4px var(--primary-color));
22
+ }
23
+
24
+ &:disabled {
25
+ opacity: var(--text-area-disabled-opacity, 0.7);
26
+ cursor: not-allowed;
27
+ }
28
+
29
+ &--full-width {
30
+ width: 100% !important;
31
+ }
32
+
33
+ // Variants
34
+ &--regular {
35
+ color: var(--text-area-regular-color, var(--text-area-color, var(--text-primary-color)));
36
+ background: var(--text-area-regular-bg-color, var(--text-area-bg-color, var(--bg-secondary-color)));
37
+ border-style: solid;
38
+ border-width: var(--text-area-regular-border-width, var(--text-area-border-width, 1px));
39
+ border-color: var(--text-area-regular-border-color, var(--border-color));
40
+ }
41
+
42
+ &--outlined {
43
+ color: var(--text-area-outlined-color, var(--text-area-color, var(--text-primary-color)));
44
+ background: transparent;
45
+ border-style: solid;
46
+ border-width: var(--text-area-outlined-border-width, var(--text-area-border-width, 1px));
47
+ border-color: var(--text-area-outlined-border-color, var(--border-color));
48
+ }
49
+
50
+ &--filled {
51
+ color: var(--text-area-filled-color, var(--text-area-color, var(--text-primary-color)));
52
+ background: var(--text-area-filled-bg-color, var(--text-area-bg-color, var(--bg-secondary-color)));
53
+ border: none;
54
+ }
55
+
56
+ // Radius
57
+ &--none-radius {
58
+ border-radius: 0;
59
+ }
60
+
61
+ &--small-radius {
62
+ border-radius: var(--text-area-border-radius-sm, 5px);
63
+ }
64
+
65
+ &--medium-radius {
66
+ border-radius: var(--text-area-border-radius-md, 10px);
67
+ }
68
+
69
+ &--large-radius {
70
+ border-radius: var(--text-area-border-radius-lg, 15px);
71
+ }
72
+
73
+ // Sizes
74
+ &--small-size {
75
+ padding: var(--text-area-padding-sm, 6px 10px);
76
+ font-size: var(--text-area-font-size-sm, 12px);
77
+ }
78
+
79
+ &--medium-size {
80
+ padding: var(--text-area-padding-md, 10px 14px);
81
+ font-size: var(--text-area-font-size-sm, 16px);
82
+ }
83
+
84
+ &--large-size {
85
+ padding: var(--text-area-padding-lg, 12px 16px);
86
+ font-size: var(--text-area-font-size-sm, 18px);
87
+ }
88
+ }
@@ -0,0 +1,177 @@
1
+ import {Fragment} from "react";
2
+ import {Meta, StoryObj} from "@storybook/react";
3
+
4
+ import {capitalizeFirstLetter, hideInTable} from "../../utils";
5
+
6
+ import TextFieldComponent, {TextFieldAccent, TextFieldRadius, TextFieldSize, TextFieldVariant} from "./TextField";
7
+
8
+ const variants: TextFieldVariant[] = [TextFieldVariant.Regular, TextFieldVariant.Outlined, TextFieldVariant.Filled];
9
+ const sizes: (TextFieldSize | "default")[] = [
10
+ TextFieldSize.Small,
11
+ "default",
12
+ TextFieldSize.Medium,
13
+ TextFieldSize.Large,
14
+ ];
15
+ const radius: (TextFieldRadius | "default")[] = [
16
+ TextFieldRadius.None,
17
+ TextFieldRadius.Small,
18
+ "default",
19
+ TextFieldRadius.Medium,
20
+ TextFieldRadius.Large,
21
+ TextFieldRadius.Full,
22
+ ];
23
+ const accents: (TextFieldAccent | "default")[] = ["default", TextFieldAccent.Success, TextFieldAccent.Error];
24
+
25
+ const meta: Meta<typeof TextFieldComponent> = {
26
+ title: "Components/TextField",
27
+ component: TextFieldComponent,
28
+ tags: ["autodocs"],
29
+ argTypes: {
30
+ variant: {
31
+ options: variants,
32
+ control: {type: "select"},
33
+ },
34
+ customSize: {
35
+ options: sizes,
36
+ control: {type: "select"},
37
+ },
38
+ radius: {
39
+ options: radius,
40
+ control: {type: "select"},
41
+ },
42
+ accent: {
43
+ options: accents,
44
+ control: {type: "select"},
45
+ },
46
+
47
+ label: hideInTable,
48
+ value: hideInTable,
49
+ defaultValue: hideInTable,
50
+ inputClassName: hideInTable,
51
+ afterClassName: hideInTable,
52
+ beforeClassName: hideInTable,
53
+ },
54
+ };
55
+
56
+ export default meta;
57
+
58
+ export const TextField: StoryObj<typeof TextFieldComponent> = {
59
+ args: {
60
+ placeholder: "Enter text",
61
+ disabled: false,
62
+ fullWidth: false,
63
+ before: "🔍",
64
+ after: "🔑",
65
+ },
66
+ };
67
+
68
+ export const Variant = () => {
69
+ return (
70
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(3, auto)"}}>
71
+ {variants.map(variant => (
72
+ <div key={variant}>
73
+ <TextFieldComponent variant={variant} placeholder={capitalizeFirstLetter(variant)} />
74
+ </div>
75
+ ))}
76
+ </div>
77
+ );
78
+ };
79
+
80
+ export const Size = () => {
81
+ return (
82
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(4, auto)"}}>
83
+ {sizes.map(size => (
84
+ <div key={size}>
85
+ <TextFieldComponent
86
+ customSize={size !== "default" ? size : undefined}
87
+ placeholder={capitalizeFirstLetter(size)}
88
+ />
89
+ </div>
90
+ ))}
91
+ </div>
92
+ );
93
+ };
94
+
95
+ export const Accent = () => {
96
+ return (
97
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(3, auto)"}}>
98
+ {accents.map(accent => (
99
+ <div key={accent}>
100
+ <TextFieldComponent
101
+ accent={accent !== "default" ? accent : undefined}
102
+ placeholder={capitalizeFirstLetter(accent)}
103
+ />
104
+ </div>
105
+ ))}
106
+ </div>
107
+ );
108
+ };
109
+
110
+ export const Radius = () => {
111
+ return (
112
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(6, auto)"}}>
113
+ {radius.map(radius => (
114
+ <div key={radius}>
115
+ <TextFieldComponent
116
+ radius={radius !== "default" ? radius : undefined}
117
+ placeholder={capitalizeFirstLetter(radius)}
118
+ />
119
+ </div>
120
+ ))}
121
+ </div>
122
+ );
123
+ };
124
+
125
+ export const VariantRadius = () => {
126
+ return (
127
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(7, auto)"}}>
128
+ <span className="item-card__title"> Variant \ Radius</span>
129
+ {radius.map(radius => (
130
+ <span key={radius} className="item-card__title">
131
+ {capitalizeFirstLetter(radius)} radius
132
+ </span>
133
+ ))}
134
+ {variants.map(variant => (
135
+ <Fragment key={variant}>
136
+ <span className="item-card__title">{capitalizeFirstLetter(variant)}</span>
137
+ {radius.map(radius => (
138
+ <div key={`${radius}-${variant}`} className="item-card">
139
+ <TextFieldComponent
140
+ variant={variant}
141
+ radius={radius !== "default" ? radius : undefined}
142
+ placeholder="Enter value"
143
+ />
144
+ </div>
145
+ ))}
146
+ </Fragment>
147
+ ))}
148
+ </div>
149
+ );
150
+ };
151
+
152
+ export const VariantSize = () => {
153
+ return (
154
+ <div className="grid-wrapper" style={{gridTemplateColumns: "repeat(5, auto)"}}>
155
+ <span className="item-card__title"> Variant \ Size</span>
156
+ {sizes.map(size => (
157
+ <span key={size} className="item-card__title">
158
+ {capitalizeFirstLetter(size)} size
159
+ </span>
160
+ ))}
161
+ {variants.map(variant => (
162
+ <Fragment key={variant}>
163
+ <span className="item-card__title">{capitalizeFirstLetter(variant)}</span>
164
+ {sizes.map(size => (
165
+ <div key={`${size}-${variant}`} className="item-card">
166
+ <TextFieldComponent
167
+ variant={variant}
168
+ customSize={size !== "default" ? size : undefined}
169
+ placeholder="Enter value"
170
+ />
171
+ </div>
172
+ ))}
173
+ </Fragment>
174
+ ))}
175
+ </div>
176
+ );
177
+ };