@rovula/ui 0.0.19 → 0.0.21

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 (207) hide show
  1. package/dist/cjs/bundle.css +3220 -1382
  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.stories.d.ts +4 -4
  5. package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  6. package/dist/cjs/types/components/Button/Button.styles copy.d.ts +7 -0
  7. package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -0
  8. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +12 -4
  9. package/dist/cjs/types/components/Calendar/Calendar.d.ts +0 -1
  10. package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +7 -7
  11. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  12. package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +2 -0
  13. package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
  14. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  15. package/dist/cjs/types/components/Input/Input.stories.d.ts +12 -12
  16. package/dist/cjs/types/components/Label/Label.stories.d.ts +6 -6
  17. package/dist/cjs/types/components/Loading/Loading.d.ts +14 -0
  18. package/dist/cjs/types/components/Loading/Loading.stories.d.ts +35 -0
  19. package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  20. package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  21. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  22. package/dist/cjs/types/components/Search/Search.d.ts +22 -1
  23. package/dist/cjs/types/components/Search/Search.stories.d.ts +338 -7
  24. package/dist/cjs/types/components/Table/Table.stories.d.ts +4 -4
  25. package/dist/cjs/types/components/Text/Text.d.ts +1 -1
  26. package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
  27. package/dist/cjs/types/components/TextInput/TextInput.d.ts +4 -0
  28. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +11 -6
  29. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +8 -0
  30. package/dist/cjs/types/index.d.ts +3 -0
  31. package/dist/cjs/types/stories/ColorGroupPreview.d.ts +1 -0
  32. package/dist/cjs/types/stories/ColorPreview.d.ts +5 -0
  33. package/dist/components/ActionButton/ActionButton.js +1 -1
  34. package/dist/components/ActionButton/ActionButton.stories.js +1 -1
  35. package/dist/components/ActionButton/ActionButton.styles copy.js +90 -0
  36. package/dist/components/ActionButton/ActionButton.styles.js +54 -15
  37. package/dist/components/AlertDialog/AlertDialog.js +2 -2
  38. package/dist/components/Avatar/Avatar.styles.js +1 -1
  39. package/dist/components/Button/Button.js +3 -2
  40. package/dist/components/Button/Button.styles copy.js +210 -0
  41. package/dist/components/Button/Button.styles.js +203 -43
  42. package/dist/components/Button/Buttons.stories.js +9 -1
  43. package/dist/components/Calendar/Calendar.js +39 -2
  44. package/dist/components/Checkbox/Checkbox.js +1 -1
  45. package/dist/components/Collapsible/Collapsible.styles.js +6 -3
  46. package/dist/components/DatePicker/DatePicker.js +13 -2
  47. package/dist/components/Dialog/Dialog.js +4 -4
  48. package/dist/components/Dropdown/Dropdown.js +9 -7
  49. package/dist/components/Dropdown/Dropdown.styles.js +1 -1
  50. package/dist/components/Input/Input.js +8 -1
  51. package/dist/components/Input/Input.stories.js +3 -2
  52. package/dist/components/Input/Input.styles.js +13 -5
  53. package/dist/components/Loading/Loading.js +23 -0
  54. package/dist/components/Loading/Loading.stories.js +37 -0
  55. package/dist/components/Popover/Popover.js +1 -1
  56. package/dist/components/ProgressBar/ProgressBar.js +22 -0
  57. package/dist/components/ProgressBar/ProgressBar.stories.js +52 -0
  58. package/dist/components/RadioGroup/RadioGroup.js +2 -2
  59. package/dist/components/Search/Search.js +6 -7
  60. package/dist/components/Search/Search.stories.js +8 -5
  61. package/dist/components/Text/Text.js +17 -2
  62. package/dist/components/Text/Text.stories.js +5 -1
  63. package/dist/components/TextInput/TextInput.js +14 -5
  64. package/dist/components/TextInput/TextInput.stories.js +3 -2
  65. package/dist/components/TextInput/TextInput.styles.js +120 -18
  66. package/dist/esm/bundle.css +3220 -1382
  67. package/dist/esm/bundle.js +3 -3
  68. package/dist/esm/bundle.js.map +1 -1
  69. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
  70. package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  71. package/dist/esm/types/components/Button/Button.styles copy.d.ts +7 -0
  72. package/dist/esm/types/components/Button/Button.styles.d.ts +1 -0
  73. package/dist/esm/types/components/Button/Buttons.stories.d.ts +12 -4
  74. package/dist/esm/types/components/Calendar/Calendar.d.ts +0 -1
  75. package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +7 -7
  76. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  77. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +2 -0
  78. package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
  79. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  80. package/dist/esm/types/components/Input/Input.stories.d.ts +12 -12
  81. package/dist/esm/types/components/Label/Label.stories.d.ts +6 -6
  82. package/dist/esm/types/components/Loading/Loading.d.ts +14 -0
  83. package/dist/esm/types/components/Loading/Loading.stories.d.ts +35 -0
  84. package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  85. package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  86. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  87. package/dist/esm/types/components/Search/Search.d.ts +22 -1
  88. package/dist/esm/types/components/Search/Search.stories.d.ts +338 -7
  89. package/dist/esm/types/components/Table/Table.stories.d.ts +4 -4
  90. package/dist/esm/types/components/Text/Text.d.ts +1 -1
  91. package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
  92. package/dist/esm/types/components/TextInput/TextInput.d.ts +4 -0
  93. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +11 -6
  94. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +8 -0
  95. package/dist/esm/types/index.d.ts +3 -0
  96. package/dist/esm/types/stories/ColorGroupPreview.d.ts +1 -0
  97. package/dist/esm/types/stories/ColorPreview.d.ts +5 -0
  98. package/dist/index.d.ts +53 -2
  99. package/dist/index.js +3 -0
  100. package/dist/src/theme/global.css +5078 -918
  101. package/dist/stories/ColorGroupPreview.js +478 -0
  102. package/dist/stories/ColorPreview.js +8 -0
  103. package/dist/theme/global.css +7 -227
  104. package/dist/theme/main-preset.js +131 -67
  105. package/dist/theme/plugins/utilities/typography.js +12 -0
  106. package/dist/theme/presets/colors.js +101 -220
  107. package/dist/theme/theme.d.ts +69 -0
  108. package/dist/theme/themes/xspector/baseline.css +7 -0
  109. package/dist/theme/themes/xspector/color.css +67 -0
  110. package/dist/theme/themes/xspector/components/action-button.css +98 -0
  111. package/dist/theme/themes/xspector/components/loading.css +11 -0
  112. package/dist/theme/themes/xspector/palette.css +122 -0
  113. package/dist/theme/themes/xspector/state.css +89 -0
  114. package/dist/theme/themes/xspector/transparent.css +68 -0
  115. package/dist/theme/themes/xspector/typography.css +27 -0
  116. package/dist/theme/tokens/baseline.css +10 -0
  117. package/dist/theme/tokens/color.css +63 -0
  118. package/dist/theme/tokens/components/action-button.css +127 -0
  119. package/dist/theme/tokens/components/button.css +512 -0
  120. package/dist/theme/tokens/components/loading.css +11 -0
  121. package/dist/theme/tokens/components/navbar.css +8 -0
  122. package/dist/theme/tokens/components/progress-bar.css +8 -0
  123. package/dist/theme/tokens/palette.css +122 -0
  124. package/dist/theme/tokens/state.css +82 -0
  125. package/dist/theme/tokens/transparent.css +68 -0
  126. package/dist/theme/tokens/typography.css +178 -0
  127. package/dist/theme/tokens/variables.css +28 -0
  128. package/dist/theme/utils.js +98 -0
  129. package/package.json +1 -1
  130. package/src/_theme/global copy.css +761 -0
  131. package/src/_theme/global.css +39 -0
  132. package/src/_theme/main-preset.js +239 -0
  133. package/src/_theme/plugins/utilities/typography.js +81 -0
  134. package/src/_theme/presets/colors copy 2.js +319 -0
  135. package/src/_theme/presets/colors copy.js +229 -0
  136. package/src/_theme/presets/colors.js +94 -0
  137. package/src/_theme/theme.d.ts +69 -0
  138. package/src/_theme/variables/base/button.css +334 -0
  139. package/src/_theme/variables/base/components copy.css +19 -0
  140. package/src/_theme/variables/default/colors.css +292 -0
  141. package/src/_theme/variables/default/typography.css +178 -0
  142. package/src/_theme/variables/xspector/colors.css +468 -0
  143. package/src/_theme/variables/xspector/typography.css +178 -0
  144. package/src/components/ActionButton/ActionButton.stories.tsx +1 -1
  145. package/src/components/ActionButton/ActionButton.styles copy.ts +95 -0
  146. package/src/components/ActionButton/ActionButton.styles.ts +54 -19
  147. package/src/components/ActionButton/ActionButton.tsx +1 -1
  148. package/src/components/AlertDialog/AlertDialog.tsx +2 -2
  149. package/src/components/Avatar/Avatar.styles.ts +1 -1
  150. package/src/components/Button/Button.styles copy.ts +214 -0
  151. package/src/components/Button/Button.styles.ts +203 -47
  152. package/src/components/Button/Button.tsx +4 -0
  153. package/src/components/Button/Buttons.stories.tsx +9 -1
  154. package/src/components/Calendar/Calendar.tsx +49 -7
  155. package/src/components/Checkbox/Checkbox.tsx +1 -1
  156. package/src/components/Collapsible/Collapsible.styles.ts +6 -3
  157. package/src/components/DatePicker/DatePicker.tsx +8 -2
  158. package/src/components/Dialog/Dialog.tsx +5 -5
  159. package/src/components/Dropdown/Dropdown.styles.ts +1 -1
  160. package/src/components/Dropdown/Dropdown.tsx +14 -12
  161. package/src/components/Input/Input.stories.tsx +3 -2
  162. package/src/components/Input/Input.styles.tsx +13 -6
  163. package/src/components/Input/Input.tsx +8 -1
  164. package/src/components/Loading/Loading.stories.tsx +43 -0
  165. package/src/components/Loading/Loading.tsx +72 -0
  166. package/src/components/Popover/Popover.tsx +1 -1
  167. package/src/components/ProgressBar/ProgressBar.stories.tsx +78 -0
  168. package/src/components/ProgressBar/ProgressBar.tsx +62 -0
  169. package/src/components/RadioGroup/RadioGroup.tsx +2 -2
  170. package/src/components/Search/Search.stories.tsx +13 -13
  171. package/src/components/Search/Search.tsx +14 -19
  172. package/src/components/Text/Text.stories.tsx +6 -4
  173. package/src/components/Text/Text.tsx +27 -3
  174. package/src/components/TextInput/TextInput.stories.tsx +3 -2
  175. package/src/components/TextInput/TextInput.styles.ts +124 -19
  176. package/src/components/TextInput/TextInput.tsx +34 -4
  177. package/src/index.ts +3 -0
  178. package/src/stories/ColorGroupPreview.tsx +494 -0
  179. package/src/stories/ColorPreview.tsx +45 -0
  180. package/src/stories/Colors.mdx +14 -0
  181. package/src/stories/Typography.mdx +7 -151
  182. package/src/theme/global.css +7 -227
  183. package/src/theme/main-preset.js +131 -67
  184. package/src/theme/plugins/utilities/typography.js +12 -0
  185. package/src/theme/presets/colors.js +101 -220
  186. package/src/theme/theme.d.ts +69 -0
  187. package/src/theme/themes/xspector/baseline.css +7 -0
  188. package/src/theme/themes/xspector/color.css +67 -0
  189. package/src/theme/themes/xspector/components/action-button.css +98 -0
  190. package/src/theme/themes/xspector/components/loading.css +11 -0
  191. package/src/theme/themes/xspector/palette.css +122 -0
  192. package/src/theme/themes/xspector/state.css +89 -0
  193. package/src/theme/themes/xspector/transparent.css +68 -0
  194. package/src/theme/themes/xspector/typography.css +27 -0
  195. package/src/theme/tokens/baseline.css +10 -0
  196. package/src/theme/tokens/color.css +63 -0
  197. package/src/theme/tokens/components/action-button.css +127 -0
  198. package/src/theme/tokens/components/button.css +512 -0
  199. package/src/theme/tokens/components/loading.css +11 -0
  200. package/src/theme/tokens/components/navbar.css +8 -0
  201. package/src/theme/tokens/components/progress-bar.css +8 -0
  202. package/src/theme/tokens/palette.css +122 -0
  203. package/src/theme/tokens/state.css +82 -0
  204. package/src/theme/tokens/transparent.css +68 -0
  205. package/src/theme/tokens/typography.css +178 -0
  206. package/src/theme/tokens/variables.css +28 -0
  207. package/src/theme/utils.js +98 -0
@@ -0,0 +1,494 @@
1
+ import React from "react";
2
+ import ColorPreview from "./ColorPreview";
3
+
4
+ export default function ColorGroupPreview() {
5
+ const style = getComputedStyle(document.body);
6
+
7
+ const colorGroups = {
8
+ "Main Colors": {
9
+ prefix: "--main-color",
10
+ variable: [
11
+ "--main-color-primary",
12
+ "--main-color-secondary",
13
+ "--main-color-tertiary",
14
+ ],
15
+ },
16
+
17
+ "Text Colors": {
18
+ prefix: "--text",
19
+ variable: [
20
+ "--text-dark",
21
+ "--text-medium",
22
+ "--text-light",
23
+ "--text-grey-dark",
24
+ "--text-grey-medium",
25
+ "--text-grey-light",
26
+ "--text-white",
27
+ ],
28
+ },
29
+ // "State Colors": {
30
+ // prefix: "--state-color",
31
+ // variable: [
32
+ // "--state-color-primary-primary-default",
33
+ // "--state-color-primary-primary-hover",
34
+ // "--state-color-primary-primary-stroke",
35
+ // "--state-color-primary-primary-hover-bg",
36
+ // "--state-color-primary-primary-pressed",
37
+ // "--state-color-primary-primary-active",
38
+ // "--state-color-secondary-secondary-default",
39
+ // "--state-color-secondary-secondary-hover",
40
+ // "--state-color-secondary-secondary-stroke",
41
+ // "--state-color-secondary-secondary-hover-bg",
42
+ // "--state-color-secondary-secondary-pressed",
43
+ // "--state-color-secondary-secondary-active",
44
+ // "--state-color-tertiery-tertiary-default",
45
+ // "--state-color-tertiery-tertiary-hover",
46
+ // "--state-color-tertiery-tertiary-stroke",
47
+ // "--state-color-tertiery-tertiary-hover-bg",
48
+ // "--state-color-tertiery-tertiary-pressed",
49
+ // "--state-color-tertiery-tertiery-active",
50
+ // "--state-color-info-info-default",
51
+ // "--state-color-info-info-hover",
52
+ // "--state-color-info-info-stroke",
53
+ // "--state-color-info-info-hover-bg",
54
+ // "--state-color-info-info-pressed",
55
+ // "--state-color-info-info-active",
56
+ // "--state-color-success-success-default",
57
+ // "--state-color-success-success-hover",
58
+ // "--state-color-success-success-stroke",
59
+ // "--state-color-success-success-hover-bg",
60
+ // "--state-color-success-success-pressed",
61
+ // "--state-color-success-success-active",
62
+ // "--state-color-warning-warning-default",
63
+ // "--state-color-warning-warning-hover",
64
+ // "--state-color-warning-warning-stroke",
65
+ // "--state-color-warning-warning-hover-bg",
66
+ // "--state-color-warning-warning-pressed",
67
+ // "--state-color-warning-warning-active",
68
+ // "--state-color-error-error-default",
69
+ // "--state-color-error-error-hover",
70
+ // "--state-color-error-error-stroke",
71
+ // "--state-color-error-error-hover-bg",
72
+ // "--state-color-error-error-pressed",
73
+ // "--state-color-error-error-active",
74
+ // ],
75
+ // },
76
+ "Primary Colors": {
77
+ prefix: "--primary-ramps-primary",
78
+ variable: [
79
+ "--primary-ramps-primary-5",
80
+ "--primary-ramps-primary-10",
81
+ "--primary-ramps-primary-20",
82
+ "--primary-ramps-primary-30",
83
+ "--primary-ramps-primary-40",
84
+ "--primary-ramps-primary-50",
85
+ "--primary-ramps-primary-60",
86
+ "--primary-ramps-primary-70",
87
+ "--primary-ramps-primary-80",
88
+ "--primary-ramps-primary-90",
89
+ "--primary-ramps-primary-100",
90
+ "--primary-ramps-primary-110",
91
+ "--primary-ramps-primary-120",
92
+ "--primary-ramps-primary-130",
93
+ "--primary-ramps-primary-140",
94
+ "--primary-ramps-primary-150",
95
+ ],
96
+ },
97
+ "Primary Action State": {
98
+ prefix: "--state-color",
99
+ variable: [
100
+ "--state-color-primary-primary-default",
101
+ "--state-color-primary-primary-hover",
102
+ "--state-color-primary-primary-stroke",
103
+ "--state-color-primary-primary-hover-bg",
104
+ "--state-color-primary-primary-pressed",
105
+ "--state-color-primary-primary-active",
106
+ ],
107
+ },
108
+ "Secondary Colors": {
109
+ prefix: "--secondary-ramps-secondary",
110
+ variable: [
111
+ "--secondary-ramps-secondary-5",
112
+ "--secondary-ramps-secondary-10",
113
+ "--secondary-ramps-secondary-20",
114
+ "--secondary-ramps-secondary-30",
115
+ "--secondary-ramps-secondary-40",
116
+ "--secondary-ramps-secondary-50",
117
+ "--secondary-ramps-secondary-60",
118
+ "--secondary-ramps-secondary-70",
119
+ "--secondary-ramps-secondary-80",
120
+ "--secondary-ramps-secondary-90",
121
+ "--secondary-ramps-secondary-100",
122
+ "--secondary-ramps-secondary-110",
123
+ "--secondary-ramps-secondary-120",
124
+ "--secondary-ramps-secondary-130",
125
+ "--secondary-ramps-secondary-140",
126
+ "--secondary-ramps-secondary-150",
127
+ ],
128
+ },
129
+ "Secondary Action State": {
130
+ prefix: "--state-color",
131
+ variable: [
132
+ "--state-color-secondary-secondary-default",
133
+ "--state-color-secondary-secondary-hover",
134
+ "--state-color-secondary-secondary-stroke",
135
+ "--state-color-secondary-secondary-hover-bg",
136
+ "--state-color-secondary-secondary-pressed",
137
+ "--state-color-secondary-secondary-active",
138
+ ],
139
+ },
140
+ "Tertiary Colors": {
141
+ prefix: "--tertiary-ramps-tertiary",
142
+ variable: [
143
+ "--tertiary-ramps-tertiary-5",
144
+ "--tertiary-ramps-tertiary-10",
145
+ "--tertiary-ramps-tertiary-20",
146
+ "--tertiary-ramps-tertiary-30",
147
+ "--tertiary-ramps-tertiary-40",
148
+ "--tertiary-ramps-tertiary-50",
149
+ "--tertiary-ramps-tertiary-60",
150
+ "--tertiary-ramps-tertiary-70",
151
+ "--tertiary-ramps-tertiary-80",
152
+ "--tertiary-ramps-tertiary-90",
153
+ "--tertiary-ramps-tertiary-100",
154
+ "--tertiary-ramps-tertiary-110",
155
+ "--tertiary-ramps-tertiary-120",
156
+ "--tertiary-ramps-tertiary-130",
157
+ "--tertiary-ramps-tertiary-140",
158
+ "--tertiary-ramps-tertiary-150",
159
+ ],
160
+ },
161
+ "Tertiary Action State": {
162
+ prefix: "--state-color",
163
+ variable: [
164
+ "--state-color-tertiery-tertiary-default",
165
+ "--state-color-tertiery-tertiary-hover",
166
+ "--state-color-tertiery-tertiary-stroke",
167
+ "--state-color-tertiery-tertiary-hover-bg",
168
+ "--state-color-tertiery-tertiary-pressed",
169
+ "--state-color-tertiery-tertiery-active",
170
+ ],
171
+ },
172
+ "Grey Colors": {
173
+ prefix: "--grey-grey",
174
+ variable: [
175
+ "--grey-grey-5",
176
+ "--grey-grey-10",
177
+ "--grey-grey-20",
178
+ "--grey-grey-30",
179
+ "--grey-grey-40",
180
+ "--grey-grey-50",
181
+ "--grey-grey-60",
182
+ "--grey-grey-70",
183
+ "--grey-grey-80",
184
+ "--grey-grey-90",
185
+ "--grey-grey-100",
186
+ "--grey-grey-110",
187
+ "--grey-grey-120",
188
+ "--grey-grey-130",
189
+ "--grey-grey-140",
190
+ "--grey-grey-150",
191
+ ],
192
+ },
193
+ "Grey 2 Colors": {
194
+ prefix: "--grey2-grey2",
195
+ variable: [
196
+ "--grey2-grey2-50",
197
+ "--grey2-grey2-100",
198
+ "--grey2-grey2-200",
199
+ "--grey2-grey2-300",
200
+ "--grey2-grey2-400",
201
+ "--grey2-grey2-500",
202
+ "--grey2-grey2-600",
203
+ "--grey2-grey2-700",
204
+ "--grey2-grey2-800",
205
+ "--grey2-grey2-900",
206
+ "--grey2-grey2-950",
207
+ ],
208
+ },
209
+ "Info Colors": {
210
+ prefix: "--info-info",
211
+ variable: [
212
+ "--info-info-50",
213
+ "--info-info-100",
214
+ "--info-info-200",
215
+ "--info-info-300",
216
+ "--info-info-400",
217
+ "--info-info-500",
218
+ "--info-info-600",
219
+ "--info-info-700",
220
+ "--info-info-800",
221
+ "--info-info-900",
222
+ "--info-info-950",
223
+ ],
224
+ },
225
+ "Info Action State": {
226
+ prefix: "--state-color",
227
+ variable: [
228
+ "--state-color-info-info-default",
229
+ "--state-color-info-info-hover",
230
+ "--state-color-info-info-stroke",
231
+ "--state-color-info-info-hover-bg",
232
+ "--state-color-info-info-pressed",
233
+ "--state-color-info-info-active",
234
+ ],
235
+ },
236
+ "Success Colors": {
237
+ prefix: "--success-success",
238
+ variable: [
239
+ "--success-success-50",
240
+ "--success-success-100",
241
+ "--success-success-200",
242
+ "--success-success-300",
243
+ "--success-success-400",
244
+ "--success-success-500",
245
+ "--success-success-600",
246
+ "--success-success-700",
247
+ "--success-success-800",
248
+ "--success-success-900",
249
+ "--success-success-950",
250
+ ],
251
+ },
252
+ "Success Action State": {
253
+ prefix: "--state-color",
254
+ variable: [
255
+ "--state-color-success-success-default",
256
+ "--state-color-success-success-hover",
257
+ "--state-color-success-success-stroke",
258
+ "--state-color-success-success-hover-bg",
259
+ "--state-color-success-success-pressed",
260
+ "--state-color-success-success-active",
261
+ ],
262
+ },
263
+ "Warning Colors": {
264
+ prefix: "--warning-warning",
265
+ variable: [
266
+ "--warning-warning-50",
267
+ "--warning-warning-100",
268
+ "--warning-warning-200",
269
+ "--warning-warning-300",
270
+ "--warning-warning-400",
271
+ "--warning-warning-500",
272
+ "--warning-warning-600",
273
+ "--warning-warning-700",
274
+ "--warning-warning-800",
275
+ "--warning-warning-900",
276
+ "--warning-warning-950",
277
+ ],
278
+ },
279
+ "Warning Action State": {
280
+ prefix: "--state-color",
281
+ variable: [
282
+ "--state-color-warning-warning-default",
283
+ "--state-color-warning-warning-hover",
284
+ "--state-color-warning-warning-stroke",
285
+ "--state-color-warning-warning-hover-bg",
286
+ "--state-color-warning-warning-pressed",
287
+ "--state-color-warning-warning-active",
288
+ ],
289
+ },
290
+ "Error Colors": {
291
+ prefix: "--error-error",
292
+ variable: [
293
+ "--error-error-50",
294
+ "--error-error-100",
295
+ "--error-error-200",
296
+ "--error-error-300",
297
+ "--error-error-400",
298
+ "--error-error-500",
299
+ "--error-error-600",
300
+ "--error-error-700",
301
+ "--error-error-800",
302
+ "--error-error-900",
303
+ "--error-error-950",
304
+ ],
305
+ },
306
+ "Error Action State": {
307
+ prefix: "--state-color",
308
+ variable: [
309
+ "--state-color-error-error-default",
310
+ "--state-color-error-error-hover",
311
+ "--state-color-error-error-stroke",
312
+ "--state-color-error-error-hover-bg",
313
+ "--state-color-error-error-pressed",
314
+ "--state-color-error-error-active",
315
+ ],
316
+ },
317
+ "Main Transparency Primary": {
318
+ prefix: "--main-transparency",
319
+ variable: [
320
+ "--main-transparency-primary-8",
321
+ "--main-transparency-primary-12",
322
+ "--main-transparency-primary-16",
323
+ "--main-transparency-primary-24",
324
+ "--main-transparency-primary-32",
325
+ "--main-transparency-primary-48",
326
+ ],
327
+ },
328
+ "Main Transparency Secondary": {
329
+ prefix: "--main-transparency",
330
+ variable: [
331
+ "--main-transparency-secondary-8",
332
+ "--main-transparency-secondary-12",
333
+ "--main-transparency-secondary-16",
334
+ "--main-transparency-secondary-24",
335
+ "--main-transparency-secondary-32",
336
+ "--main-transparency-secondary-48",
337
+ ],
338
+ },
339
+ "Main Transparency Tertiary": {
340
+ prefix: "--main-transparency",
341
+ variable: [
342
+ "--main-transparency-tertiary-8",
343
+ "--main-transparency-tertiary-12",
344
+ "--main-transparency-tertiary-16",
345
+ "--main-transparency-tertiary-24",
346
+ "--main-transparency-tertiary-32",
347
+ "--main-transparency-tertiary-48",
348
+ ],
349
+ },
350
+ "Other Transparency Info": {
351
+ prefix: "--other-transparency",
352
+ variable: [
353
+ "--other-transparency-info-8",
354
+ "--other-transparency-info-12",
355
+ "--other-transparency-info-16",
356
+ "--other-transparency-info-24",
357
+ "--other-transparency-info-32",
358
+ "--other-transparency-info-48",
359
+ ],
360
+ },
361
+ "Other Transparency Success": {
362
+ prefix: "--other-transparency",
363
+ variable: [
364
+ "--other-transparency-success-8",
365
+ "--other-transparency-success-12",
366
+ "--other-transparency-success-16",
367
+ "--other-transparency-success-24",
368
+ "--other-transparency-success-32",
369
+ "--other-transparency-success-48",
370
+ ],
371
+ },
372
+ "Other Transparency Warning": {
373
+ prefix: "--other-transparency",
374
+ variable: [
375
+ "--other-transparency-warning-8",
376
+ "--other-transparency-warning-12",
377
+ "--other-transparency-warning-16",
378
+ "--other-transparency-warning-24",
379
+ "--other-transparency-warning-32",
380
+ "--other-transparency-warning-48",
381
+ ],
382
+ },
383
+ "Other Transparency Error": {
384
+ prefix: "--other-transparency",
385
+ variable: [
386
+ "--other-transparency-error-8",
387
+ "--other-transparency-error-12",
388
+ "--other-transparency-error-16",
389
+ "--other-transparency-error-24",
390
+ "--other-transparency-error-32",
391
+ "--other-transparency-error-48",
392
+ ],
393
+ },
394
+ "Other Transparency White": {
395
+ prefix: "--other-transparency",
396
+ variable: [
397
+ "--other-transparency-white-8",
398
+ "--other-transparency-white-12",
399
+ "--other-transparency-white-16",
400
+ "--other-transparency-white-24",
401
+ "--other-transparency-white-32",
402
+ "--other-transparency-white-48",
403
+ ],
404
+ },
405
+ "Other Transparency Grey": {
406
+ prefix: "--other-transparency",
407
+ variable: [
408
+ "--other-transparency-grey-8",
409
+ "--other-transparency-grey-12",
410
+ "--other-transparency-grey-16",
411
+ "--other-transparency-grey-24",
412
+ "--other-transparency-grey-32",
413
+ "--other-transparency-grey-48",
414
+ ],
415
+ },
416
+ "Other Transparency Grey 2": {
417
+ prefix: "--other-transparency",
418
+ variable: [
419
+ "--other-transparency-grey2-8",
420
+ "--other-transparency-grey2-12",
421
+ "--other-transparency-grey2-16",
422
+ "--other-transparency-grey2-24",
423
+ "--other-transparency-grey2-32",
424
+ "--other-transparency-grey2-48",
425
+ ],
426
+ },
427
+ "Other Transparency Black": {
428
+ prefix: "--other-transparency",
429
+ variable: [
430
+ "--other-transparency-black-8",
431
+ "--other-transparency-black-12",
432
+ "--other-transparency-black-16",
433
+ "--other-transparency-black-24",
434
+ "--other-transparency-black-32",
435
+ "--other-transparency-black-48",
436
+ ],
437
+ },
438
+ Other: {
439
+ prefix: "--other",
440
+ variable: [
441
+ "--other-bg",
442
+ "--other-bg2",
443
+ "--other-popup",
444
+ "--other-popup-hightlight",
445
+ "--other-popup-curtain",
446
+ ],
447
+ },
448
+ Disabled: {
449
+ prefix: "--state-color-disable",
450
+ variable: [
451
+ "--state-color-disable-disable-solid",
452
+ "--state-color-disable-disable-outline",
453
+ ],
454
+ },
455
+ "Input Colors": {
456
+ prefix: "--input-color",
457
+ variable: [
458
+ "--input-color-default-text",
459
+ "--input-color-default-stroke",
460
+ "--input-color-filled-text",
461
+ "--input-color-active-stroke",
462
+ "--input-color-disable-text",
463
+ "--input-color-disable-stroke",
464
+ "--input-color-disable-bg",
465
+ "--input-color-label-bg",
466
+ "--input-color-error",
467
+ ],
468
+ },
469
+ Common: {
470
+ prefix: "--common",
471
+ variable: ["--common-white", "--common-black"],
472
+ },
473
+ };
474
+
475
+ return (
476
+ <div className="flex flex-col gap-20">
477
+ {Object.entries(colorGroups).map(([groupName, colorVariables]) => (
478
+ <div key={groupName} className="flex flex-col">
479
+ <h3 className="text-black m-0">{groupName}</h3>
480
+ <div className="flex flex-row flex-wrap gap-3">
481
+ {colorVariables.variable.map((colorVariable) => (
482
+ <ColorPreview
483
+ key={colorVariable}
484
+ colorName={colorVariable.split("-").reverse()?.[0]}
485
+ colorCode={style.getPropertyValue(colorVariable).trim()}
486
+ isSmall={colorVariables.variable.length > 7}
487
+ />
488
+ ))}
489
+ </div>
490
+ </div>
491
+ ))}
492
+ </div>
493
+ );
494
+ }
@@ -0,0 +1,45 @@
1
+ import React from "react";
2
+
3
+ export default function ColorPreview({
4
+ colorName,
5
+ colorCode,
6
+ isSmall,
7
+ }: {
8
+ colorName: string;
9
+ colorCode: string;
10
+ isSmall: boolean;
11
+ }) {
12
+ if (isSmall) {
13
+ return (
14
+ <div className=" flex-1 h-[120px] flex flex-col rounded-xl shadow-lg overflow-hidden">
15
+ <div className="flex flex-1" style={{ backgroundColor: colorCode }} />
16
+ <div
17
+ className={
18
+ "bg-white p-3 px-3 flex flex-col justify-center items-start"
19
+ }
20
+ >
21
+ <h3 className="text-black leading-3 p-0">{colorName}</h3>
22
+ </div>
23
+ </div>
24
+ );
25
+ }
26
+
27
+ return (
28
+ <div className=" flex-1 h-[160px] flex flex-col rounded-xl shadow-lg overflow-hidden">
29
+ <div className="flex flex-1" style={{ backgroundColor: colorCode }} />
30
+ <div
31
+ className={
32
+ "bg-white p-3 px-6 flex flex-col justify-center items-start"
33
+ }
34
+ >
35
+ <h3 className="text-black leading-3 p-0 text-error">{colorName}</h3>
36
+ <div
37
+ className="text-gray-600 leading-1 p-0 m-0"
38
+ style={{ fontSize: "8px" }}
39
+ >
40
+ {colorCode}
41
+ </div>
42
+ </div>
43
+ </div>
44
+ );
45
+ }
@@ -0,0 +1,14 @@
1
+ import { Meta, Canvas } from "@storybook/addon-docs";
2
+ import ColorGroupPreview from './ColorGroupPreview'
3
+
4
+ <Meta title="Guidelines/Colors" />
5
+
6
+ # Colors
7
+
8
+ <br />
9
+
10
+
11
+ <div className="flex flex-row gap-2 w-container">
12
+ <ColorGroupPreview />
13
+ </div>
14
+