nexus-shared 1.1.21 → 3.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/CHANGELOG.md +262 -0
- package/LICENSE +21 -0
- package/README.md +1000 -0
- package/dist/Client.Index.d.ts +55 -0
- package/dist/Client.Index.js +60 -0
- package/dist/Components/Chats/Chat.d.ts +28 -0
- package/dist/Components/Chats/Chat.js +19 -0
- package/dist/Components/Chats/ChatButton.d.ts +26 -0
- package/dist/Components/Chats/ChatButton.js +41 -0
- package/dist/Components/Chats/ChatComposer.d.ts +41 -0
- package/dist/Components/Chats/ChatComposer.js +177 -0
- package/dist/Components/Chats/ChatConversations.d.ts +35 -0
- package/dist/Components/Chats/ChatConversations.js +38 -0
- package/dist/Components/Chats/ChatPanel.d.ts +66 -0
- package/dist/Components/Chats/ChatPanel.js +94 -0
- package/dist/Components/Chats/ChatParts.d.ts +87 -0
- package/dist/Components/Chats/ChatParts.js +100 -0
- package/dist/Components/Chats/ChatThread.d.ts +22 -0
- package/dist/Components/Chats/ChatThread.js +96 -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 +242 -0
- package/dist/Components/Documents/SplitButton.d.ts +64 -0
- package/dist/Components/Documents/SplitButton.js +129 -0
- package/dist/Components/Documents/TabButtons.d.ts +80 -0
- package/dist/Components/Documents/TabButtons.js +38 -0
- package/dist/Components/Forms/ApiForm.d.ts +23 -0
- package/dist/Components/Forms/ApiForm.js +100 -0
- package/dist/Components/Forms/Crud.d.ts +17 -0
- package/dist/Components/Forms/Crud.js +708 -0
- package/dist/Components/Forms/CrudParts.d.ts +15 -0
- package/dist/Components/Forms/CrudParts.js +36 -0
- package/dist/Components/Forms/ExcelImport.d.ts +42 -0
- package/dist/Components/Forms/ExcelImport.js +190 -0
- package/dist/Components/Forms/Form.d.ts +52 -0
- package/dist/Components/Forms/Form.js +323 -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 +400 -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 +172 -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 +37 -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 +117 -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 +115 -0
- package/dist/Components/Inputs/RowsInput.js +308 -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 +27 -0
- package/dist/Components/Inputs/TabularForm.js +348 -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 +240 -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 +49 -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 +596 -0
- package/dist/Components/Viewers/DataTableColumns.d.ts +28 -0
- package/dist/Components/Viewers/DataTableColumns.js +243 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +138 -0
- package/dist/Components/Viewers/DataTableParts.js +157 -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 +96 -0
- package/dist/Helpers/ApiClient.js +200 -0
- package/dist/Helpers/ApiFormHelpers.d.ts +49 -0
- package/dist/Helpers/ApiFormHelpers.js +120 -0
- package/dist/Helpers/ApiModules.d.ts +131 -0
- package/dist/Helpers/ApiModules.js +195 -0
- package/dist/Helpers/ApiResponses.d.ts +51 -0
- package/dist/Helpers/ApiResponses.js +250 -0
- package/dist/Helpers/ApiRoutes.d.ts +140 -0
- package/dist/Helpers/ApiRoutes.js +183 -0
- package/dist/Helpers/ApiToasts.d.ts +21 -0
- package/dist/Helpers/ApiToasts.js +22 -0
- package/dist/Helpers/ChatBackend.d.ts +134 -0
- package/dist/Helpers/ChatBackend.js +332 -0
- package/dist/Helpers/ChatHelpers.d.ts +189 -0
- package/dist/Helpers/ChatHelpers.js +486 -0
- package/dist/Helpers/ChatHooks.d.ts +81 -0
- package/dist/Helpers/ChatHooks.js +175 -0
- package/dist/Helpers/ChatStore.d.ts +132 -0
- package/dist/Helpers/ChatStore.js +394 -0
- package/dist/Helpers/ChatSummaries.d.ts +39 -0
- package/dist/Helpers/ChatSummaries.js +118 -0
- package/dist/Helpers/ClassHelpers.d.ts +3 -0
- package/dist/Helpers/ClassHelpers.js +4 -0
- package/dist/Helpers/CrudBackend.d.ts +98 -0
- package/dist/Helpers/CrudBackend.js +214 -0
- package/dist/Helpers/CrudHelpers.d.ts +111 -0
- package/dist/Helpers/CrudHelpers.js +267 -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/ExcelBackend.d.ts +106 -0
- package/dist/Helpers/ExcelBackend.js +290 -0
- package/dist/Helpers/ExcelHelpers.d.ts +98 -0
- package/dist/Helpers/ExcelHelpers.js +302 -0
- package/dist/Helpers/FormDrafts.d.ts +18 -0
- package/dist/Helpers/FormDrafts.js +76 -0
- package/dist/Helpers/FormStore.d.ts +233 -0
- package/dist/Helpers/FormStore.js +752 -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 +252 -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 +68 -0
- package/dist/Helpers/PopoverHelpers.js +195 -0
- package/dist/Helpers/RichTextHelpers.d.ts +77 -0
- package/dist/Helpers/RichTextHelpers.js +1072 -0
- package/dist/Helpers/RowsStore.d.ts +166 -0
- package/dist/Helpers/RowsStore.js +606 -0
- package/dist/Helpers/TableColumns.d.ts +47 -0
- package/dist/Helpers/TableColumns.js +282 -0
- package/dist/Helpers/TableExport.d.ts +30 -0
- package/dist/Helpers/TableExport.js +97 -0
- package/dist/Helpers/TableHelpers.d.ts +110 -0
- package/dist/Helpers/TableHelpers.js +301 -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 +174 -0
- package/dist/Interfaces/ApiInterfaces.js +30 -0
- package/dist/Interfaces/ChatInterfaces.d.ts +240 -0
- package/{src/sso-client.tsx → dist/Interfaces/ChatInterfaces.js} +1 -1
- package/dist/Interfaces/CrudInterfaces.d.ts +232 -0
- package/dist/Interfaces/CrudInterfaces.js +1 -0
- package/dist/Interfaces/DateInterfaces.d.ts +154 -0
- package/dist/Interfaces/DateInterfaces.js +29 -0
- package/dist/Interfaces/ExcelInterfaces.d.ts +215 -0
- package/dist/Interfaces/ExcelInterfaces.js +45 -0
- package/dist/Interfaces/FormInterfaces.d.ts +402 -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 +351 -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 +95 -0
- package/dist/Services/BrowserApi.js +129 -0
- package/dist/Services/ChatApi.d.ts +37 -0
- package/dist/Services/ChatApi.js +98 -0
- package/dist/Services/ExcelApi.d.ts +46 -0
- package/dist/Services/ExcelApi.js +196 -0
- package/dist/Services/ServerApi.d.ts +54 -0
- package/dist/Services/ServerApi.js +78 -0
- package/dist/Services/ThemeService.d.ts +17 -0
- package/dist/Services/ThemeService.js +83 -0
- package/dist/Shared.Index.d.ts +51 -0
- package/dist/Shared.Index.js +55 -0
- package/package.json +85 -33
- package/src/Styles/Nexus.Base.css +70 -0
- package/src/Styles/Nexus.Button.css +153 -0
- package/src/Styles/Nexus.Calendar.css +275 -0
- package/src/Styles/Nexus.Chat.css +1489 -0
- package/src/Styles/Nexus.Choice.css +345 -0
- package/src/Styles/Nexus.Crud.css +161 -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.Excel.css +370 -0
- package/src/Styles/Nexus.Form.css +321 -0
- package/src/Styles/Nexus.Index.css +36 -0
- package/src/Styles/Nexus.Input.css +637 -0
- package/src/Styles/Nexus.Markdown.css +265 -0
- package/src/Styles/Nexus.Menu.css +259 -0
- package/src/Styles/Nexus.Popup.css +731 -0
- package/src/Styles/Nexus.RichText.css +463 -0
- package/src/Styles/Nexus.Rows.css +596 -0
- package/src/Styles/Nexus.Slider.css +278 -0
- package/src/Styles/Nexus.Tab.Buttons.css +419 -0
- package/src/Styles/Nexus.Table.css +1296 -0
- package/src/Styles/Nexus.Theme.Picker.css +232 -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 -29
- package/src/client.ts +0 -31
- package/src/components/documents/button.tsx +0 -133
- 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 -64
- 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 -123
- 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 -53
- 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 -163
- 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.grid-view.css +0 -42
- 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,232 @@
|
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/* Popover panel: a native [popover] element, placed by the component that opens it. In dark mode it is a step
|
|
3
|
+
lighter than the surface it floats over, so it reads as raised.
|
|
4
|
+
(The shared panel lives in the theme picker's file because that is where it was first needed; it belongs to
|
|
5
|
+
every popover, not to the picker. Moving it would have to move its place in Nexus.Index.css with it.) */
|
|
6
|
+
.nx-popover {
|
|
7
|
+
/* The arrow's base and depth. Keep in step with ARROW_BASE and ARROW_DEPTH in Helpers/PopoverHelpers.ts, which
|
|
8
|
+
work out the room the arrow needs, and with the two paths below, which are drawn for exactly these. */
|
|
9
|
+
--nx-popover-arrow: 26px;
|
|
10
|
+
--nx-popover-arrow-depth: 11px;
|
|
11
|
+
/* The panel's edge, shared with the arrow's own: a panel that changes it changes both. */
|
|
12
|
+
--nx-popover-edge: var(--nx-border);
|
|
13
|
+
|
|
14
|
+
margin: 0;
|
|
15
|
+
/* The browser's own [popover] rule says `overflow: auto`, which would cut the arrow off at the panel's edge and
|
|
16
|
+
put a pair of scroll bars on a panel that fits. A panel that has to scroll scrolls a block inside itself. */
|
|
17
|
+
overflow: visible;
|
|
18
|
+
padding: var(--nx-space-4);
|
|
19
|
+
border: 1px solid var(--nx-popover-edge);
|
|
20
|
+
border-radius: var(--nx-radius-lg);
|
|
21
|
+
background: light-dark(var(--nx-surface), var(--nx-surface-2));
|
|
22
|
+
color: var(--nx-text);
|
|
23
|
+
box-shadow: var(--nx-shadow);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* The arrow that ties a panel to the button or the place it opened from: an isosceles tail, 26px across and 11px
|
|
28
|
+
* deep, with a slightly rounded tip. It is drawn in two layers, because a shape with a line along two of its sides
|
|
29
|
+
* and nothing along the third cannot be one: `::before` is the whole tail in the panel's edge colour, `::after`
|
|
30
|
+
* the same tail a pixel smaller on both slopes and a pixel longer at the base, in the panel's own background. What
|
|
31
|
+
* is left of the first between them is the 1px line along the slopes; the second covers the panel's border across
|
|
32
|
+
* the base, so the tail opens into the panel with no seam and no line across its mouth. Both paths are drawn for
|
|
33
|
+
* the sizes above: change one and the other two have to be worked out again.
|
|
34
|
+
*
|
|
35
|
+
* `placeUnderAnchor` and `placeAtPoint` (Helpers/PopoverHelpers.ts) say which edge carries the tail and where
|
|
36
|
+
* along that edge its tip sits, and leave both out when it would point at nothing. Nothing here animates: the tail
|
|
37
|
+
* is drawn with the panel, so it is there in the first frame whether the opening animation runs or not.
|
|
38
|
+
*/
|
|
39
|
+
.nx-popover[data-nx-arrow]::before,
|
|
40
|
+
.nx-popover[data-nx-arrow]::after {
|
|
41
|
+
content: "";
|
|
42
|
+
position: absolute;
|
|
43
|
+
/* The middle is only a fallback: the two are always written together, and taken away together. */
|
|
44
|
+
left: var(--nx-popover-arrow-x, 50%);
|
|
45
|
+
width: var(--nx-popover-arrow);
|
|
46
|
+
/* A pixel past the tail's depth: the panel's own border, which the fill covers. */
|
|
47
|
+
height: calc(var(--nx-popover-arrow-depth) + 1px);
|
|
48
|
+
margin-left: calc(var(--nx-popover-arrow) / -2);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* The tail's outline: tip rounded by 2px, feet on the panel's border line. */
|
|
52
|
+
.nx-popover[data-nx-arrow]::before {
|
|
53
|
+
background: var(--nx-popover-edge);
|
|
54
|
+
clip-path: path("M 0 11 L 11.708 1.093 A 2 2 0 0 1 14.292 1.093 L 26 11 Z");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* The fill: the same tail, 1px in from each slope (so the outline is left as a line) and 1px further down. */
|
|
58
|
+
.nx-popover[data-nx-arrow]::after {
|
|
59
|
+
background: inherit;
|
|
60
|
+
clip-path: path("M 0.367 12 L 12.354 1.857 A 1 1 0 0 1 13.646 1.857 L 25.633 12 Z");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Below its anchor: the tail stands on the panel's top edge, pointing up. */
|
|
64
|
+
.nx-popover[data-nx-arrow="below"]::before,
|
|
65
|
+
.nx-popover[data-nx-arrow="below"]::after {
|
|
66
|
+
top: calc(-1px - var(--nx-popover-arrow-depth));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Above its anchor: the same tail turned over, on the bottom edge. */
|
|
70
|
+
.nx-popover[data-nx-arrow="above"]::before,
|
|
71
|
+
.nx-popover[data-nx-arrow="above"]::after {
|
|
72
|
+
bottom: calc(-1px - var(--nx-popover-arrow-depth));
|
|
73
|
+
transform: scaleY(-1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.nx-theme-switcher__panel {
|
|
77
|
+
position: fixed;
|
|
78
|
+
inset: auto;
|
|
79
|
+
width: min(340px, calc(100vw - 16px));
|
|
80
|
+
max-height: calc(100vh - 80px);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* A shut popover is hidden by the browser, so the panel takes its layout only while it is open. */
|
|
84
|
+
.nx-theme-switcher__panel:popover-open {
|
|
85
|
+
display: flex;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* The picker scrolls, not the panel: a panel that scrolls its own box would cut its arrow off. */
|
|
89
|
+
.nx-theme-switcher__panel > .nx-theme-picker {
|
|
90
|
+
flex: 1 1 auto;
|
|
91
|
+
min-height: 0;
|
|
92
|
+
overflow-y: auto;
|
|
93
|
+
overscroll-behavior: contain;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.nx-theme-picker {
|
|
97
|
+
display: grid;
|
|
98
|
+
gap: var(--nx-space-4);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.nx-theme-picker__group {
|
|
102
|
+
min-width: 0;
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
border: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.nx-theme-picker__legend {
|
|
109
|
+
margin: 0 0 var(--nx-space-2);
|
|
110
|
+
padding: 0;
|
|
111
|
+
color: var(--nx-text-muted);
|
|
112
|
+
font-size: var(--nx-text-xs);
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
letter-spacing: 0.06em;
|
|
115
|
+
text-transform: uppercase;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Theme cards */
|
|
119
|
+
.nx-theme-picker__grid {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
|
|
122
|
+
gap: var(--nx-space-2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.nx-theme-option {
|
|
126
|
+
display: grid;
|
|
127
|
+
gap: 6px;
|
|
128
|
+
padding: 5px;
|
|
129
|
+
border: 1px solid var(--nx-border);
|
|
130
|
+
border-radius: var(--nx-radius);
|
|
131
|
+
background: var(--nx-surface);
|
|
132
|
+
color: var(--nx-text);
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
transition:
|
|
135
|
+
border-color var(--nx-duration),
|
|
136
|
+
box-shadow var(--nx-duration);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.nx-theme-option:hover {
|
|
140
|
+
border-color: var(--nx-border-strong);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.nx-theme-option:has(:checked) {
|
|
144
|
+
border-color: var(--nx-primary);
|
|
145
|
+
box-shadow: 0 0 0 1px var(--nx-primary);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.nx-theme-option:has(:focus-visible) {
|
|
149
|
+
box-shadow: 0 0 0 1px var(--nx-primary), var(--nx-focus-ring);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Drawn with the previewed theme's tokens, because the element carries its data-nx-theme. */
|
|
153
|
+
.nx-theme-option__preview {
|
|
154
|
+
display: block;
|
|
155
|
+
padding: 7px;
|
|
156
|
+
border-radius: var(--nx-radius-sm);
|
|
157
|
+
background: var(--nx-bg);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.nx-theme-option__window {
|
|
161
|
+
display: grid;
|
|
162
|
+
gap: 5px;
|
|
163
|
+
padding: 7px;
|
|
164
|
+
border: 1px solid var(--nx-border);
|
|
165
|
+
border-radius: var(--nx-radius-sm);
|
|
166
|
+
background: var(--nx-surface);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.nx-theme-option__line {
|
|
170
|
+
width: 78%;
|
|
171
|
+
height: 5px;
|
|
172
|
+
border-radius: 3px;
|
|
173
|
+
background: var(--nx-text);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.nx-theme-option__line--muted {
|
|
177
|
+
width: 52%;
|
|
178
|
+
background: var(--nx-text-muted);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.nx-theme-option__swatches {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
gap: 4px;
|
|
185
|
+
margin-top: 2px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.nx-theme-option__pill {
|
|
189
|
+
width: 26px;
|
|
190
|
+
height: 10px;
|
|
191
|
+
margin-right: auto;
|
|
192
|
+
border-radius: var(--nx-radius-full);
|
|
193
|
+
background: var(--nx-primary);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.nx-theme-option__dot {
|
|
197
|
+
width: 9px;
|
|
198
|
+
height: 9px;
|
|
199
|
+
border-radius: 50%;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.nx-theme-option__dot--success {
|
|
203
|
+
background: var(--nx-success);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.nx-theme-option__dot--warning {
|
|
207
|
+
background: var(--nx-warning);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.nx-theme-option__dot--danger {
|
|
211
|
+
background: var(--nx-danger);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.nx-theme-option__name {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: space-between;
|
|
218
|
+
gap: 4px;
|
|
219
|
+
padding: 0 3px 1px;
|
|
220
|
+
font-size: var(--nx-text-sm);
|
|
221
|
+
font-weight: 500;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.nx-theme-option__check {
|
|
225
|
+
color: var(--nx-primary);
|
|
226
|
+
visibility: hidden;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.nx-theme-option:has(:checked) .nx-theme-option__check {
|
|
230
|
+
visibility: visible;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Color themes. Each sets its base palette once per color as light-dark(light, dark); the page's color-scheme
|
|
3
|
+
* (light, dark, or the system setting) picks the side. Hover colors, soft backgrounds, and the focus ring are
|
|
4
|
+
* derived from these in Nexus.Tokens.css.
|
|
5
|
+
*
|
|
6
|
+
* Colors follow each theme's official palette, darkened or lightened where needed to meet WCAG AA contrast.
|
|
7
|
+
* --nx-primary and --nx-danger are the accent as text and lines (light in dark mode, for contrast on dark panels);
|
|
8
|
+
* --nx-primary-solid and --nx-danger-solid are the same hue as a fill behind white text (buttons, selected days,
|
|
9
|
+
* checks), a darker shade in dark mode. --nx-primary-text and --nx-danger-text sit on the solid fills.
|
|
10
|
+
* After changing a color, run: npm run check:themes
|
|
11
|
+
*
|
|
12
|
+
* A new theme is one more block with its own data-nx-theme value, added to NEXUS_THEMES or passed to the theme components.
|
|
13
|
+
*/
|
|
14
|
+
@layer nexus.themes {
|
|
15
|
+
/* Nexus: neutral grays with a confident blue. The default. */
|
|
16
|
+
:root,
|
|
17
|
+
[data-nx-theme="nexus"] {
|
|
18
|
+
--nx-bg: light-dark(#f5f6f8, #0f1115);
|
|
19
|
+
--nx-surface: light-dark(#ffffff, #171a20);
|
|
20
|
+
--nx-surface-2: light-dark(#f0f2f5, #1e222a);
|
|
21
|
+
--nx-surface-hover: light-dark(#e9ecf1, #262b35);
|
|
22
|
+
--nx-border: light-dark(#dde1e7, #2c323d);
|
|
23
|
+
--nx-border-strong: light-dark(#c3cad4, #3d4552);
|
|
24
|
+
--nx-text: light-dark(#171c26, #e6e9ef);
|
|
25
|
+
--nx-text-muted: light-dark(#5a6375, #a1a9b7);
|
|
26
|
+
--nx-text-subtle: light-dark(#8b93a2, #6f7888);
|
|
27
|
+
--nx-primary: light-dark(#1c5cea, #4f8fff);
|
|
28
|
+
--nx-primary-solid: light-dark(#1c5cea, #3270dd);
|
|
29
|
+
--nx-primary-text: light-dark(#ffffff, #ffffff);
|
|
30
|
+
--nx-danger: light-dark(#c5291d, #f26b5e);
|
|
31
|
+
--nx-danger-solid: light-dark(#c5291d, #cb473d);
|
|
32
|
+
--nx-danger-text: light-dark(#ffffff, #ffffff);
|
|
33
|
+
--nx-success: light-dark(#147739, #4cc27a);
|
|
34
|
+
--nx-warning: light-dark(#b34608, #f2a54a);
|
|
35
|
+
--nx-info: light-dark(#0b6aa2, #5bb3e6);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* GitHub: Primer grays with GitHub green. */
|
|
39
|
+
[data-nx-theme="github"] {
|
|
40
|
+
--nx-bg: light-dark(#f6f8fa, #010409);
|
|
41
|
+
--nx-surface: light-dark(#ffffff, #0d1117);
|
|
42
|
+
--nx-surface-2: light-dark(#f6f8fa, #151b23);
|
|
43
|
+
--nx-surface-hover: light-dark(#eef1f4, #212830);
|
|
44
|
+
--nx-border: light-dark(#d1d9e0, #3d444d);
|
|
45
|
+
--nx-border-strong: light-dark(#b1bac4, #656c76);
|
|
46
|
+
--nx-text: light-dark(#1f2328, #f0f6fc);
|
|
47
|
+
--nx-text-muted: light-dark(#59636e, #9198a1);
|
|
48
|
+
--nx-text-subtle: light-dark(#818b98, #6e7681);
|
|
49
|
+
--nx-primary: light-dark(#1b7736, #3fb950);
|
|
50
|
+
--nx-primary-solid: light-dark(#1b7736, #388441);
|
|
51
|
+
--nx-primary-text: light-dark(#ffffff, #ffffff);
|
|
52
|
+
--nx-danger: light-dark(#c8212d, #f85149);
|
|
53
|
+
--nx-danger-solid: light-dark(#c8212d, #db3330);
|
|
54
|
+
--nx-danger-text: light-dark(#ffffff, #ffffff);
|
|
55
|
+
--nx-success: light-dark(#197934, #3fb950);
|
|
56
|
+
--nx-warning: light-dark(#8d5e00, #d29922);
|
|
57
|
+
--nx-info: light-dark(#0964d0, #4493f8);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Nord: arctic, north-bluish calm. */
|
|
61
|
+
[data-nx-theme="nord"] {
|
|
62
|
+
--nx-bg: light-dark(#e5e9f0, #242933);
|
|
63
|
+
--nx-surface: light-dark(#eceff4, #2e3440);
|
|
64
|
+
--nx-surface-2: light-dark(#e5e9f0, #3b4252);
|
|
65
|
+
--nx-surface-hover: light-dark(#d8dee9, #434c5e);
|
|
66
|
+
--nx-border: light-dark(#d8dee9, #434c5e);
|
|
67
|
+
--nx-border-strong: light-dark(#b8c2d3, #4c566a);
|
|
68
|
+
--nx-text: light-dark(#2e3440, #eceff4);
|
|
69
|
+
--nx-text-muted: light-dark(#4c566a, #b9c2d0);
|
|
70
|
+
--nx-text-subtle: light-dark(#7b88a1, #7b88a1);
|
|
71
|
+
--nx-primary: light-dark(#446184, #88c0d0);
|
|
72
|
+
--nx-primary-solid: light-dark(#446184, #4b717c);
|
|
73
|
+
--nx-primary-text: light-dark(#eceff4, #eceff4);
|
|
74
|
+
--nx-danger: light-dark(#9e4049, #dba6ab);
|
|
75
|
+
--nx-danger-solid: light-dark(#9e4049, #8e5e63);
|
|
76
|
+
--nx-danger-text: light-dark(#eceff4, #eceff4);
|
|
77
|
+
--nx-success: light-dark(#4e6639, #a3be8c);
|
|
78
|
+
--nx-warning: light-dark(#954931, #ebcb8b);
|
|
79
|
+
--nx-info: light-dark(#406283, #9cb5ce);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Dracula: the dark purple classic, with its Alucard palette for light. */
|
|
83
|
+
[data-nx-theme="dracula"] {
|
|
84
|
+
--nx-bg: light-dark(#f3eed9, #21222c);
|
|
85
|
+
--nx-surface: light-dark(#fffbeb, #282a36);
|
|
86
|
+
--nx-surface-2: light-dark(#f7f1dc, #303241);
|
|
87
|
+
--nx-surface-hover: light-dark(#efe8cf, #44475a);
|
|
88
|
+
--nx-border: light-dark(#e4dcc0, #44475a);
|
|
89
|
+
--nx-border-strong: light-dark(#cfc49f, #6272a4);
|
|
90
|
+
--nx-text: light-dark(#1f1f1f, #f8f8f2);
|
|
91
|
+
--nx-text-muted: light-dark(#635d97, #c5c8d8);
|
|
92
|
+
--nx-text-subtle: light-dark(#8e89ae, #6272a4);
|
|
93
|
+
--nx-primary: light-dark(#644ac9, #bd93f9);
|
|
94
|
+
--nx-primary-solid: light-dark(#644ac9, #8a60c1);
|
|
95
|
+
--nx-primary-text: light-dark(#ffffff, #ffffff);
|
|
96
|
+
--nx-danger: light-dark(#ba3527, #ff7b7b);
|
|
97
|
+
--nx-danger-solid: light-dark(#ba3527, #c8494d);
|
|
98
|
+
--nx-danger-text: light-dark(#ffffff, #ffffff);
|
|
99
|
+
--nx-success: light-dark(#14710a, #50fa7b);
|
|
100
|
+
--nx-warning: light-dark(#a34d14, #ffb86c);
|
|
101
|
+
--nx-info: light-dark(#036a96, #8be9fd);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Solarized: warm cream or deep teal, with precise accents. */
|
|
105
|
+
[data-nx-theme="solarized"] {
|
|
106
|
+
--nx-bg: light-dark(#eee8d5, #00212b);
|
|
107
|
+
--nx-surface: light-dark(#fdf6e3, #002b36);
|
|
108
|
+
--nx-surface-2: light-dark(#f5efdc, #073642);
|
|
109
|
+
--nx-surface-hover: light-dark(#eee8d5, #0b4453);
|
|
110
|
+
--nx-border: light-dark(#e4ddc8, #0d3f4c);
|
|
111
|
+
--nx-border-strong: light-dark(#cdc5ab, #2a5561);
|
|
112
|
+
--nx-text: light-dark(#073642, #eee8d5);
|
|
113
|
+
--nx-text-muted: light-dark(#566b72, #93a1a1);
|
|
114
|
+
--nx-text-subtle: light-dark(#809294, #657b83);
|
|
115
|
+
--nx-primary: light-dark(#1c679c, #55a7e0);
|
|
116
|
+
--nx-primary-solid: light-dark(#1c679c, #247bb2);
|
|
117
|
+
--nx-primary-text: light-dark(#ffffff, #ffffff);
|
|
118
|
+
--nx-danger: light-dark(#bd2320, #e9807e);
|
|
119
|
+
--nx-danger-solid: light-dark(#bd2320, #b95555);
|
|
120
|
+
--nx-danger-text: light-dark(#ffffff, #ffffff);
|
|
121
|
+
--nx-success: light-dark(#5b6900, #92a800);
|
|
122
|
+
--nx-warning: light-dark(#7d5e00, #c69700);
|
|
123
|
+
--nx-info: light-dark(#1d6e68, #2fb3a9);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Catppuccin: soothing pastels, Latte for light and Mocha for dark. */
|
|
127
|
+
[data-nx-theme="catppuccin"] {
|
|
128
|
+
--nx-bg: light-dark(#e6e9ef, #11111b);
|
|
129
|
+
--nx-surface: light-dark(#eff1f5, #1e1e2e);
|
|
130
|
+
--nx-surface-2: light-dark(#e6e9ef, #313244);
|
|
131
|
+
--nx-surface-hover: light-dark(#dce0e8, #45475a);
|
|
132
|
+
--nx-border: light-dark(#ccd0da, #45475a);
|
|
133
|
+
--nx-border-strong: light-dark(#acb0be, #585b70);
|
|
134
|
+
--nx-text: light-dark(#42455c, #dce2f7);
|
|
135
|
+
--nx-text-muted: light-dark(#65687d, #a6adc8);
|
|
136
|
+
--nx-text-subtle: light-dark(#868a9c, #7f849c);
|
|
137
|
+
--nx-primary: light-dark(#7a21ed, #cba6f7);
|
|
138
|
+
--nx-primary-solid: light-dark(#7a21ed, #8965b1);
|
|
139
|
+
--nx-primary-text: light-dark(#ffffff, #ffffff);
|
|
140
|
+
--nx-danger: light-dark(#ba0d33, #f38ba8);
|
|
141
|
+
--nx-danger-solid: light-dark(#ba0d33, #b75573);
|
|
142
|
+
--nx-danger-text: light-dark(#ffffff, #ffffff);
|
|
143
|
+
--nx-success: light-dark(#2c6e1d, #a6e3a1);
|
|
144
|
+
--nx-warning: light-dark(#875612, #f9e2af);
|
|
145
|
+
--nx-info: light-dark(#0a52e0, #89b4fa);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Rosé Pine: muted pine, iris, and rose; Dawn for light. */
|
|
149
|
+
[data-nx-theme="rose-pine"] {
|
|
150
|
+
--nx-bg: light-dark(#faf4ed, #191724);
|
|
151
|
+
--nx-surface: light-dark(#fffaf3, #1f1d2e);
|
|
152
|
+
--nx-surface-2: light-dark(#f2e9e1, #26233a);
|
|
153
|
+
--nx-surface-hover: light-dark(#ebe2da, #2a2740);
|
|
154
|
+
--nx-border: light-dark(#dfdad9, #403d52);
|
|
155
|
+
--nx-border-strong: light-dark(#cecacd, #524f67);
|
|
156
|
+
--nx-text: light-dark(#494565, #e0def4);
|
|
157
|
+
--nx-text-muted: light-dark(#6a6683, #908caa);
|
|
158
|
+
--nx-text-subtle: light-dark(#948fa2, #6e6a86);
|
|
159
|
+
--nx-primary: light-dark(#745c8f, #c4a7e7);
|
|
160
|
+
--nx-primary-solid: light-dark(#745c8f, #8166a1);
|
|
161
|
+
--nx-primary-text: light-dark(#fffaf3, #fffaf3);
|
|
162
|
+
--nx-danger: light-dark(#9d4c63, #eb6f92);
|
|
163
|
+
--nx-danger-solid: light-dark(#9d4c63, #bf476c);
|
|
164
|
+
--nx-danger-text: light-dark(#fffaf3, #fffaf3);
|
|
165
|
+
--nx-success: light-dark(#286983, #9ccfd8);
|
|
166
|
+
--nx-warning: light-dark(#90590f, #f6c177);
|
|
167
|
+
--nx-info: light-dark(#406d76, #4da0c2);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Browsers without light-dark() (before 2024) get the Nexus light palette. */
|
|
171
|
+
@supports not (color: light-dark(#fff, #000)) {
|
|
172
|
+
:root,
|
|
173
|
+
[data-nx-theme] {
|
|
174
|
+
--nx-bg: #f5f6f8;
|
|
175
|
+
--nx-surface: #ffffff;
|
|
176
|
+
--nx-surface-2: #f0f2f5;
|
|
177
|
+
--nx-surface-hover: #e9ecf1;
|
|
178
|
+
--nx-border: #dde1e7;
|
|
179
|
+
--nx-border-strong: #c3cad4;
|
|
180
|
+
--nx-text: #171c26;
|
|
181
|
+
--nx-text-muted: #5a6375;
|
|
182
|
+
--nx-text-subtle: #8b93a2;
|
|
183
|
+
--nx-primary: #1c5cea;
|
|
184
|
+
--nx-primary-solid: #1c5cea;
|
|
185
|
+
--nx-primary-text: #ffffff;
|
|
186
|
+
--nx-danger: #c5291d;
|
|
187
|
+
--nx-danger-solid: #c5291d;
|
|
188
|
+
--nx-danger-text: #ffffff;
|
|
189
|
+
--nx-success: #147739;
|
|
190
|
+
--nx-warning: #b34608;
|
|
191
|
+
--nx-info: #0b6aa2;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* Time picker: the box lines digits up, and its panel opens in a popover placed by the component. The panel shows
|
|
4
|
+
* columns of hours, minutes, seconds, and AM/PM whose chosen items scroll to the middle row, so the chosen time reads
|
|
5
|
+
* as one line with its neighbours above and below; or a single list of slots. Chosen items are solid primary, like
|
|
6
|
+
* the calendar's chosen day.
|
|
7
|
+
*/
|
|
8
|
+
.nx-field__control--time {
|
|
9
|
+
font-variant-numeric: tabular-nums;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.nx-field__action--clock[aria-expanded="true"] {
|
|
13
|
+
color: var(--nx-field-accent);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.nx-time-popover {
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset: auto;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nx-time {
|
|
23
|
+
--nx-time-item: 32px;
|
|
24
|
+
--nx-time-rows: 7;
|
|
25
|
+
--nx-time-bg: light-dark(var(--nx-surface), var(--nx-surface-2));
|
|
26
|
+
--nx-time-scrollbar: color-mix(in oklab, var(--nx-text-subtle) 75%, transparent);
|
|
27
|
+
|
|
28
|
+
display: grid;
|
|
29
|
+
color: var(--nx-text);
|
|
30
|
+
font-size: var(--nx-text-sm);
|
|
31
|
+
line-height: 1.3;
|
|
32
|
+
user-select: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.nx-time__columns {
|
|
36
|
+
display: flex;
|
|
37
|
+
padding: var(--nx-space-1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* A column scrolls; the space before its first item and after its last lets both reach the middle row. */
|
|
41
|
+
.nx-time__column {
|
|
42
|
+
position: relative;
|
|
43
|
+
width: 56px;
|
|
44
|
+
height: calc(var(--nx-time-item) * var(--nx-time-rows));
|
|
45
|
+
padding: calc(var(--nx-time-item) * (var(--nx-time-rows) - 1) / 2) var(--nx-space-1);
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
overscroll-behavior: contain;
|
|
48
|
+
outline: none;
|
|
49
|
+
scrollbar-width: thin;
|
|
50
|
+
scrollbar-color: transparent transparent;
|
|
51
|
+
transition: scrollbar-color var(--nx-duration);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.nx-time__column--meridiem {
|
|
55
|
+
width: auto;
|
|
56
|
+
min-width: 56px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.nx-time__column:is(:hover, :focus-within) {
|
|
60
|
+
scrollbar-color: var(--nx-time-scrollbar) transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.nx-time__column + .nx-time__column {
|
|
64
|
+
border-left: 1px solid var(--nx-border);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.nx-time__item {
|
|
68
|
+
display: grid;
|
|
69
|
+
place-items: center;
|
|
70
|
+
height: var(--nx-time-item);
|
|
71
|
+
padding: 0 var(--nx-space-2);
|
|
72
|
+
border-radius: var(--nx-radius);
|
|
73
|
+
font-variant-numeric: tabular-nums;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
outline: none;
|
|
77
|
+
transition:
|
|
78
|
+
background-color var(--nx-duration),
|
|
79
|
+
color var(--nx-duration);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nx-time__item:hover:not([aria-disabled="true"], [aria-selected="true"]) {
|
|
83
|
+
background: var(--nx-surface-hover);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nx-time__item[aria-selected="true"] {
|
|
87
|
+
background: var(--nx-primary-solid);
|
|
88
|
+
color: var(--nx-primary-text);
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* An inset ring, so the column does not clip it, with a band of the panel's color that shows on a chosen item. */
|
|
93
|
+
.nx-time__item:focus-visible {
|
|
94
|
+
box-shadow:
|
|
95
|
+
inset 0 0 0 2px var(--nx-primary),
|
|
96
|
+
inset 0 0 0 4px var(--nx-time-bg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.nx-time__item[aria-disabled="true"] {
|
|
100
|
+
color: var(--nx-text-subtle);
|
|
101
|
+
opacity: 0.45;
|
|
102
|
+
cursor: default;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.nx-time__item[aria-disabled="true"][aria-selected="true"] {
|
|
106
|
+
color: var(--nx-primary-text);
|
|
107
|
+
opacity: 0.7;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.nx-time__foot {
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
gap: var(--nx-space-2);
|
|
114
|
+
padding: 6px var(--nx-space-2);
|
|
115
|
+
border-top: 1px solid var(--nx-border);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* List of slots */
|
|
119
|
+
.nx-time__list {
|
|
120
|
+
position: relative;
|
|
121
|
+
min-width: 132px;
|
|
122
|
+
max-height: calc(var(--nx-time-item) * 8 + var(--nx-space-2));
|
|
123
|
+
padding: var(--nx-space-1);
|
|
124
|
+
overflow-y: auto;
|
|
125
|
+
overscroll-behavior: contain;
|
|
126
|
+
outline: none;
|
|
127
|
+
scrollbar-width: thin;
|
|
128
|
+
scrollbar-color: var(--nx-time-scrollbar) transparent;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.nx-time__slot {
|
|
132
|
+
place-items: center start;
|
|
133
|
+
padding: 0 var(--nx-space-3);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.nx-time__empty {
|
|
137
|
+
padding: var(--nx-space-2) var(--nx-space-3);
|
|
138
|
+
color: var(--nx-text-muted);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (prefers-reduced-motion: reduce) {
|
|
142
|
+
.nx-time__item,
|
|
143
|
+
.nx-time__column {
|
|
144
|
+
transition: none;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|