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,147 +1,144 @@
1
- @layer nexus.components {
2
- /*
3
- * Time picker: the box lines digits up, and its panel opens in a popover placed by the component. The panel shows
4
- * columns of hours, minutes, seconds, and AM/PM whose chosen items scroll to the middle row, so the chosen time reads
5
- * as one line with its neighbours above and below; or a single list of slots. Chosen items are solid primary, like
6
- * the calendar's chosen day.
7
- */
8
- .nx-field__control--time {
9
- font-variant-numeric: tabular-nums;
10
- }
11
-
12
- .nx-field__action--clock[aria-expanded="true"] {
13
- color: var(--nx-field-accent);
14
- }
15
-
16
- .nx-time-popover {
17
- position: fixed;
18
- inset: auto;
19
- padding: 0;
20
- }
21
-
22
- .nx-time {
23
- --nx-time-item: 32px;
24
- --nx-time-rows: 7;
25
- --nx-time-bg: light-dark(var(--nx-surface), var(--nx-surface-2));
26
- --nx-time-scrollbar: color-mix(in oklab, var(--nx-text-subtle) 75%, transparent);
27
-
28
- display: grid;
29
- color: var(--nx-text);
30
- font-size: var(--nx-text-sm);
31
- line-height: 1.3;
32
- user-select: none;
33
- }
34
-
35
- .nx-time__columns {
36
- display: flex;
37
- padding: var(--nx-space-1);
38
- }
39
-
40
- /* A column scrolls; the space before its first item and after its last lets both reach the middle row. */
41
- .nx-time__column {
42
- position: relative;
43
- width: 56px;
44
- height: calc(var(--nx-time-item) * var(--nx-time-rows));
45
- padding: calc(var(--nx-time-item) * (var(--nx-time-rows) - 1) / 2) var(--nx-space-1);
46
- overflow-y: auto;
47
- overscroll-behavior: contain;
48
- outline: none;
49
- scrollbar-width: thin;
50
- scrollbar-color: transparent transparent;
51
- transition: scrollbar-color var(--nx-duration);
52
- }
53
-
54
- .nx-time__column--meridiem {
55
- width: auto;
56
- min-width: 56px;
57
- }
58
-
59
- .nx-time__column:is(:hover, :focus-within) {
60
- scrollbar-color: var(--nx-time-scrollbar) transparent;
61
- }
62
-
63
- .nx-time__column + .nx-time__column {
64
- border-left: 1px solid var(--nx-border);
65
- }
66
-
67
- .nx-time__item {
68
- display: grid;
69
- place-items: center;
70
- height: var(--nx-time-item);
71
- padding: 0 var(--nx-space-2);
72
- border-radius: var(--nx-radius);
73
- font-variant-numeric: tabular-nums;
74
- white-space: nowrap;
75
- cursor: pointer;
76
- outline: none;
77
- transition:
78
- background-color var(--nx-duration),
79
- color var(--nx-duration);
80
- }
81
-
82
- .nx-time__item:hover:not([aria-disabled="true"], [aria-selected="true"]) {
83
- background: var(--nx-surface-hover);
84
- }
85
-
86
- .nx-time__item[aria-selected="true"] {
87
- background: var(--nx-primary-solid);
88
- color: var(--nx-primary-text);
89
- font-weight: 600;
90
- }
91
-
92
- /* An inset ring, so the column does not clip it, with a band of the panel's color that shows on a chosen item. */
93
- .nx-time__item:focus-visible {
94
- box-shadow:
95
- inset 0 0 0 2px var(--nx-primary),
96
- inset 0 0 0 4px var(--nx-time-bg);
97
- }
98
-
99
- .nx-time__item[aria-disabled="true"] {
100
- color: var(--nx-text-subtle);
101
- opacity: 0.45;
102
- cursor: default;
103
- }
104
-
105
- .nx-time__item[aria-disabled="true"][aria-selected="true"] {
106
- color: var(--nx-primary-text);
107
- opacity: 0.7;
108
- }
109
-
110
- .nx-time__foot {
111
- display: flex;
112
- justify-content: space-between;
113
- gap: var(--nx-space-2);
114
- padding: 6px var(--nx-space-2);
115
- border-top: 1px solid var(--nx-border);
116
- }
117
-
118
- /* List of slots */
119
- .nx-time__list {
120
- position: relative;
121
- min-width: 132px;
122
- max-height: calc(var(--nx-time-item) * 8 + var(--nx-space-2));
123
- padding: var(--nx-space-1);
124
- overflow-y: auto;
125
- overscroll-behavior: contain;
126
- outline: none;
127
- scrollbar-width: thin;
128
- scrollbar-color: var(--nx-time-scrollbar) transparent;
129
- }
130
-
131
- .nx-time__slot {
132
- place-items: center start;
133
- padding: 0 var(--nx-space-3);
134
- }
135
-
136
- .nx-time__empty {
137
- padding: var(--nx-space-2) var(--nx-space-3);
138
- color: var(--nx-text-muted);
139
- }
140
-
141
- @media (prefers-reduced-motion: reduce) {
142
- .nx-time__item,
143
- .nx-time__column {
144
- transition: none;
145
- }
146
- }
147
- }
1
+ @layer nexus.components {
2
+ /*
3
+ * Time picker: the box lines digits up, and its panel opens in a popover placed by the component. The panel shows
4
+ * columns of hours, minutes, seconds, and AM/PM whose chosen items scroll to the middle row, so the chosen time reads
5
+ * as one line with its neighbours above and below; or a single list of slots. Chosen items are solid primary, like
6
+ * the calendar's chosen day.
7
+ */
8
+ .nx-field__control--time {
9
+ font-variant-numeric: tabular-nums;
10
+ }
11
+
12
+ .nx-field__action--clock[aria-expanded="true"] {
13
+ color: var(--nx-field-accent);
14
+ }
15
+
16
+ .nx-time-popover {
17
+ position: fixed;
18
+ inset: auto;
19
+ padding: 0;
20
+ }
21
+
22
+ .nx-time {
23
+ --nx-time-item: 32px;
24
+ --nx-time-rows: 7;
25
+ --nx-time-bg: light-dark(var(--nx-surface), var(--nx-surface-2));
26
+
27
+ display: grid;
28
+ color: var(--nx-text);
29
+ font-size: var(--nx-text-sm);
30
+ line-height: 1.3;
31
+ user-select: none;
32
+ }
33
+
34
+ .nx-time__columns {
35
+ display: flex;
36
+ padding: var(--nx-space-1);
37
+ }
38
+
39
+ /* A column scrolls; the space before its first item and after its last lets both reach the middle row. */
40
+ .nx-time__column {
41
+ position: relative;
42
+ width: 56px;
43
+ height: calc(var(--nx-time-item) * var(--nx-time-rows));
44
+ padding: calc(var(--nx-time-item) * (var(--nx-time-rows) - 1) / 2) var(--nx-space-1);
45
+ overflow-y: auto;
46
+ overscroll-behavior: contain;
47
+ outline: none;
48
+ transition: scrollbar-color var(--nx-duration);
49
+ }
50
+
51
+ .nx-time__column--meridiem {
52
+ width: auto;
53
+ min-width: 56px;
54
+ }
55
+
56
+ /*
57
+ * The columns stand side by side, so a bar in each would draw a stripe between every pair: the thumb stays hidden
58
+ * until the pointer or the keys are in the column, and then it is the shared bar (Nexus.Base.css).
59
+ */
60
+ .nx-time__column:not(:hover, :focus-within) {
61
+ scrollbar-color: transparent transparent;
62
+ }
63
+
64
+ .nx-time__column + .nx-time__column {
65
+ border-left: 1px solid var(--nx-border);
66
+ }
67
+
68
+ .nx-time__item {
69
+ display: grid;
70
+ place-items: center;
71
+ height: var(--nx-time-item);
72
+ padding: 0 var(--nx-space-2);
73
+ border-radius: var(--nx-radius);
74
+ font-variant-numeric: tabular-nums;
75
+ white-space: nowrap;
76
+ cursor: pointer;
77
+ outline: none;
78
+ transition:
79
+ background-color var(--nx-duration),
80
+ color var(--nx-duration);
81
+ }
82
+
83
+ .nx-time__item:hover:not([aria-disabled="true"], [aria-selected="true"]) {
84
+ background: var(--nx-surface-hover);
85
+ }
86
+
87
+ .nx-time__item[aria-selected="true"] {
88
+ background: var(--nx-primary-solid);
89
+ color: var(--nx-primary-text);
90
+ font-weight: 600;
91
+ }
92
+
93
+ /* An inset ring, so the column does not clip it, with a band of the panel's color that shows on a chosen item. */
94
+ .nx-time__item:focus-visible {
95
+ box-shadow:
96
+ inset 0 0 0 2px var(--nx-primary),
97
+ inset 0 0 0 4px var(--nx-time-bg);
98
+ }
99
+
100
+ .nx-time__item[aria-disabled="true"] {
101
+ color: var(--nx-text-subtle);
102
+ opacity: 0.45;
103
+ cursor: default;
104
+ }
105
+
106
+ .nx-time__item[aria-disabled="true"][aria-selected="true"] {
107
+ color: var(--nx-primary-text);
108
+ opacity: 0.7;
109
+ }
110
+
111
+ .nx-time__foot {
112
+ display: flex;
113
+ justify-content: space-between;
114
+ gap: var(--nx-space-2);
115
+ padding: 6px var(--nx-space-2);
116
+ border-top: 1px solid var(--nx-border);
117
+ }
118
+
119
+ /* List of slots */
120
+ .nx-time__list {
121
+ position: relative;
122
+ min-width: 132px;
123
+ max-height: calc(var(--nx-time-item) * 8 + var(--nx-space-2));
124
+ padding: var(--nx-space-1);
125
+ overflow-y: auto;
126
+ overscroll-behavior: contain;
127
+ outline: none;
128
+ }
129
+
130
+ .nx-time__slot {
131
+ place-items: center start;
132
+ padding: 0 var(--nx-space-3);
133
+ }
134
+
135
+ .nx-time__empty {
136
+ padding: var(--nx-space-2) var(--nx-space-3);
137
+ color: var(--nx-text-muted);
138
+ }
139
+
140
+ [data-nx-motion="reduce"] .nx-time__item,
141
+ [data-nx-motion="reduce"] .nx-time__column {
142
+ transition: none;
143
+ }
144
+ }