@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/styles",
3
- "version": "19.15.0-next.9",
3
+ "version": "20.0.1",
4
4
  "main": "index.js",
5
5
  "author": "Ali Safari",
6
6
  "license": "ISC",
package/tailwind-base.js CHANGED
@@ -293,9 +293,6 @@ module.exports = withAnimations({
293
293
  width: {
294
294
  default: 'var(--ax-sys-size-base)',
295
295
  },
296
- maxHeight: {
297
- default: 'var(--ax-sys-size-base)',
298
- },
299
296
  minHeight: {
300
297
  default: 'var(--ax-sys-size-base)',
301
298
  },
@@ -18,6 +18,7 @@ $theme-colors: (
18
18
  oklch(0.645 0.246 16.439),
19
19
  oklch(0.712 0.194 13.428),
20
20
  ),
21
+ 'accent1': #f00,
21
22
  );
22
23
 
23
24
  /*
@@ -184,18 +184,22 @@
184
184
  @if $generate-color-range {
185
185
  /* Ranges */
186
186
  @each $name, $color in $colors {
187
- @if (meta.type-of($color) == list) {
188
- $color: list.nth($color, 1);
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 (meta.type-of($color) == list) {
196
- $color: list.nth($color, 1);
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 (meta.type-of($color) == list) {
217
- $color: list.nth($color, 2);
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 (meta.type-of($color) == list) {
225
- $color: list.nth($color, 2);
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
- @each $name, $shade in $shades {
197
- $l: null;
198
- @if (meta.type-of($shade) == number) {
199
- @if ($shade <= 500) {
200
- $l: math.div((-$shade + $shade * $lightness + 500), 500);
201
- } @else {
202
- $l: (1 - math.div(($shade - 500), 500)) * ($lightness - 0.3) + 0.3;
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
- $palette: map.set($palette, $name, $l);
205
- }
206
- $oklch-color: oklch((map.get($palette, $name) * 100%) $chroma $hue);
207
- $gamut-oklch: color.to-gamut($oklch-color, $space: rgb, $method: local-minde);
208
- @if ($name==950) {
209
- $gamut-oklch: color.scale($gamut-oklch, $chroma: -50%, $space: oklch);
210
- }
211
- @if ($name==900) {
212
- $gamut-oklch: color.scale($gamut-oklch, $chroma: -33%, $space: oklch);
213
- }
214
- @if ($name==800) {
215
- $gamut-oklch: color.scale($gamut-oklch, $chroma: -8%, $space: oklch);
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
- @if $is-dark {
264
- $palette: dark-palette-generator($color);
265
- @each $shade, $color in $palette {
266
- $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
267
- }
268
- } @else {
269
- $palette: light-palette-generator($color);
270
- @each $shade, $color in $palette {
271
- $colors: map.merge($colors, (ax-sys-color-#{$name}-#{$shade}: $color));
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
  }
@@ -4,4 +4,11 @@ $theme-colors: (
4
4
  'success': #22c55e,
5
5
  'warning': #f59e0b,
6
6
  'danger': #f43f5e,
7
+ 'accent1': null,
8
+ 'accent2': null,
9
+ 'accent3': null,
10
+ 'accent4': null,
11
+ 'accent5': null,
12
+ 'accnt6': null,
13
+ 'accent7': null,
7
14
  ) !default;