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,731 @@
1
+ @layer nexus.components {
2
+ /*
3
+ * Popup: a native <dialog> shown modally. The panel is the dialog itself, so a click on the backdrop reaches the
4
+ * dialog element and nothing else. The header and footer stay while the body scrolls.
5
+ */
6
+ .nx-popup {
7
+ --nx-popup-width: 560px;
8
+
9
+ /* Percentages, not vw: the viewport width here leaves out the scrollbar. */
10
+ width: min(var(--nx-popup-width), calc(100% - 32px));
11
+ max-width: none;
12
+ max-height: min(calc(100vh - 48px), calc(100dvh - 48px));
13
+ margin: auto;
14
+ padding: 0;
15
+ overflow: hidden;
16
+ border: 1px solid var(--nx-border);
17
+ border-radius: var(--nx-radius-lg);
18
+ background: var(--nx-surface);
19
+ color: var(--nx-text);
20
+ box-shadow: var(--nx-shadow);
21
+ outline: none;
22
+ /* Where the title bar moved it, from the center (set by the Popup while dragging). */
23
+ translate: var(--nx-popup-x, 0px) var(--nx-popup-y, 0px);
24
+ }
25
+
26
+ .nx-popup[open] {
27
+ display: flex;
28
+ flex-direction: column;
29
+ animation: nx-popup-in 180ms cubic-bezier(0.2, 0, 0, 1);
30
+ }
31
+
32
+ .nx-popup::backdrop {
33
+ background: rgb(0 0 0 / 0.5);
34
+ animation: nx-popup-fade-in 180ms ease-out;
35
+ }
36
+
37
+ /* A closing popup takes no more clicks, so a double-click on Save does not submit twice. */
38
+ .nx-popup--closing[open] {
39
+ animation: nx-popup-out 140ms ease-in forwards;
40
+ pointer-events: none;
41
+ }
42
+
43
+ .nx-popup--closing::backdrop {
44
+ animation: nx-popup-fade-out 140ms ease-in forwards;
45
+ }
46
+
47
+ @keyframes nx-popup-in {
48
+ from {
49
+ opacity: 0;
50
+ transform: translateY(10px) scale(0.98);
51
+ }
52
+ }
53
+
54
+ @keyframes nx-popup-out {
55
+ to {
56
+ opacity: 0;
57
+ transform: translateY(6px) scale(0.98);
58
+ }
59
+ }
60
+
61
+ @keyframes nx-popup-fade-in {
62
+ from {
63
+ opacity: 0;
64
+ }
65
+ }
66
+
67
+ @keyframes nx-popup-fade-out {
68
+ to {
69
+ opacity: 0;
70
+ }
71
+ }
72
+
73
+ /* The page behind a modal popup stops scrolling; the Popup sets --nx-scrollbar-gap to the scrollbar's width, so nothing shifts. */
74
+ :root:has(.nx-popup:modal) {
75
+ overflow: hidden;
76
+ padding-right: var(--nx-scrollbar-gap, 0px);
77
+ }
78
+
79
+ /* Sizes */
80
+ .nx-popup--xs {
81
+ --nx-popup-width: 360px;
82
+ }
83
+
84
+ .nx-popup--sm {
85
+ --nx-popup-width: 440px;
86
+ }
87
+
88
+ .nx-popup--lg {
89
+ --nx-popup-width: 720px;
90
+ }
91
+
92
+ .nx-popup--xl {
93
+ --nx-popup-width: 960px;
94
+ }
95
+
96
+ .nx-popup--full {
97
+ --nx-popup-width: calc(100% - 32px);
98
+
99
+ height: calc(100vh - 32px);
100
+ max-height: none;
101
+ }
102
+
103
+ /* Maximized: the whole window, edge to edge, wherever it was moved. Two classes, to win over the sizes and phones. */
104
+ .nx-popup.nx-popup--maximized {
105
+ width: 100%;
106
+ height: 100%;
107
+ max-height: none;
108
+ border-width: 0;
109
+ border-radius: 0;
110
+ translate: none;
111
+ }
112
+
113
+ /* Minimizing: the page comes back while the popup flies to the dock. */
114
+ .nx-popup[data-nx-minimizing] {
115
+ pointer-events: none;
116
+ }
117
+
118
+ .nx-popup[data-nx-minimizing]::backdrop {
119
+ animation: nx-popup-fade-out 200ms ease-in forwards;
120
+ }
121
+
122
+ /* Header, either design: the title bar moves the popup, so it selects no text and a touch drags instead of scrolling. */
123
+ .nx-popup__head {
124
+ display: flex;
125
+ flex-shrink: 0;
126
+ }
127
+
128
+ .nx-popup--movable .nx-popup__head {
129
+ cursor: move;
130
+ touch-action: none;
131
+ user-select: none;
132
+ }
133
+
134
+ .nx-popup__title,
135
+ .nx-popup__description {
136
+ margin: 0;
137
+ }
138
+
139
+ .nx-popup__controls {
140
+ display: flex;
141
+ flex-shrink: 0;
142
+ margin-left: auto;
143
+ }
144
+
145
+ .nx-popup__control {
146
+ display: grid;
147
+ place-items: center;
148
+ padding: 0;
149
+ border: 0;
150
+ background: none;
151
+ color: var(--nx-text-muted);
152
+ cursor: pointer;
153
+ transition:
154
+ background-color var(--nx-duration),
155
+ color var(--nx-duration);
156
+ }
157
+
158
+ .nx-popup__control .nx-icon {
159
+ vertical-align: 0;
160
+ }
161
+
162
+ /* Close turns red on hover, the one button that throws away what the popup holds. */
163
+ .nx-popup__close:hover {
164
+ background: var(--nx-danger-solid);
165
+ color: var(--nx-danger-text);
166
+ }
167
+
168
+ /*
169
+ * Window (the default): one low title bar, as on a desktop window. The icon and the title on the left, the
170
+ * description after the title in muted text, and the window buttons filling the top right corner.
171
+ */
172
+ .nx-popup--window {
173
+ --nx-popup-bar: 32px;
174
+ }
175
+
176
+ .nx-popup--window .nx-popup__head {
177
+ box-sizing: content-box;
178
+ align-items: center;
179
+ gap: var(--nx-space-2);
180
+ height: var(--nx-popup-bar);
181
+ padding-left: var(--nx-space-3);
182
+ border-bottom: 1px solid var(--nx-border);
183
+ background: color-mix(in oklab, var(--nx-surface), var(--nx-text) 4%);
184
+ }
185
+
186
+ .nx-popup--window .nx-popup__icon {
187
+ display: grid;
188
+ flex-shrink: 0;
189
+ place-items: center;
190
+ color: var(--nx-primary);
191
+ }
192
+
193
+ .nx-popup--window .nx-popup__icon .nx-icon {
194
+ width: 16px;
195
+ height: 16px;
196
+ vertical-align: 0;
197
+ }
198
+
199
+ /* One line: the title keeps its room, the description takes what is left, and both end in … when cut. */
200
+ .nx-popup--window .nx-popup__heading {
201
+ display: flex;
202
+ flex: 1 1 auto;
203
+ align-items: baseline;
204
+ gap: var(--nx-space-2);
205
+ min-width: 0;
206
+ white-space: nowrap;
207
+ }
208
+
209
+ .nx-popup--window .nx-popup__title {
210
+ flex: 0 1 auto;
211
+ min-width: 0;
212
+ overflow: hidden;
213
+ font-size: var(--nx-text-sm);
214
+ font-weight: 600;
215
+ line-height: var(--nx-popup-bar);
216
+ text-overflow: ellipsis;
217
+ }
218
+
219
+ .nx-popup--window .nx-popup__description {
220
+ flex: 1 1 0;
221
+ min-width: 0;
222
+ overflow: hidden;
223
+ color: var(--nx-text-muted);
224
+ font-size: var(--nx-text-xs);
225
+ text-overflow: ellipsis;
226
+ }
227
+
228
+ .nx-popup--window .nx-popup__controls {
229
+ align-self: stretch;
230
+ }
231
+
232
+ .nx-popup--window .nx-popup__control {
233
+ width: 46px;
234
+ height: 100%;
235
+ }
236
+
237
+ .nx-popup--window .nx-popup__control:hover {
238
+ background: color-mix(in oklab, var(--nx-text) 9%, transparent);
239
+ color: var(--nx-text);
240
+ }
241
+
242
+ .nx-popup--window .nx-popup__control:active {
243
+ background: color-mix(in oklab, var(--nx-text) 15%, transparent);
244
+ }
245
+
246
+ .nx-popup--window .nx-popup__close:hover {
247
+ background: var(--nx-danger-solid);
248
+ color: var(--nx-danger-text);
249
+ }
250
+
251
+ .nx-popup--window .nx-popup__close:active {
252
+ background: var(--nx-danger-hover);
253
+ }
254
+
255
+ /* The buttons touch the popup's edges, where an outer ring would be cut off, so the ring is drawn inside. */
256
+ .nx-popup--window .nx-popup__control:focus-visible {
257
+ outline: none;
258
+ box-shadow: inset 0 0 0 2px var(--nx-primary);
259
+ }
260
+
261
+ /* Thin lines, as desktop window buttons have; the square glyphs fill more of their box, so they are drawn smaller. */
262
+ .nx-popup--window .nx-popup__control .nx-icon {
263
+ width: 16px;
264
+ height: 16px;
265
+ stroke-width: 1.5;
266
+ }
267
+
268
+ .nx-popup--window .nx-popup__maximize .nx-icon {
269
+ width: 13px;
270
+ height: 13px;
271
+ stroke-width: 1.75;
272
+ }
273
+
274
+ /* Touch screens get taller buttons. */
275
+ @media (pointer: coarse) {
276
+ .nx-popup--window {
277
+ --nx-popup-bar: 40px;
278
+ }
279
+
280
+ .nx-popup--window .nx-popup__control {
281
+ width: 48px;
282
+ }
283
+ }
284
+
285
+ /*
286
+ * Dialog (message boxes): a larger heading, the icon in a circle that carries the tone, the description under the
287
+ * title, and a small close button.
288
+ */
289
+ .nx-popup--dialog .nx-popup__head {
290
+ align-items: flex-start;
291
+ gap: var(--nx-space-3);
292
+ padding: var(--nx-space-5) var(--nx-space-5) 0;
293
+ }
294
+
295
+ .nx-popup--dialog .nx-popup__icon {
296
+ display: grid;
297
+ flex-shrink: 0;
298
+ place-items: center;
299
+ width: 40px;
300
+ height: 40px;
301
+ border-radius: 50%;
302
+ background: var(--nx-primary-soft);
303
+ color: var(--nx-primary);
304
+ }
305
+
306
+ .nx-popup--dialog .nx-popup__icon .nx-icon {
307
+ width: 22px;
308
+ height: 22px;
309
+ vertical-align: 0;
310
+ }
311
+
312
+ .nx-popup--dialog .nx-popup__heading {
313
+ flex: 1 1 auto;
314
+ min-width: 0;
315
+ padding-top: 2px;
316
+ }
317
+
318
+ .nx-popup--dialog .nx-popup__title {
319
+ font-size: var(--nx-text-lg);
320
+ font-weight: 600;
321
+ line-height: 1.35;
322
+ overflow-wrap: anywhere;
323
+ }
324
+
325
+ .nx-popup--dialog .nx-popup__description {
326
+ margin-top: 4px;
327
+ color: var(--nx-text-muted);
328
+ font-size: var(--nx-text-sm);
329
+ line-height: 1.45;
330
+ }
331
+
332
+ .nx-popup--dialog .nx-popup__controls {
333
+ gap: 2px;
334
+ margin: -6px -8px 0 auto;
335
+ }
336
+
337
+ .nx-popup--dialog .nx-popup__control {
338
+ width: 30px;
339
+ height: 30px;
340
+ border-radius: var(--nx-radius);
341
+ }
342
+
343
+ .nx-popup--dialog .nx-popup__control:not(.nx-popup__close):hover {
344
+ background: var(--nx-surface-hover);
345
+ color: var(--nx-text);
346
+ }
347
+
348
+ .nx-popup--dialog .nx-popup__control:focus-visible {
349
+ outline: none;
350
+ box-shadow: var(--nx-focus-ring);
351
+ }
352
+
353
+ .nx-popup--dialog .nx-popup__control .nx-icon {
354
+ width: 18px;
355
+ height: 18px;
356
+ }
357
+
358
+ .nx-popup--dialog .nx-popup__maximize .nx-icon {
359
+ width: 15px;
360
+ height: 15px;
361
+ }
362
+
363
+ /* Body: scrolls when the content is taller than the window allows. */
364
+ .nx-popup__body {
365
+ flex: 1 1 auto;
366
+ min-height: 0;
367
+ padding: var(--nx-space-4) var(--nx-space-5) var(--nx-space-5);
368
+ overflow: auto;
369
+ overscroll-behavior: contain;
370
+ }
371
+
372
+ .nx-popup__head + .nx-popup__body:empty {
373
+ padding-top: var(--nx-space-2);
374
+ }
375
+
376
+ .nx-popup__body:only-child,
377
+ .nx-popup--window .nx-popup__body {
378
+ padding-top: var(--nx-space-5);
379
+ }
380
+
381
+ .nx-popup--flush .nx-popup__body {
382
+ padding: 0;
383
+ }
384
+
385
+ /* Footer: buttons at the end. */
386
+ .nx-popup__foot {
387
+ display: flex;
388
+ flex-shrink: 0;
389
+ flex-wrap: wrap;
390
+ align-items: center;
391
+ justify-content: flex-end;
392
+ gap: var(--nx-space-2);
393
+ padding: var(--nx-space-3) var(--nx-space-5);
394
+ border-top: 1px solid var(--nx-border);
395
+ }
396
+
397
+ /* Message boxes: a small popup whose icon carries the tone. */
398
+ .nx-popup--message .nx-popup__body {
399
+ padding-top: var(--nx-space-2);
400
+ }
401
+
402
+ .nx-popup--message .nx-popup__body:empty {
403
+ padding: var(--nx-space-3) 0 0;
404
+ }
405
+
406
+ .nx-message__text {
407
+ color: var(--nx-text-muted);
408
+ line-height: 1.5;
409
+ }
410
+
411
+ .nx-message__form {
412
+ display: grid;
413
+ gap: var(--nx-space-4);
414
+ }
415
+
416
+ .nx-popup--tone-info .nx-popup__icon {
417
+ background: var(--nx-info-soft);
418
+ color: var(--nx-info);
419
+ }
420
+
421
+ .nx-popup--tone-success .nx-popup__icon {
422
+ background: var(--nx-success-soft);
423
+ color: var(--nx-success);
424
+ }
425
+
426
+ .nx-popup--tone-warning .nx-popup__icon {
427
+ background: var(--nx-warning-soft);
428
+ color: var(--nx-warning);
429
+ }
430
+
431
+ .nx-popup--tone-danger .nx-popup__icon {
432
+ background: var(--nx-danger-soft);
433
+ color: var(--nx-danger);
434
+ }
435
+
436
+ /*
437
+ * The dock: minimized popups as bars at the bottom right. Several stack behind the newest, with cards peeking out
438
+ * above it and a count that opens the whole list. It sits on the page, so an open popup's backdrop covers it.
439
+ */
440
+ .nx-dock {
441
+ --nx-dock-edge: 16px;
442
+
443
+ position: fixed;
444
+ right: calc(var(--nx-dock-edge) + env(safe-area-inset-right, 0px));
445
+ bottom: calc(var(--nx-dock-edge) + env(safe-area-inset-bottom, 0px));
446
+ z-index: 1000;
447
+ display: flex;
448
+ flex-direction: column;
449
+ align-items: flex-end;
450
+ gap: var(--nx-space-2);
451
+ width: min(300px, calc(100% - 2 * var(--nx-dock-edge)));
452
+ max-height: calc(100dvh - 2 * var(--nx-dock-edge));
453
+ /* Only the bars and the count take clicks, not the space between them. */
454
+ pointer-events: none;
455
+ }
456
+
457
+ .nx-dock > * {
458
+ pointer-events: auto;
459
+ }
460
+
461
+ /* While a popup locks the page, its scrollbar's space is padding; the dock keeps its place beside it. */
462
+ :root:has(.nx-popup:modal) .nx-dock {
463
+ right: calc(var(--nx-dock-edge) + var(--nx-scrollbar-gap, 0px) + env(safe-area-inset-right, 0px));
464
+ }
465
+
466
+ .nx-dock__toggle {
467
+ display: inline-flex;
468
+ flex-shrink: 0;
469
+ align-items: center;
470
+ gap: 6px;
471
+ height: 28px;
472
+ padding: 0 10px 0 4px;
473
+ border: 1px solid var(--nx-border);
474
+ border-radius: var(--nx-radius-full);
475
+ background: light-dark(var(--nx-surface), var(--nx-surface-2));
476
+ color: var(--nx-text);
477
+ box-shadow: var(--nx-shadow-sm);
478
+ font: inherit;
479
+ font-size: var(--nx-text-sm);
480
+ font-weight: 600;
481
+ cursor: pointer;
482
+ transition: background-color var(--nx-duration);
483
+ }
484
+
485
+ .nx-dock__toggle:hover {
486
+ background: var(--nx-surface-hover);
487
+ }
488
+
489
+ .nx-dock__toggle:focus-visible {
490
+ outline: none;
491
+ box-shadow: var(--nx-focus-ring);
492
+ }
493
+
494
+ .nx-dock__toggle .nx-icon {
495
+ width: 16px;
496
+ height: 16px;
497
+ color: var(--nx-text-muted);
498
+ }
499
+
500
+ .nx-dock__count {
501
+ display: grid;
502
+ place-items: center;
503
+ min-width: 20px;
504
+ height: 20px;
505
+ padding: 0 6px;
506
+ border-radius: var(--nx-radius-full);
507
+ background: var(--nx-primary-solid);
508
+ color: var(--nx-primary-text);
509
+ font-size: var(--nx-text-xs);
510
+ font-variant-numeric: tabular-nums;
511
+ line-height: 1;
512
+ }
513
+
514
+ .nx-dock__list {
515
+ position: relative;
516
+ isolation: isolate;
517
+ display: flex;
518
+ flex-direction: column;
519
+ gap: 6px;
520
+ width: 100%;
521
+ min-height: 0;
522
+ margin: 0;
523
+ padding: 0;
524
+ list-style: none;
525
+ }
526
+
527
+ /* Open: the whole list, oldest at the top; it scrolls when taller than the window, with room for the shadows. */
528
+ .nx-dock--open .nx-dock__list {
529
+ margin: -8px;
530
+ padding: 8px;
531
+ width: calc(100% + 16px);
532
+ overflow-y: auto;
533
+ overscroll-behavior: contain;
534
+ }
535
+
536
+ /* Stacked: one or two cards peek out above the newest bar; a click on them opens the list. */
537
+ .nx-dock__list[data-depth] {
538
+ margin-top: calc(var(--nx-dock-depth) * 5px);
539
+ cursor: pointer;
540
+ }
541
+
542
+ .nx-dock__list[data-depth="1"] {
543
+ --nx-dock-depth: 1;
544
+ }
545
+
546
+ .nx-dock__list[data-depth="2"] {
547
+ --nx-dock-depth: 2;
548
+ }
549
+
550
+ .nx-dock__list[data-depth]::before,
551
+ .nx-dock__list[data-depth="2"]::after {
552
+ content: "";
553
+ position: absolute;
554
+ top: -5px;
555
+ right: 8px;
556
+ left: 8px;
557
+ z-index: -1;
558
+ height: 24px;
559
+ border: 1px solid var(--nx-border);
560
+ border-radius: var(--nx-radius-lg);
561
+ background: light-dark(var(--nx-surface), var(--nx-surface-2));
562
+ box-shadow: var(--nx-shadow-sm);
563
+ }
564
+
565
+ .nx-dock__list[data-depth="2"]::after {
566
+ top: -10px;
567
+ right: 16px;
568
+ left: 16px;
569
+ z-index: -2;
570
+ }
571
+
572
+ .nx-dock__item {
573
+ display: flex;
574
+ flex-shrink: 0;
575
+ align-items: center;
576
+ gap: 2px;
577
+ height: 44px;
578
+ padding-right: 6px;
579
+ border: 1px solid var(--nx-border);
580
+ border-radius: var(--nx-radius-lg);
581
+ background: light-dark(var(--nx-surface), var(--nx-surface-2));
582
+ color: var(--nx-text);
583
+ box-shadow: var(--nx-shadow);
584
+ cursor: default;
585
+ transition: background-color var(--nx-duration);
586
+ animation: nx-dock-in 180ms cubic-bezier(0.2, 0, 0, 1);
587
+ }
588
+
589
+ .nx-dock__item:has(.nx-dock__window:hover) {
590
+ background: var(--nx-surface-hover);
591
+ }
592
+
593
+ .nx-dock__item:has(.nx-dock__window:focus-visible) {
594
+ box-shadow: var(--nx-focus-ring), var(--nx-shadow);
595
+ }
596
+
597
+ /* The bar's title part brings the popup back. */
598
+ .nx-dock__window {
599
+ display: flex;
600
+ flex: 1 1 auto;
601
+ align-items: center;
602
+ gap: 10px;
603
+ min-width: 0;
604
+ height: 100%;
605
+ padding: 0 6px 0 7px;
606
+ border: 0;
607
+ border-radius: inherit;
608
+ background: none;
609
+ color: inherit;
610
+ font: inherit;
611
+ text-align: start;
612
+ cursor: pointer;
613
+ }
614
+
615
+ .nx-dock__window:focus-visible {
616
+ outline: none;
617
+ }
618
+
619
+ .nx-dock__icon {
620
+ display: grid;
621
+ flex-shrink: 0;
622
+ place-items: center;
623
+ width: 28px;
624
+ height: 28px;
625
+ border-radius: var(--nx-radius);
626
+ background: var(--nx-primary-soft);
627
+ color: var(--nx-primary);
628
+ }
629
+
630
+ .nx-dock__icon .nx-icon {
631
+ width: 16px;
632
+ height: 16px;
633
+ vertical-align: 0;
634
+ }
635
+
636
+ .nx-dock__title {
637
+ flex: 1 1 auto;
638
+ min-width: 0;
639
+ overflow: hidden;
640
+ font-size: var(--nx-text-md);
641
+ font-weight: 600;
642
+ line-height: 1.3;
643
+ text-overflow: ellipsis;
644
+ white-space: nowrap;
645
+ }
646
+
647
+ .nx-dock__restore {
648
+ flex-shrink: 0;
649
+ width: 18px;
650
+ height: 18px;
651
+ color: var(--nx-text-muted);
652
+ }
653
+
654
+ .nx-dock__window:hover .nx-dock__restore {
655
+ color: var(--nx-text);
656
+ }
657
+
658
+ .nx-dock__close {
659
+ display: grid;
660
+ flex-shrink: 0;
661
+ place-items: center;
662
+ width: 30px;
663
+ height: 30px;
664
+ padding: 0;
665
+ border: 0;
666
+ border-radius: var(--nx-radius);
667
+ background: none;
668
+ color: var(--nx-text-muted);
669
+ cursor: pointer;
670
+ transition:
671
+ background-color var(--nx-duration),
672
+ color var(--nx-duration);
673
+ }
674
+
675
+ .nx-dock__close:hover {
676
+ background: var(--nx-danger-solid);
677
+ color: var(--nx-danger-text);
678
+ }
679
+
680
+ .nx-dock__close:focus-visible {
681
+ outline: none;
682
+ box-shadow: var(--nx-focus-ring);
683
+ }
684
+
685
+ .nx-dock__close .nx-icon {
686
+ width: 16px;
687
+ height: 16px;
688
+ vertical-align: 0;
689
+ }
690
+
691
+ @keyframes nx-dock-in {
692
+ from {
693
+ opacity: 0;
694
+ transform: translateY(8px);
695
+ }
696
+ }
697
+
698
+ @media (max-width: 600px) {
699
+ .nx-popup {
700
+ width: calc(100% - 16px);
701
+ max-height: min(calc(100vh - 16px), calc(100dvh - 16px));
702
+ }
703
+
704
+ .nx-popup--dialog .nx-popup__head {
705
+ padding: var(--nx-space-4) var(--nx-space-4) 0;
706
+ }
707
+
708
+ .nx-popup__body {
709
+ padding: var(--nx-space-3) var(--nx-space-4) var(--nx-space-4);
710
+ }
711
+
712
+ .nx-popup--window:not(.nx-popup--flush) .nx-popup__body {
713
+ padding-top: var(--nx-space-4);
714
+ }
715
+
716
+ .nx-popup__foot {
717
+ padding: var(--nx-space-3) var(--nx-space-4);
718
+ }
719
+ }
720
+
721
+ @media (prefers-reduced-motion: reduce) {
722
+ .nx-popup[open],
723
+ .nx-popup--closing[open],
724
+ .nx-popup::backdrop,
725
+ .nx-popup--closing::backdrop,
726
+ .nx-popup[data-nx-minimizing]::backdrop,
727
+ .nx-dock__item {
728
+ animation: none;
729
+ }
730
+ }
731
+ }