@15gifts/back-office-kit 0.0.0-stage → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/LICENSE +39 -0
  2. package/README.md +46 -2
  3. package/bin/back-office-kit.js +35 -0
  4. package/dist/browser/back-office-kit.js +21469 -0
  5. package/dist/components/Alert/Alert.css.d.ts +32 -0
  6. package/dist/components/Alert/Alert.d.ts +14 -0
  7. package/dist/components/Alert/Alert.js +59 -0
  8. package/dist/components/Alert/Alert.js.map +1 -0
  9. package/dist/components/Alert/Alert.styles.js +17 -0
  10. package/dist/components/Alert/Alert.styles.js.map +1 -0
  11. package/dist/components/Alert/index.d.ts +2 -0
  12. package/dist/components/AppShell/AppShell.css.d.ts +7 -0
  13. package/dist/components/AppShell/AppShell.d.ts +20 -0
  14. package/dist/components/AppShell/AppShell.js +32 -0
  15. package/dist/components/AppShell/AppShell.js.map +1 -0
  16. package/dist/components/AppShell/AppShell.styles.js +6 -0
  17. package/dist/components/AppShell/AppShell.styles.js.map +1 -0
  18. package/dist/components/AppShell/index.d.ts +2 -0
  19. package/dist/components/Avatar/Avatar.css.d.ts +22 -0
  20. package/dist/components/Avatar/Avatar.d.ts +13 -0
  21. package/dist/components/Avatar/Avatar.js +30 -0
  22. package/dist/components/Avatar/Avatar.js.map +1 -0
  23. package/dist/components/Avatar/Avatar.styles.js +16 -0
  24. package/dist/components/Avatar/Avatar.styles.js.map +1 -0
  25. package/dist/components/Avatar/index.d.ts +2 -0
  26. package/dist/components/Badge/Badge.css.d.ts +11 -0
  27. package/dist/components/Badge/Badge.d.ts +11 -0
  28. package/dist/components/Badge/Badge.js +17 -0
  29. package/dist/components/Badge/Badge.js.map +1 -0
  30. package/dist/components/Badge/Badge.styles.js +86 -0
  31. package/dist/components/Badge/Badge.styles.js.map +1 -0
  32. package/dist/components/Badge/index.d.ts +2 -0
  33. package/dist/components/Breadcrumbs/Breadcrumbs.css.d.ts +5 -0
  34. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +22 -0
  35. package/dist/components/Breadcrumbs/Breadcrumbs.js +51 -0
  36. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
  37. package/dist/components/Breadcrumbs/Breadcrumbs.styles.js +7 -0
  38. package/dist/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
  39. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  40. package/dist/components/Button/Button.css.d.ts +74 -0
  41. package/dist/components/Button/Button.d.ts +29 -0
  42. package/dist/components/Button/Button.js +54 -0
  43. package/dist/components/Button/Button.js.map +1 -0
  44. package/dist/components/Button/Button.styles.js +29 -0
  45. package/dist/components/Button/Button.styles.js.map +1 -0
  46. package/dist/components/Button/index.d.ts +2 -0
  47. package/dist/components/Card/Card.css.d.ts +35 -0
  48. package/dist/components/Card/Card.d.ts +12 -0
  49. package/dist/components/Card/Card.js +27 -0
  50. package/dist/components/Card/Card.js.map +1 -0
  51. package/dist/components/Card/Card.styles.js +18 -0
  52. package/dist/components/Card/Card.styles.js.map +1 -0
  53. package/dist/components/Card/index.d.ts +2 -0
  54. package/dist/components/ChatTranscript/ChatTranscript.css.d.ts +15 -0
  55. package/dist/components/ChatTranscript/ChatTranscript.d.ts +94 -0
  56. package/dist/components/ChatTranscript/ChatTranscript.js +159 -0
  57. package/dist/components/ChatTranscript/ChatTranscript.js.map +1 -0
  58. package/dist/components/ChatTranscript/ChatTranscript.styles.js +6 -0
  59. package/dist/components/ChatTranscript/ChatTranscript.styles.js.map +1 -0
  60. package/dist/components/ChatTranscript/index.d.ts +2 -0
  61. package/dist/components/Checkbox/Checkbox.css.d.ts +3 -0
  62. package/dist/components/Checkbox/Checkbox.d.ts +10 -0
  63. package/dist/components/Checkbox/Checkbox.js +50 -0
  64. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  65. package/dist/components/Checkbox/Checkbox.styles.js +8 -0
  66. package/dist/components/Checkbox/Checkbox.styles.js.map +1 -0
  67. package/dist/components/Checkbox/index.d.ts +2 -0
  68. package/dist/components/Chip/Chip.css.d.ts +2 -0
  69. package/dist/components/Chip/Chip.d.ts +6 -0
  70. package/dist/components/Chip/Chip.js +21 -0
  71. package/dist/components/Chip/Chip.js.map +1 -0
  72. package/dist/components/Chip/Chip.styles.js +7 -0
  73. package/dist/components/Chip/Chip.styles.js.map +1 -0
  74. package/dist/components/Chip/index.d.ts +2 -0
  75. package/dist/components/ColorPicker/ColorPicker.css.d.ts +5 -0
  76. package/dist/components/ColorPicker/ColorPicker.d.ts +17 -0
  77. package/dist/components/ColorPicker/ColorPicker.js +80 -0
  78. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  79. package/dist/components/ColorPicker/ColorPicker.styles.js +6 -0
  80. package/dist/components/ColorPicker/ColorPicker.styles.js.map +1 -0
  81. package/dist/components/ColorPicker/color.d.ts +14 -0
  82. package/dist/components/ColorPicker/color.js +39 -0
  83. package/dist/components/ColorPicker/color.js.map +1 -0
  84. package/dist/components/ColorPicker/index.d.ts +2 -0
  85. package/dist/components/Combobox/Combobox.d.ts +58 -0
  86. package/dist/components/Combobox/Combobox.js +156 -0
  87. package/dist/components/Combobox/Combobox.js.map +1 -0
  88. package/dist/components/Combobox/index.d.ts +2 -0
  89. package/dist/components/DateRangePicker/DateRangePicker.css.d.ts +31 -0
  90. package/dist/components/DateRangePicker/DateRangePicker.d.ts +51 -0
  91. package/dist/components/DateRangePicker/DateRangePicker.js +261 -0
  92. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -0
  93. package/dist/components/DateRangePicker/DateRangePicker.styles.js +8 -0
  94. package/dist/components/DateRangePicker/DateRangePicker.styles.js.map +1 -0
  95. package/dist/components/DateRangePicker/index.d.ts +4 -0
  96. package/dist/components/DateRangePicker/presets.d.ts +27 -0
  97. package/dist/components/DateRangePicker/presets.js +62 -0
  98. package/dist/components/DateRangePicker/presets.js.map +1 -0
  99. package/dist/components/DateTimeInput/DateTimeInput.css.d.ts +1 -0
  100. package/dist/components/DateTimeInput/DateTimeInput.d.ts +9 -0
  101. package/dist/components/DateTimeInput/DateTimeInput.js +37 -0
  102. package/dist/components/DateTimeInput/DateTimeInput.js.map +1 -0
  103. package/dist/components/DateTimeInput/DateTimeInput.styles.js +7 -0
  104. package/dist/components/DateTimeInput/DateTimeInput.styles.js.map +1 -0
  105. package/dist/components/DateTimeInput/index.d.ts +2 -0
  106. package/dist/components/DescriptionList/DescriptionList.css.d.ts +62 -0
  107. package/dist/components/DescriptionList/DescriptionList.d.ts +15 -0
  108. package/dist/components/DescriptionList/DescriptionList.js +26 -0
  109. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  110. package/dist/components/DescriptionList/DescriptionList.styles.js +42 -0
  111. package/dist/components/DescriptionList/DescriptionList.styles.js.map +1 -0
  112. package/dist/components/DescriptionList/index.d.ts +2 -0
  113. package/dist/components/DetailsSummary/DetailsSummary.css.d.ts +4 -0
  114. package/dist/components/DetailsSummary/DetailsSummary.d.ts +7 -0
  115. package/dist/components/DetailsSummary/DetailsSummary.js +26 -0
  116. package/dist/components/DetailsSummary/DetailsSummary.js.map +1 -0
  117. package/dist/components/DetailsSummary/DetailsSummary.styles.js +7 -0
  118. package/dist/components/DetailsSummary/DetailsSummary.styles.js.map +1 -0
  119. package/dist/components/DetailsSummary/index.d.ts +2 -0
  120. package/dist/components/Drawer/Drawer.css.d.ts +11 -0
  121. package/dist/components/Drawer/Drawer.d.ts +21 -0
  122. package/dist/components/Drawer/Drawer.js +66 -0
  123. package/dist/components/Drawer/Drawer.js.map +1 -0
  124. package/dist/components/Drawer/Drawer.styles.js +12 -0
  125. package/dist/components/Drawer/Drawer.styles.js.map +1 -0
  126. package/dist/components/Drawer/index.d.ts +2 -0
  127. package/dist/components/EmptyLine/EmptyLine.css.d.ts +11 -0
  128. package/dist/components/EmptyLine/EmptyLine.d.ts +7 -0
  129. package/dist/components/EmptyLine/EmptyLine.js +19 -0
  130. package/dist/components/EmptyLine/EmptyLine.js.map +1 -0
  131. package/dist/components/EmptyLine/EmptyLine.styles.js +12 -0
  132. package/dist/components/EmptyLine/EmptyLine.styles.js.map +1 -0
  133. package/dist/components/EmptyLine/index.d.ts +2 -0
  134. package/dist/components/EnvironmentChip/EnvironmentChip.css.d.ts +19 -0
  135. package/dist/components/EnvironmentChip/EnvironmentChip.d.ts +9 -0
  136. package/dist/components/EnvironmentChip/EnvironmentChip.js +21 -0
  137. package/dist/components/EnvironmentChip/EnvironmentChip.js.map +1 -0
  138. package/dist/components/EnvironmentChip/EnvironmentChip.styles.js +16 -0
  139. package/dist/components/EnvironmentChip/EnvironmentChip.styles.js.map +1 -0
  140. package/dist/components/EnvironmentChip/index.d.ts +2 -0
  141. package/dist/components/Field/Field.css.d.ts +14 -0
  142. package/dist/components/Field/Field.d.ts +74 -0
  143. package/dist/components/Field/Field.js +69 -0
  144. package/dist/components/Field/Field.js.map +1 -0
  145. package/dist/components/Field/Field.styles.js +6 -0
  146. package/dist/components/Field/Field.styles.js.map +1 -0
  147. package/dist/components/Field/index.d.ts +2 -0
  148. package/dist/components/Fieldset/Fieldset.css.d.ts +6 -0
  149. package/dist/components/Fieldset/Fieldset.d.ts +10 -0
  150. package/dist/components/Fieldset/Fieldset.js +32 -0
  151. package/dist/components/Fieldset/Fieldset.js.map +1 -0
  152. package/dist/components/Fieldset/Fieldset.styles.js +6 -0
  153. package/dist/components/Fieldset/Fieldset.styles.js.map +1 -0
  154. package/dist/components/Fieldset/index.d.ts +2 -0
  155. package/dist/components/Heading/Heading.css.d.ts +21 -0
  156. package/dist/components/Heading/Heading.d.ts +11 -0
  157. package/dist/components/Heading/Heading.js +22 -0
  158. package/dist/components/Heading/Heading.js.map +1 -0
  159. package/dist/components/Heading/Heading.styles.js +18 -0
  160. package/dist/components/Heading/Heading.styles.js.map +1 -0
  161. package/dist/components/Heading/index.d.ts +2 -0
  162. package/dist/components/Icon/Icon.css.d.ts +1 -0
  163. package/dist/components/Icon/Icon.d.ts +24 -0
  164. package/dist/components/Icon/Icon.js +24 -0
  165. package/dist/components/Icon/Icon.js.map +1 -0
  166. package/dist/components/Icon/Icon.styles.js +6 -0
  167. package/dist/components/Icon/Icon.styles.js.map +1 -0
  168. package/dist/components/Icon/index.d.ts +2 -0
  169. package/dist/components/List/List.css.d.ts +4 -0
  170. package/dist/components/List/List.d.ts +12 -0
  171. package/dist/components/List/List.js +28 -0
  172. package/dist/components/List/List.js.map +1 -0
  173. package/dist/components/List/List.styles.js +6 -0
  174. package/dist/components/List/List.styles.js.map +1 -0
  175. package/dist/components/List/index.d.ts +2 -0
  176. package/dist/components/Loader/Loader.css.d.ts +1 -0
  177. package/dist/components/Loader/Loader.d.ts +12 -0
  178. package/dist/components/Loader/Loader.js +23 -0
  179. package/dist/components/Loader/Loader.js.map +1 -0
  180. package/dist/components/Loader/Loader.styles.js +7 -0
  181. package/dist/components/Loader/Loader.styles.js.map +1 -0
  182. package/dist/components/Loader/index.d.ts +2 -0
  183. package/dist/components/Menu/Menu.css.d.ts +9 -0
  184. package/dist/components/Menu/Menu.d.ts +90 -0
  185. package/dist/components/Menu/Menu.js +140 -0
  186. package/dist/components/Menu/Menu.js.map +1 -0
  187. package/dist/components/Menu/Menu.styles.js +6 -0
  188. package/dist/components/Menu/Menu.styles.js.map +1 -0
  189. package/dist/components/Menu/index.d.ts +2 -0
  190. package/dist/components/MetricBar/MetricBar.css.d.ts +5 -0
  191. package/dist/components/MetricBar/MetricBar.d.ts +20 -0
  192. package/dist/components/MetricBar/MetricBar.js +35 -0
  193. package/dist/components/MetricBar/MetricBar.js.map +1 -0
  194. package/dist/components/MetricBar/MetricBar.styles.js +15 -0
  195. package/dist/components/MetricBar/MetricBar.styles.js.map +1 -0
  196. package/dist/components/MetricBar/index.d.ts +2 -0
  197. package/dist/components/Modal/Modal.css.d.ts +24 -0
  198. package/dist/components/Modal/Modal.d.ts +16 -0
  199. package/dist/components/Modal/Modal.js +67 -0
  200. package/dist/components/Modal/Modal.js.map +1 -0
  201. package/dist/components/Modal/Modal.styles.js +16 -0
  202. package/dist/components/Modal/Modal.styles.js.map +1 -0
  203. package/dist/components/Modal/index.d.ts +2 -0
  204. package/dist/components/NavRail/HumaraLogo.d.ts +5 -0
  205. package/dist/components/NavRail/HumaraLogo.js +33 -0
  206. package/dist/components/NavRail/HumaraLogo.js.map +1 -0
  207. package/dist/components/NavRail/NavRail.css.d.ts +9 -0
  208. package/dist/components/NavRail/NavRail.d.ts +53 -0
  209. package/dist/components/NavRail/NavRail.js +108 -0
  210. package/dist/components/NavRail/NavRail.js.map +1 -0
  211. package/dist/components/NavRail/NavRail.styles.js +7 -0
  212. package/dist/components/NavRail/NavRail.styles.js.map +1 -0
  213. package/dist/components/NavRail/index.d.ts +2 -0
  214. package/dist/components/NumberInput/NumberInput.d.ts +13 -0
  215. package/dist/components/NumberInput/NumberInput.js +53 -0
  216. package/dist/components/NumberInput/NumberInput.js.map +1 -0
  217. package/dist/components/NumberInput/index.d.ts +2 -0
  218. package/dist/components/PageHeader/PageHeader.css.d.ts +8 -0
  219. package/dist/components/PageHeader/PageHeader.d.ts +13 -0
  220. package/dist/components/PageHeader/PageHeader.js +42 -0
  221. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  222. package/dist/components/PageHeader/PageHeader.styles.js +6 -0
  223. package/dist/components/PageHeader/PageHeader.styles.js.map +1 -0
  224. package/dist/components/PageHeader/index.d.ts +2 -0
  225. package/dist/components/Pagination/Pagination.css.d.ts +3 -0
  226. package/dist/components/Pagination/Pagination.d.ts +14 -0
  227. package/dist/components/Pagination/Pagination.js +61 -0
  228. package/dist/components/Pagination/Pagination.js.map +1 -0
  229. package/dist/components/Pagination/Pagination.styles.js +6 -0
  230. package/dist/components/Pagination/Pagination.styles.js.map +1 -0
  231. package/dist/components/Pagination/index.d.ts +2 -0
  232. package/dist/components/Popover/Popover.css.d.ts +4 -0
  233. package/dist/components/Popover/Popover.d.ts +18 -0
  234. package/dist/components/Popover/Popover.js +43 -0
  235. package/dist/components/Popover/Popover.js.map +1 -0
  236. package/dist/components/Popover/Popover.styles.js +7 -0
  237. package/dist/components/Popover/Popover.styles.js.map +1 -0
  238. package/dist/components/Popover/index.d.ts +2 -0
  239. package/dist/components/PortalContainer/PortalContainer.d.ts +17 -0
  240. package/dist/components/PortalContainer/PortalContainer.js +17 -0
  241. package/dist/components/PortalContainer/PortalContainer.js.map +1 -0
  242. package/dist/components/PortalContainer/index.d.ts +2 -0
  243. package/dist/components/ProgressBar/ProgressBar.css.d.ts +5 -0
  244. package/dist/components/ProgressBar/ProgressBar.d.ts +18 -0
  245. package/dist/components/ProgressBar/ProgressBar.js +50 -0
  246. package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
  247. package/dist/components/ProgressBar/ProgressBar.styles.js +11 -0
  248. package/dist/components/ProgressBar/ProgressBar.styles.js.map +1 -0
  249. package/dist/components/ProgressBar/index.d.ts +2 -0
  250. package/dist/components/RadioCards/RadioCards.css.d.ts +6 -0
  251. package/dist/components/RadioCards/RadioCards.d.ts +20 -0
  252. package/dist/components/RadioCards/RadioCards.js +69 -0
  253. package/dist/components/RadioCards/RadioCards.js.map +1 -0
  254. package/dist/components/RadioCards/RadioCards.styles.js +6 -0
  255. package/dist/components/RadioCards/RadioCards.styles.js.map +1 -0
  256. package/dist/components/RadioCards/index.d.ts +2 -0
  257. package/dist/components/SaveBar/SaveBar.css.d.ts +5 -0
  258. package/dist/components/SaveBar/SaveBar.d.ts +14 -0
  259. package/dist/components/SaveBar/SaveBar.js +45 -0
  260. package/dist/components/SaveBar/SaveBar.js.map +1 -0
  261. package/dist/components/SaveBar/SaveBar.styles.js +6 -0
  262. package/dist/components/SaveBar/SaveBar.styles.js.map +1 -0
  263. package/dist/components/SaveBar/index.d.ts +2 -0
  264. package/dist/components/Select/Select.css.d.ts +3 -0
  265. package/dist/components/Select/Select.d.ts +29 -0
  266. package/dist/components/Select/Select.js +89 -0
  267. package/dist/components/Select/Select.js.map +1 -0
  268. package/dist/components/Select/Select.styles.js +7 -0
  269. package/dist/components/Select/Select.styles.js.map +1 -0
  270. package/dist/components/Select/index.d.ts +2 -0
  271. package/dist/components/Skeleton/Skeleton.css.d.ts +16 -0
  272. package/dist/components/Skeleton/Skeleton.d.ts +14 -0
  273. package/dist/components/Skeleton/Skeleton.js +37 -0
  274. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  275. package/dist/components/Skeleton/Skeleton.styles.js +17 -0
  276. package/dist/components/Skeleton/Skeleton.styles.js.map +1 -0
  277. package/dist/components/Skeleton/index.d.ts +2 -0
  278. package/dist/components/Stack/Stack.css.d.ts +51 -0
  279. package/dist/components/Stack/Stack.d.ts +12 -0
  280. package/dist/components/Stack/Stack.js +21 -0
  281. package/dist/components/Stack/Stack.js.map +1 -0
  282. package/dist/components/Stack/Stack.styles.js +46 -0
  283. package/dist/components/Stack/Stack.styles.js.map +1 -0
  284. package/dist/components/Stack/index.d.ts +2 -0
  285. package/dist/components/StatCard/StatCard.css.d.ts +4 -0
  286. package/dist/components/StatCard/StatCard.d.ts +8 -0
  287. package/dist/components/StatCard/StatCard.js +27 -0
  288. package/dist/components/StatCard/StatCard.js.map +1 -0
  289. package/dist/components/StatCard/StatCard.styles.js +6 -0
  290. package/dist/components/StatCard/StatCard.styles.js.map +1 -0
  291. package/dist/components/StatCard/index.d.ts +2 -0
  292. package/dist/components/StatsGrid/StatsGrid.css.d.ts +1 -0
  293. package/dist/components/StatsGrid/StatsGrid.d.ts +7 -0
  294. package/dist/components/StatsGrid/StatsGrid.js +17 -0
  295. package/dist/components/StatsGrid/StatsGrid.js.map +1 -0
  296. package/dist/components/StatsGrid/StatsGrid.styles.js +6 -0
  297. package/dist/components/StatsGrid/StatsGrid.styles.js.map +1 -0
  298. package/dist/components/StatsGrid/index.d.ts +2 -0
  299. package/dist/components/StatusBadge/StatusBadge.css.d.ts +53 -0
  300. package/dist/components/StatusBadge/StatusBadge.d.ts +9 -0
  301. package/dist/components/StatusBadge/StatusBadge.js +17 -0
  302. package/dist/components/StatusBadge/StatusBadge.js.map +1 -0
  303. package/dist/components/StatusBadge/StatusBadge.styles.js +19 -0
  304. package/dist/components/StatusBadge/StatusBadge.styles.js.map +1 -0
  305. package/dist/components/StatusBadge/index.d.ts +2 -0
  306. package/dist/components/Switch/Switch.css.d.ts +3 -0
  307. package/dist/components/Switch/Switch.d.ts +10 -0
  308. package/dist/components/Switch/Switch.js +41 -0
  309. package/dist/components/Switch/Switch.js.map +1 -0
  310. package/dist/components/Switch/Switch.styles.js +8 -0
  311. package/dist/components/Switch/Switch.styles.js.map +1 -0
  312. package/dist/components/Switch/index.d.ts +2 -0
  313. package/dist/components/Switcher/Switcher.css.d.ts +33 -0
  314. package/dist/components/Switcher/Switcher.d.ts +68 -0
  315. package/dist/components/Switcher/Switcher.js +158 -0
  316. package/dist/components/Switcher/Switcher.js.map +1 -0
  317. package/dist/components/Switcher/Switcher.styles.js +16 -0
  318. package/dist/components/Switcher/Switcher.styles.js.map +1 -0
  319. package/dist/components/Switcher/index.d.ts +2 -0
  320. package/dist/components/Table/Table.css.d.ts +16 -0
  321. package/dist/components/Table/Table.d.ts +66 -0
  322. package/dist/components/Table/Table.js +136 -0
  323. package/dist/components/Table/Table.js.map +1 -0
  324. package/dist/components/Table/Table.styles.js +11 -0
  325. package/dist/components/Table/Table.styles.js.map +1 -0
  326. package/dist/components/Table/index.d.ts +2 -0
  327. package/dist/components/TableAction/TableAction.d.ts +10 -0
  328. package/dist/components/TableAction/TableAction.js +19 -0
  329. package/dist/components/TableAction/TableAction.js.map +1 -0
  330. package/dist/components/TableAction/index.d.ts +2 -0
  331. package/dist/components/Tabs/Tabs.css.d.ts +6 -0
  332. package/dist/components/Tabs/Tabs.d.ts +54 -0
  333. package/dist/components/Tabs/Tabs.js +67 -0
  334. package/dist/components/Tabs/Tabs.js.map +1 -0
  335. package/dist/components/Tabs/Tabs.styles.js +7 -0
  336. package/dist/components/Tabs/Tabs.styles.js.map +1 -0
  337. package/dist/components/Tabs/index.d.ts +2 -0
  338. package/dist/components/Tag/Tag.css.d.ts +9 -0
  339. package/dist/components/Tag/Tag.d.ts +7 -0
  340. package/dist/components/Tag/Tag.js +13 -0
  341. package/dist/components/Tag/Tag.js.map +1 -0
  342. package/dist/components/Tag/Tag.styles.js +12 -0
  343. package/dist/components/Tag/Tag.styles.js.map +1 -0
  344. package/dist/components/Tag/index.d.ts +2 -0
  345. package/dist/components/TextInput/TextInput.css.d.ts +1 -0
  346. package/dist/components/TextInput/TextInput.d.ts +16 -0
  347. package/dist/components/TextInput/TextInput.js +62 -0
  348. package/dist/components/TextInput/TextInput.js.map +1 -0
  349. package/dist/components/TextInput/TextInput.styles.js +6 -0
  350. package/dist/components/TextInput/TextInput.styles.js.map +1 -0
  351. package/dist/components/TextInput/index.d.ts +2 -0
  352. package/dist/components/TextInput/useCharCount.d.ts +15 -0
  353. package/dist/components/TextInput/useCharCount.js +14 -0
  354. package/dist/components/TextInput/useCharCount.js.map +1 -0
  355. package/dist/components/Textarea/Textarea.css.d.ts +2 -0
  356. package/dist/components/Textarea/Textarea.d.ts +16 -0
  357. package/dist/components/Textarea/Textarea.js +59 -0
  358. package/dist/components/Textarea/Textarea.js.map +1 -0
  359. package/dist/components/Textarea/Textarea.styles.js +7 -0
  360. package/dist/components/Textarea/Textarea.styles.js.map +1 -0
  361. package/dist/components/Textarea/index.d.ts +2 -0
  362. package/dist/components/ThemePicker/ThemePicker.css.d.ts +10 -0
  363. package/dist/components/ThemePicker/ThemePicker.d.ts +18 -0
  364. package/dist/components/ThemePicker/ThemePicker.js +74 -0
  365. package/dist/components/ThemePicker/ThemePicker.js.map +1 -0
  366. package/dist/components/ThemePicker/ThemePicker.styles.js +7 -0
  367. package/dist/components/ThemePicker/ThemePicker.styles.js.map +1 -0
  368. package/dist/components/ThemePicker/index.d.ts +2 -0
  369. package/dist/components/ToggleGroup/ToggleGroup.css.d.ts +4 -0
  370. package/dist/components/ToggleGroup/ToggleGroup.d.ts +23 -0
  371. package/dist/components/ToggleGroup/ToggleGroup.js +68 -0
  372. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
  373. package/dist/components/ToggleGroup/ToggleGroup.styles.js +13 -0
  374. package/dist/components/ToggleGroup/ToggleGroup.styles.js.map +1 -0
  375. package/dist/components/ToggleGroup/index.d.ts +2 -0
  376. package/dist/components/Tooltip/Tooltip.css.d.ts +2 -0
  377. package/dist/components/Tooltip/Tooltip.d.ts +18 -0
  378. package/dist/components/Tooltip/Tooltip.js +33 -0
  379. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  380. package/dist/components/Tooltip/Tooltip.styles.js +6 -0
  381. package/dist/components/Tooltip/Tooltip.styles.js.map +1 -0
  382. package/dist/components/Tooltip/index.d.ts +2 -0
  383. package/dist/components/TopBar/TopBar.css.d.ts +3 -0
  384. package/dist/components/TopBar/TopBar.d.ts +9 -0
  385. package/dist/components/TopBar/TopBar.js +20 -0
  386. package/dist/components/TopBar/TopBar.js.map +1 -0
  387. package/dist/components/TopBar/TopBar.styles.js +6 -0
  388. package/dist/components/TopBar/TopBar.styles.js.map +1 -0
  389. package/dist/components/TopBar/index.d.ts +2 -0
  390. package/dist/components/UserMenu/UserMenu.css.d.ts +5 -0
  391. package/dist/components/UserMenu/UserMenu.d.ts +26 -0
  392. package/dist/components/UserMenu/UserMenu.js +55 -0
  393. package/dist/components/UserMenu/UserMenu.js.map +1 -0
  394. package/dist/components/UserMenu/UserMenu.styles.js +7 -0
  395. package/dist/components/UserMenu/UserMenu.styles.js.map +1 -0
  396. package/dist/components/UserMenu/index.d.ts +2 -0
  397. package/dist/foundations/Foundations.css.d.ts +12 -0
  398. package/dist/index.d.ts +60 -0
  399. package/dist/index.js +61 -0
  400. package/dist/styles/input.css.d.ts +18 -0
  401. package/dist/styles/input.styles.js +6 -0
  402. package/dist/styles/input.styles.js.map +1 -0
  403. package/dist/styles/shared.css.d.ts +8 -0
  404. package/dist/styles/shared.styles.js +6 -0
  405. package/dist/styles/shared.styles.js.map +1 -0
  406. package/dist/styles.css +4 -0
  407. package/dist/theme/fontSize.d.ts +15 -0
  408. package/dist/theme/fontSize.js +31 -0
  409. package/dist/theme/fontSize.js.map +1 -0
  410. package/dist/theme/theme.d.ts +29 -0
  411. package/dist/theme/theme.js +52 -0
  412. package/dist/theme/theme.js.map +1 -0
  413. package/dist/tokens/contract.css.d.ts +120 -0
  414. package/dist/tokens/contract.styles.js +68 -0
  415. package/dist/tokens/contract.styles.js.map +1 -0
  416. package/dist/tokens/global.css.d.ts +0 -0
  417. package/dist/tokens/global.styles.js +2 -0
  418. package/dist/tokens/index.d.ts +9 -0
  419. package/dist/tokens/palette.d.ts +16 -0
  420. package/dist/tokens/palette.js +18 -0
  421. package/dist/tokens/palette.js.map +1 -0
  422. package/dist/tokens/scale.d.ts +51 -0
  423. package/dist/tokens/scale.js +47 -0
  424. package/dist/tokens/scale.js.map +1 -0
  425. package/dist/tokens/sprinkles.css.d.ts +38 -0
  426. package/dist/tokens/sprinkles.styles.js +349 -0
  427. package/dist/tokens/sprinkles.styles.js.map +1 -0
  428. package/dist/tokens/themes.css.d.ts +387 -0
  429. package/dist/tokens.js +5 -0
  430. package/package.json +107 -4
  431. package/skills/back-office-kit/SKILL.md +36 -0
  432. package/skills/back-office-kit/references/artifact-template.html +102 -0
  433. package/skills/back-office-kit/references/components.md +1239 -0
  434. package/skills/back-office-kit/references/install.md +187 -0
  435. package/skills/back-office-kit/references/migrate.md +86 -0
  436. package/skills/back-office-kit/references/patterns.md +198 -0
  437. package/skills/back-office-kit/references/testing.md +158 -0
@@ -0,0 +1,74 @@
1
+ import { Field as BaseField } from '@base-ui/react/field';
2
+ import { ReactNode } from 'react';
3
+ /** How a field marks whether it's required. */
4
+ export type RequiredIndicator = 'asterisk' | 'optional-note' | 'none';
5
+ /** The label, description and error props every input shares. */
6
+ export interface FieldBaseProps {
7
+ /** Visible label, also the input's accessible name. */
8
+ label?: ReactNode;
9
+ /** Help text under the input, linked with `aria-describedby`. */
10
+ description?: ReactNode;
11
+ /** Error message. When set, the input is marked invalid and the message is announced. */
12
+ error?: ReactNode;
13
+ /** Marks the label with an asterisk (the input gets native `required`). */
14
+ required?: boolean;
15
+ disabled?: boolean;
16
+ }
17
+ /** `data-*` attributes, e.g. `{ 'data-testid': 'name-field' }`. */
18
+ export type DataAttributes = {
19
+ [key: `data-${string}`]: string | number | boolean | undefined;
20
+ };
21
+ /** Props for an inner part (trigger, popup, item…): its own props plus `data-*`, with a string `className`. */
22
+ export type PartProps<P> = Partial<Omit<P, 'className' | 'children'>> & {
23
+ className?: string;
24
+ } & DataAttributes;
25
+ /** Props for the `Field` root element (the wrapper around label, input and messages). */
26
+ export type FieldRootProps = Omit<BaseField.Root.Props, 'children' | 'invalid' | 'disabled'> & DataAttributes;
27
+ /** How the label marks required and optional fields. */
28
+ export interface FieldIndicatorProps {
29
+ /**
30
+ * `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText`
31
+ * to fields that aren't required. `none` shows neither.
32
+ */
33
+ requiredIndicator?: RequiredIndicator;
34
+ /**
35
+ * Shows the field as required (marker and `aria-required`) without native `required`, e.g. when
36
+ * a form library validates instead of the browser.
37
+ */
38
+ showRequired?: boolean;
39
+ /** Text for `requiredIndicator="optional-note"`. */
40
+ optionalText?: ReactNode;
41
+ }
42
+ /** How the label shows: required/optional markers, and whether it's visible at all. */
43
+ export interface FieldLabelProps extends FieldIndicatorProps {
44
+ /** Hides the label visually. It still names the input for screen readers and tests. */
45
+ hideLabel?: boolean;
46
+ }
47
+ /** Extra options every labelled input takes: label markers, `hideLabel` and `fieldProps`. */
48
+ export interface FieldOptionProps extends FieldLabelProps {
49
+ /** Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. */
50
+ fieldProps?: FieldRootProps;
51
+ }
52
+ /** `aria-required` for `showRequired` without native `required`. */
53
+ export declare const ariaRequired: (required?: boolean, showRequired?: boolean) => true | undefined;
54
+ /** Adds `visuallyHidden` when `hideLabel` is set. */
55
+ export declare const labelClass: (className: string | undefined, hideLabel?: boolean) => string | undefined;
56
+ export interface FieldProps extends FieldBaseProps, FieldLabelProps, Omit<BaseField.Root.Props, 'className' | 'children' | 'invalid'> {
57
+ className?: string;
58
+ children?: ReactNode;
59
+ }
60
+ /** The label text plus the required marker. Used inside `Field.Label` or a part's own label. */
61
+ export declare function FieldLabelText({ label, required, showRequired, requiredIndicator, optionalText, }: Pick<FieldBaseProps, 'label' | 'required'> & FieldIndicatorProps): import('react').JSX.Element;
62
+ export declare const hasError: (error: ReactNode) => boolean;
63
+ /**
64
+ * Wraps a form control with a label, description and error message. Base UI wires up the label,
65
+ * `aria-describedby` and invalid state for any Base UI control (or `Field.Control`) inside it.
66
+ */
67
+ export declare function Field({ label, description, error, required, showRequired, requiredIndicator, optionalText, hideLabel, className, children, ...props }: FieldProps): import('react').JSX.Element;
68
+ /** The description (a `<div>`, so it can hold block content) and error parts, for components that lay out their own `Field.Root`. */
69
+ export declare function FieldMessages({ description, error, ids, }: Pick<FieldBaseProps, 'description' | 'error'> & {
70
+ ids?: {
71
+ description: string;
72
+ error: string;
73
+ };
74
+ }): import('react').JSX.Element;
@@ -0,0 +1,69 @@
1
+ import { root as e } from "./Field.styles.js";
2
+ import "../../styles/shared.styles.js";
3
+ import { clsx as t } from "clsx";
4
+ import { CircleAlert as n } from "lucide-react";
5
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Field as o } from "@base-ui/react/field";
7
+ // src/components/Field/Field.tsx
8
+ var s = (e, t) => t && !e ? !0 : void 0, c = (e, n) => t(e, n && "tyvs8e1") || void 0;
9
+ function l({ label: e, required: t, showRequired: n, requiredIndicator: o = "asterisk", optionalText: s = "(Optional)" }) {
10
+ let c = t || n;
11
+ return /* @__PURE__ */ a(r, { children: [
12
+ e,
13
+ c && o === "asterisk" && /* @__PURE__ */ i("span", {
14
+ "aria-hidden": !0,
15
+ className: "oe0y263",
16
+ children: "*"
17
+ }),
18
+ !c && o === "optional-note" && /* @__PURE__ */ a(r, { children: [" ", /* @__PURE__ */ i("span", {
19
+ className: "oe0y264",
20
+ children: s
21
+ })] })
22
+ ] });
23
+ }
24
+ var u = (e) => e != null && e !== !1 && e !== "";
25
+ function d({ label: n, description: r, error: s, required: d, showRequired: p, requiredIndicator: m, optionalText: h, hideLabel: g, className: _, children: v, ...y }) {
26
+ let b = u(s);
27
+ return /* @__PURE__ */ a(o.Root, {
28
+ ...y,
29
+ invalid: b || void 0,
30
+ className: t(e, _),
31
+ children: [
32
+ n != null && /* @__PURE__ */ i(o.Label, {
33
+ className: c("oe0y262", g),
34
+ children: /* @__PURE__ */ i(l, {
35
+ label: n,
36
+ required: d,
37
+ showRequired: p,
38
+ requiredIndicator: m,
39
+ optionalText: h
40
+ })
41
+ }),
42
+ v,
43
+ /* @__PURE__ */ i(f, {
44
+ description: r,
45
+ error: s
46
+ })
47
+ ]
48
+ });
49
+ }
50
+ function f({ description: e, error: t, ids: s }) {
51
+ return /* @__PURE__ */ a(r, { children: [e != null && /* @__PURE__ */ i(o.Description, {
52
+ id: s?.description,
53
+ render: /* @__PURE__ */ i("div", {}),
54
+ className: "oe0y265",
55
+ children: e
56
+ }), u(t) && /* @__PURE__ */ a(o.Error, {
57
+ id: s?.error,
58
+ match: !0,
59
+ className: "oe0y266",
60
+ children: [/* @__PURE__ */ i(n, {
61
+ size: "1.08em",
62
+ "aria-hidden": !0,
63
+ className: "oe0y267"
64
+ }), /* @__PURE__ */ i("span", { children: t })]
65
+ })] });
66
+ }
67
+ export { d as Field, l as FieldLabelText, f as FieldMessages, s as ariaRequired, u as hasError, c as labelClass };
68
+
69
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.js","names":["required","_Fragment","Field","BaseField","styles.root","label","description","error","ariaRequired","showRequired","required","labelClass","clsx","className","hideLabel","FieldLabelText","required$1","isRequired","Fragment","label","requiredIndicator","optionalText","hasError","error","Field$1","label$1","props","invalid","Field","root","children","FieldMessages","description$1","error$1","ids","CircleAlert"],"sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import { Field as BaseField } from '@base-ui/react/field'\nimport { clsx } from 'clsx'\nimport { CircleAlert } from 'lucide-react'\nimport type { ReactNode } from 'react'\n\nimport * as styles from './Field.css'\nimport { visuallyHidden } from '../../styles/shared.css'\n\n/** How a field marks whether it's required. */\nexport type RequiredIndicator = 'asterisk' | 'optional-note' | 'none'\n\n/** The label, description and error props every input shares. */\nexport interface FieldBaseProps {\n /** Visible label, also the input's accessible name. */\n label?: ReactNode\n /** Help text under the input, linked with `aria-describedby`. */\n description?: ReactNode\n /** Error message. When set, the input is marked invalid and the message is announced. */\n error?: ReactNode\n /** Marks the label with an asterisk (the input gets native `required`). */\n required?: boolean\n disabled?: boolean\n}\n\n/** `data-*` attributes, e.g. `{ 'data-testid': 'name-field' }`. */\nexport type DataAttributes = { [key: `data-${string}`]: string | number | boolean | undefined }\n\n/** Props for an inner part (trigger, popup, item…): its own props plus `data-*`, with a string `className`. */\nexport type PartProps<P> = Partial<Omit<P, 'className' | 'children'>> & {\n className?: string\n} & DataAttributes\n\n/** Props for the `Field` root element (the wrapper around label, input and messages). */\nexport type FieldRootProps = Omit<BaseField.Root.Props, 'children' | 'invalid' | 'disabled'> &\n DataAttributes\n\n/** How the label marks required and optional fields. */\nexport interface FieldIndicatorProps {\n /**\n * `asterisk` (default) marks required fields with `*`. `optional-note` instead adds `optionalText`\n * to fields that aren't required. `none` shows neither.\n */\n requiredIndicator?: RequiredIndicator\n /**\n * Shows the field as required (marker and `aria-required`) without native `required`, e.g. when\n * a form library validates instead of the browser.\n */\n showRequired?: boolean\n /** Text for `requiredIndicator=\"optional-note\"`. */\n optionalText?: ReactNode\n}\n\n/** How the label shows: required/optional markers, and whether it's visible at all. */\nexport interface FieldLabelProps extends FieldIndicatorProps {\n /** Hides the label visually. It still names the input for screen readers and tests. */\n hideLabel?: boolean\n}\n\n/** Extra options every labelled input takes: label markers, `hideLabel` and `fieldProps`. */\nexport interface FieldOptionProps extends FieldLabelProps {\n /** Props for the field's root element, e.g. `{ 'data-testid': 'name-field' }`. `className` already goes there. */\n fieldProps?: FieldRootProps\n}\n\n/** `aria-required` for `showRequired` without native `required`. */\nexport const ariaRequired = (required?: boolean, showRequired?: boolean) =>\n showRequired && !required ? true : undefined\n\n/** Adds `visuallyHidden` when `hideLabel` is set. */\nexport const labelClass = (className: string | undefined, hideLabel?: boolean) =>\n clsx(className, hideLabel && visuallyHidden) || undefined\n\nexport interface FieldProps\n extends\n FieldBaseProps,\n FieldLabelProps,\n Omit<BaseField.Root.Props, 'className' | 'children' | 'invalid'> {\n className?: string\n children?: ReactNode\n}\n\n/** The label text plus the required marker. Used inside `Field.Label` or a part's own label. */\nexport function FieldLabelText({\n label,\n required,\n showRequired,\n requiredIndicator = 'asterisk',\n optionalText = '(Optional)',\n}: Pick<FieldBaseProps, 'label' | 'required'> & FieldIndicatorProps) {\n const isRequired = required || showRequired\n return (\n <>\n {label}\n {isRequired && requiredIndicator === 'asterisk' && (\n <span aria-hidden className={styles.required}>\n *\n </span>\n )}\n {!isRequired && requiredIndicator === 'optional-note' && (\n <>\n {' '}\n <span className={styles.optional}>{optionalText}</span>\n </>\n )}\n </>\n )\n}\n\nexport const hasError = (error: ReactNode) => error != null && error !== false && error !== ''\n\n/**\n * Wraps a form control with a label, description and error message. Base UI wires up the label,\n * `aria-describedby` and invalid state for any Base UI control (or `Field.Control`) inside it.\n */\nexport function Field({\n label,\n description,\n error,\n required,\n showRequired,\n requiredIndicator,\n optionalText,\n hideLabel,\n className,\n children,\n ...props\n}: FieldProps) {\n const invalid = hasError(error)\n return (\n <BaseField.Root\n {...props}\n invalid={invalid || undefined}\n className={clsx(styles.root, className)}\n >\n {label != null && (\n <BaseField.Label className={labelClass(styles.label, hideLabel)}>\n <FieldLabelText\n label={label}\n required={required}\n showRequired={showRequired}\n requiredIndicator={requiredIndicator}\n optionalText={optionalText}\n />\n </BaseField.Label>\n )}\n {children}\n <FieldMessages description={description} error={error} />\n </BaseField.Root>\n )\n}\n\n/** The description (a `<div>`, so it can hold block content) and error parts, for components that lay out their own `Field.Root`. */\nexport function FieldMessages({\n description,\n error,\n ids,\n}: Pick<FieldBaseProps, 'description' | 'error'> & {\n ids?: { description: string; error: string }\n}) {\n return (\n <>\n {description != null && (\n <BaseField.Description\n id={ids?.description}\n render={<div />}\n className={styles.description}\n >\n {description}\n </BaseField.Description>\n )}\n {hasError(error) && (\n <BaseField.Error id={ids?.error} match className={styles.error}>\n <CircleAlert size=\"1.08em\" aria-hidden className={styles.errorIcon} />\n <span>{error}</span>\n </BaseField.Error>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;AAiEA,IAAaQ,KAAgB,GAAoB,MAC/CC,KAAgB,CAACC,IAAW,KAAO,KAAA,GAGxBC,KAAc,GAA+B,MACxDC,EAAKC,GAAWC,KAAA,SAA2B,KAAK,KAAA;AAYlD,SAAgBC,EAAe,EAC7B,UACA,UAAAC,GACA,iBACA,uBAAoB,YACpB,kBAAe,gBACoD;CACnE,IAAMC,IAAajB,KAAYS;CAC/B,OACE,kBAAAR,GAAA,EAAA,UAAA;EACGkB;EACAF,KAAcG,MAAsB,cACnC,kBAAC,QAAD;GAAM,eAAA;GAAY,WAAW;GAAiB,UAAA;EAExC,CAAA;EAEP,CAACH,KAAcG,MAAsB,mBACpC,kBAAAnB,GAAA,EAAA,UAAA,CACG,KACD,kBAAC,QAAD;GAAM,WAAW;GAAkB,UAAAoB;EAAmB,CAAA,CACtD,EAAA,CAAA;CAEJ,EAAA,CAAA;AAEN;AAEA,IAAaC,KAAY,MAAqBC,KAAS,QAAQA,MAAU,MAASA,MAAU;AAM5F,SAAgBrB,EAAM,EACpB,OAAAuB,GACA,gBACA,UACA,aACA,iBACA,sBACA,iBACA,cACA,cACA,aACA,GAAGC,KACU;CACb,IAAMC,IAAUL,EAASC,CAAK;CAC9B,OACE,kBAACpB,EAAU,MAAX;EACE,GAAIuB;EACJ,SAASC,KAAW,KAAA;EACpB,WAAWf,EAAKR,GAAaS,CAAS;EAHxC,UAAA;GAKGR,KAAS,QACR,kBAACF,EAAU,OAAX;IAAiB,WAAWQ,EAAW,WAAcG,CAAS;IAC5D,UAAA,kBAACC,GAAD;KACS,OAAAU;KACG;KACI;KACK;KACL;IACf,CAAA;GACc,CAAA;GAElBK;GACD,kBAACC,GAAD;IAA4B;IAAoB;GAAQ,CAAA;EAC1C;;AAEpB;AAGA,SAAgBA,EAAc,EAC5B,aAAAC,GACA,OAAAC,GACA,UAGC;CACD,OACE,kBAAAhC,GAAA,EAAA,UAAA,CACGK,KAAe,QACd,kBAACH,EAAU,aAAX;EACE,IAAI+B,GAAK;EACT,QAAQ,kBAAC,OAAD,CAAM,CAAA;EACd,WAAW;EAEV,UAAA5B;CACoB,CAAA,GAExBgB,EAASf,CAAK,KACb,kBAACJ,EAAU,OAAX;EAAiB,IAAI+B,GAAK;EAAO,OAAA;EAAM,WAAW;EAAlD,UAAA,CACE,kBAACC,GAAD;GAAa,MAAK;GAAS,eAAA;GAAY,WAAW;EAAmB,CAAA,GACrE,kBAAC,QAAD,EAAA,UAAO5B,EAAY,CAAA,CACJ;CAEnB,CAAA,CAAA,EAAA,CAAA;AAEN"}
@@ -0,0 +1,6 @@
1
+ /* empty css */
2
+ // src/components/Field/Field.css.ts
3
+ var e = "oe0y261", t = "oe0y262", n = "oe0y263", r = "oe0y264", i = "oe0y265", a = "oe0y266", o = "oe0y267", s = "oe0y268", c = "oe0y269", l = "oe0y26a oe0y262";
4
+ export { i as description, a as error, o as errorIcon, c as fieldset, s as inlineLabel, t as label, l as legend, r as optional, n as required, e as root };
5
+
6
+ //# sourceMappingURL=Field.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.styles.js","names":["root","label","required","optional","description","error","errorIcon","inlineLabel","fieldset","legend"],"sources":["../../../src/components/Field/Field.css.ts"],"sourcesContent":["import { createVar, style } from '@vanilla-extract/css'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight, space } from '../../tokens/scale'\n\n/** Indents the description and error, e.g. to line up with a checkbox's label text. */\nexport const messageInset = createVar()\n\nexport const root = style({\n vars: { [messageInset]: '0px' },\n display: 'flex',\n flexDirection: 'column',\n gap: space['1.5'],\n minWidth: 0,\n fontFamily: vars.font.sans,\n color: vars.color.ink,\n})\n\nexport const label = style({\n display: 'inline-flex',\n alignItems: 'center',\n gap: space['2'],\n fontSize: fontSize.md,\n fontWeight: fontWeight.medium,\n lineHeight: lineHeight.tight,\n color: vars.color.ink,\n wordBreak: 'break-word',\n selectors: { '&[data-disabled]': { color: vars.color.inkMuted } },\n})\n\nexport const required = style({ color: vars.color.dangerInk, marginInlineStart: `-${space['1']}` })\n\nexport const optional = style({ fontWeight: fontWeight.normal, color: vars.color.inkMuted })\n\nexport const description = style({\n margin: 0,\n paddingInlineStart: messageInset,\n fontSize: fontSize.md,\n lineHeight: lineHeight.normal,\n color: vars.color.inkMuted,\n})\n\nexport const error = style({\n display: 'flex',\n paddingInlineStart: messageInset,\n alignItems: 'flex-start',\n gap: space['1.5'],\n fontSize: fontSize.sm,\n lineHeight: lineHeight.normal,\n color: vars.color.dangerInk,\n})\n\nexport const errorIcon = style({ flexShrink: 0, marginBlockStart: '0.15em' })\n\n/** A label wrapping a checkbox, switch or radio and its text. */\nexport const inlineLabel = style({\n display: 'inline-flex',\n alignItems: 'center',\n gap: space['2.5'],\n alignSelf: 'flex-start',\n fontSize: fontSize.md,\n lineHeight: lineHeight.normal,\n color: vars.color.ink,\n cursor: 'pointer',\n selectors: { '&[data-disabled]': { cursor: 'not-allowed', color: vars.color.inkMuted } },\n})\n\n/** A `<fieldset>` reset to lay out like a field. */\nexport const fieldset = style({\n display: 'flex',\n flexDirection: 'column',\n gap: space['1.5'],\n minWidth: 0,\n margin: 0,\n padding: 0,\n border: 0,\n})\n\nexport const legend = style([label, { padding: 0 }])\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { Field } from './Field';
2
+ export type { DataAttributes, FieldBaseProps, FieldIndicatorProps, FieldLabelProps, FieldOptionProps, FieldProps, FieldRootProps, PartProps, RequiredIndicator, } from './Field';
@@ -0,0 +1,6 @@
1
+ /** Each top-level fieldset is its own card. */
2
+ export declare const fieldset: string;
3
+ export declare const legend: string;
4
+ export declare const description: string;
5
+ /** The fields, under a hairline. */
6
+ export declare const body: string;
@@ -0,0 +1,10 @@
1
+ import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
2
+ import { ReactNode } from 'react';
3
+ export interface FieldsetProps extends Omit<BaseFieldset.Root.Props, 'className'> {
4
+ /** The card's title. */
5
+ legend: ReactNode;
6
+ description?: ReactNode;
7
+ className?: string;
8
+ }
9
+ /** A titled card of related fields. Nested fieldsets render as an indented group instead of a card. */
10
+ export declare function Fieldset({ legend, description, className, children, ...props }: FieldsetProps): import('react').JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { body as e, fieldset as t, legend as n } from "./Fieldset.styles.js";
2
+ import { useId as r } from "react";
3
+ import { clsx as i } from "clsx";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import { Fieldset as s } from "@base-ui/react/fieldset";
6
+ // src/components/Fieldset/Fieldset.tsx
7
+ function c({ legend: c, description: l, className: u, children: d, ...f }) {
8
+ let p = r();
9
+ return /* @__PURE__ */ o(s.Root, {
10
+ "aria-describedby": l == null ? void 0 : p,
11
+ ...f,
12
+ className: i(t, u),
13
+ children: [
14
+ /* @__PURE__ */ a(s.Legend, {
15
+ className: n,
16
+ children: c
17
+ }),
18
+ l != null && /* @__PURE__ */ a("div", {
19
+ id: p,
20
+ className: "_1n1f3hg2",
21
+ children: l
22
+ }),
23
+ /* @__PURE__ */ a("div", {
24
+ className: e,
25
+ children: d
26
+ })
27
+ ]
28
+ });
29
+ }
30
+ export { c as Fieldset };
31
+
32
+ //# sourceMappingURL=Fieldset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fieldset.js","names":["Fieldset","BaseFieldset","description","styles.fieldset","styles.legend","legend","styles.body","Fieldset$1","legend$1","description$1","props","descriptionId","useId","Fieldset","clsx","fieldset","className","legend","body"],"sources":["../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'\nimport { clsx } from 'clsx'\nimport { useId, type ReactNode } from 'react'\n\nimport * as styles from './Fieldset.css'\n\nexport interface FieldsetProps extends Omit<BaseFieldset.Root.Props, 'className'> {\n /** The card's title. */\n legend: ReactNode\n description?: ReactNode\n className?: string\n}\n\n/** A titled card of related fields. Nested fieldsets render as an indented group instead of a card. */\nexport function Fieldset({ legend, description, className, children, ...props }: FieldsetProps) {\n const descriptionId = useId()\n return (\n <BaseFieldset.Root\n aria-describedby={description != null ? descriptionId : undefined}\n {...props}\n className={clsx(styles.fieldset, className)}\n >\n <BaseFieldset.Legend className={styles.legend}>{legend}</BaseFieldset.Legend>\n {description != null && (\n <div id={descriptionId} className={styles.description}>\n {description}\n </div>\n )}\n <div className={styles.body}>{children}</div>\n </BaseFieldset.Root>\n )\n}\n"],"mappings":";;;;;;AAcA,SAAgBA,EAAS,EAAE,QAAAQ,GAAQ,aAAAC,GAAa,cAAW,aAAU,GAAGC,KAAwB;CAC9F,IAAMC,IAAgBC,EAAM;CAC5B,OACE,kBAACX,EAAa,MAAd;EACE,oBAAkBC,KAAe,OAAuB,KAAA,IAAhBS;EACxC,GAAID;EACJ,WAAWI,EAAKX,GAAiBa,CAAS;EAH5C,UAAA;GAKE,kBAACf,EAAa,QAAd;IAAqB,WAAWG;IAAgB,UAAAC;GAA4B,CAAA;GAC3EH,KAAe,QACd,kBAAC,OAAD;IAAK,IAAIS;IAAe,WAAW;IAChC,UAAAT;GACE,CAAA;GAEP,kBAAC,OAAD;IAAK,WAAWI;IAAc;GAAc,CAAA;EAC3B;;AAEvB"}
@@ -0,0 +1,6 @@
1
+ /* empty css */
2
+ // src/components/Fieldset/Fieldset.css.ts
3
+ var e = "_1n1f3hg0", t = "_1n1f3hg1", n = "_1n1f3hg2", r = "_1n1f3hg3";
4
+ export { r as body, n as description, e as fieldset, t as legend };
5
+
6
+ //# sourceMappingURL=Fieldset.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fieldset.styles.js","names":["fieldset","legend","description","body"],"sources":["../../../src/components/Fieldset/Fieldset.css.ts"],"sourcesContent":["import { globalStyle, style } from '@vanilla-extract/css'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight, radius, space } from '../../tokens/scale'\n\n/** Each top-level fieldset is its own card. */\nexport const fieldset = style({\n minWidth: 0,\n margin: 0,\n padding: space['6'],\n border: `1px solid ${vars.color.border}`,\n borderRadius: radius.xl,\n backgroundColor: vars.color.surface,\n color: vars.color.ink,\n fontFamily: vars.font.sans,\n})\n\n// Floated so it sits inside the card rather than in a notch in the border.\nexport const legend = style({\n float: 'left',\n width: '100%',\n padding: 0,\n fontSize: fontSize.lg,\n fontWeight: fontWeight.semibold,\n lineHeight: lineHeight.tight,\n})\n\nexport const description = style({\n clear: 'both',\n margin: 0,\n paddingTop: space['1'],\n maxWidth: '80ch',\n fontSize: fontSize.sm,\n lineHeight: lineHeight.normal,\n color: vars.color.inkMuted,\n})\n\n/** The fields, under a hairline. */\nexport const body = style({\n clear: 'both',\n display: 'flex',\n flexDirection: 'column',\n gap: space['5'],\n marginTop: space['4'],\n paddingTop: space['5'],\n borderTop: `1px solid ${vars.color.border}`,\n})\n\n// A fieldset inside another is marked by a rule down its left, not another card.\nglobalStyle(`${fieldset} ${fieldset}`, {\n padding: `${space['0.5']} 0 ${space['0.5']} ${space['4']}`,\n border: 'none',\n borderLeft: `2px solid ${vars.color.border}`,\n borderRadius: 0,\n background: 'none',\n})\nglobalStyle(`${fieldset} ${fieldset} ${body}`, {\n marginTop: space['3'],\n paddingTop: 0,\n borderTop: 'none',\n})\nglobalStyle(`${fieldset} ${fieldset} ${legend}`, { fontSize: fontSize.md })\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { Fieldset } from './Fieldset';
2
+ export type { FieldsetProps } from './Fieldset';
@@ -0,0 +1,21 @@
1
+ import { RecipeVariants } from '@vanilla-extract/recipes';
2
+ export declare const heading: import('@vanilla-extract/recipes').RuntimeFn<{
3
+ size: {
4
+ xs: {
5
+ fontSize: string;
6
+ };
7
+ sm: {
8
+ fontSize: string;
9
+ };
10
+ md: {
11
+ fontSize: string;
12
+ };
13
+ lg: {
14
+ fontSize: string;
15
+ };
16
+ xl: {
17
+ fontSize: string;
18
+ };
19
+ };
20
+ }>;
21
+ export type HeadingVariants = NonNullable<RecipeVariants<typeof heading>>;
@@ -0,0 +1,11 @@
1
+ import { ComponentProps } from 'react';
2
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3
+ export type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export interface HeadingProps extends ComponentProps<'h2'> {
5
+ /** Document outline level (`h1`–`h6`). */
6
+ level: HeadingLevel;
7
+ /** Visual size, independent of `level`. Defaults to the size for the level. */
8
+ size?: HeadingSize;
9
+ }
10
+ /** Section heading. `level` sets the semantic h1–h6; `size` sets the look independently. Pages get their h1 from `PageHeader`. */
11
+ export declare function Heading({ level, size, className, ...props }: HeadingProps): import('react').JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { heading as e } from "./Heading.styles.js";
2
+ import { clsx as t } from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ // src/components/Heading/Heading.tsx
5
+ var r = {
6
+ 1: "xl",
7
+ 2: "lg",
8
+ 3: "md",
9
+ 4: "sm",
10
+ 5: "xs",
11
+ 6: "xs"
12
+ };
13
+ function i({ level: i, size: a, className: o, ...s }) {
14
+ let c = `h${i}`;
15
+ return /* @__PURE__ */ n(c, {
16
+ className: t(e({ size: a ?? r[i] }), o),
17
+ ...s
18
+ });
19
+ }
20
+ export { i as Heading };
21
+
22
+ //# sourceMappingURL=Heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heading.js","names":["styles.heading","sizeForLevel","Heading","props","Tag","level","clsx","heading","size","className"],"sources":["../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps } from 'react'\n\nimport * as styles from './Heading.css'\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\nexport type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst sizeForLevel: Record<HeadingLevel, HeadingSize> = {\n 1: 'xl',\n 2: 'lg',\n 3: 'md',\n 4: 'sm',\n 5: 'xs',\n 6: 'xs',\n}\n\nexport interface HeadingProps extends ComponentProps<'h2'> {\n /** Document outline level (`h1`–`h6`). */\n level: HeadingLevel\n /** Visual size, independent of `level`. Defaults to the size for the level. */\n size?: HeadingSize\n}\n\n/** Section heading. `level` sets the semantic h1–h6; `size` sets the look independently. Pages get their h1 from `PageHeader`. */\nexport function Heading({ level, size, className, ...props }: HeadingProps) {\n const Tag = `h${level}` as const\n return (\n <Tag\n className={clsx(styles.heading({ size: size ?? sizeForLevel[level] }), className)}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAQA,IAAMC,IAAkD;CACtD,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAUA,SAAgBC,EAAQ,EAAE,UAAO,SAAM,cAAW,GAAGC,KAAuB;CAC1E,IAAMC,IAAM,IAAIC;CAChB,OACE,kBAACD,GAAD;EACE,WAAWE,EAAKN,EAAe,EAAE,MAAMQ,KAAQP,EAAaI,GAAO,CAAC,GAAGI,CAAS;EAChF,GAAIN;CACL,CAAA;AAEL"}
@@ -0,0 +1,18 @@
1
+ /* empty css */
2
+ import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ // src/components/Heading/Heading.css.ts
4
+ var t = e({
5
+ defaultClassName: "_1votls70",
6
+ variantClassNames: { size: {
7
+ xs: "_1votls71",
8
+ sm: "_1votls72",
9
+ md: "_1votls73",
10
+ lg: "_1votls74",
11
+ xl: "_1votls75"
12
+ } },
13
+ defaultVariants: {},
14
+ compoundVariants: []
15
+ });
16
+ export { t as heading };
17
+
18
+ //# sourceMappingURL=Heading.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heading.styles.js","names":["_7a468","heading","createRuntimeFn"],"sources":["../../../src/components/Heading/Heading.css.ts"],"sourcesContent":["import { recipe, type RecipeVariants } from '@vanilla-extract/recipes'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, fontWeight, lineHeight } from '../../tokens/scale'\n\nexport const heading = recipe({\n base: {\n margin: 0,\n fontFamily: vars.font.sans,\n fontWeight: fontWeight.semibold,\n lineHeight: lineHeight.tight,\n color: vars.color.ink,\n },\n variants: {\n size: {\n xs: { fontSize: fontSize.md },\n sm: { fontSize: fontSize.lg },\n md: { fontSize: fontSize.xl },\n lg: { fontSize: fontSize['2xl'] },\n xl: { fontSize: fontSize['3xl'] },\n },\n },\n})\n\nexport type HeadingVariants = NonNullable<RecipeVariants<typeof heading>>\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { Heading } from './Heading';
2
+ export type { HeadingLevel, HeadingProps, HeadingSize } from './Heading';
@@ -0,0 +1 @@
1
+ export declare const icon: string;
@@ -0,0 +1,24 @@
1
+ import { LucideIcon, LucideProps } from 'lucide-react';
2
+ declare const sizes: {
3
+ readonly xs: "0.75rem";
4
+ readonly sm: "1rem";
5
+ readonly md: "1.25rem";
6
+ readonly lg: "1.5rem";
7
+ };
8
+ /**
9
+ * A named size (rem, so it scales with the text-size setting), a CSS length such as `'1.2em'`
10
+ * (em follows the surrounding text), or a number. Numbers are px at the 16px base and are
11
+ * converted to rem; they're kept for backward compatibility, so prefer the strings.
12
+ */
13
+ export type IconSize = keyof typeof sizes | `${number}${'em' | 'rem'}` | 12 | 14 | 16 | 20 | 24;
14
+ export interface IconProps extends Omit<LucideProps, 'size'> {
15
+ /** A lucide-react icon component, e.g. `Play`. */
16
+ icon: LucideIcon;
17
+ /** `xs` 0.75rem, `sm` 1rem, `md` 1.25rem (default), `lg` 1.5rem, an em/rem length, or px (deprecated). */
18
+ size?: IconSize;
19
+ /** Accessible name. Without it the icon is decorative and hidden from assistive tech. */
20
+ label?: string;
21
+ }
22
+ /** Renders a lucide-react icon at a token size. Decorative unless `label` is given. */
23
+ export declare function Icon({ icon: Glyph, size, label, className, ...props }: IconProps): import('react').JSX.Element;
24
+ export {};
@@ -0,0 +1,24 @@
1
+ import { icon as e } from "./Icon.styles.js";
2
+ import { clsx as t } from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ // src/components/Icon/Icon.tsx
5
+ var r = {
6
+ xs: "0.75rem",
7
+ sm: "1rem",
8
+ md: "1.25rem",
9
+ lg: "1.5rem"
10
+ }, i = (e) => `${+(e / 16).toFixed(4)}rem`;
11
+ function a({ icon: a, size: o = "md", label: s, className: c, ...l }) {
12
+ return /* @__PURE__ */ n(a, {
13
+ size: typeof o == "number" ? i(o) : o in r ? r[o] : o,
14
+ role: s ? "img" : void 0,
15
+ "aria-label": s,
16
+ "aria-hidden": !s || void 0,
17
+ focusable: !1,
18
+ className: t(e, c),
19
+ ...l
20
+ });
21
+ }
22
+ export { a as Icon };
23
+
24
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","names":["styles.icon","sizes","toRem","px","Icon","Glyph","props","size","label","clsx","icon","className"],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { LucideIcon, LucideProps } from 'lucide-react'\n\nimport * as styles from './Icon.css'\n\nconst sizes = { xs: '0.75rem', sm: '1rem', md: '1.25rem', lg: '1.5rem' } as const\n\n/**\n * A named size (rem, so it scales with the text-size setting), a CSS length such as `'1.2em'`\n * (em follows the surrounding text), or a number. Numbers are px at the 16px base and are\n * converted to rem; they're kept for backward compatibility, so prefer the strings.\n */\nexport type IconSize = keyof typeof sizes | `${number}${'em' | 'rem'}` | 12 | 14 | 16 | 20 | 24\n\nconst toRem = (px: number) => `${+(px / 16).toFixed(4)}rem`\n\nexport interface IconProps extends Omit<LucideProps, 'size'> {\n /** A lucide-react icon component, e.g. `Play`. */\n icon: LucideIcon\n /** `xs` 0.75rem, `sm` 1rem, `md` 1.25rem (default), `lg` 1.5rem, an em/rem length, or px (deprecated). */\n size?: IconSize\n /** Accessible name. Without it the icon is decorative and hidden from assistive tech. */\n label?: string\n}\n\n/** Renders a lucide-react icon at a token size. Decorative unless `label` is given. */\nexport function Icon({ icon: Glyph, size = 'md', label, className, ...props }: IconProps) {\n return (\n <Glyph\n size={\n typeof size === 'number'\n ? toRem(size)\n : size in sizes\n ? sizes[size as keyof typeof sizes]\n : size\n }\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n focusable={false}\n className={clsx(styles.icon, className)}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAKA,IAAMC,IAAQ;CAAE,IAAI;CAAW,IAAI;CAAQ,IAAI;CAAW,IAAI;AAAS,GASjEC,KAAS,MAAe,GAAG,EAAEC,IAAK,GAAA,CAAI,QAAQ,CAAC,EAAE;AAYvD,SAAgBC,EAAK,EAAE,MAAMC,GAAO,UAAO,MAAM,UAAO,cAAW,GAAGC,KAAoB;CACxF,OACE,kBAACD,GAAD;EACE,MACE,OAAOE,KAAS,WACZL,EAAMK,CAAI,IACVA,KAAQN,IACNA,EAAMM,KACNA;EAER,MAAMC,IAAQ,QAAQ,KAAA;EACtB,cAAYA;EACZ,eAAa,MAAQ,KAAA;EACrB,WAAW;EACX,WAAWC,EAAKT,GAAaW,CAAS;EACtC,GAAIL;CACL,CAAA;AAEL"}
@@ -0,0 +1,6 @@
1
+ /* empty css */
2
+ // src/components/Icon/Icon.css.ts
3
+ var e = "_2z1chg0";
4
+ export { e as icon };
5
+
6
+ //# sourceMappingURL=Icon.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.styles.js","names":["icon"],"sources":["../../../src/components/Icon/Icon.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css'\n\nexport const icon = style({ flexShrink: 0, verticalAlign: 'middle' })\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { Icon } from './Icon';
2
+ export type { IconProps, IconSize } from './Icon';
@@ -0,0 +1,4 @@
1
+ export declare const wrapper: string;
2
+ export declare const list: string;
3
+ export declare const row: string;
4
+ export declare const empty: string;
@@ -0,0 +1,12 @@
1
+ import { ComponentProps, Key, ReactNode } from 'react';
2
+ export interface ListProps<T> extends Omit<ComponentProps<'div'>, 'children'> {
3
+ items?: readonly T[] | null;
4
+ /** Row content. Defaults to the item itself, so strings need no template. */
5
+ renderItem?: (item: T, index: number) => ReactNode;
6
+ /** Row key. Defaults to the item if it's a string, else its JSON. */
7
+ getKey?: (item: T, index: number) => Key;
8
+ /** Shown when there are no items. */
9
+ emptyState?: ReactNode;
10
+ }
11
+ /** Simple list with a built-in empty state. */
12
+ export declare function List<T>({ items, renderItem, getKey, emptyState, className, ...props }: ListProps<T>): import('react').JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { EmptyLine as e } from "../EmptyLine/EmptyLine.js";
2
+ import { empty as t, list as n, row as r, wrapper as i } from "./List.styles.js";
3
+ import { clsx as a } from "clsx";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ // src/components/List/List.tsx
6
+ var s = (e) => typeof e == "string" ? e : JSON.stringify(e);
7
+ function c({ items: c, renderItem: l = (e) => e, getKey: u = s, emptyState: d = "No items", className: f, ...p }) {
8
+ return /* @__PURE__ */ o("div", {
9
+ className: a(i, f),
10
+ ...p,
11
+ children: c?.length ? /* @__PURE__ */ o("ul", {
12
+ className: n,
13
+ children: c.map((e, t) => /* @__PURE__ */ o("li", {
14
+ className: r,
15
+ children: l(e, t)
16
+ }, u(e, t)))
17
+ }) : /* @__PURE__ */ o("div", {
18
+ className: t,
19
+ children: /* @__PURE__ */ o(e, {
20
+ bare: !0,
21
+ children: d
22
+ })
23
+ })
24
+ });
25
+ }
26
+ export { c as List };
27
+
28
+ //# sourceMappingURL=List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.js","names":["styles.wrapper","styles.list","styles.row","styles.empty","defaultKey","item","List","props","clsx","wrapper","className","items","list","row","renderItem","index","getKey","empty","EmptyLine","emptyState"],"sources":["../../../src/components/List/List.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps, Key, ReactNode } from 'react'\n\nimport { EmptyLine } from '../EmptyLine'\nimport * as styles from './List.css'\n\nexport interface ListProps<T> extends Omit<ComponentProps<'div'>, 'children'> {\n items?: readonly T[] | null\n /** Row content. Defaults to the item itself, so strings need no template. */\n renderItem?: (item: T, index: number) => ReactNode\n /** Row key. Defaults to the item if it's a string, else its JSON. */\n getKey?: (item: T, index: number) => Key\n /** Shown when there are no items. */\n emptyState?: ReactNode\n}\n\nconst defaultKey = (item: unknown): Key => (typeof item === 'string' ? item : JSON.stringify(item))\n\n/** Simple list with a built-in empty state. */\nexport function List<T>({\n items,\n renderItem = (item) => item as ReactNode,\n getKey = defaultKey,\n emptyState = 'No items',\n className,\n ...props\n}: ListProps<T>) {\n return (\n <div className={clsx(styles.wrapper, className)} {...props}>\n {items?.length ? (\n <ul className={styles.list}>\n {items.map((item, index) => (\n <li key={getKey(item, index)} className={styles.row}>\n {renderItem(item, index)}\n </li>\n ))}\n </ul>\n ) : (\n <div className={styles.empty}>\n <EmptyLine bare>{emptyState}</EmptyLine>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;AAgBA,IAAMI,KAAc,MAAwB,OAAOC,KAAS,WAAWA,IAAO,KAAK,UAAUA,CAAI;AAGjG,SAAgBC,EAAQ,EACtB,UACA,iBAAc,MAASD,GACvB,YAASD,GACT,gBAAa,YACb,cACA,GAAGG,KACY;CACf,OACE,kBAAC,OAAD;EAAK,WAAWC,EAAKR,GAAgBU,CAAS;EAAG,GAAIH;EAClD,UAAAI,GAAO,SACN,kBAAC,MAAD;GAAI,WAAWV;GACZ,UAAAU,EAAM,KAAK,GAAM,MAChB,kBAAC,MAAD;IAA8B,WAAWT;IACtC,UAAAY,EAAWT,GAAMU,CAAK;GACrB,GAFKC,EAAOX,GAAMU,CAAK,CAEvB,CACL;EACC,CAAA,IAEJ,kBAAC,OAAD;GAAK,WAAWZ;GACd,UAAA,kBAACe,GAAD;IAAW,MAAA;IAAM,UAAAC;GAAsB,CAAA;EACpC,CAAA;CAEJ,CAAA;AAET"}
@@ -0,0 +1,6 @@
1
+ /* empty css */
2
+ // src/components/List/List.css.ts
3
+ var e = "_1ou5d5l0", t = "_1ou5d5l1", n = "_1ou5d5l2", r = "_1ou5d5l3";
4
+ export { r as empty, t as list, n as row, e as wrapper };
5
+
6
+ //# sourceMappingURL=List.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.styles.js","names":["wrapper","list","row","empty"],"sources":["../../../src/components/List/List.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css'\n\nimport { vars } from '../../tokens/contract.css'\nimport { fontSize, radius, space } from '../../tokens/scale'\n\nexport const wrapper = style({\n border: `1px solid ${vars.color.border}`,\n borderRadius: radius.xl,\n backgroundColor: vars.color.surface,\n color: vars.color.ink,\n fontFamily: vars.font.sans,\n fontSize: fontSize.md,\n})\n\nexport const list = style({ listStyle: 'none', margin: 0, padding: 0 })\n\nexport const row = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: space['3'],\n paddingBlock: space['2.5'],\n paddingInline: space['4'],\n borderBottom: `1px solid ${vars.color.border}`,\n selectors: { '&:last-child': { borderBottom: 'none' } },\n})\n\nexport const empty = style({ paddingBlock: space['2.5'], paddingInline: space['4'] })\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { List } from './List';
2
+ export type { ListProps } from './List';
@@ -0,0 +1 @@
1
+ export declare const loader: string;
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface LoaderProps extends ComponentProps<'span'> {
3
+ /**
4
+ * Diameter as a CSS length, e.g. `'1em'` to match the surrounding text. Numbers are px at the
5
+ * 16px base, converted to rem so they scale with the text-size setting.
6
+ */
7
+ size?: number | string;
8
+ /** Accessible label. Pass `null` when a visible label sits next to it. */
9
+ label?: string | null;
10
+ }
11
+ /** Indeterminate spinner. Inherits the current text colour. */
12
+ export declare function Loader({ size, label, className, style, ...props }: LoaderProps): import('react').JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { loader as e } from "./Loader.styles.js";
2
+ import { clsx as t } from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ // src/components/Loader/Loader.tsx
5
+ var r = (e) => `${+(e / 16).toFixed(4)}rem`;
6
+ function i({ size: i = "1rem", label: a = "Loading", className: o, style: s, ...c }) {
7
+ let l = typeof i == "number" ? r(i) : i;
8
+ return /* @__PURE__ */ n("span", {
9
+ role: a ? "status" : void 0,
10
+ "aria-label": a ?? void 0,
11
+ "aria-hidden": !a || void 0,
12
+ className: t(e, o),
13
+ style: {
14
+ width: l,
15
+ height: l,
16
+ ...s
17
+ },
18
+ ...c
19
+ });
20
+ }
21
+ export { i as Loader };
22
+
23
+ //# sourceMappingURL=Loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loader.js","names":["styles.loader","toRem","px","Loader","props","length","size","label","clsx","loader","className","style"],"sources":["../../../src/components/Loader/Loader.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport type { ComponentProps } from 'react'\n\nimport * as styles from './Loader.css'\n\nexport interface LoaderProps extends ComponentProps<'span'> {\n /**\n * Diameter as a CSS length, e.g. `'1em'` to match the surrounding text. Numbers are px at the\n * 16px base, converted to rem so they scale with the text-size setting.\n */\n size?: number | string\n /** Accessible label. Pass `null` when a visible label sits next to it. */\n label?: string | null\n}\n\nconst toRem = (px: number) => `${+(px / 16).toFixed(4)}rem`\n\n/** Indeterminate spinner. Inherits the current text colour. */\nexport function Loader({\n size = '1rem',\n label = 'Loading',\n className,\n style,\n ...props\n}: LoaderProps) {\n const length = typeof size === 'number' ? toRem(size) : size\n return (\n <span\n role={label ? 'status' : undefined}\n aria-label={label ?? undefined}\n aria-hidden={label ? undefined : true}\n className={clsx(styles.loader, className)}\n style={{ width: length, height: length, ...style }}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAeA,IAAMC,KAAS,MAAe,GAAG,EAAEC,IAAK,GAAA,CAAI,QAAQ,CAAC,EAAE;AAGvD,SAAgBC,EAAO,EACrB,UAAO,QACP,WAAQ,WACR,cACA,UACA,GAAGC,KACW;CACd,IAAMC,IAAS,OAAOC,KAAS,WAAWL,EAAMK,CAAI,IAAIA;CACxD,OACE,kBAAC,QAAD;EACE,MAAMC,IAAQ,WAAW,KAAA;EACzB,cAAYA,KAAS,KAAA;EACrB,eAAa,MAAQ,KAAA;EACrB,WAAWC,EAAKR,GAAeU,CAAS;EACxC,OAAO;GAAE,OAAOL;GAAQ,QAAQA;GAAQ,GAAGM;EAAM;EACjD,GAAIP;CACL,CAAA;AAEL"}
@@ -0,0 +1,7 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ // src/components/Loader/Loader.css.ts
4
+ var e = "_2rmrcv0";
5
+ export { e as loader };
6
+
7
+ //# sourceMappingURL=Loader.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loader.styles.js","names":["loader"],"sources":["../../../src/components/Loader/Loader.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css'\n\nimport { spin } from '../../styles/shared.css'\n\nexport const loader = style({\n display: 'inline-block',\n flexShrink: 0,\n borderRadius: '50%',\n border: '2px solid currentColor',\n borderRightColor: 'transparent',\n animation: `${spin} 0.7s linear infinite`,\n '@media': { '(prefers-reduced-motion: reduce)': { animationDuration: '2s' } },\n})\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { Loader } from './Loader';
2
+ export type { LoaderProps } from './Loader';
@@ -0,0 +1,9 @@
1
+ export declare const popup: string;
2
+ export declare const item: string;
3
+ export declare const destructive: string;
4
+ export declare const separator: string;
5
+ /** Pushes a trailing icon (submenu chevron, check mark) to the end of the row. */
6
+ export declare const end: string;
7
+ export declare const groupLabel: string;
8
+ export declare const header: string;
9
+ export declare const footer: string;