@shohojdhara/atomix 0.6.7 → 0.6.9
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/dist/atomix.css +3002 -252
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/atomix.umd.js +1 -1
- package/dist/atomix.umd.js.map +1 -1
- package/dist/atomix.umd.min.js +1 -1
- package/dist/charts.js +1 -1
- package/dist/core.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/heavy.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +21 -1
- package/src/lib/constants/components.ts +1 -1
- package/src/styles/01-settings/_settings.design-tokens.scss +4 -0
- package/src/styles/01-settings/_settings.grid.scss +53 -0
- package/src/styles/01-settings/_settings.motion.scss +50 -0
- package/src/styles/01-settings/_settings.spacing.scss +13 -1
- package/src/styles/01-settings/_settings.typography.scss +5 -1
- package/src/styles/02-tools/_tools.map-loop.scss +19 -0
- package/src/styles/02-tools/_tools.utility-api.scss +57 -53
- package/src/styles/99-utilities/_index.core.scss +24 -0
- package/src/styles/99-utilities/_index.grid.scss +3 -0
- package/src/styles/99-utilities/_index.interaction.scss +3 -0
- package/src/styles/99-utilities/_index.motion.scss +5 -0
- package/src/styles/99-utilities/_index.scss +5 -0
- package/src/styles/99-utilities/_utilities.core.scss +44 -0
- package/src/styles/99-utilities/_utilities.generate-grid.scss +7 -0
- package/src/styles/99-utilities/_utilities.generate-interaction.scss +7 -0
- package/src/styles/99-utilities/_utilities.generate-motion.scss +15 -0
- package/src/styles/99-utilities/_utilities.grid.scss +55 -0
- package/src/styles/99-utilities/_utilities.interaction.scss +44 -0
- package/src/styles/99-utilities/_utilities.link.scss +3 -3
- package/src/styles/99-utilities/_utilities.position.scss +15 -0
- package/src/styles/99-utilities/_utilities.scss +10 -0
- package/src/styles/99-utilities/_utilities.sizes.scss +0 -4
- package/src/styles/99-utilities/_utilities.spacing.scss +3 -3
- package/src/styles/99-utilities/_utilities.state.scss +64 -0
- package/src/styles/99-utilities/_utilities.text-gradient.scss +26 -37
- package/src/styles/99-utilities/_utilities.text.scss +0 -11
- package/src/styles/99-utilities/_utilities.transform.scss +15 -0
- package/src/styles/99-utilities/_utilities.transition.scss +20 -0
- package/src/styles/__tests__/utilities-compile.test.ts +37 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shohojdhara/atomix",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Atomix Design System - A modern component library for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -83,6 +83,26 @@
|
|
|
83
83
|
"require": "./src/styles/99-utilities/_index.scss",
|
|
84
84
|
"default": "./src/styles/99-utilities/_index.scss"
|
|
85
85
|
},
|
|
86
|
+
"./scss/utilities/core": {
|
|
87
|
+
"import": "./src/styles/99-utilities/_index.core.scss",
|
|
88
|
+
"require": "./src/styles/99-utilities/_index.core.scss",
|
|
89
|
+
"default": "./src/styles/99-utilities/_index.core.scss"
|
|
90
|
+
},
|
|
91
|
+
"./scss/utilities/grid": {
|
|
92
|
+
"import": "./src/styles/99-utilities/_index.grid.scss",
|
|
93
|
+
"require": "./src/styles/99-utilities/_index.grid.scss",
|
|
94
|
+
"default": "./src/styles/99-utilities/_index.grid.scss"
|
|
95
|
+
},
|
|
96
|
+
"./scss/utilities/interaction": {
|
|
97
|
+
"import": "./src/styles/99-utilities/_index.interaction.scss",
|
|
98
|
+
"require": "./src/styles/99-utilities/_index.interaction.scss",
|
|
99
|
+
"default": "./src/styles/99-utilities/_index.interaction.scss"
|
|
100
|
+
},
|
|
101
|
+
"./scss/utilities/motion": {
|
|
102
|
+
"import": "./src/styles/99-utilities/_index.motion.scss",
|
|
103
|
+
"require": "./src/styles/99-utilities/_index.motion.scss",
|
|
104
|
+
"default": "./src/styles/99-utilities/_index.motion.scss"
|
|
105
|
+
},
|
|
86
106
|
"./theme": {
|
|
87
107
|
"types": "./dist/theme.d.ts",
|
|
88
108
|
"import": "./dist/theme.js",
|
|
@@ -1990,7 +1990,7 @@ export const ATOMIX_GLASS = {
|
|
|
1990
1990
|
get ABERRATION_INTENSITY() {
|
|
1991
1991
|
return this.DISPLACEMENT_SCALE * 0.02;
|
|
1992
1992
|
},
|
|
1993
|
-
ELASTICITY: 0
|
|
1993
|
+
ELASTICITY: 0,
|
|
1994
1994
|
get CORNER_RADIUS() {
|
|
1995
1995
|
return 16; // Use 16 to match SCSS design system (was 20)
|
|
1996
1996
|
},
|
|
@@ -392,6 +392,10 @@ $font-sizes-extended: (
|
|
|
392
392
|
'lg': $font-size-lg,
|
|
393
393
|
'xl': $font-size-xl,
|
|
394
394
|
'2xl': $font-size-2xl,
|
|
395
|
+
'3xl': $font-size-3xl,
|
|
396
|
+
'4xl': $font-size-4xl,
|
|
397
|
+
'5xl': $font-size-5xl,
|
|
398
|
+
'6xl': $font-size-6xl,
|
|
395
399
|
'h1': $h1-font-size,
|
|
396
400
|
'h2': $h2-font-size,
|
|
397
401
|
'h3': $h3-font-size,
|
|
@@ -13,3 +13,56 @@ $container-max-widths: (
|
|
|
13
13
|
xl: 1140px,
|
|
14
14
|
xxl: 1320px,
|
|
15
15
|
) !default;
|
|
16
|
+
|
|
17
|
+
// Utility class value maps for CSS Grid layout
|
|
18
|
+
$utility-grid-template-columns: (
|
|
19
|
+
1: repeat(1, minmax(0, 1fr)),
|
|
20
|
+
2: repeat(2, minmax(0, 1fr)),
|
|
21
|
+
3: repeat(3, minmax(0, 1fr)),
|
|
22
|
+
4: repeat(4, minmax(0, 1fr)),
|
|
23
|
+
5: repeat(5, minmax(0, 1fr)),
|
|
24
|
+
6: repeat(6, minmax(0, 1fr)),
|
|
25
|
+
7: repeat(7, minmax(0, 1fr)),
|
|
26
|
+
8: repeat(8, minmax(0, 1fr)),
|
|
27
|
+
9: repeat(9, minmax(0, 1fr)),
|
|
28
|
+
10: repeat(10, minmax(0, 1fr)),
|
|
29
|
+
11: repeat(11, minmax(0, 1fr)),
|
|
30
|
+
12: repeat(12, minmax(0, 1fr)),
|
|
31
|
+
) !default;
|
|
32
|
+
|
|
33
|
+
$utility-grid-template-rows: (
|
|
34
|
+
1: repeat(1, minmax(0, 1fr)),
|
|
35
|
+
2: repeat(2, minmax(0, 1fr)),
|
|
36
|
+
3: repeat(3, minmax(0, 1fr)),
|
|
37
|
+
4: repeat(4, minmax(0, 1fr)),
|
|
38
|
+
5: repeat(5, minmax(0, 1fr)),
|
|
39
|
+
6: repeat(6, minmax(0, 1fr)),
|
|
40
|
+
) !default;
|
|
41
|
+
|
|
42
|
+
@use 'sass:string';
|
|
43
|
+
|
|
44
|
+
$utility-grid-column-spans: (
|
|
45
|
+
1: span 1 / span 1,
|
|
46
|
+
2: span 2 / span 2,
|
|
47
|
+
3: span 3 / span 3,
|
|
48
|
+
4: span 4 / span 4,
|
|
49
|
+
5: span 5 / span 5,
|
|
50
|
+
6: span 6 / span 6,
|
|
51
|
+
7: span 7 / span 7,
|
|
52
|
+
8: span 8 / span 8,
|
|
53
|
+
9: span 9 / span 9,
|
|
54
|
+
10: span 10 / span 10,
|
|
55
|
+
11: span 11 / span 11,
|
|
56
|
+
12: span 12 / span 12,
|
|
57
|
+
full: string.unquote('1 / -1'),
|
|
58
|
+
) !default;
|
|
59
|
+
|
|
60
|
+
$utility-grid-row-spans: (
|
|
61
|
+
1: span 1 / span 1,
|
|
62
|
+
2: span 2 / span 2,
|
|
63
|
+
3: span 3 / span 3,
|
|
64
|
+
4: span 4 / span 4,
|
|
65
|
+
5: span 5 / span 5,
|
|
66
|
+
6: span 6 / span 6,
|
|
67
|
+
full: string.unquote('1 / -1'),
|
|
68
|
+
) !default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
|
|
3
|
+
// Motion tokens for transition and transform utilities (utility-layer only)
|
|
4
|
+
|
|
5
|
+
$utility-transition-durations: (
|
|
6
|
+
75: 75ms,
|
|
7
|
+
100: 100ms,
|
|
8
|
+
150: 150ms,
|
|
9
|
+
200: 200ms,
|
|
10
|
+
300: 300ms,
|
|
11
|
+
500: 500ms,
|
|
12
|
+
700: 700ms,
|
|
13
|
+
1000: 1000ms,
|
|
14
|
+
) !default;
|
|
15
|
+
|
|
16
|
+
$utility-transition-timing-functions: (
|
|
17
|
+
linear: linear,
|
|
18
|
+
in: cubic-bezier(0.4, 0, 1, 1),
|
|
19
|
+
out: cubic-bezier(0, 0, 0.2, 1),
|
|
20
|
+
'in-out': cubic-bezier(0.4, 0, 0.2, 1),
|
|
21
|
+
) !default;
|
|
22
|
+
|
|
23
|
+
$utility-transition-properties: (
|
|
24
|
+
none: none,
|
|
25
|
+
all: all,
|
|
26
|
+
colors: string.unquote('color, background-color, border-color, text-decoration-color, fill, stroke'),
|
|
27
|
+
opacity: opacity,
|
|
28
|
+
shadow: box-shadow,
|
|
29
|
+
transform: transform,
|
|
30
|
+
) !default;
|
|
31
|
+
|
|
32
|
+
$utility-transform-scales: (
|
|
33
|
+
0: scale(0),
|
|
34
|
+
50: scale(0.5),
|
|
35
|
+
75: scale(0.75),
|
|
36
|
+
90: scale(0.9),
|
|
37
|
+
95: scale(0.95),
|
|
38
|
+
100: scale(1),
|
|
39
|
+
105: scale(1.05),
|
|
40
|
+
110: scale(1.1),
|
|
41
|
+
125: scale(1.25),
|
|
42
|
+
150: scale(1.5),
|
|
43
|
+
) !default;
|
|
44
|
+
|
|
45
|
+
$utility-transform-rotates: (
|
|
46
|
+
0: rotate(0deg),
|
|
47
|
+
45: rotate(45deg),
|
|
48
|
+
90: rotate(90deg),
|
|
49
|
+
180: rotate(180deg),
|
|
50
|
+
) !default;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../02-tools/tools.map-loop' as map-loop;
|
|
3
|
+
|
|
1
4
|
$spacer: 1rem !default;
|
|
2
5
|
|
|
3
6
|
$spacing-sizes: (
|
|
@@ -74,12 +77,21 @@ $spacing-sizes: (
|
|
|
74
77
|
200: 50rem, //800px
|
|
75
78
|
) !default;
|
|
76
79
|
|
|
80
|
+
// Semantic gap aliases (optional shorthand for common spacing steps)
|
|
81
|
+
$semantic-gap-sizes: (
|
|
82
|
+
xs: map.get($spacing-sizes, 1),
|
|
83
|
+
sm: map.get($spacing-sizes, 2),
|
|
84
|
+
md: map.get($spacing-sizes, 4),
|
|
85
|
+
lg: map.get($spacing-sizes, 6),
|
|
86
|
+
xl: map.get($spacing-sizes, 8),
|
|
87
|
+
) !default;
|
|
88
|
+
|
|
77
89
|
$spacing-important: false !default;
|
|
78
90
|
$enable-negative-margins: false !default;
|
|
79
91
|
|
|
80
92
|
$negative-spacers: null !default;
|
|
81
93
|
|
|
82
94
|
@if $enable-negative-margins {
|
|
83
|
-
$negative-spacers: negativify-map($spacing-sizes) !default;
|
|
95
|
+
$negative-spacers: map-loop.negativify-map($spacing-sizes) !default;
|
|
84
96
|
}
|
|
85
97
|
|
|
@@ -50,7 +50,11 @@ $font-size-sm: $font-size-base * 0.875 !default; //14px
|
|
|
50
50
|
$font-size-md: $font-size-base * 1.125 !default; //18px
|
|
51
51
|
$font-size-lg: $font-size-base * 1.25 !default; //20px
|
|
52
52
|
$font-size-xl: $font-size-base * 1.5 !default; //20px
|
|
53
|
-
$font-size-2xl: $font-size-base * 2 !default; //
|
|
53
|
+
$font-size-2xl: $font-size-base * 2 !default; //32px
|
|
54
|
+
$font-size-3xl: $font-size-base * 2.25 !default; //36px
|
|
55
|
+
$font-size-4xl: $font-size-base * 2.5 !default; //40px
|
|
56
|
+
$font-size-5xl: $font-size-base * 3 !default; //48px
|
|
57
|
+
$font-size-6xl: $font-size-base * 3.75 !default; //60px
|
|
54
58
|
|
|
55
59
|
$h1-font-size: $font-size-base * 2.5 !default; //40px
|
|
56
60
|
$h2-font-size: $font-size-base * 2 !default; //32px
|
|
@@ -29,3 +29,22 @@
|
|
|
29
29
|
}
|
|
30
30
|
@return $result;
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
/// Negates numeric values in a map and prefixes keys with `n` (e.g. `1` → `n1: -0.25rem`).
|
|
34
|
+
/// Skips zero values. Used for negative margin utilities.
|
|
35
|
+
@function negativify-map($map) {
|
|
36
|
+
$result: ();
|
|
37
|
+
|
|
38
|
+
@each $key, $value in $map {
|
|
39
|
+
@if $key != 0 {
|
|
40
|
+
$result: map.merge(
|
|
41
|
+
$result,
|
|
42
|
+
(
|
|
43
|
+
'n#{$key}': $value * -1,
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@return $result;
|
|
50
|
+
}
|
|
@@ -29,6 +29,12 @@ $utility-defaults: (
|
|
|
29
29
|
@mixin generate-utility($utility, $infix: '', $is-rfs: false) {
|
|
30
30
|
$values: map.get($utility, values);
|
|
31
31
|
$css-var: map.get($utility, css-var);
|
|
32
|
+
$pseudo: map.get($utility, pseudo);
|
|
33
|
+
$legacy-state: map.get($utility, state);
|
|
34
|
+
|
|
35
|
+
@if $pseudo == null and $legacy-state != null {
|
|
36
|
+
$pseudo: $legacy-state;
|
|
37
|
+
}
|
|
32
38
|
|
|
33
39
|
// If the values are a list or string, convert it to a map
|
|
34
40
|
@if meta.type-of($values) == 'string' or meta.type-of($values) == 'list' {
|
|
@@ -38,6 +44,13 @@ $utility-defaults: (
|
|
|
38
44
|
@each $key, $value in $values {
|
|
39
45
|
$properties: map.get($utility, property);
|
|
40
46
|
$property-class: map.get($utility, class);
|
|
47
|
+
$local-vars: map.get($utility, local-vars);
|
|
48
|
+
$local-vars-only: $value == null and $properties == null and $local-vars and list.length($local-vars) > 0;
|
|
49
|
+
|
|
50
|
+
@if $value == null and not $local-vars-only {
|
|
51
|
+
$warn-class: if($property-class, $property-class, $properties);
|
|
52
|
+
@warn 'Utility value is null for class "#{ $warn-class }" key "#{ $key }" — class will not be generated.';
|
|
53
|
+
}
|
|
41
54
|
|
|
42
55
|
// Handle case where property-class is null
|
|
43
56
|
@if $property-class == null and $properties {
|
|
@@ -48,15 +61,8 @@ $utility-defaults: (
|
|
|
48
61
|
);
|
|
49
62
|
}
|
|
50
63
|
|
|
51
|
-
// State variants (hover, focus, active, etc.)
|
|
52
64
|
// Create a local copy of infix to avoid affecting other utilities
|
|
53
65
|
$local-infix: $infix;
|
|
54
|
-
$state: map.get($utility, state);
|
|
55
|
-
$local-infix: if(
|
|
56
|
-
$state,
|
|
57
|
-
if(meta.type-of($state) == 'string', '#{$state}#{$local-infix}', $local-infix),
|
|
58
|
-
$local-infix
|
|
59
|
-
);
|
|
60
66
|
|
|
61
67
|
// Escape special characters in key for valid CSS class names
|
|
62
68
|
$escaped-key: if($key, _escape-key($key), null);
|
|
@@ -69,28 +75,14 @@ $utility-defaults: (
|
|
|
69
75
|
'#{$property-class}#{$local-infix}-#{$escaped-key}',
|
|
70
76
|
'#{$property-class}#{$local-infix}'
|
|
71
77
|
);
|
|
78
|
+
$selector: '.#{$class-name}';
|
|
72
79
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
$css-variable-name: str-replace(#{$property-class}, '.', '\\.');
|
|
77
|
-
--atomix-u-#{$css-variable-name}: #{$value};
|
|
78
|
-
} @else if $properties {
|
|
79
|
-
@each $property in $properties {
|
|
80
|
-
#{$property}: $value;
|
|
81
|
-
}
|
|
82
|
-
} @else if $value != null {
|
|
83
|
-
// Guard: only emit property declaration if value is not null
|
|
84
|
-
#{$property-class}: $value;
|
|
85
|
-
}
|
|
80
|
+
@if $pseudo {
|
|
81
|
+
$selector: '#{$selector}:#{$pseudo}';
|
|
82
|
+
}
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
@if $local-vars and list.length($local-vars) > 0 {
|
|
90
|
-
@each $local-var-name, $local-var-value in $local-vars {
|
|
91
|
-
--#{$local-var-name}: #{$local-var-value};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
84
|
+
#{$selector} {
|
|
85
|
+
@include _apply-utility-declarations($utility, $property-class, $properties, $css-var, $value);
|
|
94
86
|
}
|
|
95
87
|
} @else {
|
|
96
88
|
// Generate class with custom class name
|
|
@@ -98,34 +90,45 @@ $utility-defaults: (
|
|
|
98
90
|
$modifier: if($key, '-#{$escaped-key}', '');
|
|
99
91
|
|
|
100
92
|
// Responsive infix goes between class and modifier: .u-class-{bp}-{value}
|
|
101
|
-
.#{$base-class}#{$local-infix}#{$modifier}
|
|
102
|
-
@if $css-var and $properties {
|
|
103
|
-
// Handle CSS variable generation with properties
|
|
104
|
-
@each $property in $properties {
|
|
105
|
-
$css-variable-name: str-replace(#{$property}, '.', '\\.');
|
|
106
|
-
--atomix-u-#{$css-variable-name}: #{$value};
|
|
107
|
-
}
|
|
108
|
-
} @else if $css-var {
|
|
109
|
-
// Handle CSS variable generation without properties
|
|
110
|
-
$css-variable-name: str-replace(#{$base-class}, '.', '\\.');
|
|
111
|
-
--atomix-u-#{$css-variable-name}#{$modifier}: #{$value};
|
|
112
|
-
} @else if $properties {
|
|
113
|
-
@each $property in $properties {
|
|
114
|
-
#{$property}: $value;
|
|
115
|
-
}
|
|
116
|
-
} @else if $value != null {
|
|
117
|
-
// Guard: only emit property declaration if value is not null
|
|
118
|
-
#{$base-class}: $value;
|
|
119
|
-
}
|
|
93
|
+
$selector: '.#{$base-class}#{$local-infix}#{$modifier}';
|
|
120
94
|
|
|
121
|
-
|
|
122
|
-
$
|
|
123
|
-
@if $local-vars and list.length($local-vars) > 0 {
|
|
124
|
-
@each $local-var-name, $local-var-value in $local-vars {
|
|
125
|
-
--#{$local-var-name}: #{$local-var-value};
|
|
126
|
-
}
|
|
127
|
-
}
|
|
95
|
+
@if $pseudo {
|
|
96
|
+
$selector: '#{$selector}:#{$pseudo}';
|
|
128
97
|
}
|
|
98
|
+
|
|
99
|
+
#{$selector} {
|
|
100
|
+
@include _apply-utility-declarations($utility, $base-class, $properties, $css-var, $value);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@mixin _apply-utility-declarations($utility, $class-name, $properties, $css-var, $value) {
|
|
107
|
+
@if $css-var and $properties {
|
|
108
|
+
// Handle CSS variable generation with properties
|
|
109
|
+
@each $property in $properties {
|
|
110
|
+
$css-variable-name: str-replace(#{$property}, '.', '\\.');
|
|
111
|
+
--atomix-u-#{$css-variable-name}: #{$value};
|
|
112
|
+
}
|
|
113
|
+
} @else if $css-var {
|
|
114
|
+
// Handle CSS variable generation without properties
|
|
115
|
+
$css-variable-name: str-replace(#{$class-name}, '.', '\\.');
|
|
116
|
+
--atomix-u-#{$css-variable-name}: #{$value};
|
|
117
|
+
} @else if $properties {
|
|
118
|
+
@each $property in $properties {
|
|
119
|
+
@if $value != null {
|
|
120
|
+
#{$property}: $value;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} @else if $value != null {
|
|
124
|
+
#{$class-name}: $value;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Add local CSS variables if specified
|
|
128
|
+
$local-vars: map.get($utility, local-vars);
|
|
129
|
+
@if $local-vars and list.length($local-vars) > 0 {
|
|
130
|
+
@each $local-var-name, $local-var-value in $local-vars {
|
|
131
|
+
--#{$local-var-name}: #{$local-var-value};
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
@@ -169,6 +172,7 @@ $utility-defaults: (
|
|
|
169
172
|
values: map.get($config, values),
|
|
170
173
|
class: map.get($config, class),
|
|
171
174
|
state: map.get($config, state),
|
|
175
|
+
pseudo: map.get($config, pseudo),
|
|
172
176
|
rtl: map.get($config, rtl),
|
|
173
177
|
css-var: map.get($config, css-var),
|
|
174
178
|
local-vars: map.get($config, local-vars),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Core utilities bundle — spacing, flex, typography, colors, sizing, and effects
|
|
2
|
+
@forward 'utilities.background';
|
|
3
|
+
@forward 'utilities.border';
|
|
4
|
+
@forward 'utilities.clearfix';
|
|
5
|
+
@forward 'utilities.display';
|
|
6
|
+
@forward 'utilities.flex';
|
|
7
|
+
@forward 'utilities.gradient';
|
|
8
|
+
@forward 'utilities.glass-fixes';
|
|
9
|
+
@forward 'utilities.link';
|
|
10
|
+
@forward 'utilities.object-fit';
|
|
11
|
+
@forward 'utilities.opacity';
|
|
12
|
+
@forward 'utilities.overflow';
|
|
13
|
+
@forward 'utilities.position';
|
|
14
|
+
@forward 'utilities.shadow';
|
|
15
|
+
@forward 'utilities.sizes';
|
|
16
|
+
@forward 'utilities.spacing';
|
|
17
|
+
@forward 'utilities.text';
|
|
18
|
+
@forward 'utilities.text-gradient';
|
|
19
|
+
@forward 'utilities.visibility';
|
|
20
|
+
@forward 'utilities.visually-hidden';
|
|
21
|
+
@forward 'utilities.z-index';
|
|
22
|
+
@forward 'utilities.touch-target';
|
|
23
|
+
|
|
24
|
+
@use 'utilities.core';
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
@forward 'utilities.flex';
|
|
7
7
|
@forward 'utilities.glass-fixes';
|
|
8
8
|
@forward 'utilities.gradient';
|
|
9
|
+
@forward 'utilities.grid';
|
|
10
|
+
@forward 'utilities.interaction';
|
|
9
11
|
@forward 'utilities.link';
|
|
10
12
|
@forward 'utilities.object-fit';
|
|
11
13
|
@forward 'utilities.opacity';
|
|
@@ -14,8 +16,11 @@
|
|
|
14
16
|
@forward 'utilities.shadow';
|
|
15
17
|
@forward 'utilities.sizes';
|
|
16
18
|
@forward 'utilities.spacing';
|
|
19
|
+
@forward 'utilities.state';
|
|
17
20
|
@forward 'utilities.text';
|
|
18
21
|
@forward 'utilities.text-gradient';
|
|
22
|
+
@forward 'utilities.transition';
|
|
23
|
+
@forward 'utilities.transform';
|
|
19
24
|
@forward 'utilities.visibility';
|
|
20
25
|
@forward 'utilities.visually-hidden';
|
|
21
26
|
@forward 'utilities.z-index';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Core utility generator (spacing, layout, typography, colors, sizing, effects)
|
|
2
|
+
// Import via @shohojdhara/atomix/scss/utilities/core
|
|
3
|
+
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
@use '../02-tools/_tools.utility-api' as util-api;
|
|
6
|
+
@use '../01-settings/settings.breakpoints' as breakpoints;
|
|
7
|
+
@use 'utilities.background' as bg;
|
|
8
|
+
@use 'utilities.border' as border;
|
|
9
|
+
@use 'utilities.display' as display;
|
|
10
|
+
@use 'utilities.flex' as flex;
|
|
11
|
+
@use 'utilities.gradient' as gradient;
|
|
12
|
+
@use 'utilities.link' as link;
|
|
13
|
+
@use 'utilities.object-fit' as obj-fit;
|
|
14
|
+
@use 'utilities.opacity' as opacity;
|
|
15
|
+
@use 'utilities.overflow' as overflow;
|
|
16
|
+
@use 'utilities.position' as position;
|
|
17
|
+
@use 'utilities.shadow' as shadow;
|
|
18
|
+
@use 'utilities.sizes' as sizes;
|
|
19
|
+
@use 'utilities.spacing' as spacing;
|
|
20
|
+
@use 'utilities.text' as text;
|
|
21
|
+
@use 'utilities.text-gradient' as textGradient;
|
|
22
|
+
@use 'utilities.visibility' as visibility;
|
|
23
|
+
@use 'utilities.z-index' as z-index;
|
|
24
|
+
|
|
25
|
+
$utilities-core: ();
|
|
26
|
+
$utilities-core: map.merge($utilities-core, bg.$utilities-bg);
|
|
27
|
+
$utilities-core: map.merge($utilities-core, border.$utilities-border);
|
|
28
|
+
$utilities-core: map.merge($utilities-core, display.$utilities-display);
|
|
29
|
+
$utilities-core: map.merge($utilities-core, flex.$utilities-flex);
|
|
30
|
+
$utilities-core: map.merge($utilities-core, gradient.$utilities-gradient);
|
|
31
|
+
$utilities-core: map.merge($utilities-core, link.$utilities-link);
|
|
32
|
+
$utilities-core: map.merge($utilities-core, obj-fit.$utilities-object-fit);
|
|
33
|
+
$utilities-core: map.merge($utilities-core, opacity.$utilities-opacity);
|
|
34
|
+
$utilities-core: map.merge($utilities-core, overflow.$utilities-overflow);
|
|
35
|
+
$utilities-core: map.merge($utilities-core, position.$utilities-position);
|
|
36
|
+
$utilities-core: map.merge($utilities-core, shadow.$utilities-shadow);
|
|
37
|
+
$utilities-core: map.merge($utilities-core, sizes.$utilities-sizes);
|
|
38
|
+
$utilities-core: map.merge($utilities-core, spacing.$utilities-spacing);
|
|
39
|
+
$utilities-core: map.merge($utilities-core, text.$utilities-text);
|
|
40
|
+
$utilities-core: map.merge($utilities-core, visibility.$utilities-visibility);
|
|
41
|
+
$utilities-core: map.merge($utilities-core, z-index.$utilities-z-index);
|
|
42
|
+
$utilities-core: map.merge($utilities-core, textGradient.$utilities-text-gradient);
|
|
43
|
+
|
|
44
|
+
@include util-api.generate-utilities($utilities-core, breakpoints.$grid-breakpoints);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Grid utility generator — opt-in via @shohojdhara/atomix/scss/utilities/grid
|
|
2
|
+
|
|
3
|
+
@use '../02-tools/_tools.utility-api' as util-api;
|
|
4
|
+
@use '../01-settings/settings.breakpoints' as breakpoints;
|
|
5
|
+
@use 'utilities.grid' as grid;
|
|
6
|
+
|
|
7
|
+
@include util-api.generate-utilities(grid.$utilities-grid, breakpoints.$grid-breakpoints);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Interaction utility generator — opt-in via @shohojdhara/atomix/scss/utilities/interaction
|
|
2
|
+
|
|
3
|
+
@use '../02-tools/_tools.utility-api' as util-api;
|
|
4
|
+
@use '../01-settings/settings.breakpoints' as breakpoints;
|
|
5
|
+
@use 'utilities.interaction' as interaction;
|
|
6
|
+
|
|
7
|
+
@include util-api.generate-utilities(interaction.$utilities-interaction, breakpoints.$grid-breakpoints);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Motion utility generator — opt-in via @shohojdhara/atomix/scss/utilities/motion
|
|
2
|
+
|
|
3
|
+
@use 'sass:map';
|
|
4
|
+
@use '../02-tools/_tools.utility-api' as util-api;
|
|
5
|
+
@use '../01-settings/settings.breakpoints' as breakpoints;
|
|
6
|
+
@use 'utilities.transition' as transition;
|
|
7
|
+
@use 'utilities.transform' as transform;
|
|
8
|
+
@use 'utilities.state' as state;
|
|
9
|
+
|
|
10
|
+
$utilities-motion: ();
|
|
11
|
+
$utilities-motion: map.merge($utilities-motion, transition.$utilities-transition);
|
|
12
|
+
$utilities-motion: map.merge($utilities-motion, transform.$utilities-transform);
|
|
13
|
+
$utilities-motion: map.merge($utilities-motion, state.$utilities-state);
|
|
14
|
+
|
|
15
|
+
@include util-api.generate-utilities($utilities-motion, breakpoints.$grid-breakpoints);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@use '../01-settings/settings.grid' as grid;
|
|
2
|
+
|
|
3
|
+
// Define utilities for CSS Grid layout
|
|
4
|
+
$utilities-grid: (
|
|
5
|
+
'grid-template-columns': (
|
|
6
|
+
responsive: true,
|
|
7
|
+
property: grid-template-columns,
|
|
8
|
+
class: u-grid-cols,
|
|
9
|
+
values: grid.$utility-grid-template-columns,
|
|
10
|
+
),
|
|
11
|
+
'grid-template-rows': (
|
|
12
|
+
responsive: true,
|
|
13
|
+
property: grid-template-rows,
|
|
14
|
+
class: u-grid-rows,
|
|
15
|
+
values: grid.$utility-grid-template-rows,
|
|
16
|
+
),
|
|
17
|
+
'grid-column': (
|
|
18
|
+
responsive: true,
|
|
19
|
+
property: grid-column,
|
|
20
|
+
class: u-col-span,
|
|
21
|
+
values: grid.$utility-grid-column-spans,
|
|
22
|
+
),
|
|
23
|
+
'grid-row': (
|
|
24
|
+
responsive: true,
|
|
25
|
+
property: grid-row,
|
|
26
|
+
class: u-row-span,
|
|
27
|
+
values: grid.$utility-grid-row-spans,
|
|
28
|
+
),
|
|
29
|
+
'place-items': (
|
|
30
|
+
responsive: true,
|
|
31
|
+
property: place-items,
|
|
32
|
+
class: u-place-items,
|
|
33
|
+
values: (
|
|
34
|
+
start: start,
|
|
35
|
+
end: end,
|
|
36
|
+
center: center,
|
|
37
|
+
baseline: baseline,
|
|
38
|
+
stretch: stretch,
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
'place-content': (
|
|
42
|
+
responsive: true,
|
|
43
|
+
property: place-content,
|
|
44
|
+
class: u-place-content,
|
|
45
|
+
values: (
|
|
46
|
+
start: start,
|
|
47
|
+
end: end,
|
|
48
|
+
center: center,
|
|
49
|
+
between: space-between,
|
|
50
|
+
around: space-around,
|
|
51
|
+
evenly: space-evenly,
|
|
52
|
+
stretch: stretch,
|
|
53
|
+
),
|
|
54
|
+
),
|
|
55
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Define utilities for pointer, cursor, and selection interaction
|
|
2
|
+
$utilities-interaction: (
|
|
3
|
+
'cursor': (
|
|
4
|
+
property: cursor,
|
|
5
|
+
class: u-cursor,
|
|
6
|
+
values: (
|
|
7
|
+
auto: auto,
|
|
8
|
+
default: default,
|
|
9
|
+
pointer: pointer,
|
|
10
|
+
wait: wait,
|
|
11
|
+
text: text,
|
|
12
|
+
move: move,
|
|
13
|
+
help: help,
|
|
14
|
+
'not-allowed': not-allowed,
|
|
15
|
+
),
|
|
16
|
+
),
|
|
17
|
+
'pointer-events': (
|
|
18
|
+
property: pointer-events,
|
|
19
|
+
class: u-pointer-events,
|
|
20
|
+
values: (
|
|
21
|
+
none: none,
|
|
22
|
+
auto: auto,
|
|
23
|
+
),
|
|
24
|
+
),
|
|
25
|
+
'user-select': (
|
|
26
|
+
property: user-select,
|
|
27
|
+
class: u-select,
|
|
28
|
+
values: (
|
|
29
|
+
none: none,
|
|
30
|
+
text: text,
|
|
31
|
+
all: all,
|
|
32
|
+
auto: auto,
|
|
33
|
+
),
|
|
34
|
+
),
|
|
35
|
+
'touch-action': (
|
|
36
|
+
property: touch-action,
|
|
37
|
+
class: u-touch-action,
|
|
38
|
+
values: (
|
|
39
|
+
auto: auto,
|
|
40
|
+
none: none,
|
|
41
|
+
manipulation: manipulation,
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
);
|
|
@@ -10,7 +10,7 @@ $utilities-link: (
|
|
|
10
10
|
'link-opacity': (
|
|
11
11
|
css-var: true,
|
|
12
12
|
class: u-link-opacity,
|
|
13
|
-
|
|
13
|
+
pseudo: hover,
|
|
14
14
|
values: (
|
|
15
15
|
10: 0.1,
|
|
16
16
|
25: 0.25,
|
|
@@ -22,7 +22,7 @@ $utilities-link: (
|
|
|
22
22
|
'link-offset': (
|
|
23
23
|
property: text-underline-offset,
|
|
24
24
|
class: u-link-offset,
|
|
25
|
-
|
|
25
|
+
pseudo: hover,
|
|
26
26
|
values: (
|
|
27
27
|
1: 0.125em,
|
|
28
28
|
2: 0.25em,
|
|
@@ -48,7 +48,7 @@ $utilities-link: (
|
|
|
48
48
|
'link-underline-opacity': (
|
|
49
49
|
css-var: true,
|
|
50
50
|
class: u-link-underline-opacity,
|
|
51
|
-
|
|
51
|
+
pseudo: hover,
|
|
52
52
|
values: (
|
|
53
53
|
0: 0,
|
|
54
54
|
10: 0.1,
|