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.
Files changed (234) hide show
  1. package/CHANGELOG.md +2268 -446
  2. package/LICENSE +21 -21
  3. package/README.md +1705 -1084
  4. package/dist/Client.Index.d.ts +17 -0
  5. package/dist/Client.Index.js +17 -0
  6. package/dist/Components/Documents/DocumentFrame.d.ts +50 -0
  7. package/dist/Components/Documents/DocumentFrame.js +83 -0
  8. package/dist/Components/Documents/Menu.d.ts +4 -0
  9. package/dist/Components/Documents/Menu.js +40 -24
  10. package/dist/Components/Documents/PrintDocument.d.ts +95 -0
  11. package/dist/Components/Documents/PrintDocument.js +62 -0
  12. package/dist/Components/Documents/Tabs.d.ts +59 -0
  13. package/dist/Components/Documents/Tabs.js +70 -0
  14. package/dist/Components/Forms/ApiForm.js +19 -2
  15. package/dist/Components/Forms/Crud.d.ts +2 -2
  16. package/dist/Components/Forms/Crud.js +871 -377
  17. package/dist/Components/Forms/CrudActions.d.ts +136 -0
  18. package/dist/Components/Forms/CrudActions.js +184 -0
  19. package/dist/Components/Forms/CrudHistory.d.ts +66 -0
  20. package/dist/Components/Forms/CrudHistory.js +140 -0
  21. package/dist/Components/Forms/CrudNarrowPicker.d.ts +31 -0
  22. package/dist/Components/Forms/CrudNarrowPicker.js +180 -0
  23. package/dist/Components/Forms/CrudParts.d.ts +30 -2
  24. package/dist/Components/Forms/CrudParts.js +56 -5
  25. package/dist/Components/Forms/CrudRowForms.d.ts +26 -0
  26. package/dist/Components/Forms/CrudRowForms.js +114 -0
  27. package/dist/Components/Forms/CrudScopes.d.ts +28 -0
  28. package/dist/Components/Forms/CrudScopes.js +76 -0
  29. package/dist/Components/Forms/CrudTree.d.ts +90 -0
  30. package/dist/Components/Forms/CrudTree.js +363 -0
  31. package/dist/Components/Forms/CrudWorkspace.d.ts +63 -0
  32. package/dist/Components/Forms/CrudWorkspace.js +169 -0
  33. package/dist/Components/Forms/ExcelImport.js +3 -3
  34. package/dist/Components/Forms/Form.d.ts +4 -4
  35. package/dist/Components/Forms/Form.js +125 -16
  36. package/dist/Components/Forms/FormLeaveGuard.d.ts +44 -0
  37. package/dist/Components/Forms/FormLeaveGuard.js +65 -0
  38. package/dist/Components/Forms/RecordFlows.d.ts +50 -0
  39. package/dist/Components/Forms/RecordFlows.js +282 -0
  40. package/dist/Components/Forms/SubmitForm.d.ts +37 -2
  41. package/dist/Components/Forms/SubmitForm.js +195 -10
  42. package/dist/Components/Inputs/CheckBox.js +1 -1
  43. package/dist/Components/Inputs/ChoiceField.d.ts +21 -1
  44. package/dist/Components/Inputs/ChoiceField.js +28 -2
  45. package/dist/Components/Inputs/CodeBox.d.ts +69 -0
  46. package/dist/Components/Inputs/CodeBox.js +316 -0
  47. package/dist/Components/Inputs/DatePicker.js +4 -1
  48. package/dist/Components/Inputs/DateRangePicker.js +4 -1
  49. package/dist/Components/Inputs/DateTimePicker.js +4 -1
  50. package/dist/Components/Inputs/Dropdown.d.ts +13 -0
  51. package/dist/Components/Inputs/Dropdown.js +8 -5
  52. package/dist/Components/Inputs/DropdownParts.d.ts +3 -1
  53. package/dist/Components/Inputs/DropdownParts.js +16 -4
  54. package/dist/Components/Inputs/Field.d.ts +7 -1
  55. package/dist/Components/Inputs/Field.js +2 -2
  56. package/dist/Components/Inputs/GroupForm.d.ts +6 -6
  57. package/dist/Components/Inputs/GroupForm.js +10 -11
  58. package/dist/Components/Inputs/InputRenderer.d.ts +9 -6
  59. package/dist/Components/Inputs/InputRenderer.js +39 -31
  60. package/dist/Components/Inputs/NumberBox.js +4 -2
  61. package/dist/Components/Inputs/PictureInput.d.ts +41 -0
  62. package/dist/Components/Inputs/PictureInput.js +70 -0
  63. package/dist/Components/Inputs/RadioGroup.d.ts +16 -3
  64. package/dist/Components/Inputs/RadioGroup.js +8 -3
  65. package/dist/Components/Inputs/RowsInput.d.ts +1 -1
  66. package/dist/Components/Inputs/RowsInput.js +18 -3
  67. package/dist/Components/Inputs/TabularForm.d.ts +5 -5
  68. package/dist/Components/Inputs/TabularForm.js +29 -29
  69. package/dist/Components/Inputs/TextArea.d.ts +6 -0
  70. package/dist/Components/Inputs/TextArea.js +14 -2
  71. package/dist/Components/Inputs/TextBox.js +4 -1
  72. package/dist/Components/Inputs/TextBoxTypes.d.ts +6 -0
  73. package/dist/Components/Inputs/TextBoxTypes.js +17 -0
  74. package/dist/Components/Inputs/TimePicker.js +4 -1
  75. package/dist/Components/Inputs/TreeView.d.ts +107 -6
  76. package/dist/Components/Inputs/TreeView.js +513 -30
  77. package/dist/Components/Layouts/MessageBox.d.ts +15 -2
  78. package/dist/Components/Layouts/MessageBox.js +56 -7
  79. package/dist/Components/Layouts/Popup.d.ts +13 -6
  80. package/dist/Components/Layouts/Popup.js +37 -9
  81. package/dist/Components/Layouts/PopupDock.d.ts +3 -1
  82. package/dist/Components/Layouts/PopupDock.js +2 -1
  83. package/dist/Components/Layouts/PopupHost.js +5 -4
  84. package/dist/Components/Layouts/ThemePicker.d.ts +3 -2
  85. package/dist/Components/Layouts/ThemePicker.js +16 -4
  86. package/dist/Components/Viewers/DataTable.js +205 -61
  87. package/dist/Components/Viewers/DataTableFilters.d.ts +1 -1
  88. package/dist/Components/Viewers/DataTableFilters.js +17 -2
  89. package/dist/Components/Viewers/DataTableParts.d.ts +46 -12
  90. package/dist/Components/Viewers/DataTableParts.js +62 -21
  91. package/dist/Components/Viewers/OwnerFiles.d.ts +175 -0
  92. package/dist/Components/Viewers/OwnerFiles.js +589 -0
  93. package/dist/Components/Viewers/QrCodeImage.d.ts +22 -0
  94. package/dist/Components/Viewers/QrCodeImage.js +15 -0
  95. package/dist/Components/Viewers/RecordCards.d.ts +16 -0
  96. package/dist/Components/Viewers/RecordCards.js +509 -0
  97. package/dist/Helpers/ApiModules.d.ts +3 -34
  98. package/dist/Helpers/ApiModules.js +3 -3
  99. package/dist/Helpers/ApiRoutes.d.ts +68 -26
  100. package/dist/Helpers/ApiRoutes.js +31 -27
  101. package/dist/Helpers/ArrayHelpers.d.ts +0 -0
  102. package/dist/Helpers/ArrayHelpers.js +2 -0
  103. package/dist/Helpers/BusyHooks.d.ts +6 -0
  104. package/dist/Helpers/BusyHooks.js +39 -0
  105. package/dist/Helpers/CodeHelpers.d.ts +97 -0
  106. package/dist/Helpers/CodeHelpers.js +332 -0
  107. package/dist/Helpers/CrudBackend.d.ts +114 -6
  108. package/dist/Helpers/CrudBackend.js +214 -11
  109. package/dist/Helpers/CrudColumns.d.ts +98 -0
  110. package/dist/Helpers/CrudColumns.js +160 -0
  111. package/dist/Helpers/CrudDetailsTabs.d.ts +58 -0
  112. package/dist/Helpers/CrudDetailsTabs.js +126 -0
  113. package/dist/Helpers/CrudHelpers.d.ts +130 -6
  114. package/dist/Helpers/CrudHelpers.js +304 -12
  115. package/dist/Helpers/CrudNarrowPick.d.ts +83 -0
  116. package/dist/Helpers/CrudNarrowPick.js +157 -0
  117. package/dist/Helpers/CrudRowForms.d.ts +15 -0
  118. package/dist/Helpers/CrudRowForms.js +43 -0
  119. package/dist/Helpers/CrudScopes.d.ts +32 -0
  120. package/dist/Helpers/CrudScopes.js +79 -0
  121. package/dist/Helpers/DropdownHelpers.d.ts +3 -1
  122. package/dist/Helpers/DropdownHelpers.js +6 -2
  123. package/dist/Helpers/ExcelHelpers.d.ts +1 -1
  124. package/dist/Helpers/ExcelHelpers.js +12 -11
  125. package/dist/Helpers/FileAdapter.d.ts +78 -0
  126. package/dist/Helpers/FileAdapter.js +102 -0
  127. package/dist/Helpers/FilePrimaries.d.ts +48 -0
  128. package/dist/Helpers/FilePrimaries.js +138 -0
  129. package/dist/Helpers/FormConfirm.d.ts +32 -0
  130. package/dist/Helpers/FormConfirm.js +40 -0
  131. package/dist/Helpers/FormStore.d.ts +90 -5
  132. package/dist/Helpers/FormStore.js +318 -22
  133. package/dist/Helpers/InputConditions.d.ts +50 -0
  134. package/dist/Helpers/InputConditions.js +168 -0
  135. package/dist/Helpers/InputMemory.d.ts +106 -0
  136. package/dist/Helpers/InputMemory.js +385 -0
  137. package/dist/Helpers/InputNarrowing.d.ts +18 -0
  138. package/dist/Helpers/InputNarrowing.js +67 -0
  139. package/dist/Helpers/InputParamsHelpers.d.ts +44 -1
  140. package/dist/Helpers/InputParamsHelpers.js +162 -71
  141. package/dist/Helpers/MessageBuilder.js +2 -0
  142. package/dist/Helpers/NexusDriveAdapter.d.ts +55 -0
  143. package/dist/Helpers/NexusDriveAdapter.js +207 -0
  144. package/dist/Helpers/NexusHelpers.d.ts +0 -0
  145. package/dist/Helpers/NexusHelpers.js +1 -0
  146. package/dist/Helpers/NumberHelpers.d.ts +95 -0
  147. package/dist/Helpers/NumberHelpers.js +126 -0
  148. package/dist/Helpers/Permissions.js +2 -1
  149. package/dist/Helpers/QrCode.d.ts +26 -0
  150. package/dist/Helpers/QrCode.js +463 -0
  151. package/dist/Helpers/RecordCards.d.ts +205 -0
  152. package/dist/Helpers/RecordCards.js +378 -0
  153. package/dist/Helpers/RequestCache.d.ts +47 -0
  154. package/dist/Helpers/RequestCache.js +132 -0
  155. package/dist/Helpers/RowsStore.d.ts +37 -2
  156. package/dist/Helpers/RowsStore.js +128 -10
  157. package/dist/Helpers/ServerPreview.d.ts +69 -0
  158. package/dist/Helpers/ServerPreview.js +99 -0
  159. package/dist/Helpers/TableColumns.js +4 -3
  160. package/dist/Helpers/TableExport.d.ts +7 -1
  161. package/dist/Helpers/TableExport.js +21 -15
  162. package/dist/Helpers/TableFilters.d.ts +1 -1
  163. package/dist/Helpers/TableFilters.js +24 -23
  164. package/dist/Helpers/TableHelpers.d.ts +24 -3
  165. package/dist/Helpers/TableHelpers.js +58 -12
  166. package/dist/Helpers/TableJoins.d.ts +83 -0
  167. package/dist/Helpers/TableJoins.js +284 -0
  168. package/dist/Helpers/TableStore.d.ts +26 -1
  169. package/dist/Helpers/TableStore.js +73 -7
  170. package/dist/Helpers/TreeStore.d.ts +306 -11
  171. package/dist/Helpers/TreeStore.js +1048 -90
  172. package/dist/Helpers/UserPreferences.d.ts +8 -0
  173. package/dist/Helpers/UserPreferences.js +17 -0
  174. package/dist/Interfaces/CrudInterfaces.d.ts +512 -14
  175. package/dist/Interfaces/FileInterfaces.d.ts +162 -0
  176. package/dist/Interfaces/FileInterfaces.js +4 -0
  177. package/dist/Interfaces/FormInterfaces.d.ts +393 -29
  178. package/dist/Interfaces/FormInterfaces.js +79 -1
  179. package/dist/Interfaces/InputInterfaces.d.ts +39 -3
  180. package/dist/Interfaces/MessageInterfaces.d.ts +1 -1
  181. package/dist/Interfaces/PreferenceInterfaces.d.ts +8 -0
  182. package/dist/Interfaces/PreferenceInterfaces.js +2 -5
  183. package/dist/Interfaces/RecordInterfaces.d.ts +367 -0
  184. package/dist/Interfaces/RecordInterfaces.js +1 -0
  185. package/dist/Interfaces/TableInterfaces.d.ts +160 -5
  186. package/dist/Services/ApiProxy.d.ts +36 -1
  187. package/dist/Services/ApiProxy.js +182 -52
  188. package/dist/Services/ApiProxyRules.d.ts +203 -0
  189. package/dist/Services/ApiProxyRules.js +426 -0
  190. package/dist/Services/ExcelApi.js +5 -0
  191. package/dist/Services/FileApi.d.ts +13 -0
  192. package/dist/Services/FileApi.js +29 -0
  193. package/dist/Services/ImageEditorLoader.d.ts +14 -0
  194. package/dist/Services/ImageEditorLoader.js +51 -0
  195. package/dist/Services/JoinSources.d.ts +80 -0
  196. package/dist/Services/JoinSources.js +150 -0
  197. package/dist/Services/ModuleImport.d.ts +7 -0
  198. package/dist/Services/ModuleImport.js +22 -0
  199. package/dist/Services/ServerApi.d.ts +13 -2
  200. package/dist/Services/ServerApi.js +8 -3
  201. package/dist/Shared.Index.d.ts +20 -0
  202. package/dist/Shared.Index.js +20 -0
  203. package/package.json +92 -85
  204. package/src/Styles/Nexus.Avatar.css +80 -79
  205. package/src/Styles/Nexus.Base.css +117 -117
  206. package/src/Styles/Nexus.Button.css +186 -180
  207. package/src/Styles/Nexus.Calendar.css +273 -273
  208. package/src/Styles/Nexus.Chat.css +1443 -1443
  209. package/src/Styles/Nexus.Choice.css +359 -343
  210. package/src/Styles/Nexus.Crud.css +542 -168
  211. package/src/Styles/Nexus.DateTime.css +81 -81
  212. package/src/Styles/Nexus.Dropdown.css +733 -725
  213. package/src/Styles/Nexus.Editor.css +295 -295
  214. package/src/Styles/Nexus.Excel.css +389 -389
  215. package/src/Styles/Nexus.Files.css +410 -0
  216. package/src/Styles/Nexus.Form.css +282 -279
  217. package/src/Styles/Nexus.Index.css +41 -37
  218. package/src/Styles/Nexus.Input.css +238 -4
  219. package/src/Styles/Nexus.Markdown.css +237 -237
  220. package/src/Styles/Nexus.Menu.css +246 -237
  221. package/src/Styles/Nexus.Popup.css +800 -724
  222. package/src/Styles/Nexus.Print.css +288 -0
  223. package/src/Styles/Nexus.QrCode.css +12 -0
  224. package/src/Styles/Nexus.Record.css +430 -0
  225. package/src/Styles/Nexus.Rows.css +637 -637
  226. package/src/Styles/Nexus.Slider.css +276 -276
  227. package/src/Styles/Nexus.Tab.Buttons.css +497 -432
  228. package/src/Styles/Nexus.Table.css +98 -35
  229. package/src/Styles/Nexus.Theme.Picker.css +59 -3
  230. package/src/Styles/Nexus.Themes.css +200 -194
  231. package/src/Styles/Nexus.Time.css +144 -144
  232. package/src/Styles/Nexus.Toast.css +263 -263
  233. package/src/Styles/Nexus.Tokens.css +94 -89
  234. package/src/Styles/Nexus.Tree.css +530 -431
@@ -0,0 +1,410 @@
1
+ /*
2
+ * An owner's pictures and documents (OwnerFiles.tsx, PictureInput.tsx): a picture of any size and shape, the picture
3
+ * input's preview and buttons, the gallery's two panes and the document list. Nothing moves under the pointer: a hovered
4
+ * picture gets a ring, never a new size, so a table's rows and the gallery's grid stay where they are.
5
+ */
6
+ @layer nexus.components {
7
+ /* A picture: its height from --nx-picture-h, its width from the shape (--nx-picture-ratio, width / height). */
8
+ .nx-picture {
9
+ position: relative;
10
+ display: inline-grid;
11
+ flex-shrink: 0;
12
+ place-items: center;
13
+ height: var(--nx-picture-h, 28px);
14
+ aspect-ratio: var(--nx-picture-ratio, 1);
15
+ padding: 0;
16
+ overflow: hidden;
17
+ border: 0;
18
+ border-radius: var(--nx-radius-sm);
19
+ background: color-mix(in oklab, var(--nx-text) 7%, var(--nx-surface));
20
+ color: var(--nx-text-subtle);
21
+ font: inherit;
22
+ vertical-align: middle;
23
+ }
24
+
25
+ .nx-picture img {
26
+ position: absolute;
27
+ inset: 0;
28
+ width: 100%;
29
+ height: 100%;
30
+ object-fit: cover;
31
+ }
32
+
33
+ .nx-picture--empty .nx-icon {
34
+ width: min(50%, 2rem);
35
+ height: auto;
36
+ }
37
+
38
+ .nx-picture--round {
39
+ border-radius: 50%;
40
+ }
41
+
42
+ /* No picture, a name: its initials, on the name's avatar tone (Nexus.Avatar.css), in the text colour. */
43
+ .nx-picture--initials {
44
+ color: var(--nx-text);
45
+ font-size: max(8px, calc(var(--nx-picture-h, 28px) * 0.4));
46
+ font-weight: 600;
47
+ line-height: 1;
48
+ }
49
+
50
+ /* Not read yet: the tint alone, so a row with a picture never flashes the no-picture icon first. */
51
+ .nx-picture--loading .nx-icon {
52
+ visibility: hidden;
53
+ }
54
+
55
+ button.nx-picture {
56
+ cursor: pointer;
57
+ }
58
+
59
+ button.nx-picture:hover {
60
+ box-shadow: 0 0 0 1px var(--nx-border-strong);
61
+ }
62
+
63
+ :is(button.nx-picture, .nx-files__name):focus-visible {
64
+ outline: none;
65
+ box-shadow: var(--nx-focus-ring);
66
+ }
67
+
68
+ /* The picture input: the preview beside its buttons, which wrap under it when the form is narrow. */
69
+ .nx-picture-input {
70
+ min-width: 0;
71
+ }
72
+
73
+ .nx-picture-input__body {
74
+ display: flex;
75
+ flex-wrap: wrap;
76
+ align-items: center;
77
+ gap: var(--nx-space-3) var(--nx-space-4);
78
+ margin-top: var(--nx-space-1);
79
+ }
80
+
81
+ .nx-picture-input__actions {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+ gap: var(--nx-space-2);
85
+ }
86
+
87
+ /* The gallery and the document list. */
88
+ .nx-files {
89
+ display: grid;
90
+ gap: var(--nx-space-4);
91
+ min-width: 0;
92
+ }
93
+
94
+ .nx-files__bar {
95
+ display: flex;
96
+ flex-wrap: wrap;
97
+ align-items: center;
98
+ justify-content: space-between;
99
+ gap: var(--nx-space-2) var(--nx-space-3);
100
+ }
101
+
102
+ .nx-files__note {
103
+ margin: 0;
104
+ color: var(--nx-text-muted);
105
+ font-size: var(--nx-text-sm);
106
+ }
107
+
108
+ .nx-files__note--error {
109
+ color: var(--nx-danger-text);
110
+ }
111
+
112
+ .nx-files__empty {
113
+ display: grid;
114
+ place-items: center;
115
+ gap: var(--nx-space-2);
116
+ padding: var(--nx-space-8) var(--nx-space-4);
117
+ border-radius: var(--nx-radius-lg);
118
+ background: color-mix(in oklab, var(--nx-text) 4%, var(--nx-surface));
119
+ color: var(--nx-text-muted);
120
+ text-align: center;
121
+ }
122
+
123
+ .nx-files__empty > .nx-icon {
124
+ width: 2rem;
125
+ height: 2rem;
126
+ }
127
+
128
+ .nx-files__empty p {
129
+ margin: 0;
130
+ }
131
+
132
+ .nx-files__grid,
133
+ .nx-files__list {
134
+ margin: 0;
135
+ padding: 0;
136
+ list-style: none;
137
+ }
138
+
139
+ /*
140
+ * Pictures in two panes (the 2026-06-20 gallery): the main picture large with its buttons and the count, a hairline,
141
+ * then the grid. The gallery is the size container: under 560px of its own width the main picture sits small beside
142
+ * its buttons, over the grid. In its window (a flush popup's body) it has a height of its own, so the grid scrolls and
143
+ * nothing else does; in a page or a tab it is as tall as its pictures.
144
+ */
145
+ .nx-files--panes {
146
+ container-type: inline-size;
147
+ width: 100%;
148
+ }
149
+
150
+ .nx-files__frame {
151
+ display: grid;
152
+ grid-template-columns: auto minmax(0, 1fr);
153
+ min-height: 0;
154
+ }
155
+
156
+ .nx-files__side {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: var(--nx-space-4);
160
+ box-sizing: content-box;
161
+ width: 15rem;
162
+ min-height: 0;
163
+ padding-inline-end: var(--nx-space-5);
164
+ border-inline-end: 1px solid var(--nx-border);
165
+ }
166
+
167
+ /* The main picture: about 15rem on its long side, a rounded square for every shape (only an avatar is round). */
168
+ .nx-files__cover {
169
+ --nx-picture-h: calc(15rem / max(1, var(--nx-picture-ratio, 1)));
170
+
171
+ align-self: center;
172
+ border-radius: var(--nx-radius-lg);
173
+ }
174
+
175
+ .nx-files__cover.nx-picture--empty .nx-icon {
176
+ width: 3rem;
177
+ }
178
+
179
+ .nx-files__about {
180
+ display: grid;
181
+ align-content: start;
182
+ gap: var(--nx-space-3);
183
+ min-width: 0;
184
+ }
185
+
186
+ .nx-files__side-actions {
187
+ display: flex;
188
+ flex-wrap: wrap;
189
+ gap: var(--nx-space-2);
190
+ }
191
+
192
+ .nx-files__side-actions > .nx-btn {
193
+ flex: 1 1 0;
194
+ }
195
+
196
+ .nx-files__pane {
197
+ min-width: 0;
198
+ min-height: 0;
199
+ padding-inline-start: var(--nx-space-5);
200
+ }
201
+
202
+ /*
203
+ * The window: edge to edge, the panes padded inside, a height of its own (the whole window once it fills it). What is
204
+ * not the panes there - the list that could not be read, with Try again - has the window's own padding.
205
+ */
206
+ .nx-popup--flush .nx-popup__body > .nx-files:not(.nx-files--panes) {
207
+ padding: var(--nx-space-5);
208
+ }
209
+
210
+ @media (max-width: 600px) {
211
+ .nx-popup--flush .nx-popup__body > .nx-files:not(.nx-files--panes) {
212
+ padding: var(--nx-space-4);
213
+ }
214
+ }
215
+
216
+ .nx-popup--flush .nx-popup__body > .nx-files--panes {
217
+ height: min(36rem, calc(100dvh - 10rem));
218
+ }
219
+
220
+ .nx-popup:is(.nx-popup--full, .nx-popup--maximized) .nx-popup__body > .nx-files--panes {
221
+ height: 100%;
222
+ }
223
+
224
+ .nx-popup--flush .nx-popup__body > .nx-files--panes .nx-files__frame {
225
+ height: 100%;
226
+ }
227
+
228
+ .nx-popup--flush .nx-popup__body > .nx-files--panes :is(.nx-files__side, .nx-files__pane) {
229
+ padding: var(--nx-space-5);
230
+ overflow-y: auto;
231
+ overscroll-behavior: contain;
232
+ }
233
+
234
+ /* At least two pictures a row; about 11rem each where there is room. */
235
+ .nx-files__grid {
236
+ display: grid;
237
+ grid-template-columns: repeat(auto-fill, minmax(min(11rem, calc(50% - var(--nx-space-3) / 2)), 1fr));
238
+ gap: var(--nx-space-3);
239
+ }
240
+
241
+ .nx-files__tile {
242
+ position: relative;
243
+ min-width: 0;
244
+ }
245
+
246
+ /* A picture in the grid: a rounded square (or the page's shape), the picture covering it. */
247
+ .nx-files__thumb,
248
+ .nx-table__bone.nx-files__bone {
249
+ position: relative;
250
+ display: block;
251
+ width: 100%;
252
+ height: auto;
253
+ aspect-ratio: var(--nx-picture-ratio, 1);
254
+ overflow: hidden;
255
+ border-radius: var(--nx-radius-lg);
256
+ background: color-mix(in oklab, var(--nx-text) 7%, var(--nx-surface));
257
+ }
258
+
259
+ .nx-files__thumb img {
260
+ position: absolute;
261
+ inset: 0;
262
+ width: 100%;
263
+ height: 100%;
264
+ object-fit: cover;
265
+ }
266
+
267
+ .nx-files__tile:hover .nx-files__thumb {
268
+ box-shadow: 0 0 0 1px var(--nx-border-strong);
269
+ }
270
+
271
+ /* The main picture: a ring in the accent, and the Main tag in its corner. */
272
+ .nx-files__tile[data-primary] .nx-files__thumb {
273
+ box-shadow: 0 0 0 2px var(--nx-primary);
274
+ }
275
+
276
+ .nx-files__mark {
277
+ position: absolute;
278
+ top: var(--nx-space-2);
279
+ left: var(--nx-space-2);
280
+ box-shadow: var(--nx-shadow-sm);
281
+ }
282
+
283
+ /*
284
+ * The picture's buttons, inside it and centred, on a popover's panel. Shown on hover and on a keyboard's focus in the
285
+ * picture; where a finger may press (a touch screen, a laptop's too) always, so no button waits behind a hover.
286
+ * Hidden, they stay in the Tab order and to a screen reader, but take no press: a tap meant for the picture never
287
+ * runs Make main or Edit unseen.
288
+ */
289
+ .nx-files__tools {
290
+ position: absolute;
291
+ inset: 0;
292
+ display: flex;
293
+ flex-wrap: wrap;
294
+ justify-content: center;
295
+ gap: 2px;
296
+ width: fit-content;
297
+ max-width: calc(100% - var(--nx-space-2));
298
+ height: fit-content;
299
+ margin: auto;
300
+ padding: 3px;
301
+ border: 1px solid var(--nx-border);
302
+ border-radius: var(--nx-radius);
303
+ background: light-dark(var(--nx-surface), var(--nx-surface-2));
304
+ box-shadow: var(--nx-shadow);
305
+ opacity: 0;
306
+ pointer-events: none;
307
+ transition: opacity var(--nx-duration) ease-out;
308
+ }
309
+
310
+ .nx-files__tile:is(:hover, :has(:focus-visible)) .nx-files__tools {
311
+ opacity: 1;
312
+ pointer-events: auto;
313
+ }
314
+
315
+ @media (hover: none), (any-hover: none), (any-pointer: coarse) {
316
+ .nx-files__tools {
317
+ opacity: 1;
318
+ pointer-events: auto;
319
+ }
320
+ }
321
+
322
+ @container (max-width: 559.98px) {
323
+ .nx-files__frame {
324
+ display: flex;
325
+ flex-direction: column;
326
+ }
327
+
328
+ .nx-files__side {
329
+ flex-direction: row;
330
+ align-items: flex-start;
331
+ flex-shrink: 0;
332
+ gap: var(--nx-space-3);
333
+ box-sizing: border-box;
334
+ width: auto;
335
+ padding: 0 0 var(--nx-space-4);
336
+ border-inline-end: 0;
337
+ border-bottom: 1px solid var(--nx-border);
338
+ }
339
+
340
+ .nx-files__cover {
341
+ --nx-picture-h: calc(7rem / max(1, var(--nx-picture-ratio, 1)));
342
+
343
+ align-self: flex-start;
344
+ }
345
+
346
+ .nx-files__cover.nx-picture--empty .nx-icon {
347
+ width: 2rem;
348
+ }
349
+
350
+ .nx-files__about {
351
+ flex: 1 1 0;
352
+ }
353
+
354
+ .nx-files__pane {
355
+ flex: 1 1 auto;
356
+ padding: var(--nx-space-4) 0 0;
357
+ }
358
+
359
+ .nx-popup--flush .nx-popup__body > .nx-files--panes .nx-files__side {
360
+ flex-shrink: 0;
361
+ padding: var(--nx-space-4);
362
+ overflow: visible;
363
+ }
364
+
365
+ .nx-popup--flush .nx-popup__body > .nx-files--panes .nx-files__pane {
366
+ padding: var(--nx-space-4);
367
+ }
368
+ }
369
+
370
+ [data-nx-motion="reduce"] .nx-files__tools {
371
+ transition: none;
372
+ }
373
+
374
+ /* The document list: a row per file, its buttons at the end. */
375
+ .nx-files__actions {
376
+ display: inline-flex;
377
+ gap: 2px;
378
+ }
379
+
380
+ .nx-files__row {
381
+ display: grid;
382
+ grid-template-columns: auto minmax(0, 1fr) auto;
383
+ align-items: center;
384
+ gap: var(--nx-space-3);
385
+ padding: var(--nx-space-2) 0;
386
+ }
387
+
388
+ .nx-files__row + .nx-files__row {
389
+ border-top: 1px solid var(--nx-border);
390
+ }
391
+
392
+ .nx-files__row-text {
393
+ display: grid;
394
+ min-width: 0;
395
+ }
396
+
397
+ .nx-files__name {
398
+ overflow: hidden;
399
+ border-radius: var(--nx-radius-sm);
400
+ color: var(--nx-text);
401
+ font-weight: 500;
402
+ text-decoration: none;
403
+ text-overflow: ellipsis;
404
+ white-space: nowrap;
405
+ }
406
+
407
+ .nx-files__name:hover {
408
+ text-decoration: underline;
409
+ }
410
+ }