nexus-shared 3.0.0 → 3.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.
- package/CHANGELOG.md +446 -262
- package/LICENSE +21 -21
- package/README.md +1084 -1000
- package/dist/Client.Index.d.ts +3 -0
- package/dist/Client.Index.js +3 -0
- package/dist/Components/Chats/ChatParts.d.ts +2 -2
- package/dist/Components/Chats/ChatParts.js +3 -7
- package/dist/Components/Chats/ChatThread.js +3 -3
- package/dist/Components/Documents/Button.d.ts +6 -1
- package/dist/Components/Documents/Button.js +2 -2
- package/dist/Components/Documents/Menu.js +21 -9
- package/dist/Components/Documents/SplitButton.d.ts +3 -1
- package/dist/Components/Documents/SplitButton.js +7 -5
- package/dist/Components/Documents/TabButtons.d.ts +5 -2
- package/dist/Components/Documents/TabButtons.js +2 -2
- package/dist/Components/Forms/ApiForm.d.ts +1 -1
- package/dist/Components/Forms/ApiForm.js +1 -1
- package/dist/Components/Forms/Crud.js +177 -58
- package/dist/Components/Forms/CrudParts.d.ts +5 -1
- package/dist/Components/Forms/CrudParts.js +37 -5
- package/dist/Components/Forms/ExcelImport.d.ts +23 -7
- package/dist/Components/Forms/ExcelImport.js +189 -60
- package/dist/Components/Forms/Form.js +5 -13
- package/dist/Components/Forms/SubmitForm.d.ts +11 -2
- package/dist/Components/Forms/SubmitForm.js +23 -12
- package/dist/Components/Inputs/DropdownParts.d.ts +1 -1
- package/dist/Components/Inputs/DropdownParts.js +4 -6
- package/dist/Components/Inputs/NumberBox.js +24 -2
- package/dist/Components/Inputs/RowsInput.js +2 -2
- package/dist/Components/Inputs/Slider.js +4 -1
- package/dist/Components/Inputs/TabularForm.js +42 -10
- package/dist/Components/Inputs/TimePanel.js +4 -3
- package/dist/Components/Layouts/Popup.js +1 -4
- package/dist/Components/Layouts/ThemePicker.d.ts +20 -3
- package/dist/Components/Layouts/ThemePicker.js +77 -6
- package/dist/Components/Layouts/ThemeScript.d.ts +4 -2
- package/dist/Components/Layouts/ThemeScript.js +4 -2
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +6 -3
- package/dist/Components/Layouts/ThemeSwitcher.js +9 -8
- package/dist/Components/Viewers/Avatar.d.ts +21 -0
- package/dist/Components/Viewers/Avatar.js +21 -0
- package/dist/Components/Viewers/DataTable.js +192 -44
- package/dist/Components/Viewers/DataTableColumns.d.ts +7 -3
- package/dist/Components/Viewers/DataTableColumns.js +25 -68
- package/dist/Components/Viewers/DataTableFilters.d.ts +21 -0
- package/dist/Components/Viewers/DataTableFilters.js +68 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +2 -2
- package/dist/Components/Viewers/DataTableParts.js +3 -3
- package/dist/Helpers/AnimationHelpers.d.ts +11 -0
- package/dist/Helpers/AnimationHelpers.js +20 -2
- package/dist/Helpers/CrudBackend.d.ts +7 -4
- package/dist/Helpers/CrudBackend.js +4 -2
- package/dist/Helpers/ExcelBackend.d.ts +3 -3
- package/dist/Helpers/ExcelBackend.js +8 -2
- package/dist/Helpers/ExcelHelpers.d.ts +36 -8
- package/dist/Helpers/ExcelHelpers.js +55 -13
- package/dist/Helpers/FormStore.d.ts +9 -5
- package/dist/Helpers/FormStore.js +25 -5
- package/dist/Helpers/MessageBuilder.js +1 -0
- package/dist/Helpers/NumberHelpers.d.ts +7 -1
- package/dist/Helpers/NumberHelpers.js +41 -3
- package/dist/Helpers/PopoverHelpers.d.ts +17 -5
- package/dist/Helpers/PopoverHelpers.js +52 -17
- package/dist/Helpers/PopoverHooks.d.ts +24 -0
- package/dist/Helpers/PopoverHooks.js +62 -0
- package/dist/Helpers/RowsStore.d.ts +7 -2
- package/dist/Helpers/RowsStore.js +15 -3
- package/dist/Helpers/TableExport.js +12 -12
- package/dist/Helpers/TableFilters.d.ts +25 -0
- package/dist/Helpers/TableFilters.js +162 -0
- package/dist/Helpers/TableHelpers.d.ts +6 -3
- package/dist/Helpers/TableHelpers.js +8 -4
- package/dist/Helpers/TableStore.d.ts +11 -3
- package/dist/Helpers/TableStore.js +16 -5
- package/dist/Helpers/ThemeHelpers.d.ts +21 -4
- package/dist/Helpers/ThemeHelpers.js +46 -9
- package/dist/Helpers/UserPreferences.d.ts +14 -0
- package/dist/Helpers/UserPreferences.js +99 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +20 -1
- package/dist/Interfaces/ExcelInterfaces.d.ts +12 -0
- package/dist/Interfaces/FormInterfaces.d.ts +33 -5
- package/dist/Interfaces/PreferenceInterfaces.d.ts +43 -0
- package/dist/Interfaces/PreferenceInterfaces.js +28 -0
- package/dist/Interfaces/TableInterfaces.d.ts +59 -12
- package/dist/Interfaces/ThemeInterfaces.d.ts +25 -0
- package/dist/Interfaces/ThemeInterfaces.js +15 -0
- package/dist/Services/ExcelApi.d.ts +3 -1
- package/dist/Services/ExcelApi.js +1 -1
- package/dist/Services/ThemeService.d.ts +18 -2
- package/dist/Services/ThemeService.js +80 -16
- package/dist/Shared.Index.d.ts +2 -0
- package/dist/Shared.Index.js +2 -0
- package/package.json +85 -85
- package/src/Styles/Nexus.Avatar.css +79 -0
- package/src/Styles/Nexus.Base.css +117 -70
- package/src/Styles/Nexus.Button.css +180 -153
- package/src/Styles/Nexus.Calendar.css +273 -275
- package/src/Styles/Nexus.Chat.css +1443 -1489
- package/src/Styles/Nexus.Choice.css +343 -345
- package/src/Styles/Nexus.Crud.css +168 -161
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +725 -774
- package/src/Styles/Nexus.Editor.css +295 -297
- package/src/Styles/Nexus.Excel.css +389 -370
- package/src/Styles/Nexus.Form.css +279 -321
- package/src/Styles/Nexus.Index.css +37 -36
- package/src/Styles/Nexus.Input.css +602 -637
- package/src/Styles/Nexus.Markdown.css +237 -265
- package/src/Styles/Nexus.Menu.css +237 -259
- package/src/Styles/Nexus.Popup.css +724 -731
- package/src/Styles/Nexus.RichText.css +2 -32
- package/src/Styles/Nexus.Rows.css +637 -596
- package/src/Styles/Nexus.Slider.css +276 -278
- package/src/Styles/Nexus.Tab.Buttons.css +432 -419
- package/src/Styles/Nexus.Table.css +1386 -1296
- package/src/Styles/Nexus.Theme.Picker.css +286 -232
- package/src/Styles/Nexus.Themes.css +194 -194
- package/src/Styles/Nexus.Time.css +144 -147
- package/src/Styles/Nexus.Toast.css +263 -265
- package/src/Styles/Nexus.Tokens.css +89 -72
- package/src/Styles/Nexus.Tree.css +431 -435
|
@@ -1,265 +1,263 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* Toasts: each one is a manual popover, fixed at its edge and stacked by --nx-toast-offset (set by the Toaster).
|
|
4
|
-
* The panel is raised like a popover; the tone shows in the icon and in the progress line along the bottom edge,
|
|
5
|
-
* which pauses while the pointer or the focus is on the toast.
|
|
6
|
-
*/
|
|
7
|
-
.nx-toaster {
|
|
8
|
-
display: contents;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.nx-toast {
|
|
12
|
-
--nx-toast-accent: var(--nx-primary);
|
|
13
|
-
--nx-toast-offset: 0px;
|
|
14
|
-
--nx-toast-edge: 16px;
|
|
15
|
-
|
|
16
|
-
position: fixed;
|
|
17
|
-
inset: auto;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: flex-start;
|
|
20
|
-
gap: 10px;
|
|
21
|
-
width: min(360px, calc(100% - 2 * var(--nx-toast-edge)));
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 12px 12px 12px 14px;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
border: 1px solid var(--nx-border);
|
|
26
|
-
border-radius: var(--nx-radius-lg);
|
|
27
|
-
background: light-dark(var(--nx-surface), var(--nx-surface-2));
|
|
28
|
-
color: var(--nx-text);
|
|
29
|
-
font-size: var(--nx-text-md);
|
|
30
|
-
box-shadow: var(--nx-shadow);
|
|
31
|
-
pointer-events: auto;
|
|
32
|
-
transition:
|
|
33
|
-
top 220ms cubic-bezier(0.2, 0, 0, 1),
|
|
34
|
-
bottom 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.nx-toast:popover-open {
|
|
38
|
-
animation: nx-toast-in 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.nx-toast--closing:popover-open {
|
|
42
|
-
animation: nx-toast-out 180ms ease-in forwards;
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Positions: the offset counts from the chosen edge, newest nearest to it. */
|
|
47
|
-
.nx-toast--top-right,
|
|
48
|
-
.nx-toast--top-center,
|
|
49
|
-
.nx-toast--top-left {
|
|
50
|
-
top: calc(var(--nx-toast-edge) + var(--nx-toast-offset));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.nx-toast--bottom-right,
|
|
54
|
-
.nx-toast--bottom-center,
|
|
55
|
-
.nx-toast--bottom-left {
|
|
56
|
-
bottom: calc(var(--nx-toast-edge) + var(--nx-toast-offset));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.nx-toast--top-right,
|
|
60
|
-
.nx-toast--bottom-right {
|
|
61
|
-
right: var(--nx-toast-edge);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Minimized popups wait at the bottom right; toasts there stack above them (the dock sets --nx-dock-space). */
|
|
65
|
-
.nx-toast--bottom-right {
|
|
66
|
-
bottom: calc(var(--nx-toast-edge) + var(--nx-toast-offset) + var(--nx-dock-space, 0px));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.nx-toast--top-left,
|
|
70
|
-
.nx-toast--bottom-left {
|
|
71
|
-
left: var(--nx-toast-edge);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.nx-toast--top-center,
|
|
75
|
-
.nx-toast--bottom-center {
|
|
76
|
-
left: 50%;
|
|
77
|
-
translate: -50% 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@keyframes nx-toast-in {
|
|
81
|
-
from {
|
|
82
|
-
opacity: 0;
|
|
83
|
-
transform: translateY(-8px) scale(0.98);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.nx-toast--bottom-right:popover-open,
|
|
88
|
-
.nx-toast--bottom-center:popover-open,
|
|
89
|
-
.nx-toast--bottom-left:popover-open {
|
|
90
|
-
animation-name: nx-toast-in-up;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@keyframes nx-toast-in-up {
|
|
94
|
-
from {
|
|
95
|
-
opacity: 0;
|
|
96
|
-
transform: translateY(8px) scale(0.98);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@keyframes nx-toast-out {
|
|
101
|
-
to {
|
|
102
|
-
opacity: 0;
|
|
103
|
-
transform: scale(0.96);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.nx-toast--closing.nx-toast--bottom-right:popover-open,
|
|
108
|
-
.nx-toast--closing.nx-toast--bottom-center:popover-open,
|
|
109
|
-
.nx-toast--closing.nx-toast--bottom-left:popover-open {
|
|
110
|
-
animation-name: nx-toast-out;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Tones */
|
|
114
|
-
.nx-toast--info {
|
|
115
|
-
--nx-toast-accent: var(--nx-info);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.nx-toast--success {
|
|
119
|
-
--nx-toast-accent: var(--nx-success);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.nx-toast--warning {
|
|
123
|
-
--nx-toast-accent: var(--nx-warning);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.nx-toast--danger {
|
|
127
|
-
--nx-toast-accent: var(--nx-danger);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.nx-toast__icon {
|
|
131
|
-
display: grid;
|
|
132
|
-
flex-shrink: 0;
|
|
133
|
-
place-items: center;
|
|
134
|
-
width: 20px;
|
|
135
|
-
height: 20px;
|
|
136
|
-
margin-top: 1px;
|
|
137
|
-
color: var(--nx-toast-accent);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.nx-toast__icon .nx-icon {
|
|
141
|
-
width: 20px;
|
|
142
|
-
height: 20px;
|
|
143
|
-
vertical-align: 0;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.nx-toast--neutral .nx-toast__icon {
|
|
147
|
-
color: var(--nx-text-muted);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.nx-toast__body {
|
|
151
|
-
flex: 1 1 auto;
|
|
152
|
-
min-width: 0;
|
|
153
|
-
padding-top: 1px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.nx-toast__title {
|
|
157
|
-
font-weight: 600;
|
|
158
|
-
line-height: 1.35;
|
|
159
|
-
overflow-wrap: anywhere;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.nx-toast__message {
|
|
163
|
-
margin-top: 2px;
|
|
164
|
-
color: var(--nx-text-muted);
|
|
165
|
-
font-size: var(--nx-text-sm);
|
|
166
|
-
line-height: 1.45;
|
|
167
|
-
overflow-wrap: anywhere;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.nx-toast__action {
|
|
171
|
-
flex-shrink: 0;
|
|
172
|
-
align-self: center;
|
|
173
|
-
height: 28px;
|
|
174
|
-
margin: 0;
|
|
175
|
-
padding: 0 10px;
|
|
176
|
-
border: 1px solid var(--nx-border-strong);
|
|
177
|
-
border-radius: var(--nx-radius);
|
|
178
|
-
background: var(--nx-surface);
|
|
179
|
-
color: var(--nx-text);
|
|
180
|
-
font: inherit;
|
|
181
|
-
font-size: var(--nx-text-sm);
|
|
182
|
-
font-weight: 500;
|
|
183
|
-
white-space: nowrap;
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.nx-toast__action:hover {
|
|
188
|
-
border-color: var(--nx-toast-accent);
|
|
189
|
-
color: var(--nx-toast-accent);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.nx-toast__action:focus-visible {
|
|
193
|
-
outline: none;
|
|
194
|
-
box-shadow: var(--nx-focus-ring);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.nx-toast__close {
|
|
198
|
-
display: grid;
|
|
199
|
-
flex-shrink: 0;
|
|
200
|
-
place-items: center;
|
|
201
|
-
width: 24px;
|
|
202
|
-
height: 24px;
|
|
203
|
-
margin: -2px -2px 0 0;
|
|
204
|
-
padding: 0;
|
|
205
|
-
border: 0;
|
|
206
|
-
border-radius: var(--nx-radius-sm);
|
|
207
|
-
background: none;
|
|
208
|
-
color: var(--nx-text-subtle);
|
|
209
|
-
cursor: pointer;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.nx-toast__close:hover {
|
|
213
|
-
background: var(--nx-surface-hover);
|
|
214
|
-
color: var(--nx-text);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.nx-toast__close:focus-visible {
|
|
218
|
-
outline: none;
|
|
219
|
-
box-shadow: var(--nx-focus-ring);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.nx-toast__close .nx-icon {
|
|
223
|
-
width: 16px;
|
|
224
|
-
height: 16px;
|
|
225
|
-
vertical-align: 0;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/* The time left, shrinking along the bottom edge; its end closes the toast. */
|
|
229
|
-
.nx-toast__progress {
|
|
230
|
-
position: absolute;
|
|
231
|
-
right: 0;
|
|
232
|
-
bottom: 0;
|
|
233
|
-
left: 0;
|
|
234
|
-
height: 3px;
|
|
235
|
-
background: var(--nx-toast-accent);
|
|
236
|
-
opacity: 0.7;
|
|
237
|
-
transform-origin: left;
|
|
238
|
-
animation: nx-toast-progress linear forwards;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.nx-toast:is(:hover, :focus-within) .nx-toast__progress {
|
|
242
|
-
animation-play-state: paused;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
@keyframes nx-toast-progress {
|
|
246
|
-
from {
|
|
247
|
-
transform: scaleX(1);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
to {
|
|
251
|
-
transform: scaleX(0);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* Toasts: each one is a manual popover, fixed at its edge and stacked by --nx-toast-offset (set by the Toaster).
|
|
4
|
+
* The panel is raised like a popover; the tone shows in the icon and in the progress line along the bottom edge,
|
|
5
|
+
* which pauses while the pointer or the focus is on the toast.
|
|
6
|
+
*/
|
|
7
|
+
.nx-toaster {
|
|
8
|
+
display: contents;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nx-toast {
|
|
12
|
+
--nx-toast-accent: var(--nx-primary);
|
|
13
|
+
--nx-toast-offset: 0px;
|
|
14
|
+
--nx-toast-edge: 16px;
|
|
15
|
+
|
|
16
|
+
position: fixed;
|
|
17
|
+
inset: auto;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
gap: 10px;
|
|
21
|
+
width: min(360px, calc(100% - 2 * var(--nx-toast-edge)));
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 12px 12px 12px 14px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
border: 1px solid var(--nx-border);
|
|
26
|
+
border-radius: var(--nx-radius-lg);
|
|
27
|
+
background: light-dark(var(--nx-surface), var(--nx-surface-2));
|
|
28
|
+
color: var(--nx-text);
|
|
29
|
+
font-size: var(--nx-text-md);
|
|
30
|
+
box-shadow: var(--nx-shadow);
|
|
31
|
+
pointer-events: auto;
|
|
32
|
+
transition:
|
|
33
|
+
top 220ms cubic-bezier(0.2, 0, 0, 1),
|
|
34
|
+
bottom 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.nx-toast:popover-open {
|
|
38
|
+
animation: nx-toast-in 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.nx-toast--closing:popover-open {
|
|
42
|
+
animation: nx-toast-out 180ms ease-in forwards;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Positions: the offset counts from the chosen edge, newest nearest to it. */
|
|
47
|
+
.nx-toast--top-right,
|
|
48
|
+
.nx-toast--top-center,
|
|
49
|
+
.nx-toast--top-left {
|
|
50
|
+
top: calc(var(--nx-toast-edge) + var(--nx-toast-offset));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nx-toast--bottom-right,
|
|
54
|
+
.nx-toast--bottom-center,
|
|
55
|
+
.nx-toast--bottom-left {
|
|
56
|
+
bottom: calc(var(--nx-toast-edge) + var(--nx-toast-offset));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.nx-toast--top-right,
|
|
60
|
+
.nx-toast--bottom-right {
|
|
61
|
+
right: var(--nx-toast-edge);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Minimized popups wait at the bottom right; toasts there stack above them (the dock sets --nx-dock-space). */
|
|
65
|
+
.nx-toast--bottom-right {
|
|
66
|
+
bottom: calc(var(--nx-toast-edge) + var(--nx-toast-offset) + var(--nx-dock-space, 0px));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.nx-toast--top-left,
|
|
70
|
+
.nx-toast--bottom-left {
|
|
71
|
+
left: var(--nx-toast-edge);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.nx-toast--top-center,
|
|
75
|
+
.nx-toast--bottom-center {
|
|
76
|
+
left: 50%;
|
|
77
|
+
translate: -50% 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes nx-toast-in {
|
|
81
|
+
from {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transform: translateY(-8px) scale(0.98);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.nx-toast--bottom-right:popover-open,
|
|
88
|
+
.nx-toast--bottom-center:popover-open,
|
|
89
|
+
.nx-toast--bottom-left:popover-open {
|
|
90
|
+
animation-name: nx-toast-in-up;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@keyframes nx-toast-in-up {
|
|
94
|
+
from {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform: translateY(8px) scale(0.98);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@keyframes nx-toast-out {
|
|
101
|
+
to {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
transform: scale(0.96);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.nx-toast--closing.nx-toast--bottom-right:popover-open,
|
|
108
|
+
.nx-toast--closing.nx-toast--bottom-center:popover-open,
|
|
109
|
+
.nx-toast--closing.nx-toast--bottom-left:popover-open {
|
|
110
|
+
animation-name: nx-toast-out;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Tones */
|
|
114
|
+
.nx-toast--info {
|
|
115
|
+
--nx-toast-accent: var(--nx-info);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.nx-toast--success {
|
|
119
|
+
--nx-toast-accent: var(--nx-success);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.nx-toast--warning {
|
|
123
|
+
--nx-toast-accent: var(--nx-warning);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nx-toast--danger {
|
|
127
|
+
--nx-toast-accent: var(--nx-danger);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.nx-toast__icon {
|
|
131
|
+
display: grid;
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
place-items: center;
|
|
134
|
+
width: 20px;
|
|
135
|
+
height: 20px;
|
|
136
|
+
margin-top: 1px;
|
|
137
|
+
color: var(--nx-toast-accent);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.nx-toast__icon .nx-icon {
|
|
141
|
+
width: 20px;
|
|
142
|
+
height: 20px;
|
|
143
|
+
vertical-align: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.nx-toast--neutral .nx-toast__icon {
|
|
147
|
+
color: var(--nx-text-muted);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.nx-toast__body {
|
|
151
|
+
flex: 1 1 auto;
|
|
152
|
+
min-width: 0;
|
|
153
|
+
padding-top: 1px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.nx-toast__title {
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
line-height: 1.35;
|
|
159
|
+
overflow-wrap: anywhere;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nx-toast__message {
|
|
163
|
+
margin-top: 2px;
|
|
164
|
+
color: var(--nx-text-muted);
|
|
165
|
+
font-size: var(--nx-text-sm);
|
|
166
|
+
line-height: 1.45;
|
|
167
|
+
overflow-wrap: anywhere;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.nx-toast__action {
|
|
171
|
+
flex-shrink: 0;
|
|
172
|
+
align-self: center;
|
|
173
|
+
height: 28px;
|
|
174
|
+
margin: 0;
|
|
175
|
+
padding: 0 10px;
|
|
176
|
+
border: 1px solid var(--nx-border-strong);
|
|
177
|
+
border-radius: var(--nx-radius);
|
|
178
|
+
background: var(--nx-surface);
|
|
179
|
+
color: var(--nx-text);
|
|
180
|
+
font: inherit;
|
|
181
|
+
font-size: var(--nx-text-sm);
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.nx-toast__action:hover {
|
|
188
|
+
border-color: var(--nx-toast-accent);
|
|
189
|
+
color: var(--nx-toast-accent);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.nx-toast__action:focus-visible {
|
|
193
|
+
outline: none;
|
|
194
|
+
box-shadow: var(--nx-focus-ring);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.nx-toast__close {
|
|
198
|
+
display: grid;
|
|
199
|
+
flex-shrink: 0;
|
|
200
|
+
place-items: center;
|
|
201
|
+
width: 24px;
|
|
202
|
+
height: 24px;
|
|
203
|
+
margin: -2px -2px 0 0;
|
|
204
|
+
padding: 0;
|
|
205
|
+
border: 0;
|
|
206
|
+
border-radius: var(--nx-radius-sm);
|
|
207
|
+
background: none;
|
|
208
|
+
color: var(--nx-text-subtle);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.nx-toast__close:hover {
|
|
213
|
+
background: var(--nx-surface-hover);
|
|
214
|
+
color: var(--nx-text);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.nx-toast__close:focus-visible {
|
|
218
|
+
outline: none;
|
|
219
|
+
box-shadow: var(--nx-focus-ring);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.nx-toast__close .nx-icon {
|
|
223
|
+
width: 16px;
|
|
224
|
+
height: 16px;
|
|
225
|
+
vertical-align: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* The time left, shrinking along the bottom edge; its end closes the toast. */
|
|
229
|
+
.nx-toast__progress {
|
|
230
|
+
position: absolute;
|
|
231
|
+
right: 0;
|
|
232
|
+
bottom: 0;
|
|
233
|
+
left: 0;
|
|
234
|
+
height: 3px;
|
|
235
|
+
background: var(--nx-toast-accent);
|
|
236
|
+
opacity: 0.7;
|
|
237
|
+
transform-origin: left;
|
|
238
|
+
animation: nx-toast-progress linear forwards;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.nx-toast:is(:hover, :focus-within) .nx-toast__progress {
|
|
242
|
+
animation-play-state: paused;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@keyframes nx-toast-progress {
|
|
246
|
+
from {
|
|
247
|
+
transform: scaleX(1);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
to {
|
|
251
|
+
transform: scaleX(0);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-nx-motion="reduce"] .nx-toast {
|
|
256
|
+
transition: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-nx-motion="reduce"] .nx-toast:popover-open,
|
|
260
|
+
[data-nx-motion="reduce"] .nx-toast--closing:popover-open {
|
|
261
|
+
animation: none;
|
|
262
|
+
}
|
|
263
|
+
}
|