@acorex/styles 21.0.0-next.66 → 21.0.0-next.67
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/components/{_action-item.scss → _action-item.css} +12 -37
- package/components/{_actionsheet.scss → _actionsheet.css} +13 -9
- package/components/{_check-box.scss → _check-box.css} +8 -24
- package/components/{_drop-down.scss → _drop-down.css} +18 -17
- package/components/_editor-container copy.css +267 -0
- package/components/_editor-container.css +82 -0
- package/components/_general-button.css +62 -0
- package/components/{_list.scss → _list.css} +25 -56
- package/components/_radio.css +33 -0
- package/components/{_ripple.scss → _ripple.css} +8 -8
- package/components/{_table.scss → _table.css} +20 -23
- package/components/{_uploader.scss → _uploader.css} +1 -20
- package/components/index.css +11 -0
- package/icons/fontawesome/_variables.css +229 -0
- package/icons/fontawesome/index.css +557 -0
- package/icons/huge/huge-bulk/_variables.css +211 -0
- package/icons/huge/huge-bulk/index.css +522 -0
- package/icons/huge/huge-duotone/_variables.css +211 -0
- package/icons/huge/huge-duotone/index.css +519 -0
- package/icons/huge/huge-solid-rounded/_variables.css +211 -0
- package/icons/huge/huge-solid-rounded/index.css +519 -0
- package/icons/huge/huge-solid-sharp/_variables.css +213 -0
- package/icons/huge/huge-solid-sharp/index.css +519 -0
- package/icons/huge/huge-solid-standard/_variables.css +211 -0
- package/icons/huge/huge-solid-standard/index.css +518 -0
- package/icons/huge/huge-stroke-rounded/_variables.css +211 -0
- package/icons/huge/huge-stroke-rounded/index.css +517 -0
- package/icons/huge/huge-stroke-sharp/_variables.css +142 -0
- package/icons/huge/huge-stroke-sharp/index.css +517 -0
- package/icons/huge/huge-stroke-standard/_variables.css +141 -0
- package/icons/huge/huge-stroke-standard/index.css +517 -0
- package/icons/huge/huge-twotone/_variables.css +211 -0
- package/icons/huge/huge-twotone/index.css +518 -0
- package/icons/material/_variables.css +229 -0
- package/icons/material/index.css +575 -0
- package/index.css +2 -0
- package/package.json +7 -4
- package/tailwind-base.js +0 -4
- package/themes/default.css +3067 -0
- package/base/_preflight.scss +0 -421
- package/base/index.scss +0 -15
- package/components/_editor-container.scss +0 -293
- package/components/_general-button.scss +0 -75
- package/components/_radio.scss +0 -51
- package/components/index.scss +0 -11
- package/generators/index.js +0 -1
- package/generators/tailwind-class-generator.js +0 -68
- package/icons/fontawesome/_variables.scss +0 -227
- package/icons/fontawesome/index.scss +0 -714
- package/icons/huge/huge-bulk/_variables.scss +0 -209
- package/icons/huge/huge-bulk/index.scss +0 -656
- package/icons/huge/huge-duotone/_variables.scss +0 -209
- package/icons/huge/huge-duotone/index.scss +0 -657
- package/icons/huge/huge-solid-rounded/_variables.scss +0 -209
- package/icons/huge/huge-solid-rounded/index.scss +0 -643
- package/icons/huge/huge-solid-sharp/_variables.scss +0 -209
- package/icons/huge/huge-solid-sharp/index.scss +0 -656
- package/icons/huge/huge-solid-standard/_variables.scss +0 -209
- package/icons/huge/huge-solid-standard/index.scss +0 -656
- package/icons/huge/huge-stroke-rounded/_variables.scss +0 -209
- package/icons/huge/huge-stroke-rounded/index.scss +0 -656
- package/icons/huge/huge-stroke-sharp/_variables.scss +0 -209
- package/icons/huge/huge-stroke-sharp/index.scss +0 -656
- package/icons/huge/huge-stroke-standard/_variables.scss +0 -209
- package/icons/huge/huge-stroke-standard/index.scss +0 -656
- package/icons/huge/huge-twotone/_variables.scss +0 -209
- package/icons/huge/huge-twotone/index.scss +0 -656
- package/icons/material/_variables.scss +0 -227
- package/icons/material/index.scss +0 -718
- package/index.scss +0 -7
- package/mixins/_editor-looks.scss +0 -32
- package/mixins/_media.scss +0 -73
- package/mixins/_scroll-bar.scss +0 -35
- package/mixins/_util.scss +0 -19
- package/mixins/index.scss +0 -4
- package/themes/default.scss +0 -74
- package/utils/_theme-generator.scss +0 -238
- package/utils/_utils.scss +0 -278
- package/utils/index.scss +0 -2
- package/variables/_colors.scss +0 -14
- package/variables/_looks.scss +0 -1
- package/variables/index.scss +0 -2
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}
|
package/mixins/_media.scss
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
@mixin media($media) {
|
|
2
|
-
// phone -> xs
|
|
3
|
-
@if $media == 'xs' {
|
|
4
|
-
@media (min-width: 320px) and (max-width: 640px) {
|
|
5
|
-
@content;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// tablet -> md
|
|
10
|
-
@if $media == 'md' {
|
|
11
|
-
@media (min-width: 768px) {
|
|
12
|
-
@content;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// tablet-landscape -> lg
|
|
17
|
-
@if $media == 'lg' {
|
|
18
|
-
@media (min-width: 1024px) {
|
|
19
|
-
@content;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// desktop -> xl
|
|
24
|
-
@if $media == 'xl' {
|
|
25
|
-
@media (min-width: 1280px) {
|
|
26
|
-
@content;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// desktop-large -> 2xl
|
|
31
|
-
@if $media == '2xl' {
|
|
32
|
-
@media (min-width: 1536px) {
|
|
33
|
-
@content;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@mixin mediaLessThan($media) {
|
|
39
|
-
// phone -> xs
|
|
40
|
-
@if $media == 'xs' {
|
|
41
|
-
@media screen and (max-width: 640px) {
|
|
42
|
-
@content;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// tablet -> md
|
|
47
|
-
@if $media == 'md' {
|
|
48
|
-
@media screen and (max-width: 768px) {
|
|
49
|
-
@content;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// tablet-landscape -> lg
|
|
54
|
-
@if $media == 'lg' {
|
|
55
|
-
@media screen and (max-width: 1024px) {
|
|
56
|
-
@content;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// desktop -> xl
|
|
61
|
-
@if $media == 'xl' {
|
|
62
|
-
@media screen and (max-width: 1280px) {
|
|
63
|
-
@content;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// desktop-large -> 2xl
|
|
68
|
-
@if $media == '2xl' {
|
|
69
|
-
@media screen and (max-width: 1536px) {
|
|
70
|
-
@content;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
package/mixins/_scroll-bar.scss
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@mixin scroll-bar() {
|
|
2
|
-
:root,
|
|
3
|
-
* {
|
|
4
|
-
--ax-sys-scroller-size: 5px;
|
|
5
|
-
--ax-sys-scroller-size-radius: 3px;
|
|
6
|
-
--ax-sys-scroller-track-color: rgba(var(--ax-sys-color-light-surface));
|
|
7
|
-
--ax-sys-scroller-thumb-color: rgba(var(--ax-sys-color-darkest-surface));
|
|
8
|
-
scrollbar-width: thin;
|
|
9
|
-
scrollbar-color: var(--ax-sys-scroller-thumb-color) var(--ax-sys-scroller-track-color);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ax-dark,
|
|
13
|
-
.ax-dark * {
|
|
14
|
-
--ax-sys-scroller-size: 5px;
|
|
15
|
-
--ax-sys-scroller-size-radius: 3px;
|
|
16
|
-
--ax-sys-scroller-track-color: rgba(var(--ax-sys-color-darker-surface));
|
|
17
|
-
--ax-sys-scroller-thumb-color: rgba(var(--ax-sys-color-lightest-surface));
|
|
18
|
-
scrollbar-color: var(--ax-sys-scroller-thumb-color) var(--ax-sys-scroller-track-color);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
::-webkit-scrollbar {
|
|
22
|
-
width: var(--ax-sys-scroller-size);
|
|
23
|
-
height: var(--ax-sys-scroller-size);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
::-webkit-scrollbar-track {
|
|
27
|
-
background: var(--ax-sys-scroller-track-color);
|
|
28
|
-
border-radius: var(--ax-sys-scroller-size-radius);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
::-webkit-scrollbar-thumb {
|
|
32
|
-
background: var(--ax-sys-scroller-thumb-color);
|
|
33
|
-
border-radius: var(--ax-sys-scroller-size-radius);
|
|
34
|
-
}
|
|
35
|
-
}
|
package/mixins/_util.scss
DELETED
package/mixins/index.scss
DELETED
package/themes/default.scss
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import ACoreX utilities for using generate-palette-variables function
|
|
3
|
-
import path in your app must be like this:
|
|
4
|
-
@use '@acorex/styles/utils/index.scss' as utils;
|
|
5
|
-
*/
|
|
6
|
-
@use '../utils/index.scss' as utils;
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
Color themes that have multiple fixed primary colors, etc.
|
|
10
|
-
that can range from 50 to 950, also generate 7 surfaces of these colors by default that are used to color components.
|
|
11
|
-
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,
|
|
12
|
-
it uses the first color for light mode and the second color for dark mode. For example, you can see the color Danger
|
|
13
|
-
*/
|
|
14
|
-
$theme-colors: (
|
|
15
|
-
'primary': oklch(0.623 0.214 259.815),
|
|
16
|
-
'secondary': (
|
|
17
|
-
oklch(24.65% 0.0531 250.05),
|
|
18
|
-
oklch(47.03% 0.0531 250.05),
|
|
19
|
-
),
|
|
20
|
-
'success': oklch(0.696 0.17 162.48),
|
|
21
|
-
'warning': (
|
|
22
|
-
oklch(81.17% 0.188 70.08),
|
|
23
|
-
oklch(86.5% 0.188 70.08),
|
|
24
|
-
),
|
|
25
|
-
'danger': (
|
|
26
|
-
oklch(0.645 0.246 16.439),
|
|
27
|
-
oklch(0.712 0.194 13.428),
|
|
28
|
-
),
|
|
29
|
-
'accent1': oklch(0.628 0.1579 104.82),
|
|
30
|
-
'accent2': oklch(0.628 0.1534 140.47),
|
|
31
|
-
'accent3': oklch(0.628 0.1727 31.76),
|
|
32
|
-
'accent4': oklch(0.5475 0.2056 258.35),
|
|
33
|
-
'accent5': oklch(0.5475 0.2467 1.06),
|
|
34
|
-
'accent6': oklch(0.5475 0.2565 338.82),
|
|
35
|
-
'accent7': oklch(0.5475 0.1554 46.59),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
/*
|
|
39
|
-
Surface colors for creating layouts, each color has a start and an end,
|
|
40
|
-
which we use to create the color spectrum of surfaces.
|
|
41
|
-
The colors are different for dark and light mode.
|
|
42
|
-
*/
|
|
43
|
-
$theme-surfaces: (
|
|
44
|
-
// Surfaces for light mode
|
|
45
|
-
'light-start': #ffffff,
|
|
46
|
-
'light-end': #d4d4d4,
|
|
47
|
-
|
|
48
|
-
// Surfaces for dark mode
|
|
49
|
-
'dark-start': #27272a,
|
|
50
|
-
'dark-end': #09090b
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
$options: (
|
|
54
|
-
// Color range production 50 to 950, if you don't need them you can put false
|
|
55
|
-
'color-range': true,
|
|
56
|
-
// White is always a fixed color in the project, used in some special cases and does not change in light mode and dark mode.
|
|
57
|
-
'light': #ffffff,
|
|
58
|
-
// dark is always a fixed color in the project, used in some special cases and does not change in light mode and dark mode.
|
|
59
|
-
'dark': #09090b
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
/*
|
|
63
|
-
Importing default variables and overriding them with higher values
|
|
64
|
-
*/
|
|
65
|
-
@forward '../variables/index.scss';
|
|
66
|
-
|
|
67
|
-
:root,
|
|
68
|
-
.ax-light {
|
|
69
|
-
--ax-sys-body-font-size: 1rem; // Body font size
|
|
70
|
-
--ax-sys-size-base: 2.5rem; // Variable height of elements, such as inputs and buttons
|
|
71
|
-
--ax-sys-border-radius: 0.5rem; // Default roundness value for corners
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@include utils.generate-palette-variables($theme-colors, $theme-surfaces, $options);
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
@use './utils' as *;
|
|
2
|
-
@use 'sass:color';
|
|
3
|
-
@use 'sass:meta';
|
|
4
|
-
@use 'sass:math';
|
|
5
|
-
@use 'sass:map';
|
|
6
|
-
@use 'sass:list';
|
|
7
|
-
|
|
8
|
-
@function generate-surfaces-colors-variables($surfaces, $options) {
|
|
9
|
-
$light-color: if(map.has-key($options, 'light'), map.get($options, 'light'), #f0f0f0);
|
|
10
|
-
$neutral-color: if(map.has-key($options, 'neutral'), map.get($options, 'neutral'), #808080);
|
|
11
|
-
$dark-color: if(map.has-key($options, 'dark'), map.get($options, 'dark'), #303030);
|
|
12
|
-
//
|
|
13
|
-
$is-dark: if(map.has-key($options, 'is-dark'), map.get($options, 'is-dark'), false);
|
|
14
|
-
//
|
|
15
|
-
$dark-start-color: map.get($surfaces, 'dark-start');
|
|
16
|
-
$dark-end-color: map.get($surfaces, 'dark-end');
|
|
17
|
-
// Extract the start and end colors for both light and dark themes
|
|
18
|
-
$start-color: map.get($surfaces, 'light-start');
|
|
19
|
-
$end-color: map.get($surfaces, 'light-end');
|
|
20
|
-
|
|
21
|
-
// If the dark theme is enabled, use the dark theme colors
|
|
22
|
-
@if $is-dark {
|
|
23
|
-
$start-color: map.get($surfaces, 'dark-start');
|
|
24
|
-
$end-color: map.get($surfaces, 'dark-end');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Lightest Surface (start color)
|
|
28
|
-
$lightest-surface: $start-color;
|
|
29
|
-
$on-lightest-surface: contrast-text($lightest-surface, $is-dark);
|
|
30
|
-
$lightest-surface-border: border-color($lightest-surface, $is-dark);
|
|
31
|
-
|
|
32
|
-
// Lighter Surface: 80% of $start-color
|
|
33
|
-
$lighter-surface: color.mix($start-color, $end-color, 80%);
|
|
34
|
-
$on-lighter-surface: contrast-text($lighter-surface, $is-dark);
|
|
35
|
-
$lighter-surface-border: border-color($lighter-surface, $is-dark);
|
|
36
|
-
|
|
37
|
-
// Light Surface: 65% of $start-color
|
|
38
|
-
$light-surface: color.mix($start-color, $end-color, 65%);
|
|
39
|
-
$on-light-surface: contrast-text($light-surface, $is-dark);
|
|
40
|
-
$light-surface-border: border-color($light-surface, $is-dark);
|
|
41
|
-
|
|
42
|
-
// Base Surface: 50% of $start-color (the midpoint)
|
|
43
|
-
$surface: color.mix($start-color, $end-color, 50%);
|
|
44
|
-
$on-surface: contrast-text($surface, $is-dark);
|
|
45
|
-
$surface-border: border-color($surface, $is-dark);
|
|
46
|
-
|
|
47
|
-
// Dark Surface: 35% of $start-color
|
|
48
|
-
$dark-surface: color.mix($start-color, $end-color, 35%);
|
|
49
|
-
$on-dark-surface: contrast-text($dark-surface, $is-dark);
|
|
50
|
-
$dark-surface-border: border-color($dark-surface, $is-dark);
|
|
51
|
-
|
|
52
|
-
// Darker Surface: 20% of $start-color
|
|
53
|
-
$darker-surface: color.mix($start-color, $end-color, 20%);
|
|
54
|
-
$on-darker-surface: contrast-text($darker-surface, $is-dark);
|
|
55
|
-
$darker-surface-border: border-color($darker-surface, $is-dark);
|
|
56
|
-
|
|
57
|
-
// Darkest Surface (end color)
|
|
58
|
-
$darkest-surface: $end-color;
|
|
59
|
-
$on-darkest-surface: contrast-text($darkest-surface, $is-dark);
|
|
60
|
-
$darkest-surface-border: border-color($darkest-surface, $is-dark);
|
|
61
|
-
|
|
62
|
-
@return (
|
|
63
|
-
ax-sys-color-light: $light-color,
|
|
64
|
-
ax-sys-color-neutral: $neutral-color,
|
|
65
|
-
ax-sys-color-dark: $dark-color,
|
|
66
|
-
//
|
|
67
|
-
ax-sys-color-lightest-surface: $lightest-surface,
|
|
68
|
-
ax-sys-color-on-lightest-surface: $on-lightest-surface,
|
|
69
|
-
ax-sys-color-border-lightest-surface: $lightest-surface-border,
|
|
70
|
-
|
|
71
|
-
ax-sys-color-lighter-surface: $lighter-surface,
|
|
72
|
-
ax-sys-color-on-lighter-surface: $on-lighter-surface,
|
|
73
|
-
ax-sys-color-border-lighter-surface: $lighter-surface-border,
|
|
74
|
-
|
|
75
|
-
ax-sys-color-light-surface: $light-surface,
|
|
76
|
-
ax-sys-color-on-light-surface: $on-light-surface,
|
|
77
|
-
ax-sys-color-border-light-surface: $light-surface-border,
|
|
78
|
-
|
|
79
|
-
ax-sys-color-surface: $surface,
|
|
80
|
-
ax-sys-color-on-surface: $on-surface,
|
|
81
|
-
ax-sys-color-border-surface: $surface-border,
|
|
82
|
-
|
|
83
|
-
ax-sys-color-dark-surface: $dark-surface,
|
|
84
|
-
ax-sys-color-on-dark-surface: $on-dark-surface,
|
|
85
|
-
ax-sys-color-border-dark-surface: $dark-surface-border,
|
|
86
|
-
|
|
87
|
-
ax-sys-color-darker-surface: $darker-surface,
|
|
88
|
-
ax-sys-color-on-darker-surface: $on-darker-surface,
|
|
89
|
-
ax-sys-color-border-darker-surface: $darker-surface-border,
|
|
90
|
-
|
|
91
|
-
ax-sys-color-darkest-surface: $darkest-surface,
|
|
92
|
-
ax-sys-color-on-darkest-surface: $on-darkest-surface,
|
|
93
|
-
ax-sys-color-border-darkest-surface: $darkest-surface-border
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@function generate-named-surfaces-variables($name, $color, $is-dark: false) {
|
|
98
|
-
$palette: light-palette-generator($color);
|
|
99
|
-
@if $is-dark {
|
|
100
|
-
$palette: dark-palette-generator($color);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Lightest Surface
|
|
104
|
-
$lightest-surface: oklch-to-rgba(map.get($palette, 100));
|
|
105
|
-
$on-lightest-surface: contrast-text($lightest-surface, $is-dark);
|
|
106
|
-
$lightest-surface-border: border-color($lightest-surface, $is-dark);
|
|
107
|
-
|
|
108
|
-
// Lighter Surface
|
|
109
|
-
$lighter-surface: oklch-to-rgba(map.get($palette, 200));
|
|
110
|
-
$on-lighter-surface: contrast-text($lighter-surface, $is-dark);
|
|
111
|
-
$lighter-surface-border: border-color($lighter-surface, $is-dark);
|
|
112
|
-
|
|
113
|
-
// Light Surface
|
|
114
|
-
$light-surface: oklch-to-rgba(map.get($palette, 300));
|
|
115
|
-
$on-light-surface: contrast-text($light-surface, $is-dark);
|
|
116
|
-
$light-surface-border: border-color($light-surface, $is-dark);
|
|
117
|
-
|
|
118
|
-
// Base Surface
|
|
119
|
-
$surface: oklch-to-rgba(map.get($palette, 500));
|
|
120
|
-
$on-surface: contrast-text($surface, $is-dark);
|
|
121
|
-
$surface-border: border-color($surface, $is-dark);
|
|
122
|
-
|
|
123
|
-
// Dark Surface
|
|
124
|
-
$dark-surface: oklch-to-rgba(map.get($palette, 600));
|
|
125
|
-
$on-dark-surface: contrast-text($dark-surface, $is-dark);
|
|
126
|
-
$dark-surface-border: border-color($dark-surface, $is-dark);
|
|
127
|
-
|
|
128
|
-
// Darker Surface
|
|
129
|
-
$darker-surface: oklch-to-rgba(map.get($palette, 700));
|
|
130
|
-
$on-darker-surface: contrast-text($darker-surface, $is-dark);
|
|
131
|
-
$darker-surface-border: border-color($darker-surface, $is-dark);
|
|
132
|
-
|
|
133
|
-
// Darkest Surface
|
|
134
|
-
$darkest-surface: oklch-to-rgba(map.get($palette, 800));
|
|
135
|
-
$on-darkest-surface: contrast-text($darkest-surface, $is-dark);
|
|
136
|
-
$darkest-surface-border: border-color($darkest-surface, $is-dark);
|
|
137
|
-
|
|
138
|
-
@return (
|
|
139
|
-
ax-sys-color-#{$name}-lightest-surface: $lightest-surface,
|
|
140
|
-
ax-sys-color-on-#{$name}-lightest-surface: $on-lightest-surface,
|
|
141
|
-
ax-sys-color-border-#{$name}-lightest-surface: $lightest-surface-border,
|
|
142
|
-
|
|
143
|
-
ax-sys-color-#{$name}-lighter-surface: $lighter-surface,
|
|
144
|
-
ax-sys-color-on-#{$name}-lighter-surface: $on-lighter-surface,
|
|
145
|
-
ax-sys-color-border-#{$name}-lighter-surface: $lighter-surface-border,
|
|
146
|
-
|
|
147
|
-
ax-sys-color-#{$name}-light-surface: $light-surface,
|
|
148
|
-
ax-sys-color-on-#{$name}-light-surface: $on-light-surface,
|
|
149
|
-
ax-sys-color-border-#{$name}-light-surface: $light-surface-border,
|
|
150
|
-
|
|
151
|
-
ax-sys-color-#{$name}-surface: $surface,
|
|
152
|
-
ax-sys-color-on-#{$name}-surface: $on-surface,
|
|
153
|
-
ax-sys-color-border-#{$name}-surface: $surface-border,
|
|
154
|
-
|
|
155
|
-
ax-sys-color-#{$name}-dark-surface: $dark-surface,
|
|
156
|
-
ax-sys-color-on-#{$name}-dark-surface: $on-dark-surface,
|
|
157
|
-
ax-sys-color-border-#{$name}-dark-surface: $dark-surface-border,
|
|
158
|
-
|
|
159
|
-
ax-sys-color-#{$name}-darker-surface: $darker-surface,
|
|
160
|
-
ax-sys-color-on-#{$name}-darker-surface: $on-darker-surface,
|
|
161
|
-
ax-sys-color-border-#{$name}-darker-surface: $darker-surface-border,
|
|
162
|
-
|
|
163
|
-
ax-sys-color-#{$name}-darkest-surface: $darkest-surface,
|
|
164
|
-
ax-sys-color-on-#{$name}-darkest-surface: $on-darkest-surface,
|
|
165
|
-
ax-sys-color-border-#{$name}-darkest-surface: $darkest-surface-border
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@mixin generate-palette-variables($colors, $theme-surfaces, $options) {
|
|
170
|
-
$generate-color-range: map.get($options, 'color-range');
|
|
171
|
-
|
|
172
|
-
/************** Light Palette **************/
|
|
173
|
-
$options: map.deep-merge(
|
|
174
|
-
$options,
|
|
175
|
-
(
|
|
176
|
-
'is-dark': false,
|
|
177
|
-
)
|
|
178
|
-
);
|
|
179
|
-
:root,
|
|
180
|
-
.ax-light {
|
|
181
|
-
// Generate Base Surfaces
|
|
182
|
-
@include convert-to-rgb(generate-surfaces-colors-variables($theme-surfaces, $options));
|
|
183
|
-
// Generate Ranges
|
|
184
|
-
@if $generate-color-range {
|
|
185
|
-
/* Ranges */
|
|
186
|
-
@each $name, $color in $colors {
|
|
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));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// Generate Colored Surfaces
|
|
196
|
-
@each $name, $color in $colors {
|
|
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));
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/************** Dark Palette **************/
|
|
207
|
-
$options: map.deep-merge(
|
|
208
|
-
$options,
|
|
209
|
-
(
|
|
210
|
-
'is-dark': true,
|
|
211
|
-
)
|
|
212
|
-
);
|
|
213
|
-
.ax-dark {
|
|
214
|
-
// Generate Base Surfaces
|
|
215
|
-
@include convert-to-rgb(generate-surfaces-colors-variables($theme-surfaces, $options));
|
|
216
|
-
// Generate Ranges
|
|
217
|
-
@if $generate-color-range {
|
|
218
|
-
/* Ranges */
|
|
219
|
-
@each $name, $color in $colors {
|
|
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));
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
// Generate Colored Surfaces
|
|
229
|
-
@each $name, $color in $colors {
|
|
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));
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|