nexus-shared 1.1.20 → 2.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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +903 -0
  3. package/dist/Client.Index.d.ts +44 -0
  4. package/dist/Client.Index.js +49 -0
  5. package/dist/Components/Documents/Button.d.ts +29 -0
  6. package/dist/Components/Documents/Button.js +11 -0
  7. package/dist/Components/Documents/Menu.d.ts +102 -0
  8. package/dist/Components/Documents/Menu.js +238 -0
  9. package/dist/Components/Documents/SplitButton.d.ts +64 -0
  10. package/dist/Components/Documents/SplitButton.js +127 -0
  11. package/dist/Components/Documents/TabButtons.d.ts +62 -0
  12. package/dist/Components/Documents/TabButtons.js +19 -0
  13. package/dist/Components/Forms/ApiForm.d.ts +21 -0
  14. package/dist/Components/Forms/ApiForm.js +99 -0
  15. package/dist/Components/Forms/Crud.d.ts +17 -0
  16. package/dist/Components/Forms/Crud.js +556 -0
  17. package/dist/Components/Forms/CrudParts.d.ts +15 -0
  18. package/dist/Components/Forms/CrudParts.js +36 -0
  19. package/dist/Components/Forms/Form.d.ts +52 -0
  20. package/dist/Components/Forms/Form.js +319 -0
  21. package/dist/Components/Forms/SubmitForm.d.ts +65 -0
  22. package/dist/Components/Forms/SubmitForm.js +198 -0
  23. package/dist/Components/Inputs/Calendar.d.ts +69 -0
  24. package/dist/Components/Inputs/Calendar.js +258 -0
  25. package/dist/Components/Inputs/CheckBox.d.ts +53 -0
  26. package/dist/Components/Inputs/CheckBox.js +87 -0
  27. package/dist/Components/Inputs/CheckBoxGroup.d.ts +20 -0
  28. package/dist/Components/Inputs/CheckBoxGroup.js +80 -0
  29. package/dist/Components/Inputs/ChoiceField.d.ts +122 -0
  30. package/dist/Components/Inputs/ChoiceField.js +169 -0
  31. package/dist/Components/Inputs/DatePicker.d.ts +54 -0
  32. package/dist/Components/Inputs/DatePicker.js +246 -0
  33. package/dist/Components/Inputs/DateRangePicker.d.ts +62 -0
  34. package/dist/Components/Inputs/DateRangePicker.js +283 -0
  35. package/dist/Components/Inputs/DateTimePicker.d.ts +75 -0
  36. package/dist/Components/Inputs/DateTimePicker.js +399 -0
  37. package/dist/Components/Inputs/Dropdown.d.ts +117 -0
  38. package/dist/Components/Inputs/Dropdown.js +839 -0
  39. package/dist/Components/Inputs/DropdownParts.d.ts +84 -0
  40. package/dist/Components/Inputs/DropdownParts.js +102 -0
  41. package/dist/Components/Inputs/EditorShell.d.ts +45 -0
  42. package/dist/Components/Inputs/EditorShell.js +214 -0
  43. package/dist/Components/Inputs/Field.d.ts +53 -0
  44. package/dist/Components/Inputs/Field.js +16 -0
  45. package/dist/Components/Inputs/GroupForm.d.ts +20 -0
  46. package/dist/Components/Inputs/GroupForm.js +170 -0
  47. package/dist/Components/Inputs/InputField.d.ts +59 -0
  48. package/dist/Components/Inputs/InputField.js +169 -0
  49. package/dist/Components/Inputs/InputRenderer.d.ts +35 -0
  50. package/dist/Components/Inputs/InputRenderer.js +99 -0
  51. package/dist/Components/Inputs/MarkdownEditor.d.ts +67 -0
  52. package/dist/Components/Inputs/MarkdownEditor.js +289 -0
  53. package/dist/Components/Inputs/NumberBox.d.ts +53 -0
  54. package/dist/Components/Inputs/NumberBox.js +228 -0
  55. package/dist/Components/Inputs/RadioGroup.d.ts +20 -0
  56. package/dist/Components/Inputs/RadioGroup.js +43 -0
  57. package/dist/Components/Inputs/ReadOnlyNotice.d.ts +36 -0
  58. package/dist/Components/Inputs/ReadOnlyNotice.js +116 -0
  59. package/dist/Components/Inputs/RichTextEditor.d.ts +103 -0
  60. package/dist/Components/Inputs/RichTextEditor.js +1170 -0
  61. package/dist/Components/Inputs/RichTextParts.d.ts +63 -0
  62. package/dist/Components/Inputs/RichTextParts.js +157 -0
  63. package/dist/Components/Inputs/RowsInput.d.ts +104 -0
  64. package/dist/Components/Inputs/RowsInput.js +259 -0
  65. package/dist/Components/Inputs/Slider.d.ts +87 -0
  66. package/dist/Components/Inputs/Slider.js +216 -0
  67. package/dist/Components/Inputs/TabularForm.d.ts +23 -0
  68. package/dist/Components/Inputs/TabularForm.js +283 -0
  69. package/dist/Components/Inputs/TextArea.d.ts +43 -0
  70. package/dist/Components/Inputs/TextArea.js +31 -0
  71. package/dist/Components/Inputs/TextBox.d.ts +52 -0
  72. package/dist/Components/Inputs/TextBox.js +58 -0
  73. package/dist/Components/Inputs/TextField.d.ts +31 -0
  74. package/dist/Components/Inputs/TextField.js +35 -0
  75. package/dist/Components/Inputs/TimePanel.d.ts +34 -0
  76. package/dist/Components/Inputs/TimePanel.js +288 -0
  77. package/dist/Components/Inputs/TimePicker.d.ts +54 -0
  78. package/dist/Components/Inputs/TimePicker.js +239 -0
  79. package/dist/Components/Inputs/TreeView.d.ts +160 -0
  80. package/dist/Components/Inputs/TreeView.js +947 -0
  81. package/dist/Components/Layouts/MessageBox.d.ts +71 -0
  82. package/dist/Components/Layouts/MessageBox.js +104 -0
  83. package/dist/Components/Layouts/Popup.d.ts +92 -0
  84. package/dist/Components/Layouts/Popup.js +376 -0
  85. package/dist/Components/Layouts/PopupContext.d.ts +2 -0
  86. package/dist/Components/Layouts/PopupContext.js +4 -0
  87. package/dist/Components/Layouts/PopupDock.d.ts +22 -0
  88. package/dist/Components/Layouts/PopupDock.js +121 -0
  89. package/dist/Components/Layouts/PopupHost.d.ts +56 -0
  90. package/dist/Components/Layouts/PopupHost.js +163 -0
  91. package/dist/Components/Layouts/PopupRules.d.ts +30 -0
  92. package/dist/Components/Layouts/PopupRules.js +63 -0
  93. package/dist/Components/Layouts/ThemePicker.d.ts +13 -0
  94. package/dist/Components/Layouts/ThemePicker.js +22 -0
  95. package/dist/Components/Layouts/ThemeScript.d.ts +14 -0
  96. package/dist/Components/Layouts/ThemeScript.js +13 -0
  97. package/dist/Components/Layouts/ThemeSwitcher.d.ts +13 -0
  98. package/dist/Components/Layouts/ThemeSwitcher.js +29 -0
  99. package/dist/Components/Layouts/Toaster.d.ts +76 -0
  100. package/dist/Components/Layouts/Toaster.js +172 -0
  101. package/dist/Components/Viewers/DataTable.d.ts +25 -0
  102. package/dist/Components/Viewers/DataTable.js +542 -0
  103. package/dist/Components/Viewers/DataTableParts.d.ts +134 -0
  104. package/dist/Components/Viewers/DataTableParts.js +145 -0
  105. package/dist/Components/Viewers/MarkdownView.d.ts +26 -0
  106. package/dist/Components/Viewers/MarkdownView.js +79 -0
  107. package/dist/Components/Viewers/RichTextView.d.ts +18 -0
  108. package/dist/Components/Viewers/RichTextView.js +17 -0
  109. package/dist/Helpers/AnimationHelpers.d.ts +6 -0
  110. package/dist/Helpers/AnimationHelpers.js +35 -0
  111. package/dist/Helpers/ApiClient.d.ts +74 -0
  112. package/dist/Helpers/ApiClient.js +197 -0
  113. package/dist/Helpers/ApiFormHelpers.d.ts +26 -0
  114. package/dist/Helpers/ApiFormHelpers.js +56 -0
  115. package/dist/Helpers/ApiModules.d.ts +135 -0
  116. package/dist/Helpers/ApiModules.js +194 -0
  117. package/dist/Helpers/ApiResponses.d.ts +41 -0
  118. package/dist/Helpers/ApiResponses.js +159 -0
  119. package/dist/Helpers/ApiRoutes.d.ts +150 -0
  120. package/dist/Helpers/ApiRoutes.js +191 -0
  121. package/dist/Helpers/ApiToasts.d.ts +21 -0
  122. package/dist/Helpers/ApiToasts.js +22 -0
  123. package/dist/Helpers/ClassHelpers.d.ts +3 -0
  124. package/dist/Helpers/ClassHelpers.js +4 -0
  125. package/dist/Helpers/CrudBackend.d.ts +56 -0
  126. package/dist/Helpers/CrudBackend.js +119 -0
  127. package/dist/Helpers/CrudHelpers.d.ts +76 -0
  128. package/dist/Helpers/CrudHelpers.js +202 -0
  129. package/dist/Helpers/DateHelpers.d.ts +88 -0
  130. package/dist/Helpers/DateHelpers.js +363 -0
  131. package/dist/Helpers/DatePreferences.d.ts +14 -0
  132. package/dist/Helpers/DatePreferences.js +94 -0
  133. package/dist/Helpers/DateTimeHelpers.d.ts +87 -0
  134. package/dist/Helpers/DateTimeHelpers.js +286 -0
  135. package/dist/Helpers/DragHelpers.d.ts +129 -0
  136. package/dist/Helpers/DragHelpers.js +281 -0
  137. package/dist/Helpers/DropdownHelpers.d.ts +56 -0
  138. package/dist/Helpers/DropdownHelpers.js +180 -0
  139. package/dist/Helpers/FormDrafts.d.ts +18 -0
  140. package/dist/Helpers/FormDrafts.js +76 -0
  141. package/dist/Helpers/FormStore.d.ts +231 -0
  142. package/dist/Helpers/FormStore.js +734 -0
  143. package/dist/Helpers/InputParamsHelpers.d.ts +79 -0
  144. package/dist/Helpers/InputParamsHelpers.js +388 -0
  145. package/dist/Helpers/MarkdownEditing.d.ts +27 -0
  146. package/dist/Helpers/MarkdownEditing.js +250 -0
  147. package/dist/Helpers/MarkdownHelpers.d.ts +82 -0
  148. package/dist/Helpers/MarkdownHelpers.js +775 -0
  149. package/dist/Helpers/MessageBuilder.d.ts +74 -0
  150. package/dist/Helpers/MessageBuilder.js +254 -0
  151. package/dist/Helpers/NepaliCalendar.d.ts +25 -0
  152. package/dist/Helpers/NepaliCalendar.js +107 -0
  153. package/dist/Helpers/NumberHelpers.d.ts +71 -0
  154. package/dist/Helpers/NumberHelpers.js +202 -0
  155. package/dist/Helpers/Permissions.d.ts +62 -0
  156. package/dist/Helpers/Permissions.js +133 -0
  157. package/dist/Helpers/PopoverHelpers.d.ts +43 -0
  158. package/dist/Helpers/PopoverHelpers.js +91 -0
  159. package/dist/Helpers/RichTextHelpers.d.ts +77 -0
  160. package/dist/Helpers/RichTextHelpers.js +1072 -0
  161. package/dist/Helpers/RowsStore.d.ts +160 -0
  162. package/dist/Helpers/RowsStore.js +584 -0
  163. package/dist/Helpers/TableColumns.d.ts +40 -0
  164. package/dist/Helpers/TableColumns.js +254 -0
  165. package/dist/Helpers/TableExport.d.ts +30 -0
  166. package/dist/Helpers/TableExport.js +97 -0
  167. package/dist/Helpers/TableHelpers.d.ts +102 -0
  168. package/dist/Helpers/TableHelpers.js +281 -0
  169. package/dist/Helpers/TableStore.d.ts +142 -0
  170. package/dist/Helpers/TableStore.js +530 -0
  171. package/dist/Helpers/ThemeHelpers.d.ts +15 -0
  172. package/dist/Helpers/ThemeHelpers.js +16 -0
  173. package/dist/Helpers/TimeHelpers.d.ts +73 -0
  174. package/dist/Helpers/TimeHelpers.js +253 -0
  175. package/dist/Helpers/TreeStore.d.ts +188 -0
  176. package/dist/Helpers/TreeStore.js +577 -0
  177. package/dist/Helpers/ValidationHelpers.d.ts +124 -0
  178. package/dist/Helpers/ValidationHelpers.js +301 -0
  179. package/dist/Interfaces/ApiInterfaces.d.ts +149 -0
  180. package/dist/Interfaces/ApiInterfaces.js +24 -0
  181. package/dist/Interfaces/CrudInterfaces.d.ts +171 -0
  182. package/{src/sso-client.tsx → dist/Interfaces/CrudInterfaces.js} +1 -1
  183. package/dist/Interfaces/DateInterfaces.d.ts +154 -0
  184. package/dist/Interfaces/DateInterfaces.js +29 -0
  185. package/dist/Interfaces/FormInterfaces.d.ts +352 -0
  186. package/dist/Interfaces/FormInterfaces.js +1 -0
  187. package/dist/Interfaces/InputInterfaces.d.ts +141 -0
  188. package/dist/Interfaces/InputInterfaces.js +1 -0
  189. package/dist/Interfaces/MessageInterfaces.d.ts +111 -0
  190. package/dist/Interfaces/MessageInterfaces.js +5 -0
  191. package/dist/Interfaces/TableInterfaces.d.ts +291 -0
  192. package/dist/Interfaces/TableInterfaces.js +1 -0
  193. package/dist/Interfaces/ThemeInterfaces.d.ts +17 -0
  194. package/dist/Interfaces/ThemeInterfaces.js +17 -0
  195. package/dist/Interfaces/TypeInterfaces.d.ts +4 -0
  196. package/dist/Interfaces/TypeInterfaces.js +1 -0
  197. package/dist/Server.Index.d.ts +2 -0
  198. package/dist/Server.Index.js +5 -0
  199. package/dist/Services/ApiProxy.d.ts +32 -0
  200. package/dist/Services/ApiProxy.js +111 -0
  201. package/dist/Services/BrowserApi.d.ts +78 -0
  202. package/dist/Services/BrowserApi.js +111 -0
  203. package/dist/Services/ServerApi.d.ts +49 -0
  204. package/dist/Services/ServerApi.js +75 -0
  205. package/dist/Services/ThemeService.d.ts +17 -0
  206. package/dist/Services/ThemeService.js +83 -0
  207. package/dist/Shared.Index.d.ts +43 -0
  208. package/dist/Shared.Index.js +47 -0
  209. package/package.json +82 -33
  210. package/src/Styles/Nexus.Base.css +70 -0
  211. package/src/Styles/Nexus.Button.css +151 -0
  212. package/src/Styles/Nexus.Calendar.css +275 -0
  213. package/src/Styles/Nexus.Choice.css +345 -0
  214. package/src/Styles/Nexus.Crud.css +84 -0
  215. package/src/Styles/Nexus.DateTime.css +81 -0
  216. package/src/Styles/Nexus.Dropdown.css +774 -0
  217. package/src/Styles/Nexus.Editor.css +297 -0
  218. package/src/Styles/Nexus.Form.css +298 -0
  219. package/src/Styles/Nexus.Index.css +34 -0
  220. package/src/Styles/Nexus.Input.css +637 -0
  221. package/src/Styles/Nexus.Markdown.css +265 -0
  222. package/src/Styles/Nexus.Menu.css +249 -0
  223. package/src/Styles/Nexus.Popup.css +731 -0
  224. package/src/Styles/Nexus.RichText.css +463 -0
  225. package/src/Styles/Nexus.Rows.css +566 -0
  226. package/src/Styles/Nexus.Slider.css +278 -0
  227. package/src/Styles/Nexus.Tab.Buttons.css +364 -0
  228. package/src/Styles/Nexus.Table.css +1014 -0
  229. package/src/Styles/Nexus.Theme.Picker.css +159 -0
  230. package/src/Styles/Nexus.Themes.css +194 -0
  231. package/src/Styles/Nexus.Time.css +147 -0
  232. package/src/Styles/Nexus.Toast.css +265 -0
  233. package/src/Styles/Nexus.Tokens.css +72 -0
  234. package/src/Styles/Nexus.Tree.css +435 -0
  235. package/src/api-services/authentication-service.tsx +0 -23
  236. package/src/api-services/preference-service.tsx +0 -5
  237. package/src/api-services/system-service.tsx +0 -34
  238. package/src/client.ts +0 -31
  239. package/src/components/documents/button.tsx +0 -142
  240. package/src/components/documents/icon-box.tsx +0 -93
  241. package/src/components/documents/page-title.tsx +0 -7
  242. package/src/components/documents/tab-button.tsx +0 -172
  243. package/src/components/documents/tag.tsx +0 -30
  244. package/src/components/index.js +0 -0
  245. package/src/components/inputs/checkbox-input.tsx +0 -66
  246. package/src/components/inputs/input-box.tsx +0 -48
  247. package/src/components/inputs/input-element.tsx +0 -65
  248. package/src/components/inputs/input-form.tsx +0 -164
  249. package/src/components/inputs/input.tsx +0 -181
  250. package/src/components/inputs/number-input.tsx +0 -108
  251. package/src/components/inputs/radiobox-input.tsx +0 -53
  252. package/src/components/inputs/textarea-input.tsx +0 -47
  253. package/src/components/inputs/textbox-input.tsx +0 -45
  254. package/src/components/layouts/global-dialogbox.tsx +0 -431
  255. package/src/components/layouts/global-layout.tsx +0 -59
  256. package/src/components/layouts/layout-helpers.tsx +0 -20
  257. package/src/components/layouts/panels/user-panel.tsx +0 -112
  258. package/src/components/layouts/utility-menu.tsx +0 -49
  259. package/src/components/panels/theme-panel.tsx +0 -46
  260. package/src/helpers/bitwise-helpers.tsx +0 -11
  261. package/src/helpers/browser-helpers.tsx +0 -156
  262. package/src/helpers/datasource-helpers.tsx +0 -99
  263. package/src/helpers/element-helpers.tsx +0 -57
  264. package/src/helpers/input-helpers.tsx +0 -74
  265. package/src/helpers/string-helpers.tsx +0 -28
  266. package/src/helpers/utility-helpers.tsx +0 -45
  267. package/src/helpers/validation-helpers.tsx +0 -302
  268. package/src/index.ts +0 -26
  269. package/src/interface.ts +0 -19
  270. package/src/interfaces/auth-token-interfaces.tsx +0 -6
  271. package/src/interfaces/browser-interfaces.tsx +0 -36
  272. package/src/interfaces/button-interfaces.tsx +0 -63
  273. package/src/interfaces/datasource-interfaces.tsx +0 -22
  274. package/src/interfaces/datatable-interfaces.tsx +0 -25
  275. package/src/interfaces/dialogbox-interfaces.tsx +0 -5
  276. package/src/interfaces/exception-interfaces.tsx +0 -99
  277. package/src/interfaces/http-interfaces.tsx +0 -129
  278. package/src/interfaces/icon-interfaces.tsx +0 -129
  279. package/src/interfaces/input-interfaces.tsx +0 -410
  280. package/src/interfaces/layout-interfaces.tsx +0 -191
  281. package/src/interfaces/menu-interfaces.tsx +0 -49
  282. package/src/interfaces/message-interfaces.tsx +0 -32
  283. package/src/interfaces/permission-interfaces.tsx +0 -9
  284. package/src/interfaces/storage-interfaces.tsx +0 -5
  285. package/src/interfaces/system-interfaces.tsx +0 -22
  286. package/src/interfaces/theme-interfaces.tsx +0 -123
  287. package/src/interfaces/type-interfaces.tsx +0 -28
  288. package/src/interfaces/user-interfaces.tsx +0 -47
  289. package/src/nexus-client.tsx +0 -21
  290. package/src/nexus.environments.tsx +0 -66
  291. package/src/proxy-api/proxy-backend.tsx +0 -60
  292. package/src/proxy-api/proxy-constants.tsx +0 -28
  293. package/src/proxy-api/proxy-helpers.tsx +0 -91
  294. package/src/proxy-api-client.tsx +0 -1
  295. package/src/proxy-api-server.tsx +0 -2
  296. package/src/services/http-client-services.tsx +0 -75
  297. package/src/services/http-services.tsx +0 -158
  298. package/src/services/loader-service.tsx +0 -185
  299. package/src/services/localstorage-service.tsx +0 -119
  300. package/src/services/message-services.tsx +0 -383
  301. package/src/services/theme-service.tsx +0 -161
  302. package/src/services/user-services.tsx +0 -10
  303. package/src/sso-config/auth-token-validation.ts +0 -16
  304. package/src/sso-config/callback-route.tsx +0 -35
  305. package/src/sso-config/cookie-encryption.ts +0 -51
  306. package/src/sso-config/cookie-helpers.tsx +0 -102
  307. package/src/sso-config/forgot-password-route.tsx +0 -36
  308. package/src/sso-config/oauth-callback-state.ts +0 -61
  309. package/src/sso-config/pkce-helpers.ts +0 -9
  310. package/src/sso-config/provider-complete-route.tsx +0 -18
  311. package/src/sso-config/redirect-context-actions.tsx +0 -45
  312. package/src/sso-config/redirect-context-helpers.tsx +0 -159
  313. package/src/sso-config/redirect-context-persist.tsx +0 -18
  314. package/src/sso-config/redirect-context-route.tsx +0 -45
  315. package/src/sso-config/refresh-route.tsx +0 -23
  316. package/src/sso-config/sign-in-route.tsx +0 -74
  317. package/src/sso-config/sign-out-route.tsx +0 -57
  318. package/src/sso-config/sign-up-route.tsx +0 -57
  319. package/src/sso-config/sso-backend-flow.ts +0 -38
  320. package/src/sso-config/sso-complete-route.tsx +0 -50
  321. package/src/sso-config/sso-config.ts +0 -59
  322. package/src/sso-config/sso-interfaces.tsx +0 -99
  323. package/src/sso-config/sso-response-helpers.tsx +0 -20
  324. package/src/sso-server.tsx +0 -21
  325. package/src/styles/nexus.animation.css +0 -269
  326. package/src/styles/nexus.core.css +0 -119
  327. package/src/styles/nexus.dialog.css +0 -144
  328. package/src/styles/nexus.icon.css +0 -51
  329. package/src/styles/nexus.input.css +0 -207
  330. package/src/styles/nexus.loader.css +0 -11
  331. package/src/styles/nexus.logic.css +0 -47
  332. package/src/styles/nexus.utility.css +0 -347
@@ -0,0 +1,566 @@
1
+ @layer nexus.components {
2
+ /*
3
+ * Tabular and group forms: rows of inputs in a table, or as sections. Both sit in a fieldset with a legend, and end
4
+ * with a line that holds the Add button, the rows' message (or a removed row with Undo), and the count.
5
+ */
6
+ .nx-rows {
7
+ min-width: 0;
8
+ margin: 0;
9
+ padding: 0;
10
+ border: 0;
11
+ }
12
+
13
+ .nx-rows__legend {
14
+ margin-bottom: 6px;
15
+ padding: 0;
16
+ }
17
+
18
+ .nx-rows__footer {
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ align-items: center;
22
+ gap: var(--nx-space-2) var(--nx-space-3);
23
+ margin-top: var(--nx-space-2);
24
+ }
25
+
26
+ .nx-rows__message {
27
+ flex: 1 1 14rem;
28
+ align-items: center;
29
+ min-width: 0;
30
+ margin: 0;
31
+ font-size: var(--nx-text-xs);
32
+ line-height: 1.35;
33
+ }
34
+
35
+ .nx-rows__removed {
36
+ display: flex;
37
+ gap: var(--nx-space-2);
38
+ color: var(--nx-text-muted);
39
+ }
40
+
41
+ .nx-rows__removed .nx-btn {
42
+ margin-block: -4px;
43
+ }
44
+
45
+ .nx-rows__count {
46
+ margin-left: auto;
47
+ color: var(--nx-text-muted);
48
+ font-size: var(--nx-text-xs);
49
+ font-variant-numeric: tabular-nums;
50
+ white-space: nowrap;
51
+ }
52
+
53
+ /*
54
+ * Tabular form. Rows have a fixed height (the component places rows by it, and measures the first one), so every
55
+ * input is one line. Cells are drawn like a sheet: the inputs lose their own box, the grid lines take its place, and
56
+ * the cell with focus gets the ring inside its edges. Messages show under the table, for the input with focus.
57
+ */
58
+ .nx-tabular {
59
+ --nx-tabular-row: calc(var(--nx-control-md) + 1px);
60
+ --nx-tabular-end: 40px;
61
+ --nx-tabular-line: var(--nx-border);
62
+ --nx-tabular-frame: var(--nx-border-strong);
63
+ --nx-tabular-bg: var(--nx-surface);
64
+ --nx-tabular-head: color-mix(in oklab, var(--nx-text) 4%, var(--nx-surface));
65
+ --nx-tabular-hover: color-mix(in oklab, var(--nx-text) 3%, var(--nx-surface));
66
+ --nx-tabular-readonly: light-dark(var(--nx-surface-2), var(--nx-bg));
67
+ }
68
+
69
+ .nx-tabular--sm {
70
+ --nx-tabular-row: calc(var(--nx-control-sm) + 1px);
71
+ --nx-tabular-end: 34px;
72
+ }
73
+
74
+ .nx-tabular--lg {
75
+ --nx-tabular-row: calc(var(--nx-control-lg) + 1px);
76
+ --nx-tabular-end: 44px;
77
+ }
78
+
79
+ .nx-tabular[data-problem] {
80
+ --nx-tabular-frame: var(--nx-danger);
81
+ }
82
+
83
+ .nx-tabular__viewport {
84
+ position: relative;
85
+ overflow: auto;
86
+ border: 1px solid var(--nx-tabular-frame);
87
+ border-radius: var(--nx-radius);
88
+ background: var(--nx-tabular-bg);
89
+ box-shadow: var(--nx-shadow-sm);
90
+ outline: none;
91
+ /* A focused cell scrolls clear of the header and the fixed columns. */
92
+ scroll-padding: var(--nx-tabular-row) var(--nx-tabular-end) 0 48px;
93
+ scrollbar-width: thin;
94
+ scrollbar-color: color-mix(in oklab, var(--nx-text-subtle) 75%, transparent) transparent;
95
+ transition: border-color var(--nx-duration);
96
+ }
97
+
98
+ .nx-tabular__viewport:focus-visible {
99
+ box-shadow: inset 0 0 0 2px var(--nx-primary);
100
+ }
101
+
102
+ .nx-tabular__table {
103
+ width: 100%;
104
+ }
105
+
106
+ .nx-tabular__row {
107
+ display: grid;
108
+ grid-template-columns: var(--nx-tabular-columns);
109
+ height: var(--nx-tabular-row);
110
+ border-bottom: 1px solid var(--nx-tabular-line);
111
+ background: var(--nx-tabular-bg);
112
+ }
113
+
114
+ /* The last row's line hides under the frame. */
115
+ .nx-tabular__body {
116
+ margin-bottom: -1px;
117
+ }
118
+
119
+ .nx-tabular__body > .nx-tabular__row:hover {
120
+ background: var(--nx-tabular-hover);
121
+ }
122
+
123
+ /* Header: stays at the top while the rows scroll. */
124
+ .nx-tabular__head {
125
+ position: sticky;
126
+ top: 0;
127
+ z-index: 3;
128
+ }
129
+
130
+ .nx-tabular__head > .nx-tabular__row {
131
+ background: var(--nx-tabular-head);
132
+ }
133
+
134
+ .nx-tabular__head-cell {
135
+ display: flex;
136
+ align-items: center;
137
+ gap: 2px;
138
+ min-width: 0;
139
+ padding: 0 10px;
140
+ border-left: 1px solid var(--nx-tabular-line);
141
+ color: var(--nx-text);
142
+ font-size: var(--nx-text-sm);
143
+ font-weight: 600;
144
+ white-space: nowrap;
145
+ }
146
+
147
+ .nx-tabular__head-label {
148
+ overflow: hidden;
149
+ text-overflow: ellipsis;
150
+ }
151
+
152
+ .nx-tabular__head-cell.nx-tabular__cell--number {
153
+ justify-content: flex-end;
154
+ }
155
+
156
+ .nx-tabular__head-cell.nx-tabular__cell--check {
157
+ justify-content: center;
158
+ padding-inline: 6px;
159
+ }
160
+
161
+ /* Cells */
162
+ .nx-tabular__cell {
163
+ display: flex;
164
+ align-items: stretch;
165
+ min-width: 0;
166
+ border-left: 1px solid var(--nx-tabular-line);
167
+ }
168
+
169
+ .nx-tabular__cell > * {
170
+ flex: 1 1 auto;
171
+ min-width: 0;
172
+ }
173
+
174
+ .nx-tabular__cell .nx-field {
175
+ --nx-field-bg: transparent;
176
+ --nx-field-border: transparent;
177
+ --nx-field-border-hover: transparent;
178
+ }
179
+
180
+ .nx-tabular__cell .nx-field:is([data-readonly], [data-disabled]) {
181
+ --nx-field-bg: var(--nx-tabular-readonly);
182
+ }
183
+
184
+ .nx-tabular__cell .nx-field[data-disabled] {
185
+ opacity: 1;
186
+ color: var(--nx-text-muted);
187
+ }
188
+
189
+ .nx-tabular__cell .nx-field__box {
190
+ height: 100%;
191
+ min-height: 0;
192
+ border-radius: 0;
193
+ box-shadow: none;
194
+ }
195
+
196
+ .nx-tabular__cell .nx-field__box:focus-within {
197
+ box-shadow: inset 0 0 0 2px var(--nx-field-accent);
198
+ }
199
+
200
+ .nx-tabular__cell .nx-field[data-invalid] .nx-field__box {
201
+ box-shadow: inset 0 0 0 1px var(--nx-danger);
202
+ }
203
+
204
+ .nx-tabular__cell .nx-field[data-invalid] .nx-field__box:focus-within {
205
+ box-shadow: inset 0 0 0 2px var(--nx-danger);
206
+ }
207
+
208
+ /* The message of the input with focus shows under the table instead. Screen readers still hear it with the input. */
209
+ .nx-tabular__cell :is(.nx-field, .nx-choice-field, .nx-choices) > .nx-field__footer {
210
+ display: none;
211
+ }
212
+
213
+ .nx-tabular__cell--number .nx-field__control {
214
+ text-align: end;
215
+ }
216
+
217
+ .nx-tabular__cell--check {
218
+ align-items: center;
219
+ justify-content: center;
220
+ }
221
+
222
+ .nx-tabular__cell--check > * {
223
+ flex: 0 0 auto;
224
+ }
225
+
226
+ .nx-tabular__cell .nx-choice__control {
227
+ margin: 0;
228
+ }
229
+
230
+ .nx-tabular__cell--check:has(.nx-field__lock) {
231
+ background: var(--nx-tabular-readonly);
232
+ }
233
+
234
+ .nx-tabular__cell .nx-choices {
235
+ display: flex;
236
+ align-items: center;
237
+ padding-inline: 10px;
238
+ }
239
+
240
+ .nx-tabular__cell .nx-choices__options {
241
+ display: flex;
242
+ flex-wrap: nowrap;
243
+ gap: var(--nx-space-3);
244
+ overflow: hidden;
245
+ }
246
+
247
+ /* Row numbers, fixed at the start: the button of each row's menu. Dots take the number's place on hover. */
248
+ .nx-tabular__num {
249
+ position: sticky;
250
+ left: 0;
251
+ z-index: 1;
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: center;
255
+ border-right: 1px solid var(--nx-tabular-line);
256
+ background: inherit;
257
+ color: var(--nx-text-muted);
258
+ font-size: var(--nx-text-xs);
259
+ font-variant-numeric: tabular-nums;
260
+ }
261
+
262
+ .nx-tabular__head .nx-tabular__num {
263
+ color: var(--nx-text);
264
+ font-weight: 600;
265
+ }
266
+
267
+ .nx-tabular__num + .nx-tabular__cell,
268
+ .nx-tabular__num + .nx-tabular__head-cell {
269
+ border-left: 0;
270
+ }
271
+
272
+ .nx-tabular__num-button {
273
+ display: grid;
274
+ place-items: center;
275
+ width: calc(100% - 6px);
276
+ height: calc(100% - 6px);
277
+ padding: 0;
278
+ border: 0;
279
+ border-radius: var(--nx-radius-sm);
280
+ background: none;
281
+ color: inherit;
282
+ font: inherit;
283
+ cursor: pointer;
284
+ }
285
+
286
+ .nx-tabular__num-button > * {
287
+ grid-area: 1 / 1;
288
+ transition: opacity var(--nx-duration);
289
+ }
290
+
291
+ .nx-tabular__num-icon {
292
+ width: 16px;
293
+ height: 16px;
294
+ opacity: 0;
295
+ }
296
+
297
+ .nx-tabular__num-button:is(:hover, :focus-visible, [aria-expanded="true"]) {
298
+ background: var(--nx-surface-hover);
299
+ color: var(--nx-text);
300
+ }
301
+
302
+ .nx-tabular__row:hover .nx-tabular__num-icon,
303
+ .nx-tabular__num-button:is(:focus-visible, [aria-expanded="true"]) .nx-tabular__num-icon {
304
+ opacity: 1;
305
+ }
306
+
307
+ .nx-tabular__row:hover .nx-tabular__num-button .nx-tabular__num-text,
308
+ .nx-tabular__num-button:is(:focus-visible, [aria-expanded="true"]) .nx-tabular__num-text {
309
+ opacity: 0;
310
+ }
311
+
312
+ .nx-tabular__num-button:focus-visible {
313
+ outline: 2px solid var(--nx-primary);
314
+ outline-offset: -2px;
315
+ }
316
+
317
+ /* A row with a problem, after a check: a red edge at its start, and a red number. */
318
+ .nx-tabular__row[data-problem] > .nx-tabular__num {
319
+ box-shadow: inset 3px 0 0 var(--nx-danger);
320
+ color: var(--nx-danger);
321
+ font-weight: 600;
322
+ }
323
+
324
+ /* Remove buttons, fixed at the end. */
325
+ .nx-tabular__end {
326
+ position: sticky;
327
+ right: 0;
328
+ z-index: 1;
329
+ display: flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+ border-left: 1px solid var(--nx-tabular-line);
333
+ background: inherit;
334
+ }
335
+
336
+ .nx-tabular__remove.nx-btn {
337
+ width: calc(var(--nx-tabular-row) - 9px);
338
+ height: calc(var(--nx-tabular-row) - 9px);
339
+ color: var(--nx-text-muted);
340
+ }
341
+
342
+ .nx-tabular__row--empty {
343
+ display: block;
344
+ height: auto;
345
+ border-bottom: 0;
346
+ }
347
+
348
+ .nx-tabular__empty {
349
+ position: sticky;
350
+ left: 0;
351
+ width: max-content;
352
+ max-width: 100%;
353
+ padding: var(--nx-space-4);
354
+ color: var(--nx-text-muted);
355
+ font-size: var(--nx-text-sm);
356
+ }
357
+
358
+ /*
359
+ * Group form: each row is a section on a light tint, without a border, so the inputs' own boxes are the only frames.
360
+ * The header collapses the section; the inputs sit on a 12-column grid by their span, one column on narrow screens.
361
+ */
362
+ .nx-group-form {
363
+ --nx-group-tint: color-mix(in oklab, var(--nx-text) 3.5%, var(--nx-surface));
364
+ --nx-group-hover: color-mix(in oklab, var(--nx-text) 6%, var(--nx-surface));
365
+ --nx-group-pad: var(--nx-space-4);
366
+ --nx-group-gap: var(--nx-space-4);
367
+ }
368
+
369
+ .nx-group-form--sm {
370
+ --nx-group-pad: var(--nx-space-3);
371
+ --nx-group-gap: var(--nx-space-3);
372
+ }
373
+
374
+ .nx-group-form--lg {
375
+ --nx-group-pad: var(--nx-space-5);
376
+ --nx-group-gap: var(--nx-space-5);
377
+ }
378
+
379
+ .nx-group-form__list {
380
+ display: flex;
381
+ flex-direction: column;
382
+ gap: var(--nx-space-3);
383
+ margin: 0;
384
+ padding: 0;
385
+ list-style: none;
386
+ }
387
+
388
+ .nx-group-form__section {
389
+ border-radius: var(--nx-radius-lg);
390
+ background: var(--nx-group-tint);
391
+ }
392
+
393
+ .nx-group-form__section[data-problem] {
394
+ box-shadow: inset 3px 0 0 var(--nx-danger);
395
+ }
396
+
397
+ .nx-group-form__head {
398
+ display: flex;
399
+ align-items: center;
400
+ gap: var(--nx-space-2);
401
+ padding: 6px 8px 6px 6px;
402
+ }
403
+
404
+ .nx-group-form__toggle,
405
+ .nx-group-form__heading {
406
+ display: flex;
407
+ flex: 1 1 auto;
408
+ align-items: center;
409
+ gap: var(--nx-space-2);
410
+ min-width: 0;
411
+ min-height: 34px;
412
+ padding: 4px 10px 4px 8px;
413
+ color: var(--nx-text);
414
+ font-size: var(--nx-text-md);
415
+ text-align: start;
416
+ }
417
+
418
+ .nx-group-form__heading {
419
+ padding-left: calc(var(--nx-group-pad) - 6px);
420
+ }
421
+
422
+ .nx-group-form__toggle {
423
+ border: 0;
424
+ border-radius: var(--nx-radius);
425
+ background: none;
426
+ font: inherit;
427
+ cursor: pointer;
428
+ transition: background-color var(--nx-duration);
429
+ }
430
+
431
+ .nx-group-form__toggle:hover {
432
+ background: var(--nx-group-hover);
433
+ }
434
+
435
+ .nx-group-form__toggle:focus-visible {
436
+ outline: 2px solid var(--nx-primary);
437
+ outline-offset: 0;
438
+ }
439
+
440
+ .nx-group-form__chevron {
441
+ width: 16px;
442
+ height: 16px;
443
+ color: var(--nx-text-muted);
444
+ transition: transform var(--nx-duration);
445
+ }
446
+
447
+ .nx-group-form__toggle[aria-expanded="false"] .nx-group-form__chevron {
448
+ transform: rotate(-90deg);
449
+ }
450
+
451
+ .nx-group-form__title {
452
+ flex: none;
453
+ font-weight: 600;
454
+ white-space: nowrap;
455
+ }
456
+
457
+ /* A radio this row has on, such as "Primary". Text color on the tint, as tags do. */
458
+ .nx-group-form__tag {
459
+ flex: none;
460
+ padding: 1px 8px;
461
+ border-radius: var(--nx-radius-full);
462
+ background: var(--nx-primary-soft);
463
+ color: var(--nx-text);
464
+ font-size: var(--nx-text-xs);
465
+ font-weight: 500;
466
+ line-height: 1.5;
467
+ }
468
+
469
+ /* Muted text moves toward the text color, so it keeps 4.5:1 on the tint and on the hover tint. */
470
+ .nx-group-form__summary {
471
+ min-width: 0;
472
+ overflow: hidden;
473
+ color: color-mix(in oklab, var(--nx-text-muted), var(--nx-text) 35%);
474
+ font-size: var(--nx-text-sm);
475
+ text-overflow: ellipsis;
476
+ white-space: nowrap;
477
+ }
478
+
479
+ .nx-group-form__problems {
480
+ display: inline-flex;
481
+ flex: none;
482
+ align-items: center;
483
+ gap: 4px;
484
+ margin-left: auto;
485
+ color: var(--nx-danger);
486
+ font-size: var(--nx-text-xs);
487
+ font-weight: 600;
488
+ white-space: nowrap;
489
+ }
490
+
491
+ .nx-group-form__problems .nx-icon {
492
+ width: 14px;
493
+ height: 14px;
494
+ vertical-align: 0;
495
+ }
496
+
497
+ .nx-group-form__actions {
498
+ display: flex;
499
+ flex: none;
500
+ align-items: center;
501
+ gap: 2px;
502
+ }
503
+
504
+ .nx-group-form__actions .nx-btn {
505
+ color: var(--nx-text-muted);
506
+ }
507
+
508
+ .nx-group-form__body {
509
+ container-type: inline-size;
510
+ display: grid;
511
+ grid-template-columns: repeat(12, minmax(0, 1fr));
512
+ align-items: start;
513
+ gap: var(--nx-group-gap);
514
+ padding: 2px var(--nx-group-pad) var(--nx-group-pad);
515
+ }
516
+
517
+ .nx-group-form__cell {
518
+ grid-column: span var(--nx-span, 12);
519
+ min-width: 0;
520
+ }
521
+
522
+ /* A checkbox, switch, or radio lines up with the boxes beside it. */
523
+ .nx-group-form__cell--choice {
524
+ display: flex;
525
+ align-self: end;
526
+ align-items: center;
527
+ min-height: var(--nx-control-md);
528
+ }
529
+
530
+ .nx-group-form--sm .nx-group-form__cell--choice {
531
+ min-height: var(--nx-control-sm);
532
+ }
533
+
534
+ .nx-group-form--lg .nx-group-form__cell--choice {
535
+ min-height: var(--nx-control-lg);
536
+ }
537
+
538
+ @container (max-width: 34rem) {
539
+ .nx-group-form__cell {
540
+ grid-column: span 12;
541
+ }
542
+
543
+ .nx-group-form__cell--choice {
544
+ min-height: 0;
545
+ }
546
+ }
547
+
548
+ .nx-group-form__empty {
549
+ margin: 0;
550
+ padding: var(--nx-space-4);
551
+ border-radius: var(--nx-radius-lg);
552
+ background: var(--nx-group-tint);
553
+ color: color-mix(in oklab, var(--nx-text-muted), var(--nx-text) 35%);
554
+ font-size: var(--nx-text-sm);
555
+ text-align: center;
556
+ }
557
+
558
+ @media (prefers-reduced-motion: reduce) {
559
+ .nx-tabular__viewport,
560
+ .nx-tabular__num-button > *,
561
+ .nx-group-form__toggle,
562
+ .nx-group-form__chevron {
563
+ transition: none;
564
+ }
565
+ }
566
+ }