@public-ui/sample-react 4.3.1-rc.1 → 4.3.1-rc.4

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 (169) hide show
  1. package/package.json +10 -10
  2. package/src/App.tsx +2 -0
  3. package/src/components/InputEventValueDemo.tsx +6 -3
  4. package/src/components/SampleBlock.tsx +81 -0
  5. package/src/components/SampleGroup.tsx +27 -0
  6. package/src/components/abbr/basic.tsx +6 -3
  7. package/src/components/accordion/basic.tsx +3 -2
  8. package/src/components/accordion/headlines.tsx +3 -2
  9. package/src/components/alert/basic.tsx +17 -14
  10. package/src/components/avatar/basic.tsx +3 -2
  11. package/src/components/avatar/size.tsx +3 -2
  12. package/src/components/badge/basic.tsx +48 -7
  13. package/src/components/badge/routes.ts +0 -4
  14. package/src/components/breadcrumb/basic.tsx +3 -2
  15. package/src/components/button/access-key.tsx +8 -10
  16. package/src/components/button/aria-description.tsx +4 -4
  17. package/src/components/button/baselined.tsx +4 -4
  18. package/src/components/button/basic.tsx +10 -17
  19. package/src/components/button/disabled.tsx +6 -7
  20. package/src/components/button/expert-slot.tsx +6 -7
  21. package/src/components/button/focus-options.tsx +8 -10
  22. package/src/components/button/hide-label.tsx +8 -10
  23. package/src/components/button/icons.tsx +12 -16
  24. package/src/components/button/row-reverse-tooltip.tsx +4 -4
  25. package/src/components/button/short-key.tsx +15 -20
  26. package/src/components/button/spinner.tsx +6 -7
  27. package/src/components/button/variants.tsx +6 -6
  28. package/src/components/button/width.tsx +6 -7
  29. package/src/components/button-link/aria-description.tsx +3 -2
  30. package/src/components/button-link/basic.tsx +37 -35
  31. package/src/components/button-link/icons.tsx +13 -2
  32. package/src/components/button-link/image.tsx +3 -2
  33. package/src/components/card/basic.tsx +3 -2
  34. package/src/components/card/headlines.tsx +3 -2
  35. package/src/components/card/linked.tsx +3 -2
  36. package/src/components/combobox/partials/cases.tsx +40 -14
  37. package/src/components/combobox/partials/variants.tsx +7 -8
  38. package/src/components/details/basic.tsx +3 -2
  39. package/src/components/form/basic.tsx +5 -4
  40. package/src/components/form/error-list-scroll.tsx +87 -0
  41. package/src/components/form/error-list.tsx +56 -56
  42. package/src/components/form/routes.ts +2 -0
  43. package/src/components/heading/badged.tsx +3 -2
  44. package/src/components/heading/basic.tsx +3 -2
  45. package/src/components/heading/paragraph.tsx +3 -2
  46. package/src/components/heading/secondary.tsx +3 -2
  47. package/src/components/icon/all-kolicons.tsx +1 -1
  48. package/src/components/icon/basic.tsx +6 -6
  49. package/src/components/icon/font.tsx +21 -13
  50. package/src/components/image/basic.tsx +8 -5
  51. package/src/components/input-checkbox/partials/cases.tsx +75 -14
  52. package/src/components/input-checkbox/partials/variants.tsx +13 -16
  53. package/src/components/input-color/partials/cases.tsx +61 -18
  54. package/src/components/input-color/partials/variants.tsx +7 -8
  55. package/src/components/input-date/partials/cases.tsx +70 -26
  56. package/src/components/input-date/partials/minMax.tsx +38 -11
  57. package/src/components/input-date/partials/variants.tsx +10 -12
  58. package/src/components/input-email/partials/cases.tsx +69 -30
  59. package/src/components/input-email/partials/variants.tsx +7 -8
  60. package/src/components/input-file/partials/cases.tsx +58 -24
  61. package/src/components/input-file/partials/variants.tsx +7 -8
  62. package/src/components/input-number/number-formatter.tsx +5 -4
  63. package/src/components/input-number/partials/cases.tsx +68 -28
  64. package/src/components/input-number/partials/variants.tsx +7 -8
  65. package/src/components/input-password/partials/cases.tsx +67 -30
  66. package/src/components/input-password/partials/variants.tsx +7 -8
  67. package/src/components/input-password/show-password.tsx +22 -19
  68. package/src/components/input-radio/horizontal.tsx +3 -2
  69. package/src/components/input-radio/objectValue.tsx +5 -4
  70. package/src/components/input-radio/partials/cases.tsx +85 -55
  71. package/src/components/input-radio/partials/variants.tsx +7 -9
  72. package/src/components/input-range/partials/cases.tsx +60 -23
  73. package/src/components/input-range/partials/variants.tsx +7 -8
  74. package/src/components/input-text/access-short-key.tsx +11 -4
  75. package/src/components/input-text/aria-details.tsx +3 -2
  76. package/src/components/input-text/background-test.tsx +7 -5
  77. package/src/components/input-text/basic.tsx +24 -5
  78. package/src/components/input-text/clear-button.tsx +26 -0
  79. package/src/components/input-text/counter.tsx +3 -2
  80. package/src/components/input-text/disabled.tsx +11 -4
  81. package/src/components/input-text/expert-slot.tsx +13 -8
  82. package/src/components/input-text/hide-label.tsx +7 -6
  83. package/src/components/input-text/hide-msg.tsx +5 -4
  84. package/src/components/input-text/message-types.tsx +13 -4
  85. package/src/components/input-text/msg-and-counter.tsx +9 -4
  86. package/src/components/input-text/pattern.tsx +18 -15
  87. package/src/components/input-text/placeholder.tsx +13 -4
  88. package/src/components/input-text/readonly.tsx +11 -4
  89. package/src/components/input-text/routes.ts +2 -0
  90. package/src/components/input-text/select-range.tsx +3 -2
  91. package/src/components/input-text/smart-button.tsx +7 -4
  92. package/src/components/input-text/text-formatter.tsx +5 -4
  93. package/src/components/input-text/variant.tsx +8 -6
  94. package/src/components/kolibri/basic.tsx +9 -6
  95. package/src/components/link/basic.tsx +3 -2
  96. package/src/components/link/icons.tsx +3 -2
  97. package/src/components/link/image.tsx +3 -2
  98. package/src/components/link/target.tsx +3 -2
  99. package/src/components/link/variant.tsx +5 -4
  100. package/src/components/link-button/aria-description.tsx +7 -1
  101. package/src/components/link-button/basic.tsx +5 -4
  102. package/src/components/link-button/routes.ts +2 -0
  103. package/src/components/link-button/target.tsx +19 -0
  104. package/src/components/meter/basic.tsx +4 -4
  105. package/src/components/meter/dynamic.tsx +4 -4
  106. package/src/components/meter/optimum.tsx +8 -10
  107. package/src/components/meter/orientation.tsx +6 -7
  108. package/src/components/nav/aria-current.tsx +18 -15
  109. package/src/components/nav/basic.tsx +8 -10
  110. package/src/components/pagination/basic.tsx +3 -2
  111. package/src/components/pagination/button-visibility.tsx +16 -11
  112. package/src/components/pagination/sibling-boundary.tsx +3 -2
  113. package/src/components/popover-button/inline.tsx +4 -5
  114. package/src/components/progress/basic.tsx +7 -6
  115. package/src/components/quote/basic.tsx +4 -1
  116. package/src/components/quote/block.tsx +9 -6
  117. package/src/components/select/partials/cases.tsx +73 -33
  118. package/src/components/select/partials/variants.tsx +7 -8
  119. package/src/components/single-select/partials/cases.tsx +148 -114
  120. package/src/components/single-select/partials/variants.tsx +7 -8
  121. package/src/components/spin/basic.tsx +34 -3
  122. package/src/components/spin/routes.ts +0 -8
  123. package/src/components/split-button/basic.tsx +3 -2
  124. package/src/components/table/action-columns.tsx +3 -2
  125. package/src/components/table/column-alignment.tsx +3 -2
  126. package/src/components/table/complex-headers.tsx +3 -2
  127. package/src/components/table/empty.tsx +31 -0
  128. package/src/components/table/horizontal-scrollbar.tsx +24 -19
  129. package/src/components/table/multi-sort.tsx +6 -7
  130. package/src/components/table/non-hidable-columns.tsx +18 -15
  131. package/src/components/table/pagination-position.tsx +8 -10
  132. package/src/components/table/routes.ts +4 -0
  133. package/src/components/table/sort-data.tsx +6 -7
  134. package/src/components/table/stateful-async.tsx +50 -0
  135. package/src/components/table/stateful-with-selection.tsx +3 -2
  136. package/src/components/table/stateful-with-single-selection.tsx +3 -2
  137. package/src/components/table/stateless-async-paging.tsx +9 -32
  138. package/src/components/table/stateless-with-selection.tsx +3 -2
  139. package/src/components/table/stateless-with-single-selection.tsx +3 -2
  140. package/src/components/table/stateless.tsx +3 -2
  141. package/src/components/table/sticky-col.tsx +12 -10
  142. package/src/components/table/sticky-header.tsx +12 -10
  143. package/src/components/table/variant.tsx +5 -4
  144. package/src/components/table/with-footer.tsx +73 -70
  145. package/src/components/table/with-pagination.tsx +3 -2
  146. package/src/components/tabs/basic.tsx +17 -12
  147. package/src/components/tabs/create-button.tsx +11 -8
  148. package/src/components/tabs/icons-only.tsx +9 -6
  149. package/src/components/textarea/adjust-height.tsx +6 -3
  150. package/src/components/textarea/partials/cases.tsx +63 -15
  151. package/src/components/textarea/partials/variants.tsx +7 -8
  152. package/src/components/textarea/resize.tsx +3 -2
  153. package/src/components/textarea/rows.tsx +6 -3
  154. package/src/components/textarea/with-counter.tsx +3 -2
  155. package/src/components/toolbar/basic.tsx +6 -5
  156. package/src/components/toolbar/disabled.tsx +41 -38
  157. package/src/components/tree/basic.tsx +32 -29
  158. package/src/components/version/basic.tsx +4 -1
  159. package/src/components/version/context.tsx +8 -5
  160. package/src/hooks/useVisualBlockOutline.ts +38 -0
  161. package/src/scenarios/button-shortkey-table.tsx +4 -4
  162. package/src/shares/store.ts +0 -4
  163. package/src/shares/visualBlockOutline.ts +75 -0
  164. package/src/components/badge/button.tsx +0 -35
  165. package/src/components/badge/formatted-label.tsx +0 -19
  166. package/src/components/spin/custom.tsx +0 -23
  167. package/src/components/spin/cycle.tsx +0 -16
  168. package/src/components/spin/label.tsx +0 -23
  169. package/src/components/spin/variables.tsx +0 -16
@@ -3,6 +3,7 @@ import React from 'react';
3
3
 
4
4
  import { KolHeading, KolKolibri } from '@public-ui/react-v19';
5
5
 
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const KolibriBasic: FC = () => (
@@ -11,11 +12,13 @@ export const KolibriBasic: FC = () => (
11
12
  <p>KolKolibri renders the KoliBri logo. The sample show the logo with and without label and with a custom color.</p>
12
13
  </SampleDescription>
13
14
 
14
- <KolHeading class="block" _level={3} _label="Regular" />
15
- <KolKolibri class="block" style={{ width: 300 }} />
16
- <KolHeading class="block" _level={3} _label="Without Label" />
17
- <KolKolibri class="block" style={{ width: 300 }} _labeled={false} />
18
- <KolHeading class="block" _level={3} _label="Customized color" />
19
- <KolKolibri class="block" style={{ width: 300 }} _color="#cc006e" />
15
+ <SampleBlock id="basic">
16
+ <KolHeading class="block" _level={3} _label="Regular" />
17
+ <KolKolibri class="block" style={{ width: 300 }} />
18
+ <KolHeading class="block" _level={3} _label="Without Label" />
19
+ <KolKolibri class="block" style={{ width: 300 }} _labeled={false} />
20
+ <KolHeading class="block" _level={3} _label="Customized color" />
21
+ <KolKolibri class="block" style={{ width: 300 }} _color="#cc006e" />
22
+ </SampleBlock>
20
23
  </>
21
24
  );
@@ -2,6 +2,7 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { KolLink } from '@public-ui/react-v19';
5
+ import { SampleBlock } from '../SampleBlock';
5
6
  import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const LinkBasic: FC = () => (
@@ -13,7 +14,7 @@ export const LinkBasic: FC = () => (
13
14
  </p>
14
15
  </SampleDescription>
15
16
 
16
- <div className="grid gap-4">
17
+ <SampleBlock id="basic">
17
18
  <KolLink _href="#/back-page" _inline={false} _label="Simple Link" />
18
19
  <KolLink _disabled _href="#/back-page" _inline={false} _label="Simple Link (disabled)" />
19
20
  <KolLink _hideLabel _icons="kolicon-house" _href="#/back-page" _inline={false} _label="Icon Link" />
@@ -32,6 +33,6 @@ export const LinkBasic: FC = () => (
32
33
  the entire width of the parent element, causing a line break.
33
34
  </p>
34
35
  <KolLink _href="#/back-page" _inline={false} _label="Special Variant Link" _variant="theme-link" />
35
- </div>
36
+ </SampleBlock>
36
37
  </>
37
38
  );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolLink } from '@public-ui/react-v19';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const LinkIcons: FC = () => (
@@ -11,7 +12,7 @@ export const LinkIcons: FC = () => (
11
12
  <p>This sample shows KolLink with icons in different alignments and combinations.</p>
12
13
  </SampleDescription>
13
14
 
14
- <div className="grid gap-4">
15
+ <SampleBlock id="icons">
15
16
  <KolLink _icons="kolicon-house" _label="I am a link with an icon on the left" _href="#/back-page" />
16
17
  <KolLink
17
18
  _icons={{
@@ -81,6 +82,6 @@ export const LinkIcons: FC = () => (
81
82
  left: 'kolicon-house',
82
83
  }}
83
84
  />
84
- </div>
85
+ </SampleBlock>
85
86
  </>
86
87
  );
@@ -2,6 +2,7 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { KolImage, KolLink } from '@public-ui/react-v19';
5
+ import { SampleBlock } from '../SampleBlock';
5
6
  import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const LinkImage: FC = () => (
@@ -10,7 +11,7 @@ export const LinkImage: FC = () => (
10
11
  <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
12
  </SampleDescription>
12
13
 
13
- <div className="grid gap-4">
14
+ <SampleBlock id="image">
14
15
  <KolLink _href="#/back-page" _label="I am a link that is rendered as text" />
15
16
  <KolLink _href="#/back-page" _label="">
16
17
  <KolImage
@@ -20,6 +21,6 @@ export const LinkImage: FC = () => (
20
21
  slot="expert"
21
22
  />
22
23
  </KolLink>
23
- </div>
24
+ </SampleBlock>
24
25
  </>
25
26
  );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolLink } from '@public-ui/react-v19';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const LinkTarget: FC = () => (
@@ -13,7 +14,7 @@ export const LinkTarget: FC = () => (
13
14
  </p>
14
15
  </SampleDescription>
15
16
 
16
- <div className="text-base d-flex gap-4">
17
+ <SampleBlock id="target" className="text-base d-flex gap-4">
17
18
  <ul>
18
19
  <li>
19
20
  <KolLink _href="#/back-page" _label="Link without target" />
@@ -34,6 +35,6 @@ export const LinkTarget: FC = () => (
34
35
  <KolLink _href="#/back-page" _icons="kolicon-house" _hideLabel _label="Link with target (_blank)" _target="_blank" />
35
36
  </li>
36
37
  </ul>
37
- </div>
38
+ </SampleBlock>
38
39
  </>
39
40
  );
@@ -3,14 +3,15 @@ import { useSearchParams } from 'react-router';
3
3
 
4
4
  import { KolLink } from '@public-ui/react-v19';
5
5
  import { fetchVariantData } from '../../shares/fetchVariantData';
6
- import { getCustomThemes } from '../../shares/store';
6
+ import { getTheme } from '../../shares/store';
7
+ import { SampleBlock } from '../SampleBlock';
7
8
  import { SampleDescription } from '../SampleDescription';
8
9
 
9
10
  import type { FC } from 'react';
10
11
 
11
12
  export const LinkVariant: FC = () => {
12
13
  const [searchParams] = useSearchParams();
13
- const theme = searchParams.get('theme') ?? getCustomThemes()?.[0]?.key;
14
+ const theme = searchParams.get('theme') ?? getTheme();
14
15
  const data = useMemo(() => (theme ? fetchVariantData(theme, 'linkVariants') : []), [theme]);
15
16
 
16
17
  return (
@@ -19,7 +20,7 @@ export const LinkVariant: FC = () => {
19
20
  <p>This sample shows the theme specific variants of KolLink.</p>
20
21
  </SampleDescription>
21
22
 
22
- <div className="grid gap-4">
23
+ <SampleBlock id="variants">
23
24
  <KolLink _href="#/back-page" _label="Normal link without a variant" />
24
25
  {!Array.isArray(data) || data.length === 0 ? (
25
26
  <p>This theme has no variants for this component.</p>
@@ -28,7 +29,7 @@ export const LinkVariant: FC = () => {
28
29
  return <KolLink _href="#/back-page" _label={`Theme exclusive variant: ${element}`} _variant={element} key={element} />;
29
30
  })
30
31
  )}
31
- </div>
32
+ </SampleBlock>
32
33
  </>
33
34
  );
34
35
  };
@@ -11,7 +11,13 @@ export const LinkButtonAriaDescription: FC = () => (
11
11
 
12
12
  <div className="flex flex-wrap gap-2">
13
13
  <KolLinkButton _href="#/back-page" _label="Link Button Text without area description"></KolLinkButton>
14
- <KolLinkButton _href="#/back-page" _label="Link Button Text" _ariaDescription="Link Button Area Description"></KolLinkButton>
14
+ <KolLinkButton _href="#/back-page" _label="Link Button Text" _ariaDescription="Link Button Aria Description"></KolLinkButton>
15
+ <KolLinkButton
16
+ _href="#/back-page"
17
+ _label="Link Button Text"
18
+ _ariaDescription="Link Button Aria Description with external Link"
19
+ _target="_blank"
20
+ ></KolLinkButton>
15
21
  </div>
16
22
  </>
17
23
  );
@@ -6,12 +6,13 @@ import type { FC } from 'react';
6
6
  import { useSearchParams } from 'react-router';
7
7
  import { useToasterService } from '../../hooks/useToasterService';
8
8
  import { fetchVariantData } from '../../shares/fetchVariantData';
9
- import { getCustomThemes } from '../../shares/store';
9
+ import { getTheme } from '../../shares/store';
10
+ import { SampleBlock } from '../SampleBlock';
10
11
  import { SampleDescription } from '../SampleDescription';
11
12
 
12
13
  export const LinkButtonBasic: FC = () => {
13
14
  const [searchParams] = useSearchParams();
14
- const theme = searchParams.get('theme') ?? getCustomThemes()?.[0]?.key;
15
+ const theme = searchParams.get('theme') ?? getTheme();
15
16
  const data = useMemo(() => (theme ? fetchVariantData(theme, 'buttonVariants') : []), [theme]);
16
17
 
17
18
  const { dummyClickEventHandler } = useToasterService();
@@ -26,7 +27,7 @@ export const LinkButtonBasic: FC = () => {
26
27
  </SampleDescription>
27
28
 
28
29
  <div className="grid gap-8">
29
- <section className="grid gap-4">
30
+ <SampleBlock id="variants">
30
31
  <div className="flex flex-wrap gap-4 items-center">
31
32
  {!Array.isArray(data) || data.length === 0 ? (
32
33
  <p>This theme has no variants for this component.</p>
@@ -57,7 +58,7 @@ export const LinkButtonBasic: FC = () => {
57
58
  })
58
59
  )}
59
60
  </div>
60
- </section>
61
+ </SampleBlock>
61
62
  </div>
62
63
  </>
63
64
  );
@@ -1,10 +1,12 @@
1
1
  import type { Routes } from '../../shares/types';
2
2
  import { LinkButtonAriaDescription } from './aria-description';
3
3
  import { LinkButtonBasic } from './basic';
4
+ import { LinkButtonTarget } from './target';
4
5
 
5
6
  export const LINK_BUTTON_ROUTES: Routes = {
6
7
  'link-button': {
7
8
  basic: LinkButtonBasic,
8
9
  'aria-description': LinkButtonAriaDescription,
10
+ target: LinkButtonTarget,
9
11
  },
10
12
  };
@@ -0,0 +1,19 @@
1
+ import { KolLinkButton } from '@public-ui/react-v19';
2
+ import type { FC } from 'react';
3
+ import React from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
5
+ import { SampleDescription } from '../SampleDescription';
6
+
7
+ export const LinkButtonTarget: FC = () => (
8
+ <>
9
+ <SampleDescription>
10
+ <p>This sample shows KolLinkButton with diffrent Targets</p>
11
+ </SampleDescription>
12
+
13
+ <SampleBlock id="target" className="flex flex-wrap gap-2">
14
+ <KolLinkButton _href="#/back-page" _label="Link Button Target default"></KolLinkButton>
15
+ <KolLinkButton _href="#/back-page" _label="Link Button Target _self" _target="_blank"></KolLinkButton>
16
+ <KolLinkButton _href="#/back-page" _label="Link Button Target _blank" _target="_blank"></KolLinkButton>
17
+ </SampleBlock>
18
+ </>
19
+ );
@@ -1,6 +1,7 @@
1
- import { KolHeading, KolMeter } from '@public-ui/react-v19';
1
+ import { KolMeter } from '@public-ui/react-v19';
2
2
  import type { FC } from 'react';
3
3
  import React from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const MeterBasic: FC = () => (
@@ -10,14 +11,13 @@ export const MeterBasic: FC = () => (
10
11
  </SampleDescription>
11
12
 
12
13
  <div className="grid gap-8">
13
- <section className="grid gap-4">
14
- <KolHeading _level={2} _label="Basic" />
14
+ <SampleBlock id="basic" heading="Basic">
15
15
  <div className="flex flex-col gap-4">
16
16
  <KolMeter _label="Storage used" _value={0.5} />
17
17
  <KolMeter _label="Weight" _max={100} _value={75} _unit="kg" />
18
18
  <KolMeter _label="Temperature" _min={-100} _max={100} _value={-50} _unit="°C" />
19
19
  </div>
20
- </section>
20
+ </SampleBlock>
21
21
  </div>
22
22
  </>
23
23
  );
@@ -1,6 +1,7 @@
1
- import { KolButton, KolHeading, KolMeter } from '@public-ui/react-v19';
1
+ import { KolButton, KolMeter } from '@public-ui/react-v19';
2
2
  import type { FC } from 'react';
3
3
  import React, { useState } from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const MeterDynamic: FC = () => {
@@ -13,8 +14,7 @@ export const MeterDynamic: FC = () => {
13
14
  </SampleDescription>
14
15
 
15
16
  <div className="grid gap-8">
16
- <section className="grid gap-4">
17
- <KolHeading _level={2} _label="Dynamic value" />
17
+ <SampleBlock id="dynamic-value" heading="Dynamic value">
18
18
  <KolMeter _label="Used hard disk space" _max={500} _min={0} _unit="GB" _value={usedStorage} />
19
19
  <div className="flex gap-4">
20
20
  <KolButton _label="120 GB" _on={{ onClick: () => setUsedStorage(120) }} _variant="secondary" />
@@ -22,7 +22,7 @@ export const MeterDynamic: FC = () => {
22
22
  <KolButton _label="360 GB" _on={{ onClick: () => setUsedStorage(360) }} _variant="secondary" />
23
23
  <KolButton _label="480 GB" _on={{ onClick: () => setUsedStorage(480) }} _variant="secondary" />
24
24
  </div>
25
- </section>
25
+ </SampleBlock>
26
26
  </div>
27
27
  </>
28
28
  );
@@ -1,6 +1,7 @@
1
- import { KolHeading, KolMeter } from '@public-ui/react-v19';
1
+ import { KolMeter } from '@public-ui/react-v19';
2
2
  import type { FC } from 'react';
3
3
  import React from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const MeterOptimum: FC = () => (
@@ -13,32 +14,29 @@ export const MeterOptimum: FC = () => (
13
14
  </SampleDescription>
14
15
 
15
16
  <div className="grid gap-8">
16
- <section className="grid gap-4">
17
- <KolHeading _level={2} _label="Optimum in medium zone (good = medium)" />
17
+ <SampleBlock id="optimum-medium-zone-good" heading="Optimum in medium zone (good = medium)">
18
18
  <div className="flex flex-col gap-4">
19
19
  <KolMeter _label="Temperature is nice" _min={-20} _max={60} _low={10} _high={30} _optimum={20} _value={20} _unit="°C" />
20
20
  <KolMeter _label="It's too cold" _min={-20} _max={60} _low={10} _high={30} _optimum={20} _value={-10} _unit="°C" />
21
21
  <KolMeter _label="It's too hot" _min={-20} _max={60} _low={10} _high={30} _optimum={20} _value={50} _unit="°C" />
22
22
  </div>
23
- </section>
23
+ </SampleBlock>
24
24
 
25
- <section className="grid gap-4">
26
- <KolHeading _level={2} _label="Optimum in low zone (good = low)" />
25
+ <SampleBlock id="optimum-low-zone-good-low" heading="Optimum in low zone (good = low)">
27
26
  <div className="flex flex-col gap-4">
28
27
  <KolMeter _label="Memory Usage" _max={100} _value={10} _low={25} _high={75} _optimum={10} />
29
28
  <KolMeter _label="Memory Usage" _max={100} _value={50} _low={25} _high={75} _optimum={10} />
30
29
  <KolMeter _label="Memory Usage" _max={100} _value={90} _low={25} _high={75} _optimum={10} />
31
30
  </div>
32
- </section>
31
+ </SampleBlock>
33
32
 
34
- <section className="grid gap-4">
35
- <KolHeading _level={2} _label="Optimum in high zone (good = high)" />
33
+ <SampleBlock id="optimum-high-zone-good-high" heading="Optimum in high zone (good = high)">
36
34
  <div className="flex flex-col gap-4">
37
35
  <KolMeter _label="Battery level" _max={100} _value={10} _low={25} _high={75} _optimum={90} />
38
36
  <KolMeter _label="Battery level" _max={100} _value={50} _low={25} _high={75} _optimum={90} />
39
37
  <KolMeter _label="Battery level" _max={100} _value={90} _low={25} _high={75} _optimum={90} />
40
38
  </div>
41
- </section>
39
+ </SampleBlock>
42
40
  </div>
43
41
  </>
44
42
  );
@@ -1,6 +1,7 @@
1
- import { KolHeading, KolMeter } from '@public-ui/react-v19';
1
+ import { KolMeter } from '@public-ui/react-v19';
2
2
  import type { FC } from 'react';
3
3
  import React from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const MeterOrientation: FC = () => (
@@ -13,23 +14,21 @@ export const MeterOrientation: FC = () => (
13
14
  </SampleDescription>
14
15
 
15
16
  <div className="grid gap-8">
16
- <section className="grid gap-4">
17
- <KolHeading _level={2} _label="Vertical" />
17
+ <SampleBlock id="vertical" heading="Vertical">
18
18
  <div className="flex flex-row gap-8 items-end">
19
19
  <KolMeter style={{ '--kol-meter-vertical-height': '100' }} _label="Tank 100l" _max={100} _value={50} _orientation="vertical" _unit="l" />
20
20
  <KolMeter style={{ '--kol-meter-vertical-height': '150' }} _label="Tank 150l" _max={150} _value={50} _orientation="vertical" _unit="l" />
21
21
  <KolMeter style={{ '--kol-meter-vertical-height': '200' }} _label="Tank 200l" _max={200} _value={150} _orientation="vertical" _unit="l" />
22
22
  </div>
23
- </section>
23
+ </SampleBlock>
24
24
 
25
- <section className="grid gap-4">
26
- <KolHeading _level={2} _label="Vertical with ranges and optimum" />
25
+ <SampleBlock id="vertical-ranges-optimum" heading="Vertical with ranges and optimum">
27
26
  <div className="flex flex-row gap-8">
28
27
  <KolMeter _label="Low" _max={100} _value={10} _low={25} _high={75} _optimum={50} _orientation="vertical" />
29
28
  <KolMeter _label="OK" _max={100} _value={50} _low={25} _high={75} _optimum={50} _orientation="vertical" />
30
29
  <KolMeter _label="High" _max={100} _value={90} _low={25} _high={75} _optimum={50} _orientation="vertical" />
31
30
  </div>
32
- </section>
31
+ </SampleBlock>
33
32
  </div>
34
33
  </>
35
34
  );
@@ -2,6 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { KolNav } from '@public-ui/react-v19';
4
4
 
5
+ import { SampleBlock } from '../SampleBlock';
5
6
  import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  import type { FC } from 'react';
@@ -14,20 +15,22 @@ export const NavAriaCurrent: FC = () => (
14
15
  </p>
15
16
  </SampleDescription>
16
17
 
17
- <KolNav
18
- class="block w-sm"
19
- _label="Main navigation"
20
- _links={[
21
- {
22
- _label: 'Homepage',
23
- _href: '#/back-page',
24
- },
25
- {
26
- _label: 'Nav - aria-current (Current page)',
27
- _href: '#/nav/aria-current', // Please don't change this link. It's necessary to be the "current page" for the sample.
28
- _active: true,
29
- },
30
- ]}
31
- />
18
+ <SampleBlock id="aria-current">
19
+ <KolNav
20
+ class="block w-sm"
21
+ _label="Main navigation"
22
+ _links={[
23
+ {
24
+ _label: 'Homepage',
25
+ _href: '#/back-page',
26
+ },
27
+ {
28
+ _label: 'Nav - aria-current (Current page)',
29
+ _href: '#/nav/aria-current', // Please don't change this link. It's necessary to be the "current page" for the sample.
30
+ _active: true,
31
+ },
32
+ ]}
33
+ />
34
+ </SampleBlock>
32
35
  </>
33
36
  );
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
 
3
- import { KolHeading, KolInputCheckbox, KolNav } from '@public-ui/react-v19';
3
+ import { KolInputCheckbox, KolNav } from '@public-ui/react-v19';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
  import { LINKS, LINKS_SUB_ACTIVE, LINKS_WITHOUT_SUBMENU } from './links';
6
7
 
@@ -29,8 +30,7 @@ export const NavBasic: FC = () => {
29
30
  }}
30
31
  ></KolInputCheckbox>
31
32
  </section>
32
- <section className="grid gap-4">
33
- <KolHeading _level={2} _label="Navigation without submenu" />
33
+ <SampleBlock id="navigation-submenu" heading="Navigation without submenu" fitContent>
34
34
  <KolNav
35
35
  class="block w-fit"
36
36
  _label="Navigation without submenu"
@@ -38,13 +38,11 @@ export const NavBasic: FC = () => {
38
38
  _hasCompactButton
39
39
  _hasIconsWhenExpanded={hasIconsWhenExpanded}
40
40
  />
41
- </section>
42
- <section className="grid gap-4">
43
- <KolHeading _level={2} _label="Navigation with submenu" />
41
+ </SampleBlock>
42
+ <SampleBlock id="navigation-submenu-2" heading="Navigation with submenu" fitContent>
44
43
  <KolNav class="block w-fit" _label="Navigation with submenu" _links={LINKS} _hasCompactButton _hasIconsWhenExpanded={hasIconsWhenExpanded} />
45
- </section>
46
- <section className="grid gap-4">
47
- <KolHeading _level={2} _label="Navigation with submenu active" />
44
+ </SampleBlock>
45
+ <SampleBlock id="navigation-submenu-active" heading="Navigation with submenu active" fitContent>
48
46
  <KolNav
49
47
  class="block w-fit"
50
48
  _label="Navigation with submenu active"
@@ -52,7 +50,7 @@ export const NavBasic: FC = () => {
52
50
  _hasCompactButton
53
51
  _hasIconsWhenExpanded={hasIconsWhenExpanded}
54
52
  />
55
- </section>
53
+ </SampleBlock>
56
54
  </section>
57
55
  </>
58
56
  );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolPagination } from '@public-ui/react-v19';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const PaginationBasic: FC = () => (
@@ -14,7 +15,7 @@ export const PaginationBasic: FC = () => (
14
15
  </p>
15
16
  </SampleDescription>
16
17
 
17
- <div className="grid gap-4">
18
+ <SampleBlock id="basic" narrow>
18
19
  <KolPagination
19
20
  _max={316514}
20
21
  _page={15475}
@@ -101,6 +102,6 @@ export const PaginationBasic: FC = () => (
101
102
  _label="No boundary buttons, sibling count 2 (Entries 61 to 90 of 250)"
102
103
  _on={{}}
103
104
  />
104
- </div>
105
+ </SampleBlock>
105
106
  </>
106
107
  );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolPagination } from '@public-ui/react-v19';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const PaginationButtonVisibility: FC = () => (
@@ -14,7 +15,8 @@ export const PaginationButtonVisibility: FC = () => (
14
15
  </p>
15
16
  </SampleDescription>
16
17
 
17
- <div className="grid gap-4">
18
+ {/* Snapshotted: the three distinct shapes the button group can take – full, inner buttons only, none at all. */}
19
+ <SampleBlock id="button-visibility">
18
20
  {/* Default: All buttons visible */}
19
21
  <KolPagination
20
22
  _max={100}
@@ -26,40 +28,43 @@ export const PaginationButtonVisibility: FC = () => (
26
28
  _on={{}}
27
29
  />
28
30
 
29
- {/* Only first and last buttons */}
31
+ {/* Only previous and next buttons */}
30
32
  <KolPagination
31
33
  _max={100}
32
34
  _page={5}
33
35
  _pageSize={10}
34
36
  _siblingCount={2}
35
37
  _boundaryCount={1}
36
- _label="Only first and last buttons"
38
+ _label="Only previous and next buttons"
37
39
  _on={{}}
38
- _hasButtons={{ first: true, last: true, next: false, previous: false }}
40
+ _hasButtons={{ first: false, last: false, next: true, previous: true }}
39
41
  />
40
42
 
41
- {/* Only previous and next buttons */}
43
+ {/* No navigation buttons, only page numbers */}
42
44
  <KolPagination
43
45
  _max={100}
44
46
  _page={5}
45
47
  _pageSize={10}
46
48
  _siblingCount={2}
47
49
  _boundaryCount={1}
48
- _label="Only previous and next buttons"
50
+ _label="No navigation buttons, only page numbers"
49
51
  _on={{}}
50
- _hasButtons={{ first: false, last: false, next: true, previous: true }}
52
+ _hasButtons={false}
51
53
  />
54
+ </SampleBlock>
52
55
 
53
- {/* No navigation buttons, only page numbers */}
56
+ {/* Not snapshotted: these combinations only differ in which button is missing – prop logic, no additional theme styling. */}
57
+ <SampleBlock id="button-combinations" skipSnapshot>
58
+ {/* Only first and last buttons */}
54
59
  <KolPagination
55
60
  _max={100}
56
61
  _page={5}
57
62
  _pageSize={10}
58
63
  _siblingCount={2}
59
64
  _boundaryCount={1}
60
- _label="No navigation buttons, only page numbers"
65
+ _label="Only first and last buttons"
61
66
  _on={{}}
62
- _hasButtons={false}
67
+ _hasButtons={{ first: true, last: true, next: false, previous: false }}
63
68
  />
64
69
 
65
70
  {/* All buttons except first */}
@@ -109,6 +114,6 @@ export const PaginationButtonVisibility: FC = () => (
109
114
  _on={{}}
110
115
  _hasButtons={{ first: true, last: true, next: false, previous: true }}
111
116
  />
112
- </div>
117
+ </SampleBlock>
113
118
  </>
114
119
  );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolPagination } from '@public-ui/react-v19';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleBlock } from '../SampleBlock';
6
7
  import { SampleDescription } from '../SampleDescription';
7
8
 
8
9
  export const PaginationSiblingBoundary: FC = () => (
@@ -15,7 +16,7 @@ export const PaginationSiblingBoundary: FC = () => (
15
16
  </p>
16
17
  </SampleDescription>
17
18
 
18
- <div className="grid gap-4">
19
+ <SampleBlock id="sibling-boundary">
19
20
  {/* Default: siblingCount=1, boundaryCount=1 */}
20
21
  <KolPagination _max={20} _page={5} _pageSize={1} _label="Default: siblingCount=1, boundaryCount=1 (shows pages 1, 4, 5, 6, 20)" _on={{}} />
21
22
 
@@ -117,6 +118,6 @@ export const PaginationSiblingBoundary: FC = () => (
117
118
  _label="Larger dataset: _max=100, _page=50, siblingCount=3, boundaryCount=2"
118
119
  _on={{}}
119
120
  />
120
- </div>
121
+ </SampleBlock>
121
122
  </>
122
123
  );
@@ -1,6 +1,7 @@
1
1
  import { KolHeading, KolPopoverButton } from '@public-ui/react-v19';
2
2
  import type { FC } from 'react';
3
3
  import React from 'react';
4
+ import { SampleBlock } from '../SampleBlock';
4
5
  import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const PopoverButtonInline: FC = () => {
@@ -13,10 +14,9 @@ export const PopoverButtonInline: FC = () => {
13
14
  than 44px by 44px.
14
15
  </p>
15
16
  </SampleDescription>
16
- <div className="flex flex-col gap-4">
17
+ <SampleBlock id="inline" className="flex flex-col gap-4">
17
18
  <p>
18
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur aut dolore dolores itaque praesentium reprehenderit sed voluptatum!
19
- Exercitationem ipsa magni maiores modi, placeat quas quos reprehenderit rerum sit veniam vitae.
19
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur aut dolore dolores itaque praesentium.
20
20
  <KolPopoverButton _inline={true} _label="Help" _icons="kolicon-alert-info" _popoverAlign="right" _tooltipAlign="bottom" _hideLabel>
21
21
  <div className="w-sm p-2 border border-solid border-gray">
22
22
  <KolHeading _label="Help Information" _level={0}></KolHeading>
@@ -27,10 +27,9 @@ export const PopoverButtonInline: FC = () => {
27
27
  </div>
28
28
  </KolPopoverButton>
29
29
  <br />
30
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur aut dolore dolores itaque praesentium reprehenderit sed voluptatum!
31
30
  Exercitationem ipsa magni maiores modi, placeat quas quos reprehenderit rerum sit veniam vitae.
32
31
  </p>
33
- </div>
32
+ </SampleBlock>
34
33
  </>
35
34
  );
36
35
  };