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,249 +1,237 @@
1
- @layer nexus.components {
2
- /*
3
- * Menu: a list of actions in a native popover. It shares the .nx-popover panel (border, raised background, shadow)
4
- * with tight padding, so items sit close to the edge. Hover and keyboard focus highlight an item the same way,
5
- * because focus follows the pointer.
6
- */
7
- .nx-menu {
8
- --nx-menu-item-height: 32px;
9
- --nx-menu-font: var(--nx-text-md);
10
- --nx-menu-pad-x: var(--nx-space-2);
11
-
12
- position: fixed;
13
- inset: auto;
14
- min-width: 180px;
15
- max-width: min(360px, calc(100% - 16px));
16
- max-height: calc(100vh - 16px);
17
- overflow: hidden auto;
18
- overscroll-behavior: contain;
19
- padding: 4px;
20
- outline: none;
21
- }
22
-
23
- .nx-menu:popover-open {
24
- animation: nx-menu-in 120ms ease-out;
25
- }
26
-
27
- @keyframes nx-menu-in {
28
- from {
29
- opacity: 0;
30
- transform: translateY(-4px);
31
- }
32
- }
33
-
34
- .nx-menu--sm {
35
- --nx-menu-item-height: 28px;
36
- --nx-menu-font: var(--nx-text-sm);
37
- }
38
-
39
- .nx-menu--lg {
40
- --nx-menu-item-height: 38px;
41
- --nx-menu-font: var(--nx-text-lg);
42
- --nx-menu-pad-x: 10px;
43
- }
44
-
45
- .nx-menu__item {
46
- display: flex;
47
- align-items: center;
48
- gap: var(--nx-space-2);
49
- width: 100%;
50
- min-height: var(--nx-menu-item-height);
51
- margin: 0;
52
- padding: 5px var(--nx-menu-pad-x);
53
- border: 0;
54
- border-radius: var(--nx-radius);
55
- background: none;
56
- color: var(--nx-text);
57
- font: inherit;
58
- font-size: var(--nx-menu-font);
59
- line-height: 1.35;
60
- text-align: left;
61
- text-decoration: none;
62
- cursor: pointer;
63
- user-select: none;
64
- outline: none;
65
- }
66
-
67
- .nx-menu__item:is(:hover, :focus) {
68
- background: var(--nx-surface-hover);
69
- }
70
-
71
- .nx-menu__item[aria-disabled="true"] {
72
- background: none;
73
- opacity: 0.5;
74
- cursor: not-allowed;
75
- }
76
-
77
- /* The icon column: the same width on every item, empty on items without an icon. */
78
- .nx-menu__icon {
79
- display: grid;
80
- flex-shrink: 0;
81
- place-items: center;
82
- width: 1.15em;
83
- height: 1.15em;
84
- }
85
-
86
- .nx-menu__item .nx-icon {
87
- width: 1.15em;
88
- height: 1.15em;
89
- color: var(--nx-text-muted);
90
- vertical-align: 0;
91
- }
92
-
93
- .nx-menu__item--danger {
94
- color: var(--nx-danger);
95
- }
96
-
97
- .nx-menu__item--danger .nx-icon {
98
- color: inherit;
99
- }
100
-
101
- .nx-menu__item--danger:is(:hover, :focus) {
102
- background: var(--nx-danger-soft);
103
- }
104
-
105
- /* The check column of radio and checkbox menus: every item keeps the space, the checked one shows the mark. */
106
- .nx-menu__check {
107
- display: grid;
108
- flex-shrink: 0;
109
- place-items: center;
110
- width: 16px;
111
- color: var(--nx-primary);
112
- }
113
-
114
- .nx-menu__check .nx-icon {
115
- color: inherit;
116
- }
117
-
118
- .nx-menu__body {
119
- display: grid;
120
- flex: 1 1 auto;
121
- min-width: 0;
122
- }
123
-
124
- .nx-menu__label {
125
- overflow: hidden;
126
- text-overflow: ellipsis;
127
- white-space: nowrap;
128
- }
129
-
130
- .nx-menu__description {
131
- color: var(--nx-text-muted);
132
- font-size: var(--nx-text-xs);
133
- line-height: 1.4;
134
- }
135
-
136
- .nx-menu__shortcut {
137
- flex-shrink: 0;
138
- margin-left: auto;
139
- padding-left: var(--nx-space-4);
140
- color: var(--nx-text-subtle);
141
- font-family: var(--nx-font);
142
- font-size: var(--nx-text-xs);
143
- font-weight: 500;
144
- }
145
-
146
- .nx-menu__separator {
147
- height: 1px;
148
- margin: 4px 0;
149
- background: var(--nx-border);
150
- }
151
-
152
- .nx-menu__heading {
153
- padding: 6px var(--nx-menu-pad-x) 2px;
154
- color: var(--nx-text-subtle);
155
- font-size: var(--nx-text-xs);
156
- font-weight: 600;
157
- letter-spacing: 0.06em;
158
- text-transform: uppercase;
159
- }
160
-
161
- /* The context menu's wrapper takes no space, so it can wrap a table or a grid cell. */
162
- .nx-context-target {
163
- display: contents;
164
- }
165
-
166
- /*
167
- * Split button: the main action and an arrow that opens the alternatives. Two buttons joined at the middle,
168
- * with one shared edge; on primary and danger, whose borders are invisible, a faint line marks the split.
169
- */
170
- .nx-split {
171
- --nx-split-divider: transparent;
172
-
173
- display: inline-flex;
174
- align-items: stretch;
175
- vertical-align: middle;
176
- }
177
-
178
- .nx-split--block {
179
- display: flex;
180
- width: 100%;
181
- }
182
-
183
- .nx-split--block .nx-split__main {
184
- flex: 1 1 auto;
185
- }
186
-
187
- .nx-split--primary {
188
- --nx-split-divider: color-mix(in oklab, var(--nx-primary-text) 30%, transparent);
189
- }
190
-
191
- .nx-split--danger {
192
- --nx-split-divider: color-mix(in oklab, var(--nx-danger-text) 30%, transparent);
193
- }
194
-
195
- .nx-split .nx-split__main {
196
- border-start-end-radius: 0;
197
- border-end-end-radius: 0;
198
- }
199
-
200
- .nx-split .nx-split__toggle {
201
- width: calc(var(--nx-btn-height) - 6px);
202
- margin-left: -1px;
203
- padding: 0;
204
- border-start-start-radius: 0;
205
- border-end-start-radius: 0;
206
- box-shadow:
207
- inset 1px 0 0 var(--nx-split-divider),
208
- var(--nx-shadow-sm);
209
- }
210
-
211
- .nx-split .nx-split__toggle:disabled {
212
- box-shadow: inset 1px 0 0 var(--nx-split-divider);
213
- }
214
-
215
- /* Ghost halves have no shadow; a faint line still marks the split. */
216
- .nx-split--ghost {
217
- --nx-split-divider: var(--nx-border);
218
- }
219
-
220
- .nx-split--ghost .nx-split__toggle {
221
- box-shadow: inset 1px 0 0 var(--nx-split-divider);
222
- }
223
-
224
- /* The hovered or focused half paints over the shared edge. */
225
- .nx-split .nx-btn:is(:hover, :focus-visible) {
226
- position: relative;
227
- z-index: 1;
228
- }
229
-
230
- .nx-split .nx-split__toggle .nx-icon {
231
- transition: transform 160ms ease;
232
- }
233
-
234
- .nx-split .nx-split__toggle[aria-expanded="true"] .nx-icon {
235
- transform: rotate(180deg);
236
- }
237
-
238
- .nx-split__menu {
239
- min-width: 240px;
240
- }
241
-
242
- @media (prefers-reduced-motion: reduce) {
243
- .nx-menu:popover-open,
244
- .nx-split .nx-split__toggle .nx-icon {
245
- animation: none;
246
- transition: none;
247
- }
248
- }
249
- }
1
+ @layer nexus.components {
2
+ /*
3
+ * Menu: a list of actions in a native popover. It shares the .nx-popover panel (border, raised background, shadow)
4
+ * with tight padding, so items sit close to the edge. Hover and keyboard focus highlight an item the same way,
5
+ * because focus follows the pointer.
6
+ */
7
+ .nx-menu {
8
+ --nx-menu-item-height: var(--nx-row);
9
+ --nx-menu-font: var(--nx-text-md);
10
+ --nx-menu-pad-x: var(--nx-space-2);
11
+ --nx-popover-pad: 4px;
12
+
13
+ position: fixed;
14
+ inset: auto;
15
+ min-width: 180px;
16
+ max-width: min(360px, calc(100% - 16px));
17
+ outline: none;
18
+ }
19
+
20
+ /* The items scroll inside the panel (`.nx-popover__scroll`): a block, so a long menu scrolls instead of squeezing
21
+ its items the way flex children would. */
22
+ .nx-menu__list {
23
+ display: block;
24
+ }
25
+
26
+ .nx-menu--sm {
27
+ --nx-menu-item-height: calc(var(--nx-row) - 4px);
28
+ --nx-menu-font: var(--nx-text-sm);
29
+ }
30
+
31
+ .nx-menu--lg {
32
+ --nx-menu-item-height: calc(var(--nx-row) + 6px);
33
+ --nx-menu-font: var(--nx-text-lg);
34
+ --nx-menu-pad-x: 10px;
35
+ }
36
+
37
+ .nx-menu__item {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: var(--nx-space-2);
41
+ width: 100%;
42
+ min-height: var(--nx-menu-item-height);
43
+ margin: 0;
44
+ padding: 5px var(--nx-menu-pad-x);
45
+ border: 0;
46
+ border-radius: var(--nx-radius);
47
+ background: none;
48
+ color: var(--nx-text);
49
+ font: inherit;
50
+ font-size: var(--nx-menu-font);
51
+ line-height: 1.35;
52
+ text-align: left;
53
+ text-decoration: none;
54
+ cursor: pointer;
55
+ user-select: none;
56
+ outline: none;
57
+ }
58
+
59
+ .nx-menu__item:is(:hover, :focus) {
60
+ background: var(--nx-surface-hover);
61
+ }
62
+
63
+ .nx-menu__item[aria-disabled="true"] {
64
+ background: none;
65
+ opacity: 0.5;
66
+ cursor: not-allowed;
67
+ }
68
+
69
+ /* The icon column: the same width on every item, empty on items without an icon. */
70
+ .nx-menu__icon {
71
+ display: grid;
72
+ flex-shrink: 0;
73
+ place-items: center;
74
+ width: 1.15em;
75
+ height: 1.15em;
76
+ }
77
+
78
+ .nx-menu__item .nx-icon {
79
+ width: 1.15em;
80
+ height: 1.15em;
81
+ color: var(--nx-text-muted);
82
+ vertical-align: 0;
83
+ }
84
+
85
+ .nx-menu__item--danger {
86
+ color: var(--nx-danger);
87
+ }
88
+
89
+ .nx-menu__item--danger .nx-icon {
90
+ color: inherit;
91
+ }
92
+
93
+ .nx-menu__item--danger:is(:hover, :focus) {
94
+ background: var(--nx-danger-soft);
95
+ }
96
+
97
+ /* The check column of radio and checkbox menus: every item keeps the space, the checked one shows the mark. */
98
+ .nx-menu__check {
99
+ display: grid;
100
+ flex-shrink: 0;
101
+ place-items: center;
102
+ width: 16px;
103
+ color: var(--nx-primary);
104
+ }
105
+
106
+ .nx-menu__check .nx-icon {
107
+ color: inherit;
108
+ }
109
+
110
+ .nx-menu__body {
111
+ display: grid;
112
+ flex: 1 1 auto;
113
+ min-width: 0;
114
+ }
115
+
116
+ .nx-menu__label {
117
+ overflow: hidden;
118
+ text-overflow: ellipsis;
119
+ white-space: nowrap;
120
+ }
121
+
122
+ .nx-menu__description {
123
+ color: var(--nx-text-muted);
124
+ font-size: var(--nx-text-xs);
125
+ line-height: 1.4;
126
+ }
127
+
128
+ .nx-menu__shortcut {
129
+ flex-shrink: 0;
130
+ margin-left: auto;
131
+ padding-left: var(--nx-space-4);
132
+ color: var(--nx-text-subtle);
133
+ font-family: var(--nx-font);
134
+ font-size: var(--nx-text-xs);
135
+ font-weight: 500;
136
+ }
137
+
138
+ .nx-menu__separator {
139
+ height: 1px;
140
+ margin: 4px 0;
141
+ background: var(--nx-border);
142
+ }
143
+
144
+ .nx-menu__heading {
145
+ padding: 6px var(--nx-menu-pad-x) 2px;
146
+ color: var(--nx-text-subtle);
147
+ font-size: var(--nx-text-xs);
148
+ font-weight: 600;
149
+ letter-spacing: 0.06em;
150
+ text-transform: uppercase;
151
+ }
152
+
153
+ /* The context menu's wrapper takes no space, so it can wrap a table or a grid cell. */
154
+ .nx-context-target {
155
+ display: contents;
156
+ }
157
+
158
+ /*
159
+ * Split button: the main action and an arrow that opens the alternatives. Two buttons joined at the middle,
160
+ * with one shared edge; on primary and danger, whose borders are invisible, a faint line marks the split.
161
+ */
162
+ .nx-split {
163
+ --nx-split-divider: transparent;
164
+
165
+ display: inline-flex;
166
+ align-items: stretch;
167
+ vertical-align: middle;
168
+ }
169
+
170
+ .nx-split--block {
171
+ display: flex;
172
+ width: 100%;
173
+ }
174
+
175
+ .nx-split--block .nx-split__main {
176
+ flex: 1 1 auto;
177
+ }
178
+
179
+ .nx-split--primary {
180
+ --nx-split-divider: color-mix(in oklab, var(--nx-primary-text) 30%, transparent);
181
+ }
182
+
183
+ .nx-split--danger {
184
+ --nx-split-divider: color-mix(in oklab, var(--nx-danger-text) 30%, transparent);
185
+ }
186
+
187
+ .nx-split .nx-split__main {
188
+ border-start-end-radius: 0;
189
+ border-end-end-radius: 0;
190
+ }
191
+
192
+ .nx-split .nx-split__toggle {
193
+ width: calc(var(--nx-btn-height) - 6px);
194
+ margin-left: -1px;
195
+ padding: 0;
196
+ border-start-start-radius: 0;
197
+ border-end-start-radius: 0;
198
+ box-shadow:
199
+ inset 1px 0 0 var(--nx-split-divider),
200
+ var(--nx-shadow-sm);
201
+ }
202
+
203
+ .nx-split .nx-split__toggle:disabled {
204
+ box-shadow: inset 1px 0 0 var(--nx-split-divider);
205
+ }
206
+
207
+ /* Ghost halves have no shadow; a faint line still marks the split. */
208
+ .nx-split--ghost {
209
+ --nx-split-divider: var(--nx-border);
210
+ }
211
+
212
+ .nx-split--ghost .nx-split__toggle {
213
+ box-shadow: inset 1px 0 0 var(--nx-split-divider);
214
+ }
215
+
216
+ /* The hovered or focused half paints over the shared edge. */
217
+ .nx-split .nx-btn:is(:hover, :focus-visible) {
218
+ position: relative;
219
+ z-index: 1;
220
+ }
221
+
222
+ .nx-split .nx-split__toggle .nx-icon {
223
+ transition: transform 160ms ease;
224
+ }
225
+
226
+ .nx-split .nx-split__toggle[aria-expanded="true"] .nx-icon {
227
+ transform: rotate(180deg);
228
+ }
229
+
230
+ .nx-split__menu {
231
+ min-width: 240px;
232
+ }
233
+
234
+ [data-nx-motion="reduce"] .nx-split .nx-split__toggle .nx-icon {
235
+ transition: none;
236
+ }
237
+ }