@acorex/styles 21.0.0-next.16 → 21.0.0-next.18
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/base/_preflight.scss +421 -0
- package/base/index.scss +15 -0
- package/components/{_action-item.css → _action-item.scss} +37 -12
- package/components/{_actionsheet.css → _actionsheet.scss} +9 -13
- package/components/{_check-box.css → _check-box.scss} +24 -8
- package/components/{_drop-down.css → _drop-down.scss} +17 -18
- package/components/_editor-container.scss +293 -0
- package/components/{_general-button.css → _general-button.scss} +7 -3
- package/components/{_list.css → _list.scss} +56 -25
- package/components/_radio.scss +51 -0
- package/components/{_ripple.css → _ripple.scss} +8 -8
- package/components/{_table.css → _table.scss} +23 -20
- package/components/{_uploader.css → _uploader.scss} +5 -5
- package/components/index.scss +11 -0
- package/generators/index.js +1 -0
- package/generators/tailwind-class-generator.js +68 -0
- package/icons/fontawesome/_variables.scss +228 -0
- package/icons/fontawesome/index.scss +714 -0
- package/icons/huge/huge-bulk/_variables.scss +209 -0
- package/icons/huge/huge-bulk/index.scss +656 -0
- package/icons/huge/huge-duotone/_variables.scss +209 -0
- package/icons/huge/huge-duotone/index.scss +657 -0
- package/icons/huge/huge-solid-rounded/_variables.scss +209 -0
- package/icons/huge/huge-solid-rounded/index.scss +643 -0
- package/icons/huge/huge-solid-sharp/_variables.scss +209 -0
- package/icons/huge/huge-solid-sharp/index.scss +656 -0
- package/icons/huge/huge-solid-standard/_variables.scss +209 -0
- package/icons/huge/huge-solid-standard/index.scss +656 -0
- package/icons/huge/huge-stroke-rounded/_variables.scss +209 -0
- package/icons/huge/huge-stroke-rounded/index.scss +656 -0
- package/icons/huge/huge-stroke-sharp/_variables.scss +209 -0
- package/icons/huge/huge-stroke-sharp/index.scss +656 -0
- package/icons/huge/huge-stroke-standard/_variables.scss +209 -0
- package/icons/huge/huge-stroke-standard/index.scss +656 -0
- package/icons/huge/huge-twotone/_variables.scss +209 -0
- package/icons/huge/huge-twotone/index.scss +656 -0
- package/icons/material/_variables.scss +227 -0
- package/icons/material/index.scss +718 -0
- package/{index.css → index.scss} +3 -3
- package/mixins/_editor-looks.scss +32 -0
- package/mixins/_media.scss +73 -0
- package/mixins/_scroll-bar.scss +35 -0
- package/mixins/_util.scss +19 -0
- package/mixins/index.scss +4 -0
- package/package.json +4 -5
- package/tailwind-base.js +4 -0
- package/themes/{default copy.scss → default.scss} +9 -6
- package/utils/_theme-generator.scss +238 -0
- package/utils/_utils.scss +278 -0
- package/utils/index.scss +2 -0
- package/components/_editor-container.css +0 -306
- package/components/_radio.css +0 -33
- package/components/index.css +0 -11
- package/icons/fontawesome/_variables.css +0 -229
- package/icons/fontawesome/index.css +0 -555
- package/icons/huge/huge-bulk/_variables.css +0 -211
- package/icons/huge/huge-bulk/index.css +0 -520
- package/icons/huge/huge-duotone/_variables.css +0 -211
- package/icons/huge/huge-duotone/index.css +0 -517
- package/icons/huge/huge-solid-rounded/_variables.css +0 -211
- package/icons/huge/huge-solid-rounded/index.css +0 -504
- package/icons/huge/huge-solid-sharp/_variables.css +0 -213
- package/icons/huge/huge-solid-sharp/index.css +0 -517
- package/icons/huge/huge-solid-standard/_variables.css +0 -211
- package/icons/huge/huge-solid-standard/index.css +0 -516
- package/icons/huge/huge-stroke-rounded/_variables.css +0 -211
- package/icons/huge/huge-stroke-rounded/index.css +0 -515
- package/icons/huge/huge-stroke-sharp/_variables.css +0 -142
- package/icons/huge/huge-stroke-sharp/index.css +0 -515
- package/icons/huge/huge-stroke-standard/_variables.css +0 -141
- package/icons/huge/huge-stroke-standard/index.css +0 -515
- package/icons/huge/huge-twotone/_variables.css +0 -211
- package/icons/huge/huge-twotone/index.css +0 -516
- package/icons/material/_variables.css +0 -229
- package/icons/material/index.css +0 -573
- package/themes/default.css +0 -1240
|
@@ -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,73 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/styles",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.18",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Ali Safari",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"
|
|
9
|
-
"tailwindcss": "
|
|
10
|
-
"@angular/cdk": "^20.0.0"
|
|
8
|
+
"animated-tailwindcss": ">=4.0.0",
|
|
9
|
+
"tailwindcss": ">=3.4.17"
|
|
11
10
|
}
|
|
12
|
-
}
|
|
11
|
+
}
|
package/tailwind-base.js
CHANGED
|
@@ -220,6 +220,7 @@ const UTILITY_CLASSES = {
|
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
module.exports = withAnimations({
|
|
223
|
+
prefix: 'ax-',
|
|
223
224
|
content: ['./src/**/*.{html,ts,scss}', './projects/**/*.{html,ts,scss}'],
|
|
224
225
|
darkMode: 'class',
|
|
225
226
|
safelist: [
|
|
@@ -314,6 +315,9 @@ module.exports = withAnimations({
|
|
|
314
315
|
},
|
|
315
316
|
},
|
|
316
317
|
},
|
|
318
|
+
corePlugins: {
|
|
319
|
+
preflight: false,
|
|
320
|
+
},
|
|
317
321
|
|
|
318
322
|
plugins: [
|
|
319
323
|
plugin(function ({ addUtilities }) {
|
|
@@ -5,7 +5,6 @@ import path in your app must be like this:
|
|
|
5
5
|
*/
|
|
6
6
|
@use '../utils/index.scss' as utils;
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
/*
|
|
10
9
|
Color themes that have multiple fixed primary colors, etc.
|
|
11
10
|
that can range from 50 to 950, also generate 7 surfaces of these colors by default that are used to color components.
|
|
@@ -14,14 +13,17 @@ it uses the first color for light mode and the second color for dark mode. For e
|
|
|
14
13
|
*/
|
|
15
14
|
$theme-colors: (
|
|
16
15
|
'primary': oklch(0.623 0.214 259.815),
|
|
17
|
-
'secondary': (
|
|
16
|
+
'secondary': (
|
|
17
|
+
oklch(24.65% 0.0531 250.05),
|
|
18
18
|
oklch(47.03% 0.0531 250.05),
|
|
19
19
|
),
|
|
20
20
|
'success': oklch(0.696 0.17 162.48),
|
|
21
|
-
'warning': (
|
|
21
|
+
'warning': (
|
|
22
|
+
oklch(81.17% 0.188 70.08),
|
|
22
23
|
oklch(86.5% 0.188 70.08),
|
|
23
24
|
),
|
|
24
|
-
'danger': (
|
|
25
|
+
'danger': (
|
|
26
|
+
oklch(0.645 0.246 16.439),
|
|
25
27
|
oklch(0.712 0.194 13.428),
|
|
26
28
|
),
|
|
27
29
|
'accent1': oklch(0.628 0.1579 104.82),
|
|
@@ -62,10 +64,11 @@ Importing default variables and overriding them with higher values
|
|
|
62
64
|
*/
|
|
63
65
|
@forward '../variables/index.scss';
|
|
64
66
|
|
|
65
|
-
:root
|
|
67
|
+
:root,
|
|
68
|
+
.ax-light {
|
|
66
69
|
--ax-sys-body-font-size: 1rem; // Body font size
|
|
67
70
|
--ax-sys-size-base: 2.5rem; // Variable height of elements, such as inputs and buttons
|
|
68
71
|
--ax-sys-border-radius: 0.5rem; // Default roundness value for corners
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
@include utils.generate-palette-variables($theme-colors, $theme-surfaces, $options);
|
|
74
|
+
@include utils.generate-palette-variables($theme-colors, $theme-surfaces, $options);
|
|
@@ -0,0 +1,238 @@
|
|
|
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
|
+
}
|