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.
- package/LICENSE +21 -0
- package/README.md +903 -0
- package/dist/Client.Index.d.ts +44 -0
- package/dist/Client.Index.js +49 -0
- package/dist/Components/Documents/Button.d.ts +29 -0
- package/dist/Components/Documents/Button.js +11 -0
- package/dist/Components/Documents/Menu.d.ts +102 -0
- package/dist/Components/Documents/Menu.js +238 -0
- package/dist/Components/Documents/SplitButton.d.ts +64 -0
- package/dist/Components/Documents/SplitButton.js +127 -0
- package/dist/Components/Documents/TabButtons.d.ts +62 -0
- package/dist/Components/Documents/TabButtons.js +19 -0
- package/dist/Components/Forms/ApiForm.d.ts +21 -0
- package/dist/Components/Forms/ApiForm.js +99 -0
- package/dist/Components/Forms/Crud.d.ts +17 -0
- package/dist/Components/Forms/Crud.js +556 -0
- package/dist/Components/Forms/CrudParts.d.ts +15 -0
- package/dist/Components/Forms/CrudParts.js +36 -0
- package/dist/Components/Forms/Form.d.ts +52 -0
- package/dist/Components/Forms/Form.js +319 -0
- package/dist/Components/Forms/SubmitForm.d.ts +65 -0
- package/dist/Components/Forms/SubmitForm.js +198 -0
- package/dist/Components/Inputs/Calendar.d.ts +69 -0
- package/dist/Components/Inputs/Calendar.js +258 -0
- package/dist/Components/Inputs/CheckBox.d.ts +53 -0
- package/dist/Components/Inputs/CheckBox.js +87 -0
- package/dist/Components/Inputs/CheckBoxGroup.d.ts +20 -0
- package/dist/Components/Inputs/CheckBoxGroup.js +80 -0
- package/dist/Components/Inputs/ChoiceField.d.ts +122 -0
- package/dist/Components/Inputs/ChoiceField.js +169 -0
- package/dist/Components/Inputs/DatePicker.d.ts +54 -0
- package/dist/Components/Inputs/DatePicker.js +246 -0
- package/dist/Components/Inputs/DateRangePicker.d.ts +62 -0
- package/dist/Components/Inputs/DateRangePicker.js +283 -0
- package/dist/Components/Inputs/DateTimePicker.d.ts +75 -0
- package/dist/Components/Inputs/DateTimePicker.js +399 -0
- package/dist/Components/Inputs/Dropdown.d.ts +117 -0
- package/dist/Components/Inputs/Dropdown.js +839 -0
- package/dist/Components/Inputs/DropdownParts.d.ts +84 -0
- package/dist/Components/Inputs/DropdownParts.js +102 -0
- package/dist/Components/Inputs/EditorShell.d.ts +45 -0
- package/dist/Components/Inputs/EditorShell.js +214 -0
- package/dist/Components/Inputs/Field.d.ts +53 -0
- package/dist/Components/Inputs/Field.js +16 -0
- package/dist/Components/Inputs/GroupForm.d.ts +20 -0
- package/dist/Components/Inputs/GroupForm.js +170 -0
- package/dist/Components/Inputs/InputField.d.ts +59 -0
- package/dist/Components/Inputs/InputField.js +169 -0
- package/dist/Components/Inputs/InputRenderer.d.ts +35 -0
- package/dist/Components/Inputs/InputRenderer.js +99 -0
- package/dist/Components/Inputs/MarkdownEditor.d.ts +67 -0
- package/dist/Components/Inputs/MarkdownEditor.js +289 -0
- package/dist/Components/Inputs/NumberBox.d.ts +53 -0
- package/dist/Components/Inputs/NumberBox.js +228 -0
- package/dist/Components/Inputs/RadioGroup.d.ts +20 -0
- package/dist/Components/Inputs/RadioGroup.js +43 -0
- package/dist/Components/Inputs/ReadOnlyNotice.d.ts +36 -0
- package/dist/Components/Inputs/ReadOnlyNotice.js +116 -0
- package/dist/Components/Inputs/RichTextEditor.d.ts +103 -0
- package/dist/Components/Inputs/RichTextEditor.js +1170 -0
- package/dist/Components/Inputs/RichTextParts.d.ts +63 -0
- package/dist/Components/Inputs/RichTextParts.js +157 -0
- package/dist/Components/Inputs/RowsInput.d.ts +104 -0
- package/dist/Components/Inputs/RowsInput.js +259 -0
- package/dist/Components/Inputs/Slider.d.ts +87 -0
- package/dist/Components/Inputs/Slider.js +216 -0
- package/dist/Components/Inputs/TabularForm.d.ts +23 -0
- package/dist/Components/Inputs/TabularForm.js +283 -0
- package/dist/Components/Inputs/TextArea.d.ts +43 -0
- package/dist/Components/Inputs/TextArea.js +31 -0
- package/dist/Components/Inputs/TextBox.d.ts +52 -0
- package/dist/Components/Inputs/TextBox.js +58 -0
- package/dist/Components/Inputs/TextField.d.ts +31 -0
- package/dist/Components/Inputs/TextField.js +35 -0
- package/dist/Components/Inputs/TimePanel.d.ts +34 -0
- package/dist/Components/Inputs/TimePanel.js +288 -0
- package/dist/Components/Inputs/TimePicker.d.ts +54 -0
- package/dist/Components/Inputs/TimePicker.js +239 -0
- package/dist/Components/Inputs/TreeView.d.ts +160 -0
- package/dist/Components/Inputs/TreeView.js +947 -0
- package/dist/Components/Layouts/MessageBox.d.ts +71 -0
- package/dist/Components/Layouts/MessageBox.js +104 -0
- package/dist/Components/Layouts/Popup.d.ts +92 -0
- package/dist/Components/Layouts/Popup.js +376 -0
- package/dist/Components/Layouts/PopupContext.d.ts +2 -0
- package/dist/Components/Layouts/PopupContext.js +4 -0
- package/dist/Components/Layouts/PopupDock.d.ts +22 -0
- package/dist/Components/Layouts/PopupDock.js +121 -0
- package/dist/Components/Layouts/PopupHost.d.ts +56 -0
- package/dist/Components/Layouts/PopupHost.js +163 -0
- package/dist/Components/Layouts/PopupRules.d.ts +30 -0
- package/dist/Components/Layouts/PopupRules.js +63 -0
- package/dist/Components/Layouts/ThemePicker.d.ts +13 -0
- package/dist/Components/Layouts/ThemePicker.js +22 -0
- package/dist/Components/Layouts/ThemeScript.d.ts +14 -0
- package/dist/Components/Layouts/ThemeScript.js +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.js +29 -0
- package/dist/Components/Layouts/Toaster.d.ts +76 -0
- package/dist/Components/Layouts/Toaster.js +172 -0
- package/dist/Components/Viewers/DataTable.d.ts +25 -0
- package/dist/Components/Viewers/DataTable.js +542 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +134 -0
- package/dist/Components/Viewers/DataTableParts.js +145 -0
- package/dist/Components/Viewers/MarkdownView.d.ts +26 -0
- package/dist/Components/Viewers/MarkdownView.js +79 -0
- package/dist/Components/Viewers/RichTextView.d.ts +18 -0
- package/dist/Components/Viewers/RichTextView.js +17 -0
- package/dist/Helpers/AnimationHelpers.d.ts +6 -0
- package/dist/Helpers/AnimationHelpers.js +35 -0
- package/dist/Helpers/ApiClient.d.ts +74 -0
- package/dist/Helpers/ApiClient.js +197 -0
- package/dist/Helpers/ApiFormHelpers.d.ts +26 -0
- package/dist/Helpers/ApiFormHelpers.js +56 -0
- package/dist/Helpers/ApiModules.d.ts +135 -0
- package/dist/Helpers/ApiModules.js +194 -0
- package/dist/Helpers/ApiResponses.d.ts +41 -0
- package/dist/Helpers/ApiResponses.js +159 -0
- package/dist/Helpers/ApiRoutes.d.ts +150 -0
- package/dist/Helpers/ApiRoutes.js +191 -0
- package/dist/Helpers/ApiToasts.d.ts +21 -0
- package/dist/Helpers/ApiToasts.js +22 -0
- package/dist/Helpers/ClassHelpers.d.ts +3 -0
- package/dist/Helpers/ClassHelpers.js +4 -0
- package/dist/Helpers/CrudBackend.d.ts +56 -0
- package/dist/Helpers/CrudBackend.js +119 -0
- package/dist/Helpers/CrudHelpers.d.ts +76 -0
- package/dist/Helpers/CrudHelpers.js +202 -0
- package/dist/Helpers/DateHelpers.d.ts +88 -0
- package/dist/Helpers/DateHelpers.js +363 -0
- package/dist/Helpers/DatePreferences.d.ts +14 -0
- package/dist/Helpers/DatePreferences.js +94 -0
- package/dist/Helpers/DateTimeHelpers.d.ts +87 -0
- package/dist/Helpers/DateTimeHelpers.js +286 -0
- package/dist/Helpers/DragHelpers.d.ts +129 -0
- package/dist/Helpers/DragHelpers.js +281 -0
- package/dist/Helpers/DropdownHelpers.d.ts +56 -0
- package/dist/Helpers/DropdownHelpers.js +180 -0
- package/dist/Helpers/FormDrafts.d.ts +18 -0
- package/dist/Helpers/FormDrafts.js +76 -0
- package/dist/Helpers/FormStore.d.ts +231 -0
- package/dist/Helpers/FormStore.js +734 -0
- package/dist/Helpers/InputParamsHelpers.d.ts +79 -0
- package/dist/Helpers/InputParamsHelpers.js +388 -0
- package/dist/Helpers/MarkdownEditing.d.ts +27 -0
- package/dist/Helpers/MarkdownEditing.js +250 -0
- package/dist/Helpers/MarkdownHelpers.d.ts +82 -0
- package/dist/Helpers/MarkdownHelpers.js +775 -0
- package/dist/Helpers/MessageBuilder.d.ts +74 -0
- package/dist/Helpers/MessageBuilder.js +254 -0
- package/dist/Helpers/NepaliCalendar.d.ts +25 -0
- package/dist/Helpers/NepaliCalendar.js +107 -0
- package/dist/Helpers/NumberHelpers.d.ts +71 -0
- package/dist/Helpers/NumberHelpers.js +202 -0
- package/dist/Helpers/Permissions.d.ts +62 -0
- package/dist/Helpers/Permissions.js +133 -0
- package/dist/Helpers/PopoverHelpers.d.ts +43 -0
- package/dist/Helpers/PopoverHelpers.js +91 -0
- package/dist/Helpers/RichTextHelpers.d.ts +77 -0
- package/dist/Helpers/RichTextHelpers.js +1072 -0
- package/dist/Helpers/RowsStore.d.ts +160 -0
- package/dist/Helpers/RowsStore.js +584 -0
- package/dist/Helpers/TableColumns.d.ts +40 -0
- package/dist/Helpers/TableColumns.js +254 -0
- package/dist/Helpers/TableExport.d.ts +30 -0
- package/dist/Helpers/TableExport.js +97 -0
- package/dist/Helpers/TableHelpers.d.ts +102 -0
- package/dist/Helpers/TableHelpers.js +281 -0
- package/dist/Helpers/TableStore.d.ts +142 -0
- package/dist/Helpers/TableStore.js +530 -0
- package/dist/Helpers/ThemeHelpers.d.ts +15 -0
- package/dist/Helpers/ThemeHelpers.js +16 -0
- package/dist/Helpers/TimeHelpers.d.ts +73 -0
- package/dist/Helpers/TimeHelpers.js +253 -0
- package/dist/Helpers/TreeStore.d.ts +188 -0
- package/dist/Helpers/TreeStore.js +577 -0
- package/dist/Helpers/ValidationHelpers.d.ts +124 -0
- package/dist/Helpers/ValidationHelpers.js +301 -0
- package/dist/Interfaces/ApiInterfaces.d.ts +149 -0
- package/dist/Interfaces/ApiInterfaces.js +24 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +171 -0
- package/{src/sso-client.tsx → dist/Interfaces/CrudInterfaces.js} +1 -1
- package/dist/Interfaces/DateInterfaces.d.ts +154 -0
- package/dist/Interfaces/DateInterfaces.js +29 -0
- package/dist/Interfaces/FormInterfaces.d.ts +352 -0
- package/dist/Interfaces/FormInterfaces.js +1 -0
- package/dist/Interfaces/InputInterfaces.d.ts +141 -0
- package/dist/Interfaces/InputInterfaces.js +1 -0
- package/dist/Interfaces/MessageInterfaces.d.ts +111 -0
- package/dist/Interfaces/MessageInterfaces.js +5 -0
- package/dist/Interfaces/TableInterfaces.d.ts +291 -0
- package/dist/Interfaces/TableInterfaces.js +1 -0
- package/dist/Interfaces/ThemeInterfaces.d.ts +17 -0
- package/dist/Interfaces/ThemeInterfaces.js +17 -0
- package/dist/Interfaces/TypeInterfaces.d.ts +4 -0
- package/dist/Interfaces/TypeInterfaces.js +1 -0
- package/dist/Server.Index.d.ts +2 -0
- package/dist/Server.Index.js +5 -0
- package/dist/Services/ApiProxy.d.ts +32 -0
- package/dist/Services/ApiProxy.js +111 -0
- package/dist/Services/BrowserApi.d.ts +78 -0
- package/dist/Services/BrowserApi.js +111 -0
- package/dist/Services/ServerApi.d.ts +49 -0
- package/dist/Services/ServerApi.js +75 -0
- package/dist/Services/ThemeService.d.ts +17 -0
- package/dist/Services/ThemeService.js +83 -0
- package/dist/Shared.Index.d.ts +43 -0
- package/dist/Shared.Index.js +47 -0
- package/package.json +82 -33
- package/src/Styles/Nexus.Base.css +70 -0
- package/src/Styles/Nexus.Button.css +151 -0
- package/src/Styles/Nexus.Calendar.css +275 -0
- package/src/Styles/Nexus.Choice.css +345 -0
- package/src/Styles/Nexus.Crud.css +84 -0
- package/src/Styles/Nexus.DateTime.css +81 -0
- package/src/Styles/Nexus.Dropdown.css +774 -0
- package/src/Styles/Nexus.Editor.css +297 -0
- package/src/Styles/Nexus.Form.css +298 -0
- package/src/Styles/Nexus.Index.css +34 -0
- package/src/Styles/Nexus.Input.css +637 -0
- package/src/Styles/Nexus.Markdown.css +265 -0
- package/src/Styles/Nexus.Menu.css +249 -0
- package/src/Styles/Nexus.Popup.css +731 -0
- package/src/Styles/Nexus.RichText.css +463 -0
- package/src/Styles/Nexus.Rows.css +566 -0
- package/src/Styles/Nexus.Slider.css +278 -0
- package/src/Styles/Nexus.Tab.Buttons.css +364 -0
- package/src/Styles/Nexus.Table.css +1014 -0
- package/src/Styles/Nexus.Theme.Picker.css +159 -0
- package/src/Styles/Nexus.Themes.css +194 -0
- package/src/Styles/Nexus.Time.css +147 -0
- package/src/Styles/Nexus.Toast.css +265 -0
- package/src/Styles/Nexus.Tokens.css +72 -0
- package/src/Styles/Nexus.Tree.css +435 -0
- package/src/api-services/authentication-service.tsx +0 -23
- package/src/api-services/preference-service.tsx +0 -5
- package/src/api-services/system-service.tsx +0 -34
- package/src/client.ts +0 -31
- package/src/components/documents/button.tsx +0 -142
- package/src/components/documents/icon-box.tsx +0 -93
- package/src/components/documents/page-title.tsx +0 -7
- package/src/components/documents/tab-button.tsx +0 -172
- package/src/components/documents/tag.tsx +0 -30
- package/src/components/index.js +0 -0
- package/src/components/inputs/checkbox-input.tsx +0 -66
- package/src/components/inputs/input-box.tsx +0 -48
- package/src/components/inputs/input-element.tsx +0 -65
- package/src/components/inputs/input-form.tsx +0 -164
- package/src/components/inputs/input.tsx +0 -181
- package/src/components/inputs/number-input.tsx +0 -108
- package/src/components/inputs/radiobox-input.tsx +0 -53
- package/src/components/inputs/textarea-input.tsx +0 -47
- package/src/components/inputs/textbox-input.tsx +0 -45
- package/src/components/layouts/global-dialogbox.tsx +0 -431
- package/src/components/layouts/global-layout.tsx +0 -59
- package/src/components/layouts/layout-helpers.tsx +0 -20
- package/src/components/layouts/panels/user-panel.tsx +0 -112
- package/src/components/layouts/utility-menu.tsx +0 -49
- package/src/components/panels/theme-panel.tsx +0 -46
- package/src/helpers/bitwise-helpers.tsx +0 -11
- package/src/helpers/browser-helpers.tsx +0 -156
- package/src/helpers/datasource-helpers.tsx +0 -99
- package/src/helpers/element-helpers.tsx +0 -57
- package/src/helpers/input-helpers.tsx +0 -74
- package/src/helpers/string-helpers.tsx +0 -28
- package/src/helpers/utility-helpers.tsx +0 -45
- package/src/helpers/validation-helpers.tsx +0 -302
- package/src/index.ts +0 -26
- package/src/interface.ts +0 -19
- package/src/interfaces/auth-token-interfaces.tsx +0 -6
- package/src/interfaces/browser-interfaces.tsx +0 -36
- package/src/interfaces/button-interfaces.tsx +0 -63
- package/src/interfaces/datasource-interfaces.tsx +0 -22
- package/src/interfaces/datatable-interfaces.tsx +0 -25
- package/src/interfaces/dialogbox-interfaces.tsx +0 -5
- package/src/interfaces/exception-interfaces.tsx +0 -99
- package/src/interfaces/http-interfaces.tsx +0 -129
- package/src/interfaces/icon-interfaces.tsx +0 -129
- package/src/interfaces/input-interfaces.tsx +0 -410
- package/src/interfaces/layout-interfaces.tsx +0 -191
- package/src/interfaces/menu-interfaces.tsx +0 -49
- package/src/interfaces/message-interfaces.tsx +0 -32
- package/src/interfaces/permission-interfaces.tsx +0 -9
- package/src/interfaces/storage-interfaces.tsx +0 -5
- package/src/interfaces/system-interfaces.tsx +0 -22
- package/src/interfaces/theme-interfaces.tsx +0 -123
- package/src/interfaces/type-interfaces.tsx +0 -28
- package/src/interfaces/user-interfaces.tsx +0 -47
- package/src/nexus-client.tsx +0 -21
- package/src/nexus.environments.tsx +0 -66
- package/src/proxy-api/proxy-backend.tsx +0 -60
- package/src/proxy-api/proxy-constants.tsx +0 -28
- package/src/proxy-api/proxy-helpers.tsx +0 -91
- package/src/proxy-api-client.tsx +0 -1
- package/src/proxy-api-server.tsx +0 -2
- package/src/services/http-client-services.tsx +0 -75
- package/src/services/http-services.tsx +0 -158
- package/src/services/loader-service.tsx +0 -185
- package/src/services/localstorage-service.tsx +0 -119
- package/src/services/message-services.tsx +0 -383
- package/src/services/theme-service.tsx +0 -161
- package/src/services/user-services.tsx +0 -10
- package/src/sso-config/auth-token-validation.ts +0 -16
- package/src/sso-config/callback-route.tsx +0 -35
- package/src/sso-config/cookie-encryption.ts +0 -51
- package/src/sso-config/cookie-helpers.tsx +0 -102
- package/src/sso-config/forgot-password-route.tsx +0 -36
- package/src/sso-config/oauth-callback-state.ts +0 -61
- package/src/sso-config/pkce-helpers.ts +0 -9
- package/src/sso-config/provider-complete-route.tsx +0 -18
- package/src/sso-config/redirect-context-actions.tsx +0 -45
- package/src/sso-config/redirect-context-helpers.tsx +0 -159
- package/src/sso-config/redirect-context-persist.tsx +0 -18
- package/src/sso-config/redirect-context-route.tsx +0 -45
- package/src/sso-config/refresh-route.tsx +0 -23
- package/src/sso-config/sign-in-route.tsx +0 -74
- package/src/sso-config/sign-out-route.tsx +0 -57
- package/src/sso-config/sign-up-route.tsx +0 -57
- package/src/sso-config/sso-backend-flow.ts +0 -38
- package/src/sso-config/sso-complete-route.tsx +0 -50
- package/src/sso-config/sso-config.ts +0 -59
- package/src/sso-config/sso-interfaces.tsx +0 -99
- package/src/sso-config/sso-response-helpers.tsx +0 -20
- package/src/sso-server.tsx +0 -21
- package/src/styles/nexus.animation.css +0 -269
- package/src/styles/nexus.core.css +0 -119
- package/src/styles/nexus.dialog.css +0 -144
- package/src/styles/nexus.icon.css +0 -51
- package/src/styles/nexus.input.css +0 -207
- package/src/styles/nexus.loader.css +0 -11
- package/src/styles/nexus.logic.css +0 -47
- 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
|
+
}
|