@rovula/ui 0.1.5 → 0.1.7

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 (97) hide show
  1. package/dist/cjs/bundle.css +404 -368
  2. package/dist/cjs/bundle.js +171 -171
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/Text/Text.d.ts +25 -1
  5. package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
  6. package/dist/cjs/types/utils/colors.d.ts +268 -268
  7. package/dist/components/Avatar/Avatar.styles.js +2 -2
  8. package/dist/components/Button/Buttons.stories.js +1 -1
  9. package/dist/components/Calendar/Calendar.js +1 -1
  10. package/dist/components/Dropdown/Dropdown.js +2 -2
  11. package/dist/components/DropdownMenu/DropdownMenu.js +4 -4
  12. package/dist/components/Footer/Footer.js +1 -1
  13. package/dist/components/Input/Input.styles.js +2 -2
  14. package/dist/components/InputFilter/InputFilter.js +2 -2
  15. package/dist/components/Label/Label.styles.js +4 -4
  16. package/dist/components/Menu/Menu.js +2 -2
  17. package/dist/components/Navbar/Navbar.js +1 -1
  18. package/dist/components/Switch/Switch.styles.js +1 -1
  19. package/dist/components/Tabs/Tabs.js +1 -1
  20. package/dist/components/Text/Text.js +11 -1
  21. package/dist/components/Text/Text.stories.js +6 -6
  22. package/dist/components/TextArea/TextArea.styles.js +6 -6
  23. package/dist/components/TextInput/TextInput.stories.js +1 -1
  24. package/dist/components/TextInput/TextInput.styles.js +18 -18
  25. package/dist/components/Toast/Toast.js +2 -2
  26. package/dist/esm/bundle.css +404 -368
  27. package/dist/esm/bundle.js +5 -5
  28. package/dist/esm/bundle.js.map +1 -1
  29. package/dist/esm/types/components/Text/Text.d.ts +25 -1
  30. package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
  31. package/dist/esm/types/utils/colors.d.ts +268 -268
  32. package/dist/index.d.ts +293 -269
  33. package/dist/src/theme/global.css +2514 -2607
  34. package/dist/utils/colors.js +268 -268
  35. package/package.json +1 -1
  36. package/src/components/Avatar/Avatar.styles.ts +2 -2
  37. package/src/components/Button/Buttons.stories.tsx +17 -9
  38. package/src/components/Calendar/Calendar.tsx +1 -1
  39. package/src/components/Dropdown/Dropdown.tsx +2 -2
  40. package/src/components/DropdownMenu/DropdownMenu.tsx +6 -6
  41. package/src/components/Footer/Footer.tsx +1 -1
  42. package/src/components/Input/Input.styles.tsx +2 -2
  43. package/src/components/InputFilter/InputFilter.tsx +2 -2
  44. package/src/components/Label/Label.styles.ts +4 -4
  45. package/src/components/Menu/Menu.tsx +2 -2
  46. package/src/components/Navbar/Navbar.tsx +1 -1
  47. package/src/components/Switch/Switch.styles.ts +1 -1
  48. package/src/components/Tabs/Tabs.tsx +1 -1
  49. package/src/components/Text/Text.stories.tsx +6 -6
  50. package/src/components/Text/Text.tsx +36 -1
  51. package/src/components/TextArea/TextArea.styles.ts +6 -6
  52. package/src/components/TextInput/TextInput.stories.tsx +3 -1
  53. package/src/components/TextInput/TextInput.styles.ts +18 -18
  54. package/src/components/Toast/Toast.tsx +2 -2
  55. package/src/theme/THEME_MAPPING.md +41 -42
  56. package/src/theme/global.css +8 -4
  57. package/src/theme/main-preset.js +49 -0
  58. package/src/theme/plugins/utilities/typography.js +40 -6
  59. package/src/theme/presets/colors.js +27 -29
  60. package/src/theme/themes/skyller/baseline.css +0 -4
  61. package/src/theme/themes/variable-mapping.css +1064 -0
  62. package/src/theme/themes/variable.css +317 -284
  63. package/src/theme/themes/xspector/baseline.css +0 -4
  64. package/src/theme/themes/xspector/components/dropdown-menu.css +4 -4
  65. package/src/theme/tokens/baseline.css +0 -3
  66. package/src/theme/tokens/color.css +34 -63
  67. package/src/theme/tokens/components/action-button.css +6 -6
  68. package/src/theme/tokens/components/button.css +189 -189
  69. package/src/theme/tokens/components/dropdown-menu.css +2 -2
  70. package/src/theme/tokens/components/footer.css +1 -1
  71. package/src/theme/tokens/components/switch.css +10 -10
  72. package/src/theme/tokens/typography.css +28 -28
  73. package/src/theme/tokens_old/baseline.css +13 -0
  74. package/src/theme/tokens_old/color.css +78 -0
  75. package/src/theme/tokens_old/components/action-button.css +127 -0
  76. package/src/theme/tokens_old/components/button.css +512 -0
  77. package/src/theme/tokens_old/components/dropdown-menu.css +27 -0
  78. package/src/theme/tokens_old/components/footer.css +9 -0
  79. package/src/theme/tokens_old/components/loading.css +11 -0
  80. package/src/theme/tokens_old/components/navbar.css +9 -0
  81. package/src/theme/tokens_old/components/progress-bar.css +8 -0
  82. package/src/theme/tokens_old/components/switch.css +29 -0
  83. package/src/theme/tokens_old/typography.css +199 -0
  84. package/src/theme/tokens_old/variables.css +28 -0
  85. package/src/theme/utils.js +16 -16
  86. package/src/utils/colors.ts +276 -279
  87. package/src/theme/themes/skyller/color.css +0 -79
  88. package/src/theme/themes/skyller/palette.css +0 -143
  89. package/src/theme/themes/skyller/state.css +0 -94
  90. package/src/theme/themes/skyller/transparent.css +0 -94
  91. package/src/theme/themes/xspector/color.css +0 -83
  92. package/src/theme/themes/xspector/palette.css +0 -142
  93. package/src/theme/themes/xspector/state.css +0 -94
  94. package/src/theme/themes/xspector/transparent.css +0 -93
  95. /package/src/theme/{tokens → tokens_old}/palette.css +0 -0
  96. /package/src/theme/{tokens → tokens_old}/state.css +0 -0
  97. /package/src/theme/{tokens → tokens_old}/transparent.css +0 -0
@@ -0,0 +1,199 @@
1
+ :root {
2
+ /* TYPE */
3
+ --h1-family: "Montserrat";
4
+ --h1-size: 64px;
5
+ --h1-size-rem: 4rem;
6
+ --h1-weight: 700;
7
+ --h1-style: normal;
8
+ --h1-line-height: 80px;
9
+ --h1-line-height-rem: 5rem;
10
+ --h2-family: "Montserrat";
11
+ --h2-size: 48px;
12
+ --h2-size-rem: 3rem;
13
+ --h2-weight: 700;
14
+ --h2-style: normal;
15
+ --h2-line-height: 60px;
16
+ --h2-line-height-rem: 3.75rem;
17
+ --h3-family: "Montserrat";
18
+ --h3-size: 32px;
19
+ --h3-size-rem: 2rem;
20
+ --h3-weight: 700;
21
+ --h3-style: normal;
22
+ --h3-line-height: 48px;
23
+ --h3-line-height-rem: 3rem;
24
+ --h4-family: "Montserrat";
25
+ --h4-size: 24px;
26
+ --h4-size-rem: 1.5rem;
27
+ --h4-weight: 700;
28
+ --h4-style: normal;
29
+ --h4-line-height: 32px;
30
+ --h4-line-height-rem: 2rem;
31
+ --h5-family: "Montserrat";
32
+ --h5-size: 20px;
33
+ --h5-size-rem: 1.25rem;
34
+ --h5-weight: 700;
35
+ --h5-style: normal;
36
+ --h5-line-height: 28px;
37
+ --h5-line-height-rem: 1.75rem;
38
+ --h6-family: "Montserrat";
39
+ --h6-size: 18px;
40
+ --h6-size-rem: 1.125rem;
41
+ --h6-weight: 700;
42
+ --h6-style: normal;
43
+ --h6-line-height: 24px;
44
+ --h6-line-height-rem: 1.5rem;
45
+ --subtitle1-family: "Montserrat";
46
+ --subtitle1-size: 16px;
47
+ --subtitle1-size-rem: 1rem;
48
+ --subtitle1-weight: 400;
49
+ --subtitle1-style: normal;
50
+ --subtitle1-line-height: 24px;
51
+ --subtitle1-line-height-rem: 1.5rem;
52
+ --subtitle2-family: "Montserrat";
53
+ --subtitle2-size: 16px;
54
+ --subtitle2-size-rem: 1rem;
55
+ --subtitle2-weight: 500;
56
+ --subtitle2-style: normal;
57
+ --subtitle2-line-height: 24px;
58
+ --subtitle2-line-height-rem: 1.5rem;
59
+ --subtitle3-family: "Montserrat";
60
+ --subtitle3-size: 16px;
61
+ --subtitle3-size-rem: 1rem;
62
+ --subtitle3-weight: 600;
63
+ --subtitle3-style: normal;
64
+ --subtitle3-line-height: 24px;
65
+ --subtitle3-line-height-rem: 1.5rem;
66
+ --subtitle4-family: "Montserrat";
67
+ --subtitle4-size: 14px;
68
+ --subtitle4-size-rem: 0.875rem;
69
+ --subtitle4-weight: 400;
70
+ --subtitle4-style: normal;
71
+ --subtitle4-line-height: 22px;
72
+ --subtitle4-line-height-rem: 1.375rem;
73
+ --subtitle5-family: "Montserrat";
74
+ --subtitle5-size: 14px;
75
+ --subtitle5-size-rem: 0.875rem;
76
+ --subtitle5-weight: 500;
77
+ --subtitle5-style: normal;
78
+ --subtitle5-line-height: 22px;
79
+ --subtitle5-line-height-rem: 1.375rem;
80
+ --subtitle6-family: "Montserrat";
81
+ --subtitle6-size: 14px;
82
+ --subtitle6-size-rem: 0.875rem;
83
+ --subtitle6-weight: 600;
84
+ --subtitle6-style: normal;
85
+ --subtitle6-line-height: 22px;
86
+ --subtitle6-line-height-rem: 1.375rem;
87
+ --body1-family: "Montserrat";
88
+ --body1-size: 16px;
89
+ --body1-size-rem: 1rem;
90
+ --body1-weight: 400;
91
+ --body1-style: normal;
92
+ --body1-line-height: 20px;
93
+ --body1-line-height-rem: 1.25rem;
94
+ --body2-family: "Montserrat";
95
+ --body2-size: 16px;
96
+ --body2-size-rem: 1rem;
97
+ --body2-weight: 500;
98
+ --body2-style: normal;
99
+ --body2-line-height: 20px;
100
+ --body2-line-height-rem: 1.25rem;
101
+ --body3-family: "Montserrat";
102
+ --body3-size: 14px;
103
+ --body3-size-rem: 0.875rem;
104
+ --body3-weight: 400;
105
+ --body3-style: normal;
106
+ --body3-line-height: 18px;
107
+ --body3-line-height-rem: 1.125rem;
108
+ --body4-family: "Montserrat";
109
+ --body4-size: 14px;
110
+ --body4-size-rem: 0.875rem;
111
+ --body4-weight: 500;
112
+ --body4-style: normal;
113
+ --body4-line-height: 18px;
114
+ --body4-line-height-rem: 1.125rem;
115
+ --small1-family: "Montserrat";
116
+ --small1-size: 12px;
117
+ --small1-size-rem: 0.75rem;
118
+ --small1-weight: 400;
119
+ --small1-style: normal;
120
+ --small1-line-height: 14px;
121
+ --small1-line-height-rem: 0.875rem;
122
+ --small2-family: "Montserrat";
123
+ --small2-size: 12px;
124
+ --small2-size-rem: 0.75rem;
125
+ --small2-weight: 500;
126
+ --small2-style: normal;
127
+ --small2-line-height: 14px;
128
+ --small2-line-height-rem: 0.875rem;
129
+ --small3-family: "Montserrat";
130
+ --small3-size: 12px;
131
+ --small3-size-rem: 0.75rem;
132
+ --small3-weight: 600;
133
+ --small3-style: normal;
134
+ --small3-line-height: 14px;
135
+ --small3-line-height-rem: 0.875rem;
136
+ --small4-family: "Montserrat";
137
+ --small4-size: 10px;
138
+ --small4-size-rem: 0.625rem;
139
+ --small4-weight: 400;
140
+ --small4-style: normal;
141
+ --small4-line-height: 12px;
142
+ --small4-line-height-rem: 0.75rem;
143
+ --small5-family: "Montserrat";
144
+ --small5-size: 10px;
145
+ --small5-size-rem: 0.625rem;
146
+ --small5-weight: 500;
147
+ --small5-style: normal;
148
+ --small5-line-height: 12px;
149
+ --small5-line-height-rem: 0.75rem;
150
+ --small6-family: "Montserrat";
151
+ --small6-size: 10px;
152
+ --small6-size-rem: 0.625rem;
153
+ --small6-weight: 600;
154
+ --small6-style: normal;
155
+ --small6-line-height: 12px;
156
+ --small6-line-height-rem: 0.75rem;
157
+ --small7-family: "Montserrat";
158
+ --small7-size: 8px;
159
+ --small7-size-rem: 0.5rem;
160
+ --small7-weight: 600;
161
+ --small7-style: normal;
162
+ --small7-line-height: 10px;
163
+ --small7-line-height-rem: 0.625rem;
164
+ --small8-family: "Montserrat";
165
+ --small8-size: 8px;
166
+ --small8-size-rem: 0.5rem;
167
+ --small8-weight: 700;
168
+ --small8-style: normal;
169
+ --small8-line-height: 10px;
170
+ --small8-line-height-rem: 0.625rem;
171
+ --label-label1-family: "Montserrat";
172
+ --label-label1-size: 12px;
173
+ --label-label1-size-rem: 0.75rem;
174
+ --label-label1-weight: 400;
175
+ --label-label1-style: normal;
176
+ --label-label1-line-height: 12px;
177
+ --label-label1-line-height-rem: 0.75rem;
178
+ --label-label2-family: "Montserrat";
179
+ --label-label2-size: 10px;
180
+ --label-label2-size-rem: 0.625rem;
181
+ --label-label2-weight: 400;
182
+ --label-label2-style: normal;
183
+ --label-label2-line-height: 10px;
184
+ --label-label2-line-height-rem: 0.625rem;
185
+ --button-button-l-family: "Montserrat";
186
+ --button-button-l-size: 16px;
187
+ --button-button-l-size-rem: 1rem;
188
+ --button-button-l-weight: 700;
189
+ --button-button-l-style: normal;
190
+ --button-button-l-line-height: 24px;
191
+ --button-button-l-line-height-rem: 1.5rem;
192
+ --button-button-ms-family: "Montserrat";
193
+ --button-button-ms-size: 14px;
194
+ --button-button-ms-size-rem: 0.875rem;
195
+ --button-button-ms-weight: 700;
196
+ --button-button-ms-style: normal;
197
+ --button-button-ms-line-height: 22px;
198
+ --button-button-ms-line-height-rem: 1.375rem;
199
+ }
@@ -0,0 +1,28 @@
1
+ :root {
2
+ --radius-radius-xl: 16px;
3
+ --radius-radius-xl-rem: 1rem;
4
+ --radius-radius-l: 12px;
5
+ --radius-radius-l-rem: 0.75rem;
6
+ --radius-radius-m: 8px;
7
+ --radius-radius-m-rem: 0.5rem;
8
+ --radius-radius-s: 6px;
9
+ --radius-radius-s-rem: 0.375rem;
10
+ --radius-radius-xs: 4px;
11
+ --radius-radius-xs-rem: 0.25rem;
12
+ --spacing-spacing-xxs: 2px;
13
+ --spacing-spacing-xxs-rem: 0.125rem;
14
+ --spacing-spacing-xs: 4px;
15
+ --spacing-spacing-xs-rem: 0.25rem;
16
+ --spacing-spacing-s: 8px;
17
+ --spacing-spacing-s-rem: 0.5rem;
18
+ --spacing-spacing-m: 12px;
19
+ --spacing-spacing-m-rem: 0.75rem;
20
+ --spacing-spacing-l: 16px;
21
+ --spacing-spacing-l-rem: 1rem;
22
+ --spacing-spacing-xl: 24px;
23
+ --spacing-spacing-xl-rem: 1.5rem;
24
+ --spacing-spacing-xxl: 32px;
25
+ --spacing-spacing-xxl-rem: 2rem;
26
+ --spacing-spacing-xxxl: 48px;
27
+ --spacing-spacing-xxxl-rem: 3rem;
28
+ }
@@ -4,7 +4,7 @@ export const withColorMixin = (variable) =>
4
4
  export const generateColorConfig = (
5
5
  baseName,
6
6
  variablePrefix,
7
- range = [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]
7
+ range = [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],
8
8
  ) => {
9
9
  const colors = {};
10
10
 
@@ -13,35 +13,35 @@ export const generateColorConfig = (
13
13
  });
14
14
 
15
15
  colors[`${baseName}-foreground`] = withColorMixin(`--${baseName}-foreground`);
16
- colors[`${baseName}`] = withColorMixin(`--state-color-${baseName}-default`); // TODO should be dynamic
16
+ colors[`${baseName}`] = withColorMixin(`--state-${baseName}-default`); // TODO should be dynamic
17
17
  colors[`${baseName}-default`] = withColorMixin(
18
- `--state-color-${baseName}-default`
18
+ `--state-${baseName}-default`,
19
19
  );
20
20
  colors[`${baseName}-hover`] = withColorMixin(
21
- `--state-color-${baseName}-hover`
21
+ `--state-${baseName}-hover`,
22
22
  );
23
23
  colors[`${baseName}-stroke`] = withColorMixin(
24
- `--state-color-${baseName}-stroke`
24
+ `--state-${baseName}-stroke`,
25
25
  );
26
26
  colors[`${baseName}-hover-bg`] = withColorMixin(
27
- `--state-color-${baseName}-hover-bg`
27
+ `--state-${baseName}-hover-bg`,
28
28
  );
29
29
  colors[`${baseName}-pressed`] = withColorMixin(
30
- `--state-color-${baseName}-pressed`
30
+ `--state-${baseName}-pressed`,
31
31
  );
32
32
  colors[`${baseName}-active`] = withColorMixin(
33
- `--state-color-${baseName}-active`
33
+ `--state-${baseName}-active`,
34
34
  );
35
35
 
36
36
  // text
37
37
  colors[`${baseName}-text-solid`] = withColorMixin(
38
- `--state-color-${baseName}-text-solid`
38
+ `--state-${baseName}-text-solid`,
39
39
  );
40
40
  colors[`${baseName}-text-outline`] = withColorMixin(
41
- `--state-color-${baseName}-text-outline`
41
+ `--state-${baseName}-text-outline`,
42
42
  );
43
43
  colors[`${baseName}-text-pressed`] = withColorMixin(
44
- `--state-color-${baseName}-text-pressed`
44
+ `--state-${baseName}-text-pressed`,
45
45
  );
46
46
 
47
47
  return colors;
@@ -65,7 +65,7 @@ export function generateButtonStyles(type) {
65
65
  prev[`${prefix}-hover`] = withColorMixin(`--${prefix}-hover-${type}`);
66
66
  prev[`${prefix}-active`] = withColorMixin(`--${prefix}-active-${type}`);
67
67
  prev[`${prefix}-disabled`] = withColorMixin(
68
- `--${prefix}-disabled-${type}`
68
+ `--${prefix}-disabled-${type}`,
69
69
  );
70
70
  });
71
71
  return prev;
@@ -83,10 +83,10 @@ export function generateActionButtonStyles(type) {
83
83
  prev[`${prefix}-pressed`] = withColorMixin(`--${prefix}-pressed-${type}`);
84
84
  prev[`${prefix}-active`] = withColorMixin(`--${prefix}-active-${type}`);
85
85
  prev[`${prefix}-active-pressed`] = withColorMixin(
86
- `--${prefix}-active-pressed-${type}`
86
+ `--${prefix}-active-pressed-${type}`,
87
87
  );
88
88
  prev[`${prefix}-active-hover`] = withColorMixin(
89
- `--${prefix}-active-hover-${type}`
89
+ `--${prefix}-active-hover-${type}`,
90
90
  );
91
91
  prev[`${prefix}-disabled`] = withColorMixin(`--${prefix}-disabled-${type}`);
92
92
  return prev;
@@ -94,14 +94,14 @@ export function generateActionButtonStyles(type) {
94
94
  }
95
95
 
96
96
  // bg-primary-transparent-8
97
- export const generateTransparentColorConfig = (baseName, type) => {
97
+ export const generateTransparentColorConfig = (baseName, _type) => {
98
98
  const colors = {};
99
99
 
100
100
  const range = [8, 12, 16, 24, 32, 48];
101
101
 
102
102
  range.forEach((num) => {
103
103
  colors[`${baseName}-transparent-${num}`] = withColorMixin(
104
- `--${type}-transparency-${baseName}-${num}`
104
+ `--transparent-${baseName}-${num}`,
105
105
  );
106
106
  });
107
107