@scattered-light/base-ui-theme 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 (105) hide show
  1. package/README.md +19 -0
  2. package/dist/index.d.ts +103 -0
  3. package/dist/index.js +313 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/styles/base/borders.css +26 -0
  6. package/dist/styles/base/breakpoints.css +26 -0
  7. package/dist/styles/base/colors.css +150 -0
  8. package/dist/styles/base/global.css +108 -0
  9. package/dist/styles/base/reset-accessibility.css +119 -0
  10. package/dist/styles/base/reset.css +451 -0
  11. package/dist/styles/base/shadows.css +42 -0
  12. package/dist/styles/base/spacing.css +62 -0
  13. package/dist/styles/base/transitions.css +29 -0
  14. package/dist/styles/base/typography.css +63 -0
  15. package/dist/styles/base/z-index.css +22 -0
  16. package/dist/styles/components/AGGrid.css +6 -0
  17. package/dist/styles/components/Accordion.css +184 -0
  18. package/dist/styles/components/AlertDialog.css +172 -0
  19. package/dist/styles/components/Autocomplete.css +261 -0
  20. package/dist/styles/components/Avatar.css +154 -0
  21. package/dist/styles/components/Button.css +164 -0
  22. package/dist/styles/components/Checkbox.css +199 -0
  23. package/dist/styles/components/CheckboxGroup.css +21 -0
  24. package/dist/styles/components/Collapsible.css +115 -0
  25. package/dist/styles/components/Combobox.css +514 -0
  26. package/dist/styles/components/ContextMenu.css +209 -0
  27. package/dist/styles/components/Dialog.css +159 -0
  28. package/dist/styles/components/Field.css +138 -0
  29. package/dist/styles/components/Fieldset.css +48 -0
  30. package/dist/styles/components/Form.css +22 -0
  31. package/dist/styles/components/Input.css +106 -0
  32. package/dist/styles/components/Menu.css +158 -0
  33. package/dist/styles/components/Menubar.css +201 -0
  34. package/dist/styles/components/Meter.css +104 -0
  35. package/dist/styles/components/NavigationMenu.css +469 -0
  36. package/dist/styles/components/NumberField.css +182 -0
  37. package/dist/styles/components/Popover.css +167 -0
  38. package/dist/styles/components/PreviewCard.css +148 -0
  39. package/dist/styles/components/Progress.css +130 -0
  40. package/dist/styles/components/Radio.css +178 -0
  41. package/dist/styles/components/ScrollArea.css +103 -0
  42. package/dist/styles/components/Select.css +297 -0
  43. package/dist/styles/components/Separator.css +34 -0
  44. package/dist/styles/components/Slider.css +163 -0
  45. package/dist/styles/components/Switch.css +197 -0
  46. package/dist/styles/components/Tabs.css +163 -0
  47. package/dist/styles/components/Toast.css +261 -0
  48. package/dist/styles/components/Toggle.css +103 -0
  49. package/dist/styles/components/ToggleGroup.css +19 -0
  50. package/dist/styles/components/Toolbar.css +78 -0
  51. package/dist/styles/components/Tooltip.css +87 -0
  52. package/dist/styles/index.css +103 -0
  53. package/dist/styles/semantic/accessibility.css +77 -0
  54. package/dist/styles/semantic/accordion.css +102 -0
  55. package/dist/styles/semantic/ag-grid.css +114 -0
  56. package/dist/styles/semantic/alert-dialog.css +78 -0
  57. package/dist/styles/semantic/autocomplete.css +162 -0
  58. package/dist/styles/semantic/avatar.css +96 -0
  59. package/dist/styles/semantic/badge.css +16 -0
  60. package/dist/styles/semantic/button.css +145 -0
  61. package/dist/styles/semantic/card.css +14 -0
  62. package/dist/styles/semantic/checkbox-group.css +18 -0
  63. package/dist/styles/semantic/checkbox.css +117 -0
  64. package/dist/styles/semantic/collapsible.css +123 -0
  65. package/dist/styles/semantic/combobox.css +325 -0
  66. package/dist/styles/semantic/context-menu.css +131 -0
  67. package/dist/styles/semantic/dialog.css +91 -0
  68. package/dist/styles/semantic/dropdown.css +16 -0
  69. package/dist/styles/semantic/field.css +73 -0
  70. package/dist/styles/semantic/fieldset.css +45 -0
  71. package/dist/styles/semantic/form.css +20 -0
  72. package/dist/styles/semantic/input.css +83 -0
  73. package/dist/styles/semantic/menu.css +104 -0
  74. package/dist/styles/semantic/menubar.css +70 -0
  75. package/dist/styles/semantic/meter.css +88 -0
  76. package/dist/styles/semantic/modal.css +14 -0
  77. package/dist/styles/semantic/navigation-menu.css +171 -0
  78. package/dist/styles/semantic/number-field.css +142 -0
  79. package/dist/styles/semantic/popover.css +113 -0
  80. package/dist/styles/semantic/preview-card.css +108 -0
  81. package/dist/styles/semantic/progress.css +85 -0
  82. package/dist/styles/semantic/radio.css +103 -0
  83. package/dist/styles/semantic/scroll-area.css +64 -0
  84. package/dist/styles/semantic/select.css +197 -0
  85. package/dist/styles/semantic/separator.css +37 -0
  86. package/dist/styles/semantic/slider.css +120 -0
  87. package/dist/styles/semantic/switch.css +158 -0
  88. package/dist/styles/semantic/tabs.css +150 -0
  89. package/dist/styles/semantic/toast.css +171 -0
  90. package/dist/styles/semantic/toggle-group.css +29 -0
  91. package/dist/styles/semantic/toggle.css +94 -0
  92. package/dist/styles/semantic/toolbar.css +47 -0
  93. package/dist/styles/semantic/tooltip.css +56 -0
  94. package/dist/styles/theme/README.md +179 -0
  95. package/dist/styles/theme/theme-accessibility.css +13 -0
  96. package/dist/styles/theme/theme-primitives.css +7 -0
  97. package/dist/styles/theme/theme-radius.css +12 -0
  98. package/dist/styles/theme/theme-roles.css +66 -0
  99. package/dist/styles/theme/theme-spacing.css +28 -0
  100. package/dist/styles/theme/theme-stroke.css +7 -0
  101. package/dist/styles/theme/theme-typography.css +218 -0
  102. package/dist/styles/utilities/color-styles.css +34 -0
  103. package/dist/styles/utilities/layout-styles.css +19 -0
  104. package/dist/styles/utilities/text-styles.css +102 -0
  105. package/package.json +75 -0
@@ -0,0 +1,197 @@
1
+ /* Switch - Mojave Theme */
2
+
3
+ /* ============================================
4
+ CONTAINER
5
+ ============================================ */
6
+
7
+ .SwitchContainer {
8
+ display: var(--switch-root-display);
9
+ align-items: var(--switch-root-align-items);
10
+ gap: var(--switch-root-gap);
11
+ user-select: var(--switch-root-user-select);
12
+ }
13
+
14
+ .SwitchContainer[data-disabled] {
15
+ opacity: var(--switch-root-opacity-disabled);
16
+ }
17
+
18
+ /* ============================================
19
+ ROOT (Switch.Root - the track)
20
+ ============================================ */
21
+
22
+ .SwitchRoot {
23
+ position: var(--switch-track-position);
24
+ display: var(--switch-track-display);
25
+ align-items: var(--switch-track-align-items);
26
+ appearance: none;
27
+ border: var(--switch-track-border);
28
+ margin: 0;
29
+ padding: var(--switch-track-padding);
30
+ width: var(--switch-track-width);
31
+ height: var(--switch-track-height);
32
+ border-radius: var(--switch-track-border-radius);
33
+ background-color: var(--switch-track-background);
34
+ cursor: var(--switch-track-cursor);
35
+ flex-shrink: var(--switch-track-flex-shrink);
36
+ transition: var(--switch-track-transition);
37
+ outline: none;
38
+ }
39
+
40
+ /* Track text (on/off) */
41
+ .SwitchRoot::before {
42
+ content: 'off';
43
+ position: var(--switch-track-text-position);
44
+ top: 50%;
45
+ transform: translateY(-50%);
46
+ right: var(--switch-track-text-off-right);
47
+ font-family: var(--switch-track-text-font-family);
48
+ font-size: var(--switch-track-text-font-size);
49
+ font-weight: var(--switch-track-text-font-weight);
50
+ line-height: var(--switch-track-text-line-height);
51
+ color: var(--switch-track-text-color);
52
+ text-transform: var(--switch-track-text-text-transform);
53
+ letter-spacing: var(--switch-track-text-letter-spacing);
54
+ transition: var(--switch-track-text-transition);
55
+ pointer-events: var(--switch-track-text-pointer-events);
56
+ }
57
+
58
+ .SwitchRoot[data-checked] {
59
+ background-color: var(--switch-track-background-checked);
60
+ }
61
+
62
+ .SwitchRoot[data-checked]::before {
63
+ content: 'on';
64
+ left: var(--switch-track-text-on-left);
65
+ right: auto;
66
+ color: var(--switch-track-text-color-checked);
67
+ }
68
+
69
+ .SwitchRoot:hover:not([data-disabled]) {
70
+ background-color: var(--switch-track-background-hover);
71
+ }
72
+
73
+ .SwitchRoot[data-checked]:hover:not([data-disabled]) {
74
+ background-color: var(--switch-track-background-checked-hover);
75
+ }
76
+
77
+ .SwitchRoot:focus-visible {
78
+ box-shadow: var(--switch-track-box-shadow-focus);
79
+ border-color: var(--switch-track-border-color-focus);
80
+ }
81
+
82
+ .SwitchRoot[data-disabled] {
83
+ background-color: var(--switch-track-background-disabled);
84
+ cursor: var(--switch-track-cursor-disabled);
85
+ }
86
+
87
+ /* ============================================
88
+ THUMB (Switch.Thumb - the moving circle)
89
+ ============================================ */
90
+
91
+ .SwitchThumb {
92
+ aspect-ratio: 1 / 1;
93
+ height: 100%;
94
+ border-radius: var(--switch-thumb-border-radius);
95
+ background-color: var(--switch-thumb-background);
96
+ box-shadow: var(--switch-thumb-box-shadow);
97
+ transition: var(--switch-thumb-transition);
98
+ }
99
+
100
+ .SwitchThumb[data-checked] {
101
+ translate: var(--switch-thumb-transform-checked);
102
+ }
103
+
104
+ .SwitchRoot[data-disabled] .SwitchThumb {
105
+ background-color: var(--switch-thumb-background-disabled);
106
+ }
107
+
108
+ /* ============================================
109
+ LABEL
110
+ ============================================ */
111
+
112
+ .SwitchLabel {
113
+ font-family: var(--switch-label-font-family);
114
+ font-size: var(--switch-label-font-size);
115
+ font-weight: var(--switch-label-font-weight);
116
+ line-height: var(--switch-label-line-height);
117
+ letter-spacing: var(--switch-label-letter-spacing);
118
+ color: var(--switch-label-color);
119
+ cursor: var(--switch-label-cursor);
120
+ }
121
+
122
+ .SwitchContainer[data-disabled] .SwitchLabel {
123
+ cursor: var(--switch-label-cursor-disabled);
124
+ opacity: var(--switch-label-opacity-disabled);
125
+ }
126
+
127
+ /* ============================================
128
+ SIZE VARIANTS
129
+ ============================================ */
130
+
131
+ /* Small */
132
+ .SwitchContainer[data-size="sm"] .SwitchRoot {
133
+ width: var(--switch-track-width-sm);
134
+ height: var(--switch-track-height-sm);
135
+ padding: var(--switch-track-padding-sm);
136
+ }
137
+
138
+ .SwitchContainer[data-size="sm"] .SwitchRoot::before {
139
+ font-size: var(--switch-track-text-font-size-sm);
140
+ right: var(--switch-track-text-off-right-sm);
141
+ }
142
+
143
+ .SwitchContainer[data-size="sm"] .SwitchRoot[data-checked]::before {
144
+ left: var(--switch-track-text-on-left-sm);
145
+ }
146
+
147
+ .SwitchContainer[data-size="sm"] .SwitchThumb[data-checked] {
148
+ translate: var(--switch-thumb-transform-checked-sm);
149
+ }
150
+
151
+ .SwitchContainer[data-size="sm"] .SwitchLabel {
152
+ font-family: var(--switch-label-font-family-sm);
153
+ font-size: var(--switch-label-font-size-sm);
154
+ font-weight: var(--switch-label-font-weight-sm);
155
+ line-height: var(--switch-label-line-height-sm);
156
+ letter-spacing: var(--switch-label-letter-spacing-sm);
157
+ }
158
+
159
+ /* Large */
160
+ .SwitchContainer[data-size="lg"] .SwitchRoot {
161
+ width: var(--switch-track-width-lg);
162
+ height: var(--switch-track-height-lg);
163
+ padding: var(--switch-track-padding-lg);
164
+ }
165
+
166
+ .SwitchContainer[data-size="lg"] .SwitchRoot::before {
167
+ font-size: var(--switch-track-text-font-size-lg);
168
+ right: var(--switch-track-text-off-right-lg);
169
+ }
170
+
171
+ .SwitchContainer[data-size="lg"] .SwitchRoot[data-checked]::before {
172
+ left: var(--switch-track-text-on-left-lg);
173
+ }
174
+
175
+ .SwitchContainer[data-size="lg"] .SwitchThumb[data-checked] {
176
+ translate: var(--switch-thumb-transform-checked-lg);
177
+ }
178
+
179
+ .SwitchContainer[data-size="lg"] .SwitchLabel {
180
+ font-family: var(--switch-label-font-family-lg);
181
+ font-size: var(--switch-label-font-size-lg);
182
+ font-weight: var(--switch-label-font-weight-lg);
183
+ line-height: var(--switch-label-line-height-lg);
184
+ letter-spacing: var(--switch-label-letter-spacing-lg);
185
+ }
186
+
187
+ /* ============================================
188
+ REDUCED MOTION
189
+ ============================================ */
190
+
191
+ @media (prefers-reduced-motion: reduce) {
192
+ .SwitchRoot,
193
+ .SwitchThumb,
194
+ .SwitchRoot::before {
195
+ transition: none;
196
+ }
197
+ }
@@ -0,0 +1,163 @@
1
+ /* Tabs - Mojave Theme */
2
+
3
+ /* ============================================
4
+ ROOT
5
+ ============================================ */
6
+
7
+ .TabsRoot {
8
+ display: var(--tabs-root-display);
9
+ flex-direction: var(--tabs-root-flex-direction);
10
+ gap: var(--tabs-root-gap);
11
+ }
12
+
13
+ .TabsRoot[data-orientation="vertical"] {
14
+ flex-direction: var(--tabs-root-flex-direction-vertical);
15
+ }
16
+
17
+ /* ============================================
18
+ TAB LIST
19
+ ============================================ */
20
+
21
+ .TabsList {
22
+ display: var(--tabs-list-display);
23
+ gap: var(--tabs-list-gap);
24
+ border-bottom: var(--tabs-list-border-bottom);
25
+ padding: var(--tabs-list-padding);
26
+ }
27
+
28
+ .TabsRoot[data-orientation="vertical"] .TabsList {
29
+ flex-direction: var(--tabs-list-flex-direction-vertical);
30
+ border-bottom: var(--tabs-list-border-bottom-vertical);
31
+ border-right: var(--tabs-list-border-right-vertical);
32
+ }
33
+
34
+ /* ============================================
35
+ TAB (Trigger)
36
+ ============================================ */
37
+
38
+ .TabsTab {
39
+ all: unset;
40
+ display: var(--tabs-tab-display);
41
+ align-items: var(--tabs-tab-align-items);
42
+ justify-content: var(--tabs-tab-justify-content);
43
+ padding: var(--tabs-tab-padding);
44
+ font-family: var(--tabs-tab-font-family);
45
+ font-size: var(--tabs-tab-font-size);
46
+ font-weight: var(--tabs-tab-font-weight);
47
+ line-height: var(--tabs-tab-line-height);
48
+ letter-spacing: var(--tabs-tab-letter-spacing);
49
+ color: var(--tabs-tab-color);
50
+ background: var(--tabs-tab-background);
51
+ border: var(--tabs-tab-border);
52
+ border-bottom: var(--tabs-tab-border-bottom);
53
+ border-radius: var(--tabs-tab-border-radius);
54
+ cursor: var(--tabs-tab-cursor);
55
+ transition: var(--tabs-tab-transition);
56
+ white-space: var(--tabs-tab-white-space);
57
+ box-sizing: border-box;
58
+ }
59
+
60
+ .TabsTab:hover:not([data-disabled]) {
61
+ color: var(--tabs-tab-color-hover);
62
+ background: var(--tabs-tab-background-hover);
63
+ }
64
+
65
+ .TabsTab[data-active] {
66
+ color: var(--tabs-tab-color-active);
67
+ border-bottom: var(--tabs-tab-border-bottom-active);
68
+ font-weight: var(--tabs-tab-font-weight-active);
69
+ }
70
+
71
+ .TabsTab:focus-visible {
72
+ outline: var(--tabs-tab-outline-focus);
73
+ outline-offset: var(--tabs-tab-outline-offset-focus);
74
+ }
75
+
76
+ .TabsTab[data-disabled] {
77
+ color: var(--tabs-tab-color-disabled);
78
+ cursor: var(--tabs-tab-cursor-disabled);
79
+ opacity: var(--tabs-tab-opacity-disabled);
80
+ }
81
+
82
+ /* Vertical orientation */
83
+ .TabsRoot[data-orientation="vertical"] .TabsTab {
84
+ border-bottom: var(--tabs-tab-border-bottom-vertical);
85
+ border-right: var(--tabs-tab-border-right-vertical);
86
+ }
87
+
88
+ .TabsRoot[data-orientation="vertical"] .TabsTab[data-selected] {
89
+ border-bottom: var(--tabs-tab-border-bottom-vertical);
90
+ border-right: var(--tabs-tab-border-right-active-vertical);
91
+ }
92
+
93
+ /* ============================================
94
+ TAB PANEL
95
+ ============================================ */
96
+
97
+ .TabsPanel {
98
+ padding: var(--tabs-panel-padding);
99
+ font-family: var(--tabs-panel-font-family);
100
+ font-size: var(--tabs-panel-font-size);
101
+ font-weight: var(--tabs-panel-font-weight);
102
+ line-height: var(--tabs-panel-line-height);
103
+ letter-spacing: var(--tabs-panel-letter-spacing);
104
+ color: var(--tabs-panel-color);
105
+ background: var(--tabs-panel-background);
106
+ }
107
+
108
+ .TabsPanel:focus-visible {
109
+ outline: var(--tabs-panel-outline-focus);
110
+ outline-offset: var(--tabs-panel-outline-offset-focus);
111
+ }
112
+
113
+ /* ============================================
114
+ SIZE VARIANTS
115
+ ============================================ */
116
+
117
+ /* Small */
118
+ .TabsRoot[data-size="sm"] .TabsTab {
119
+ padding: var(--tabs-tab-padding-sm);
120
+ font-family: var(--tabs-tab-font-family-sm);
121
+ font-size: var(--tabs-tab-font-size-sm);
122
+ font-weight: var(--tabs-tab-font-weight-sm);
123
+ line-height: var(--tabs-tab-line-height-sm);
124
+ letter-spacing: var(--tabs-tab-letter-spacing-sm);
125
+ }
126
+
127
+ .TabsRoot[data-size="sm"] .TabsPanel {
128
+ padding: var(--tabs-panel-padding-sm);
129
+ font-family: var(--tabs-panel-font-family-sm);
130
+ font-size: var(--tabs-panel-font-size-sm);
131
+ font-weight: var(--tabs-panel-font-weight-sm);
132
+ line-height: var(--tabs-panel-line-height-sm);
133
+ letter-spacing: var(--tabs-panel-letter-spacing-sm);
134
+ }
135
+
136
+ /* Large */
137
+ .TabsRoot[data-size="lg"] .TabsTab {
138
+ padding: var(--tabs-tab-padding-lg);
139
+ font-family: var(--tabs-tab-font-family-lg);
140
+ font-size: var(--tabs-tab-font-size-lg);
141
+ font-weight: var(--tabs-tab-font-weight-lg);
142
+ line-height: var(--tabs-tab-line-height-lg);
143
+ letter-spacing: var(--tabs-tab-letter-spacing-lg);
144
+ }
145
+
146
+ .TabsRoot[data-size="lg"] .TabsPanel {
147
+ padding: var(--tabs-panel-padding-lg);
148
+ font-family: var(--tabs-panel-font-family-lg);
149
+ font-size: var(--tabs-panel-font-size-lg);
150
+ font-weight: var(--tabs-panel-font-weight-lg);
151
+ line-height: var(--tabs-panel-line-height-lg);
152
+ letter-spacing: var(--tabs-panel-letter-spacing-lg);
153
+ }
154
+
155
+ /* ============================================
156
+ REDUCED MOTION
157
+ ============================================ */
158
+
159
+ @media (prefers-reduced-motion: reduce) {
160
+ .TabsTab {
161
+ transition: none;
162
+ }
163
+ }
@@ -0,0 +1,261 @@
1
+ /* Toast - Mojave Theme */
2
+
3
+ /* ============================================
4
+ VIEWPORT
5
+ ============================================ */
6
+
7
+ .Viewport {
8
+ position: var(--toast-viewport-position);
9
+ z-index: var(--toast-viewport-z-index);
10
+ width: var(--toast-viewport-width);
11
+ margin: 0 auto;
12
+ bottom: var(--toast-viewport-margin);
13
+ right: var(--toast-viewport-margin);
14
+ left: auto;
15
+ top: auto;
16
+ outline: 0;
17
+ }
18
+
19
+ @media (min-width: 500px) {
20
+ .Viewport {
21
+ bottom: var(--toast-viewport-margin-md);
22
+ right: var(--toast-viewport-margin-md);
23
+ width: var(--toast-viewport-width-md);
24
+ }
25
+ }
26
+
27
+ /* ============================================
28
+ TOAST ROOT
29
+ ============================================ */
30
+
31
+ .Toast {
32
+ /* Local CSS variables for stacking calculations */
33
+ --gap: 0.75rem;
34
+ --peek: 0.75rem;
35
+ --scale: calc(max(0, 1 - (var(--toast-index) * 0.1)));
36
+ --shrink: calc(1 - var(--scale));
37
+ --height: var(--toast-frontmost-height, var(--toast-height));
38
+ --offset-y: calc(
39
+ var(--toast-offset-y) * -1 + (var(--toast-index) * var(--gap) * -1) +
40
+ var(--toast-swipe-movement-y)
41
+ );
42
+
43
+ position: absolute;
44
+ right: 0;
45
+ bottom: 0;
46
+ left: auto;
47
+ margin: 0 auto;
48
+ margin-right: 0;
49
+ box-sizing: border-box;
50
+ width: 100%;
51
+ background: var(--toast-background);
52
+ color: var(--toast-color);
53
+ border: var(--toast-border);
54
+ border-radius: var(--toast-border-radius);
55
+ padding: var(--toast-padding);
56
+ box-shadow: var(--toast-box-shadow);
57
+ background-clip: padding-box;
58
+ transform-origin: bottom center;
59
+ user-select: none;
60
+ cursor: default;
61
+
62
+ /* Stacking */
63
+ z-index: calc(1000 - var(--toast-index));
64
+ height: var(--height);
65
+
66
+ /* Transform for stacking and swiping */
67
+ transform: translateX(var(--toast-swipe-movement-x))
68
+ translateY(
69
+ calc(
70
+ var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) -
71
+ (var(--shrink) * var(--height))
72
+ )
73
+ )
74
+ scale(var(--scale));
75
+
76
+ transition: var(--toast-transition);
77
+ }
78
+
79
+ /* Expanded state - when hovering viewport */
80
+ .Toast[data-expanded] {
81
+ transform: translateX(var(--toast-swipe-movement-x))
82
+ translateY(var(--offset-y));
83
+ height: var(--toast-height);
84
+ }
85
+
86
+ /* Starting animation */
87
+ .Toast[data-starting-style],
88
+ .Toast[data-ending-style] {
89
+ transform: translateY(150%);
90
+ }
91
+
92
+ /* Ending animation */
93
+ .Toast[data-ending-style] {
94
+ opacity: 0;
95
+ }
96
+
97
+ .Toast[data-ending-style][data-swipe-direction='up'] {
98
+ transform: translateY(calc(var(--toast-swipe-movement-y) - 150%));
99
+ }
100
+
101
+ .Toast[data-ending-style][data-swipe-direction='down'] {
102
+ transform: translateY(calc(var(--toast-swipe-movement-y) + 150%));
103
+ }
104
+
105
+ .Toast[data-ending-style][data-swipe-direction='left'] {
106
+ transform: translateX(calc(var(--toast-swipe-movement-x) - 150%))
107
+ translateY(var(--offset-y));
108
+ }
109
+
110
+ .Toast[data-ending-style][data-swipe-direction='right'] {
111
+ transform: translateX(calc(var(--toast-swipe-movement-x) + 150%))
112
+ translateY(var(--offset-y));
113
+ }
114
+
115
+ /* Limited (removed due to exceeding limit) */
116
+ .Toast[data-limited] {
117
+ opacity: 0;
118
+ }
119
+
120
+ /* Spacing between stacked toasts */
121
+ .Toast::after {
122
+ content: '';
123
+ position: absolute;
124
+ top: 100%;
125
+ width: 100%;
126
+ left: 0;
127
+ height: calc(var(--gap) + 1px);
128
+ }
129
+
130
+ /* Variants */
131
+ .Toast[data-variant='success'] {
132
+ background: var(--toast-success-background);
133
+ border-color: var(--toast-success-border-color);
134
+ color: var(--toast-success-color);
135
+ }
136
+
137
+ .Toast[data-variant='error'] {
138
+ background: var(--toast-error-background);
139
+ border-color: var(--toast-error-border-color);
140
+ color: var(--toast-error-color);
141
+ }
142
+
143
+ .Toast[data-variant='warning'] {
144
+ background: var(--toast-warning-background);
145
+ border-color: var(--toast-warning-border-color);
146
+ color: var(--toast-warning-color);
147
+ }
148
+
149
+ .Toast[data-variant='info'] {
150
+ background: var(--toast-info-background);
151
+ border-color: var(--toast-info-border-color);
152
+ color: var(--toast-info-color);
153
+ }
154
+
155
+ /* ============================================
156
+ CONTENT
157
+ ============================================ */
158
+
159
+ .Content {
160
+ overflow: hidden;
161
+ transition: var(--toast-content-transition);
162
+ }
163
+
164
+ /* Content behind the frontmost toast */
165
+ .Content[data-behind] {
166
+ opacity: 0;
167
+ }
168
+
169
+ /* Content when expanded */
170
+ .Content[data-expanded] {
171
+ opacity: 1;
172
+ }
173
+
174
+ /* ============================================
175
+ TITLE
176
+ ============================================ */
177
+
178
+ .Title {
179
+ font-family: var(--toast-title-font-family);
180
+ font-weight: var(--toast-title-font-weight);
181
+ font-size: var(--toast-title-font-size);
182
+ line-height: var(--toast-title-line-height);
183
+ letter-spacing: var(--toast-title-letter-spacing);
184
+ margin: 0;
185
+ }
186
+
187
+ /* ============================================
188
+ DESCRIPTION
189
+ ============================================ */
190
+
191
+ .Description {
192
+ font-family: var(--toast-description-font-family);
193
+ font-size: var(--toast-description-font-size);
194
+ font-weight: var(--toast-description-font-weight);
195
+ line-height: var(--toast-description-line-height);
196
+ letter-spacing: var(--toast-description-letter-spacing);
197
+ margin: 0;
198
+ margin-top: var(--toast-description-margin-top);
199
+ }
200
+
201
+ /* ============================================
202
+ CLOSE BUTTON
203
+ ============================================ */
204
+
205
+ .Close {
206
+ position: absolute;
207
+ top: var(--toast-close-top);
208
+ right: var(--toast-close-right);
209
+ padding: 0;
210
+ border: none;
211
+ background: transparent;
212
+ width: var(--toast-close-width);
213
+ height: var(--toast-close-height);
214
+ display: flex;
215
+ align-items: center;
216
+ justify-content: center;
217
+ border-radius: var(--toast-close-border-radius);
218
+ cursor: pointer;
219
+ color: inherit;
220
+ }
221
+
222
+ .Close:hover {
223
+ background-color: var(--toast-close-background-hover);
224
+ }
225
+
226
+ .Toast[data-variant='success'] .Close:hover {
227
+ background-color: var(--toast-success-close-hover);
228
+ }
229
+
230
+ .Toast[data-variant='error'] .Close:hover {
231
+ background-color: var(--toast-error-close-hover);
232
+ }
233
+
234
+ .Toast[data-variant='warning'] .Close:hover {
235
+ background-color: var(--toast-warning-close-hover);
236
+ }
237
+
238
+ .Toast[data-variant='info'] .Close:hover {
239
+ background-color: var(--toast-info-close-hover);
240
+ }
241
+
242
+ /* ============================================
243
+ ICON
244
+ ============================================ */
245
+
246
+ .Icon {
247
+ width: var(--toast-icon-width);
248
+ height: var(--toast-icon-height);
249
+ flex-shrink: 0;
250
+ }
251
+
252
+ /* ============================================
253
+ REDUCED MOTION
254
+ ============================================ */
255
+
256
+ @media (prefers-reduced-motion: reduce) {
257
+ .Toast,
258
+ .Content {
259
+ transition: none;
260
+ }
261
+ }