nexus-shared 3.1.0 → 3.2.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 +704 -446
- package/LICENSE +21 -21
- package/README.md +44 -5
- package/dist/Client.Index.d.ts +3 -0
- package/dist/Client.Index.js +3 -0
- package/dist/Components/Forms/Crud.js +322 -161
- package/dist/Components/Forms/CrudHistory.d.ts +66 -0
- package/dist/Components/Forms/CrudHistory.js +140 -0
- package/dist/Components/Forms/CrudParts.js +2 -1
- package/dist/Components/Forms/Form.js +4 -1
- package/dist/Components/Inputs/CodeBox.d.ts +69 -0
- package/dist/Components/Inputs/CodeBox.js +316 -0
- package/dist/Components/Inputs/DatePicker.js +4 -1
- package/dist/Components/Inputs/DateRangePicker.js +4 -1
- package/dist/Components/Inputs/DateTimePicker.js +4 -1
- package/dist/Components/Inputs/Dropdown.js +4 -1
- package/dist/Components/Inputs/InputRenderer.js +3 -0
- package/dist/Components/Inputs/NumberBox.js +4 -2
- package/dist/Components/Inputs/TextArea.js +4 -1
- package/dist/Components/Inputs/TextBox.js +4 -1
- package/dist/Components/Inputs/TimePicker.js +4 -1
- package/dist/Components/Inputs/TreeView.d.ts +55 -5
- package/dist/Components/Inputs/TreeView.js +372 -23
- package/dist/Components/Layouts/ThemePicker.d.ts +3 -2
- package/dist/Components/Layouts/ThemePicker.js +16 -4
- package/dist/Components/Viewers/DataTable.js +63 -21
- package/dist/Components/Viewers/DataTableParts.d.ts +26 -8
- package/dist/Components/Viewers/DataTableParts.js +39 -10
- package/dist/Helpers/ApiModules.d.ts +3 -34
- package/dist/Helpers/ApiModules.js +3 -3
- package/dist/Helpers/ApiRoutes.d.ts +68 -26
- package/dist/Helpers/ApiRoutes.js +31 -27
- package/dist/Helpers/ArrayHelpers.d.ts +0 -0
- package/dist/Helpers/ArrayHelpers.js +2 -0
- package/dist/Helpers/CodeHelpers.d.ts +97 -0
- package/dist/Helpers/CodeHelpers.js +332 -0
- package/dist/Helpers/CrudBackend.d.ts +94 -4
- package/dist/Helpers/CrudBackend.js +168 -9
- package/dist/Helpers/CrudColumns.d.ts +51 -0
- package/dist/Helpers/CrudColumns.js +69 -0
- package/dist/Helpers/CrudHelpers.d.ts +50 -5
- package/dist/Helpers/CrudHelpers.js +109 -12
- package/dist/Helpers/InputParamsHelpers.js +8 -0
- package/dist/Helpers/MessageBuilder.js +2 -0
- package/dist/Helpers/NexusHelpers.d.ts +0 -0
- package/dist/Helpers/NexusHelpers.js +1 -0
- package/dist/Helpers/RequestCache.d.ts +35 -0
- package/dist/Helpers/RequestCache.js +113 -0
- package/dist/Helpers/TableExport.js +12 -12
- package/dist/Helpers/TableHelpers.d.ts +1 -1
- package/dist/Helpers/TableHelpers.js +7 -2
- package/dist/Helpers/TableJoins.d.ts +70 -0
- package/dist/Helpers/TableJoins.js +250 -0
- package/dist/Helpers/TableStore.d.ts +5 -0
- package/dist/Helpers/TableStore.js +9 -0
- package/dist/Helpers/TreeStore.d.ts +225 -11
- package/dist/Helpers/TreeStore.js +683 -90
- package/dist/Helpers/UserPreferences.d.ts +8 -0
- package/dist/Helpers/UserPreferences.js +17 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +47 -9
- package/dist/Interfaces/FormInterfaces.d.ts +4 -1
- package/dist/Interfaces/InputInterfaces.d.ts +24 -0
- package/dist/Interfaces/MessageInterfaces.d.ts +1 -1
- package/dist/Interfaces/PreferenceInterfaces.d.ts +8 -0
- package/dist/Interfaces/PreferenceInterfaces.js +2 -5
- package/dist/Interfaces/TableInterfaces.d.ts +86 -4
- package/dist/Services/ApiProxy.d.ts +36 -1
- package/dist/Services/ApiProxy.js +182 -52
- package/dist/Services/ApiProxyRules.d.ts +203 -0
- package/dist/Services/ApiProxyRules.js +426 -0
- package/dist/Services/JoinSources.d.ts +48 -0
- package/dist/Services/JoinSources.js +74 -0
- package/dist/Services/ServerApi.d.ts +13 -2
- package/dist/Services/ServerApi.js +8 -3
- package/dist/Shared.Index.d.ts +4 -0
- package/dist/Shared.Index.js +4 -0
- package/package.json +87 -85
- package/src/Styles/Nexus.Avatar.css +79 -79
- package/src/Styles/Nexus.Base.css +117 -117
- package/src/Styles/Nexus.Button.css +180 -180
- package/src/Styles/Nexus.Calendar.css +273 -273
- package/src/Styles/Nexus.Chat.css +1443 -1443
- package/src/Styles/Nexus.Choice.css +343 -343
- package/src/Styles/Nexus.Crud.css +168 -168
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +725 -725
- package/src/Styles/Nexus.Editor.css +295 -295
- package/src/Styles/Nexus.Excel.css +389 -389
- package/src/Styles/Nexus.Form.css +279 -279
- package/src/Styles/Nexus.Index.css +37 -37
- package/src/Styles/Nexus.Input.css +196 -4
- package/src/Styles/Nexus.Markdown.css +237 -237
- package/src/Styles/Nexus.Menu.css +237 -237
- package/src/Styles/Nexus.Popup.css +724 -724
- package/src/Styles/Nexus.Rows.css +637 -637
- package/src/Styles/Nexus.Slider.css +276 -276
- package/src/Styles/Nexus.Tab.Buttons.css +432 -432
- package/src/Styles/Nexus.Table.css +31 -30
- package/src/Styles/Nexus.Theme.Picker.css +59 -3
- package/src/Styles/Nexus.Themes.css +194 -194
- package/src/Styles/Nexus.Time.css +144 -144
- package/src/Styles/Nexus.Toast.css +263 -263
- package/src/Styles/Nexus.Tokens.css +89 -89
- package/src/Styles/Nexus.Tree.css +500 -431
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* CRUD: the table comes from Nexus.Table.css. Here: the details popup and the message for a user who may not see any
|
|
4
|
-
* list.
|
|
5
|
-
*/
|
|
6
|
-
.nx-crud {
|
|
7
|
-
min-width: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* A CRUD whose table fills takes the height it is given and hands all of it to the table. */
|
|
11
|
-
.nx-crud:has(.nx-table--fill) {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
height: 100%;
|
|
15
|
-
min-height: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.nx-crud:has(.nx-table--fill) > .nx-table--fill {
|
|
19
|
-
flex: 1 1 auto;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* Details: label over value, two to a line where there is room. */
|
|
23
|
-
.nx-crud-details {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
gap: var(--nx-space-3);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nx-crud-details__list {
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
|
|
32
|
-
gap: var(--nx-space-4) var(--nx-space-5);
|
|
33
|
-
margin: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.nx-crud-details__item {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 2px;
|
|
40
|
-
min-width: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.nx-crud-details__item--wide {
|
|
44
|
-
grid-column: 1 / -1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.nx-crud-details__label {
|
|
48
|
-
color: var(--nx-text-muted);
|
|
49
|
-
font-size: var(--nx-text-sm);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.nx-crud-details__value {
|
|
53
|
-
/* A value still to come keeps its line, so the full record lands without moving anything. */
|
|
54
|
-
min-height: 1lh;
|
|
55
|
-
margin: 0;
|
|
56
|
-
overflow-wrap: anywhere;
|
|
57
|
-
font-size: var(--nx-text-md);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* A field only the full record has, when that record could not be loaded. */
|
|
61
|
-
.nx-crud-details__missing {
|
|
62
|
-
color: var(--nx-text-muted);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/*
|
|
66
|
-
* The details popup's footer is a form's bar (Nexus.Form.css): its status line on the left - "Loading…" for a slow
|
|
67
|
-
* record, "Not all fields loaded." for one that failed - and Edit and Close on the right. The line takes only the room
|
|
68
|
-
* the buttons leave, not a form's 14rem, so the bar stays one row on a phone and what it says never moves anything.
|
|
69
|
-
*/
|
|
70
|
-
.nx-crud-details__foot > .nx-form-status {
|
|
71
|
-
flex-basis: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* No list the user may see. */
|
|
75
|
-
.nx-crud--denied {
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 4px;
|
|
80
|
-
padding: 48px var(--nx-space-4);
|
|
81
|
-
border: 1px dashed var(--nx-border-strong);
|
|
82
|
-
border-radius: var(--nx-radius-lg);
|
|
83
|
-
text-align: center;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.nx-crud__denied-icon {
|
|
87
|
-
width: 28px;
|
|
88
|
-
height: 28px;
|
|
89
|
-
margin-bottom: 6px;
|
|
90
|
-
color: var(--nx-text-muted);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.nx-crud__denied-title {
|
|
94
|
-
margin: 0;
|
|
95
|
-
font-weight: 600;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.nx-crud__denied-detail {
|
|
99
|
-
margin: 0;
|
|
100
|
-
color: var(--nx-text-muted);
|
|
101
|
-
font-size: var(--nx-text-sm);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/*
|
|
105
|
-
* A form popup with a panel beside it (`form.aside`): a preview of what will be written, a summary, help. The form
|
|
106
|
-
* is first in the DOM, so a narrow window stacks the panel under it and the keyboard still reaches the form first.
|
|
107
|
-
*/
|
|
108
|
-
.nx-crud-aside {
|
|
109
|
-
display: grid;
|
|
110
|
-
grid-template-columns: minmax(0, 1fr);
|
|
111
|
-
gap: var(--nx-space-5);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.nx-crud-aside__main,
|
|
115
|
-
.nx-crud-aside__side {
|
|
116
|
-
min-width: 0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Stacked, the panel does not take the whole window: the popup's body scrolls past it back to the form above. */
|
|
120
|
-
.nx-crud-aside__side {
|
|
121
|
-
display: flex;
|
|
122
|
-
min-height: 0;
|
|
123
|
-
max-height: 70vh;
|
|
124
|
-
flex-direction: column;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/*
|
|
128
|
-
* Side by side, where there is room for both. The popup's body stops scrolling and each column takes its own, so a
|
|
129
|
-
* long form never pushes the panel off the screen. The body is a flex row here, which is what gives its one child a
|
|
130
|
-
* height to work from: no percentage height anywhere, so it holds at every popup size.
|
|
131
|
-
*/
|
|
132
|
-
@media (min-width: 1000px) {
|
|
133
|
-
.nx-popup__body:has(> .nx-crud-aside) {
|
|
134
|
-
display: flex;
|
|
135
|
-
overflow: hidden;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.nx-crud-aside {
|
|
139
|
-
flex: 1 1 auto;
|
|
140
|
-
min-width: 0;
|
|
141
|
-
/* The panel takes a share of the width, not half of it: a form has columns to fit, and code lines are short. */
|
|
142
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, var(--nx-crud-aside-width, clamp(20rem, 38%, 44rem)));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/*
|
|
146
|
-
* A details popup's panel (`details.aside`) is what the popup is for, and the details beside it are a short list
|
|
147
|
-
* of fields, so the shares turn round: the fields take a column of their own width and the panel the rest.
|
|
148
|
-
*/
|
|
149
|
-
.nx-crud-aside.nx-crud-aside--details {
|
|
150
|
-
grid-template-columns: minmax(0, var(--nx-crud-details-width, clamp(16rem, 30%, 26rem))) minmax(0, 1fr);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.nx-crud-aside__main {
|
|
154
|
-
overflow: auto;
|
|
155
|
-
overscroll-behavior: contain;
|
|
156
|
-
/* Focus rings reach past an input's edge; without this the scroll box cuts them off. */
|
|
157
|
-
padding: 2px;
|
|
158
|
-
margin: -2px;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* A panel taller than the popup scrolls here, whatever it holds; one that fills the height scrolls inside itself. */
|
|
162
|
-
.nx-crud-aside__side {
|
|
163
|
-
max-height: none;
|
|
164
|
-
overflow: auto;
|
|
165
|
-
overscroll-behavior: contain;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* CRUD: the table comes from Nexus.Table.css. Here: the details popup and the message for a user who may not see any
|
|
4
|
+
* list.
|
|
5
|
+
*/
|
|
6
|
+
.nx-crud {
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* A CRUD whose table fills takes the height it is given and hands all of it to the table. */
|
|
11
|
+
.nx-crud:has(.nx-table--fill) {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
height: 100%;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.nx-crud:has(.nx-table--fill) > .nx-table--fill {
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Details: label over value, two to a line where there is room. */
|
|
23
|
+
.nx-crud-details {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: var(--nx-space-3);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nx-crud-details__list {
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
|
|
32
|
+
gap: var(--nx-space-4) var(--nx-space-5);
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.nx-crud-details__item {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 2px;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.nx-crud-details__item--wide {
|
|
44
|
+
grid-column: 1 / -1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.nx-crud-details__label {
|
|
48
|
+
color: var(--nx-text-muted);
|
|
49
|
+
font-size: var(--nx-text-sm);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nx-crud-details__value {
|
|
53
|
+
/* A value still to come keeps its line, so the full record lands without moving anything. */
|
|
54
|
+
min-height: 1lh;
|
|
55
|
+
margin: 0;
|
|
56
|
+
overflow-wrap: anywhere;
|
|
57
|
+
font-size: var(--nx-text-md);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* A field only the full record has, when that record could not be loaded. */
|
|
61
|
+
.nx-crud-details__missing {
|
|
62
|
+
color: var(--nx-text-muted);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* The details popup's footer is a form's bar (Nexus.Form.css): its status line on the left - "Loading…" for a slow
|
|
67
|
+
* record, "Not all fields loaded." for one that failed - and Edit and Close on the right. The line takes only the room
|
|
68
|
+
* the buttons leave, not a form's 14rem, so the bar stays one row on a phone and what it says never moves anything.
|
|
69
|
+
*/
|
|
70
|
+
.nx-crud-details__foot > .nx-form-status {
|
|
71
|
+
flex-basis: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* No list the user may see. */
|
|
75
|
+
.nx-crud--denied {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 4px;
|
|
80
|
+
padding: 48px var(--nx-space-4);
|
|
81
|
+
border: 1px dashed var(--nx-border-strong);
|
|
82
|
+
border-radius: var(--nx-radius-lg);
|
|
83
|
+
text-align: center;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nx-crud__denied-icon {
|
|
87
|
+
width: 28px;
|
|
88
|
+
height: 28px;
|
|
89
|
+
margin-bottom: 6px;
|
|
90
|
+
color: var(--nx-text-muted);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.nx-crud__denied-title {
|
|
94
|
+
margin: 0;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.nx-crud__denied-detail {
|
|
99
|
+
margin: 0;
|
|
100
|
+
color: var(--nx-text-muted);
|
|
101
|
+
font-size: var(--nx-text-sm);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/*
|
|
105
|
+
* A form popup with a panel beside it (`form.aside`): a preview of what will be written, a summary, help. The form
|
|
106
|
+
* is first in the DOM, so a narrow window stacks the panel under it and the keyboard still reaches the form first.
|
|
107
|
+
*/
|
|
108
|
+
.nx-crud-aside {
|
|
109
|
+
display: grid;
|
|
110
|
+
grid-template-columns: minmax(0, 1fr);
|
|
111
|
+
gap: var(--nx-space-5);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.nx-crud-aside__main,
|
|
115
|
+
.nx-crud-aside__side {
|
|
116
|
+
min-width: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Stacked, the panel does not take the whole window: the popup's body scrolls past it back to the form above. */
|
|
120
|
+
.nx-crud-aside__side {
|
|
121
|
+
display: flex;
|
|
122
|
+
min-height: 0;
|
|
123
|
+
max-height: 70vh;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/*
|
|
128
|
+
* Side by side, where there is room for both. The popup's body stops scrolling and each column takes its own, so a
|
|
129
|
+
* long form never pushes the panel off the screen. The body is a flex row here, which is what gives its one child a
|
|
130
|
+
* height to work from: no percentage height anywhere, so it holds at every popup size.
|
|
131
|
+
*/
|
|
132
|
+
@media (min-width: 1000px) {
|
|
133
|
+
.nx-popup__body:has(> .nx-crud-aside) {
|
|
134
|
+
display: flex;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.nx-crud-aside {
|
|
139
|
+
flex: 1 1 auto;
|
|
140
|
+
min-width: 0;
|
|
141
|
+
/* The panel takes a share of the width, not half of it: a form has columns to fit, and code lines are short. */
|
|
142
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, var(--nx-crud-aside-width, clamp(20rem, 38%, 44rem)));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/*
|
|
146
|
+
* A details popup's panel (`details.aside`) is what the popup is for, and the details beside it are a short list
|
|
147
|
+
* of fields, so the shares turn round: the fields take a column of their own width and the panel the rest.
|
|
148
|
+
*/
|
|
149
|
+
.nx-crud-aside.nx-crud-aside--details {
|
|
150
|
+
grid-template-columns: minmax(0, var(--nx-crud-details-width, clamp(16rem, 30%, 26rem))) minmax(0, 1fr);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.nx-crud-aside__main {
|
|
154
|
+
overflow: auto;
|
|
155
|
+
overscroll-behavior: contain;
|
|
156
|
+
/* Focus rings reach past an input's edge; without this the scroll box cuts them off. */
|
|
157
|
+
padding: 2px;
|
|
158
|
+
margin: -2px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* A panel taller than the popup scrolls here, whatever it holds; one that fills the height scrolls inside itself. */
|
|
162
|
+
.nx-crud-aside__side {
|
|
163
|
+
max-height: none;
|
|
164
|
+
overflow: auto;
|
|
165
|
+
overscroll-behavior: contain;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* Date and time picker: one popover with the calendar and the time side by side, and a footer with Now, the time
|
|
4
|
-
* zone the times are in, and Done. The time columns are as tall as the calendar, so both halves end on one line.
|
|
5
|
-
* On a narrow screen the time goes under the calendar.
|
|
6
|
-
*/
|
|
7
|
-
.nx-field__control--datetime {
|
|
8
|
-
font-variant-numeric: tabular-nums;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.nx-field__action--datetime[aria-expanded="true"] {
|
|
12
|
-
color: var(--nx-field-accent);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Two classes: the shared panel (.nx-popover) and the time's own rules load after this file. */
|
|
16
|
-
.nx-popover.nx-datetime-popover {
|
|
17
|
-
position: fixed;
|
|
18
|
-
inset: auto;
|
|
19
|
-
padding: 0;
|
|
20
|
-
/* The component caps the height when the window has no room for the whole panel. */
|
|
21
|
-
overflow-y: auto;
|
|
22
|
-
overscroll-behavior: contain;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.nx-datetime {
|
|
26
|
-
display: grid;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nx-datetime__body {
|
|
30
|
-
display: flex;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Columns as tall as the small calendar: (282px - 8px of padding) / 32px items. */
|
|
34
|
-
.nx-time.nx-datetime__time {
|
|
35
|
-
--nx-time-rows: 8.5625;
|
|
36
|
-
|
|
37
|
-
align-content: start;
|
|
38
|
-
border-left: 1px solid var(--nx-border);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* A list of slots fills the height beside the calendar. */
|
|
42
|
-
.nx-datetime__time .nx-time__list {
|
|
43
|
-
max-height: calc(var(--nx-time-item) * var(--nx-time-rows) + var(--nx-space-2));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.nx-datetime__foot {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: var(--nx-space-2);
|
|
50
|
-
padding: 6px var(--nx-space-2);
|
|
51
|
-
border-top: 1px solid var(--nx-border);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.nx-datetime__zone {
|
|
55
|
-
flex: 1 1 auto;
|
|
56
|
-
min-width: 0;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
color: var(--nx-text-muted);
|
|
59
|
-
font-size: var(--nx-text-xs);
|
|
60
|
-
text-align: center;
|
|
61
|
-
text-overflow: ellipsis;
|
|
62
|
-
white-space: nowrap;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@media (max-width: 479.98px) {
|
|
66
|
-
.nx-datetime__body {
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.nx-time.nx-datetime__time {
|
|
71
|
-
--nx-time-rows: 5;
|
|
72
|
-
|
|
73
|
-
border-top: 1px solid var(--nx-border);
|
|
74
|
-
border-left: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.nx-datetime__time .nx-time__columns {
|
|
78
|
-
justify-content: center;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* Date and time picker: one popover with the calendar and the time side by side, and a footer with Now, the time
|
|
4
|
+
* zone the times are in, and Done. The time columns are as tall as the calendar, so both halves end on one line.
|
|
5
|
+
* On a narrow screen the time goes under the calendar.
|
|
6
|
+
*/
|
|
7
|
+
.nx-field__control--datetime {
|
|
8
|
+
font-variant-numeric: tabular-nums;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nx-field__action--datetime[aria-expanded="true"] {
|
|
12
|
+
color: var(--nx-field-accent);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Two classes: the shared panel (.nx-popover) and the time's own rules load after this file. */
|
|
16
|
+
.nx-popover.nx-datetime-popover {
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset: auto;
|
|
19
|
+
padding: 0;
|
|
20
|
+
/* The component caps the height when the window has no room for the whole panel. */
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
overscroll-behavior: contain;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.nx-datetime {
|
|
26
|
+
display: grid;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nx-datetime__body {
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Columns as tall as the small calendar: (282px - 8px of padding) / 32px items. */
|
|
34
|
+
.nx-time.nx-datetime__time {
|
|
35
|
+
--nx-time-rows: 8.5625;
|
|
36
|
+
|
|
37
|
+
align-content: start;
|
|
38
|
+
border-left: 1px solid var(--nx-border);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* A list of slots fills the height beside the calendar. */
|
|
42
|
+
.nx-datetime__time .nx-time__list {
|
|
43
|
+
max-height: calc(var(--nx-time-item) * var(--nx-time-rows) + var(--nx-space-2));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.nx-datetime__foot {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--nx-space-2);
|
|
50
|
+
padding: 6px var(--nx-space-2);
|
|
51
|
+
border-top: 1px solid var(--nx-border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.nx-datetime__zone {
|
|
55
|
+
flex: 1 1 auto;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
color: var(--nx-text-muted);
|
|
59
|
+
font-size: var(--nx-text-xs);
|
|
60
|
+
text-align: center;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (max-width: 479.98px) {
|
|
66
|
+
.nx-datetime__body {
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.nx-time.nx-datetime__time {
|
|
71
|
+
--nx-time-rows: 5;
|
|
72
|
+
|
|
73
|
+
border-top: 1px solid var(--nx-border);
|
|
74
|
+
border-left: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.nx-datetime__time .nx-time__columns {
|
|
78
|
+
justify-content: center;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|