@shohojdhara/atomix 0.5.4 → 0.5.6
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/README.md +43 -21
- package/dist/atomix.css +2489 -183
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +5 -5
- package/dist/atomix.min.css.map +1 -1
- package/dist/config.js +2 -5
- package/dist/config.js.map +1 -1
- package/dist/core.d.ts +100 -8
- package/dist/core.js +89 -79
- package/dist/core.js.map +1 -1
- package/dist/forms.js +1 -7
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +7 -3
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +179 -54
- package/dist/index.esm.js +123 -105
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +128 -106
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/theme.js +0 -4
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +40 -25
- package/src/components/Breadcrumb/Breadcrumb.tsx +22 -13
- package/src/components/Button/Button.tsx +4 -5
- package/src/components/Callout/Callout.tsx +98 -96
- package/src/components/Card/Card.tsx +117 -103
- package/src/components/Card/index.ts +7 -5
- package/src/components/Dropdown/Dropdown.tsx +27 -8
- package/src/components/EdgePanel/EdgePanel.tsx +7 -2
- package/src/components/Modal/Modal.tsx +27 -8
- package/src/components/Spinner/Spinner.tsx +60 -43
- package/src/components/Tabs/Tabs.tsx +163 -149
- package/src/lib/composables/useInput.ts +11 -9
- package/src/lib/config/loader.ts +5 -2
- package/src/lib/types/components.ts +84 -0
- package/src/styles/01-settings/_settings.background.scss +35 -5
- package/src/styles/02-tools/_tools.background.scss +145 -61
- package/src/styles/06-components/_components.accordion.scss +2 -2
- package/src/styles/06-components/_components.badge.scss +1 -1
- package/src/styles/06-components/_components.button.scss +2 -2
- package/src/styles/06-components/_components.callout.scss +2 -2
- package/src/styles/06-components/_components.card.scss +3 -3
- package/src/styles/06-components/_components.dropdown.scss +1 -1
- package/src/styles/06-components/_components.dynamic-background.scss +69 -0
- package/src/styles/06-components/_components.edge-panel.scss +2 -2
- package/src/styles/06-components/_components.input.scss +3 -3
- package/src/styles/06-components/_components.messages.scss +6 -6
- package/src/styles/06-components/_components.modal.scss +1 -1
- package/src/styles/06-components/_components.navbar.scss +1 -1
- package/src/styles/06-components/_components.popover.scss +1 -1
- package/src/styles/06-components/_components.toggle.scss +1 -1
- package/src/styles/06-components/_components.tooltip.scss +3 -3
- package/src/styles/06-components/_index.scss +1 -0
- package/src/styles/99-utilities/_utilities.link.scss +4 -5
|
@@ -1,75 +1,159 @@
|
|
|
1
|
-
@use 'sass:meta';
|
|
2
|
-
@use 'sass:string';
|
|
3
1
|
@use 'sass:math';
|
|
4
2
|
@use 'sass:color';
|
|
5
3
|
@use 'sass:map';
|
|
4
|
+
@use 'sass:list';
|
|
6
5
|
@use '../01-settings/settings.background' as *;
|
|
7
|
-
@use '../01-settings/settings.
|
|
8
|
-
|
|
6
|
+
@use '../01-settings/settings.colors' as *;
|
|
7
|
+
/* Background utility simplification
|
|
8
|
+
* - Consolidates duplicated glass, mesh, shadow, border, and noise patterns into private helpers.
|
|
9
|
+
* - Replaces magic values with local token aliases backed by existing background settings.
|
|
10
|
+
* - Flattens variant and interaction branching, keeps public mixin signatures intact, and removes old backdrop prefixes.
|
|
11
|
+
*/
|
|
9
12
|
|
|
13
|
+
$_bg-highlight: $white !default;
|
|
14
|
+
$_bg-shadow: $black !default;
|
|
15
|
+
$_bg-filters: ('glass': blur(12px) saturate(1.4), 'solid': blur(8px), 'mesh': blur(16px)) !default;
|
|
16
|
+
$_bg-motion: ('base': 0.3s, 'press': 0.2s, 'easing': cubic-bezier(0.4, 0, 0.2, 1), 'scale': 0.98) !default;
|
|
17
|
+
$_bg-glass: ('angle': 110deg, 'edge-angle': 180deg, 'edge-stop': 30%, 'ambient-stop': 60%, 'ambient-size': ellipse 120% 80% at 50% 120%) !default;
|
|
18
|
+
$_bg-states: ('base': ('shimmer': (0.08, 0.12, 0.08), 'edge': (0.15, 0.05), 'mix': (0.13, 0, -0.1, 0.03), 'ambient': 0.4), 'hover': ('shimmer': (0.1, 0.15, 0.1), 'edge': (0.18, 0.08), 'mix': (0.16, 0, -0.12, 0.04), 'ambient': 0.5), 'active': ('edge': (0.12, 0.05), 'mix': (0.18, 0, -0.09))) !default;
|
|
19
|
+
$_bg-shadow-ambient: ('base': 0 2px 4px rgba($_bg-shadow, 0.05), 'hover': 0 2px 4px rgba($_bg-shadow, 0.08)) !default;
|
|
20
|
+
|
|
21
|
+
// Changelog: Added a shared color-mix helper so all variants use the same tokenized transparency math.
|
|
22
|
+
@function _bg-mix($color, $weight) { @return color-mix(in srgb, #{$color} #{math.percentage($weight)}, transparent); }
|
|
23
|
+
|
|
24
|
+
// Changelog: Added compact token readers to remove repeated literal lookups from the public mixin.
|
|
25
|
+
@function _bg-state($state, $group) { @return map.get($_bg-states, $state, $group); }
|
|
26
|
+
@function _bg-surface($state, $transparency) { @return if($state == 'hover', $background-transparency-hover, if($state == 'active', $background-transparency-active, $transparency)); }
|
|
27
|
+
@function _bg-noise-image() { @return url("data:image/svg+xml,%3Csvg viewBox='0 0 #{$background-noise-scale} #{$background-noise-scale}' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E"); }
|
|
28
|
+
|
|
29
|
+
// Changelog: Extracted glass background generation so base, hover, and active states reuse one recipe.
|
|
30
|
+
@function _bg-glass($color, $transparency, $state: 'base') {
|
|
31
|
+
$surface: _bg-surface($state, $transparency);
|
|
32
|
+
$edge: _bg-state($state, 'edge');
|
|
33
|
+
$mix: _bg-state($state, 'mix');
|
|
34
|
+
@if $state == 'active' {
|
|
35
|
+
@return linear-gradient(map.get($_bg-glass, 'edge-angle'), rgba($_bg-highlight, list.nth($edge, 1)) 0%, rgba($_bg-highlight, list.nth($edge, 2)) 20%, transparent 40%), linear-gradient($background-gradient-angle, _bg-mix($color, $surface + list.nth($mix, 1)) 0%, _bg-mix($color, $surface + list.nth($mix, 2)) 50%, _bg-mix($color, $surface + list.nth($mix, 3)) 100%);
|
|
36
|
+
}
|
|
37
|
+
$shimmer: _bg-state($state, 'shimmer');
|
|
38
|
+
@return linear-gradient(map.get($_bg-glass, 'angle'), transparent 0%, rgba($_bg-highlight, list.nth($shimmer, 1)) 45%, rgba($_bg-highlight, list.nth($shimmer, 2)) 50%, rgba($_bg-highlight, list.nth($shimmer, 3)) 55%, transparent 100%), linear-gradient(map.get($_bg-glass, 'edge-angle'), rgba($_bg-highlight, list.nth($edge, 1)) 0%, rgba($_bg-highlight, list.nth($edge, 2)) 15%, transparent map.get($_bg-glass, 'edge-stop')), linear-gradient($background-gradient-angle, _bg-mix($color, $surface + list.nth($mix, 1)) 0%, _bg-mix($color, $surface + list.nth($mix, 2)) 40%, _bg-mix($color, $surface + list.nth($mix, 3)) 70%, _bg-mix($color, $surface + list.nth($mix, 4)) 100%), radial-gradient(map.get($_bg-glass, 'ambient-size'), _bg-mix($color, $surface * map.get($_bg-states, $state, 'ambient')) 0%, transparent map.get($_bg-glass, 'ambient-stop'));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Changelog: Extracted shadow composition so base and hover shadows share one loop and corrected opacity scaling.
|
|
42
|
+
@function _bg-shadows($color, $hover: false) {
|
|
43
|
+
$shadows: (inset 0 1px 0 rgba($_bg-highlight, if($hover, 0.15, 0.1)));
|
|
44
|
+
$multiplier: if($hover, 1.5, 1);
|
|
45
|
+
@for $i from 1 through $background-shadow-layers {
|
|
46
|
+
$blur: $background-shadow-blur-base * $i * $multiplier;
|
|
47
|
+
$opacity: math.div($background-shadow-intensity, $i) * $multiplier;
|
|
48
|
+
$shadows: list.append($shadows, 0 $blur ($blur * 2) if($i == 1, $background-shadow-spread, 0) _bg-mix($color, $opacity), comma);
|
|
49
|
+
}
|
|
50
|
+
@return list.append($shadows, map.get($_bg-shadow-ambient, if($hover, 'hover', 'base')), comma);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Changelog: Extracted a shared overlay scaffold so border, noise, and shimmer pseudo-elements stay aligned.
|
|
54
|
+
@mixin _bg-overlay($z) { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: $z; }
|
|
55
|
+
|
|
56
|
+
// Changelog: Moved the glass border effect into a private helper to remove duplicate pseudo-element declarations.
|
|
57
|
+
@mixin _bg-border() {
|
|
58
|
+
&::before { @include _bg-overlay(1); padding: $background-border-width; background: linear-gradient($background-gradient-angle, rgba($_bg-highlight, $background-border-opacity * 1.2) 0%, rgba($_bg-highlight, $background-border-opacity * 0.6) 50%, rgba($_bg-highlight, $background-border-opacity * 0.3) 100%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Changelog: Moved the noise overlay into a helper so the SVG asset and sizing are defined once.
|
|
62
|
+
@mixin _bg-noise() {
|
|
63
|
+
&::after { @include _bg-overlay(2); opacity: $background-noise-opacity; background-image: _bg-noise-image(); background-size: #{$background-noise-scale}px; mix-blend-mode: overlay; }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Changelog: Moved the shimmer overlay into a helper so the variant branch only selects the effect.
|
|
67
|
+
@mixin _bg-shimmer() {
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
&::before { @include _bg-overlay(1); background: linear-gradient(map.get($_bg-glass, 'angle'), transparent 0%, rgba($_bg-highlight, $background-shimmer-intensity) 50%, transparent 100%); transform: translateX(-100%); animation: shimmer $background-shimmer-duration infinite; }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Changelog: Rebuilt the main utility mixin around private helpers to preserve the API while removing nesting and redundancy.
|
|
73
|
+
/// Dynamic background mixin with glass morphism effects
|
|
74
|
+
/// @param {Color} $color - Base color for the background
|
|
75
|
+
/// @param {Number} $transparency [0.65] - Transparency level (0-1)
|
|
76
|
+
/// @param {Boolean} $enable-transparency [true] - Enable transparency effects
|
|
77
|
+
/// @param {Boolean} $enable-gradient [true] - Enable gradient overlay
|
|
78
|
+
/// @param {Boolean} $enable-shadow [true] - Enable shadow layers
|
|
79
|
+
/// @param {Boolean} $enable-border [false] - Enable border gradient
|
|
80
|
+
/// @param {Boolean} $enable-noise [false] - Enable noise texture
|
|
81
|
+
/// @param {String} $variant ['glass'] - Variant: 'glass', 'solid', 'mesh', 'shimmer'
|
|
10
82
|
@mixin dynamic-background(
|
|
11
83
|
$color,
|
|
12
84
|
$transparency: $background-transparency,
|
|
13
|
-
$
|
|
85
|
+
$enable-transparency: $background-transparency-enable,
|
|
86
|
+
$enable-gradient: $background-enable-gradient-overlay,
|
|
87
|
+
$enable-shadow: $background-enable-with-shadow,
|
|
88
|
+
$enable-border: false,
|
|
89
|
+
$enable-noise: $background-enable-noise-texture,
|
|
90
|
+
$variant: 'glass'
|
|
14
91
|
) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Top highlight layer
|
|
25
|
-
linear-gradient(
|
|
26
|
-
135deg,
|
|
27
|
-
rgba(255, 255, 255, 0.15) 0%,
|
|
28
|
-
rgba(255, 255, 255, 0.05) 25%,
|
|
29
|
-
transparent 50%
|
|
30
|
-
),
|
|
31
|
-
// Main liquid glass layer
|
|
32
|
-
linear-gradient(
|
|
33
|
-
to bottom,
|
|
34
|
-
color-mix(in srgb, #{$color} #{math.percentage($transparency * 1.2)}, transparent) 0%,
|
|
35
|
-
color-mix(in srgb, #{$color} #{math.percentage($transparency)}, transparent) 35%,
|
|
36
|
-
color-mix(in srgb, #{$color} #{math.percentage($transparency * 0.8)}, transparent) 65%,
|
|
37
|
-
color-mix(in srgb, #{$color} #{math.percentage($transparency * 1.1)}, transparent) 100%
|
|
38
|
-
),
|
|
39
|
-
// Bottom shadow layer
|
|
40
|
-
radial-gradient(
|
|
41
|
-
ellipse at bottom,
|
|
42
|
-
color-mix(in srgb, #{$color} #{math.percentage($transparency * 0.3)}, transparent) 0%,
|
|
43
|
-
transparent 70%
|
|
44
|
-
);
|
|
92
|
+
position: relative;
|
|
93
|
+
isolation: isolate;
|
|
94
|
+
@if $variant == 'glass' {
|
|
95
|
+
@if $enable-transparency and $enable-gradient {
|
|
96
|
+
background: _bg-glass($color, $transparency);
|
|
97
|
+
backdrop-filter: map.get($_bg-filters, 'glass');
|
|
98
|
+
} @else if $enable-transparency {
|
|
99
|
+
background-color: _bg-mix($color, $transparency);
|
|
100
|
+
backdrop-filter: map.get($_bg-filters, 'solid');
|
|
45
101
|
} @else {
|
|
46
|
-
background-color: color
|
|
47
|
-
in srgb,
|
|
48
|
-
#{$color} #{math.percentage($transparency)},
|
|
49
|
-
transparent
|
|
50
|
-
);
|
|
102
|
+
background-color: $color;
|
|
51
103
|
}
|
|
52
|
-
|
|
53
|
-
|
|
104
|
+
@if $enable-border { @include _bg-border(); }
|
|
105
|
+
@if $enable-noise { @include _bg-noise(); }
|
|
106
|
+
} @else if $variant == 'solid' {
|
|
107
|
+
background: if($enable-gradient, linear-gradient($background-gradient-angle, color.adjust($color, $lightness: 5%) 0%, $color 50%, color.adjust($color, $lightness: -5%) 100%), $color);
|
|
108
|
+
} @else if $variant == 'mesh' {
|
|
109
|
+
background: radial-gradient(circle at 20% 30%, _bg-mix($color, 0.4) 0%, transparent 50%), radial-gradient(circle at 80% 70%, _bg-mix($color, 0.35) 0%, transparent 50%), radial-gradient(circle at 50% 50%, _bg-mix($color, $transparency) 0%, _bg-mix($color, 0.39) 100%);
|
|
110
|
+
backdrop-filter: map.get($_bg-filters, 'mesh');
|
|
111
|
+
} @else if $variant == 'shimmer' {
|
|
112
|
+
background: _bg-mix($color, 0.75);
|
|
113
|
+
@include _bg-shimmer();
|
|
54
114
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
4px
|
|
68
|
-
8px
|
|
69
|
-
32px
|
|
70
|
-
color-mix(in srgb, #{$color} 20%, transparent),
|
|
71
|
-
0 1px 2px rgba(0, 0, 0, 0.1),
|
|
72
|
-
0 8px 20px color-mix(in srgb, #{$color} 20%, transparent),
|
|
73
|
-
0 1px 2px rgba(0, 0, 0, 0.1);
|
|
115
|
+
@if $enable-shadow { box-shadow: _bg-shadows($color); }
|
|
116
|
+
transition: background map.get($_bg-motion, 'base') map.get($_bg-motion, 'easing'), box-shadow map.get($_bg-motion, 'base') map.get($_bg-motion, 'easing');
|
|
117
|
+
@if $background-enable-hover-effects {
|
|
118
|
+
@media (hover: hover) {
|
|
119
|
+
&:hover {
|
|
120
|
+
@if $variant == 'glass' and $enable-transparency { background: _bg-glass($color, $transparency, 'hover'); }
|
|
121
|
+
@if $enable-shadow { box-shadow: _bg-shadows($color, true); }
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
&:active {
|
|
126
|
+
@if $variant == 'glass' and $enable-transparency { background: _bg-glass($color, $transparency, 'active'); }
|
|
74
127
|
}
|
|
75
128
|
}
|
|
129
|
+
|
|
130
|
+
// Changelog: Kept the public animation name intact while trimming it to the minimal required transform states.
|
|
131
|
+
@keyframes shimmer {
|
|
132
|
+
from { transform: translateX(-100%); }
|
|
133
|
+
to { transform: translateX(200%); }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Changelog: Preserved the public glass wrapper and routed it through the simplified core mixin.
|
|
137
|
+
/// Simplified dynamic background for quick usage
|
|
138
|
+
/// @param {Color} $color - Base color
|
|
139
|
+
/// @param {Number} $transparency [0.65] - Transparency level
|
|
140
|
+
@mixin glass-background($color, $transparency: $background-transparency) {
|
|
141
|
+
@include dynamic-background($color, $transparency, true, true, true, false, $background-enable-noise-texture, 'glass');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Changelog: Preserved the solid wrapper while delegating the implementation to the shared utility mixin.
|
|
145
|
+
/// Solid background with subtle gradient
|
|
146
|
+
/// @param {Color} $color - Base color
|
|
147
|
+
@mixin solid-background($color) { @include dynamic-background($color, $background-transparency, false, true, false, false, false, 'solid'); }
|
|
148
|
+
|
|
149
|
+
// Changelog: Preserved the mesh wrapper and kept the same defaults through the refactored core mixin.
|
|
150
|
+
/// Mesh gradient background
|
|
151
|
+
/// @param {Color} $color - Base color
|
|
152
|
+
/// @param {Number} $transparency [0.65] - Transparency level
|
|
153
|
+
@mixin mesh-background($color, $transparency: $background-transparency) { @include dynamic-background($color, $transparency, true, true, true, false, false, 'mesh'); }
|
|
154
|
+
|
|
155
|
+
// Changelog: Preserved the shimmer wrapper while delegating effect composition to the shared helpers.
|
|
156
|
+
/// Shimmer effect background
|
|
157
|
+
/// @param {Color} $color - Base color
|
|
158
|
+
/// @param {Number} $transparency [0.65] - Transparency level
|
|
159
|
+
@mixin shimmer-background($color, $transparency: $background-transparency) { @include dynamic-background($color, $transparency, true, true, false, false, false, 'shimmer'); }
|
|
@@ -146,13 +146,13 @@
|
|
|
146
146
|
#{$root}__header {
|
|
147
147
|
@include dynamic-background(
|
|
148
148
|
var(--#{config.$prefix}accordion-header-bg),
|
|
149
|
-
$
|
|
149
|
+
$enable-transparency: true
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
#{$root}__body {
|
|
153
153
|
@include dynamic-background(
|
|
154
154
|
var(--#{config.$prefix}accordion-header-bg),
|
|
155
|
-
$
|
|
155
|
+
$enable-transparency: true
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
&--glass {
|
|
47
47
|
@include dynamic-background(
|
|
48
48
|
var(--#{$prefix}tag-bg-color),
|
|
49
|
-
$
|
|
49
|
+
$enable-transparency: true,
|
|
50
50
|
$transparency: 0.2
|
|
51
51
|
);
|
|
52
52
|
border: 1px solid color-mix(in srgb, var(--#{$prefix}tag-color) 50%, transparent);
|
|
@@ -231,13 +231,13 @@
|
|
|
231
231
|
&--glass {
|
|
232
232
|
@include dynamic-background(
|
|
233
233
|
var(--#{config.$prefix}btn-bg),
|
|
234
|
-
$
|
|
234
|
+
$enable-transparency: true
|
|
235
235
|
);
|
|
236
236
|
|
|
237
237
|
&:hover {
|
|
238
238
|
@include dynamic-background(
|
|
239
239
|
var(--#{config.$prefix}btn-hover-bg),
|
|
240
|
-
$
|
|
240
|
+
$enable-transparency: true
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
width: 100%;
|
|
221
221
|
@include dynamic-background(
|
|
222
222
|
var(--#{config.$prefix}callout-bg),
|
|
223
|
-
$
|
|
223
|
+
$enable-transparency: true
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
&#{$root}--toast {
|
|
238
238
|
@include dynamic-background(
|
|
239
239
|
var(--#{config.$prefix}callout-bg),
|
|
240
|
-
$
|
|
240
|
+
$enable-transparency: true
|
|
241
241
|
);
|
|
242
242
|
box-shadow:
|
|
243
243
|
0 8px 32px rgba(0, 0, 0, 0.1),
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
|
|
223
223
|
&--glass {
|
|
224
224
|
max-width: none;
|
|
225
|
-
@include dynamic-background(var(--#{$prefix}card-bg), $
|
|
225
|
+
@include dynamic-background(var(--#{$prefix}card-bg), $enable-transparency: true);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
&--outlined {
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
&:active:not(&--disabled) {
|
|
310
|
-
transform: translateY(
|
|
310
|
+
transform: translateY(-2px); // Keep the same transform as hover state to prevent scale down effect
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
&:active:not(&--disabled) {
|
|
323
|
-
transform: translateY(
|
|
323
|
+
transform: translateY(-2px); // Keep the same transform as hover state to prevent scale down effect
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
// Hover elevation modifiers
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use '../../styles/01-settings/settings.colors' as *;
|
|
2
|
+
@use '../../styles/01-settings/settings.background' as *;
|
|
3
|
+
@use '../../styles/02-tools/tools.background' as *;
|
|
4
|
+
|
|
5
|
+
.c-dynamic-background {
|
|
6
|
+
// Base styles
|
|
7
|
+
min-height: 200px;
|
|
8
|
+
border-radius: 16px;
|
|
9
|
+
|
|
10
|
+
// Glass variant (default)
|
|
11
|
+
&--glass {
|
|
12
|
+
@include glass-background($primary-6, $background-transparency);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Solid variant
|
|
16
|
+
&--solid {
|
|
17
|
+
@include solid-background($primary-6);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Mesh variant
|
|
21
|
+
&--mesh {
|
|
22
|
+
@include mesh-background($primary-6, $background-transparency);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Shimmer variant
|
|
26
|
+
&--shimmer {
|
|
27
|
+
@include shimmer-background($primary-6, $background-transparency);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Border modifier
|
|
31
|
+
&--with-border {
|
|
32
|
+
&::before {
|
|
33
|
+
content: '';
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset: 0;
|
|
36
|
+
border-radius: inherit;
|
|
37
|
+
padding: $background-border-width;
|
|
38
|
+
background: linear-gradient(
|
|
39
|
+
$background-gradient-angle,
|
|
40
|
+
rgba(255, 255, 255, $background-border-opacity * 1.2) 0%,
|
|
41
|
+
rgba(255, 255, 255, $background-border-opacity * 0.6) 50%,
|
|
42
|
+
rgba(255, 255, 255, $background-border-opacity * 0.3) 100%
|
|
43
|
+
);
|
|
44
|
+
-webkit-mask:
|
|
45
|
+
linear-gradient(#fff 0 0) content-box,
|
|
46
|
+
linear-gradient(#fff 0 0);
|
|
47
|
+
-webkit-mask-composite: xor;
|
|
48
|
+
mask-composite: exclude;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Noise modifier
|
|
55
|
+
&--with-noise {
|
|
56
|
+
&::after {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
inset: 0;
|
|
60
|
+
border-radius: inherit;
|
|
61
|
+
opacity: $background-noise-opacity;
|
|
62
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 #{$background-noise-scale} #{$background-noise-scale}' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E");
|
|
63
|
+
background-size: #{$background-noise-scale}px;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
mix-blend-mode: overlay;
|
|
66
|
+
z-index: 2;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
transition: opacity 0.3s ease;
|
|
374
374
|
@include dynamic-background(
|
|
375
375
|
var(--#{$prefix}edge-panel-bg),
|
|
376
|
-
$
|
|
376
|
+
$enable-transparency: true
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
379
|
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
.c-edge-panel__backdrop {
|
|
407
407
|
@include dynamic-background(
|
|
408
408
|
var(--#{$prefix}edge-panel-backdrop-bg),
|
|
409
|
-
$
|
|
409
|
+
$enable-transparency: true
|
|
410
410
|
);
|
|
411
411
|
animation: fadeIn 0.3s ease forwards;
|
|
412
412
|
z-index: map.get($z-layers, 1);
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
// Glass morphism effect styles
|
|
110
110
|
&--glass {
|
|
111
|
-
@include dynamic-background(var(--#{$prefix}input-bg), $
|
|
111
|
+
@include dynamic-background(var(--#{$prefix}input-bg), $enable-transparency: true);
|
|
112
112
|
box-shadow:
|
|
113
113
|
0 8px 32px rgba(0, 0, 0, 0.1),
|
|
114
114
|
0 0 0 1px rgba(255, 255, 255, 0.1) inset;
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
&:hover {
|
|
119
119
|
@include dynamic-background(
|
|
120
120
|
var(--#{$prefix}input-bg),
|
|
121
|
-
$
|
|
121
|
+
$enable-transparency: true,
|
|
122
122
|
$transparency: 0.9
|
|
123
123
|
);
|
|
124
124
|
}
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
// Glass disabled state
|
|
131
131
|
&:disabled,
|
|
132
132
|
&.is-disabled {
|
|
133
|
-
@include dynamic-background(var(--#{$prefix}input-bg), $
|
|
133
|
+
@include dynamic-background(var(--#{$prefix}input-bg), $enable-transparency: true);
|
|
134
134
|
opacity: 0.6;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
padding: rem.rem(8px);
|
|
349
349
|
@include dynamic-background(
|
|
350
350
|
var(--#{config.$prefix}body-bg),
|
|
351
|
-
$
|
|
351
|
+
$enable-transparency: true,
|
|
352
352
|
$transparency: 0.15
|
|
353
353
|
);
|
|
354
354
|
}
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
#{$root}__text {
|
|
358
358
|
@include dynamic-background(
|
|
359
359
|
var(--#{config.$prefix}body-bg),
|
|
360
|
-
$
|
|
360
|
+
$enable-transparency: true
|
|
361
361
|
);
|
|
362
362
|
backdrop-filter: blur(8px);
|
|
363
363
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
#{$root}__text {
|
|
370
370
|
@include dynamic-background(
|
|
371
371
|
var(--#{config.$prefix}brand-bg-subtle),
|
|
372
|
-
$
|
|
372
|
+
$enable-transparency: true
|
|
373
373
|
);
|
|
374
374
|
border: 1px solid rgba(var(--#{config.$prefix}primary-rgb), 0.3);
|
|
375
375
|
backdrop-filter: blur(8px);
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
#{$root}__file {
|
|
379
379
|
@include dynamic-background(
|
|
380
380
|
var(--#{config.$prefix}brand-bg-subtle),
|
|
381
|
-
$
|
|
381
|
+
$enable-transparency: true
|
|
382
382
|
);
|
|
383
383
|
border: 1px solid rgba(var(--#{config.$prefix}primary-rgb), 0.3);
|
|
384
384
|
backdrop-filter: blur(8px);
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
#{$root}__file {
|
|
390
390
|
@include dynamic-background(
|
|
391
391
|
var(--#{config.$prefix}brand-bg-subtle),
|
|
392
|
-
$
|
|
392
|
+
$enable-transparency: true
|
|
393
393
|
);
|
|
394
394
|
border: 1px solid rgba(var(--#{config.$prefix}primary-rgb), 0.3);
|
|
395
395
|
backdrop-filter: blur(8px);
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
#{$root}__file-icon {
|
|
401
401
|
@include dynamic-background(
|
|
402
402
|
var(--#{config.$prefix}brand-bg-subtle),
|
|
403
|
-
$
|
|
403
|
+
$enable-transparency: true
|
|
404
404
|
);
|
|
405
405
|
backdrop-filter: blur(8px);
|
|
406
406
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
&--glass {
|
|
253
253
|
position: relative;
|
|
254
254
|
background-color: transparent;
|
|
255
|
-
@include dynamic-background(var(--#{$prefix}navbar-bg), $
|
|
255
|
+
@include dynamic-background(var(--#{$prefix}navbar-bg), $enable-transparency: true);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
&--fixed-bottom {
|
|
@@ -87,21 +87,21 @@
|
|
|
87
87
|
#{$root}__content {
|
|
88
88
|
@include dynamic-background(
|
|
89
89
|
var(--#{$prefix}tooltip-bg),
|
|
90
|
-
$
|
|
90
|
+
$enable-transparency: true,
|
|
91
91
|
$transparency: 0.3
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
#{$root}__arrow {
|
|
95
95
|
@include dynamic-background(
|
|
96
96
|
var(--#{$prefix}tooltip-bg),
|
|
97
|
-
$
|
|
97
|
+
$enable-transparency: true,
|
|
98
98
|
$transparency: 0.3
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
#{$root}__arrow {
|
|
102
102
|
@include dynamic-background(
|
|
103
103
|
var(--#{$prefix}tooltip-bg),
|
|
104
|
-
$
|
|
104
|
+
$enable-transparency: true,
|
|
105
105
|
$transparency: 0.3
|
|
106
106
|
);
|
|
107
107
|
}
|
|
@@ -64,12 +64,11 @@ $utilities-link: (
|
|
|
64
64
|
$enable-important-utilities: true !default;
|
|
65
65
|
$link-shade-percentage: 15% !default;
|
|
66
66
|
|
|
67
|
-
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
|
68
67
|
@each $color, $value in color-maps.$theme-colors {
|
|
69
68
|
.u-link-#{$color} {
|
|
70
|
-
color:
|
|
69
|
+
color: rgba(var(--#{config.$prefix}#{$color}-rgb), var(--#{config.$prefix}u-link-opacity, 1))
|
|
71
70
|
if($enable-important-utilities, !important, null);
|
|
72
|
-
text-decoration-color:
|
|
71
|
+
text-decoration-color: rgba(
|
|
73
72
|
var(--#{config.$prefix}#{$color}-rgb),
|
|
74
73
|
var(--#{config.$prefix}u-link-underline-opacity, 1)
|
|
75
74
|
)
|
|
@@ -83,9 +82,9 @@ $link-shade-percentage: 15% !default;
|
|
|
83
82
|
shade-color($value, $link-shade-percentage),
|
|
84
83
|
tint-color($value, $link-shade-percentage)
|
|
85
84
|
);
|
|
86
|
-
color:
|
|
85
|
+
color: rgba(#{to-rgb($hover-color)}, var(--#{config.$prefix}u-link-opacity, 1))
|
|
87
86
|
if($enable-important-utilities, !important, null);
|
|
88
|
-
text-decoration-color:
|
|
87
|
+
text-decoration-color: rgba(
|
|
89
88
|
#{to-rgb($hover-color)},
|
|
90
89
|
var(--#{config.$prefix}u-link-underline-opacity, 1)
|
|
91
90
|
)
|