@soroush.tech/design-system 2.0.0-rc.0 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +17 -1
  2. package/dist/AppBar.d.cts +1 -3
  3. package/dist/AppBar.d.mts +1 -3
  4. package/dist/Avatar.cjs +1 -1
  5. package/dist/Avatar.d.cts +1 -3
  6. package/dist/Avatar.d.mts +1 -3
  7. package/dist/Avatar.mjs +1 -1
  8. package/dist/Backdrop.d.cts +1 -1
  9. package/dist/Backdrop.d.mts +1 -1
  10. package/dist/Breadcrumbs.cjs +132 -0
  11. package/dist/Breadcrumbs.d.cts +40 -0
  12. package/dist/Breadcrumbs.d.mts +40 -0
  13. package/dist/Breadcrumbs.mjs +131 -0
  14. package/dist/Button.cjs +1 -1
  15. package/dist/Button.d.cts +1 -1
  16. package/dist/Button.d.mts +1 -1
  17. package/dist/Button.mjs +1 -1
  18. package/dist/ButtonGroup.d.cts +1 -1
  19. package/dist/ButtonGroup.d.mts +1 -1
  20. package/dist/Card.cjs +3 -3
  21. package/dist/Card.d.cts +4 -3
  22. package/dist/Card.d.mts +4 -3
  23. package/dist/Card.mjs +3 -3
  24. package/dist/Checkbox.d.cts +1 -2
  25. package/dist/Checkbox.d.mts +1 -2
  26. package/dist/CircularProgress.d.cts +2 -3
  27. package/dist/CircularProgress.d.mts +2 -3
  28. package/dist/Drawer.d.cts +3 -2
  29. package/dist/Drawer.d.mts +3 -2
  30. package/dist/Flex.d.cts +1 -1
  31. package/dist/Flex.d.mts +1 -1
  32. package/dist/Form.d.cts +1 -1
  33. package/dist/Form.d.mts +1 -1
  34. package/dist/FormControl.cjs +1 -1
  35. package/dist/FormControl.d.cts +1 -2
  36. package/dist/FormControl.d.mts +1 -2
  37. package/dist/FormControl.mjs +1 -1
  38. package/dist/FormHelperText.d.cts +1 -1
  39. package/dist/FormHelperText.d.mts +1 -1
  40. package/dist/FormLabel.d.cts +1 -1
  41. package/dist/FormLabel.d.mts +1 -1
  42. package/dist/Grid.d.cts +1 -3
  43. package/dist/Grid.d.mts +1 -3
  44. package/dist/{Icon-CI6q2Eyi.cjs → Icon-Cvuhp9ek.cjs} +12 -2
  45. package/dist/{Icon-CH3asUJu.mjs → Icon-DlheCTJb.mjs} +12 -2
  46. package/dist/Icon.cjs +1 -1
  47. package/dist/Icon.d.cts +1 -1
  48. package/dist/Icon.d.mts +1 -1
  49. package/dist/Icon.mjs +1 -1
  50. package/dist/Image.d.cts +1 -2
  51. package/dist/Image.d.mts +1 -2
  52. package/dist/LinearProgress.d.cts +2 -3
  53. package/dist/LinearProgress.d.mts +2 -3
  54. package/dist/Link.cjs +1 -1
  55. package/dist/Link.d.cts +1 -1
  56. package/dist/Link.d.mts +1 -1
  57. package/dist/Link.mjs +1 -1
  58. package/dist/Menu/ContextMenu.cjs +146 -0
  59. package/dist/Menu/ContextMenu.d.cts +52 -0
  60. package/dist/Menu/ContextMenu.d.mts +52 -0
  61. package/dist/Menu/ContextMenu.mjs +145 -0
  62. package/dist/Menu/Menu.cjs +3 -0
  63. package/dist/Menu/Menu.d.cts +2 -0
  64. package/dist/Menu/Menu.d.mts +2 -0
  65. package/dist/Menu/Menu.mjs +2 -0
  66. package/dist/Menu/MenuDivider.cjs +29 -0
  67. package/dist/Menu/MenuDivider.d.cts +12 -0
  68. package/dist/Menu/MenuDivider.d.mts +12 -0
  69. package/dist/Menu/MenuDivider.mjs +28 -0
  70. package/dist/Menu/MenuItems.cjs +29 -0
  71. package/dist/Menu/MenuItems.d.cts +2 -0
  72. package/dist/Menu/MenuItems.d.mts +2 -0
  73. package/dist/Menu/MenuItems.mjs +28 -0
  74. package/dist/Menu/MenuList.cjs +3 -0
  75. package/dist/Menu/MenuList.d.cts +38 -0
  76. package/dist/Menu/MenuList.d.mts +38 -0
  77. package/dist/Menu/MenuList.mjs +2 -0
  78. package/dist/Menu-BkKPTOfh.cjs +172 -0
  79. package/dist/Menu-tECbAEFj.mjs +167 -0
  80. package/dist/Menu.cjs +13 -0
  81. package/dist/Menu.d.cts +7 -0
  82. package/dist/Menu.d.mts +7 -0
  83. package/dist/Menu.mjs +6 -0
  84. package/dist/MenuItem-BR7ingQx.mjs +654 -0
  85. package/dist/MenuItem-CfdN4axw.cjs +684 -0
  86. package/dist/MenuItem.cjs +2 -148
  87. package/dist/MenuItem.d.cts +2 -52
  88. package/dist/MenuItem.d.mts +2 -52
  89. package/dist/MenuItem.mjs +1 -147
  90. package/dist/MenuList-B7msJ1IG.mjs +187 -0
  91. package/dist/MenuList-D4imLXAa.cjs +223 -0
  92. package/dist/MenuListContext-Dml16k0X.d.mts +21 -0
  93. package/dist/MenuListContext-vujGcRk9.d.cts +21 -0
  94. package/dist/Modal.d.cts +1 -1
  95. package/dist/Modal.d.mts +1 -1
  96. package/dist/NativeSelect.cjs +2 -2
  97. package/dist/NativeSelect.d.cts +2 -3
  98. package/dist/NativeSelect.d.mts +2 -3
  99. package/dist/NativeSelect.mjs +2 -2
  100. package/dist/Pagination/PaginationItem.cjs +1 -1
  101. package/dist/Pagination/PaginationItem.d.cts +1 -1
  102. package/dist/Pagination/PaginationItem.d.mts +1 -1
  103. package/dist/Pagination/PaginationItem.mjs +1 -1
  104. package/dist/Pagination.d.cts +2 -2
  105. package/dist/Pagination.d.mts +2 -2
  106. package/dist/Paper.cjs +1 -1
  107. package/dist/Paper.d.cts +2 -1
  108. package/dist/Paper.d.mts +2 -1
  109. package/dist/Paper.mjs +1 -1
  110. package/dist/{Popover-TpwRSORC.cjs → Popover-CiZfgiKE.cjs} +5 -125
  111. package/dist/Popover-QjM5Z1CR.mjs +133 -0
  112. package/dist/Popover.cjs +1 -1
  113. package/dist/Popover.d.cts +6 -7
  114. package/dist/Popover.d.mts +6 -7
  115. package/dist/Popover.mjs +1 -1
  116. package/dist/Pressable.cjs +1 -1
  117. package/dist/Pressable.d.cts +1 -1
  118. package/dist/Pressable.d.mts +1 -1
  119. package/dist/Pressable.mjs +1 -1
  120. package/dist/Quote.d.cts +2 -3
  121. package/dist/Quote.d.mts +2 -3
  122. package/dist/Radio.d.cts +1 -2
  123. package/dist/Radio.d.mts +1 -2
  124. package/dist/Select.cjs +3 -3
  125. package/dist/Select.d.cts +2 -3
  126. package/dist/Select.d.mts +2 -3
  127. package/dist/Select.mjs +3 -3
  128. package/dist/Sidebar/Sidebar.d.cts +1 -1
  129. package/dist/Sidebar/Sidebar.d.mts +1 -1
  130. package/dist/Sidebar/SidebarItem.cjs +1 -1
  131. package/dist/Sidebar/SidebarItem.d.cts +3 -4
  132. package/dist/Sidebar/SidebarItem.d.mts +3 -4
  133. package/dist/Sidebar/SidebarItem.mjs +1 -1
  134. package/dist/Skeleton.d.cts +1 -2
  135. package/dist/Skeleton.d.mts +1 -2
  136. package/dist/Switch.cjs +1 -1
  137. package/dist/Switch.d.cts +1 -2
  138. package/dist/Switch.d.mts +1 -2
  139. package/dist/Switch.mjs +1 -1
  140. package/dist/Table/Table.d.cts +2 -3
  141. package/dist/Table/Table.d.mts +2 -3
  142. package/dist/Table/TableBody.d.cts +1 -2
  143. package/dist/Table/TableBody.d.mts +1 -2
  144. package/dist/Table/TableCell.d.cts +1 -1
  145. package/dist/Table/TableCell.d.mts +1 -1
  146. package/dist/Table/TableContainer.d.cts +1 -3
  147. package/dist/Table/TableContainer.d.mts +1 -3
  148. package/dist/Table/TableControl.d.cts +1 -1
  149. package/dist/Table/TableControl.d.mts +1 -1
  150. package/dist/Table/TableFooter.d.cts +1 -2
  151. package/dist/Table/TableFooter.d.mts +1 -2
  152. package/dist/Table/TableHead.d.cts +1 -2
  153. package/dist/Table/TableHead.d.mts +1 -2
  154. package/dist/Table/TablePagination.d.cts +2 -2
  155. package/dist/Table/TablePagination.d.mts +2 -2
  156. package/dist/Table/TablePaginationActions.cjs +1 -1
  157. package/dist/Table/TablePaginationActions.d.cts +1 -1
  158. package/dist/Table/TablePaginationActions.d.mts +1 -1
  159. package/dist/Table/TablePaginationActions.mjs +1 -1
  160. package/dist/Table/TableRow.d.cts +1 -2
  161. package/dist/Table/TableRow.d.mts +1 -2
  162. package/dist/Table/TableSortLabel.cjs +1 -1
  163. package/dist/Table/TableSortLabel.d.cts +1 -1
  164. package/dist/Table/TableSortLabel.d.mts +1 -1
  165. package/dist/Table/TableSortLabel.mjs +1 -1
  166. package/dist/Table/hooks.d.cts +1 -1
  167. package/dist/Table/hooks.d.mts +1 -1
  168. package/dist/Table.d.cts +5 -5
  169. package/dist/Table.d.mts +5 -5
  170. package/dist/{TableContext-BeCxbtHH.d.cts → TableContext-6PgGpUzM.d.mts} +1 -1
  171. package/dist/{TableContext-BiRiYkVZ.d.mts → TableContext-CBGk-Lh8.d.cts} +1 -1
  172. package/dist/Tabs/Tab.cjs +306 -0
  173. package/dist/Tabs/Tab.d.cts +62 -0
  174. package/dist/Tabs/Tab.d.mts +62 -0
  175. package/dist/Tabs/Tab.mjs +305 -0
  176. package/dist/Tabs/TabContext.cjs +34 -0
  177. package/dist/Tabs/TabContext.d.cts +20 -0
  178. package/dist/Tabs/TabContext.d.mts +20 -0
  179. package/dist/Tabs/TabContext.mjs +33 -0
  180. package/dist/Tabs/TabList.cjs +31 -0
  181. package/dist/Tabs/TabList.d.cts +11 -0
  182. package/dist/Tabs/TabList.d.mts +11 -0
  183. package/dist/Tabs/TabList.mjs +30 -0
  184. package/dist/Tabs/TabPanel.cjs +40 -0
  185. package/dist/Tabs/TabPanel.d.cts +27 -0
  186. package/dist/Tabs/TabPanel.d.mts +27 -0
  187. package/dist/Tabs/TabPanel.mjs +38 -0
  188. package/dist/Tabs/TabScrollButton.cjs +93 -0
  189. package/dist/Tabs/TabScrollButton.d.cts +2 -0
  190. package/dist/Tabs/TabScrollButton.d.mts +2 -0
  191. package/dist/Tabs/TabScrollButton.mjs +91 -0
  192. package/dist/Tabs/Tabs.cjs +3 -0
  193. package/dist/Tabs/Tabs.d.cts +3 -0
  194. package/dist/Tabs/Tabs.d.mts +3 -0
  195. package/dist/Tabs/Tabs.mjs +2 -0
  196. package/dist/Tabs-D_wkX-Jb.cjs +645 -0
  197. package/dist/Tabs-YfCUbkQV.mjs +633 -0
  198. package/dist/Tabs.cjs +13 -0
  199. package/dist/Tabs.d.cts +8 -0
  200. package/dist/Tabs.d.mts +8 -0
  201. package/dist/Tabs.mjs +7 -0
  202. package/dist/TabsContext-C2agsLBN.d.cts +6 -0
  203. package/dist/TabsContext-DqyxdmGW.d.mts +6 -0
  204. package/dist/TabsValueContext-D40zGCpE.cjs +19 -0
  205. package/dist/TabsValueContext-DvL3inf7.mjs +8 -0
  206. package/dist/TextInput.cjs +1 -1
  207. package/dist/TextInput.d.cts +1 -2
  208. package/dist/TextInput.d.mts +1 -2
  209. package/dist/TextInput.mjs +1 -1
  210. package/dist/ToggleButton/ToggleButton.cjs +1 -1
  211. package/dist/ToggleButton/ToggleButton.d.cts +1 -1
  212. package/dist/ToggleButton/ToggleButton.d.mts +1 -1
  213. package/dist/ToggleButton/ToggleButton.mjs +1 -1
  214. package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
  215. package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
  216. package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
  217. package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
  218. package/dist/Typography.cjs +1 -1
  219. package/dist/Typography.d.cts +2 -2
  220. package/dist/Typography.d.mts +2 -2
  221. package/dist/Typography.mjs +1 -1
  222. package/dist/View.d.cts +1 -1
  223. package/dist/View.d.mts +1 -1
  224. package/dist/catalog.cjs +4110 -0
  225. package/dist/catalog.d.cts +90 -0
  226. package/dist/catalog.d.mts +90 -0
  227. package/dist/catalog.mjs +4109 -0
  228. package/dist/computePopoverPosition-BIprs_xo.mjs +123 -0
  229. package/dist/computePopoverPosition-DiyEOHnU.cjs +128 -0
  230. package/dist/dividerLine-BNljcGlv.cjs +66 -0
  231. package/dist/dividerLine-FahY-M6_.mjs +31 -0
  232. package/dist/engine.d.cts +1 -1
  233. package/dist/engine.d.mts +1 -1
  234. package/dist/index-B3LIhqHR.d.cts +98 -0
  235. package/dist/{index-DbEnSf2m.d.cts → index-B8DNxyEw.d.mts} +3 -4
  236. package/dist/{index-CxUsrlg1.d.cts → index-BCnKYNlZ.d.cts} +1 -2
  237. package/dist/{index-BUoVTCqX.d.mts → index-BFruxTHv.d.cts} +2 -3
  238. package/dist/{index-BSqet8aO.d.cts → index-BSA6SKao.d.mts} +2 -3
  239. package/dist/{index-CrN4MSUF.d.cts → index-BVPrG1L0.d.mts} +1 -1
  240. package/dist/{index-Celm-8iN.d.cts → index-BbgFYfX_.d.mts} +3 -4
  241. package/dist/{index-B78VkB0-.d.cts → index-Bhdn4KTy.d.cts} +2 -3
  242. package/dist/{index-Chg6pSrr.d.mts → index-BiVvxOvj.d.cts} +3 -4
  243. package/dist/index-BjPX49XA.d.mts +34 -0
  244. package/dist/{index-BB-dLv5V.d.mts → index-BjfPEP_5.d.cts} +3 -4
  245. package/dist/{index-Bid71KeF.d.cts → index-BlLH6rlE.d.cts} +2 -2
  246. package/dist/{index-Ctqajtac.d.cts → index-BqpS_Huq.d.mts} +12 -4
  247. package/dist/{index-BhibLnZ0.d.cts → index-Bxd9NOWb.d.mts} +2 -3
  248. package/dist/index-C3KrFPCj.d.mts +35 -0
  249. package/dist/{themes-RX2UX5gD.d.mts → index-CVNJEUwJ.d.mts} +217 -8
  250. package/dist/index-CWnbCxgw.d.cts +72 -0
  251. package/dist/index-Cj5Rhh_9.d.mts +72 -0
  252. package/dist/index-CoEqjFYn.d.mts +98 -0
  253. package/dist/{index-S-ClM6WM.d.mts → index-CrIxI8Na.d.mts} +2 -2
  254. package/dist/index-DBteSahY.d.cts +1 -0
  255. package/dist/index-DCmH5f9I.d.cts +72 -0
  256. package/dist/{index-VOsBSWEu.d.mts → index-DDJuUfL5.d.cts} +1 -1
  257. package/dist/{index-DdqdSOct.d.cts → index-DIC7HKpP.d.mts} +2 -3
  258. package/dist/{index-BfZuh9c2.d.mts → index-DJCpnTH3.d.mts} +2 -3
  259. package/dist/index-DQcnJ5H4.d.cts +35 -0
  260. package/dist/{index-DNwF3DUX.d.cts → index-DXhMkjQ6.d.cts} +2 -3
  261. package/dist/index-DckSub2J.d.mts +72 -0
  262. package/dist/{index-nc4Sxiy9.d.mts → index-DeDxYlSQ.d.mts} +2 -3
  263. package/dist/{themes-Kbk9h5cN.d.cts → index-DmJ7yWWi.d.cts} +214 -5
  264. package/dist/{index-Wnv6jCR3.d.mts → index-DqjXDutI.d.mts} +1 -2
  265. package/dist/{index-GpnmW6vu.d.mts → index-DrVYWt-X.d.mts} +1 -2
  266. package/dist/{index-Belxmt1X.d.cts → index-DuVNRXP4.d.cts} +1 -2
  267. package/dist/{index-smqjMLAZ.d.mts → index-IdMqR82e.d.cts} +2 -3
  268. package/dist/{index-DXvQ-JVZ.d.mts → index-XxydXX8l.d.cts} +2 -3
  269. package/dist/index-_G1osn09.d.mts +1 -0
  270. package/dist/index-gnh-Oe0n.d.cts +34 -0
  271. package/dist/{index-DO9J-Fla.d.mts → index-qlfNErNd.d.cts} +12 -4
  272. package/dist/index.d.cts +1 -2
  273. package/dist/index.d.mts +1 -2
  274. package/dist/style.cjs +1 -1
  275. package/dist/style.d.cts +2 -2
  276. package/dist/style.d.mts +2 -2
  277. package/dist/style.mjs +1 -1
  278. package/dist/surfaceSystem-BGQBoXv_.cjs +38 -0
  279. package/dist/surfaceSystem-D8TbmKy3.mjs +21 -0
  280. package/dist/theme-BxXuXRgQ.cjs +137 -0
  281. package/dist/theme-Z9_QludW.mjs +102 -0
  282. package/dist/theme.cjs +25 -24
  283. package/dist/theme.d.cts +3 -3
  284. package/dist/theme.d.mts +3 -3
  285. package/dist/theme.mjs +2 -1
  286. package/dist/{theme-CDVxig_g.mjs → themes-L-dE7_ck.mjs} +10 -110
  287. package/dist/{theme-BXlAP3xf.cjs → themes-gd6tcmqS.cjs} +0 -136
  288. package/dist/{useTablePagination-COTiNH_8.d.mts → useTablePagination-C5VKtqDp.d.cts} +1 -1
  289. package/dist/{useTablePagination-WFkaUZu8.d.cts → useTablePagination-C6LSlt3w.d.mts} +1 -1
  290. package/package.json +43 -2
  291. package/dist/Popover-DwnSLpp1.mjs +0 -253
  292. package/dist/index-B_dKjEDR.d.mts +0 -23
  293. package/dist/index-C1WqEDtQ.d.mts +0 -69
  294. package/dist/index-CA7HnbtH.d.cts +0 -21
  295. package/dist/index-CKZaErxJ.d.mts +0 -21
  296. package/dist/index-DBUwu65Z.d.cts +0 -69
  297. package/dist/index-DzQJSYIh.d.cts +0 -23
  298. package/dist/index-cuv3o-L7.d.mts +0 -34
  299. package/dist/index-nB94D7UM.d.cts +0 -34
@@ -0,0 +1,4110 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_themes = require("./themes-gd6tcmqS.cjs");
3
+ let _soroush_tech_styled_system = require("@soroush.tech/styled-system");
4
+ //#region ../docs-content/src/kebabCase.ts
5
+ /** PascalCase or camelCase to kebab-case: `TextInput` -> `text-input`. */
6
+ const kebabCase = (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
7
+ //#endregion
8
+ //#region ../docs-content/src/registry.ts
9
+ /** `nested` marks container folders whose README sits one level down (Table/Table/README.md). */
10
+ const component = (name, nested = false, pkg = "design-system") => ({
11
+ pkg,
12
+ name,
13
+ slug: kebabCase(name),
14
+ readmePath: nested ? `${name}/${name}/README.md` : `${name}/README.md`
15
+ });
16
+ const markdownComponent = (name) => component(name, false, "markdown");
17
+ /**
18
+ * The component taxonomy of the design-system README's inventory, driving the docs
19
+ * sidebar, the components index grid, and the MCP server's component tools.
20
+ * `registry.test.ts` guards it against the actual README files on disk.
21
+ */
22
+ const componentCategories = [
23
+ {
24
+ label: "Layout & surfaces",
25
+ items: [
26
+ component("View"),
27
+ component("Flex"),
28
+ component("Grid"),
29
+ component("Paper"),
30
+ component("Card"),
31
+ component("Quote"),
32
+ component("AppBar"),
33
+ component("Drawer"),
34
+ component("Sidebar", true)
35
+ ]
36
+ },
37
+ {
38
+ label: "Content & data display",
39
+ items: [
40
+ component("Typography"),
41
+ component("Link"),
42
+ component("Icon"),
43
+ component("Image"),
44
+ component("Avatar"),
45
+ component("Table", true)
46
+ ]
47
+ },
48
+ {
49
+ label: "Inputs & forms",
50
+ items: [
51
+ component("Button"),
52
+ component("ButtonGroup"),
53
+ component("ToggleButton", true),
54
+ component("TextInput"),
55
+ component("Checkbox"),
56
+ component("Radio"),
57
+ component("Switch"),
58
+ component("NativeSelect"),
59
+ component("Select"),
60
+ component("MenuItem"),
61
+ component("Form"),
62
+ component("FormControl"),
63
+ component("FormLabel"),
64
+ component("FormHelperText"),
65
+ component("Pagination")
66
+ ]
67
+ },
68
+ {
69
+ label: "Navigation & menus",
70
+ items: [
71
+ component("Breadcrumbs"),
72
+ component("Menu", true),
73
+ component("Tabs", true)
74
+ ]
75
+ },
76
+ {
77
+ label: "Feedback",
78
+ items: [
79
+ component("CircularProgress"),
80
+ component("LinearProgress"),
81
+ component("Skeleton"),
82
+ component("Backdrop")
83
+ ]
84
+ },
85
+ {
86
+ label: "Overlay & behavior",
87
+ items: [
88
+ component("Portal"),
89
+ component("FocusTrap"),
90
+ component("Modal"),
91
+ component("Popover"),
92
+ component("Pressable")
93
+ ]
94
+ }
95
+ ];
96
+ const allComponents = componentCategories.flatMap((category) => category.items);
97
+ /** Every family member, in its family's order. */
98
+ const memberComponents = Object.entries({
99
+ Menu: [
100
+ "ContextMenu",
101
+ "MenuDivider",
102
+ "MenuItems",
103
+ "MenuList"
104
+ ],
105
+ Pagination: ["PaginationItem"],
106
+ Sidebar: ["SidebarItem"],
107
+ Table: [
108
+ "TableBody",
109
+ "TableCell",
110
+ "TableContainer",
111
+ "TableControl",
112
+ "TableFooter",
113
+ "TableHead",
114
+ "TablePagination",
115
+ "TablePaginationActions",
116
+ "TableRow",
117
+ "TableSortLabel"
118
+ ],
119
+ Tabs: [
120
+ "Tab",
121
+ "TabContext",
122
+ "TabList",
123
+ "TabPanel",
124
+ "TabScrollButton"
125
+ ],
126
+ ToggleButton: ["ToggleButtonGroup"]
127
+ }).flatMap(([family, names]) => names.map((name) => ({
128
+ pkg: "design-system",
129
+ name,
130
+ slug: kebabCase(name),
131
+ readmePath: `${family}/${name}/README.md`,
132
+ family
133
+ })));
134
+ /** A family's members; none for a component that isn't one. */
135
+ const membersOf = (item) => memberComponents.filter((member) => member.family === item.name);
136
+ /** The markdown package's component library - flat, no categories. */
137
+ const markdownComponents = [
138
+ markdownComponent("Preview"),
139
+ markdownComponent("Editor"),
140
+ markdownComponent("LiveEdit"),
141
+ markdownComponent("Control"),
142
+ markdownComponent("Toolbar"),
143
+ markdownComponent("CodeBlock"),
144
+ markdownComponent("Mermaid")
145
+ ];
146
+ /** Every documented component, family members included, across packages. Slugs are globally unique. */
147
+ const allDocComponents = [...allComponents.flatMap((item) => [item, ...membersOf(item)]), ...markdownComponents];
148
+ new Map(allDocComponents.map((item) => [item.slug, item]));
149
+ //#endregion
150
+ //#region src/catalog/defineCatalogEntry.ts
151
+ /**
152
+ * Types a component's catalog entry against its props: `defineCatalogEntry<ButtonProps>()({
153
+ * ... })`. Curried, so the props are named and the entry is still inferred.
154
+ */
155
+ const defineCatalogEntry = () => (entry) => entry;
156
+ /** A nested node, for brevity: `node('MenuItem', { value: 'web' }, ['Web'])`. */
157
+ const node = (component, props = {}, children = []) => ({
158
+ component,
159
+ props,
160
+ children
161
+ });
162
+ //#endregion
163
+ //#region src/AppBar/AppBar.catalog.ts
164
+ const appBarPositionValues = [
165
+ "static",
166
+ "relative",
167
+ "absolute",
168
+ "fixed",
169
+ "sticky"
170
+ ];
171
+ const pictured$2 = [
172
+ "paper",
173
+ "primary",
174
+ "secondary",
175
+ "modal"
176
+ ];
177
+ const colorLabels$5 = {
178
+ paper: "Paper",
179
+ primary: "Primary",
180
+ secondary: "Secondary",
181
+ modal: "Modal"
182
+ };
183
+ const appBarCatalog = defineCatalogEntry()({
184
+ summary: "A full-width header bar for an app title, navigation and actions.",
185
+ isPlaceable: true,
186
+ example: {
187
+ component: "AppBar",
188
+ props: { color: "paper" },
189
+ children: ["Application Header"]
190
+ },
191
+ variants: pictured$2.map((color) => ({
192
+ name: color,
193
+ label: colorLabels$5[color],
194
+ example: {
195
+ component: "AppBar",
196
+ props: { color },
197
+ children: ["Application Header"]
198
+ }
199
+ })),
200
+ options: {
201
+ color: { scale: "background" },
202
+ size: {
203
+ scale: "sizes",
204
+ default: "md"
205
+ },
206
+ elevation: {
207
+ values: [
208
+ 0,
209
+ 4,
210
+ 8,
211
+ 12,
212
+ 16,
213
+ 24
214
+ ],
215
+ default: 4
216
+ },
217
+ position: {
218
+ values: appBarPositionValues,
219
+ default: "static"
220
+ },
221
+ blur: {
222
+ values: [true, false],
223
+ default: false
224
+ }
225
+ },
226
+ content: { children: "children" },
227
+ preview: { width: 480 }
228
+ });
229
+ //#endregion
230
+ //#region src/Avatar/Avatar.catalog.ts
231
+ const avatarVariantValues = [
232
+ "circular",
233
+ "rounded",
234
+ "square"
235
+ ];
236
+ const variantLabels$16 = {
237
+ circular: "Circular",
238
+ rounded: "Rounded",
239
+ square: "Square"
240
+ };
241
+ const initials = {
242
+ size: "md",
243
+ bg: "secondary"
244
+ };
245
+ const avatarCatalog = defineCatalogEntry()({
246
+ summary: "A person or entity shown as an image, or as initials when there is no image.",
247
+ isPlaceable: true,
248
+ example: {
249
+ component: "Avatar",
250
+ props: {
251
+ ...initials,
252
+ variant: "circular"
253
+ },
254
+ children: ["MS"]
255
+ },
256
+ variants: avatarVariantValues.map((variant) => ({
257
+ name: variant,
258
+ label: variantLabels$16[variant],
259
+ example: {
260
+ component: "Avatar",
261
+ props: {
262
+ ...initials,
263
+ variant
264
+ },
265
+ children: ["MS"]
266
+ }
267
+ })),
268
+ options: {
269
+ variant: {
270
+ values: avatarVariantValues,
271
+ default: "circular"
272
+ },
273
+ size: {
274
+ scale: "avatar",
275
+ default: "md"
276
+ },
277
+ bg: { scale: "background" },
278
+ ring: {
279
+ values: [true, false],
280
+ default: false
281
+ },
282
+ ringColor: {
283
+ scale: "border",
284
+ default: "primary"
285
+ },
286
+ ringWidth: {
287
+ scale: "borderWidths",
288
+ default: "thin"
289
+ }
290
+ },
291
+ content: { children: "children" }
292
+ });
293
+ //#endregion
294
+ //#region src/Backdrop/Backdrop.catalog.ts
295
+ const backdropCatalog = defineCatalogEntry()({
296
+ summary: "The dimmed full-viewport scrim a modal draws behind its content.",
297
+ isPlaceable: false,
298
+ example: {
299
+ component: "Backdrop",
300
+ props: {},
301
+ children: []
302
+ },
303
+ variants: [],
304
+ options: { bg: {
305
+ scale: "background",
306
+ default: "backdrop"
307
+ } },
308
+ content: {},
309
+ preview: {
310
+ width: 320,
311
+ height: 200
312
+ }
313
+ });
314
+ //#endregion
315
+ //#region src/Breadcrumbs/Breadcrumbs.catalog.ts
316
+ const breadcrumbsSeparatorValues = [
317
+ "/",
318
+ "›",
319
+ "-",
320
+ "·"
321
+ ];
322
+ const crumbs = [
323
+ node("Link", {
324
+ href: "#",
325
+ underline: "hover",
326
+ color: "inherit"
327
+ }, ["Home"]),
328
+ node("Link", {
329
+ href: "#",
330
+ underline: "hover",
331
+ color: "inherit"
332
+ }, ["Catalog"]),
333
+ node("Typography", {
334
+ color: "primary",
335
+ "aria-current": "page"
336
+ }, ["Accessories"])
337
+ ];
338
+ const breadcrumbsCatalog = defineCatalogEntry()({
339
+ summary: "The trail of links from a site's root to the current page.",
340
+ isPlaceable: true,
341
+ example: {
342
+ component: "Breadcrumbs",
343
+ props: {
344
+ "aria-label": "Breadcrumb",
345
+ expandLabel: "Show path"
346
+ },
347
+ children: crumbs
348
+ },
349
+ variants: breadcrumbsSeparatorValues.map((separator) => ({
350
+ name: separator,
351
+ label: `Separated by ${separator}`,
352
+ example: {
353
+ component: "Breadcrumbs",
354
+ props: {
355
+ "aria-label": "Breadcrumb",
356
+ separator
357
+ },
358
+ children: crumbs
359
+ }
360
+ })),
361
+ options: {
362
+ separator: {
363
+ values: breadcrumbsSeparatorValues,
364
+ default: "/"
365
+ },
366
+ maxItems: {
367
+ values: [
368
+ 2,
369
+ 3,
370
+ 4,
371
+ 8
372
+ ],
373
+ default: 8
374
+ },
375
+ itemsBeforeCollapse: {
376
+ values: [
377
+ 0,
378
+ 1,
379
+ 2
380
+ ],
381
+ default: 1
382
+ },
383
+ itemsAfterCollapse: {
384
+ values: [1, 2],
385
+ default: 1
386
+ },
387
+ color: {
388
+ scale: "text",
389
+ default: "secondary"
390
+ },
391
+ typography: {
392
+ scale: "typography",
393
+ default: "body1"
394
+ }
395
+ },
396
+ content: { children: "children" }
397
+ });
398
+ //#endregion
399
+ //#region src/Button/Button.catalog.ts
400
+ const buttonVariantValues = [
401
+ "contained",
402
+ "outlined",
403
+ "text"
404
+ ];
405
+ const buttonShapeValues = [
406
+ "square",
407
+ "rounded",
408
+ "pill"
409
+ ];
410
+ const buttonLoadingPositionValues = [
411
+ "start",
412
+ "end",
413
+ "center"
414
+ ];
415
+ const variantLabels$15 = {
416
+ contained: "Contained",
417
+ outlined: "Outlined",
418
+ text: "Text"
419
+ };
420
+ const buttonCatalog = defineCatalogEntry()({
421
+ summary: "An action - filled, stroked or plain, in any palette color, or a link with `href`.",
422
+ isPlaceable: true,
423
+ example: {
424
+ component: "Button",
425
+ props: { variant: "contained" },
426
+ children: ["Button"]
427
+ },
428
+ variants: buttonVariantValues.map((variant) => ({
429
+ name: variant,
430
+ label: variantLabels$15[variant],
431
+ example: {
432
+ component: "Button",
433
+ props: { variant },
434
+ children: ["Button"]
435
+ }
436
+ })),
437
+ options: {
438
+ variant: {
439
+ values: buttonVariantValues,
440
+ default: "contained"
441
+ },
442
+ color: {
443
+ scale: "palette",
444
+ default: "primary"
445
+ },
446
+ size: {
447
+ scale: "sizes",
448
+ default: "md"
449
+ },
450
+ shape: {
451
+ values: buttonShapeValues,
452
+ default: "square"
453
+ },
454
+ fullWidth: {
455
+ values: [true, false],
456
+ default: false
457
+ },
458
+ disabled: {
459
+ values: [true, false],
460
+ default: false
461
+ },
462
+ loading: {
463
+ values: [true, false],
464
+ default: false
465
+ },
466
+ loadingPosition: {
467
+ values: buttonLoadingPositionValues,
468
+ default: "center"
469
+ }
470
+ },
471
+ content: {
472
+ children: "children",
473
+ startIcon: "child",
474
+ endIcon: "child",
475
+ loadingIndicator: "child"
476
+ },
477
+ domEvents: ["onClick"]
478
+ });
479
+ //#endregion
480
+ //#region src/ButtonGroup/ButtonGroup.catalog.ts
481
+ const buttonGroupVariantValues = [
482
+ "contained",
483
+ "outlined",
484
+ "text"
485
+ ];
486
+ const buttonGroupOrientationValues = ["horizontal", "vertical"];
487
+ const variantLabels$14 = {
488
+ contained: "Contained",
489
+ outlined: "Outlined",
490
+ text: "Text"
491
+ };
492
+ const buttons = [
493
+ node("Button", {}, ["One"]),
494
+ node("Button", {}, ["Two"]),
495
+ node("Button", {}, ["Three"])
496
+ ];
497
+ const buttonGroupCatalog = defineCatalogEntry()({
498
+ summary: "A row or column of related buttons joined into one cluster that share a style.",
499
+ isPlaceable: true,
500
+ example: {
501
+ component: "ButtonGroup",
502
+ props: { "aria-label": "Basic button group" },
503
+ children: buttons
504
+ },
505
+ variants: buttonGroupVariantValues.map((variant) => ({
506
+ name: variant,
507
+ label: variantLabels$14[variant],
508
+ example: {
509
+ component: "ButtonGroup",
510
+ props: {
511
+ variant,
512
+ "aria-label": "Basic button group"
513
+ },
514
+ children: buttons
515
+ }
516
+ })),
517
+ options: {
518
+ variant: {
519
+ values: buttonGroupVariantValues,
520
+ default: "outlined"
521
+ },
522
+ color: {
523
+ scale: "palette",
524
+ default: "primary"
525
+ },
526
+ size: {
527
+ scale: "sizes",
528
+ default: "md"
529
+ },
530
+ orientation: {
531
+ values: buttonGroupOrientationValues,
532
+ default: "horizontal"
533
+ },
534
+ borderRadius: {
535
+ scale: "radii",
536
+ default: "md"
537
+ },
538
+ disabled: {
539
+ values: [true, false],
540
+ default: false
541
+ },
542
+ fullWidth: {
543
+ values: [true, false],
544
+ default: false
545
+ }
546
+ },
547
+ content: { children: "children" }
548
+ });
549
+ //#endregion
550
+ //#region src/Card/Card.catalog.ts
551
+ const cardVariantValues = [
552
+ "paper",
553
+ "bracketBox",
554
+ "interactive"
555
+ ];
556
+ const variantLabels$13 = {
557
+ paper: "Paper",
558
+ bracketBox: "Bracket box",
559
+ interactive: "Interactive"
560
+ };
561
+ const content$2 = {
562
+ title: "Component",
563
+ caption: "A flexible card surface with paper and bracketBox variants.",
564
+ p: 3
565
+ };
566
+ const cardCatalog = defineCatalogEntry()({
567
+ summary: "A surface with an optional icon, title and caption over its own content.",
568
+ isPlaceable: true,
569
+ example: {
570
+ component: "Card",
571
+ props: content$2,
572
+ children: []
573
+ },
574
+ variants: cardVariantValues.map((variant) => ({
575
+ name: variant,
576
+ label: variantLabels$13[variant],
577
+ example: {
578
+ component: "Card",
579
+ props: {
580
+ ...content$2,
581
+ variant
582
+ },
583
+ children: []
584
+ }
585
+ })),
586
+ options: {
587
+ variant: {
588
+ values: cardVariantValues,
589
+ default: "paper"
590
+ },
591
+ elevation: {
592
+ values: [
593
+ 0,
594
+ 1,
595
+ 2,
596
+ 4,
597
+ 8,
598
+ 16,
599
+ 24
600
+ ],
601
+ default: 1
602
+ }
603
+ },
604
+ content: {
605
+ children: "children",
606
+ title: "text",
607
+ caption: "text"
608
+ },
609
+ preview: { width: 280 }
610
+ });
611
+ //#endregion
612
+ //#region src/Checkbox/Checkbox.catalog.ts
613
+ const colorLabels$4 = {
614
+ default: "Default",
615
+ primary: "Primary",
616
+ secondary: "Secondary",
617
+ success: "Success",
618
+ error: "Error",
619
+ info: "Info",
620
+ warning: "Warning"
621
+ };
622
+ const colors$3 = Object.keys(colorLabels$4);
623
+ const checkboxCatalog = defineCatalogEntry()({
624
+ summary: "A box that is checked or not, with an optional label and an indeterminate state.",
625
+ isPlaceable: true,
626
+ example: {
627
+ component: "Checkbox",
628
+ props: {},
629
+ children: ["Accept terms and conditions"]
630
+ },
631
+ variants: colors$3.map((color) => ({
632
+ name: color,
633
+ label: colorLabels$4[color],
634
+ example: {
635
+ component: "Checkbox",
636
+ props: {
637
+ color,
638
+ checked: true
639
+ },
640
+ children: ["Accept terms and conditions"]
641
+ }
642
+ })),
643
+ options: {
644
+ color: {
645
+ scale: "palette",
646
+ default: "default"
647
+ },
648
+ size: {
649
+ scale: "sizes",
650
+ default: "md"
651
+ },
652
+ indeterminate: {
653
+ values: [true, false],
654
+ default: false
655
+ },
656
+ disabled: {
657
+ values: [true, false],
658
+ default: false
659
+ },
660
+ required: {
661
+ values: [true, false],
662
+ default: false
663
+ },
664
+ fullWidth: {
665
+ values: [true, false],
666
+ default: false
667
+ }
668
+ },
669
+ content: {
670
+ children: "children",
671
+ icon: "child",
672
+ checkedIcon: "child"
673
+ },
674
+ twoWay: {
675
+ prop: "checked",
676
+ event: "onChange",
677
+ read: "target.checked"
678
+ }
679
+ });
680
+ //#endregion
681
+ //#region src/Menu/ContextMenu/ContextMenu.catalog.ts
682
+ const contextMenuCatalog = defineCatalogEntry()({
683
+ summary: "A `MenuList` opened by a right-click over its `target`, at the pointer.",
684
+ isPlaceable: false,
685
+ example: {
686
+ component: "ContextMenu",
687
+ props: { "aria-label": "Canvas" },
688
+ children: [
689
+ node("MenuItem", {
690
+ value: "cut",
691
+ shortcut: "Control+X"
692
+ }, ["Cut"]),
693
+ node("MenuItem", {
694
+ value: "copy",
695
+ shortcut: "Control+C"
696
+ }, ["Copy"]),
697
+ node("MenuItem", {
698
+ value: "paste",
699
+ shortcut: "Control+V",
700
+ disabled: true,
701
+ note: "The clipboard is empty"
702
+ }, ["Paste"])
703
+ ]
704
+ },
705
+ variants: [],
706
+ options: {
707
+ color: {
708
+ scale: "palette",
709
+ default: "primary"
710
+ },
711
+ textColor: { scale: "text" },
712
+ size: {
713
+ scale: "sizes",
714
+ default: "md"
715
+ },
716
+ dense: {
717
+ values: [true, false],
718
+ default: false
719
+ },
720
+ elevation: {
721
+ values: [
722
+ 0,
723
+ 1,
724
+ 2,
725
+ 4,
726
+ 8,
727
+ 16,
728
+ 24
729
+ ],
730
+ default: 8
731
+ },
732
+ layer: { scale: "zOrder" },
733
+ marginThreshold: { scale: "space" }
734
+ },
735
+ content: {
736
+ children: "children",
737
+ target: "child",
738
+ emptyLabel: "text",
739
+ items: "none"
740
+ },
741
+ domEvents: ["onSelect", "onClose"]
742
+ });
743
+ //#endregion
744
+ //#region src/CircularProgress/CircularProgress.catalog.ts
745
+ const circularProgressVariantValues = ["indeterminate", "determinate"];
746
+ const circularProgressEasingValues = [
747
+ "linear",
748
+ "ease",
749
+ "ease-in",
750
+ "ease-out",
751
+ "ease-in-out"
752
+ ];
753
+ const variantLabels$12 = {
754
+ indeterminate: "Indeterminate",
755
+ determinate: "Determinate"
756
+ };
757
+ const variantProps$1 = {
758
+ indeterminate: { variant: "indeterminate" },
759
+ determinate: {
760
+ variant: "determinate",
761
+ value: 70
762
+ }
763
+ };
764
+ const circularProgressCatalog = defineCatalogEntry()({
765
+ summary: "A circular loading indicator - a looping spinner, or an arc that shows a `value`.",
766
+ isPlaceable: true,
767
+ example: {
768
+ component: "CircularProgress",
769
+ props: {
770
+ variant: "indeterminate",
771
+ color: "primary",
772
+ size: 40
773
+ },
774
+ children: []
775
+ },
776
+ variants: circularProgressVariantValues.map((variant) => ({
777
+ name: variant,
778
+ label: variantLabels$12[variant],
779
+ example: {
780
+ component: "CircularProgress",
781
+ props: {
782
+ ...variantProps$1[variant],
783
+ color: "primary",
784
+ size: 40
785
+ },
786
+ children: []
787
+ }
788
+ })),
789
+ options: {
790
+ variant: {
791
+ values: circularProgressVariantValues,
792
+ default: "indeterminate"
793
+ },
794
+ color: {
795
+ scale: "palette",
796
+ default: "primary"
797
+ },
798
+ size: { default: 40 },
799
+ thickness: { default: 3.6 },
800
+ min: { default: 0 },
801
+ max: { default: 100 },
802
+ disableShrink: {
803
+ values: [true, false],
804
+ default: false
805
+ },
806
+ spinning: {
807
+ values: [true, false],
808
+ default: false
809
+ },
810
+ easing: {
811
+ values: circularProgressEasingValues,
812
+ default: "linear"
813
+ },
814
+ showTrack: {
815
+ values: [true, false],
816
+ default: false
817
+ }
818
+ },
819
+ content: {}
820
+ });
821
+ //#endregion
822
+ //#region src/Drawer/Drawer.catalog.ts
823
+ const drawerAnchorValues = [
824
+ "left",
825
+ "right",
826
+ "top",
827
+ "bottom"
828
+ ];
829
+ const anchorLabels = {
830
+ left: "Left",
831
+ right: "Right",
832
+ top: "Top",
833
+ bottom: "Bottom"
834
+ };
835
+ const body = (anchor) => [node("Flex", {
836
+ flexDirection: "column",
837
+ gap: 3,
838
+ p: 4,
839
+ width: anchor === "top" || anchor === "bottom" ? "100%" : "260px"
840
+ }, [node("Typography", {
841
+ variant: "h6",
842
+ m: 0
843
+ }, ["Drawer"]), node("Typography", {
844
+ variant: "body2",
845
+ color: "secondary",
846
+ m: 0
847
+ }, ["Press Escape or click outside to close."])])];
848
+ const drawerCatalog = defineCatalogEntry()({
849
+ summary: "A panel that slides in from a screen edge, opened by a `DrawerToggle` with the same `id`.",
850
+ isPlaceable: true,
851
+ example: {
852
+ component: "Drawer",
853
+ props: {
854
+ id: "drawer",
855
+ isOpen: true,
856
+ anchor: "left"
857
+ },
858
+ children: body("left")
859
+ },
860
+ variants: drawerAnchorValues.map((anchor) => ({
861
+ name: anchor,
862
+ label: anchorLabels[anchor],
863
+ example: {
864
+ component: "Drawer",
865
+ props: {
866
+ id: "drawer",
867
+ isOpen: true,
868
+ anchor
869
+ },
870
+ children: body(anchor)
871
+ }
872
+ })),
873
+ options: {
874
+ anchor: {
875
+ values: drawerAnchorValues,
876
+ default: "left"
877
+ },
878
+ elevation: {
879
+ values: [
880
+ 0,
881
+ 1,
882
+ 2,
883
+ 4,
884
+ 8,
885
+ 16,
886
+ 24
887
+ ],
888
+ default: 16
889
+ },
890
+ transitionDuration: { default: 225 },
891
+ hasBackdrop: {
892
+ values: [true, false],
893
+ default: true
894
+ },
895
+ shouldLockScroll: {
896
+ values: [true, false],
897
+ default: true
898
+ },
899
+ shouldAutoFocus: {
900
+ values: [true, false],
901
+ default: true
902
+ },
903
+ shouldTrapFocus: {
904
+ values: [true, false],
905
+ default: true
906
+ },
907
+ shouldRestoreFocus: {
908
+ values: [true, false],
909
+ default: true
910
+ }
911
+ },
912
+ content: { children: "children" },
913
+ domEvents: ["onClose"],
914
+ preview: {
915
+ width: 480,
916
+ height: 320
917
+ }
918
+ });
919
+ const drawerToggleCatalog = defineCatalogEntry()({
920
+ summary: "The button that opens, closes or toggles the `Drawer` whose `id` it names in `drawer`.",
921
+ isPlaceable: false,
922
+ example: {
923
+ component: "DrawerToggle",
924
+ props: {
925
+ drawer: "drawer",
926
+ action: "toggle"
927
+ },
928
+ children: ["Open drawer"]
929
+ },
930
+ variants: [],
931
+ options: {
932
+ action: {
933
+ values: [
934
+ "toggle",
935
+ "show",
936
+ "hide"
937
+ ],
938
+ default: "toggle"
939
+ },
940
+ variant: {
941
+ values: [
942
+ "contained",
943
+ "outlined",
944
+ "text"
945
+ ],
946
+ default: "contained"
947
+ },
948
+ color: {
949
+ scale: "palette",
950
+ default: "primary"
951
+ },
952
+ size: {
953
+ scale: "sizes",
954
+ default: "md"
955
+ },
956
+ disabled: {
957
+ values: [true, false],
958
+ default: false
959
+ }
960
+ },
961
+ content: {
962
+ children: "children",
963
+ startIcon: "child",
964
+ endIcon: "child",
965
+ loadingIndicator: "child"
966
+ },
967
+ domEvents: ["onClick"]
968
+ });
969
+ //#endregion
970
+ //#region src/Flex/Flex.catalog.ts
971
+ const flexDirectionValues = [
972
+ "row",
973
+ "row-reverse",
974
+ "column",
975
+ "column-reverse"
976
+ ];
977
+ const flexJustifyContentValues = [
978
+ "flex-start",
979
+ "flex-end",
980
+ "center",
981
+ "space-between",
982
+ "space-around",
983
+ "space-evenly"
984
+ ];
985
+ const flexAlignItemsValues = [
986
+ "stretch",
987
+ "flex-start",
988
+ "flex-end",
989
+ "center",
990
+ "baseline"
991
+ ];
992
+ const flexAlignContentValues = [
993
+ "normal",
994
+ "flex-start",
995
+ "flex-end",
996
+ "center",
997
+ "stretch",
998
+ "space-between",
999
+ "space-around",
1000
+ "space-evenly"
1001
+ ];
1002
+ const flexWrapValues = [
1003
+ "nowrap",
1004
+ "wrap",
1005
+ "wrap-reverse"
1006
+ ];
1007
+ const box = {
1008
+ gap: 2,
1009
+ p: 2,
1010
+ width: "360px",
1011
+ height: "280px",
1012
+ bg: "secondary",
1013
+ borderRadius: "sm"
1014
+ };
1015
+ const items$1 = [
1016
+ "A",
1017
+ "B",
1018
+ "C"
1019
+ ].map((label) => node("View", {
1020
+ p: 2,
1021
+ bg: "primary",
1022
+ borderRadius: "sm"
1023
+ }, [label]));
1024
+ const directions = {
1025
+ column: "Column",
1026
+ row: "Row"
1027
+ };
1028
+ const flexCatalog = defineCatalogEntry()({
1029
+ summary: "A flexbox container that lays its children out in a column or a row.",
1030
+ isPlaceable: true,
1031
+ example: {
1032
+ component: "Flex",
1033
+ props: {
1034
+ ...box,
1035
+ flexDirection: "column"
1036
+ },
1037
+ children: items$1
1038
+ },
1039
+ variants: ["column", "row"].map((flexDirection) => ({
1040
+ name: flexDirection,
1041
+ label: directions[flexDirection],
1042
+ example: {
1043
+ component: "Flex",
1044
+ props: {
1045
+ ...box,
1046
+ flexDirection
1047
+ },
1048
+ children: items$1
1049
+ }
1050
+ })),
1051
+ options: {
1052
+ flexDirection: {
1053
+ values: flexDirectionValues,
1054
+ default: "column"
1055
+ },
1056
+ justifyContent: { values: flexJustifyContentValues },
1057
+ alignItems: { values: flexAlignItemsValues },
1058
+ alignContent: { values: flexAlignContentValues },
1059
+ flexWrap: {
1060
+ values: flexWrapValues,
1061
+ default: "nowrap"
1062
+ },
1063
+ gap: { scale: "space" },
1064
+ bg: { scale: "background" }
1065
+ },
1066
+ content: { children: "children" }
1067
+ });
1068
+ //#endregion
1069
+ //#region src/FocusTrap/FocusTrap.catalog.ts
1070
+ const focusTrapCatalog = defineCatalogEntry()({
1071
+ summary: "Keeps keyboard focus within its children while it is enabled.",
1072
+ isPlaceable: false,
1073
+ example: {
1074
+ component: "FocusTrap",
1075
+ props: { isEnabled: true },
1076
+ children: [node("View", { p: 3 }, ["Trapped content"])]
1077
+ },
1078
+ variants: [],
1079
+ options: {
1080
+ isEnabled: {
1081
+ values: [true, false],
1082
+ default: true
1083
+ },
1084
+ shouldAutoFocus: {
1085
+ values: [true, false],
1086
+ default: true
1087
+ },
1088
+ shouldTrapFocus: {
1089
+ values: [true, false],
1090
+ default: true
1091
+ },
1092
+ shouldEnforceFocus: {
1093
+ values: [true, false],
1094
+ default: true
1095
+ },
1096
+ shouldRestoreFocus: {
1097
+ values: [true, false],
1098
+ default: true
1099
+ }
1100
+ },
1101
+ content: { children: "children" }
1102
+ });
1103
+ //#endregion
1104
+ //#region src/Form/Form.catalog.ts
1105
+ const nameField = node("FormControl", {}, [node("Flex", {
1106
+ flexDirection: "column",
1107
+ gap: 1,
1108
+ alignItems: "flex-start"
1109
+ }, [node("FormLabel", {}, ["Name"]), node("TextInput", {
1110
+ variant: "outlined",
1111
+ placeholder: "John Smith"
1112
+ })])]);
1113
+ const formCatalog = defineCatalogEntry()({
1114
+ summary: "A `<form>` that gives every field inside it a default size, color and state.",
1115
+ isPlaceable: false,
1116
+ example: {
1117
+ component: "Form",
1118
+ props: { fullWidth: true },
1119
+ children: [node("Flex", {
1120
+ flexDirection: "column",
1121
+ gap: 4,
1122
+ alignItems: "flex-start"
1123
+ }, [nameField, node("Button", { type: "submit" }, ["Submit"])])]
1124
+ },
1125
+ variants: [],
1126
+ options: {
1127
+ size: {
1128
+ scale: "sizes",
1129
+ default: "md"
1130
+ },
1131
+ color: {
1132
+ scale: "palette",
1133
+ default: "primary"
1134
+ },
1135
+ textColor: { scale: "text" },
1136
+ disabled: {
1137
+ values: [true, false],
1138
+ default: false
1139
+ },
1140
+ fullWidth: {
1141
+ values: [true, false],
1142
+ default: false
1143
+ },
1144
+ noValidate: {
1145
+ values: [true, false],
1146
+ default: false
1147
+ }
1148
+ },
1149
+ content: { children: "children" },
1150
+ domEvents: ["onSubmit"],
1151
+ preview: { width: 360 }
1152
+ });
1153
+ //#endregion
1154
+ //#region src/FormControl/FormControl.catalog.ts
1155
+ const formControlCatalog = defineCatalogEntry()({
1156
+ summary: "One form field - a label, a control and helper text, wired together by a shared id.",
1157
+ isPlaceable: true,
1158
+ example: {
1159
+ component: "FormControl",
1160
+ props: {
1161
+ required: true,
1162
+ fullWidth: true
1163
+ },
1164
+ children: [node("Flex", {
1165
+ flexDirection: "column",
1166
+ gap: 1,
1167
+ alignItems: "flex-start"
1168
+ }, [
1169
+ node("FormLabel", {}, ["Email"]),
1170
+ node("TextInput", {
1171
+ variant: "outlined",
1172
+ placeholder: "me@example.com"
1173
+ }),
1174
+ node("FormHelperText", {}, ["We'll never share it."])
1175
+ ])]
1176
+ },
1177
+ variants: [],
1178
+ options: {
1179
+ error: {
1180
+ values: [true, false],
1181
+ default: false
1182
+ },
1183
+ disabled: {
1184
+ values: [true, false],
1185
+ default: false
1186
+ },
1187
+ required: {
1188
+ values: [true, false],
1189
+ default: false
1190
+ },
1191
+ fullWidth: {
1192
+ values: [true, false],
1193
+ default: false
1194
+ },
1195
+ size: {
1196
+ scale: "sizes",
1197
+ default: "md"
1198
+ },
1199
+ color: {
1200
+ scale: "palette",
1201
+ default: "primary"
1202
+ },
1203
+ textColor: { scale: "text" }
1204
+ },
1205
+ content: { children: "children" },
1206
+ preview: { width: 320 }
1207
+ });
1208
+ //#endregion
1209
+ //#region src/FormHelperText/FormHelperText.catalog.ts
1210
+ const formHelperTextCatalog = defineCatalogEntry()({
1211
+ summary: "Hint or error text under a field, read by assistive tech as the control's description.",
1212
+ isPlaceable: false,
1213
+ example: {
1214
+ component: "FormHelperText",
1215
+ props: {},
1216
+ children: ["We'll never share it."]
1217
+ },
1218
+ variants: [],
1219
+ options: {
1220
+ error: {
1221
+ values: [true, false],
1222
+ default: false
1223
+ },
1224
+ color: {
1225
+ scale: "text",
1226
+ default: "secondary"
1227
+ }
1228
+ },
1229
+ content: { children: "children" }
1230
+ });
1231
+ //#endregion
1232
+ //#region src/FormLabel/FormLabel.catalog.ts
1233
+ const formLabelCatalog = defineCatalogEntry()({
1234
+ summary: "A field's label, linked to its control - and marked required - through `FormControl`.",
1235
+ isPlaceable: false,
1236
+ example: {
1237
+ component: "FormLabel",
1238
+ props: {},
1239
+ children: ["Email"]
1240
+ },
1241
+ variants: [],
1242
+ options: {
1243
+ required: {
1244
+ values: [true, false],
1245
+ default: false
1246
+ },
1247
+ color: { scale: "text" }
1248
+ },
1249
+ content: { children: "children" }
1250
+ });
1251
+ //#endregion
1252
+ //#region src/Grid/Grid.catalog.ts
1253
+ const gridAutoFlowValues = [
1254
+ "row",
1255
+ "column",
1256
+ "dense",
1257
+ "row dense",
1258
+ "column dense"
1259
+ ];
1260
+ const gridJustifyContentValues = [
1261
+ "normal",
1262
+ "start",
1263
+ "end",
1264
+ "center",
1265
+ "stretch",
1266
+ "space-between",
1267
+ "space-around",
1268
+ "space-evenly"
1269
+ ];
1270
+ const gridAlignItemsValues = [
1271
+ "normal",
1272
+ "start",
1273
+ "end",
1274
+ "center",
1275
+ "stretch",
1276
+ "baseline"
1277
+ ];
1278
+ const gridAlignContentValues = [
1279
+ "normal",
1280
+ "start",
1281
+ "end",
1282
+ "center",
1283
+ "stretch",
1284
+ "space-between",
1285
+ "space-around",
1286
+ "space-evenly"
1287
+ ];
1288
+ const gridJustifyItemsValues = [
1289
+ "normal",
1290
+ "start",
1291
+ "end",
1292
+ "center",
1293
+ "stretch"
1294
+ ];
1295
+ const cells = [
1296
+ "A",
1297
+ "B",
1298
+ "C",
1299
+ "D"
1300
+ ].map((label) => node("Flex", {
1301
+ p: 2,
1302
+ bg: "secondary",
1303
+ borderRadius: "sm",
1304
+ alignItems: "center",
1305
+ justifyContent: "center"
1306
+ }, [label]));
1307
+ const gridCatalog = defineCatalogEntry()({
1308
+ summary: "A CSS grid container - columns and rows from raw track strings, gaps from the theme.",
1309
+ isPlaceable: true,
1310
+ example: {
1311
+ component: "Grid",
1312
+ props: {
1313
+ gridTemplateColumns: "1fr 1fr",
1314
+ gap: 2
1315
+ },
1316
+ children: cells
1317
+ },
1318
+ variants: [],
1319
+ options: {
1320
+ gridAutoFlow: {
1321
+ values: gridAutoFlowValues,
1322
+ default: "row"
1323
+ },
1324
+ justifyContent: { values: gridJustifyContentValues },
1325
+ alignItems: { values: gridAlignItemsValues },
1326
+ alignContent: { values: gridAlignContentValues },
1327
+ justifyItems: { values: gridJustifyItemsValues },
1328
+ gap: { scale: "space" },
1329
+ columnGap: { scale: "space" },
1330
+ rowGap: { scale: "space" }
1331
+ },
1332
+ content: { children: "children" },
1333
+ preview: { width: 320 }
1334
+ });
1335
+ //#endregion
1336
+ //#region src/Icon/Icon.catalog.ts
1337
+ const iconNameValues = [
1338
+ "hub",
1339
+ "code",
1340
+ "terminal",
1341
+ "database",
1342
+ "psychology",
1343
+ "smart_toy",
1344
+ "account_tree",
1345
+ "analytics",
1346
+ "check",
1347
+ "close",
1348
+ "menu",
1349
+ "warning"
1350
+ ];
1351
+ const pictured$1 = [
1352
+ "primary",
1353
+ "secondary",
1354
+ "initial"
1355
+ ];
1356
+ const colorLabels$3 = {
1357
+ primary: "Primary",
1358
+ secondary: "Secondary",
1359
+ initial: "Initial"
1360
+ };
1361
+ const iconCatalog = defineCatalogEntry()({
1362
+ summary: "A square SVG icon from the registry, colored from the theme text tokens.",
1363
+ isPlaceable: true,
1364
+ example: {
1365
+ component: "Icon",
1366
+ props: {
1367
+ name: "hub",
1368
+ color: "primary",
1369
+ size: "3rem"
1370
+ },
1371
+ children: []
1372
+ },
1373
+ variants: pictured$1.map((color) => ({
1374
+ name: color,
1375
+ label: colorLabels$3[color],
1376
+ example: {
1377
+ component: "Icon",
1378
+ props: {
1379
+ name: "hub",
1380
+ color,
1381
+ size: "3rem"
1382
+ },
1383
+ children: []
1384
+ }
1385
+ })),
1386
+ options: {
1387
+ name: { values: iconNameValues },
1388
+ color: {
1389
+ scale: "text",
1390
+ default: "primary"
1391
+ },
1392
+ size: { default: "1.5rem" }
1393
+ },
1394
+ content: {}
1395
+ });
1396
+ //#endregion
1397
+ //#region src/Image/Image.catalog.ts
1398
+ const imageObjectFitValues = [
1399
+ "cover",
1400
+ "contain",
1401
+ "fill",
1402
+ "none",
1403
+ "scale-down"
1404
+ ];
1405
+ const fitLabels = {
1406
+ cover: "Cover",
1407
+ contain: "Contain",
1408
+ fill: "Fill",
1409
+ none: "None",
1410
+ "scale-down": "Scale down"
1411
+ };
1412
+ const picture = {
1413
+ src: "/soroush.svg",
1414
+ alt: "Logo",
1415
+ width: "200px",
1416
+ height: "200px"
1417
+ };
1418
+ const imageCatalog = defineCatalogEntry()({
1419
+ summary: "An image with an optional fallback source, sized and fitted through props.",
1420
+ isPlaceable: true,
1421
+ example: {
1422
+ component: "Image",
1423
+ props: {
1424
+ ...picture,
1425
+ objectFit: "contain"
1426
+ },
1427
+ children: []
1428
+ },
1429
+ variants: imageObjectFitValues.map((objectFit) => ({
1430
+ name: objectFit,
1431
+ label: fitLabels[objectFit],
1432
+ example: {
1433
+ component: "Image",
1434
+ props: {
1435
+ ...picture,
1436
+ objectFit
1437
+ },
1438
+ children: []
1439
+ }
1440
+ })),
1441
+ options: {
1442
+ objectFit: { values: imageObjectFitValues },
1443
+ borderRadius: { scale: "radii" }
1444
+ },
1445
+ content: {}
1446
+ });
1447
+ //#endregion
1448
+ //#region src/LinearProgress/LinearProgress.catalog.ts
1449
+ const linearProgressVariantValues = [
1450
+ "indeterminate",
1451
+ "determinate",
1452
+ "query"
1453
+ ];
1454
+ const linearProgressEasingValues = [
1455
+ "linear",
1456
+ "ease",
1457
+ "ease-in",
1458
+ "ease-out",
1459
+ "ease-in-out"
1460
+ ];
1461
+ const variantLabels$11 = {
1462
+ indeterminate: "Indeterminate",
1463
+ determinate: "Determinate",
1464
+ query: "Query"
1465
+ };
1466
+ const variantProps = {
1467
+ indeterminate: { variant: "indeterminate" },
1468
+ determinate: {
1469
+ variant: "determinate",
1470
+ value: 70
1471
+ },
1472
+ query: { variant: "query" }
1473
+ };
1474
+ const linearProgressCatalog = defineCatalogEntry()({
1475
+ summary: "A horizontal loading bar - looping, driven by a `value`, or with a buffer behind it.",
1476
+ isPlaceable: true,
1477
+ example: {
1478
+ component: "LinearProgress",
1479
+ props: {
1480
+ variant: "indeterminate",
1481
+ color: "primary"
1482
+ },
1483
+ children: []
1484
+ },
1485
+ variants: linearProgressVariantValues.map((variant) => ({
1486
+ name: variant,
1487
+ label: variantLabels$11[variant],
1488
+ example: {
1489
+ component: "LinearProgress",
1490
+ props: {
1491
+ ...variantProps[variant],
1492
+ color: "primary"
1493
+ },
1494
+ children: []
1495
+ }
1496
+ })),
1497
+ options: {
1498
+ variant: {
1499
+ values: linearProgressVariantValues,
1500
+ default: "indeterminate"
1501
+ },
1502
+ color: {
1503
+ scale: "palette",
1504
+ default: "primary"
1505
+ },
1506
+ thickness: { default: 4 },
1507
+ buffer: {
1508
+ values: [true, false],
1509
+ default: false
1510
+ },
1511
+ min: { default: 0 },
1512
+ max: { default: 100 },
1513
+ spinning: {
1514
+ values: [true, false],
1515
+ default: false
1516
+ },
1517
+ easing: {
1518
+ values: linearProgressEasingValues,
1519
+ default: "linear"
1520
+ },
1521
+ showTrack: {
1522
+ values: [true, false],
1523
+ default: true
1524
+ },
1525
+ round: {
1526
+ values: [true, false],
1527
+ default: false
1528
+ }
1529
+ },
1530
+ content: {},
1531
+ preview: { width: 240 }
1532
+ });
1533
+ //#endregion
1534
+ //#region src/Link/Link.catalog.ts
1535
+ const linkUnderlineValues = [
1536
+ "always",
1537
+ "hover",
1538
+ "none"
1539
+ ];
1540
+ const linkTargetValues = [
1541
+ "_self",
1542
+ "_blank",
1543
+ "_parent",
1544
+ "_top",
1545
+ "_unfencedTop"
1546
+ ];
1547
+ const underlineLabels = {
1548
+ always: "Underlined",
1549
+ hover: "Underline on hover",
1550
+ none: "No underline"
1551
+ };
1552
+ const label = "Visit the design system docs";
1553
+ const linkCatalog = defineCatalogEntry()({
1554
+ summary: "A text link to a URL, underlined always, on hover or never.",
1555
+ isPlaceable: true,
1556
+ example: {
1557
+ component: "Link",
1558
+ props: { href: "#" },
1559
+ children: [label]
1560
+ },
1561
+ variants: linkUnderlineValues.map((underline) => ({
1562
+ name: underline,
1563
+ label: underlineLabels[underline],
1564
+ example: {
1565
+ component: "Link",
1566
+ props: {
1567
+ href: "#",
1568
+ underline
1569
+ },
1570
+ children: [label]
1571
+ }
1572
+ })),
1573
+ options: {
1574
+ underline: {
1575
+ values: linkUnderlineValues,
1576
+ default: "always"
1577
+ },
1578
+ color: {
1579
+ scale: "text",
1580
+ default: "primary"
1581
+ },
1582
+ variant: {
1583
+ scale: "typography",
1584
+ default: "inherit"
1585
+ },
1586
+ target: {
1587
+ values: linkTargetValues,
1588
+ default: "_self"
1589
+ }
1590
+ },
1591
+ content: { children: "children" },
1592
+ domEvents: ["onClick"]
1593
+ });
1594
+ const menuCatalog = defineCatalogEntry()({
1595
+ summary: "A trigger and the `MenuList` of commands it opens - not modal, placed by the trigger.",
1596
+ isPlaceable: false,
1597
+ example: {
1598
+ component: "Menu",
1599
+ props: {},
1600
+ children: [
1601
+ node("MenuItem", { value: "new" }, ["New branch..."]),
1602
+ node("MenuItem", {
1603
+ value: "checkout",
1604
+ disabled: true,
1605
+ note: "Coming later"
1606
+ }, ["Checkout tag or revision..."]),
1607
+ node("MenuDivider"),
1608
+ node("MenuItem", { value: "rename" }, ["Rename..."]),
1609
+ node("MenuItem", { value: "delete" }, ["Delete"])
1610
+ ]
1611
+ },
1612
+ variants: [],
1613
+ options: {
1614
+ align: {
1615
+ values: ["start", "end"],
1616
+ default: "start"
1617
+ },
1618
+ color: {
1619
+ scale: "palette",
1620
+ default: "primary"
1621
+ },
1622
+ textColor: { scale: "text" },
1623
+ size: {
1624
+ scale: "sizes",
1625
+ default: "md"
1626
+ },
1627
+ dense: {
1628
+ values: [true, false],
1629
+ default: false
1630
+ },
1631
+ elevation: {
1632
+ values: [
1633
+ 0,
1634
+ 1,
1635
+ 2,
1636
+ 4,
1637
+ 8,
1638
+ 16,
1639
+ 24
1640
+ ],
1641
+ default: 8
1642
+ },
1643
+ layer: { scale: "zOrder" },
1644
+ marginThreshold: { scale: "space" },
1645
+ defaultOpen: {
1646
+ values: [true, false],
1647
+ default: false
1648
+ }
1649
+ },
1650
+ content: {
1651
+ children: "children",
1652
+ trigger: "child",
1653
+ emptyLabel: "text",
1654
+ items: "none"
1655
+ },
1656
+ domEvents: ["onSelect", "onClose"]
1657
+ });
1658
+ //#endregion
1659
+ //#region src/Menu/MenuDivider/MenuDivider.catalog.ts
1660
+ const menuDividerCatalog = defineCatalogEntry()({
1661
+ summary: "A line between groups of rows in a `MenuList`.",
1662
+ isPlaceable: false,
1663
+ example: {
1664
+ component: "MenuDivider",
1665
+ props: {},
1666
+ children: []
1667
+ },
1668
+ variants: [],
1669
+ options: {},
1670
+ content: {}
1671
+ });
1672
+ const menuItemCatalog = defineCatalogEntry()({
1673
+ summary: "One row - an option of a `Select`'s list, or a command of a `MenuList` with an icon, a shortcut and a submenu.",
1674
+ isPlaceable: false,
1675
+ example: {
1676
+ component: "MenuItem",
1677
+ props: { value: "web" },
1678
+ children: ["Web"]
1679
+ },
1680
+ variants: [],
1681
+ options: {
1682
+ role: {
1683
+ values: [
1684
+ "menuitem",
1685
+ "menuitemradio",
1686
+ "menuitemcheckbox"
1687
+ ],
1688
+ default: "menuitem"
1689
+ },
1690
+ color: {
1691
+ scale: "palette",
1692
+ default: "primary"
1693
+ },
1694
+ textColor: { scale: "text" },
1695
+ size: {
1696
+ scale: "sizes",
1697
+ default: "md"
1698
+ },
1699
+ disabled: {
1700
+ values: [true, false],
1701
+ default: false
1702
+ },
1703
+ selected: {
1704
+ values: [true, false],
1705
+ default: false
1706
+ },
1707
+ highlighted: {
1708
+ values: [true, false],
1709
+ default: false
1710
+ },
1711
+ multiple: {
1712
+ values: [true, false],
1713
+ default: false
1714
+ },
1715
+ dense: {
1716
+ values: [true, false],
1717
+ default: false
1718
+ },
1719
+ disableGutters: {
1720
+ values: [true, false],
1721
+ default: false
1722
+ },
1723
+ divider: {
1724
+ values: [true, false],
1725
+ default: false
1726
+ }
1727
+ },
1728
+ content: {
1729
+ children: "children",
1730
+ startIcon: "child",
1731
+ shortcut: "text",
1732
+ note: "text",
1733
+ submenu: "children"
1734
+ },
1735
+ domEvents: ["onClick"]
1736
+ });
1737
+ //#endregion
1738
+ //#region src/Menu/MenuItems/MenuItems.catalog.ts
1739
+ const menuItemsCatalog = defineCatalogEntry()({
1740
+ summary: "A `MenuList`'s rows from data - rows, dividers and submenus as entries.",
1741
+ isPlaceable: false,
1742
+ example: {
1743
+ component: "MenuItems",
1744
+ props: {},
1745
+ children: []
1746
+ },
1747
+ variants: [],
1748
+ options: {},
1749
+ content: {}
1750
+ });
1751
+ //#endregion
1752
+ //#region src/Menu/MenuList/MenuList.catalog.ts
1753
+ const menuListCatalog = defineCatalogEntry()({
1754
+ summary: "A `role=\"menu\"` list of `MenuItem` commands that owns the keyboard.",
1755
+ isPlaceable: true,
1756
+ example: {
1757
+ component: "MenuList",
1758
+ props: { "aria-label": "Branch" },
1759
+ children: [
1760
+ node("MenuItem", { value: "new" }, ["New branch..."]),
1761
+ node("MenuItem", {
1762
+ value: "checkout",
1763
+ disabled: true,
1764
+ note: "Coming later"
1765
+ }, ["Checkout tag or revision..."]),
1766
+ node("MenuDivider"),
1767
+ node("MenuItem", { value: "rename" }, ["Rename..."]),
1768
+ node("MenuItem", { value: "delete" }, ["Delete"])
1769
+ ]
1770
+ },
1771
+ variants: [],
1772
+ options: {
1773
+ color: {
1774
+ scale: "palette",
1775
+ default: "primary"
1776
+ },
1777
+ textColor: { scale: "text" },
1778
+ size: {
1779
+ scale: "sizes",
1780
+ default: "md"
1781
+ },
1782
+ dense: {
1783
+ values: [true, false],
1784
+ default: false
1785
+ },
1786
+ shouldWrap: {
1787
+ values: [true, false],
1788
+ default: true
1789
+ },
1790
+ shouldAutoFocus: {
1791
+ values: [true, false],
1792
+ default: false
1793
+ }
1794
+ },
1795
+ content: { children: "children" },
1796
+ domEvents: ["onSelect"],
1797
+ preview: { width: 220 }
1798
+ });
1799
+ //#endregion
1800
+ //#region src/Modal/Modal.catalog.ts
1801
+ const modalScrollValues = ["paper", "body"];
1802
+ const dialog = node("Paper", {
1803
+ role: "dialog",
1804
+ "aria-modal": "true",
1805
+ "aria-label": "Example dialog",
1806
+ p: 4,
1807
+ width: "320px"
1808
+ }, [node("Flex", {
1809
+ flexDirection: "column",
1810
+ gap: 3
1811
+ }, [node("Typography", {
1812
+ variant: "h5",
1813
+ m: 0
1814
+ }, ["Modal title"]), node("Typography", {
1815
+ variant: "body2",
1816
+ color: "secondary",
1817
+ m: 0
1818
+ }, ["Press Escape or click the backdrop to close."])])]);
1819
+ const modalCatalog = defineCatalogEntry()({
1820
+ summary: "An overlay that dims the page, holds focus inside its content and closes on Escape or a backdrop click.",
1821
+ isPlaceable: true,
1822
+ example: {
1823
+ component: "Modal",
1824
+ props: { isOpen: true },
1825
+ children: [dialog]
1826
+ },
1827
+ variants: [],
1828
+ options: {
1829
+ isOpen: { values: [true, false] },
1830
+ scroll: {
1831
+ values: modalScrollValues,
1832
+ default: "paper"
1833
+ },
1834
+ layer: {
1835
+ scale: "zOrder",
1836
+ default: "modal"
1837
+ },
1838
+ hasBackdrop: {
1839
+ values: [true, false],
1840
+ default: true
1841
+ },
1842
+ shouldKeepMounted: {
1843
+ values: [true, false],
1844
+ default: false
1845
+ },
1846
+ shouldUsePortal: {
1847
+ values: [true, false],
1848
+ default: true
1849
+ },
1850
+ shouldLockScroll: {
1851
+ values: [true, false],
1852
+ default: true
1853
+ },
1854
+ disableAriaHidden: {
1855
+ values: [true, false],
1856
+ default: false
1857
+ },
1858
+ shouldAutoFocus: {
1859
+ values: [true, false],
1860
+ default: true
1861
+ },
1862
+ shouldTrapFocus: {
1863
+ values: [true, false],
1864
+ default: true
1865
+ },
1866
+ shouldEnforceFocus: {
1867
+ values: [true, false],
1868
+ default: true
1869
+ },
1870
+ shouldRestoreFocus: {
1871
+ values: [true, false],
1872
+ default: true
1873
+ }
1874
+ },
1875
+ content: { children: "children" },
1876
+ domEvents: ["onClose"],
1877
+ preview: {
1878
+ width: 480,
1879
+ height: 320
1880
+ }
1881
+ });
1882
+ //#endregion
1883
+ //#region src/NativeSelect/NativeSelect.catalog.ts
1884
+ const nativeSelectVariantValues = [
1885
+ "default",
1886
+ "outlined",
1887
+ "text",
1888
+ "underline"
1889
+ ];
1890
+ const variantLabels$10 = {
1891
+ default: "Filled",
1892
+ outlined: "Outlined",
1893
+ text: "Text",
1894
+ underline: "Underline"
1895
+ };
1896
+ const platforms$2 = [
1897
+ {
1898
+ label: "Web",
1899
+ value: "web"
1900
+ },
1901
+ {
1902
+ label: "Android",
1903
+ value: "android"
1904
+ },
1905
+ {
1906
+ label: "iOS",
1907
+ value: "ios"
1908
+ }
1909
+ ];
1910
+ const nativeSelectCatalog = defineCatalogEntry()({
1911
+ summary: "The platform select picker, its choices given as an `options` list of labels and values.",
1912
+ isPlaceable: true,
1913
+ example: {
1914
+ component: "NativeSelect",
1915
+ props: {
1916
+ options: platforms$2,
1917
+ placeholder: "Pick a platform",
1918
+ variant: "outlined"
1919
+ },
1920
+ children: []
1921
+ },
1922
+ variants: nativeSelectVariantValues.map((variant) => ({
1923
+ name: variant,
1924
+ label: variantLabels$10[variant],
1925
+ example: {
1926
+ component: "NativeSelect",
1927
+ props: {
1928
+ options: platforms$2,
1929
+ placeholder: "Pick a platform",
1930
+ variant
1931
+ },
1932
+ children: []
1933
+ }
1934
+ })),
1935
+ options: {
1936
+ variant: {
1937
+ values: nativeSelectVariantValues,
1938
+ default: "default"
1939
+ },
1940
+ color: {
1941
+ scale: "palette",
1942
+ default: "primary"
1943
+ },
1944
+ textColor: {
1945
+ scale: "text",
1946
+ default: "primary"
1947
+ },
1948
+ bg: {
1949
+ scale: "background",
1950
+ default: "terminal"
1951
+ },
1952
+ size: {
1953
+ scale: "sizes",
1954
+ default: "md"
1955
+ },
1956
+ borderRadius: { scale: "radii" },
1957
+ disabled: {
1958
+ values: [true, false],
1959
+ default: false
1960
+ },
1961
+ error: {
1962
+ values: [true, false],
1963
+ default: false
1964
+ },
1965
+ required: {
1966
+ values: [true, false],
1967
+ default: false
1968
+ },
1969
+ fullWidth: {
1970
+ values: [true, false],
1971
+ default: false
1972
+ }
1973
+ },
1974
+ content: { placeholder: "text" },
1975
+ twoWay: {
1976
+ prop: "value",
1977
+ event: "onChange",
1978
+ read: "argument"
1979
+ },
1980
+ preview: { width: 220 }
1981
+ });
1982
+ //#endregion
1983
+ //#region src/Pagination/Pagination.catalog.ts
1984
+ const paginationVariantValues = ["text", "outlined"];
1985
+ const paginationShapeValues = ["circular", "rounded"];
1986
+ const variantLabels$9 = {
1987
+ text: "Text",
1988
+ outlined: "Outlined"
1989
+ };
1990
+ const paginationCatalog = defineCatalogEntry()({
1991
+ summary: "Page numbers with previous and next controls, for moving through paged content.",
1992
+ isPlaceable: true,
1993
+ example: {
1994
+ component: "Pagination",
1995
+ props: { count: 10 },
1996
+ children: []
1997
+ },
1998
+ variants: paginationVariantValues.map((variant) => ({
1999
+ name: variant,
2000
+ label: variantLabels$9[variant],
2001
+ example: {
2002
+ component: "Pagination",
2003
+ props: {
2004
+ count: 10,
2005
+ variant
2006
+ },
2007
+ children: []
2008
+ }
2009
+ })),
2010
+ options: {
2011
+ variant: {
2012
+ values: paginationVariantValues,
2013
+ default: "text"
2014
+ },
2015
+ shape: {
2016
+ values: paginationShapeValues,
2017
+ default: "circular"
2018
+ },
2019
+ color: {
2020
+ scale: "palette",
2021
+ default: "primary"
2022
+ },
2023
+ size: {
2024
+ scale: "sizes",
2025
+ default: "md"
2026
+ },
2027
+ disabled: {
2028
+ values: [true, false],
2029
+ default: false
2030
+ },
2031
+ shouldShowFirstButton: {
2032
+ values: [true, false],
2033
+ default: false
2034
+ },
2035
+ shouldShowLastButton: {
2036
+ values: [true, false],
2037
+ default: false
2038
+ },
2039
+ shouldHidePrevButton: {
2040
+ values: [true, false],
2041
+ default: false
2042
+ },
2043
+ shouldHideNextButton: {
2044
+ values: [true, false],
2045
+ default: false
2046
+ }
2047
+ },
2048
+ content: { getItemAriaLabel: "none" },
2049
+ twoWay: {
2050
+ prop: "page",
2051
+ event: "onChange",
2052
+ read: "argument"
2053
+ }
2054
+ });
2055
+ const paginationItemCatalog = defineCatalogEntry()({
2056
+ summary: "One item of a `Pagination` - a page number, a previous/next/first/last control or an ellipsis.",
2057
+ isPlaceable: false,
2058
+ example: {
2059
+ component: "PaginationItem",
2060
+ props: {
2061
+ type: "page",
2062
+ page: 1
2063
+ },
2064
+ children: []
2065
+ },
2066
+ variants: [],
2067
+ options: {
2068
+ type: {
2069
+ values: [
2070
+ "page",
2071
+ "first",
2072
+ "previous",
2073
+ "next",
2074
+ "last",
2075
+ "start-ellipsis",
2076
+ "end-ellipsis"
2077
+ ],
2078
+ default: "page"
2079
+ },
2080
+ isSelected: {
2081
+ values: [true, false],
2082
+ default: false
2083
+ },
2084
+ variant: {
2085
+ values: ["text", "outlined"],
2086
+ default: "text"
2087
+ },
2088
+ shape: {
2089
+ values: ["circular", "rounded"],
2090
+ default: "circular"
2091
+ },
2092
+ color: {
2093
+ scale: "palette",
2094
+ default: "primary"
2095
+ },
2096
+ size: {
2097
+ scale: "sizes",
2098
+ default: "md"
2099
+ },
2100
+ disabled: {
2101
+ values: [true, false],
2102
+ default: false
2103
+ }
2104
+ },
2105
+ content: { page: "text" },
2106
+ domEvents: ["onClick"]
2107
+ });
2108
+ //#endregion
2109
+ //#region src/Paper/Paper.catalog.ts
2110
+ const paperCatalog = defineCatalogEntry()({
2111
+ summary: "A plain raised surface with a theme shadow, background and radius.",
2112
+ isPlaceable: true,
2113
+ example: {
2114
+ component: "Paper",
2115
+ props: {
2116
+ elevation: 1,
2117
+ p: 3,
2118
+ width: "320px"
2119
+ },
2120
+ children: ["A surface with default elevation, background, and border radius."]
2121
+ },
2122
+ variants: [],
2123
+ options: {
2124
+ elevation: {
2125
+ values: [
2126
+ 0,
2127
+ 1,
2128
+ 2,
2129
+ 4,
2130
+ 8,
2131
+ 16,
2132
+ 24
2133
+ ],
2134
+ default: 1
2135
+ },
2136
+ bg: {
2137
+ scale: "background",
2138
+ default: "paper"
2139
+ },
2140
+ borderRadius: {
2141
+ scale: "radii",
2142
+ default: "sq"
2143
+ },
2144
+ borderColor: { scale: "border" },
2145
+ borderWidth: { scale: "borderWidths" },
2146
+ p: {
2147
+ scale: "space",
2148
+ default: 2
2149
+ }
2150
+ },
2151
+ content: { children: "children" }
2152
+ });
2153
+ const popoverCatalog = defineCatalogEntry()({
2154
+ summary: "A surface shown next to an anchor element, closed on Escape or a click outside.",
2155
+ isPlaceable: false,
2156
+ example: {
2157
+ component: "Popover",
2158
+ props: { open: false },
2159
+ children: [node("View", { p: 3 }, [node("Typography", { variant: "body2" }, ["Popover content"])])]
2160
+ },
2161
+ variants: [],
2162
+ options: {
2163
+ open: { values: [true, false] },
2164
+ anchorReference: {
2165
+ values: [
2166
+ "anchorEl",
2167
+ "anchorPosition",
2168
+ "none"
2169
+ ],
2170
+ default: "anchorEl"
2171
+ },
2172
+ elevation: {
2173
+ values: [
2174
+ 0,
2175
+ 1,
2176
+ 2,
2177
+ 4,
2178
+ 8,
2179
+ 16,
2180
+ 24
2181
+ ],
2182
+ default: 8
2183
+ },
2184
+ marginThreshold: {
2185
+ scale: "space",
2186
+ default: 2
2187
+ },
2188
+ layer: {
2189
+ scale: "zOrder",
2190
+ default: "modal"
2191
+ },
2192
+ hasBackdrop: {
2193
+ values: [true, false],
2194
+ default: false
2195
+ },
2196
+ disableScrollLock: {
2197
+ values: [true, false],
2198
+ default: false
2199
+ },
2200
+ disableAriaHidden: {
2201
+ values: [true, false],
2202
+ default: false
2203
+ },
2204
+ shouldAutoFocus: {
2205
+ values: [true, false],
2206
+ default: true
2207
+ },
2208
+ shouldTrapFocus: {
2209
+ values: [true, false],
2210
+ default: true
2211
+ },
2212
+ shouldEnforceFocus: {
2213
+ values: [true, false],
2214
+ default: true
2215
+ },
2216
+ shouldRestoreFocus: {
2217
+ values: [true, false],
2218
+ default: true
2219
+ },
2220
+ shouldKeepMounted: {
2221
+ values: [true, false],
2222
+ default: false
2223
+ }
2224
+ },
2225
+ content: { children: "children" },
2226
+ domEvents: ["onClose"]
2227
+ });
2228
+ //#endregion
2229
+ //#region src/Portal/Portal.catalog.ts
2230
+ const portalCatalog = defineCatalogEntry()({
2231
+ summary: "Renders its children into another DOM node - the document body by default.",
2232
+ isPlaceable: false,
2233
+ example: {
2234
+ component: "Portal",
2235
+ props: {},
2236
+ children: [node("View", { p: 3 }, ["Portaled content"])]
2237
+ },
2238
+ variants: [],
2239
+ options: {},
2240
+ content: { children: "children" }
2241
+ });
2242
+ const pressableCatalog = defineCatalogEntry()({
2243
+ summary: "An unstyled clickable surface - button semantics around any content, with no looks of its own.",
2244
+ isPlaceable: true,
2245
+ example: {
2246
+ component: "Pressable",
2247
+ props: {},
2248
+ children: ["Press me"]
2249
+ },
2250
+ variants: [],
2251
+ options: {
2252
+ as: {
2253
+ values: [
2254
+ "div",
2255
+ "button",
2256
+ "span"
2257
+ ],
2258
+ default: "div"
2259
+ },
2260
+ feedback: {
2261
+ values: [
2262
+ "none",
2263
+ "opacity",
2264
+ "highlight"
2265
+ ],
2266
+ default: "none"
2267
+ },
2268
+ color: {
2269
+ scale: "palette",
2270
+ default: "primary"
2271
+ },
2272
+ activeOpacity: { default: .7 },
2273
+ disabled: {
2274
+ values: [true, false],
2275
+ default: false
2276
+ },
2277
+ borderRadius: { scale: "radii" }
2278
+ },
2279
+ content: { children: "children" },
2280
+ domEvents: ["onClick"]
2281
+ });
2282
+ //#endregion
2283
+ //#region src/Quote/Quote.catalog.ts
2284
+ const quoteCatalog = defineCatalogEntry()({
2285
+ summary: "A block set off by a primary left border, for quotes and terminal readouts.",
2286
+ isPlaceable: true,
2287
+ example: {
2288
+ component: "Quote",
2289
+ props: {
2290
+ bg: "terminal",
2291
+ p: 3
2292
+ },
2293
+ children: [node("Typography", {
2294
+ variant: "body1",
2295
+ color: "secondary",
2296
+ m: 0
2297
+ }, ["A View with a 2px primary left border - for terminal readouts and markdown blockquotes."])]
2298
+ },
2299
+ variants: [],
2300
+ options: {
2301
+ bg: { scale: "background" },
2302
+ borderRadius: { scale: "radii" }
2303
+ },
2304
+ content: { children: "children" },
2305
+ preview: { width: 360 }
2306
+ });
2307
+ //#endregion
2308
+ //#region src/Radio/Radio.catalog.ts
2309
+ const colorLabels$2 = {
2310
+ default: "Default",
2311
+ primary: "Primary",
2312
+ secondary: "Secondary",
2313
+ success: "Success",
2314
+ error: "Error",
2315
+ info: "Info",
2316
+ warning: "Warning"
2317
+ };
2318
+ const colors$2 = Object.keys(colorLabels$2);
2319
+ const radioCatalog = defineCatalogEntry()({
2320
+ summary: "One choice of a set - radios that share a `name` allow only one to be selected.",
2321
+ isPlaceable: true,
2322
+ example: {
2323
+ component: "Radio",
2324
+ props: {
2325
+ name: "option",
2326
+ value: "a"
2327
+ },
2328
+ children: ["Option A"]
2329
+ },
2330
+ variants: colors$2.map((color) => ({
2331
+ name: color,
2332
+ label: colorLabels$2[color],
2333
+ example: {
2334
+ component: "Radio",
2335
+ props: {
2336
+ name: "option",
2337
+ value: "a",
2338
+ color,
2339
+ checked: true
2340
+ },
2341
+ children: ["Option A"]
2342
+ }
2343
+ })),
2344
+ options: {
2345
+ color: {
2346
+ scale: "palette",
2347
+ default: "default"
2348
+ },
2349
+ size: {
2350
+ scale: "sizes",
2351
+ default: "md"
2352
+ },
2353
+ disabled: {
2354
+ values: [true, false],
2355
+ default: false
2356
+ },
2357
+ required: {
2358
+ values: [true, false],
2359
+ default: false
2360
+ }
2361
+ },
2362
+ content: {
2363
+ children: "children",
2364
+ icon: "child",
2365
+ checkedIcon: "child"
2366
+ },
2367
+ twoWay: {
2368
+ prop: "checked",
2369
+ event: "onChange",
2370
+ read: "target.checked"
2371
+ }
2372
+ });
2373
+ //#endregion
2374
+ //#region src/Select/Select.catalog.ts
2375
+ const selectVariantValues = [
2376
+ "default",
2377
+ "outlined",
2378
+ "text",
2379
+ "underline"
2380
+ ];
2381
+ const variantLabels$8 = {
2382
+ default: "Filled",
2383
+ outlined: "Outlined",
2384
+ text: "Text",
2385
+ underline: "Underline"
2386
+ };
2387
+ const platforms$1 = [
2388
+ node("MenuItem", { value: "web" }, ["Web"]),
2389
+ node("MenuItem", { value: "android" }, ["Android"]),
2390
+ node("MenuItem", { value: "ios" }, ["iOS"])
2391
+ ];
2392
+ const selectCatalog = defineCatalogEntry()({
2393
+ summary: "The select to use - a custom listbox of `MenuItem` options, or `native` for the platform picker.",
2394
+ isPlaceable: true,
2395
+ example: {
2396
+ component: "Select",
2397
+ props: {
2398
+ placeholder: "Pick a platform",
2399
+ variant: "outlined"
2400
+ },
2401
+ children: platforms$1
2402
+ },
2403
+ variants: selectVariantValues.map((variant) => ({
2404
+ name: variant,
2405
+ label: variantLabels$8[variant],
2406
+ example: {
2407
+ component: "Select",
2408
+ props: {
2409
+ placeholder: "Pick a platform",
2410
+ variant
2411
+ },
2412
+ children: platforms$1
2413
+ }
2414
+ })),
2415
+ options: {
2416
+ variant: {
2417
+ values: selectVariantValues,
2418
+ default: "default"
2419
+ },
2420
+ color: {
2421
+ scale: "palette",
2422
+ default: "primary"
2423
+ },
2424
+ textColor: { scale: "text" },
2425
+ bg: { scale: "background" },
2426
+ size: {
2427
+ scale: "sizes",
2428
+ default: "md"
2429
+ },
2430
+ borderRadius: { scale: "radii" },
2431
+ native: {
2432
+ values: [true, false],
2433
+ default: false
2434
+ },
2435
+ multiple: {
2436
+ values: [true, false],
2437
+ default: false
2438
+ },
2439
+ disabled: {
2440
+ values: [true, false],
2441
+ default: false
2442
+ },
2443
+ error: {
2444
+ values: [true, false],
2445
+ default: false
2446
+ },
2447
+ required: {
2448
+ values: [true, false],
2449
+ default: false
2450
+ },
2451
+ fullWidth: {
2452
+ values: [true, false],
2453
+ default: false
2454
+ }
2455
+ },
2456
+ content: {
2457
+ children: "children",
2458
+ placeholder: "text",
2459
+ renderValue: "none"
2460
+ },
2461
+ twoWay: {
2462
+ prop: "value",
2463
+ event: "onChange",
2464
+ read: "argument"
2465
+ },
2466
+ preview: { width: 220 }
2467
+ });
2468
+ //#endregion
2469
+ //#region src/Sidebar/Sidebar/Sidebar.catalog.ts
2470
+ const sidebarAnchorValues = ["left", "right"];
2471
+ const sidebarVariantValues = [
2472
+ "text",
2473
+ "outlined",
2474
+ "plain"
2475
+ ];
2476
+ const variantLabels$7 = {
2477
+ text: "Text",
2478
+ outlined: "Outlined",
2479
+ plain: "Plain"
2480
+ };
2481
+ const items = [
2482
+ node("SidebarItem", {
2483
+ icon: "folder",
2484
+ label: "Directory",
2485
+ isSelected: true
2486
+ }),
2487
+ node("SidebarItem", {
2488
+ icon: "history",
2489
+ label: "Gist history"
2490
+ }),
2491
+ node("SidebarItem", {
2492
+ icon: "edit_note",
2493
+ label: "Drafts"
2494
+ }),
2495
+ node("SidebarItem", {
2496
+ icon: "terminal",
2497
+ label: "Terminal console"
2498
+ })
2499
+ ];
2500
+ const content$1 = {
2501
+ isOpen: false,
2502
+ anchor: "left",
2503
+ "aria-label": "Editor panels"
2504
+ };
2505
+ const sidebarCatalog = defineCatalogEntry()({
2506
+ summary: "A collapsible navigation rail of `SidebarItem`s - icons only when closed, icons and labels when open.",
2507
+ isPlaceable: true,
2508
+ example: {
2509
+ component: "Sidebar",
2510
+ props: content$1,
2511
+ children: items
2512
+ },
2513
+ variants: sidebarVariantValues.map((variant) => ({
2514
+ name: variant,
2515
+ label: variantLabels$7[variant],
2516
+ example: {
2517
+ component: "Sidebar",
2518
+ props: {
2519
+ ...content$1,
2520
+ variant
2521
+ },
2522
+ children: items
2523
+ }
2524
+ })),
2525
+ options: {
2526
+ isOpen: { values: [true, false] },
2527
+ anchor: {
2528
+ values: sidebarAnchorValues,
2529
+ default: "left"
2530
+ },
2531
+ variant: {
2532
+ values: sidebarVariantValues,
2533
+ default: "text"
2534
+ },
2535
+ expandedWidth: { default: "14rem" },
2536
+ collapsedWidth: { default: "3.5rem" },
2537
+ hasPanel: {
2538
+ values: [true, false],
2539
+ default: false
2540
+ },
2541
+ panelWidth: { default: "18rem" },
2542
+ bg: { scale: "background" }
2543
+ },
2544
+ content: { children: "children" }
2545
+ });
2546
+ //#endregion
2547
+ //#region src/Sidebar/SidebarItem/SidebarItem.catalog.ts
2548
+ const sidebarItemVariantValues = [
2549
+ "text",
2550
+ "outlined",
2551
+ "plain"
2552
+ ];
2553
+ const variantLabels$6 = {
2554
+ text: "Text",
2555
+ outlined: "Outlined",
2556
+ plain: "Plain"
2557
+ };
2558
+ const content = {
2559
+ icon: "folder",
2560
+ label: "Directory"
2561
+ };
2562
+ const sidebarItemCatalog = defineCatalogEntry()({
2563
+ summary: "One entry of a `Sidebar` - an icon, with its label shown while the rail is open.",
2564
+ isPlaceable: false,
2565
+ example: {
2566
+ component: "SidebarItem",
2567
+ props: {
2568
+ ...content,
2569
+ variant: "text"
2570
+ },
2571
+ children: []
2572
+ },
2573
+ variants: sidebarItemVariantValues.map((variant) => ({
2574
+ name: variant,
2575
+ label: variantLabels$6[variant],
2576
+ example: {
2577
+ component: "SidebarItem",
2578
+ props: {
2579
+ ...content,
2580
+ variant
2581
+ },
2582
+ children: []
2583
+ }
2584
+ })),
2585
+ options: {
2586
+ variant: {
2587
+ values: sidebarItemVariantValues,
2588
+ default: "text"
2589
+ },
2590
+ size: {
2591
+ scale: "sizes",
2592
+ default: "sm"
2593
+ },
2594
+ color: {
2595
+ scale: "palette",
2596
+ default: "primary"
2597
+ },
2598
+ isSelected: {
2599
+ values: [true, false],
2600
+ default: false
2601
+ },
2602
+ disabled: {
2603
+ values: [true, false],
2604
+ default: false
2605
+ }
2606
+ },
2607
+ content: {
2608
+ children: "children",
2609
+ label: "text"
2610
+ },
2611
+ domEvents: ["onSelect", "onClick"]
2612
+ });
2613
+ //#endregion
2614
+ //#region src/Skeleton/Skeleton.catalog.ts
2615
+ const skeletonVariantValues = [
2616
+ "text",
2617
+ "circular",
2618
+ "rectangular"
2619
+ ];
2620
+ const skeletonAnimationValues = [
2621
+ "pulse",
2622
+ "wave",
2623
+ false
2624
+ ];
2625
+ const variantLabels$5 = {
2626
+ text: "Text",
2627
+ circular: "Circular",
2628
+ rectangular: "Rectangular"
2629
+ };
2630
+ const shapes = {
2631
+ text: { width: 240 },
2632
+ circular: {
2633
+ width: 64,
2634
+ height: 64
2635
+ },
2636
+ rectangular: {
2637
+ width: 240,
2638
+ height: 64
2639
+ }
2640
+ };
2641
+ const skeletonCatalog = defineCatalogEntry()({
2642
+ summary: "A placeholder shape shown while content loads - a text line, a circle or a block.",
2643
+ isPlaceable: true,
2644
+ example: {
2645
+ component: "Skeleton",
2646
+ props: {
2647
+ variant: "text",
2648
+ animation: "pulse",
2649
+ width: 240
2650
+ },
2651
+ children: []
2652
+ },
2653
+ variants: skeletonVariantValues.map((variant) => ({
2654
+ name: variant,
2655
+ label: variantLabels$5[variant],
2656
+ example: {
2657
+ component: "Skeleton",
2658
+ props: {
2659
+ variant,
2660
+ ...shapes[variant]
2661
+ },
2662
+ children: []
2663
+ }
2664
+ })),
2665
+ options: {
2666
+ variant: {
2667
+ values: skeletonVariantValues,
2668
+ default: "text"
2669
+ },
2670
+ animation: {
2671
+ values: skeletonAnimationValues,
2672
+ default: "pulse"
2673
+ },
2674
+ borderRadius: { scale: "radii" }
2675
+ },
2676
+ content: { children: "children" },
2677
+ preview: {
2678
+ width: 280,
2679
+ height: 80
2680
+ }
2681
+ });
2682
+ //#endregion
2683
+ //#region src/Switch/Switch.catalog.ts
2684
+ const switchVariantValues = ["outside", "inside"];
2685
+ const switchEdgeValues = [
2686
+ "start",
2687
+ "end",
2688
+ false
2689
+ ];
2690
+ const variantLabels$4 = {
2691
+ outside: "Outside thumb",
2692
+ inside: "Inside thumb"
2693
+ };
2694
+ const switchCatalog = defineCatalogEntry()({
2695
+ summary: "An on/off toggle with an optional label, its thumb over or inside the track.",
2696
+ isPlaceable: true,
2697
+ example: {
2698
+ component: "Switch",
2699
+ props: {},
2700
+ children: ["Enable dark mode"]
2701
+ },
2702
+ variants: switchVariantValues.map((variant) => ({
2703
+ name: variant,
2704
+ label: variantLabels$4[variant],
2705
+ example: {
2706
+ component: "Switch",
2707
+ props: { variant },
2708
+ children: ["Enable dark mode"]
2709
+ }
2710
+ })),
2711
+ options: {
2712
+ variant: {
2713
+ values: switchVariantValues,
2714
+ default: "outside"
2715
+ },
2716
+ color: {
2717
+ scale: "palette",
2718
+ default: "default"
2719
+ },
2720
+ bg: {
2721
+ scale: "background",
2722
+ default: "default"
2723
+ },
2724
+ size: {
2725
+ scale: "sizes",
2726
+ default: "md"
2727
+ },
2728
+ marked: {
2729
+ values: [true, false],
2730
+ default: false
2731
+ },
2732
+ edge: {
2733
+ values: switchEdgeValues,
2734
+ default: false
2735
+ },
2736
+ disabled: {
2737
+ values: [true, false],
2738
+ default: false
2739
+ },
2740
+ required: {
2741
+ values: [true, false],
2742
+ default: false
2743
+ }
2744
+ },
2745
+ content: {
2746
+ children: "children",
2747
+ icon: "child",
2748
+ checkedIcon: "child"
2749
+ },
2750
+ twoWay: {
2751
+ prop: "checked",
2752
+ event: "onChange",
2753
+ read: "target.checked"
2754
+ }
2755
+ });
2756
+ //#endregion
2757
+ //#region src/Tabs/TabPanel/TabPanel.catalog.ts
2758
+ const tabPanelCatalog = defineCatalogEntry()({
2759
+ summary: "The content a tab shows - inside a `TabContext`, shown while its tab is selected.",
2760
+ isPlaceable: false,
2761
+ example: {
2762
+ component: "TabPanel",
2763
+ props: { value: "layers" },
2764
+ children: [node("Typography", {}, ["Layers of the page."])]
2765
+ },
2766
+ variants: [],
2767
+ options: {
2768
+ shouldKeepMounted: {
2769
+ values: [true, false],
2770
+ default: false
2771
+ },
2772
+ bg: { scale: "background" },
2773
+ borderRadius: { scale: "radii" }
2774
+ },
2775
+ content: { children: "children" }
2776
+ });
2777
+ const tabCatalog = defineCatalogEntry()({
2778
+ summary: "One tab of a `Tabs` row - a label, an icon on any side, and an optional close button.",
2779
+ isPlaceable: false,
2780
+ example: {
2781
+ component: "Tab",
2782
+ props: {
2783
+ value: "canvas",
2784
+ label: "Canvas"
2785
+ },
2786
+ children: []
2787
+ },
2788
+ variants: [],
2789
+ options: {
2790
+ disabled: {
2791
+ values: [true, false],
2792
+ default: false
2793
+ },
2794
+ isWrapped: {
2795
+ values: [true, false],
2796
+ default: false
2797
+ },
2798
+ iconPosition: {
2799
+ values: [
2800
+ "top",
2801
+ "start",
2802
+ "end",
2803
+ "bottom"
2804
+ ],
2805
+ default: "top"
2806
+ },
2807
+ color: { scale: "palette" },
2808
+ textColor: { scale: "text" },
2809
+ size: { scale: "sizes" },
2810
+ bg: { scale: "background" },
2811
+ selectedBg: { scale: "background" },
2812
+ borderRadius: { scale: "radii" }
2813
+ },
2814
+ content: {
2815
+ label: "text",
2816
+ icon: "child",
2817
+ secondaryAction: "child"
2818
+ },
2819
+ domEvents: ["onClick"]
2820
+ });
2821
+ //#endregion
2822
+ //#region src/Tabs/Tabs/Tabs.catalog.ts
2823
+ const tabsVariantValues = [
2824
+ "underline",
2825
+ "boxed",
2826
+ "enclosed"
2827
+ ];
2828
+ const tabsOrientationValues = ["horizontal", "vertical"];
2829
+ const tabsOverflowBehaviorValues = [
2830
+ "scroll",
2831
+ "menu",
2832
+ "none"
2833
+ ];
2834
+ const tabsScrollButtonsValues = [
2835
+ "auto",
2836
+ "always",
2837
+ "never"
2838
+ ];
2839
+ const variantLabels$3 = {
2840
+ underline: "Underline",
2841
+ boxed: "Boxed",
2842
+ enclosed: "Enclosed"
2843
+ };
2844
+ const views = [
2845
+ node("Tab", {
2846
+ value: "canvas",
2847
+ label: "Canvas"
2848
+ }),
2849
+ node("Tab", {
2850
+ value: "system",
2851
+ label: "Design system"
2852
+ }),
2853
+ node("Tab", {
2854
+ value: "common",
2855
+ label: "Common components"
2856
+ })
2857
+ ];
2858
+ const tabsCatalog = defineCatalogEntry()({
2859
+ summary: "A row of `Tab`s - a tablist, or with `as=\"nav\"` a navigation.",
2860
+ isPlaceable: true,
2861
+ example: {
2862
+ component: "Tabs",
2863
+ props: {
2864
+ defaultValue: "canvas",
2865
+ "aria-label": "Views"
2866
+ },
2867
+ children: views
2868
+ },
2869
+ variants: tabsVariantValues.map((variant) => ({
2870
+ name: variant,
2871
+ label: variantLabels$3[variant],
2872
+ example: {
2873
+ component: "Tabs",
2874
+ props: {
2875
+ defaultValue: "canvas",
2876
+ variant,
2877
+ "aria-label": "Views"
2878
+ },
2879
+ children: views
2880
+ }
2881
+ })),
2882
+ options: {
2883
+ variant: {
2884
+ values: tabsVariantValues,
2885
+ default: "underline"
2886
+ },
2887
+ orientation: {
2888
+ values: tabsOrientationValues,
2889
+ default: "horizontal"
2890
+ },
2891
+ as: {
2892
+ values: ["div", "nav"],
2893
+ default: "div"
2894
+ },
2895
+ color: {
2896
+ scale: "palette",
2897
+ default: "primary"
2898
+ },
2899
+ textColor: { scale: "text" },
2900
+ size: {
2901
+ scale: "sizes",
2902
+ default: "md"
2903
+ },
2904
+ fullWidth: {
2905
+ values: [true, false],
2906
+ default: false
2907
+ },
2908
+ isCentered: {
2909
+ values: [true, false],
2910
+ default: false
2911
+ },
2912
+ shouldSelectOnFocus: {
2913
+ values: [true, false],
2914
+ default: false
2915
+ },
2916
+ overflowBehavior: {
2917
+ values: tabsOverflowBehaviorValues,
2918
+ default: "none"
2919
+ },
2920
+ scrollButtons: {
2921
+ values: tabsScrollButtonsValues,
2922
+ default: "auto"
2923
+ },
2924
+ shouldShowScrollButtonsOnMobile: {
2925
+ values: [true, false],
2926
+ default: false
2927
+ },
2928
+ hasVisibleScrollbar: {
2929
+ values: [true, false],
2930
+ default: false
2931
+ },
2932
+ hasDivider: { values: [true, false] },
2933
+ bg: { scale: "background" },
2934
+ selectedBg: { scale: "background" }
2935
+ },
2936
+ content: {
2937
+ children: "children",
2938
+ startContent: "children",
2939
+ endContent: "children",
2940
+ slots: "none"
2941
+ },
2942
+ twoWay: {
2943
+ prop: "value",
2944
+ event: "onChange",
2945
+ read: "argument"
2946
+ },
2947
+ domEvents: ["onTabClose"],
2948
+ preview: { width: 360 }
2949
+ });
2950
+ //#endregion
2951
+ //#region src/Tabs/TabContext/TabContext.catalog.ts
2952
+ const tabContextCatalog = defineCatalogEntry()({
2953
+ summary: "Holds the selected value for a `TabList` and the `TabPanel`s beside it, wherever they sit.",
2954
+ isPlaceable: false,
2955
+ example: {
2956
+ component: "TabContext",
2957
+ props: { defaultValue: "layers" },
2958
+ children: [
2959
+ node("TabList", { "aria-label": "Left panel" }, [node("Tab", {
2960
+ value: "layers",
2961
+ label: "Layers"
2962
+ }), node("Tab", {
2963
+ value: "assets",
2964
+ label: "Assets"
2965
+ })]),
2966
+ node("TabPanel", {
2967
+ value: "layers",
2968
+ p: 2
2969
+ }, [node("Typography", {}, ["Layers of the page."])]),
2970
+ node("TabPanel", {
2971
+ value: "assets",
2972
+ p: 2
2973
+ }, [node("Typography", {}, ["The page's assets."])])
2974
+ ]
2975
+ },
2976
+ variants: [],
2977
+ options: {},
2978
+ content: { children: "children" },
2979
+ twoWay: {
2980
+ prop: "value",
2981
+ event: "onChange",
2982
+ read: "argument"
2983
+ }
2984
+ });
2985
+ //#endregion
2986
+ //#region src/Tabs/TabList/TabList.catalog.ts
2987
+ const tabListCatalog = defineCatalogEntry()({
2988
+ summary: "The `Tabs` of a `TabContext` - it shows the context's value and links each tab to its panel.",
2989
+ isPlaceable: false,
2990
+ example: {
2991
+ component: "TabList",
2992
+ props: { "aria-label": "Left panel" },
2993
+ children: [node("Tab", {
2994
+ value: "layers",
2995
+ label: "Layers"
2996
+ }), node("Tab", {
2997
+ value: "assets",
2998
+ label: "Assets"
2999
+ })]
3000
+ },
3001
+ variants: [],
3002
+ options: {},
3003
+ content: {
3004
+ children: "children",
3005
+ startContent: "children",
3006
+ endContent: "children"
3007
+ },
3008
+ domEvents: ["onChange", "onTabClose"]
3009
+ });
3010
+ const tabScrollButtonCatalog = defineCatalogEntry()({
3011
+ summary: "The button that scrolls a row of tabs - a `Tabs` shows one at each end while they overflow.",
3012
+ isPlaceable: false,
3013
+ example: {
3014
+ component: "TabScrollButton",
3015
+ props: { direction: "end" },
3016
+ children: []
3017
+ },
3018
+ variants: [],
3019
+ options: {
3020
+ direction: { values: ["start", "end"] },
3021
+ orientation: {
3022
+ values: ["horizontal", "vertical"],
3023
+ default: "horizontal"
3024
+ },
3025
+ disabled: {
3026
+ values: [true, false],
3027
+ default: false
3028
+ },
3029
+ isHidden: {
3030
+ values: [true, false],
3031
+ default: false
3032
+ },
3033
+ color: { scale: "palette" },
3034
+ textColor: { scale: "text" }
3035
+ },
3036
+ content: { children: "children" },
3037
+ domEvents: ["onClick"]
3038
+ });
3039
+ //#endregion
3040
+ //#region src/Table/Table/Table.catalog.ts
3041
+ const tableSizeValues = [
3042
+ "sm",
3043
+ "md",
3044
+ "lg"
3045
+ ];
3046
+ const tableCellPaddingValues = ["normal", "none"];
3047
+ const tableAlignValues = [
3048
+ "left",
3049
+ "right",
3050
+ "center",
3051
+ "justify"
3052
+ ];
3053
+ const sizeLabels = {
3054
+ sm: "Dense",
3055
+ md: "Default",
3056
+ lg: "Roomy"
3057
+ };
3058
+ const deployments = [node("TableHead", {}, [node("TableRow", {}, [
3059
+ node("TableCell", {}, ["Service"]),
3060
+ node("TableCell", {}, ["Region"]),
3061
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
3062
+ ])]), node("TableBody", {}, [node("TableRow", { isHoverable: true }, [
3063
+ node("TableCell", {}, ["web"]),
3064
+ node("TableCell", {}, ["fra1"]),
3065
+ node("TableCell", { align: "right" }, ["42"])
3066
+ ]), node("TableRow", { isHoverable: true }, [
3067
+ node("TableCell", {}, ["api"]),
3068
+ node("TableCell", {}, ["fra1"]),
3069
+ node("TableCell", { align: "right" }, ["87"])
3070
+ ])])];
3071
+ const tableCatalog = defineCatalogEntry()({
3072
+ summary: "A data table - `TableHead`, `TableBody` and `TableFooter` sections of `TableRow`s and `TableCell`s, with density and padding set once for every cell.",
3073
+ isPlaceable: true,
3074
+ example: {
3075
+ component: "Table",
3076
+ props: {},
3077
+ children: deployments
3078
+ },
3079
+ variants: tableSizeValues.map((size) => ({
3080
+ name: size,
3081
+ label: sizeLabels[size],
3082
+ example: {
3083
+ component: "Table",
3084
+ props: { size },
3085
+ children: deployments
3086
+ }
3087
+ })),
3088
+ options: {
3089
+ size: {
3090
+ scale: "sizes",
3091
+ default: "md"
3092
+ },
3093
+ cellPadding: {
3094
+ values: tableCellPaddingValues,
3095
+ default: "normal"
3096
+ },
3097
+ align: { values: tableAlignValues },
3098
+ color: { scale: "palette" },
3099
+ bg: { scale: "background" },
3100
+ borderColor: {
3101
+ scale: "border",
3102
+ default: "light"
3103
+ },
3104
+ borderRadius: { scale: "radii" },
3105
+ hasStickyHeader: {
3106
+ values: [true, false],
3107
+ default: false
3108
+ },
3109
+ shouldHideSortIcon: {
3110
+ values: [true, false],
3111
+ default: true
3112
+ },
3113
+ hasEllipsis: {
3114
+ values: [true, false],
3115
+ default: false
3116
+ }
3117
+ },
3118
+ content: { children: "children" },
3119
+ preview: { width: 360 }
3120
+ });
3121
+ //#endregion
3122
+ //#region src/Table/TableBody/TableBody.catalog.ts
3123
+ const tableBodyCatalog = defineCatalogEntry()({
3124
+ summary: "The body section of a `Table` - its data rows, with cells rendered as `<td>`.",
3125
+ isPlaceable: false,
3126
+ example: {
3127
+ component: "TableBody",
3128
+ props: {},
3129
+ children: [node("TableRow", { isHoverable: true }, [
3130
+ node("TableCell", {}, ["web"]),
3131
+ node("TableCell", {}, ["fra1"]),
3132
+ node("TableCell", { align: "right" }, ["42"])
3133
+ ]), node("TableRow", { isHoverable: true }, [
3134
+ node("TableCell", {}, ["api"]),
3135
+ node("TableCell", {}, ["fra1"]),
3136
+ node("TableCell", { align: "right" }, ["87"])
3137
+ ])]
3138
+ },
3139
+ variants: [],
3140
+ options: {
3141
+ color: { scale: "text" },
3142
+ bg: { scale: "background" },
3143
+ borderColor: { scale: "border" }
3144
+ },
3145
+ content: { children: "children" }
3146
+ });
3147
+ //#endregion
3148
+ //#region src/Table/TableCell/TableCell.catalog.ts
3149
+ const tableCellVariantValues = [
3150
+ "head",
3151
+ "body",
3152
+ "footer"
3153
+ ];
3154
+ const tableCellAlignValues = [
3155
+ "inherit",
3156
+ "left",
3157
+ "right",
3158
+ "center",
3159
+ "justify"
3160
+ ];
3161
+ const tableCellSortDirectionValues = ["asc", "desc"];
3162
+ const cellPaddingValues$1 = ["normal", "none"];
3163
+ const variantLabels$2 = {
3164
+ head: "Head",
3165
+ body: "Body",
3166
+ footer: "Footer"
3167
+ };
3168
+ const tableCellCatalog = defineCatalogEntry()({
3169
+ summary: "One cell of a `TableRow` - a header `<th>` or a data `<td>`, taken from its section unless `variant` says otherwise.",
3170
+ isPlaceable: false,
3171
+ example: {
3172
+ component: "TableCell",
3173
+ props: {},
3174
+ children: ["web"]
3175
+ },
3176
+ variants: tableCellVariantValues.map((variant) => ({
3177
+ name: variant,
3178
+ label: variantLabels$2[variant],
3179
+ example: {
3180
+ component: "TableCell",
3181
+ props: { variant },
3182
+ children: ["web"]
3183
+ }
3184
+ })),
3185
+ options: {
3186
+ variant: { values: tableCellVariantValues },
3187
+ align: {
3188
+ values: tableCellAlignValues,
3189
+ default: "inherit"
3190
+ },
3191
+ size: { scale: "sizes" },
3192
+ cellPadding: { values: cellPaddingValues$1 },
3193
+ sortDirection: { values: tableCellSortDirectionValues },
3194
+ hasEllipsis: { values: [true, false] },
3195
+ color: { scale: "text" },
3196
+ bg: { scale: "background" },
3197
+ borderColor: { scale: "border" }
3198
+ },
3199
+ content: { children: "children" }
3200
+ });
3201
+ //#endregion
3202
+ //#region src/Table/TableContainer/TableContainer.catalog.ts
3203
+ const tableContainerCatalog = defineCatalogEntry()({
3204
+ summary: "A scroll wrapper for a `Table` - a wide table scrolls sideways inside it, and a bounded height lets `hasStickyHeader` stick.",
3205
+ isPlaceable: false,
3206
+ example: {
3207
+ component: "TableContainer",
3208
+ props: {},
3209
+ children: [node("Table", {}, [node("TableHead", {}, [node("TableRow", {}, [
3210
+ node("TableCell", {}, ["Service"]),
3211
+ node("TableCell", {}, ["Region"]),
3212
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
3213
+ ])]), node("TableBody", {}, [node("TableRow", {}, [
3214
+ node("TableCell", {}, ["web"]),
3215
+ node("TableCell", {}, ["fra1"]),
3216
+ node("TableCell", { align: "right" }, ["42"])
3217
+ ]), node("TableRow", {}, [
3218
+ node("TableCell", {}, ["api"]),
3219
+ node("TableCell", {}, ["fra1"]),
3220
+ node("TableCell", { align: "right" }, ["87"])
3221
+ ])])])]
3222
+ },
3223
+ variants: [],
3224
+ options: {
3225
+ bg: { scale: "background" },
3226
+ borderColor: { scale: "border" },
3227
+ borderWidth: { scale: "borderWidths" },
3228
+ borderRadius: { scale: "radii" }
3229
+ },
3230
+ content: { children: "children" },
3231
+ preview: { width: 360 }
3232
+ });
3233
+ //#endregion
3234
+ //#region src/Table/TableControl/TableControl.catalog.ts
3235
+ const tableControlCatalog = defineCatalogEntry()({
3236
+ summary: "Renders the visible rows of a dataset inside `TableBody` - sorted by `useTableSort` and sliced by `useTablePagination`, through a row render function.",
3237
+ isPlaceable: false,
3238
+ example: {
3239
+ component: "TableControl",
3240
+ props: {},
3241
+ children: []
3242
+ },
3243
+ variants: [],
3244
+ options: {},
3245
+ content: { children: "none" }
3246
+ });
3247
+ //#endregion
3248
+ //#region src/Table/TableFooter/TableFooter.catalog.ts
3249
+ const tableFooterCatalog = defineCatalogEntry()({
3250
+ summary: "The footer section of a `Table` - totals or a `TablePagination` row below the body.",
3251
+ isPlaceable: false,
3252
+ example: {
3253
+ component: "TableFooter",
3254
+ props: {},
3255
+ children: [node("TableRow", {}, [node("TableCell", { colSpan: 2 }, ["Total services"]), node("TableCell", { align: "right" }, ["3"])])]
3256
+ },
3257
+ variants: [],
3258
+ options: {
3259
+ color: { scale: "text" },
3260
+ bg: { scale: "background" },
3261
+ borderColor: { scale: "border" }
3262
+ },
3263
+ content: { children: "children" }
3264
+ });
3265
+ //#endregion
3266
+ //#region src/Table/TableHead/TableHead.catalog.ts
3267
+ const tableHeadCatalog = defineCatalogEntry()({
3268
+ summary: "The header section of a `Table` - its column-title row, with cells rendered as `<th scope=\"col\">`.",
3269
+ isPlaceable: false,
3270
+ example: {
3271
+ component: "TableHead",
3272
+ props: {},
3273
+ children: [node("TableRow", {}, [
3274
+ node("TableCell", {}, ["Service"]),
3275
+ node("TableCell", {}, ["Region"]),
3276
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
3277
+ ])]
3278
+ },
3279
+ variants: [],
3280
+ options: {
3281
+ color: { scale: "text" },
3282
+ bg: { scale: "background" },
3283
+ borderColor: { scale: "border" }
3284
+ },
3285
+ content: { children: "children" }
3286
+ });
3287
+ const tablePaginationCatalog = defineCatalogEntry()({
3288
+ summary: "A pagination cell for `TableFooter > TableRow` - a rows-per-page picker, the shown range and previous/next buttons for a controlled page.",
3289
+ isPlaceable: false,
3290
+ example: {
3291
+ component: "TablePagination",
3292
+ props: {
3293
+ count: 100,
3294
+ page: 2,
3295
+ rowsPerPage: 10
3296
+ },
3297
+ children: []
3298
+ },
3299
+ variants: [],
3300
+ options: {
3301
+ disabled: {
3302
+ values: [true, false],
3303
+ default: false
3304
+ },
3305
+ shouldShowFirstButton: {
3306
+ values: [true, false],
3307
+ default: false
3308
+ },
3309
+ shouldShowLastButton: {
3310
+ values: [true, false],
3311
+ default: false
3312
+ },
3313
+ size: { scale: "sizes" },
3314
+ cellPadding: { values: ["normal", "none"] },
3315
+ color: { scale: "text" },
3316
+ bg: { scale: "background" }
3317
+ },
3318
+ content: {
3319
+ rowsPerPageLabel: "text",
3320
+ displayedRowsLabel: "none"
3321
+ },
3322
+ twoWay: {
3323
+ prop: "page",
3324
+ event: "onPageChange",
3325
+ read: "argument"
3326
+ },
3327
+ preview: { width: 480 }
3328
+ });
3329
+ //#endregion
3330
+ //#region src/Table/TablePaginationActions/TablePaginationActions.catalog.ts
3331
+ const tablePaginationActionsCatalog = defineCatalogEntry()({
3332
+ summary: "The first, previous, next and last page buttons inside `TablePagination`, disabled at the bounds of `count`.",
3333
+ isPlaceable: false,
3334
+ example: {
3335
+ component: "TablePaginationActions",
3336
+ props: {
3337
+ count: 100,
3338
+ page: 2,
3339
+ rowsPerPage: 10
3340
+ },
3341
+ children: []
3342
+ },
3343
+ variants: [],
3344
+ options: {
3345
+ size: {
3346
+ scale: "sizes",
3347
+ default: "sm"
3348
+ },
3349
+ disabled: {
3350
+ values: [true, false],
3351
+ default: false
3352
+ },
3353
+ shouldShowFirstButton: {
3354
+ values: [true, false],
3355
+ default: false
3356
+ },
3357
+ shouldShowLastButton: {
3358
+ values: [true, false],
3359
+ default: false
3360
+ }
3361
+ },
3362
+ content: {},
3363
+ twoWay: {
3364
+ prop: "page",
3365
+ event: "onPageChange",
3366
+ read: "argument"
3367
+ }
3368
+ });
3369
+ //#endregion
3370
+ //#region src/Table/TableRow/TableRow.catalog.ts
3371
+ const tableRowCatalog = defineCatalogEntry()({
3372
+ summary: "One row of a `Table` section - its `TableCell`s, optionally shaded on hover or when selected.",
3373
+ isPlaceable: false,
3374
+ example: {
3375
+ component: "TableRow",
3376
+ props: { isHoverable: true },
3377
+ children: [
3378
+ node("TableCell", {}, ["web"]),
3379
+ node("TableCell", {}, ["fra1"]),
3380
+ node("TableCell", { align: "right" }, ["42"])
3381
+ ]
3382
+ },
3383
+ variants: [],
3384
+ options: {
3385
+ color: {
3386
+ scale: "palette",
3387
+ default: "primary"
3388
+ },
3389
+ bg: { scale: "background" },
3390
+ borderColor: { scale: "border" },
3391
+ isHoverable: {
3392
+ values: [true, false],
3393
+ default: false
3394
+ },
3395
+ isSelected: {
3396
+ values: [true, false],
3397
+ default: false
3398
+ }
3399
+ },
3400
+ content: { children: "children" },
3401
+ domEvents: ["onClick"]
3402
+ });
3403
+ const tableSortLabelCatalog = defineCatalogEntry()({
3404
+ summary: "A sortable column title for a header `TableCell` - a button with an arrow showing the sort direction.",
3405
+ isPlaceable: false,
3406
+ example: {
3407
+ component: "TableSortLabel",
3408
+ props: {
3409
+ isActive: true,
3410
+ direction: "asc"
3411
+ },
3412
+ children: ["Name"]
3413
+ },
3414
+ variants: [],
3415
+ options: {
3416
+ isActive: {
3417
+ values: [true, false],
3418
+ default: false
3419
+ },
3420
+ direction: {
3421
+ values: ["asc", "desc"],
3422
+ default: "asc"
3423
+ },
3424
+ shouldHideSortIcon: {
3425
+ values: [true, false],
3426
+ default: true
3427
+ }
3428
+ },
3429
+ content: { children: "children" },
3430
+ domEvents: ["onClick"]
3431
+ });
3432
+ //#endregion
3433
+ //#region src/TextInput/TextInput.catalog.ts
3434
+ const textInputVariantValues = [
3435
+ "default",
3436
+ "outlined",
3437
+ "text",
3438
+ "underline"
3439
+ ];
3440
+ const variantLabels$1 = {
3441
+ default: "Filled",
3442
+ outlined: "Outlined",
3443
+ text: "Text",
3444
+ underline: "Underline"
3445
+ };
3446
+ const textInputCatalog = defineCatalogEntry()({
3447
+ summary: "A text field - one line, or a `multiline` textarea that can grow with its content.",
3448
+ isPlaceable: true,
3449
+ example: {
3450
+ component: "TextInput",
3451
+ props: { placeholder: "Enter a value..." },
3452
+ children: []
3453
+ },
3454
+ variants: textInputVariantValues.map((variant) => ({
3455
+ name: variant,
3456
+ label: variantLabels$1[variant],
3457
+ example: {
3458
+ component: "TextInput",
3459
+ props: {
3460
+ placeholder: "Enter a value...",
3461
+ variant
3462
+ },
3463
+ children: []
3464
+ }
3465
+ })),
3466
+ options: {
3467
+ variant: {
3468
+ values: textInputVariantValues,
3469
+ default: "default"
3470
+ },
3471
+ color: {
3472
+ scale: "palette",
3473
+ default: "primary"
3474
+ },
3475
+ textColor: {
3476
+ scale: "text",
3477
+ default: "primary"
3478
+ },
3479
+ size: {
3480
+ scale: "sizes",
3481
+ default: "md"
3482
+ },
3483
+ borderRadius: { scale: "radii" },
3484
+ disabled: {
3485
+ values: [true, false],
3486
+ default: false
3487
+ },
3488
+ error: {
3489
+ values: [true, false],
3490
+ default: false
3491
+ },
3492
+ readOnly: {
3493
+ values: [true, false],
3494
+ default: false
3495
+ },
3496
+ required: {
3497
+ values: [true, false],
3498
+ default: false
3499
+ },
3500
+ fullWidth: {
3501
+ values: [true, false],
3502
+ default: false
3503
+ },
3504
+ multiline: {
3505
+ values: [true, false],
3506
+ default: false
3507
+ },
3508
+ resize: {
3509
+ values: [true, false],
3510
+ default: false
3511
+ }
3512
+ },
3513
+ content: { placeholder: "text" },
3514
+ twoWay: {
3515
+ prop: "value",
3516
+ event: "onChange",
3517
+ read: "target.value"
3518
+ }
3519
+ });
3520
+ //#endregion
3521
+ //#region src/ToggleButton/ToggleButton/ToggleButton.catalog.ts
3522
+ const colorLabels$1 = {
3523
+ default: "Default",
3524
+ primary: "Primary",
3525
+ secondary: "Secondary",
3526
+ success: "Success",
3527
+ error: "Error",
3528
+ info: "Info",
3529
+ warning: "Warning"
3530
+ };
3531
+ const colors$1 = Object.keys(colorLabels$1);
3532
+ const toggleButtonCatalog = defineCatalogEntry()({
3533
+ summary: "A button that stays pressed or not - on its own, or one choice of a `ToggleButtonGroup`.",
3534
+ isPlaceable: true,
3535
+ example: {
3536
+ component: "ToggleButton",
3537
+ props: { value: "check" },
3538
+ children: ["Check"]
3539
+ },
3540
+ variants: colors$1.map((color) => ({
3541
+ name: color,
3542
+ label: colorLabels$1[color],
3543
+ example: {
3544
+ component: "ToggleButton",
3545
+ props: {
3546
+ value: "check",
3547
+ color,
3548
+ isSelected: true
3549
+ },
3550
+ children: ["Check"]
3551
+ }
3552
+ })),
3553
+ options: {
3554
+ color: {
3555
+ scale: "palette",
3556
+ default: "default"
3557
+ },
3558
+ size: {
3559
+ scale: "sizes",
3560
+ default: "md"
3561
+ },
3562
+ isSelected: { values: [true, false] },
3563
+ fullWidth: {
3564
+ values: [true, false],
3565
+ default: false
3566
+ },
3567
+ disabled: {
3568
+ values: [true, false],
3569
+ default: false
3570
+ },
3571
+ loading: {
3572
+ values: [true, false],
3573
+ default: false
3574
+ }
3575
+ },
3576
+ content: {
3577
+ children: "children",
3578
+ startIcon: "child",
3579
+ endIcon: "child",
3580
+ loadingIndicator: "child"
3581
+ },
3582
+ domEvents: ["onClick", "onChange"]
3583
+ });
3584
+ //#endregion
3585
+ //#region src/ToggleButton/ToggleButtonGroup/ToggleButtonGroup.catalog.ts
3586
+ const toggleButtonGroupOrientationValues = ["horizontal", "vertical"];
3587
+ const colorLabels = {
3588
+ default: "Default",
3589
+ primary: "Primary",
3590
+ secondary: "Secondary",
3591
+ success: "Success",
3592
+ error: "Error",
3593
+ info: "Info",
3594
+ warning: "Warning"
3595
+ };
3596
+ const colors = Object.keys(colorLabels);
3597
+ const platforms = [
3598
+ node("ToggleButton", { value: "web" }, ["Web"]),
3599
+ node("ToggleButton", { value: "android" }, ["Android"]),
3600
+ node("ToggleButton", { value: "ios" }, ["iOS"])
3601
+ ];
3602
+ const props = {
3603
+ isExclusive: true,
3604
+ value: "web",
3605
+ "aria-label": "Platform"
3606
+ };
3607
+ const toggleButtonGroupCatalog = defineCatalogEntry()({
3608
+ summary: "A joined row of `ToggleButton`s where one (`isExclusive`) or several values can be selected.",
3609
+ isPlaceable: true,
3610
+ example: {
3611
+ component: "ToggleButtonGroup",
3612
+ props: {
3613
+ ...props,
3614
+ color: "primary"
3615
+ },
3616
+ children: platforms
3617
+ },
3618
+ variants: colors.map((color) => ({
3619
+ name: color,
3620
+ label: colorLabels[color],
3621
+ example: {
3622
+ component: "ToggleButtonGroup",
3623
+ props: {
3624
+ ...props,
3625
+ color
3626
+ },
3627
+ children: platforms
3628
+ }
3629
+ })),
3630
+ options: {
3631
+ isExclusive: {
3632
+ values: [true, false],
3633
+ default: false
3634
+ },
3635
+ color: {
3636
+ scale: "palette",
3637
+ default: "default"
3638
+ },
3639
+ size: {
3640
+ scale: "sizes",
3641
+ default: "md"
3642
+ },
3643
+ orientation: {
3644
+ values: toggleButtonGroupOrientationValues,
3645
+ default: "horizontal"
3646
+ },
3647
+ borderRadius: {
3648
+ scale: "radii",
3649
+ default: "md"
3650
+ },
3651
+ disabled: {
3652
+ values: [true, false],
3653
+ default: false
3654
+ },
3655
+ fullWidth: {
3656
+ values: [true, false],
3657
+ default: false
3658
+ }
3659
+ },
3660
+ content: { children: "children" },
3661
+ twoWay: {
3662
+ prop: "value",
3663
+ event: "onChange",
3664
+ read: "argument"
3665
+ }
3666
+ });
3667
+ //#endregion
3668
+ //#region src/Typography/Typography.catalog.ts
3669
+ const typographyAlignValues = [
3670
+ "left",
3671
+ "center",
3672
+ "right",
3673
+ "justify",
3674
+ "inherit"
3675
+ ];
3676
+ const pictured = [
3677
+ "h1",
3678
+ "h2",
3679
+ "h3",
3680
+ "h4",
3681
+ "h5",
3682
+ "h6",
3683
+ "subtitle1",
3684
+ "subtitle2",
3685
+ "body1",
3686
+ "body2",
3687
+ "caption",
3688
+ "overline",
3689
+ "button"
3690
+ ];
3691
+ const variantLabels = {
3692
+ h1: "Heading 1",
3693
+ h2: "Heading 2",
3694
+ h3: "Heading 3",
3695
+ h4: "Heading 4",
3696
+ h5: "Heading 5",
3697
+ h6: "Heading 6",
3698
+ subtitle1: "Subtitle 1",
3699
+ subtitle2: "Subtitle 2",
3700
+ body1: "Body 1",
3701
+ body2: "Body 2",
3702
+ caption: "Caption",
3703
+ overline: "Overline",
3704
+ button: "Button"
3705
+ };
3706
+ const typographyCatalog = defineCatalogEntry()({
3707
+ summary: "Text in one of the theme typography variants, rendered as its semantic element.",
3708
+ isPlaceable: true,
3709
+ example: {
3710
+ component: "Typography",
3711
+ props: { variant: "body1" },
3712
+ children: ["Great products are built through clarity, consistency, and attention to detail."]
3713
+ },
3714
+ variants: pictured.map((variant) => ({
3715
+ name: variant,
3716
+ label: variantLabels[variant],
3717
+ example: {
3718
+ component: "Typography",
3719
+ props: { variant },
3720
+ children: ["The quick brown fox"]
3721
+ }
3722
+ })),
3723
+ options: {
3724
+ variant: {
3725
+ scale: "typography",
3726
+ default: "body1"
3727
+ },
3728
+ color: { scale: "text" },
3729
+ bg: { scale: "background" },
3730
+ align: { values: typographyAlignValues },
3731
+ gutterBottom: {
3732
+ values: [true, false],
3733
+ default: false
3734
+ },
3735
+ noWrap: {
3736
+ values: [true, false],
3737
+ default: false
3738
+ }
3739
+ },
3740
+ content: { children: "children" }
3741
+ });
3742
+ //#endregion
3743
+ //#region src/View/View.catalog.ts
3744
+ const viewCatalog = defineCatalogEntry()({
3745
+ summary: "The base box - a div styled through theme tokens for space, color, borders and position.",
3746
+ isPlaceable: true,
3747
+ example: {
3748
+ component: "View",
3749
+ props: {},
3750
+ children: ["View content"]
3751
+ },
3752
+ variants: [],
3753
+ options: {
3754
+ bg: { scale: "background" },
3755
+ borderColor: { scale: "border" },
3756
+ borderWidth: { scale: "borderWidths" },
3757
+ borderRadius: { scale: "radii" }
3758
+ },
3759
+ content: { children: "children" }
3760
+ });
3761
+ //#endregion
3762
+ //#region src/catalog/sources.ts
3763
+ /** Every component, keyed by its export name. */
3764
+ const catalogSources = {
3765
+ AppBar: {
3766
+ entry: appBarCatalog,
3767
+ folder: "AppBar"
3768
+ },
3769
+ Avatar: {
3770
+ entry: avatarCatalog,
3771
+ folder: "Avatar"
3772
+ },
3773
+ Backdrop: {
3774
+ entry: backdropCatalog,
3775
+ folder: "Backdrop"
3776
+ },
3777
+ Breadcrumbs: {
3778
+ entry: breadcrumbsCatalog,
3779
+ folder: "Breadcrumbs"
3780
+ },
3781
+ Button: {
3782
+ entry: buttonCatalog,
3783
+ folder: "Button"
3784
+ },
3785
+ ButtonGroup: {
3786
+ entry: buttonGroupCatalog,
3787
+ folder: "ButtonGroup"
3788
+ },
3789
+ Card: {
3790
+ entry: cardCatalog,
3791
+ folder: "Card"
3792
+ },
3793
+ Checkbox: {
3794
+ entry: checkboxCatalog,
3795
+ folder: "Checkbox"
3796
+ },
3797
+ ContextMenu: {
3798
+ entry: contextMenuCatalog,
3799
+ folder: "Menu",
3800
+ family: "Menu"
3801
+ },
3802
+ CircularProgress: {
3803
+ entry: circularProgressCatalog,
3804
+ folder: "CircularProgress"
3805
+ },
3806
+ Drawer: {
3807
+ entry: drawerCatalog,
3808
+ folder: "Drawer"
3809
+ },
3810
+ DrawerToggle: {
3811
+ entry: drawerToggleCatalog,
3812
+ folder: "Drawer",
3813
+ family: "Drawer"
3814
+ },
3815
+ Flex: {
3816
+ entry: flexCatalog,
3817
+ folder: "Flex"
3818
+ },
3819
+ FocusTrap: {
3820
+ entry: focusTrapCatalog,
3821
+ folder: "FocusTrap"
3822
+ },
3823
+ Form: {
3824
+ entry: formCatalog,
3825
+ folder: "Form"
3826
+ },
3827
+ FormControl: {
3828
+ entry: formControlCatalog,
3829
+ folder: "FormControl"
3830
+ },
3831
+ FormHelperText: {
3832
+ entry: formHelperTextCatalog,
3833
+ folder: "FormHelperText"
3834
+ },
3835
+ FormLabel: {
3836
+ entry: formLabelCatalog,
3837
+ folder: "FormLabel"
3838
+ },
3839
+ Grid: {
3840
+ entry: gridCatalog,
3841
+ folder: "Grid"
3842
+ },
3843
+ Icon: {
3844
+ entry: iconCatalog,
3845
+ folder: "Icon"
3846
+ },
3847
+ Image: {
3848
+ entry: imageCatalog,
3849
+ folder: "Image"
3850
+ },
3851
+ LinearProgress: {
3852
+ entry: linearProgressCatalog,
3853
+ folder: "LinearProgress"
3854
+ },
3855
+ Link: {
3856
+ entry: linkCatalog,
3857
+ folder: "Link"
3858
+ },
3859
+ Menu: {
3860
+ entry: menuCatalog,
3861
+ folder: "Menu"
3862
+ },
3863
+ MenuDivider: {
3864
+ entry: menuDividerCatalog,
3865
+ folder: "Menu",
3866
+ family: "Menu"
3867
+ },
3868
+ MenuItem: {
3869
+ entry: menuItemCatalog,
3870
+ folder: "MenuItem"
3871
+ },
3872
+ MenuItems: {
3873
+ entry: menuItemsCatalog,
3874
+ folder: "Menu",
3875
+ family: "Menu"
3876
+ },
3877
+ MenuList: {
3878
+ entry: menuListCatalog,
3879
+ folder: "Menu",
3880
+ family: "Menu"
3881
+ },
3882
+ Modal: {
3883
+ entry: modalCatalog,
3884
+ folder: "Modal"
3885
+ },
3886
+ NativeSelect: {
3887
+ entry: nativeSelectCatalog,
3888
+ folder: "NativeSelect"
3889
+ },
3890
+ Pagination: {
3891
+ entry: paginationCatalog,
3892
+ folder: "Pagination"
3893
+ },
3894
+ PaginationItem: {
3895
+ entry: paginationItemCatalog,
3896
+ folder: "Pagination",
3897
+ family: "Pagination"
3898
+ },
3899
+ Paper: {
3900
+ entry: paperCatalog,
3901
+ folder: "Paper"
3902
+ },
3903
+ Popover: {
3904
+ entry: popoverCatalog,
3905
+ folder: "Popover"
3906
+ },
3907
+ Portal: {
3908
+ entry: portalCatalog,
3909
+ folder: "Portal"
3910
+ },
3911
+ Pressable: {
3912
+ entry: pressableCatalog,
3913
+ folder: "Pressable"
3914
+ },
3915
+ Quote: {
3916
+ entry: quoteCatalog,
3917
+ folder: "Quote"
3918
+ },
3919
+ Radio: {
3920
+ entry: radioCatalog,
3921
+ folder: "Radio"
3922
+ },
3923
+ Select: {
3924
+ entry: selectCatalog,
3925
+ folder: "Select"
3926
+ },
3927
+ Sidebar: {
3928
+ entry: sidebarCatalog,
3929
+ folder: "Sidebar"
3930
+ },
3931
+ SidebarItem: {
3932
+ entry: sidebarItemCatalog,
3933
+ folder: "Sidebar",
3934
+ family: "Sidebar"
3935
+ },
3936
+ Skeleton: {
3937
+ entry: skeletonCatalog,
3938
+ folder: "Skeleton"
3939
+ },
3940
+ Switch: {
3941
+ entry: switchCatalog,
3942
+ folder: "Switch"
3943
+ },
3944
+ Tab: {
3945
+ entry: tabCatalog,
3946
+ folder: "Tabs",
3947
+ family: "Tabs"
3948
+ },
3949
+ TabPanel: {
3950
+ entry: tabPanelCatalog,
3951
+ folder: "Tabs",
3952
+ family: "Tabs"
3953
+ },
3954
+ Tabs: {
3955
+ entry: tabsCatalog,
3956
+ folder: "Tabs"
3957
+ },
3958
+ TabContext: {
3959
+ entry: tabContextCatalog,
3960
+ folder: "Tabs",
3961
+ family: "Tabs"
3962
+ },
3963
+ TabList: {
3964
+ entry: tabListCatalog,
3965
+ folder: "Tabs",
3966
+ family: "Tabs"
3967
+ },
3968
+ TabScrollButton: {
3969
+ entry: tabScrollButtonCatalog,
3970
+ folder: "Tabs",
3971
+ family: "Tabs"
3972
+ },
3973
+ Table: {
3974
+ entry: tableCatalog,
3975
+ folder: "Table"
3976
+ },
3977
+ TableBody: {
3978
+ entry: tableBodyCatalog,
3979
+ folder: "Table",
3980
+ family: "Table"
3981
+ },
3982
+ TableCell: {
3983
+ entry: tableCellCatalog,
3984
+ folder: "Table",
3985
+ family: "Table"
3986
+ },
3987
+ TableContainer: {
3988
+ entry: tableContainerCatalog,
3989
+ folder: "Table",
3990
+ family: "Table"
3991
+ },
3992
+ TableControl: {
3993
+ entry: tableControlCatalog,
3994
+ folder: "Table",
3995
+ family: "Table"
3996
+ },
3997
+ TableFooter: {
3998
+ entry: tableFooterCatalog,
3999
+ folder: "Table",
4000
+ family: "Table"
4001
+ },
4002
+ TableHead: {
4003
+ entry: tableHeadCatalog,
4004
+ folder: "Table",
4005
+ family: "Table"
4006
+ },
4007
+ TablePagination: {
4008
+ entry: tablePaginationCatalog,
4009
+ folder: "Table",
4010
+ family: "Table"
4011
+ },
4012
+ TablePaginationActions: {
4013
+ entry: tablePaginationActionsCatalog,
4014
+ folder: "Table",
4015
+ family: "Table"
4016
+ },
4017
+ TableRow: {
4018
+ entry: tableRowCatalog,
4019
+ folder: "Table",
4020
+ family: "Table"
4021
+ },
4022
+ TableSortLabel: {
4023
+ entry: tableSortLabelCatalog,
4024
+ folder: "Table",
4025
+ family: "Table"
4026
+ },
4027
+ TextInput: {
4028
+ entry: textInputCatalog,
4029
+ folder: "TextInput"
4030
+ },
4031
+ ToggleButton: {
4032
+ entry: toggleButtonCatalog,
4033
+ folder: "ToggleButton"
4034
+ },
4035
+ ToggleButtonGroup: {
4036
+ entry: toggleButtonGroupCatalog,
4037
+ folder: "ToggleButton",
4038
+ family: "ToggleButton"
4039
+ },
4040
+ Typography: {
4041
+ entry: typographyCatalog,
4042
+ folder: "Typography"
4043
+ },
4044
+ View: {
4045
+ entry: viewCatalog,
4046
+ folder: "View"
4047
+ }
4048
+ };
4049
+ //#endregion
4050
+ //#region src/catalog/styleScales.ts
4051
+ const DESIGN_SYSTEM_SCALES = {
4052
+ color: "text",
4053
+ bg: "background",
4054
+ backgroundColor: "background",
4055
+ borderColor: "border"
4056
+ };
4057
+ const parsers = [
4058
+ _soroush_tech_styled_system.space,
4059
+ _soroush_tech_styled_system.layout,
4060
+ _soroush_tech_styled_system.typography,
4061
+ _soroush_tech_styled_system.color,
4062
+ _soroush_tech_styled_system.border,
4063
+ _soroush_tech_styled_system.flexbox,
4064
+ _soroush_tech_styled_system.position,
4065
+ _soroush_tech_styled_system.background,
4066
+ _soroush_tech_styled_system.shadow,
4067
+ _soroush_tech_styled_system.grid
4068
+ ];
4069
+ /**
4070
+ * Each styled-system prop that resolves against a theme scale, and that scale - read from
4071
+ * the parsers' own configs, so it can't drift from what the props do. A parser's scale the
4072
+ * theme doesn't have (`display`, `overflow`) is left out: there are no values to offer.
4073
+ */
4074
+ function readStyleScales() {
4075
+ const scales = {};
4076
+ for (const parser of parsers) for (const [prop, config] of Object.entries(parser.config)) {
4077
+ const { scale } = config;
4078
+ if (scale && scale in require_themes.baseTheme) scales[prop] = scale;
4079
+ }
4080
+ return {
4081
+ ...scales,
4082
+ ...DESIGN_SYSTEM_SCALES
4083
+ };
4084
+ }
4085
+ //#endregion
4086
+ //#region src/catalog/index.ts
4087
+ const designSystemCategories = componentCategories.map((category) => ({
4088
+ label: category.label,
4089
+ components: category.items.filter((item) => item.pkg === "design-system").map((item) => item.name)
4090
+ }));
4091
+ const categoryOf = (name) => designSystemCategories.find((category) => category.components.includes(name)).label;
4092
+ const components = Object.fromEntries(Object.entries(catalogSources).map(([name, { entry, folder, family }]) => [name, {
4093
+ ...entry,
4094
+ name,
4095
+ module: `@soroush.tech/design-system/${folder}`,
4096
+ category: categoryOf(family ?? name)
4097
+ }]));
4098
+ /**
4099
+ * @description Every component of the design system as data a tool can read - its
4100
+ * category, where it is imported from, what a freshly placed one is, its looks as
4101
+ * pictures, the props a picker offers and their theme scales, and how its node props and
4102
+ * two-way props are written. Pure data: it loads in Node with no DOM, React or Emotion.
4103
+ */
4104
+ const catalog = {
4105
+ categories: designSystemCategories,
4106
+ styleScales: readStyleScales(),
4107
+ components
4108
+ };
4109
+ //#endregion
4110
+ exports.catalog = catalog;