nexus-shared 3.1.0 → 4.0.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 +2268 -446
- package/LICENSE +21 -21
- package/README.md +1705 -1084
- package/dist/Client.Index.d.ts +17 -0
- package/dist/Client.Index.js +17 -0
- package/dist/Components/Documents/DocumentFrame.d.ts +50 -0
- package/dist/Components/Documents/DocumentFrame.js +83 -0
- package/dist/Components/Documents/Menu.d.ts +4 -0
- package/dist/Components/Documents/Menu.js +40 -24
- package/dist/Components/Documents/PrintDocument.d.ts +95 -0
- package/dist/Components/Documents/PrintDocument.js +62 -0
- package/dist/Components/Documents/Tabs.d.ts +59 -0
- package/dist/Components/Documents/Tabs.js +70 -0
- package/dist/Components/Forms/ApiForm.js +19 -2
- package/dist/Components/Forms/Crud.d.ts +2 -2
- package/dist/Components/Forms/Crud.js +871 -377
- package/dist/Components/Forms/CrudActions.d.ts +136 -0
- package/dist/Components/Forms/CrudActions.js +184 -0
- package/dist/Components/Forms/CrudHistory.d.ts +66 -0
- package/dist/Components/Forms/CrudHistory.js +140 -0
- package/dist/Components/Forms/CrudNarrowPicker.d.ts +31 -0
- package/dist/Components/Forms/CrudNarrowPicker.js +180 -0
- package/dist/Components/Forms/CrudParts.d.ts +30 -2
- package/dist/Components/Forms/CrudParts.js +56 -5
- package/dist/Components/Forms/CrudRowForms.d.ts +26 -0
- package/dist/Components/Forms/CrudRowForms.js +114 -0
- package/dist/Components/Forms/CrudScopes.d.ts +28 -0
- package/dist/Components/Forms/CrudScopes.js +76 -0
- package/dist/Components/Forms/CrudTree.d.ts +90 -0
- package/dist/Components/Forms/CrudTree.js +363 -0
- package/dist/Components/Forms/CrudWorkspace.d.ts +63 -0
- package/dist/Components/Forms/CrudWorkspace.js +169 -0
- package/dist/Components/Forms/ExcelImport.js +3 -3
- package/dist/Components/Forms/Form.d.ts +4 -4
- package/dist/Components/Forms/Form.js +125 -16
- package/dist/Components/Forms/FormLeaveGuard.d.ts +44 -0
- package/dist/Components/Forms/FormLeaveGuard.js +65 -0
- package/dist/Components/Forms/RecordFlows.d.ts +50 -0
- package/dist/Components/Forms/RecordFlows.js +282 -0
- package/dist/Components/Forms/SubmitForm.d.ts +37 -2
- package/dist/Components/Forms/SubmitForm.js +195 -10
- package/dist/Components/Inputs/CheckBox.js +1 -1
- package/dist/Components/Inputs/ChoiceField.d.ts +21 -1
- package/dist/Components/Inputs/ChoiceField.js +28 -2
- package/dist/Components/Inputs/CodeBox.d.ts +69 -0
- package/dist/Components/Inputs/CodeBox.js +316 -0
- package/dist/Components/Inputs/DatePicker.js +4 -1
- package/dist/Components/Inputs/DateRangePicker.js +4 -1
- package/dist/Components/Inputs/DateTimePicker.js +4 -1
- package/dist/Components/Inputs/Dropdown.d.ts +13 -0
- package/dist/Components/Inputs/Dropdown.js +8 -5
- package/dist/Components/Inputs/DropdownParts.d.ts +3 -1
- package/dist/Components/Inputs/DropdownParts.js +16 -4
- package/dist/Components/Inputs/Field.d.ts +7 -1
- package/dist/Components/Inputs/Field.js +2 -2
- package/dist/Components/Inputs/GroupForm.d.ts +6 -6
- package/dist/Components/Inputs/GroupForm.js +10 -11
- package/dist/Components/Inputs/InputRenderer.d.ts +9 -6
- package/dist/Components/Inputs/InputRenderer.js +39 -31
- package/dist/Components/Inputs/NumberBox.js +4 -2
- package/dist/Components/Inputs/PictureInput.d.ts +41 -0
- package/dist/Components/Inputs/PictureInput.js +70 -0
- package/dist/Components/Inputs/RadioGroup.d.ts +16 -3
- package/dist/Components/Inputs/RadioGroup.js +8 -3
- package/dist/Components/Inputs/RowsInput.d.ts +1 -1
- package/dist/Components/Inputs/RowsInput.js +18 -3
- package/dist/Components/Inputs/TabularForm.d.ts +5 -5
- package/dist/Components/Inputs/TabularForm.js +29 -29
- package/dist/Components/Inputs/TextArea.d.ts +6 -0
- package/dist/Components/Inputs/TextArea.js +14 -2
- package/dist/Components/Inputs/TextBox.js +4 -1
- package/dist/Components/Inputs/TextBoxTypes.d.ts +6 -0
- package/dist/Components/Inputs/TextBoxTypes.js +17 -0
- package/dist/Components/Inputs/TimePicker.js +4 -1
- package/dist/Components/Inputs/TreeView.d.ts +107 -6
- package/dist/Components/Inputs/TreeView.js +513 -30
- package/dist/Components/Layouts/MessageBox.d.ts +15 -2
- package/dist/Components/Layouts/MessageBox.js +56 -7
- package/dist/Components/Layouts/Popup.d.ts +13 -6
- package/dist/Components/Layouts/Popup.js +37 -9
- package/dist/Components/Layouts/PopupDock.d.ts +3 -1
- package/dist/Components/Layouts/PopupDock.js +2 -1
- package/dist/Components/Layouts/PopupHost.js +5 -4
- package/dist/Components/Layouts/ThemePicker.d.ts +3 -2
- package/dist/Components/Layouts/ThemePicker.js +16 -4
- package/dist/Components/Viewers/DataTable.js +205 -61
- package/dist/Components/Viewers/DataTableFilters.d.ts +1 -1
- package/dist/Components/Viewers/DataTableFilters.js +17 -2
- package/dist/Components/Viewers/DataTableParts.d.ts +46 -12
- package/dist/Components/Viewers/DataTableParts.js +62 -21
- package/dist/Components/Viewers/OwnerFiles.d.ts +175 -0
- package/dist/Components/Viewers/OwnerFiles.js +589 -0
- package/dist/Components/Viewers/QrCodeImage.d.ts +22 -0
- package/dist/Components/Viewers/QrCodeImage.js +15 -0
- package/dist/Components/Viewers/RecordCards.d.ts +16 -0
- package/dist/Components/Viewers/RecordCards.js +509 -0
- package/dist/Helpers/ApiModules.d.ts +3 -34
- package/dist/Helpers/ApiModules.js +3 -3
- package/dist/Helpers/ApiRoutes.d.ts +68 -26
- package/dist/Helpers/ApiRoutes.js +31 -27
- package/dist/Helpers/ArrayHelpers.d.ts +0 -0
- package/dist/Helpers/ArrayHelpers.js +2 -0
- package/dist/Helpers/BusyHooks.d.ts +6 -0
- package/dist/Helpers/BusyHooks.js +39 -0
- package/dist/Helpers/CodeHelpers.d.ts +97 -0
- package/dist/Helpers/CodeHelpers.js +332 -0
- package/dist/Helpers/CrudBackend.d.ts +114 -6
- package/dist/Helpers/CrudBackend.js +214 -11
- package/dist/Helpers/CrudColumns.d.ts +98 -0
- package/dist/Helpers/CrudColumns.js +160 -0
- package/dist/Helpers/CrudDetailsTabs.d.ts +58 -0
- package/dist/Helpers/CrudDetailsTabs.js +126 -0
- package/dist/Helpers/CrudHelpers.d.ts +130 -6
- package/dist/Helpers/CrudHelpers.js +304 -12
- package/dist/Helpers/CrudNarrowPick.d.ts +83 -0
- package/dist/Helpers/CrudNarrowPick.js +157 -0
- package/dist/Helpers/CrudRowForms.d.ts +15 -0
- package/dist/Helpers/CrudRowForms.js +43 -0
- package/dist/Helpers/CrudScopes.d.ts +32 -0
- package/dist/Helpers/CrudScopes.js +79 -0
- package/dist/Helpers/DropdownHelpers.d.ts +3 -1
- package/dist/Helpers/DropdownHelpers.js +6 -2
- package/dist/Helpers/ExcelHelpers.d.ts +1 -1
- package/dist/Helpers/ExcelHelpers.js +12 -11
- package/dist/Helpers/FileAdapter.d.ts +78 -0
- package/dist/Helpers/FileAdapter.js +102 -0
- package/dist/Helpers/FilePrimaries.d.ts +48 -0
- package/dist/Helpers/FilePrimaries.js +138 -0
- package/dist/Helpers/FormConfirm.d.ts +32 -0
- package/dist/Helpers/FormConfirm.js +40 -0
- package/dist/Helpers/FormStore.d.ts +90 -5
- package/dist/Helpers/FormStore.js +318 -22
- package/dist/Helpers/InputConditions.d.ts +50 -0
- package/dist/Helpers/InputConditions.js +168 -0
- package/dist/Helpers/InputMemory.d.ts +106 -0
- package/dist/Helpers/InputMemory.js +385 -0
- package/dist/Helpers/InputNarrowing.d.ts +18 -0
- package/dist/Helpers/InputNarrowing.js +67 -0
- package/dist/Helpers/InputParamsHelpers.d.ts +44 -1
- package/dist/Helpers/InputParamsHelpers.js +162 -71
- package/dist/Helpers/MessageBuilder.js +2 -0
- package/dist/Helpers/NexusDriveAdapter.d.ts +55 -0
- package/dist/Helpers/NexusDriveAdapter.js +207 -0
- package/dist/Helpers/NexusHelpers.d.ts +0 -0
- package/dist/Helpers/NexusHelpers.js +1 -0
- package/dist/Helpers/NumberHelpers.d.ts +95 -0
- package/dist/Helpers/NumberHelpers.js +126 -0
- package/dist/Helpers/Permissions.js +2 -1
- package/dist/Helpers/QrCode.d.ts +26 -0
- package/dist/Helpers/QrCode.js +463 -0
- package/dist/Helpers/RecordCards.d.ts +205 -0
- package/dist/Helpers/RecordCards.js +378 -0
- package/dist/Helpers/RequestCache.d.ts +47 -0
- package/dist/Helpers/RequestCache.js +132 -0
- package/dist/Helpers/RowsStore.d.ts +37 -2
- package/dist/Helpers/RowsStore.js +128 -10
- package/dist/Helpers/ServerPreview.d.ts +69 -0
- package/dist/Helpers/ServerPreview.js +99 -0
- package/dist/Helpers/TableColumns.js +4 -3
- package/dist/Helpers/TableExport.d.ts +7 -1
- package/dist/Helpers/TableExport.js +21 -15
- package/dist/Helpers/TableFilters.d.ts +1 -1
- package/dist/Helpers/TableFilters.js +24 -23
- package/dist/Helpers/TableHelpers.d.ts +24 -3
- package/dist/Helpers/TableHelpers.js +58 -12
- package/dist/Helpers/TableJoins.d.ts +83 -0
- package/dist/Helpers/TableJoins.js +284 -0
- package/dist/Helpers/TableStore.d.ts +26 -1
- package/dist/Helpers/TableStore.js +73 -7
- package/dist/Helpers/TreeStore.d.ts +306 -11
- package/dist/Helpers/TreeStore.js +1048 -90
- package/dist/Helpers/UserPreferences.d.ts +8 -0
- package/dist/Helpers/UserPreferences.js +17 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +512 -14
- package/dist/Interfaces/FileInterfaces.d.ts +162 -0
- package/dist/Interfaces/FileInterfaces.js +4 -0
- package/dist/Interfaces/FormInterfaces.d.ts +393 -29
- package/dist/Interfaces/FormInterfaces.js +79 -1
- package/dist/Interfaces/InputInterfaces.d.ts +39 -3
- package/dist/Interfaces/MessageInterfaces.d.ts +1 -1
- package/dist/Interfaces/PreferenceInterfaces.d.ts +8 -0
- package/dist/Interfaces/PreferenceInterfaces.js +2 -5
- package/dist/Interfaces/RecordInterfaces.d.ts +367 -0
- package/dist/Interfaces/RecordInterfaces.js +1 -0
- package/dist/Interfaces/TableInterfaces.d.ts +160 -5
- package/dist/Services/ApiProxy.d.ts +36 -1
- package/dist/Services/ApiProxy.js +182 -52
- package/dist/Services/ApiProxyRules.d.ts +203 -0
- package/dist/Services/ApiProxyRules.js +426 -0
- package/dist/Services/ExcelApi.js +5 -0
- package/dist/Services/FileApi.d.ts +13 -0
- package/dist/Services/FileApi.js +29 -0
- package/dist/Services/ImageEditorLoader.d.ts +14 -0
- package/dist/Services/ImageEditorLoader.js +51 -0
- package/dist/Services/JoinSources.d.ts +80 -0
- package/dist/Services/JoinSources.js +150 -0
- package/dist/Services/ModuleImport.d.ts +7 -0
- package/dist/Services/ModuleImport.js +22 -0
- package/dist/Services/ServerApi.d.ts +13 -2
- package/dist/Services/ServerApi.js +8 -3
- package/dist/Shared.Index.d.ts +20 -0
- package/dist/Shared.Index.js +20 -0
- package/package.json +92 -85
- package/src/Styles/Nexus.Avatar.css +80 -79
- package/src/Styles/Nexus.Base.css +117 -117
- package/src/Styles/Nexus.Button.css +186 -180
- package/src/Styles/Nexus.Calendar.css +273 -273
- package/src/Styles/Nexus.Chat.css +1443 -1443
- package/src/Styles/Nexus.Choice.css +359 -343
- package/src/Styles/Nexus.Crud.css +542 -168
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +733 -725
- package/src/Styles/Nexus.Editor.css +295 -295
- package/src/Styles/Nexus.Excel.css +389 -389
- package/src/Styles/Nexus.Files.css +410 -0
- package/src/Styles/Nexus.Form.css +282 -279
- package/src/Styles/Nexus.Index.css +41 -37
- package/src/Styles/Nexus.Input.css +238 -4
- package/src/Styles/Nexus.Markdown.css +237 -237
- package/src/Styles/Nexus.Menu.css +246 -237
- package/src/Styles/Nexus.Popup.css +800 -724
- package/src/Styles/Nexus.Print.css +288 -0
- package/src/Styles/Nexus.QrCode.css +12 -0
- package/src/Styles/Nexus.Record.css +430 -0
- package/src/Styles/Nexus.Rows.css +637 -637
- package/src/Styles/Nexus.Slider.css +276 -276
- package/src/Styles/Nexus.Tab.Buttons.css +497 -432
- package/src/Styles/Nexus.Table.css +98 -35
- package/src/Styles/Nexus.Theme.Picker.css +59 -3
- package/src/Styles/Nexus.Themes.css +200 -194
- package/src/Styles/Nexus.Time.css +144 -144
- package/src/Styles/Nexus.Toast.css +263 -263
- package/src/Styles/Nexus.Tokens.css +94 -89
- package/src/Styles/Nexus.Tree.css +530 -431
|
@@ -1,263 +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
|
-
[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
|
-
}
|
|
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
|
+
}
|