@rovula/ui 0.0.66 → 0.0.67

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 (127) hide show
  1. package/dist/cjs/bundle.css +993 -979
  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 +6 -6
  5. package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +97 -96
  6. package/dist/cjs/types/components/AlertDialog/AlertDialog.stories.d.ts +1 -1
  7. package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +7 -7
  8. package/dist/cjs/types/components/Avatar/AvatarGroup.stories.d.ts +1 -1
  9. package/dist/cjs/types/components/Button/Button.d.ts +9 -9
  10. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +139 -138
  11. package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +213 -388
  12. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +92 -91
  13. package/dist/cjs/types/components/Collapsible/Collapsible.d.ts +3 -3
  14. package/dist/cjs/types/components/DataTable/DataTable.stories.d.ts +1 -1
  15. package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +224 -399
  16. package/dist/cjs/types/components/Dialog/Dialog.d.ts +2 -2
  17. package/dist/cjs/types/components/Dialog/Dialog.stories.d.ts +1 -1
  18. package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +21 -21
  19. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +134 -134
  20. package/dist/cjs/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
  21. package/dist/cjs/types/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
  22. package/dist/cjs/types/components/Icon/Icon.stories.d.ts +294 -294
  23. package/dist/cjs/types/components/Input/Input.d.ts +8 -8
  24. package/dist/cjs/types/components/Input/Input.stories.d.ts +225 -225
  25. package/dist/cjs/types/components/InputFilter/InputFilter.d.ts +18 -18
  26. package/dist/cjs/types/components/InputFilter/InputFilter.stories.d.ts +127 -127
  27. package/dist/cjs/types/components/Label/Label.stories.d.ts +87 -86
  28. package/dist/cjs/types/components/Loading/Loading.stories.d.ts +10 -10
  29. package/dist/cjs/types/components/Navbar/Navbar.stories.d.ts +1 -1
  30. package/dist/cjs/types/components/Popover/Popover.stories.d.ts +1 -1
  31. package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +9 -9
  32. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +85 -84
  33. package/dist/cjs/types/components/Search/Search.stories.d.ts +114 -114
  34. package/dist/cjs/types/components/Slider/Slider.stories.d.ts +85 -83
  35. package/dist/cjs/types/components/Switch/Switch.stories.d.ts +92 -91
  36. package/dist/cjs/types/components/Table/Table.d.ts +2 -2
  37. package/dist/cjs/types/components/Table/Table.stories.d.ts +87 -86
  38. package/dist/cjs/types/components/Tabs/Tabs.d.ts +6 -0
  39. package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +57 -31
  40. package/dist/cjs/types/components/Text/Text.stories.d.ts +3 -3
  41. package/dist/cjs/types/components/TextInput/TextInput.d.ts +21 -21
  42. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +128 -128
  43. package/dist/cjs/types/components/Toast/Toast.stories.d.ts +91 -90
  44. package/dist/cjs/types/components/Tooltip/Tooltip.stories.d.ts +1 -1
  45. package/dist/cjs/types/icons/type.d.ts +0 -1
  46. package/dist/components/Tabs/Tabs.js +24 -15
  47. package/dist/components/Tabs/Tabs.stories.js +12 -0
  48. package/dist/esm/bundle.css +993 -979
  49. package/dist/esm/bundle.js +3 -3
  50. package/dist/esm/bundle.js.map +1 -1
  51. package/dist/esm/types/components/ActionButton/ActionButton.d.ts +6 -6
  52. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +97 -96
  53. package/dist/esm/types/components/AlertDialog/AlertDialog.stories.d.ts +1 -1
  54. package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +7 -7
  55. package/dist/esm/types/components/Avatar/AvatarGroup.stories.d.ts +1 -1
  56. package/dist/esm/types/components/Button/Button.d.ts +9 -9
  57. package/dist/esm/types/components/Button/Buttons.stories.d.ts +139 -138
  58. package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +213 -388
  59. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +92 -91
  60. package/dist/esm/types/components/Collapsible/Collapsible.d.ts +3 -3
  61. package/dist/esm/types/components/DataTable/DataTable.stories.d.ts +1 -1
  62. package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +224 -399
  63. package/dist/esm/types/components/Dialog/Dialog.d.ts +2 -2
  64. package/dist/esm/types/components/Dialog/Dialog.stories.d.ts +1 -1
  65. package/dist/esm/types/components/Dropdown/Dropdown.d.ts +21 -21
  66. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +134 -134
  67. package/dist/esm/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
  68. package/dist/esm/types/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
  69. package/dist/esm/types/components/Icon/Icon.stories.d.ts +294 -294
  70. package/dist/esm/types/components/Input/Input.d.ts +8 -8
  71. package/dist/esm/types/components/Input/Input.stories.d.ts +225 -225
  72. package/dist/esm/types/components/InputFilter/InputFilter.d.ts +18 -18
  73. package/dist/esm/types/components/InputFilter/InputFilter.stories.d.ts +127 -127
  74. package/dist/esm/types/components/Label/Label.stories.d.ts +87 -86
  75. package/dist/esm/types/components/Loading/Loading.stories.d.ts +10 -10
  76. package/dist/esm/types/components/Navbar/Navbar.stories.d.ts +1 -1
  77. package/dist/esm/types/components/Popover/Popover.stories.d.ts +1 -1
  78. package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +9 -9
  79. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +85 -84
  80. package/dist/esm/types/components/Search/Search.stories.d.ts +114 -114
  81. package/dist/esm/types/components/Slider/Slider.stories.d.ts +85 -83
  82. package/dist/esm/types/components/Switch/Switch.stories.d.ts +92 -91
  83. package/dist/esm/types/components/Table/Table.d.ts +2 -2
  84. package/dist/esm/types/components/Table/Table.stories.d.ts +87 -86
  85. package/dist/esm/types/components/Tabs/Tabs.d.ts +6 -0
  86. package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +57 -31
  87. package/dist/esm/types/components/Text/Text.stories.d.ts +3 -3
  88. package/dist/esm/types/components/TextInput/TextInput.d.ts +21 -21
  89. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +128 -128
  90. package/dist/esm/types/components/Toast/Toast.stories.d.ts +91 -90
  91. package/dist/esm/types/components/Tooltip/Tooltip.stories.d.ts +1 -1
  92. package/dist/esm/types/icons/type.d.ts +0 -1
  93. package/dist/index.d.ts +99 -93
  94. package/dist/src/theme/global.css +998 -981
  95. package/package.json +2 -1
  96. package/src/components/Tabs/Tabs.stories.tsx +38 -0
  97. package/src/components/Tabs/Tabs.tsx +31 -9
  98. package/dist/theme/global.css +0 -30
  99. package/dist/theme/main-preset.js +0 -283
  100. package/dist/theme/plugins/utilities/typography.js +0 -93
  101. package/dist/theme/presets/colors.js +0 -136
  102. package/dist/theme/theme.d.ts +0 -69
  103. package/dist/theme/themes/xspector/baseline.css +0 -9
  104. package/dist/theme/themes/xspector/color.css +0 -81
  105. package/dist/theme/themes/xspector/components/action-button.css +0 -100
  106. package/dist/theme/themes/xspector/components/dropdown-menu.css +0 -28
  107. package/dist/theme/themes/xspector/components/loading.css +0 -11
  108. package/dist/theme/themes/xspector/components/switch.css +0 -30
  109. package/dist/theme/themes/xspector/palette.css +0 -122
  110. package/dist/theme/themes/xspector/state.css +0 -89
  111. package/dist/theme/themes/xspector/transparent.css +0 -68
  112. package/dist/theme/themes/xspector/typography.css +0 -27
  113. package/dist/theme/tokens/baseline.css +0 -12
  114. package/dist/theme/tokens/color.css +0 -78
  115. package/dist/theme/tokens/components/action-button.css +0 -127
  116. package/dist/theme/tokens/components/button.css +0 -512
  117. package/dist/theme/tokens/components/dropdown-menu.css +0 -27
  118. package/dist/theme/tokens/components/loading.css +0 -11
  119. package/dist/theme/tokens/components/navbar.css +0 -8
  120. package/dist/theme/tokens/components/progress-bar.css +0 -8
  121. package/dist/theme/tokens/components/switch.css +0 -30
  122. package/dist/theme/tokens/palette.css +0 -122
  123. package/dist/theme/tokens/state.css +0 -82
  124. package/dist/theme/tokens/transparent.css +0 -68
  125. package/dist/theme/tokens/typography.css +0 -199
  126. package/dist/theme/tokens/variables.css +0 -28
  127. package/dist/theme/utils.js +0 -109
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -82,6 +82,7 @@
82
82
  "@radix-ui/react-dropdown-menu": "^2.1.1",
83
83
  "@radix-ui/react-label": "^2.0.2",
84
84
  "@radix-ui/react-popover": "^1.1.1",
85
+ "@radix-ui/react-portal": "^1.1.3",
85
86
  "@radix-ui/react-radio-group": "^1.1.3",
86
87
  "@radix-ui/react-slider": "^1.2.0",
87
88
  "@radix-ui/react-slot": "^1.1.0",
@@ -314,3 +314,41 @@ export const Controller = {
314
314
  );
315
315
  },
316
316
  } satisfies StoryObj;
317
+
318
+ export const CustomClassname = {
319
+ args: {
320
+ initialTab: 0,
321
+ tabs: tabs.map((tab, i) => ({
322
+ ...tab,
323
+ disabled: i !== 0,
324
+ activeClassName: "text-green-500",
325
+ // className: "text-red-500",
326
+ disableClassName: i === 1 && "text-pink-200",
327
+ activeDisableClassName: "text-red-500",
328
+ })),
329
+ },
330
+ render: (args) => {
331
+ const props: any = {
332
+ ...args,
333
+ };
334
+ return (
335
+ <div className="flex flex-row gap-4">
336
+ <Tabs
337
+ tabs={tabs}
338
+ {...props}
339
+ tabButtonDisableClassName="text-red-500"
340
+ tabButtonActiveDisableClassName="text-blue-500"
341
+ tabBarContainerClassName="border-red-500"
342
+ />
343
+ <Tabs
344
+ tabs={tabs}
345
+ {...props}
346
+ disabled
347
+ tabButtonDisableClassName="text-red-500"
348
+ tabButtonActiveDisableClassName="text-blue-500"
349
+ tabBarContainerClassName="border-blue-500"
350
+ />
351
+ </div>
352
+ );
353
+ },
354
+ } satisfies StoryObj;
@@ -13,6 +13,10 @@ type Tab = {
13
13
  content: React.ReactNode;
14
14
  disabled?: boolean;
15
15
  isLoading?: boolean;
16
+ activeClassName?: string;
17
+ disableClassName?: string;
18
+ activeDisableClassName?: string;
19
+ className?: string;
16
20
  };
17
21
 
18
22
  type TabsProps = {
@@ -30,6 +34,8 @@ type TabsProps = {
30
34
  tabBarWrapperClassName?: string;
31
35
  tabButtonClassName?: string;
32
36
  tabButtonActiveClassName?: string;
37
+ tabButtonActiveDisableClassName?: string;
38
+ tabButtonDisableClassName?: string;
33
39
  tabContentClassName?: string;
34
40
  addTabButtonWrapperClassName?: string;
35
41
  borderSliderClassName?: string;
@@ -58,6 +64,8 @@ const Tabs: React.FC<TabsProps> = ({
58
64
  tabBarWrapperClassName,
59
65
  tabButtonClassName,
60
66
  tabButtonActiveClassName,
67
+ tabButtonActiveDisableClassName,
68
+ tabButtonDisableClassName,
61
69
  tabContentClassName,
62
70
  addTabButtonWrapperClassName,
63
71
  borderSliderClassName,
@@ -132,12 +140,15 @@ const Tabs: React.FC<TabsProps> = ({
132
140
  return (
133
141
  <div className={cn("w-full", className)}>
134
142
  <div
135
- className={cn(" relative flex flex-row w-full", {
136
- [`border-b-[1px] border-base-stroke`]: enableBorderLine,
137
- "border-state-disable-outline": disabled,
138
- "flex-1": tabMode === "justify",
139
- tabBarContainerClassName,
140
- })}
143
+ className={cn(
144
+ " relative flex flex-row w-full",
145
+ {
146
+ [`border-b-[1px] border-base-stroke`]: enableBorderLine,
147
+ "border-state-disable-outline": disabled,
148
+ "flex-1": tabMode === "justify",
149
+ },
150
+ tabBarContainerClassName
151
+ )}
141
152
  >
142
153
  {leftAction}
143
154
  <div
@@ -178,12 +189,23 @@ const Tabs: React.FC<TabsProps> = ({
178
189
  "text-foreground": index === activeTab,
179
190
  "text-text-grey-medium hover:text-text-grey-dark active:text-text-dark":
180
191
  index !== activeTab,
192
+ // -- disabled
181
193
  "text-state-disable-solid pointer-events-none":
182
194
  disabled || tab.disabled,
195
+ [tab.disableClassName ?? tabButtonDisableClassName ?? ""]:
196
+ disabled || tab.disabled,
197
+ // --
183
198
  "text-state-disable-outline":
184
- (index === activeTab && disabled) || tab.disabled,
185
- [tabButtonClassName ?? ""]: true,
186
- [tabButtonActiveClassName ?? ""]: index === activeTab,
199
+ index === activeTab && (disabled || tab.disabled),
200
+ // -- active disabled --
201
+ [tab.activeDisableClassName ??
202
+ tabButtonActiveDisableClassName ??
203
+ ""]: index === activeTab && (disabled || tab.disabled),
204
+ // -- class name
205
+ [tab.className ?? tabButtonClassName ?? ""]: true,
206
+ // -- active --
207
+ [tab.activeClassName ?? tabButtonActiveClassName ?? ""]:
208
+ index === activeTab,
187
209
  "flex-1": tabMode === "justify",
188
210
  }
189
211
  )}
@@ -1,30 +0,0 @@
1
-
2
- @import "./tokens/baseline.css";
3
- @import "./themes/xspector/baseline.css";
4
-
5
- @tailwind base;
6
- @tailwind components;
7
- @tailwind utilities;
8
-
9
- @layer base {
10
- * {
11
- /* @apply border-border; */
12
- }
13
- body {
14
- /* @apply bg-background text-foreground; */
15
- /* @apply bg-[var(--backgroud)] text-[var(--foreground)]; */
16
- }
17
-
18
- /* hide input number arrow */
19
- /* Chrome, Safari, Edge, Opera */
20
- input::-webkit-outer-spin-button,
21
- input::-webkit-inner-spin-button {
22
- -webkit-appearance: none;
23
- margin: 0;
24
- }
25
-
26
- /* Firefox */
27
- input[type=number] {
28
- -moz-appearance: textfield;
29
- }
30
- }
@@ -1,283 +0,0 @@
1
- const { fontFamily } = require("tailwindcss/defaultTheme");
2
-
3
- module.exports = {
4
- darkMode: "class",
5
- theme: {
6
- container: {
7
- center: true,
8
- padding: "2rem",
9
- screens: {
10
- "2xl": "1400px",
11
- },
12
- },
13
- extend: {
14
- fontSize: {
15
- h1: [
16
- "var(--h1-size, 64px)",
17
- {
18
- lineHeight: "var(--h1-line-height, 80px)",
19
- fontWeight: "var(--h1-weight, 700)",
20
- fontFamily: "var(--h1-family, 'Poppins')",
21
- },
22
- ],
23
- h2: [
24
- "var(--h2-size, 48px)",
25
- {
26
- lineHeight: "var(--h2-line-height, 60px)",
27
- fontWeight: "var(--h2-weight, 700)",
28
- fontFamily: "var(--h2-family, 'Poppins')",
29
- },
30
- ],
31
- h3: [
32
- "var(--h3-size, 32px)",
33
- {
34
- lineHeight: "var(--h3-line-height, 48px)",
35
- fontWeight: "var(--h3-weight, 700)",
36
- fontFamily: "var(--h3-family, 'Poppins')",
37
- },
38
- ],
39
- h4: [
40
- "var(--h4-size, 24px)",
41
- {
42
- lineHeight: "var(--h4-line-height, 32px)",
43
- fontWeight: "var(--h4-weight, 700)",
44
- fontFamily: "var(--h4-family, 'Poppins')",
45
- },
46
- ],
47
- h5: [
48
- "var(--h5-size, 20px)",
49
- {
50
- lineHeight: "var(--h5-line-height, 28px)",
51
- fontWeight: "var(--h5-weight, 700)",
52
- fontFamily: "var(--h5-family, 'Poppins')",
53
- },
54
- ],
55
- h6: [
56
- "var(--h6-size, 18px)",
57
- {
58
- lineHeight: "var(--h6-line-height, 24px)",
59
- fontWeight: "var(--h6-weight, 700)",
60
- fontFamily: "var(--h6-family, 'Poppins')",
61
- },
62
- ],
63
- subtitile1: [
64
- "var(--subtitle1-size, 16px)",
65
- {
66
- lineHeight: "var(--subtitle1-line-height, 24px)",
67
- fontWeight: "var(--subtitle1-weight, 400)",
68
- fontFamily: "var(--subtitle1-family, 'Poppins')",
69
- },
70
- ],
71
- subtitile2: [
72
- "var(--subtitle2-size, 16px)",
73
- {
74
- lineHeight: "var(--subtitle2-line-height, 24px)",
75
- fontWeight: "var(--subtitle2-weight, 500)",
76
- fontFamily: "var(--subtitle2-family, 'Poppins')",
77
- },
78
- ],
79
- subtitile3: [
80
- "var(--subtitle3-size, 16px)",
81
- {
82
- lineHeight: "var(--subtitle3-line-height, 24px)",
83
- fontWeight: "var(--subtitle3-weight, 600)",
84
- fontFamily: "var(--subtitle3-family, 'Poppins')",
85
- },
86
- ],
87
- subtitile4: [
88
- "var(--subtitle4-size, 14px)",
89
- {
90
- lineHeight: "var(--subtitle4-line-height, 22px)",
91
- fontWeight: "var(--subtitle4-weight, 400)",
92
- fontFamily: "var(--subtitle4-family, 'Poppins')",
93
- },
94
- ],
95
- subtitile5: [
96
- "var(--subtitle5-size, 14px)",
97
- {
98
- lineHeight: "var(--subtitle5-line-height, 22px)",
99
- fontWeight: "var(--subtitle5-weight, 500)",
100
- fontFamily: "var(--subtitle5-family, 'Poppins')",
101
- },
102
- ],
103
- subtitile6: [
104
- "var(--subtitle6-size, 14px)",
105
- {
106
- lineHeight: "var(--subtitle6-line-height, 22px)",
107
- fontWeight: "var(--subtitle6-weight, 600)",
108
- fontFamily: "var(--subtitle6-family, 'Poppins')",
109
- },
110
- ],
111
- body1: [
112
- "var(--body1-size, 16px)",
113
- {
114
- lineHeight: "var(--body1-line-height, 20px)",
115
- fontWeight: "var(--body1-weight, 400)",
116
- fontFamily: "var(--body1-family, 'Poppins')",
117
- },
118
- ],
119
- body2: [
120
- "var(--body2-size, 16px)",
121
- {
122
- lineHeight: "var(--body2-line-height, 20px)",
123
- fontWeight: "var(--body2-weight, 500)",
124
- fontFamily: "var(--body2-family, 'Poppins')",
125
- },
126
- ],
127
- body3: [
128
- "var(--body3-size, 14px)",
129
- {
130
- lineHeight: "var(--body3-line-height, 18px)",
131
- fontWeight: "var(--body3-weight, 400)",
132
- fontFamily: "var(--body3-family, 'Poppins')",
133
- },
134
- ],
135
- body4: [
136
- "var(--body4-size, 14px)",
137
- {
138
- lineHeight: "var(--body4-line-height, 18px)",
139
- fontWeight: "var(--body4-weight, 500)",
140
- fontFamily: "var(--body4-family, 'Poppins')",
141
- },
142
- ],
143
- small1: [
144
- "var(--small1-size, 12px)",
145
- {
146
- lineHeight: "var(--small1-line-height, 14px)",
147
- fontWeight: "var(--small1-weight, 400)",
148
- fontFamily: "var(--small1-family, 'Poppins')",
149
- },
150
- ],
151
- small2: [
152
- "var(--small2-size, 12px)",
153
- {
154
- lineHeight: "var(--small2-line-height, 14px)",
155
- fontWeight: "var(--small2-weight, 500)",
156
- fontFamily: "var(--small2-family, 'Poppins')",
157
- },
158
- ],
159
- small3: [
160
- "var(--small3-size, 12px)",
161
- {
162
- lineHeight: "var(--small3-line-height, 14px)",
163
- fontWeight: "var(--small3-weight, 600)",
164
- fontFamily: "var(--small3-family, 'Poppins')",
165
- },
166
- ],
167
- small4: [
168
- "var(--small4-size, 10px)",
169
- {
170
- lineHeight: "var(--small4-line-height, 12px)",
171
- fontWeight: "var(--small4-weight, 400)",
172
- fontFamily: "var(--small4-family, 'Poppins')",
173
- },
174
- ],
175
- small5: [
176
- "var(--small5-size, 10px)",
177
- {
178
- lineHeight: "var(--small5-line-height, 12px)",
179
- fontWeight: "var(--small5-weight, 500)",
180
- fontFamily: "var(--small5-family, 'Poppins')",
181
- },
182
- ],
183
- small6: [
184
- "var(--small5-size, 10px)",
185
- {
186
- lineHeight: "var(--small6-line-height, 12px)",
187
- fontWeight: "var(--small6-weight, 600)",
188
- fontFamily: "var(--small6-family, 'Poppins')",
189
- },
190
- ],
191
- small7: [
192
- "var(--small7-size, 8px)",
193
- {
194
- lineHeight: "var(--small7-line-height, 10px)",
195
- fontWeight: "var(--small7-weight, 600)",
196
- fontFamily: "var(--small7-family, 'Poppins')",
197
- },
198
- ],
199
- small8: [
200
- "var(--small8-size, 8px)",
201
- {
202
- lineHeight: "var(--small8-line-height, 10px)",
203
- fontWeight: "var(--small8-weight, 700)",
204
- fontFamily: "var(--small8-family, 'Poppins')",
205
- },
206
- ],
207
- small9: [
208
- "var(--small9-size, 8px)",
209
- {
210
- lineHeight: "var(--small9-line-height, 10px)",
211
- fontWeight: "var(--small9-weight, 400)",
212
- fontFamily: "var(--small9-family, 'Poppins')",
213
- },
214
- ],
215
- label1: [
216
- "var(--label-label1-size, 12px)",
217
- {
218
- lineHeight: "var(--label-label1-line-height, 12px)",
219
- fontWeight: "var(--label-label1-weight, 400)",
220
- fontFamily: "var(--label-label1-family, 'Poppins')",
221
- },
222
- ],
223
- label2: [
224
- "var(--label-label2-size, 10px)",
225
- {
226
- lineHeight: "var(--label-label2-line-height, 10px)",
227
- fontWeight: "var(--label-label2-weight, 400)",
228
- fontFamily: "var(--label-label2-family, 'Poppins')",
229
- },
230
- ],
231
- buttonL: [
232
- "var(--button-button-l-size, 16px)",
233
- {
234
- lineHeight: "var(--button-button-l-line-height, 24px)",
235
- fontWeight: "var(--button-button-l-weight, 700)",
236
- fontFamily: "var(--button-button-l-family, 'Poppins')",
237
- },
238
- ],
239
- buttonMS: [
240
- "var(--button-button-ms-size, 14px)",
241
- {
242
- lineHeight: "var(--button-button-ms-line-height, 22px)",
243
- fontWeight: "var(--button-button-ms-weight, 700)",
244
- fontFamily: "var(--button-button-ms-family, 'Poppins')",
245
- },
246
- ],
247
- },
248
- borderRadius: {
249
- xl: "var(--radius-radius-xl)",
250
- lg: "var(--radius-radius-l)",
251
- md: "var(--radius-radius-m)",
252
- sm: "var(--radius-radius-s)",
253
- xs: "var(--radius-radius-xs)",
254
- },
255
- spacing: {
256
- xxs: "var(--spacing-spacing-xxs)",
257
- xs: "var(--spacing-spacing-xs)",
258
- sm: "var(--spacing-spacing-s)",
259
- md: "var(--spacing-spacing-m)",
260
- lg: "var(--spacing-spacing-l)",
261
- xl: "var(--spacing-spacing-xl)",
262
- xxl: "var(--spacing-spacing-xxl)",
263
- xxxl: "var(--spacing-spacing-xxxl)",
264
- },
265
- keyframes: {
266
- "accordion-down": {
267
- from: { height: "0" },
268
- to: { height: "var(--radix-accordion-content-height)" },
269
- },
270
- "accordion-up": {
271
- from: { height: "var(--radix-accordion-content-height)" },
272
- to: { height: "0" },
273
- },
274
- },
275
- animation: {
276
- "accordion-down": "accordion-down 0.2s ease-out",
277
- "accordion-up": "accordion-up 0.2s ease-out",
278
- },
279
- },
280
- },
281
- presets: [require("./presets/colors"), require("tailwindcss-animate")],
282
- plugins: [require("./plugins/utilities/typography")],
283
- };
@@ -1,93 +0,0 @@
1
- const plugin = require("tailwindcss/plugin");
2
-
3
- module.exports = plugin(function ({ addUtilities }) {
4
- addUtilities({
5
- ".typography-h1": {
6
- "@apply text-h1": {},
7
- },
8
- ".typography-h2": {
9
- "@apply text-h2": {},
10
- },
11
- ".typography-h3": {
12
- "@apply text-h3": {},
13
- },
14
- ".typography-h4": {
15
- "@apply text-h4": {},
16
- },
17
- ".typography-h5": {
18
- "@apply text-h5": {},
19
- },
20
- ".typography-h6": {
21
- "@apply text-h6": {},
22
- },
23
- ".typography-subtitile1": {
24
- "@apply text-subtitile1": {},
25
- },
26
- ".typography-subtitile2": {
27
- "@apply text-subtitile2": {},
28
- },
29
- ".typography-subtitile3": {
30
- "@apply text-subtitile3": {},
31
- },
32
- ".typography-subtitile4": {
33
- "@apply text-subtitile4": {},
34
- },
35
- ".typography-subtitile5": {
36
- "@apply text-subtitile5": {},
37
- },
38
- ".typography-subtitile6": {
39
- "@apply text-subtitile6": {},
40
- },
41
- ".typography-body1": {
42
- "@apply text-body1": {},
43
- },
44
- ".typography-body2": {
45
- "@apply text-body2": {},
46
- },
47
- ".typography-body3": {
48
- "@apply text-body3": {},
49
- },
50
- ".typography-body4": {
51
- "@apply text-body4": {},
52
- },
53
- ".typography-small1": {
54
- "@apply text-small1": {},
55
- },
56
- ".typography-small2": {
57
- "@apply text-small2": {},
58
- },
59
- ".typography-small3": {
60
- "@apply text-small3": {},
61
- },
62
- ".typography-small4": {
63
- "@apply text-small4": {},
64
- },
65
- ".typography-small5": {
66
- "@apply text-small5": {},
67
- },
68
- ".typography-small6": {
69
- "@apply text-small6": {},
70
- },
71
- ".typography-small7": {
72
- "@apply text-small7": {},
73
- },
74
- ".typography-small8": {
75
- "@apply text-small8": {},
76
- },
77
- ".typography-small9": {
78
- "@apply text-small9": {},
79
- },
80
- ".typography-label1": {
81
- "@apply text-label1": {},
82
- },
83
- ".typography-label2": {
84
- "@apply text-label2": {},
85
- },
86
- ".typography-buttonL": {
87
- "@apply text-buttonL": {},
88
- },
89
- ".typography-buttonMS": {
90
- "@apply text-buttonMS": {},
91
- },
92
- });
93
- });
@@ -1,136 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- import {
3
- generateColorConfig,
4
- generateTransparentColorConfig,
5
- withColorMixin,
6
- generateButtonStyles,
7
- generateActionButtonStyles,
8
- } from "../utils";
9
-
10
- const secondaryRange = [
11
- "50",
12
- "100",
13
- "200",
14
- "300",
15
- "400",
16
- "500",
17
- "600",
18
- "700",
19
- "800",
20
- "900",
21
- "950",
22
- ];
23
-
24
- module.exports = {
25
- theme: {
26
- extend: {
27
- colors: {
28
- "text-black": withColorMixin("--text-black"),
29
- "text-dark": withColorMixin("--text-dark"),
30
- "text-medium": withColorMixin("--text-medium"),
31
- "text-light": withColorMixin("--text-light"),
32
- "text-grey-dark": withColorMixin("--text-grey-dark"),
33
- "text-grey-medium": withColorMixin("--text-grey-medium"),
34
- "text-grey-light": withColorMixin("--text-grey-light"),
35
- "text-white": withColorMixin("--text-white"),
36
-
37
- ...generateColorConfig("primary", "primary-ramps-primary"),
38
- ...generateColorConfig("secondary", "secondary-ramps-secondary"),
39
- ...generateColorConfig("tertiary", "tertiary-ramps-tertiary"),
40
- ...generateColorConfig("grey", "grey-grey"),
41
-
42
- ...generateColorConfig("grey2", "grey2-grey2", secondaryRange),
43
- ...generateColorConfig("info", "info-info", secondaryRange),
44
- ...generateColorConfig("success", "success-success", secondaryRange),
45
- ...generateColorConfig("warning", "warning-warning", secondaryRange),
46
- ...generateColorConfig("error", "error-error", secondaryRange),
47
-
48
- ...generateTransparentColorConfig("primary", "main"),
49
- ...generateTransparentColorConfig("secondary", "main"),
50
- ...generateTransparentColorConfig("tertiary", "main"),
51
- ...generateTransparentColorConfig("grey", "other"),
52
- ...generateTransparentColorConfig("grey2", "other"),
53
- ...generateTransparentColorConfig("info", "other"),
54
- ...generateTransparentColorConfig("success", "other"),
55
- ...generateTransparentColorConfig("warning", "other"),
56
- ...generateTransparentColorConfig("error", "other"),
57
- ...generateTransparentColorConfig("black", "other"),
58
- ...generateTransparentColorConfig("white", "other"),
59
-
60
- "state-disable-solid": withColorMixin("--state-color-disable-solid"),
61
- "state-disable-outline": withColorMixin(
62
- "--state-color-disable-outline"
63
- ),
64
-
65
- "input-default-text": withColorMixin("--input-color-default-text"),
66
- "input-default-stroke": withColorMixin("--input-color-default-stroke"),
67
- "input-filled-text": withColorMixin("--input-color-filled-text"),
68
- "input-active-stroke": withColorMixin("--input-color-active-stroke"),
69
- "input-disable-text": withColorMixin("--input-color-disable-text"),
70
- "input-disable-stroke": withColorMixin("--input-color-disable-stroke"),
71
- "input-disable-bg": withColorMixin("--input-color-disable-bg"),
72
- "input-label-bg": withColorMixin("--input-color-label-bg"),
73
- "input-error": withColorMixin("--input-color-error"),
74
-
75
- "function-default-solid": withColorMixin("--function-default-solid"),
76
- "function-default-hover": withColorMixin("--function-default-hover"),
77
- "function-default-hover-bg": withColorMixin(
78
- "--function-default-hover-bg"
79
- ),
80
- "function-default-stroke": withColorMixin("--function-default-stroke"),
81
- "function-default-icon": withColorMixin("--function-default-icon"),
82
- "function-default-outline": withColorMixin(
83
- "--function-default-outline-icon"
84
- ),
85
- "function-active-solid": withColorMixin("--function-active-solid"),
86
- "function-active-hover": withColorMixin("--function-active-hover"),
87
- "function-active-hover-bg": withColorMixin(
88
- "--function-active-hover-bg"
89
- ),
90
- "function-active-stroke": withColorMixin("--function-active-stroke"),
91
- "function-active-icon": withColorMixin("--function-active-icon"),
92
-
93
- "base-bg": withColorMixin("--base-color-bg"),
94
- "base-bg2": withColorMixin("--base-color-bg2"),
95
- "base-bg3": withColorMixin("--base-color-bg3"),
96
- "base-popup": withColorMixin("--base-color-popup"),
97
- "base-popup-highlight": withColorMixin("--base-color-popup-hightlight"),
98
- "base-popup-curtain": withColorMixin("--base-color-popup-curtain"),
99
- "base-popup-foreground": withColorMixin(
100
- "--base-color-popup-foreground"
101
- ),
102
- "base-stroke": withColorMixin("--base-color-workspace-stroke"),
103
- "base-workspace-stroke": withColorMixin(
104
- "--base-color-workspace-stroke"
105
- ),
106
- "base-guideline-stroke": withColorMixin(
107
- "--base-color-guideline-stroke"
108
- ),
109
-
110
- "common-white": withColorMixin("--common-white"),
111
- "common-black": withColorMixin("--common-black"),
112
-
113
- surface: withColorMixin("--surface"),
114
- "surface-foreground": withColorMixin("--surface-foreground"),
115
- background: withColorMixin("--background"),
116
- foreground: withColorMixin("--foreground"),
117
- },
118
- borderColor: {
119
- ...generateButtonStyles("border"),
120
- ...generateActionButtonStyles("border"),
121
- },
122
- backgroundColor: {
123
- ...generateButtonStyles("bg"),
124
- ...generateActionButtonStyles("bg"),
125
- },
126
- textColor: {
127
- ...generateButtonStyles("text"),
128
- ...generateActionButtonStyles("text"),
129
- },
130
- fill: {
131
- ...generateButtonStyles("text"),
132
- ...generateActionButtonStyles("text"),
133
- },
134
- },
135
- },
136
- };