@public-ui/sample-react 4.5.0-rc.0 → 4.5.0-rc.3
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.
- package/README.md +3 -3
- package/package.json +7 -7
- package/src/components/input-color/partials/cases.tsx +1 -1
- package/src/components/input-email/counter.tsx +17 -0
- package/src/components/input-email/routes.ts +2 -0
- package/src/components/input-number/partials/cases.tsx +3 -0
- package/src/components/input-password/counter.tsx +17 -0
- package/src/components/input-password/routes.ts +2 -0
- package/src/components/input-radio/partials/cases.tsx +1 -0
- package/src/components/input-text/clear-button.tsx +3 -0
- package/src/components/single-select/partials/cases.tsx +2 -3
- package/src/components/tabs/basic.tsx +2 -2
- package/src/components/tabs/create-button.tsx +1 -1
- package/src/components/tabs/icons-only.tsx +1 -1
- package/src/components/textarea/adjust-height.tsx +7 -6
package/README.md
CHANGED
|
@@ -36,8 +36,8 @@ git clone git@github.com:public-ui/kolibri.git
|
|
|
36
36
|
cd kolibri
|
|
37
37
|
pnpm install
|
|
38
38
|
pnpm -r build
|
|
39
|
-
cd packages/samples/
|
|
40
|
-
pnpm
|
|
39
|
+
cd packages/samples/presentation
|
|
40
|
+
pnpm dev
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
This package has no dev server of its own. It is mounted by the presentation app: run `pnpm dev` in `packages/samples/presentation`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "4.5.0-rc.
|
|
3
|
+
"version": "4.5.0-rc.3",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"@types/node": "26.4.0",
|
|
15
15
|
"@types/papaparse": "5.5.2",
|
|
16
16
|
"papaparse": "5.7.0",
|
|
17
|
-
"react-hook-form": "7.
|
|
17
|
+
"react-hook-form": "7.89.0",
|
|
18
18
|
"react-number-format": "5.4.5",
|
|
19
19
|
"tslib": "2.8.1",
|
|
20
20
|
"typescript": "5.9.3",
|
|
21
21
|
"world_countries_lists": "3.3.0",
|
|
22
22
|
"zod": "4.4.3",
|
|
23
|
-
"@public-ui/react-
|
|
24
|
-
"@public-ui/react-
|
|
23
|
+
"@public-ui/react-v19": "4.5.0-rc.3",
|
|
24
|
+
"@public-ui/react-hook-form-adapter": "4.5.0-rc.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "19.2.18",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"adopted-style-sheets": "1.1.9-rc.25",
|
|
30
30
|
"eslint": "9.39.5",
|
|
31
31
|
"knip": "6.37.0",
|
|
32
|
-
"prettier": "3.9.
|
|
32
|
+
"prettier": "3.9.9",
|
|
33
33
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
34
|
-
"stylelint": "17.
|
|
34
|
+
"stylelint": "17.15.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "19.2.8",
|
|
38
38
|
"react-dom": "19.2.8",
|
|
39
39
|
"react-router": "8.3.1",
|
|
40
|
-
"@public-ui/components": "4.5.0-rc.
|
|
40
|
+
"@public-ui/components": "4.5.0-rc.3"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"assets",
|
|
@@ -40,7 +40,7 @@ export const InputColorCases = forwardRef<HTMLKolInputColorElement, InputColorCa
|
|
|
40
40
|
<KolInputColor
|
|
41
41
|
{...props}
|
|
42
42
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
43
|
-
_label="Color with error"
|
|
43
|
+
_label="Color with error and suggestions"
|
|
44
44
|
_suggestions="['#000000','#f08080', '#0000ff','#00ff00']"
|
|
45
45
|
_touched
|
|
46
46
|
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KolInputEmail } 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 InputEmailCounter: FC = () => (
|
|
8
|
+
<>
|
|
9
|
+
<SampleDescription>
|
|
10
|
+
<p>This story showcases an email input with a counter for the chars in the field. Maximal length is 30.</p>
|
|
11
|
+
</SampleDescription>
|
|
12
|
+
|
|
13
|
+
<SampleBlock id="counter">
|
|
14
|
+
<KolInputEmail _label="E-Mail" _value="anderson@example.com" _hasCounter _maxLength={30} />
|
|
15
|
+
</SampleBlock>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Routes } from '../../shares/types';
|
|
2
2
|
import { InputEmailBasic } from './basic';
|
|
3
|
+
import { InputEmailCounter } from './counter';
|
|
3
4
|
import { InputEmailOnInputOnChange } from './get-value';
|
|
4
5
|
|
|
5
6
|
export const INPUT_EMAIL_ROUTES: Routes = {
|
|
6
7
|
'input-email': {
|
|
7
8
|
basic: InputEmailBasic,
|
|
9
|
+
counter: InputEmailCounter,
|
|
8
10
|
'get-value': InputEmailOnInputOnChange,
|
|
9
11
|
},
|
|
10
12
|
};
|
|
@@ -64,6 +64,9 @@ export const InputNumberCases = forwardRef<HTMLKolInputNumberElement, InputNumbe
|
|
|
64
64
|
<SampleBlock {...block('min-max-step')}>
|
|
65
65
|
<KolInputNumber {...props} ref={ref} _accessKey="Z" _max={10} _min={-10} _step={2} _label="Number input (-10 to 10 in steps of 2)" />
|
|
66
66
|
</SampleBlock>
|
|
67
|
+
<SampleBlock {...block('hint')}>
|
|
68
|
+
<KolInputNumber {...props} _hint="Hint text" _value={123} _label="Number input with hint" />
|
|
69
|
+
</SampleBlock>
|
|
67
70
|
<SampleBlock {...block('readonly')}>
|
|
68
71
|
<KolInputNumber {...props} _readOnly _value={123} _label="Number input (Readonly)" />
|
|
69
72
|
</SampleBlock>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KolInputPassword } 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 InputPasswordCounter: FC = () => (
|
|
8
|
+
<>
|
|
9
|
+
<SampleDescription>
|
|
10
|
+
<p>This story showcases a password input with a counter for the chars in the field. Maximal length is 30.</p>
|
|
11
|
+
</SampleDescription>
|
|
12
|
+
|
|
13
|
+
<SampleBlock id="counter">
|
|
14
|
+
<KolInputPassword _label="Password" _value="Hunter2" _hasCounter _maxLength={30} />
|
|
15
|
+
</SampleBlock>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Routes } from '../../shares/types';
|
|
2
2
|
import { InputPasswordBasic } from './basic';
|
|
3
|
+
import { InputPasswordCounter } from './counter';
|
|
3
4
|
import { InputPasswordOnInputOnChange } from './get-value';
|
|
4
5
|
import { InputPasswordShowPassword } from './show-password';
|
|
5
6
|
|
|
6
7
|
export const INPUT_PASSWORD_ROUTES: Routes = {
|
|
7
8
|
'input-password': {
|
|
8
9
|
basic: InputPasswordBasic,
|
|
10
|
+
counter: InputPasswordCounter,
|
|
9
11
|
'get-value': InputPasswordOnInputOnChange,
|
|
10
12
|
'show-password': InputPasswordShowPassword,
|
|
11
13
|
},
|
|
@@ -55,6 +55,7 @@ export const InputRadioCases = forwardRef<HTMLKolInputRadioElement, InputRadioCa
|
|
|
55
55
|
_options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)'},{'label':'Company','value':'Company'}]"
|
|
56
56
|
_label="Salutation (horizontal)"
|
|
57
57
|
_infoPopover={{ _label: 'hint', _content: 'Ich bin ein Hinweis.', _icons: 'kolicon-alert-info' }}
|
|
58
|
+
_tooltipAlign="right"
|
|
58
59
|
/>
|
|
59
60
|
</SampleBlock>
|
|
60
61
|
<SampleBlock {...block('horizontal-disabled')}>
|
|
@@ -19,6 +19,9 @@ export const InputTextClearButton: FC = () => (
|
|
|
19
19
|
<SampleBlock id="search-disabled">
|
|
20
20
|
<KolInputText _label="Search (disabled)" _type="search" _disabled _value="test" _placeholder="Disabled search" />
|
|
21
21
|
</SampleBlock>
|
|
22
|
+
<SampleBlock id="search-read-only">
|
|
23
|
+
<KolInputText _label="Search (read only)" _type="search" _readOnly _value="test" />
|
|
24
|
+
</SampleBlock>
|
|
22
25
|
<SampleBlock id="text-no-clear-button">
|
|
23
26
|
<KolInputText _label="Text (no clear button)" _type="text" _value="test" _placeholder="Regular text input" />
|
|
24
27
|
</SampleBlock>
|
|
@@ -86,6 +86,7 @@ export const SingleSelectCases = ({ blockIdPrefix, snapshotOnly, ...props }: Sin
|
|
|
86
86
|
{
|
|
87
87
|
value: 'bw',
|
|
88
88
|
label: 'Baden-Württemberg',
|
|
89
|
+
disabled: true,
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
92
|
value: 'by',
|
|
@@ -115,7 +116,6 @@ export const SingleSelectCases = ({ blockIdPrefix, snapshotOnly, ...props }: Sin
|
|
|
115
116
|
{
|
|
116
117
|
value: 'mv',
|
|
117
118
|
label: 'Mecklenburg-Vorpommern',
|
|
118
|
-
disabled: true,
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
value: 'ni',
|
|
@@ -129,7 +129,6 @@ export const SingleSelectCases = ({ blockIdPrefix, snapshotOnly, ...props }: Sin
|
|
|
129
129
|
{
|
|
130
130
|
value: 'rp',
|
|
131
131
|
label: 'Rheinland-Pfalz',
|
|
132
|
-
disabled: true,
|
|
133
132
|
},
|
|
134
133
|
{
|
|
135
134
|
value: 'sl',
|
|
@@ -147,11 +146,11 @@ export const SingleSelectCases = ({ blockIdPrefix, snapshotOnly, ...props }: Sin
|
|
|
147
146
|
{
|
|
148
147
|
value: 'sh',
|
|
149
148
|
label: 'Schleswig-Holstein',
|
|
150
|
-
disabled: true,
|
|
151
149
|
},
|
|
152
150
|
{
|
|
153
151
|
value: 'th',
|
|
154
152
|
label: 'Thüringen',
|
|
153
|
+
disabled: true,
|
|
155
154
|
},
|
|
156
155
|
] as Option<StencilUnknown>[]
|
|
157
156
|
}
|
|
@@ -41,7 +41,7 @@ export const TabsBasic: FC = () => (
|
|
|
41
41
|
<p>KolTabs renders tab captions and their associated content. This sample shows tab captions with and without icons and disabled tabs.</p>
|
|
42
42
|
</SampleDescription>
|
|
43
43
|
|
|
44
|
-
<SampleBlock id="regular"
|
|
44
|
+
<SampleBlock id="regular">
|
|
45
45
|
<KolTabs _tabs={tabsWithoutIcons} _label="Regular tabs">
|
|
46
46
|
<div slot="tab-0">Contents of Tab 1</div>
|
|
47
47
|
<div slot="tab-1">Contents of Tab 2</div>
|
|
@@ -50,7 +50,7 @@ export const TabsBasic: FC = () => (
|
|
|
50
50
|
</KolTabs>
|
|
51
51
|
</SampleBlock>
|
|
52
52
|
|
|
53
|
-
<SampleBlock id="icons"
|
|
53
|
+
<SampleBlock id="icons">
|
|
54
54
|
<KolTabs _tabs={tabs} className="mt-4" _label="Tabs with icons">
|
|
55
55
|
<div slot="tab-0">Contents of Tab 1</div>
|
|
56
56
|
<div slot="tab-1">Contents of Tab 2</div>
|
|
@@ -29,7 +29,7 @@ export const CreateButton: FC = () => {
|
|
|
29
29
|
<p>This sample shows KolTabs with a "create tab" button.</p>
|
|
30
30
|
</SampleDescription>
|
|
31
31
|
|
|
32
|
-
<SampleBlock id="create-button"
|
|
32
|
+
<SampleBlock id="create-button">
|
|
33
33
|
<KolTabs _tabs={tabs} className="mt-4" _label="Tabs with create button" _hasCreateButton _on={{ onCreate: addTab }}>
|
|
34
34
|
{tabs.map((tab, index) => (
|
|
35
35
|
<div key={`tab-${index}`} slot={`tab-${index}`}>
|
|
@@ -39,7 +39,7 @@ export const TabsIconsOnly: FC = () => (
|
|
|
39
39
|
<p>This sample shows KolTabs with hidden labels.</p>
|
|
40
40
|
</SampleDescription>
|
|
41
41
|
|
|
42
|
-
<SampleBlock id="icons-only"
|
|
42
|
+
<SampleBlock id="icons-only">
|
|
43
43
|
<KolTabs _label="Tabs with icons" _tabs={tabs}>
|
|
44
44
|
<div slot="tab-0">Contents of Tab 1</div>
|
|
45
45
|
<div slot="tab-1">Contents of Tab 2</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { KolTextarea } from '@public-ui/react-v19';
|
|
5
5
|
import { SampleBlock } from '../SampleBlock';
|
|
6
6
|
import { SampleDescription } from '../SampleDescription';
|
|
7
7
|
|
|
@@ -20,10 +20,11 @@ export const TextareaAdjustHeight: FC = () => (
|
|
|
20
20
|
</p>
|
|
21
21
|
</SampleDescription>
|
|
22
22
|
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<KolTextarea _adjustHeight={true} _value={VALUE} _label="Text input (auto grow)" />
|
|
26
|
-
</
|
|
27
|
-
|
|
23
|
+
<div className="grid gap-4">
|
|
24
|
+
<SampleBlock id="adjust-height">
|
|
25
|
+
<KolTextarea _adjustHeight={true} _value={VALUE} _label="Text input (auto grow with value)" />
|
|
26
|
+
</SampleBlock>
|
|
27
|
+
<KolTextarea _adjustHeight={true} _label="Text input (auto grow with initial 3 rows)" _rows={3} />
|
|
28
|
+
</div>
|
|
28
29
|
</>
|
|
29
30
|
);
|