@public-ui/sample-react 1.7.0-rc.5

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 (145) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +27 -0
  3. package/.gitignore +41 -0
  4. package/.prettierignore +4 -0
  5. package/package.json +66 -0
  6. package/prettier.config.js +6 -0
  7. package/public/index.html +28 -0
  8. package/src/App.tsx +259 -0
  9. package/src/declare.d.ts +4 -0
  10. package/src/main.ts +7 -0
  11. package/src/react.main.tsx +56 -0
  12. package/src/routes-test.ts +79 -0
  13. package/src/samples/abbr/basic.html +6 -0
  14. package/src/samples/abbr/basic.tsx +39 -0
  15. package/src/samples/abbr/routes.ts +9 -0
  16. package/src/samples/accordion/basic.tsx +18 -0
  17. package/src/samples/accordion/header.tsx +17 -0
  18. package/src/samples/accordion/headlines.tsx +27 -0
  19. package/src/samples/accordion/list.tsx +32 -0
  20. package/src/samples/accordion/routes.ts +17 -0
  21. package/src/samples/alert/basic.tsx +37 -0
  22. package/src/samples/alert/card-msg.tsx +11 -0
  23. package/src/samples/alert/html.tsx +29 -0
  24. package/src/samples/alert/routes.ts +15 -0
  25. package/src/samples/avatar/basic.tsx +10 -0
  26. package/src/samples/avatar/routes.ts +8 -0
  27. package/src/samples/badge/basic.tsx +18 -0
  28. package/src/samples/badge/button.tsx +25 -0
  29. package/src/samples/badge/routes.ts +12 -0
  30. package/src/samples/breadcrumb/basic.tsx +53 -0
  31. package/src/samples/breadcrumb/routes.ts +9 -0
  32. package/src/samples/button/basic.tsx +29 -0
  33. package/src/samples/button/hide-label.tsx +31 -0
  34. package/src/samples/button/icons.tsx +27 -0
  35. package/src/samples/button/routes.ts +18 -0
  36. package/src/samples/button/width.tsx +30 -0
  37. package/src/samples/button-group/basic.tsx +13 -0
  38. package/src/samples/button-group/routes.ts +9 -0
  39. package/src/samples/button-link/basic.tsx +23 -0
  40. package/src/samples/button-link/icons.tsx +37 -0
  41. package/src/samples/button-link/image.tsx +14 -0
  42. package/src/samples/button-link/routes.ts +18 -0
  43. package/src/samples/button-link/target.tsx +16 -0
  44. package/src/samples/card/basic.tsx +12 -0
  45. package/src/samples/card/confirm.tsx +19 -0
  46. package/src/samples/card/flex.tsx +44 -0
  47. package/src/samples/card/routes.ts +18 -0
  48. package/src/samples/card/selection.tsx +70 -0
  49. package/src/samples/details/basic.tsx +19 -0
  50. package/src/samples/details/routes.ts +9 -0
  51. package/src/samples/form/routes.ts +5 -0
  52. package/src/samples/handout/basic.tsx +1013 -0
  53. package/src/samples/handout/routes.ts +9 -0
  54. package/src/samples/heading/badged.tsx +27 -0
  55. package/src/samples/heading/basic.tsx +15 -0
  56. package/src/samples/heading/paragraph.tsx +45 -0
  57. package/src/samples/heading/routes.ts +15 -0
  58. package/src/samples/icon/basic.tsx +17 -0
  59. package/src/samples/icon/routes.ts +9 -0
  60. package/src/samples/indented-text/basic.tsx +24 -0
  61. package/src/samples/indented-text/routes.ts +9 -0
  62. package/src/samples/input-checkbox/basic.tsx +37 -0
  63. package/src/samples/input-checkbox/routes.ts +9 -0
  64. package/src/samples/input-color/basic.tsx +29 -0
  65. package/src/samples/input-color/routes.ts +9 -0
  66. package/src/samples/input-date/basic.tsx +20 -0
  67. package/src/samples/input-date/routes.ts +9 -0
  68. package/src/samples/input-email/basic.tsx +30 -0
  69. package/src/samples/input-email/routes.ts +9 -0
  70. package/src/samples/input-file/basic.tsx +25 -0
  71. package/src/samples/input-file/routes.ts +9 -0
  72. package/src/samples/input-number/basic.tsx +30 -0
  73. package/src/samples/input-number/routes.ts +9 -0
  74. package/src/samples/input-password/basic.tsx +41 -0
  75. package/src/samples/input-password/routes.ts +9 -0
  76. package/src/samples/input-radio/basic.tsx +46 -0
  77. package/src/samples/input-radio/horizontal.tsx +42 -0
  78. package/src/samples/input-radio/routes.ts +14 -0
  79. package/src/samples/input-radio/select.tsx +18 -0
  80. package/src/samples/input-range/basic.tsx +29 -0
  81. package/src/samples/input-range/routes.ts +9 -0
  82. package/src/samples/input-text/basic.tsx +72 -0
  83. package/src/samples/input-text/blur.tsx +16 -0
  84. package/src/samples/input-text/focus.tsx +24 -0
  85. package/src/samples/input-text/hidden-label.tsx +66 -0
  86. package/src/samples/input-text/routes.ts +16 -0
  87. package/src/samples/link/basic.tsx +23 -0
  88. package/src/samples/link/icons.tsx +37 -0
  89. package/src/samples/link/image.tsx +20 -0
  90. package/src/samples/link/routes.ts +18 -0
  91. package/src/samples/link/target.tsx +15 -0
  92. package/src/samples/link-button/basic.tsx +22 -0
  93. package/src/samples/link-button/routes.ts +9 -0
  94. package/src/samples/link-group/routes.ts +5 -0
  95. package/src/samples/nav/active.tsx +88 -0
  96. package/src/samples/nav/aria-current.tsx +22 -0
  97. package/src/samples/nav/basic.tsx +62 -0
  98. package/src/samples/nav/horizontal.tsx +59 -0
  99. package/src/samples/nav/routes.ts +18 -0
  100. package/src/samples/pagination/basic.tsx +12 -0
  101. package/src/samples/pagination/routes.ts +9 -0
  102. package/src/samples/popover/basic.tsx +36 -0
  103. package/src/samples/popover/routes.ts +8 -0
  104. package/src/samples/progress/basic.tsx +11 -0
  105. package/src/samples/progress/routes.ts +9 -0
  106. package/src/samples/select/basic.tsx +51 -0
  107. package/src/samples/select/routes.ts +9 -0
  108. package/src/samples/skip-nav/basic.tsx +33 -0
  109. package/src/samples/skip-nav/routes.ts +9 -0
  110. package/src/samples/spin/basic.tsx +6 -0
  111. package/src/samples/spin/custom.css +52 -0
  112. package/src/samples/spin/custom.tsx +11 -0
  113. package/src/samples/spin/cycle.tsx +6 -0
  114. package/src/samples/spin/routes.ts +13 -0
  115. package/src/samples/split-button/basic.tsx +46 -0
  116. package/src/samples/split-button/routes.ts +8 -0
  117. package/src/samples/table/badge-size.tsx +51 -0
  118. package/src/samples/table/render-cell.tsx +48 -0
  119. package/src/samples/table/routes.ts +15 -0
  120. package/src/samples/table/sort-date.tsx +33 -0
  121. package/src/samples/table/test-data.ts +66 -0
  122. package/src/samples/textarea/adjust-height.tsx +22 -0
  123. package/src/samples/textarea/basic.tsx +11 -0
  124. package/src/samples/textarea/disabled.tsx +10 -0
  125. package/src/samples/textarea/placeholder.tsx +10 -0
  126. package/src/samples/textarea/readonly.tsx +10 -0
  127. package/src/samples/textarea/resize.tsx +13 -0
  128. package/src/samples/textarea/routes.ts +27 -0
  129. package/src/samples/textarea/rows.tsx +10 -0
  130. package/src/samples/toast/basic.tsx +21 -0
  131. package/src/samples/toast/routes.ts +8 -0
  132. package/src/samples/version/basic.tsx +6 -0
  133. package/src/samples/version/context.tsx +12 -0
  134. package/src/samples/version/routes.ts +12 -0
  135. package/src/shares/constants.ts +2 -0
  136. package/src/shares/react-roots.ts +10 -0
  137. package/src/shares/routes.ts +87 -0
  138. package/src/shares/store.ts +85 -0
  139. package/src/shares/theme.ts +103 -0
  140. package/src/shares/types.ts +4 -0
  141. package/src/style.scss +89 -0
  142. package/test-build.sh +2 -0
  143. package/tsconfig.json +32 -0
  144. package/unocss.config.ts +7 -0
  145. package/webpack.config.js +14 -0
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { KolCard } from '@public-ui/react';
3
+
4
+ import { FC } from 'react';
5
+
6
+ export const CardFlex: FC = () => (
7
+ <div className="grid grid-cols-2 gap-4">
8
+ <KolCard _heading="Titel" _hasFooter>
9
+ <div slot="header">Zusätzlicher Header</div>
10
+ <div slot="content">Inhalt</div>
11
+ <div slot="footer">Fusszeile</div>
12
+ </KolCard>
13
+ <KolCard _heading="Titel" _hasFooter>
14
+ <div slot="header">Zusätzlicher Header</div>
15
+ <div slot="content">
16
+ Inhalt
17
+ <br />
18
+ Inhalt
19
+ </div>
20
+ <div slot="footer">Fusszeile</div>
21
+ </KolCard>
22
+ <KolCard _heading="Titel" _hasFooter>
23
+ <div slot="header">Zusätzlicher Header</div>
24
+ <div slot="content">
25
+ Inhalt
26
+ <br />
27
+ Inhalt
28
+ <br />
29
+ Inhalt
30
+ </div>
31
+ <div slot="footer">Fusszeile</div>
32
+ </KolCard>
33
+ <KolCard _heading="Titel" _hasFooter>
34
+ <div slot="header">Zusätzlicher Header</div>
35
+ <div slot="content">Inhalt</div>
36
+ <div slot="footer">Fusszeile</div>
37
+ </KolCard>
38
+ <KolCard _heading="Titel" _hasFooter>
39
+ <div slot="header">Zusätzlicher Header</div>
40
+ <div slot="content">Inhalt</div>
41
+ <div slot="footer">Fusszeile</div>
42
+ </KolCard>
43
+ </div>
44
+ );
@@ -0,0 +1,18 @@
1
+ import { Routes } from '../../shares/types';
2
+
3
+ import { CardBasic } from './basic';
4
+
5
+ import { CardConfirm } from './confirm';
6
+
7
+ import { CardFlex } from './flex';
8
+
9
+ import { CardSelection } from './selection';
10
+
11
+ export const CARD_ROUTES: Routes = {
12
+ card: {
13
+ basic: CardBasic,
14
+ confirm: CardConfirm,
15
+ flex: CardFlex,
16
+ selection: CardSelection,
17
+ },
18
+ };
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import { KolButton, KolCard, KolInputCheckbox } from '@public-ui/react';
3
+
4
+ import { FC } from 'react';
5
+
6
+ const STYLE = {
7
+ display: 'flex',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ gap: '.5rem',
11
+ };
12
+
13
+ export const CardSelection: FC = () => (
14
+ <div className="d-flex gap-2">
15
+ <KolCard _hasFooter _heading="DEBTI-25437/17-1">
16
+ <div slot="header">
17
+ TeCorp Endplatte
18
+ <br />
19
+ VZTA
20
+ </div>
21
+ <div slot="content">
22
+ <div>
23
+ <img alt="Beispielbild" src="https://via.placeholder.com/200" />
24
+ </div>
25
+ </div>
26
+ <div slot="footer">
27
+ <div style={STYLE}>
28
+ <KolInputCheckbox _id="article-0">Auswählen</KolInputCheckbox>
29
+ <KolButton _variant="primary" _label="Öffnen"></KolButton>
30
+ </div>
31
+ </div>
32
+ </KolCard>
33
+ <KolCard _hasFooter _heading="DEBTI-25437/17-1">
34
+ <div slot="header">
35
+ TeCorp Endplatte
36
+ <br />
37
+ VZTA
38
+ </div>
39
+ <div slot="content">
40
+ <div>
41
+ <img alt="Beispielbild" src="https://via.placeholder.com/200" />
42
+ </div>
43
+ </div>
44
+ <div slot="footer">
45
+ <div style={STYLE}>
46
+ <KolInputCheckbox _id="article-1">Auswählen</KolInputCheckbox>
47
+ <KolButton _variant="primary" _label="Öffnen"></KolButton>
48
+ </div>
49
+ </div>
50
+ </KolCard>
51
+ <KolCard _hasFooter _heading="DEBTI-25437/17-1">
52
+ <div slot="header">
53
+ TeCorp Endplatte
54
+ <br />
55
+ VZTA
56
+ </div>
57
+ <div slot="content">
58
+ <div>
59
+ <img alt="Beispielbild" src="https://via.placeholder.com/200" />
60
+ </div>
61
+ </div>
62
+ <div slot="footer">
63
+ <div style={STYLE}>
64
+ <KolInputCheckbox _id="article-2">Auswählen</KolInputCheckbox>
65
+ <KolButton _variant="primary" _label="Öffnen"></KolButton>
66
+ </div>
67
+ </div>
68
+ </KolCard>
69
+ </div>
70
+ );
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { KolDetails } from '@public-ui/react';
3
+
4
+ import { FC } from 'react';
5
+
6
+ export const DetailsBasic: FC = () => (
7
+ <p className="grid gap-4">
8
+ <KolDetails _summary="Nach Laden der Seite geschlossen">
9
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
10
+ voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
11
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
12
+ </KolDetails>
13
+ <KolDetails _summary="Nach Laden der Seite geöffnet" _open>
14
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15
+ voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
16
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
17
+ </KolDetails>
18
+ </p>
19
+ );
@@ -0,0 +1,9 @@
1
+ import { Routes } from '../../shares/types';
2
+
3
+ import { DetailsBasic } from './basic';
4
+
5
+ export const DETAILS_ROUTES: Routes = {
6
+ details: {
7
+ basic: DetailsBasic,
8
+ },
9
+ };
@@ -0,0 +1,5 @@
1
+ import { Routes } from '../../shares/types';
2
+
3
+ export const FORM_ROUTES: Routes = {
4
+ form: {},
5
+ };