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,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
|
+
}
|