@public-ui/sample-react 2.1.7-rc.1 → 2.1.7

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 (156) hide show
  1. package/.gitignore +5 -1
  2. package/dist/1487.js +1 -1
  3. package/dist/1636.js +1 -1
  4. package/dist/1792.js +1 -1
  5. package/dist/1795.js +1 -1
  6. package/dist/2017.js +1 -1
  7. package/dist/2322.js +1 -1
  8. package/dist/2538.js +1 -1
  9. package/dist/2567.js +1 -1
  10. package/dist/263.js +1 -1
  11. package/dist/2719.js +1 -1
  12. package/dist/3064.js +1 -1
  13. package/dist/3077.js +1 -1
  14. package/dist/3238.js +1 -1
  15. package/dist/3395.js +1 -1
  16. package/dist/35.js +1 -1
  17. package/dist/3521.js +1 -1
  18. package/dist/356.js +1 -1
  19. package/dist/3714.js +1 -1
  20. package/dist/3735.js +1 -1
  21. package/dist/3766.js +1 -1
  22. package/dist/3994.js +1 -1
  23. package/dist/4025.js +1 -1
  24. package/dist/4118.js +1 -1
  25. package/dist/4182.js +1 -1
  26. package/dist/4188.js +1 -1
  27. package/dist/4262.js +2 -0
  28. package/dist/4332.js +1 -1
  29. package/dist/4402.js +1 -1
  30. package/dist/4818.js +1 -1
  31. package/dist/4892.js +1 -1
  32. package/dist/4933.js +1 -1
  33. package/dist/4943.js +1 -1
  34. package/dist/495.js +1 -1
  35. package/dist/5034.js +1 -1
  36. package/dist/5056.js +1 -1
  37. package/dist/5138.js +1 -1
  38. package/dist/5296.js +1 -1
  39. package/dist/5356.js +1 -1
  40. package/dist/5551.js +1 -1
  41. package/dist/5835.js +1 -1
  42. package/dist/5840.js +1 -1
  43. package/dist/5889.js +1 -1
  44. package/dist/5912.js +1 -1
  45. package/dist/6082.js +1 -1
  46. package/dist/6099.js +1 -1
  47. package/dist/6181.js +1 -1
  48. package/dist/619.js +1 -1
  49. package/dist/6671.js +1 -1
  50. package/dist/6775.js +1 -1
  51. package/dist/7274.js +1 -1
  52. package/dist/7795.js +1 -1
  53. package/dist/7802.js +1 -1
  54. package/dist/7860.js +1 -1
  55. package/dist/8092.js +1 -1
  56. package/dist/8111.js +1 -1
  57. package/dist/8146.js +1 -1
  58. package/dist/8427.js +1 -1
  59. package/dist/8495.js +1 -1
  60. package/dist/8672.js +1 -1
  61. package/dist/8710.js +2 -0
  62. package/dist/8737.js +1 -1
  63. package/dist/8786.js +1 -1
  64. package/dist/8796.js +1 -1
  65. package/dist/8977.js +1 -1
  66. package/dist/9333.js +2 -0
  67. package/dist/9333.js.LICENSE.txt +3 -0
  68. package/dist/9389.js +1 -1
  69. package/dist/9561.js +1 -1
  70. package/dist/9599.js +1 -1
  71. package/dist/9612.js +1 -1
  72. package/dist/9890.js +1 -1
  73. package/dist/main.css +3 -2
  74. package/dist/main.js +1 -1
  75. package/package.json +11 -6
  76. package/src/components/Sidebar.tsx +45 -43
  77. package/src/components/abbr/basic.tsx +13 -13
  78. package/src/components/accordion/basic.tsx +5 -5
  79. package/src/components/accordion/headlines.tsx +12 -12
  80. package/src/components/alert/basic.tsx +6 -6
  81. package/src/components/alert/html.tsx +3 -3
  82. package/src/components/breadcrumb/basic.tsx +11 -11
  83. package/src/components/button/access-key.tsx +5 -5
  84. package/src/components/button/aria-description.tsx +17 -0
  85. package/src/components/button/routes.ts +2 -0
  86. package/src/components/button/width.tsx +1 -1
  87. package/src/components/button-link/aria-description.tsx +17 -0
  88. package/src/components/button-link/basic.tsx +7 -7
  89. package/src/components/button-link/icons.tsx +4 -4
  90. package/src/components/button-link/image.tsx +2 -2
  91. package/src/components/button-link/routes.ts +2 -0
  92. package/src/components/drawer/basic.tsx +2 -2
  93. package/src/components/handout/basic.tsx +69 -69
  94. package/src/components/handout/table-data.ts +538 -538
  95. package/src/components/heading/badged.tsx +6 -6
  96. package/src/components/input-checkbox/partials/cases.tsx +5 -5
  97. package/src/components/input-date/partials/cases.tsx +8 -8
  98. package/src/components/input-date/reset.tsx +21 -0
  99. package/src/components/input-date/routes.ts +2 -0
  100. package/src/components/input-email/partials/cases.tsx +1 -1
  101. package/src/components/input-file/partials/cases.tsx +3 -3
  102. package/src/components/input-number/partials/cases.tsx +8 -8
  103. package/src/components/input-password/show-password.tsx +3 -3
  104. package/src/components/input-radio/partials/cases.tsx +30 -15
  105. package/src/components/input-range/partials/cases.tsx +3 -3
  106. package/src/components/input-text/partials/cases.tsx +11 -11
  107. package/src/components/input-text/routes.ts +2 -0
  108. package/src/components/input-text/text-formatter.tsx +91 -0
  109. package/src/components/link/aria-description.tsx +17 -0
  110. package/src/components/link/basic.tsx +8 -7
  111. package/src/components/link/icons.tsx +5 -5
  112. package/src/components/link/image.tsx +2 -2
  113. package/src/components/link/routes.ts +2 -0
  114. package/src/components/link-button/aria-description.tsx +17 -0
  115. package/src/components/link-button/routes.ts +2 -0
  116. package/src/components/modal/basic.tsx +37 -18
  117. package/src/components/nav/links.ts +4 -4
  118. package/src/components/select/partials/cases.tsx +9 -9
  119. package/src/components/single-select/basic.tsx +23 -0
  120. package/src/components/single-select/partials/cases.tsx +39 -0
  121. package/src/components/single-select/partials/variants.tsx +19 -0
  122. package/src/components/single-select/routes.ts +8 -0
  123. package/src/components/skip-nav/basic.tsx +4 -4
  124. package/src/components/split-button/basic.tsx +2 -2
  125. package/src/components/split-button/routes.ts +2 -0
  126. package/src/components/split-button/with-context.tsx +37 -0
  127. package/src/components/table/interactive-child-elements.tsx +105 -0
  128. package/src/components/table/render-cell.tsx +1 -1
  129. package/src/components/table/routes.ts +6 -0
  130. package/src/components/table/stateful-with-selection.tsx +7 -7
  131. package/src/components/table/stateful-with-single-selection.tsx +84 -0
  132. package/src/components/table/stateless-with-selection.tsx +9 -6
  133. package/src/components/table/stateless-with-single-selection.tsx +68 -0
  134. package/src/components/tabs/basic.tsx +13 -13
  135. package/src/components/tabs/icons-only.tsx +8 -8
  136. package/src/scenarios/appointment-form/AppointmentForm.tsx +13 -13
  137. package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +6 -6
  138. package/src/scenarios/appointment-form/DistrictForm.tsx +8 -8
  139. package/src/scenarios/appointment-form/PersonalInformationForm.tsx +16 -16
  140. package/src/scenarios/appointment-form/Summary.tsx +6 -6
  141. package/src/scenarios/focus-elements.tsx +12 -0
  142. package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +80 -0
  143. package/src/scenarios/horizontal-scrollbar-advanced/databasedata.json +317 -0
  144. package/src/scenarios/horizontal-scrollbar-advanced/index.ts +1 -0
  145. package/src/scenarios/horizontal-scrollbar-advanced/layout.css +31 -0
  146. package/src/scenarios/inputs-get-value.tsx +36 -10
  147. package/src/scenarios/routes.ts +2 -0
  148. package/src/scenarios/static-form.tsx +9 -0
  149. package/src/shares/constants.ts +2 -2
  150. package/src/shares/routes.ts +2 -0
  151. package/src/style.scss +19 -1
  152. package/tsconfig.json +1 -1
  153. package/dist/4266.js +0 -2
  154. package/dist/4817.js +0 -2
  155. /package/dist/{4266.js.LICENSE.txt → 4262.js.LICENSE.txt} +0 -0
  156. /package/dist/{4817.js.LICENSE.txt → 8710.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.1.7-rc.1",
3
+ "version": "2.1.7",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "repository": {
@@ -33,9 +33,12 @@
33
33
  "typescript": "5.5.4",
34
34
  "world_countries_lists": "2.9.0",
35
35
  "yup": "1.4.0",
36
- "@public-ui/components": "2.1.7-rc.1",
37
- "@public-ui/themes": "2.1.7-rc.1",
38
- "@public-ui/react": "2.1.7-rc.1"
36
+ "@public-ui/components": "2.1.7",
37
+ "@public-ui/react": "2.1.7",
38
+ "@public-ui/themes": "2.1.7"
39
+ },
40
+ "devDependencies": {
41
+ "@playwright/test": "1.45.3"
39
42
  },
40
43
  "files": [
41
44
  ".eslintignore",
@@ -55,11 +58,13 @@
55
58
  "build": "rimraf dist && cross-env NODE_ENV=production webpack",
56
59
  "build:deps": "pnpm --filter @public-ui/sample-react^... build",
57
60
  "format": "prettier --check src",
58
- "lint": "tsc --noemit && eslint \"{src,tests}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
61
+ "lint": "tsc --noemit && eslint \"{src,tests,e2e}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
59
62
  "prepare:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" public/assets --dot",
60
63
  "prepare:themes-assets": "cpy \"node_modules/@public-ui/themes/assets/**/*\" public/assets --dot",
61
64
  "serve": "cross-env NODE_ENV=development webpack serve --devtool=source-map",
62
65
  "start": "npm run serve -- --open",
63
- "unused": "ts-prune -e src"
66
+ "unused": "ts-prune -e src",
67
+ "e2e": "playwright test",
68
+ "postinstall": "pnpm exec playwright install"
64
69
  }
65
70
  }
@@ -24,7 +24,7 @@ const ComponentNavContainer = ({ children, isMobile }: PropsWithChildren<{ isMob
24
24
  {children}
25
25
  </KolAccordion>
26
26
  ) : (
27
- <div className="mt">{children}</div>
27
+ <div className="mt scrollable-container">{children}</div>
28
28
  );
29
29
  export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample, buildDate, commitHash, onThemeChange }) => {
30
30
  /* KolSelect calls onChange initially by design - work around this with a state variable */
@@ -56,52 +56,54 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
56
56
 
57
57
  return (
58
58
  <aside className="app-sidebar p-4">
59
- <div className="flex flex-justify-between flex-items-center">
60
- <KolHeading _label="KoliBri React"></KolHeading>
61
- <KolVersion _label={version}></KolVersion>
62
- </div>
63
- {(buildDate || commitHash) && (
64
- <div className="text-sm font-mono color-gray-5 m-t-2">
65
- {commitHash ? `Build: ${commitHash}` : ''}
66
- <br />
67
- {buildDate ? `at ${buildDate}` : ''}
59
+ <div className="scrollable-container-wrapper">
60
+ <div className="flex flex-justify-between flex-items-center">
61
+ <KolHeading _label="KoliBri React"></KolHeading>
62
+ <KolVersion _label={version}></KolVersion>
68
63
  </div>
69
- )}
64
+ {(buildDate || commitHash) && (
65
+ <div className="text-sm font-mono color-gray-5 m-t-2">
66
+ {commitHash ? `Build: ${commitHash}` : ''}
67
+ <br />
68
+ {buildDate ? `at ${buildDate}` : ''}
69
+ </div>
70
+ )}
70
71
 
71
- <KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
72
+ <KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
72
73
 
73
- <KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
74
- <div className="flex flex-justify-between flex-items-center mt">
75
- <KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
76
- <span className="text-center">
77
- {formatSampleAsLabel()} ({getIndexOfSample() + 1}/{routeList.length})
78
- </span>
79
- <KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
80
- </div>
74
+ <KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
75
+ <div className="flex flex-justify-between flex-items-center mt">
76
+ <KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
77
+ <span className="text-center">
78
+ {formatSampleAsLabel()} ({getIndexOfSample() + 1}/{routeList.length})
79
+ </span>
80
+ <KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
81
+ </div>
81
82
 
82
- <ComponentNavContainer isMobile={isMobile}>
83
- <nav>
84
- <ul className="m0 p0 list-inside">
85
- {Object.entries(routes).map(([parentName, children]) => (
86
- <li key={parentName} className="mt-2">
87
- {parentName}
88
- <ul className="list-inside ml p0">
89
- {Object.keys(children).map((childName) => (
90
- <li key={`${parentName}/${childName}`}>
91
- {/* Handle special case for nested routes in tree example - this might need a proper refactoring in the future */}
92
- {parentName === 'tree' && childName === 'basic/:subPage' ? (
93
- <KolLink _label="basic" _href={`#/${parentName}/basic/home`} _on={{ onClick: handleLinkClick }} />
94
- ) : (
95
- <KolLink _label={childName} _href={`#/${parentName}/${childName}`} _on={{ onClick: handleLinkClick }} />
96
- )}
97
- </li>
98
- ))}
99
- </ul>
100
- </li>
101
- ))}
102
- </ul>
103
- </nav>
104
- </ComponentNavContainer>
83
+ <ComponentNavContainer isMobile={isMobile}>
84
+ <nav>
85
+ <ul className="m0 p0 list-inside">
86
+ {Object.entries(routes).map(([parentName, children]) => (
87
+ <li key={parentName} className="mt-2">
88
+ {parentName}
89
+ <ul className="list-inside ml p0">
90
+ {Object.keys(children).map((childName) => (
91
+ <li key={`${parentName}/${childName}`}>
92
+ {/* Handle special case for nested routes in tree example - this might need a proper refactoring in the future */}
93
+ {parentName === 'tree' && childName === 'basic/:subPage' ? (
94
+ <KolLink _label="basic" _href={`#/${parentName}/basic/home`} _on={{ onClick: handleLinkClick }} />
95
+ ) : (
96
+ <KolLink _label={childName} _href={`#/${parentName}/${childName}`} _on={{ onClick: handleLinkClick }} />
97
+ )}
98
+ </li>
99
+ ))}
100
+ </ul>
101
+ </li>
102
+ ))}
103
+ </ul>
104
+ </nav>
105
+ </ComponentNavContainer>
106
+ </div>
105
107
  </aside>
106
108
  );
107
109
  };
@@ -11,35 +11,35 @@ export const AbbrBasic: FC = () => (
11
11
  </SampleDescription>
12
12
 
13
13
  <p>
14
- Ich bin <KolAbbr _label="zum Beispiel">z.B.</KolAbbr> eine Abkürzung.
14
+ I am <KolAbbr _label="zum Beispiel">e.g.</KolAbbr> an abbreviation.
15
15
  </p>
16
16
  <p>
17
- Ich bin{' '}
17
+ I am{' '}
18
18
  <KolAbbr _label="zum Beispiel" _tooltipAlign="right">
19
- z.B.
19
+ e.g.
20
20
  </KolAbbr>{' '}
21
- eine Abkürzung (rechts).
21
+ an abbreviation (right).
22
22
  </p>
23
23
  <p>
24
- Ich bin{' '}
24
+ I am{' '}
25
25
  <KolAbbr _label="zum Beispiel" _tooltipAlign="bottom">
26
- z.B.
26
+ e.g.
27
27
  </KolAbbr>{' '}
28
- eine Abkürzung (unten).
28
+ an abbreviation (below).
29
29
  </p>
30
30
  <p>
31
- Ich bin{' '}
31
+ I am{' '}
32
32
  <KolAbbr _label="zum Beispiel" _tooltipAlign="left">
33
- z.B.
33
+ e.g.
34
34
  </KolAbbr>{' '}
35
- eine Abkürzung (links).
35
+ an abbreviation (left).
36
36
  </p>
37
37
  <p>
38
- Ich bin{' '}
38
+ I am{' '}
39
39
  <KolAbbr _label="zum Beispiel" _tooltipAlign="top">
40
- z.B.
40
+ e.g.
41
41
  </KolAbbr>{' '}
42
- eine Abkürzung (oben).
42
+ an abbreviation (top).
43
43
  </p>
44
44
  </>
45
45
  );
@@ -15,11 +15,11 @@ export const AccordionBasic: FC = () => (
15
15
  </SampleDescription>
16
16
 
17
17
  <div className="grid gap-4">
18
- <KolAccordion _label="Überschrift Accordion Tab 1">Inhalt Accordion Tab 1</KolAccordion>
19
- <KolAccordion _label="Überschrift Accordion Tab 2">Inhalt Accordion Tab 2</KolAccordion>
20
- <KolAccordion _label="Überschrift Accordion Tab 2 (deaktiviert)" _disabled></KolAccordion>
21
- <KolAccordion _label="Überschrift Accordion Tab 2 (disabled and open)" _disabled _open>
22
- Inhalt Accordion Tab 2
18
+ <KolAccordion _label="Heading Accordion Tab 1">Contents Accordion Tab 1</KolAccordion>
19
+ <KolAccordion _label="Heading Accordion Tab 2">Contents Accordion Tab 2</KolAccordion>
20
+ <KolAccordion _label="Heading Accordion Tab 2 (deactivated)" _disabled></KolAccordion>
21
+ <KolAccordion _label="Heading Accordion Tab 2 (disabled and open)" _disabled _open>
22
+ Contents Accordion Tab 2
23
23
  </KolAccordion>
24
24
  </div>
25
25
  </>
@@ -11,23 +11,23 @@ export const AccordionHeadlines: FC = () => (
11
11
  </SampleDescription>
12
12
 
13
13
  <div className="grid gap-4">
14
- <KolAccordion _label="Überschrift Level 1" _level={1}>
15
- Inhalt Accordion Tab 1
14
+ <KolAccordion _label="Heading Level 1" _level={1}>
15
+ Contents Accordion Tab 1
16
16
  </KolAccordion>
17
- <KolAccordion _label="Überschrift Level 2" _level={2}>
18
- Inhalt Accordion Tab 2
17
+ <KolAccordion _label="Heading Level 2" _level={2}>
18
+ Contents Accordion Tab 2
19
19
  </KolAccordion>
20
- <KolAccordion _label="Überschrift Level 3" _level={3}>
21
- Inhalt Accordion Tab 3
20
+ <KolAccordion _label="Heading Level 3" _level={3}>
21
+ Contents Accordion Tab 3
22
22
  </KolAccordion>
23
- <KolAccordion _label="Überschrift Level 4" _level={4}>
24
- Inhalt Accordion Tab 4
23
+ <KolAccordion _label="Heading Level 4" _level={4}>
24
+ Contents Accordion Tab 4
25
25
  </KolAccordion>
26
- <KolAccordion _label="Überschrift Level 5" _level={5}>
27
- Inhalt Accordion Tab 5
26
+ <KolAccordion _label="Heading Level 5" _level={5}>
27
+ Contents Accordion Tab 5
28
28
  </KolAccordion>
29
- <KolAccordion _label="Überschrift Level 6" _level={6}>
30
- Inhalt Accordion Tab 6
29
+ <KolAccordion _label="Heading Level 6" _level={6}>
30
+ Contents Accordion Tab 6
31
31
  </KolAccordion>
32
32
  </div>
33
33
  </>
@@ -15,17 +15,17 @@ type PropsBasic = {
15
15
 
16
16
  const AlertByType: FC<PropsByType> = ({ level, type, variant }) => (
17
17
  <>
18
- <KolAlert _label="Das ist die Überschrift des Alert." _level={level} _type={type} _variant={variant}>
19
- Das ist der Text des Alert.
18
+ <KolAlert _label="This is the headline of the alert." _level={level} _type={type} _variant={variant}>
19
+ This is the text of the alert.
20
20
  </KolAlert>
21
21
  <KolAlert _type={type} _variant={variant}>
22
- In diesem Alert wird nur der Text ohne Überschrift verwendet.
22
+ In this alert, only the text without the heading is used.
23
23
  </KolAlert>
24
- <KolAlert _label="Das ist die Überschrift des Alert." _level={level} _type={type} _variant={variant} _hasCloser>
25
- Das ist der Text des Alert. Mit Schließen-Button.
24
+ <KolAlert _label="This is the headline of the alert." _level={level} _type={type} _variant={variant} _hasCloser>
25
+ This is the text of the alert. With close button.
26
26
  </KolAlert>
27
27
  <KolAlert _type={type} _variant={variant} _hasCloser>
28
- In diesem Alert wird nur der Text ohne Überschrift verwendet. Mit Schließen-Button.
28
+ In this alert, only the text without the heading is used. With close button.
29
29
  </KolAlert>
30
30
  </>
31
31
  );
@@ -11,11 +11,11 @@ export const AlertHtml: FC = () => (
11
11
  </SampleDescription>
12
12
 
13
13
  <div>
14
- <KolAlert _label="Ausgabe von HTML-Code im Alert" _type="info">
15
- <h2 className="mt-2 mb-3">Hier wird eine H2-Überschrift ausgegeben</h2>
14
+ <KolAlert _label="Output of HTML code in the alert" _type="info">
15
+ <h2 className="mt-2 mb-3">An H2 heading is output here</h2>
16
16
  <div className="grid gap-4 sm:grid-cols-2">
17
17
  <div>
18
- <h3>Text in einer linken Spalte</h3>
18
+ <h3>Text in a left-hand column</h3>
19
19
  <p>
20
20
  Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quidem sed fugiat dolorum ratione et, ullam officia nobis nihil debitis, consectetur
21
21
  dicta accusantium. Vitae debitis, quibusdam vel recusandae deleniti placeat dolorem?
@@ -15,43 +15,43 @@ export const BreadcrumbBasic: FC = () => (
15
15
  <KolBreadcrumb
16
16
  _label="Breadcrumb aus Text-Links"
17
17
  _links={[
18
- { _label: 'Startseite', _href: '#/back-page' },
19
- { _label: 'Unterseite der Startseite', _href: '#/back-page' },
18
+ { _label: 'Homepage', _href: '#/back-page' },
19
+ { _label: 'Bottom of the homepage', _href: '#/back-page' },
20
20
  {
21
- _label: 'Unterseite der Unterseite',
21
+ _label: 'Underside of the underside',
22
22
  _href: '#/back-page',
23
23
  },
24
24
  ]}
25
25
  ></KolBreadcrumb>
26
26
  <KolBreadcrumb
27
- _label="Breadcrumb aus Icons- oder Text-Links"
27
+ _label="Breadcrumb from icons or text links"
28
28
  _links={[
29
29
  {
30
- _label: 'Startseite',
30
+ _label: 'Homepage',
31
31
  _icons: 'codicon codicon-home',
32
32
  _hideLabel: true,
33
33
  _href: '#/back-page',
34
34
  },
35
35
  {
36
- _label: 'Unterseite der Startseite mit sehr langem Link-Test',
36
+ _label: 'Subpage of the start page with very long link test',
37
37
  _href: '#/back-page',
38
38
  },
39
39
  {
40
- _label: 'Unterseite der Unterseite',
40
+ _label: 'Underside of the underside',
41
41
  _href: '#/back-page',
42
42
  },
43
43
  ]}
44
44
  ></KolBreadcrumb>
45
45
  <KolBreadcrumb
46
- _label="Breadcrumb aus Icons- und Text-Links"
46
+ _label="Breadcrumb from icons and text links"
47
47
  _links={[
48
- { _label: 'Startseite', _icons: 'codicon codicon-home', _href: '#/back-page' },
48
+ { _label: 'Homepage', _icons: 'codicon codicon-home', _href: '#/back-page' },
49
49
  {
50
- _label: 'Unterseite der Startseite und ich_bin_ein_echt_langes_zusammengesetztes_Worte_und_versuche_das_Layout_zu_brechen',
50
+ _label: 'Subpage of the main page and I_am_a_really_long_compound_word_trying_to_break_the_layout',
51
51
  _href: '#/back-page',
52
52
  },
53
53
  {
54
- _label: 'Unterseite der Unterseite',
54
+ _label: 'Underside of the underside',
55
55
  _href: '#/back-page',
56
56
  },
57
57
  ]}
@@ -14,12 +14,12 @@ export const ButtonAccessKey: FC = () => (
14
14
  </SampleDescription>
15
15
 
16
16
  <div className="flex flex-wrap gap-4">
17
- <KolButton _label="Mit S access key" _accessKey="S"></KolButton>
18
- <KolButton _label="Sehr kleines s" _accessKey="s"></KolButton>
19
- <KolButton _label="Access key kommt nicht in label vor" _accessKey="x"></KolButton>
20
- <KolButton _label="access key ohne label" _hideLabel _accessKey="s" _icons="codicon codicon-dashboard"></KolButton>
17
+ <KolButton _label="With S access key" _accessKey="S"></KolButton>
18
+ <KolButton _label="Very small s" _accessKey="s"></KolButton>
19
+ <KolButton _label="Access key does not appear in label" _accessKey="x"></KolButton>
20
+ <KolButton _label="access key without label" _hideLabel _accessKey="s" _icons="codicon codicon-dashboard"></KolButton>
21
21
  <KolButton
22
- _label="mit inline icons"
22
+ _label="with inline icons"
23
23
  _icons={{
24
24
  left: 'codicon codicon-dashboard',
25
25
  right: 'codicon codicon-dashboard',
@@ -0,0 +1,17 @@
1
+ import { KolButton } from '@public-ui/react';
2
+ import React from 'react';
3
+ import type { FC } from 'react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ export const ButtonAriaDescription: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>This sample shows KolButton with aria-description</p>
10
+ </SampleDescription>
11
+
12
+ <div className="flex flex-wrap gap-4">
13
+ <KolButton _label="Button Text without area description"></KolButton>
14
+ <KolButton _label="Button Text" _ariaDescription="Button Area Description"></KolButton>
15
+ </div>
16
+ </>
17
+ );
@@ -1,5 +1,6 @@
1
1
  import { Routes } from '../../shares/types';
2
2
  import { ButtonAccessKey } from './access-key';
3
+ import { ButtonAriaDescription } from './aria-description';
3
4
  import { ButtonBaselined } from './baselined';
4
5
  import { ButtonBasic } from './basic';
5
6
  import { ButtonIcons } from './icons';
@@ -11,6 +12,7 @@ export const BUTTON_ROUTES: Routes = {
11
12
  icons: ButtonIcons,
12
13
  width: ButtonWidth,
13
14
  'access-key': ButtonAccessKey,
15
+ 'aria-description': ButtonAriaDescription,
14
16
  baselined: ButtonBaselined,
15
17
  },
16
18
  };
@@ -8,7 +8,7 @@ import { SampleDescription } from '../SampleDescription';
8
8
  const ARGS = {
9
9
  className: 'w-8rem',
10
10
  _on: {
11
- onClick: () => alert('Klick!'),
11
+ onClick: () => alert('Click!'),
12
12
  },
13
13
  };
14
14
 
@@ -0,0 +1,17 @@
1
+ import { KolButtonLink } from '@public-ui/react';
2
+ import React from 'react';
3
+ import type { FC } from 'react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ export const ButtonLinkAriaDescription: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>This sample shows KolButtonLink with aria-description</p>
10
+ </SampleDescription>
11
+
12
+ <div className="flex flex-wrap gap-4">
13
+ <KolButtonLink _label="Button Text without area description"></KolButtonLink>
14
+ <KolButtonLink _label="Button Text" _ariaDescription="Button Area Description"></KolButtonLink>
15
+ </div>
16
+ </>
17
+ );
@@ -15,18 +15,18 @@ export const ButtonLinkBasic: FC = () => (
15
15
  </SampleDescription>
16
16
  <div>
17
17
  <p>
18
- In diesem Absatz wird ein Link gesetzt, der keine weiteren Attribute enthält. <KolButtonLink _label="Simple Link" /> Er wird standardmäßig als{' '}
19
- <strong>inline-Element</strong> ausgegeben.
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
20
  </p>
21
21
  <p>
22
- In diesem Absatz wird ein Link gesetzt, der einmal als inline-block-Element ausgegeben wird.{' '}
23
- <KolButtonLink style={{ display: 'inline-block', margin: '1rem', border: '1px dotted' }} _label="Simple Link" />. Damit kann man mir per CSS-Styles eine
24
- Breite, eine Höhe und andere Eigenschaften zuweisen.
22
+ In this paragraph, a link is inserted that is rendered as an inline-block element.
23
+ <KolButtonLink style={{ display: 'inline-block', margin: '1rem', border: '1px dotted' }} _label="Simple Link" />. This allows you to assign width,
24
+ height, and other properties to it using CSS styles.
25
25
  <br />
26
26
  <br />
27
- Danach folgt ein Link, der als block-Element ausgegeben wird.
27
+ After that, there is a link that is rendered as a block element.
28
28
  <KolButtonLink style={{ display: 'block' }} _label="Simple Link" />
29
- Daher gehe ich über die ganze Breite des Eltern-Elements erzeuge so einen Zeilenumbruch.
29
+ Therefore, I go over the entire width of the parent element to create a line break.
30
30
  </p>
31
31
  <p>
32
32
  <KolButtonLink _label="Disabled ButtonLink" _disabled />
@@ -17,19 +17,19 @@ export const ButtonLinkIcons: FC = () => (
17
17
  _icons={{
18
18
  right: 'codicon codicon-home',
19
19
  }}
20
- _label="Ich bin ein Link mit Icon rechts"
20
+ _label="I am a link with an icon on the right"
21
21
  />
22
22
  <KolButtonLink
23
23
  _icons={{
24
24
  top: 'codicon codicon-home',
25
25
  }}
26
- _label="Ich bin ein Link mit Icon oben"
26
+ _label="I am a link with an icon at the top"
27
27
  />
28
28
  <KolButtonLink
29
29
  _icons={{
30
30
  bottom: 'codicon codicon-home',
31
31
  }}
32
- _label="Ich bin ein Link mit Icon unten"
32
+ _label="I am a link with icon below"
33
33
  />
34
34
  <KolButtonLink
35
35
  _icons={{
@@ -38,7 +38,7 @@ export const ButtonLinkIcons: FC = () => (
38
38
  bottom: 'codicon codicon-home',
39
39
  left: 'codicon codicon-home',
40
40
  }}
41
- _label="Ich bin ein Link mit allen Icons"
41
+ _label="I am a link with all icons"
42
42
  />
43
43
  </div>
44
44
  </>
@@ -12,10 +12,10 @@ export const ButtonLinkImage: FC = () => (
12
12
  </SampleDescription>
13
13
 
14
14
  <div className="grid gap-4">
15
- <KolButtonLink _label="Ich bin ein Link, der als Text gerendert wird" />
15
+ <KolButtonLink _label="I am a link that is rendered as text" />
16
16
  <br />
17
17
  <KolButtonLink _label="">
18
- <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
18
+ <img alt="Presentation of the KoliBri theming" slot="expert" src="abgrenzung.jpg" width="300" />
19
19
  </KolButtonLink>
20
20
  </div>
21
21
  </>
@@ -2,11 +2,13 @@ import { Routes } from '../../shares/types';
2
2
  import { ButtonLinkBasic } from './basic';
3
3
  import { ButtonLinkIcons } from './icons';
4
4
  import { ButtonLinkImage } from './image';
5
+ import { ButtonLinkAriaDescription } from './aria-description';
5
6
 
6
7
  export const BUTTON_LINK_ROUTES: Routes = {
7
8
  'button-link': {
8
9
  basic: ButtonLinkBasic,
9
10
  icons: ButtonLinkIcons,
10
11
  image: ButtonLinkImage,
12
+ 'aria-description': ButtonLinkAriaDescription,
11
13
  },
12
14
  };
@@ -33,7 +33,7 @@ export const DrawerBasic: FC = () => {
33
33
 
34
34
  <DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
35
35
  <div className="flex flex-wrap gap-4">
36
- <KolDrawer ref={drawerElement} _label="Ich bin ein Drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
36
+ <KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
37
37
  <p>
38
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
39
  voluptua.
@@ -45,7 +45,7 @@ export const DrawerBasic: FC = () => {
45
45
  ref={drawerModalElement}
46
46
  _modal
47
47
  _align={align}
48
- _label="Ich bin ein Drawer Modal"
48
+ _label="I am a Drawer Modal"
49
49
  _on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
50
50
  >
51
51
  <p>