nexus-shared 3.1.0 → 3.2.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 +704 -446
- package/LICENSE +21 -21
- package/README.md +44 -5
- package/dist/Client.Index.d.ts +3 -0
- package/dist/Client.Index.js +3 -0
- package/dist/Components/Forms/Crud.js +322 -161
- package/dist/Components/Forms/CrudHistory.d.ts +66 -0
- package/dist/Components/Forms/CrudHistory.js +140 -0
- package/dist/Components/Forms/CrudParts.js +2 -1
- package/dist/Components/Forms/Form.js +4 -1
- 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.js +4 -1
- package/dist/Components/Inputs/InputRenderer.js +3 -0
- package/dist/Components/Inputs/NumberBox.js +4 -2
- package/dist/Components/Inputs/TextArea.js +4 -1
- package/dist/Components/Inputs/TextBox.js +4 -1
- package/dist/Components/Inputs/TimePicker.js +4 -1
- package/dist/Components/Inputs/TreeView.d.ts +55 -5
- package/dist/Components/Inputs/TreeView.js +372 -23
- package/dist/Components/Layouts/ThemePicker.d.ts +3 -2
- package/dist/Components/Layouts/ThemePicker.js +16 -4
- package/dist/Components/Viewers/DataTable.js +63 -21
- package/dist/Components/Viewers/DataTableParts.d.ts +26 -8
- package/dist/Components/Viewers/DataTableParts.js +39 -10
- 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/CodeHelpers.d.ts +97 -0
- package/dist/Helpers/CodeHelpers.js +332 -0
- package/dist/Helpers/CrudBackend.d.ts +94 -4
- package/dist/Helpers/CrudBackend.js +168 -9
- package/dist/Helpers/CrudColumns.d.ts +51 -0
- package/dist/Helpers/CrudColumns.js +69 -0
- package/dist/Helpers/CrudHelpers.d.ts +50 -5
- package/dist/Helpers/CrudHelpers.js +109 -12
- package/dist/Helpers/InputParamsHelpers.js +8 -0
- package/dist/Helpers/MessageBuilder.js +2 -0
- package/dist/Helpers/NexusHelpers.d.ts +0 -0
- package/dist/Helpers/NexusHelpers.js +1 -0
- package/dist/Helpers/RequestCache.d.ts +35 -0
- package/dist/Helpers/RequestCache.js +113 -0
- package/dist/Helpers/TableExport.js +12 -12
- package/dist/Helpers/TableHelpers.d.ts +1 -1
- package/dist/Helpers/TableHelpers.js +7 -2
- package/dist/Helpers/TableJoins.d.ts +70 -0
- package/dist/Helpers/TableJoins.js +250 -0
- package/dist/Helpers/TableStore.d.ts +5 -0
- package/dist/Helpers/TableStore.js +9 -0
- package/dist/Helpers/TreeStore.d.ts +225 -11
- package/dist/Helpers/TreeStore.js +683 -90
- package/dist/Helpers/UserPreferences.d.ts +8 -0
- package/dist/Helpers/UserPreferences.js +17 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +47 -9
- package/dist/Interfaces/FormInterfaces.d.ts +4 -1
- package/dist/Interfaces/InputInterfaces.d.ts +24 -0
- 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/TableInterfaces.d.ts +86 -4
- 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/JoinSources.d.ts +48 -0
- package/dist/Services/JoinSources.js +74 -0
- package/dist/Services/ServerApi.d.ts +13 -2
- package/dist/Services/ServerApi.js +8 -3
- package/dist/Shared.Index.d.ts +4 -0
- package/dist/Shared.Index.js +4 -0
- package/package.json +87 -85
- package/src/Styles/Nexus.Avatar.css +79 -79
- package/src/Styles/Nexus.Base.css +117 -117
- package/src/Styles/Nexus.Button.css +180 -180
- package/src/Styles/Nexus.Calendar.css +273 -273
- package/src/Styles/Nexus.Chat.css +1443 -1443
- package/src/Styles/Nexus.Choice.css +343 -343
- package/src/Styles/Nexus.Crud.css +168 -168
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +725 -725
- package/src/Styles/Nexus.Editor.css +295 -295
- package/src/Styles/Nexus.Excel.css +389 -389
- package/src/Styles/Nexus.Form.css +279 -279
- package/src/Styles/Nexus.Index.css +37 -37
- package/src/Styles/Nexus.Input.css +196 -4
- package/src/Styles/Nexus.Markdown.css +237 -237
- package/src/Styles/Nexus.Menu.css +237 -237
- package/src/Styles/Nexus.Popup.css +724 -724
- package/src/Styles/Nexus.Rows.css +637 -637
- package/src/Styles/Nexus.Slider.css +276 -276
- package/src/Styles/Nexus.Tab.Buttons.css +432 -432
- package/src/Styles/Nexus.Table.css +31 -30
- package/src/Styles/Nexus.Theme.Picker.css +59 -3
- package/src/Styles/Nexus.Themes.css +194 -194
- package/src/Styles/Nexus.Time.css +144 -144
- package/src/Styles/Nexus.Toast.css +263 -263
- package/src/Styles/Nexus.Tokens.css +89 -89
- package/src/Styles/Nexus.Tree.css +500 -431
|
@@ -1,295 +1,295 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* The frame of the Markdown and rich text editors (EditorShell.tsx): a field box holding a bar (views, formatting
|
|
4
|
-
* buttons, full screen), a body with a height, and a status bar that is also the height handle. The box, label,
|
|
5
|
-
* hint, error, and read-only and disabled states come from the field (Nexus.Input.css).
|
|
6
|
-
*/
|
|
7
|
-
.nx-editor .nx-field__box {
|
|
8
|
-
align-items: stretch;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
/* Narrow editors stack their parts (the bar, split views). */
|
|
11
|
-
container: nx-editor / inline-size;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.nx-editor__frame {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex: 1 1 auto;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Bar */
|
|
22
|
-
.nx-editor__bar {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 6px var(--nx-space-2);
|
|
27
|
-
padding: 5px 6px;
|
|
28
|
-
border-bottom: 1px solid var(--nx-border);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Views: small tab buttons with icons, the selected one with its label (TabButtons labels="selected"). */
|
|
32
|
-
.nx-editor__modes {
|
|
33
|
-
flex: 0 0 auto;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Formatting buttons */
|
|
37
|
-
.nx-editor__tools {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-wrap: wrap;
|
|
40
|
-
align-items: center;
|
|
41
|
-
gap: 2px;
|
|
42
|
-
min-width: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.nx-editor__end {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
gap: 2px;
|
|
49
|
-
margin-left: auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.nx-editor__tool {
|
|
53
|
-
display: grid;
|
|
54
|
-
place-items: center;
|
|
55
|
-
width: var(--nx-control-sm);
|
|
56
|
-
height: var(--nx-control-sm);
|
|
57
|
-
padding: 0;
|
|
58
|
-
border: 0;
|
|
59
|
-
border-radius: var(--nx-radius-sm);
|
|
60
|
-
background: none;
|
|
61
|
-
color: var(--nx-text-muted);
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
transition:
|
|
64
|
-
background-color var(--nx-duration),
|
|
65
|
-
color var(--nx-duration);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.nx-editor__tool .nx-icon {
|
|
69
|
-
width: 16px;
|
|
70
|
-
height: 16px;
|
|
71
|
-
vertical-align: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.nx-editor__tool:hover:not(:disabled) {
|
|
75
|
-
background: var(--nx-surface-hover);
|
|
76
|
-
color: var(--nx-text);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.nx-editor__tool:active:not(:disabled) {
|
|
80
|
-
background: color-mix(in oklab, var(--nx-surface-hover), var(--nx-text) 8%);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.nx-editor__tool:focus-visible {
|
|
84
|
-
outline: 2px solid var(--nx-primary);
|
|
85
|
-
outline-offset: -2px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.nx-editor__tool[aria-pressed="true"] {
|
|
89
|
-
color: var(--nx-primary);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.nx-editor__tool:disabled {
|
|
93
|
-
cursor: not-allowed;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.nx-editor__divider {
|
|
97
|
-
width: 1px;
|
|
98
|
-
height: 16px;
|
|
99
|
-
margin: 0 5px;
|
|
100
|
-
background: var(--nx-border);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.nx-editor__bar .nx-field__lock {
|
|
104
|
-
width: var(--nx-control-sm);
|
|
105
|
-
height: var(--nx-control-sm);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.nx-editor__bar .nx-field__lock .nx-icon {
|
|
109
|
-
width: 16px;
|
|
110
|
-
height: 16px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Body */
|
|
114
|
-
.nx-editor__body {
|
|
115
|
-
display: grid;
|
|
116
|
-
grid-template-columns: minmax(0, 1fr);
|
|
117
|
-
height: var(--nx-editor-height, 280px);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/*
|
|
121
|
-
* Status bar and height handle. The whole bar drags, so the target is easy to hit; the grip in the middle is the
|
|
122
|
-
* keyboard handle (a focusable separator) and turns to the primary color while the height changes.
|
|
123
|
-
*/
|
|
124
|
-
.nx-editor__footer {
|
|
125
|
-
position: relative;
|
|
126
|
-
display: grid;
|
|
127
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
128
|
-
align-items: center;
|
|
129
|
-
gap: var(--nx-space-2);
|
|
130
|
-
min-height: 26px;
|
|
131
|
-
padding: 2px var(--nx-space-3);
|
|
132
|
-
border-top: 1px solid var(--nx-border);
|
|
133
|
-
color: var(--nx-text-muted);
|
|
134
|
-
font-size: var(--nx-text-xs);
|
|
135
|
-
line-height: 1.3;
|
|
136
|
-
user-select: none;
|
|
137
|
-
transition: background-color var(--nx-duration);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.nx-editor__footer[data-resizable] {
|
|
141
|
-
cursor: ns-resize;
|
|
142
|
-
touch-action: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.nx-field[data-disabled] .nx-editor__footer {
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.nx-editor__footer[data-resizable]:hover,
|
|
150
|
-
.nx-editor__footer[data-resizing] {
|
|
151
|
-
background: color-mix(in oklab, var(--nx-text) 4%, transparent);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.nx-editor__hint {
|
|
155
|
-
display: inline-flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
gap: 5px;
|
|
158
|
-
min-width: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.nx-editor__hint .nx-icon {
|
|
162
|
-
flex-shrink: 0;
|
|
163
|
-
width: 16px;
|
|
164
|
-
height: 16px;
|
|
165
|
-
vertical-align: 0;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.nx-editor__handle {
|
|
169
|
-
position: relative;
|
|
170
|
-
grid-column: 2;
|
|
171
|
-
display: grid;
|
|
172
|
-
place-items: center;
|
|
173
|
-
width: 64px;
|
|
174
|
-
height: 18px;
|
|
175
|
-
border-radius: var(--nx-radius-full);
|
|
176
|
-
outline: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.nx-editor__handle:focus-visible {
|
|
180
|
-
box-shadow: var(--nx-focus-ring);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.nx-editor__grip {
|
|
184
|
-
width: 36px;
|
|
185
|
-
height: 4px;
|
|
186
|
-
border-radius: var(--nx-radius-full);
|
|
187
|
-
/* Muted, not subtle: the grip is the only sign of the handle, so it keeps 3:1 on the box in every theme. */
|
|
188
|
-
background: var(--nx-text-muted);
|
|
189
|
-
transition:
|
|
190
|
-
width var(--nx-duration),
|
|
191
|
-
background-color var(--nx-duration);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.nx-editor__footer[data-resizable]:hover .nx-editor__grip {
|
|
195
|
-
width: 44px;
|
|
196
|
-
background: var(--nx-text);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.nx-editor__footer[data-resizing] .nx-editor__grip,
|
|
200
|
-
.nx-editor__handle:focus-visible .nx-editor__grip {
|
|
201
|
-
width: 48px;
|
|
202
|
-
background: var(--nx-primary);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/* The height while it changes, inverted like a tooltip, above the grip. */
|
|
206
|
-
.nx-editor__size {
|
|
207
|
-
position: absolute;
|
|
208
|
-
bottom: calc(100% + 8px);
|
|
209
|
-
left: 50%;
|
|
210
|
-
padding: 3px 8px;
|
|
211
|
-
border-radius: var(--nx-radius);
|
|
212
|
-
background: var(--nx-text);
|
|
213
|
-
color: var(--nx-surface);
|
|
214
|
-
box-shadow: var(--nx-shadow);
|
|
215
|
-
font-size: var(--nx-text-xs);
|
|
216
|
-
font-weight: 500;
|
|
217
|
-
font-variant-numeric: tabular-nums;
|
|
218
|
-
white-space: nowrap;
|
|
219
|
-
opacity: 0;
|
|
220
|
-
transform: translateX(-50%);
|
|
221
|
-
transition: opacity var(--nx-duration);
|
|
222
|
-
pointer-events: none;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.nx-editor__footer[data-resizing] .nx-editor__size {
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.nx-editor__count {
|
|
230
|
-
grid-column: 3;
|
|
231
|
-
min-width: 0;
|
|
232
|
-
overflow: hidden;
|
|
233
|
-
font-variant-numeric: tabular-nums;
|
|
234
|
-
text-align: right;
|
|
235
|
-
text-overflow: ellipsis;
|
|
236
|
-
white-space: nowrap;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/*
|
|
240
|
-
* Narrow: full screen and the lock stay on the row of the views, the buttons take a row of their own, and the
|
|
241
|
-
* status bar keeps the icon and the characters, so nothing runs into the grip.
|
|
242
|
-
*/
|
|
243
|
-
@container nx-editor (width < 560px) {
|
|
244
|
-
.nx-editor__end {
|
|
245
|
-
order: 1;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.nx-editor__tools {
|
|
249
|
-
flex-basis: 100%;
|
|
250
|
-
order: 2;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.nx-editor__hint > span,
|
|
254
|
-
.nx-editor__words {
|
|
255
|
-
display: none;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/* Full screen: the box in the top layer, over a dimmed page. */
|
|
260
|
-
.nx-editor .nx-field__box:popover-open {
|
|
261
|
-
position: fixed;
|
|
262
|
-
inset: var(--nx-space-6);
|
|
263
|
-
width: auto;
|
|
264
|
-
max-width: 1440px;
|
|
265
|
-
height: auto;
|
|
266
|
-
margin: auto;
|
|
267
|
-
padding: 0;
|
|
268
|
-
color: var(--nx-text);
|
|
269
|
-
box-shadow: var(--nx-shadow);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.nx-editor .nx-field__box::backdrop {
|
|
273
|
-
background: rgb(0 0 0 / 0.5);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.nx-editor .nx-field__box:popover-open .nx-editor__body {
|
|
277
|
-
flex: 1 1 auto;
|
|
278
|
-
height: auto;
|
|
279
|
-
min-height: 0;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
@media (width < 640px) {
|
|
283
|
-
.nx-editor .nx-field__box:popover-open {
|
|
284
|
-
inset: 0;
|
|
285
|
-
border: 0;
|
|
286
|
-
border-radius: 0;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
[data-nx-motion="reduce"] .nx-editor__grip,
|
|
291
|
-
[data-nx-motion="reduce"] .nx-editor__size,
|
|
292
|
-
[data-nx-motion="reduce"] .nx-editor__footer {
|
|
293
|
-
transition: none;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* The frame of the Markdown and rich text editors (EditorShell.tsx): a field box holding a bar (views, formatting
|
|
4
|
+
* buttons, full screen), a body with a height, and a status bar that is also the height handle. The box, label,
|
|
5
|
+
* hint, error, and read-only and disabled states come from the field (Nexus.Input.css).
|
|
6
|
+
*/
|
|
7
|
+
.nx-editor .nx-field__box {
|
|
8
|
+
align-items: stretch;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
/* Narrow editors stack their parts (the bar, split views). */
|
|
11
|
+
container: nx-editor / inline-size;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.nx-editor__frame {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex: 1 1 auto;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Bar */
|
|
22
|
+
.nx-editor__bar {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 6px var(--nx-space-2);
|
|
27
|
+
padding: 5px 6px;
|
|
28
|
+
border-bottom: 1px solid var(--nx-border);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Views: small tab buttons with icons, the selected one with its label (TabButtons labels="selected"). */
|
|
32
|
+
.nx-editor__modes {
|
|
33
|
+
flex: 0 0 auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Formatting buttons */
|
|
37
|
+
.nx-editor__tools {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 2px;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.nx-editor__end {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 2px;
|
|
49
|
+
margin-left: auto;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nx-editor__tool {
|
|
53
|
+
display: grid;
|
|
54
|
+
place-items: center;
|
|
55
|
+
width: var(--nx-control-sm);
|
|
56
|
+
height: var(--nx-control-sm);
|
|
57
|
+
padding: 0;
|
|
58
|
+
border: 0;
|
|
59
|
+
border-radius: var(--nx-radius-sm);
|
|
60
|
+
background: none;
|
|
61
|
+
color: var(--nx-text-muted);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition:
|
|
64
|
+
background-color var(--nx-duration),
|
|
65
|
+
color var(--nx-duration);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.nx-editor__tool .nx-icon {
|
|
69
|
+
width: 16px;
|
|
70
|
+
height: 16px;
|
|
71
|
+
vertical-align: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.nx-editor__tool:hover:not(:disabled) {
|
|
75
|
+
background: var(--nx-surface-hover);
|
|
76
|
+
color: var(--nx-text);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.nx-editor__tool:active:not(:disabled) {
|
|
80
|
+
background: color-mix(in oklab, var(--nx-surface-hover), var(--nx-text) 8%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.nx-editor__tool:focus-visible {
|
|
84
|
+
outline: 2px solid var(--nx-primary);
|
|
85
|
+
outline-offset: -2px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.nx-editor__tool[aria-pressed="true"] {
|
|
89
|
+
color: var(--nx-primary);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.nx-editor__tool:disabled {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.nx-editor__divider {
|
|
97
|
+
width: 1px;
|
|
98
|
+
height: 16px;
|
|
99
|
+
margin: 0 5px;
|
|
100
|
+
background: var(--nx-border);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.nx-editor__bar .nx-field__lock {
|
|
104
|
+
width: var(--nx-control-sm);
|
|
105
|
+
height: var(--nx-control-sm);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.nx-editor__bar .nx-field__lock .nx-icon {
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Body */
|
|
114
|
+
.nx-editor__body {
|
|
115
|
+
display: grid;
|
|
116
|
+
grid-template-columns: minmax(0, 1fr);
|
|
117
|
+
height: var(--nx-editor-height, 280px);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* Status bar and height handle. The whole bar drags, so the target is easy to hit; the grip in the middle is the
|
|
122
|
+
* keyboard handle (a focusable separator) and turns to the primary color while the height changes.
|
|
123
|
+
*/
|
|
124
|
+
.nx-editor__footer {
|
|
125
|
+
position: relative;
|
|
126
|
+
display: grid;
|
|
127
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: var(--nx-space-2);
|
|
130
|
+
min-height: 26px;
|
|
131
|
+
padding: 2px var(--nx-space-3);
|
|
132
|
+
border-top: 1px solid var(--nx-border);
|
|
133
|
+
color: var(--nx-text-muted);
|
|
134
|
+
font-size: var(--nx-text-xs);
|
|
135
|
+
line-height: 1.3;
|
|
136
|
+
user-select: none;
|
|
137
|
+
transition: background-color var(--nx-duration);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.nx-editor__footer[data-resizable] {
|
|
141
|
+
cursor: ns-resize;
|
|
142
|
+
touch-action: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.nx-field[data-disabled] .nx-editor__footer {
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.nx-editor__footer[data-resizable]:hover,
|
|
150
|
+
.nx-editor__footer[data-resizing] {
|
|
151
|
+
background: color-mix(in oklab, var(--nx-text) 4%, transparent);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.nx-editor__hint {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 5px;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.nx-editor__hint .nx-icon {
|
|
162
|
+
flex-shrink: 0;
|
|
163
|
+
width: 16px;
|
|
164
|
+
height: 16px;
|
|
165
|
+
vertical-align: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.nx-editor__handle {
|
|
169
|
+
position: relative;
|
|
170
|
+
grid-column: 2;
|
|
171
|
+
display: grid;
|
|
172
|
+
place-items: center;
|
|
173
|
+
width: 64px;
|
|
174
|
+
height: 18px;
|
|
175
|
+
border-radius: var(--nx-radius-full);
|
|
176
|
+
outline: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.nx-editor__handle:focus-visible {
|
|
180
|
+
box-shadow: var(--nx-focus-ring);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.nx-editor__grip {
|
|
184
|
+
width: 36px;
|
|
185
|
+
height: 4px;
|
|
186
|
+
border-radius: var(--nx-radius-full);
|
|
187
|
+
/* Muted, not subtle: the grip is the only sign of the handle, so it keeps 3:1 on the box in every theme. */
|
|
188
|
+
background: var(--nx-text-muted);
|
|
189
|
+
transition:
|
|
190
|
+
width var(--nx-duration),
|
|
191
|
+
background-color var(--nx-duration);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.nx-editor__footer[data-resizable]:hover .nx-editor__grip {
|
|
195
|
+
width: 44px;
|
|
196
|
+
background: var(--nx-text);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.nx-editor__footer[data-resizing] .nx-editor__grip,
|
|
200
|
+
.nx-editor__handle:focus-visible .nx-editor__grip {
|
|
201
|
+
width: 48px;
|
|
202
|
+
background: var(--nx-primary);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* The height while it changes, inverted like a tooltip, above the grip. */
|
|
206
|
+
.nx-editor__size {
|
|
207
|
+
position: absolute;
|
|
208
|
+
bottom: calc(100% + 8px);
|
|
209
|
+
left: 50%;
|
|
210
|
+
padding: 3px 8px;
|
|
211
|
+
border-radius: var(--nx-radius);
|
|
212
|
+
background: var(--nx-text);
|
|
213
|
+
color: var(--nx-surface);
|
|
214
|
+
box-shadow: var(--nx-shadow);
|
|
215
|
+
font-size: var(--nx-text-xs);
|
|
216
|
+
font-weight: 500;
|
|
217
|
+
font-variant-numeric: tabular-nums;
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
opacity: 0;
|
|
220
|
+
transform: translateX(-50%);
|
|
221
|
+
transition: opacity var(--nx-duration);
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.nx-editor__footer[data-resizing] .nx-editor__size {
|
|
226
|
+
opacity: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.nx-editor__count {
|
|
230
|
+
grid-column: 3;
|
|
231
|
+
min-width: 0;
|
|
232
|
+
overflow: hidden;
|
|
233
|
+
font-variant-numeric: tabular-nums;
|
|
234
|
+
text-align: right;
|
|
235
|
+
text-overflow: ellipsis;
|
|
236
|
+
white-space: nowrap;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Narrow: full screen and the lock stay on the row of the views, the buttons take a row of their own, and the
|
|
241
|
+
* status bar keeps the icon and the characters, so nothing runs into the grip.
|
|
242
|
+
*/
|
|
243
|
+
@container nx-editor (width < 560px) {
|
|
244
|
+
.nx-editor__end {
|
|
245
|
+
order: 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.nx-editor__tools {
|
|
249
|
+
flex-basis: 100%;
|
|
250
|
+
order: 2;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.nx-editor__hint > span,
|
|
254
|
+
.nx-editor__words {
|
|
255
|
+
display: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Full screen: the box in the top layer, over a dimmed page. */
|
|
260
|
+
.nx-editor .nx-field__box:popover-open {
|
|
261
|
+
position: fixed;
|
|
262
|
+
inset: var(--nx-space-6);
|
|
263
|
+
width: auto;
|
|
264
|
+
max-width: 1440px;
|
|
265
|
+
height: auto;
|
|
266
|
+
margin: auto;
|
|
267
|
+
padding: 0;
|
|
268
|
+
color: var(--nx-text);
|
|
269
|
+
box-shadow: var(--nx-shadow);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.nx-editor .nx-field__box::backdrop {
|
|
273
|
+
background: rgb(0 0 0 / 0.5);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.nx-editor .nx-field__box:popover-open .nx-editor__body {
|
|
277
|
+
flex: 1 1 auto;
|
|
278
|
+
height: auto;
|
|
279
|
+
min-height: 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@media (width < 640px) {
|
|
283
|
+
.nx-editor .nx-field__box:popover-open {
|
|
284
|
+
inset: 0;
|
|
285
|
+
border: 0;
|
|
286
|
+
border-radius: 0;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
[data-nx-motion="reduce"] .nx-editor__grip,
|
|
291
|
+
[data-nx-motion="reduce"] .nx-editor__size,
|
|
292
|
+
[data-nx-motion="reduce"] .nx-editor__footer {
|
|
293
|
+
transition: none;
|
|
294
|
+
}
|
|
295
|
+
}
|