aidos-ui 4.0.3 → 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 (377) 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 +12 -6
  13. package/dist/vite-plugin-jss-debug.js +57 -72
  14. package/dist/vite-plugin-jss-debug.js.map +1 -1
  15. package/package.json +58 -27
  16. package/.claude/settings.local.json +0 -22
  17. package/.prettierrc +0 -4
  18. package/CLAUDE.md +0 -72
  19. package/dist/Badge.d.ts +0 -6
  20. package/dist/Badge.js +0 -22
  21. package/dist/Badge.js.map +0 -1
  22. package/dist/BaseButton.d.ts +0 -14
  23. package/dist/BaseButton.js +0 -23
  24. package/dist/BaseButton.js.map +0 -1
  25. package/dist/BaseInput.d.ts +0 -14
  26. package/dist/BaseInput.js +0 -15
  27. package/dist/BaseInput.js.map +0 -1
  28. package/dist/BaseLink.d.ts +0 -18
  29. package/dist/BaseLink.js +0 -29
  30. package/dist/BaseLink.js.map +0 -1
  31. package/dist/BaseList.d.ts +0 -6
  32. package/dist/BaseList.js +0 -14
  33. package/dist/BaseList.js.map +0 -1
  34. package/dist/BaseListAddOn.d.ts +0 -5
  35. package/dist/BaseListAddOn.js +0 -7
  36. package/dist/BaseListAddOn.js.map +0 -1
  37. package/dist/BaseListItem.d.ts +0 -26
  38. package/dist/BaseListItem.js +0 -29
  39. package/dist/BaseListItem.js.map +0 -1
  40. package/dist/BaseView.d.ts +0 -12
  41. package/dist/BaseView.js +0 -26
  42. package/dist/BaseView.js.map +0 -1
  43. package/dist/Box.d.ts +0 -4
  44. package/dist/Box.js +0 -6
  45. package/dist/Box.js.map +0 -1
  46. package/dist/Button.d.ts +0 -20
  47. package/dist/Button.js +0 -19
  48. package/dist/Button.js.map +0 -1
  49. package/dist/Calendar.d.ts +0 -18
  50. package/dist/Calendar.js +0 -57
  51. package/dist/Calendar.js.map +0 -1
  52. package/dist/Card.d.ts +0 -4
  53. package/dist/Card.js +0 -14
  54. package/dist/Card.js.map +0 -1
  55. package/dist/Checkbox.d.ts +0 -11
  56. package/dist/Checkbox.js +0 -32
  57. package/dist/Checkbox.js.map +0 -1
  58. package/dist/Circle.d.ts +0 -5
  59. package/dist/Circle.js +0 -12
  60. package/dist/Circle.js.map +0 -1
  61. package/dist/Column.d.ts +0 -6
  62. package/dist/Column.js +0 -7
  63. package/dist/Column.js.map +0 -1
  64. package/dist/DarkMode.d.ts +0 -13
  65. package/dist/DarkMode.js +0 -62
  66. package/dist/DarkMode.js.map +0 -1
  67. package/dist/DateInput.d.ts +0 -13
  68. package/dist/DateInput.js +0 -29
  69. package/dist/DateInput.js.map +0 -1
  70. package/dist/DatePicker.d.ts +0 -11
  71. package/dist/DatePicker.js +0 -34
  72. package/dist/DatePicker.js.map +0 -1
  73. package/dist/DatetimeInput.d.ts +0 -13
  74. package/dist/DatetimeInput.js +0 -31
  75. package/dist/DatetimeInput.js.map +0 -1
  76. package/dist/DesignBook.d.ts +0 -1
  77. package/dist/DesignBook.js +0 -55
  78. package/dist/DesignBook.js.map +0 -1
  79. package/dist/Dialog.d.ts +0 -17
  80. package/dist/Dialog.js +0 -92
  81. package/dist/Dialog.js.map +0 -1
  82. package/dist/Dropdown.d.ts +0 -14
  83. package/dist/Dropdown.js +0 -65
  84. package/dist/Dropdown.js.map +0 -1
  85. package/dist/Emitter.d.ts +0 -6
  86. package/dist/Emitter.js +0 -19
  87. package/dist/Emitter.js.map +0 -1
  88. package/dist/FlexLayout.d.ts +0 -11
  89. package/dist/FlexLayout.js +0 -18
  90. package/dist/FlexLayout.js.map +0 -1
  91. package/dist/Icon.d.ts +0 -12
  92. package/dist/Icon.js +0 -60
  93. package/dist/Icon.js.map +0 -1
  94. package/dist/IconButton.d.ts +0 -9
  95. package/dist/IconButton.js +0 -31
  96. package/dist/IconButton.js.map +0 -1
  97. package/dist/IconLink.d.ts +0 -9
  98. package/dist/IconLink.js +0 -32
  99. package/dist/IconLink.js.map +0 -1
  100. package/dist/IconType.d.ts +0 -1
  101. package/dist/IconType.js +0 -2
  102. package/dist/IconType.js.map +0 -1
  103. package/dist/Interactable.d.ts +0 -50
  104. package/dist/Interactable.js +0 -169
  105. package/dist/Interactable.js.map +0 -1
  106. package/dist/JSSComment.d.ts +0 -10
  107. package/dist/JSSComment.js +0 -52
  108. package/dist/JSSComment.js.map +0 -1
  109. package/dist/Link.d.ts +0 -22
  110. package/dist/Link.js +0 -29
  111. package/dist/Link.js.map +0 -1
  112. package/dist/List.d.ts +0 -15
  113. package/dist/List.js +0 -29
  114. package/dist/List.js.map +0 -1
  115. package/dist/ListButtonItem.d.ts +0 -14
  116. package/dist/ListButtonItem.js +0 -11
  117. package/dist/ListButtonItem.js.map +0 -1
  118. package/dist/ListDivider.d.ts +0 -1
  119. package/dist/ListDivider.js +0 -12
  120. package/dist/ListDivider.js.map +0 -1
  121. package/dist/ListHeaderItem.d.ts +0 -10
  122. package/dist/ListHeaderItem.js +0 -15
  123. package/dist/ListHeaderItem.js.map +0 -1
  124. package/dist/ListItem.d.ts +0 -9
  125. package/dist/ListItem.js +0 -9
  126. package/dist/ListItem.js.map +0 -1
  127. package/dist/ListLinkItem.d.ts +0 -16
  128. package/dist/ListLinkItem.js +0 -11
  129. package/dist/ListLinkItem.js.map +0 -1
  130. package/dist/ListSpacer.d.ts +0 -1
  131. package/dist/ListSpacer.js +0 -13
  132. package/dist/ListSpacer.js.map +0 -1
  133. package/dist/MenuIcon.d.ts +0 -5
  134. package/dist/MenuIcon.js +0 -31
  135. package/dist/MenuIcon.js.map +0 -1
  136. package/dist/NextJSRouter.d.ts +0 -1
  137. package/dist/NextJSRouter.js +0 -37
  138. package/dist/NextJSRouter.js.map +0 -1
  139. package/dist/NextJSRouterState.d.ts +0 -38
  140. package/dist/NextJSRouterState.js +0 -111
  141. package/dist/NextJSRouterState.js.map +0 -1
  142. package/dist/OnVisible.d.ts +0 -5
  143. package/dist/OnVisible.js +0 -28
  144. package/dist/OnVisible.js.map +0 -1
  145. package/dist/Popover.d.ts +0 -22
  146. package/dist/Popover.js +0 -90
  147. package/dist/Popover.js.map +0 -1
  148. package/dist/ProgressBar.d.ts +0 -7
  149. package/dist/ProgressBar.js +0 -42
  150. package/dist/ProgressBar.js.map +0 -1
  151. package/dist/ProgressCircle.d.ts +0 -5
  152. package/dist/ProgressCircle.js +0 -12
  153. package/dist/ProgressCircle.js.map +0 -1
  154. package/dist/Providers.d.ts +0 -9
  155. package/dist/Providers.js +0 -16
  156. package/dist/Providers.js.map +0 -1
  157. package/dist/RangeInput.d.ts +0 -14
  158. package/dist/RangeInput.js +0 -32
  159. package/dist/RangeInput.js.map +0 -1
  160. package/dist/ResultOrError.d.ts +0 -13
  161. package/dist/ResultOrError.js +0 -7
  162. package/dist/ResultOrError.js.map +0 -1
  163. package/dist/RootView.d.ts +0 -5
  164. package/dist/RootView.js +0 -35
  165. package/dist/RootView.js.map +0 -1
  166. package/dist/Row.d.ts +0 -6
  167. package/dist/Row.js +0 -7
  168. package/dist/Row.js.map +0 -1
  169. package/dist/Select.d.ts +0 -9
  170. package/dist/Select.js +0 -17
  171. package/dist/Select.js.map +0 -1
  172. package/dist/StackContext.d.ts +0 -8
  173. package/dist/StackContext.js +0 -25
  174. package/dist/StackContext.js.map +0 -1
  175. package/dist/StaticCheckbox.d.ts +0 -16
  176. package/dist/StaticCheckbox.js +0 -48
  177. package/dist/StaticCheckbox.js.map +0 -1
  178. package/dist/Storage.d.ts +0 -13
  179. package/dist/Storage.js +0 -146
  180. package/dist/Storage.js.map +0 -1
  181. package/dist/Stream.d.ts +0 -9
  182. package/dist/Stream.js +0 -36
  183. package/dist/Stream.js.map +0 -1
  184. package/dist/Sublist.d.ts +0 -12
  185. package/dist/Sublist.js +0 -18
  186. package/dist/Sublist.js.map +0 -1
  187. package/dist/SubmitIconInput.d.ts +0 -8
  188. package/dist/SubmitIconInput.js +0 -25
  189. package/dist/SubmitIconInput.js.map +0 -1
  190. package/dist/Tabs.d.ts +0 -23
  191. package/dist/Tabs.js +0 -39
  192. package/dist/Tabs.js.map +0 -1
  193. package/dist/Text.d.ts +0 -25
  194. package/dist/Text.js +0 -52
  195. package/dist/Text.js.map +0 -1
  196. package/dist/TextArea.d.ts +0 -11
  197. package/dist/TextArea.js +0 -27
  198. package/dist/TextArea.js.map +0 -1
  199. package/dist/TextInput.d.ts +0 -15
  200. package/dist/TextInput.js +0 -61
  201. package/dist/TextInput.js.map +0 -1
  202. package/dist/TextInputWithState.d.ts +0 -8
  203. package/dist/TextInputWithState.js +0 -14
  204. package/dist/TextInputWithState.js.map +0 -1
  205. package/dist/TextPairing.d.ts +0 -21
  206. package/dist/TextPairing.js +0 -26
  207. package/dist/TextPairing.js.map +0 -1
  208. package/dist/TimeInput.d.ts +0 -15
  209. package/dist/TimeInput.js +0 -58
  210. package/dist/TimeInput.js.map +0 -1
  211. package/dist/Tooltip.d.ts +0 -11
  212. package/dist/Tooltip.js +0 -73
  213. package/dist/Tooltip.js.map +0 -1
  214. package/dist/aria.d.ts +0 -8
  215. package/dist/aria.js +0 -42
  216. package/dist/aria.js.map +0 -1
  217. package/dist/guid.d.ts +0 -1
  218. package/dist/guid.js +0 -7
  219. package/dist/guid.js.map +0 -1
  220. package/dist/hash.d.ts +0 -1
  221. package/dist/hash.js +0 -20
  222. package/dist/hash.js.map +0 -1
  223. package/dist/isServer.d.ts +0 -1
  224. package/dist/isServer.js +0 -4
  225. package/dist/isServer.js.map +0 -1
  226. package/dist/jss.d.ts +0 -122
  227. package/dist/jss.js +0 -515
  228. package/dist/jss.js.map +0 -1
  229. package/dist/numberToBase.d.ts +0 -1
  230. package/dist/numberToBase.js +0 -44
  231. package/dist/numberToBase.js.map +0 -1
  232. package/dist/stateMachineContextFactory.d.ts +0 -36
  233. package/dist/stateMachineContextFactory.js +0 -48
  234. package/dist/stateMachineContextFactory.js.map +0 -1
  235. package/dist/useCookie.d.ts +0 -9
  236. package/dist/useCookie.js +0 -67
  237. package/dist/useCookie.js.map +0 -1
  238. package/dist/useKeyboard.d.ts +0 -8
  239. package/dist/useKeyboard.js +0 -26
  240. package/dist/useKeyboard.js.map +0 -1
  241. package/dist/useNavigation.d.ts +0 -5
  242. package/dist/useNavigation.js +0 -79
  243. package/dist/useNavigation.js.map +0 -1
  244. package/dist/usePromise.d.ts +0 -1
  245. package/dist/usePromise.js +0 -12
  246. package/dist/usePromise.js.map +0 -1
  247. package/dist/useRefEffect.d.ts +0 -1
  248. package/dist/useRefEffect.js +0 -15
  249. package/dist/useRefEffect.js.map +0 -1
  250. package/jss-debug-loader.mjs +0 -44
  251. package/next-env.d.ts +0 -6
  252. package/next.config.js +0 -33
  253. package/scripts/embeddings.js +0 -93
  254. package/scripts/openai_embeddings.js +0 -100
  255. package/scripts/publish.js +0 -28
  256. package/scripts/test_embeddings.js +0 -47
  257. package/src/Badge.tsx +0 -36
  258. package/src/BaseButton.tsx +0 -62
  259. package/src/BaseInput.tsx +0 -63
  260. package/src/BaseLink.tsx +0 -80
  261. package/src/BaseList.tsx +0 -26
  262. package/src/BaseListAddOn.tsx +0 -10
  263. package/src/BaseListItem.tsx +0 -119
  264. package/src/BaseView.tsx +0 -57
  265. package/src/Box.tsx +0 -20
  266. package/src/Button.tsx +0 -90
  267. package/src/Calendar.tsx +0 -125
  268. package/src/Card.tsx +0 -30
  269. package/src/Checkbox.tsx +0 -63
  270. package/src/Circle.tsx +0 -24
  271. package/src/Column.tsx +0 -12
  272. package/src/DarkMode.tsx +0 -100
  273. package/src/DateInput.tsx +0 -63
  274. package/src/DatePicker.tsx +0 -67
  275. package/src/DatetimeInput.tsx +0 -64
  276. package/src/DesignBook.tsx +0 -677
  277. package/src/Dialog.tsx +0 -150
  278. package/src/Dropdown.tsx +0 -146
  279. package/src/Emitter.ts +0 -26
  280. package/src/FlexLayout.tsx +0 -53
  281. package/src/Icon.tsx +0 -80
  282. package/src/IconButton.tsx +0 -58
  283. package/src/IconLink.tsx +0 -59
  284. package/src/IconType.ts +0 -787
  285. package/src/Interactable.tsx +0 -210
  286. package/src/JSSComment.tsx +0 -56
  287. package/src/Link.tsx +0 -110
  288. package/src/List.tsx +0 -58
  289. package/src/ListButtonItem.tsx +0 -69
  290. package/src/ListDivider.tsx +0 -13
  291. package/src/ListHeaderItem.tsx +0 -45
  292. package/src/ListItem.tsx +0 -24
  293. package/src/ListLinkItem.tsx +0 -76
  294. package/src/ListSpacer.tsx +0 -14
  295. package/src/MenuIcon.tsx +0 -50
  296. package/src/NextJSRouter.tsx +0 -62
  297. package/src/NextJSRouterState.tsx +0 -154
  298. package/src/OnVisible.tsx +0 -42
  299. package/src/Popover.tsx +0 -145
  300. package/src/ProgressBar.tsx +0 -63
  301. package/src/ProgressCircle.tsx +0 -38
  302. package/src/Providers.tsx +0 -33
  303. package/src/RangeInput.tsx +0 -82
  304. package/src/ResultOrError.ts +0 -15
  305. package/src/RootView.tsx +0 -55
  306. package/src/Row.tsx +0 -12
  307. package/src/Select.tsx +0 -39
  308. package/src/StackContext.tsx +0 -52
  309. package/src/StaticCheckbox.tsx +0 -72
  310. package/src/Storage.tsx +0 -198
  311. package/src/Stream.tsx +0 -50
  312. package/src/Sublist.tsx +0 -61
  313. package/src/SubmitIconInput.tsx +0 -45
  314. package/src/Tabs.tsx +0 -110
  315. package/src/Text.tsx +0 -111
  316. package/src/TextArea.tsx +0 -58
  317. package/src/TextInput.tsx +0 -123
  318. package/src/TextInputWithState.tsx +0 -32
  319. package/src/TextPairing.tsx +0 -115
  320. package/src/TimeInput.tsx +0 -109
  321. package/src/Tooltip.tsx +0 -109
  322. package/src/aria.ts +0 -72
  323. package/src/docs/mdx.tsx +0 -137
  324. package/src/docs/pages.ts +0 -115
  325. package/src/docs/searchIndex.ts +0 -1
  326. package/src/examples/ExampleDialog.tsx +0 -28
  327. package/src/guid.ts +0 -7
  328. package/src/hash.ts +0 -21
  329. package/src/index.ts +0 -68
  330. package/src/isServer.ts +0 -3
  331. package/src/jss.tsx +0 -712
  332. package/src/jsx-dev-runtime.ts +0 -74
  333. package/src/jsx-runtime.ts +0 -2
  334. package/src/numberToBase.ts +0 -52
  335. package/src/pages/Badge.mdx +0 -152
  336. package/src/pages/Button.mdx +0 -163
  337. package/src/pages/Calendar.mdx +0 -254
  338. package/src/pages/Card.mdx +0 -147
  339. package/src/pages/Checkbox.mdx +0 -131
  340. package/src/pages/Dialog.mdx +0 -197
  341. package/src/pages/FlexLayout.mdx +0 -211
  342. package/src/pages/Hashing.mdx +0 -211
  343. package/src/pages/Icon.mdx +0 -171
  344. package/src/pages/IconButton.mdx +0 -155
  345. package/src/pages/Link.mdx +0 -160
  346. package/src/pages/List.mdx +0 -262
  347. package/src/pages/ListHeader.mdx +0 -220
  348. package/src/pages/Popover.mdx +0 -223
  349. package/src/pages/ProgressBar.mdx +0 -200
  350. package/src/pages/ProgressCircle.mdx +0 -218
  351. package/src/pages/RangeInput.mdx +0 -237
  352. package/src/pages/Tabs.mdx +0 -281
  353. package/src/pages/Text.mdx +0 -154
  354. package/src/pages/TextInput.mdx +0 -235
  355. package/src/pages/TextPairing.mdx +0 -204
  356. package/src/pages/TimeInput.mdx +0 -178
  357. package/src/pages/Tooltip.mdx +0 -115
  358. package/src/pages/_app.tsx +0 -466
  359. package/src/pages/_document.tsx +0 -30
  360. package/src/pages/css-in-js.mdx +0 -240
  361. package/src/pages/index.mdx +0 -58
  362. package/src/pages/navigation.mdx +0 -158
  363. package/src/pages/prism.css +0 -3
  364. package/src/pages/useCookie.mdx +0 -176
  365. package/src/pages/useKeyboard.mdx +0 -257
  366. package/src/pages/useNavigation.mdx +0 -258
  367. package/src/pages/usePromise.mdx +0 -280
  368. package/src/pages/useRefEffect.mdx +0 -251
  369. package/src/stateMachineContextFactory.tsx +0 -111
  370. package/src/useCookie.tsx +0 -95
  371. package/src/useKeyboard.tsx +0 -43
  372. package/src/useNavigation.tsx +0 -89
  373. package/src/usePromise.tsx +0 -18
  374. package/src/useRefEffect.tsx +0 -18
  375. package/src/vite-plugin-jss-debug.ts +0 -75
  376. package/tsconfig.build.json +0 -23
  377. package/tsconfig.json +0 -38
@@ -1,204 +0,0 @@
1
- import { TextPairing } from "../TextPairing";
2
- import { Column } from "../Column";
3
- import { Row } from "../Row";
4
- import { Icon } from "../Icon";
5
- import { cssVar } from "../jss";
6
-
7
- # TextPairing
8
-
9
- A versatile component for displaying a headline with optional body text and add-ons. TextPairing is the building block for list items, cards, and other compound components.
10
-
11
- ---
12
-
13
- ## Props
14
-
15
- | Prop | Type | Required | Default | Description |
16
- |------|------|----------|---------|-------------|
17
- | `headline` | `ReactNode` | Yes | - | Primary text content |
18
- | `body` | `ReactNode` | No | - | Secondary text below headline |
19
- | `headlineColor` | `TextColor` | No | `"primary"` | Headline text color |
20
- | `headlineSize` | `Size` | No | `"medium"` | Headline text size |
21
- | `headlineBold` | `boolean` | No | `false` | Bold headline text |
22
- | `headlineAddOn` | `ReactNode` | No | - | Element displayed after headline |
23
- | `bodyColor` | `TextColor` | No | `"secondary"` | Body text color |
24
- | `bodySize` | `Size` | No | `"medium"` | Body text size |
25
- | `addOn` | `ReactNode` | No | - | Element displayed beside the text content |
26
- | `addOnPosition` | `"start"` \| `"end"` | No | `"start"` | Add-on placement |
27
- | `gap` | `Gap` | No | `"small"` | Space between add-on and text |
28
- | `padding` | `Padding` | No | - | Internal padding |
29
- | `align` | `Align` | No | `"stretch"` | Vertical alignment |
30
- | `grow` | `boolean` | No | `false` | Allow component to grow |
31
- | `shrink` | `boolean` | No | `false` | Allow component to shrink |
32
-
33
- ---
34
-
35
- ## Basic usage
36
-
37
- At its simplest, TextPairing displays a headline and body text vertically stacked.
38
-
39
- <Column gap="large">
40
- <TextPairing headline="Headline" body="Body text goes here" />
41
- <TextPairing headline="Bold headline" headlineBold body="With supporting body text" />
42
- </Column>
43
-
44
- ```js
45
- <TextPairing headline="Headline" body="Body text" />
46
-
47
- <TextPairing
48
- headline="Bold headline"
49
- headlineBold
50
- body="With supporting body text"
51
- />
52
- ```
53
-
54
- ---
55
-
56
- ## Customizing text styles
57
-
58
- Control the size and color of both headline and body independently.
59
-
60
- <Column gap="large">
61
- <TextPairing
62
- headline="Large headline"
63
- headlineSize="large"
64
- headlineBold
65
- body="Smaller subtle body"
66
- bodySize="small"
67
- bodyColor="subtle"
68
- />
69
- <TextPairing
70
- headline="Highlight headline"
71
- headlineColor="highlight"
72
- body="Secondary body text"
73
- bodyColor="secondary"
74
- />
75
- </Column>
76
-
77
- ```js
78
- <TextPairing
79
- headline="Large headline"
80
- headlineSize="large"
81
- headlineBold
82
- body="Smaller subtle body"
83
- bodySize="small"
84
- bodyColor="subtle"
85
- />
86
-
87
- <TextPairing
88
- headline="Highlight headline"
89
- headlineColor="highlight"
90
- body="Secondary body text"
91
- />
92
- ```
93
-
94
- ---
95
-
96
- ## With add-on
97
-
98
- Add icons, avatars, or other elements alongside the text content. Control placement with `addOnPosition`.
99
-
100
- <Column gap="large">
101
- <TextPairing
102
- headline="Notification"
103
- body="You have a new message"
104
- addOn={<Icon icon="fa-bell" color="highlight" size="large" />}
105
- gap="medium"
106
- />
107
- <TextPairing
108
- headline="Settings"
109
- body="Configure your preferences"
110
- addOn={<Icon icon="fa-cog" color="secondary" size="large" />}
111
- addOnPosition="end"
112
- gap="medium"
113
- />
114
- </Column>
115
-
116
- ```js
117
- // Add-on at start (default)
118
- <TextPairing
119
- headline="Notification"
120
- body="You have a new message"
121
- addOn={<Icon icon="fa-bell" color="highlight" size="large" />}
122
- gap="medium"
123
- />
124
-
125
- // Add-on at end
126
- <TextPairing
127
- headline="Settings"
128
- body="Configure your preferences"
129
- addOn={<Icon icon="fa-cog" color="secondary" size="large" />}
130
- addOnPosition="end"
131
- gap="medium"
132
- />
133
- ```
134
-
135
- ---
136
-
137
- ## With headline add-on
138
-
139
- Place small elements directly after the headline text, such as badges or status indicators.
140
-
141
- <Column gap="large">
142
- <TextPairing
143
- headline="New feature"
144
- headlineBold
145
- headlineAddOn={<Icon icon="fa-star" color="highlight" size="small" />}
146
- body="Check out what's new"
147
- />
148
- </Column>
149
-
150
- ```js
151
- <TextPairing
152
- headline="New feature"
153
- headlineBold
154
- headlineAddOn={<Icon icon="fa-star" color="highlight" size="small" />}
155
- body="Check out what's new"
156
- />
157
- ```
158
-
159
- ---
160
-
161
- ## Complete example
162
-
163
- Combining all options for a rich list item appearance.
164
-
165
- <Column gap="medium">
166
- <TextPairing
167
- headline="John Doe"
168
- headlineBold
169
- headlineSize="large"
170
- headlineAddOn={<Icon icon="fa-check-circle" color="highlight" size="small" />}
171
- body="Senior Software Engineer"
172
- bodyColor="subtle"
173
- bodySize="small"
174
- addOn={<Icon icon="fa-user" color="primary" size="xlarge" />}
175
- gap="medium"
176
- padding="medium"
177
- />
178
- </Column>
179
-
180
- ```js
181
- <TextPairing
182
- headline="John Doe"
183
- headlineBold
184
- headlineSize="large"
185
- headlineAddOn={<Icon icon="fa-check-circle" color="highlight" size="small" />}
186
- body="Senior Software Engineer"
187
- bodyColor="subtle"
188
- bodySize="small"
189
- addOn={<Icon icon="fa-user" color="primary" size="xlarge" />}
190
- gap="medium"
191
- padding="medium"
192
- />
193
- ```
194
-
195
- ---
196
-
197
- ## Use cases
198
-
199
- TextPairing is commonly used within:
200
-
201
- - **List items** - Display title and description with icons
202
- - **Cards** - Header sections with titles and subtitles
203
- - **Navigation** - Menu items with labels and descriptions
204
- - **Settings** - Option labels with explanatory text
@@ -1,178 +0,0 @@
1
- import { Column } from "../Column";
2
- import { Row } from "../Row";
3
- import { TimeInput } from "../TimeInput";
4
- import { Icon } from "../Icon";
5
- import { Span } from "../Text";
6
-
7
- # TimeInput
8
-
9
- A styled time picker component that wraps the native HTML `<input type="time">` element. Returns hours and minutes as a Date object.
10
-
11
- ---
12
-
13
- ## Props
14
-
15
- | Prop | Type | Default | Description |
16
- |------|------|---------|-------------|
17
- | `time` | `Date` | Required | Current time value |
18
- | `onTimeChange` | `(date: Date) => void` | Required | Called when time changes |
19
- | `bare` | `boolean` | `false` | Remove border and background styling |
20
- | `disabled` | `boolean` | - | Disables the input |
21
- | `addOn` | `ReactNode` | - | Icon or element to display |
22
- | `addOnPosition` | `"start" \| "end"` | `"start"` | Position of the add-on |
23
- | `gap` | `Gap` | `"none"` | Space between elements |
24
- | `padding` | `Padding` | `"small"` | Container padding |
25
-
26
- ---
27
-
28
- ## Basic usage
29
-
30
- <Column gap="medium" jss={{ maxWidth: 150 }}>
31
- <TimeInput time={new Date()} onTimeChange={() => {}} />
32
- </Column>
33
-
34
- ```js
35
- const [time, setTime] = useState(new Date());
36
-
37
- <TimeInput time={time} onTimeChange={setTime} />
38
- ```
39
-
40
- ---
41
-
42
- ## With icon
43
-
44
- Add a clock icon for visual context:
45
-
46
- <Column gap="medium" jss={{ maxWidth: 200 }}>
47
- <TimeInput
48
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
49
- time={new Date()}
50
- onTimeChange={() => {}}
51
- />
52
- <TimeInput
53
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
54
- addOnPosition="end"
55
- time={new Date()}
56
- onTimeChange={() => {}}
57
- />
58
- </Column>
59
-
60
- ```js
61
- // Icon at start (default)
62
- <TimeInput
63
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
64
- time={time}
65
- onTimeChange={setTime}
66
- />
67
-
68
- // Icon at end
69
- <TimeInput
70
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
71
- addOnPosition="end"
72
- time={time}
73
- onTimeChange={setTime}
74
- />
75
- ```
76
-
77
- ---
78
-
79
- ## Bare variant
80
-
81
- The bare variant removes the border and background, useful for inline editing:
82
-
83
- <Column gap="medium" jss={{ maxWidth: 200 }}>
84
- <TimeInput bare time={new Date()} onTimeChange={() => {}} />
85
- <TimeInput
86
- bare
87
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
88
- time={new Date()}
89
- onTimeChange={() => {}}
90
- />
91
- </Column>
92
-
93
- ```js
94
- <TimeInput bare time={time} onTimeChange={setTime} />
95
-
96
- <TimeInput
97
- bare
98
- addOn={<Icon icon="fa-clock-o" color="primary" size="medium" />}
99
- time={time}
100
- onTimeChange={setTime}
101
- />
102
- ```
103
-
104
- ---
105
-
106
- ## Disabled state
107
-
108
- <Column gap="medium" jss={{ maxWidth: 200 }}>
109
- <TimeInput disabled time={new Date()} onTimeChange={() => {}} />
110
- <TimeInput bare disabled time={new Date()} onTimeChange={() => {}} />
111
- </Column>
112
-
113
- ```js
114
- <TimeInput disabled time={time} onTimeChange={setTime} />
115
- <TimeInput bare disabled time={time} onTimeChange={setTime} />
116
- ```
117
-
118
- ---
119
-
120
- ## Working with Date objects
121
-
122
- The component works with JavaScript Date objects. Only the hours and minutes are used:
123
-
124
- ```js
125
- function ScheduleForm() {
126
- const [startTime, setStartTime] = useState(new Date());
127
- const [endTime, setEndTime] = useState(new Date());
128
-
129
- // Get just the time portion
130
- const formatTime = (date) => {
131
- return date.toLocaleTimeString("en-US", {
132
- hour: "2-digit",
133
- minute: "2-digit",
134
- });
135
- };
136
-
137
- return (
138
- <Column gap="medium">
139
- <Row gap="medium" align="center">
140
- <Span>From:</Span>
141
- <TimeInput time={startTime} onTimeChange={setStartTime} />
142
- </Row>
143
- <Row gap="medium" align="center">
144
- <Span>To:</Span>
145
- <TimeInput time={endTime} onTimeChange={setEndTime} />
146
- </Row>
147
- <Span color="secondary">
148
- Selected: {formatTime(startTime)} - {formatTime(endTime)}
149
- </Span>
150
- </Column>
151
- );
152
- }
153
- ```
154
-
155
- ---
156
-
157
- ## Setting initial time
158
-
159
- ```js
160
- // Current time
161
- const [time, setTime] = useState(new Date());
162
-
163
- // Specific time (e.g., 9:30 AM)
164
- const [time, setTime] = useState(() => {
165
- const date = new Date();
166
- date.setHours(9, 30, 0, 0);
167
- return date;
168
- });
169
- ```
170
-
171
- ---
172
-
173
- ## Accessibility
174
-
175
- - Uses native `<input type="time">` for full browser accessibility support
176
- - Focus states are visually indicated
177
- - Works with keyboard navigation
178
- - Screen readers announce the input purpose
@@ -1,115 +0,0 @@
1
- import { Button } from "../Button";
2
- import { IconButton } from "../IconButton";
3
- import { Row } from "../Row";
4
- import { Tooltip } from "../Tooltip";
5
-
6
- # Tooltip
7
-
8
- Displays contextual information when hovering over an element. Tooltips are for informational text only and should not contain interactive content.
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Required | Default | Description |
15
- |------|------|----------|---------|-------------|
16
- | `content` | `string` | Yes | - | Text to display in the tooltip |
17
- | `children` | `ReactNode` | Yes | - | Element that triggers the tooltip on hover |
18
- | `tag` | `keyof HTMLElementTagNameMap` | No | - | HTML tag for the wrapper element |
19
- | `jss` | `JSS` | No | - | Custom styles for the wrapper |
20
-
21
- ---
22
-
23
- ## Basic usage
24
-
25
- Wrap any element with `Tooltip` to show contextual information on hover:
26
-
27
- <Row gap="large" padding="xlarge">
28
- <Tooltip content="This confirms the action">
29
- <Button bare color="positive" onClick={() => {}}>
30
- Hover me
31
- </Button>
32
- </Tooltip>
33
- </Row>
34
-
35
- ```js
36
- <Tooltip content="This confirms the action">
37
- <Button bare color="positive" onClick={() => {}}>
38
- Hover me
39
- </Button>
40
- </Tooltip>
41
- ```
42
-
43
- ---
44
-
45
- ## With IconButton
46
-
47
- Tooltips are especially useful with icon-only buttons to explain their purpose:
48
-
49
- <Row gap="large" padding="xlarge">
50
- <Tooltip content="Save document">
51
- <IconButton bare icon="fa-save" size="medium" color="secondary" onClick={() => {}} />
52
- </Tooltip>
53
- <Tooltip content="Print document">
54
- <IconButton bare icon="fa-print" size="medium" color="secondary" onClick={() => {}} />
55
- </Tooltip>
56
- <Tooltip content="Share with others">
57
- <IconButton bare icon="fa-share" size="medium" color="secondary" onClick={() => {}} />
58
- </Tooltip>
59
- </Row>
60
-
61
- ```js
62
- <Tooltip content="Save document">
63
- <IconButton
64
- bare
65
- icon="fa-save"
66
- size="medium"
67
- color="secondary"
68
- onClick={() => {}}
69
- />
70
- </Tooltip>
71
- ```
72
-
73
- ---
74
-
75
- ## Behavior
76
-
77
- - **Shows on hover**: Tooltip appears when mouse enters the wrapped element
78
- - **Hides on leave**: Tooltip disappears when mouse leaves
79
- - **Keyboard dismissal**: Pressing Escape or Tab closes the tooltip
80
- - **Click dismissal**: Clicking anywhere closes the tooltip
81
-
82
- ---
83
-
84
- ## Accessibility considerations
85
-
86
- Tooltips should contain only supplementary information:
87
-
88
- - **Do**: Use for hints, descriptions, or labels
89
- - **Don't**: Put interactive elements (buttons, links) inside tooltips
90
- - **Don't**: Put essential information only in tooltips
91
-
92
- For interactive floating content, use `Popover` instead.
93
-
94
- ```js
95
- // Good - informational tooltip
96
- <Tooltip content="Keyboard shortcut: Ctrl+S">
97
- <Button color="primary" onClick={save}>Save</Button>
98
- </Tooltip>
99
-
100
- // Bad - essential information hidden
101
- <Tooltip content="Click here to delete your account permanently">
102
- <Button color="negative" onClick={delete}>Delete</Button>
103
- </Tooltip>
104
- ```
105
-
106
- ---
107
-
108
- ## Tooltip vs Popover
109
-
110
- | Use Tooltip | Use Popover |
111
- |-------------|-------------|
112
- | Simple text hints | Interactive content |
113
- | Non-essential information | Menus, forms, selections |
114
- | Keyboard shortcuts | Actions requiring user input |
115
- | Brief descriptions | Multi-step interactions |