@public-ui/sample-react 3.0.0-rc.1 → 3.0.0-rc.11

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 (338) hide show
  1. package/dist/1006.js +2 -0
  2. package/dist/1752.js +2 -0
  3. package/dist/1932.js +2 -0
  4. package/dist/2069.js +2 -0
  5. package/dist/2212.js +2 -0
  6. package/dist/2231.js +2 -0
  7. package/dist/2321.js +2 -0
  8. package/dist/2596.js +2 -0
  9. package/dist/2827.js +2 -0
  10. package/dist/2894.js +2 -0
  11. package/dist/3099.js +2 -0
  12. package/dist/3151.js +2 -0
  13. package/dist/3203.js +2 -0
  14. package/dist/3540.js +2 -0
  15. package/dist/3708.js +2 -0
  16. package/dist/373.js +2 -0
  17. package/dist/3918.js +2 -0
  18. package/dist/3920.js +2 -0
  19. package/dist/4030.js +2 -0
  20. package/dist/4048.js +2 -0
  21. package/dist/4108.js +2 -0
  22. package/dist/4201.js +2 -0
  23. package/dist/4587.js +2 -0
  24. package/dist/4611.js +2 -0
  25. package/dist/4641.js +2 -0
  26. package/dist/4876.js +2 -0
  27. package/dist/5249.js +2 -0
  28. package/dist/5301.js +1 -1
  29. package/dist/5690.js +2 -0
  30. package/dist/5746.js +2 -0
  31. package/dist/{2450.js → 6047.js} +2 -2
  32. package/dist/6066.js +2 -0
  33. package/dist/6256.js +2 -0
  34. package/dist/6304.js +2 -0
  35. package/dist/6781.js +2 -0
  36. package/dist/6790.js +2 -0
  37. package/dist/6984.js +2 -0
  38. package/dist/7013.js +2 -0
  39. package/dist/7178.js +2 -0
  40. package/dist/7347.js +2 -0
  41. package/dist/740.js +2 -0
  42. package/dist/7444.js +2 -0
  43. package/dist/7533.js +2 -0
  44. package/dist/7535.js +2 -0
  45. package/dist/775.js +2 -0
  46. package/dist/779.js +2 -0
  47. package/dist/8137.js +2 -0
  48. package/dist/8180.js +2 -0
  49. package/dist/8192.js +2 -0
  50. package/dist/8246.js +1 -0
  51. package/dist/833.js +2 -0
  52. package/dist/8378.js +2 -0
  53. package/dist/8605.js +2 -0
  54. package/dist/8625.js +2 -0
  55. package/dist/8840.js +2 -0
  56. package/dist/907.js +2 -0
  57. package/dist/9108.js +2 -0
  58. package/dist/9255.js +2 -0
  59. package/dist/9288.js +2 -0
  60. package/dist/9322.js +2 -0
  61. package/dist/9581.js +2 -0
  62. package/dist/9719.js +2 -0
  63. package/dist/9731.js +2 -0
  64. package/dist/9907.js +2 -0
  65. package/dist/9930.js +2 -0
  66. package/dist/9938.js +2 -0
  67. package/dist/assets/kreon/OFL.txt +93 -93
  68. package/dist/assets/material-icons/css/_mixins.scss +2 -2
  69. package/dist/assets/material-icons/css/_variables.scss +3 -3
  70. package/dist/assets/material-icons/css/material-icons.scss +16 -22
  71. package/dist/assets/material-icons/iconfont/filled.scss +3 -3
  72. package/dist/assets/material-icons/iconfont/material-icons.scss +5 -5
  73. package/dist/assets/material-icons/iconfont/outlined.scss +3 -3
  74. package/dist/assets/material-icons/iconfont/round.scss +3 -3
  75. package/dist/assets/material-icons/iconfont/sharp.scss +3 -3
  76. package/dist/assets/material-icons/iconfont/two-tone.scss +3 -3
  77. package/dist/assets/material-symbols/index.scss +3 -3
  78. package/dist/assets/material-symbols/outlined.scss +2 -2
  79. package/dist/assets/material-symbols/rounded.scss +2 -2
  80. package/dist/assets/material-symbols/sharp.scss +2 -2
  81. package/dist/assets/noto-sans/fonts/OFL.txt +93 -93
  82. package/dist/assets/roboto/LICENSE.txt +202 -202
  83. package/dist/index.html +1 -0
  84. package/dist/main.css +3 -3
  85. package/dist/main.js +1 -1
  86. package/dist/main.js.LICENSE.txt +2 -2
  87. package/package.json +32 -24
  88. package/public/assets/kreon/OFL.txt +93 -93
  89. package/public/assets/material-icons/css/_mixins.scss +2 -2
  90. package/public/assets/material-icons/css/_variables.scss +3 -3
  91. package/public/assets/material-icons/css/material-icons.scss +16 -22
  92. package/public/assets/material-icons/iconfont/filled.scss +3 -3
  93. package/public/assets/material-icons/iconfont/material-icons.scss +5 -5
  94. package/public/assets/material-icons/iconfont/outlined.scss +3 -3
  95. package/public/assets/material-icons/iconfont/round.scss +3 -3
  96. package/public/assets/material-icons/iconfont/sharp.scss +3 -3
  97. package/public/assets/material-icons/iconfont/two-tone.scss +3 -3
  98. package/public/assets/material-symbols/index.scss +3 -3
  99. package/public/assets/material-symbols/outlined.scss +2 -2
  100. package/public/assets/material-symbols/rounded.scss +2 -2
  101. package/public/assets/material-symbols/sharp.scss +2 -2
  102. package/public/assets/noto-sans/fonts/OFL.txt +93 -93
  103. package/public/assets/roboto/LICENSE.txt +202 -202
  104. package/public/index.html +1 -0
  105. package/src/App.tsx +1 -3
  106. package/src/components/SampleColumns.tsx +10 -0
  107. package/src/components/SampleDescription.tsx +27 -15
  108. package/src/components/Sidebar.tsx +29 -10
  109. package/src/components/badge/basic.tsx +1 -1
  110. package/src/components/badge/button.tsx +1 -1
  111. package/src/components/button/baselined.tsx +1 -1
  112. package/src/components/button/partials/cases.tsx +2 -2
  113. package/src/components/button/short-key.tsx +104 -3
  114. package/src/components/combobox/partials/variants.tsx +3 -2
  115. package/src/components/drawer/basic.tsx +9 -25
  116. package/src/components/drawer/controlled.tsx +0 -8
  117. package/src/components/form/error-list.tsx +66 -24
  118. package/src/components/handout/basic.tsx +25 -30
  119. package/src/components/icon/basic.tsx +2 -1
  120. package/src/components/input-checkbox/partials/variants.tsx +5 -4
  121. package/src/components/input-color/partials/cases.tsx +4 -2
  122. package/src/components/input-color/partials/variants.tsx +3 -2
  123. package/src/components/input-date/partials/cases.tsx +7 -4
  124. package/src/components/input-date/partials/minMax.tsx +3 -3
  125. package/src/components/input-date/partials/variants.tsx +4 -3
  126. package/src/components/input-date/show-hide-msg.tsx +1 -2
  127. package/src/components/input-email/partials/cases.tsx +6 -3
  128. package/src/components/input-email/partials/variants.tsx +3 -2
  129. package/src/components/input-file/partials/cases.tsx +6 -3
  130. package/src/components/input-file/partials/variants.tsx +3 -2
  131. package/src/components/input-number/partials/variants.tsx +3 -2
  132. package/src/components/input-password/partials/cases.tsx +8 -5
  133. package/src/components/input-password/partials/variants.tsx +3 -2
  134. package/src/components/input-radio/partials/variants.tsx +11 -8
  135. package/src/components/input-range/partials/cases.tsx +6 -3
  136. package/src/components/input-range/partials/variants.tsx +3 -2
  137. package/src/components/input-text/{hide-errors.tsx → hide-msg.tsx} +5 -5
  138. package/src/components/input-text/partials/cases.tsx +1 -1
  139. package/src/components/input-text/partials/variants.tsx +3 -2
  140. package/src/components/input-text/routes.ts +2 -2
  141. package/src/components/input-text/smart-button.tsx +14 -1
  142. package/src/components/input-text/text-formatter.tsx +1 -2
  143. package/src/components/link/access-key.tsx +1 -3
  144. package/src/components/link/short-key.tsx +1 -1
  145. package/src/components/link-button/aria-description.tsx +1 -1
  146. package/src/components/link-button/basic.tsx +8 -10
  147. package/src/components/modal/basic.tsx +28 -12
  148. package/src/components/nav/basic.tsx +8 -2
  149. package/src/components/nav/horizontal.tsx +2 -2
  150. package/src/components/pagination/basic.tsx +1 -1
  151. package/src/components/popover-button/basic.tsx +55 -0
  152. package/src/components/popover-button/routes.ts +8 -0
  153. package/src/components/progress/basic.tsx +12 -5
  154. package/src/components/select/partials/cases.tsx +22 -4
  155. package/src/components/select/partials/variants.tsx +3 -2
  156. package/src/components/single-select/partials/cases.tsx +9 -4
  157. package/src/components/single-select/partials/variants.tsx +8 -7
  158. package/src/components/split-button/basic.tsx +2 -2
  159. package/src/components/table/column-alignment.tsx +16 -12
  160. package/src/components/table/complex-headers.tsx +4 -3
  161. package/src/components/table/horizontal-scrollbar.tsx +12 -6
  162. package/src/components/table/interactive-child-elements.tsx +2 -0
  163. package/src/components/table/multi-sort.tsx +6 -4
  164. package/src/components/table/pagination-position.tsx +26 -5
  165. package/src/components/table/predefined-settings.tsx +41 -0
  166. package/src/components/table/render-cell.tsx +5 -5
  167. package/src/components/table/routes.ts +6 -4
  168. package/src/components/table/sort-data.tsx +16 -18
  169. package/src/components/table/stateful-with-selection.tsx +10 -6
  170. package/src/components/table/stateful-with-single-selection.tsx +6 -5
  171. package/src/components/table/stateless-with-selection.tsx +11 -7
  172. package/src/components/table/stateless-with-single-selection.tsx +9 -6
  173. package/src/components/table/stateless.tsx +1 -0
  174. package/src/components/table/with-footer.tsx +4 -3
  175. package/src/components/table/with-pagination.tsx +3 -3
  176. package/src/components/textarea/partials/cases.tsx +9 -4
  177. package/src/components/textarea/partials/variants.tsx +3 -2
  178. package/src/components/tree/basic.tsx +2 -1
  179. package/src/react.main.tsx +4 -9
  180. package/src/scenarios/appointment-form/PersonalInformationForm.tsx +4 -1
  181. package/src/scenarios/change-tabindex.tsx +24 -22
  182. package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +2 -2
  183. package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +4 -4
  184. package/src/scenarios/input-group-with-error.tsx +4 -4
  185. package/src/scenarios/routes.ts +2 -0
  186. package/src/scenarios/same-height-of-all-interactive-elements.tsx +62 -0
  187. package/src/shares/longOptions.ts +15 -0
  188. package/src/shares/routes.ts +3 -7
  189. package/src/shares/theme.ts +4 -8
  190. package/src/style.scss +17 -6
  191. package/unocss.config.ts +67 -68
  192. package/webpack.config.js +13 -2
  193. package/dist/1073.js +0 -2
  194. package/dist/1325.js +0 -2
  195. package/dist/1392.js +0 -2
  196. package/dist/1604.js +0 -2
  197. package/dist/175.js +0 -2
  198. package/dist/178.js +0 -2
  199. package/dist/1791.js +0 -2
  200. package/dist/2220.js +0 -2
  201. package/dist/2444.js +0 -2
  202. package/dist/2671.js +0 -2
  203. package/dist/2986.js +0 -2
  204. package/dist/3030.js +0 -2
  205. package/dist/3270.js +0 -2
  206. package/dist/3340.js +0 -2
  207. package/dist/3392.js +0 -2
  208. package/dist/3529.js +0 -2
  209. package/dist/3756.js +0 -2
  210. package/dist/3960.js +0 -2
  211. package/dist/399.js +0 -2
  212. package/dist/4145.js +0 -2
  213. package/dist/4288.js +0 -2
  214. package/dist/4539.js +0 -2
  215. package/dist/4563.js +0 -2
  216. package/dist/4571.js +0 -2
  217. package/dist/5260.js +0 -2
  218. package/dist/5333.js +0 -2
  219. package/dist/5523.js +0 -2
  220. package/dist/5551.js +0 -2
  221. package/dist/5575.js +0 -2
  222. package/dist/5665.js +0 -2
  223. package/dist/572.js +0 -2
  224. package/dist/5873.js +0 -2
  225. package/dist/5879.js +0 -2
  226. package/dist/5964.js +0 -2
  227. package/dist/6005.js +0 -2
  228. package/dist/618.js +0 -2
  229. package/dist/623.js +0 -2
  230. package/dist/643.js +0 -2
  231. package/dist/6610.js +0 -2
  232. package/dist/6618.js +0 -2
  233. package/dist/6711.js +0 -2
  234. package/dist/6740.js +0 -2
  235. package/dist/6786.js +0 -2
  236. package/dist/685.js +0 -2
  237. package/dist/6950.js +0 -2
  238. package/dist/7055.js +0 -2
  239. package/dist/7106.js +0 -2
  240. package/dist/7141.js +0 -2
  241. package/dist/7146.js +0 -2
  242. package/dist/7287.js +0 -2
  243. package/dist/7599.js +0 -2
  244. package/dist/7648.js +0 -2
  245. package/dist/7668.js +0 -2
  246. package/dist/7855.js +0 -2
  247. package/dist/8165.js +0 -2
  248. package/dist/8177.js +0 -2
  249. package/dist/8306.js +0 -2
  250. package/dist/8543.js +0 -2
  251. package/dist/866.js +0 -2
  252. package/dist/8859.js +0 -2
  253. package/dist/904.js +0 -2
  254. package/dist/9148.js +0 -2
  255. package/dist/9522.js +0 -2
  256. package/dist/9625.js +0 -2
  257. package/dist/9625.js.LICENSE.txt +0 -3
  258. package/dist/971.js +0 -2
  259. package/dist/971.js.LICENSE.txt +0 -3
  260. package/dist/9712.js +0 -2
  261. package/dist/9712.js.LICENSE.txt +0 -3
  262. package/dist/976.js +0 -2
  263. package/dist/976.js.LICENSE.txt +0 -3
  264. package/dist/982.js +0 -2
  265. package/dist/982.js.LICENSE.txt +0 -3
  266. package/dist/986.js +0 -2
  267. package/dist/986.js.LICENSE.txt +0 -3
  268. package/src/components/button-group/basic.tsx +0 -34
  269. package/src/components/button-group/routes.ts +0 -8
  270. package/src/components/indented-text/basic.tsx +0 -37
  271. package/src/components/indented-text/routes.ts +0 -8
  272. package/src/components/link-group/basic.tsx +0 -23
  273. package/src/components/link-group/horizontal.tsx +0 -23
  274. package/src/components/link-group/routes.ts +0 -10
  275. /package/dist/{1073.js.LICENSE.txt → 1006.js.LICENSE.txt} +0 -0
  276. /package/dist/{1325.js.LICENSE.txt → 1752.js.LICENSE.txt} +0 -0
  277. /package/dist/{1392.js.LICENSE.txt → 1932.js.LICENSE.txt} +0 -0
  278. /package/dist/{1604.js.LICENSE.txt → 2069.js.LICENSE.txt} +0 -0
  279. /package/dist/{175.js.LICENSE.txt → 2212.js.LICENSE.txt} +0 -0
  280. /package/dist/{178.js.LICENSE.txt → 2231.js.LICENSE.txt} +0 -0
  281. /package/dist/{1791.js.LICENSE.txt → 2321.js.LICENSE.txt} +0 -0
  282. /package/dist/{2220.js.LICENSE.txt → 2596.js.LICENSE.txt} +0 -0
  283. /package/dist/{2444.js.LICENSE.txt → 2827.js.LICENSE.txt} +0 -0
  284. /package/dist/{2450.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
  285. /package/dist/{2671.js.LICENSE.txt → 3099.js.LICENSE.txt} +0 -0
  286. /package/dist/{2986.js.LICENSE.txt → 3151.js.LICENSE.txt} +0 -0
  287. /package/dist/{3030.js.LICENSE.txt → 3203.js.LICENSE.txt} +0 -0
  288. /package/dist/{3270.js.LICENSE.txt → 3540.js.LICENSE.txt} +0 -0
  289. /package/dist/{3340.js.LICENSE.txt → 3708.js.LICENSE.txt} +0 -0
  290. /package/dist/{3392.js.LICENSE.txt → 373.js.LICENSE.txt} +0 -0
  291. /package/dist/{3529.js.LICENSE.txt → 3918.js.LICENSE.txt} +0 -0
  292. /package/dist/{3756.js.LICENSE.txt → 3920.js.LICENSE.txt} +0 -0
  293. /package/dist/{3960.js.LICENSE.txt → 4030.js.LICENSE.txt} +0 -0
  294. /package/dist/{399.js.LICENSE.txt → 4048.js.LICENSE.txt} +0 -0
  295. /package/dist/{4145.js.LICENSE.txt → 4108.js.LICENSE.txt} +0 -0
  296. /package/dist/{4288.js.LICENSE.txt → 4201.js.LICENSE.txt} +0 -0
  297. /package/dist/{4539.js.LICENSE.txt → 4587.js.LICENSE.txt} +0 -0
  298. /package/dist/{4563.js.LICENSE.txt → 4611.js.LICENSE.txt} +0 -0
  299. /package/dist/{4571.js.LICENSE.txt → 4641.js.LICENSE.txt} +0 -0
  300. /package/dist/{5260.js.LICENSE.txt → 4876.js.LICENSE.txt} +0 -0
  301. /package/dist/{5333.js.LICENSE.txt → 5249.js.LICENSE.txt} +0 -0
  302. /package/dist/{5523.js.LICENSE.txt → 5690.js.LICENSE.txt} +0 -0
  303. /package/dist/{5551.js.LICENSE.txt → 5746.js.LICENSE.txt} +0 -0
  304. /package/dist/{5575.js.LICENSE.txt → 6047.js.LICENSE.txt} +0 -0
  305. /package/dist/{5665.js.LICENSE.txt → 6066.js.LICENSE.txt} +0 -0
  306. /package/dist/{572.js.LICENSE.txt → 6256.js.LICENSE.txt} +0 -0
  307. /package/dist/{5873.js.LICENSE.txt → 6304.js.LICENSE.txt} +0 -0
  308. /package/dist/{5879.js.LICENSE.txt → 6781.js.LICENSE.txt} +0 -0
  309. /package/dist/{5964.js.LICENSE.txt → 6790.js.LICENSE.txt} +0 -0
  310. /package/dist/{6005.js.LICENSE.txt → 6984.js.LICENSE.txt} +0 -0
  311. /package/dist/{618.js.LICENSE.txt → 7013.js.LICENSE.txt} +0 -0
  312. /package/dist/{623.js.LICENSE.txt → 7178.js.LICENSE.txt} +0 -0
  313. /package/dist/{643.js.LICENSE.txt → 7347.js.LICENSE.txt} +0 -0
  314. /package/dist/{6610.js.LICENSE.txt → 740.js.LICENSE.txt} +0 -0
  315. /package/dist/{6618.js.LICENSE.txt → 7444.js.LICENSE.txt} +0 -0
  316. /package/dist/{6711.js.LICENSE.txt → 7533.js.LICENSE.txt} +0 -0
  317. /package/dist/{6740.js.LICENSE.txt → 7535.js.LICENSE.txt} +0 -0
  318. /package/dist/{6786.js.LICENSE.txt → 775.js.LICENSE.txt} +0 -0
  319. /package/dist/{685.js.LICENSE.txt → 779.js.LICENSE.txt} +0 -0
  320. /package/dist/{6950.js.LICENSE.txt → 8137.js.LICENSE.txt} +0 -0
  321. /package/dist/{7055.js.LICENSE.txt → 8180.js.LICENSE.txt} +0 -0
  322. /package/dist/{7106.js.LICENSE.txt → 8192.js.LICENSE.txt} +0 -0
  323. /package/dist/{7141.js.LICENSE.txt → 833.js.LICENSE.txt} +0 -0
  324. /package/dist/{7146.js.LICENSE.txt → 8378.js.LICENSE.txt} +0 -0
  325. /package/dist/{7287.js.LICENSE.txt → 8605.js.LICENSE.txt} +0 -0
  326. /package/dist/{7599.js.LICENSE.txt → 8625.js.LICENSE.txt} +0 -0
  327. /package/dist/{7648.js.LICENSE.txt → 8840.js.LICENSE.txt} +0 -0
  328. /package/dist/{7668.js.LICENSE.txt → 907.js.LICENSE.txt} +0 -0
  329. /package/dist/{7855.js.LICENSE.txt → 9108.js.LICENSE.txt} +0 -0
  330. /package/dist/{8165.js.LICENSE.txt → 9255.js.LICENSE.txt} +0 -0
  331. /package/dist/{8177.js.LICENSE.txt → 9288.js.LICENSE.txt} +0 -0
  332. /package/dist/{8306.js.LICENSE.txt → 9322.js.LICENSE.txt} +0 -0
  333. /package/dist/{8543.js.LICENSE.txt → 9581.js.LICENSE.txt} +0 -0
  334. /package/dist/{866.js.LICENSE.txt → 9719.js.LICENSE.txt} +0 -0
  335. /package/dist/{8859.js.LICENSE.txt → 9731.js.LICENSE.txt} +0 -0
  336. /package/dist/{904.js.LICENSE.txt → 9907.js.LICENSE.txt} +0 -0
  337. /package/dist/{9148.js.LICENSE.txt → 9930.js.LICENSE.txt} +0 -0
  338. /package/dist/{9522.js.LICENSE.txt → 9938.js.LICENSE.txt} +0 -0
@@ -6,36 +6,48 @@ import { PUBLIC_CODE_COMPONENT_URL, PUBLIC_DOC_COMPONENT_URL } from '../shares/c
6
6
  import { KolLink } from '@public-ui/react';
7
7
 
8
8
  import { HideMenusContext } from '../shares/HideMenusContext';
9
-
10
- const getLocationPaths = () => {
11
- return location.hash.split('/').slice(1);
12
- };
9
+ import { useLocation } from 'react-router';
13
10
 
14
11
  export const SampleDescription: FC<PropsWithChildren> = (props) => {
15
12
  const hideMenus = useContext(HideMenusContext);
13
+ const location = useLocation();
14
+ const paths = location.pathname.split('/').slice(1);
16
15
 
17
16
  const docLink = useMemo(() => {
18
- const paths = getLocationPaths();
19
17
  return paths[0] === 'scenarios'
20
18
  ? null // Scenarios are not a component and hence have no documentation.
21
19
  : `${PUBLIC_DOC_COMPONENT_URL}/${paths[0]}`;
22
20
  }, [location.hash]);
23
21
 
24
22
  const codeLink = useMemo(() => {
25
- const paths = getLocationPaths();
26
23
  return paths[0] === 'scenarios'
27
24
  ? null // Scenarios are not a component and hence have no documentation.
28
25
  : `${PUBLIC_CODE_COMPONENT_URL}/${paths[0]}/${paths[1]}.tsx`;
29
26
  }, [location.hash]);
30
27
 
31
- return hideMenus ? null : (
32
- <div className="flex justify-between mb-sm">
33
- <div className="indented-text">{props.children}</div>
34
- <div className="flex flex-wrap gap-2 shrink-0 ml">
35
- {codeLink && <KolLink _href={codeLink} _label="Code" _target="_blank" />}
36
- {docLink && <KolLink _href={docLink} _label="Documentation" _target="_blank" />}
37
- <KolLink _href={`${location.href}?hideMenus`} _label="Standalone example" _target="_blank" />
38
- </div>
39
- </div>
28
+ return (
29
+ <>
30
+ <h1 className="visually-hidden">{location.pathname.replace(/\//g, ' ')}</h1>
31
+ {hideMenus ? null : (
32
+ <div className="grid sm:flex gap-4 justify-between pb-sm border-b-1 border-b-solid border-gray mb-2">
33
+ <div className="indented-text">{props.children}</div>
34
+ <ul className="flex flex-wrap gap-2 list-none m-0 p-0">
35
+ {codeLink && (
36
+ <li>
37
+ <KolLink _href={codeLink} _label="Code" _target="_blank" />
38
+ </li>
39
+ )}
40
+ {docLink && (
41
+ <li>
42
+ <KolLink _href={docLink} _label="Documentation" _target="_blank" />
43
+ </li>
44
+ )}
45
+ <li>
46
+ <KolLink _href={`#${location.pathname}?hideMenus`} _label="Standalone example" _target="_blank" />
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ )}
51
+ </>
40
52
  );
41
53
  };
@@ -7,6 +7,34 @@ import { THEME_OPTIONS } from '../shares/theme';
7
7
 
8
8
  import type { Routes } from '../shares/types';
9
9
  import Navigation from './Navigation';
10
+
11
+ type BuildInformationProps = {
12
+ buildDate?: string | null;
13
+ commitHash?: string | null;
14
+ };
15
+ const BuildInformation: FC<BuildInformationProps> = ({ buildDate, commitHash }) => {
16
+ if (!buildDate && !commitHash) {
17
+ return '';
18
+ }
19
+
20
+ return (
21
+ <div className="text-sm font-mono color-gray-5 m-t-2">
22
+ {buildDate && commitHash ? ( // date and hash provided
23
+ <>
24
+ Build: {commitHash}
25
+ <br />
26
+ at {buildDate}
27
+ </>
28
+ ) : commitHash ? ( // hash only
29
+ `Build: ${commitHash}`
30
+ ) : (
31
+ // date only
32
+ `Build date: ${buildDate}`
33
+ )}
34
+ </div>
35
+ );
36
+ };
37
+
10
38
  type Props = {
11
39
  version: string;
12
40
  theme: string;
@@ -47,16 +75,8 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
47
75
  <KolHeading _label="KoliBri React"></KolHeading>
48
76
  <KolVersion _label={version}></KolVersion>
49
77
  </div>
50
- {(buildDate || commitHash) && (
51
- <div className="text-sm font-mono color-gray-5 m-t-2">
52
- {commitHash ? `Build: ${commitHash}` : ''}
53
- <br />
54
- {buildDate ? `at ${buildDate}` : ''}
55
- </div>
56
- )}
57
-
78
+ <BuildInformation buildDate={buildDate} commitHash={commitHash} />
58
79
  <KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
59
-
60
80
  <KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
61
81
  <div className="flex flex-justify-between flex-items-center mt">
62
82
  <KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
@@ -65,7 +85,6 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
65
85
  </span>
66
86
  <KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
67
87
  </div>
68
-
69
88
  <Navigation routes={routes} />
70
89
  </div>
71
90
  </aside>
@@ -11,7 +11,7 @@ export const BadgeBasic: FC = () => (
11
11
  <p>KolBadge shows badges with a label, background color and optional icon.</p>
12
12
  </SampleDescription>
13
13
 
14
- <div className="flex gap-2">
14
+ <div className="flex flex-wrap gap-2">
15
15
  <KolBadge _label="black"></KolBadge>
16
16
  <KolBadge _color="#86ffc6" _label="teal"></KolBadge>
17
17
  <KolBadge _color="#06539e" _label="blue"></KolBadge>
@@ -23,7 +23,7 @@ export const BadgeButton: FC = () => (
23
23
  </p>
24
24
  </SampleDescription>
25
25
 
26
- <div className="flex gap-2">
26
+ <div className="flex flex-wrap gap-2">
27
27
  <KolBadge {...createBadgeProps('black')}></KolBadge>
28
28
  <KolBadge _color="#86ffc6" {...createBadgeProps('teal')}></KolBadge>
29
29
  <KolBadge _color="#06539e" {...createBadgeProps('blue')}></KolBadge>
@@ -19,7 +19,7 @@ export const ButtonBaselined: FC = () => {
19
19
  <p>This KolButton sample is used for internal testing purposes: It features multiple buttons with and without icons which are vertically aligned.</p>
20
20
  </SampleDescription>
21
21
 
22
- <div className="flex">
22
+ <div className="flex flex-wrap gap-2">
23
23
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
24
24
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
25
25
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
@@ -20,10 +20,10 @@ export const ButtonCases: React.FC<ButtonSampleProps> = (props) => {
20
20
  <KolButton _icons="codicon codicon-heart" _label="Secondary" _variant="secondary" _on={dummyEventHandler} {...other}>
21
21
  {children}
22
22
  </KolButton>
23
- <KolButton _icons="codicon codicon-hubot" _label="Normal" _variant="normal" _on={dummyEventHandler} {...other}>
23
+ <KolButton _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary" _on={dummyEventHandler} {...other}>
24
24
  {children}
25
25
  </KolButton>
26
- <KolButton _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary" _on={dummyEventHandler} {...other}>
26
+ <KolButton _icons="codicon codicon-hubot" _label="Normal" _variant="normal" _on={dummyEventHandler} {...other}>
27
27
  {children}
28
28
  </KolButton>
29
29
  <KolButton _icons="codicon codicon-trash" _label="Danger" _variant="danger" _on={dummyEventHandler} {...other}>
@@ -1,8 +1,61 @@
1
- import { KolButton } from '@public-ui/react';
2
- import React from 'react';
1
+ import { createReactRenderElement, KolButton, KolHeading, KolTableStateful } from '@public-ui/react';
3
2
  import type { FC } from 'react';
3
+ import { useRef } from 'react';
4
+ import React from 'react';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
  import { useToasterService } from '../../hooks/useToasterService';
7
+ import { getRoot } from '../../shares/react-roots';
8
+ import type { KoliBriTableHeaders } from '@public-ui/components';
9
+ import { ToasterService } from '@public-ui/components';
10
+
11
+ const RowActions: FC<{ label: string }> = ({ label }) => {
12
+ const toaster = ToasterService.getInstance(document);
13
+ const editButtonRef = useRef<HTMLKolButtonElement | null>(null);
14
+ const deleteButtonRef = useRef<HTMLKolButtonElement | null>(null);
15
+
16
+ const handleEditClick = () => {
17
+ toaster.enqueue({
18
+ label: 'Edit clicked',
19
+ description: `The button "edit" has been clicked for ${label}`,
20
+ type: 'info',
21
+ });
22
+ };
23
+
24
+ const handleDeleteClick = () => {
25
+ toaster.enqueue({
26
+ label: 'Delete clicked',
27
+ description: `The button "delete" has been clicked for ${label}`,
28
+ type: 'warning',
29
+ });
30
+ };
31
+
32
+ const handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {
33
+ switch (event.code) {
34
+ case 'KeyE':
35
+ void editButtonRef.current?.kolFocus();
36
+ handleEditClick();
37
+ return;
38
+ case 'KeyD':
39
+ void deleteButtonRef.current?.kolFocus();
40
+ handleDeleteClick();
41
+ return;
42
+ }
43
+ };
44
+
45
+ return (
46
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
47
+ <div
48
+ style={{
49
+ display: 'flex',
50
+ gap: 'calc(10rem / var(--kolibri-root-font-size, 16))',
51
+ }}
52
+ onKeyUp={handleKeyUp}
53
+ >
54
+ <KolButton ref={editButtonRef} _label={'Edit'} _shortKey={'e'} _on={{ onClick: handleEditClick }} />
55
+ <KolButton ref={deleteButtonRef} _label={'Delete'} _shortKey={'d'} _variant={'danger'} _on={{ onClick: handleDeleteClick }} />
56
+ </div>
57
+ );
58
+ };
6
59
 
7
60
  export const ButtonShortKey: FC = () => {
8
61
  const { dummyClickEventHandler } = useToasterService();
@@ -11,11 +64,50 @@ export const ButtonShortKey: FC = () => {
11
64
  onClick: dummyClickEventHandler,
12
65
  };
13
66
 
67
+ type Data = {
68
+ label: string;
69
+ };
70
+ const DATA: Data[] = [
71
+ {
72
+ label: 'Row 1',
73
+ },
74
+ {
75
+ label: 'Row 2',
76
+ },
77
+ ];
78
+
79
+ const HEADERS: KoliBriTableHeaders = {
80
+ horizontal: [
81
+ [
82
+ {
83
+ label: 'Label',
84
+ key: 'label',
85
+ textAlign: 'left',
86
+ },
87
+ {
88
+ label: 'Actions',
89
+ key: 'actions',
90
+ textAlign: 'left',
91
+
92
+ render: (el, cell) => {
93
+ getRoot(createReactRenderElement(el)).render(<RowActions label={(cell.data as Data).label} />);
94
+ },
95
+ },
96
+ ],
97
+ ],
98
+ };
99
+
14
100
  return (
15
101
  <>
16
102
  <SampleDescription>
17
103
  <p>
18
- This sample shows KolButton with short key without functionality. The short key is purely visual. Its functionality needs to be developed separately.{' '}
104
+ The first sample shows KolButton with short key without functionality. The short key is purely visual. Its functionality needs to be developed
105
+ separately.
106
+ </p>
107
+ <p>
108
+ The second sample showcases a table where each row contains two KolButtons, each with its own shortcut key. To trigger an action, move the focus to
109
+ any of the &quot;Actions&quot; cells and press &quot;e&quot; or &quot;d.&quot; Doing so will activate the corresponding action and display a Toast
110
+ notification for demonstration purposes.
19
111
  </p>
20
112
  </SampleDescription>
21
113
 
@@ -34,6 +126,15 @@ export const ButtonShortKey: FC = () => {
34
126
  _on={dummyEventHandler}
35
127
  />
36
128
  </div>
129
+
130
+ <KolHeading _level={2} _label="Interactive sample" className="mt" />
131
+
132
+ <KolTableStateful
133
+ _label={`Move focus within one of the "Actions" cells and press "e" or "d" to trigger an action.`}
134
+ _data={DATA}
135
+ _headers={HEADERS}
136
+ _minWidth="400px"
137
+ />
37
138
  </>
38
139
  );
39
140
  };
@@ -2,10 +2,11 @@ import React from 'react';
2
2
  import type { Components } from '@public-ui/components';
3
3
 
4
4
  import { ComboboxCases } from './cases';
5
+ import { SampleColumns } from '../../SampleColumns';
5
6
 
6
7
  export const ComboboxVariants = (props: Partial<Components.KolCombobox>) => {
7
8
  return (
8
- <div className="w-full grid md:grid-cols-2 gap-4">
9
+ <SampleColumns>
9
10
  <fieldset>
10
11
  <legend>Text</legend>
11
12
  <ComboboxCases {...props} />
@@ -14,6 +15,6 @@ export const ComboboxVariants = (props: Partial<Components.KolCombobox>) => {
14
15
  <legend>Text (hideLabel)</legend>
15
16
  <ComboboxCases {...props} _hideLabel />
16
17
  </fieldset>
17
- </div>
18
+ </SampleColumns>
18
19
  );
19
20
  };
@@ -14,47 +14,31 @@ export const DrawerBasic: FC = () => {
14
14
  const defaultAlign = searchParams.get('align') as AlignPropType;
15
15
  const hideMenus = useContext(HideMenusContext);
16
16
  const drawerElement = useRef<HTMLKolDrawerElement>(null);
17
- const drawerModalElement = useRef<HTMLKolDrawerElement>(null);
18
17
  const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
19
18
  useEffect(() => {
20
19
  if (defaultAlign) {
21
- drawerModalElement.current?.open();
20
+ drawerElement.current?.open();
22
21
  }
23
22
  }, [defaultAlign]);
24
23
  return (
25
24
  <>
26
25
  {!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
27
26
  <SampleDescription>
28
- <p>
29
- KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments and the modal- and
30
- non-modal modes.
31
- </p>
27
+ <p>KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments.</p>
32
28
  </SampleDescription>
33
29
 
34
30
  <DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
35
31
  <div className="flex flex-wrap gap-4">
36
32
  <KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
37
- <p>
38
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
39
- voluptua.
40
- </p>
41
- <KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
33
+ <div className={align === 'left' || align == 'right' ? 'drawer-content-vertical' : ''}>
34
+ <p>
35
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
36
+ voluptua.
37
+ </p>
38
+ <KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
39
+ </div>
42
40
  </KolDrawer>
43
41
  <KolButton _label="Open drawer" _on={{ onClick: () => drawerElement.current?.open() }} />
44
- <KolDrawer
45
- ref={drawerModalElement}
46
- _modal
47
- _align={align}
48
- _label="I am a Drawer Modal"
49
- _on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
50
- >
51
- <p>
52
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
53
- voluptua.
54
- </p>
55
- <KolButton _label="Close drawer modal" _on={{ onClick: () => drawerModalElement.current?.close() }} />
56
- </KolDrawer>
57
- <KolButton _label="Open drawer as modal" _on={{ onClick: () => drawerModalElement.current?.open() }} />
58
42
  </div>
59
43
  </>
60
44
  );
@@ -14,7 +14,6 @@ export const DrawerControlled: FC = () => {
14
14
  const defaultAlign = searchParams.get('align') as AlignPropType;
15
15
  const hideMenus = useContext(HideMenusContext);
16
16
  const [open, setOpen] = useState(false);
17
- const [modalOpen, setModalOpen] = useState(false);
18
17
  const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
19
18
  return (
20
19
  <div>
@@ -34,13 +33,6 @@ export const DrawerControlled: FC = () => {
34
33
  </div>
35
34
  </KolDrawer>
36
35
  <KolButton _label="Open drawer" _on={{ onClick: () => setOpen(true) }} />
37
- <KolDrawer _open={modalOpen} _modal _align={align} _label="I'm a controlled modal drawer" _on={{ onClose: () => setModalOpen(false) }}>
38
- <div>
39
- <p>Lorem ipsum dolor sit amet,</p>
40
- <KolButton _label="Close drawer" _on={{ onClick: () => setModalOpen(false) }} />
41
- </div>
42
- </KolDrawer>
43
- <KolButton _label="Open drawer as modal" _on={{ onClick: () => setModalOpen(true) }} />
44
36
  </div>
45
37
  </div>
46
38
  );
@@ -1,28 +1,70 @@
1
+ import { KolButton, KolForm, KolInputText } from '@public-ui/react';
1
2
  import type { FC } from 'react';
2
- import React from 'react';
3
+ import React, { useEffect, useRef } from 'react';
3
4
  import { SampleDescription } from '../SampleDescription';
4
- import { KolForm, KolInputText } from '@public-ui/react';
5
5
 
6
- export const FormErrorList: FC = () => (
7
- <>
8
- <SampleDescription>
9
- <p>This sample shows a form with error messages.</p>
10
- </SampleDescription>
6
+ export const FormErrorList: FC = () => {
7
+ const formRef = useRef<HTMLKolFormElement | null>(null);
11
8
 
12
- <KolForm
13
- className="w-full"
14
- _errorList={[
15
- {
16
- message: 'Error in Input 2',
17
- selector: '#input2',
18
- },
19
- ]}
20
- >
21
- <div className="grid gap-2">
22
- <KolInputText id="input1" _label="Input 1" />
23
- <KolInputText id="input2" _label="Input 2" _touched _msg={{ _description: 'Input error', _type: 'error' }} />
24
- <KolInputText id="input3" _label="Input 3" />
25
- </div>
26
- </KolForm>
27
- </>
28
- );
9
+ const scrollTo = () => {
10
+ formRef.current?.focusErrorList();
11
+ };
12
+
13
+ /**
14
+ * Simulate the form submission
15
+ */
16
+ useEffect(() => {
17
+ formRef.current?.focusErrorList();
18
+ }, []);
19
+
20
+ return (
21
+ <>
22
+ <SampleDescription>
23
+ <p>This sample shows a form with error messages.</p>
24
+ </SampleDescription>
25
+
26
+ <KolForm
27
+ className="w-full"
28
+ ref={formRef}
29
+ _on={{
30
+ onSubmit: scrollTo,
31
+ }}
32
+ _errorList={[
33
+ {
34
+ message: 'Error in Input 2',
35
+ selector: '#input2',
36
+ },
37
+ {
38
+ message: 'Error in Input 3',
39
+ selector: () => alert('Error in Input 3'),
40
+ },
41
+ ]}
42
+ >
43
+ <div className="grid gap-2">
44
+ <KolInputText id="input1" _label="Input 1" />
45
+ <KolInputText
46
+ id="input2"
47
+ _label="Input 2"
48
+ _touched
49
+ _msg={{
50
+ _description: 'Input error',
51
+ _type: 'error',
52
+ }}
53
+ />
54
+ <KolInputText
55
+ id="input3"
56
+ _label="Input 3"
57
+ _touched
58
+ _msg={{
59
+ _description: 'Input error',
60
+ _type: 'error',
61
+ }}
62
+ />
63
+ <div>
64
+ <KolButton _label="ScrollTo" _type="submit" />
65
+ </div>
66
+ </div>
67
+ </KolForm>
68
+ </>
69
+ );
70
+ };
@@ -29,7 +29,7 @@ import {
29
29
  KolNav,
30
30
  KolProgress,
31
31
  KolSelect,
32
- KolTable,
32
+ KolTableStateful,
33
33
  KolTabs,
34
34
  KolTextarea,
35
35
  KolVersion,
@@ -73,16 +73,14 @@ const TABLE_HEADERS: KoliBriTableHeaders = {
73
73
  el.appendChild(renderElement);
74
74
  getRoot(renderElement).render(<KolButtonWrapper _label={cell.label} style={{ fontSize: '75%' }} />);
75
75
  },
76
- sort: (data) => {
77
- return data.sort((first, second) => {
78
- if ((first as TableDataType).monday < (second as TableDataType).monday) {
79
- return -1;
80
- }
81
- if ((first as TableDataType).monday > (second as TableDataType).monday) {
82
- return 1;
83
- }
84
- return 0;
85
- });
76
+ compareFn: (first, second) => {
77
+ if ((first as TableDataType).monday < (second as TableDataType).monday) {
78
+ return -1;
79
+ }
80
+ if ((first as TableDataType).monday > (second as TableDataType).monday) {
81
+ return 1;
82
+ }
83
+ return 0;
86
84
  },
87
85
  sortDirection: 'ASC',
88
86
  textAlign: 'right',
@@ -97,16 +95,14 @@ const TABLE_HEADERS: KoliBriTableHeaders = {
97
95
  el.appendChild(renderElement);
98
96
  getRoot(renderElement).render(<KolBadge _color="#060" _label={cell.label}></KolBadge>);
99
97
  },
100
- sort: (data) => {
101
- return data.sort((first, second) => {
102
- if ((first as TableDataType).tuesday < (second as TableDataType).tuesday) {
103
- return -1;
104
- }
105
- if ((first as TableDataType).tuesday > (second as TableDataType).tuesday) {
106
- return 1;
107
- }
108
- return 0;
109
- });
98
+ compareFn: (first, second) => {
99
+ if ((first as TableDataType).tuesday < (second as TableDataType).tuesday) {
100
+ return -1;
101
+ }
102
+ if ((first as TableDataType).tuesday > (second as TableDataType).tuesday) {
103
+ return 1;
104
+ }
105
+ return 0;
110
106
  },
111
107
  sortDirection: 'DESC',
112
108
  },
@@ -194,7 +190,7 @@ export const HandoutBasic: FC = () => {
194
190
 
195
191
  return (
196
192
  <div className="grid gap-4">
197
- <div className="grid gap-4 grid-cols-[auto_1fr_1fr] items-center">
193
+ <div className="grid gap-4 md:grid-cols-[auto_1fr_1fr] items-center">
198
194
  <KolKolibri className="block w-75px" _labeled={false}></KolKolibri>
199
195
  <KolHeading _label="" _level={1}>
200
196
  <span slot="expert">
@@ -252,10 +248,8 @@ export const HandoutBasic: FC = () => {
252
248
  <p>
253
249
  I am <KolAbbr>e.g.</KolAbbr> an abbreviation without label.
254
250
  </p>
255
- <div className="grid grid-cols-2 items-center">
256
- <KolProgress _variant="bar" _max={100} _value={33} _label="Progress" />
257
- <KolProgress _variant="cycle" _max={100} _value={66} _label="Progress" />
258
- </div>
251
+ <KolProgress _variant="bar" _max={100} _value={33} _label="Progress" />
252
+ <KolProgress _variant="cycle" _max={100} _value={66} _label="Progress" />
259
253
  </div>
260
254
  </KolCard>
261
255
  <KolCard className="col-span-6 sm:col-span-6 md:col-span-6 xl:col-span-3" _label="Button, LinkButton and Tab" _level={2}>
@@ -430,7 +424,6 @@ export const HandoutBasic: FC = () => {
430
424
  />
431
425
  </div>
432
426
  {/* <KolSkipNav></KolSkipNav> */}
433
- {/* <KolLinkGroup _label=""></KolLinkGroup> */}
434
427
  <div>
435
428
  <KolBreadcrumb
436
429
  _label="Breadcrumb aus Text-Links"
@@ -448,7 +441,7 @@ export const HandoutBasic: FC = () => {
448
441
  </KolCard>
449
442
  <KolCard className="col-span-6 sm:col-span-6 md:col-span-4 xl:col-span-5" _label="Input" _level={2}>
450
443
  <KolForm slot="">
451
- <div className="grid gap-4 grid-cols-3 p-2">
444
+ <div className="grid gap-4 sm:grid-cols-2 md:grid-cols-3 p-2">
452
445
  <KolInputColor _label={`Color`} />
453
446
  <KolInputFile _label={`Upload file`} />
454
447
  <KolInputNumber _label={`Number input`} />
@@ -467,7 +460,9 @@ export const HandoutBasic: FC = () => {
467
460
  <div className="grid gap-4">
468
461
  <KolInputRadio _orientation="horizontal" _options="[{'label':'Mr.','value':0},{'label':'Mrs.','value':1}]" _value="0" _label={`Salutation`} />
469
462
  <KolInputCheckbox _label="">
470
- I accept the <KolAbbr _label="General Terms and Conditions">AGB</KolAbbr>.
463
+ <span slot="expert">
464
+ I accept the <KolAbbr _label="General Terms and Conditions">AGB</KolAbbr>.
465
+ </span>
471
466
  </KolInputCheckbox>
472
467
  </div>
473
468
  <KolTextarea _rows={4} _label={`Textarea`} />
@@ -476,7 +471,7 @@ export const HandoutBasic: FC = () => {
476
471
  </KolCard>
477
472
  <KolCard className="col-span-6 sm:col-span-6 md:col-span-4 xl:col-span-5" _label="Table with Pagination" _level={2}>
478
473
  <div slot="" className="grid gap-2 p-2">
479
- <KolTable _label="Table" _headers={TABLE_HEADERS} _data={TABLE_DATA} _pagination></KolTable>
474
+ <KolTableStateful _label="Table" _minWidth="auto" _headers={TABLE_HEADERS} _data={TABLE_DATA} _pagination></KolTableStateful>
480
475
  </div>
481
476
  </KolCard>
482
477
  </div>
@@ -12,8 +12,9 @@ export const IconBasic: FC = () => (
12
12
  </SampleDescription>
13
13
 
14
14
  <div className="grid gap-4">
15
- <KolIcon _label="" _icons="codicon codicon-home" />
15
+ <KolIcon className="block w-[1em] h-[1em]" _label="" _icons="codicon codicon-home" />
16
16
  <KolIcon
17
+ className="block w-[1em] h-[1em]"
17
18
  style={{
18
19
  color: 'red',
19
20
  }}
@@ -3,10 +3,11 @@ import React, { forwardRef } from 'react';
3
3
  import { InputCheckboxCases } from './cases';
4
4
 
5
5
  import type { Components } from '@public-ui/components';
6
+ import { SampleColumns } from '../../SampleColumns';
6
7
  export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Components.KolInputCheckbox>(function InputCheckboxVariant(props, ref) {
7
8
  return (
8
9
  <>
9
- <div className="grid md:grid-cols-2 gap-4">
10
+ <SampleColumns>
10
11
  <fieldset>
11
12
  <legend>Label align &quot;left&quot; with label</legend>
12
13
  <InputCheckboxCases {...props} _labelAlign="left" />
@@ -15,8 +16,8 @@ export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Com
15
16
  <legend>Label align &quot;left&quot; without Label (hideLabel)</legend>
16
17
  <InputCheckboxCases ref={ref} {...props} _hideLabel _labelAlign="left" />
17
18
  </fieldset>
18
- </div>
19
- <div className="grid md:grid-cols-2 gap-4">
19
+ </SampleColumns>
20
+ <SampleColumns>
20
21
  <fieldset>
21
22
  <legend>Label align &quot;right&quot; with label</legend>
22
23
  <InputCheckboxCases {...props} />
@@ -25,7 +26,7 @@ export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Com
25
26
  <legend>Label align &quot;right&quot; without Label (hideLabel)</legend>
26
27
  <InputCheckboxCases ref={ref} {...props} _hideLabel />
27
28
  </fieldset>
28
- </div>
29
+ </SampleColumns>
29
30
  </>
30
31
  );
31
32
  });