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.
Files changed (121) hide show
  1. package/CHANGELOG.md +446 -262
  2. package/LICENSE +21 -21
  3. package/README.md +1084 -1000
  4. package/dist/Client.Index.d.ts +3 -0
  5. package/dist/Client.Index.js +3 -0
  6. package/dist/Components/Chats/ChatParts.d.ts +2 -2
  7. package/dist/Components/Chats/ChatParts.js +3 -7
  8. package/dist/Components/Chats/ChatThread.js +3 -3
  9. package/dist/Components/Documents/Button.d.ts +6 -1
  10. package/dist/Components/Documents/Button.js +2 -2
  11. package/dist/Components/Documents/Menu.js +21 -9
  12. package/dist/Components/Documents/SplitButton.d.ts +3 -1
  13. package/dist/Components/Documents/SplitButton.js +7 -5
  14. package/dist/Components/Documents/TabButtons.d.ts +5 -2
  15. package/dist/Components/Documents/TabButtons.js +2 -2
  16. package/dist/Components/Forms/ApiForm.d.ts +1 -1
  17. package/dist/Components/Forms/ApiForm.js +1 -1
  18. package/dist/Components/Forms/Crud.js +177 -58
  19. package/dist/Components/Forms/CrudParts.d.ts +5 -1
  20. package/dist/Components/Forms/CrudParts.js +37 -5
  21. package/dist/Components/Forms/ExcelImport.d.ts +23 -7
  22. package/dist/Components/Forms/ExcelImport.js +189 -60
  23. package/dist/Components/Forms/Form.js +5 -13
  24. package/dist/Components/Forms/SubmitForm.d.ts +11 -2
  25. package/dist/Components/Forms/SubmitForm.js +23 -12
  26. package/dist/Components/Inputs/DropdownParts.d.ts +1 -1
  27. package/dist/Components/Inputs/DropdownParts.js +4 -6
  28. package/dist/Components/Inputs/NumberBox.js +24 -2
  29. package/dist/Components/Inputs/RowsInput.js +2 -2
  30. package/dist/Components/Inputs/Slider.js +4 -1
  31. package/dist/Components/Inputs/TabularForm.js +42 -10
  32. package/dist/Components/Inputs/TimePanel.js +4 -3
  33. package/dist/Components/Layouts/Popup.js +1 -4
  34. package/dist/Components/Layouts/ThemePicker.d.ts +20 -3
  35. package/dist/Components/Layouts/ThemePicker.js +77 -6
  36. package/dist/Components/Layouts/ThemeScript.d.ts +4 -2
  37. package/dist/Components/Layouts/ThemeScript.js +4 -2
  38. package/dist/Components/Layouts/ThemeSwitcher.d.ts +6 -3
  39. package/dist/Components/Layouts/ThemeSwitcher.js +9 -8
  40. package/dist/Components/Viewers/Avatar.d.ts +21 -0
  41. package/dist/Components/Viewers/Avatar.js +21 -0
  42. package/dist/Components/Viewers/DataTable.js +192 -44
  43. package/dist/Components/Viewers/DataTableColumns.d.ts +7 -3
  44. package/dist/Components/Viewers/DataTableColumns.js +25 -68
  45. package/dist/Components/Viewers/DataTableFilters.d.ts +21 -0
  46. package/dist/Components/Viewers/DataTableFilters.js +68 -0
  47. package/dist/Components/Viewers/DataTableParts.d.ts +2 -2
  48. package/dist/Components/Viewers/DataTableParts.js +3 -3
  49. package/dist/Helpers/AnimationHelpers.d.ts +11 -0
  50. package/dist/Helpers/AnimationHelpers.js +20 -2
  51. package/dist/Helpers/CrudBackend.d.ts +7 -4
  52. package/dist/Helpers/CrudBackend.js +4 -2
  53. package/dist/Helpers/ExcelBackend.d.ts +3 -3
  54. package/dist/Helpers/ExcelBackend.js +8 -2
  55. package/dist/Helpers/ExcelHelpers.d.ts +36 -8
  56. package/dist/Helpers/ExcelHelpers.js +55 -13
  57. package/dist/Helpers/FormStore.d.ts +9 -5
  58. package/dist/Helpers/FormStore.js +25 -5
  59. package/dist/Helpers/MessageBuilder.js +1 -0
  60. package/dist/Helpers/NumberHelpers.d.ts +7 -1
  61. package/dist/Helpers/NumberHelpers.js +41 -3
  62. package/dist/Helpers/PopoverHelpers.d.ts +17 -5
  63. package/dist/Helpers/PopoverHelpers.js +52 -17
  64. package/dist/Helpers/PopoverHooks.d.ts +24 -0
  65. package/dist/Helpers/PopoverHooks.js +62 -0
  66. package/dist/Helpers/RowsStore.d.ts +7 -2
  67. package/dist/Helpers/RowsStore.js +15 -3
  68. package/dist/Helpers/TableExport.js +12 -12
  69. package/dist/Helpers/TableFilters.d.ts +25 -0
  70. package/dist/Helpers/TableFilters.js +162 -0
  71. package/dist/Helpers/TableHelpers.d.ts +6 -3
  72. package/dist/Helpers/TableHelpers.js +8 -4
  73. package/dist/Helpers/TableStore.d.ts +11 -3
  74. package/dist/Helpers/TableStore.js +16 -5
  75. package/dist/Helpers/ThemeHelpers.d.ts +21 -4
  76. package/dist/Helpers/ThemeHelpers.js +46 -9
  77. package/dist/Helpers/UserPreferences.d.ts +14 -0
  78. package/dist/Helpers/UserPreferences.js +99 -0
  79. package/dist/Interfaces/CrudInterfaces.d.ts +20 -1
  80. package/dist/Interfaces/ExcelInterfaces.d.ts +12 -0
  81. package/dist/Interfaces/FormInterfaces.d.ts +33 -5
  82. package/dist/Interfaces/PreferenceInterfaces.d.ts +43 -0
  83. package/dist/Interfaces/PreferenceInterfaces.js +28 -0
  84. package/dist/Interfaces/TableInterfaces.d.ts +59 -12
  85. package/dist/Interfaces/ThemeInterfaces.d.ts +25 -0
  86. package/dist/Interfaces/ThemeInterfaces.js +15 -0
  87. package/dist/Services/ExcelApi.d.ts +3 -1
  88. package/dist/Services/ExcelApi.js +1 -1
  89. package/dist/Services/ThemeService.d.ts +18 -2
  90. package/dist/Services/ThemeService.js +80 -16
  91. package/dist/Shared.Index.d.ts +2 -0
  92. package/dist/Shared.Index.js +2 -0
  93. package/package.json +85 -85
  94. package/src/Styles/Nexus.Avatar.css +79 -0
  95. package/src/Styles/Nexus.Base.css +117 -70
  96. package/src/Styles/Nexus.Button.css +180 -153
  97. package/src/Styles/Nexus.Calendar.css +273 -275
  98. package/src/Styles/Nexus.Chat.css +1443 -1489
  99. package/src/Styles/Nexus.Choice.css +343 -345
  100. package/src/Styles/Nexus.Crud.css +168 -161
  101. package/src/Styles/Nexus.DateTime.css +81 -81
  102. package/src/Styles/Nexus.Dropdown.css +725 -774
  103. package/src/Styles/Nexus.Editor.css +295 -297
  104. package/src/Styles/Nexus.Excel.css +389 -370
  105. package/src/Styles/Nexus.Form.css +279 -321
  106. package/src/Styles/Nexus.Index.css +37 -36
  107. package/src/Styles/Nexus.Input.css +602 -637
  108. package/src/Styles/Nexus.Markdown.css +237 -265
  109. package/src/Styles/Nexus.Menu.css +237 -259
  110. package/src/Styles/Nexus.Popup.css +724 -731
  111. package/src/Styles/Nexus.RichText.css +2 -32
  112. package/src/Styles/Nexus.Rows.css +637 -596
  113. package/src/Styles/Nexus.Slider.css +276 -278
  114. package/src/Styles/Nexus.Tab.Buttons.css +432 -419
  115. package/src/Styles/Nexus.Table.css +1386 -1296
  116. package/src/Styles/Nexus.Theme.Picker.css +286 -232
  117. package/src/Styles/Nexus.Themes.css +194 -194
  118. package/src/Styles/Nexus.Time.css +144 -147
  119. package/src/Styles/Nexus.Toast.css +263 -265
  120. package/src/Styles/Nexus.Tokens.css +89 -72
  121. package/src/Styles/Nexus.Tree.css +431 -435
@@ -1,265 +1,237 @@
1
- @layer nexus.components {
2
- /*
3
- * Markdown editor: the text and its preview inside the editor frame (Nexus.Editor.css), which brings the bar, the
4
- * height handle, and full screen.
5
- */
6
- .nx-md .nx-editor__body[data-mode="split"] {
7
- grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
8
- }
9
-
10
- .nx-md .nx-editor__body[data-mode="preview"] .nx-md__input {
11
- display: none;
12
- }
13
-
14
- .nx-md .nx-md__input {
15
- height: 100%;
16
- min-height: 0;
17
- padding: 10px var(--nx-space-3);
18
- border-radius: 0;
19
- line-height: 1.6;
20
- resize: none;
21
- }
22
-
23
- .nx-md--mono .nx-md__input {
24
- font-family: var(--nx-font-mono);
25
- font-size: calc(var(--nx-field-font) - 0.5px);
26
- }
27
-
28
- .nx-md__preview {
29
- min-width: 0;
30
- min-height: 0;
31
- padding: 10px var(--nx-space-4);
32
- overflow: auto;
33
- overscroll-behavior: contain;
34
- }
35
-
36
- .nx-md .nx-editor__body[data-mode="split"] .nx-md__preview {
37
- border-left: 1px solid var(--nx-border);
38
- }
39
-
40
- .nx-md__preview:focus-visible {
41
- outline: 2px solid var(--nx-primary);
42
- outline-offset: -2px;
43
- }
44
-
45
- @container nx-editor (width < 560px) {
46
- .nx-md .nx-editor__body[data-mode="split"] {
47
- grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
48
- grid-template-columns: minmax(0, 1fr);
49
- }
50
-
51
- .nx-md .nx-editor__body[data-mode="split"] .nx-md__preview {
52
- border-top: 1px solid var(--nx-border);
53
- border-left: 0;
54
- }
55
- }
56
-
57
- /* The preview's thin scrollbar, as the text area's (Nexus.Input.css). */
58
- .nx-md__preview::-webkit-scrollbar {
59
- width: 8px;
60
- height: 8px;
61
- }
62
-
63
- .nx-md__preview::-webkit-scrollbar-track,
64
- .nx-md__preview::-webkit-scrollbar-corner {
65
- background: transparent;
66
- }
67
-
68
- .nx-md__preview::-webkit-scrollbar-thumb {
69
- border: 2px solid transparent;
70
- border-radius: var(--nx-radius-full);
71
- background: var(--nx-field-scrollbar) padding-box;
72
- }
73
-
74
- .nx-md__preview::-webkit-scrollbar-thumb:hover {
75
- background-color: var(--nx-field-scrollbar-hover);
76
- }
77
-
78
- @supports not selector(::-webkit-scrollbar) {
79
- .nx-md__preview {
80
- scrollbar-width: thin;
81
- scrollbar-color: var(--nx-field-scrollbar) transparent;
82
- }
83
- }
84
-
85
- /*
86
- * Markdown content (MarkdownView), in the editor's preview and anywhere else. Sizes are in em, so the text follows
87
- * the size of the element it sits in.
88
- */
89
- .nx-markdown {
90
- color: var(--nx-text);
91
- font-size: var(--nx-text-md);
92
- line-height: 1.65;
93
- overflow-wrap: break-word;
94
- }
95
-
96
- .nx-markdown > :first-child {
97
- margin-top: 0;
98
- }
99
-
100
- .nx-markdown > :last-child {
101
- margin-bottom: 0;
102
- }
103
-
104
- .nx-markdown :is(p, ul, ol, blockquote, pre, hr, .nx-markdown__table) {
105
- margin: 0 0 0.9em;
106
- }
107
-
108
- .nx-markdown :is(h1, h2, h3, h4, h5, h6) {
109
- margin: 1.4em 0 0.55em;
110
- font-weight: 650;
111
- line-height: 1.3;
112
- letter-spacing: -0.01em;
113
- }
114
-
115
- .nx-markdown :is(h1, h2) {
116
- padding-bottom: 0.3em;
117
- border-bottom: 1px solid var(--nx-border);
118
- }
119
-
120
- .nx-markdown h1 {
121
- font-size: 1.6em;
122
- }
123
-
124
- .nx-markdown h2 {
125
- font-size: 1.3em;
126
- }
127
-
128
- .nx-markdown h3 {
129
- font-size: 1.12em;
130
- }
131
-
132
- .nx-markdown h4 {
133
- font-size: 1em;
134
- }
135
-
136
- .nx-markdown h5 {
137
- font-size: 0.9em;
138
- }
139
-
140
- .nx-markdown h6 {
141
- color: var(--nx-text-muted);
142
- font-size: 0.85em;
143
- }
144
-
145
- .nx-markdown a {
146
- color: var(--nx-primary);
147
- text-decoration: underline;
148
- text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
149
- text-underline-offset: 0.18em;
150
- }
151
-
152
- .nx-markdown a:hover {
153
- text-decoration-color: currentColor;
154
- }
155
-
156
- .nx-markdown :is(ul, ol) {
157
- padding-left: 1.6em;
158
- }
159
-
160
- .nx-markdown li + li {
161
- margin-top: 0.25em;
162
- }
163
-
164
- .nx-markdown li > :is(ul, ol) {
165
- margin: 0.25em 0 0;
166
- }
167
-
168
- .nx-markdown li > p {
169
- margin-bottom: 0.5em;
170
- }
171
-
172
- /* Tasks: the box sits where the bullet would. */
173
- .nx-markdown__task {
174
- position: relative;
175
- list-style: none;
176
- }
177
-
178
- .nx-markdown__task > input {
179
- position: absolute;
180
- top: 0.32em;
181
- left: -1.45em;
182
- width: 1em;
183
- height: 1em;
184
- margin: 0;
185
- accent-color: var(--nx-primary-solid);
186
- }
187
-
188
- .nx-markdown__task > input:enabled {
189
- cursor: pointer;
190
- }
191
-
192
- .nx-markdown blockquote {
193
- padding: 0 0 0 1em;
194
- border-left: 3px solid var(--nx-border-strong);
195
- color: var(--nx-text-muted);
196
- }
197
-
198
- .nx-markdown code {
199
- padding: 0.12em 0.38em;
200
- border-radius: var(--nx-radius-sm);
201
- background: color-mix(in oklab, var(--nx-text) 8%, transparent);
202
- font-family: var(--nx-font-mono);
203
- font-size: 0.875em;
204
- }
205
-
206
- .nx-markdown pre {
207
- overflow: auto;
208
- padding: 0.8em 1em;
209
- border-radius: var(--nx-radius);
210
- background: color-mix(in oklab, var(--nx-text) 5%, transparent);
211
- line-height: 1.5;
212
- }
213
-
214
- .nx-markdown pre code {
215
- padding: 0;
216
- background: none;
217
- font-size: 0.86em;
218
- white-space: pre;
219
- }
220
-
221
- .nx-markdown hr {
222
- height: 0;
223
- margin-block: 1.4em;
224
- border: 0;
225
- border-top: 1px solid var(--nx-border-strong);
226
- }
227
-
228
- .nx-markdown img {
229
- max-width: 100%;
230
- height: auto;
231
- border-radius: var(--nx-radius-sm);
232
- vertical-align: middle;
233
- }
234
-
235
- .nx-markdown del {
236
- color: var(--nx-text-muted);
237
- }
238
-
239
- .nx-markdown__table {
240
- max-width: 100%;
241
- overflow-x: auto;
242
- }
243
-
244
- .nx-markdown table {
245
- border-collapse: collapse;
246
- font-size: 0.95em;
247
- }
248
-
249
- .nx-markdown :is(th, td) {
250
- padding: 0.4em 0.8em;
251
- border: 1px solid var(--nx-border);
252
- text-align: left;
253
- vertical-align: top;
254
- }
255
-
256
- .nx-markdown th {
257
- background: color-mix(in oklab, var(--nx-text) 4%, transparent);
258
- font-weight: 600;
259
- }
260
-
261
- .nx-markdown__empty {
262
- color: var(--nx-text-muted);
263
- font-style: italic;
264
- }
265
- }
1
+ @layer nexus.components {
2
+ /*
3
+ * Markdown editor: the text and its preview inside the editor frame (Nexus.Editor.css), which brings the bar, the
4
+ * height handle, and full screen.
5
+ */
6
+ .nx-md .nx-editor__body[data-mode="split"] {
7
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
8
+ }
9
+
10
+ .nx-md .nx-editor__body[data-mode="preview"] .nx-md__input {
11
+ display: none;
12
+ }
13
+
14
+ .nx-md .nx-md__input {
15
+ height: 100%;
16
+ min-height: 0;
17
+ padding: 10px var(--nx-space-3);
18
+ border-radius: 0;
19
+ line-height: 1.6;
20
+ resize: none;
21
+ }
22
+
23
+ .nx-md--mono .nx-md__input {
24
+ font-family: var(--nx-font-mono);
25
+ font-size: calc(var(--nx-field-font) - 0.5px);
26
+ }
27
+
28
+ .nx-md__preview {
29
+ min-width: 0;
30
+ min-height: 0;
31
+ padding: 10px var(--nx-space-4);
32
+ overflow: auto;
33
+ overscroll-behavior: contain;
34
+ }
35
+
36
+ .nx-md .nx-editor__body[data-mode="split"] .nx-md__preview {
37
+ border-left: 1px solid var(--nx-border);
38
+ }
39
+
40
+ .nx-md__preview:focus-visible {
41
+ outline: 2px solid var(--nx-primary);
42
+ outline-offset: -2px;
43
+ }
44
+
45
+ @container nx-editor (width < 560px) {
46
+ .nx-md .nx-editor__body[data-mode="split"] {
47
+ grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
48
+ grid-template-columns: minmax(0, 1fr);
49
+ }
50
+
51
+ .nx-md .nx-editor__body[data-mode="split"] .nx-md__preview {
52
+ border-top: 1px solid var(--nx-border);
53
+ border-left: 0;
54
+ }
55
+ }
56
+
57
+ /*
58
+ * Markdown content (MarkdownView), in the editor's preview and anywhere else. Sizes are in em, so the text follows
59
+ * the size of the element it sits in.
60
+ */
61
+ .nx-markdown {
62
+ color: var(--nx-text);
63
+ font-size: var(--nx-text-md);
64
+ line-height: 1.65;
65
+ overflow-wrap: break-word;
66
+ }
67
+
68
+ .nx-markdown > :first-child {
69
+ margin-top: 0;
70
+ }
71
+
72
+ .nx-markdown > :last-child {
73
+ margin-bottom: 0;
74
+ }
75
+
76
+ .nx-markdown :is(p, ul, ol, blockquote, pre, hr, .nx-markdown__table) {
77
+ margin: 0 0 0.9em;
78
+ }
79
+
80
+ .nx-markdown :is(h1, h2, h3, h4, h5, h6) {
81
+ margin: 1.4em 0 0.55em;
82
+ font-weight: 650;
83
+ line-height: 1.3;
84
+ letter-spacing: -0.01em;
85
+ }
86
+
87
+ .nx-markdown :is(h1, h2) {
88
+ padding-bottom: 0.3em;
89
+ border-bottom: 1px solid var(--nx-border);
90
+ }
91
+
92
+ .nx-markdown h1 {
93
+ font-size: 1.6em;
94
+ }
95
+
96
+ .nx-markdown h2 {
97
+ font-size: 1.3em;
98
+ }
99
+
100
+ .nx-markdown h3 {
101
+ font-size: 1.12em;
102
+ }
103
+
104
+ .nx-markdown h4 {
105
+ font-size: 1em;
106
+ }
107
+
108
+ .nx-markdown h5 {
109
+ font-size: 0.9em;
110
+ }
111
+
112
+ .nx-markdown h6 {
113
+ color: var(--nx-text-muted);
114
+ font-size: 0.85em;
115
+ }
116
+
117
+ .nx-markdown a {
118
+ color: var(--nx-primary);
119
+ text-decoration: underline;
120
+ text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
121
+ text-underline-offset: 0.18em;
122
+ }
123
+
124
+ .nx-markdown a:hover {
125
+ text-decoration-color: currentColor;
126
+ }
127
+
128
+ .nx-markdown :is(ul, ol) {
129
+ padding-left: 1.6em;
130
+ }
131
+
132
+ .nx-markdown li + li {
133
+ margin-top: 0.25em;
134
+ }
135
+
136
+ .nx-markdown li > :is(ul, ol) {
137
+ margin: 0.25em 0 0;
138
+ }
139
+
140
+ .nx-markdown li > p {
141
+ margin-bottom: 0.5em;
142
+ }
143
+
144
+ /* Tasks: the box sits where the bullet would. */
145
+ .nx-markdown__task {
146
+ position: relative;
147
+ list-style: none;
148
+ }
149
+
150
+ .nx-markdown__task > input {
151
+ position: absolute;
152
+ top: 0.32em;
153
+ left: -1.45em;
154
+ width: 1em;
155
+ height: 1em;
156
+ margin: 0;
157
+ accent-color: var(--nx-primary-solid);
158
+ }
159
+
160
+ .nx-markdown__task > input:enabled {
161
+ cursor: pointer;
162
+ }
163
+
164
+ .nx-markdown blockquote {
165
+ padding: 0 0 0 1em;
166
+ border-left: 3px solid var(--nx-border-strong);
167
+ color: var(--nx-text-muted);
168
+ }
169
+
170
+ .nx-markdown code {
171
+ padding: 0.12em 0.38em;
172
+ border-radius: var(--nx-radius-sm);
173
+ background: color-mix(in oklab, var(--nx-text) 8%, transparent);
174
+ font-family: var(--nx-font-mono);
175
+ font-size: 0.875em;
176
+ }
177
+
178
+ .nx-markdown pre {
179
+ overflow: auto;
180
+ padding: 0.8em 1em;
181
+ border-radius: var(--nx-radius);
182
+ background: color-mix(in oklab, var(--nx-text) 5%, transparent);
183
+ line-height: 1.5;
184
+ }
185
+
186
+ .nx-markdown pre code {
187
+ padding: 0;
188
+ background: none;
189
+ font-size: 0.86em;
190
+ white-space: pre;
191
+ }
192
+
193
+ .nx-markdown hr {
194
+ height: 0;
195
+ margin-block: 1.4em;
196
+ border: 0;
197
+ border-top: 1px solid var(--nx-border-strong);
198
+ }
199
+
200
+ .nx-markdown img {
201
+ max-width: 100%;
202
+ height: auto;
203
+ border-radius: var(--nx-radius-sm);
204
+ vertical-align: middle;
205
+ }
206
+
207
+ .nx-markdown del {
208
+ color: var(--nx-text-muted);
209
+ }
210
+
211
+ .nx-markdown__table {
212
+ max-width: 100%;
213
+ overflow-x: auto;
214
+ }
215
+
216
+ .nx-markdown table {
217
+ border-collapse: collapse;
218
+ font-size: 0.95em;
219
+ }
220
+
221
+ .nx-markdown :is(th, td) {
222
+ padding: 0.4em 0.8em;
223
+ border: 1px solid var(--nx-border);
224
+ text-align: left;
225
+ vertical-align: top;
226
+ }
227
+
228
+ .nx-markdown th {
229
+ background: color-mix(in oklab, var(--nx-text) 4%, transparent);
230
+ font-weight: 600;
231
+ }
232
+
233
+ .nx-markdown__empty {
234
+ color: var(--nx-text-muted);
235
+ font-style: italic;
236
+ }
237
+ }