soltana-ui 0.1.0

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.
Files changed (104) hide show
  1. package/README.md +158 -0
  2. package/dist/config/index.d.ts +3 -0
  3. package/dist/config/index.js +7 -0
  4. package/dist/config/register.d.ts +27 -0
  5. package/dist/config/stylesheet.d.ts +13 -0
  6. package/dist/config/types.d.ts +177 -0
  7. package/dist/config/types.js +7 -0
  8. package/dist/config/validation.d.ts +29 -0
  9. package/dist/config/validation.js +59 -0
  10. package/dist/enhancers/accordion.d.ts +19 -0
  11. package/dist/enhancers/carousel.d.ts +21 -0
  12. package/dist/enhancers/collapsible.d.ts +14 -0
  13. package/dist/enhancers/color-picker.d.ts +20 -0
  14. package/dist/enhancers/combobox.d.ts +17 -0
  15. package/dist/enhancers/context-menu.d.ts +19 -0
  16. package/dist/enhancers/date-picker.d.ts +8 -0
  17. package/dist/enhancers/drawer.d.ts +11 -0
  18. package/dist/enhancers/dropdown.d.ts +17 -0
  19. package/dist/enhancers/hover-card.d.ts +15 -0
  20. package/dist/enhancers/index.d.ts +42 -0
  21. package/dist/enhancers/modal.d.ts +16 -0
  22. package/dist/enhancers/scroll-area.d.ts +14 -0
  23. package/dist/enhancers/tabs.d.ts +26 -0
  24. package/dist/enhancers/test-helpers.d.ts +20 -0
  25. package/dist/enhancers/test-utils.d.ts +10 -0
  26. package/dist/enhancers/toast.d.ts +24 -0
  27. package/dist/enhancers/tooltip.d.ts +15 -0
  28. package/dist/enhancers/tree.d.ts +24 -0
  29. package/dist/enhancers/utils/click-away.d.ts +7 -0
  30. package/dist/enhancers/utils/create-overlay-enhancer.d.ts +14 -0
  31. package/dist/enhancers/utils/focus-trap.d.ts +9 -0
  32. package/dist/enhancers/utils/generate-id.d.ts +6 -0
  33. package/dist/enhancers/utils/keyboard-nav.d.ts +21 -0
  34. package/dist/enhancers/utils/position.d.ts +30 -0
  35. package/dist/fonts/index.d.ts +20 -0
  36. package/dist/index.d.ts +9 -0
  37. package/dist/init.d.ts +16 -0
  38. package/dist/plugins/index.d.ts +2 -0
  39. package/dist/plugins/index.js +1 -0
  40. package/dist/plugins/postcss-soltana-treeshake.d.ts +10 -0
  41. package/dist/plugins/postcss-soltana-treeshake.js +149 -0
  42. package/dist/plugins/types.d.ts +9 -0
  43. package/dist/plugins/types.js +4 -0
  44. package/dist/soltana-ui.css +1 -0
  45. package/dist/soltana-ui.js +1702 -0
  46. package/dist/soltana-ui.umd.cjs +1 -0
  47. package/package.json +90 -0
  48. package/src/styles/_variables.scss +348 -0
  49. package/src/styles/base/_accessibility.scss +146 -0
  50. package/src/styles/base/_index.scss +12 -0
  51. package/src/styles/base/_register.scss +84 -0
  52. package/src/styles/base/_relief-system.scss +53 -0
  53. package/src/styles/base/_scrollbar.scss +40 -0
  54. package/src/styles/base/_transitions.scss +75 -0
  55. package/src/styles/base/_typography.scss +442 -0
  56. package/src/styles/components/_alert-dialogs.scss +75 -0
  57. package/src/styles/components/_badges.scss +215 -0
  58. package/src/styles/components/_buttons.scss +293 -0
  59. package/src/styles/components/_callouts.scss +99 -0
  60. package/src/styles/components/_cards.scss +97 -0
  61. package/src/styles/components/_carousels.scss +108 -0
  62. package/src/styles/components/_closes.scss +63 -0
  63. package/src/styles/components/_code.scss +75 -0
  64. package/src/styles/components/_collapsibles.scss +61 -0
  65. package/src/styles/components/_color-pickers.scss +211 -0
  66. package/src/styles/components/_comboboxes.scss +88 -0
  67. package/src/styles/components/_context-menus.scss +82 -0
  68. package/src/styles/components/_date-pickers.scss +165 -0
  69. package/src/styles/components/_feedback.scss +354 -0
  70. package/src/styles/components/_figures.scss +52 -0
  71. package/src/styles/components/_heros.scss +83 -0
  72. package/src/styles/components/_hover-cards.scss +55 -0
  73. package/src/styles/components/_images.scss +71 -0
  74. package/src/styles/components/_index.scss +41 -0
  75. package/src/styles/components/_indicators.scss +403 -0
  76. package/src/styles/components/_inputs.scss +409 -0
  77. package/src/styles/components/_layouts.scss +139 -0
  78. package/src/styles/components/_lists.scss +135 -0
  79. package/src/styles/components/_menus.scss +195 -0
  80. package/src/styles/components/_navigation.scss +325 -0
  81. package/src/styles/components/_overlays.scss +233 -0
  82. package/src/styles/components/_scroll-areas.scss +53 -0
  83. package/src/styles/components/_segmented-controls.scss +75 -0
  84. package/src/styles/components/_tables.scss +137 -0
  85. package/src/styles/components/_toasts.scss +111 -0
  86. package/src/styles/components/_toggles.scss +57 -0
  87. package/src/styles/components/_trees.scss +123 -0
  88. package/src/styles/decorative/_classical.scss +196 -0
  89. package/src/styles/decorative/_index.scss +7 -0
  90. package/src/styles/finishes/_index.scss +55 -0
  91. package/src/styles/index.scss +30 -0
  92. package/src/styles/reliefs/_index.scss +66 -0
  93. package/src/styles/reliefs/_neumorphic-tables.scss +92 -0
  94. package/src/styles/themes/_dark.scss +130 -0
  95. package/src/styles/themes/_index.scss +3 -0
  96. package/src/styles/themes/_light.scss +122 -0
  97. package/src/styles/themes/_sepia.scss +121 -0
  98. package/src/styles/utilities/_index.scss +13 -0
  99. package/src/styles/utilities/_layout.scss +100 -0
  100. package/src/styles/utilities/_mixins.scss +410 -0
  101. package/src/styles/utilities/_responsive.scss +46 -0
  102. package/src/styles/utilities/_sizing.scss +62 -0
  103. package/src/styles/utilities/_spacing.scss +12 -0
  104. package/src/styles/utilities/_visual.scss +436 -0
@@ -0,0 +1,293 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Button Components
3
+ // ---------------------------------------------------------------------------
4
+ // Base button uses --relief-* variables for automatic relief switching.
5
+ // Semantic variants (primary, danger, success) override as needed.
6
+ // ---------------------------------------------------------------------------
7
+
8
+ @use 'sass:list';
9
+ @use '../variables' as *;
10
+ @use '../base/register' as *;
11
+ @use '../base/accessibility' as *;
12
+ @use '../base/transitions' as *;
13
+
14
+ // ============================================================================
15
+ // BASE BUTTON
16
+ // ============================================================================
17
+
18
+ .btn {
19
+ position: relative;
20
+ display: inline-flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ gap: 0.5rem;
24
+ padding: 0.5rem 1.25rem;
25
+ font-family: var(--font-sans);
26
+ font-size: var(--text-sm);
27
+ font-weight: var(--font-semibold);
28
+ letter-spacing: var(--tracking-elegant);
29
+ line-height: 1.5;
30
+ text-transform: uppercase;
31
+ @include relief-container;
32
+ border-radius: var(--radius-lg);
33
+ color: var(--text-primary);
34
+ cursor: pointer;
35
+ @include finish-surface;
36
+ @include transition-interactive;
37
+ user-select: none;
38
+ white-space: nowrap;
39
+
40
+ &:hover {
41
+ @include hover-lift;
42
+ }
43
+
44
+ &:focus-visible {
45
+ @include focus-ring-outline;
46
+ }
47
+
48
+ &:active {
49
+ transform: scale(0.97);
50
+ box-shadow: var(--relief-shadow-inset);
51
+ }
52
+
53
+ &:disabled,
54
+ &.disabled {
55
+ @include disabled-state;
56
+ color: var(--state-disabled-text);
57
+ border-color: var(--border-subtle);
58
+ transform: none;
59
+
60
+ &:hover {
61
+ transform: none;
62
+ }
63
+ }
64
+ }
65
+
66
+ // ============================================================================
67
+ // SEMANTIC VARIANTS
68
+ // ============================================================================
69
+
70
+ .btn-primary {
71
+ --_btn-gradient: linear-gradient(145deg, var(--accent-primary), var(--accent-primary-active));
72
+ @include finish-surface($bg: var(--accent-primary), $gradient: var(--_btn-gradient));
73
+ color: var(--text-inverse);
74
+ border-color: transparent;
75
+ box-shadow:
76
+ var(--relief-shadow),
77
+ inset 0 1px 0 rgb(var(--highlight-color) / 15%);
78
+
79
+ &:hover {
80
+ --_btn-gradient: linear-gradient(145deg, var(--accent-primary-hover), var(--accent-primary));
81
+ }
82
+
83
+ &:active {
84
+ box-shadow:
85
+ inset 2px 2px 6px rgb(var(--shadow-color) / 25%),
86
+ inset -1px -1px 4px rgb(var(--highlight-color) / 14%);
87
+ }
88
+ }
89
+
90
+ .btn-secondary {
91
+ background: var(--relief-bg);
92
+ backdrop-filter: none;
93
+ border-color: var(--border-default);
94
+ color: var(--text-primary);
95
+
96
+ @include hover-state {
97
+ border-color: var(--border-strong);
98
+ }
99
+ }
100
+
101
+ .btn-ghost {
102
+ background-color: transparent;
103
+ background-image: none;
104
+ color: var(--text-primary);
105
+ border-color: transparent;
106
+ box-shadow: none;
107
+ backdrop-filter: none;
108
+
109
+ @include hover-state {
110
+ box-shadow: var(--relief-shadow);
111
+ }
112
+
113
+ &:active {
114
+ background-color: var(--state-active);
115
+ }
116
+ }
117
+
118
+ .btn-outline {
119
+ background-color: transparent;
120
+ background-image: none;
121
+ border: 2px solid var(--accent-primary);
122
+ color: var(--accent-primary);
123
+ box-shadow: none;
124
+ backdrop-filter: none;
125
+
126
+ @include hover-state {
127
+ border-color: var(--accent-primary-hover);
128
+ box-shadow: var(--relief-shadow);
129
+ }
130
+ }
131
+
132
+ // ---- Semantic glow mixin: gradient + colored outer glow for danger/success ----
133
+
134
+ @mixin btn-semantic-glow($color, $color-deep, $glow-base, $glow-hover) {
135
+ --_btn-gradient: linear-gradient(145deg, #{$color}, #{$color-deep});
136
+ @include finish-surface($bg: $color, $gradient: var(--_btn-gradient));
137
+ color: var(--text-inverse);
138
+ border-color: transparent;
139
+ box-shadow:
140
+ var(--relief-shadow),
141
+ 0 2px 8px $glow-base;
142
+
143
+ &:hover {
144
+ box-shadow:
145
+ var(--relief-shadow),
146
+ 0 4px 16px $glow-hover;
147
+ }
148
+ }
149
+
150
+ .btn-danger {
151
+ @include btn-semantic-glow(
152
+ var(--color-error),
153
+ color-mix(in srgb, var(--color-error), black 35%),
154
+ color-mix(in srgb, var(--color-error) 25%, transparent),
155
+ color-mix(in srgb, var(--color-error) 35%, transparent)
156
+ );
157
+ }
158
+
159
+ .btn-success {
160
+ @include btn-semantic-glow(
161
+ var(--color-success),
162
+ color-mix(in srgb, var(--color-success), black 35%),
163
+ color-mix(in srgb, var(--color-success) 20%, transparent),
164
+ color-mix(in srgb, var(--color-success) 30%, transparent)
165
+ );
166
+ }
167
+
168
+ // ============================================================================
169
+ // SIZES
170
+ // ============================================================================
171
+
172
+ $btn-sizes: (
173
+ xs: (
174
+ 0.25rem 0.625rem,
175
+ var(--text-xs),
176
+ var(--radius-md),
177
+ ),
178
+ sm: (
179
+ 0.375rem 0.875rem,
180
+ var(--text-sm),
181
+ null,
182
+ ),
183
+ lg: (
184
+ 0.75rem 1.75rem,
185
+ var(--text-lg),
186
+ null,
187
+ ),
188
+ xl: (
189
+ 1rem 2.25rem,
190
+ var(--text-xl),
191
+ null,
192
+ ),
193
+ );
194
+
195
+ @each $name, $vals in $btn-sizes {
196
+ .btn-#{$name} {
197
+ padding: list.nth($vals, 1);
198
+ font-size: list.nth($vals, 2);
199
+ @if list.nth($vals, 3) {
200
+ border-radius: list.nth($vals, 3);
201
+ }
202
+ }
203
+ }
204
+
205
+ .btn-icon {
206
+ padding: 0.5rem;
207
+ aspect-ratio: 1;
208
+ }
209
+
210
+ // ============================================================================
211
+ // BUTTON GROUP
212
+ // ============================================================================
213
+
214
+ .btn-group {
215
+ display: inline-flex;
216
+
217
+ .btn {
218
+ border-radius: 0;
219
+ @include edge-radius;
220
+
221
+ + .btn {
222
+ margin-left: -1px;
223
+ }
224
+ }
225
+ }
226
+
227
+ // ============================================================================
228
+ // FLOATING ACTION BUTTON
229
+ // ============================================================================
230
+
231
+ .fab {
232
+ position: fixed;
233
+ display: inline-flex;
234
+ align-items: center;
235
+ justify-content: center;
236
+ width: 3.5rem;
237
+ height: 3.5rem;
238
+ padding: 0;
239
+ border-radius: var(--radius-full);
240
+ font-size: var(--text-lg);
241
+ cursor: pointer;
242
+ z-index: var(--z-40);
243
+ @include relief-container;
244
+ @include finish-surface(
245
+ $bg: var(--accent-primary),
246
+ $gradient: linear-gradient(145deg, var(--accent-primary), var(--accent-primary-active))
247
+ );
248
+ color: var(--text-inverse);
249
+ border-color: transparent;
250
+ box-shadow:
251
+ var(--relief-shadow),
252
+ 0 4px 12px color-mix(in srgb, var(--accent-primary) 30%, transparent);
253
+ @include transition-interactive;
254
+ user-select: none;
255
+
256
+ &:hover {
257
+ @include hover-lift(-2px);
258
+ box-shadow:
259
+ var(--relief-shadow),
260
+ 0 6px 20px color-mix(in srgb, var(--accent-primary) 40%, transparent);
261
+ }
262
+
263
+ &:focus-visible {
264
+ @include focus-ring-outline;
265
+ }
266
+
267
+ &:active {
268
+ transform: scale(0.95);
269
+ box-shadow: var(--relief-shadow-inset);
270
+ }
271
+ }
272
+
273
+ .fab-sm {
274
+ width: 2.5rem;
275
+ height: 2.5rem;
276
+ font-size: var(--text-sm);
277
+ }
278
+
279
+ .fab-lg {
280
+ width: 4.5rem;
281
+ height: 4.5rem;
282
+ font-size: var(--text-xl);
283
+ }
284
+
285
+ .fab-bottom-right {
286
+ bottom: 1.5rem;
287
+ right: 1.5rem;
288
+ }
289
+
290
+ .fab-bottom-left {
291
+ bottom: 1.5rem;
292
+ left: 1.5rem;
293
+ }
@@ -0,0 +1,99 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Callout & Blockquote Components
3
+ // ---------------------------------------------------------------------------
4
+ // Left-bordered content boxes for documentation, tips, warnings, and quotes.
5
+ // ---------------------------------------------------------------------------
6
+
7
+ @use '../base/register' as *;
8
+ @use '../base/transitions' as *;
9
+
10
+ // ============================================================================
11
+ // CALLOUT
12
+ // ============================================================================
13
+
14
+ .callout {
15
+ position: relative;
16
+ padding: 1rem 1.25rem;
17
+ border-left: 4px solid var(--border-strong);
18
+ border-radius: var(--radius-md);
19
+ @include relief-container;
20
+ @include finish-surface;
21
+ @include transition-interactive(var(--transition-normal));
22
+ }
23
+
24
+ .callout-title {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 0.5rem;
28
+ font-size: var(--text-sm);
29
+ font-weight: var(--font-semibold);
30
+ margin-bottom: 0.5rem;
31
+ color: var(--text-primary);
32
+
33
+ svg {
34
+ flex-shrink: 0;
35
+ width: 1.125rem;
36
+ height: 1.125rem;
37
+ }
38
+ }
39
+
40
+ .callout-content {
41
+ font-size: var(--text-sm);
42
+ color: var(--text-secondary);
43
+ line-height: 1.6;
44
+ }
45
+
46
+ // Semantic variants — placeholder selectors enable zero-duplication aliases
47
+ @each $type in (info, warning, success, error) {
48
+ %callout-#{$type} {
49
+ border-left-color: var(--color-#{$type});
50
+ background-color: var(--color-#{$type}-subtle);
51
+
52
+ .callout-title {
53
+ color: var(--color-#{$type}-text);
54
+ }
55
+ }
56
+ .callout-#{$type} {
57
+ @extend %callout-#{$type};
58
+ }
59
+ }
60
+
61
+ // Doc-friendly aliases
62
+ .callout-note {
63
+ @extend %callout-info;
64
+ }
65
+
66
+ .callout-tip {
67
+ @extend %callout-success;
68
+ }
69
+
70
+ .callout-important {
71
+ @extend %callout-warning;
72
+ }
73
+
74
+ // ============================================================================
75
+ // BLOCKQUOTE
76
+ // ============================================================================
77
+
78
+ .blockquote {
79
+ position: relative;
80
+ margin: 0;
81
+ padding: 1rem 1.5rem;
82
+ border-left: 4px solid var(--accent-decorative);
83
+ font-size: var(--text-base);
84
+ font-style: italic;
85
+ color: var(--text-secondary);
86
+ line-height: 1.7;
87
+ }
88
+
89
+ .blockquote-footer {
90
+ display: block;
91
+ margin-top: 0.75rem;
92
+ font-size: var(--text-sm);
93
+ font-style: normal;
94
+ color: var(--text-muted);
95
+
96
+ &::before {
97
+ content: '\2014\00A0';
98
+ }
99
+ }
@@ -0,0 +1,97 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Card Components
3
+ // ---------------------------------------------------------------------------
4
+ // Base cards use --relief-* variables for automatic relief switching.
5
+ // Beveled variant overrides as needed.
6
+ // ---------------------------------------------------------------------------
7
+
8
+ @use '../base/register' as *;
9
+ @use '../base/transitions' as *;
10
+
11
+ // ============================================================================
12
+ // BASE CARD
13
+ // ============================================================================
14
+
15
+ .card {
16
+ position: relative;
17
+ @include relief-container;
18
+ border-radius: var(--radius-2xl);
19
+ @include finish-surface;
20
+ @include transition-depth;
21
+ }
22
+
23
+ .card-flat {
24
+ box-shadow: none;
25
+ }
26
+
27
+ .card-hover {
28
+ &:hover {
29
+ @include hover-lift(-3px);
30
+ }
31
+ }
32
+
33
+ // ============================================================================
34
+ // BEVELED CARD
35
+ // ============================================================================
36
+
37
+ .card-beveled {
38
+ position: relative;
39
+ border-radius: var(--radius-lg);
40
+ border: 3px solid var(--border-strong);
41
+ @include finish-surface(var(--relief-surface-raised));
42
+ box-shadow: var(--relief-shadow), var(--relief-shadow-inset);
43
+ overflow: visible;
44
+
45
+ &::before {
46
+ content: '';
47
+ position: absolute;
48
+ inset: -1px;
49
+ border-radius: inherit;
50
+ border: 1px solid rgb(var(--highlight-color) / 12%);
51
+ border-bottom-color: rgb(var(--shadow-color) / 10%);
52
+ border-right-color: rgb(var(--shadow-color) / 10%);
53
+ pointer-events: none;
54
+ z-index: 1;
55
+ }
56
+
57
+ &::after {
58
+ content: '';
59
+ position: absolute;
60
+ top: -6px;
61
+ left: -6px;
62
+ width: 12px;
63
+ height: 12px;
64
+ border-radius: var(--radius-full);
65
+ background: var(--surface-3);
66
+ border: 2px solid var(--border-strong);
67
+ box-shadow: var(--relief-shadow-inset-sm);
68
+ z-index: 2;
69
+ pointer-events: none;
70
+ }
71
+ }
72
+
73
+ // ============================================================================
74
+ // CARD SECTIONS
75
+ // ============================================================================
76
+
77
+ .card-header {
78
+ padding: 1rem 1.5rem;
79
+ border-bottom: 1px solid var(--card-border);
80
+ font-weight: var(--font-semibold);
81
+ letter-spacing: var(--tracking-elegant);
82
+ }
83
+
84
+ .card-body {
85
+ padding: 1.5rem;
86
+ }
87
+
88
+ .card-footer {
89
+ padding: 1rem 1.5rem;
90
+ border-top: 1px solid var(--card-border);
91
+ }
92
+
93
+ .card-image {
94
+ width: 100%;
95
+ height: auto;
96
+ display: block;
97
+ }
@@ -0,0 +1,108 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Carousel Component
3
+ // ---------------------------------------------------------------------------
4
+ // Horizontal slide container with navigation buttons and indicator dots.
5
+ // Uses --relief-* and --finish-* variables for tier integration.
6
+ // ---------------------------------------------------------------------------
7
+
8
+ @use '../base/register' as *;
9
+ @use '../base/accessibility' as *;
10
+ @use '../base/transitions' as *;
11
+
12
+ .carousel {
13
+ position: relative;
14
+ overflow: hidden;
15
+ border-radius: var(--radius-lg);
16
+ }
17
+
18
+ .carousel-track {
19
+ display: flex;
20
+ transform: translateX(var(--carousel-offset, 0%));
21
+ @include transition-property(transform, var(--transition-slow));
22
+ }
23
+
24
+ .carousel-slide {
25
+ flex: 0 0 100%;
26
+ min-width: 0;
27
+
28
+ > img {
29
+ width: 100%;
30
+ height: auto;
31
+ display: block;
32
+ }
33
+ }
34
+
35
+ // ---- Navigation buttons ----
36
+
37
+ .carousel-prev,
38
+ .carousel-next {
39
+ position: absolute;
40
+ top: 50%;
41
+ transform: translateY(-50%);
42
+ z-index: 1;
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ width: 2.5rem;
47
+ height: 2.5rem;
48
+ border-radius: var(--radius-full);
49
+ border: none;
50
+ cursor: pointer;
51
+ @include relief-container;
52
+ @include finish-surface(var(--surface-1));
53
+ color: var(--text-primary);
54
+ @include transition-interactive;
55
+
56
+ &:hover {
57
+ background-color: var(--state-hover);
58
+ }
59
+
60
+ &:focus-visible {
61
+ @include focus-ring-outline;
62
+ }
63
+
64
+ &:disabled {
65
+ opacity: 0.4;
66
+ cursor: not-allowed;
67
+ }
68
+ }
69
+
70
+ .carousel-prev {
71
+ left: 0.75rem;
72
+ }
73
+
74
+ .carousel-next {
75
+ right: 0.75rem;
76
+ }
77
+
78
+ // ---- Indicator dots ----
79
+
80
+ .carousel-dots {
81
+ display: flex;
82
+ justify-content: center;
83
+ gap: 0.5rem;
84
+ padding: 0.75rem 0;
85
+ }
86
+
87
+ .carousel-dot {
88
+ width: 0.5rem;
89
+ height: 0.5rem;
90
+ border-radius: var(--radius-full);
91
+ border: none;
92
+ background-color: var(--text-muted);
93
+ opacity: 0.4;
94
+ cursor: pointer;
95
+ padding: 0;
96
+ transition:
97
+ opacity var(--transition-normal) var(--easing-in-out),
98
+ background-color var(--transition-normal) var(--easing-in-out);
99
+
100
+ &:hover {
101
+ opacity: 0.7;
102
+ }
103
+
104
+ &.active {
105
+ opacity: 1;
106
+ background-color: var(--accent-primary);
107
+ }
108
+ }
@@ -0,0 +1,63 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Close Button
3
+ // ---------------------------------------------------------------------------
4
+ // Reusable dismiss trigger for alerts, toasts, drawers, and modals.
5
+ // X rendered via ::before/::after rotated lines (no icon dependency).
6
+ // ---------------------------------------------------------------------------
7
+
8
+ @use '../base/accessibility' as *;
9
+ @use '../base/transitions' as *;
10
+
11
+ .close {
12
+ position: relative;
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: 2rem;
17
+ height: 2rem;
18
+ padding: 0;
19
+ border: none;
20
+ background: transparent;
21
+ color: var(--text-secondary);
22
+ border-radius: var(--radius-md);
23
+ cursor: pointer;
24
+ flex-shrink: 0;
25
+ @include transition-interactive(var(--transition-normal));
26
+
27
+ &::before,
28
+ &::after {
29
+ content: '';
30
+ position: absolute;
31
+ width: 50%;
32
+ height: 2px;
33
+ background-color: currentcolor;
34
+ border-radius: 1px;
35
+ }
36
+
37
+ &::before {
38
+ transform: rotate(45deg);
39
+ }
40
+
41
+ &::after {
42
+ transform: rotate(-45deg);
43
+ }
44
+
45
+ &:hover {
46
+ color: var(--text-primary);
47
+ background-color: var(--state-hover);
48
+ }
49
+
50
+ &:focus-visible {
51
+ @include focus-ring-outline;
52
+ }
53
+ }
54
+
55
+ .close-sm {
56
+ width: 1.5rem;
57
+ height: 1.5rem;
58
+ }
59
+
60
+ .close-lg {
61
+ width: 2.5rem;
62
+ height: 2.5rem;
63
+ }