@public-ui/sample-react 1.7.25 → 1.7.26-rc.1

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 (186) hide show
  1. package/dist/1069.js +1 -1
  2. package/dist/1085.js +1 -1
  3. package/dist/1184.js +1 -1
  4. package/dist/1222.js +1 -1
  5. package/dist/1237.js +2 -0
  6. package/dist/1278.js +1 -1
  7. package/dist/1325.js +1 -1
  8. package/dist/1333.js +1 -1
  9. package/dist/1661.js +1 -1
  10. package/dist/1703.js +1 -1
  11. package/dist/1711.js +1 -1
  12. package/dist/1792.js +1 -1
  13. package/dist/1793.js +1 -1
  14. package/dist/1878.js +1 -1
  15. package/dist/1957.js +1 -1
  16. package/dist/2195.js +1 -1
  17. package/dist/2305.js +1 -1
  18. package/dist/2538.js +1 -1
  19. package/dist/279.js +1 -1
  20. package/dist/2830.js +1 -1
  21. package/dist/3180.js +1 -1
  22. package/dist/3332.js +1 -1
  23. package/dist/3344.js +1 -1
  24. package/dist/3596.js +1 -1
  25. package/dist/3714.js +1 -1
  26. package/dist/3974.js +1 -1
  27. package/dist/4014.js +1 -1
  28. package/dist/4102.js +1 -1
  29. package/dist/4218.js +1 -1
  30. package/dist/4404.js +1 -1
  31. package/dist/{2214.js → 4614.js} +2 -2
  32. package/dist/4941.js +1 -1
  33. package/dist/500.js +1 -1
  34. package/dist/5139.js +1 -1
  35. package/dist/5164.js +1 -1
  36. package/dist/5484.js +1 -1
  37. package/dist/5540.js +1 -1
  38. package/dist/5756.js +1 -1
  39. package/dist/6682.js +1 -1
  40. package/dist/6781.js +1 -1
  41. package/dist/7245.js +1 -1
  42. package/dist/7263.js +1 -1
  43. package/dist/{2328.js → 7300.js} +1 -1
  44. package/dist/7512.js +1 -1
  45. package/dist/7856.js +1 -1
  46. package/dist/8002.js +1 -1
  47. package/dist/8049.js +1 -1
  48. package/dist/8189.js +1 -1
  49. package/dist/8264.js +1 -1
  50. package/dist/8389.js +1 -1
  51. package/dist/8515.js +1 -1
  52. package/dist/8557.js +1 -1
  53. package/dist/8588.js +1 -1
  54. package/dist/8724.js +1 -1
  55. package/dist/882.js +1 -1
  56. package/dist/895.js +1 -1
  57. package/dist/8993.js +1 -1
  58. package/dist/902.js +1 -1
  59. package/dist/9175.js +1 -1
  60. package/dist/9202.js +1 -1
  61. package/dist/9460.js +2 -0
  62. package/dist/9558.js +1 -1
  63. package/dist/9567.js +1 -1
  64. package/dist/9833.js +1 -1
  65. package/dist/9961.js +1 -1
  66. package/dist/9962.js +1 -1
  67. package/dist/index.html +2 -2
  68. package/dist/main.css +1 -1
  69. package/dist/main.js +1 -1
  70. package/package.json +8 -4
  71. package/public/index.html +2 -2
  72. package/src/components/SampleDescription.tsx +16 -9
  73. package/src/components/Sidebar.tsx +4 -4
  74. package/src/components/abbr/basic.tsx +5 -0
  75. package/src/components/accordion/basic.tsx +21 -11
  76. package/src/components/accordion/headlines.tsx +26 -20
  77. package/src/components/accordion/routes.ts +0 -5
  78. package/src/components/alert/basic.tsx +15 -1
  79. package/src/components/alert/card-msg.tsx +15 -6
  80. package/src/components/alert/html.tsx +7 -3
  81. package/src/components/avatar/basic.tsx +13 -6
  82. package/src/components/badge/basic.tsx +14 -7
  83. package/src/components/badge/button.tsx +7 -0
  84. package/src/components/breadcrumb/basic.tsx +53 -46
  85. package/src/components/button/basic.tsx +13 -2
  86. package/src/components/button/icons.tsx +26 -19
  87. package/src/components/button/routes.ts +0 -3
  88. package/src/components/button/width.tsx +22 -15
  89. package/src/components/button-group/basic.tsx +18 -7
  90. package/src/components/button-link/basic.tsx +26 -16
  91. package/src/components/button-link/icons.tsx +37 -30
  92. package/src/components/button-link/image.tsx +14 -7
  93. package/src/components/card/basic.tsx +12 -5
  94. package/src/components/card/routes.ts +0 -9
  95. package/src/components/details/basic.tsx +21 -12
  96. package/src/components/heading/badged.tsx +28 -20
  97. package/src/components/heading/basic.tsx +14 -8
  98. package/src/components/heading/paragraph.tsx +44 -38
  99. package/src/components/icon/basic.tsx +16 -10
  100. package/src/components/image/basic.tsx +9 -1
  101. package/src/components/indented-text/basic.tsx +25 -17
  102. package/src/components/input-checkbox/basic.tsx +9 -1
  103. package/src/components/input-checkbox/button.tsx +9 -1
  104. package/src/components/input-checkbox/switch.tsx +9 -1
  105. package/src/components/input-color/basic.tsx +9 -1
  106. package/src/components/input-date/basic.tsx +9 -1
  107. package/src/components/input-email/basic.tsx +9 -1
  108. package/src/components/input-file/basic.tsx +9 -1
  109. package/src/components/input-number/basic.tsx +13 -1
  110. package/src/components/input-password/basic.tsx +9 -1
  111. package/src/components/input-password/show-password.tsx +26 -19
  112. package/src/components/input-radio/basic.tsx +9 -1
  113. package/src/components/input-radio/horizontal.tsx +5 -5
  114. package/src/components/input-radio/routes.ts +0 -3
  115. package/src/components/input-range/basic.tsx +12 -1
  116. package/src/components/input-text/basic.tsx +9 -1
  117. package/src/components/input-text/focus.tsx +14 -8
  118. package/src/components/input-text/hide-errors.tsx +4 -1
  119. package/src/components/input-text/routes.ts +0 -2
  120. package/src/components/kolibri/basic.tsx +5 -0
  121. package/src/components/link/basic.tsx +25 -17
  122. package/src/components/link/icons.tsx +40 -34
  123. package/src/components/link/image.tsx +18 -12
  124. package/src/components/link/target.tsx +16 -8
  125. package/src/components/link-button/basic.tsx +14 -8
  126. package/src/components/link-group/basic.tsx +13 -2
  127. package/src/components/link-group/horizontal.tsx +13 -2
  128. package/src/components/logo/basic.tsx +13 -2
  129. package/src/components/modal/basic.tsx +9 -2
  130. package/src/components/nav/aria-current.tsx +24 -15
  131. package/src/components/nav/basic.tsx +64 -55
  132. package/src/components/nav/horizontal.tsx +58 -52
  133. package/src/components/nav/routes.ts +0 -3
  134. package/src/components/pagination/basic.tsx +15 -6
  135. package/src/components/progress/basic.tsx +10 -4
  136. package/src/components/quote/basic.tsx +7 -1
  137. package/src/components/quote/block.tsx +12 -6
  138. package/src/components/select/basic.tsx +9 -1
  139. package/src/components/skip-nav/basic.tsx +7 -11
  140. package/src/components/spin/basic.tsx +10 -1
  141. package/src/components/spin/custom.tsx +13 -3
  142. package/src/components/spin/cycle.tsx +10 -1
  143. package/src/components/split-button/basic.tsx +9 -2
  144. package/src/components/table/column-alignment.tsx +4 -0
  145. package/src/components/table/horizontal-scrollbar.tsx +7 -0
  146. package/src/components/table/render-cell.tsx +9 -1
  147. package/src/components/table/routes.ts +0 -3
  148. package/src/components/table/sort-date.tsx +9 -1
  149. package/src/components/table/with-pagination.tsx +1 -4
  150. package/src/components/tabs/basic.tsx +4 -0
  151. package/src/components/tabs/icons-only.tsx +12 -6
  152. package/src/components/textarea/adjust-height.tsx +12 -8
  153. package/src/components/textarea/basic.tsx +10 -1
  154. package/src/components/textarea/counter.tsx +10 -1
  155. package/src/components/textarea/resize.tsx +15 -6
  156. package/src/components/textarea/routes.ts +0 -9
  157. package/src/components/textarea/rows.tsx +12 -3
  158. package/src/components/toast/basic.tsx +17 -10
  159. package/src/components/toast-legacy/basic.tsx +17 -8
  160. package/src/components/version/basic.tsx +10 -1
  161. package/src/components/version/context.tsx +12 -5
  162. package/src/react.main.tsx +1 -1
  163. package/src/scenarios/appointment-form/AppointmentForm.tsx +53 -43
  164. package/src/scenarios/custom-tooltip-width.tsx +10 -1
  165. package/src/scenarios/static-form.tsx +1 -1
  166. package/src/shares/constants.ts +1 -0
  167. package/dist/3454.js +0 -2
  168. package/dist/4689.js +0 -2
  169. package/dist/9192.js +0 -2
  170. package/dist/9192.js.LICENSE.txt +0 -3
  171. package/src/components/accordion/header.tsx +0 -17
  172. package/src/components/accordion/list.tsx +0 -32
  173. package/src/components/button/hide-label.tsx +0 -31
  174. package/src/components/card/confirm.tsx +0 -19
  175. package/src/components/card/flex.tsx +0 -44
  176. package/src/components/card/selection.tsx +0 -70
  177. package/src/components/input-radio/select.tsx +0 -18
  178. package/src/components/input-text/blur.tsx +0 -14
  179. package/src/components/nav/active.tsx +0 -89
  180. package/src/components/table/badge-size.tsx +0 -51
  181. package/src/components/textarea/disabled.tsx +0 -10
  182. package/src/components/textarea/placeholder.tsx +0 -10
  183. package/src/components/textarea/readonly.tsx +0 -10
  184. /package/dist/{2214.js.LICENSE.txt → 1237.js.LICENSE.txt} +0 -0
  185. /package/dist/{3454.js.LICENSE.txt → 4614.js.LICENSE.txt} +0 -0
  186. /package/dist/{4689.js.LICENSE.txt → 9460.js.LICENSE.txt} +0 -0
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputCheckboxVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputCheckboxButton: FC = () => <FormWrap RefComponent={InputCheckboxVariants} _variant="button" />;
6
+ export const InputCheckboxButton: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>This sample shows KolInputCheckbox in the variant &quot;button&quot;.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputCheckboxVariants} _variant="button" />
12
+ </>
13
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { InputCheckboxVariants } from './partials/variants';
3
3
  import { FormWrap } from '../FormWrap';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputCheckboxSwitch: FC = () => <FormWrap RefComponent={InputCheckboxVariants} _variant="switch" />;
6
+ export const InputCheckboxSwitch: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>This sample shows KolInputCheckbox in the variant &quot;switch&quot;.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputCheckboxVariants} _variant="switch" />
12
+ </>
13
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputColorVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputColorBasic: FC = () => <FormWrap RefComponent={InputColorVariants} />;
6
+ export const InputColorBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputColor renders a color input. The sample shows KolInputColor in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputColorVariants} />
12
+ </>
13
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputDateVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputDateBasic: FC = () => <FormWrap RefComponent={InputDateVariants} />;
6
+ export const InputDateBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputDate renders all types of fields for date and time input. The sample shows KolInputDate in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputDateVariants} />
12
+ </>
13
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputEmailVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputEmailBasic: FC = () => <FormWrap RefComponent={InputEmailVariants} />;
6
+ export const InputEmailBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputEmail renders an email input field. The sample shows KolInputEmail in a form context with all variations and states.</p>
10
+ </SampleDescription>{' '}
11
+ <FormWrap RefComponent={InputEmailVariants} />
12
+ </>
13
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputFileVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputFileBasic: FC = () => <FormWrap RefComponent={InputFileVariants} />;
6
+ export const InputFileBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputFile renders a file input field. The sample shows KolInputFile in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputFileVariants} />
12
+ </>
13
+ );
@@ -1,5 +1,17 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputNumberVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputNumberBasic: FC = () => <FormWrap RefComponent={InputNumberVariants} />;
6
+ export const InputNumberBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>
10
+ KolInputNumber encompasses basic functionalities, utilizing the min, max, and step attributes to restrict the range of input values. Despite these
11
+ constraints, it allows free input that can ignore the defined minimum and maximum values, as well as step sizes. The component intentionally does not
12
+ emphasize validation rules, supporting examples without form validation, and refrains from additional validation through native HTML element validation.
13
+ </p>
14
+ </SampleDescription>
15
+ <FormWrap RefComponent={InputNumberVariants} />
16
+ </>
17
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputPasswordVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputPasswordBasic: FC = () => <FormWrap RefComponent={InputPasswordVariants} />;
6
+ export const InputPasswordBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputPassword renders a password input field. The sample shows KolInputPassword in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputPasswordVariants} />
12
+ </>
13
+ );
@@ -1,5 +1,6 @@
1
1
  import React, { FC, useEffect, useRef, useState } from 'react';
2
2
  import { KolForm, KolInputPassword } from '@public-ui/react';
3
+ import { SampleDescription } from '../SampleDescription';
3
4
 
4
5
  export const InputPasswordShowPassword: FC = () => {
5
6
  const [isPasswordVisible, setIsPasswordVisible] = useState(false);
@@ -15,25 +16,31 @@ export const InputPasswordShowPassword: FC = () => {
15
16
  }, [isPasswordVisible]);
16
17
 
17
18
  return (
18
- <KolForm>
19
- <KolInputPassword
20
- _placeholder="Mit 'Passwort anzeigen' Button"
21
- _label="Passwort"
22
- ref={passwordRef}
23
- _smartButton={{
24
- _icons: {
25
- left: {
26
- icon: 'codicon codicon-eye',
19
+ <>
20
+ <SampleDescription>
21
+ <p>This sample shows KolInputPassword with a custom smartButton, implementing a &quot;toggle password&quot; button.</p>
22
+ </SampleDescription>
23
+
24
+ <KolForm>
25
+ <KolInputPassword
26
+ _placeholder="Mit 'Passwort anzeigen' Button"
27
+ _label="Passwort"
28
+ ref={passwordRef}
29
+ _smartButton={{
30
+ _icons: {
31
+ left: {
32
+ icon: 'codicon codicon-eye',
33
+ },
34
+ },
35
+ _hideLabel: true,
36
+ _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
37
+ _on: {
38
+ onClick: handleTogglePasswordClick,
27
39
  },
28
- },
29
- _hideLabel: true,
30
- _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
31
- _on: {
32
- onClick: handleTogglePasswordClick,
33
- },
34
- }}
35
- className="block"
36
- />
37
- </KolForm>
40
+ }}
41
+ className="block"
42
+ />
43
+ </KolForm>
44
+ </>
38
45
  );
39
46
  };
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputRadioVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputRadioBasic: FC = () => <FormWrap RefComponent={InputRadioVariants} />;
6
+ export const InputRadioBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputRadio renders a set of radio buttons. The sample shows KolInputRadio in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputRadioVariants} />
12
+ </>
13
+ );
@@ -1,7 +1,8 @@
1
1
  import React, { FC, useState } from 'react';
2
2
 
3
3
  import { Orientation } from '@public-ui/components';
4
- import { KolButton, KolDetails, KolForm, KolInputCheckbox, KolInputRadio } from '@public-ui/react';
4
+ import { KolButton, KolForm, KolInputCheckbox, KolInputRadio } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const InputRadioHorizontal: FC = () => {
7
8
  const [show, setShow] = useState(true);
@@ -22,12 +23,11 @@ export const InputRadioHorizontal: FC = () => {
22
23
 
23
24
  return (
24
25
  <div className="grid gap-4">
25
- <KolDetails _label="Description" _open>
26
+ <SampleDescription>
26
27
  <p>
27
- This sample simulates the <code>horizontal</code> and <code>vertical</code> orientation of the <code>kol-input-radio</code>, if we rerender the
28
- component.
28
+ This sample shows the <code>horizontal</code> and <code>vertical</code> orientation of KolInoutRadio. It also features a button to test re-rendering.
29
29
  </p>
30
- </KolDetails>
30
+ </SampleDescription>
31
31
  <div className="flex gap-4">
32
32
  <KolButton _label="Click me a few times" _on={{ onClick: showClick }} />
33
33
  <KolInputCheckbox _label="Switch orientation (horizontal/vertical)" _on={{ onChange: toggleOrientation }} _variant="switch" />
@@ -3,12 +3,9 @@ import { Routes } from '../../shares/types';
3
3
  import { InputRadioBasic } from './basic';
4
4
  import { InputRadioHorizontal } from './horizontal';
5
5
 
6
- import { InputRadioSelect } from './select';
7
-
8
6
  export const INPUT_RADIO_ROUTES: Routes = {
9
7
  'input-radio': {
10
8
  basic: InputRadioBasic,
11
9
  horizontal: InputRadioHorizontal,
12
- select: InputRadioSelect,
13
10
  },
14
11
  };
@@ -1,5 +1,16 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputRangeVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputRangeBasic: FC = () => <FormWrap RefComponent={InputRangeVariants} />;
6
+ export const InputRangeBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>
10
+ KolInputRange renders a pair of range- and number fields wich are synchronized with each other. The sample shows KolInputRange in a form context with
11
+ all variations and states.
12
+ </p>
13
+ </SampleDescription>
14
+ <FormWrap RefComponent={InputRangeVariants} />
15
+ </>
16
+ );
@@ -1,5 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { FormWrap } from '../FormWrap';
3
3
  import { InputTextVariants } from './partials/variants';
4
+ import { SampleDescription } from '../SampleDescription';
4
5
 
5
- export const InputTextBasic: FC = () => <FormWrap RefComponent={InputTextVariants} />;
6
+ export const InputTextBasic: FC = () => (
7
+ <>
8
+ <SampleDescription>
9
+ <p>KolInputText renders a text input field. The sample shows KolInputText in a form context with all variations and states.</p>
10
+ </SampleDescription>
11
+ <FormWrap RefComponent={InputTextVariants} />
12
+ </>
13
+ );
@@ -2,6 +2,7 @@ import React, { useLayoutEffect, useRef } from 'react';
2
2
  import { KolButton, KolForm, KolInputText } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const InputTextFocus: FC = () => {
7
8
  const ref = useRef<HTMLKolInputTextElement | null>(null);
@@ -13,14 +14,19 @@ export const InputTextFocus: FC = () => {
13
14
  }, [ref]);
14
15
 
15
16
  return (
16
- <KolForm>
17
- <div className="grid gap-4">
18
- <KolInputText ref={ref} _label="Vorname" />
19
- <KolInputText _label="Nachname" />
20
- <div>
21
- <KolButton _label="Submit"></KolButton>
17
+ <>
18
+ <SampleDescription>
19
+ <p>This sample shows a KolInputText component that automatically receives focus.</p>
20
+ </SampleDescription>
21
+ <KolForm>
22
+ <div className="grid gap-4">
23
+ <KolInputText ref={ref} _label="Vorname" />
24
+ <KolInputText _label="Nachname" />
25
+ <div>
26
+ <KolButton _label="Submit"></KolButton>
27
+ </div>
22
28
  </div>
23
- </div>
24
- </KolForm>
29
+ </KolForm>
30
+ </>
25
31
  );
26
32
  };
@@ -6,7 +6,10 @@ import { SampleDescription } from '../SampleDescription';
6
6
  export const InputTextHideErrors: FC = () => (
7
7
  <div className="grid gap-4">
8
8
  <SampleDescription>
9
- This case shows the <code>_hideError</code> feature in the se. You can use the <code>_error</code> prop to show an error message.
9
+ <p>
10
+ This sample shows the <code>_hideError</code> feature for KolInputText. It allows to hide the error message from an input field and can be used, when
11
+ the error is already shown somewhere else, e.g. for a group of inputs.
12
+ </p>
10
13
  </SampleDescription>
11
14
  <KolCard _label="Normal input field with error" _level={0}>
12
15
  <KolInputText _error="Error message" _label="Input with error" _touched />
@@ -1,14 +1,12 @@
1
1
  import { Routes } from '../../shares/types';
2
2
 
3
3
  import { InputTextBasic } from './basic';
4
- import { InputTextBlur } from './blur';
5
4
  import { InputTextHideErrors } from './hide-errors';
6
5
  import { InputTextFocus } from './focus';
7
6
 
8
7
  export const INPUT_TEXT_ROUTES: Routes = {
9
8
  'input-text': {
10
9
  basic: InputTextBasic,
11
- blur: InputTextBlur,
12
10
  focus: InputTextFocus,
13
11
  'hide-errors': InputTextHideErrors,
14
12
  },
@@ -1,8 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { KolHeading, KolKolibri } from '@public-ui/react';
3
+ import { SampleDescription } from '../SampleDescription';
3
4
 
4
5
  export const KolibriBasic: FC = () => (
5
6
  <>
7
+ <SampleDescription>
8
+ <p>KolKolibri renders the KoliBri logo. The sample show the logo with and without label and with a custom color.</p>
9
+ </SampleDescription>
10
+
6
11
  <KolHeading class="block" _level={3} _label="Regular" />
7
12
  <KolKolibri class="block" style={{ width: 300 }} />
8
13
  <KolHeading class="block" _level={3} _label="Ohne Label" />
@@ -2,23 +2,31 @@ import React from 'react';
2
2
  import { KolLink } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const LinkBasic: FC = () => (
7
- <div className="grid gap-4">
8
- <KolLink _href="#/back-page" _label="Simple Link" />
9
- <p>
10
- In diesem Absatz wird ein Link gesetzt, der keine weiteren Attribute enthält. <KolLink _href="#/back-page" _label="Simple Link" /> Er wird standardmäßig
11
- als <strong>inline-Element</strong> ausgegeben.
12
- </p>
13
- <p>
14
- In diesem Absatz wird ein Link gesetzt, der einmal als inline-block-Element ausgegeben wird.{' '}
15
- <KolLink class="d-inline-block" _href="#/back-page" _label="Simple Link" />. Damit kann man mir per CSS-Styles eine Breite, eine Höhe und andere
16
- Eigenschaften zuweisen.
17
- <br />
18
- <br />
19
- Danach folgt ein Link, der als block-Element ausgegeben wird.
20
- <KolLink class="d-block" _href="#/back-page" _label="Simple Link" />, daher gehe ich über die ganze Breite des Eltern-Elements erzeuge so einen
21
- Zeilenumbruch.
22
- </p>
23
- </div>
8
+ <>
9
+ <SampleDescription>
10
+ <p>
11
+ KolLink renders a link. This sample shows disabled links, links with hidden label and links with different CSS <code>display</code>-properties.
12
+ </p>
13
+ </SampleDescription>
14
+ <div className="grid gap-4">
15
+ <KolLink _href="#/back-page" _label="Simple Link" />
16
+ <p>
17
+ In diesem Absatz wird ein Link gesetzt, der keine weiteren Attribute enthält. <KolLink _href="#/back-page" _label="Simple Link" /> Er wird standardmäßig
18
+ als <strong>inline-Element</strong> ausgegeben.
19
+ </p>
20
+ <p>
21
+ In diesem Absatz wird ein Link gesetzt, der einmal als inline-block-Element ausgegeben wird.{' '}
22
+ <KolLink class="d-inline-block" _href="#/back-page" _label="Simple Link" />. Damit kann man mir per CSS-Styles eine Breite, eine Höhe und andere
23
+ Eigenschaften zuweisen.
24
+ <br />
25
+ <br />
26
+ Danach folgt ein Link, der als block-Element ausgegeben wird.
27
+ <KolLink class="d-block" _href="#/back-page" _label="Simple Link" />, daher gehe ich über die ganze Breite des Eltern-Elements erzeuge so einen
28
+ Zeilenumbruch.
29
+ </p>
30
+ </div>
31
+ </>
24
32
  );
@@ -2,40 +2,46 @@ import React from 'react';
2
2
  import { KolLink } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const LinkIcons: FC = () => (
7
- <div className="grid gap-4">
8
- <KolLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" _href="#/back-page" />
9
- <KolLink
10
- _icons={{
11
- right: 'codicon codicon-home',
12
- }}
13
- _label="Ich bin ein Link mit Icon rechts"
14
- _href="#/back-page"
15
- />
16
- <KolLink
17
- _icons={{
18
- top: 'codicon codicon-home',
19
- }}
20
- _label="Ich bin ein Link mit Icon oben"
21
- _href="#/back-page"
22
- />
23
- <KolLink
24
- _icons={{
25
- bottom: 'codicon codicon-home',
26
- }}
27
- _label="Ich bin ein Link mit Icon unten"
28
- _href="#/back-page"
29
- />
30
- <KolLink
31
- _icons={{
32
- top: 'codicon codicon-home',
33
- right: 'codicon codicon-home',
34
- bottom: 'codicon codicon-home',
35
- left: 'codicon codicon-home',
36
- }}
37
- _label="Ich bin ein Link mit allen Icons"
38
- _href="#/back-page"
39
- />
40
- </div>
8
+ <>
9
+ <SampleDescription>
10
+ <p>This sample shows KolLink with icons in different alignments and combinations.</p>
11
+ </SampleDescription>
12
+ <div className="grid gap-4">
13
+ <KolLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" _href="#/back-page" />
14
+ <KolLink
15
+ _icons={{
16
+ right: 'codicon codicon-home',
17
+ }}
18
+ _label="Ich bin ein Link mit Icon rechts"
19
+ _href="#/back-page"
20
+ />
21
+ <KolLink
22
+ _icons={{
23
+ top: 'codicon codicon-home',
24
+ }}
25
+ _label="Ich bin ein Link mit Icon oben"
26
+ _href="#/back-page"
27
+ />
28
+ <KolLink
29
+ _icons={{
30
+ bottom: 'codicon codicon-home',
31
+ }}
32
+ _label="Ich bin ein Link mit Icon unten"
33
+ _href="#/back-page"
34
+ />
35
+ <KolLink
36
+ _icons={{
37
+ top: 'codicon codicon-home',
38
+ right: 'codicon codicon-home',
39
+ bottom: 'codicon codicon-home',
40
+ left: 'codicon codicon-home',
41
+ }}
42
+ _label="Ich bin ein Link mit allen Icons"
43
+ _href="#/back-page"
44
+ />
45
+ </div>
46
+ </>
41
47
  );
@@ -2,18 +2,24 @@ import React from 'react';
2
2
  import { KolKolibri, KolLink } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const LinkImage: FC = () => (
7
- <div className="grid gap-4">
8
- <KolLink _href="#/back-page" _label="Ich bin ein Link, der als Text gerendert wird" />
9
- <br />
10
- <KolLink _href="#/back-page" _label="">
11
- <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
12
- <KolKolibri style={{ width: '300px' }}></KolKolibri>
13
- </KolLink>
14
- <br />
15
- <KolLink _href="#/back-page" _label="">
16
- <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
17
- </KolLink>
18
- </div>
8
+ <>
9
+ <SampleDescription>
10
+ <p>KolLink can be used with slot-content instead of a label as well. This sample demonstrates the slot content used to display an image.</p>
11
+ </SampleDescription>
12
+ <div className="grid gap-4">
13
+ <KolLink _href="#/back-page" _label="Ich bin ein Link, der als Text gerendert wird" />
14
+ <br />
15
+ <KolLink _href="#/back-page" _label="">
16
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
17
+ <KolKolibri style={{ width: '300px' }}></KolKolibri>
18
+ </KolLink>
19
+ <br />
20
+ <KolLink _href="#/back-page" _label="">
21
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
22
+ </KolLink>
23
+ </div>
24
+ </>
19
25
  );
@@ -2,14 +2,22 @@ import React from 'react';
2
2
  import { KolLink } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const LinkTarget: FC = () => (
7
- <div className="d-flex gap-4">
8
- <KolLink _href="#/back-page" _label="Ich bin ein Link ohne Target" />{' '}
9
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
10
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />{' '}
11
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link ohne Target" />{' '}
12
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
13
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />
14
- </div>
8
+ <>
9
+ <SampleDescription>
10
+ <p>
11
+ This sample shows KolLink with different <code>_target</code>-properties.
12
+ </p>
13
+ </SampleDescription>
14
+ <div className="d-flex gap-4">
15
+ <KolLink _href="#/back-page" _label="Ich bin ein Link ohne Target" />{' '}
16
+ <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
17
+ <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />{' '}
18
+ <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link ohne Target" />{' '}
19
+ <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
20
+ <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />
21
+ </div>
22
+ </>
15
23
  );
@@ -2,19 +2,25 @@ import React from 'react';
2
2
  import { KolLinkButton } from '@public-ui/react';
3
3
 
4
4
  import { FC } from 'react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  const ARGS = {
7
8
  _href: '#/back-page',
8
9
  };
9
10
 
10
11
  export const LinkButtonBasic: FC = () => (
11
- <div className="grid gap-14">
12
- <div className="flex flex-warp gap-14">
13
- <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
14
- <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
15
- <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
16
- <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
17
- <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
12
+ <>
13
+ <SampleDescription>
14
+ <p>KolLinkButton renders a link that looks like a button. The sample shows the different styling variants.</p>
15
+ </SampleDescription>
16
+ <div className="grid gap-14">
17
+ <div className="flex flex-warp gap-14">
18
+ <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
19
+ <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
20
+ <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
21
+ <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
22
+ <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
23
+ </div>
18
24
  </div>
19
- </div>
25
+ </>
20
26
  );
@@ -1,9 +1,20 @@
1
1
  import React, { FC } from 'react';
2
- import { KolLinkGroup } from '@public-ui/react';
2
+ import { KolBadge, KolLinkGroup } from '@public-ui/react';
3
+ import { SampleDescription } from '../SampleDescription';
3
4
 
4
5
  const links = [
5
6
  { _label: 'Link 1', _href: '#/back-page' },
6
7
  { _label: 'Link 2', _href: '#/back-page' },
7
8
  { _label: 'Link 3', _href: '#/back-page' },
8
9
  ];
9
- export const LinkGroupBasic: FC = () => <KolLinkGroup _links={links} />;
10
+ export const LinkGroupBasic: FC = () => (
11
+ <>
12
+ <SampleDescription>
13
+ <p>KolLinkGroup renders a list of the given links.</p>
14
+ <p>
15
+ <KolBadge _label="The component is deprecated and won't be available anymore in KoliBri version 3." _color="#db5461" />
16
+ </p>
17
+ </SampleDescription>
18
+ <KolLinkGroup _links={links} />
19
+ </>
20
+ );