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,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 |