nexus-shared 3.2.0 → 4.1.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 +2359 -0
- package/README.md +1911 -1123
- package/dist/Client.Index.d.ts +27 -0
- package/dist/Client.Index.js +27 -0
- package/dist/Components/Chats/ChatComposer.d.ts +7 -1
- package/dist/Components/Chats/ChatComposer.js +9 -6
- package/dist/Components/Chats/ChatParts.d.ts +15 -2
- package/dist/Components/Chats/ChatParts.js +15 -4
- package/dist/Components/Chats/ChatPopup.d.ts +46 -0
- package/dist/Components/Chats/ChatPopup.js +34 -0
- package/dist/Components/Chats/ChatThread.d.ts +9 -1
- package/dist/Components/Chats/ChatThread.js +54 -6
- package/dist/Components/Dashboards/DashboardBoard.d.ts +62 -0
- package/dist/Components/Dashboards/DashboardBoard.js +594 -0
- package/dist/Components/Dashboards/DashboardWidgets.d.ts +155 -0
- package/dist/Components/Dashboards/DashboardWidgets.js +159 -0
- package/dist/Components/Dashboards/WidgetFrame.d.ts +51 -0
- package/dist/Components/Dashboards/WidgetFrame.js +45 -0
- package/dist/Components/Documents/Button.d.ts +6 -1
- package/dist/Components/Documents/Button.js +2 -2
- package/dist/Components/Documents/DocumentFrame.d.ts +50 -0
- package/dist/Components/Documents/DocumentFrame.js +83 -0
- package/dist/Components/Documents/Menu.d.ts +4 -0
- package/dist/Components/Documents/Menu.js +40 -24
- package/dist/Components/Documents/PrintDocument.d.ts +95 -0
- package/dist/Components/Documents/PrintDocument.js +62 -0
- package/dist/Components/Documents/TabButtons.d.ts +6 -0
- package/dist/Components/Documents/TabButtons.js +5 -4
- package/dist/Components/Documents/Tabs.d.ts +59 -0
- package/dist/Components/Documents/Tabs.js +70 -0
- package/dist/Components/Domains/DomainCard.d.ts +98 -0
- package/dist/Components/Domains/DomainCard.js +182 -0
- package/dist/Components/Forms/ApiForm.js +24 -3
- package/dist/Components/Forms/Crud.d.ts +2 -2
- package/dist/Components/Forms/Crud.js +628 -247
- package/dist/Components/Forms/CrudActions.d.ts +137 -0
- package/dist/Components/Forms/CrudActions.js +214 -0
- package/dist/Components/Forms/CrudHistory.d.ts +6 -1
- package/dist/Components/Forms/CrudHistory.js +14 -6
- package/dist/Components/Forms/CrudNarrowPicker.d.ts +31 -0
- package/dist/Components/Forms/CrudNarrowPicker.js +180 -0
- package/dist/Components/Forms/CrudParts.d.ts +37 -2
- package/dist/Components/Forms/CrudParts.js +123 -7
- package/dist/Components/Forms/CrudRowForms.d.ts +26 -0
- package/dist/Components/Forms/CrudRowForms.js +174 -0
- package/dist/Components/Forms/CrudScopes.d.ts +28 -0
- package/dist/Components/Forms/CrudScopes.js +76 -0
- package/dist/Components/Forms/CrudTree.d.ts +90 -0
- package/dist/Components/Forms/CrudTree.js +363 -0
- package/dist/Components/Forms/CrudWorkspace.d.ts +73 -0
- package/dist/Components/Forms/CrudWorkspace.js +177 -0
- package/dist/Components/Forms/ExcelImport.js +3 -3
- package/dist/Components/Forms/Form.d.ts +6 -5
- package/dist/Components/Forms/Form.js +134 -21
- package/dist/Components/Forms/FormLeaveGuard.d.ts +44 -0
- package/dist/Components/Forms/FormLeaveGuard.js +65 -0
- package/dist/Components/Forms/FormQuestion.d.ts +6 -0
- package/dist/Components/Forms/FormQuestion.js +28 -0
- package/dist/Components/Forms/RecordFlows.d.ts +50 -0
- package/dist/Components/Forms/RecordFlows.js +282 -0
- package/dist/Components/Forms/SubmitForm.d.ts +37 -2
- package/dist/Components/Forms/SubmitForm.js +182 -10
- package/dist/Components/Inputs/CheckBox.js +1 -1
- package/dist/Components/Inputs/ChoiceField.d.ts +21 -1
- package/dist/Components/Inputs/ChoiceField.js +28 -2
- package/dist/Components/Inputs/ComputedInput.d.ts +51 -0
- package/dist/Components/Inputs/ComputedInput.js +179 -0
- package/dist/Components/Inputs/Dropdown.d.ts +13 -0
- package/dist/Components/Inputs/Dropdown.js +8 -6
- package/dist/Components/Inputs/DropdownParts.d.ts +3 -1
- package/dist/Components/Inputs/DropdownParts.js +16 -4
- package/dist/Components/Inputs/Field.d.ts +7 -1
- package/dist/Components/Inputs/Field.js +2 -2
- package/dist/Components/Inputs/GroupForm.d.ts +6 -6
- package/dist/Components/Inputs/GroupForm.js +12 -12
- package/dist/Components/Inputs/InputRenderer.d.ts +13 -6
- package/dist/Components/Inputs/InputRenderer.js +37 -32
- package/dist/Components/Inputs/MarkdownEditor.d.ts +6 -0
- package/dist/Components/Inputs/MarkdownEditor.js +32 -6
- package/dist/Components/Inputs/PictureInput.d.ts +41 -0
- package/dist/Components/Inputs/PictureInput.js +75 -0
- package/dist/Components/Inputs/RadioGroup.d.ts +16 -3
- package/dist/Components/Inputs/RadioGroup.js +8 -3
- package/dist/Components/Inputs/RowsInput.d.ts +15 -2
- package/dist/Components/Inputs/RowsInput.js +96 -8
- package/dist/Components/Inputs/TabularForm.d.ts +5 -5
- package/dist/Components/Inputs/TabularForm.js +45 -32
- package/dist/Components/Inputs/TextArea.d.ts +6 -0
- package/dist/Components/Inputs/TextArea.js +11 -2
- package/dist/Components/Inputs/TextBoxTypes.d.ts +6 -0
- package/dist/Components/Inputs/TextBoxTypes.js +17 -0
- package/dist/Components/Inputs/TreeView.d.ts +76 -2
- package/dist/Components/Inputs/TreeView.js +227 -16
- package/dist/Components/Layouts/MessageBox.d.ts +15 -2
- package/dist/Components/Layouts/MessageBox.js +56 -7
- package/dist/Components/Layouts/Popup.d.ts +34 -7
- package/dist/Components/Layouts/Popup.js +143 -13
- package/dist/Components/Layouts/PopupDock.d.ts +3 -1
- package/dist/Components/Layouts/PopupDock.js +2 -1
- package/dist/Components/Layouts/PopupHost.js +5 -4
- package/dist/Components/Messages/MailClient.d.ts +50 -0
- package/dist/Components/Messages/MailClient.js +410 -0
- package/dist/Components/Messages/MailColumns.d.ts +21 -0
- package/dist/Components/Messages/MailColumns.js +92 -0
- package/dist/Components/Messages/MailCompose.d.ts +46 -0
- package/dist/Components/Messages/MailCompose.js +154 -0
- package/dist/Components/Messages/MailReader.d.ts +43 -0
- package/dist/Components/Messages/MailReader.js +207 -0
- package/dist/Components/Messages/MailThread.d.ts +71 -0
- package/dist/Components/Messages/MailThread.js +185 -0
- package/dist/Components/Messages/MessageBell.d.ts +41 -0
- package/dist/Components/Messages/MessageBell.js +76 -0
- package/dist/Components/Viewers/DataTable.js +153 -49
- package/dist/Components/Viewers/DataTableColumns.d.ts +2 -2
- package/dist/Components/Viewers/DataTableColumns.js +2 -1
- package/dist/Components/Viewers/DataTableFilters.d.ts +1 -1
- package/dist/Components/Viewers/DataTableFilters.js +17 -2
- package/dist/Components/Viewers/DataTableParts.d.ts +23 -5
- package/dist/Components/Viewers/DataTableParts.js +26 -14
- package/dist/Components/Viewers/OwnerFiles.d.ts +227 -0
- package/dist/Components/Viewers/OwnerFiles.js +700 -0
- package/dist/Components/Viewers/QrCodeImage.d.ts +22 -0
- package/dist/Components/Viewers/QrCodeImage.js +15 -0
- package/dist/Components/Viewers/RecordCards.d.ts +16 -0
- package/dist/Components/Viewers/RecordCards.js +509 -0
- package/dist/Helpers/ApiModules.js +4 -0
- package/dist/Helpers/AuditEntries.d.ts +50 -0
- package/dist/Helpers/AuditEntries.js +96 -0
- package/dist/Helpers/BusyHooks.d.ts +6 -0
- package/dist/Helpers/BusyHooks.js +39 -0
- package/dist/Helpers/ChatBackend.d.ts +8 -1
- package/dist/Helpers/ChatBackend.js +18 -0
- package/dist/Helpers/ChatHelpers.d.ts +2 -0
- package/dist/Helpers/ChatHelpers.js +4 -1
- package/dist/Helpers/CrudBackend.d.ts +20 -2
- package/dist/Helpers/CrudBackend.js +46 -2
- package/dist/Helpers/CrudColumns.d.ts +91 -6
- package/dist/Helpers/CrudColumns.js +148 -7
- package/dist/Helpers/CrudDetailsTabs.d.ts +58 -0
- package/dist/Helpers/CrudDetailsTabs.js +126 -0
- package/dist/Helpers/CrudHelpers.d.ts +116 -2
- package/dist/Helpers/CrudHelpers.js +256 -0
- package/dist/Helpers/CrudNarrowPick.d.ts +83 -0
- package/dist/Helpers/CrudNarrowPick.js +157 -0
- package/dist/Helpers/CrudPickerPlan.d.ts +58 -0
- package/dist/Helpers/CrudPickerPlan.js +46 -0
- package/dist/Helpers/CrudRowForms.d.ts +32 -0
- package/dist/Helpers/CrudRowForms.js +76 -0
- package/dist/Helpers/CrudScopes.d.ts +32 -0
- package/dist/Helpers/CrudScopes.js +79 -0
- package/dist/Helpers/DashboardHelpers.d.ts +115 -0
- package/dist/Helpers/DashboardHelpers.js +305 -0
- package/dist/Helpers/DomainCards.d.ts +140 -0
- package/dist/Helpers/DomainCards.js +370 -0
- package/dist/Helpers/DropdownHelpers.d.ts +3 -1
- package/dist/Helpers/DropdownHelpers.js +6 -2
- package/dist/Helpers/ExcelHelpers.d.ts +1 -1
- package/dist/Helpers/ExcelHelpers.js +12 -11
- package/dist/Helpers/FileAdapter.d.ts +158 -0
- package/dist/Helpers/FileAdapter.js +173 -0
- package/dist/Helpers/FilePrimaries.d.ts +48 -0
- package/dist/Helpers/FilePrimaries.js +138 -0
- package/dist/Helpers/FormConfirm.d.ts +32 -0
- package/dist/Helpers/FormConfirm.js +40 -0
- package/dist/Helpers/FormStore.d.ts +100 -5
- package/dist/Helpers/FormStore.js +368 -25
- package/dist/Helpers/InputConditions.d.ts +56 -0
- package/dist/Helpers/InputConditions.js +192 -0
- package/dist/Helpers/InputMemory.d.ts +106 -0
- package/dist/Helpers/InputMemory.js +395 -0
- package/dist/Helpers/InputNarrowing.d.ts +50 -0
- package/dist/Helpers/InputNarrowing.js +148 -0
- package/dist/Helpers/InputParamsHelpers.d.ts +44 -1
- package/dist/Helpers/InputParamsHelpers.js +157 -74
- package/dist/Helpers/MailClientHelpers.d.ts +96 -0
- package/dist/Helpers/MailClientHelpers.js +211 -0
- package/dist/Helpers/MessageBackend.d.ts +152 -0
- package/dist/Helpers/MessageBackend.js +329 -0
- package/dist/Helpers/MessageHelpers.d.ts +160 -0
- package/dist/Helpers/MessageHelpers.js +573 -0
- package/dist/Helpers/MessageUnread.d.ts +95 -0
- package/dist/Helpers/MessageUnread.js +245 -0
- package/dist/Helpers/NexusDriveAdapter.d.ts +71 -0
- package/dist/Helpers/NexusDriveAdapter.js +236 -0
- package/dist/Helpers/NumberHelpers.d.ts +156 -0
- package/dist/Helpers/NumberHelpers.js +242 -0
- package/dist/Helpers/PagedPicker.d.ts +42 -0
- package/dist/Helpers/PagedPicker.js +85 -0
- package/dist/Helpers/Permissions.js +2 -1
- package/dist/Helpers/QrCode.d.ts +26 -0
- package/dist/Helpers/QrCode.js +463 -0
- package/dist/Helpers/RecordCards.d.ts +205 -0
- package/dist/Helpers/RecordCards.js +378 -0
- package/dist/Helpers/RequestCache.d.ts +14 -2
- package/dist/Helpers/RequestCache.js +22 -3
- package/dist/Helpers/RowsStore.d.ts +61 -2
- package/dist/Helpers/RowsStore.js +203 -16
- package/dist/Helpers/ServerPreview.d.ts +69 -0
- package/dist/Helpers/ServerPreview.js +99 -0
- package/dist/Helpers/TableColumns.js +4 -3
- package/dist/Helpers/TableExport.d.ts +7 -1
- package/dist/Helpers/TableExport.js +9 -3
- package/dist/Helpers/TableFilters.d.ts +1 -1
- package/dist/Helpers/TableFilters.js +24 -23
- package/dist/Helpers/TableHelpers.d.ts +38 -4
- package/dist/Helpers/TableHelpers.js +78 -10
- package/dist/Helpers/TableJoins.d.ts +13 -0
- package/dist/Helpers/TableJoins.js +34 -0
- package/dist/Helpers/TableStore.d.ts +28 -4
- package/dist/Helpers/TableStore.js +73 -11
- package/dist/Helpers/ToolbarFit.d.ts +23 -0
- package/dist/Helpers/ToolbarFit.js +30 -0
- package/dist/Helpers/TreeStore.d.ts +156 -6
- package/dist/Helpers/TreeStore.js +547 -18
- package/dist/Interfaces/ApiInterfaces.d.ts +10 -1
- package/dist/Interfaces/ApiInterfaces.js +10 -1
- package/dist/Interfaces/ChatInterfaces.d.ts +22 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +539 -6
- package/dist/Interfaces/DashboardInterfaces.d.ts +123 -0
- package/dist/Interfaces/DashboardInterfaces.js +1 -0
- package/dist/Interfaces/DomainInterfaces.d.ts +145 -0
- package/dist/Interfaces/DomainInterfaces.js +1 -0
- package/dist/Interfaces/FileInterfaces.d.ts +183 -0
- package/dist/Interfaces/FileInterfaces.js +6 -0
- package/dist/Interfaces/FormInterfaces.d.ts +460 -32
- package/dist/Interfaces/FormInterfaces.js +79 -1
- package/dist/Interfaces/InputInterfaces.d.ts +22 -3
- package/dist/Interfaces/MailInterfaces.d.ts +192 -0
- package/dist/Interfaces/MailInterfaces.js +1 -0
- package/dist/Interfaces/RecordInterfaces.d.ts +367 -0
- package/dist/Interfaces/RecordInterfaces.js +1 -0
- package/dist/Interfaces/TableInterfaces.d.ts +102 -3
- package/dist/Services/ExcelApi.js +5 -0
- package/dist/Services/FileApi.d.ts +13 -0
- package/dist/Services/FileApi.js +29 -0
- package/dist/Services/ImageEditorLoader.d.ts +14 -0
- package/dist/Services/ImageEditorLoader.js +51 -0
- package/dist/Services/JoinSources.d.ts +79 -6
- package/dist/Services/JoinSources.js +132 -21
- package/dist/Services/MessageApi.d.ts +18 -0
- package/dist/Services/MessageApi.js +64 -0
- package/dist/Services/ModuleImport.d.ts +7 -0
- package/dist/Services/ModuleImport.js +22 -0
- package/dist/Shared.Index.d.ts +28 -0
- package/dist/Shared.Index.js +28 -0
- package/package.json +13 -2
- package/src/Styles/Nexus.Avatar.css +6 -5
- package/src/Styles/Nexus.Button.css +39 -4
- package/src/Styles/Nexus.Chat.css +114 -22
- package/src/Styles/Nexus.Choice.css +16 -0
- package/src/Styles/Nexus.Crud.css +486 -21
- package/src/Styles/Nexus.Dashboard.css +763 -0
- package/src/Styles/Nexus.Domain.css +384 -0
- package/src/Styles/Nexus.Dropdown.css +8 -0
- package/src/Styles/Nexus.Editor.css +20 -0
- package/src/Styles/Nexus.Files.css +437 -0
- package/src/Styles/Nexus.Form.css +5 -2
- package/src/Styles/Nexus.Index.css +7 -0
- package/src/Styles/Nexus.Input.css +73 -0
- package/src/Styles/Nexus.Mail.css +1062 -0
- package/src/Styles/Nexus.Menu.css +10 -1
- package/src/Styles/Nexus.Popup.css +135 -1
- package/src/Styles/Nexus.Print.css +288 -0
- package/src/Styles/Nexus.QrCode.css +12 -0
- package/src/Styles/Nexus.Record.css +430 -0
- package/src/Styles/Nexus.Tab.Buttons.css +87 -22
- package/src/Styles/Nexus.Table.css +1458 -1387
- package/src/Styles/Nexus.Theme.Picker.css +1 -0
- package/src/Styles/Nexus.Themes.css +12 -6
- package/src/Styles/Nexus.Tokens.css +8 -3
- package/src/Styles/Nexus.Tree.css +41 -1
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
min-width: 180px;
|
|
16
16
|
max-width: min(360px, calc(100% - 16px));
|
|
17
17
|
outline: none;
|
|
18
|
+
/* A row's menu sits inside the table's actions cell, which does not wrap; an item's second line has to. */
|
|
19
|
+
white-space: normal;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
/* The items scroll inside the panel (`.nx-popover__scroll`): a block, so a long menu scrolls instead of squeezing
|
|
@@ -60,12 +62,19 @@
|
|
|
60
62
|
background: var(--nx-surface-hover);
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
/*
|
|
66
|
+
* A switched-off item fades its icon, check, label and shortcut, not its second line: that line is why it is off
|
|
67
|
+
* (a locked record's reason, what an action waits for), and at half strength it measured 2.0 to 3.1:1 in every theme.
|
|
68
|
+
*/
|
|
63
69
|
.nx-menu__item[aria-disabled="true"] {
|
|
64
70
|
background: none;
|
|
65
|
-
opacity: 0.5;
|
|
66
71
|
cursor: not-allowed;
|
|
67
72
|
}
|
|
68
73
|
|
|
74
|
+
.nx-menu__item[aria-disabled="true"] :is(.nx-menu__icon, .nx-menu__check, .nx-menu__label, .nx-menu__shortcut) {
|
|
75
|
+
opacity: 0.5;
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
/* The icon column: the same width on every item, empty on items without an icon. */
|
|
70
79
|
.nx-menu__icon {
|
|
71
80
|
display: grid;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
/* Percentages, not vw: the viewport width here leaves out the scrollbar. */
|
|
10
10
|
width: min(var(--nx-popup-width), calc(100% - 32px));
|
|
11
11
|
max-width: none;
|
|
12
|
+
/* fit-content, as the browser sizes a dialog: `auto` would stretch a modal one between its insets. */
|
|
13
|
+
height: var(--nx-popup-height, fit-content);
|
|
12
14
|
max-height: min(calc(100vh - 48px), calc(100dvh - 48px));
|
|
13
15
|
margin: auto;
|
|
14
16
|
padding: 0;
|
|
@@ -86,7 +88,12 @@
|
|
|
86
88
|
.nx-popup--full {
|
|
87
89
|
--nx-popup-width: calc(100% - 32px);
|
|
88
90
|
|
|
91
|
+
/*
|
|
92
|
+
* dvh, not vh alone: on a phone or tablet browser 100vh is the screen with the address bar hidden, so while the bar
|
|
93
|
+
* shows, the popup's foot (Save, the tab footer) would sit under the screen's edge. vh stays for older browsers.
|
|
94
|
+
*/
|
|
89
95
|
height: calc(100vh - 32px);
|
|
96
|
+
height: calc(100dvh - 32px);
|
|
90
97
|
max-height: none;
|
|
91
98
|
}
|
|
92
99
|
|
|
@@ -100,6 +107,57 @@
|
|
|
100
107
|
translate: none;
|
|
101
108
|
}
|
|
102
109
|
|
|
110
|
+
/*
|
|
111
|
+
* Docked (`docked`): a window on the page, not over it - no backdrop, the page usable - standing on the bottom edge at
|
|
112
|
+
* the right, above the dock's bars, each next one to the left of the one before (the Popup writes where,
|
|
113
|
+
* `--nx-docked-right`, and which is on top, `--nx-docked-z`). Its height is its own (`height`), the body
|
|
114
|
+
* scrolling inside. On a phone it takes the width, and the last used covers the others.
|
|
115
|
+
*/
|
|
116
|
+
.nx-popup.nx-popup--docked {
|
|
117
|
+
position: fixed;
|
|
118
|
+
inset: auto calc(var(--nx-docked-right, 16px) + env(safe-area-inset-right, 0px)) calc(16px + var(--nx-dock-space, 0px) + env(safe-area-inset-bottom, 0px)) auto;
|
|
119
|
+
z-index: calc(900 + var(--nx-docked-z, 1));
|
|
120
|
+
height: min(var(--nx-popup-height, 32rem), calc(100dvh - 32px - var(--nx-dock-space, 0px)));
|
|
121
|
+
max-height: none;
|
|
122
|
+
margin: 0;
|
|
123
|
+
translate: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nx-popup.nx-popup--docked.nx-popup--maximized {
|
|
127
|
+
inset: 0;
|
|
128
|
+
z-index: 950;
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (max-width: 40rem) {
|
|
134
|
+
.nx-popup.nx-popup--docked:not(.nx-popup--maximized) {
|
|
135
|
+
inset: auto calc(8px + env(safe-area-inset-right, 0px)) calc(8px + var(--nx-dock-space, 0px) + env(safe-area-inset-bottom, 0px)) auto;
|
|
136
|
+
width: calc(100% - 16px);
|
|
137
|
+
height: min(var(--nx-popup-height, 32rem), calc(100dvh - 24px - var(--nx-dock-space, 0px)));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/*
|
|
142
|
+
* A drawer (`drawer`): the window's whole height at its end edge, its width from its size, all of it on a phone. It
|
|
143
|
+
* fades in where it stays, as every popup does; its body scrolls between the title bar and the foot.
|
|
144
|
+
*/
|
|
145
|
+
.nx-popup.nx-popup--drawer {
|
|
146
|
+
inset: 0 0 0 auto;
|
|
147
|
+
width: min(var(--nx-popup-width), 100%);
|
|
148
|
+
height: 100%;
|
|
149
|
+
max-height: none;
|
|
150
|
+
margin: 0;
|
|
151
|
+
border-width: 0;
|
|
152
|
+
border-inline-start-width: 1px;
|
|
153
|
+
border-radius: 0;
|
|
154
|
+
translate: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.nx-popup--drawer:dir(rtl) {
|
|
158
|
+
inset: 0 auto 0 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
103
161
|
/* Minimizing: the page comes back while the popup flies to the dock. */
|
|
104
162
|
.nx-popup[data-nx-minimizing] {
|
|
105
163
|
pointer-events: none;
|
|
@@ -351,12 +409,18 @@
|
|
|
351
409
|
}
|
|
352
410
|
|
|
353
411
|
/* Body: scrolls when the content is taller than the window allows. */
|
|
412
|
+
/*
|
|
413
|
+
* Focus scrolls a field's control to the body's edge: `scroll-padding` keeps room past it for what the field draws
|
|
414
|
+
* outside, an outlined field's raised label above (0.6em of the xs text, and the 2px outline) and the box's border and
|
|
415
|
+
* 3px focus ring below. A field first in the body has its padding for that.
|
|
416
|
+
*/
|
|
354
417
|
.nx-popup__body {
|
|
355
418
|
flex: 1 1 auto;
|
|
356
419
|
min-height: 0;
|
|
357
420
|
padding: var(--nx-space-4) var(--nx-space-5) var(--nx-space-5);
|
|
358
421
|
overflow: auto;
|
|
359
422
|
overscroll-behavior: contain;
|
|
423
|
+
scroll-padding: calc(var(--nx-text-xs) * 0.6 + 2px) 4px 4px;
|
|
360
424
|
}
|
|
361
425
|
|
|
362
426
|
.nx-popup__head + .nx-popup__body:empty {
|
|
@@ -403,6 +467,15 @@
|
|
|
403
467
|
line-height: 1.5;
|
|
404
468
|
}
|
|
405
469
|
|
|
470
|
+
/* What a question is about, in full (`details`): read as content, so in the normal text colour, under the message. */
|
|
471
|
+
.nx-message__details {
|
|
472
|
+
color: var(--nx-text);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.nx-message__text + .nx-message__details {
|
|
476
|
+
margin-top: var(--nx-space-4);
|
|
477
|
+
}
|
|
478
|
+
|
|
406
479
|
.nx-message__form {
|
|
407
480
|
display: grid;
|
|
408
481
|
gap: var(--nx-space-4);
|
|
@@ -628,8 +701,15 @@
|
|
|
628
701
|
vertical-align: 0;
|
|
629
702
|
}
|
|
630
703
|
|
|
631
|
-
.
|
|
704
|
+
/* The title, and under it what the window is about when it says (its description): the record, the place. */
|
|
705
|
+
.nx-dock__text {
|
|
706
|
+
display: flex;
|
|
632
707
|
flex: 1 1 auto;
|
|
708
|
+
flex-direction: column;
|
|
709
|
+
min-width: 0;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.nx-dock__title {
|
|
633
713
|
min-width: 0;
|
|
634
714
|
overflow: hidden;
|
|
635
715
|
font-size: var(--nx-text-md);
|
|
@@ -639,6 +719,21 @@
|
|
|
639
719
|
white-space: nowrap;
|
|
640
720
|
}
|
|
641
721
|
|
|
722
|
+
.nx-dock__description {
|
|
723
|
+
min-width: 0;
|
|
724
|
+
overflow: hidden;
|
|
725
|
+
color: var(--nx-text-muted);
|
|
726
|
+
font-size: var(--nx-text-xs);
|
|
727
|
+
line-height: 1.3;
|
|
728
|
+
text-overflow: ellipsis;
|
|
729
|
+
white-space: nowrap;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/* Muted text on the hover tint moves toward the text color, so it keeps 4.5:1 in every theme. */
|
|
733
|
+
.nx-dock__window:hover .nx-dock__description {
|
|
734
|
+
color: color-mix(in oklab, var(--nx-text-muted), var(--nx-text) 35%);
|
|
735
|
+
}
|
|
736
|
+
|
|
642
737
|
.nx-dock__restore {
|
|
643
738
|
flex-shrink: 0;
|
|
644
739
|
width: 18px;
|
|
@@ -711,6 +806,45 @@
|
|
|
711
806
|
.nx-popup__foot {
|
|
712
807
|
padding: var(--nx-space-3) var(--nx-space-4);
|
|
713
808
|
}
|
|
809
|
+
|
|
810
|
+
/*
|
|
811
|
+
* A phone has no room for the description after the title: it takes the lines under the title it needs, in full,
|
|
812
|
+
* and the bar grows with it. The icon and the window buttons keep the bar's first line; the title stays one line.
|
|
813
|
+
*/
|
|
814
|
+
.nx-popup--window .nx-popup__head {
|
|
815
|
+
align-items: flex-start;
|
|
816
|
+
height: auto;
|
|
817
|
+
min-height: var(--nx-popup-bar);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.nx-popup--window .nx-popup__icon {
|
|
821
|
+
align-self: flex-start;
|
|
822
|
+
height: var(--nx-popup-bar);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.nx-popup--window .nx-popup__heading {
|
|
826
|
+
flex-wrap: wrap;
|
|
827
|
+
row-gap: 0;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.nx-popup--window .nx-popup__title {
|
|
831
|
+
flex-basis: 100%;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.nx-popup--window .nx-popup__description:not(:empty) {
|
|
835
|
+
flex-basis: 100%;
|
|
836
|
+
margin-top: calc(var(--nx-space-1) * -1);
|
|
837
|
+
padding-bottom: var(--nx-space-2);
|
|
838
|
+
overflow: visible;
|
|
839
|
+
line-height: 1.45;
|
|
840
|
+
white-space: normal;
|
|
841
|
+
overflow-wrap: anywhere;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.nx-popup--window .nx-popup__controls {
|
|
845
|
+
align-self: flex-start;
|
|
846
|
+
height: var(--nx-popup-bar);
|
|
847
|
+
}
|
|
714
848
|
}
|
|
715
849
|
|
|
716
850
|
[data-nx-motion="reduce"] .nx-popup[open],
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A printable document (PrintDocument.tsx): a receipt, a bill, a statement. On screen it reads in the theme's colours
|
|
3
|
+
* at the width of its paper; printed, it is the only thing on the paper, black on white - A5 (128 mm of text) or an
|
|
4
|
+
* 80 mm thermal roll (72 mm printed). The browser's own print, no PDF library. The paper itself is the component's
|
|
5
|
+
* own @page rule, written while it is on the page.
|
|
6
|
+
*
|
|
7
|
+
* And a whole page a server wrote, in a frame of its own (DocumentFrame.tsx): its sheet, desk and @page are its own.
|
|
8
|
+
*/
|
|
9
|
+
@layer nexus.components {
|
|
10
|
+
/* As wide as its paper, in any container (a flex column that would shrink it to its text included). */
|
|
11
|
+
.nx-print {
|
|
12
|
+
container: nx-print / inline-size;
|
|
13
|
+
width: 100%;
|
|
14
|
+
max-width: 128mm;
|
|
15
|
+
margin-inline: auto;
|
|
16
|
+
color: var(--nx-text);
|
|
17
|
+
font-size: 0.875rem;
|
|
18
|
+
line-height: 1.45;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.nx-print--thermal {
|
|
22
|
+
max-width: 72mm;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.nx-print p {
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.nx-print__head {
|
|
31
|
+
padding-block-end: var(--nx-space-2);
|
|
32
|
+
border-block-end: 1px dashed var(--nx-border);
|
|
33
|
+
text-align: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.nx-print__title {
|
|
37
|
+
font-size: 1.25em;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
* A logo (`logo`). On A5 it sits beside the title lines in a 24 mm column, with one as wide after them so the lines
|
|
43
|
+
* stay centred on the paper; at most 16 mm tall, so the head is never taller than its lines and a one-page receipt
|
|
44
|
+
* stays one page. On an 80 mm roll it sits above them, small and centred.
|
|
45
|
+
*/
|
|
46
|
+
.nx-print__head--logo {
|
|
47
|
+
display: grid;
|
|
48
|
+
grid-template-columns: 24mm minmax(0, 1fr) 24mm;
|
|
49
|
+
align-items: center;
|
|
50
|
+
column-gap: var(--nx-space-2);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nx-print__logo,
|
|
54
|
+
.nx-print__heading {
|
|
55
|
+
min-width: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.nx-print__logo {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.nx-print__logo > :is(img, svg) {
|
|
65
|
+
display: block;
|
|
66
|
+
max-width: 100%;
|
|
67
|
+
max-height: 16mm;
|
|
68
|
+
object-fit: contain;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.nx-print--thermal .nx-print__head--logo {
|
|
72
|
+
display: block;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.nx-print--thermal .nx-print__logo {
|
|
76
|
+
margin-block-end: var(--nx-space-1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* An A5 document shown narrower than its paper (a phone): the logo above the lines, as on a roll. Printed, it is A5. */
|
|
80
|
+
@container nx-print (max-width: 100mm) {
|
|
81
|
+
.nx-print__head--logo {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nx-print__logo {
|
|
86
|
+
margin-block-end: var(--nx-space-1);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nx-print--thermal .nx-print__logo > :is(img, svg) {
|
|
91
|
+
max-width: 36mm;
|
|
92
|
+
max-height: 10mm;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.nx-print__kind {
|
|
96
|
+
margin-block-start: var(--nx-space-1);
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
letter-spacing: 0.04em;
|
|
99
|
+
text-transform: uppercase;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* A stamp across the document: Voided, Cancelled, Copy. */
|
|
103
|
+
.nx-print__stamp {
|
|
104
|
+
margin-block: var(--nx-space-2);
|
|
105
|
+
padding: var(--nx-space-1);
|
|
106
|
+
border: 1px solid currentColor;
|
|
107
|
+
font-weight: 700;
|
|
108
|
+
text-align: center;
|
|
109
|
+
text-transform: uppercase;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Facts: a label and its value on each line, the labels in one column. */
|
|
113
|
+
.nx-print__facts {
|
|
114
|
+
display: grid;
|
|
115
|
+
gap: 2px;
|
|
116
|
+
margin: var(--nx-space-2) 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.nx-print__facts > div {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: minmax(6.5em, 35%) 1fr;
|
|
122
|
+
gap: var(--nx-space-2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.nx-print__facts dt {
|
|
126
|
+
color: var(--nx-text-muted);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.nx-print__facts dd {
|
|
130
|
+
margin: 0;
|
|
131
|
+
overflow-wrap: anywhere;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Lines: what was charged, the figures lined up at the end, the totals under a rule. */
|
|
135
|
+
.nx-print__lines {
|
|
136
|
+
width: 100%;
|
|
137
|
+
margin-block: var(--nx-space-2);
|
|
138
|
+
border-collapse: collapse;
|
|
139
|
+
font-variant-numeric: tabular-nums;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nx-print__lines th,
|
|
143
|
+
.nx-print__lines td {
|
|
144
|
+
padding: 3px 0;
|
|
145
|
+
text-align: start;
|
|
146
|
+
vertical-align: top;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.nx-print__lines :is(th, td) + :is(th, td) {
|
|
150
|
+
padding-inline-start: var(--nx-space-2);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.nx-print__lines .nx-print__end {
|
|
154
|
+
text-align: end;
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.nx-print__lines thead th {
|
|
159
|
+
border-block-end: 1px solid var(--nx-border);
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.nx-print__lines tfoot :is(th, td) {
|
|
164
|
+
border-block-start: 1px solid var(--nx-border);
|
|
165
|
+
font-size: 1.1em;
|
|
166
|
+
font-weight: 700;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.nx-print__lines tfoot tr + tr :is(th, td) {
|
|
170
|
+
border-block-start: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.nx-print__note {
|
|
174
|
+
display: block;
|
|
175
|
+
color: var(--nx-text-muted);
|
|
176
|
+
font-size: 0.9em;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.nx-print__foot {
|
|
180
|
+
padding-block-start: var(--nx-space-2);
|
|
181
|
+
border-block-start: 1px dashed var(--nx-border);
|
|
182
|
+
text-align: center;
|
|
183
|
+
white-space: pre-line;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/*
|
|
187
|
+
* Printed: only the document, lifted out of the page around it, black on white. Only while a document is on the
|
|
188
|
+
* page (`:has`), so printing any other page prints that page as it is.
|
|
189
|
+
*/
|
|
190
|
+
@media print {
|
|
191
|
+
body:has(.nx-print) * {
|
|
192
|
+
visibility: hidden;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
body:has(.nx-print) .nx-print,
|
|
196
|
+
body:has(.nx-print) .nx-print * {
|
|
197
|
+
visibility: visible;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
body:has(.nx-print) .nx-print {
|
|
201
|
+
position: absolute;
|
|
202
|
+
inset: 0 auto auto 0;
|
|
203
|
+
width: 100%;
|
|
204
|
+
max-width: none;
|
|
205
|
+
color: #000;
|
|
206
|
+
background: #fff;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
body:has(.nx-print) .nx-print--thermal {
|
|
210
|
+
width: 72mm;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.nx-print__facts dt,
|
|
214
|
+
.nx-print__note {
|
|
215
|
+
color: #000;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* A logo prints in black and white, as the rest does: a thermal roll has no other colour. */
|
|
219
|
+
.nx-print__logo {
|
|
220
|
+
filter: grayscale(1);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.nx-print__head,
|
|
224
|
+
.nx-print__foot,
|
|
225
|
+
.nx-print__lines thead th,
|
|
226
|
+
.nx-print__lines tfoot :is(th, td) {
|
|
227
|
+
border-color: #000;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/*
|
|
232
|
+
* A server's page in a frame: a form's bar (its status line and the page's buttons) over the page, which fills the
|
|
233
|
+
* height the container gives and never less than 22rem, so a frame stacked under an editor is never a sliver. The
|
|
234
|
+
* frame scrolls inside itself; a sheet wider than the box scrolls sideways there, never the page.
|
|
235
|
+
*/
|
|
236
|
+
.nx-document-frame {
|
|
237
|
+
display: flex;
|
|
238
|
+
flex: 1 1 auto;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
gap: var(--nx-space-2);
|
|
241
|
+
min-width: 0;
|
|
242
|
+
min-height: 22rem;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Its line says a few words ("Loading the preview…"), so two buttons stay beside it in a half-width frame. */
|
|
246
|
+
.nx-document-frame__bar {
|
|
247
|
+
--nx-form-status-basis: 10rem;
|
|
248
|
+
|
|
249
|
+
flex: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Lower than the panel, as a read-only box: the page's own desk covers it once a page is there. */
|
|
253
|
+
.nx-document-frame__view {
|
|
254
|
+
position: relative;
|
|
255
|
+
display: grid;
|
|
256
|
+
flex: 1 1 auto;
|
|
257
|
+
place-items: center;
|
|
258
|
+
min-height: 0;
|
|
259
|
+
overflow: hidden;
|
|
260
|
+
border: 1px solid var(--nx-border);
|
|
261
|
+
border-radius: var(--nx-radius);
|
|
262
|
+
background: light-dark(var(--nx-surface-2), var(--nx-bg));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.nx-document-frame__page {
|
|
266
|
+
position: absolute;
|
|
267
|
+
inset: 0;
|
|
268
|
+
display: block;
|
|
269
|
+
width: 100%;
|
|
270
|
+
height: 100%;
|
|
271
|
+
border: 0;
|
|
272
|
+
transition: opacity var(--nx-duration);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* A read that lasts: the page shown stays, dimmed, under the bar's "Loading…". */
|
|
276
|
+
.nx-document-frame__view--busy .nx-document-frame__page {
|
|
277
|
+
opacity: 0.5;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[data-nx-motion="reduce"] .nx-document-frame__page {
|
|
281
|
+
transition: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.nx-document-frame__empty {
|
|
285
|
+
max-width: 32rem;
|
|
286
|
+
padding: var(--nx-space-4);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* A QR code (`QrCodeImage`): the white square of its quiet zone with a control's rounded corners, 9rem wide unless the
|
|
4
|
+
* page's own class says otherwise. Its colours are the SVG's own fills, black on white in every theme, as a camera
|
|
5
|
+
* reads it; forced colours leave SVG fills alone (Chromium, measured by the template's qr-code.cjs).
|
|
6
|
+
*/
|
|
7
|
+
.nx-qr {
|
|
8
|
+
display: block;
|
|
9
|
+
width: 9rem;
|
|
10
|
+
border-radius: var(--nx-radius);
|
|
11
|
+
}
|
|
12
|
+
}
|