@public-ui/sample-react 2.1.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/1487.js +2 -0
  2. package/dist/1636.js +2 -0
  3. package/dist/1792.js +2 -0
  4. package/dist/1795.js +2 -0
  5. package/dist/2017.js +2 -0
  6. package/dist/2207.js +2 -0
  7. package/dist/2322.js +2 -0
  8. package/dist/2538.js +2 -0
  9. package/dist/2567.js +2 -0
  10. package/dist/263.js +2 -0
  11. package/dist/2657.js +2 -0
  12. package/dist/2719.js +2 -0
  13. package/dist/3064.js +2 -0
  14. package/dist/3077.js +2 -0
  15. package/dist/3101.js +2 -0
  16. package/dist/3238.js +2 -0
  17. package/dist/3395.js +2 -0
  18. package/dist/35.js +2 -0
  19. package/dist/{4294.js → 3521.js} +2 -2
  20. package/dist/356.js +2 -0
  21. package/dist/3714.js +2 -0
  22. package/dist/3735.js +2 -0
  23. package/dist/3766.js +2 -0
  24. package/dist/3994.js +2 -0
  25. package/dist/4025.js +2 -0
  26. package/dist/4118.js +2 -0
  27. package/dist/4182.js +2 -0
  28. package/dist/4188.js +2 -0
  29. package/dist/4332.js +2 -0
  30. package/dist/4402.js +2 -0
  31. package/dist/4818.js +2 -0
  32. package/dist/4892.js +2 -0
  33. package/dist/4933.js +2 -0
  34. package/dist/4943.js +2 -0
  35. package/dist/495.js +2 -0
  36. package/dist/5034.js +2 -0
  37. package/dist/5056.js +2 -0
  38. package/dist/5138.js +2 -0
  39. package/dist/5296.js +2 -0
  40. package/dist/5356.js +2 -0
  41. package/dist/5551.js +2 -0
  42. package/dist/5835.js +2 -0
  43. package/dist/5840.js +2 -0
  44. package/dist/5889.js +2 -0
  45. package/dist/5912.js +2 -0
  46. package/dist/6082.js +2 -0
  47. package/dist/6099.js +2 -0
  48. package/dist/6181.js +2 -0
  49. package/dist/619.js +2 -0
  50. package/dist/6671.js +2 -0
  51. package/dist/6775.js +2 -0
  52. package/dist/6969.js +2 -0
  53. package/dist/{5431.js → 7274.js} +2 -2
  54. package/dist/7795.js +2 -0
  55. package/dist/7802.js +2 -0
  56. package/dist/7860.js +2 -0
  57. package/dist/8092.js +2 -0
  58. package/dist/8111.js +2 -0
  59. package/dist/8146.js +1 -1
  60. package/dist/{2875.js → 8162.js} +2 -2
  61. package/dist/8427.js +2 -0
  62. package/dist/8495.js +2 -0
  63. package/dist/8672.js +2 -0
  64. package/dist/8737.js +2 -0
  65. package/dist/8786.js +2 -0
  66. package/dist/8796.js +2 -0
  67. package/dist/8977.js +2 -0
  68. package/dist/9333.js +2 -0
  69. package/dist/9389.js +2 -0
  70. package/dist/9561.js +2 -0
  71. package/dist/9599.js +2 -0
  72. package/dist/9612.js +2 -0
  73. package/dist/9890.js +2 -0
  74. package/dist/abgrenzung.jpg +0 -0
  75. package/dist/main.js +1 -1
  76. package/dist/main.js.LICENSE.txt +2 -2
  77. package/package.json +16 -15
  78. package/public/abgrenzung.jpg +0 -0
  79. package/src/components/button/expert-slot.tsx +16 -0
  80. package/src/components/button/partials/cases.tsx +22 -9
  81. package/src/components/button/partials/type.ts +4 -0
  82. package/src/components/button/partials/variants.tsx +9 -8
  83. package/src/components/button/routes.ts +4 -0
  84. package/src/components/button/short-key.tsx +38 -0
  85. package/src/components/button-link/basic.tsx +43 -29
  86. package/src/components/combobox/partials/cases.tsx +2 -0
  87. package/src/components/input-checkbox/partials/cases.tsx +2 -0
  88. package/src/components/input-color/partials/cases.tsx +2 -0
  89. package/src/components/input-date/partials/cases.tsx +2 -0
  90. package/src/components/input-email/partials/cases.tsx +2 -0
  91. package/src/components/input-file/partials/cases.tsx +2 -0
  92. package/src/components/input-number/partials/cases.tsx +2 -0
  93. package/src/components/input-password/partials/cases.tsx +2 -0
  94. package/src/components/input-radio/partials/cases.tsx +12 -0
  95. package/src/components/input-range/partials/cases.tsx +2 -0
  96. package/src/components/input-text/expert-slot.tsx +17 -0
  97. package/src/components/input-text/partials/cases.tsx +3 -0
  98. package/src/components/input-text/routes.ts +2 -0
  99. package/src/components/link/access-key.tsx +22 -0
  100. package/src/components/link/icons.tsx +37 -0
  101. package/src/components/link/routes.ts +4 -0
  102. package/src/components/link/short-key.tsx +22 -0
  103. package/src/components/link-button/basic.tsx +2 -0
  104. package/src/components/select/partials/cases.tsx +2 -0
  105. package/src/components/single-select/partials/cases.tsx +2 -0
  106. package/src/components/textarea/partials/cases.tsx +2 -0
  107. package/dist/1266.js +0 -2
  108. package/dist/1601.js +0 -2
  109. package/dist/1786.js +0 -2
  110. package/dist/1797.js +0 -2
  111. package/dist/1832.js +0 -2
  112. package/dist/1908.js +0 -2
  113. package/dist/2441.js +0 -2
  114. package/dist/2462.js +0 -2
  115. package/dist/2605.js +0 -2
  116. package/dist/2728.js +0 -2
  117. package/dist/2960.js +0 -2
  118. package/dist/3254.js +0 -2
  119. package/dist/3440.js +0 -2
  120. package/dist/3460.js +0 -2
  121. package/dist/3492.js +0 -2
  122. package/dist/3503.js +0 -2
  123. package/dist/3845.js +0 -2
  124. package/dist/3882.js +0 -2
  125. package/dist/3965.js +0 -2
  126. package/dist/4181.js +0 -2
  127. package/dist/4604.js +0 -2
  128. package/dist/4737.js +0 -2
  129. package/dist/4804.js +0 -2
  130. package/dist/4972.js +0 -2
  131. package/dist/5076.js +0 -2
  132. package/dist/5204.js +0 -2
  133. package/dist/5399.js +0 -2
  134. package/dist/5514.js +0 -2
  135. package/dist/5522.js +0 -2
  136. package/dist/5677.js +0 -2
  137. package/dist/5781.js +0 -2
  138. package/dist/5813.js +0 -2
  139. package/dist/5829.js +0 -2
  140. package/dist/6199.js +0 -2
  141. package/dist/6320.js +0 -2
  142. package/dist/6473.js +0 -2
  143. package/dist/6567.js +0 -2
  144. package/dist/6649.js +0 -2
  145. package/dist/6705.js +0 -2
  146. package/dist/6717.js +0 -2
  147. package/dist/6731.js +0 -2
  148. package/dist/6974.js +0 -2
  149. package/dist/7157.js +0 -2
  150. package/dist/7162.js +0 -2
  151. package/dist/7163.js +0 -2
  152. package/dist/7183.js +0 -2
  153. package/dist/7310.js +0 -2
  154. package/dist/7391.js +0 -2
  155. package/dist/7461.js +0 -2
  156. package/dist/7560.js +0 -2
  157. package/dist/7582.js +0 -2
  158. package/dist/7609.js +0 -2
  159. package/dist/8100.js +0 -2
  160. package/dist/8116.js +0 -2
  161. package/dist/8126.js +0 -2
  162. package/dist/8191.js +0 -2
  163. package/dist/8210.js +0 -2
  164. package/dist/8286.js +0 -2
  165. package/dist/8471.js +0 -2
  166. package/dist/85.js +0 -2
  167. package/dist/8799.js +0 -2
  168. package/dist/8902.js +0 -2
  169. package/dist/8956.js +0 -2
  170. package/dist/92.js +0 -2
  171. package/dist/9558.js +0 -2
  172. package/dist/9768.js +0 -2
  173. package/dist/9818.js +0 -2
  174. package/dist/989.js +0 -2
  175. package/dist/9980.js +0 -2
  176. /package/dist/{1266.js.LICENSE.txt → 1487.js.LICENSE.txt} +0 -0
  177. /package/dist/{1601.js.LICENSE.txt → 1636.js.LICENSE.txt} +0 -0
  178. /package/dist/{1786.js.LICENSE.txt → 1792.js.LICENSE.txt} +0 -0
  179. /package/dist/{1797.js.LICENSE.txt → 1795.js.LICENSE.txt} +0 -0
  180. /package/dist/{1832.js.LICENSE.txt → 2017.js.LICENSE.txt} +0 -0
  181. /package/dist/{1908.js.LICENSE.txt → 2207.js.LICENSE.txt} +0 -0
  182. /package/dist/{2441.js.LICENSE.txt → 2322.js.LICENSE.txt} +0 -0
  183. /package/dist/{2462.js.LICENSE.txt → 2538.js.LICENSE.txt} +0 -0
  184. /package/dist/{2605.js.LICENSE.txt → 2567.js.LICENSE.txt} +0 -0
  185. /package/dist/{2728.js.LICENSE.txt → 263.js.LICENSE.txt} +0 -0
  186. /package/dist/{2875.js.LICENSE.txt → 2657.js.LICENSE.txt} +0 -0
  187. /package/dist/{2960.js.LICENSE.txt → 2719.js.LICENSE.txt} +0 -0
  188. /package/dist/{3254.js.LICENSE.txt → 3064.js.LICENSE.txt} +0 -0
  189. /package/dist/{3440.js.LICENSE.txt → 3077.js.LICENSE.txt} +0 -0
  190. /package/dist/{3460.js.LICENSE.txt → 3101.js.LICENSE.txt} +0 -0
  191. /package/dist/{3492.js.LICENSE.txt → 3238.js.LICENSE.txt} +0 -0
  192. /package/dist/{3503.js.LICENSE.txt → 3395.js.LICENSE.txt} +0 -0
  193. /package/dist/{3845.js.LICENSE.txt → 35.js.LICENSE.txt} +0 -0
  194. /package/dist/{3882.js.LICENSE.txt → 3521.js.LICENSE.txt} +0 -0
  195. /package/dist/{3965.js.LICENSE.txt → 356.js.LICENSE.txt} +0 -0
  196. /package/dist/{4181.js.LICENSE.txt → 3714.js.LICENSE.txt} +0 -0
  197. /package/dist/{4294.js.LICENSE.txt → 3735.js.LICENSE.txt} +0 -0
  198. /package/dist/{4604.js.LICENSE.txt → 3766.js.LICENSE.txt} +0 -0
  199. /package/dist/{4737.js.LICENSE.txt → 3994.js.LICENSE.txt} +0 -0
  200. /package/dist/{4804.js.LICENSE.txt → 4025.js.LICENSE.txt} +0 -0
  201. /package/dist/{4972.js.LICENSE.txt → 4118.js.LICENSE.txt} +0 -0
  202. /package/dist/{5076.js.LICENSE.txt → 4182.js.LICENSE.txt} +0 -0
  203. /package/dist/{5204.js.LICENSE.txt → 4188.js.LICENSE.txt} +0 -0
  204. /package/dist/{5399.js.LICENSE.txt → 4332.js.LICENSE.txt} +0 -0
  205. /package/dist/{5431.js.LICENSE.txt → 4402.js.LICENSE.txt} +0 -0
  206. /package/dist/{5514.js.LICENSE.txt → 4818.js.LICENSE.txt} +0 -0
  207. /package/dist/{5522.js.LICENSE.txt → 4892.js.LICENSE.txt} +0 -0
  208. /package/dist/{5677.js.LICENSE.txt → 4933.js.LICENSE.txt} +0 -0
  209. /package/dist/{5781.js.LICENSE.txt → 4943.js.LICENSE.txt} +0 -0
  210. /package/dist/{5813.js.LICENSE.txt → 495.js.LICENSE.txt} +0 -0
  211. /package/dist/{5829.js.LICENSE.txt → 5034.js.LICENSE.txt} +0 -0
  212. /package/dist/{6199.js.LICENSE.txt → 5056.js.LICENSE.txt} +0 -0
  213. /package/dist/{6320.js.LICENSE.txt → 5138.js.LICENSE.txt} +0 -0
  214. /package/dist/{6473.js.LICENSE.txt → 5296.js.LICENSE.txt} +0 -0
  215. /package/dist/{6567.js.LICENSE.txt → 5356.js.LICENSE.txt} +0 -0
  216. /package/dist/{6649.js.LICENSE.txt → 5551.js.LICENSE.txt} +0 -0
  217. /package/dist/{6705.js.LICENSE.txt → 5835.js.LICENSE.txt} +0 -0
  218. /package/dist/{6717.js.LICENSE.txt → 5840.js.LICENSE.txt} +0 -0
  219. /package/dist/{6731.js.LICENSE.txt → 5889.js.LICENSE.txt} +0 -0
  220. /package/dist/{6974.js.LICENSE.txt → 5912.js.LICENSE.txt} +0 -0
  221. /package/dist/{7157.js.LICENSE.txt → 6082.js.LICENSE.txt} +0 -0
  222. /package/dist/{7162.js.LICENSE.txt → 6099.js.LICENSE.txt} +0 -0
  223. /package/dist/{7163.js.LICENSE.txt → 6181.js.LICENSE.txt} +0 -0
  224. /package/dist/{7183.js.LICENSE.txt → 619.js.LICENSE.txt} +0 -0
  225. /package/dist/{7310.js.LICENSE.txt → 6671.js.LICENSE.txt} +0 -0
  226. /package/dist/{7391.js.LICENSE.txt → 6775.js.LICENSE.txt} +0 -0
  227. /package/dist/{7461.js.LICENSE.txt → 6969.js.LICENSE.txt} +0 -0
  228. /package/dist/{7560.js.LICENSE.txt → 7274.js.LICENSE.txt} +0 -0
  229. /package/dist/{7582.js.LICENSE.txt → 7795.js.LICENSE.txt} +0 -0
  230. /package/dist/{7609.js.LICENSE.txt → 7802.js.LICENSE.txt} +0 -0
  231. /package/dist/{8100.js.LICENSE.txt → 7860.js.LICENSE.txt} +0 -0
  232. /package/dist/{8116.js.LICENSE.txt → 8092.js.LICENSE.txt} +0 -0
  233. /package/dist/{8126.js.LICENSE.txt → 8111.js.LICENSE.txt} +0 -0
  234. /package/dist/{8191.js.LICENSE.txt → 8162.js.LICENSE.txt} +0 -0
  235. /package/dist/{8210.js.LICENSE.txt → 8427.js.LICENSE.txt} +0 -0
  236. /package/dist/{8286.js.LICENSE.txt → 8495.js.LICENSE.txt} +0 -0
  237. /package/dist/{8471.js.LICENSE.txt → 8672.js.LICENSE.txt} +0 -0
  238. /package/dist/{85.js.LICENSE.txt → 8737.js.LICENSE.txt} +0 -0
  239. /package/dist/{8799.js.LICENSE.txt → 8786.js.LICENSE.txt} +0 -0
  240. /package/dist/{8902.js.LICENSE.txt → 8796.js.LICENSE.txt} +0 -0
  241. /package/dist/{8956.js.LICENSE.txt → 8977.js.LICENSE.txt} +0 -0
  242. /package/dist/{92.js.LICENSE.txt → 9333.js.LICENSE.txt} +0 -0
  243. /package/dist/{9558.js.LICENSE.txt → 9389.js.LICENSE.txt} +0 -0
  244. /package/dist/{9768.js.LICENSE.txt → 9561.js.LICENSE.txt} +0 -0
  245. /package/dist/{9818.js.LICENSE.txt → 9599.js.LICENSE.txt} +0 -0
  246. /package/dist/{989.js.LICENSE.txt → 9612.js.LICENSE.txt} +0 -0
  247. /package/dist/{9980.js.LICENSE.txt → 9890.js.LICENSE.txt} +0 -0
@@ -33,7 +33,7 @@
33
33
  */
34
34
 
35
35
  /**
36
- * @remix-run/router v1.19.2
36
+ * @remix-run/router v1.20.0
37
37
  *
38
38
  * Copyright (c) Remix Software Inc.
39
39
  *
@@ -44,7 +44,7 @@
44
44
  */
45
45
 
46
46
  /**
47
- * React Router v6.26.2
47
+ * React Router v6.27.0
48
48
  *
49
49
  * Copyright (c) Remix Software Inc.
50
50
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.1.9",
3
+ "version": "2.2.0",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "repository": {
@@ -11,34 +11,34 @@
11
11
  "@leanup/stack": "1.3.54",
12
12
  "@leanup/stack-react": "1.3.54",
13
13
  "@leanup/stack-webpack": "1.3.54",
14
- "@playwright/test": "1.47.2",
14
+ "@playwright/test": "1.48.2",
15
15
  "@types/node": "ts5.6",
16
- "@types/react": "18.3.4",
17
- "@types/react-dom": "18.3.0",
16
+ "@types/react": "18.3.12",
17
+ "@types/react-dom": "18.3.1",
18
18
  "@unocss/preset-uno": "0.58.9",
19
19
  "@unocss/webpack": "0.58.9",
20
- "adopted-style-sheets": "1.1.5-rc.4",
20
+ "adopted-style-sheets": "1.1.6-rc.6",
21
21
  "ajv": "8.17.1",
22
- "chromedriver": "129.0.0",
22
+ "chromedriver": "130.0.1",
23
23
  "cpy-cli": "5.0.0",
24
- "eslint-plugin-jsx-a11y": "6.10.0",
25
- "eslint-plugin-react": "7.36.1",
24
+ "eslint-plugin-jsx-a11y": "6.10.2",
25
+ "eslint-plugin-react": "7.37.2",
26
26
  "formik": "2.4.6",
27
27
  "nightwatch-axe-verbose": "2.3.1",
28
28
  "npm-run-all": "4.1.5",
29
29
  "react": "18.3.1",
30
30
  "react-dom": "18.3.1",
31
31
  "react-number-format": "5.4.2",
32
- "react-router": "6.26.2",
33
- "react-router-dom": "6.26.2",
32
+ "react-router": "6.27.0",
33
+ "react-router-dom": "6.27.0",
34
34
  "rimraf": "6.0.1",
35
35
  "ts-prune": "0.10.3",
36
- "typescript": "5.6.2",
36
+ "typescript": "5.6.3",
37
37
  "world_countries_lists": "2.9.0",
38
38
  "yup": "1.4.0",
39
- "@public-ui/components": "2.1.9",
40
- "@public-ui/themes": "2.1.9",
41
- "@public-ui/react": "2.1.9"
39
+ "@public-ui/components": "2.2.0",
40
+ "@public-ui/themes": "2.2.0",
41
+ "@public-ui/react": "2.2.0"
42
42
  },
43
43
  "files": [
44
44
  ".eslintignore",
@@ -64,7 +64,8 @@
64
64
  "serve": "cross-env NODE_ENV=development webpack serve --devtool=source-map",
65
65
  "start": "npm run serve -- --open",
66
66
  "unused": "ts-prune -e src",
67
- "e2e": "playwright test",
67
+ "test:e2e": "playwright test",
68
+ "test": "pnpm test:e2e",
68
69
  "postinstall": "pnpm exec playwright install"
69
70
  }
70
71
  }
Binary file
@@ -0,0 +1,16 @@
1
+ import type { FC } from 'react';
2
+ import React from 'react';
3
+ import { ButtonVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ export const ButtonExpertSlot: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolButton show a button-element with expert slot.</p>
10
+ </SampleDescription>
11
+
12
+ <ButtonVariants _label="">
13
+ <span slot="expert">I am more than just a button</span>
14
+ </ButtonVariants>
15
+ </>
16
+ );
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
 
3
3
  import { KolButton } from '@public-ui/react';
4
- import type { Components } from '@public-ui/components';
5
4
  import { useToasterService } from '../../../hooks/useToasterService';
5
+ import type { ButtonSampleProps } from './type';
6
6
 
7
- export const ButtonCases = function ButtonCases(props: Partial<Components.KolButton>) {
7
+ export const ButtonCases: React.FC<ButtonSampleProps> = (props) => {
8
+ const { children, ...other } = props;
8
9
  const { dummyClickEventHandler } = useToasterService();
9
10
 
10
11
  const dummyEventHandler = {
@@ -13,12 +14,24 @@ export const ButtonCases = function ButtonCases(props: Partial<Components.KolBut
13
14
 
14
15
  return (
15
16
  <div className="flex flex-wrap gap-4">
16
- <KolButton {...props} _icons="codicon codicon-home" _label="Primary" _variant="primary" _on={dummyEventHandler}></KolButton>
17
- <KolButton {...props} _icons="codicon codicon-heart" _label="Secondary" _variant="secondary" _on={dummyEventHandler}></KolButton>
18
- <KolButton {...props} _icons="codicon codicon-hubot" _label="Normal" _variant="normal" _on={dummyEventHandler}></KolButton>
19
- <KolButton {...props} _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary" _on={dummyEventHandler}></KolButton>
20
- <KolButton {...props} _icons="codicon codicon-trash" _label="Danger" _variant="danger" _on={dummyEventHandler}></KolButton>
21
- <KolButton {...props} _icons="codicon codicon-reactions" _label="Ghost" _variant="ghost" _on={dummyEventHandler}></KolButton>
17
+ <KolButton _icons="codicon codicon-home" _label="Primary" _variant="primary" _on={dummyEventHandler} {...other}>
18
+ {children}
19
+ </KolButton>
20
+ <KolButton _icons="codicon codicon-heart" _label="Secondary" _variant="secondary" _on={dummyEventHandler} {...other}>
21
+ {children}
22
+ </KolButton>
23
+ <KolButton _icons="codicon codicon-hubot" _label="Normal" _variant="normal" _on={dummyEventHandler} {...other}>
24
+ {children}
25
+ </KolButton>
26
+ <KolButton _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary" _on={dummyEventHandler} {...other}>
27
+ {children}
28
+ </KolButton>
29
+ <KolButton _icons="codicon codicon-trash" _label="Danger" _variant="danger" _on={dummyEventHandler} {...other}>
30
+ {children}
31
+ </KolButton>
32
+ <KolButton _icons="codicon codicon-reactions" _label="Ghost" _variant="ghost" _on={dummyEventHandler} {...other}>
33
+ {children}
34
+ </KolButton>
22
35
  </div>
23
36
  );
24
37
  };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import type { Components } from '@public-ui/components';
3
+
4
+ export type ButtonSampleProps = PropsWithChildren<Partial<Components.KolButton>>;
@@ -2,21 +2,22 @@ import React from 'react';
2
2
 
3
3
  import { ButtonCases } from './cases';
4
4
  import { KolHeading } from '@public-ui/react';
5
- import type { Components } from '@public-ui/components';
5
+ import type { ButtonSampleProps } from './type';
6
6
 
7
- export const ButtonVariants = function ButtonVariant() {
8
- const examples: { label: string; buttonProps: Partial<Components.KolButton> }[] = [
9
- { label: 'Button', buttonProps: {} },
10
- { label: 'Button (disabled)', buttonProps: { _disabled: true } },
11
- { label: 'Button (hideLabel)', buttonProps: { _hideLabel: true } },
12
- { label: 'Button (disabled, hideLabel)', buttonProps: { _disabled: true, _hideLabel: true } },
7
+ export const ButtonVariants: React.FC<ButtonSampleProps> = (props = {}) => {
8
+ const examples: { label: string; buttonProps: ButtonSampleProps }[] = [
9
+ { label: 'Button', buttonProps: props },
10
+ { label: 'Button (disabled)', buttonProps: { ...props, _disabled: true } },
11
+ { label: 'Button (hideLabel)', buttonProps: { ...props, _hideLabel: true } },
12
+ { label: 'Button (disabled, hideLabel)', buttonProps: { ...props, _disabled: true, _hideLabel: true } },
13
13
  ];
14
+
14
15
  return (
15
16
  <div className="grid gap-8">
16
17
  {examples.map(({ label, buttonProps }, index) => (
17
18
  <section key={index} className="grid gap-4">
18
19
  <KolHeading _level={2} _label={label} />
19
- <ButtonCases {...buttonProps} />
20
+ <ButtonCases {...buttonProps}></ButtonCases>
20
21
  </section>
21
22
  ))}
22
23
  </div>
@@ -5,6 +5,8 @@ import { ButtonBaselined } from './baselined';
5
5
  import { ButtonBasic } from './basic';
6
6
  import { ButtonIcons } from './icons';
7
7
  import { ButtonWidth } from './width';
8
+ import { ButtonShortKey } from './short-key';
9
+ import { ButtonExpertSlot } from './expert-slot';
8
10
 
9
11
  export const BUTTON_ROUTES: Routes = {
10
12
  button: {
@@ -14,5 +16,7 @@ export const BUTTON_ROUTES: Routes = {
14
16
  'access-key': ButtonAccessKey,
15
17
  'aria-description': ButtonAriaDescription,
16
18
  baselined: ButtonBaselined,
19
+ 'short-key': ButtonShortKey,
20
+ 'expert-slot': ButtonExpertSlot,
17
21
  },
18
22
  };
@@ -0,0 +1,38 @@
1
+ import { KolButton } from '@public-ui/react';
2
+ import React from 'react';
3
+ import type { FC } from 'react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+ import { useToasterService } from '../../hooks/useToasterService';
6
+
7
+ export const ButtonShortKey: FC = () => {
8
+ const { dummyClickEventHandler } = useToasterService();
9
+
10
+ const dummyEventHandler = {
11
+ onClick: dummyClickEventHandler,
12
+ };
13
+
14
+ return (
15
+ <>
16
+ <SampleDescription>
17
+ <p>
18
+ This sample shows KolButton with short key without functionality. The short key is purely visual. Its functionality needs to be developed separately.{' '}
19
+ </p>
20
+ </SampleDescription>
21
+
22
+ <div className="flex flex-wrap gap-4">
23
+ <KolButton _label="With S short key" _shortKey="S" _on={dummyEventHandler}></KolButton>
24
+ <KolButton _label="Very small s" _shortKey="s" _on={dummyEventHandler}></KolButton>
25
+ <KolButton _label="Short key does not appear in label" _shortKey="x" _on={dummyEventHandler}></KolButton>
26
+ <KolButton _label="short key without label" _hideLabel _shortKey="s" _icons="codicon codicon-dashboard" _on={dummyEventHandler}></KolButton>
27
+ <KolButton
28
+ _label="with inline icons"
29
+ _icons={{
30
+ left: 'codicon codicon-dashboard',
31
+ right: 'codicon codicon-dashboard',
32
+ }}
33
+ _shortKey="s"
34
+ />
35
+ </div>
36
+ </>
37
+ );
38
+ };
@@ -4,33 +4,47 @@ import { KolButtonLink } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
6
  import { SampleDescription } from '../SampleDescription';
7
+ import { useToasterService } from '../../hooks/useToasterService';
7
8
 
8
- export const ButtonLinkBasic: FC = () => (
9
- <>
10
- <SampleDescription>
11
- <p>
12
- KolButtonLink shows an element, that behaves like a button but looks like a link. The sample illustrates KolButtonLink with different display-properties
13
- such as <code>block</code>, <code>inline-block</code> and <code>inline</code>. It also demonstrates the disabled-state.
14
- </p>
15
- </SampleDescription>
16
- <section className="text-base">
17
- <p>
18
- In this paragraph, a link is inserted that contains no additional attributes. <KolButtonLink _label="Simple Link" /> It is rendered by default as an{' '}
19
- <strong>inline element</strong>.
20
- </p>
21
- <p>
22
- In this paragraph, a link is inserted that is rendered as an inline-block element.
23
- <KolButtonLink className="m-4" style={{ display: 'inline-block', border: '1px dotted' }} _label="Simple Link" />. This allows you to assign width,
24
- height, and other properties to it using CSS styles.
25
- <br />
26
- <br />
27
- After that, there is a link that is rendered as a block element.
28
- <KolButtonLink style={{ display: 'block' }} _label="Simple Link" />
29
- Therefore, I go over the entire width of the parent element to create a line break.
30
- </p>
31
- <p>
32
- <KolButtonLink _label="Disabled ButtonLink" _disabled />
33
- </p>
34
- </section>
35
- </>
36
- );
9
+ export const ButtonLinkBasic: FC = () => {
10
+ const { dummyClickEventHandler } = useToasterService();
11
+
12
+ const dummyEventHandler = {
13
+ onClick: dummyClickEventHandler,
14
+ };
15
+ return (
16
+ <>
17
+ <SampleDescription>
18
+ <p>
19
+ KolButtonLink shows an element, that behaves like a button but looks like a link. The sample illustrates KolButtonLink with different
20
+ display-properties such as <code>block</code>, <code>inline-block</code> and <code>inline</code>. It also demonstrates the disabled-state.
21
+ </p>
22
+ </SampleDescription>
23
+ <section className="text-base">
24
+ <p>
25
+ In this paragraph, a link is inserted that contains no additional attributes. <KolButtonLink _label="Simple Link" /> It is rendered by default as an{' '}
26
+ <strong>inline element</strong>.
27
+ </p>
28
+ <p>
29
+ In this paragraph, a link is inserted that is rendered as an inline-block element.
30
+ <KolButtonLink className="m-4" style={{ display: 'inline-block', border: '1px dotted' }} _label="Simple Link" />. This allows you to assign width,
31
+ height, and other properties to it using CSS styles.
32
+ <br />
33
+ <br />
34
+ After that, there is a link that is rendered as a block element.
35
+ <KolButtonLink style={{ display: 'block' }} _label="Simple Link" />
36
+ Therefore, I go over the entire width of the parent element to create a line break.
37
+ </p>
38
+ <p>
39
+ <KolButtonLink _label="Disabled ButtonLink" _disabled />
40
+ </p>
41
+ <p>
42
+ <KolButtonLink _label="With access key" _accessKey="c" _on={dummyEventHandler} />
43
+ </p>
44
+ <p>
45
+ <KolButtonLink _label="Disabled ButtonLink" _shortKey="s" />
46
+ </p>
47
+ </section>
48
+ </>
49
+ );
50
+ };
@@ -20,6 +20,8 @@ export const ComboboxCases = (props: Partial<Components.KolCombobox>) => {
20
20
  _placeholder="Placeholder"
21
21
  _required
22
22
  />
23
+ <KolCombobox {...props} _label="With access key" _suggestions={COUNTRY_SUGGESTIONS} _value={'Deutschland'} _accessKey="c" />
24
+ <KolCombobox {...props} _label="With short key" _suggestions={COUNTRY_SUGGESTIONS} _value={'Deutschland'} _shortKey="s" />
23
25
  </div>
24
26
  );
25
27
  };
@@ -22,6 +22,8 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
22
22
  <KolInputCheckbox {...props} _checked _disabled _label="Checked and disabled" />
23
23
  <KolInputCheckbox {...props} _indeterminate _disabled _label="Indeterminate and disabled" />
24
24
  <KolInputCheckbox {...props} _msg={{ _type: 'error', _description: ERROR_MSG }} _label="With error" _touched _value={true} _hint="Hint text" />
25
+ <KolInputCheckbox {...props} _label="With access key" _accessKey="c" _value={null}></KolInputCheckbox>
26
+ <KolInputCheckbox {...props} _label="With short key" _shortKey="s" _value={null}></KolInputCheckbox>
25
27
  </div>
26
28
  );
27
29
  });
@@ -28,6 +28,8 @@ export const InputColorCases = forwardRef<HTMLKolInputColorElement, Components.K
28
28
  />
29
29
  <KolInputColor {...props} ref={ref} _accessKey="C" _hint="Hint text" _label="Color with hint" _value="#f08080" />
30
30
  <KolInputColor {...props} _disabled _label="Color (Disabled)" _value="#f08080" />
31
+ <KolInputColor {...props} _label="With access key" _accessKey="c"></KolInputColor>
32
+ <KolInputColor {...props} _label="With short key" _shortKey="s"></KolInputColor>
31
33
  </div>
32
34
  );
33
35
  });
@@ -27,6 +27,8 @@ export const InputDateCases = forwardRef<HTMLKolInputDateElement, Components.Kol
27
27
  <KolInputDate {...props} _step={1} _type="time" _label="Time (with seconds)" _required />
28
28
  <KolInputDate {...props} _readOnly _label="Date input (read-only)" _required />
29
29
  <KolInputDate {...props} _disabled _label="Date input (Disabled)" _required />
30
+ <KolInputDate {...props} _label="With access key" _accessKey="s" />
31
+ <KolInputDate {...props} _label="With short key" _shortKey="s" />
30
32
  </div>
31
33
  );
32
34
  });
@@ -31,6 +31,8 @@ export const InputEmailCases = forwardRef<HTMLKolInputEmailElement, Components.K
31
31
  />
32
32
  <KolInputEmail {...props} _disabled _value="test@mail.de" _label="E-Mail (Disabled)" />
33
33
  <KolInputEmail {...props} _readOnly _value="test@mail.de" _label="E-Mail (Readonly)" />
34
+ <KolInputEmail {...props} _value="test@mail.de" _label="With access key" _accessKey="c" />
35
+ <KolInputEmail {...props} _value="test@mail.de" _label="With short key" _shortKey="s" />
34
36
  </div>
35
37
  );
36
38
  });
@@ -34,6 +34,8 @@ export const InputFileCases = forwardRef<HTMLKolInputFileElement, Components.Kol
34
34
  />
35
35
  <KolInputFile {...props} ref={ref} _accessKey="h" _multiple _msg={{ _type: 'error', _description: ERROR_MSG }} _label="Upload file (Multiple)" />
36
36
  <KolInputFile {...props} _disabled _label="Upload file (Disabled)" />
37
+ <KolInputFile {...props} _label="With access key" _accessKey="c" />
38
+ <KolInputFile {...props} _label="With short key" _shortKey="s" />
37
39
  </div>
38
40
  );
39
41
  });
@@ -34,6 +34,8 @@ export const InputNumberCases = forwardRef<HTMLKolInputNumberElement, Components
34
34
  <KolInputNumber {...props} ref={ref} _accessKey="Z" _max={10} _min={-10} _step={2} _label="Number input (-10 to 10 in steps of 2)" />
35
35
  <KolInputNumber {...props} _readOnly _label="Number input (Readonly)" />
36
36
  <KolInputNumber {...props} _disabled _label="Number input (Disabled)" />
37
+ <KolInputNumber {...props} _label="With access key" _accessKey="c" />
38
+ <KolInputNumber {...props} _label="With short key" _shortKey="s" />
37
39
  </div>
38
40
  );
39
41
  });
@@ -31,6 +31,8 @@ export const InputPasswordCases = forwardRef<HTMLKolInputPasswordElement, Compon
31
31
  }}
32
32
  _touched
33
33
  />
34
+ <KolInputPassword {...props} ref={ref} _shortKey="c" _label="With access key" />
35
+ <KolInputPassword {...props} ref={ref} _shortKey="s" _label="With short key" />
34
36
  </div>
35
37
  );
36
38
  });
@@ -68,6 +68,18 @@ export const InputRadioCases = forwardRef<HTMLKolInputRadioElement, Components.K
68
68
  _label="Salutation (horizontal with error hint and description)"
69
69
  _hint={HINT_MSG}
70
70
  />
71
+ <KolInputRadio
72
+ {...props}
73
+ _options="[{'disabled':true,'label':'Mrs. (disabled)','value':'Mrs.'},{'label':'Mr.'},{'label':'Company','value':'Company'}]"
74
+ _label="With access key"
75
+ _accessKey="c"
76
+ />
77
+ <KolInputRadio
78
+ {...props}
79
+ _options="[{'disabled':true,'label':'Mrs. (disabled)','value':'Mrs.'},{'label':'Mr.'},{'label':'Company','value':'Company'}]"
80
+ _label="With short key"
81
+ _shortKey="s"
82
+ />
71
83
  </div>
72
84
  );
73
85
  });
@@ -38,6 +38,8 @@ export const InputRangeCases = forwardRef<HTMLKolInputRangeElement, Components.K
38
38
  _touched
39
39
  />
40
40
  <KolInputRange {...props} _disabled _min={0} _max={50} _label="Slider (disabled)" />
41
+ <KolInputRange {...props} _min={0} _max={50} _label="With access key" _accessKey="c" />
42
+ <KolInputRange {...props} _min={0} _max={50} _label="With short key" _shortKey="s" />
41
43
  </div>
42
44
  );
43
45
  });
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { SampleDescription } from '../SampleDescription';
3
+ import { KolInputText } from '@public-ui/react';
4
+
5
+ export const InputTextExpertSlot = () => {
6
+ return (
7
+ <>
8
+ <SampleDescription>
9
+ <p>This sample show KolInputText with expert slot.</p>
10
+ </SampleDescription>
11
+
12
+ <KolInputText _label="" _type="text">
13
+ <span slot="expert">I am more than just a input field</span>
14
+ </KolInputText>
15
+ </>
16
+ );
17
+ };
@@ -46,6 +46,9 @@ export const InputTextCases = forwardRef<HTMLKolInputTextElement, Components.Kol
46
46
  <KolInputText {...props} _value="Value" _readOnly _label="First name (text, readonly)" />
47
47
  <KolInputText {...props} _placeholder="Placeholder" _disabled _label="First name (text, disabled)" />
48
48
  <KolInputText {...props} _value="Value" _disabled _label="First name (text, disabled)" />
49
+ <KolInputText {...props} _value="Value" _label="With access key" _accessKey="c" />
50
+ <KolInputText {...props} _value="Value" _label="With short key" _shortKey="s" />
51
+ <KolInputText {...props} _value="Value" _label="With both key" _shortKey="d" _accessKey="e" />
49
52
  </div>
50
53
  );
51
54
  });
@@ -3,6 +3,7 @@ import { InputTextBasic } from './basic';
3
3
  import { InputTextHideErrors } from './hide-errors';
4
4
  import { InputTextFormatterDemo } from './text-formatter';
5
5
  import { InputTextSmartButton } from './smart-button';
6
+ import { InputTextExpertSlot } from './expert-slot';
6
7
 
7
8
  export const INPUT_TEXT_ROUTES: Routes = {
8
9
  'input-text': {
@@ -10,5 +11,6 @@ export const INPUT_TEXT_ROUTES: Routes = {
10
11
  'hide-errors': InputTextHideErrors,
11
12
  'text-formatter': InputTextFormatterDemo,
12
13
  'smart-button': InputTextSmartButton,
14
+ 'expert-slot': InputTextExpertSlot,
13
15
  },
14
16
  };
@@ -0,0 +1,22 @@
1
+ import type { FC } from 'react';
2
+ import React from 'react';
3
+
4
+ import { KolLink } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
6
+
7
+ export const LinkAccessKey: FC = () => (
8
+ <>
9
+ <SampleDescription>
10
+ <p>
11
+ <p>This sample shows KolLink with access key. The access keys can be used to trigger the buttons using the keyboard.</p>
12
+ </p>
13
+ </SampleDescription>
14
+
15
+ <div className="grid gap-4">
16
+ <KolLink _href="#/back-page" _label="With S access key" _accessKey="S" />
17
+ <KolLink _href="#/back-page" _label="Very small s" _accessKey="s" />
18
+ <KolLink _href="#/back-page" _label="Access key does not appear in label" _accessKey="s" />
19
+ <KolLink _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="access key without label" _accessKey="s" />
20
+ </div>
21
+ </>
22
+ );
@@ -44,6 +44,43 @@ export const LinkIcons: FC = () => (
44
44
  _label="I am a link with all icons"
45
45
  _href="#/back-page"
46
46
  />
47
+
48
+ <KolLink _icons="codicon codicon-home" _href="https://public-ui.github.io/" _label="I am a external link with an icon on the left" _target="_blank" />
49
+ <KolLink
50
+ _icons={{
51
+ right: 'codicon codicon-home',
52
+ }}
53
+ _href="https://public-ui.github.io/"
54
+ _label="I am a external linkwith an icon on the right"
55
+ _target="_blank"
56
+ />
57
+ <KolLink
58
+ _icons={{
59
+ top: 'codicon codicon-home',
60
+ }}
61
+ _href="https://public-ui.github.io/"
62
+ _label="I am a external link with an icon at the top"
63
+ _target="_blank"
64
+ />
65
+ <KolLink
66
+ _icons={{
67
+ bottom: 'codicon codicon-home',
68
+ }}
69
+ _href="https://public-ui.github.io/"
70
+ _label="I am a external link with icon below"
71
+ _target="_blank"
72
+ />
73
+ <KolLink
74
+ _href="https://public-ui.github.io/"
75
+ _label="I am a external link with all icons"
76
+ _target="_blank"
77
+ _icons={{
78
+ top: 'codicon codicon-home',
79
+ right: 'codicon codicon-home',
80
+ bottom: 'codicon codicon-home',
81
+ left: 'codicon codicon-home',
82
+ }}
83
+ />
47
84
  </div>
48
85
  </>
49
86
  );
@@ -4,6 +4,8 @@ import { LinkIcons } from './icons';
4
4
  import { LinkImage } from './image';
5
5
  import { LinkTarget } from './target';
6
6
  import { LinkAriaDescription } from './aria-description';
7
+ import { LinkAccessKey } from './access-key';
8
+ import { LinkShortKey } from './short-key';
7
9
 
8
10
  export const LINK_ROUTES: Routes = {
9
11
  link: {
@@ -12,5 +14,7 @@ export const LINK_ROUTES: Routes = {
12
14
  image: LinkImage,
13
15
  target: LinkTarget,
14
16
  'aria-description': LinkAriaDescription,
17
+ 'access-key': LinkAccessKey,
18
+ 'short-key': LinkShortKey,
15
19
  },
16
20
  };
@@ -0,0 +1,22 @@
1
+ import type { FC } from 'react';
2
+ import React from 'react';
3
+
4
+ import { KolLink } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
6
+
7
+ export const LinkShortKey: FC = () => (
8
+ <>
9
+ <SampleDescription>
10
+ <p>
11
+ This sample shows KolButton with short key without functionality. The short key is purely visual. Its functionality needs to be developed separately.{' '}
12
+ </p>
13
+ </SampleDescription>
14
+
15
+ <div className="grid gap-4">
16
+ <KolLink _href="#/back-page" _label="With S short key" _shortKey="S" />
17
+ <KolLink _href="#/back-page" _label="Very small s" _shortKey="s" />
18
+ <KolLink _href="#/back-page" _label="Short key does not appear in label" _shortKey="s" />
19
+ <KolLink _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="short key without label" _shortKey="s" />
20
+ </div>
21
+ </>
22
+ );
@@ -22,6 +22,8 @@ export const LinkButtonBasic: FC = () => (
22
22
  <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
23
23
  <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
24
24
  <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
25
+ <KolLinkButton _label="Access Key" _variant="primary" _accessKey="c" {...ARGS}></KolLinkButton>
26
+ <KolLinkButton _label="Short Key" _variant="primary" _shortKey="s" {...ARGS}></KolLinkButton>
25
27
  </div>
26
28
  </div>
27
29
  </>
@@ -57,6 +57,8 @@ export const SelectCases = forwardRef<HTMLKolSelectElement, Components.KolSelect
57
57
  _msg={{ _type: 'error', _description: ERROR_MSG }}
58
58
  _touched
59
59
  />
60
+ <KolSelect {...props} _options={SALUTATION_OPTIONS} _label="With access key" _accessKey="c" />
61
+ <KolSelect {...props} _options={SALUTATION_OPTIONS} _label="With short key" _shortKey="s" />
60
62
  </div>
61
63
  );
62
64
  });
@@ -34,6 +34,8 @@ export const SingleSelectCases = forwardRef<HTMLKolSingleSelectElement, Componen
34
34
  _placeholder="Placeholder"
35
35
  _required
36
36
  />
37
+ <KolSingleSelect {...props} _label="With access key" _options={COUNTRY_OPTIONS as Option<StencilUnknown>[]} _value={'de'} _accessKey="c" />
38
+ <KolSingleSelect {...props} _label="With short key" _options={COUNTRY_OPTIONS as Option<StencilUnknown>[]} _value={'de'} _shortKey="s" />
37
39
  </div>
38
40
  );
39
41
  });
@@ -14,6 +14,8 @@ export const TextareaCases = forwardRef<HTMLKolTextareaElement, Components.KolTe
14
14
  <KolTextarea {...props} ref={ref} _label="Text (disabled & placeholder)" _rows={3} _placeholder="Placeholder" _disabled />
15
15
  <KolTextarea {...props} ref={ref} _label="Text (readonly)" _rows={3} _placeholder="Placeholder" _readOnly />
16
16
  <KolTextarea {...props} ref={ref} _label="Text (disabled & value)" _rows={3} _placeholder="Placeholder" _value="Lorem ipsum" _disabled />
17
+ <KolTextarea {...props} ref={ref} _label="With access key" _rows={3} _placeholder="Placeholder" _value="Lorem ipsum" _accessKey="c" />
18
+ <KolTextarea {...props} ref={ref} _label="With short key" _rows={3} _placeholder="Placeholder" _value="Lorem ipsum" _shortKey="s" />
17
19
  </div>
18
20
  );
19
21
  });