@smwb/ui-solid 0.4.0 → 0.4.1

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 (291) hide show
  1. package/dist/assets/styles/less/components/appBar/appBar.entry.css +1 -1
  2. package/dist/components/layout/appLayout/appLayout.js +43 -43
  3. package/dist/components/layout/appLayout/appLayout.js.map +1 -1
  4. package/dist/components/navigation/bottomBar/bottomBar.js +31 -30
  5. package/dist/components/navigation/bottomBar/bottomBar.js.map +1 -1
  6. package/dist/components/navigation/sidebar/sidebar.js +48 -47
  7. package/dist/components/navigation/sidebar/sidebar.js.map +1 -1
  8. package/dist/headless/components/layout/appLayout/appLayout.js +43 -43
  9. package/dist/headless/components/layout/appLayout/appLayout.js.map +1 -1
  10. package/dist/headless/components/navigation/bottomBar/bottomBar.js +31 -30
  11. package/dist/headless/components/navigation/bottomBar/bottomBar.js.map +1 -1
  12. package/dist/headless/components/navigation/sidebar/sidebar.js +48 -47
  13. package/dist/headless/components/navigation/sidebar/sidebar.js.map +1 -1
  14. package/dist/headless/source/components/base/animateHeight/animateHeight.jsx +1 -1
  15. package/dist/headless/source/components/base/icon/icon.jsx +1 -1
  16. package/dist/headless/source/components/base/ripple/ripple.jsx +1 -1
  17. package/dist/headless/source/components/clickAwayListener/clickAwayListener.jsx +1 -1
  18. package/dist/headless/source/components/dataDisplay/accordion/accordion.jsx +1 -1
  19. package/dist/headless/source/components/dataDisplay/avatar/avatar.jsx +1 -1
  20. package/dist/headless/source/components/dataDisplay/badge/badge.jsx +1 -1
  21. package/dist/headless/source/components/dataDisplay/card/card.jsx +1 -1
  22. package/dist/headless/source/components/dataDisplay/carousel/carousel.jsx +1 -1
  23. package/dist/headless/source/components/dataDisplay/chat/chat.jsx +1 -1
  24. package/dist/headless/source/components/dataDisplay/chat/chatAttachmentImage.jsx +1 -1
  25. package/dist/headless/source/components/dataDisplay/chat/chatAttachments.jsx +1 -1
  26. package/dist/headless/source/components/dataDisplay/chat/chatComposer.jsx +1 -1
  27. package/dist/headless/source/components/dataDisplay/chat/chatHeader.jsx +1 -1
  28. package/dist/headless/source/components/dataDisplay/chat/chatIconButton.jsx +1 -1
  29. package/dist/headless/source/components/dataDisplay/chat/chatLayout.jsx +1 -1
  30. package/dist/headless/source/components/dataDisplay/chat/chatMessageAvatar.jsx +1 -1
  31. package/dist/headless/source/components/dataDisplay/chat/chatMessageBubble.jsx +1 -1
  32. package/dist/headless/source/components/dataDisplay/chat/chatMessageIncoming.jsx +1 -1
  33. package/dist/headless/source/components/dataDisplay/chat/chatMessageItem.jsx +1 -1
  34. package/dist/headless/source/components/dataDisplay/chat/chatMessageOutgoing.jsx +1 -1
  35. package/dist/headless/source/components/dataDisplay/chat/chatMessageSkeleton.jsx +1 -1
  36. package/dist/headless/source/components/dataDisplay/chat/chatMessageStatus.jsx +1 -1
  37. package/dist/headless/source/components/dataDisplay/chat/chatMessageSystem.jsx +1 -1
  38. package/dist/headless/source/components/dataDisplay/chat/chatMessages.jsx +1 -1
  39. package/dist/headless/source/components/dataDisplay/chat/chatOverlayLayout.jsx +1 -1
  40. package/dist/headless/source/components/dataDisplay/chat/chatShell.jsx +1 -1
  41. package/dist/headless/source/components/dataDisplay/chip/chip.jsx +1 -1
  42. package/dist/headless/source/components/dataDisplay/expansionPanel/expansionPanel.jsx +1 -1
  43. package/dist/headless/source/components/dataDisplay/imagesList/imagesList.jsx +1 -1
  44. package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx +1 -1
  45. package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx +1 -1
  46. package/dist/headless/source/components/dataDisplay/list/list.jsx +1 -1
  47. package/dist/headless/source/components/dataDisplay/list/listItem.jsx +1 -1
  48. package/dist/headless/source/components/dataDisplay/table/table.jsx +1 -1
  49. package/dist/headless/source/components/dataDisplay/table/tableBody.jsx +1 -1
  50. package/dist/headless/source/components/dataDisplay/table/tableCell.jsx +1 -1
  51. package/dist/headless/source/components/dataDisplay/table/tableHead.jsx +1 -1
  52. package/dist/headless/source/components/dataDisplay/table/tableHeadCell.jsx +1 -1
  53. package/dist/headless/source/components/dataDisplay/table/tablePagination/tablePagination.jsx +1 -1
  54. package/dist/headless/source/components/dataDisplay/table/tableRow.jsx +1 -1
  55. package/dist/headless/source/components/dataDisplay/treeView/treeView.jsx +1 -1
  56. package/dist/headless/source/components/dataDisplay/typography/typography.jsx +1 -1
  57. package/dist/headless/source/components/feedBack/message/message.jsx +1 -1
  58. package/dist/headless/source/components/feedBack/modal/modal.jsx +1 -1
  59. package/dist/headless/source/components/feedBack/progressIndicator/progressIndicator.jsx +1 -1
  60. package/dist/headless/source/components/feedBack/skeleton/skeleton.jsx +1 -1
  61. package/dist/headless/source/components/feedBack/snackbar/snackbar.jsx +1 -1
  62. package/dist/headless/source/components/feedBack/tooltip/tooltip.jsx +1 -1
  63. package/dist/headless/source/components/inputs/button/button.jsx +1 -1
  64. package/dist/headless/source/components/inputs/buttonGroups/buttonGroup.jsx +1 -1
  65. package/dist/headless/source/components/inputs/checkbox/checkbox.jsx +1 -1
  66. package/dist/headless/source/components/inputs/datePicker/dataPickerDays.jsx +1 -1
  67. package/dist/headless/source/components/inputs/datePicker/dataPickerHeader.jsx +1 -1
  68. package/dist/headless/source/components/inputs/datePicker/dataPickerInput.jsx +1 -1
  69. package/dist/headless/source/components/inputs/datePicker/datePicker.jsx +1 -1
  70. package/dist/headless/source/components/inputs/datePicker/datePickerActionLabel.jsx +1 -1
  71. package/dist/headless/source/components/inputs/datePicker/datePickerDay.jsx +1 -1
  72. package/dist/headless/source/components/inputs/datePicker/datePickerIconButton.jsx +1 -1
  73. package/dist/headless/source/components/inputs/datePicker/datePickerList.jsx +1 -1
  74. package/dist/headless/source/components/inputs/dateTimePicker/dateTimePicker.jsx +1 -1
  75. package/dist/headless/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx +1 -1
  76. package/dist/headless/source/components/inputs/fileDrop/countPreview.jsx +1 -1
  77. package/dist/headless/source/components/inputs/fileDrop/fileDrop.jsx +1 -1
  78. package/dist/headless/source/components/inputs/fileDrop/preview.jsx +1 -1
  79. package/dist/headless/source/components/inputs/fileDrop/previewWrapper.jsx +1 -1
  80. package/dist/headless/source/components/inputs/fileInput/fileInput.jsx +1 -1
  81. package/dist/headless/source/components/inputs/floatingButton/floatingButton.jsx +1 -1
  82. package/dist/headless/source/components/inputs/radioButton/radioButton.jsx +1 -1
  83. package/dist/headless/source/components/inputs/rating/rating.jsx +1 -1
  84. package/dist/headless/source/components/inputs/selectField/dropdownMenu.jsx +1 -1
  85. package/dist/headless/source/components/inputs/selectField/selectField.jsx +1 -1
  86. package/dist/headless/source/components/inputs/slider/slider.jsx +1 -1
  87. package/dist/headless/source/components/inputs/textField/textField.jsx +1 -1
  88. package/dist/headless/source/components/inputs/textField/textFieldAdornment.jsx +1 -1
  89. package/dist/headless/source/components/inputs/textField/textFieldWrapper.jsx +1 -1
  90. package/dist/headless/source/components/inputs/timePicker/timePicker.jsx +1 -1
  91. package/dist/headless/source/components/inputs/timePicker/timePickerColumns.jsx +1 -1
  92. package/dist/headless/source/components/inputs/timePicker/timePickerInput.jsx +1 -1
  93. package/dist/headless/source/components/inputs/timePicker/timePickerList.jsx +1 -1
  94. package/dist/headless/source/components/inputs/toggle/toggle.jsx +1 -1
  95. package/dist/headless/source/components/layout/appLayout/appLayout.jsx +11 -8
  96. package/dist/headless/source/components/layout/appLayout/appLayout.jsx.map +1 -1
  97. package/dist/headless/source/components/layout/divider/divider.jsx +1 -1
  98. package/dist/headless/source/components/layout/grid/grid.jsx +1 -1
  99. package/dist/headless/source/components/layout/page/page.jsx +1 -1
  100. package/dist/headless/source/components/layout/pageHeader/pageHeader.jsx +1 -1
  101. package/dist/headless/source/components/layout/screenDivider/screenDivider.jsx +1 -1
  102. package/dist/headless/source/components/layout/sheet/sheet.jsx +1 -1
  103. package/dist/headless/source/components/layout/stack/stack.jsx +1 -1
  104. package/dist/headless/source/components/navigation/appBar/appBar.jsx +1 -1
  105. package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx +5 -4
  106. package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -1
  107. package/dist/headless/source/components/navigation/breadcrumbs/breadcrumbs.jsx +1 -1
  108. package/dist/headless/source/components/navigation/menu/menu.jsx +1 -1
  109. package/dist/headless/source/components/navigation/menu/menuComponent.jsx +1 -1
  110. package/dist/headless/source/components/navigation/menu/menuDivider.jsx +1 -1
  111. package/dist/headless/source/components/navigation/menu/menuFloating.jsx +1 -1
  112. package/dist/headless/source/components/navigation/menu/menuItem.jsx +1 -1
  113. package/dist/headless/source/components/navigation/menu/menuItemIcon.jsx +1 -1
  114. package/dist/headless/source/components/navigation/menu/menuItemText.jsx +1 -1
  115. package/dist/headless/source/components/navigation/menu/menuList.jsx +1 -1
  116. package/dist/headless/source/components/navigation/menu/menuSubmenu.jsx +1 -1
  117. package/dist/headless/source/components/navigation/pagination/pagination.jsx +1 -1
  118. package/dist/headless/source/components/navigation/sidebar/sidebar.jsx +5 -4
  119. package/dist/headless/source/components/navigation/sidebar/sidebar.jsx.map +1 -1
  120. package/dist/headless/source/components/navigation/stepper/stepper.jsx +1 -1
  121. package/dist/headless/source/components/navigation/tabs/tab/tab.jsx +1 -1
  122. package/dist/headless/source/components/navigation/tabs/tabs.jsx +1 -1
  123. package/dist/source/components/base/animateHeight/animateHeight.jsx +1 -1
  124. package/dist/source/components/base/icon/icon.jsx +2 -2
  125. package/dist/source/components/base/icon/icon.jsx.map +1 -1
  126. package/dist/source/components/base/ripple/ripple.jsx +2 -2
  127. package/dist/source/components/base/ripple/ripple.jsx.map +1 -1
  128. package/dist/source/components/clickAwayListener/clickAwayListener.jsx +1 -1
  129. package/dist/source/components/dataDisplay/accordion/accordion.jsx +2 -2
  130. package/dist/source/components/dataDisplay/accordion/accordion.jsx.map +1 -1
  131. package/dist/source/components/dataDisplay/avatar/avatar.jsx +2 -2
  132. package/dist/source/components/dataDisplay/avatar/avatar.jsx.map +1 -1
  133. package/dist/source/components/dataDisplay/badge/badge.jsx +2 -2
  134. package/dist/source/components/dataDisplay/badge/badge.jsx.map +1 -1
  135. package/dist/source/components/dataDisplay/card/card.jsx +2 -2
  136. package/dist/source/components/dataDisplay/card/card.jsx.map +1 -1
  137. package/dist/source/components/dataDisplay/carousel/carousel.jsx +2 -2
  138. package/dist/source/components/dataDisplay/carousel/carousel.jsx.map +1 -1
  139. package/dist/source/components/dataDisplay/chat/chat.jsx +2 -2
  140. package/dist/source/components/dataDisplay/chat/chat.jsx.map +1 -1
  141. package/dist/source/components/dataDisplay/chat/chatAttachmentImage.jsx +1 -1
  142. package/dist/source/components/dataDisplay/chat/chatAttachments.jsx +1 -1
  143. package/dist/source/components/dataDisplay/chat/chatComposer.jsx +1 -1
  144. package/dist/source/components/dataDisplay/chat/chatHeader.jsx +1 -1
  145. package/dist/source/components/dataDisplay/chat/chatIconButton.jsx +1 -1
  146. package/dist/source/components/dataDisplay/chat/chatLayout.jsx +1 -1
  147. package/dist/source/components/dataDisplay/chat/chatMessageAvatar.jsx +1 -1
  148. package/dist/source/components/dataDisplay/chat/chatMessageBubble.jsx +1 -1
  149. package/dist/source/components/dataDisplay/chat/chatMessageIncoming.jsx +1 -1
  150. package/dist/source/components/dataDisplay/chat/chatMessageItem.jsx +1 -1
  151. package/dist/source/components/dataDisplay/chat/chatMessageOutgoing.jsx +1 -1
  152. package/dist/source/components/dataDisplay/chat/chatMessageSkeleton.jsx +1 -1
  153. package/dist/source/components/dataDisplay/chat/chatMessageStatus.jsx +1 -1
  154. package/dist/source/components/dataDisplay/chat/chatMessageSystem.jsx +1 -1
  155. package/dist/source/components/dataDisplay/chat/chatMessages.jsx +1 -1
  156. package/dist/source/components/dataDisplay/chat/chatOverlayLayout.jsx +1 -1
  157. package/dist/source/components/dataDisplay/chat/chatShell.jsx +1 -1
  158. package/dist/source/components/dataDisplay/chip/chip.jsx +2 -2
  159. package/dist/source/components/dataDisplay/chip/chip.jsx.map +1 -1
  160. package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx +2 -2
  161. package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx.map +1 -1
  162. package/dist/source/components/dataDisplay/imagesList/imagesList.jsx +2 -2
  163. package/dist/source/components/dataDisplay/imagesList/imagesList.jsx.map +1 -1
  164. package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx +2 -2
  165. package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx.map +1 -1
  166. package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx +1 -1
  167. package/dist/source/components/dataDisplay/list/list.jsx +2 -2
  168. package/dist/source/components/dataDisplay/list/list.jsx.map +1 -1
  169. package/dist/source/components/dataDisplay/list/listItem.jsx +1 -1
  170. package/dist/source/components/dataDisplay/table/table.jsx +2 -2
  171. package/dist/source/components/dataDisplay/table/table.jsx.map +1 -1
  172. package/dist/source/components/dataDisplay/table/tableBody.jsx +1 -1
  173. package/dist/source/components/dataDisplay/table/tableCell.jsx +1 -1
  174. package/dist/source/components/dataDisplay/table/tableHead.jsx +1 -1
  175. package/dist/source/components/dataDisplay/table/tableHeadCell.jsx +1 -1
  176. package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx +2 -2
  177. package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx.map +1 -1
  178. package/dist/source/components/dataDisplay/table/tableRow.jsx +1 -1
  179. package/dist/source/components/dataDisplay/treeView/treeView.jsx +2 -2
  180. package/dist/source/components/dataDisplay/treeView/treeView.jsx.map +1 -1
  181. package/dist/source/components/dataDisplay/typography/typography.jsx +2 -2
  182. package/dist/source/components/dataDisplay/typography/typography.jsx.map +1 -1
  183. package/dist/source/components/feedBack/message/message.jsx +2 -2
  184. package/dist/source/components/feedBack/message/message.jsx.map +1 -1
  185. package/dist/source/components/feedBack/modal/modal.jsx +2 -2
  186. package/dist/source/components/feedBack/modal/modal.jsx.map +1 -1
  187. package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx +2 -2
  188. package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx.map +1 -1
  189. package/dist/source/components/feedBack/skeleton/skeleton.jsx +2 -2
  190. package/dist/source/components/feedBack/skeleton/skeleton.jsx.map +1 -1
  191. package/dist/source/components/feedBack/snackbar/snackbar.jsx +2 -2
  192. package/dist/source/components/feedBack/snackbar/snackbar.jsx.map +1 -1
  193. package/dist/source/components/feedBack/tooltip/tooltip.jsx +2 -2
  194. package/dist/source/components/feedBack/tooltip/tooltip.jsx.map +1 -1
  195. package/dist/source/components/inputs/button/button.jsx +2 -2
  196. package/dist/source/components/inputs/button/button.jsx.map +1 -1
  197. package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx +2 -2
  198. package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx.map +1 -1
  199. package/dist/source/components/inputs/checkbox/checkbox.jsx +2 -2
  200. package/dist/source/components/inputs/checkbox/checkbox.jsx.map +1 -1
  201. package/dist/source/components/inputs/datePicker/dataPickerDays.jsx +1 -1
  202. package/dist/source/components/inputs/datePicker/dataPickerHeader.jsx +1 -1
  203. package/dist/source/components/inputs/datePicker/dataPickerInput.jsx +1 -1
  204. package/dist/source/components/inputs/datePicker/datePicker.jsx +2 -2
  205. package/dist/source/components/inputs/datePicker/datePicker.jsx.map +1 -1
  206. package/dist/source/components/inputs/datePicker/datePickerActionLabel.jsx +1 -1
  207. package/dist/source/components/inputs/datePicker/datePickerDay.jsx +1 -1
  208. package/dist/source/components/inputs/datePicker/datePickerIconButton.jsx +1 -1
  209. package/dist/source/components/inputs/datePicker/datePickerList.jsx +1 -1
  210. package/dist/source/components/inputs/dateTimePicker/dateTimePicker.jsx +1 -1
  211. package/dist/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx +1 -1
  212. package/dist/source/components/inputs/fileDrop/countPreview.jsx +1 -1
  213. package/dist/source/components/inputs/fileDrop/fileDrop.jsx +2 -2
  214. package/dist/source/components/inputs/fileDrop/fileDrop.jsx.map +1 -1
  215. package/dist/source/components/inputs/fileDrop/preview.jsx +1 -1
  216. package/dist/source/components/inputs/fileDrop/previewWrapper.jsx +1 -1
  217. package/dist/source/components/inputs/fileInput/fileInput.jsx +2 -2
  218. package/dist/source/components/inputs/fileInput/fileInput.jsx.map +1 -1
  219. package/dist/source/components/inputs/floatingButton/floatingButton.jsx +2 -2
  220. package/dist/source/components/inputs/floatingButton/floatingButton.jsx.map +1 -1
  221. package/dist/source/components/inputs/radioButton/radioButton.jsx +2 -2
  222. package/dist/source/components/inputs/radioButton/radioButton.jsx.map +1 -1
  223. package/dist/source/components/inputs/rating/rating.jsx +2 -2
  224. package/dist/source/components/inputs/rating/rating.jsx.map +1 -1
  225. package/dist/source/components/inputs/selectField/dropdownMenu.jsx +1 -1
  226. package/dist/source/components/inputs/selectField/selectField.jsx +2 -2
  227. package/dist/source/components/inputs/selectField/selectField.jsx.map +1 -1
  228. package/dist/source/components/inputs/slider/slider.jsx +2 -2
  229. package/dist/source/components/inputs/slider/slider.jsx.map +1 -1
  230. package/dist/source/components/inputs/textField/textField.jsx +2 -2
  231. package/dist/source/components/inputs/textField/textField.jsx.map +1 -1
  232. package/dist/source/components/inputs/textField/textFieldAdornment.jsx +1 -1
  233. package/dist/source/components/inputs/textField/textFieldWrapper.jsx +1 -1
  234. package/dist/source/components/inputs/timePicker/timePicker.jsx +2 -2
  235. package/dist/source/components/inputs/timePicker/timePicker.jsx.map +1 -1
  236. package/dist/source/components/inputs/timePicker/timePickerColumns.jsx +1 -1
  237. package/dist/source/components/inputs/timePicker/timePickerInput.jsx +1 -1
  238. package/dist/source/components/inputs/timePicker/timePickerList.jsx +1 -1
  239. package/dist/source/components/inputs/toggle/toggle.jsx +2 -2
  240. package/dist/source/components/inputs/toggle/toggle.jsx.map +1 -1
  241. package/dist/source/components/layout/appLayout/appLayout.jsx +12 -9
  242. package/dist/source/components/layout/appLayout/appLayout.jsx.map +1 -1
  243. package/dist/source/components/layout/divider/divider.jsx +2 -2
  244. package/dist/source/components/layout/divider/divider.jsx.map +1 -1
  245. package/dist/source/components/layout/grid/grid.jsx +2 -2
  246. package/dist/source/components/layout/grid/grid.jsx.map +1 -1
  247. package/dist/source/components/layout/page/page.jsx +2 -2
  248. package/dist/source/components/layout/page/page.jsx.map +1 -1
  249. package/dist/source/components/layout/pageHeader/pageHeader.jsx +2 -2
  250. package/dist/source/components/layout/pageHeader/pageHeader.jsx.map +1 -1
  251. package/dist/source/components/layout/screenDivider/screenDivider.jsx +2 -2
  252. package/dist/source/components/layout/screenDivider/screenDivider.jsx.map +1 -1
  253. package/dist/source/components/layout/sheet/sheet.jsx +2 -2
  254. package/dist/source/components/layout/sheet/sheet.jsx.map +1 -1
  255. package/dist/source/components/layout/stack/stack.jsx +2 -2
  256. package/dist/source/components/layout/stack/stack.jsx.map +1 -1
  257. package/dist/source/components/navigation/appBar/appBar.jsx +2 -2
  258. package/dist/source/components/navigation/appBar/appBar.jsx.map +1 -1
  259. package/dist/source/components/navigation/bottomBar/bottomBar.jsx +6 -5
  260. package/dist/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -1
  261. package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx +2 -2
  262. package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx.map +1 -1
  263. package/dist/source/components/navigation/menu/menu.jsx +2 -2
  264. package/dist/source/components/navigation/menu/menu.jsx.map +1 -1
  265. package/dist/source/components/navigation/menu/menuComponent.jsx +1 -1
  266. package/dist/source/components/navigation/menu/menuDivider.jsx +1 -1
  267. package/dist/source/components/navigation/menu/menuFloating.jsx +1 -1
  268. package/dist/source/components/navigation/menu/menuItem.jsx +1 -1
  269. package/dist/source/components/navigation/menu/menuItemIcon.jsx +1 -1
  270. package/dist/source/components/navigation/menu/menuItemText.jsx +1 -1
  271. package/dist/source/components/navigation/menu/menuList.jsx +1 -1
  272. package/dist/source/components/navigation/menu/menuSubmenu.jsx +1 -1
  273. package/dist/source/components/navigation/pagination/pagination.jsx +2 -2
  274. package/dist/source/components/navigation/pagination/pagination.jsx.map +1 -1
  275. package/dist/source/components/navigation/sidebar/sidebar.jsx +6 -5
  276. package/dist/source/components/navigation/sidebar/sidebar.jsx.map +1 -1
  277. package/dist/source/components/navigation/stepper/stepper.jsx +2 -2
  278. package/dist/source/components/navigation/stepper/stepper.jsx.map +1 -1
  279. package/dist/source/components/navigation/tabs/tab/tab.jsx +2 -2
  280. package/dist/source/components/navigation/tabs/tab/tab.jsx.map +1 -1
  281. package/dist/source/components/navigation/tabs/tabs.jsx +2 -2
  282. package/dist/source/components/navigation/tabs/tabs.jsx.map +1 -1
  283. package/package.json +5 -3
  284. package/dist/headless/source/ssr-published.ssr-spec.jsx +0 -35
  285. package/dist/headless/source/ssr-published.ssr-spec.jsx.map +0 -1
  286. package/dist/headless/source/ssr.ssr-spec.jsx +0 -113
  287. package/dist/headless/source/ssr.ssr-spec.jsx.map +0 -1
  288. package/dist/source/ssr-published.ssr-spec.jsx +0 -35
  289. package/dist/source/ssr-published.ssr-spec.jsx.map +0 -1
  290. package/dist/source/ssr.ssr-spec.jsx +0 -113
  291. package/dist/source/ssr.ssr-spec.jsx.map +0 -1
@@ -33,4 +33,4 @@ export {
33
33
  TimePickerList,
34
34
  timePickerList_default as default
35
35
  };
36
- //# sourceMappingURL=timePickerList.js.map
36
+ //# sourceMappingURL=timePickerList.jsx.map
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/toggle/toggle.entry.less";
1
+ import "@smwb/ui-styles/less/components/toggle/toggle.entry.less";
2
2
  import { Show, mergeProps, splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { TextFieldWrapper } from "../textField/textFieldWrapper";
@@ -75,4 +75,4 @@ export {
75
75
  Toggle,
76
76
  toggle_default as default
77
77
  };
78
- //# sourceMappingURL=toggle.js.map
78
+ //# sourceMappingURL=toggle.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/inputs/toggle/toggle.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/toggle/toggle.entry.less\";\nimport { type JSX, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { TextFieldWrapper } from \"../textField/textFieldWrapper\";\nimport { createId } from \"../../../primitives/createId\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport type { SelectionChangeEvent, SelectionControlColor, SelectionControlSize } from \"../checkbox/checkbox\";\n\nexport interface ToggleProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"size\"> {\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n checked?: boolean;\n id?: string;\n label?: string;\n labelPlacement?: \"top\" | \"left\" | \"right\";\n size?: SelectionControlSize;\n color?: SelectionControlColor;\n /** Unified handler: `(event, checked, data)`. */\n onChange?: (event: SelectionChangeEvent, checked: boolean, data: ToggleProps) => void;\n helperText?: JSX.Element;\n error?: boolean;\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Toggle(props: ToggleProps): JSX.Element {\n const merged = mergeProps({ size: \"medium\" as SelectionControlSize, color: \"primary\" as SelectionControlColor }, props);\n const [local, args] = splitProps(merged, [\n \"disabled\",\n \"readOnly\",\n \"required\",\n \"checked\",\n \"class\",\n \"id\",\n \"label\",\n \"labelPlacement\",\n \"size\",\n \"color\",\n \"helperText\",\n \"error\",\n \"onChange\",\n \"ref\",\n ]);\n const id = createId(local.id);\n\n const handleChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n if (local.readOnly) {\n event.preventDefault();\n return;\n }\n local.onChange?.(event, event.currentTarget.checked, props);\n };\n\n return (\n <TextFieldWrapper\n helperText={local.helperText}\n disabled={local.disabled}\n error={local.error}\n class=\"smwb-text-field-checkbox\"\n >\n <span class={cn(\"smwb-toggle__wrapper\", local.labelPlacement && `smwb-toggle__wrapper_label-${local.labelPlacement}`)}>\n <Show when={local.label}>\n <label for={id} class=\"smwb-toggle__label\">\n {local.label}\n </label>\n </Show>\n <label\n class={cn(\"smwb-toggle\", `smwb-toggle_size-${local.size}`, `smwb-toggle_color-${local.color}`, local.class, {\n \"smwb-disabled\": local.disabled,\n \"smwb-readonly\": local.readOnly,\n })}\n >\n <input\n type=\"checkbox\"\n id={id}\n class=\"smwb-toggle__checkbox\"\n aria-checked={local.checked}\n aria-invalid={local.error || undefined}\n aria-required={local.required || undefined}\n role=\"switch\"\n checked={local.checked}\n disabled={local.disabled}\n readonly={local.readOnly}\n required={local.required}\n ref={mergeRefs(local.ref)}\n {...args}\n onChange={handleChange}\n />\n <span class=\"smwb-toggle__track\" />\n <span class=\"smwb-toggle__thumb\" />\n </label>\n </span>\n </TextFieldWrapper>\n );\n}\n\nexport default Toggle;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,MAAM,YAAY,kBAAkB;AACvD,OAAO,QAAQ;AACf,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,iBAA2B;AAoB7B,SAAS,OAAO,OAAiC;AACtD,QAAM,SAAS,WAAW,EAAE,MAAM,UAAkC,OAAO,UAAmC,GAAG,KAAK;AACtH,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,KAAK,SAAS,MAAM,EAAE;AAE5B,QAAM,eAA0D,CAAC,UAAU;AACzE,QAAI,MAAM,UAAU;AAClB,YAAM,eAAe;AACrB;AAAA,IACF;AACA,UAAM,WAAW,OAAO,MAAM,cAAc,SAAS,KAAK;AAAA,EAC5D;AAEA,SACE,CAAC;AAAA,IACC,YAAY,MAAM;AAAA,IAClB,UAAU,MAAM;AAAA,IAChB,OAAO,MAAM;AAAA,IACb,MAAM;AAAA,GACP;AAAA,MACC,CAAC,KAAK,OAAO,GAAG,wBAAwB,MAAM,kBAAkB,8BAA8B,MAAM,cAAc,EAAE,GAAG;AAAA,QACrH,CAAC,KAAK,MAAM,MAAM,OAAO;AAAA,UACvB,CAAC,MAAM,KAAK,IAAI,MAAM,qBAAqB;AAAA,aACxC,MAAM,MAAM;AAAA,UACf,EAFC,MAEO;AAAA,QACV,EAJC,KAIM;AAAA,QACP,CAAC;AAAA,IACC,OAAO,GAAG,eAAe,oBAAoB,MAAM,IAAI,IAAI,qBAAqB,MAAM,KAAK,IAAI,MAAM,OAAO;AAAA,MAC1G,iBAAiB,MAAM;AAAA,MACvB,iBAAiB,MAAM;AAAA,IACzB,CAAC;AAAA,GACF;AAAA,UACC,CAAC;AAAA,IACC,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,cAAc,MAAM;AAAA,IACpB,cAAc,MAAM,SAAS;AAAA,IAC7B,eAAe,MAAM,YAAY;AAAA,IACjC,KAAK;AAAA,IACL,SAAS,MAAM;AAAA,IACf,UAAU,MAAM;AAAA,IAChB,UAAU,MAAM;AAAA,IAChB,UAAU,MAAM;AAAA,IAChB,KAAK,UAAU,MAAM,GAAG;AAAA,QACpB;AAAA,IACJ,UAAU;AAAA,EACZ,EAAE;AAAA,UACF,CAAC,KAAK,MAAM,qBAAqB,EAAE;AAAA,UACnC,CAAC,KAAK,MAAM,qBAAqB,EAAE;AAAA,QACrC,EAxBC,MAwBO;AAAA,MACV,EA/BC,KA+BM;AAAA,IACT,EAtCC;AAwCL;AAEA,IAAO,iBAAQ;","names":[],"file":"toggle.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/inputs/toggle/toggle.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/toggle/toggle.entry.less\";\nimport { type JSX, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { TextFieldWrapper } from \"../textField/textFieldWrapper\";\nimport { createId } from \"../../../primitives/createId\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport type { SelectionChangeEvent, SelectionControlColor, SelectionControlSize } from \"../checkbox/checkbox\";\n\nexport interface ToggleProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"size\"> {\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n checked?: boolean;\n id?: string;\n label?: string;\n labelPlacement?: \"top\" | \"left\" | \"right\";\n size?: SelectionControlSize;\n color?: SelectionControlColor;\n /** Unified handler: `(event, checked, data)`. */\n onChange?: (event: SelectionChangeEvent, checked: boolean, data: ToggleProps) => void;\n helperText?: JSX.Element;\n error?: boolean;\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Toggle(props: ToggleProps): JSX.Element {\n const merged = mergeProps({ size: \"medium\" as SelectionControlSize, color: \"primary\" as SelectionControlColor }, props);\n const [local, args] = splitProps(merged, [\n \"disabled\",\n \"readOnly\",\n \"required\",\n \"checked\",\n \"class\",\n \"id\",\n \"label\",\n \"labelPlacement\",\n \"size\",\n \"color\",\n \"helperText\",\n \"error\",\n \"onChange\",\n \"ref\",\n ]);\n const id = createId(local.id);\n\n const handleChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n if (local.readOnly) {\n event.preventDefault();\n return;\n }\n local.onChange?.(event, event.currentTarget.checked, props);\n };\n\n return (\n <TextFieldWrapper\n helperText={local.helperText}\n disabled={local.disabled}\n error={local.error}\n class=\"smwb-text-field-checkbox\"\n >\n <span class={cn(\"smwb-toggle__wrapper\", local.labelPlacement && `smwb-toggle__wrapper_label-${local.labelPlacement}`)}>\n <Show when={local.label}>\n <label for={id} class=\"smwb-toggle__label\">\n {local.label}\n </label>\n </Show>\n <label\n class={cn(\"smwb-toggle\", `smwb-toggle_size-${local.size}`, `smwb-toggle_color-${local.color}`, local.class, {\n \"smwb-disabled\": local.disabled,\n \"smwb-readonly\": local.readOnly,\n })}\n >\n <input\n type=\"checkbox\"\n id={id}\n class=\"smwb-toggle__checkbox\"\n aria-checked={local.checked}\n aria-invalid={local.error || undefined}\n aria-required={local.required || undefined}\n role=\"switch\"\n checked={local.checked}\n disabled={local.disabled}\n readonly={local.readOnly}\n required={local.required}\n ref={mergeRefs(local.ref)}\n {...args}\n onChange={handleChange}\n />\n <span class=\"smwb-toggle__track\" />\n <span class=\"smwb-toggle__thumb\" />\n </label>\n </span>\n </TextFieldWrapper>\n );\n}\n\nexport default Toggle;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,MAAM,YAAY,kBAAkB;AACvD,OAAO,QAAQ;AACf,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,iBAA2B;AAoB7B,SAAS,OAAO,OAAiC;AACtD,QAAM,SAAS,WAAW,EAAE,MAAM,UAAkC,OAAO,UAAmC,GAAG,KAAK;AACtH,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,KAAK,SAAS,MAAM,EAAE;AAE5B,QAAM,eAA0D,CAAC,UAAU;AACzE,QAAI,MAAM,UAAU;AAClB,YAAM,eAAe;AACrB;AAAA,IACF;AACA,UAAM,WAAW,OAAO,MAAM,cAAc,SAAS,KAAK;AAAA,EAC5D;AAEA,SACE,CAAC;AAAA,IACC,YAAY,MAAM;AAAA,IAClB,UAAU,MAAM;AAAA,IAChB,OAAO,MAAM;AAAA,IACb,MAAM;AAAA,GACP;AAAA,MACC,CAAC,KAAK,OAAO,GAAG,wBAAwB,MAAM,kBAAkB,8BAA8B,MAAM,cAAc,EAAE,GAAG;AAAA,QACrH,CAAC,KAAK,MAAM,MAAM,OAAO;AAAA,UACvB,CAAC,MAAM,KAAK,IAAI,MAAM,qBAAqB;AAAA,aACxC,MAAM,MAAM;AAAA,UACf,EAFC,MAEO;AAAA,QACV,EAJC,KAIM;AAAA,QACP,CAAC;AAAA,IACC,OAAO,GAAG,eAAe,oBAAoB,MAAM,IAAI,IAAI,qBAAqB,MAAM,KAAK,IAAI,MAAM,OAAO;AAAA,MAC1G,iBAAiB,MAAM;AAAA,MACvB,iBAAiB,MAAM;AAAA,IACzB,CAAC;AAAA,GACF;AAAA,UACC,CAAC;AAAA,IACC,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,cAAc,MAAM;AAAA,IACpB,cAAc,MAAM,SAAS;AAAA,IAC7B,eAAe,MAAM,YAAY;AAAA,IACjC,KAAK;AAAA,IACL,SAAS,MAAM;AAAA,IACf,UAAU,MAAM;AAAA,IAChB,UAAU,MAAM;AAAA,IAChB,UAAU,MAAM;AAAA,IAChB,KAAK,UAAU,MAAM,GAAG;AAAA,QACpB;AAAA,IACJ,UAAU;AAAA,EACZ,EAAE;AAAA,UACF,CAAC,KAAK,MAAM,qBAAqB,EAAE;AAAA,UACnC,CAAC,KAAK,MAAM,qBAAqB,EAAE;AAAA,QACrC,EAxBC,MAwBO;AAAA,MACV,EA/BC,KA+BM;AAAA,IACT,EAtCC;AAwCL;AAEA,IAAO,iBAAQ;","names":[],"file":"toggle.jsx"}
@@ -1,5 +1,5 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/appLayout/appLayout.entry.less";
2
- import { Show, mergeProps, splitProps } from "solid-js";
1
+ import "@smwb/ui-styles/less/components/appLayout/appLayout.entry.less";
2
+ import { Show, children, mergeProps, splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { Icon } from "../../base/icon";
5
5
  import { createControllableState } from "../../../primitives/createControllableState";
@@ -42,6 +42,9 @@ function AppLayout(props) {
42
42
  onChange: (next) => local.onSidebarCollapsedChange?.(next)
43
43
  });
44
44
  const sidebarId = createId();
45
+ const headerSlot = children(() => local.header);
46
+ const sidebarSlot = children(() => local.sidebar);
47
+ const footerSlot = children(() => local.footer);
45
48
  const style = () => ({
46
49
  "--smui-app-sidebar-w": collapsed() ? len(local.sidebarCollapsedWidth) : len(local.sidebarWidth),
47
50
  ...typeof local.style === "object" && local.style ? local.style : {}
@@ -57,11 +60,11 @@ function AppLayout(props) {
57
60
  )}
58
61
  style={style()}
59
62
  >
60
- <Show when={local.header}>
61
- <div class="smwb-app-layout__header">{local.header}</div>
63
+ <Show when={headerSlot()}>
64
+ <div class="smwb-app-layout__header">{headerSlot()}</div>
62
65
  </Show>
63
66
  <div class="smwb-app-layout__body">
64
- <Show when={local.sidebar}>
67
+ <Show when={sidebarSlot()}>
65
68
  <aside id={sidebarId} class="smwb-app-layout__sidebar">
66
69
  <Show when={local.collapsible}>
67
70
  <div class="smwb-app-layout__collapse">
@@ -82,13 +85,13 @@ function AppLayout(props) {
82
85
  </Show>
83
86
  </div>
84
87
  </Show>
85
- {local.sidebar}
88
+ {sidebarSlot()}
86
89
  </aside>
87
90
  </Show>
88
91
  <div class="smwb-app-layout__content">
89
92
  {local.children}
90
- <Show when={local.footer}>
91
- <div class="smwb-app-layout__footer">{local.footer}</div>
93
+ <Show when={footerSlot()}>
94
+ <div class="smwb-app-layout__footer">{footerSlot()}</div>
92
95
  </Show>
93
96
  </div>
94
97
  </div>
@@ -99,4 +102,4 @@ export {
99
102
  AppLayout,
100
103
  appLayout_default as default
101
104
  };
102
- //# sourceMappingURL=appLayout.js.map
105
+ //# sourceMappingURL=appLayout.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/appLayout/appLayout.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/appLayout/appLayout.entry.less\";\nimport { type JSX, type ParentProps, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Icon } from \"../../base/icon\";\nimport { createControllableState } from \"../../../primitives/createControllableState\";\nimport { createId } from \"../../../primitives/createId\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface AppLayoutProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Top bar slot (e.g. <AppBar />). Spans full width. */\n header?: JSX.Element;\n /** Side navigation slot (e.g. <Sidebar />). */\n sidebar?: JSX.Element;\n /** Footer slot, below the content. */\n footer?: JSX.Element;\n /** Sidebar width (px or any CSS length). */\n sidebarWidth?: number | string;\n /** Controlled collapsed state of the sidebar rail. */\n sidebarCollapsed?: boolean;\n /** Initial collapsed state (uncontrolled). */\n defaultSidebarCollapsed?: boolean;\n /** Called whenever the collapsed state changes. */\n onSidebarCollapsedChange?: (collapsed: boolean) => void;\n /** Renders a built-in toggle button to collapse/expand the sidebar. */\n collapsible?: boolean;\n /** Custom toggle node replacing the default icon button. */\n collapseToggle?: JSX.Element;\n /** Accessible label for the default toggle button. */\n collapseToggleAriaLabel?: string;\n /** Sidebar collapsed width. */\n sidebarCollapsedWidth?: number | string;\n /** Keep the header pinned while content scrolls. */\n stickyHeader?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst len = (v: number | string): string => (typeof v === \"number\" ? `${v}px` : v);\n\nexport function AppLayout(props: ParentProps<AppLayoutProps>): JSX.Element {\n const merged = mergeProps(\n {\n sidebarWidth: 260 as number | string,\n defaultSidebarCollapsed: false,\n collapsible: false,\n collapseToggleAriaLabel: \"Toggle navigation\",\n sidebarCollapsedWidth: 72 as number | string,\n stickyHeader: true,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"header\",\n \"sidebar\",\n \"footer\",\n \"sidebarWidth\",\n \"sidebarCollapsed\",\n \"defaultSidebarCollapsed\",\n \"onSidebarCollapsedChange\",\n \"collapsible\",\n \"collapseToggle\",\n \"collapseToggleAriaLabel\",\n \"sidebarCollapsedWidth\",\n \"stickyHeader\",\n \"class\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const [collapsed, setCollapsed] = createControllableState<boolean>({\n value: () => local.sidebarCollapsed,\n defaultValue: local.defaultSidebarCollapsed,\n onChange: (next) => local.onSidebarCollapsedChange?.(next),\n });\n\n const sidebarId = createId();\n\n const style = (): JSX.CSSProperties => ({\n \"--smui-app-sidebar-w\": collapsed() ? len(local.sidebarCollapsedWidth) : len(local.sidebarWidth),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n });\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"app-layout\"\n class={cn(\n \"smwb-app-layout\",\n { \"smwb-app-layout_sticky-header\": local.stickyHeader, \"smwb-app-layout_collapsed\": collapsed() },\n local.class\n )}\n style={style()}\n >\n <Show when={local.header}>\n <div class=\"smwb-app-layout__header\">{local.header}</div>\n </Show>\n <div class=\"smwb-app-layout__body\">\n <Show when={local.sidebar}>\n <aside id={sidebarId} class=\"smwb-app-layout__sidebar\">\n <Show when={local.collapsible}>\n <div class=\"smwb-app-layout__collapse\">\n <Show\n when={local.collapseToggle}\n fallback={\n <button\n type=\"button\"\n class=\"smwb-app-layout__collapse-btn\"\n aria-label={local.collapseToggleAriaLabel}\n aria-expanded={!collapsed()}\n aria-controls={sidebarId}\n onClick={() => setCollapsed(!collapsed())}\n >\n <Icon name={collapsed() ? \"chevron_right\" : \"chevron_left\"} size={20} />\n </button>\n }\n >\n {local.collapseToggle}\n </Show>\n </div>\n </Show>\n {local.sidebar}\n </aside>\n </Show>\n <div class=\"smwb-app-layout__content\">\n {local.children}\n <Show when={local.footer}>\n <div class=\"smwb-app-layout__footer\">{local.footer}</div>\n </Show>\n </div>\n </div>\n </div>\n );\n}\n\nexport default AppLayout;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,YAAY,kBAAkB;AACzE,OAAO,QAAQ;AACf,SAAS,YAAY;AACrB,SAAS,+BAA+B;AACxC,SAAS,gBAAgB;AACzB,SAAS,iBAA2B;AA8BpC,MAAM,MAAM,CAAC,MAAgC,OAAO,MAAM,WAAW,GAAG,CAAC,OAAO;AAEzE,SAAS,UAAU,OAAiD;AACzE,QAAM,SAAS;AAAA,IACb;AAAA,MACE,cAAc;AAAA,MACd,yBAAyB;AAAA,MACz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,KAAK,MAAM,MAAM,aAAa;AAAA,cAC7B,CAAC,IAAI,MAAM,4BAA4B;AAAA,gBACrC,CAAC;AAAA,IACC,MAAM,MAAM;AAAA,IACZ,UACE,CAAC;AAAA,MACC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,YAAY,MAAM;AAAA,MAClB,eAAe,CAAC,UAAU;AAAA,MAC1B,eAAe;AAAA,MACf,SAAS,MAAM,aAAa,CAAC,UAAU,CAAC;AAAA,KACzC;AAAA,sBACC,CAAC,KAAK,MAAM,UAAU,IAAI,kBAAkB,gBAAgB,MAAM,IAAI,EAAE;AAAA,oBAC1E,EATC;AAAA,GAWJ;AAAA,mBACE,MAAM,eAAe;AAAA,gBACxB,EAhBC,KAgBM;AAAA,cACT,EAlBC,IAkBK;AAAA,YACR,EApBC,KAoBM;AAAA,aACN,MAAM,QAAQ;AAAA,UACjB,EAvBC,MAuBO;AAAA,QACV,EAzBC,KAyBM;AAAA,QACP,CAAC,IAAI,MAAM,2BAA2B;AAAA,WACnC,MAAM,SAAS;AAAA,UAChB,CAAC,KAAK,MAAM,MAAM,QAAQ;AAAA,YACxB,CAAC,IAAI,MAAM,2BAA2B,MAAM,OAAO,EAAlD,IAAwD;AAAA,UAC3D,EAFC,KAEM;AAAA,QACT,EALC,IAKK;AAAA,MACR,EAjCC,IAiCK;AAAA,IACR,EAhDC;AAkDL;AAEA,IAAO,oBAAQ;","names":[],"file":"appLayout.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/appLayout/appLayout.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/appLayout/appLayout.entry.less\";\nimport { type JSX, type ParentProps, Show, children, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Icon } from \"../../base/icon\";\nimport { createControllableState } from \"../../../primitives/createControllableState\";\nimport { createId } from \"../../../primitives/createId\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface AppLayoutProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Top bar slot (e.g. <AppBar />). Spans full width. */\n header?: JSX.Element;\n /** Side navigation slot (e.g. <Sidebar />). */\n sidebar?: JSX.Element;\n /** Footer slot, below the content. */\n footer?: JSX.Element;\n /** Sidebar width (px or any CSS length). */\n sidebarWidth?: number | string;\n /** Controlled collapsed state of the sidebar rail. */\n sidebarCollapsed?: boolean;\n /** Initial collapsed state (uncontrolled). */\n defaultSidebarCollapsed?: boolean;\n /** Called whenever the collapsed state changes. */\n onSidebarCollapsedChange?: (collapsed: boolean) => void;\n /** Renders a built-in toggle button to collapse/expand the sidebar. */\n collapsible?: boolean;\n /** Custom toggle node replacing the default icon button. */\n collapseToggle?: JSX.Element;\n /** Accessible label for the default toggle button. */\n collapseToggleAriaLabel?: string;\n /** Sidebar collapsed width. */\n sidebarCollapsedWidth?: number | string;\n /** Keep the header pinned while content scrolls. */\n stickyHeader?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst len = (v: number | string): string => (typeof v === \"number\" ? `${v}px` : v);\n\nexport function AppLayout(props: ParentProps<AppLayoutProps>): JSX.Element {\n const merged = mergeProps(\n {\n sidebarWidth: 260 as number | string,\n defaultSidebarCollapsed: false,\n collapsible: false,\n collapseToggleAriaLabel: \"Toggle navigation\",\n sidebarCollapsedWidth: 72 as number | string,\n stickyHeader: true,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"header\",\n \"sidebar\",\n \"footer\",\n \"sidebarWidth\",\n \"sidebarCollapsed\",\n \"defaultSidebarCollapsed\",\n \"onSidebarCollapsedChange\",\n \"collapsible\",\n \"collapseToggle\",\n \"collapseToggleAriaLabel\",\n \"sidebarCollapsedWidth\",\n \"stickyHeader\",\n \"class\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const [collapsed, setCollapsed] = createControllableState<boolean>({\n value: () => local.sidebarCollapsed,\n defaultValue: local.defaultSidebarCollapsed,\n onChange: (next) => local.onSidebarCollapsedChange?.(next),\n });\n\n const sidebarId = createId();\n\n // Resolve slot props through `children()` so each is created once, in THIS\n // component's reactive context. A pre-created element passed straight into a\n // <Show> gets its hydration key at the caller's position but renders at the\n // Show's, so the hydration walk can't find it (\"Unable to find DOM nodes for\n // key\"). Resolving here keeps the key sequence aligned on server and client.\n const headerSlot = children(() => local.header);\n const sidebarSlot = children(() => local.sidebar);\n const footerSlot = children(() => local.footer);\n\n const style = (): JSX.CSSProperties => ({\n \"--smui-app-sidebar-w\": collapsed() ? len(local.sidebarCollapsedWidth) : len(local.sidebarWidth),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n });\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"app-layout\"\n class={cn(\n \"smwb-app-layout\",\n { \"smwb-app-layout_sticky-header\": local.stickyHeader, \"smwb-app-layout_collapsed\": collapsed() },\n local.class\n )}\n style={style()}\n >\n <Show when={headerSlot()}>\n <div class=\"smwb-app-layout__header\">{headerSlot()}</div>\n </Show>\n <div class=\"smwb-app-layout__body\">\n <Show when={sidebarSlot()}>\n <aside id={sidebarId} class=\"smwb-app-layout__sidebar\">\n <Show when={local.collapsible}>\n <div class=\"smwb-app-layout__collapse\">\n <Show\n when={local.collapseToggle}\n fallback={\n <button\n type=\"button\"\n class=\"smwb-app-layout__collapse-btn\"\n aria-label={local.collapseToggleAriaLabel}\n aria-expanded={!collapsed()}\n aria-controls={sidebarId}\n onClick={() => setCollapsed(!collapsed())}\n >\n <Icon name={collapsed() ? \"chevron_right\" : \"chevron_left\"} size={20} />\n </button>\n }\n >\n {local.collapseToggle}\n </Show>\n </div>\n </Show>\n {sidebarSlot()}\n </aside>\n </Show>\n <div class=\"smwb-app-layout__content\">\n {local.children}\n <Show when={footerSlot()}>\n <div class=\"smwb-app-layout__footer\">{footerSlot()}</div>\n </Show>\n </div>\n </div>\n </div>\n );\n}\n\nexport default AppLayout;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,UAAU,YAAY,kBAAkB;AACnF,OAAO,QAAQ;AAC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oBAAQ;","names":[],"file":"appLayout.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/divider/divider.entry.less";
1
+ import "@smwb/ui-styles/less/components/divider/divider.entry.less";
2
2
  import { Show, mergeProps, splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { mergeRefs } from "../../../primitives/mergeRefs";
@@ -66,4 +66,4 @@ export {
66
66
  Divider,
67
67
  divider_default as default
68
68
  };
69
- //# sourceMappingURL=divider.js.map
69
+ //# sourceMappingURL=divider.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/divider/divider.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/divider/divider.entry.less\";\nimport { type JSX, type ParentProps, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type DividerColor = \"default\" | \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\";\n\nexport interface DividerProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Direction of the divider line. */\n orientation?: \"horizontal\" | \"vertical\";\n /** Inset behaviour of the line relative to its container. */\n variant?: \"fullWidth\" | \"inset\" | \"middle\";\n /** Horizontal alignment of the optional text content. */\n textAlign?: \"left\" | \"center\" | \"right\";\n /** Line color (semantic token). */\n color?: DividerColor;\n /** Line thickness (number = px, or any CSS length). */\n thickness?: number | string;\n /** Stretch to fill a flex container along the cross axis. */\n flexItem?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst colorVar: Record<DividerColor, string | undefined> = {\n default: undefined,\n primary: \"var(--smui-primaryColor)\",\n secondary: \"var(--smui-secondaryColor)\",\n error: \"var(--smui-errorColor)\",\n success: \"var(--smui-successColor)\",\n warning: \"var(--smui-warningColor)\",\n info: \"var(--smui-infoColor)\",\n};\n\nexport function Divider(props: ParentProps<DividerProps>): JSX.Element {\n const merged = mergeProps(\n {\n orientation: \"horizontal\" as const,\n variant: \"fullWidth\" as const,\n textAlign: \"center\" as const,\n color: \"default\" as DividerColor,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"variant\",\n \"textAlign\",\n \"color\",\n \"thickness\",\n \"flexItem\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const hasText = (): boolean =>\n local.children !== undefined && local.children !== null && (local.children as unknown) !== false;\n\n const dividerStyle = (): JSX.CSSProperties => {\n const c = colorVar[local.color];\n const t = typeof local.thickness === \"number\" ? `${local.thickness}px` : local.thickness;\n return {\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n ...(c ? { \"border-color\": c } : {}),\n ...(t ? (local.orientation === \"vertical\" ? { \"border-left-width\": t } : { \"border-bottom-width\": t }) : {}),\n };\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"divider\"\n role=\"separator\"\n aria-orientation={local.orientation}\n class={cn(\"smwb-divider\", `smwb-divider_${local.orientation}`, `smwb-divider_${local.variant}`, {\n \"smwb-divider_with-text\": hasText() && local.orientation === \"horizontal\",\n [`smwb-divider_align-${local.textAlign}`]: hasText() && local.orientation === \"horizontal\",\n \"smwb-divider_flex-item\": local.flexItem,\n }, local.class)}\n style={dividerStyle()}\n >\n <Show when={hasText() && local.orientation === \"horizontal\"}>\n <span class=\"smwb-divider__text\">{local.children}</span>\n </Show>\n </div>\n );\n}\n\nexport default Divider;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,YAAY,kBAAkB;AACzE,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAoBpC,MAAM,WAAqD;AAAA,EACzD,SAAS;AAAA,EACT,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR;AAEO,SAAS,QAAQ,OAA+C;AACrE,QAAM,SAAS;AAAA,IACb;AAAA,MACE,aAAa;AAAA,MACb,SAAS;A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KAAK,MAAM,sBAAsB,MAAM,SAAS,EAAhD,KAAuD;AAAA,MAC1D,EAFC,KAEM;AAAA,IACT,EAhBC;AAkBL;AAEA,IAAO,kBAAQ;","names":[],"file":"divider.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/divider/divider.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/divider/divider.entry.less\";\nimport { type JSX, type ParentProps, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type DividerColor = \"default\" | \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\";\n\nexport interface DividerProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Direction of the divider line. */\n orientation?: \"horizontal\" | \"vertical\";\n /** Inset behaviour of the line relative to its container. */\n variant?: \"fullWidth\" | \"inset\" | \"middle\";\n /** Horizontal alignment of the optional text content. */\n textAlign?: \"left\" | \"center\" | \"right\";\n /** Line color (semantic token). */\n color?: DividerColor;\n /** Line thickness (number = px, or any CSS length). */\n thickness?: number | string;\n /** Stretch to fill a flex container along the cross axis. */\n flexItem?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst colorVar: Record<DividerColor, string | undefined> = {\n default: undefined,\n primary: \"var(--smui-primaryColor)\",\n secondary: \"var(--smui-secondaryColor)\",\n error: \"var(--smui-errorColor)\",\n success: \"var(--smui-successColor)\",\n warning: \"var(--smui-warningColor)\",\n info: \"var(--smui-infoColor)\",\n};\n\nexport function Divider(props: ParentProps<DividerProps>): JSX.Element {\n const merged = mergeProps(\n {\n orientation: \"horizontal\" as const,\n variant: \"fullWidth\" as const,\n textAlign: \"center\" as const,\n color: \"default\" as DividerColor,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"variant\",\n \"textAlign\",\n \"color\",\n \"thickness\",\n \"flexItem\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const hasText = (): boolean =>\n local.children !== undefined && local.children !== null && (local.children as unknown) !== false;\n\n const dividerStyle = (): JSX.CSSProperties => {\n const c = colorVar[local.color];\n const t = typeof local.thickness === \"number\" ? `${local.thickness}px` : local.thickness;\n return {\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n ...(c ? { \"border-color\": c } : {}),\n ...(t ? (local.orientation === \"vertical\" ? { \"border-left-width\": t } : { \"border-bottom-width\": t }) : {}),\n };\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"divider\"\n role=\"separator\"\n aria-orientation={local.orientation}\n class={cn(\"smwb-divider\", `smwb-divider_${local.orientation}`, `smwb-divider_${local.variant}`, {\n \"smwb-divider_with-text\": hasText() && local.orientation === \"horizontal\",\n [`smwb-divider_align-${local.textAlign}`]: hasText() && local.orientation === \"horizontal\",\n \"smwb-divider_flex-item\": local.flexItem,\n }, local.class)}\n style={dividerStyle()}\n >\n <Show when={hasText() && local.orientation === \"horizontal\"}>\n <span class=\"smwb-divider__text\">{local.children}</span>\n </Show>\n </div>\n );\n}\n\nexport default Divider;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,YAAY,kBAAkB;AACzE,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAoBpC,MAAM,WAAqD;AAAA,EACzD,SAAS;AAAA,EACT,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR;AAEO,SAAS,QAAQ,OAA+C;AACrE,QAAM,SAAS;AAAA,IACb;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACA,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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styles/less/components/grid/grid.entry.less";
2
2
  import { splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { mergeRefs } from "../../../primitives/mergeRefs";
@@ -110,4 +110,4 @@ export {
110
110
  justifyContentOptions,
111
111
  wrapOptions
112
112
  };
113
- //# sourceMappingURL=grid.js.map
113
+ //# sourceMappingURL=grid.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/grid/grid.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/grid/grid.entry.less\";\nimport { type JSX, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\ntype DivProps = JSX.HTMLAttributes<HTMLDivElement> & { ref?: Ref<HTMLDivElement> };\n\nexport function Grid(props: DivProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"class\", \"ref\"]);\n return <div {...rest} ref={mergeRefs(local.ref)} data-testid=\"grid\" class={cn(\"smwb-grid\", local.class)} />;\n}\n\nexport type ColumnSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n/** Column width per breakpoint: 1–12 grid units, `\"auto\"` (fit content) or `true` (fill remaining). */\nexport type BreakpointType = ColumnSpan | \"auto\" | true;\n/** Column offset (empty leading columns) per breakpoint: 0–11. */\nexport type OffsetType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\nexport type Breakpoint = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveBool = boolean | Partial<Record<Breakpoint, boolean>>;\n\nexport const wrapOptions = [\"wrap\", \"nowrap\", \"wrap-reverse\"] as const;\nexport const justifyContentOptions = [\n \"flex-start\",\n \"center\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n] as const;\nexport const alignItemsOptions = [\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"baseline\"] as const;\nexport const directionOptions = [\"row\", \"row-reverse\", \"column\", \"column-reverse\"] as const;\n\nexport interface RowProps extends JSX.HTMLAttributes<HTMLDivElement> {\n wrap?: (typeof wrapOptions)[number];\n justifyContent?: (typeof justifyContentOptions)[number];\n alignItems?: (typeof alignItemsOptions)[number];\n direction?: (typeof directionOptions)[number];\n spacing?: number;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function Row(props: RowProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"class\",\n \"justifyContent\",\n \"alignItems\",\n \"direction\",\n \"wrap\",\n \"spacing\",\n \"ref\",\n ]);\n\n const classes = (): string => {\n const isJustifyContent =\n local.justifyContent && justifyContentOptions.includes(local.justifyContent) && local.justifyContent !== \"flex-start\";\n const isAlignItems = local.alignItems && alignItemsOptions.includes(local.alignItems) && local.alignItems !== \"flex-start\";\n const isDirection = local.direction && directionOptions.includes(local.direction) && local.direction !== \"row\";\n const isFlexWrap = local.wrap && wrapOptions.includes(local.wrap) && local.wrap !== \"wrap\";\n return cn(\"smwb-grid__row\", local.class, {\n [`smwb-grid__row--spacing-${local.spacing}`]: local.spacing,\n [`smwb-grid__row--justifyContent-${local.justifyContent}`]: isJustifyContent,\n [`smwb-grid__row--alignItems-${local.alignItems}`]: isAlignItems,\n [`smwb-grid__row--direction-${local.direction}`]: isDirection,\n [`smwb-grid__row--${local.wrap}`]: isFlexWrap,\n });\n };\n\n return <div {...rest} ref={mergeRefs(local.ref)} data-testid=\"grid-row\" class={classes()} />;\n}\n\nexport interface ColumnProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"hidden\"> {\n xs?: BreakpointType;\n sm?: BreakpointType;\n md?: BreakpointType;\n lg?: BreakpointType;\n xl?: BreakpointType;\n xsOffset?: OffsetType;\n smOffset?: OffsetType;\n mdOffset?: OffsetType;\n lgOffset?: OffsetType;\n xlOffset?: OffsetType;\n /** Hide column: boolean (always) or per breakpoint `{ xs:true, md:false }`. */\n hidden?: ResponsiveBool;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst hiddenClasses = (hidden?: ResponsiveBool): Record<string, boolean> => {\n if (hidden === undefined) {\n return {};\n }\n if (typeof hidden === \"boolean\") {\n return { \"smwb-grid__column--hidden\": hidden };\n }\n return (Object.keys(hidden) as Breakpoint[]).reduce<Record<string, boolean>>((acc, bp) => {\n acc[`smwb-grid__column--hidden-${bp}`] = hidden[bp] === true;\n acc[`smwb-grid__column--visible-${bp}`] = hidden[bp] === false;\n return acc;\n }, {});\n};\n\nexport function Column(props: ColumnProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"class\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"xsOffset\",\n \"smOffset\",\n \"mdOffset\",\n \"lgOffset\",\n \"xlOffset\",\n \"hidden\",\n \"ref\",\n ]);\n\n const classes = (): string =>\n cn(\"smwb-grid__column\", local.class, {\n [`smwb-grid__column--xs-${local.xs}`]: local.xs,\n [`smwb-grid__column--sm-${local.sm}`]: local.sm,\n [`smwb-grid__column--md-${local.md}`]: local.md,\n [`smwb-grid__column--lg-${local.lg}`]: local.lg,\n [`smwb-grid__column--xl-${local.xl}`]: local.xl,\n [`smwb-grid__column--xs-offset-${local.xsOffset}`]: local.xsOffset,\n [`smwb-grid__column--sm-offset-${local.smOffset}`]: local.smOffset,\n [`smwb-grid__column--md-offset-${local.mdOffset}`]: local.mdOffset,\n [`smwb-grid__column--lg-offset-${local.lgOffset}`]: local.lgOffset,\n [`smwb-grid__column--xl-offset-${local.xlOffset}`]: local.xlOffset,\n ...hiddenClasses(local.hidden),\n });\n\n return <div {...rest} ref={mergeRefs(local.ref)} class={classes()} data-testid=\"grid-col\" />;\n}\n\nexport type ContainerMaxWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | false;\nexport interface ContainerProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Max-width breakpoint cap; `false` = fluid full width. */\n maxWidth?: ContainerMaxWidth;\n /** Remove horizontal gutters. */\n disableGutters?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function Container(props: ContainerProps): JSX.Element {\n const merged = props;\n const [local, rest] = splitProps(merged, [\"class\", \"maxWidth\", \"disableGutters\", \"ref\"]);\n const maxWidth = (): ContainerMaxWidth => local.maxWidth ?? \"lg\";\n const classes = (): string =>\n cn(\n \"smwb-container\",\n {\n [`smwb-container--${maxWidth()}`]: maxWidth() !== false,\n \"smwb-container--gutterless\": local.disableGutters,\n },\n local.class\n );\n return <div {...rest} ref={mergeRefs(local.ref)} data-testid=\"grid-container\" class={classes()} />;\n}\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,kBAAkB;AACrC,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAI7B,SAAS,KAAK,OAA8B;AACjD,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,OAAO,CAAC,SAAS,KAAK,CAAC;AACxD,SAAO,CAAC,QAAQ,MAAM,KAAK,UAAU,MAAM,GAAG,GAAG,YAAY,OAAO,OAAO,GAAG,aAAa,MAAM,KAAK,GAAG;AAC3G;AAUO,MAAM,cAAc,CAAC,QAAQ,UAAU,cAAc;AACrD,MAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,oBAAoB,CAAC,cAAc,UAAU,YAAY,WAAW,UAAU;AACpF,MAAM,mBAAmB,CAAC,OAAO,eAAe,UAAU,gBAAgB;AAW1E,SAAS,IAAI,OAA8B;AAChD,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,OAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UAAU,MAAc;AAC5B,UAAM,mBACJ,MAAM,kBAAkB,sBAAsB,SAAS,MAAM,cAAc,KAAK,MAAM,mBAAmB;AAC3G,UAAM,eAAe,MAAM,cAAc,kBAAkB,SAAS,MAAM,UAAU,KAAK,MAAM,eAAe;AAC9G,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components/layout/grid/grid.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/grid/grid.entry.less\";\nimport { type JSX, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\ntype DivProps = JSX.HTMLAttributes<HTMLDivElement> & { ref?: Ref<HTMLDivElement> };\n\nexport function Grid(props: DivProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"class\", \"ref\"]);\n return <div {...rest} ref={mergeRefs(local.ref)} data-testid=\"grid\" class={cn(\"smwb-grid\", local.class)} />;\n}\n\nexport type ColumnSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n/** Column width per breakpoint: 1–12 grid units, `\"auto\"` (fit content) or `true` (fill remaining). */\nexport type BreakpointType = ColumnSpan | \"auto\" | true;\n/** Column offset (empty leading columns) per breakpoint: 0–11. */\nexport type OffsetType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\nexport type Breakpoint = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveBool = boolean | Partial<Record<Breakpoint, boolean>>;\n\nexport const wrapOptions = [\"wrap\", \"nowrap\", \"wrap-reverse\"] as const;\nexport const justifyContentOptions = [\n \"flex-start\",\n \"center\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n] as const;\nexport const alignItemsOptions = [\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"baseline\"] as const;\nexport const directionOptions = [\"row\", \"row-reverse\", \"column\", \"column-reverse\"] as const;\n\nexport interface RowProps extends JSX.HTMLAttributes<HTMLDivElement> {\n wrap?: (typeof wrapOptions)[number];\n justifyContent?: (typeof justifyContentOptions)[number];\n alignItems?: (typeof alignItemsOptions)[number];\n direction?: (typeof directionOptions)[number];\n spacing?: number;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function Row(props: RowProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"class\",\n \"justifyContent\",\n \"alignItems\",\n \"direction\",\n \"wrap\",\n \"spacing\",\n \"ref\",\n ]);\n\n const classes = (): string => {\n const isJustifyContent =\n local.justifyContent && justifyContentOptions.includes(local.justifyContent) && local.justifyContent !== \"flex-start\";\n const isAlignItems = local.alignItems && alignItemsOptions.includes(local.alignItems) && local.alignItems !== \"flex-start\";\n const isDirection = local.direction && directionOptions.includes(local.direction) && local.direction !== \"row\";\n const isFlexWrap = local.wrap && wrapOptions.includes(local.wrap) && local.wrap !== \"wrap\";\n return cn(\"smwb-grid__row\", local.class, {\n [`smwb-grid__row--spacing-${local.spacing}`]: local.spacing,\n [`smwb-grid__row--justifyContent-${local.justifyContent}`]: isJustifyContent,\n [`smwb-grid__row--alignItems-${local.alignItems}`]: isAlignItems,\n [`smwb-grid__row--direction-${local.direction}`]: isDirection,\n [`smwb-grid__row--${local.wrap}`]: isFlexWrap,\n });\n };\n\n return <div {...rest} ref={mergeRefs(local.ref)} data-testid=\"grid-row\" class={classes()} />;\n}\n\nexport interface ColumnProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"hidden\"> {\n xs?: BreakpointType;\n sm?: BreakpointType;\n md?: BreakpointType;\n lg?: BreakpointType;\n xl?: BreakpointType;\n xsOffset?: OffsetType;\n smOffset?: OffsetType;\n mdOffset?: OffsetType;\n lgOffset?: OffsetType;\n xlOffset?: OffsetType;\n /** Hide column: boolean (always) or per breakpoint `{ xs:true, md:false }`. */\n hidden?: ResponsiveBool;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst hiddenClasses = (hidden?: ResponsiveBool): Record<string, boolean> => {\n if (hidden === undefined) {\n return {};\n }\n if (typeof hidden === \"boolean\") {\n return { \"smwb-grid__column--hidden\": hidden };\n }\n return (Object.keys(hidden) as Breakpoint[]).reduce<Record<string, boolean>>((acc, bp) => {\n acc[`smwb-grid__column--hidden-${bp}`] = hidden[bp] === true;\n acc[`smwb-grid__column--visible-${bp}`] = hidden[bp] === false;\n return acc;\n }, {});\n};\n\nexport function Column(props: ColumnProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"class\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"xsOffset\",\n \"smOffset\",\n \"mdOffset\",\n \"lgOffset\",\n \"xlOffset\",\n \"hidden\",\n \"ref\",\n ]);\n\n const classes = (): string =>\n cn(\"smwb-grid__column\", local.class, {\n [`smwb-grid__column--xs-${local.xs}`]: local.xs,\n [`smwb-grid__column--sm-${local.sm}`]: local.sm,\n [`smwb-grid__column--md-${local.md}`]: local.md,\n [`smwb-grid__column--lg-${local.lg}`]: local.lg,\n [`smwb-grid__column--xl-${local.xl}`]: local.xl,\n [`smwb-grid__column--xs-offset-${local.xsOffset}`]: local.xsOffset,\n [`smwb-grid__column--sm-offset-${local.smOffset}`]: local.smOffset,\n [`smwb-grid__column--md-offset-${local.mdOffset}`]: local.mdOffset,\n [`smwb-grid__column--lg-offset-${local.lgOffset}`]: local.lgOffset,\n [`smwb-grid__column--xl-offset-${local.xlOffset}`]: local.xlOffset,\n ...hiddenClasses(local.hidden),\n });\n\n return <div {...rest} ref={mergeRefs(local.ref)} class={classes()} data-testid=\"grid-col\" />;\n}\n\nexport type ContainerMaxWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | false;\nexport interface ContainerProps extends JSX.HTMLAttributes<HTMLDivElement> {\n /** Max-width breakpoint cap; `false` = fluid full width. */\n maxWidth?: ContainerMaxWidth;\n /** Remove horizontal gutters. */\n disableGutters?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function Container(props: ContainerProps): JSX.Element {\n const merged = props;\n const [local, rest] = splitProps(merged, [\"class\", \"maxWidth\", \"disableGutters\", \"ref\"]);\n const maxWidth = (): ContainerMaxWidth => local.maxWidth ?? \"lg\";\n const classes = (): string =>\n cn(\n \"smwb-container\",\n {\n [`smwb-container--${maxWidth()}`]: maxWidth() !== false,\n \"smwb-container--gutterless\": local.disableGutters,\n },\n local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AAE,EAAE,GAAG,MAAM;AAAA,IAC7C,CAAC,gCAAgC,MAAM,QAAQ,EAAE,GAAG,MAAM;AAAA,IAC1D,CAAC,gCAAgC,MAAM,QAAQ,EAAE,GAAG,MAAM;AAAA,IAC1D,CAAC,gCAAgC,MAAM,QAAQ,EAAE,GAAG,MAAM;AAAA,IAC1D,CAAC,gCAAgC,MAAM,QAAQ,EAAE,GAAG,MAAM;AAAA,IAC1D,CAAC,gCAAgC,MAAM,QAAQ,EAAE,GAAG,MAAM;AAAA,IAC1D,GAAG,cAAc,MAAM,MAAM;AAAA,EAC/B,CAAC;AAEH,SAAO,CAAC,QAAQ,MAAM,KAAK,UAAU,MAAM,GAAG,GAAG,OAAO,QAAQ,GAAG,YAAY,WAAW;AAC5F;AAWO,SAAS,UAAU,OAAoC;AAC5D,QAAM,SAAS;AACf,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ,CAAC,SAAS,YAAY,kBAAkB,KAAK,CAAC;AACvF,QAAM,WAAW,MAAyB,MAAM,YAAY;AAC5D,QAAM,UAAU,MACd;AAAA,IACE;AAAA,IACA;AAAA,MACE,CAAC,mBAAmB,SAAS,CAAC,EAAE,GAAG,SAAS,MAAM;AAAA,MAClD,8BAA8B,MAAM;AAAA,IACtC;AAAA,IACA,MAAM;AAAA,EACR;AACF,SAAO,CAAC,QAAQ,MAAM,KAAK,UAAU,MAAM,GAAG,GAAG,YAAY,iBAAiB,OAAO,QAAQ,GAAG;AAClG;","names":[],"file":"grid.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/page/page.entry.less";
1
+ import "@smwb/ui-styles/less/components/page/page.entry.less";
2
2
  import { mergeProps, splitProps } from "solid-js";
3
3
  import { Dynamic } from "solid-js/web";
4
4
  import cn from "clsx";
@@ -26,4 +26,4 @@ export {
26
26
  Page,
27
27
  page_default as default
28
28
  };
29
- //# sourceMappingURL=page.js.map
29
+ //# sourceMappingURL=page.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/page/page.entry.less\";\nimport { type JSX, type ParentProps, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type PageMaxWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport interface PageProps extends JSX.HTMLAttributes<HTMLElement> {\n /** Content max-width cap; `full` = fluid. */\n maxWidth?: PageMaxWidth;\n /** Remove the page padding. */\n disableGutters?: boolean;\n /** Render as a different element (default `main`). */\n component?: string;\n ref?: Ref<HTMLElement>;\n}\n\nexport function Page(props: ParentProps<PageProps>): JSX.Element {\n const merged = mergeProps({ maxWidth: \"lg\" as PageMaxWidth, disableGutters: false }, props);\n const [local, rest] = splitProps(merged, [\"maxWidth\", \"disableGutters\", \"component\", \"class\", \"children\", \"ref\"]);\n return (\n <Dynamic\n component={local.component ?? \"main\"}\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"page\"\n class={cn(\n \"smwb-page\",\n `smwb-page_max-${local.maxWidth}`,\n { \"smwb-page_gutterless\": local.disableGutters },\n local.class\n )}\n >\n <div class=\"smwb-page__inner\">{local.children}</div>\n </Dynamic>\n );\n}\n\nexport default Page;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,YAAY,kBAAkB;AACnE,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAc7B,SAAS,KAAK,OAA4C;AAC/D,QAAM,SAAS,WAAW,EAAE,UAAU,MAAsB,gBAAgB,MAAM,GAAG,KAAK;AAC1F,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ,CAAC,YAAY,kBAAkB,aAAa,SAAS,YAAY,KAAK,CAAC;AAChH,SACE,CAAC;AAAA,IACC,WAAW,MAAM,aAAa;AAAA,QAC1B;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA,iBAAiB,MAAM,QAAQ;AAAA,MAC/B,EAAE,wBAAwB,MAAM,eAAe;AAAA,MAC/C,MAAM;AAAA,IACR;AAAA,GACD;AAAA,MACC,CAAC,IAAI,MAAM,oBAAoB,MAAM,SAAS,EAA7C,IAAmD;AAAA,IACtD,EAbC;AAeL;AAEA,IAAO,eAAQ;","names":[],"file":"page.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/page/page.entry.less\";\nimport { type JSX, type ParentProps, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type PageMaxWidth = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport interface PageProps extends JSX.HTMLAttributes<HTMLElement> {\n /** Content max-width cap; `full` = fluid. */\n maxWidth?: PageMaxWidth;\n /** Remove the page padding. */\n disableGutters?: boolean;\n /** Render as a different element (default `main`). */\n component?: string;\n ref?: Ref<HTMLElement>;\n}\n\nexport function Page(props: ParentProps<PageProps>): JSX.Element {\n const merged = mergeProps({ maxWidth: \"lg\" as PageMaxWidth, disableGutters: false }, props);\n const [local, rest] = splitProps(merged, [\"maxWidth\", \"disableGutters\", \"component\", \"class\", \"children\", \"ref\"]);\n return (\n <Dynamic\n component={local.component ?? \"main\"}\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"page\"\n class={cn(\n \"smwb-page\",\n `smwb-page_max-${local.maxWidth}`,\n { \"smwb-page_gutterless\": local.disableGutters },\n local.class\n )}\n >\n <div class=\"smwb-page__inner\">{local.children}</div>\n </Dynamic>\n );\n}\n\nexport default Page;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,YAAY,kBAAkB;AACnE,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAc7B,SAAS,KAAK,OAA4C;AAC/D,QAAM,SAAS,WAAW,EAAE,UAAU,MAAsB,gBAAgB,MAAM,GAAG,KAAK;AAC1F,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ,CAAC,YAAY,kBAAkB,aAAa,SAAS,YAAY,KAAK,CAAC;AAChH,SACE,CAAC;AAAA,IACC,WAAW,MAAM,aAAa;AAAA,QAC1B;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA,iBAAiB,MAAM,QAAQ;AAAA,MAC/B,EAAE,wBAAwB,MAAM,eAAe;AAAA,MAC/C,MAAM;AAAA,IACR;AAAA,GACD;AAAA,MACC,CAAC,IAAI,MAAM,oBAAoB,MAAM,SAAS,EAA7C,IAAmD;AAAA,IACtD,EAbC;AAeL;AAEA,IAAO,eAAQ;","names":[],"file":"page.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/pageHeader/pageHeader.entry.less";
1
+ import "@smwb/ui-styles/less/components/pageHeader/pageHeader.entry.less";
2
2
  import { Show, mergeProps, splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { Typography } from "../../dataDisplay/typography";
@@ -50,4 +50,4 @@ export {
50
50
  PageHeader,
51
51
  pageHeader_default as default
52
52
  };
53
- //# sourceMappingURL=pageHeader.js.map
53
+ //# sourceMappingURL=pageHeader.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/pageHeader/pageHeader.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/pageHeader/pageHeader.entry.less\";\nimport { type JSX, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Typography } from \"../../dataDisplay/typography\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface PageHeaderProps extends Omit<JSX.HTMLAttributes<HTMLElement>, \"title\"> {\n title: JSX.Element | string;\n subtitle?: JSX.Element | string;\n /** Slot above the title (e.g. <Breadcrumbs />). */\n breadcrumbs?: JSX.Element;\n /** Slot on the trailing side (e.g. action buttons). */\n actions?: JSX.Element;\n /** Render a divider below the header. */\n divider?: boolean;\n ref?: Ref<HTMLElement>;\n}\n\nexport function PageHeader(props: PageHeaderProps): JSX.Element {\n const merged = mergeProps({ divider: false }, props);\n const [local, rest] = splitProps(merged, [\n \"title\",\n \"subtitle\",\n \"breadcrumbs\",\n \"actions\",\n \"divider\",\n \"class\",\n \"ref\",\n ]);\n\n return (\n <header\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"page-header\"\n class={cn(\"smwb-page-header\", { \"smwb-page-header_divider\": local.divider }, local.class)}\n >\n <Show when={local.breadcrumbs}>\n <div class=\"smwb-page-header__breadcrumbs\">{local.breadcrumbs}</div>\n </Show>\n <div class=\"smwb-page-header__row\">\n <div class=\"smwb-page-header__titles\">\n <Show\n when={typeof local.title === \"string\"}\n fallback={<div class=\"smwb-page-header__title\">{local.title}</div>}\n >\n <Typography variant=\"h4\" component=\"h1\" class=\"smwb-page-header__title\">\n {local.title}\n </Typography>\n </Show>\n <Show when={local.subtitle}>\n <Typography variant=\"body2\" color=\"textSecondary\" class=\"smwb-page-header__subtitle\">\n {local.subtitle}\n </Typography>\n </Show>\n </div>\n <Show when={local.actions}>\n <div class=\"smwb-page-header__actions\">{local.actions}</div>\n </Show>\n </div>\n </header>\n );\n}\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,MAAM,YAAY,kBAAkB;AACvD,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC3B,SAAS,iBAA2B;AAc7B,SAAS,WAAW,OAAqC;AAC9D,QAAM,SAAS,WAAW,EAAE,SAAS,MAAM,GAAG,KAAK;AACnD,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,CAAC;AAAA,QACK;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO,GAAG,oBAAoB,EAAE,4BAA4B,MAAM,QAAQ,GAAG,MAAM,KAAK;AAAA,GACzF;AAAA,MACC,CAAC,KAAK,MAAM,MAAM,aAAa;AAAA,QAC7B,CAAC,IAAI,MAAM,iCAAiC,MAAM,YAAY,EAA7D,IAAmE;AAAA,MACtE,EAFC,KAEM;AAAA,MACP,CAAC,IAAI,MAAM,wBAAwB;AAAA,QACjC,CAAC,IAAI,MAAM,2BAA2B;AAAA,UACpC,CAAC;AAAA,IACC,MAAM,OAAO,MAAM,UAAU;AAAA,IAC7B,UAAU,CAAC,IAAI,MAAM,2BAA2B,MAAM,MAAM,EAAjD;AAAA,GACZ;AAAA,YACC,CAAC,WAAW,QAAQ,KAAK,UAAU,KAAK,MAAM,0BAA0B;AAAA,eACrE,MAAM,MAAM;AAAA,YACf,EAFC,WAEY;AAAA,UACf,EAPC,KAOM;AAAA,UACP,CAAC,KAAK,MAAM,MAAM,UAAU;AAAA,YAC1B,CAAC,WAAW,QAAQ,QAAQ,MAAM,gBAAgB,MAAM,6BAA6B;AAAA,eAClF,MAAM,SAAS;AAAA,YAClB,EAFC,WAEY;AAAA,UACf,EAJC,KAIM;AAAA,QACT,EAdC,IAcK;AAAA,QACN,CAAC,KAAK,MAAM,MAAM,SAAS;AAAA,UACzB,CAAC,IAAI,MAAM,6BAA6B,MAAM,QAAQ,EAArD,IAA2D;AAAA,QAC9D,EAFC,KAEM;AAAA,MACT,EAnBC,IAmBK;AAAA,IACR,EA7BC;AA+BL;AAEA,IAAO,qBAAQ;","names":[],"file":"pageHeader.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/pageHeader/pageHeader.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/pageHeader/pageHeader.entry.less\";\nimport { type JSX, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Typography } from \"../../dataDisplay/typography\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface PageHeaderProps extends Omit<JSX.HTMLAttributes<HTMLElement>, \"title\"> {\n title: JSX.Element | string;\n subtitle?: JSX.Element | string;\n /** Slot above the title (e.g. <Breadcrumbs />). */\n breadcrumbs?: JSX.Element;\n /** Slot on the trailing side (e.g. action buttons). */\n actions?: JSX.Element;\n /** Render a divider below the header. */\n divider?: boolean;\n ref?: Ref<HTMLElement>;\n}\n\nexport function PageHeader(props: PageHeaderProps): JSX.Element {\n const merged = mergeProps({ divider: false }, props);\n const [local, rest] = splitProps(merged, [\n \"title\",\n \"subtitle\",\n \"breadcrumbs\",\n \"actions\",\n \"divider\",\n \"class\",\n \"ref\",\n ]);\n\n return (\n <header\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"page-header\"\n class={cn(\"smwb-page-header\", { \"smwb-page-header_divider\": local.divider }, local.class)}\n >\n <Show when={local.breadcrumbs}>\n <div class=\"smwb-page-header__breadcrumbs\">{local.breadcrumbs}</div>\n </Show>\n <div class=\"smwb-page-header__row\">\n <div class=\"smwb-page-header__titles\">\n <Show\n when={typeof local.title === \"string\"}\n fallback={<div class=\"smwb-page-header__title\">{local.title}</div>}\n >\n <Typography variant=\"h4\" component=\"h1\" class=\"smwb-page-header__title\">\n {local.title}\n </Typography>\n </Show>\n <Show when={local.subtitle}>\n <Typography variant=\"body2\" color=\"textSecondary\" class=\"smwb-page-header__subtitle\">\n {local.subtitle}\n </Typography>\n </Show>\n </div>\n <Show when={local.actions}>\n <div class=\"smwb-page-header__actions\">{local.actions}</div>\n </Show>\n </div>\n </header>\n );\n}\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,MAAM,YAAY,kBAAkB;AACvD,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC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BC,IAmBK;AAAA,IACR,EA7BC;AA+BL;AAEA,IAAO,qBAAQ;","names":[],"file":"pageHeader.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/screenDivider/screenDivider.entry.less";
1
+ import "@smwb/ui-styles/less/components/screenDivider/screenDivider.entry.less";
2
2
  import {
3
3
  children as resolveChildren,
4
4
  createEffect,
@@ -127,4 +127,4 @@ export {
127
127
  ScreenDivider,
128
128
  screenDivider_default as default
129
129
  };
130
- //# sourceMappingURL=screenDivider.js.map
130
+ //# sourceMappingURL=screenDivider.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/screenDivider/screenDivider.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/screenDivider/screenDivider.entry.less\";\nimport {\n type JSX,\n type ParentProps,\n children as resolveChildren,\n createEffect,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n} from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { throttle } from \"../../../utils/throttle\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface ScreenDividerProps {\n sizeFirst?: number;\n sizeSecond?: number;\n class?: string;\n orientation?: \"horizontal\" | \"vertical\";\n /** Called with the first pane size (percent) whenever it changes. */\n onSizeChange?: (sizeFirst: number) => void;\n /** Step (in percent) applied on arrow-key resize. */\n keyboardStep?: number;\n /** Accessible label for the resizer handle. */\n resizerAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst getInitialDivider = (sizeFirst?: number | null, sizeSecond?: number | null): number => {\n if (!sizeFirst && sizeSecond) {\n return 100 - sizeSecond;\n }\n if (sizeFirst) {\n return sizeFirst;\n }\n return 50;\n};\n\nexport function ScreenDivider(props: ParentProps<ScreenDividerProps>): JSX.Element {\n const merged = mergeProps(\n { orientation: \"horizontal\" as const, keyboardStep: 5, resizerAriaLabel: \"Resize panels\" },\n props\n );\n const [local] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"sizeFirst\",\n \"sizeSecond\",\n \"children\",\n \"onSizeChange\",\n \"keyboardStep\",\n \"resizerAriaLabel\",\n \"ref\",\n ]);\n\n let wrapperEl: HTMLDivElement | undefined;\n const [divider, setDivider] = createSignal(getInitialDivider(local.sizeFirst, local.sizeSecond));\n const [isDragging, setIsDragging] = createSignal(false);\n\n // Sync with controlled size props.\n createEffect(() => {\n setDivider(getInitialDivider(local.sizeFirst, local.sizeSecond));\n });\n\n // Report size changes.\n createEffect(() => {\n local.onSizeChange?.(divider());\n });\n\n const resolved = resolveChildren(() => local.children);\n const child = (): unknown[] => resolved.toArray();\n\n const dragOver = throttle((event: PointerEvent) => {\n if (!isDragging()) return;\n const wrapper = wrapperEl;\n if (!wrapper) return;\n // Viewport-relative rect — using offsetLeft/offsetTop here is wrong\n // because they are relative to the nearest positioned ancestor, not\n // the viewport that clientX/clientY live in (this is what made the\n // divider drift away from the cursor when the wrapper was nested).\n const rect = wrapper.getBoundingClientRect();\n const total = local.orientation === \"vertical\" ? rect.height : rect.width;\n const cursor = local.orientation === \"vertical\" ? event.clientY - rect.top : event.clientX - rect.left;\n // 5px margin on each side so neither pane fully collapses.\n const clamped = Math.max(5, Math.min(total - 5, cursor));\n setDivider((clamped / total) * 100);\n }, 1000 / 60);\n\n const handleDragStart = (): void => {\n setIsDragging(true);\n };\n const handleDragEnd = (): void => {\n setIsDragging(false);\n };\n\n createEffect(() => {\n if (isServer) return;\n if (isDragging()) {\n document.body.addEventListener(\"pointerup\", handleDragEnd);\n document.body.addEventListener(\"pointermove\", dragOver);\n document.body.style.cursor = local.orientation === \"horizontal\" ? \"e-resize\" : \"n-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n onCleanup(() => {\n document.body.removeEventListener(\"pointerup\", handleDragEnd);\n document.body.removeEventListener(\"pointermove\", dragOver);\n });\n });\n\n const onResizerKeyDown: JSX.EventHandler<HTMLSpanElement, KeyboardEvent> = (event) => {\n const decreaseKey = local.orientation === \"vertical\" ? \"ArrowUp\" : \"ArrowLeft\";\n const increaseKey = local.orientation === \"vertical\" ? \"ArrowDown\" : \"ArrowRight\";\n if (event.key === decreaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.max(0, prev - local.keyboardStep));\n } else if (event.key === increaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.min(100, prev + local.keyboardStep));\n } else if (event.key === \"Home\") {\n event.preventDefault();\n setDivider(0);\n } else if (event.key === \"End\") {\n event.preventDefault();\n setDivider(100);\n }\n };\n\n const firstChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${divider()}%` } : { width: `${divider()}%` };\n const secondChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${100 - divider()}%` } : { width: `${100 - divider()}%` };\n\n return (\n <div\n class={cn(\"smwb-screen-divider__wrapper\", `smwb-${local.orientation}`, local.class)}\n ref={mergeRefs(local.ref, (el) => (wrapperEl = el))}\n data-testid=\"screen-divider\"\n >\n <div class={cn(\"smwb-screen-divider__first\", `smwb-${local.orientation}`)} style={firstChildStyle()}>\n {(child()[0] ?? \"\") as JSX.Element}\n </div>\n <span\n class=\"smwb-screen-divider__resizer\"\n onPointerDown={handleDragStart}\n draggable={false}\n role=\"separator\"\n aria-orientation={local.orientation === \"vertical\" ? \"horizontal\" : \"vertical\"}\n aria-valuenow={Math.round(divider())}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={local.resizerAriaLabel}\n tabindex={0}\n onKeyDown={onResizerKeyDown}\n />\n <div class={cn(\"smwb-screen-divider__second\", `smwb-${local.orientation}`)} style={secondChildStyle()}>\n {(child()[1] ?? \"\") as JSX.Element}\n </div>\n </div>\n );\n}\n\nexport default ScreenDivider;\n"],"mappings":"AAAA,OAAO;AACP;AAAA,EAGE,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,OA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QAAM,mBAAmB,MACvB,MAAM,gBAAgB,aAAa,EAAE,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,IAAI,EAAE,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI;AAExG,SACE,CAAC;AAAA,IACC,OAAO,GAAG,gCAAgC,QAAQ,MAAM,WAAW,IAAI,MAAM,KAAK;AAAA,IAClF,KAAK,UAAU,MAAM,KAAK,CAAC,OAAQ,YAAY,EAAG;AAAA,IAClD,YAAY;AAAA,GACb;AAAA,MACC,CAAC,IAAI,OAAO,GAAG,8BAA8B,QAAQ,MAAM,WAAW,EAAE,GAAG,OAAO,gBAAgB,GAAG;AAAA,SACjG,MAAM,EAAE,CAAC,KAAK,GAAmB;AAAA,MACrC,EAFC,IAEK;AAAA,MACN,CAAC;AAAA,IACC,MAAM;AAAA,IACN,eAAe;AAAA,IACf,WAAW;AAAA,IACX,KAAK;AAAA,IACL,kBAAkB,MAAM,gBAAgB,aAAa,eAAe;AAAA,IACpE,eAAe,KAAK,MAAM,QAAQ,CAAC;AAAA,IACnC,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY,MAAM;AAAA,IAClB,UAAU;AAAA,IACV,WAAW;AAAA,EACb,EAAE;AAAA,MACF,CAAC,IAAI,OAAO,GAAG,+BAA+B,QAAQ,MAAM,WAAW,EAAE,GAAG,OAAO,iBAAiB,GAAG;AAAA,SACnG,MAAM,EAAE,CAAC,KAAK,GAAmB;AAAA,MACrC,EAFC,IAEK;AAAA,IACR,EAxBC;AA0BL;AAEA,IAAO,wBAAQ;","names":[],"file":"screenDivider.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/screenDivider/screenDivider.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/screenDivider/screenDivider.entry.less\";\nimport {\n type JSX,\n type ParentProps,\n children as resolveChildren,\n createEffect,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n} from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { throttle } from \"../../../utils/throttle\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface ScreenDividerProps {\n sizeFirst?: number;\n sizeSecond?: number;\n class?: string;\n orientation?: \"horizontal\" | \"vertical\";\n /** Called with the first pane size (percent) whenever it changes. */\n onSizeChange?: (sizeFirst: number) => void;\n /** Step (in percent) applied on arrow-key resize. */\n keyboardStep?: number;\n /** Accessible label for the resizer handle. */\n resizerAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst getInitialDivider = (sizeFirst?: number | null, sizeSecond?: number | null): number => {\n if (!sizeFirst && sizeSecond) {\n return 100 - sizeSecond;\n }\n if (sizeFirst) {\n return sizeFirst;\n }\n return 50;\n};\n\nexport function ScreenDivider(props: ParentProps<ScreenDividerProps>): JSX.Element {\n const merged = mergeProps(\n { orientation: \"horizontal\" as const, keyboardStep: 5, resizerAriaLabel: \"Resize panels\" },\n props\n );\n const [local] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"sizeFirst\",\n \"sizeSecond\",\n \"children\",\n \"onSizeChange\",\n \"keyboardStep\",\n \"resizerAriaLabel\",\n \"ref\",\n ]);\n\n let wrapperEl: HTMLDivElement | undefined;\n const [divider, setDivider] = createSignal(getInitialDivider(local.sizeFirst, local.sizeSecond));\n const [isDragging, setIsDragging] = createSignal(false);\n\n // Sync with controlled size props.\n createEffect(() => {\n setDivider(getInitialDivider(local.sizeFirst, local.sizeSecond));\n });\n\n // Report size changes.\n createEffect(() => {\n local.onSizeChange?.(divider());\n });\n\n const resolved = resolveChildren(() => local.children);\n const child = (): unknown[] => resolved.toArray();\n\n const dragOver = throttle((event: PointerEvent) => {\n if (!isDragging()) return;\n const wrapper = wrapperEl;\n if (!wrapper) return;\n // Viewport-relative rect — using offsetLeft/offsetTop here is wrong\n // because they are relative to the nearest positioned ancestor, not\n // the viewport that clientX/clientY live in (this is what made the\n // divider drift away from the cursor when the wrapper was nested).\n const rect = wrapper.getBoundingClientRect();\n const total = local.orientation === \"vertical\" ? rect.height : rect.width;\n const cursor = local.orientation === \"vertical\" ? event.clientY - rect.top : event.clientX - rect.left;\n // 5px margin on each side so neither pane fully collapses.\n const clamped = Math.max(5, Math.min(total - 5, cursor));\n setDivider((clamped / total) * 100);\n }, 1000 / 60);\n\n const handleDragStart = (): void => {\n setIsDragging(true);\n };\n const handleDragEnd = (): void => {\n setIsDragging(false);\n };\n\n createEffect(() => {\n if (isServer) return;\n if (isDragging()) {\n document.body.addEventListener(\"pointerup\", handleDragEnd);\n document.body.addEventListener(\"pointermove\", dragOver);\n document.body.style.cursor = local.orientation === \"horizontal\" ? \"e-resize\" : \"n-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n onCleanup(() => {\n document.body.removeEventListener(\"pointerup\", handleDragEnd);\n document.body.removeEventListener(\"pointermove\", dragOver);\n });\n });\n\n const onResizerKeyDown: JSX.EventHandler<HTMLSpanElement, KeyboardEvent> = (event) => {\n const decreaseKey = local.orientation === \"vertical\" ? \"ArrowUp\" : \"ArrowLeft\";\n const increaseKey = local.orientation === \"vertical\" ? \"ArrowDown\" : \"ArrowRight\";\n if (event.key === decreaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.max(0, prev - local.keyboardStep));\n } else if (event.key === increaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.min(100, prev + local.keyboardStep));\n } else if (event.key === \"Home\") {\n event.preventDefault();\n setDivider(0);\n } else if (event.key === \"End\") {\n event.preventDefault();\n setDivider(100);\n }\n };\n\n const firstChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${divider()}%` } : { width: `${divider()}%` };\n const secondChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${100 - divider()}%` } : { width: `${100 - divider()}%` };\n\n return (\n <div\n class={cn(\"smwb-screen-divider__wrapper\", `smwb-${local.orientation}`, local.class)}\n ref={mergeRefs(local.ref, (el) => (wrapperEl = el))}\n data-testid=\"screen-divider\"\n >\n <div class={cn(\"smwb-screen-divider__first\", `smwb-${local.orientation}`)} style={firstChildStyle()}>\n {(child()[0] ?? \"\") as JSX.Element}\n </div>\n <span\n class=\"smwb-screen-divider__resizer\"\n onPointerDown={handleDragStart}\n draggable={false}\n role=\"separator\"\n aria-orientation={local.orientation === \"vertical\" ? \"horizontal\" : \"vertical\"}\n aria-valuenow={Math.round(divider())}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={local.resizerAriaLabel}\n tabindex={0}\n onKeyDown={onResizerKeyDown}\n />\n <div class={cn(\"smwb-screen-divider__second\", `smwb-${local.orientation}`)} style={secondChildStyle()}>\n {(child()[1] ?? \"\") as JSX.Element}\n </div>\n </div>\n );\n}\n\nexport default ScreenDivider;\n"],"mappings":"AAAA,OAAO;AACP;AAAA,EAGE,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,OAAO,QAAQ;AACf,SAAS,gBAAgB;AACzB,SAAS,iBAA2B;AAgBpC,MAAM,oBAAoB,CAAC,WAA2B,eAAuC;AAC3F,MAAI,CAAC,aAAa,YAAY;AAC5B,WAAO,MAAM;AAAA,EACf;AACA,MAAI,WAAW;AACb,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,SAAS,cAAc,OAAqD;AACjF,QAAM,SAAS;AAAA,IACb,EAAE,aAAa,cAAuB,cAAc,GAAG,kBAAkB,gBAAgB;AAAA,IACzF;AAAA,EACF;AACA,QAAM,CAAC,KAAK,IAAI,WAAW,QAAQ;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI;AACJ,QAAM,CAAC,SAAS,UAAU,IAAI,aAAa,kBAAkB,MAAM,WAAW,MAAM,UAAU,CAAC;AAC/F,QAAM,CAAC,YAAY,aAAa,IAAI,aAAa,KAAK;AA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AQ,CAAC;AAAA,IACnC,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY,MAAM;AAAA,IAClB,UAAU;AAAA,IACV,WAAW;AAAA,EACb,EAAE;AAAA,MACF,CAAC,IAAI,OAAO,GAAG,+BAA+B,QAAQ,MAAM,WAAW,EAAE,GAAG,OAAO,iBAAiB,GAAG;AAAA,SACnG,MAAM,EAAE,CAAC,KAAK,GAAmB;AAAA,MACrC,EAFC,IAEK;AAAA,IACR,EAxBC;AA0BL;AAEA,IAAO,wBAAQ;","names":[],"file":"screenDivider.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/sheet/sheet.entry.less";
1
+ import "@smwb/ui-styles/less/components/sheet/sheet.entry.less";
2
2
  import { Show, createEffect, createSignal, mergeProps, onCleanup, splitProps } from "solid-js";
3
3
  import { Portal, isServer } from "solid-js/web";
4
4
  import cn from "clsx";
@@ -259,4 +259,4 @@ export {
259
259
  Sheet,
260
260
  sheet_default as default
261
261
  };
262
- //# sourceMappingURL=sheet.js.map
262
+ //# sourceMappingURL=sheet.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/sheet/sheet.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/sheet/sheet.entry.less\";\nimport { type JSX, type ParentProps, Show, createEffect, createSignal, mergeProps, onCleanup, splitProps } from \"solid-js\";\nimport { Portal, isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { Button } from \"../../inputs/button\";\nimport { Icon } from \"../../base/icon\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface SheetProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n placement?: \"top\" | \"bottom\" | \"right\" | \"left\";\n isOpen: boolean;\n onClose?: (() => void) | undefined;\n variant?: \"default\" | \"modal\";\n withSizeToggle?: boolean;\n /** Hide built-in header actions; onClose still handles Esc and backdrop. */\n hideHeaderActions?: boolean;\n reverseHeaderActions?: boolean;\n size?: string;\n disableOutsideClick?: boolean;\n /** Close the sheet when Escape is pressed. */\n closeOnEsc?: boolean;\n /** Allow drag-to-resize (mobile bottom-sheet style). Off by default. */\n resizable?: boolean;\n /** Minimum size in px while resizing (default 80). */\n minSize?: number;\n /** Maximum size in px while resizing (default: viewport dimension). */\n maxSize?: number;\n /** Step in px for keyboard resizing (default 24). */\n resizeStep?: number;\n /** Accessible label for the resize handle. */\n resizeHandleAriaLabel?: string;\n /** Called with the new size in px while/after resizing. */\n onResize?: (size: number) => void;\n \"aria-label\"?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\ntype Mode = \"small\" | \"expanded\" | null;\n\nconst isVerticalAxis = (placement: SheetProps[\"placement\"]): boolean => placement === \"bottom\" || placement === \"top\";\n\ninterface SheetBlockProps extends ParentProps<SheetProps> {\n mode: Mode;\n handleSizeButton: () => void;\n handleClose: () => void;\n}\n\nfunction SheetBlock(props: SheetBlockProps): JSX.Element {\n const merged = mergeProps(\n {\n size: \"60%\",\n withSizeToggle: true,\n hideHeaderActions: false,\n reverseHeaderActions: false,\n resizable: false,\n minSize: 80,\n resizeStep: 24,\n resizeHandleAriaLabel: \"Resize sheet\",\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"placement\",\n \"class\",\n \"mode\",\n \"size\",\n \"variant\",\n \"onClose\",\n \"withSizeToggle\",\n \"hideHeaderActions\",\n \"reverseHeaderActions\",\n \"resizable\",\n \"minSize\",\n \"maxSize\",\n \"resizeStep\",\n \"resizeHandleAriaLabel\",\n \"onResize\",\n \"style\",\n \"handleClose\",\n \"handleSizeButton\",\n \"children\",\n \"ref\",\n ]);\n\n let rootEl: HTMLDivElement | undefined;\n const [dragSize, setDragSize] = createSignal<number | null>(null);\n const vertical = (): boolean => isVerticalAxis(local.placement);\n\n const inner = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 120, exit: 120 },\n classNames: { enterDone: \"smwb-sheet_entered\" },\n appear: true,\n });\n\n const clamp = (px: number): number => {\n const viewport = vertical() ? window.innerHeight : window.innerWidth;\n const max = local.maxSize ?? viewport;\n return Math.max(local.minSize, Math.min(max, px));\n };\n\n const currentSizePx = (): number => {\n const rect = rootEl?.getBoundingClientRect();\n if (!rect) return local.minSize;\n return vertical() ? rect.height : rect.width;\n };\n\n const applySize = (px: number): void => {\n const next = clamp(px);\n setDragSize(next);\n local.onResize?.(next);\n };\n\n let drag: { start: number; size: number } | null = null;\n\n const onPointerDown = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n event.preventDefault();\n drag = { start: vertical() ? event.clientY : event.clientX, size: currentSizePx() };\n try {\n event.currentTarget.setPointerCapture?.(event.pointerId);\n } catch {\n /* best-effort */\n }\n };\n\n const onPointerMove = (event: PointerEvent): void => {\n if (!drag) return;\n const pos = vertical() ? event.clientY : event.clientX;\n const delta = pos - drag.start;\n const grow = local.placement === \"bottom\" || local.placement === \"right\" ? -delta : delta;\n applySize(drag.size + grow);\n };\n\n const endDrag = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n drag = null;\n if (event.currentTarget.hasPointerCapture?.(event.pointerId)) {\n event.currentTarget.releasePointerCapture?.(event.pointerId);\n }\n };\n\n const onHandleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n const base = dragSize() ?? currentSizePx();\n const max = local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth);\n const incKey =\n local.placement === \"bottom\" ? \"ArrowUp\" : local.placement === \"top\" ? \"ArrowDown\" : local.placement === \"left\" ? \"ArrowRight\" : \"ArrowLeft\";\n const decKey =\n local.placement === \"bottom\" ? \"ArrowDown\" : local.placement === \"top\" ? \"ArrowUp\" : local.placement === \"left\" ? \"ArrowLeft\" : \"ArrowRight\";\n if (event.key === incKey) {\n event.preventDefault();\n applySize(base + local.resizeStep);\n } else if (event.key === decKey) {\n event.preventDefault();\n applySize(base - local.resizeStep);\n } else if (event.key === \"Home\") {\n event.preventDefault();\n applySize(local.minSize);\n } else if (event.key === \"End\") {\n event.preventDefault();\n applySize(max);\n }\n };\n\n createEffect(() => {\n if (!local.isOpen) {\n setDragSize(null);\n return;\n }\n rootEl?.focus();\n });\n\n const showActions = (): boolean => !local.hideHeaderActions && (!!local.onClose || local.withSizeToggle);\n const actionNodes = (): JSX.Element[] => {\n const nodes: JSX.Element[] = [];\n if (local.withSizeToggle) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleSizeButton}>\n <Icon name=\"open_in_full\" />\n </Button>\n );\n }\n if (local.onClose) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleClose}>\n <Icon name=\"close\" />\n </Button>\n );\n }\n if (local.reverseHeaderActions) nodes.reverse();\n return nodes;\n };\n\n const sizeStyle = (): JSX.CSSProperties => {\n if (local.resizable && dragSize() !== null) {\n const px = `${dragSize()}px`;\n return { ...(vertical() ? { height: px } : { width: px }), transition: \"none\" };\n }\n return {};\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref, (el) => (rootEl = el as HTMLDivElement))}\n data-testid=\"sheet\"\n tabindex={-1}\n role=\"dialog\"\n aria-modal={local.variant === \"modal\" || undefined}\n class={cn(\"smwb-sheet\", local.class, `smwb-sheet_${local.variant}`, `smwb-${local.placement}`, inner.classes(), {\n \"smwb-expanded\": local.mode === \"expanded\",\n \"smwb-small\": local.mode === \"small\",\n \"smwb-sheet_resizable\": local.resizable,\n })}\n style={{\n \"--sizeProp\": local.size,\n ...sizeStyle(),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.resizable}>\n <div\n class=\"smwb-sheet__drag-handle\"\n data-testid=\"sheet-drag-handle\"\n role=\"separator\"\n tabindex={0}\n aria-orientation={vertical() ? \"horizontal\" : \"vertical\"}\n aria-label={local.resizeHandleAriaLabel}\n aria-valuemin={local.minSize}\n aria-valuemax={Math.round(local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth))}\n aria-valuenow={Math.round(dragSize() ?? currentSizePx())}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onHandleKeyDown}\n >\n <span class=\"smwb-sheet__drag-handle-bar\" />\n </div>\n </Show>\n <Show when={showActions()}>\n <div class=\"smwb-sheet__header\">{actionNodes()}</div>\n </Show>\n <Show when={local.isOpen && local.mode !== \"small\"}>\n <div class=\"smwb-sheet__inner\">{local.children}</div>\n </Show>\n </div>\n );\n}\n\nexport function Sheet(props: ParentProps<SheetProps>): JSX.Element {\n const merged = mergeProps({ variant: \"default\" as const, placement: \"bottom\" as const, closeOnEsc: true }, props);\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"onClose\",\n \"variant\",\n \"children\",\n \"placement\",\n \"disableOutsideClick\",\n \"closeOnEsc\",\n \"ref\",\n ]);\n\n const [mode, setMode] = createSignal<Mode>(null);\n\n const outer = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 70, exit: 70 },\n classNames: { enterDone: \"smwb-entered\" },\n appear: true,\n });\n\n createEffect(() => {\n if (!local.isOpen || !local.closeOnEsc || !local.onClose) return;\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") local.onClose?.();\n };\n document.addEventListener(\"keydown\", onKeyDown);\n onCleanup(() => document.removeEventListener(\"keydown\", onKeyDown));\n });\n\n const handleSizeButton = (): void => {\n setMode((prev) => (prev === \"expanded\" ? \"small\" : prev === null ? \"expanded\" : null));\n };\n const handleClose = (): void => {\n local.onClose?.();\n setMode(null);\n };\n\n const block = (): JSX.Element => (\n <SheetBlock\n {...rest}\n ref={local.ref}\n isOpen={local.isOpen}\n onClose={local.onClose}\n handleSizeButton={handleSizeButton}\n handleClose={handleClose}\n mode={mode()}\n placement={local.placement}\n variant={local.variant}\n >\n {local.children}\n </SheetBlock>\n );\n\n return (\n <Show when={outer.mounted()}>\n <Portal mount={(isServer ? undefined : document.body) as Node}>\n <Show\n when={local.variant === \"default\"}\n fallback={\n <div class={cn(\"smwb-sheet__overlay\", \"smwb-dark\", `smwb-${local.placement}`, `smwb-sheet_${local.variant}`, outer.classes())}>\n <ClickAwayListener onClickAway={() => !local.disableOutsideClick && handleClose()}>\n {block()}\n </ClickAwayListener>\n </div>\n }\n >\n <div class={cn(local.disableOutsideClick ? \"smwb-sheet__overlay\" : \"smwb-sheet__default\", outer.classes())}>\n {block()}\n </div>\n </Show>\n </Portal>\n </Show>\n );\n}\n\nexport default Sheet;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,cAAc,cAAc,YAAY,WAAW,kBAAkB;AAChH,SAAS,QAAQ,gBAAgB;AACjC,OAAO,QAAQ;AACf,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,iBAA2B;AAiCpC,MAAM,iBAAiB,CAAC,cAAgD,cAAc,YAAY,cAAc;AAQhH,SAAS,WAAW,OAAqC;AACvD,QAAM,SAAS;AAAA,IACb;AAAA,MACE,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,mBAAmB;AAAA,MACnB,sBAAsB;AAAA,MACtB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,uBAAuB;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACA,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI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MACT,EAfC,OAeQ;AAAA,IACX,EAjBC;AAmBL;AAEA,IAAO,gBAAQ;","names":[],"file":"sheet.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/sheet/sheet.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/sheet/sheet.entry.less\";\nimport { type JSX, type ParentProps, Show, createEffect, createSignal, mergeProps, onCleanup, splitProps } from \"solid-js\";\nimport { Portal, isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { Button } from \"../../inputs/button\";\nimport { Icon } from \"../../base/icon\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface SheetProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n placement?: \"top\" | \"bottom\" | \"right\" | \"left\";\n isOpen: boolean;\n onClose?: (() => void) | undefined;\n variant?: \"default\" | \"modal\";\n withSizeToggle?: boolean;\n /** Hide built-in header actions; onClose still handles Esc and backdrop. */\n hideHeaderActions?: boolean;\n reverseHeaderActions?: boolean;\n size?: string;\n disableOutsideClick?: boolean;\n /** Close the sheet when Escape is pressed. */\n closeOnEsc?: boolean;\n /** Allow drag-to-resize (mobile bottom-sheet style). Off by default. */\n resizable?: boolean;\n /** Minimum size in px while resizing (default 80). */\n minSize?: number;\n /** Maximum size in px while resizing (default: viewport dimension). */\n maxSize?: number;\n /** Step in px for keyboard resizing (default 24). */\n resizeStep?: number;\n /** Accessible label for the resize handle. */\n resizeHandleAriaLabel?: string;\n /** Called with the new size in px while/after resizing. */\n onResize?: (size: number) => void;\n \"aria-label\"?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\ntype Mode = \"small\" | \"expanded\" | null;\n\nconst isVerticalAxis = (placement: SheetProps[\"placement\"]): boolean => placement === \"bottom\" || placement === \"top\";\n\ninterface SheetBlockProps extends ParentProps<SheetProps> {\n mode: Mode;\n handleSizeButton: () => void;\n handleClose: () => void;\n}\n\nfunction SheetBlock(props: SheetBlockProps): JSX.Element {\n const merged = mergeProps(\n {\n size: \"60%\",\n withSizeToggle: true,\n hideHeaderActions: false,\n reverseHeaderActions: false,\n resizable: false,\n minSize: 80,\n resizeStep: 24,\n resizeHandleAriaLabel: \"Resize sheet\",\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"placement\",\n \"class\",\n \"mode\",\n \"size\",\n \"variant\",\n \"onClose\",\n \"withSizeToggle\",\n \"hideHeaderActions\",\n \"reverseHeaderActions\",\n \"resizable\",\n \"minSize\",\n \"maxSize\",\n \"resizeStep\",\n \"resizeHandleAriaLabel\",\n \"onResize\",\n \"style\",\n \"handleClose\",\n \"handleSizeButton\",\n \"children\",\n \"ref\",\n ]);\n\n let rootEl: HTMLDivElement | undefined;\n const [dragSize, setDragSize] = createSignal<number | null>(null);\n const vertical = (): boolean => isVerticalAxis(local.placement);\n\n const inner = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 120, exit: 120 },\n classNames: { enterDone: \"smwb-sheet_entered\" },\n appear: true,\n });\n\n const clamp = (px: number): number => {\n const viewport = vertical() ? window.innerHeight : window.innerWidth;\n const max = local.maxSize ?? viewport;\n return Math.max(local.minSize, Math.min(max, px));\n };\n\n const currentSizePx = (): number => {\n const rect = rootEl?.getBoundingClientRect();\n if (!rect) return local.minSize;\n return vertical() ? rect.height : rect.width;\n };\n\n const applySize = (px: number): void => {\n const next = clamp(px);\n setDragSize(next);\n local.onResize?.(next);\n };\n\n let drag: { start: number; size: number } | null = null;\n\n const onPointerDown = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n event.preventDefault();\n drag = { start: vertical() ? event.clientY : event.clientX, size: currentSizePx() };\n try {\n event.currentTarget.setPointerCapture?.(event.pointerId);\n } catch {\n /* best-effort */\n }\n };\n\n const onPointerMove = (event: PointerEvent): void => {\n if (!drag) return;\n const pos = vertical() ? event.clientY : event.clientX;\n const delta = pos - drag.start;\n const grow = local.placement === \"bottom\" || local.placement === \"right\" ? -delta : delta;\n applySize(drag.size + grow);\n };\n\n const endDrag = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n drag = null;\n if (event.currentTarget.hasPointerCapture?.(event.pointerId)) {\n event.currentTarget.releasePointerCapture?.(event.pointerId);\n }\n };\n\n const onHandleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n const base = dragSize() ?? currentSizePx();\n const max = local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth);\n const incKey =\n local.placement === \"bottom\" ? \"ArrowUp\" : local.placement === \"top\" ? \"ArrowDown\" : local.placement === \"left\" ? \"ArrowRight\" : \"ArrowLeft\";\n const decKey =\n local.placement === \"bottom\" ? \"ArrowDown\" : local.placement === \"top\" ? \"ArrowUp\" : local.placement === \"left\" ? \"ArrowLeft\" : \"ArrowRight\";\n if (event.key === incKey) {\n event.preventDefault();\n applySize(base + local.resizeStep);\n } else if (event.key === decKey) {\n event.preventDefault();\n applySize(base - local.resizeStep);\n } else if (event.key === \"Home\") {\n event.preventDefault();\n applySize(local.minSize);\n } else if (event.key === \"End\") {\n event.preventDefault();\n applySize(max);\n }\n };\n\n createEffect(() => {\n if (!local.isOpen) {\n setDragSize(null);\n return;\n }\n rootEl?.focus();\n });\n\n const showActions = (): boolean => !local.hideHeaderActions && (!!local.onClose || local.withSizeToggle);\n const actionNodes = (): JSX.Element[] => {\n const nodes: JSX.Element[] = [];\n if (local.withSizeToggle) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleSizeButton}>\n <Icon name=\"open_in_full\" />\n </Button>\n );\n }\n if (local.onClose) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleClose}>\n <Icon name=\"close\" />\n </Button>\n );\n }\n if (local.reverseHeaderActions) nodes.reverse();\n return nodes;\n };\n\n const sizeStyle = (): JSX.CSSProperties => {\n if (local.resizable && dragSize() !== null) {\n const px = `${dragSize()}px`;\n return { ...(vertical() ? { height: px } : { width: px }), transition: \"none\" };\n }\n return {};\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref, (el) => (rootEl = el as HTMLDivElement))}\n data-testid=\"sheet\"\n tabindex={-1}\n role=\"dialog\"\n aria-modal={local.variant === \"modal\" || undefined}\n class={cn(\"smwb-sheet\", local.class, `smwb-sheet_${local.variant}`, `smwb-${local.placement}`, inner.classes(), {\n \"smwb-expanded\": local.mode === \"expanded\",\n \"smwb-small\": local.mode === \"small\",\n \"smwb-sheet_resizable\": local.resizable,\n })}\n style={{\n \"--sizeProp\": local.size,\n ...sizeStyle(),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.resizable}>\n <div\n class=\"smwb-sheet__drag-handle\"\n data-testid=\"sheet-drag-handle\"\n role=\"separator\"\n tabindex={0}\n aria-orientation={vertical() ? \"horizontal\" : \"vertical\"}\n aria-label={local.resizeHandleAriaLabel}\n aria-valuemin={local.minSize}\n aria-valuemax={Math.round(local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth))}\n aria-valuenow={Math.round(dragSize() ?? currentSizePx())}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onHandleKeyDown}\n >\n <span class=\"smwb-sheet__drag-handle-bar\" />\n </div>\n </Show>\n <Show when={showActions()}>\n <div class=\"smwb-sheet__header\">{actionNodes()}</div>\n </Show>\n <Show when={local.isOpen && local.mode !== \"small\"}>\n <div class=\"smwb-sheet__inner\">{local.children}</div>\n </Show>\n </div>\n );\n}\n\nexport function Sheet(props: ParentProps<SheetProps>): JSX.Element {\n const merged = mergeProps({ variant: \"default\" as const, placement: \"bottom\" as const, closeOnEsc: true }, props);\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"onClose\",\n \"variant\",\n \"children\",\n \"placement\",\n \"disableOutsideClick\",\n \"closeOnEsc\",\n \"ref\",\n ]);\n\n const [mode, setMode] = createSignal<Mode>(null);\n\n const outer = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 70, exit: 70 },\n classNames: { enterDone: \"smwb-entered\" },\n appear: true,\n });\n\n createEffect(() => {\n if (!local.isOpen || !local.closeOnEsc || !local.onClose) return;\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") local.onClose?.();\n };\n document.addEventListener(\"keydown\", onKeyDown);\n onCleanup(() => document.removeEventListener(\"keydown\", onKeyDown));\n });\n\n const handleSizeButton = (): void => {\n setMode((prev) => (prev === \"expanded\" ? \"small\" : prev === null ? \"expanded\" : null));\n };\n const handleClose = (): void => {\n local.onClose?.();\n setMode(null);\n };\n\n const block = (): JSX.Element => (\n <SheetBlock\n {...rest}\n ref={local.ref}\n isOpen={local.isOpen}\n onClose={local.onClose}\n handleSizeButton={handleSizeButton}\n handleClose={handleClose}\n mode={mode()}\n placement={local.placement}\n variant={local.variant}\n >\n {local.children}\n </SheetBlock>\n );\n\n return (\n <Show when={outer.mounted()}>\n <Portal mount={(isServer ? undefined : document.body) as Node}>\n <Show\n when={local.variant === \"default\"}\n fallback={\n <div class={cn(\"smwb-sheet__overlay\", \"smwb-dark\", `smwb-${local.placement}`, `smwb-sheet_${local.variant}`, outer.classes())}>\n <ClickAwayListener onClickAway={() => !local.disableOutsideClick && handleClose()}>\n {block()}\n </ClickAwayListener>\n </div>\n }\n >\n <div class={cn(local.disableOutsideClick ? \"smwb-sheet__overlay\" : \"smwb-sheet__default\", outer.classes())}>\n {block()}\n </div>\n </Show>\n </Portal>\n </Show>\n );\n}\n\nexport default Sheet;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,cAAc,cAAc,YAAY,WAAW,kBAAkB;AAChH,SAAS,QAAQ,gBAAgB;AACjC,OAAO,QAAQ;AACf,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,iBAA2B;AAiCpC,MAAM,iBA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ClB,EAZC;AAeH,SACE,CAAC,KAAK,MAAM,MAAM,QAAQ,GAAG;AAAA,MAC3B,CAAC,OAAO,OAAQ,WAAW,SAAY,SAAS,MAAe;AAAA,QAC7D,CAAC;AAAA,IACC,MAAM,MAAM,YAAY;AAAA,IACxB,UACE,CAAC,IAAI,OAAO,GAAG,uBAAuB,aAAa,QAAQ,MAAM,SAAS,IAAI,cAAc,MAAM,OAAO,IAAI,MAAM,QAAQ,CAAC,GAAG;AAAA,cAC7H,CAAC,kBAAkB,aAAa,MAAM,CAAC,MAAM,uBAAuB,YAAY,GAAG;AAAA,iBAChF,MAAM,EAAE;AAAA,cACX,EAFC,kBAEmB;AAAA,YACtB,EAJC;AAAA,GAMJ;AAAA,UACC,CAAC,IAAI,OAAO,GAAG,MAAM,sBAAsB,wBAAwB,uBAAuB,MAAM,QAAQ,CAAC,GAAG;AAAA,aACzG,MAAM,EAAE;AAAA,UACX,EAFC,IAEK;AAAA,QACR,EAbC,KAaM;AAAA,MACT,EAfC,OAeQ;AAAA,IACX,EAjBC;AAmBL;AAEA,IAAO,gBAAQ;","names":[],"file":"sheet.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/stack/stack.entry.less";
1
+ import "@smwb/ui-styles/less/components/stack/stack.entry.less";
2
2
  import { For, Show, children as resolveChildren, mergeProps, splitProps } from "solid-js";
3
3
  import cn from "clsx";
4
4
  import { mergeRefs } from "../../../primitives/mergeRefs";
@@ -51,4 +51,4 @@ export {
51
51
  Stack,
52
52
  stack_default as default
53
53
  };
54
- //# sourceMappingURL=stack.js.map
54
+ //# sourceMappingURL=stack.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/layout/stack/stack.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/stack/stack.entry.less\";\nimport { type JSX, type ParentProps, For, Show, children as resolveChildren, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type StackSpacing = number | \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | \"xxxl\";\n\nexport interface StackProps extends JSX.HTMLAttributes<HTMLDivElement> {\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n /** Gap between items: scale keyword, or a number = N × spacing unit. */\n spacing?: StackSpacing;\n align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n justify?: \"start\" | \"center\" | \"end\" | \"space-between\" | \"space-around\" | \"space-evenly\";\n wrap?: boolean;\n /** Optional element rendered between each child. */\n divider?: JSX.Element;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst flexAlign = (v?: string): string | undefined => (v === \"start\" || v === \"end\" ? `flex-${v}` : v);\n\nconst resolveGap = (s: StackSpacing): string =>\n typeof s === \"number\" ? `calc(var(--smui-spacing-unit, 4px) * ${s})` : s === \"none\" ? \"0\" : `var(--smui-space-${s})`;\n\nexport function Stack(props: ParentProps<StackProps>): JSX.Element {\n const merged = mergeProps({ direction: \"column\" as const, spacing: \"md\" as StackSpacing }, props);\n const [local, rest] = splitProps(merged, [\n \"direction\",\n \"spacing\",\n \"align\",\n \"justify\",\n \"wrap\",\n \"divider\",\n \"class\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const resolved = resolveChildren(() => local.children);\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"stack\"\n class={cn(\"smwb-stack\", local.class)}\n style={{\n display: \"flex\",\n \"flex-direction\": local.direction,\n \"flex-wrap\": local.wrap ? \"wrap\" : undefined,\n \"align-items\": flexAlign(local.align),\n \"justify-content\": flexAlign(local.justify),\n gap: resolveGap(local.spacing),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.divider} fallback={local.children}>\n <For each={resolved.toArray()}>\n {(child, index) => (\n <>\n <Show when={index() > 0}>\n <div class=\"smwb-stack__divider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,WAC5B,CAAC,OAAO,UACP,EAAE;AAAA,cACA,CAAC,KAAK,MAAM,MAAM,IAAI,GAAG;AAAA,gBACvB,CAAC,IAAI,MAAM,uBAAuB,MAAM,QAAQ,EAA/C,IAAqD;AAAA,cACxD,EAFC,KAEM;AAAA,eACN,MAAM;AAAA,YACT,IACA;AAAA,QACJ,EATC,IASK;AAAA,MACR,EAXC,KAWM;AAAA,IACT,EA3BC;AA6BL;AAEA,IAAO,gBAAQ;","names":[],"file":"stack.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/layout/stack/stack.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/stack/stack.entry.less\";\nimport { type JSX, type ParentProps, For, Show, children as resolveChildren, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type StackSpacing = number | \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | \"xxxl\";\n\nexport interface StackProps extends JSX.HTMLAttributes<HTMLDivElement> {\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n /** Gap between items: scale keyword, or a number = N × spacing unit. */\n spacing?: StackSpacing;\n align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n justify?: \"start\" | \"center\" | \"end\" | \"space-between\" | \"space-around\" | \"space-evenly\";\n wrap?: boolean;\n /** Optional element rendered between each child. */\n divider?: JSX.Element;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst flexAlign = (v?: string): string | undefined => (v === \"start\" || v === \"end\" ? `flex-${v}` : v);\n\nconst resolveGap = (s: StackSpacing): string =>\n typeof s === \"number\" ? `calc(var(--smui-spacing-unit, 4px) * ${s})` : s === \"none\" ? \"0\" : `var(--smui-space-${s})`;\n\nexport function Stack(props: ParentProps<StackProps>): JSX.Element {\n const merged = mergeProps({ direction: \"column\" as const, spacing: \"md\" as StackSpacing }, props);\n const [local, rest] = splitProps(merged, [\n \"direction\",\n \"spacing\",\n \"align\",\n \"justify\",\n \"wrap\",\n \"divider\",\n \"class\",\n \"style\",\n \"children\",\n \"ref\",\n ]);\n\n const resolved = resolveChildren(() => local.children);\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"stack\"\n class={cn(\"smwb-stack\", local.class)}\n style={{\n display: \"flex\",\n \"flex-direction\": local.direction,\n \"flex-wrap\": local.wrap ? \"wrap\" : undefined,\n \"align-items\": flexAlign(local.align),\n \"justify-content\": flexAlign(local.justify),\n gap: resolveGap(local.spacing),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.divider} fallback={local.children}>\n <For each={resolved.toArray()}>\n {(child, index) => (\n <>\n <Show when={index() > 0}>\n <div class=\"smwb-stack__divider\">{local.divider}</div>\n </Show>\n {child}\n </>\n )}\n </For>\n </Show>\n </div>\n );\n}\n\nexport default Stack;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,KAAK,MAAM,YAAY,iBAAiB,YAAY,kBAAkB;AAC3G,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAgBpC,MAAM,YAAY,CAAC,MAAoC,MAAM,WAAW,MAAM,QAAQ,QAAQ,CAAC,KAAK;AAEpG,MAAM,aAAa,CAAC,MAClB,OAAO,MAAM,WAAW,wCAAwC,CAAC,MAAM,MAAM,SAAS,MAAM,oBAAoB,CAAC;AAE5G,SAAS,MAAM,OAA6C;AACjE,QAAM,SAAS,WAAW,EAAE,WAAW,UAAmB,SAAS,KAAqB,GAAG,KAAK;AAChG,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,WAAW,gBAAgB,MAAM,MAAM,QAAQ;AAErD,SACE,CAAC;AAAA,QACK;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO,GAAG,cAAc,MAAM,KAAK;AAAA,IACnC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,kBAAkB,MAAM;AAAA,MACxB,aAAa,MAAM,OAAO,SAAS;AAAA,MACnC,eAAe,UAAU,MAAM,KAAK;AAAA,MACpC,mBAAmB,UAAU,MAAM,OAAO;AAAA,MAC1C,KAAK,WAAW,MAAM,OAAO;AAAA,MAC7B,GAAI,OAAO,MAAM,UAAU,YAAY,MAAM,QAAQ,MAAM,QAAQ,CAAC;AAAA,IACtE;AAAA,GACD;AAAA,MACC,CAAC,KAAK,MAAM,MAAM,SAAS,UAAU,MAAM,UAAU;AAAA,QACnD,CAAC,IAAI,MAAM,SAAS,QAAQ,GAAG;AAAA,WAC5B,CAAC,OAAO,UACP,EAAE;AAAA,cACA,CAAC,KAAK,MAAM,MAAM,IAAI,GAAG;AAAA,gBACvB,CAAC,IAAI,MAAM,uBAAuB,MAAM,QAAQ,EAA/C,IAAqD;AAAA,cACxD,EAFC,KAEM;AAAA,eACN,MAAM;AAAA,YACT,IACA;AAAA,QACJ,EATC,IASK;AAAA,MACR,EAXC,KAWM;AAAA,IACT,EA3BC;AA6BL;AAEA,IAAO,gBAAQ;","names":[],"file":"stack.jsx"}
@@ -1,4 +1,4 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/appBar/appBar.entry.less";
1
+ import "@smwb/ui-styles/less/components/appBar/appBar.entry.less";
2
2
  import { Show, mergeProps, splitProps } from "solid-js";
3
3
  import { Dynamic } from "solid-js/web";
4
4
  import cn from "clsx";
@@ -63,4 +63,4 @@ export {
63
63
  AppBar,
64
64
  appBar_default as default
65
65
  };
66
- //# sourceMappingURL=appBar.js.map
66
+ //# sourceMappingURL=appBar.jsx.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/navigation/appBar/appBar.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/appBar/appBar.entry.less\";\nimport { type JSX, type ParentProps, Show, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type AppBarColor = \"default\" | \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\";\n\nexport interface AppBarProps extends Omit<JSX.HTMLAttributes<HTMLElement>, \"title\"> {\n dense?: boolean;\n position?: \"relative\" | \"static\" | \"absolute\" | \"sticky\" | \"fixed\";\n placement?: \"top\" | \"bottom\";\n leftContent?: JSX.Element;\n midContent?: JSX.Element;\n rightContent?: JSX.Element;\n title?: JSX.Element | string;\n midContentAlign?: \"middle\" | \"left\" | \"right\";\n /** Semantic background color. */\n color?: AppBarColor;\n ref?: Ref<HTMLElement>;\n}\n\nexport function AppBar(props: ParentProps<AppBarProps>): JSX.Element {\n const merged = mergeProps(\n {\n position: \"static\" as const,\n placement: \"top\" as const,\n midContentAlign: \"middle\" as const,\n color: \"default\" as AppBarColor,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"children\",\n \"dense\",\n \"position\",\n \"placement\",\n \"leftContent\",\n \"midContent\",\n \"midContentAlign\",\n \"rightContent\",\n \"title\",\n \"color\",\n \"ref\",\n ]);\n\n return (\n <Dynamic\n component={local.placement === \"top\" ? \"header\" : \"footer\"}\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"app-bar\"\n class={cn(\n \"smwb-appbar\",\n local.class,\n `smwb-${local.position}`,\n `smwb-${local.placement}`,\n { \"smwb-dense\": local.dense },\n local.color !== \"default\" && `smwb-appbar_color-${local.color}`\n )}\n >\n <Show\n when={local.children}\n fallback={\n <div class=\"smwb-appbar__inner\">\n <div class=\"smwb-appbar__left\">\n <Show when={local.title}>\n <div class=\"smwb-appbar__left__title\">{local.title}</div>\n </Show>\n {local.leftContent}\n </div>\n <div class={cn(\"smwb-appbar__mid\", `smwb-${local.midContentAlign}`)}>{local.midContent}</div>\n <div class=\"smwb-appbar__right\">{local.rightContent}</div>\n </div>\n }\n >\n {local.children}\n </Show>\n </Dynamic>\n );\n}\n\nexport default AppBar;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,YAAY,kBAAkB;AACzE,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAkB7B,SAAS,OAAO,OAA8C;AACnE,QAAM,SAAS;AAAA,IACb;AAAA,MACE,UAAU;AAAA,MACV,WAAW;AAAA,MACX,iBAAiB;AAAA,MACjB,OAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACA,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,CAAC;AAAA,IACC,WAAW,MAAM,cAAc,QAAQ,WAAW;AAAA,QAC9C;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA,MAAM;AAAA,MACN,QAAQ,MAAM,QAAQ;AAAA,MACtB,QAAQ,MAAM,SAAS;AAAA,MACvB,EAAE,cAAc,MAAM,MAAM;AAAA,MAC5B,MAAM,UAAU,aAAa,qBAAqB,MAAM,KAAK;AAAA,IAC/D;AAAA,GACD;AAAA,MACC,CAAC;AAAA,IACC,MAAM,MAAM;AAAA,IACZ,UACE,CAAC,IAAI,MAAM,qBAAqB;AAAA,YAC9B,CAAC,IAAI,MAAM,oBAAoB;AAAA,cAC7B,CAAC,KAAK,MAAM,MAAM,OAAO;AAAA,gBACvB,CAAC,IAAI,MAAM,4BAA4B,MAAM,MAAM,EAAlD,IAAwD;AAAA,cAC3D,EAFC,KAEM;AAAA,eACN,MAAM,YAAY;AAAA,YACrB,EALC,IAKK;AAAA,YACN,CAAC,IAAI,OAAO,GAAG,oBAAoB,QAAQ,MAAM,eAAe,EAAE,IAAI,MAAM,WAAW,EAAtF,IAA4F;AAAA,YAC7F,CAAC,IAAI,MAAM,sBAAsB,MAAM,aAAa,EAAnD,IAAyD;AAAA,UAC5D,EATC;AAAA,GAWJ;AAAA,SACE,MAAM,SAAS;AAAA,MAClB,EAhBC,KAgBM;AAAA,IACT,EA/BC;AAiCL;AAEA,IAAO,iBAAQ;","names":[],"file":"appBar.jsx"}
1
+ {"version":3,"sources":["../../../../../src/components/navigation/appBar/appBar.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/appBar/appBar.entry.less\";\nimport { type JSX, type ParentProps, Show, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type AppBarColor = \"default\" | \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\";\n\nexport interface AppBarProps extends Omit<JSX.HTMLAttributes<HTMLElement>, \"title\"> {\n dense?: boolean;\n position?: \"relative\" | \"static\" | \"absolute\" | \"sticky\" | \"fixed\";\n placement?: \"top\" | \"bottom\";\n leftContent?: JSX.Element;\n midContent?: JSX.Element;\n rightContent?: JSX.Element;\n title?: JSX.Element | string;\n midContentAlign?: \"middle\" | \"left\" | \"right\";\n /** Semantic background color. */\n color?: AppBarColor;\n ref?: Ref<HTMLElement>;\n}\n\nexport function AppBar(props: ParentProps<AppBarProps>): JSX.Element {\n const merged = mergeProps(\n {\n position: \"static\" as const,\n placement: \"top\" as const,\n midContentAlign: \"middle\" as const,\n color: \"default\" as AppBarColor,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"children\",\n \"dense\",\n \"position\",\n \"placement\",\n \"leftContent\",\n \"midContent\",\n \"midContentAlign\",\n \"rightContent\",\n \"title\",\n \"color\",\n \"ref\",\n ]);\n\n return (\n <Dynamic\n component={local.placement === \"top\" ? \"header\" : \"footer\"}\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"app-bar\"\n class={cn(\n \"smwb-appbar\",\n local.class,\n `smwb-${local.position}`,\n `smwb-${local.placement}`,\n { \"smwb-dense\": local.dense },\n local.color !== \"default\" && `smwb-appbar_color-${local.color}`\n )}\n >\n <Show\n when={local.children}\n fallback={\n <div class=\"smwb-appbar__inner\">\n <div class=\"smwb-appbar__left\">\n <Show when={local.title}>\n <div class=\"smwb-appbar__left__title\">{local.title}</div>\n </Show>\n {local.leftContent}\n </div>\n <div class={cn(\"smwb-appbar__mid\", `smwb-${local.midContentAlign}`)}>{local.midContent}</div>\n <div class=\"smwb-appbar__right\">{local.rightContent}</div>\n </div>\n }\n >\n {local.children}\n </Show>\n </Dynamic>\n );\n}\n\nexport default AppBar;\n"],"mappings":"AAAA,OAAO;AACP,SAAqC,MAAM,YAAY,kBAAkB;AACzE,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAkB7B,SAAS,OAAO,OAA8C;AACnE,QAAM,SAAS;AAAA,IACb;AAAA,MACE,UAAU;AAAA,MACV,WAAW;AAAA,MACX,iBAAiB;AAAA,MACjB,OAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACA,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,CAAC;AAAA,IACC,WAAW,MAAM,cAAc,QAAQ,WAAW;AAAA,QAC9C;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA,MAAM;AAAA,MACN,QAAQ,MAAM,QAAQ;AAAA,MACtB,QAAQ,MAAM,SAAS;AAAA,MACvB,EAAE,cAAc,MAAM,MAAM;AAAA,MAC5B,MAAM,UAAU,aAAa,qBAAqB,MAAM,KAAK;AAAA,IAC/D;AAAA,GACD;AAAA,MACC,CAAC;AAAA,IACC,MAAM,MAAM;AAAA,IACZ,UACE,CAAC,IAAI,MAAM,qBAAqB;AAAA,YAC9B,CAAC,IAAI,MAAM,oBAAoB;AAAA,cAC7B,CAAC,KAAK,MAAM,MAAM,OAAO;AAAA,gBACvB,CAAC,IAAI,MAAM,4BAA4B,MAAM,MAAM,EAAlD,IAAwD;AAAA,cAC3D,EAFC,KAEM;AAAA,eACN,MAAM,YAAY;AAAA,YACrB,EALC,IAKK;AAAA,YACN,CAAC,IAAI,OAAO,GAAG,oBAAoB,QAAQ,MAAM,eAAe,EAAE,IAAI,MAAM,WAAW,EAAtF,IAA4F;AAAA,YAC7F,CAAC,IAAI,MAAM,sBAAsB,MAAM,aAAa,EAAnD,IAAyD;AAAA,UAC5D,EATC;AAAA,GAWJ;AAAA,SACE,MAAM,SAAS;AAAA,MAClB,EAhBC,KAgBM;AAAA,IACT,EA/BC;AAiCL;AAEA,IAAO,iBAAQ;","names":[],"file":"appBar.jsx"}
@@ -1,5 +1,5 @@
1
- import "/sourcecraft/workspace/packages/styles/less/components/bottomBar/bottomBar.entry.less";
2
- import { For, Show, createSignal, mergeProps, splitProps } from "solid-js";
1
+ import "@smwb/ui-styles/less/components/bottomBar/bottomBar.entry.less";
2
+ import { For, Show, children, createSignal, mergeProps, splitProps } from "solid-js";
3
3
  import { Dynamic } from "solid-js/web";
4
4
  import cn from "clsx";
5
5
  import { Icon } from "../../base/icon";
@@ -11,6 +11,7 @@ import { callHandler } from "../../../primitives/callHandler";
11
11
  function BarItem(props) {
12
12
  const [local, rest] = splitProps(props, ["isActive", "icon", "title", "as", "href", "ref"]);
13
13
  let rippleActions;
14
+ const icon = children(() => local.icon);
14
15
  const onPointerDown = (event) => {
15
16
  rippleActions?.onRipple(event);
16
17
  };
@@ -23,8 +24,8 @@ function BarItem(props) {
23
24
  onPointerDown={onPointerDown}
24
25
  {...rest}
25
26
  >
26
- <Show when={local.icon}>
27
- <span class="smwb-bottom-bar__item-icon">{local.icon}</span>
27
+ <Show when={icon()}>
28
+ <span class="smwb-bottom-bar__item-icon">{icon()}</span>
28
29
  </Show>
29
30
  <Show when={local.title}>
30
31
  <span class="smwb-bottom-bar__item-title">{local.title}</span>
@@ -132,4 +133,4 @@ export {
132
133
  BottomBar,
133
134
  bottomBar_default as default
134
135
  };
135
- //# sourceMappingURL=bottomBar.js.map
136
+ //# sourceMappingURL=bottomBar.jsx.map