nexus-shared 2.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.
Files changed (176) hide show
  1. package/CHANGELOG.md +446 -0
  2. package/LICENSE +21 -21
  3. package/README.md +1084 -903
  4. package/dist/Client.Index.d.ts +14 -0
  5. package/dist/Client.Index.js +14 -0
  6. package/dist/Components/Chats/Chat.d.ts +28 -0
  7. package/dist/Components/Chats/Chat.js +19 -0
  8. package/dist/Components/Chats/ChatButton.d.ts +26 -0
  9. package/dist/Components/Chats/ChatButton.js +41 -0
  10. package/dist/Components/Chats/ChatComposer.d.ts +41 -0
  11. package/dist/Components/Chats/ChatComposer.js +177 -0
  12. package/dist/Components/Chats/ChatConversations.d.ts +35 -0
  13. package/dist/Components/Chats/ChatConversations.js +38 -0
  14. package/dist/Components/Chats/ChatPanel.d.ts +66 -0
  15. package/dist/Components/Chats/ChatPanel.js +94 -0
  16. package/dist/Components/Chats/ChatParts.d.ts +87 -0
  17. package/dist/Components/Chats/ChatParts.js +96 -0
  18. package/dist/Components/Chats/ChatThread.d.ts +22 -0
  19. package/dist/Components/Chats/ChatThread.js +96 -0
  20. package/dist/Components/Documents/Button.d.ts +6 -1
  21. package/dist/Components/Documents/Button.js +2 -2
  22. package/dist/Components/Documents/Menu.js +44 -28
  23. package/dist/Components/Documents/SplitButton.d.ts +3 -1
  24. package/dist/Components/Documents/SplitButton.js +12 -8
  25. package/dist/Components/Documents/TabButtons.d.ts +29 -8
  26. package/dist/Components/Documents/TabButtons.js +24 -5
  27. package/dist/Components/Forms/ApiForm.d.ts +6 -4
  28. package/dist/Components/Forms/ApiForm.js +15 -14
  29. package/dist/Components/Forms/Crud.js +342 -71
  30. package/dist/Components/Forms/CrudParts.d.ts +5 -1
  31. package/dist/Components/Forms/CrudParts.js +37 -5
  32. package/dist/Components/Forms/ExcelImport.d.ts +58 -0
  33. package/dist/Components/Forms/ExcelImport.js +319 -0
  34. package/dist/Components/Forms/Form.js +9 -13
  35. package/dist/Components/Forms/SubmitForm.d.ts +11 -2
  36. package/dist/Components/Forms/SubmitForm.js +23 -12
  37. package/dist/Components/Inputs/DateTimePicker.js +2 -1
  38. package/dist/Components/Inputs/DropdownParts.d.ts +1 -1
  39. package/dist/Components/Inputs/DropdownParts.js +4 -6
  40. package/dist/Components/Inputs/GroupForm.js +4 -2
  41. package/dist/Components/Inputs/InputRenderer.d.ts +2 -0
  42. package/dist/Components/Inputs/InputRenderer.js +1 -1
  43. package/dist/Components/Inputs/NumberBox.js +24 -2
  44. package/dist/Components/Inputs/ReadOnlyNotice.js +2 -1
  45. package/dist/Components/Inputs/RowsInput.d.ts +12 -1
  46. package/dist/Components/Inputs/RowsInput.js +55 -6
  47. package/dist/Components/Inputs/Slider.js +4 -1
  48. package/dist/Components/Inputs/TabularForm.d.ts +7 -3
  49. package/dist/Components/Inputs/TabularForm.js +117 -20
  50. package/dist/Components/Inputs/TimePanel.js +4 -3
  51. package/dist/Components/Inputs/TimePicker.js +2 -1
  52. package/dist/Components/Layouts/Popup.js +1 -4
  53. package/dist/Components/Layouts/ThemePicker.d.ts +20 -3
  54. package/dist/Components/Layouts/ThemePicker.js +77 -6
  55. package/dist/Components/Layouts/ThemeScript.d.ts +4 -2
  56. package/dist/Components/Layouts/ThemeScript.js +4 -2
  57. package/dist/Components/Layouts/ThemeSwitcher.d.ts +6 -3
  58. package/dist/Components/Layouts/ThemeSwitcher.js +39 -18
  59. package/dist/Components/Viewers/Avatar.d.ts +21 -0
  60. package/dist/Components/Viewers/Avatar.js +21 -0
  61. package/dist/Components/Viewers/DataTable.js +262 -60
  62. package/dist/Components/Viewers/DataTableColumns.d.ts +32 -0
  63. package/dist/Components/Viewers/DataTableColumns.js +200 -0
  64. package/dist/Components/Viewers/DataTableFilters.d.ts +21 -0
  65. package/dist/Components/Viewers/DataTableFilters.js +68 -0
  66. package/dist/Components/Viewers/DataTableParts.d.ts +8 -4
  67. package/dist/Components/Viewers/DataTableParts.js +24 -12
  68. package/dist/Helpers/AnimationHelpers.d.ts +11 -0
  69. package/dist/Helpers/AnimationHelpers.js +20 -2
  70. package/dist/Helpers/ApiClient.d.ts +22 -0
  71. package/dist/Helpers/ApiClient.js +4 -1
  72. package/dist/Helpers/ApiFormHelpers.d.ts +27 -4
  73. package/dist/Helpers/ApiFormHelpers.js +73 -9
  74. package/dist/Helpers/ApiModules.d.ts +0 -4
  75. package/dist/Helpers/ApiModules.js +1 -0
  76. package/dist/Helpers/ApiResponses.d.ts +14 -4
  77. package/dist/Helpers/ApiResponses.js +116 -25
  78. package/dist/Helpers/ApiRoutes.d.ts +0 -10
  79. package/dist/Helpers/ApiRoutes.js +2 -10
  80. package/dist/Helpers/ChatBackend.d.ts +134 -0
  81. package/dist/Helpers/ChatBackend.js +332 -0
  82. package/dist/Helpers/ChatHelpers.d.ts +189 -0
  83. package/dist/Helpers/ChatHelpers.js +486 -0
  84. package/dist/Helpers/ChatHooks.d.ts +81 -0
  85. package/dist/Helpers/ChatHooks.js +175 -0
  86. package/dist/Helpers/ChatStore.d.ts +132 -0
  87. package/dist/Helpers/ChatStore.js +394 -0
  88. package/dist/Helpers/ChatSummaries.d.ts +39 -0
  89. package/dist/Helpers/ChatSummaries.js +118 -0
  90. package/dist/Helpers/CrudBackend.d.ts +54 -9
  91. package/dist/Helpers/CrudBackend.js +103 -6
  92. package/dist/Helpers/CrudHelpers.d.ts +39 -4
  93. package/dist/Helpers/CrudHelpers.js +76 -11
  94. package/dist/Helpers/ExcelBackend.d.ts +106 -0
  95. package/dist/Helpers/ExcelBackend.js +296 -0
  96. package/dist/Helpers/ExcelHelpers.d.ts +126 -0
  97. package/dist/Helpers/ExcelHelpers.js +344 -0
  98. package/dist/Helpers/FormStore.d.ts +11 -5
  99. package/dist/Helpers/FormStore.js +44 -6
  100. package/dist/Helpers/MessageBuilder.js +1 -2
  101. package/dist/Helpers/NumberHelpers.d.ts +7 -1
  102. package/dist/Helpers/NumberHelpers.js +41 -3
  103. package/dist/Helpers/PopoverHelpers.d.ts +46 -9
  104. package/dist/Helpers/PopoverHelpers.js +163 -24
  105. package/dist/Helpers/PopoverHooks.d.ts +24 -0
  106. package/dist/Helpers/PopoverHooks.js +62 -0
  107. package/dist/Helpers/RowsStore.d.ts +14 -3
  108. package/dist/Helpers/RowsStore.js +37 -3
  109. package/dist/Helpers/TableColumns.d.ts +7 -0
  110. package/dist/Helpers/TableColumns.js +41 -13
  111. package/dist/Helpers/TableExport.js +12 -12
  112. package/dist/Helpers/TableFilters.d.ts +25 -0
  113. package/dist/Helpers/TableFilters.js +162 -0
  114. package/dist/Helpers/TableHelpers.d.ts +15 -4
  115. package/dist/Helpers/TableHelpers.js +28 -4
  116. package/dist/Helpers/TableStore.d.ts +11 -3
  117. package/dist/Helpers/TableStore.js +16 -5
  118. package/dist/Helpers/ThemeHelpers.d.ts +21 -4
  119. package/dist/Helpers/ThemeHelpers.js +46 -9
  120. package/dist/Helpers/UserPreferences.d.ts +14 -0
  121. package/dist/Helpers/UserPreferences.js +99 -0
  122. package/dist/Interfaces/ApiInterfaces.d.ts +29 -4
  123. package/dist/Interfaces/ApiInterfaces.js +16 -10
  124. package/dist/Interfaces/ChatInterfaces.d.ts +240 -0
  125. package/dist/Interfaces/ChatInterfaces.js +1 -0
  126. package/dist/Interfaces/CrudInterfaces.d.ts +92 -12
  127. package/dist/Interfaces/ExcelInterfaces.d.ts +227 -0
  128. package/dist/Interfaces/ExcelInterfaces.js +45 -0
  129. package/dist/Interfaces/FormInterfaces.d.ts +85 -7
  130. package/dist/Interfaces/MessageInterfaces.d.ts +1 -1
  131. package/dist/Interfaces/PreferenceInterfaces.d.ts +43 -0
  132. package/dist/Interfaces/PreferenceInterfaces.js +28 -0
  133. package/dist/Interfaces/TableInterfaces.d.ts +116 -9
  134. package/dist/Interfaces/ThemeInterfaces.d.ts +25 -0
  135. package/dist/Interfaces/ThemeInterfaces.js +15 -0
  136. package/dist/Services/BrowserApi.d.ts +18 -1
  137. package/dist/Services/BrowserApi.js +18 -0
  138. package/dist/Services/ChatApi.d.ts +37 -0
  139. package/dist/Services/ChatApi.js +98 -0
  140. package/dist/Services/ExcelApi.d.ts +48 -0
  141. package/dist/Services/ExcelApi.js +196 -0
  142. package/dist/Services/ServerApi.d.ts +6 -1
  143. package/dist/Services/ServerApi.js +3 -0
  144. package/dist/Services/ThemeService.d.ts +18 -2
  145. package/dist/Services/ThemeService.js +80 -16
  146. package/dist/Shared.Index.d.ts +10 -0
  147. package/dist/Shared.Index.js +10 -0
  148. package/package.json +85 -82
  149. package/src/Styles/Nexus.Avatar.css +79 -0
  150. package/src/Styles/Nexus.Base.css +117 -70
  151. package/src/Styles/Nexus.Button.css +180 -151
  152. package/src/Styles/Nexus.Calendar.css +273 -275
  153. package/src/Styles/Nexus.Chat.css +1443 -0
  154. package/src/Styles/Nexus.Choice.css +343 -345
  155. package/src/Styles/Nexus.Crud.css +168 -84
  156. package/src/Styles/Nexus.DateTime.css +81 -81
  157. package/src/Styles/Nexus.Dropdown.css +725 -774
  158. package/src/Styles/Nexus.Editor.css +295 -297
  159. package/src/Styles/Nexus.Excel.css +389 -0
  160. package/src/Styles/Nexus.Form.css +279 -298
  161. package/src/Styles/Nexus.Index.css +37 -34
  162. package/src/Styles/Nexus.Input.css +602 -637
  163. package/src/Styles/Nexus.Markdown.css +237 -265
  164. package/src/Styles/Nexus.Menu.css +237 -249
  165. package/src/Styles/Nexus.Popup.css +724 -731
  166. package/src/Styles/Nexus.RichText.css +2 -32
  167. package/src/Styles/Nexus.Rows.css +637 -566
  168. package/src/Styles/Nexus.Slider.css +276 -278
  169. package/src/Styles/Nexus.Tab.Buttons.css +432 -364
  170. package/src/Styles/Nexus.Table.css +1386 -1014
  171. package/src/Styles/Nexus.Theme.Picker.css +286 -159
  172. package/src/Styles/Nexus.Themes.css +194 -194
  173. package/src/Styles/Nexus.Time.css +144 -147
  174. package/src/Styles/Nexus.Toast.css +263 -265
  175. package/src/Styles/Nexus.Tokens.css +89 -72
  176. 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
- @media (prefers-reduced-motion: reduce) {
269
- .nx-cal__day,
270
- .nx-cal__nav,
271
- .nx-cal__select {
272
- transition: none;
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
+ }