aidos-ui 4.0.4 → 4.0.5

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 (376) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +23 -3
  3. package/dist/index.d.ts +797 -68
  4. package/dist/index.js +3868 -68
  5. package/dist/index.js.map +1 -1
  6. package/dist/jsx-dev-runtime.d.ts +6 -2
  7. package/dist/jsx-dev-runtime.js +87 -42
  8. package/dist/jsx-dev-runtime.js.map +1 -1
  9. package/dist/jsx-runtime.d.ts +1 -1
  10. package/dist/jsx-runtime.js +2 -2
  11. package/dist/jsx-runtime.js.map +1 -1
  12. package/dist/vite-plugin-jss-debug.d.ts +3 -1
  13. package/dist/vite-plugin-jss-debug.js +57 -74
  14. package/dist/vite-plugin-jss-debug.js.map +1 -1
  15. package/package.json +58 -27
  16. package/.prettierrc +0 -4
  17. package/CLAUDE.md +0 -72
  18. package/dist/Badge.d.ts +0 -6
  19. package/dist/Badge.js +0 -22
  20. package/dist/Badge.js.map +0 -1
  21. package/dist/BaseButton.d.ts +0 -14
  22. package/dist/BaseButton.js +0 -23
  23. package/dist/BaseButton.js.map +0 -1
  24. package/dist/BaseInput.d.ts +0 -14
  25. package/dist/BaseInput.js +0 -15
  26. package/dist/BaseInput.js.map +0 -1
  27. package/dist/BaseLink.d.ts +0 -18
  28. package/dist/BaseLink.js +0 -29
  29. package/dist/BaseLink.js.map +0 -1
  30. package/dist/BaseList.d.ts +0 -6
  31. package/dist/BaseList.js +0 -14
  32. package/dist/BaseList.js.map +0 -1
  33. package/dist/BaseListAddOn.d.ts +0 -5
  34. package/dist/BaseListAddOn.js +0 -7
  35. package/dist/BaseListAddOn.js.map +0 -1
  36. package/dist/BaseListItem.d.ts +0 -26
  37. package/dist/BaseListItem.js +0 -29
  38. package/dist/BaseListItem.js.map +0 -1
  39. package/dist/BaseView.d.ts +0 -12
  40. package/dist/BaseView.js +0 -26
  41. package/dist/BaseView.js.map +0 -1
  42. package/dist/Box.d.ts +0 -4
  43. package/dist/Box.js +0 -6
  44. package/dist/Box.js.map +0 -1
  45. package/dist/Button.d.ts +0 -20
  46. package/dist/Button.js +0 -19
  47. package/dist/Button.js.map +0 -1
  48. package/dist/Calendar.d.ts +0 -18
  49. package/dist/Calendar.js +0 -57
  50. package/dist/Calendar.js.map +0 -1
  51. package/dist/Card.d.ts +0 -4
  52. package/dist/Card.js +0 -14
  53. package/dist/Card.js.map +0 -1
  54. package/dist/Checkbox.d.ts +0 -11
  55. package/dist/Checkbox.js +0 -32
  56. package/dist/Checkbox.js.map +0 -1
  57. package/dist/Circle.d.ts +0 -5
  58. package/dist/Circle.js +0 -12
  59. package/dist/Circle.js.map +0 -1
  60. package/dist/Column.d.ts +0 -6
  61. package/dist/Column.js +0 -7
  62. package/dist/Column.js.map +0 -1
  63. package/dist/DarkMode.d.ts +0 -13
  64. package/dist/DarkMode.js +0 -62
  65. package/dist/DarkMode.js.map +0 -1
  66. package/dist/DateInput.d.ts +0 -13
  67. package/dist/DateInput.js +0 -29
  68. package/dist/DateInput.js.map +0 -1
  69. package/dist/DatePicker.d.ts +0 -11
  70. package/dist/DatePicker.js +0 -34
  71. package/dist/DatePicker.js.map +0 -1
  72. package/dist/DatetimeInput.d.ts +0 -13
  73. package/dist/DatetimeInput.js +0 -31
  74. package/dist/DatetimeInput.js.map +0 -1
  75. package/dist/DesignBook.d.ts +0 -1
  76. package/dist/DesignBook.js +0 -55
  77. package/dist/DesignBook.js.map +0 -1
  78. package/dist/Dialog.d.ts +0 -17
  79. package/dist/Dialog.js +0 -92
  80. package/dist/Dialog.js.map +0 -1
  81. package/dist/Dropdown.d.ts +0 -14
  82. package/dist/Dropdown.js +0 -65
  83. package/dist/Dropdown.js.map +0 -1
  84. package/dist/Emitter.d.ts +0 -6
  85. package/dist/Emitter.js +0 -19
  86. package/dist/Emitter.js.map +0 -1
  87. package/dist/FlexLayout.d.ts +0 -11
  88. package/dist/FlexLayout.js +0 -18
  89. package/dist/FlexLayout.js.map +0 -1
  90. package/dist/Icon.d.ts +0 -12
  91. package/dist/Icon.js +0 -60
  92. package/dist/Icon.js.map +0 -1
  93. package/dist/IconButton.d.ts +0 -11
  94. package/dist/IconButton.js +0 -34
  95. package/dist/IconButton.js.map +0 -1
  96. package/dist/IconLink.d.ts +0 -9
  97. package/dist/IconLink.js +0 -32
  98. package/dist/IconLink.js.map +0 -1
  99. package/dist/IconType.d.ts +0 -1
  100. package/dist/IconType.js +0 -2
  101. package/dist/IconType.js.map +0 -1
  102. package/dist/Interactable.d.ts +0 -50
  103. package/dist/Interactable.js +0 -169
  104. package/dist/Interactable.js.map +0 -1
  105. package/dist/JSSComment.d.ts +0 -10
  106. package/dist/JSSComment.js +0 -52
  107. package/dist/JSSComment.js.map +0 -1
  108. package/dist/Link.d.ts +0 -22
  109. package/dist/Link.js +0 -29
  110. package/dist/Link.js.map +0 -1
  111. package/dist/List.d.ts +0 -15
  112. package/dist/List.js +0 -29
  113. package/dist/List.js.map +0 -1
  114. package/dist/ListButtonItem.d.ts +0 -14
  115. package/dist/ListButtonItem.js +0 -11
  116. package/dist/ListButtonItem.js.map +0 -1
  117. package/dist/ListDivider.d.ts +0 -1
  118. package/dist/ListDivider.js +0 -12
  119. package/dist/ListDivider.js.map +0 -1
  120. package/dist/ListHeaderItem.d.ts +0 -10
  121. package/dist/ListHeaderItem.js +0 -15
  122. package/dist/ListHeaderItem.js.map +0 -1
  123. package/dist/ListItem.d.ts +0 -9
  124. package/dist/ListItem.js +0 -9
  125. package/dist/ListItem.js.map +0 -1
  126. package/dist/ListLinkItem.d.ts +0 -16
  127. package/dist/ListLinkItem.js +0 -11
  128. package/dist/ListLinkItem.js.map +0 -1
  129. package/dist/ListSpacer.d.ts +0 -1
  130. package/dist/ListSpacer.js +0 -13
  131. package/dist/ListSpacer.js.map +0 -1
  132. package/dist/MenuIcon.d.ts +0 -5
  133. package/dist/MenuIcon.js +0 -31
  134. package/dist/MenuIcon.js.map +0 -1
  135. package/dist/NextJSRouter.d.ts +0 -1
  136. package/dist/NextJSRouter.js +0 -37
  137. package/dist/NextJSRouter.js.map +0 -1
  138. package/dist/NextJSRouterState.d.ts +0 -38
  139. package/dist/NextJSRouterState.js +0 -111
  140. package/dist/NextJSRouterState.js.map +0 -1
  141. package/dist/OnVisible.d.ts +0 -5
  142. package/dist/OnVisible.js +0 -28
  143. package/dist/OnVisible.js.map +0 -1
  144. package/dist/Popover.d.ts +0 -22
  145. package/dist/Popover.js +0 -90
  146. package/dist/Popover.js.map +0 -1
  147. package/dist/ProgressBar.d.ts +0 -7
  148. package/dist/ProgressBar.js +0 -42
  149. package/dist/ProgressBar.js.map +0 -1
  150. package/dist/ProgressCircle.d.ts +0 -5
  151. package/dist/ProgressCircle.js +0 -12
  152. package/dist/ProgressCircle.js.map +0 -1
  153. package/dist/Providers.d.ts +0 -9
  154. package/dist/Providers.js +0 -16
  155. package/dist/Providers.js.map +0 -1
  156. package/dist/RangeInput.d.ts +0 -14
  157. package/dist/RangeInput.js +0 -32
  158. package/dist/RangeInput.js.map +0 -1
  159. package/dist/ResultOrError.d.ts +0 -13
  160. package/dist/ResultOrError.js +0 -7
  161. package/dist/ResultOrError.js.map +0 -1
  162. package/dist/RootView.d.ts +0 -5
  163. package/dist/RootView.js +0 -35
  164. package/dist/RootView.js.map +0 -1
  165. package/dist/Row.d.ts +0 -6
  166. package/dist/Row.js +0 -7
  167. package/dist/Row.js.map +0 -1
  168. package/dist/Select.d.ts +0 -9
  169. package/dist/Select.js +0 -17
  170. package/dist/Select.js.map +0 -1
  171. package/dist/StackContext.d.ts +0 -8
  172. package/dist/StackContext.js +0 -25
  173. package/dist/StackContext.js.map +0 -1
  174. package/dist/StaticCheckbox.d.ts +0 -16
  175. package/dist/StaticCheckbox.js +0 -48
  176. package/dist/StaticCheckbox.js.map +0 -1
  177. package/dist/Storage.d.ts +0 -13
  178. package/dist/Storage.js +0 -146
  179. package/dist/Storage.js.map +0 -1
  180. package/dist/Stream.d.ts +0 -9
  181. package/dist/Stream.js +0 -36
  182. package/dist/Stream.js.map +0 -1
  183. package/dist/Sublist.d.ts +0 -12
  184. package/dist/Sublist.js +0 -18
  185. package/dist/Sublist.js.map +0 -1
  186. package/dist/SubmitIconInput.d.ts +0 -8
  187. package/dist/SubmitIconInput.js +0 -25
  188. package/dist/SubmitIconInput.js.map +0 -1
  189. package/dist/Tabs.d.ts +0 -23
  190. package/dist/Tabs.js +0 -39
  191. package/dist/Tabs.js.map +0 -1
  192. package/dist/Text.d.ts +0 -25
  193. package/dist/Text.js +0 -52
  194. package/dist/Text.js.map +0 -1
  195. package/dist/TextArea.d.ts +0 -11
  196. package/dist/TextArea.js +0 -27
  197. package/dist/TextArea.js.map +0 -1
  198. package/dist/TextInput.d.ts +0 -15
  199. package/dist/TextInput.js +0 -61
  200. package/dist/TextInput.js.map +0 -1
  201. package/dist/TextInputWithState.d.ts +0 -8
  202. package/dist/TextInputWithState.js +0 -14
  203. package/dist/TextInputWithState.js.map +0 -1
  204. package/dist/TextPairing.d.ts +0 -21
  205. package/dist/TextPairing.js +0 -26
  206. package/dist/TextPairing.js.map +0 -1
  207. package/dist/TimeInput.d.ts +0 -15
  208. package/dist/TimeInput.js +0 -58
  209. package/dist/TimeInput.js.map +0 -1
  210. package/dist/Tooltip.d.ts +0 -11
  211. package/dist/Tooltip.js +0 -73
  212. package/dist/Tooltip.js.map +0 -1
  213. package/dist/aria.d.ts +0 -8
  214. package/dist/aria.js +0 -42
  215. package/dist/aria.js.map +0 -1
  216. package/dist/guid.d.ts +0 -1
  217. package/dist/guid.js +0 -7
  218. package/dist/guid.js.map +0 -1
  219. package/dist/hash.d.ts +0 -1
  220. package/dist/hash.js +0 -20
  221. package/dist/hash.js.map +0 -1
  222. package/dist/isServer.d.ts +0 -1
  223. package/dist/isServer.js +0 -4
  224. package/dist/isServer.js.map +0 -1
  225. package/dist/jss.d.ts +0 -122
  226. package/dist/jss.js +0 -515
  227. package/dist/jss.js.map +0 -1
  228. package/dist/numberToBase.d.ts +0 -1
  229. package/dist/numberToBase.js +0 -44
  230. package/dist/numberToBase.js.map +0 -1
  231. package/dist/stateMachineContextFactory.d.ts +0 -36
  232. package/dist/stateMachineContextFactory.js +0 -48
  233. package/dist/stateMachineContextFactory.js.map +0 -1
  234. package/dist/useCookie.d.ts +0 -9
  235. package/dist/useCookie.js +0 -67
  236. package/dist/useCookie.js.map +0 -1
  237. package/dist/useKeyboard.d.ts +0 -8
  238. package/dist/useKeyboard.js +0 -26
  239. package/dist/useKeyboard.js.map +0 -1
  240. package/dist/useNavigation.d.ts +0 -5
  241. package/dist/useNavigation.js +0 -79
  242. package/dist/useNavigation.js.map +0 -1
  243. package/dist/usePromise.d.ts +0 -1
  244. package/dist/usePromise.js +0 -12
  245. package/dist/usePromise.js.map +0 -1
  246. package/dist/useRefEffect.d.ts +0 -1
  247. package/dist/useRefEffect.js +0 -15
  248. package/dist/useRefEffect.js.map +0 -1
  249. package/jss-debug-loader.mjs +0 -44
  250. package/next-env.d.ts +0 -6
  251. package/next.config.js +0 -33
  252. package/scripts/embeddings.js +0 -93
  253. package/scripts/openai_embeddings.js +0 -100
  254. package/scripts/publish.js +0 -28
  255. package/scripts/test_embeddings.js +0 -47
  256. package/src/Badge.tsx +0 -36
  257. package/src/BaseButton.tsx +0 -62
  258. package/src/BaseInput.tsx +0 -63
  259. package/src/BaseLink.tsx +0 -80
  260. package/src/BaseList.tsx +0 -26
  261. package/src/BaseListAddOn.tsx +0 -10
  262. package/src/BaseListItem.tsx +0 -119
  263. package/src/BaseView.tsx +0 -57
  264. package/src/Box.tsx +0 -20
  265. package/src/Button.tsx +0 -90
  266. package/src/Calendar.tsx +0 -123
  267. package/src/Card.tsx +0 -30
  268. package/src/Checkbox.tsx +0 -63
  269. package/src/Circle.tsx +0 -24
  270. package/src/Column.tsx +0 -12
  271. package/src/DarkMode.tsx +0 -100
  272. package/src/DateInput.tsx +0 -63
  273. package/src/DatePicker.tsx +0 -67
  274. package/src/DatetimeInput.tsx +0 -64
  275. package/src/DesignBook.tsx +0 -677
  276. package/src/Dialog.tsx +0 -150
  277. package/src/Dropdown.tsx +0 -146
  278. package/src/Emitter.ts +0 -26
  279. package/src/FlexLayout.tsx +0 -53
  280. package/src/Icon.tsx +0 -80
  281. package/src/IconButton.tsx +0 -81
  282. package/src/IconLink.tsx +0 -59
  283. package/src/IconType.ts +0 -787
  284. package/src/Interactable.tsx +0 -210
  285. package/src/JSSComment.tsx +0 -56
  286. package/src/Link.tsx +0 -110
  287. package/src/List.tsx +0 -58
  288. package/src/ListButtonItem.tsx +0 -69
  289. package/src/ListDivider.tsx +0 -13
  290. package/src/ListHeaderItem.tsx +0 -45
  291. package/src/ListItem.tsx +0 -24
  292. package/src/ListLinkItem.tsx +0 -76
  293. package/src/ListSpacer.tsx +0 -14
  294. package/src/MenuIcon.tsx +0 -50
  295. package/src/NextJSRouter.tsx +0 -60
  296. package/src/NextJSRouterState.tsx +0 -154
  297. package/src/OnVisible.tsx +0 -42
  298. package/src/Popover.tsx +0 -145
  299. package/src/ProgressBar.tsx +0 -63
  300. package/src/ProgressCircle.tsx +0 -38
  301. package/src/Providers.tsx +0 -33
  302. package/src/RangeInput.tsx +0 -82
  303. package/src/ResultOrError.ts +0 -15
  304. package/src/RootView.tsx +0 -55
  305. package/src/Row.tsx +0 -12
  306. package/src/Select.tsx +0 -39
  307. package/src/StackContext.tsx +0 -52
  308. package/src/StaticCheckbox.tsx +0 -72
  309. package/src/Storage.tsx +0 -198
  310. package/src/Stream.tsx +0 -50
  311. package/src/Sublist.tsx +0 -61
  312. package/src/SubmitIconInput.tsx +0 -45
  313. package/src/Tabs.tsx +0 -110
  314. package/src/Text.tsx +0 -111
  315. package/src/TextArea.tsx +0 -58
  316. package/src/TextInput.tsx +0 -123
  317. package/src/TextInputWithState.tsx +0 -32
  318. package/src/TextPairing.tsx +0 -115
  319. package/src/TimeInput.tsx +0 -109
  320. package/src/Tooltip.tsx +0 -109
  321. package/src/aria.ts +0 -72
  322. package/src/docs/mdx.tsx +0 -137
  323. package/src/docs/pages.ts +0 -115
  324. package/src/docs/searchIndex.ts +0 -1
  325. package/src/examples/ExampleDialog.tsx +0 -28
  326. package/src/guid.ts +0 -7
  327. package/src/hash.ts +0 -21
  328. package/src/index.ts +0 -68
  329. package/src/isServer.ts +0 -3
  330. package/src/jss.tsx +0 -712
  331. package/src/jsx-dev-runtime.ts +0 -74
  332. package/src/jsx-runtime.ts +0 -2
  333. package/src/numberToBase.ts +0 -52
  334. package/src/pages/Badge.mdx +0 -152
  335. package/src/pages/Button.mdx +0 -163
  336. package/src/pages/Calendar.mdx +0 -254
  337. package/src/pages/Card.mdx +0 -147
  338. package/src/pages/Checkbox.mdx +0 -131
  339. package/src/pages/Dialog.mdx +0 -197
  340. package/src/pages/FlexLayout.mdx +0 -211
  341. package/src/pages/Hashing.mdx +0 -211
  342. package/src/pages/Icon.mdx +0 -171
  343. package/src/pages/IconButton.mdx +0 -155
  344. package/src/pages/Link.mdx +0 -160
  345. package/src/pages/List.mdx +0 -262
  346. package/src/pages/ListHeader.mdx +0 -220
  347. package/src/pages/Popover.mdx +0 -223
  348. package/src/pages/ProgressBar.mdx +0 -200
  349. package/src/pages/ProgressCircle.mdx +0 -218
  350. package/src/pages/RangeInput.mdx +0 -237
  351. package/src/pages/Tabs.mdx +0 -281
  352. package/src/pages/Text.mdx +0 -154
  353. package/src/pages/TextInput.mdx +0 -235
  354. package/src/pages/TextPairing.mdx +0 -204
  355. package/src/pages/TimeInput.mdx +0 -178
  356. package/src/pages/Tooltip.mdx +0 -115
  357. package/src/pages/_app.tsx +0 -466
  358. package/src/pages/_document.tsx +0 -30
  359. package/src/pages/css-in-js.mdx +0 -240
  360. package/src/pages/index.mdx +0 -58
  361. package/src/pages/navigation.mdx +0 -158
  362. package/src/pages/prism.css +0 -3
  363. package/src/pages/useCookie.mdx +0 -176
  364. package/src/pages/useKeyboard.mdx +0 -257
  365. package/src/pages/useNavigation.mdx +0 -258
  366. package/src/pages/usePromise.mdx +0 -280
  367. package/src/pages/useRefEffect.mdx +0 -251
  368. package/src/stateMachineContextFactory.tsx +0 -111
  369. package/src/useCookie.tsx +0 -95
  370. package/src/useKeyboard.tsx +0 -43
  371. package/src/useNavigation.tsx +0 -89
  372. package/src/usePromise.tsx +0 -18
  373. package/src/useRefEffect.tsx +0 -18
  374. package/src/vite-plugin-jss-debug.ts +0 -77
  375. package/tsconfig.build.json +0 -23
  376. package/tsconfig.json +0 -38
@@ -1,262 +0,0 @@
1
- import { List } from "../List";
2
- import { ListItem } from "../ListItem";
3
- import { ListButtonItem } from "../ListButtonItem";
4
- import { ListLinkItem } from "../ListLinkItem";
5
- import { ListDivider } from "../ListDivider";
6
- import { Icon } from "../Icon";
7
- import { Sublist } from "../Sublist";
8
- import { Row } from "../Row";
9
-
10
- # List
11
-
12
- A container for displaying items in a vertical list. Lists support multiple item types, keyboard navigation, and can be styled with different visual treatments.
13
-
14
- ---
15
-
16
- ## Props
17
-
18
- ### List
19
-
20
- | Prop | Type | Required | Default | Description |
21
- |------|------|----------|---------|-------------|
22
- | `ariaLabel` | `string` | Yes | - | Accessible label for the list |
23
- | `bare` | `boolean` | No | `false` | Minimal styling without background/borders |
24
- | `carded` | `boolean` | No | `true` | Rounded corners with full border |
25
- | `navigation` | `boolean` | No | `true` | Enable arrow key navigation |
26
- | `autofocus` | `boolean` | No | `false` | Focus first item on mount |
27
-
28
- ### List item components
29
-
30
- - **`ListItem`** - Static, non-interactive item
31
- - **`ListButtonItem`** - Clickable button item
32
- - **`ListLinkItem`** - Navigation link item
33
- - **`ListDivider`** - Visual separator
34
- - **`ListHeaderItem`** - Section header
35
- - **`Sublist`** - Collapsible group of items
36
-
37
- All item components accept `TextPairing` props (`headline`, `body`, `addOn`, etc.).
38
-
39
- ---
40
-
41
- ## Basic list
42
-
43
- The default list has a bordered card appearance with rounded corners.
44
-
45
- <List ariaLabel="Settings">
46
- <ListItem
47
- headline="Notifications"
48
- body="Manage your notification preferences"
49
- addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
50
- />
51
- <ListButtonItem
52
- color="secondary"
53
- headline="Account"
54
- body="Update your profile information"
55
- addOn={<Icon color="primary" icon="fa-user" size="medium" />}
56
- onClick={() => {}}
57
- />
58
- <ListLinkItem
59
- href="/"
60
- color="secondary"
61
- headline="Help Center"
62
- addOn={<Icon color="primary" icon="fa-question-circle" size="medium" />}
63
- withDivider={false}
64
- />
65
- </List>
66
-
67
- ```js
68
- <List ariaLabel="Settings">
69
- <ListItem
70
- headline="Notifications"
71
- body="Manage your notification preferences"
72
- addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
73
- />
74
- <ListButtonItem
75
- color="secondary"
76
- headline="Account"
77
- onClick={() => {}}
78
- />
79
- <ListLinkItem
80
- href="/help"
81
- color="secondary"
82
- headline="Help Center"
83
- withDivider={false}
84
- />
85
- </List>
86
- ```
87
-
88
- ---
89
-
90
- ## Edge-to-edge list
91
-
92
- Set `carded={false}` to remove rounded corners, useful for full-width layouts.
93
-
94
- <List carded={false} ariaLabel="Menu">
95
- <ListButtonItem color="secondary" headline="Profile" onClick={() => {}} />
96
- <ListButtonItem color="secondary" headline="Settings" onClick={() => {}} />
97
- <ListButtonItem color="secondary" headline="Logout" onClick={() => {}} withDivider={false} />
98
- </List>
99
-
100
- ```js
101
- <List carded={false} ariaLabel="Menu">
102
- <ListButtonItem color="secondary" headline="Profile" onClick={() => {}} />
103
- <ListButtonItem color="secondary" headline="Settings" onClick={() => {}} />
104
- <ListButtonItem color="secondary" headline="Logout" onClick={() => {}} withDivider={false} />
105
- </List>
106
- ```
107
-
108
- ---
109
-
110
- ## Bare list
111
-
112
- The `bare` variant removes background and borders for a minimal appearance.
113
-
114
- <List bare ariaLabel="Navigation">
115
- <ListButtonItem bare color="secondary" headline="Home" addOn={<Icon color="primary" icon="fa-home" size="medium" />} onClick={() => {}} />
116
- <ListButtonItem bare color="secondary" headline="Projects" addOn={<Icon color="primary" icon="fa-folder" size="medium" />} onClick={() => {}} />
117
- <ListLinkItem bare href="/" color="secondary" headline="Settings" selected addOn={<Icon color="highlight" icon="fa-cog" size="medium" />} withDivider={false} />
118
- </List>
119
-
120
- ```js
121
- <List bare ariaLabel="Navigation">
122
- <ListButtonItem
123
- bare
124
- color="secondary"
125
- headline="Home"
126
- addOn={<Icon color="primary" icon="fa-home" size="medium" />}
127
- onClick={() => {}}
128
- />
129
- <ListLinkItem
130
- bare
131
- href="/settings"
132
- color="secondary"
133
- headline="Settings"
134
- selected
135
- withDivider={false}
136
- />
137
- </List>
138
- ```
139
-
140
- ---
141
-
142
- ## Item colors
143
-
144
- ListButtonItem and ListLinkItem support semantic colors:
145
-
146
- <List ariaLabel="Actions">
147
- <ListButtonItem color="positive" headline="Create new" addOn={<Icon color="highlight" icon="fa-plus" size="medium" />} onClick={() => {}} />
148
- <ListButtonItem color="secondary" headline="Edit item" addOn={<Icon color="primary" icon="fa-pencil" size="medium" />} onClick={() => {}} />
149
- <ListButtonItem color="negative" headline="Delete item" addOn={<Icon color="negative" icon="fa-trash" size="medium" />} onClick={() => {}} withDivider={false} />
150
- </List>
151
-
152
- ```js
153
- <ListButtonItem color="positive" headline="Create" onClick={() => {}} />
154
- <ListButtonItem color="secondary" headline="Edit" onClick={() => {}} />
155
- <ListButtonItem color="negative" headline="Delete" onClick={() => {}} />
156
- ```
157
-
158
- ---
159
-
160
- ## Selected state
161
-
162
- Link items support a `selected` prop to indicate the current selection:
163
-
164
- <List bare ariaLabel="Pages">
165
- <ListLinkItem bare href="/" color="secondary" headline="Dashboard" />
166
- <ListLinkItem bare href="/" color="secondary" headline="Analytics" selected />
167
- <ListLinkItem bare href="/" color="secondary" headline="Reports" withDivider={false} />
168
- </List>
169
-
170
- ```js
171
- <ListLinkItem
172
- bare
173
- href="/analytics"
174
- headline="Analytics"
175
- selected={currentPage === "analytics"}
176
- />
177
- ```
178
-
179
- ---
180
-
181
- ## Sublist
182
-
183
- Group related items with collapsible sections:
184
-
185
- <List bare ariaLabel="Documentation">
186
- <Sublist label="Getting Started">
187
- <ListItem headline="Installation" />
188
- <ListItem headline="Quick Start" />
189
- <ListItem headline="Configuration" />
190
- </Sublist>
191
- <Sublist label="Components">
192
- <ListItem headline="Button" />
193
- <ListItem headline="Input" />
194
- <ListItem headline="List" />
195
- </Sublist>
196
- </List>
197
-
198
- ```js
199
- <List bare ariaLabel="Documentation">
200
- <Sublist label="Getting Started">
201
- <ListItem headline="Installation" />
202
- <ListItem headline="Quick Start" />
203
- </Sublist>
204
- <Sublist label="Components">
205
- <ListItem headline="Button" />
206
- <ListItem headline="Input" />
207
- </Sublist>
208
- </List>
209
- ```
210
-
211
- ---
212
-
213
- ## Keyboard navigation
214
-
215
- Lists support arrow key navigation by default (following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/)):
216
-
217
- - **Arrow Up/Down** - Move between items
218
- - **Enter/Space** - Activate the focused item
219
- - **Home/End** - Jump to first/last item
220
-
221
- <List ariaLabel="Keyboard demo" navigation={true}>
222
- <ListButtonItem color="secondary" headline="First item (use arrow keys)" onClick={() => {}} />
223
- <ListButtonItem color="secondary" headline="Second item" onClick={() => {}} />
224
- <ListButtonItem color="secondary" headline="Third item" onClick={() => {}} withDivider={false} />
225
- </List>
226
-
227
- Disable navigation with `navigation={false}` if items have their own focus management.
228
-
229
- ```js
230
- // Keyboard navigation enabled (default)
231
- <List ariaLabel="Menu" navigation={true}>
232
- ...
233
- </List>
234
-
235
- // Keyboard navigation disabled
236
- <List ariaLabel="Form fields" navigation={false}>
237
- ...
238
- </List>
239
- ```
240
-
241
- ---
242
-
243
- ## Dividers
244
-
245
- List items include dividers by default. Remove with `withDivider={false}`:
246
-
247
- ```js
248
- <List ariaLabel="Items">
249
- <ListItem headline="With divider" />
250
- <ListItem headline="With divider" />
251
- <ListItem headline="No divider" withDivider={false} />
252
- </List>
253
- ```
254
-
255
- ---
256
-
257
- ## Accessibility
258
-
259
- - Uses `role="grid"` with `aria-label` for screen readers
260
- - Keyboard navigation follows WAI-ARIA grid pattern
261
- - Focus management with arrow keys, Home, and End
262
- - Proper focus indicators on keyboard navigation
@@ -1,220 +0,0 @@
1
- import { List } from "../List";
2
- import { Icon } from "../Icon";
3
- import { ListItem } from "../ListItem";
4
- import { ListHeaderItem } from "../ListHeaderItem";
5
- import { Column } from "../Column";
6
- import { Span } from "../Text";
7
-
8
- # ListHeaderItem
9
-
10
- A specialized list item for section headers. Use to organize and visually separate groups within a list.
11
-
12
- ---
13
-
14
- ## Props
15
-
16
- | Prop | Type | Default | Description |
17
- |------|------|---------|-------------|
18
- | `headline` | `string` | Required | Header text |
19
- | `body` | `string` | - | Optional secondary text |
20
- | `highlight` | `boolean` | `false` | Use accent background color |
21
- | `addOn` | `ReactNode` | - | Icon or element to display |
22
- | `addOnPosition` | `Position` | - | Position of the add-on |
23
- | `withDivider` | `boolean` | - | Show divider below header |
24
-
25
- ---
26
-
27
- ## Basic usage
28
-
29
- <List ariaLabel="example">
30
- <ListHeaderItem headline="Section A" />
31
- <ListItem headline="Item 1" body="Description" />
32
- <ListItem headline="Item 2" body="Description" />
33
- <ListHeaderItem headline="Section B" />
34
- <ListItem headline="Item 3" body="Description" />
35
- <ListItem withDivider={false} headline="Item 4" body="Description" />
36
- </List>
37
-
38
- ```js
39
- <List ariaLabel="example">
40
- <ListHeaderItem headline="Section A" />
41
- <ListItem headline="Item 1" body="Description" />
42
- <ListItem headline="Item 2" body="Description" />
43
- <ListHeaderItem headline="Section B" />
44
- <ListItem headline="Item 3" body="Description" />
45
- <ListItem headline="Item 4" body="Description" />
46
- </List>
47
- ```
48
-
49
- ---
50
-
51
- ## Styles
52
-
53
- ### Standard headers
54
-
55
- <List ariaLabel="example">
56
- <ListHeaderItem headline="Header" />
57
- <ListItem headline="Headline 1" body="Body 1" />
58
- <ListHeaderItem
59
- headline="Header"
60
- addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
61
- />
62
- <ListItem headline="Headline 2" body="Body 2" />
63
- <ListHeaderItem highlight headline="Header" />
64
- <ListItem headline="Headline 3" body="Body 3" />
65
- <ListHeaderItem
66
- highlight
67
- headline="Header"
68
- addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
69
- />
70
- <ListItem withDivider={false} headline="Headline 4" body="Body 3" />
71
- </List>
72
-
73
- ```js
74
- // Plain header
75
- <ListHeaderItem headline="Header" />
76
-
77
- // With icon
78
- <ListHeaderItem
79
- headline="Header"
80
- addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
81
- />
82
-
83
- // Highlighted (accent background)
84
- <ListHeaderItem highlight headline="Header" />
85
-
86
- // Highlighted with icon
87
- <ListHeaderItem
88
- highlight
89
- headline="Header"
90
- addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
91
- />
92
- ```
93
-
94
- ---
95
-
96
- ## Bare list headers
97
-
98
- In bare lists, headers have no background:
99
-
100
- <List bare ariaLabel="example">
101
- <ListHeaderItem headline="Header" />
102
- <ListItem headline="Headline 1" body="Body 1" />
103
- <ListHeaderItem
104
- headline="Header"
105
- addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
106
- />
107
- <ListItem headline="Headline 2" body="Body 2" />
108
- <ListHeaderItem highlight headline="Header" />
109
- <ListItem headline="Headline 3" body="Body 3" />
110
- <ListHeaderItem
111
- highlight
112
- headline="Header"
113
- addOn={<Icon icon="fa-chain-broken" size="medium" color="highlight" />}
114
- />
115
- <ListItem withDivider={false} headline="Headline 4" body="Body 3" />
116
- </List>
117
-
118
- ```js
119
- <List bare ariaLabel="example">
120
- <ListHeaderItem headline="Header" />
121
- <ListItem headline="Item" body="Description" />
122
-
123
- {/* Highlighted in bare mode uses highlight text color instead */}
124
- <ListHeaderItem highlight headline="Header" />
125
- <ListItem headline="Item" body="Description" />
126
- </List>
127
- ```
128
-
129
- ---
130
-
131
- ## With icons
132
-
133
- Add context with icons:
134
-
135
- ```js
136
- // Category header
137
- <ListHeaderItem
138
- headline="Documents"
139
- addOn={<Icon icon="fa-folder" size="medium" color="primary" />}
140
- />
141
-
142
- // Status header
143
- <ListHeaderItem
144
- headline="Pending"
145
- addOn={<Icon icon="fa-clock-o" size="medium" color="warning" />}
146
- />
147
-
148
- // Alert header (highlighted)
149
- <ListHeaderItem
150
- highlight
151
- headline="Urgent"
152
- addOn={<Icon icon="fa-exclamation" size="medium" color="light" />}
153
- />
154
- ```
155
-
156
- ---
157
-
158
- ## Common patterns
159
-
160
- ### Grouped settings
161
-
162
- ```js
163
- <List ariaLabel="Settings">
164
- <ListHeaderItem headline="Account" />
165
- <ListButtonItem headline="Profile" onClick={() => {}} />
166
- <ListButtonItem headline="Password" onClick={() => {}} />
167
-
168
- <ListHeaderItem headline="Preferences" />
169
- <ListButtonItem headline="Theme" onClick={() => {}} />
170
- <ListButtonItem headline="Language" onClick={() => {}} />
171
-
172
- <ListHeaderItem headline="Danger Zone" highlight />
173
- <ListButtonItem headline="Delete Account" color="negative" onClick={() => {}} />
174
- </List>
175
- ```
176
-
177
- ### Alphabetical grouping
178
-
179
- ```js
180
- <List ariaLabel="Contacts">
181
- <ListHeaderItem headline="A" />
182
- <ListItem headline="Alice Anderson" />
183
- <ListItem headline="Andrew Adams" />
184
-
185
- <ListHeaderItem headline="B" />
186
- <ListItem headline="Bob Brown" />
187
- <ListItem headline="Betty Baker" />
188
- </List>
189
- ```
190
-
191
- ### Category browser
192
-
193
- ```js
194
- <List ariaLabel="Categories">
195
- <ListHeaderItem
196
- headline="Popular"
197
- addOn={<Icon icon="fa-fire" color="warning" />}
198
- />
199
- <ListButtonItem headline="Technology" onClick={() => {}} />
200
- <ListButtonItem headline="Design" onClick={() => {}} />
201
-
202
- <ListHeaderItem
203
- headline="Recent"
204
- addOn={<Icon icon="fa-clock-o" color="secondary" />}
205
- />
206
- <ListButtonItem headline="Science" onClick={() => {}} />
207
- <ListButtonItem headline="Art" onClick={() => {}} />
208
- </List>
209
- ```
210
-
211
- ---
212
-
213
- ## Styling behavior
214
-
215
- | Context | Standard Header | Highlighted Header |
216
- |---------|----------------|-------------------|
217
- | Regular list | Gray background | Accent background |
218
- | Bare list | No background | Accent text color |
219
-
220
- The component automatically adapts based on the parent list's `bare` prop.
@@ -1,223 +0,0 @@
1
- import { Popover, PopoverTrigger } from "../Popover";
2
- import { Icon } from "../Icon";
3
- import { Button } from "../Button";
4
- import { List } from "../List";
5
- import { ListButtonItem } from "../ListButtonItem";
6
- import { Row } from "../Row";
7
- import { Column } from "../Column";
8
-
9
- # Popover
10
-
11
- A floating panel that appears next to a trigger element. Unlike tooltips, popovers can contain interactive content like menus, forms, or action lists.
12
-
13
- ---
14
-
15
- ## Props
16
-
17
- ### PopoverTrigger
18
-
19
- | Prop | Type | Required | Description |
20
- |------|------|----------|-------------|
21
- | `PopoverComponent` | `(props: { close: () => void } & Input) => JSX.Element` | Yes | Component to render in the popover |
22
- | `children` | `(props: { toggle: (input: Input) => void }) => JSX.Element` | Yes | Render function for the trigger element |
23
- | `jss` | `JSS` | No | Custom styles for the wrapper |
24
- | `jssDialog` | `JSS` | No | Custom styles for the popover dialog |
25
- | `grow` | `boolean` | No | Allow wrapper to grow |
26
- | `shrink` | `boolean` | No | Allow wrapper to shrink |
27
- | `tag` | `keyof HTMLElementTagNameMap` | No | HTML tag for the wrapper |
28
-
29
- ### Popover
30
-
31
- | Prop | Type | Required | Description |
32
- |------|------|----------|-------------|
33
- | `children` | `ReactNode` | Yes | Popover content |
34
- | `close` | `() => void` | Yes | Function to close the popover |
35
-
36
- ---
37
-
38
- ## Basic usage
39
-
40
- Use `PopoverTrigger` to create a button that opens a popover with interactive options:
41
-
42
- <Row padding="large">
43
- <PopoverTrigger
44
- PopoverComponent={({ close }) => (
45
- <Popover close={close}>
46
- <List bare ariaLabel="Options">
47
- <ListButtonItem bare headline="Edit" onClick={() => close()} color="secondary" />
48
- <ListButtonItem bare headline="Duplicate" onClick={() => close()} color="secondary" />
49
- <ListButtonItem bare headline="Delete" onClick={() => close()} color="negative" withDivider={false} />
50
- </List>
51
- </Popover>
52
- )}
53
- >
54
- {({ toggle }) => (
55
- <Button color="positive" onClick={() => toggle(undefined)}>
56
- Show Options
57
- </Button>
58
- )}
59
- </PopoverTrigger>
60
- </Row>
61
-
62
- ```js
63
- <PopoverTrigger
64
- PopoverComponent={({ close }) => (
65
- <Popover close={close}>
66
- <List bare ariaLabel="Options">
67
- <ListButtonItem
68
- bare
69
- headline="Edit"
70
- onClick={() => close()}
71
- color="secondary"
72
- />
73
- <ListButtonItem
74
- bare
75
- headline="Duplicate"
76
- onClick={() => close()}
77
- color="secondary"
78
- />
79
- <ListButtonItem
80
- bare
81
- headline="Delete"
82
- onClick={() => close()}
83
- color="negative"
84
- withDivider={false}
85
- />
86
- </List>
87
- </Popover>
88
- )}
89
- >
90
- {({ toggle }) => (
91
- <Button color="positive" onClick={() => toggle(undefined)}>
92
- Show Options
93
- </Button>
94
- )}
95
- </PopoverTrigger>
96
- ```
97
-
98
- ---
99
-
100
- ## Passing data to popover
101
-
102
- Use TypeScript generics to pass data when opening the popover:
103
-
104
- ```js
105
- interface Item {
106
- id: string;
107
- name: string;
108
- }
109
-
110
- <PopoverTrigger<Item>
111
- PopoverComponent={({ close, id, name }) => (
112
- <Popover close={close}>
113
- <Column padding="medium" gap="small">
114
- <P>Edit: {name}</P>
115
- <Button color="positive" onClick={() => {
116
- saveItem(id);
117
- close();
118
- }}>
119
- Save
120
- </Button>
121
- </Column>
122
- </Popover>
123
- )}
124
- >
125
- {({ toggle }) => (
126
- <Button
127
- color="primary"
128
- onClick={() => toggle({ id: "123", name: "My Item" })}
129
- >
130
- Edit Item
131
- </Button>
132
- )}
133
- </PopoverTrigger>
134
- ```
135
-
136
- ---
137
-
138
- ## Behavior
139
-
140
- - **Toggle on click**: Clicking the trigger opens/closes the popover
141
- - **Focus management**: Focus moves into the popover when opened
142
- - **Focus trap**: Tab cycles through focusable elements within the popover
143
- - **Escape to close**: Pressing Escape closes the popover
144
- - **Outside click**: Clicking outside closes the popover
145
- - **Focus restoration**: Focus returns to the trigger when closed
146
-
147
- ---
148
-
149
- ## Common patterns
150
-
151
- ### Dropdown menu
152
-
153
- ```js
154
- <PopoverTrigger
155
- PopoverComponent={({ close }) => (
156
- <Popover close={close}>
157
- <List bare ariaLabel="Menu">
158
- <ListButtonItem bare headline="Profile" onClick={() => close()} />
159
- <ListButtonItem bare headline="Settings" onClick={() => close()} />
160
- <ListButtonItem bare headline="Logout" onClick={() => close()} color="negative" />
161
- </List>
162
- </Popover>
163
- )}
164
- >
165
- {({ toggle }) => (
166
- <IconButton
167
- bare
168
- icon="fa-ellipsis-v"
169
- size="medium"
170
- color="secondary"
171
- onClick={() => toggle(undefined)}
172
- />
173
- )}
174
- </PopoverTrigger>
175
- ```
176
-
177
- ### Action confirmation
178
-
179
- ```js
180
- <PopoverTrigger
181
- PopoverComponent={({ close }) => (
182
- <Popover close={close}>
183
- <Column padding="medium" gap="medium">
184
- <P>Are you sure you want to delete?</P>
185
- <Row gap="small" justify="end">
186
- <Button bare color="primary" onClick={close}>Cancel</Button>
187
- <Button color="negative" onClick={() => {
188
- deleteItem();
189
- close();
190
- }}>Delete</Button>
191
- </Row>
192
- </Column>
193
- </Popover>
194
- )}
195
- >
196
- {({ toggle }) => (
197
- <Button color="negative" onClick={() => toggle(undefined)}>
198
- Delete
199
- </Button>
200
- )}
201
- </PopoverTrigger>
202
- ```
203
-
204
- ---
205
-
206
- ## Accessibility
207
-
208
- - Uses `<dialog>` element with `.show()` for proper popover behavior
209
- - Focus is trapped within the popover
210
- - Escape key closes the popover
211
- - Focus returns to the trigger when closed
212
- - Tab navigation cycles through focusable elements
213
-
214
- ---
215
-
216
- ## Popover vs Dialog vs Tooltip
217
-
218
- | Popover | Dialog | Tooltip |
219
- |---------|--------|---------|
220
- | Positioned near trigger | Centered on screen | Positioned near trigger |
221
- | Light interactions | Complex workflows | Text only |
222
- | Partial page blocking | Full page blocking | No blocking |
223
- | Menus, quick actions | Forms, confirmations | Hints, labels |