@acorex/styles 19.15.0-next.9 → 20.0.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.
- package/mixins/_scroll-bar.scss +1 -1
- package/package.json +1 -1
- package/tailwind-base.js +0 -3
- package/themes/default.scss +1 -0
- package/utils/_theme-generator.scss +20 -12
- package/utils/_utils.scss +33 -31
- package/variables/_colors.scss +7 -0
package/mixins/_scroll-bar.scss
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
:root,
|
3
3
|
* {
|
4
4
|
--ax-sys-scroller-size: 5px;
|
5
|
-
|
6
5
|
--ax-sys-scroller-size-radius: 3px;
|
7
6
|
--ax-sys-scroller-track-color: rgba(var(--ax-sys-color-light-surface));
|
8
7
|
--ax-sys-scroller-thumb-color: rgba(var(--ax-sys-color-darkest-surface));
|
8
|
+
// scrollbar-width: thin;
|
9
9
|
}
|
10
10
|
|
11
11
|
.ax-dark,
|
package/package.json
CHANGED
package/tailwind-base.js
CHANGED
package/themes/default.scss
CHANGED
@@ -184,18 +184,22 @@
|
|
184
184
|
@if $generate-color-range {
|
185
185
|
/* Ranges */
|
186
186
|
@each $name, $color in $colors {
|
187
|
-
@if
|
188
|
-
|
187
|
+
@if $color != null {
|
188
|
+
@if (meta.type-of($color) == list) {
|
189
|
+
$color: list.nth($color, 1);
|
190
|
+
}
|
191
|
+
@include convert-to-rgb(generate-color-ranges-variables($name, $color, false));
|
189
192
|
}
|
190
|
-
@include convert-to-rgb(generate-color-ranges-variables($name, $color, false));
|
191
193
|
}
|
192
194
|
}
|
193
195
|
// Generate Colored Surfaces
|
194
196
|
@each $name, $color in $colors {
|
195
|
-
@if
|
196
|
-
|
197
|
+
@if $color != null {
|
198
|
+
@if (meta.type-of($color) == list) {
|
199
|
+
$color: list.nth($color, 1);
|
200
|
+
}
|
201
|
+
@include convert-to-rgb(generate-named-surfaces-variables($name, $color, false));
|
197
202
|
}
|
198
|
-
@include convert-to-rgb(generate-named-surfaces-variables($name, $color, false));
|
199
203
|
}
|
200
204
|
}
|
201
205
|
|
@@ -213,18 +217,22 @@
|
|
213
217
|
@if $generate-color-range {
|
214
218
|
/* Ranges */
|
215
219
|
@each $name, $color in $colors {
|
216
|
-
@if
|
217
|
-
|
220
|
+
@if $color != null {
|
221
|
+
@if (meta.type-of($color) == list) {
|
222
|
+
$color: list.nth($color, 2);
|
223
|
+
}
|
224
|
+
@include convert-to-rgb(generate-color-ranges-variables($name, $color, true));
|
218
225
|
}
|
219
|
-
@include convert-to-rgb(generate-color-ranges-variables($name, $color, true));
|
220
226
|
}
|
221
227
|
}
|
222
228
|
// Generate Colored Surfaces
|
223
229
|
@each $name, $color in $colors {
|
224
|
-
@if
|
225
|
-
|
230
|
+
@if $color != null {
|
231
|
+
@if (meta.type-of($color) == list) {
|
232
|
+
$color: list.nth($color, 2);
|
233
|
+
}
|
234
|
+
@include convert-to-rgb(generate-named-surfaces-variables($name, $color, true));
|
226
235
|
}
|
227
|
-
@include convert-to-rgb(generate-named-surfaces-variables($name, $color, true));
|
228
236
|
}
|
229
237
|
}
|
230
238
|
}
|
package/utils/_utils.scss
CHANGED
@@ -193,28 +193,30 @@
|
|
193
193
|
$chroma: color.channel($color, 'chroma', $space: oklch);
|
194
194
|
$lightness: color.channel($color, 'lightness', $space: oklch);
|
195
195
|
$lightness: math.div($lightness, 100%);
|
196
|
-
@
|
197
|
-
$
|
198
|
-
|
199
|
-
@if ($shade
|
200
|
-
|
201
|
-
|
202
|
-
|
196
|
+
@if ($color) {
|
197
|
+
@each $name, $shade in $shades {
|
198
|
+
$l: null;
|
199
|
+
@if (meta.type-of($shade) == number) {
|
200
|
+
@if ($shade <= 500) {
|
201
|
+
$l: math.div((-$shade + $shade * $lightness + 500), 500);
|
202
|
+
} @else {
|
203
|
+
$l: (1 - math.div(($shade - 500), 500)) * ($lightness - 0.3) + 0.3;
|
204
|
+
}
|
205
|
+
$palette: map.set($palette, $name, $l);
|
203
206
|
}
|
204
|
-
$
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
$
|
207
|
+
$oklch-color: oklch((map.get($palette, $name) * 100%) $chroma $hue);
|
208
|
+
$gamut-oklch: color.to-gamut($oklch-color, $space: rgb, $method: local-minde);
|
209
|
+
@if ($name==950) {
|
210
|
+
$gamut-oklch: color.scale($gamut-oklch, $chroma: -50%, $space: oklch);
|
211
|
+
}
|
212
|
+
@if ($name==900) {
|
213
|
+
$gamut-oklch: color.scale($gamut-oklch, $chroma: -33%, $space: oklch);
|
214
|
+
}
|
215
|
+
@if ($name==800) {
|
216
|
+
$gamut-oklch: color.scale($gamut-oklch, $chroma: -8%, $space: oklch);
|
217
|
+
}
|
218
|
+
$palette: map.set($palette, $name, $gamut-oklch);
|
216
219
|
}
|
217
|
-
$palette: map.set($palette, $name, $gamut-oklch);
|
218
220
|
}
|
219
221
|
@return $palette;
|
220
222
|
}
|
@@ -259,18 +261,18 @@
|
|
259
261
|
$colors: ();
|
260
262
|
$light-shades: (50, 100, 200, 300, 400);
|
261
263
|
$dark-shades: (600, 700, 800, 900, 950);
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
264
|
+
@if ($color) {
|
265
|
+
@if $is-dark {
|
266
|
+
$palette: dark-palette-generator($color);
|
267
|
+
@each $shade, $color in $palette {
|
268
|
+
$colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
|
269
|
+
}
|
270
|
+
} @else {
|
271
|
+
$palette: light-palette-generator($color);
|
272
|
+
@each $shade, $color in $palette {
|
273
|
+
$colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
|
274
|
+
}
|
272
275
|
}
|
273
276
|
}
|
274
|
-
|
275
277
|
@return $colors;
|
276
278
|
}
|
package/variables/_colors.scss
CHANGED