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,463 @@
1
+ @layer nexus.components {
2
+ /*
3
+ * Rich text content (RichTextView, and the editor's text). Sizes are in em, so the text follows the size of the
4
+ * element it sits in. Colors in the text are stored for light pages, emails, and print; in a dark theme the
5
+ * palette's text colors show as lighter twins, and highlights keep dark text.
6
+ */
7
+ .nx-richtext {
8
+ color: var(--nx-text);
9
+ font-size: var(--nx-text-md);
10
+ line-height: 1.65;
11
+ overflow-wrap: break-word;
12
+ }
13
+
14
+ .nx-richtext > :first-child {
15
+ margin-top: 0;
16
+ }
17
+
18
+ .nx-richtext > :last-child {
19
+ margin-bottom: 0;
20
+ }
21
+
22
+ .nx-richtext :is(p, ul, ol, blockquote, pre, hr, table) {
23
+ margin: 0 0 0.9em;
24
+ }
25
+
26
+ .nx-richtext :is(h1, h2, h3, h4, h5, h6) {
27
+ margin: 1.3em 0 0.5em;
28
+ font-weight: 650;
29
+ line-height: 1.3;
30
+ letter-spacing: -0.01em;
31
+ }
32
+
33
+ .nx-richtext h1 {
34
+ font-size: 1.6em;
35
+ }
36
+
37
+ .nx-richtext h2 {
38
+ font-size: 1.3em;
39
+ }
40
+
41
+ .nx-richtext h3 {
42
+ font-size: 1.12em;
43
+ }
44
+
45
+ .nx-richtext :is(h4, h5, h6) {
46
+ font-size: 1em;
47
+ }
48
+
49
+ .nx-richtext a {
50
+ color: var(--nx-primary);
51
+ text-decoration: underline;
52
+ text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
53
+ text-underline-offset: 0.18em;
54
+ }
55
+
56
+ .nx-richtext a:hover {
57
+ text-decoration-color: currentColor;
58
+ }
59
+
60
+ .nx-richtext :is(ul, ol) {
61
+ padding-left: 1.6em;
62
+ }
63
+
64
+ .nx-richtext li + li {
65
+ margin-top: 0.25em;
66
+ }
67
+
68
+ .nx-richtext li > :is(ul, ol) {
69
+ margin: 0.25em 0 0;
70
+ }
71
+
72
+ /* Pastes from Google Docs put a paragraph in each list item. */
73
+ .nx-richtext li > p {
74
+ margin: 0;
75
+ }
76
+
77
+ /*
78
+ * A quote keeps the text color: the browser copies a quote's own color onto text that leaves it (as a font color the
79
+ * value would keep), so the bar alone marks it.
80
+ */
81
+ .nx-richtext blockquote {
82
+ padding: 0 0 0 1em;
83
+ border-left: 3px solid var(--nx-border-strong);
84
+ }
85
+
86
+ .nx-richtext code {
87
+ padding: 0.12em 0.38em;
88
+ border-radius: var(--nx-radius-sm);
89
+ background: color-mix(in oklab, var(--nx-text) 8%, transparent);
90
+ font-family: var(--nx-font-mono);
91
+ font-size: 0.875em;
92
+ }
93
+
94
+ .nx-richtext pre {
95
+ overflow: auto;
96
+ padding: 0.8em 1em;
97
+ border-radius: var(--nx-radius);
98
+ background: color-mix(in oklab, var(--nx-text) 5%, transparent);
99
+ font-family: var(--nx-font-mono);
100
+ font-size: 0.86em;
101
+ line-height: 1.5;
102
+ white-space: pre-wrap;
103
+ }
104
+
105
+ .nx-richtext pre code {
106
+ padding: 0;
107
+ background: none;
108
+ font-size: 1em;
109
+ }
110
+
111
+ .nx-richtext hr {
112
+ height: 0;
113
+ margin-block: 1.4em;
114
+ border: 0;
115
+ border-top: 1px solid var(--nx-border-strong);
116
+ }
117
+
118
+ .nx-richtext img {
119
+ max-width: 100%;
120
+ height: auto;
121
+ border-radius: var(--nx-radius-sm);
122
+ vertical-align: middle;
123
+ }
124
+
125
+ .nx-richtext table {
126
+ display: block;
127
+ max-width: 100%;
128
+ overflow-x: auto;
129
+ border-collapse: collapse;
130
+ font-size: 0.95em;
131
+ }
132
+
133
+ .nx-richtext caption {
134
+ padding-bottom: 0.4em;
135
+ color: var(--nx-text-muted);
136
+ text-align: left;
137
+ }
138
+
139
+ .nx-richtext :is(th, td) {
140
+ min-width: 3em;
141
+ padding: 0.4em 0.8em;
142
+ border: 1px solid var(--nx-border-strong);
143
+ text-align: left;
144
+ vertical-align: top;
145
+ }
146
+
147
+ .nx-richtext th {
148
+ background: color-mix(in oklab, var(--nx-text) 4%, transparent);
149
+ font-weight: 600;
150
+ }
151
+
152
+ .nx-richtext :is(th, td) > :last-child {
153
+ margin-bottom: 0;
154
+ }
155
+
156
+ /* Highlights are light in every theme, so their text stays dark. */
157
+ .nx-richtext :is(mark, span[style*="background-color"]:not([style*="transparent"])) {
158
+ border-radius: 2px;
159
+ color: #1f2328;
160
+ }
161
+
162
+ .nx-richtext mark:not([style]) {
163
+ background: #fef08a;
164
+ }
165
+
166
+ .nx-richtext__empty {
167
+ margin: 0;
168
+ color: var(--nx-text-muted);
169
+ font-style: italic;
170
+ }
171
+
172
+ /* The palette's text colors: stored dark enough for any light page and paper, shown lighter in a dark theme. */
173
+ .nx-richtext :is([style*="color: #4b5563"], [style*="color: rgb(75, 85, 99)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
174
+ color: light-dark(#4b5563, #9ca3af) !important;
175
+ }
176
+
177
+ .nx-richtext :is([style*="color: #b91c1c"], [style*="color: rgb(185, 28, 28)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
178
+ color: light-dark(#b91c1c, #f87171) !important;
179
+ }
180
+
181
+ .nx-richtext :is([style*="color: #9a3412"], [style*="color: rgb(154, 52, 18)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
182
+ color: light-dark(#9a3412, #fb923c) !important;
183
+ }
184
+
185
+ .nx-richtext :is([style*="color: #92400e"], [style*="color: rgb(146, 64, 14)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
186
+ color: light-dark(#92400e, #fbbf24) !important;
187
+ }
188
+
189
+ .nx-richtext :is([style*="color: #166534"], [style*="color: rgb(22, 101, 52)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
190
+ color: light-dark(#166534, #4ade80) !important;
191
+ }
192
+
193
+ .nx-richtext :is([style*="color: #0f766e"], [style*="color: rgb(15, 118, 110)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
194
+ color: light-dark(#0f766e, #2dd4bf) !important;
195
+ }
196
+
197
+ .nx-richtext :is([style*="color: #1d4ed8"], [style*="color: rgb(29, 78, 216)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
198
+ color: light-dark(#1d4ed8, #60a5fa) !important;
199
+ }
200
+
201
+ .nx-richtext :is([style*="color: #7e22ce"], [style*="color: rgb(126, 34, 206)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
202
+ color: light-dark(#7e22ce, #c084fc) !important;
203
+ }
204
+
205
+ .nx-richtext :is([style*="color: #be185d"], [style*="color: rgb(190, 24, 93)"]):not([style*="background-color"], mark *, [style*="background-color"] *) {
206
+ color: light-dark(#be185d, #f472b6) !important;
207
+ }
208
+
209
+ /*
210
+ * Editor: the text inside the editor frame (Nexus.Editor.css), which brings the bar, the height handle, and
211
+ * full screen.
212
+ */
213
+ .nx-rte__content {
214
+ position: relative;
215
+ min-width: 0;
216
+ min-height: 0;
217
+ padding: 10px var(--nx-space-4);
218
+ overflow: auto;
219
+ overscroll-behavior: contain;
220
+ outline: none;
221
+ cursor: text;
222
+ }
223
+
224
+ .nx-field[data-readonly] .nx-rte__content {
225
+ cursor: default;
226
+ }
227
+
228
+ .nx-field[data-disabled] .nx-rte__content {
229
+ cursor: not-allowed;
230
+ }
231
+
232
+ .nx-rte__content[data-empty]::before {
233
+ content: attr(data-placeholder);
234
+ position: absolute;
235
+ top: 10px;
236
+ right: var(--nx-space-4);
237
+ left: var(--nx-space-4);
238
+ color: var(--nx-text-subtle);
239
+ pointer-events: none;
240
+ }
241
+
242
+ .nx-editor__body[data-mode="html"] .nx-rte__content {
243
+ display: none;
244
+ }
245
+
246
+ /* Empty cells stay easy to click into. */
247
+ .nx-rte__content :is(th, td) {
248
+ min-width: 4em;
249
+ height: 1.65em;
250
+ }
251
+
252
+ /* The browser quotes by indenting, with margins of its own; the editor shows the quote the value saves. */
253
+ .nx-rte__content blockquote[style] {
254
+ margin: 0 0 0.9em !important;
255
+ padding: 0 0 0 1em !important;
256
+ border-left: 3px solid var(--nx-border-strong) !important;
257
+ }
258
+
259
+ .nx-rte__content blockquote[style]:last-child {
260
+ margin-bottom: 0 !important;
261
+ }
262
+
263
+ .nx-rte .nx-rte__source {
264
+ height: 100%;
265
+ min-height: 0;
266
+ padding: 10px var(--nx-space-3);
267
+ border-radius: 0;
268
+ font-family: var(--nx-font-mono);
269
+ font-size: calc(var(--nx-field-font) - 1px);
270
+ line-height: 1.55;
271
+ white-space: pre;
272
+ overflow-wrap: normal;
273
+ tab-size: 2;
274
+ resize: none;
275
+ }
276
+
277
+ /* The value the form sends: kept in the page for the form and its rules, never seen. */
278
+ .nx-rte__value {
279
+ position: absolute;
280
+ width: 1px;
281
+ height: 1px;
282
+ padding: 0;
283
+ border: 0;
284
+ opacity: 0;
285
+ clip-path: inset(50%);
286
+ pointer-events: none;
287
+ resize: none;
288
+ }
289
+
290
+ /* The text's thin scrollbar, as the text area's (Nexus.Input.css). */
291
+ .nx-rte__content::-webkit-scrollbar {
292
+ width: 8px;
293
+ height: 8px;
294
+ }
295
+
296
+ .nx-rte__content::-webkit-scrollbar-track,
297
+ .nx-rte__content::-webkit-scrollbar-corner {
298
+ background: transparent;
299
+ }
300
+
301
+ .nx-rte__content::-webkit-scrollbar-thumb {
302
+ border: 2px solid transparent;
303
+ border-radius: var(--nx-radius-full);
304
+ background: var(--nx-field-scrollbar) padding-box;
305
+ }
306
+
307
+ .nx-rte__content::-webkit-scrollbar-thumb:hover {
308
+ background-color: var(--nx-field-scrollbar-hover);
309
+ }
310
+
311
+ @supports not selector(::-webkit-scrollbar) {
312
+ .nx-rte__content {
313
+ scrollbar-width: thin;
314
+ scrollbar-color: var(--nx-field-scrollbar) transparent;
315
+ }
316
+ }
317
+
318
+ /* Tokens: values a template fills in, edited as one piece. */
319
+ .nx-rte__token {
320
+ padding: 0.05em 0.45em;
321
+ margin: 0 1px;
322
+ border-radius: var(--nx-radius-sm);
323
+ background: color-mix(in oklab, var(--nx-primary) 16%, transparent);
324
+ color: var(--nx-text);
325
+ font-size: 0.9em;
326
+ font-weight: 500;
327
+ white-space: nowrap;
328
+ cursor: default;
329
+ user-select: all;
330
+ }
331
+
332
+ .nx-rte__token[data-unknown] {
333
+ background: color-mix(in oklab, var(--nx-danger) 14%, transparent);
334
+ text-decoration: underline wavy color-mix(in oklab, var(--nx-danger) 80%, transparent);
335
+ text-underline-offset: 0.2em;
336
+ }
337
+
338
+ /* Toolbar buttons with a label: the text style, and the field menu. */
339
+ .nx-editor__tool:is(.nx-rte__block, .nx-rte__insert) {
340
+ display: inline-flex;
341
+ gap: 4px;
342
+ width: auto;
343
+ padding: 0 6px;
344
+ color: var(--nx-text);
345
+ font: inherit;
346
+ font-size: var(--nx-text-sm);
347
+ white-space: nowrap;
348
+ }
349
+
350
+ .nx-editor__tool.nx-rte__block {
351
+ justify-content: space-between;
352
+ min-width: 7.5em;
353
+ padding-left: 8px;
354
+ }
355
+
356
+ .nx-editor__tool:is(.nx-rte__block, .nx-rte__insert) .nx-icon {
357
+ flex-shrink: 0;
358
+ color: var(--nx-text-muted);
359
+ }
360
+
361
+ @container nx-editor (width < 420px) {
362
+ .nx-rte__insert-label {
363
+ display: none;
364
+ }
365
+ }
366
+
367
+ /* Panels of the toolbar: colors and the link box. Two classes, to win over the shared popover (Nexus.Theme.Picker.css). */
368
+ .nx-popover.nx-rte-panel {
369
+ position: fixed;
370
+ inset: auto;
371
+ padding: 12px;
372
+ }
373
+
374
+ .nx-rte-colors {
375
+ display: grid;
376
+ gap: 12px;
377
+ }
378
+
379
+ .nx-rte-colors__title {
380
+ margin-bottom: 6px;
381
+ color: var(--nx-text-muted);
382
+ font-size: var(--nx-text-xs);
383
+ font-weight: 600;
384
+ }
385
+
386
+ .nx-rte-colors__grid {
387
+ display: grid;
388
+ grid-template-columns: repeat(5, 30px);
389
+ gap: 6px;
390
+ }
391
+
392
+ .nx-rte-colors__swatch {
393
+ display: grid;
394
+ place-items: center;
395
+ width: 30px;
396
+ height: 30px;
397
+ padding: 0;
398
+ border: 0;
399
+ border-radius: var(--nx-radius);
400
+ cursor: pointer;
401
+ transition: box-shadow var(--nx-duration);
402
+ }
403
+
404
+ /* Text colors: the letter A in the color, on a light tint of the panel. */
405
+ .nx-rte-colors__swatch[data-kind="color"] {
406
+ background: color-mix(in oklab, var(--nx-text) 6%, transparent);
407
+ color: var(--nx-swatch, var(--nx-text));
408
+ font-size: 15px;
409
+ font-weight: 700;
410
+ }
411
+
412
+ .nx-rte-colors__swatch[data-kind="color"][data-none]::before {
413
+ content: "A";
414
+ }
415
+
416
+ /* Highlights: the color itself, with an edge so the lightest ones show on a light panel. */
417
+ .nx-rte-colors__swatch[data-kind="background"] {
418
+ background: var(--nx-swatch, transparent);
419
+ box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--nx-text) 18%, transparent);
420
+ }
421
+
422
+ .nx-rte-colors__swatch[data-kind="background"][data-none] {
423
+ background: linear-gradient(to top right, transparent calc(50% - 1px), var(--nx-danger) calc(50% - 1px), var(--nx-danger) calc(50% + 1px), transparent calc(50% + 1px));
424
+ }
425
+
426
+ .nx-rte-colors__swatch:hover {
427
+ box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--nx-text) 40%, transparent);
428
+ }
429
+
430
+ .nx-rte-colors__swatch[aria-pressed="true"] {
431
+ box-shadow:
432
+ 0 0 0 2px light-dark(var(--nx-surface), var(--nx-surface-2)),
433
+ 0 0 0 4px var(--nx-primary);
434
+ }
435
+
436
+ .nx-rte-colors__swatch:focus-visible {
437
+ outline: 2px solid var(--nx-primary);
438
+ outline-offset: 2px;
439
+ }
440
+
441
+ .nx-rte-link {
442
+ display: grid;
443
+ gap: 10px;
444
+ width: min(320px, calc(100vw - 40px));
445
+ }
446
+
447
+ .nx-rte-link__actions {
448
+ display: flex;
449
+ flex-wrap: wrap;
450
+ align-items: center;
451
+ gap: 6px;
452
+ }
453
+
454
+ .nx-rte-link__spacer {
455
+ flex: 1 1 auto;
456
+ }
457
+
458
+ @media (prefers-reduced-motion: reduce) {
459
+ .nx-rte-colors__swatch {
460
+ transition: none;
461
+ }
462
+ }
463
+ }