nexus-shared 2.0.0 → 3.0.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 (116) hide show
  1. package/CHANGELOG.md +262 -0
  2. package/README.md +122 -25
  3. package/dist/Client.Index.d.ts +11 -0
  4. package/dist/Client.Index.js +11 -0
  5. package/dist/Components/Chats/Chat.d.ts +28 -0
  6. package/dist/Components/Chats/Chat.js +19 -0
  7. package/dist/Components/Chats/ChatButton.d.ts +26 -0
  8. package/dist/Components/Chats/ChatButton.js +41 -0
  9. package/dist/Components/Chats/ChatComposer.d.ts +41 -0
  10. package/dist/Components/Chats/ChatComposer.js +177 -0
  11. package/dist/Components/Chats/ChatConversations.d.ts +35 -0
  12. package/dist/Components/Chats/ChatConversations.js +38 -0
  13. package/dist/Components/Chats/ChatPanel.d.ts +66 -0
  14. package/dist/Components/Chats/ChatPanel.js +94 -0
  15. package/dist/Components/Chats/ChatParts.d.ts +87 -0
  16. package/dist/Components/Chats/ChatParts.js +100 -0
  17. package/dist/Components/Chats/ChatThread.d.ts +22 -0
  18. package/dist/Components/Chats/ChatThread.js +96 -0
  19. package/dist/Components/Documents/Menu.js +24 -20
  20. package/dist/Components/Documents/SplitButton.js +5 -3
  21. package/dist/Components/Documents/TabButtons.d.ts +24 -6
  22. package/dist/Components/Documents/TabButtons.js +23 -4
  23. package/dist/Components/Forms/ApiForm.d.ts +6 -4
  24. package/dist/Components/Forms/ApiForm.js +15 -14
  25. package/dist/Components/Forms/Crud.js +202 -50
  26. package/dist/Components/Forms/ExcelImport.d.ts +42 -0
  27. package/dist/Components/Forms/ExcelImport.js +190 -0
  28. package/dist/Components/Forms/Form.js +5 -1
  29. package/dist/Components/Inputs/DateTimePicker.js +2 -1
  30. package/dist/Components/Inputs/GroupForm.js +4 -2
  31. package/dist/Components/Inputs/InputRenderer.d.ts +2 -0
  32. package/dist/Components/Inputs/InputRenderer.js +1 -1
  33. package/dist/Components/Inputs/ReadOnlyNotice.js +2 -1
  34. package/dist/Components/Inputs/RowsInput.d.ts +12 -1
  35. package/dist/Components/Inputs/RowsInput.js +53 -4
  36. package/dist/Components/Inputs/TabularForm.d.ts +7 -3
  37. package/dist/Components/Inputs/TabularForm.js +85 -20
  38. package/dist/Components/Inputs/TimePicker.js +2 -1
  39. package/dist/Components/Layouts/ThemeSwitcher.d.ts +2 -2
  40. package/dist/Components/Layouts/ThemeSwitcher.js +35 -15
  41. package/dist/Components/Viewers/DataTable.js +88 -34
  42. package/dist/Components/Viewers/DataTableColumns.d.ts +28 -0
  43. package/dist/Components/Viewers/DataTableColumns.js +243 -0
  44. package/dist/Components/Viewers/DataTableParts.d.ts +6 -2
  45. package/dist/Components/Viewers/DataTableParts.js +21 -9
  46. package/dist/Helpers/ApiClient.d.ts +22 -0
  47. package/dist/Helpers/ApiClient.js +4 -1
  48. package/dist/Helpers/ApiFormHelpers.d.ts +27 -4
  49. package/dist/Helpers/ApiFormHelpers.js +73 -9
  50. package/dist/Helpers/ApiModules.d.ts +0 -4
  51. package/dist/Helpers/ApiModules.js +1 -0
  52. package/dist/Helpers/ApiResponses.d.ts +14 -4
  53. package/dist/Helpers/ApiResponses.js +116 -25
  54. package/dist/Helpers/ApiRoutes.d.ts +0 -10
  55. package/dist/Helpers/ApiRoutes.js +2 -10
  56. package/dist/Helpers/ChatBackend.d.ts +134 -0
  57. package/dist/Helpers/ChatBackend.js +332 -0
  58. package/dist/Helpers/ChatHelpers.d.ts +189 -0
  59. package/dist/Helpers/ChatHelpers.js +486 -0
  60. package/dist/Helpers/ChatHooks.d.ts +81 -0
  61. package/dist/Helpers/ChatHooks.js +175 -0
  62. package/dist/Helpers/ChatStore.d.ts +132 -0
  63. package/dist/Helpers/ChatStore.js +394 -0
  64. package/dist/Helpers/ChatSummaries.d.ts +39 -0
  65. package/dist/Helpers/ChatSummaries.js +118 -0
  66. package/dist/Helpers/CrudBackend.d.ts +47 -5
  67. package/dist/Helpers/CrudBackend.js +99 -4
  68. package/dist/Helpers/CrudHelpers.d.ts +39 -4
  69. package/dist/Helpers/CrudHelpers.js +76 -11
  70. package/dist/Helpers/ExcelBackend.d.ts +106 -0
  71. package/dist/Helpers/ExcelBackend.js +290 -0
  72. package/dist/Helpers/ExcelHelpers.d.ts +98 -0
  73. package/dist/Helpers/ExcelHelpers.js +302 -0
  74. package/dist/Helpers/FormStore.d.ts +2 -0
  75. package/dist/Helpers/FormStore.js +19 -1
  76. package/dist/Helpers/MessageBuilder.js +0 -2
  77. package/dist/Helpers/PopoverHelpers.d.ts +31 -6
  78. package/dist/Helpers/PopoverHelpers.js +116 -12
  79. package/dist/Helpers/RowsStore.d.ts +7 -1
  80. package/dist/Helpers/RowsStore.js +22 -0
  81. package/dist/Helpers/TableColumns.d.ts +7 -0
  82. package/dist/Helpers/TableColumns.js +41 -13
  83. package/dist/Helpers/TableHelpers.d.ts +9 -1
  84. package/dist/Helpers/TableHelpers.js +20 -0
  85. package/dist/Interfaces/ApiInterfaces.d.ts +29 -4
  86. package/dist/Interfaces/ApiInterfaces.js +16 -10
  87. package/dist/Interfaces/ChatInterfaces.d.ts +240 -0
  88. package/dist/Interfaces/ChatInterfaces.js +1 -0
  89. package/dist/Interfaces/CrudInterfaces.d.ts +73 -12
  90. package/dist/Interfaces/ExcelInterfaces.d.ts +215 -0
  91. package/dist/Interfaces/ExcelInterfaces.js +45 -0
  92. package/dist/Interfaces/FormInterfaces.d.ts +52 -2
  93. package/dist/Interfaces/MessageInterfaces.d.ts +1 -1
  94. package/dist/Interfaces/TableInterfaces.d.ts +62 -2
  95. package/dist/Services/BrowserApi.d.ts +18 -1
  96. package/dist/Services/BrowserApi.js +18 -0
  97. package/dist/Services/ChatApi.d.ts +37 -0
  98. package/dist/Services/ChatApi.js +98 -0
  99. package/dist/Services/ExcelApi.d.ts +46 -0
  100. package/dist/Services/ExcelApi.js +196 -0
  101. package/dist/Services/ServerApi.d.ts +6 -1
  102. package/dist/Services/ServerApi.js +3 -0
  103. package/dist/Shared.Index.d.ts +8 -0
  104. package/dist/Shared.Index.js +8 -0
  105. package/package.json +6 -3
  106. package/src/Styles/Nexus.Button.css +2 -0
  107. package/src/Styles/Nexus.Chat.css +1489 -0
  108. package/src/Styles/Nexus.Crud.css +77 -0
  109. package/src/Styles/Nexus.Excel.css +370 -0
  110. package/src/Styles/Nexus.Form.css +23 -0
  111. package/src/Styles/Nexus.Index.css +2 -0
  112. package/src/Styles/Nexus.Menu.css +12 -2
  113. package/src/Styles/Nexus.Rows.css +78 -48
  114. package/src/Styles/Nexus.Tab.Buttons.css +55 -0
  115. package/src/Styles/Nexus.Table.css +286 -4
  116. package/src/Styles/Nexus.Theme.Picker.css +75 -2
@@ -1,21 +1,94 @@
1
1
  @layer nexus.components {
2
2
  /* Popover panel: a native [popover] element, placed by the component that opens it. In dark mode it is a step
3
- lighter than the surface it floats over, so it reads as raised. */
3
+ lighter than the surface it floats over, so it reads as raised.
4
+ (The shared panel lives in the theme picker's file because that is where it was first needed; it belongs to
5
+ every popover, not to the picker. Moving it would have to move its place in Nexus.Index.css with it.) */
4
6
  .nx-popover {
7
+ /* The arrow's base and depth. Keep in step with ARROW_BASE and ARROW_DEPTH in Helpers/PopoverHelpers.ts, which
8
+ work out the room the arrow needs, and with the two paths below, which are drawn for exactly these. */
9
+ --nx-popover-arrow: 26px;
10
+ --nx-popover-arrow-depth: 11px;
11
+ /* The panel's edge, shared with the arrow's own: a panel that changes it changes both. */
12
+ --nx-popover-edge: var(--nx-border);
13
+
5
14
  margin: 0;
15
+ /* The browser's own [popover] rule says `overflow: auto`, which would cut the arrow off at the panel's edge and
16
+ put a pair of scroll bars on a panel that fits. A panel that has to scroll scrolls a block inside itself. */
17
+ overflow: visible;
6
18
  padding: var(--nx-space-4);
7
- border: 1px solid var(--nx-border);
19
+ border: 1px solid var(--nx-popover-edge);
8
20
  border-radius: var(--nx-radius-lg);
9
21
  background: light-dark(var(--nx-surface), var(--nx-surface-2));
10
22
  color: var(--nx-text);
11
23
  box-shadow: var(--nx-shadow);
12
24
  }
13
25
 
26
+ /*
27
+ * The arrow that ties a panel to the button or the place it opened from: an isosceles tail, 26px across and 11px
28
+ * deep, with a slightly rounded tip. It is drawn in two layers, because a shape with a line along two of its sides
29
+ * and nothing along the third cannot be one: `::before` is the whole tail in the panel's edge colour, `::after`
30
+ * the same tail a pixel smaller on both slopes and a pixel longer at the base, in the panel's own background. What
31
+ * is left of the first between them is the 1px line along the slopes; the second covers the panel's border across
32
+ * the base, so the tail opens into the panel with no seam and no line across its mouth. Both paths are drawn for
33
+ * the sizes above: change one and the other two have to be worked out again.
34
+ *
35
+ * `placeUnderAnchor` and `placeAtPoint` (Helpers/PopoverHelpers.ts) say which edge carries the tail and where
36
+ * along that edge its tip sits, and leave both out when it would point at nothing. Nothing here animates: the tail
37
+ * is drawn with the panel, so it is there in the first frame whether the opening animation runs or not.
38
+ */
39
+ .nx-popover[data-nx-arrow]::before,
40
+ .nx-popover[data-nx-arrow]::after {
41
+ content: "";
42
+ position: absolute;
43
+ /* The middle is only a fallback: the two are always written together, and taken away together. */
44
+ left: var(--nx-popover-arrow-x, 50%);
45
+ width: var(--nx-popover-arrow);
46
+ /* A pixel past the tail's depth: the panel's own border, which the fill covers. */
47
+ height: calc(var(--nx-popover-arrow-depth) + 1px);
48
+ margin-left: calc(var(--nx-popover-arrow) / -2);
49
+ }
50
+
51
+ /* The tail's outline: tip rounded by 2px, feet on the panel's border line. */
52
+ .nx-popover[data-nx-arrow]::before {
53
+ background: var(--nx-popover-edge);
54
+ clip-path: path("M 0 11 L 11.708 1.093 A 2 2 0 0 1 14.292 1.093 L 26 11 Z");
55
+ }
56
+
57
+ /* The fill: the same tail, 1px in from each slope (so the outline is left as a line) and 1px further down. */
58
+ .nx-popover[data-nx-arrow]::after {
59
+ background: inherit;
60
+ clip-path: path("M 0.367 12 L 12.354 1.857 A 1 1 0 0 1 13.646 1.857 L 25.633 12 Z");
61
+ }
62
+
63
+ /* Below its anchor: the tail stands on the panel's top edge, pointing up. */
64
+ .nx-popover[data-nx-arrow="below"]::before,
65
+ .nx-popover[data-nx-arrow="below"]::after {
66
+ top: calc(-1px - var(--nx-popover-arrow-depth));
67
+ }
68
+
69
+ /* Above its anchor: the same tail turned over, on the bottom edge. */
70
+ .nx-popover[data-nx-arrow="above"]::before,
71
+ .nx-popover[data-nx-arrow="above"]::after {
72
+ bottom: calc(-1px - var(--nx-popover-arrow-depth));
73
+ transform: scaleY(-1);
74
+ }
75
+
14
76
  .nx-theme-switcher__panel {
15
77
  position: fixed;
16
78
  inset: auto;
17
79
  width: min(340px, calc(100vw - 16px));
18
80
  max-height: calc(100vh - 80px);
81
+ }
82
+
83
+ /* A shut popover is hidden by the browser, so the panel takes its layout only while it is open. */
84
+ .nx-theme-switcher__panel:popover-open {
85
+ display: flex;
86
+ }
87
+
88
+ /* The picker scrolls, not the panel: a panel that scrolls its own box would cut its arrow off. */
89
+ .nx-theme-switcher__panel > .nx-theme-picker {
90
+ flex: 1 1 auto;
91
+ min-height: 0;
19
92
  overflow-y: auto;
20
93
  overscroll-behavior: contain;
21
94
  }