nexus-shared 3.0.0 → 3.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 +446 -262
- package/LICENSE +21 -21
- package/README.md +1084 -1000
- package/dist/Client.Index.d.ts +3 -0
- package/dist/Client.Index.js +3 -0
- package/dist/Components/Chats/ChatParts.d.ts +2 -2
- package/dist/Components/Chats/ChatParts.js +3 -7
- package/dist/Components/Chats/ChatThread.js +3 -3
- package/dist/Components/Documents/Button.d.ts +6 -1
- package/dist/Components/Documents/Button.js +2 -2
- package/dist/Components/Documents/Menu.js +21 -9
- package/dist/Components/Documents/SplitButton.d.ts +3 -1
- package/dist/Components/Documents/SplitButton.js +7 -5
- package/dist/Components/Documents/TabButtons.d.ts +5 -2
- package/dist/Components/Documents/TabButtons.js +2 -2
- package/dist/Components/Forms/ApiForm.d.ts +1 -1
- package/dist/Components/Forms/ApiForm.js +1 -1
- package/dist/Components/Forms/Crud.js +177 -58
- package/dist/Components/Forms/CrudParts.d.ts +5 -1
- package/dist/Components/Forms/CrudParts.js +37 -5
- package/dist/Components/Forms/ExcelImport.d.ts +23 -7
- package/dist/Components/Forms/ExcelImport.js +189 -60
- package/dist/Components/Forms/Form.js +5 -13
- package/dist/Components/Forms/SubmitForm.d.ts +11 -2
- package/dist/Components/Forms/SubmitForm.js +23 -12
- package/dist/Components/Inputs/DropdownParts.d.ts +1 -1
- package/dist/Components/Inputs/DropdownParts.js +4 -6
- package/dist/Components/Inputs/NumberBox.js +24 -2
- package/dist/Components/Inputs/RowsInput.js +2 -2
- package/dist/Components/Inputs/Slider.js +4 -1
- package/dist/Components/Inputs/TabularForm.js +42 -10
- package/dist/Components/Inputs/TimePanel.js +4 -3
- package/dist/Components/Layouts/Popup.js +1 -4
- package/dist/Components/Layouts/ThemePicker.d.ts +20 -3
- package/dist/Components/Layouts/ThemePicker.js +77 -6
- package/dist/Components/Layouts/ThemeScript.d.ts +4 -2
- package/dist/Components/Layouts/ThemeScript.js +4 -2
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +6 -3
- package/dist/Components/Layouts/ThemeSwitcher.js +9 -8
- package/dist/Components/Viewers/Avatar.d.ts +21 -0
- package/dist/Components/Viewers/Avatar.js +21 -0
- package/dist/Components/Viewers/DataTable.js +192 -44
- package/dist/Components/Viewers/DataTableColumns.d.ts +7 -3
- package/dist/Components/Viewers/DataTableColumns.js +25 -68
- package/dist/Components/Viewers/DataTableFilters.d.ts +21 -0
- package/dist/Components/Viewers/DataTableFilters.js +68 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +2 -2
- package/dist/Components/Viewers/DataTableParts.js +3 -3
- package/dist/Helpers/AnimationHelpers.d.ts +11 -0
- package/dist/Helpers/AnimationHelpers.js +20 -2
- package/dist/Helpers/CrudBackend.d.ts +7 -4
- package/dist/Helpers/CrudBackend.js +4 -2
- package/dist/Helpers/ExcelBackend.d.ts +3 -3
- package/dist/Helpers/ExcelBackend.js +8 -2
- package/dist/Helpers/ExcelHelpers.d.ts +36 -8
- package/dist/Helpers/ExcelHelpers.js +55 -13
- package/dist/Helpers/FormStore.d.ts +9 -5
- package/dist/Helpers/FormStore.js +25 -5
- package/dist/Helpers/MessageBuilder.js +1 -0
- package/dist/Helpers/NumberHelpers.d.ts +7 -1
- package/dist/Helpers/NumberHelpers.js +41 -3
- package/dist/Helpers/PopoverHelpers.d.ts +17 -5
- package/dist/Helpers/PopoverHelpers.js +52 -17
- package/dist/Helpers/PopoverHooks.d.ts +24 -0
- package/dist/Helpers/PopoverHooks.js +62 -0
- package/dist/Helpers/RowsStore.d.ts +7 -2
- package/dist/Helpers/RowsStore.js +15 -3
- package/dist/Helpers/TableExport.js +12 -12
- package/dist/Helpers/TableFilters.d.ts +25 -0
- package/dist/Helpers/TableFilters.js +162 -0
- package/dist/Helpers/TableHelpers.d.ts +6 -3
- package/dist/Helpers/TableHelpers.js +8 -4
- package/dist/Helpers/TableStore.d.ts +11 -3
- package/dist/Helpers/TableStore.js +16 -5
- package/dist/Helpers/ThemeHelpers.d.ts +21 -4
- package/dist/Helpers/ThemeHelpers.js +46 -9
- package/dist/Helpers/UserPreferences.d.ts +14 -0
- package/dist/Helpers/UserPreferences.js +99 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +20 -1
- package/dist/Interfaces/ExcelInterfaces.d.ts +12 -0
- package/dist/Interfaces/FormInterfaces.d.ts +33 -5
- package/dist/Interfaces/PreferenceInterfaces.d.ts +43 -0
- package/dist/Interfaces/PreferenceInterfaces.js +28 -0
- package/dist/Interfaces/TableInterfaces.d.ts +59 -12
- package/dist/Interfaces/ThemeInterfaces.d.ts +25 -0
- package/dist/Interfaces/ThemeInterfaces.js +15 -0
- package/dist/Services/ExcelApi.d.ts +3 -1
- package/dist/Services/ExcelApi.js +1 -1
- package/dist/Services/ThemeService.d.ts +18 -2
- package/dist/Services/ThemeService.js +80 -16
- package/dist/Shared.Index.d.ts +2 -0
- package/dist/Shared.Index.js +2 -0
- package/package.json +85 -85
- package/src/Styles/Nexus.Avatar.css +79 -0
- package/src/Styles/Nexus.Base.css +117 -70
- package/src/Styles/Nexus.Button.css +180 -153
- package/src/Styles/Nexus.Calendar.css +273 -275
- package/src/Styles/Nexus.Chat.css +1443 -1489
- package/src/Styles/Nexus.Choice.css +343 -345
- package/src/Styles/Nexus.Crud.css +168 -161
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +725 -774
- package/src/Styles/Nexus.Editor.css +295 -297
- package/src/Styles/Nexus.Excel.css +389 -370
- package/src/Styles/Nexus.Form.css +279 -321
- package/src/Styles/Nexus.Index.css +37 -36
- package/src/Styles/Nexus.Input.css +602 -637
- package/src/Styles/Nexus.Markdown.css +237 -265
- package/src/Styles/Nexus.Menu.css +237 -259
- package/src/Styles/Nexus.Popup.css +724 -731
- package/src/Styles/Nexus.RichText.css +2 -32
- package/src/Styles/Nexus.Rows.css +637 -596
- package/src/Styles/Nexus.Slider.css +276 -278
- package/src/Styles/Nexus.Tab.Buttons.css +432 -419
- package/src/Styles/Nexus.Table.css +1386 -1296
- package/src/Styles/Nexus.Theme.Picker.css +286 -232
- package/src/Styles/Nexus.Themes.css +194 -194
- package/src/Styles/Nexus.Time.css +144 -147
- package/src/Styles/Nexus.Toast.css +263 -265
- package/src/Styles/Nexus.Tokens.css +89 -72
- package/src/Styles/Nexus.Tree.css +431 -435
|
@@ -1,275 +1,273 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* Calendar: a month grid of day buttons under a header of month and year menus. Cells touch along a row, so a
|
|
4
|
-
* range reads as one band; the chosen days are solid primary, today has a primary edge, and holidays are red.
|
|
5
|
-
* Nepali text carries lang="ne", which switches to a font with Devanagari glyphs (Nexus.Base.css).
|
|
6
|
-
*/
|
|
7
|
-
.nx-cal {
|
|
8
|
-
--nx-cal-cell: 36px;
|
|
9
|
-
--nx-cal-font: var(--nx-text-sm);
|
|
10
|
-
|
|
11
|
-
display: inline-grid;
|
|
12
|
-
gap: var(--nx-space-2);
|
|
13
|
-
padding: var(--nx-space-2);
|
|
14
|
-
color: var(--nx-text);
|
|
15
|
-
font-size: var(--nx-cal-font);
|
|
16
|
-
line-height: 1.3;
|
|
17
|
-
user-select: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.nx-cal--sm {
|
|
21
|
-
--nx-cal-cell: 32px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nx-cal--lg {
|
|
25
|
-
--nx-cal-cell: 42px;
|
|
26
|
-
--nx-cal-font: var(--nx-text-md);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nx-cal[data-disabled] {
|
|
30
|
-
opacity: 0.6;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* One or more months side by side; each has its own header, and only the outer ones carry an arrow. */
|
|
34
|
-
.nx-cal__months {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: flex-start;
|
|
37
|
-
gap: var(--nx-space-4);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.nx-cal__month {
|
|
41
|
-
display: grid;
|
|
42
|
-
gap: var(--nx-space-2);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Header: previous, month and year menus, next */
|
|
46
|
-
.nx-cal__head {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: 2px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.nx-cal__nav {
|
|
53
|
-
display: grid;
|
|
54
|
-
place-items: center;
|
|
55
|
-
flex-shrink: 0;
|
|
56
|
-
width: 28px;
|
|
57
|
-
height: 28px;
|
|
58
|
-
padding: 0;
|
|
59
|
-
border: 0;
|
|
60
|
-
border-radius: var(--nx-radius-sm);
|
|
61
|
-
background: none;
|
|
62
|
-
color: var(--nx-text-muted);
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
transition:
|
|
65
|
-
background-color var(--nx-duration),
|
|
66
|
-
color var(--nx-duration);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.nx-cal__nav .nx-icon {
|
|
70
|
-
width: 18px;
|
|
71
|
-
height: 18px;
|
|
72
|
-
vertical-align: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.nx-cal__nav:hover:not(:disabled) {
|
|
76
|
-
background: var(--nx-surface-hover);
|
|
77
|
-
color: var(--nx-text);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.nx-cal__nav:focus-visible {
|
|
81
|
-
outline: 2px solid var(--nx-primary);
|
|
82
|
-
outline-offset: -2px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.nx-cal__nav:disabled {
|
|
86
|
-
opacity: 0.35;
|
|
87
|
-
cursor: default;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* Keeps the menus centered in a month that has no arrow on that side. */
|
|
91
|
-
.nx-cal__nav--space {
|
|
92
|
-
visibility: hidden;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.nx-cal__menus {
|
|
96
|
-
display: flex;
|
|
97
|
-
flex: 1 1 auto;
|
|
98
|
-
justify-content: center;
|
|
99
|
-
gap: 2px;
|
|
100
|
-
min-width: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* A menu drawn as a title: no frame until hovered, its own small chevron. */
|
|
104
|
-
.nx-cal__select {
|
|
105
|
-
appearance: none;
|
|
106
|
-
max-width: 100%;
|
|
107
|
-
height: 28px;
|
|
108
|
-
padding: 0 18px 0 8px;
|
|
109
|
-
border: 0;
|
|
110
|
-
border-radius: var(--nx-radius-sm);
|
|
111
|
-
background:
|
|
112
|
-
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E")
|
|
113
|
-
no-repeat right 4px center / 12px;
|
|
114
|
-
color: var(--nx-text);
|
|
115
|
-
font-size: var(--nx-cal-font);
|
|
116
|
-
font-weight: 600;
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
transition: background-color var(--nx-duration);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.nx-cal__select:hover:not(:disabled) {
|
|
122
|
-
background-color: var(--nx-surface-hover);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.nx-cal__select:focus-visible {
|
|
126
|
-
outline: 2px solid var(--nx-primary);
|
|
127
|
-
outline-offset: -2px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.nx-cal__select:disabled {
|
|
131
|
-
cursor: default;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* The menu's list takes the theme's colors in browsers that style it. */
|
|
135
|
-
.nx-cal__select option {
|
|
136
|
-
background: var(--nx-surface);
|
|
137
|
-
color: var(--nx-text);
|
|
138
|
-
font-weight: 400;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* Grid */
|
|
142
|
-
.nx-cal__grid {
|
|
143
|
-
display: grid;
|
|
144
|
-
gap: 2px 0;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.nx-cal__row {
|
|
148
|
-
display: grid;
|
|
149
|
-
grid-template-columns: repeat(7, var(--nx-cal-cell));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.nx-cal__weekday {
|
|
153
|
-
display: grid;
|
|
154
|
-
place-items: center;
|
|
155
|
-
height: 26px;
|
|
156
|
-
color: var(--nx-text-muted);
|
|
157
|
-
font-size: var(--nx-text-xs);
|
|
158
|
-
font-weight: 600;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.nx-cal__day {
|
|
162
|
-
position: relative;
|
|
163
|
-
display: grid;
|
|
164
|
-
place-items: center;
|
|
165
|
-
width: var(--nx-cal-cell);
|
|
166
|
-
height: var(--nx-cal-cell);
|
|
167
|
-
padding: 0;
|
|
168
|
-
border: 1px solid transparent;
|
|
169
|
-
border-radius: var(--nx-radius);
|
|
170
|
-
background: none;
|
|
171
|
-
color: var(--nx-text);
|
|
172
|
-
font: inherit;
|
|
173
|
-
font-variant-numeric: tabular-nums;
|
|
174
|
-
cursor: pointer;
|
|
175
|
-
transition:
|
|
176
|
-
background-color var(--nx-duration),
|
|
177
|
-
color var(--nx-duration);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.nx-cal__day--empty {
|
|
181
|
-
cursor: default;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.nx-cal__day:hover:not([aria-disabled], [aria-selected="true"]) {
|
|
185
|
-
background: var(--nx-surface-hover);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* A ring that stays visible on a solid primary day. */
|
|
189
|
-
.nx-cal__day:focus-visible {
|
|
190
|
-
outline: none;
|
|
191
|
-
box-shadow:
|
|
192
|
-
0 0 0 2px var(--nx-surface),
|
|
193
|
-
0 0 0 4px var(--nx-primary);
|
|
194
|
-
z-index: 1;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.nx-cal__day[data-outside] {
|
|
198
|
-
color: var(--nx-text-subtle);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.nx-cal__weekday[data-weekend],
|
|
202
|
-
.nx-cal__day[data-weekend]:not([data-outside]) {
|
|
203
|
-
color: var(--nx-danger);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.nx-cal__day[data-today] {
|
|
207
|
-
border-color: var(--nx-primary);
|
|
208
|
-
font-weight: 600;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/* Between the two ends of a range: a soft band across the row. */
|
|
212
|
-
.nx-cal__day[data-in-range] {
|
|
213
|
-
border-radius: 0;
|
|
214
|
-
background: var(--nx-primary-soft);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.nx-cal__day[data-range-start] {
|
|
218
|
-
border-top-right-radius: 0;
|
|
219
|
-
border-bottom-right-radius: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.nx-cal__day[data-range-end] {
|
|
223
|
-
border-top-left-radius: 0;
|
|
224
|
-
border-bottom-left-radius: 0;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.nx-cal__day[aria-selected="true"] {
|
|
228
|
-
border-color: var(--nx-primary-solid);
|
|
229
|
-
background: var(--nx-primary-solid);
|
|
230
|
-
color: var(--nx-primary-text);
|
|
231
|
-
font-weight: 600;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.nx-cal__day[aria-disabled="true"] {
|
|
235
|
-
color: var(--nx-text-subtle);
|
|
236
|
-
opacity: 0.45;
|
|
237
|
-
cursor: default;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.nx-cal__day[aria-disabled="true"][aria-selected="true"] {
|
|
241
|
-
opacity: 0.7;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/* Footer */
|
|
245
|
-
.nx-cal__foot {
|
|
246
|
-
display: flex;
|
|
247
|
-
justify-content: space-between;
|
|
248
|
-
gap: var(--nx-space-2);
|
|
249
|
-
padding-top: var(--nx-space-1);
|
|
250
|
-
border-top: 1px solid var(--nx-border);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* Date picker: the box's text lines digits up, and its calendar opens in a popover placed by the component. */
|
|
254
|
-
.nx-field__control--date {
|
|
255
|
-
font-variant-numeric: tabular-nums;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.nx-date-popover {
|
|
259
|
-
position: fixed;
|
|
260
|
-
inset: auto;
|
|
261
|
-
padding: 0;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.nx-field__action--calendar[aria-expanded="true"] {
|
|
265
|
-
color: var(--nx-field-accent);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* Calendar: a month grid of day buttons under a header of month and year menus. Cells touch along a row, so a
|
|
4
|
+
* range reads as one band; the chosen days are solid primary, today has a primary edge, and holidays are red.
|
|
5
|
+
* Nepali text carries lang="ne", which switches to a font with Devanagari glyphs (Nexus.Base.css).
|
|
6
|
+
*/
|
|
7
|
+
.nx-cal {
|
|
8
|
+
--nx-cal-cell: 36px;
|
|
9
|
+
--nx-cal-font: var(--nx-text-sm);
|
|
10
|
+
|
|
11
|
+
display: inline-grid;
|
|
12
|
+
gap: var(--nx-space-2);
|
|
13
|
+
padding: var(--nx-space-2);
|
|
14
|
+
color: var(--nx-text);
|
|
15
|
+
font-size: var(--nx-cal-font);
|
|
16
|
+
line-height: 1.3;
|
|
17
|
+
user-select: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.nx-cal--sm {
|
|
21
|
+
--nx-cal-cell: 32px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nx-cal--lg {
|
|
25
|
+
--nx-cal-cell: 42px;
|
|
26
|
+
--nx-cal-font: var(--nx-text-md);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nx-cal[data-disabled] {
|
|
30
|
+
opacity: 0.6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* One or more months side by side; each has its own header, and only the outer ones carry an arrow. */
|
|
34
|
+
.nx-cal__months {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
gap: var(--nx-space-4);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nx-cal__month {
|
|
41
|
+
display: grid;
|
|
42
|
+
gap: var(--nx-space-2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Header: previous, month and year menus, next */
|
|
46
|
+
.nx-cal__head {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 2px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nx-cal__nav {
|
|
53
|
+
display: grid;
|
|
54
|
+
place-items: center;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
width: 28px;
|
|
57
|
+
height: 28px;
|
|
58
|
+
padding: 0;
|
|
59
|
+
border: 0;
|
|
60
|
+
border-radius: var(--nx-radius-sm);
|
|
61
|
+
background: none;
|
|
62
|
+
color: var(--nx-text-muted);
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
transition:
|
|
65
|
+
background-color var(--nx-duration),
|
|
66
|
+
color var(--nx-duration);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.nx-cal__nav .nx-icon {
|
|
70
|
+
width: 18px;
|
|
71
|
+
height: 18px;
|
|
72
|
+
vertical-align: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.nx-cal__nav:hover:not(:disabled) {
|
|
76
|
+
background: var(--nx-surface-hover);
|
|
77
|
+
color: var(--nx-text);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.nx-cal__nav:focus-visible {
|
|
81
|
+
outline: 2px solid var(--nx-primary);
|
|
82
|
+
outline-offset: -2px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nx-cal__nav:disabled {
|
|
86
|
+
opacity: 0.35;
|
|
87
|
+
cursor: default;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Keeps the menus centered in a month that has no arrow on that side. */
|
|
91
|
+
.nx-cal__nav--space {
|
|
92
|
+
visibility: hidden;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.nx-cal__menus {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex: 1 1 auto;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
gap: 2px;
|
|
100
|
+
min-width: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* A menu drawn as a title: no frame until hovered, its own small chevron. */
|
|
104
|
+
.nx-cal__select {
|
|
105
|
+
appearance: none;
|
|
106
|
+
max-width: 100%;
|
|
107
|
+
height: 28px;
|
|
108
|
+
padding: 0 18px 0 8px;
|
|
109
|
+
border: 0;
|
|
110
|
+
border-radius: var(--nx-radius-sm);
|
|
111
|
+
background:
|
|
112
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E")
|
|
113
|
+
no-repeat right 4px center / 12px;
|
|
114
|
+
color: var(--nx-text);
|
|
115
|
+
font-size: var(--nx-cal-font);
|
|
116
|
+
font-weight: 600;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
transition: background-color var(--nx-duration);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.nx-cal__select:hover:not(:disabled) {
|
|
122
|
+
background-color: var(--nx-surface-hover);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.nx-cal__select:focus-visible {
|
|
126
|
+
outline: 2px solid var(--nx-primary);
|
|
127
|
+
outline-offset: -2px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.nx-cal__select:disabled {
|
|
131
|
+
cursor: default;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* The menu's list takes the theme's colors in browsers that style it. */
|
|
135
|
+
.nx-cal__select option {
|
|
136
|
+
background: var(--nx-surface);
|
|
137
|
+
color: var(--nx-text);
|
|
138
|
+
font-weight: 400;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Grid */
|
|
142
|
+
.nx-cal__grid {
|
|
143
|
+
display: grid;
|
|
144
|
+
gap: 2px 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.nx-cal__row {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: repeat(7, var(--nx-cal-cell));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.nx-cal__weekday {
|
|
153
|
+
display: grid;
|
|
154
|
+
place-items: center;
|
|
155
|
+
height: 26px;
|
|
156
|
+
color: var(--nx-text-muted);
|
|
157
|
+
font-size: var(--nx-text-xs);
|
|
158
|
+
font-weight: 600;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.nx-cal__day {
|
|
162
|
+
position: relative;
|
|
163
|
+
display: grid;
|
|
164
|
+
place-items: center;
|
|
165
|
+
width: var(--nx-cal-cell);
|
|
166
|
+
height: var(--nx-cal-cell);
|
|
167
|
+
padding: 0;
|
|
168
|
+
border: 1px solid transparent;
|
|
169
|
+
border-radius: var(--nx-radius);
|
|
170
|
+
background: none;
|
|
171
|
+
color: var(--nx-text);
|
|
172
|
+
font: inherit;
|
|
173
|
+
font-variant-numeric: tabular-nums;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
transition:
|
|
176
|
+
background-color var(--nx-duration),
|
|
177
|
+
color var(--nx-duration);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.nx-cal__day--empty {
|
|
181
|
+
cursor: default;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.nx-cal__day:hover:not([aria-disabled], [aria-selected="true"]) {
|
|
185
|
+
background: var(--nx-surface-hover);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* A ring that stays visible on a solid primary day. */
|
|
189
|
+
.nx-cal__day:focus-visible {
|
|
190
|
+
outline: none;
|
|
191
|
+
box-shadow:
|
|
192
|
+
0 0 0 2px var(--nx-surface),
|
|
193
|
+
0 0 0 4px var(--nx-primary);
|
|
194
|
+
z-index: 1;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.nx-cal__day[data-outside] {
|
|
198
|
+
color: var(--nx-text-subtle);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.nx-cal__weekday[data-weekend],
|
|
202
|
+
.nx-cal__day[data-weekend]:not([data-outside]) {
|
|
203
|
+
color: var(--nx-danger);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.nx-cal__day[data-today] {
|
|
207
|
+
border-color: var(--nx-primary);
|
|
208
|
+
font-weight: 600;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Between the two ends of a range: a soft band across the row. */
|
|
212
|
+
.nx-cal__day[data-in-range] {
|
|
213
|
+
border-radius: 0;
|
|
214
|
+
background: var(--nx-primary-soft);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.nx-cal__day[data-range-start] {
|
|
218
|
+
border-top-right-radius: 0;
|
|
219
|
+
border-bottom-right-radius: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.nx-cal__day[data-range-end] {
|
|
223
|
+
border-top-left-radius: 0;
|
|
224
|
+
border-bottom-left-radius: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.nx-cal__day[aria-selected="true"] {
|
|
228
|
+
border-color: var(--nx-primary-solid);
|
|
229
|
+
background: var(--nx-primary-solid);
|
|
230
|
+
color: var(--nx-primary-text);
|
|
231
|
+
font-weight: 600;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.nx-cal__day[aria-disabled="true"] {
|
|
235
|
+
color: var(--nx-text-subtle);
|
|
236
|
+
opacity: 0.45;
|
|
237
|
+
cursor: default;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.nx-cal__day[aria-disabled="true"][aria-selected="true"] {
|
|
241
|
+
opacity: 0.7;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* Footer */
|
|
245
|
+
.nx-cal__foot {
|
|
246
|
+
display: flex;
|
|
247
|
+
justify-content: space-between;
|
|
248
|
+
gap: var(--nx-space-2);
|
|
249
|
+
padding-top: var(--nx-space-1);
|
|
250
|
+
border-top: 1px solid var(--nx-border);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Date picker: the box's text lines digits up, and its calendar opens in a popover placed by the component. */
|
|
254
|
+
.nx-field__control--date {
|
|
255
|
+
font-variant-numeric: tabular-nums;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.nx-date-popover {
|
|
259
|
+
position: fixed;
|
|
260
|
+
inset: auto;
|
|
261
|
+
padding: 0;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.nx-field__action--calendar[aria-expanded="true"] {
|
|
265
|
+
color: var(--nx-field-accent);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
[data-nx-motion="reduce"] .nx-cal__day,
|
|
269
|
+
[data-nx-motion="reduce"] .nx-cal__nav,
|
|
270
|
+
[data-nx-motion="reduce"] .nx-cal__select {
|
|
271
|
+
transition: none;
|
|
272
|
+
}
|
|
273
|
+
}
|