@vuu-ui/vuu-shell 2.1.18 → 2.1.19-beta.2

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 (254) hide show
  1. package/package.json +17 -20
  2. package/src/ShellContextProvider.js +20 -0
  3. package/src/app-header/AppHeader.css.js +21 -0
  4. package/src/app-header/AppHeader.js +97 -0
  5. package/src/app-header/index.js +1 -0
  6. package/src/application-provider/ApplicationContext.js +9 -0
  7. package/src/application-provider/ApplicationProvider.js +77 -0
  8. package/src/application-provider/index.js +1 -0
  9. package/src/feature/Feature.js +37 -0
  10. package/src/feature/FeatureErrorBoundary.js +33 -0
  11. package/src/feature/Loader.js +5 -0
  12. package/src/feature/index.js +1 -0
  13. package/src/feature-and-layout-provider/FeatureAndLayoutProvider.js +42 -0
  14. package/src/feature-and-layout-provider/index.js +1 -0
  15. package/src/feature-list/FeatureList.css.js +62 -0
  16. package/src/feature-list/FeatureList.js +128 -0
  17. package/src/feature-list/index.js +1 -0
  18. package/src/get-layout-history.js +7 -0
  19. package/src/index.js +14 -0
  20. package/src/left-nav/LeftNav.css.js +177 -0
  21. package/src/left-nav/LeftNav.js +193 -0
  22. package/src/left-nav/index.js +1 -0
  23. package/src/login/LoginPanel.css.js +72 -0
  24. package/src/login/LoginPanel.js +124 -0
  25. package/src/login/VuuLogo.js +108 -0
  26. package/src/persistence-manager/LocalPersistenceManager.js +156 -0
  27. package/src/persistence-manager/PersistenceManager.js +0 -0
  28. package/src/persistence-manager/PersistenceProvider.js +14 -0
  29. package/src/persistence-manager/RemotePersistenceManager.js +123 -0
  30. package/src/persistence-manager/StaticPersistenceManager.js +53 -0
  31. package/src/persistence-manager/index.js +5 -0
  32. package/src/shell-layout-templates/context-panel/ContextPanel.css.js +66 -0
  33. package/src/shell-layout-templates/context-panel/ContextPanel.js +92 -0
  34. package/src/shell-layout-templates/context-panel/index.js +1 -0
  35. package/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +44 -0
  36. package/src/shell-layout-templates/index.js +3 -0
  37. package/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +68 -0
  38. package/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +32 -0
  39. package/src/shell-layout-templates/side-panel/SidePanel.css.js +9 -0
  40. package/src/shell-layout-templates/side-panel/SidePanel.js +31 -0
  41. package/src/shell-layout-templates/side-panel/index.js +1 -0
  42. package/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +38 -0
  43. package/src/shell-layout-templates/useShellLayout.js +15 -0
  44. package/src/shell.css.js +59 -0
  45. package/src/shell.js +108 -0
  46. package/src/theme-switch/ThemeSwitch.css.js +34 -0
  47. package/src/theme-switch/ThemeSwitch.js +50 -0
  48. package/src/theme-switch/index.js +1 -0
  49. package/src/user-settings/SettingsForm.css.js +10 -0
  50. package/src/user-settings/SettingsForm.js +141 -0
  51. package/src/user-settings/UserSettingsPanel.css.js +9 -0
  52. package/src/user-settings/UserSettingsPanel.js +29 -0
  53. package/src/user-settings/index.js +2 -0
  54. package/src/workspace-management/LayoutList.css.js +74 -0
  55. package/src/workspace-management/LayoutList.js +130 -0
  56. package/src/workspace-management/LayoutTile.css.js +31 -0
  57. package/src/workspace-management/LayoutTile.js +41 -0
  58. package/src/workspace-management/SaveLayoutPanel.css.js +123 -0
  59. package/src/workspace-management/SaveLayoutPanel.js +141 -0
  60. package/src/workspace-management/WorkspaceProvider.js +209 -0
  61. package/src/workspace-management/defaultWorkspaceJSON.js +88 -0
  62. package/src/workspace-management/index.js +5 -0
  63. package/src/workspace-management/screenshot-utils.js +13 -0
  64. package/src/workspace-management/useWorkspaceContextMenuItems.js +58 -0
  65. package/types/feature/FeatureErrorBoundary.d.ts +1 -1
  66. package/types/workspace-management/WorkspaceProvider.d.ts +5 -5
  67. package/cjs/ShellContextProvider.js +0 -25
  68. package/cjs/ShellContextProvider.js.map +0 -1
  69. package/cjs/app-header/AppHeader.css.js +0 -6
  70. package/cjs/app-header/AppHeader.css.js.map +0 -1
  71. package/cjs/app-header/AppHeader.js +0 -118
  72. package/cjs/app-header/AppHeader.js.map +0 -1
  73. package/cjs/application-provider/ApplicationContext.js +0 -17
  74. package/cjs/application-provider/ApplicationContext.js.map +0 -1
  75. package/cjs/application-provider/ApplicationProvider.js +0 -102
  76. package/cjs/application-provider/ApplicationProvider.js.map +0 -1
  77. package/cjs/feature/Feature.js +0 -54
  78. package/cjs/feature/Feature.js.map +0 -1
  79. package/cjs/feature/FeatureErrorBoundary.js +0 -30
  80. package/cjs/feature/FeatureErrorBoundary.js.map +0 -1
  81. package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js +0 -60
  82. package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +0 -1
  83. package/cjs/feature-list/FeatureList.css.js +0 -6
  84. package/cjs/feature-list/FeatureList.css.js.map +0 -1
  85. package/cjs/feature-list/FeatureList.js +0 -109
  86. package/cjs/feature-list/FeatureList.js.map +0 -1
  87. package/cjs/index.js +0 -71
  88. package/cjs/index.js.map +0 -1
  89. package/cjs/left-nav/LeftNav.css.js +0 -6
  90. package/cjs/left-nav/LeftNav.css.js.map +0 -1
  91. package/cjs/left-nav/LeftNav.js +0 -202
  92. package/cjs/left-nav/LeftNav.js.map +0 -1
  93. package/cjs/login/LoginPanel.css.js +0 -6
  94. package/cjs/login/LoginPanel.css.js.map +0 -1
  95. package/cjs/login/LoginPanel.js +0 -110
  96. package/cjs/login/LoginPanel.js.map +0 -1
  97. package/cjs/login/VuuLogo.js +0 -134
  98. package/cjs/login/VuuLogo.js.map +0 -1
  99. package/cjs/persistence-manager/LocalPersistenceManager.js +0 -193
  100. package/cjs/persistence-manager/LocalPersistenceManager.js.map +0 -1
  101. package/cjs/persistence-manager/PersistenceProvider.js +0 -21
  102. package/cjs/persistence-manager/PersistenceProvider.js.map +0 -1
  103. package/cjs/persistence-manager/RemotePersistenceManager.js +0 -165
  104. package/cjs/persistence-manager/RemotePersistenceManager.js.map +0 -1
  105. package/cjs/persistence-manager/StaticPersistenceManager.js +0 -73
  106. package/cjs/persistence-manager/StaticPersistenceManager.js.map +0 -1
  107. package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js +0 -6
  108. package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js.map +0 -1
  109. package/cjs/shell-layout-templates/context-panel/ContextPanel.js +0 -100
  110. package/cjs/shell-layout-templates/context-panel/ContextPanel.js.map +0 -1
  111. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +0 -51
  112. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +0 -1
  113. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +0 -83
  114. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +0 -1
  115. package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +0 -46
  116. package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +0 -1
  117. package/cjs/shell-layout-templates/side-panel/SidePanel.css.js +0 -6
  118. package/cjs/shell-layout-templates/side-panel/SidePanel.css.js.map +0 -1
  119. package/cjs/shell-layout-templates/side-panel/SidePanel.js +0 -36
  120. package/cjs/shell-layout-templates/side-panel/SidePanel.js.map +0 -1
  121. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +0 -48
  122. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +0 -1
  123. package/cjs/shell-layout-templates/useShellLayout.js +0 -23
  124. package/cjs/shell-layout-templates/useShellLayout.js.map +0 -1
  125. package/cjs/shell.css.js +0 -6
  126. package/cjs/shell.css.js.map +0 -1
  127. package/cjs/shell.js +0 -137
  128. package/cjs/shell.js.map +0 -1
  129. package/cjs/theme-switch/ThemeSwitch.css.js +0 -6
  130. package/cjs/theme-switch/ThemeSwitch.css.js.map +0 -1
  131. package/cjs/theme-switch/ThemeSwitch.js +0 -56
  132. package/cjs/theme-switch/ThemeSwitch.js.map +0 -1
  133. package/cjs/user-settings/SettingsForm.css.js +0 -6
  134. package/cjs/user-settings/SettingsForm.css.js.map +0 -1
  135. package/cjs/user-settings/SettingsForm.js +0 -168
  136. package/cjs/user-settings/SettingsForm.js.map +0 -1
  137. package/cjs/user-settings/UserSettingsPanel.css.js +0 -6
  138. package/cjs/user-settings/UserSettingsPanel.css.js.map +0 -1
  139. package/cjs/user-settings/UserSettingsPanel.js +0 -42
  140. package/cjs/user-settings/UserSettingsPanel.js.map +0 -1
  141. package/cjs/workspace-management/LayoutList.css.js +0 -6
  142. package/cjs/workspace-management/LayoutList.css.js.map +0 -1
  143. package/cjs/workspace-management/LayoutList.js +0 -116
  144. package/cjs/workspace-management/LayoutList.js.map +0 -1
  145. package/cjs/workspace-management/LayoutTile.css.js +0 -6
  146. package/cjs/workspace-management/LayoutTile.css.js.map +0 -1
  147. package/cjs/workspace-management/LayoutTile.js +0 -41
  148. package/cjs/workspace-management/LayoutTile.js.map +0 -1
  149. package/cjs/workspace-management/SaveLayoutPanel.css.js +0 -6
  150. package/cjs/workspace-management/SaveLayoutPanel.css.js.map +0 -1
  151. package/cjs/workspace-management/SaveLayoutPanel.js +0 -128
  152. package/cjs/workspace-management/SaveLayoutPanel.js.map +0 -1
  153. package/cjs/workspace-management/WorkspaceProvider.js +0 -265
  154. package/cjs/workspace-management/WorkspaceProvider.js.map +0 -1
  155. package/cjs/workspace-management/defaultWorkspaceJSON.js +0 -101
  156. package/cjs/workspace-management/defaultWorkspaceJSON.js.map +0 -1
  157. package/cjs/workspace-management/screenshot-utils.js +0 -25
  158. package/cjs/workspace-management/screenshot-utils.js.map +0 -1
  159. package/cjs/workspace-management/useWorkspaceContextMenuItems.js +0 -72
  160. package/cjs/workspace-management/useWorkspaceContextMenuItems.js.map +0 -1
  161. package/esm/ShellContextProvider.js +0 -23
  162. package/esm/ShellContextProvider.js.map +0 -1
  163. package/esm/app-header/AppHeader.css.js +0 -4
  164. package/esm/app-header/AppHeader.css.js.map +0 -1
  165. package/esm/app-header/AppHeader.js +0 -116
  166. package/esm/app-header/AppHeader.js.map +0 -1
  167. package/esm/application-provider/ApplicationContext.js +0 -15
  168. package/esm/application-provider/ApplicationContext.js.map +0 -1
  169. package/esm/application-provider/ApplicationProvider.js +0 -96
  170. package/esm/application-provider/ApplicationProvider.js.map +0 -1
  171. package/esm/feature/Feature.js +0 -52
  172. package/esm/feature/Feature.js.map +0 -1
  173. package/esm/feature/FeatureErrorBoundary.js +0 -28
  174. package/esm/feature/FeatureErrorBoundary.js.map +0 -1
  175. package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js +0 -56
  176. package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +0 -1
  177. package/esm/feature-list/FeatureList.css.js +0 -4
  178. package/esm/feature-list/FeatureList.css.js.map +0 -1
  179. package/esm/feature-list/FeatureList.js +0 -107
  180. package/esm/feature-list/FeatureList.js.map +0 -1
  181. package/esm/index.js +0 -25
  182. package/esm/index.js.map +0 -1
  183. package/esm/left-nav/LeftNav.css.js +0 -4
  184. package/esm/left-nav/LeftNav.css.js.map +0 -1
  185. package/esm/left-nav/LeftNav.js +0 -200
  186. package/esm/left-nav/LeftNav.js.map +0 -1
  187. package/esm/login/LoginPanel.css.js +0 -4
  188. package/esm/login/LoginPanel.css.js.map +0 -1
  189. package/esm/login/LoginPanel.js +0 -108
  190. package/esm/login/LoginPanel.js.map +0 -1
  191. package/esm/login/VuuLogo.js +0 -132
  192. package/esm/login/VuuLogo.js.map +0 -1
  193. package/esm/persistence-manager/LocalPersistenceManager.js +0 -191
  194. package/esm/persistence-manager/LocalPersistenceManager.js.map +0 -1
  195. package/esm/persistence-manager/PersistenceProvider.js +0 -17
  196. package/esm/persistence-manager/PersistenceProvider.js.map +0 -1
  197. package/esm/persistence-manager/RemotePersistenceManager.js +0 -163
  198. package/esm/persistence-manager/RemotePersistenceManager.js.map +0 -1
  199. package/esm/persistence-manager/StaticPersistenceManager.js +0 -71
  200. package/esm/persistence-manager/StaticPersistenceManager.js.map +0 -1
  201. package/esm/shell-layout-templates/context-panel/ContextPanel.css.js +0 -4
  202. package/esm/shell-layout-templates/context-panel/ContextPanel.css.js.map +0 -1
  203. package/esm/shell-layout-templates/context-panel/ContextPanel.js +0 -98
  204. package/esm/shell-layout-templates/context-panel/ContextPanel.js.map +0 -1
  205. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +0 -49
  206. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +0 -1
  207. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +0 -81
  208. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +0 -1
  209. package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +0 -44
  210. package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +0 -1
  211. package/esm/shell-layout-templates/side-panel/SidePanel.css.js +0 -4
  212. package/esm/shell-layout-templates/side-panel/SidePanel.css.js.map +0 -1
  213. package/esm/shell-layout-templates/side-panel/SidePanel.js +0 -34
  214. package/esm/shell-layout-templates/side-panel/SidePanel.js.map +0 -1
  215. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +0 -46
  216. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +0 -1
  217. package/esm/shell-layout-templates/useShellLayout.js +0 -21
  218. package/esm/shell-layout-templates/useShellLayout.js.map +0 -1
  219. package/esm/shell.css.js +0 -4
  220. package/esm/shell.css.js.map +0 -1
  221. package/esm/shell.js +0 -135
  222. package/esm/shell.js.map +0 -1
  223. package/esm/theme-switch/ThemeSwitch.css.js +0 -4
  224. package/esm/theme-switch/ThemeSwitch.css.js.map +0 -1
  225. package/esm/theme-switch/ThemeSwitch.js +0 -54
  226. package/esm/theme-switch/ThemeSwitch.js.map +0 -1
  227. package/esm/user-settings/SettingsForm.css.js +0 -4
  228. package/esm/user-settings/SettingsForm.css.js.map +0 -1
  229. package/esm/user-settings/SettingsForm.js +0 -162
  230. package/esm/user-settings/SettingsForm.js.map +0 -1
  231. package/esm/user-settings/UserSettingsPanel.css.js +0 -4
  232. package/esm/user-settings/UserSettingsPanel.css.js.map +0 -1
  233. package/esm/user-settings/UserSettingsPanel.js +0 -40
  234. package/esm/user-settings/UserSettingsPanel.js.map +0 -1
  235. package/esm/workspace-management/LayoutList.css.js +0 -4
  236. package/esm/workspace-management/LayoutList.css.js.map +0 -1
  237. package/esm/workspace-management/LayoutList.js +0 -114
  238. package/esm/workspace-management/LayoutList.js.map +0 -1
  239. package/esm/workspace-management/LayoutTile.css.js +0 -4
  240. package/esm/workspace-management/LayoutTile.css.js.map +0 -1
  241. package/esm/workspace-management/LayoutTile.js +0 -39
  242. package/esm/workspace-management/LayoutTile.js.map +0 -1
  243. package/esm/workspace-management/SaveLayoutPanel.css.js +0 -4
  244. package/esm/workspace-management/SaveLayoutPanel.css.js.map +0 -1
  245. package/esm/workspace-management/SaveLayoutPanel.js +0 -126
  246. package/esm/workspace-management/SaveLayoutPanel.js.map +0 -1
  247. package/esm/workspace-management/WorkspaceProvider.js +0 -262
  248. package/esm/workspace-management/WorkspaceProvider.js.map +0 -1
  249. package/esm/workspace-management/defaultWorkspaceJSON.js +0 -95
  250. package/esm/workspace-management/defaultWorkspaceJSON.js.map +0 -1
  251. package/esm/workspace-management/screenshot-utils.js +0 -23
  252. package/esm/workspace-management/screenshot-utils.js.map +0 -1
  253. package/esm/workspace-management/useWorkspaceContextMenuItems.js +0 -70
  254. package/esm/workspace-management/useWorkspaceContextMenuItems.js.map +0 -1
@@ -1,49 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Flexbox, LayoutContainer } from '@vuu-ui/vuu-layout';
3
- import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
- import { ContextPanel } from '../context-panel/ContextPanel.js';
5
- import { SidePanel } from '../side-panel/SidePanel.js';
6
- import { useMemo } from 'react';
7
-
8
- const useFullHeightLeftPanel = ({
9
- appHeader,
10
- SidePanelProps: LeftSidePanelProps,
11
- htmlAttributes
12
- }) => useMemo(
13
- () => /* @__PURE__ */ jsxs(
14
- Flexbox,
15
- {
16
- ...htmlAttributes,
17
- style: {
18
- ...htmlAttributes?.style,
19
- flexDirection: "row"
20
- },
21
- children: [
22
- /* @__PURE__ */ jsx(SidePanel, { ...LeftSidePanelProps, id: VuuShellLocation.SidePanel }),
23
- /* @__PURE__ */ jsxs(
24
- Flexbox,
25
- {
26
- className: "vuuShell-content",
27
- style: { flex: 1, flexDirection: "column" },
28
- children: [
29
- appHeader,
30
- /* @__PURE__ */ jsx(
31
- LayoutContainer,
32
- {
33
- id: VuuShellLocation.WorkspaceContainer,
34
- style: { flex: 1 }
35
- },
36
- "main-content"
37
- )
38
- ]
39
- }
40
- ),
41
- /* @__PURE__ */ jsx(ContextPanel, { id: VuuShellLocation.ContextPanel, overlay: true })
42
- ]
43
- }
44
- ),
45
- [LeftSidePanelProps, appHeader, htmlAttributes]
46
- );
47
-
48
- export { useFullHeightLeftPanel };
49
- //# sourceMappingURL=useFullHeightLeftPanel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFullHeightLeftPanel.js","sources":["../../../../../packages/vuu-shell/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.tsx"],"sourcesContent":["import { LayoutContainer, Flexbox } from \"@vuu-ui/vuu-layout\";\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { ContextPanel } from \"../context-panel\";\nimport { SidePanel } from \"../side-panel\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\nimport { useMemo } from \"react\";\n\nexport const useFullHeightLeftPanel: ShellLayoutTemplateHook = ({\n appHeader,\n SidePanelProps: LeftSidePanelProps,\n htmlAttributes,\n}) =>\n useMemo(\n () => (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"row\",\n }}\n >\n <SidePanel {...LeftSidePanelProps} id={VuuShellLocation.SidePanel} />\n <Flexbox\n className=\"vuuShell-content\"\n style={{ flex: 1, flexDirection: \"column\" }}\n >\n {appHeader}\n <LayoutContainer\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ flex: 1 }}\n />\n </Flexbox>\n <ContextPanel id={VuuShellLocation.ContextPanel} overlay></ContextPanel>\n </Flexbox>\n ),\n [LeftSidePanelProps, appHeader, htmlAttributes],\n );\n"],"names":[],"mappings":";;;;;;;AAOO,MAAM,yBAAkD,CAAC;AAAA,EAC9D,SAAA;AAAA,EACA,cAAgB,EAAA,kBAAA;AAAA,EAChB;AACF,CACE,KAAA,OAAA;AAAA,EACE,sBACE,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,GAAG,cAAgB,EAAA,KAAA;AAAA,QACnB,aAAe,EAAA;AAAA,OACjB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAW,EAAA,EAAA,GAAG,kBAAoB,EAAA,EAAA,EAAI,iBAAiB,SAAW,EAAA,CAAA;AAAA,wBACnE,IAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,SAAU,EAAA,kBAAA;AAAA,YACV,KAAO,EAAA,EAAE,IAAM,EAAA,CAAA,EAAG,eAAe,QAAS,EAAA;AAAA,YAEzC,QAAA,EAAA;AAAA,cAAA,SAAA;AAAA,8BACD,GAAA;AAAA,gBAAC,eAAA;AAAA,gBAAA;AAAA,kBACC,IAAI,gBAAiB,CAAA,kBAAA;AAAA,kBAErB,KAAA,EAAO,EAAE,IAAA,EAAM,CAAE;AAAA,iBAAA;AAAA,gBADb;AAAA;AAEN;AAAA;AAAA,SACF;AAAA,4BACC,YAAa,EAAA,EAAA,EAAA,EAAI,gBAAiB,CAAA,YAAA,EAAc,SAAO,IAAC,EAAA;AAAA;AAAA;AAAA,GAC3D;AAAA,EAEF,CAAC,kBAAoB,EAAA,SAAA,EAAW,cAAc;AAChD;;;;"}
@@ -1,81 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Flexbox, DockLayout, LayoutContainer, Drawer, View } from '@vuu-ui/vuu-layout';
3
- import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
- import { useRef, useState, useCallback, useMemo } from 'react';
5
-
6
- const useInlayLeftPanel = ({
7
- SidePanelProps: LeftSidePanelProps,
8
- appHeader,
9
- htmlAttributes
10
- }) => {
11
- const paletteView = useRef(null);
12
- const [open, setOpen] = useState(true);
13
- const handleDrawerClick = useCallback(
14
- (e) => {
15
- const target = e.target;
16
- if (!paletteView.current?.contains(target)) {
17
- setOpen(!open);
18
- }
19
- },
20
- [open]
21
- );
22
- return useMemo(() => {
23
- const getDrawers = (leftSidePanel) => {
24
- const drawers = [];
25
- drawers.push(
26
- /* @__PURE__ */ jsx(
27
- Drawer,
28
- {
29
- onClick: handleDrawerClick,
30
- open,
31
- position: "left",
32
- inline: true,
33
- peekaboo: true,
34
- sizeOpen: 200,
35
- toggleButton: "end",
36
- children: /* @__PURE__ */ jsx(
37
- View,
38
- {
39
- className: "vuuShell-palette",
40
- id: "vw-app-palette",
41
- ref: paletteView,
42
- style: { height: "100%" },
43
- children: leftSidePanel
44
- },
45
- "app-palette"
46
- )
47
- },
48
- "left-panel"
49
- )
50
- );
51
- return drawers;
52
- };
53
- return /* @__PURE__ */ jsxs(
54
- Flexbox,
55
- {
56
- ...htmlAttributes,
57
- style: {
58
- ...htmlAttributes?.style,
59
- flexDirection: "column"
60
- },
61
- children: [
62
- appHeader,
63
- /* @__PURE__ */ jsx(DockLayout, { style: { flex: 1 }, children: getDrawers(LeftSidePanelProps?.children).concat(
64
- /* @__PURE__ */ jsx(
65
- LayoutContainer,
66
- {
67
- dropTarget: true,
68
- id: VuuShellLocation.WorkspaceContainer,
69
- style: { width: "100%", height: "100%" }
70
- },
71
- "main-content"
72
- )
73
- ) })
74
- ]
75
- }
76
- );
77
- }, [LeftSidePanelProps, appHeader, handleDrawerClick, htmlAttributes, open]);
78
- };
79
-
80
- export { useInlayLeftPanel };
81
- //# sourceMappingURL=useInlayLeftPanel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInlayLeftPanel.js","sources":["../../../../../packages/vuu-shell/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.tsx"],"sourcesContent":["import {\n DockLayout,\n LayoutContainer,\n Drawer,\n Flexbox,\n View,\n} from \"@vuu-ui/vuu-layout\";\n\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport {\n MouseEvent,\n ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\n\nexport const useInlayLeftPanel: ShellLayoutTemplateHook = ({\n SidePanelProps: LeftSidePanelProps,\n appHeader,\n htmlAttributes,\n}) => {\n const paletteView = useRef<HTMLDivElement>(null);\n const [open, setOpen] = useState(true);\n const handleDrawerClick = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n const target = e.target as HTMLElement;\n if (!paletteView.current?.contains(target)) {\n setOpen(!open);\n }\n },\n [open],\n );\n\n return useMemo(() => {\n const getDrawers = (leftSidePanel: ReactNode) => {\n const drawers: ReactElement[] = [];\n drawers.push(\n <Drawer\n key=\"left-panel\"\n onClick={handleDrawerClick}\n open={open}\n position=\"left\"\n inline\n peekaboo\n sizeOpen={200}\n toggleButton=\"end\"\n >\n <View\n className=\"vuuShell-palette\"\n id=\"vw-app-palette\"\n key=\"app-palette\"\n ref={paletteView}\n style={{ height: \"100%\" }}\n >\n {leftSidePanel}\n </View>\n </Drawer>,\n );\n\n return drawers;\n };\n\n return (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"column\",\n }}\n >\n {appHeader}\n <DockLayout style={{ flex: 1 }}>\n {getDrawers(LeftSidePanelProps?.children).concat(\n <LayoutContainer\n dropTarget\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ width: \"100%\", height: \"100%\" }}\n />,\n )}\n </DockLayout>\n </Flexbox>\n );\n }, [LeftSidePanelProps, appHeader, handleDrawerClick, htmlAttributes, open]);\n};\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,oBAA6C,CAAC;AAAA,EACzD,cAAgB,EAAA,kBAAA;AAAA,EAChB,SAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,WAAA,GAAc,OAAuB,IAAI,CAAA;AAC/C,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,IAAI,CAAA;AACrC,EAAA,MAAM,iBAAoB,GAAA,WAAA;AAAA,IACxB,CAAC,CAA+B,KAAA;AAC9B,MAAA,MAAM,SAAS,CAAE,CAAA,MAAA;AACjB,MAAA,IAAI,CAAC,WAAA,CAAY,OAAS,EAAA,QAAA,CAAS,MAAM,CAAG,EAAA;AAC1C,QAAA,OAAA,CAAQ,CAAC,IAAI,CAAA;AAAA;AACf,KACF;AAAA,IACA,CAAC,IAAI;AAAA,GACP;AAEA,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAM,MAAA,UAAA,GAAa,CAAC,aAA6B,KAAA;AAC/C,MAAA,MAAM,UAA0B,EAAC;AACjC,MAAQ,OAAA,CAAA,IAAA;AAAA,wBACN,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YAEC,OAAS,EAAA,iBAAA;AAAA,YACT,IAAA;AAAA,YACA,QAAS,EAAA,MAAA;AAAA,YACT,MAAM,EAAA,IAAA;AAAA,YACN,QAAQ,EAAA,IAAA;AAAA,YACR,QAAU,EAAA,GAAA;AAAA,YACV,YAAa,EAAA,KAAA;AAAA,YAEb,QAAA,kBAAA,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACC,SAAU,EAAA,kBAAA;AAAA,gBACV,EAAG,EAAA,gBAAA;AAAA,gBAEH,GAAK,EAAA,WAAA;AAAA,gBACL,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAO,EAAA;AAAA,gBAEvB,QAAA,EAAA;AAAA,eAAA;AAAA,cAJG;AAAA;AAKN,WAAA;AAAA,UAjBI;AAAA;AAkBN,OACF;AAEA,MAAO,OAAA,OAAA;AAAA,KACT;AAEA,IACE,uBAAA,IAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACE,GAAG,cAAA;AAAA,QACJ,KAAO,EAAA;AAAA,UACL,GAAG,cAAgB,EAAA,KAAA;AAAA,UACnB,aAAe,EAAA;AAAA,SACjB;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,0BACD,GAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAO,EAAE,IAAA,EAAM,GACxB,EAAA,QAAA,EAAA,UAAA,CAAW,kBAAoB,EAAA,QAAQ,CAAE,CAAA,MAAA;AAAA,4BACxC,GAAA;AAAA,cAAC,eAAA;AAAA,cAAA;AAAA,gBACC,UAAU,EAAA,IAAA;AAAA,gBACV,IAAI,gBAAiB,CAAA,kBAAA;AAAA,gBAErB,KAAO,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,QAAQ,MAAO;AAAA,eAAA;AAAA,cADnC;AAAA;AAEN,WAEJ,EAAA;AAAA;AAAA;AAAA,KACF;AAAA,KAED,CAAC,kBAAA,EAAoB,WAAW,iBAAmB,EAAA,cAAA,EAAgB,IAAI,CAAC,CAAA;AAC7E;;;;"}
@@ -1,44 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Flexbox, StackLayout } from '@vuu-ui/vuu-layout';
3
- import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
- import { useMemo } from 'react';
5
-
6
- const useLeftMainTabs = ({
7
- appHeader,
8
- htmlAttributes,
9
- ToolbarProps
10
- }) => {
11
- if (ToolbarProps === void 0) {
12
- throw Error("LeftMainTabs layout requires ToolbarProps");
13
- }
14
- return useMemo(() => {
15
- return /* @__PURE__ */ jsxs(
16
- Flexbox,
17
- {
18
- ...htmlAttributes,
19
- style: {
20
- ...htmlAttributes?.style,
21
- flexDirection: "column"
22
- },
23
- children: [
24
- appHeader,
25
- /* @__PURE__ */ jsx(
26
- StackLayout,
27
- {
28
- TabstripProps: {
29
- className: `${VuuShellLocation.MultiWorkspaceContainer}-tabs`
30
- },
31
- active: 0,
32
- showTabs: "left",
33
- style: { flex: 1 },
34
- id: VuuShellLocation.MultiWorkspaceContainer
35
- }
36
- )
37
- ]
38
- }
39
- );
40
- }, [appHeader, htmlAttributes]);
41
- };
42
-
43
- export { useLeftMainTabs };
44
- //# sourceMappingURL=useLeftMainTabs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLeftMainTabs.js","sources":["../../../../../packages/vuu-shell/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.tsx"],"sourcesContent":["import { Flexbox, StackLayout } from \"@vuu-ui/vuu-layout\";\n\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { useMemo } from \"react\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\n\nexport const useLeftMainTabs: ShellLayoutTemplateHook = ({\n appHeader,\n htmlAttributes,\n ToolbarProps,\n}) => {\n if (ToolbarProps === undefined) {\n throw Error(\"LeftMainTabs layout requires ToolbarProps\");\n }\n\n return useMemo(() => {\n return (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"column\",\n }}\n >\n {appHeader}\n <StackLayout\n TabstripProps={{\n className: `${VuuShellLocation.MultiWorkspaceContainer}-tabs`,\n }}\n active={0}\n showTabs=\"left\"\n style={{ flex: 1 }}\n id={VuuShellLocation.MultiWorkspaceContainer}\n />\n </Flexbox>\n );\n }, [appHeader, htmlAttributes]);\n};\n"],"names":[],"mappings":";;;;;AAMO,MAAM,kBAA2C,CAAC;AAAA,EACvD,SAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EAAA,IAAI,iBAAiB,KAAW,CAAA,EAAA;AAC9B,IAAA,MAAM,MAAM,2CAA2C,CAAA;AAAA;AAGzD,EAAA,OAAO,QAAQ,MAAM;AACnB,IACE,uBAAA,IAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACE,GAAG,cAAA;AAAA,QACJ,KAAO,EAAA;AAAA,UACL,GAAG,cAAgB,EAAA,KAAA;AAAA,UACnB,aAAe,EAAA;AAAA,SACjB;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,0BACD,GAAA;AAAA,YAAC,WAAA;AAAA,YAAA;AAAA,cACC,aAAe,EAAA;AAAA,gBACb,SAAA,EAAW,CAAG,EAAA,gBAAA,CAAiB,uBAAuB,CAAA,KAAA;AAAA,eACxD;AAAA,cACA,MAAQ,EAAA,CAAA;AAAA,cACR,QAAS,EAAA,MAAA;AAAA,cACT,KAAA,EAAO,EAAE,IAAA,EAAM,CAAE,EAAA;AAAA,cACjB,IAAI,gBAAiB,CAAA;AAAA;AAAA;AACvB;AAAA;AAAA,KACF;AAAA,GAED,EAAA,CAAC,SAAW,EAAA,cAAc,CAAC,CAAA;AAChC;;;;"}
@@ -1,4 +0,0 @@
1
- var sidePanelCss = ".vuuShellSidePanel {\n transition: width .2s ease-out;\n width: var(--shell-left-nav-size);\n}";
2
-
3
- export { sidePanelCss as default };
4
- //# sourceMappingURL=SidePanel.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidePanel.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,34 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
- import cx from 'clsx';
4
- import { useComponentCssInjection } from '@salt-ds/styles';
5
- import { useWindow } from '@salt-ds/window';
6
- import sidePanelCss from './SidePanel.css.js';
7
-
8
- const classBase = "vuuShellSidePanel";
9
- const SidePanel = ({
10
- children,
11
- open = true,
12
- sizeClosed = 90,
13
- sizeOpen = 200,
14
- style: styleProp,
15
- ...htmlAttributes
16
- }) => {
17
- const targetWindow = useWindow();
18
- useComponentCssInjection({
19
- testId: "vuu-side-panel",
20
- css: sidePanelCss,
21
- window: targetWindow
22
- });
23
- const style = useMemo(
24
- () => ({
25
- ...styleProp,
26
- "--shell-left-nav-size": open ? `${sizeOpen}px` : `${sizeClosed}px`
27
- }),
28
- [open, sizeClosed, sizeOpen, styleProp]
29
- );
30
- return /* @__PURE__ */ jsx("div", { ...htmlAttributes, className: cx(classBase), style, children });
31
- };
32
-
33
- export { SidePanel };
34
- //# sourceMappingURL=SidePanel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidePanel.js","sources":["../../../../../packages/vuu-shell/src/shell-layout-templates/side-panel/SidePanel.tsx"],"sourcesContent":["import { CSSProperties, HTMLAttributes, useMemo } from \"react\";\nimport cx from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport sidePanelCss from \"./SidePanel.css\";\n// import { useLayoutManager } from \"../../layout-management\";\n\nconst classBase = \"vuuShellSidePanel\";\n\nexport interface SidePanelProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n path?: string;\n sizeOpen?: number;\n sizeClosed?: number;\n}\n\nexport const SidePanel = ({\n children,\n open = true,\n sizeClosed = 90,\n sizeOpen = 200,\n style: styleProp,\n ...htmlAttributes\n}: SidePanelProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-side-panel\",\n css: sidePanelCss,\n window: targetWindow,\n });\n\n // const { applicationJson, saveApplicationSettings } = useLayoutManager();\n // console.log(`settings`, {\n // expanded: applicationJson?.settings?.leftNav?.expanded,\n // active: applicationJson?.settings?.leftNav?.activeTabIndex,\n // });\n\n const style = useMemo(\n () =>\n ({\n ...styleProp,\n \"--shell-left-nav-size\": open ? `${sizeOpen}px` : `${sizeClosed}px`,\n } as CSSProperties),\n [open, sizeClosed, sizeOpen, styleProp]\n );\n return (\n <div {...htmlAttributes} className={cx(classBase)} style={style}>\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,SAAY,GAAA,mBAAA;AASX,MAAM,YAAY,CAAC;AAAA,EACxB,QAAA;AAAA,EACA,IAAO,GAAA,IAAA;AAAA,EACP,UAAa,GAAA,EAAA;AAAA,EACb,QAAW,GAAA,GAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,GAAG;AACL,CAAsB,KAAA;AACpB,EAAA,MAAM,eAAe,SAAU,EAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,gBAAA;AAAA,IACR,GAAK,EAAA,YAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAQD,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,OACG;AAAA,MACC,GAAG,SAAA;AAAA,MACH,yBAAyB,IAAO,GAAA,CAAA,EAAG,QAAQ,CAAA,EAAA,CAAA,GAAO,GAAG,UAAU,CAAA,EAAA;AAAA,KACjE,CAAA;AAAA,IACF,CAAC,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,SAAS;AAAA,GACxC;AACA,EACE,uBAAA,GAAA,CAAC,SAAK,GAAG,cAAA,EAAgB,WAAW,EAAG,CAAA,SAAS,CAAG,EAAA,KAAA,EAChD,QACH,EAAA,CAAA;AAEJ;;;;"}
@@ -1,46 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Flexbox, LayoutContainer } from '@vuu-ui/vuu-layout';
3
- import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
- import { ContextPanel } from '../context-panel/ContextPanel.js';
5
- import { useMemo } from 'react';
6
-
7
- const useSimpleContentPane = ({
8
- appHeader,
9
- htmlAttributes
10
- }) => useMemo(
11
- () => /* @__PURE__ */ jsxs(
12
- Flexbox,
13
- {
14
- ...htmlAttributes,
15
- style: {
16
- ...htmlAttributes?.style,
17
- flexDirection: "row"
18
- },
19
- children: [
20
- /* @__PURE__ */ jsxs(
21
- Flexbox,
22
- {
23
- className: "vuuShell-content",
24
- style: { flex: 1, flexDirection: "column" },
25
- children: [
26
- appHeader,
27
- /* @__PURE__ */ jsx(
28
- LayoutContainer,
29
- {
30
- id: VuuShellLocation.WorkspaceContainer,
31
- style: { flex: 1 }
32
- },
33
- "main-content"
34
- )
35
- ]
36
- }
37
- ),
38
- /* @__PURE__ */ jsx(ContextPanel, { id: VuuShellLocation.ContextPanel, overlay: true })
39
- ]
40
- }
41
- ),
42
- [appHeader, htmlAttributes]
43
- );
44
-
45
- export { useSimpleContentPane };
46
- //# sourceMappingURL=useSimpleContentPane.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSimpleContentPane.js","sources":["../../../../../packages/vuu-shell/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.tsx"],"sourcesContent":["import { LayoutContainer, Flexbox } from \"@vuu-ui/vuu-layout\";\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { ContextPanel } from \"../context-panel\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\nimport { useMemo } from \"react\";\n\nexport const useSimpleContentPane: ShellLayoutTemplateHook = ({\n appHeader,\n htmlAttributes,\n}) =>\n useMemo(\n () => (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"row\",\n }}\n >\n <Flexbox\n className=\"vuuShell-content\"\n style={{ flex: 1, flexDirection: \"column\" }}\n >\n {appHeader}\n <LayoutContainer\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ flex: 1 }}\n />\n </Flexbox>\n <ContextPanel id={VuuShellLocation.ContextPanel} overlay></ContextPanel>\n </Flexbox>\n ),\n [appHeader, htmlAttributes],\n );\n"],"names":[],"mappings":";;;;;;AAMO,MAAM,uBAAgD,CAAC;AAAA,EAC5D,SAAA;AAAA,EACA;AACF,CACE,KAAA,OAAA;AAAA,EACE,sBACE,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,GAAG,cAAgB,EAAA,KAAA;AAAA,QACnB,aAAe,EAAA;AAAA,OACjB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,IAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,SAAU,EAAA,kBAAA;AAAA,YACV,KAAO,EAAA,EAAE,IAAM,EAAA,CAAA,EAAG,eAAe,QAAS,EAAA;AAAA,YAEzC,QAAA,EAAA;AAAA,cAAA,SAAA;AAAA,8BACD,GAAA;AAAA,gBAAC,eAAA;AAAA,gBAAA;AAAA,kBACC,IAAI,gBAAiB,CAAA,kBAAA;AAAA,kBAErB,KAAA,EAAO,EAAE,IAAA,EAAM,CAAE;AAAA,iBAAA;AAAA,gBADb;AAAA;AAEN;AAAA;AAAA,SACF;AAAA,4BACC,YAAa,EAAA,EAAA,EAAA,EAAI,gBAAiB,CAAA,YAAA,EAAc,SAAO,IAAC,EAAA;AAAA;AAAA;AAAA,GAC3D;AAAA,EAEF,CAAC,WAAW,cAAc;AAC5B;;;;"}
@@ -1,21 +0,0 @@
1
- import { useFullHeightLeftPanel } from './full-height-left-panel/useFullHeightLeftPanel.js';
2
- import { useInlayLeftPanel } from './inlay-left-panel/useInlayLeftPanel.js';
3
- import { useLeftMainTabs } from './left-main-tabs/useLeftMainTabs.js';
4
- import { useSimpleContentPane } from './simple-content-pane/useSimpleContentPane.js';
5
-
6
- const LayoutHook = {
7
- "full-height": useFullHeightLeftPanel,
8
- inlay: useInlayLeftPanel,
9
- "left-main-tabs": useLeftMainTabs,
10
- "simple-content-pane": useSimpleContentPane
11
- };
12
- const useShellLayout = ({
13
- layoutTemplateId = "simple-content-pane",
14
- ...props
15
- }) => {
16
- const useLayoutHook = LayoutHook[layoutTemplateId];
17
- return useLayoutHook(props);
18
- };
19
-
20
- export { useShellLayout };
21
- //# sourceMappingURL=useShellLayout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useShellLayout.js","sources":["../../../../packages/vuu-shell/src/shell-layout-templates/useShellLayout.ts"],"sourcesContent":["import { HTMLAttributes, ReactElement, ReactNode } from \"react\";\nimport { useFullHeightLeftPanel } from \"./full-height-left-panel/useFullHeightLeftPanel\";\nimport { useInlayLeftPanel } from \"./inlay-left-panel/useInlayLeftPanel\";\nimport { useLeftMainTabs } from \"./left-main-tabs/useLeftMainTabs\";\nimport { useSimpleContentPane } from \"./simple-content-pane/useSimpleContentPane\";\nimport { SidePanelProps as ShellSidePanelProps } from \"./side-panel\";\n\nconst LayoutHook = {\n \"full-height\": useFullHeightLeftPanel,\n inlay: useInlayLeftPanel,\n \"left-main-tabs\": useLeftMainTabs,\n \"simple-content-pane\": useSimpleContentPane,\n};\n\nexport type LayoutTemplateId = keyof typeof LayoutHook;\n\nexport type ShellLayoutTemplateProps = Omit<\n ShellLayoutProps,\n \"layoutTemplateId\"\n>;\n\nexport type ShellToolbarProps = {\n children: ReactNode;\n position?: \"left\";\n width?: number;\n};\n\nexport type ShellLayoutTemplateHook = (\n props: ShellLayoutTemplateProps,\n) => ReactElement;\n\n/**\n * The Shell Layout is the outermost 'chrome' of the appliciation,\n * enclosing the main content area. It will be rendered by one of\n * two available templates, determined by the layoutTemplateId,\n */\nexport interface ShellLayoutProps {\n /**\n * App Header will be rendered in position determined by layout-template\n */\n appHeader?: ReactNode;\n\n /**\n * HTML attributes that will be applied to root div.\n */\n htmlAttributes?: HTMLAttributes<HTMLDivElement>;\n /**\n * identifier for shell layout template to be used. Default template\n * will be \"inlay\"\n */\n layoutTemplateId?: LayoutTemplateId;\n /**\n * If template renders SidePanel, these props will be provided\n */\n SidePanelProps?: ShellSidePanelProps;\n /**\n * If template renders Toolbar, these props will be provided\n */\n ToolbarProps?: ShellToolbarProps;\n}\n\n/**\n * This hook acts as a stub for the actual shell layout\n * template hooks. It will delegate to the appropriate shell\n * layout hook, based on the value of layoutTemplateId.\n */\nexport const useShellLayout = ({\n layoutTemplateId = \"simple-content-pane\",\n ...props\n}: ShellLayoutProps) => {\n const useLayoutHook = LayoutHook[layoutTemplateId];\n return useLayoutHook(props);\n};\n"],"names":[],"mappings":";;;;;AAOA,MAAM,UAAa,GAAA;AAAA,EACjB,aAAe,EAAA,sBAAA;AAAA,EACf,KAAO,EAAA,iBAAA;AAAA,EACP,gBAAkB,EAAA,eAAA;AAAA,EAClB,qBAAuB,EAAA;AACzB,CAAA;AAsDO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,gBAAmB,GAAA,qBAAA;AAAA,EACnB,GAAG;AACL,CAAwB,KAAA;AACtB,EAAM,MAAA,aAAA,GAAgB,WAAW,gBAAgB,CAAA;AACjD,EAAA,OAAO,cAAc,KAAK,CAAA;AAC5B;;;;"}
package/esm/shell.css.js DELETED
@@ -1,4 +0,0 @@
1
- var shellCss = ".vuuShell {\n background-color: var(\n --vuuShell-background,\n var(--salt-container-primary-background)\n );\n height: var(--vuuShell-height, 100vh);\n width: var(--vuuShell-width, 100vw);\n\n .left-main-tabs {\n --vuuOverflowContainer-width: 48px;\n }\n}\n\n.vuu-workspace-tabs {\n background: var(\n --vuuWorkspace-background,\n var(--salt-container-primary-background)\n );\n}\n\n.vuuShell-palette {\n --vuuView-border: none;\n --vuuView-margin: 0;\n}\n\n.vuuShell-warningPlaceholder {\n background-color: var(--salt-container-background-high);\n height: 100%;\n}\n\n/* until we reinstat5e the toolbar */\n.vuuToolbarProxy {\n background: var(--salt-container-primary-background);\n}\n\n.vuu-workspace-tabs > .vuuTabstrip > .vuuOverflowContainer-wrapContainer {\n background: var(--vuuShell-background, var(--salt-container-primary-background));\n}\n\n.vuu-workspace-tabs {\n --vuuTab-height: 28px;\n border: solid 1px var(--salt-separable-primary-borderColor);\n border-top: none !important;\n border-radius: 6px;\n height: 100%;\n padding: 36px 8px 8px 8px;\n position: relative;\n width: 100%;\n}\n\n.vuu-workspace-tabs > .vuuTabstrip {\n left: 0px;\n padding-bottom: 7px;\n position: absolute !important;\n right: 0px;\n top: 0;\n}\n\n.vuuShell-content {\n padding: var(--vuuShell-content-padding, 8px);\n}\n";
2
-
3
- export { shellCss as default };
4
- //# sourceMappingURL=shell.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/esm/shell.js DELETED
@@ -1,135 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useComponentCssInjection } from '@salt-ds/styles';
3
- import { useWindow } from '@salt-ds/window';
4
- import { ContextMenuProvider } from '@vuu-ui/vuu-context-menu';
5
- import { StackLayout, LayoutProvider } from '@vuu-ui/vuu-layout';
6
- import { NotificationsProvider } from '@vuu-ui/vuu-notifications';
7
- import { ModalProvider } from '@vuu-ui/vuu-ui-controls';
8
- import { registerComponent, logger } from '@vuu-ui/vuu-utils';
9
- import { useMemo, useCallback } from 'react';
10
- import { AppHeader } from './app-header/AppHeader.js';
11
- import { ApplicationProvider } from './application-provider/ApplicationProvider.js';
12
- import { usePersistenceManager, PersistenceProvider } from './persistence-manager/PersistenceProvider.js';
13
- import { LocalPersistenceManager } from './persistence-manager/LocalPersistenceManager.js';
14
- import './persistence-manager/StaticPersistenceManager.js';
15
- import 'clsx';
16
- import { useShellLayout } from './shell-layout-templates/useShellLayout.js';
17
- import { UserSettingsPanel } from './user-settings/UserSettingsPanel.js';
18
- import '@salt-ds/core';
19
- import 'html-to-image';
20
- import { WorkspaceProvider, useWorkspace } from './workspace-management/WorkspaceProvider.js';
21
- import './feature-and-layout-provider/FeatureAndLayoutProvider.js';
22
- import { loadingJSON } from './workspace-management/defaultWorkspaceJSON.js';
23
- import { useWorkspaceContextMenuItems } from './workspace-management/useWorkspaceContextMenuItems.js';
24
- import { useLostConnection } from '@vuu-ui/vuu-data-react';
25
- import shellCss from './shell.css.js';
26
-
27
- registerComponent("ApplicationSettings", UserSettingsPanel, "view");
28
- if (process.env.NODE_ENV === "production") {
29
- if (typeof StackLayout !== "function") {
30
- console.warn(
31
- "StackLayout module not loaded, will be unable to deserialize from layout JSON"
32
- );
33
- }
34
- }
35
- const { error } = logger("Shell");
36
- const defaultAppHeader = /* @__PURE__ */ jsx(AppHeader, {});
37
- const getAppHeader = (shellLayoutProps) => shellLayoutProps?.appHeader ?? defaultAppHeader;
38
- const defaultHTMLAttributes = {
39
- className: "vuuShell"
40
- };
41
- const getHTMLAttributes = (props) => {
42
- if (props?.htmlAttributes) {
43
- return {
44
- ...defaultHTMLAttributes,
45
- ...props.htmlAttributes
46
- };
47
- } else {
48
- return defaultHTMLAttributes;
49
- }
50
- };
51
- const VuuApplication = ({
52
- shellLayoutProps: ShellLayoutProps2,
53
- children
54
- }) => {
55
- const targetWindow = useWindow();
56
- useComponentCssInjection({
57
- testId: "vuu-shell",
58
- css: shellCss,
59
- window: targetWindow
60
- });
61
- const { workspaceJSON, saveApplicationLayout } = useWorkspace();
62
- const { buildMenuOptions, handleMenuAction } = useWorkspaceContextMenuItems();
63
- const handleLayoutChange = useCallback(
64
- (layout) => {
65
- try {
66
- saveApplicationLayout(layout);
67
- } catch {
68
- error?.("Failed to save layout");
69
- }
70
- },
71
- [saveApplicationLayout]
72
- );
73
- const isLayoutLoading = workspaceJSON === loadingJSON;
74
- const initialLayout = useShellLayout({
75
- ...ShellLayoutProps2,
76
- appHeader: getAppHeader(ShellLayoutProps2),
77
- htmlAttributes: getHTMLAttributes(ShellLayoutProps2)
78
- });
79
- useLostConnection();
80
- return isLayoutLoading ? null : /* @__PURE__ */ jsxs(
81
- ContextMenuProvider,
82
- {
83
- menuActionHandler: handleMenuAction,
84
- menuBuilder: buildMenuOptions,
85
- children: [
86
- /* @__PURE__ */ jsx(
87
- LayoutProvider,
88
- {
89
- workspaceJSON,
90
- onLayoutChange: handleLayoutChange,
91
- children: initialLayout
92
- }
93
- ),
94
- children
95
- ]
96
- }
97
- );
98
- };
99
- const Shell = ({
100
- logout,
101
- user,
102
- userSettingsSchema,
103
- workspaceProps,
104
- ...props
105
- }) => {
106
- const persistenceManager = usePersistenceManager();
107
- const localPersistenceManager = useMemo(() => {
108
- if (persistenceManager) {
109
- return void 0;
110
- }
111
- console.log(
112
- `No Persistence Manager, configuration data will be persisted to Local Storage, key: 'vuu/${user.username}'`
113
- );
114
- return new LocalPersistenceManager(`vuu/${user.username}`);
115
- }, [persistenceManager, user.username]);
116
- const shellProviders = /* @__PURE__ */ jsx(
117
- ApplicationProvider,
118
- {
119
- density: "high",
120
- logout,
121
- theme: "vuu-theme",
122
- user,
123
- userSettingsSchema,
124
- children: /* @__PURE__ */ jsx(WorkspaceProvider, { ...workspaceProps, children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(NotificationsProvider, { children: /* @__PURE__ */ jsx(VuuApplication, { ...props, user }) }) }) })
125
- }
126
- );
127
- if (persistenceManager) {
128
- return shellProviders;
129
- } else {
130
- return /* @__PURE__ */ jsx(PersistenceProvider, { persistenceManager: localPersistenceManager, children: shellProviders });
131
- }
132
- };
133
-
134
- export { Shell };
135
- //# sourceMappingURL=shell.js.map
package/esm/shell.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell.js","sources":["../../../packages/vuu-shell/src/shell.tsx"],"sourcesContent":["import { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { ContextMenuProvider } from \"@vuu-ui/vuu-context-menu\";\nimport type { LayoutChangeHandler } from \"@vuu-ui/vuu-layout\";\nimport { LayoutProvider, StackLayout } from \"@vuu-ui/vuu-layout\";\nimport { NotificationsProvider } from \"@vuu-ui/vuu-notifications\";\nimport { ModalProvider } from \"@vuu-ui/vuu-ui-controls\";\nimport { VuuUser, logger, registerComponent } from \"@vuu-ui/vuu-utils\";\nimport {\n type HTMLAttributes,\n type ReactNode,\n useCallback,\n useMemo,\n} from \"react\";\nimport { AppHeader } from \"./app-header\";\nimport { ApplicationProvider } from \"./application-provider\";\nimport {\n IPersistenceManager,\n LocalPersistenceManager,\n PersistenceProvider,\n usePersistenceManager,\n} from \"./persistence-manager\";\nimport { ShellLayoutProps, useShellLayout } from \"./shell-layout-templates\";\nimport { SettingsSchema, UserSettingsPanel } from \"./user-settings\";\nimport {\n WorkspaceProps,\n WorkspaceProvider,\n useWorkspace,\n useWorkspaceContextMenuItems,\n} from \"./workspace-management\";\nimport { loadingJSON } from \"./workspace-management/defaultWorkspaceJSON\";\nimport { useLostConnection } from \"@vuu-ui/vuu-data-react\";\n\nimport shellCss from \"./shell.css\";\n\nregisterComponent(\"ApplicationSettings\", UserSettingsPanel, \"view\");\n\nif (process.env.NODE_ENV === \"production\") {\n // StackLayout is loaded just to force component registration, we know it will be\n // required when default layout is instantiated. This is only required in prod\n // to avoif tree shaking the Stack away. Causes a runtime issue in dev.\n if (typeof StackLayout !== \"function\") {\n console.warn(\n \"StackLayout module not loaded, will be unable to deserialize from layout JSON\",\n );\n }\n}\n\nconst { error } = logger(\"Shell\");\n\nexport type LayoutTemplateName = \"full-height\" | \"inlay\";\n\nexport interface ShellProps extends HTMLAttributes<HTMLDivElement> {\n shellLayoutProps?: ShellLayoutProps;\n userSettingsSchema?: SettingsSchema;\n workspaceProps?: WorkspaceProps;\n children?: ReactNode;\n logout?: () => void;\n saveUrl?: string;\n serverUrl?: string;\n user: VuuUser;\n}\n\nconst defaultAppHeader = <AppHeader />;\n\nconst getAppHeader = (shellLayoutProps?: ShellLayoutProps) =>\n shellLayoutProps?.appHeader ?? defaultAppHeader;\n\nconst defaultHTMLAttributes: HTMLAttributes<HTMLDivElement> = {\n className: \"vuuShell\",\n};\n\nconst getHTMLAttributes = (props?: ShellLayoutProps) => {\n if (props?.htmlAttributes) {\n return {\n ...defaultHTMLAttributes,\n ...props.htmlAttributes,\n };\n } else {\n return defaultHTMLAttributes;\n }\n};\n\nconst VuuApplication = ({\n shellLayoutProps: ShellLayoutProps,\n children,\n}: Omit<\n ShellProps,\n \"ContentLayoutProps\" | \"loginUrl\" | \"userSettingsSchema\" | \"workspaceProps\"\n>) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-shell\",\n css: shellCss,\n window: targetWindow,\n });\n\n const { workspaceJSON, saveApplicationLayout } = useWorkspace();\n\n const { buildMenuOptions, handleMenuAction } = useWorkspaceContextMenuItems();\n\n const handleLayoutChange = useCallback<LayoutChangeHandler>(\n (layout) => {\n try {\n saveApplicationLayout(layout);\n } catch {\n error?.(\"Failed to save layout\");\n }\n },\n [saveApplicationLayout],\n );\n\n const isLayoutLoading = workspaceJSON === loadingJSON;\n\n const initialLayout = useShellLayout({\n ...ShellLayoutProps,\n appHeader: getAppHeader(ShellLayoutProps),\n htmlAttributes: getHTMLAttributes(ShellLayoutProps),\n });\n\n useLostConnection();\n\n return isLayoutLoading ? null : (\n <ContextMenuProvider\n menuActionHandler={handleMenuAction}\n menuBuilder={buildMenuOptions}\n >\n <LayoutProvider\n workspaceJSON={workspaceJSON}\n onLayoutChange={handleLayoutChange}\n >\n {initialLayout}\n </LayoutProvider>\n {children}\n </ContextMenuProvider>\n );\n};\n\nexport const Shell = ({\n logout,\n user,\n userSettingsSchema,\n workspaceProps,\n ...props\n}: ShellProps) => {\n // If user has provided an implementation of IPersistenceManager\n // by wrapping higher level PersistenceProvider, use it, otw\n // default to LocalPersistenceManager\n const persistenceManager = usePersistenceManager();\n const localPersistenceManager = useMemo<\n IPersistenceManager | undefined\n >(() => {\n if (persistenceManager) {\n return undefined;\n }\n console.log(\n `No Persistence Manager, configuration data will be persisted to Local Storage, key: 'vuu/${user.username}'`,\n );\n return new LocalPersistenceManager(`vuu/${user.username}`);\n }, [persistenceManager, user.username]);\n\n // ApplicationProvider must go outside Dialog and Notification providers\n // ApplicationProvider injects the SaltProvider and this must be the root\n // SaltProvider.\n\n const shellProviders = (\n <ApplicationProvider\n density=\"high\"\n logout={logout}\n theme=\"vuu-theme\"\n user={user}\n userSettingsSchema={userSettingsSchema}\n >\n <WorkspaceProvider {...workspaceProps}>\n <ModalProvider>\n <NotificationsProvider>\n <VuuApplication {...props} user={user} />\n </NotificationsProvider>\n </ModalProvider>\n </WorkspaceProvider>\n </ApplicationProvider>\n );\n\n if (persistenceManager) {\n return shellProviders;\n } else {\n return (\n <PersistenceProvider persistenceManager={localPersistenceManager}>\n {shellProviders}\n </PersistenceProvider>\n );\n }\n};\n"],"names":["ShellLayoutProps"],"mappings":"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"}
@@ -1,4 +0,0 @@
1
- var themeSwitchCss = "\n.vuuThemeSwitch {\n --saltButton-minWidth: 22px;\n --svg-light: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M24 31q2.9 0 4.95-2.05Q31 26.9 31 24q0-2.9-2.05-4.95Q26.9 17 24 17q-2.9 0-4.95 2.05Q17 21.1 17 24q0 2.9 2.05 4.95Q21.1 31 24 31Zm0 3q-4.15 0-7.075-2.925T14 24q0-4.15 2.925-7.075T24 14q4.15 0 7.075 2.925T34 24q0 4.15-2.925 7.075T24 34ZM3.5 25.5q-.65 0-1.075-.425Q2 24.65 2 24q0-.65.425-1.075Q2.85 22.5 3.5 22.5h5q.65 0 1.075.425Q10 23.35 10 24q0 .65-.425 1.075-.425.425-1.075.425Zm36 0q-.65 0-1.075-.425Q38 24.65 38 24q0-.65.425-1.075.425-.425 1.075-.425h5q.65 0 1.075.425Q46 23.35 46 24q0 .65-.425 1.075-.425.425-1.075.425ZM24 10q-.65 0-1.075-.425Q22.5 9.15 22.5 8.5v-5q0-.65.425-1.075Q23.35 2 24 2q.65 0 1.075.425.425.425.425 1.075v5q0 .65-.425 1.075Q24.65 10 24 10Zm0 36q-.65 0-1.075-.425-.425-.425-.425-1.075v-5q0-.65.425-1.075Q23.35 38 24 38q.65 0 1.075.425.425.425.425 1.075v5q0 .65-.425 1.075Q24.65 46 24 46ZM12 14.1l-2.85-2.8q-.45-.45-.425-1.075.025-.625.425-1.075.45-.45 1.075-.45t1.075.45L14.1 12q.4.45.4 1.05 0 .6-.4 1-.4.45-1.025.45-.625 0-1.075-.4Zm24.7 24.75L33.9 36q-.4-.45-.4-1.075t.45-1.025q.4-.45 1-.45t1.05.45l2.85 2.8q.45.45.425 1.075-.025.625-.425 1.075-.45.45-1.075.45t-1.075-.45ZM33.9 14.1q-.45-.45-.45-1.05 0-.6.45-1.05l2.8-2.85q.45-.45 1.075-.425.625.025 1.075.425.45.45.45 1.075t-.45 1.075L36 14.1q-.4.4-1.025.4-.625 0-1.075-.4ZM9.15 38.85q-.45-.45-.45-1.075t.45-1.075L12 33.9q.45-.45 1.05-.45.6 0 1.05.45.45.45.45 1.05 0 .6-.45 1.05l-2.8 2.85q-.45.45-1.075.425-.625-.025-1.075-.425ZM24 24Z\"/></svg>');\n --svg-dark: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M24 42q-7.5 0-12.75-5.25T6 24q0-7.5 5.25-12.75T24 6q.4 0 .85.025.45.025 1.15.075-1.8 1.6-2.8 3.95-1 2.35-1 4.95 0 4.5 3.15 7.65Q28.5 25.8 33 25.8q2.6 0 4.95-.925T41.9 22.3q.05.6.075.975Q42 23.65 42 24q0 7.5-5.25 12.75T24 42Zm0-3q5.45 0 9.5-3.375t5.05-7.925q-1.25.55-2.675.825Q34.45 28.8 33 28.8q-5.75 0-9.775-4.025T19.2 15q0-1.2.25-2.575.25-1.375.9-3.125-4.9 1.35-8.125 5.475Q9 18.9 9 24q0 6.25 4.375 10.625T24 39Zm-.2-14.85Z\"/></svg>');\n padding: 2px;\n}\n\n.salt-density-high .vuuThemeSwitch {\n --saltButton-minWidth: 16px;\n --saltButton-width: 18px;\n --vuuThemeSwitch-iconSize: 16px;\n}\n\n.vuuThemeSwitch [data-icon] {\n --vuu-icon-size: var(--vuuThemeSwitch-iconSize,18px);\n}\n\n.vuuThemeSwitch [data-icon='light'] {\n --vuu-icon-svg: var(--svg-light);\n}\n.vuuThemeSwitch [data-icon='dark'] {\n --vuu-icon-svg: var(--svg-dark);\n}\n\n.vuuThemeSwitch .saltToggleButton {\n height: 20px;\n width: 20px;\n}\n\n";
2
-
3
- export { themeSwitchCss as default };
4
- //# sourceMappingURL=ThemeSwitch.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeSwitch.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,54 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import cx from 'clsx';
3
- import { useControlled, ToggleButtonGroup, ToggleButton } from '@salt-ds/core';
4
- import { useComponentCssInjection } from '@salt-ds/styles';
5
- import { useWindow } from '@salt-ds/window';
6
- import { useCallback } from 'react';
7
- import themeSwitchCss from './ThemeSwitch.css.js';
8
-
9
- const classBase = "vuuThemeSwitch";
10
- const ThemeSwitch = ({
11
- className: classNameProp,
12
- defaultMode: defaultModeProp,
13
- mode: modeProp,
14
- onChange,
15
- ...htmlAttributes
16
- }) => {
17
- const targetWindow = useWindow();
18
- useComponentCssInjection({
19
- testId: "vuu-theme-switch",
20
- css: themeSwitchCss,
21
- window: targetWindow
22
- });
23
- const [mode, setMode] = useControlled({
24
- controlled: modeProp,
25
- default: defaultModeProp ?? "light",
26
- name: "ThemeSwitch",
27
- state: "mode"
28
- });
29
- const handleChangeSecondary = useCallback(
30
- (evt) => {
31
- const { value } = evt.target;
32
- setMode(value);
33
- onChange(value);
34
- },
35
- [onChange, setMode]
36
- );
37
- const className = cx(classBase, classNameProp);
38
- return /* @__PURE__ */ jsxs(
39
- ToggleButtonGroup,
40
- {
41
- className,
42
- ...htmlAttributes,
43
- onChange: handleChangeSecondary,
44
- value: mode,
45
- children: [
46
- /* @__PURE__ */ jsx(ToggleButton, { "aria-label": "alert", "data-icon": "light", value: "light" }),
47
- /* @__PURE__ */ jsx(ToggleButton, { "aria-label": "home", "data-icon": "dark", value: "dark" })
48
- ]
49
- }
50
- );
51
- };
52
-
53
- export { ThemeSwitch };
54
- //# sourceMappingURL=ThemeSwitch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeSwitch.js","sources":["../../../../packages/vuu-shell/src/theme-switch/ThemeSwitch.tsx"],"sourcesContent":["import cx from \"clsx\";\nimport { ToggleButton, ToggleButtonGroup, useControlled } from \"@salt-ds/core\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { HTMLAttributes, SyntheticEvent, useCallback } from \"react\";\nimport { ThemeMode } from \"@vuu-ui/vuu-utils\";\n\nimport themeSwitchCss from \"./ThemeSwitch.css\";\n\nconst classBase = \"vuuThemeSwitch\";\nexport interface ThemeSwitchProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n defaultMode?: ThemeMode;\n mode?: ThemeMode;\n onChange: (mode: ThemeMode) => void;\n}\n\nexport const ThemeSwitch = ({\n className: classNameProp,\n defaultMode: defaultModeProp,\n mode: modeProp,\n onChange,\n ...htmlAttributes\n}: ThemeSwitchProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-theme-switch\",\n css: themeSwitchCss,\n window: targetWindow,\n });\n\n const [mode, setMode] = useControlled<ThemeMode>({\n controlled: modeProp,\n default: defaultModeProp ?? \"light\",\n name: \"ThemeSwitch\",\n state: \"mode\",\n });\n\n const handleChangeSecondary = useCallback(\n (evt: SyntheticEvent<HTMLButtonElement>) => {\n const { value } = evt.target as HTMLButtonElement;\n setMode(value as ThemeMode);\n onChange(value as ThemeMode);\n },\n [onChange, setMode],\n );\n const className = cx(classBase, classNameProp);\n return (\n <ToggleButtonGroup\n className={className}\n {...htmlAttributes}\n onChange={handleChangeSecondary}\n value={mode}\n >\n <ToggleButton aria-label=\"alert\" data-icon=\"light\" value=\"light\" />\n <ToggleButton aria-label=\"home\" data-icon=\"dark\" value=\"dark\" />\n </ToggleButtonGroup>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,SAAY,GAAA,gBAAA;AAQX,MAAM,cAAc,CAAC;AAAA,EAC1B,SAAW,EAAA,aAAA;AAAA,EACX,WAAa,EAAA,eAAA;AAAA,EACb,IAAM,EAAA,QAAA;AAAA,EACN,QAAA;AAAA,EACA,GAAG;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,eAAe,SAAU,EAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,kBAAA;AAAA,IACR,GAAK,EAAA,cAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,aAAyB,CAAA;AAAA,IAC/C,UAAY,EAAA,QAAA;AAAA,IACZ,SAAS,eAAmB,IAAA,OAAA;AAAA,IAC5B,IAAM,EAAA,aAAA;AAAA,IACN,KAAO,EAAA;AAAA,GACR,CAAA;AAED,EAAA,MAAM,qBAAwB,GAAA,WAAA;AAAA,IAC5B,CAAC,GAA2C,KAAA;AAC1C,MAAM,MAAA,EAAE,KAAM,EAAA,GAAI,GAAI,CAAA,MAAA;AACtB,MAAA,OAAA,CAAQ,KAAkB,CAAA;AAC1B,MAAA,QAAA,CAAS,KAAkB,CAAA;AAAA,KAC7B;AAAA,IACA,CAAC,UAAU,OAAO;AAAA,GACpB;AACA,EAAM,MAAA,SAAA,GAAY,EAAG,CAAA,SAAA,EAAW,aAAa,CAAA;AAC7C,EACE,uBAAA,IAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACC,GAAG,cAAA;AAAA,MACJ,QAAU,EAAA,qBAAA;AAAA,MACV,KAAO,EAAA,IAAA;AAAA,MAEP,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,gBAAa,YAAW,EAAA,OAAA,EAAQ,WAAU,EAAA,OAAA,EAAQ,OAAM,OAAQ,EAAA,CAAA;AAAA,4BAChE,YAAa,EAAA,EAAA,YAAA,EAAW,QAAO,WAAU,EAAA,MAAA,EAAO,OAAM,MAAO,EAAA;AAAA;AAAA;AAAA,GAChE;AAEJ;;;;"}
@@ -1,4 +0,0 @@
1
- var settingsFormCss = ".vuuSettingsForm {\n display: flex;\n flex-direction: column;\n gap: var(--salt-spacing-200);\n}\n";
2
-
3
- export { settingsFormCss as default };
4
- //# sourceMappingURL=SettingsForm.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SettingsForm.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}