@shohojdhara/atomix 0.5.5 → 0.5.7
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 +1016 -1681
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +5 -5
- package/dist/atomix.min.css.map +1 -1
- package/dist/core.d.ts +102 -9
- 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 +181 -55
- package/dist/index.esm.js +112 -99
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +112 -99
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +40 -25
- package/src/components/Breadcrumb/Breadcrumb.tsx +23 -14
- 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/types/components.ts +84 -0
- package/src/styles/01-settings/_settings.background.scss +2 -1
- package/src/styles/02-tools/_tools.background.scss +100 -294
- package/src/styles/06-components/_components.avatar-group.scss +1 -3
- package/src/styles/06-components/_components.avatar.scss +1 -1
- package/src/styles/06-components/_components.badge.scss +2 -2
- package/src/styles/06-components/_components.button.scss +3 -3
- package/src/styles/06-components/_components.callout.scss +5 -5
- package/src/styles/06-components/_components.card.scss +4 -7
- package/src/styles/06-components/_components.checkbox.scss +1 -1
- package/src/styles/06-components/_components.data-table.scss +1 -1
- package/src/styles/06-components/_components.datepicker.scss +1 -1
- package/src/styles/06-components/_components.dropdown.scss +3 -3
- package/src/styles/06-components/_components.edge-panel.scss +5 -9
- package/src/styles/06-components/_components.footer.scss +12 -13
- package/src/styles/06-components/_components.hero.scss +2 -2
- package/src/styles/06-components/_components.input.scss +3 -3
- package/src/styles/06-components/_components.list.scss +1 -1
- package/src/styles/06-components/_components.menu.scss +2 -2
- package/src/styles/06-components/_components.messages.scss +16 -18
- package/src/styles/06-components/_components.modal.scss +6 -6
- package/src/styles/06-components/_components.nav.scss +0 -3
- package/src/styles/06-components/_components.navbar.scss +3 -3
- package/src/styles/06-components/_components.pagination.scss +3 -3
- package/src/styles/06-components/_components.photoviewer.scss +3 -3
- package/src/styles/06-components/_components.popover.scss +3 -3
- package/src/styles/06-components/_components.product-review.scss +2 -2
- package/src/styles/06-components/_components.progress.scss +2 -2
- package/src/styles/06-components/_components.river.scss +1 -1
- package/src/styles/06-components/_components.sectionintro.scss +1 -1
- package/src/styles/06-components/_components.select.scss +5 -6
- package/src/styles/06-components/_components.side-menu.scss +6 -6
- package/src/styles/06-components/_components.skeleton.scss +8 -8
- package/src/styles/06-components/_components.slider.scss +6 -6
- package/src/styles/06-components/_components.steps.scss +2 -2
- package/src/styles/06-components/_components.tabs.scss +2 -2
- package/src/styles/06-components/_components.todo.scss +1 -1
- package/src/styles/06-components/_components.toggle.scss +3 -5
- package/src/styles/06-components/_components.tooltip.scss +2 -4
- package/src/styles/06-components/_components.upload.scss +1 -2
- package/src/styles/06-components/_components.video-player.scss +2 -2
- package/src/styles/99-utilities/_utilities.link.scss +4 -5
|
@@ -1,14 +1,75 @@
|
|
|
1
|
-
@use 'sass:meta';
|
|
2
|
-
@use 'sass:string';
|
|
3
1
|
@use 'sass:math';
|
|
4
2
|
@use 'sass:color';
|
|
5
3
|
@use 'sass:map';
|
|
6
4
|
@use 'sass:list';
|
|
7
5
|
@use '../01-settings/settings.background' as *;
|
|
8
|
-
@use '../01-settings/settings.config' as *;
|
|
9
6
|
@use '../01-settings/settings.colors' as *;
|
|
10
|
-
|
|
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
|
+
*/
|
|
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
|
+
}
|
|
11
71
|
|
|
72
|
+
// Changelog: Rebuilt the main utility mixin around private helpers to preserve the API while removing nesting and redundancy.
|
|
12
73
|
/// Dynamic background mixin with glass morphism effects
|
|
13
74
|
/// @param {Color} $color - Base color for the background
|
|
14
75
|
/// @param {Number} $transparency [0.65] - Transparency level (0-1)
|
|
@@ -28,326 +89,71 @@
|
|
|
28
89
|
$enable-noise: $background-enable-noise-texture,
|
|
29
90
|
$variant: 'glass'
|
|
30
91
|
) {
|
|
31
|
-
// Base positioning for pseudo-elements
|
|
32
92
|
position: relative;
|
|
33
93
|
isolation: isolate;
|
|
34
|
-
|
|
35
|
-
// ─── Glass Variant (Default) ────────────────────────────────────────────────
|
|
36
94
|
@if $variant == 'glass' {
|
|
37
|
-
@if $enable-transparency {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
transparent 0%,
|
|
44
|
-
rgba(255, 255, 255, 0.08) 45%,
|
|
45
|
-
rgba(255, 255, 255, 0.12) 50%,
|
|
46
|
-
rgba(255, 255, 255, 0.08) 55%,
|
|
47
|
-
transparent 100%
|
|
48
|
-
),
|
|
49
|
-
// Top edge highlight
|
|
50
|
-
linear-gradient(
|
|
51
|
-
180deg,
|
|
52
|
-
rgba(255, 255, 255, 0.15) 0%,
|
|
53
|
-
rgba(255, 255, 255, 0.05) 15%,
|
|
54
|
-
transparent 30%
|
|
55
|
-
),
|
|
56
|
-
// Main glass layer with depth
|
|
57
|
-
linear-gradient(
|
|
58
|
-
$background-gradient-angle,
|
|
59
|
-
color-mix(in srgb, #{$color} 78%, transparent) 0%,
|
|
60
|
-
color-mix(in srgb, #{$color} 65%, transparent) 40%,
|
|
61
|
-
color-mix(in srgb, #{$color} 55%, transparent) 70%,
|
|
62
|
-
color-mix(in srgb, #{$color} 68%, transparent) 100%
|
|
63
|
-
),
|
|
64
|
-
// Bottom ambient shadow
|
|
65
|
-
radial-gradient(
|
|
66
|
-
ellipse 120% 80% at 50% 120%,
|
|
67
|
-
color-mix(in srgb, #{$color} 26%, transparent) 0%,
|
|
68
|
-
transparent 60%
|
|
69
|
-
);
|
|
70
|
-
backdrop-filter: blur(12px) saturate(1.4);
|
|
71
|
-
-webkit-backdrop-filter: blur(12px) saturate(1.4);
|
|
72
|
-
} @else {
|
|
73
|
-
background-color: color-mix(
|
|
74
|
-
in srgb,
|
|
75
|
-
#{$color} 65%,
|
|
76
|
-
transparent
|
|
77
|
-
);
|
|
78
|
-
backdrop-filter: blur(8px);
|
|
79
|
-
-webkit-backdrop-filter: blur(8px);
|
|
80
|
-
}
|
|
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');
|
|
81
101
|
} @else {
|
|
82
102
|
background-color: $color;
|
|
83
103
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
$background-gradient-angle,
|
|
95
|
-
rgba(255, 255, 255, $background-border-opacity * 1.2) 0%,
|
|
96
|
-
rgba(255, 255, 255, $background-border-opacity * 0.6) 50%,
|
|
97
|
-
rgba(255, 255, 255, $background-border-opacity * 0.3) 100%
|
|
98
|
-
);
|
|
99
|
-
-webkit-mask:
|
|
100
|
-
linear-gradient(#fff 0 0) content-box,
|
|
101
|
-
linear-gradient(#fff 0 0);
|
|
102
|
-
-webkit-mask-composite: xor;
|
|
103
|
-
mask-composite: exclude;
|
|
104
|
-
pointer-events: none;
|
|
105
|
-
z-index: 1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Noise texture overlay
|
|
110
|
-
@if $enable-noise {
|
|
111
|
-
&::after {
|
|
112
|
-
content: '';
|
|
113
|
-
position: absolute;
|
|
114
|
-
inset: 0;
|
|
115
|
-
border-radius: inherit;
|
|
116
|
-
opacity: $background-noise-opacity;
|
|
117
|
-
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");
|
|
118
|
-
background-size: #{$background-noise-scale}px;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
mix-blend-mode: overlay;
|
|
121
|
-
z-index: 2;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// ─── Solid Variant ──────────────────────────────────────────────────────────
|
|
127
|
-
@else if $variant == 'solid' {
|
|
128
|
-
background-color: $color;
|
|
129
|
-
@if $enable-gradient {
|
|
130
|
-
background: linear-gradient(
|
|
131
|
-
$background-gradient-angle,
|
|
132
|
-
color.adjust($color, $lightness: 5%) 0%,
|
|
133
|
-
$color 50%,
|
|
134
|
-
color.adjust($color, $lightness: -5%) 100%
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// ─── Mesh Gradient Variant ──────────────────────────────────────────────────
|
|
140
|
-
@else if $variant == 'mesh' {
|
|
141
|
-
background:
|
|
142
|
-
radial-gradient(
|
|
143
|
-
circle at 20% 30%,
|
|
144
|
-
color-mix(in srgb, #{$color} 40%, transparent) 0%,
|
|
145
|
-
transparent 50%
|
|
146
|
-
),
|
|
147
|
-
radial-gradient(
|
|
148
|
-
circle at 80% 70%,
|
|
149
|
-
color-mix(in srgb, #{$color} 35%, transparent) 0%,
|
|
150
|
-
transparent 50%
|
|
151
|
-
),
|
|
152
|
-
radial-gradient(
|
|
153
|
-
circle at 50% 50%,
|
|
154
|
-
color-mix(in srgb, #{$color} 65%, transparent) 0%,
|
|
155
|
-
color-mix(in srgb, #{$color} 39%, transparent) 100%
|
|
156
|
-
);
|
|
157
|
-
backdrop-filter: blur(16px);
|
|
158
|
-
-webkit-backdrop-filter: blur(16px);
|
|
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();
|
|
159
114
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
);
|
|
168
|
-
overflow: hidden;
|
|
169
|
-
|
|
170
|
-
&::before {
|
|
171
|
-
content: '';
|
|
172
|
-
position: absolute;
|
|
173
|
-
inset: 0;
|
|
174
|
-
background: linear-gradient(
|
|
175
|
-
110deg,
|
|
176
|
-
transparent 0%,
|
|
177
|
-
rgba(255, 255, 255, $background-shimmer-intensity) 50%,
|
|
178
|
-
transparent 100%
|
|
179
|
-
);
|
|
180
|
-
transform: translateX(-100%);
|
|
181
|
-
animation: shimmer $background-shimmer-duration infinite;
|
|
182
|
-
pointer-events: none;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// ─── Shadow Layers ──────────────────────────────────────────────────────────
|
|
187
|
-
@if $enable-shadow {
|
|
188
|
-
$shadow-list: ();
|
|
189
|
-
|
|
190
|
-
// Inner glow
|
|
191
|
-
$shadow-list: list.append(
|
|
192
|
-
$shadow-list,
|
|
193
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.1),
|
|
194
|
-
comma
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
// Layered outer shadows
|
|
198
|
-
@for $i from 1 through $background-shadow-layers {
|
|
199
|
-
$blur: $background-shadow-blur-base * $i;
|
|
200
|
-
$spread: if($i == 1, $background-shadow-spread, 0);
|
|
201
|
-
$opacity: math.div($background-shadow-intensity, $i);
|
|
202
|
-
|
|
203
|
-
$shadow-list: list.append(
|
|
204
|
-
$shadow-list,
|
|
205
|
-
0 #{$blur} #{$blur * 2} #{$spread} color-mix(in srgb, #{$color} #{math.percentage($opacity * 100)}, transparent),
|
|
206
|
-
comma
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// Ambient shadow
|
|
211
|
-
$shadow-list: list.append(
|
|
212
|
-
$shadow-list,
|
|
213
|
-
0 2px 4px rgba(0, 0, 0, 0.05),
|
|
214
|
-
comma
|
|
215
|
-
);
|
|
216
|
-
|
|
217
|
-
box-shadow: $shadow-list;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// ─── Hover & Active States ──────────────────────────────────────────────────
|
|
221
|
-
transition:
|
|
222
|
-
background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
223
|
-
box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
224
|
-
transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
225
|
-
|
|
226
|
-
@media (hover: hover) {
|
|
227
|
-
&:hover {
|
|
228
|
-
@if $variant == 'glass' and $enable-transparency {
|
|
229
|
-
& {
|
|
230
|
-
background:
|
|
231
|
-
linear-gradient(
|
|
232
|
-
110deg,
|
|
233
|
-
transparent 0%,
|
|
234
|
-
rgba(255, 255, 255, 0.1) 45%,
|
|
235
|
-
rgba(255, 255, 255, 0.15) 50%,
|
|
236
|
-
rgba(255, 255, 255, 0.1) 55%,
|
|
237
|
-
transparent 100%
|
|
238
|
-
),
|
|
239
|
-
linear-gradient(
|
|
240
|
-
180deg,
|
|
241
|
-
rgba(255, 255, 255, 0.18) 0%,
|
|
242
|
-
rgba(255, 255, 255, 0.08) 15%,
|
|
243
|
-
transparent 30%
|
|
244
|
-
),
|
|
245
|
-
linear-gradient(
|
|
246
|
-
$background-gradient-angle,
|
|
247
|
-
color-mix(in srgb, #{$color} 96%, transparent) 0%,
|
|
248
|
-
color-mix(in srgb, #{$color} 80%, transparent) 40%,
|
|
249
|
-
color-mix(in srgb, #{$color} 68%, transparent) 70%,
|
|
250
|
-
color-mix(in srgb, #{$color} 84%, transparent) 100%
|
|
251
|
-
),
|
|
252
|
-
radial-gradient(
|
|
253
|
-
ellipse 120% 80% at 50% 120%,
|
|
254
|
-
color-mix(in srgb, #{$color} 40%, transparent) 0%,
|
|
255
|
-
transparent 60%
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
@if $enable-shadow {
|
|
261
|
-
& {
|
|
262
|
-
box-shadow:
|
|
263
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.15),
|
|
264
|
-
0 #{$background-shadow-blur-base * 1.5} #{$background-shadow-blur-base * 3} #{$background-shadow-spread} color-mix(in srgb, #{$color} #{math.percentage($background-shadow-intensity * 150)}, transparent),
|
|
265
|
-
0 #{$background-shadow-blur-base * 2.5} #{$background-shadow-blur-base * 5} 0 color-mix(in srgb, #{$color} #{math.percentage($background-shadow-intensity * 100)}, transparent),
|
|
266
|
-
0 2px 4px rgba(0, 0, 0, 0.08);
|
|
267
|
-
}
|
|
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); }
|
|
268
122
|
}
|
|
269
123
|
}
|
|
270
124
|
}
|
|
271
|
-
|
|
272
125
|
&:active {
|
|
273
|
-
@if $variant == 'glass' and $enable-transparency {
|
|
274
|
-
& {
|
|
275
|
-
background:
|
|
276
|
-
linear-gradient(
|
|
277
|
-
180deg,
|
|
278
|
-
rgba(255, 255, 255, 0.12) 0%,
|
|
279
|
-
rgba(255, 255, 255, 0.05) 20%,
|
|
280
|
-
transparent 40%
|
|
281
|
-
),
|
|
282
|
-
linear-gradient(
|
|
283
|
-
$background-gradient-angle,
|
|
284
|
-
color-mix(in srgb, #{$color} 108%, transparent) 0%,
|
|
285
|
-
color-mix(in srgb, #{$color} 90%, transparent) 50%,
|
|
286
|
-
color-mix(in srgb, #{$color} 81%, transparent) 100%
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
& {
|
|
291
|
-
transform: scale(0.98);
|
|
292
|
-
}
|
|
126
|
+
@if $variant == 'glass' and $enable-transparency { background: _bg-glass($color, $transparency, 'active'); }
|
|
293
127
|
}
|
|
294
128
|
}
|
|
295
129
|
|
|
296
|
-
//
|
|
130
|
+
// Changelog: Kept the public animation name intact while trimming it to the minimal required transform states.
|
|
297
131
|
@keyframes shimmer {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
100% {
|
|
302
|
-
transform: translateX(200%);
|
|
303
|
-
}
|
|
132
|
+
from { transform: translateX(-100%); }
|
|
133
|
+
to { transform: translateX(200%); }
|
|
304
134
|
}
|
|
305
135
|
|
|
136
|
+
// Changelog: Preserved the public glass wrapper and routed it through the simplified core mixin.
|
|
306
137
|
/// Simplified dynamic background for quick usage
|
|
307
138
|
/// @param {Color} $color - Base color
|
|
308
139
|
/// @param {Number} $transparency [0.65] - Transparency level
|
|
309
140
|
@mixin glass-background($color, $transparency: $background-transparency) {
|
|
310
|
-
@include dynamic-background(
|
|
311
|
-
$color: $color,
|
|
312
|
-
$transparency: $transparency,
|
|
313
|
-
$enable-transparency: true,
|
|
314
|
-
$enable-gradient: true,
|
|
315
|
-
$enable-shadow: true,
|
|
316
|
-
$variant: 'glass'
|
|
317
|
-
);
|
|
141
|
+
@include dynamic-background($color, $transparency, true, true, true, false, $background-enable-noise-texture, 'glass');
|
|
318
142
|
}
|
|
319
143
|
|
|
144
|
+
// Changelog: Preserved the solid wrapper while delegating the implementation to the shared utility mixin.
|
|
320
145
|
/// Solid background with subtle gradient
|
|
321
146
|
/// @param {Color} $color - Base color
|
|
322
|
-
@mixin solid-background($color) {
|
|
323
|
-
@include dynamic-background(
|
|
324
|
-
$color: $color,
|
|
325
|
-
$variant: 'solid',
|
|
326
|
-
$enable-gradient: true,
|
|
327
|
-
$enable-shadow: false
|
|
328
|
-
);
|
|
329
|
-
}
|
|
147
|
+
@mixin solid-background($color) { @include dynamic-background($color, $background-transparency, false, true, false, false, false, 'solid'); }
|
|
330
148
|
|
|
149
|
+
// Changelog: Preserved the mesh wrapper and kept the same defaults through the refactored core mixin.
|
|
331
150
|
/// Mesh gradient background
|
|
332
151
|
/// @param {Color} $color - Base color
|
|
333
152
|
/// @param {Number} $transparency [0.65] - Transparency level
|
|
334
|
-
@mixin mesh-background($color, $transparency: $background-transparency) {
|
|
335
|
-
@include dynamic-background(
|
|
336
|
-
$color: $color,
|
|
337
|
-
$transparency: $transparency,
|
|
338
|
-
$variant: 'mesh',
|
|
339
|
-
$enable-shadow: true
|
|
340
|
-
);
|
|
341
|
-
}
|
|
153
|
+
@mixin mesh-background($color, $transparency: $background-transparency) { @include dynamic-background($color, $transparency, true, true, true, false, false, 'mesh'); }
|
|
342
154
|
|
|
155
|
+
// Changelog: Preserved the shimmer wrapper while delegating effect composition to the shared helpers.
|
|
343
156
|
/// Shimmer effect background
|
|
344
157
|
/// @param {Color} $color - Base color
|
|
345
158
|
/// @param {Number} $transparency [0.65] - Transparency level
|
|
346
|
-
@mixin shimmer-background($color, $transparency: $background-transparency) {
|
|
347
|
-
@include dynamic-background(
|
|
348
|
-
$color: $color,
|
|
349
|
-
$transparency: $transparency,
|
|
350
|
-
$variant: 'shimmer',
|
|
351
|
-
$enable-shadow: false
|
|
352
|
-
);
|
|
353
|
-
}
|
|
159
|
+
@mixin shimmer-background($color, $transparency: $background-transparency) { @include dynamic-background($color, $transparency, true, true, false, false, false, 'shimmer'); }
|
|
@@ -36,14 +36,12 @@
|
|
|
36
36
|
color: var(--#{$prefix}avatar-group-more-color);
|
|
37
37
|
font-size: var(--#{$prefix}avatar-group-more-font-size);
|
|
38
38
|
font-weight: var(--#{$prefix}avatar-group-more-font-weight);
|
|
39
|
-
@include dynamic-background(var(--#{$prefix}avatar-group-more-bg));
|
|
40
39
|
border: var(--#{$prefix}avatar-group-more-border-width) solid
|
|
41
40
|
var(--#{$prefix}avatar-group-more-border-color);
|
|
42
|
-
|
|
43
|
-
// Inherit size and shape from avatars
|
|
44
41
|
width: var(--#{$prefix}avatar-size);
|
|
45
42
|
height: var(--#{$prefix}avatar-size);
|
|
46
43
|
border-radius: var(--#{$prefix}avatar-border-radius);
|
|
44
|
+
@include dynamic-background(var(--#{$prefix}avatar-group-more-bg));
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
// Stacked variant
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
justify-content: center;
|
|
33
33
|
@include square(var(--#{$prefix}avatar-size));
|
|
34
34
|
border-radius: var(--#{$prefix}avatar-border-radius);
|
|
35
|
-
@include dynamic-background(var(--#{$prefix}avatar-bg));
|
|
36
35
|
color: var(--#{$prefix}avatar-color);
|
|
37
36
|
border: var(--#{$prefix}avatar-border-width) solid var(--#{$prefix}avatar-border-color);
|
|
38
37
|
overflow: hidden;
|
|
39
38
|
user-select: none;
|
|
40
39
|
@include basic-transition(opacity);
|
|
40
|
+
@include dynamic-background(var(--#{$prefix}avatar-bg));
|
|
41
41
|
|
|
42
42
|
// Size variants
|
|
43
43
|
@each $size, $value in $avatar-size {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
line-height: 1;
|
|
27
27
|
padding: var(--#{$prefix}tag-padding-y) var(--#{$prefix}tag-padding-x);
|
|
28
28
|
border-radius: var(--#{$prefix}tag-border-radius);
|
|
29
|
-
@include dynamic-background(var(--#{$prefix}tag-bg-color));
|
|
30
29
|
user-select: none;
|
|
30
|
+
@include dynamic-background(var(--#{$prefix}tag-bg-color));
|
|
31
31
|
|
|
32
32
|
&__icon {
|
|
33
33
|
font-size: var(--#{$prefix}tag-icon-size);
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&--glass {
|
|
47
|
+
border: 1px solid color-mix(in srgb, var(--#{$prefix}tag-color) 50%, transparent);
|
|
47
48
|
@include dynamic-background(
|
|
48
49
|
var(--#{$prefix}tag-bg-color),
|
|
49
50
|
$enable-transparency: true,
|
|
50
51
|
$transparency: 0.2
|
|
51
52
|
);
|
|
52
|
-
border: 1px solid color-mix(in srgb, var(--#{$prefix}tag-color) 50%, transparent);
|
|
53
53
|
|
|
54
54
|
// // Outer depth and glass effect
|
|
55
55
|
// 0 1px 3px rgba(0, 0, 0, 0.2),
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
text-decoration: if(colors.$link-decoration == none, null, none);
|
|
45
45
|
white-space: button.$btn-white-space;
|
|
46
46
|
vertical-align: middle;
|
|
47
|
-
@include dynamic-background(var(--#{config.$prefix}btn-bg));
|
|
48
47
|
cursor: if(button.$enable-button-pointers, pointer, null);
|
|
49
48
|
user-select: none;
|
|
50
49
|
border: var(--#{config.$prefix}btn-border-width) solid var(--#{config.$prefix}btn-border-color);
|
|
51
50
|
border-radius: var(--#{config.$prefix}btn-border-radius);
|
|
52
51
|
transition: button.$btn-transition;
|
|
52
|
+
@include dynamic-background(var(--#{config.$prefix}btn-bg));
|
|
53
53
|
|
|
54
54
|
&__icon {
|
|
55
55
|
font-size: var(--#{config.$prefix}btn-icon-size);
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
&:hover {
|
|
59
59
|
color: var(--#{config.$prefix}btn-hover-color);
|
|
60
60
|
text-decoration: if(colors.$link-hover-decoration == underline, none, null);
|
|
61
|
-
@include dynamic-background(var(--#{config.$prefix}btn-hover-bg));
|
|
62
61
|
border-color: var(--#{config.$prefix}btn-hover-border-color);
|
|
62
|
+
@include dynamic-background(var(--#{config.$prefix}btn-hover-bg));
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@each $color, $value in color-maps.$theme-colors {
|
|
@@ -216,11 +216,11 @@
|
|
|
216
216
|
fieldset:disabled & {
|
|
217
217
|
color: var(--#{config.$prefix}btn-disabled-color);
|
|
218
218
|
pointer-events: none;
|
|
219
|
-
@include dynamic-background(var(--#{config.$prefix}btn-disabled-bg));
|
|
220
219
|
background-image: if(button.$enable-gradients, none, null);
|
|
221
220
|
border-color: var(--#{config.$prefix}btn-disabled-border-color);
|
|
222
221
|
opacity: var(--#{config.$prefix}btn-disabled-opacity);
|
|
223
222
|
cursor: not-allowed;
|
|
223
|
+
@include dynamic-background(var(--#{config.$prefix}btn-disabled-bg));
|
|
224
224
|
|
|
225
225
|
&:focus-visible {
|
|
226
226
|
outline: none;
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
max-width: var(--#{config.$prefix}callout-width);
|
|
42
42
|
gap: var(--#{config.$prefix}callout-actions-spacer);
|
|
43
43
|
padding: var(--#{config.$prefix}callout-padding-y) var(--#{config.$prefix}callout-padding-x);
|
|
44
|
-
@include dynamic-background(var(--#{config.$prefix}callout-bg));
|
|
45
44
|
border-radius: var(--#{config.$prefix}callout-border-radius);
|
|
46
45
|
border: var(--#{config.$prefix}callout-border-witdh) solid
|
|
47
46
|
var(--#{config.$prefix}callout-border-color);
|
|
@@ -50,6 +49,7 @@
|
|
|
50
49
|
var(--#{config.$prefix}callout-transition-timing),
|
|
51
50
|
transform var(--#{config.$prefix}callout-transition-duration)
|
|
52
51
|
var(--#{config.$prefix}callout-transition-timing);
|
|
52
|
+
@include dynamic-background(var(--#{config.$prefix}callout-bg));
|
|
53
53
|
|
|
54
54
|
&__content {
|
|
55
55
|
width: 100%;
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
align-items: flex-start;
|
|
146
146
|
justify-content: flex-start;
|
|
147
147
|
border: none;
|
|
148
|
-
@include dynamic-background(var(--#{config.$prefix}callout-toast-bg));
|
|
149
148
|
box-shadow: var(--#{config.$prefix}callout-box-shadow);
|
|
150
149
|
animation: calloutToastIn 0.3s var(--#{config.$prefix}callout-transition-timing) forwards;
|
|
150
|
+
@include dynamic-background(var(--#{config.$prefix}callout-toast-bg));
|
|
151
151
|
|
|
152
152
|
#{$root} {
|
|
153
153
|
&__content {
|
|
@@ -235,13 +235,13 @@
|
|
|
235
235
|
|
|
236
236
|
// Glass effect for toast variant
|
|
237
237
|
&#{$root}--toast {
|
|
238
|
+
box-shadow:
|
|
239
|
+
0 8px 32px rgba(0, 0, 0, 0.1),
|
|
240
|
+
0 0 0 1px rgba(255, 255, 255, 0.1) inset;
|
|
238
241
|
@include dynamic-background(
|
|
239
242
|
var(--#{config.$prefix}callout-bg),
|
|
240
243
|
$enable-transparency: true
|
|
241
244
|
);
|
|
242
|
-
box-shadow:
|
|
243
|
-
0 8px 32px rgba(0, 0, 0, 0.1),
|
|
244
|
-
0 0 0 1px rgba(255, 255, 255, 0.1) inset;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
|
|
@@ -42,14 +42,11 @@
|
|
|
42
42
|
padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
|
|
43
43
|
border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
|
|
44
44
|
border-radius: var(--#{$prefix}card-border-radius);
|
|
45
|
-
@include basic-transition();
|
|
46
|
-
|
|
47
|
-
@include dynamic-background(var(--#{$prefix}card-bg));
|
|
48
|
-
|
|
49
|
-
// Link card support - ensure anchor elements behave like block elements
|
|
50
45
|
display: block;
|
|
51
46
|
text-decoration: none;
|
|
52
47
|
color: inherit;
|
|
48
|
+
@include basic-transition();
|
|
49
|
+
@include dynamic-background(var(--#{$prefix}card-bg));
|
|
53
50
|
|
|
54
51
|
// Reset anchor element default styles when card is used as a link
|
|
55
52
|
// This needs higher specificity to override global link styles
|
|
@@ -307,7 +304,7 @@
|
|
|
307
304
|
}
|
|
308
305
|
|
|
309
306
|
&:active:not(&--disabled) {
|
|
310
|
-
transform: translateY(
|
|
307
|
+
transform: translateY(-2px); // Keep the same transform as hover state to prevent scale down effect
|
|
311
308
|
}
|
|
312
309
|
}
|
|
313
310
|
|
|
@@ -320,7 +317,7 @@
|
|
|
320
317
|
}
|
|
321
318
|
|
|
322
319
|
&:active:not(&--disabled) {
|
|
323
|
-
transform: translateY(
|
|
320
|
+
transform: translateY(-2px); // Keep the same transform as hover state to prevent scale down effect
|
|
324
321
|
}
|
|
325
322
|
|
|
326
323
|
// Hover elevation modifiers
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
&__input {
|
|
35
35
|
position: relative;
|
|
36
36
|
appearance: none;
|
|
37
|
-
@include dynamic-background(var(--#{$prefix}checkbox-bg));
|
|
38
37
|
width: var(--#{$prefix}checkbox-width);
|
|
39
38
|
height: var(--#{$prefix}checkbox-height);
|
|
40
39
|
color: currentColor;
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
border-radius: var(--#{$prefix}checkbox-border-radius);
|
|
43
42
|
overflow: hidden;
|
|
44
43
|
@include basic-transition();
|
|
44
|
+
@include dynamic-background(var(--#{$prefix}checkbox-bg));
|
|
45
45
|
|
|
46
46
|
&[type='radio'] {
|
|
47
47
|
border-radius: $border-radius-pill;
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
width: 100%;
|
|
34
34
|
margin-bottom: 0;
|
|
35
35
|
color: var(--#{config.$prefix}data-table-color);
|
|
36
|
-
@include dynamic-background(var(--#{config.$prefix}data-table-bg));
|
|
37
36
|
border-collapse: collapse;
|
|
37
|
+
@include dynamic-background(var(--#{config.$prefix}data-table-bg));
|
|
38
38
|
|
|
39
39
|
// Header
|
|
40
40
|
&__header {
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
z-index: map.get($z-layers, 5);
|
|
107
107
|
width: var(--#{$prefix}datepicker-width);
|
|
108
108
|
padding: var(--#{$prefix}datepicker-padding-y) var(--#{$prefix}datepicker-padding-x);
|
|
109
|
-
@include dynamic-background(var(--#{$prefix}datepicker-bg));
|
|
110
109
|
border-radius: var(--#{$prefix}datepicker-border-radius);
|
|
111
110
|
box-shadow: var(--#{$prefix}datepicker-box-shadow);
|
|
112
111
|
margin-top: rem(4px);
|
|
112
|
+
@include dynamic-background(var(--#{$prefix}datepicker-bg));
|
|
113
113
|
|
|
114
114
|
// Calendar placements
|
|
115
115
|
&--top-start,
|