@acorex/styles 19.10.0-next.9 → 19.10.1

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.
@@ -43,7 +43,7 @@
43
43
 
44
44
  ax-divider {
45
45
  display: block;
46
- background-color: rgba(var(--ax-sys-border-color));
46
+ background-color: rgba(var(--ax-sys-color-border-lightest-surface));
47
47
  }
48
48
 
49
49
  .ax-action-item {
@@ -63,7 +63,7 @@
63
63
 
64
64
  &:hover {
65
65
  &:not(&.ax-state-disabled, &.ax-state-selected) {
66
- // background-color: rgba(var(--ax-sys-color-surface-high));
66
+ background-color: rgba(var(--ax-sys-color-surface));
67
67
  ax-prefix,
68
68
  ax-suffix {
69
69
  opacity: 1;
@@ -69,7 +69,7 @@
69
69
 
70
70
  @include mixins.darkMode() {
71
71
  .ax-overlay-pane {
72
- background-color: rgba(var(--ax-sys-color-darkest-surface));
73
- border-color: rgba(var(--ax-sys-color-border-darkest-surface));
72
+ background-color: rgba(var(--ax-sys-color-darker-surface));
73
+ border-color: rgba(var(--ax-sys-color-border-darker-surface));
74
74
  }
75
75
  }
@@ -1,19 +1,22 @@
1
- @use '../mixins/util' as util;
1
+ @use '../mixins/index.scss' as mixin;
2
2
 
3
3
  :root,
4
4
  .ax-editor-container {
5
- --ax-comp-editor-font-size: 1rem;
6
- --ax-comp-editor-space-start-size: 0.75rem;
7
- --ax-comp-editor-space-end-size: 0.75rem;
5
+ --ax-comp-editor-font-size: 0.875rem;
6
+ --ax-comp-editor-gap: 0.5rem;
7
+ --ax-comp-editor-space-start-size: 0.5rem;
8
+ --ax-comp-editor-space-end-size: 0.5rem;
9
+ --ax-comp-editor-space-block-size: 0.5rem;
8
10
  --ax-comp-editor-height: var(--ax-sys-size-base);
11
+ --ax-comp-editor-placeholder-space-x: 0.75rem;
9
12
 
10
13
  --ax-comp-editor-error-bg-color: var(--ax-sys-color-danger-light-surface);
11
14
  --ax-comp-editor-error-text-color: var(--ax-sys-color-danger-surface);
12
15
  --ax-comp-editor-error-border-color: var(--ax-sys-color-border-danger-surface);
13
16
  --ax-comp-editor-error-box-shadow-color: var(--ax-sys-color-danger-surface);
14
17
 
15
- --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
16
- --ax-comp-editor-border-color: var(--ax-sys-color-border-lighter-surface);
18
+ --ax-comp-editor-text-color: var(--ax-sys-color-on-surface);
19
+ --ax-comp-editor-border-color: var(--ax-sys-color-border-surface);
17
20
  --ax-comp-editor-border-radius: var(--ax-sys-border-radius);
18
21
  --ax-comp-editor-box-outline-width: 1px;
19
22
  --ax-comp-editor-box-outline-color: var(--ax-sys-color-primary-surface);
@@ -37,6 +40,10 @@
37
40
  border-color: rgba(var(--ax-comp-editor-border-color));
38
41
  background-color: rgba(var(--ax-comp-editor-bg-color));
39
42
  color: rgba(var(--ax-comp-editor-text-color));
43
+ position: relative;
44
+ gap: var(--ax-comp-editor-gap);
45
+ padding-inline-start: var(--ax-comp-editor-space-start-size);
46
+ padding-inline-end: var(--ax-comp-editor-space-end-size);
40
47
 
41
48
  &:focus-within {
42
49
  border-color: rgba(var(--ax-comp-editor-focused-border-color));
@@ -62,29 +69,21 @@
62
69
  }
63
70
 
64
71
  &.ax-solid {
65
- --ax-comp-editor-bg-color: var(--ax-sys-color-lightest-surface);
66
- --ax-comp-editor-border-width: 1px;
72
+ @include mixin.solid-look();
67
73
  }
68
74
  &.ax-outline {
69
- --ax-comp-editor-bg-color: 0, 0, 0, 0;
70
- --ax-comp-editor-border-width: 1px;
75
+ @include mixin.outline-look();
71
76
  }
72
77
 
73
78
  &.ax-flat {
74
- --ax-comp-editor-border-width: 2px;
75
- --ax-comp-editor-border-radius: 0px;
76
- --ax-comp-editor-box-outline-width: 0px;
77
- border-width: 0px !important;
78
- border-bottom-width: var(--ax-comp-editor-border-width) !important;
79
+ @include mixin.flat-look();
79
80
  }
80
81
 
81
82
  &.ax-fill {
82
- --ax-comp-editor-box-outline-width: 2px;
83
- --ax-comp-editor-border-width: 0px;
84
-
85
- --ax-comp-editor-bg-color: var(--ax-sys-color-lighter-surface);
86
- --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
87
- --ax-comp-editor-border-color: var(--ax-sys-color-border-lighter-surface);
83
+ @include mixin.fill-look();
84
+ }
85
+ &.ax-none {
86
+ @include mixin.none-look();
88
87
  }
89
88
 
90
89
  .ax-editor-input {
@@ -96,11 +95,11 @@
96
95
  }
97
96
  }
98
97
 
99
- .ax-editor,
100
- .ax-input {
101
- padding-inline-start: var(--ax-comp-editor-space-start-size);
102
- padding-inline-end: var(--ax-comp-editor-space-end-size);
103
- }
98
+ // .ax-editor,
99
+ // .ax-input {
100
+ // padding-inline-start: var(--ax-comp-editor-space-start-size);
101
+ // padding-inline-end: var(--ax-comp-editor-space-end-size);
102
+ // }
104
103
  .ax-input {
105
104
  // padding: 0 calc(var(--ax-comp-editor-font-size) - 4px);
106
105
  font-size: var(--ax-comp-editor-font-size);
@@ -120,19 +119,6 @@
120
119
  }
121
120
  }
122
121
 
123
- .ax-editor-container {
124
- border-radius: 0 !important;
125
- border: 0px !important;
126
- // height: 100% !important;
127
-
128
- &:focus-within {
129
- box-shadow: none !important;
130
- }
131
- &:focus {
132
- box-shadow: 0px 0px 0 1px rgba(var(--ax-sys-color-primary-500));
133
- }
134
- }
135
-
136
122
  &.ax-state-disabled {
137
123
  opacity: 0.5;
138
124
  cursor: not-allowed;
@@ -175,41 +161,20 @@
175
161
  height: var(--ax-comp-editor-button-height, 100%);
176
162
  }
177
163
 
178
- > ax-suffix,
179
- .ax-editor-button,
180
- .ax-clear-button {
181
- padding-inline-end: var(--ax-comp-editor-space-end-size);
182
- }
183
-
184
- > ax-suffix,
185
- .ax-editor-button,
186
- .ax-clear-button {
187
- padding-inline-end: var(--ax-comp-editor-space-end-size);
188
- }
164
+ // .ax-editor-button,
165
+ // .ax-clear-button {
166
+ // padding-inline-end: var(--ax-comp-editor-space-end-size);
167
+ // }
189
168
  & > ax-prefix,
190
169
  & > ax-suffix {
191
170
  max-width: fit-content;
192
171
  }
193
- & > ax-prefix {
194
- ax-icon {
195
- padding-inline-start: var(--ax-comp-editor-space-end-size);
196
- }
197
- }
198
- & > ax-suffix {
199
- ax-icon {
200
- padding-inline-end: var(--ax-comp-editor-space-end-size);
201
- }
202
- }
203
172
 
204
173
  & > ax-prefix,
205
174
  & > ax-suffix {
206
175
  height: 100%;
207
176
 
208
- // + .ax-input {
209
- // padding-left: 0.375rem !important;
210
- // padding-right: 0.375rem !important;
211
- // }
212
- * {
177
+ *:not(ax-kbd, ax-kbd-item, kbd) {
213
178
  display: flex;
214
179
  height: 100%;
215
180
  align-items: center;
@@ -226,11 +191,6 @@
226
191
  display: flex;
227
192
  align-items: center;
228
193
  justify-content: center;
229
- background-color: transparent;
230
- padding-left: 0.5rem;
231
- padding-right: 0.5rem;
232
- font-size: 0.875rem;
233
- line-height: 1.25rem;
234
194
  }
235
195
  }
236
196
 
@@ -243,96 +203,52 @@
243
203
  width: var(--ax-comp-editor-height);
244
204
  }
245
205
  }
206
+
207
+ ax-popover {
208
+ position: absolute;
209
+ }
246
210
  }
247
211
 
248
212
  .ax-xs .ax-editor-container,
249
213
  .ax-editor-container.ax-xs {
250
214
  --ax-comp-editor-font-size: 0.75rem;
251
- --ax-comp-editor-space-start-size: 0.375rem;
252
- --ax-comp-editor-space-end-size: 0.375rem;
215
+ --ax-comp-editor-space-start-size: 0.25rem;
216
+ --ax-comp-editor-space-end-size: 0.25rem;
217
+ --ax-comp-editor-button-font-size: 0.625rem;
218
+ --ax-comp-editor-gap: 0.25rem;
253
219
  }
254
220
  .ax-sm .ax-editor-container,
255
221
  .ax-editor-container.ax-sm {
256
222
  --ax-comp-editor-font-size: 0.875rem;
257
223
  --ax-comp-editor-space-start-size: 0.5rem;
258
224
  --ax-comp-editor-space-end-size: 0.5rem;
225
+ --ax-comp-editor-button-font-size: 0.75rem;
226
+ --ax-comp-editor-gap: 0.375rem;
259
227
  }
260
228
 
261
229
  .ax-md .ax-editor-container,
262
230
  .ax-editor-container,
263
231
  .ax-editor-container.ax-md {
264
- --ax-comp-editor-font-size: 1rem;
265
- --ax-comp-editor-space-start-size: 0.75rem;
266
- --ax-comp-editor-space-end-size: 0.75rem;
232
+ --ax-comp-editor-space-start-size: 0.5rem;
233
+ --ax-comp-editor-space-end-size: 0.5rem;
234
+ --ax-comp-editor-button-font-size: 0.875rem;
235
+ --ax-comp-editor-gap: 0.5rem;
267
236
  }
268
237
 
269
238
  .ax-lg .ax-editor-container,
270
239
  .ax-editor-container.ax-lg {
271
240
  --ax-comp-editor-font-size: 1.125rem;
272
- --ax-comp-editor-space-start-size: 0.75rem;
273
- --ax-comp-editor-space-end-size: 0.75rem;
241
+ --ax-comp-editor-space-start-size: 1.125rem;
242
+ --ax-comp-editor-space-end-size: 1.125rem;
243
+ --ax-comp-editor-button-font-size: 0.875rem;
244
+ --ax-comp-editor-gap: 0.625rem;
274
245
  }
275
246
 
276
247
  .ax-xl .ax-editor-container,
277
248
  .ax-editor-container.ax-xl {
278
249
  --ax-comp-editor-font-size: 1.5rem;
279
- --ax-comp-editor-space-start-size: 0.75rem;
280
- --ax-comp-editor-space-end-size: 0.75rem;
250
+ --ax-comp-editor-space-start-size: 1.5rem;
251
+ --ax-comp-editor-space-end-size: 1.5rem;
252
+ --ax-comp-editor-button-font-size: 1rem;
253
+ --ax-comp-editor-gap: 0.75rem;
281
254
  }
282
- // @include util.darkMode() {
283
- // .ax-editor-container {
284
- // &.ax-fill {
285
- // &:focus-within {
286
- // box-shadow: 0px 0px 0 2px rgba(var(--ax-comp-editor-box-shadow-color));
287
- // }
288
- // &.ax-state-error {
289
- // background-color: rgba(var(--ax-comp-editor-error-bg-color));
290
- // color: rgba(var(--ax-comp-editor-error-text-color));
291
-
292
- // &:focus-within {
293
- // box-shadow: 0px 0px 0 2px rgba(var(--ax-comp-editor-error-box-shadow-color));
294
- // }
295
- // .ax-input {
296
- // &::placeholder {
297
- // color: rgba(var(--ax-comp-editor-error-text-color));
298
- // }
299
- // }
300
- // }
301
- // }
302
- // &.ax-flat {
303
- // &:focus-within {
304
- // border-color: rgba(var(--ax-comp-editor-box-shadow-color));
305
- // }
306
- // &.ax-state-error {
307
- // border-color: rgba(var(--ax-comp-editor-error-bg-color));
308
-
309
- // .ax-input {
310
- // .ax-placeholder,
311
- // &::placeholder {
312
- // color: rgba(var(--ax-comp-editor-error-bg-color));
313
- // }
314
- // }
315
- // }
316
- // }
317
- // &.ax-solid,
318
- // &.ax-outline {
319
- // &:focus-within {
320
- // box-shadow: 0px 0px 0 1px rgba(var(--ax-comp-editor-box-shadow-color));
321
- // border-color: rgba(var(--ax-comp-editor-border-color));
322
- // }
323
-
324
- // &.ax-state-error {
325
- // border-color: rgba(var(--ax-comp-editor-error-border-color));
326
- // &:focus-within {
327
- // box-shadow: 0px 0px 0 1px rgba(var(--ax-comp-editor-error-box-shadow-color));
328
- // }
329
- // .ax-input {
330
- // .ax-placeholder,
331
- // &::placeholder {
332
- // color: rgba(var(--ax-comp-editor-error-text-color), var(--ax-comp-editor-placeholder-opacity));
333
- // }
334
- // }
335
- // }
336
- // }
337
- // }
338
- // }
@@ -28,12 +28,12 @@
28
28
  display: flex;
29
29
  align-items: center;
30
30
  justify-content: space-between;
31
- border-color: rgba(var(--ax-sys-border-color), var(--tw-border-opacity));
31
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface), var(--tw-border-opacity));
32
32
  background-color: rgba(var(--ax-color-surface), var(--tw-bg-opacity));
33
33
  }
34
34
  ax-header {
35
35
  border-bottom-width: 1px;
36
- border-color: rgba(var(--ax-sys-border-color), var(--tw-border-opacity));
36
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface), var(--tw-border-opacity));
37
37
  padding: 1rem /* 16px */;
38
38
  font-size: 1rem /* 16px */;
39
39
  line-height: 1.5rem /* 24px */;
@@ -147,10 +147,10 @@
147
147
 
148
148
  &:focus-visible,
149
149
  &:hover {
150
- background-color: rgba(var(--ax-sys-color-surface-high));
150
+ background-color: rgba(var(--ax-sys-color-surface));
151
151
  }
152
152
  &.ax-state-focus {
153
- background-color: rgba(var(--ax-sys-color-surface-high));
153
+ background-color: rgba(var(--ax-sys-color-surface));
154
154
  }
155
155
  }
156
156
  }
@@ -2,7 +2,7 @@
2
2
  @include mixins.darkMode() {
3
3
  .ax-table {
4
4
  thead {
5
- background-color: rgba(var(--ax-sys-color-surface-high));
5
+ background-color: rgba(var(--ax-sys-color-surface));
6
6
  }
7
7
  }
8
8
  }
@@ -13,12 +13,12 @@
13
13
  overflow: hidden;
14
14
  border-radius: var(--ax-sys-border-radius);
15
15
  border-width: 1px;
16
- border-color: rgba(var(--ax-sys-border-color));
16
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface));
17
17
  font-size: 0.875rem /* 14px */;
18
18
  line-height: 1.25rem /* 20px */;
19
19
  td {
20
20
  border-bottom-width: 1px;
21
- border-color: rgba(var(--ax-sys-border-color));
21
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface));
22
22
  padding-left: 1rem /* 16px */;
23
23
  padding-right: 1rem /* 16px */;
24
24
  padding-top: 0.75rem /* 12px */;
@@ -26,8 +26,8 @@
26
26
  }
27
27
  thead {
28
28
  border-bottom-width: 1px;
29
- border-color: rgba(var(--ax-sys-border-color));
30
- background-color: rgba(var(--ax-sys-color-surface-high));
29
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface));
30
+ background-color: rgba(var(--ax-sys-color-surface));
31
31
 
32
32
  th {
33
33
  padding-left: 1rem /* 16px */;
@@ -43,7 +43,7 @@
43
43
  tbody {
44
44
  tr {
45
45
  &:nth-child(even) {
46
- background-color: rgba(var(--ax-sys-color-surface-high));
46
+ background-color: rgba(var(--ax-sys-color-surface));
47
47
  }
48
48
  }
49
49
  }
@@ -72,7 +72,7 @@
72
72
  td,
73
73
  th {
74
74
  border-width: 1px;
75
- border-color: rgba(var(--ax-sys-border-color));
75
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface));
76
76
 
77
77
  &:first-child {
78
78
  border-inline-start-width: 0px;
@@ -115,7 +115,7 @@
115
115
  }
116
116
  tr {
117
117
  border-width: 1px;
118
- border-color: rgba(var(--ax-sys-border-color));
118
+ border-color: rgba(var(--ax-sys-color-border-lightest-surface));
119
119
  }
120
120
  tr,
121
121
  tbody {
@@ -0,0 +1 @@
1
+ export * from './tailwind-class-generator';
@@ -0,0 +1,52 @@
1
+ export const createPalette = function (colorName) {
2
+ return {
3
+ DEFAULT: `rgba(var(--ax-sys-color-${colorName}-500), <alpha-value>)`,
4
+ default: `rgba(var(--ax-sys-color-${colorName}-500), <alpha-value>)`,
5
+ 50: `rgba(var(--ax-sys-color-${colorName}-50), <alpha-value>)`,
6
+ 100: `rgba(var(--ax-sys-color-${colorName}-100), <alpha-value>)`,
7
+ 200: `rgba(var(--ax-sys-color-${colorName}-200), <alpha-value>)`,
8
+ 300: `rgba(var(--ax-sys-color-${colorName}-300), <alpha-value>)`,
9
+ 400: `rgba(var(--ax-sys-color-${colorName}-400), <alpha-value>)`,
10
+ 500: `rgba(var(--ax-sys-color-${colorName}-500), <alpha-value>)`,
11
+ 600: `rgba(var(--ax-sys-color-${colorName}-600), <alpha-value>)`,
12
+ 700: `rgba(var(--ax-sys-color-${colorName}-700), <alpha-value>)`,
13
+ 800: `rgba(var(--ax-sys-color-${colorName}-800), <alpha-value>)`,
14
+ 900: `rgba(var(--ax-sys-color-${colorName}-900), <alpha-value>)`,
15
+ 950: `rgba(var(--ax-sys-color-${colorName}-950), <alpha-value>)`,
16
+ };
17
+ };
18
+ export const createSurfaces = function (colorName) {
19
+ return {
20
+ lightest: `rgba(var(--ax-sys-color-${colorName}-lightest-surface), <alpha-value>)`,
21
+ lighter: `rgba(var(--ax-sys-color-${colorName}-lighter-surface), <alpha-value>)`,
22
+ light: `rgba(var(--ax-sys-color-${colorName}-light-surface), <alpha-value>)`,
23
+ surface: `rgba(var(--ax-sys-color-${colorName}-surface), <alpha-value>)`,
24
+ dark: `rgba(var(--ax-sys-color-${colorName}-dark-surface), <alpha-value>)`,
25
+ darker: `rgba(var(--ax-sys-color-${colorName}-darker-surface), <alpha-value>)`,
26
+ darkest: `rgba(var(--ax-sys-color-${colorName}-darkest-surface), <alpha-value>)`,
27
+ on: `rgba(var(--ax-sys-color-on-${colorName}), <alpha-value>)`,
28
+ };
29
+ };
30
+ export const createOnSurfaces = function (colorName) {
31
+ return {
32
+ 'on-lightest': `rgba(var(--ax-sys-color-on-${colorName}-lightest-surface), <alpha-value>)`,
33
+ 'on-lighter': `rgba(var(--ax-sys-color-on-${colorName}-lighter-surface), <alpha-value>)`,
34
+ 'on-light': `rgba(var(--ax-sys-color-on-${colorName}-light-surface), <alpha-value>)`,
35
+ 'on-surface': `rgba(var(--ax-sys-color-on-${colorName}-surface), <alpha-value>)`,
36
+ 'on-dark': `rgba(var(--ax-sys-color-on-${colorName}-dark-surface), <alpha-value>)`,
37
+ 'on-darker': `rgba(var(--ax-sys-color-on-${colorName}-darker-surface), <alpha-value>)`,
38
+ 'on-darkest': `rgba(var(--ax-sys-color-on-${colorName}-darkest-surface), <alpha-value>)`,
39
+ 'on-contrast': `rgba(var(--ax-sys-color-on-contrast-${colorName}), <alpha-value>)`,
40
+ };
41
+ };
42
+ export const createBorderSurfaces = function (colorName) {
43
+ return {
44
+ lightest: `rgba(var(--ax-sys-color-border-${colorName}-lightest-surface), <alpha-value>)`,
45
+ lighter: `rgba(var(--ax-sys-color-border-${colorName}-lighter-surface), <alpha-value>)`,
46
+ light: `rgba(var(--ax-sys-color-border-${colorName}-light-surface), <alpha-value>)`,
47
+ surface: `rgba(var(--ax-sys-color-border-${colorName}-surface), <alpha-value>)`,
48
+ dark: `rgba(var(--ax-sys-color-border-${colorName}-dark-surface), <alpha-value>)`,
49
+ darker: `rgba(var(--ax-sys-color-border-${colorName}-darker-surface), <alpha-value>)`,
50
+ darkest: `rgba(var(--ax-sys-color-border-${colorName}-darkest-surface), <alpha-value>)`,
51
+ };
52
+ };
@@ -0,0 +1,32 @@
1
+ @mixin solid-look() {
2
+ --ax-comp-editor-bg-color: var(--ax-sys-color-lightest-surface);
3
+ --ax-comp-editor-border-width: 1px;
4
+ }
5
+ @mixin fill-look() {
6
+ --ax-comp-editor-box-outline-width: 2px;
7
+ --ax-comp-editor-border-width: 0px;
8
+
9
+ --ax-comp-editor-bg-color: var(--ax-sys-color-surface);
10
+ --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
11
+ --ax-comp-editor-border-color: var(--ax-sys-color-border-lighter-surface);
12
+ }
13
+ @mixin outline-look() {
14
+ --ax-comp-editor-bg-color: 0, 0, 0, 0;
15
+ --ax-comp-editor-border-width: 1px;
16
+ }
17
+ @mixin flat-look() {
18
+ --ax-comp-editor-border-width: 2px;
19
+ --ax-comp-editor-border-radius: 0px;
20
+ --ax-comp-editor-box-outline-width: 0px;
21
+ border-width: 0px !important;
22
+ border-bottom-width: var(--ax-comp-editor-border-width) !important;
23
+ }
24
+
25
+ @mixin none-look() {
26
+ --ax-comp-editor-border-radius: 0px;
27
+ --ax-comp-editor-box-outline-width: 0px;
28
+ --ax-comp-editor-border-width: 0px;
29
+ --ax-comp-editor-bg-color: 0, 0, 0, 0;
30
+ --ax-comp-editor-border-color: 0, 0, 0, 0;
31
+ --ax-comp-editor-text-color: var(--ax-sys-color-on-lighter-surface);
32
+ }
@@ -0,0 +1,39 @@
1
+ @mixin scroll-bar() {
2
+ :root,
3
+ * {
4
+ --ax-sys-scroller-size: 5px;
5
+
6
+ --ax-sys-scroller-size-radius: 3px;
7
+ --ax-sys-scroller-track-color: rgba(var(--ax-sys-color-light-surface));
8
+ --ax-sys-scroller-thumb-color: rgba(var(--ax-sys-color-darkest-surface));
9
+ }
10
+
11
+ .ax-dark,
12
+ .ax-dark * {
13
+ --ax-sys-scroller-size: 5px;
14
+ --ax-sys-scroller-size-radius: 3px;
15
+ --ax-sys-scroller-track-color: rgba(var(--ax-sys-color-darker-surface));
16
+ --ax-sys-scroller-thumb-color: rgba(var(--ax-sys-color-lightest-surface));
17
+ }
18
+
19
+ ::-webkit-scrollbar {
20
+ width: var(--ax-sys-scroller-size);
21
+ height: var(--ax-sys-scroller-size);
22
+ }
23
+
24
+ ::-webkit-scrollbar-track {
25
+ background: var(--ax-sys-scroller-track-color);
26
+ border-radius: var(--ax-sys-scroller-size-radius);
27
+ }
28
+
29
+ ::-webkit-scrollbar-thumb {
30
+ background: var(--ax-sys-scroller-thumb-color);
31
+ border-radius: var(--ax-sys-scroller-size-radius);
32
+ }
33
+ }
34
+ @-moz-document url-prefix() {
35
+ * {
36
+ // scrollbar-width: thin;
37
+ scrollbar-color: var(--ax-sys-scroller-thumb-color) var(--ax-sys-scroller-track-color);
38
+ }
39
+ }
package/mixins/index.scss CHANGED
@@ -1,2 +1,4 @@
1
1
  @forward './media';
2
2
  @forward './util';
3
+ @forward './editor-looks';
4
+ @forward './scroll-bar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/styles",
3
- "version": "19.10.0-next.9",
3
+ "version": "19.10.1",
4
4
  "main": "index.js",
5
5
  "author": "Ali Safari",
6
6
  "license": "ISC",
package/tailwind-base.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const plugin = require('tailwindcss/plugin');
2
2
  const { withAnimations } = require('animated-tailwindcss');
3
+ const { createBorderSurfaces, createOnSurfaces, createPalette, createSurfaces } = require('./generators/index');
3
4
 
4
5
  const childSelector = plugin(function ({ addVariant }) {
5
6
  addVariant('child', '& > *');
@@ -77,7 +78,7 @@ const UTILITY_CLASSES = {
77
78
  '.heading': {
78
79
  width: '100%',
79
80
  'border-bottom': '1px solid',
80
- 'border-color': 'rgba(var(--ax-sys-border-color))',
81
+ 'border-color': 'rgba(var(--ax-sys-color-border-lightest-surface))',
81
82
  'line-height': '0.1em',
82
83
  margin: '1rem auto',
83
84
  },
@@ -95,14 +96,14 @@ const UTILITY_CLASSES = {
95
96
  'text-align': 'end',
96
97
  },
97
98
  '.links': {
98
- color: 'rgba(var(--ax-sys-color-primary-500))',
99
+ color: 'rgba(var(--ax-sys-color-primary-surface))',
99
100
  cursor: 'pointer',
100
101
  },
101
102
  '.links:hover': {
102
103
  'text-decoration': 'underline',
103
104
  },
104
105
  '.links:visited': {
105
- color: 'rgba(var(--ax-sys-color-primary-700))',
106
+ color: 'rgba(var(--ax-sys-color-primary-darker))',
106
107
  },
107
108
  '.animate-slow': {
108
109
  animationDuration: '2s',
@@ -123,81 +124,66 @@ const UTILITY_CLASSES = {
123
124
  animationDuration: '250ms',
124
125
  },
125
126
  '.card': {
126
- backgroundColor: 'rgb(var(--ax-color-surface))',
127
+ backgroundColor: 'rgb(var(--ax-sys-color-surface))',
127
128
  border: '1px solid',
128
- borderColor: 'rgb(var(--ax-sys-border-color))',
129
+ borderColor: 'rgb(var(--ax-sys-color-border-lightest-surface))',
129
130
  borderRadius: 'var(--ax-sys-border-radius)',
130
131
  },
131
132
  '.tabs-fit': {
132
133
  width: '100%',
133
134
  },
134
135
  '.xs': {
135
- '--ax-sys-size-base': '2rem',
136
+ '--ax-sys-size-base': '1.5rem',
136
137
  },
137
138
  '.sm': {
138
- '--ax-sys-size-base': '2.25rem',
139
+ '--ax-sys-size-base': '2rem',
139
140
  },
140
141
  '.md': {
141
142
  '--ax-sys-size-base': '2.5rem',
142
143
  },
143
144
  '.lg': {
144
- '--ax-sys-size-base': '3rem',
145
+ '--ax-sys-size-base': '3.375rem',
145
146
  },
146
147
  '.xl': {
147
- '--ax-sys-size-base': '3.5rem',
148
+ '--ax-sys-size-base': '4rem',
149
+ },
150
+ '.surface': {
151
+ backgroundColor: 'rgb(var(--ax-sys-color-surface))',
152
+ color: 'rgb(var(--ax-sys-color-on-surface))',
153
+ borderColor: 'rgb(var(--ax-sys-color-border-surface))',
154
+ },
155
+ '.lightest-surface': {
156
+ backgroundColor: 'rgb(var(--ax-sys-color-lightest-surface))',
157
+ color: 'rgb(var(--ax-sys-color-on-lightest-surface))',
158
+ borderColor: 'rgb(var(--ax-sys-color-border-lightest-surface))',
159
+ },
160
+ '.lighter-surface': {
161
+ backgroundColor: 'rgb(var(--ax-sys-color-lighter-surface))',
162
+ color: 'rgb(var(--ax-sys-color-on-lighter-surface))',
163
+ borderColor: 'rgb(var(--ax-sys-color-border-lighter-surface))',
164
+ },
165
+ '.light-surface': {
166
+ backgroundColor: 'rgb(var(--ax-sys-color-light-surface))',
167
+ color: 'rgb(var(--ax-sys-color-on-light-surface))',
168
+ borderColor: 'rgb(var(--ax-sys-color-border-light-surface))',
169
+ },
170
+ '.dark-surface': {
171
+ backgroundColor: 'rgb(var(--ax-sys-color-dark-surface))',
172
+ color: 'rgb(var(--ax-sys-color-on-dark-surface))',
173
+ borderColor: 'rgb(var(--ax-sys-color-border-dark-surface))',
174
+ },
175
+ '.darker-surface': {
176
+ backgroundColor: 'rgb(var(--ax-sys-color-darker-surface))',
177
+ color: 'rgb(var(--ax-sys-color-on-darker-surface))',
178
+ borderColor: 'rgb(var(--ax-sys-color-border-darker-surface))',
179
+ },
180
+ '.darkest-surface': {
181
+ backgroundColor: 'rgb(var(--ax-sys-color-darkest-surface))',
182
+ color: 'rgb(var(--ax-sys-color-on-darkest-surface))',
183
+ borderColor: 'rgb(var(--ax-sys-color-border-darkest-surface))',
148
184
  },
149
- };
150
- const createPalete = function (colorName) {
151
- return {
152
- 50: `rgba(var(--ax-sys-color-${colorName}-50), <alpha-value>)`,
153
- 100: `rgba(var(--ax-sys-color-${colorName}-100), <alpha-value>)`,
154
- 200: `rgba(var(--ax-sys-color-${colorName}-200), <alpha-value>)`,
155
- 300: `rgba(var(--ax-sys-color-${colorName}-300), <alpha-value>)`,
156
- 400: `rgba(var(--ax-sys-color-${colorName}-400), <alpha-value>)`,
157
- 500: `rgba(var(--ax-sys-color-${colorName}-500), <alpha-value>)`,
158
- 600: `rgba(var(--ax-sys-color-${colorName}-600), <alpha-value>)`,
159
- 700: `rgba(var(--ax-sys-color-${colorName}-700), <alpha-value>)`,
160
- 800: `rgba(var(--ax-sys-color-${colorName}-800), <alpha-value>)`,
161
- 900: `rgba(var(--ax-sys-color-${colorName}-900), <alpha-value>)`,
162
- 950: `rgba(var(--ax-sys-color-${colorName}-950), <alpha-value>)`,
163
- };
164
- };
165
- const createBackgroundPalete = function (colorName) {
166
- return {
167
- lightest: `rgba(var(--ax-sys-color-${colorName}-lightest-surface), <alpha-value>)`,
168
- lighter: `rgba(var(--ax-sys-color-${colorName}-lighter-surface), <alpha-value>)`,
169
- light: `rgba(var(--ax-sys-color-${colorName}-light-surface), <alpha-value>)`,
170
- surface: `rgba(var(--ax-sys-color-${colorName}-surface), <alpha-value>)`,
171
- dark: `rgba(var(--ax-sys-color-${colorName}-dark-surface), <alpha-value>)`,
172
- darker: `rgba(var(--ax-sys-color-${colorName}-darker-surface), <alpha-value>)`,
173
- darkest: `rgba(var(--ax-sys-color-${colorName}-darkest-surface), <alpha-value>)`,
174
- on: `rgba(var(--ax-sys-color-on-${colorName}), <alpha-value>)`,
175
- };
176
185
  };
177
186
 
178
- const createOnPalete = function (colorName) {
179
- return {
180
- 'on-lightest': `rgba(var(--ax-sys-color-on-${colorName}-lightest-surface), <alpha-value>)`,
181
- 'on-lighter': `rgba(var(--ax-sys-color-on-${colorName}-lighter-surface), <alpha-value>)`,
182
- 'on-light': `rgba(var(--ax-sys-color-on-${colorName}-light-surface), <alpha-value>)`,
183
- 'on-surface': `rgba(var(--ax-sys-color-on-${colorName}-surface), <alpha-value>)`,
184
- 'on-dark': `rgba(var(--ax-sys-color-on-${colorName}-dark-surface), <alpha-value>)`,
185
- 'on-darker': `rgba(var(--ax-sys-color-on-${colorName}-darker-surface), <alpha-value>)`,
186
- 'on-darkest': `rgba(var(--ax-sys-color-on-${colorName}-darkest-surface), <alpha-value>)`,
187
- 'on-contrast': `rgba(var(--ax-sys-color-on-contrast-${colorName}), <alpha-value>)`,
188
- };
189
- };
190
- const createBorderPalete = function (colorName) {
191
- return {
192
- lightest: `rgba(var(--ax-sys-color-border-${colorName}-lightest-surface), <alpha-value>)`,
193
- lighter: `rgba(var(--ax-sys-color-border-${colorName}-lighter-surface), <alpha-value>)`,
194
- light: `rgba(var(--ax-sys-color-border-${colorName}-light-surface), <alpha-value>)`,
195
- surface: `rgba(var(--ax-sys-color-border-${colorName}-surface), <alpha-value>)`,
196
- dark: `rgba(var(--ax-sys-color-border-${colorName}-dark-surface), <alpha-value>)`,
197
- darker: `rgba(var(--ax-sys-color-border-${colorName}-darker-surface), <alpha-value>)`,
198
- darkest: `rgba(var(--ax-sys-color-border-${colorName}-darkest-surface), <alpha-value>)`,
199
- };
200
- };
201
187
  module.exports = withAnimations({
202
188
  prefix: 'ax-',
203
189
  content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
@@ -215,45 +201,41 @@ module.exports = withAnimations({
215
201
  colors: {
216
202
  ...SURFACE_BG,
217
203
  ...SURFACES_ON,
218
- primary: createPalete('primary'),
219
- secondary: createPalete('secondary'),
220
- success: createPalete('success'),
221
- danger: createPalete('danger'),
222
- warning: createPalete('warning'),
223
- ghost: createPalete('ghost'),
204
+ primary: createPalette('primary'),
205
+ secondary: createPalette('secondary'),
206
+ success: createPalette('success'),
207
+ danger: createPalette('danger'),
208
+ warning: createPalette('warning'),
224
209
  },
225
210
  textColor: {
226
211
  DEFAULT: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
227
212
  default: 'rgba(var(--ax-sys-color-on-lightest-surface), <alpha-value>)',
228
- primary: createOnPalete('primary'),
229
- secondary: createOnPalete('secondary'),
230
- success: createOnPalete('success'),
231
- danger: createOnPalete('danger'),
232
- warning: createOnPalete('warning'),
233
- ghost: createOnPalete('ghost'),
213
+ primary: createOnSurfaces('primary'),
214
+ secondary: createOnSurfaces('secondary'),
215
+ success: createOnSurfaces('success'),
216
+ danger: createOnSurfaces('danger'),
217
+ warning: createOnSurfaces('warning'),
234
218
  ...SURFACES_ON,
235
219
  },
236
220
  backgroundColor: {
237
221
  DEFAULT: 'rgba(var(--ax-sys-color-lightest-surface), <alpha-value>)',
238
222
  default: 'rgba(var(--ax-sys-color-lightest-surface), <alpha-value>)',
239
- primary: createBackgroundPalete('primary'),
240
- secondary: createBackgroundPalete('secondary'),
241
- success: createBackgroundPalete('success'),
242
- danger: createBackgroundPalete('danger'),
243
- warning: createBackgroundPalete('warning'),
244
- ghost: createBackgroundPalete('ghost'),
223
+ primary: createSurfaces('primary'),
224
+ secondary: createSurfaces('secondary'),
225
+ success: createSurfaces('success'),
226
+ danger: createSurfaces('danger'),
227
+ warning: createSurfaces('warning'),
245
228
  ...SURFACE_BG,
246
229
  ...SURFACES_ON,
247
230
  },
248
231
  borderColor: {
249
232
  DEFAULT: 'rgba(var(--ax-sys-color-border-lightest-surface), <alpha-value>)',
250
233
  default: 'rgba(var(--ax-sys-color-border-lightest-surface), <alpha-value>)',
251
- primary: createBorderPalete('primary'),
252
- secondary: createBorderPalete('secondary'),
253
- success: createBorderPalete('success'),
254
- danger: createBorderPalete('danger'),
255
- warning: createBorderPalete('warning'),
256
- ghost: createBorderPalete('ghost'),
234
+ primary: createBorderSurfaces('primary'),
235
+ secondary: createBorderSurfaces('secondary'),
236
+ success: createBorderSurfaces('success'),
237
+ danger: createBorderSurfaces('danger'),
238
+ warning: createBorderSurfaces('warning'),
257
239
  ...SURFACE_BORDER,
258
240
  },
259
241
  maxWidth: {
@@ -1,41 +1,54 @@
1
- @use '../utils/index.scss' as *;
1
+ @use '../utils/index.scss' as utils; // import ACoreX utilities for using generate-pallete-variables function
2
2
 
3
+ /*
4
+ Color themes that have multiple fixed primary colors, etc. that can range from 50 to 950, also generate 7 surfaces of these colors by default that are used to color components. If these colors have the same value, they are used for light mode and dark mode, but if you give the color key two colors, it uses the first color for light mode and the second color for dark mode. For example, you can see the color Danger
5
+ */
3
6
  $theme-colors: (
4
7
  'primary': oklch(0.623 0.214 259.815),
5
8
  'secondary': oklch(0.554 0.046 257.417),
6
9
  'success': oklch(0.696 0.17 162.48),
7
10
  'warning': oklch(0.769 0.188 70.08),
8
11
  'danger': (
12
+ // Danger color for light mode
9
13
  oklch(0.645 0.246 16.439),
14
+ // Danger color for dark mode
10
15
  oklch(0.712 0.194 13.428),
11
16
  ),
12
17
  );
13
18
 
19
+ /*
20
+ Surface colors for creating layouts, each color has a start and an end,
21
+ which we use to create the color spectrum of surfaces.
22
+ The colors are different for dark and light mode.
23
+ */
14
24
  $theme-surfaces: (
25
+ // Surfaces for light mode
15
26
  'light-start': #ffffff,
16
27
  'light-end': #d4d4d4,
28
+
29
+ // Surfaces for dark mode
17
30
  'dark-start': #27272a,
18
- 'dark-end': #09090b,
31
+ 'dark-end': #09090b
19
32
  );
20
33
 
21
34
  $options: (
22
35
  'color-range': true,
36
+ // Color range production 50 to 950, if you don't need them you can put false
23
37
  'light': #ffffff,
24
- 'dark': #09090b,
38
+ // White is always a fixed color in the project, used in some special cases and does not change in light mode and dark mode.
39
+ 'dark': #09090b, // // dark is always a fixed color in the project, used in some special cases and does not change in light mode and dark mode.
25
40
  );
26
41
 
42
+ /*
43
+ Importing default variables and overriding them with higher values
44
+ */
27
45
  @forward '../variables/index.scss';
28
46
 
29
47
  :root,
30
48
  .ax-light {
31
- --ax-sys-body-font-size: 1rem;
32
- --ax-sys-size-base: 2.5rem;
33
- --ax-sys-border-radius: 0.5rem;
34
- --ax-sys-color-body-text: 0, 0, 0;
35
- --ax-sys-color-input-text: 0, 0, 0;
36
-
37
- // --ax-sys-body-bg-color: var(--ax-sys-color-surface-lowest);
38
- // --ax-sys-body-text-color: var(--ax-sys-color-surface-lowest-border);
49
+ --ax-sys-body-font-size: 1rem; // Body font size
50
+ --ax-sys-size-base: 2.5rem; // Variable height of elements, such as inputs and buttons
51
+ --ax-sys-border-radius: 0.5rem; // Default roundness value for corners
39
52
  }
40
53
 
41
- @include generate-pallete-variables($theme-colors, $theme-surfaces, $options);
54
+ @include utils.generate-pallete-variables($theme-colors, $theme-surfaces, $options);
@@ -5,43 +5,6 @@
5
5
  @use 'sass:map';
6
6
  @use 'sass:list';
7
7
 
8
- @function generate-ghost-colors($primary, $impact-rate, $is-dark: false) {
9
- @if $is-dark {
10
- @return (
11
- ax-sys-color-ghost-950: color.mix(white, $primary, (1 - $impact-rate) * 30%),
12
- ax-sys-color-ghost-900: color.mix(white, $primary, (1 - $impact-rate) * 10%),
13
- ax-sys-color-ghost-800: color.mix(white, $primary, (1 - $impact-rate) * 20%),
14
- ax-sys-color-ghost-700: color.mix(white, $primary, (1 - $impact-rate) * 30%),
15
- ax-sys-color-ghost-600: color.mix(white, $primary, (1 - $impact-rate) * 45%),
16
- ax-sys-color-ghost-500: color.mix(white, $primary, (1 - $impact-rate) * 60%),
17
- ax-sys-color-ghost-400: color.mix(white, $primary, (1 - $impact-rate) * 75%),
18
- ax-sys-color-ghost-300: color.mix(white, $primary, (1 - $impact-rate) * 85%),
19
- ax-sys-color-ghost-200: color.mix(white, $primary, (1 - $impact-rate) * 92%),
20
- ax-sys-color-ghost-100: color.mix(white, $primary, (1 - $impact-rate) * 96%),
21
- ax-sys-color-ghost-50: color.mix(white, $primary, (1 - $impact-rate) * 70%),
22
- ax-sys-color-on-ghost: color.mix(black, $primary, $impact-rate * 8%),
23
- //ax-sys-color-on-contrast-ghost: color.mix(white, $primary, (1 - $impact-rate) * 95%),
24
- ax-sys-color-on-contrast-ghost: color.mix(black, $primary, $impact-rate * 8%)
25
- );
26
- } @else {
27
- @return (
28
- ax-sys-color-ghost-50: color.mix(white, $primary, (1 - $impact-rate) * 99%),
29
- ax-sys-color-ghost-100: color.mix(white, $primary, (1 - $impact-rate) * 96%),
30
- ax-sys-color-ghost-200: color.mix(white, $primary, (1 - $impact-rate) * 92%),
31
- ax-sys-color-ghost-300: color.mix(white, $primary, (1 - $impact-rate) * 85%),
32
- ax-sys-color-ghost-400: color.mix(white, $primary, (1 - $impact-rate) * 75%),
33
- ax-sys-color-ghost-500: color.mix(white, $primary, (1 - $impact-rate) * 60%),
34
- ax-sys-color-ghost-600: color.mix(white, $primary, (1 - $impact-rate) * 45%),
35
- ax-sys-color-ghost-700: color.mix(white, $primary, (1 - $impact-rate) * 30%),
36
- ax-sys-color-ghost-800: color.mix(white, $primary, (1 - $impact-rate) * 20%),
37
- ax-sys-color-ghost-900: color.mix(white, $primary, (1 - $impact-rate) * 10%),
38
- ax-sys-color-ghost-950: color.mix(white, $primary, (1 - $impact-rate) * 5%),
39
- ax-sys-color-on-ghost: color.mix(white, $primary, (1 - $impact-rate) * 95%),
40
- ax-sys-color-on-contrast-ghost: color.mix(black, $primary, $impact-rate * 8%)
41
- );
42
- }
43
- }
44
-
45
8
  @function generate-surfaces-colors-variables($surfaces, $options) {
46
9
  $light-color: if(map.has-key($options, 'light'), map.get($options, 'light'), #f0f0f0);
47
10
  $neutral-color: if(map.has-key($options, 'neutral'), map.get($options, 'neutral'), #808080);
package/utils/_utils.scss CHANGED
@@ -265,19 +265,11 @@
265
265
  @each $shade, $color in $palette {
266
266
  $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
267
267
  }
268
- $colors: map.merge(
269
- $colors,
270
- (ax-sys-color-on-#{$name}: contrast-text(map.get($palette, 500), true), ax-sys-color-on-contrast-#{$name}: contrast-text(map.get($palette, 200), true))
271
- );
272
268
  } @else {
273
269
  $palette: light-palette-generator($color);
274
270
  @each $shade, $color in $palette {
275
271
  $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
276
272
  }
277
- $colors: map.merge(
278
- $colors,
279
- (ax-sys-color-on-#{$name}: contrast-text(map.get($palette, 500), false), ax-sys-color-on-contrast-#{$name}: contrast-text(map.get($palette, 200), false))
280
- );
281
273
  }
282
274
 
283
275
  @return $colors;