@public-ui/sample-react 1.7.3 → 1.7.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.
- package/dist/1474.js +1 -1
- package/dist/{8408.js → 1804.js} +2 -2
- package/dist/183.js +1 -1
- package/dist/2337.js +1 -1
- package/dist/2412.js +1 -1
- package/dist/3303.js +1 -1
- package/dist/3325.js +1 -1
- package/dist/3459.js +1 -1
- package/dist/3537.js +1 -1
- package/dist/3932.js +1 -1
- package/dist/4021.js +1 -1
- package/dist/4022.js +1 -1
- package/dist/4291.js +1 -1
- package/dist/4323.js +1 -1
- package/dist/4355.js +1 -1
- package/dist/4477.js +1 -1
- package/dist/4564.js +1 -1
- package/dist/4891.js +1 -1
- package/dist/5183.js +1 -1
- package/dist/5369.js +1 -1
- package/dist/5390.js +1 -1
- package/dist/540.js +1 -1
- package/dist/5866.js +1 -1
- package/dist/6012.js +1 -1
- package/dist/6068.js +1 -1
- package/dist/6210.js +1 -1
- package/dist/6320.js +1 -1
- package/dist/6558.js +1 -1
- package/dist/6655.js +1 -1
- package/dist/6686.js +2 -0
- package/dist/{5889.js → 6691.js} +2 -2
- package/dist/6908.js +1 -1
- package/dist/7029.js +1 -1
- package/dist/{2788.js → 7200.js} +2 -2
- package/dist/7255.js +1 -1
- package/dist/7447.js +1 -1
- package/dist/{3495.js → 7495.js} +2 -2
- package/dist/7715.js +1 -1
- package/dist/7722.js +1 -1
- package/dist/7801.js +1 -1
- package/dist/7955.js +1 -1
- package/dist/7995.js +1 -1
- package/dist/8065.js +1 -1
- package/dist/{4256.js → 8068.js} +2 -2
- package/dist/8073.js +1 -1
- package/dist/8099.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8255.js +1 -1
- package/dist/8291.js +1 -1
- package/dist/8709.js +1 -1
- package/dist/8761.js +1 -1
- package/dist/9106.js +1 -1
- package/dist/9734.js +1 -1
- package/dist/9747.js +1 -1
- package/dist/9792.js +1 -1
- package/dist/9963.js +1 -1
- package/dist/abgrenzung.jpg +0 -0
- package/dist/main.css +1 -1
- package/dist/main.js +6 -3
- package/package.json +4 -4
- package/public/abgrenzung.jpg +0 -0
- package/src/components/button-link/image.tsx +1 -1
- package/src/components/card/selection.tsx +3 -3
- package/src/components/handout/basic.tsx +1 -1
- package/src/components/image/basic.tsx +1 -1
- package/src/components/link/image.tsx +2 -2
- package/src/components/logo/basic.tsx +1 -1
- package/src/components/nav/active.tsx +7 -6
- package/src/components/nav/basic.tsx +1 -1
- package/src/components/table/with-pagination.tsx +2 -3
- package/src/components/toast/basic.tsx +27 -5
- package/src/components/toast-legacy/basic.tsx +26 -0
- package/src/components/toast-legacy/routes.ts +8 -0
- package/src/shares/routes.ts +2 -0
- package/dist/9230.js +0 -2
- /package/dist/{2788.js.LICENSE.txt → 1804.js.LICENSE.txt} +0 -0
- /package/dist/{3495.js.LICENSE.txt → 6686.js.LICENSE.txt} +0 -0
- /package/dist/{4256.js.LICENSE.txt → 6691.js.LICENSE.txt} +0 -0
- /package/dist/{5889.js.LICENSE.txt → 7200.js.LICENSE.txt} +0 -0
- /package/dist/{8408.js.LICENSE.txt → 7495.js.LICENSE.txt} +0 -0
- /package/dist/{9230.js.LICENSE.txt → 8068.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@leanup/stack-react": "1.3.48",
|
|
9
9
|
"@leanup/stack-webpack": "1.3.48",
|
|
10
10
|
"@public-oss/kolibri-themes": "0.0.3",
|
|
11
|
-
"@public-ui/components": "1.7.
|
|
12
|
-
"@public-ui/react": "1.7.
|
|
13
|
-
"@public-ui/themes": "1.7.
|
|
11
|
+
"@public-ui/components": "1.7.5",
|
|
12
|
+
"@public-ui/react": "1.7.5",
|
|
13
|
+
"@public-ui/themes": "1.7.5",
|
|
14
14
|
"@types/node": "20.8.0",
|
|
15
15
|
"@types/react": "18.2.23",
|
|
16
16
|
"@types/react-dom": "18.2.8",
|
|
Binary file
|
|
@@ -8,7 +8,7 @@ export const ButtonLinkImage: FC = () => (
|
|
|
8
8
|
<KolButtonLink _label="Ich bin ein Link, der als Text gerendert wird" />
|
|
9
9
|
<br />
|
|
10
10
|
<KolButtonLink _label="">
|
|
11
|
-
<img alt="
|
|
11
|
+
<img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
|
|
12
12
|
</KolButtonLink>
|
|
13
13
|
</div>
|
|
14
14
|
);
|
|
@@ -20,7 +20,7 @@ export const CardSelection: FC = () => (
|
|
|
20
20
|
</div>
|
|
21
21
|
<div slot="content">
|
|
22
22
|
<div>
|
|
23
|
-
<img alt="
|
|
23
|
+
<img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
<div slot="footer">
|
|
@@ -38,7 +38,7 @@ export const CardSelection: FC = () => (
|
|
|
38
38
|
</div>
|
|
39
39
|
<div slot="content">
|
|
40
40
|
<div>
|
|
41
|
-
<img alt="
|
|
41
|
+
<img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
<div slot="footer">
|
|
@@ -56,7 +56,7 @@ export const CardSelection: FC = () => (
|
|
|
56
56
|
</div>
|
|
57
57
|
<div slot="content">
|
|
58
58
|
<div>
|
|
59
|
-
<img alt="
|
|
59
|
+
<img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<div slot="footer">
|
|
@@ -1006,7 +1006,7 @@ export const HandoutBasic: FC = () => (
|
|
|
1006
1006
|
</KolCard>
|
|
1007
1007
|
</div>
|
|
1008
1008
|
<KolVersion _version="5.0.2-test.2"></KolVersion>
|
|
1009
|
-
{/* <KolImage _src="
|
|
1009
|
+
{/* <KolImage _src="/abgrenzung.jpg" _alt="KoliBri Darstellung"></KolImage> */}
|
|
1010
1010
|
{/* <KolIndentedText></KolIndentedText> */}
|
|
1011
1011
|
{/* <KolQuote></KolQuote> */}
|
|
1012
1012
|
</div>
|
|
@@ -2,4 +2,4 @@ import { FC } from 'react';
|
|
|
2
2
|
import { KolImage } from '@public-ui/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
export const ImageBasic: FC = () => <KolImage _src="
|
|
5
|
+
export const ImageBasic: FC = () => <KolImage className="w-80%" _src="/abgrenzung.jpg" _alt="Darstellung des KoliBri-Theming" />;
|
|
@@ -8,12 +8,12 @@ export const LinkImage: FC = () => (
|
|
|
8
8
|
<KolLink _href="#" _label="Ich bin ein Link, der als Text gerendert wird" />
|
|
9
9
|
<br />
|
|
10
10
|
<KolLink _href="#" _label="">
|
|
11
|
-
<img alt="
|
|
11
|
+
<img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
|
|
12
12
|
<KolKolibri style={{ width: '300px' }}></KolKolibri>
|
|
13
13
|
</KolLink>
|
|
14
14
|
<br />
|
|
15
15
|
<KolLink _href="#" _label="">
|
|
16
|
-
<img alt="
|
|
16
|
+
<img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
|
|
17
17
|
</KolLink>
|
|
18
18
|
</div>
|
|
19
19
|
);
|
|
@@ -2,4 +2,4 @@ import React, { FC } from 'react';
|
|
|
2
2
|
import { KolLogo } from '@public-ui/react';
|
|
3
3
|
import { Bundesministerium } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
export const LogoBasic: FC = () => <KolLogo _org={Bundesministerium['Die Bundesregierung']}
|
|
5
|
+
export const LogoBasic: FC = () => <KolLogo className="w-50%" _org={Bundesministerium['Die Bundesregierung']} />;
|
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { KolNav } from '@public-ui/react';
|
|
3
3
|
|
|
4
4
|
import { FC, useEffect, useState } from 'react';
|
|
5
|
-
|
|
6
|
-
import { useNavigate } from 'react-router';
|
|
5
|
+
import { ButtonOrLinkOrTextWithChildrenProps } from '@public-ui/components';
|
|
7
6
|
|
|
8
7
|
export const NavActive: FC = () => {
|
|
9
|
-
const [links, setLinks] = useState([]);
|
|
8
|
+
const [links, setLinks] = useState<ButtonOrLinkOrTextWithChildrenProps[]>([]);
|
|
10
9
|
|
|
11
10
|
const handleLinks = (route: string) => {
|
|
12
11
|
const link = links.find((link) => link._label === route);
|
|
12
|
+
if (!link) return;
|
|
13
13
|
link._active = !link._active;
|
|
14
14
|
setLinks(links);
|
|
15
15
|
};
|
|
@@ -18,7 +18,7 @@ export const NavActive: FC = () => {
|
|
|
18
18
|
setLinks([
|
|
19
19
|
{
|
|
20
20
|
_label: 'Main',
|
|
21
|
-
_icons: '
|
|
21
|
+
_icons: 'codicon codicon-home',
|
|
22
22
|
_on: {
|
|
23
23
|
onClick: () => handleLinks('Main'),
|
|
24
24
|
},
|
|
@@ -36,7 +36,7 @@ export const NavActive: FC = () => {
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
_active:
|
|
39
|
+
_active: true,
|
|
40
40
|
_label: 'Alert',
|
|
41
41
|
_on: {
|
|
42
42
|
onClick: () => handleLinks('Alert'),
|
|
@@ -44,12 +44,13 @@ export const NavActive: FC = () => {
|
|
|
44
44
|
_children: [
|
|
45
45
|
{
|
|
46
46
|
_label: 'Main',
|
|
47
|
-
_icons: '
|
|
47
|
+
_icons: 'codicon codicon-home',
|
|
48
48
|
_on: {
|
|
49
49
|
onClick: () => handleLinks('/'),
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
+
_active: true,
|
|
53
54
|
_label: 'Abbr',
|
|
54
55
|
_href: '/abbr',
|
|
55
56
|
_on: {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
|
|
3
3
|
import { KolTable } from '@public-ui/react';
|
|
4
|
-
import { KoliBriTableHeaders } from '@public-ui/components';
|
|
5
|
-
import { KoliBriTablePaginationProps } from '@public-ui/components/src';
|
|
4
|
+
import { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
|
|
6
5
|
import { DATA } from './test-data';
|
|
7
6
|
|
|
8
7
|
const HEADERS: KoliBriTableHeaders = {
|
|
@@ -13,7 +12,7 @@ const HEADERS: KoliBriTableHeaders = {
|
|
|
13
12
|
],
|
|
14
13
|
],
|
|
15
14
|
};
|
|
16
|
-
const PAGINATION: KoliBriTablePaginationProps = { _page: 2,
|
|
15
|
+
const PAGINATION: KoliBriTablePaginationProps = { _page: 2, _max: 1 };
|
|
17
16
|
|
|
18
17
|
export const TableWithPagination: FC = () => (
|
|
19
18
|
<div>
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
import { ToasterService } from '@public-ui/components';
|
|
2
2
|
import { KolButton } from '@public-ui/react';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { FC } from 'react';
|
|
4
|
+
import { getRoot } from '../../shares/react-roots';
|
|
4
5
|
|
|
5
6
|
const toaster = ToasterService.getInstance(document);
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
const handleButtonClickSimple = () => {
|
|
9
|
+
void toaster.enqueue({
|
|
10
|
+
description: 'Toasty',
|
|
11
|
+
label: `Initial Toast`,
|
|
12
|
+
type: 'warning',
|
|
13
|
+
});
|
|
14
|
+
};
|
|
8
15
|
|
|
9
|
-
const
|
|
16
|
+
const handleButtonClickComplex = () => {
|
|
10
17
|
void toaster.enqueue({
|
|
11
|
-
|
|
18
|
+
render: (element: HTMLElement, { close }) => {
|
|
19
|
+
getRoot(element).render(
|
|
20
|
+
<>
|
|
21
|
+
<KolButton
|
|
22
|
+
_label={'Hello World from Toast!'}
|
|
23
|
+
_on={{
|
|
24
|
+
onClick: () => {
|
|
25
|
+
console.log('Toast Button clicked!');
|
|
26
|
+
close();
|
|
27
|
+
},
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
</>,
|
|
31
|
+
);
|
|
32
|
+
},
|
|
12
33
|
label: `Initial Toast`,
|
|
13
34
|
type: 'warning',
|
|
14
35
|
});
|
|
@@ -16,6 +37,7 @@ const handleButtonClick = () => {
|
|
|
16
37
|
|
|
17
38
|
export const ToastBasic: FC = () => (
|
|
18
39
|
<div>
|
|
19
|
-
<KolButton _label="Show toast" _on={{ onClick:
|
|
40
|
+
<KolButton _label="Show simple toast" _on={{ onClick: handleButtonClickSimple }}></KolButton>
|
|
41
|
+
<KolButton _label="Show complex toast" _on={{ onClick: handleButtonClickComplex }}></KolButton>
|
|
20
42
|
</div>
|
|
21
43
|
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { KolButton, KolToast } from '@public-ui/react';
|
|
4
|
+
import { ToasterServiceLegacy } from '@public-ui/components';
|
|
5
|
+
|
|
6
|
+
export const ToastBasic: FC = () => {
|
|
7
|
+
const toaster = ToasterServiceLegacy.getInstance(document);
|
|
8
|
+
|
|
9
|
+
const handleButtonClick = () => {
|
|
10
|
+
toaster.enqueue({
|
|
11
|
+
label: `Noch ein Toast`,
|
|
12
|
+
description: `Beschreibung zum Toast`,
|
|
13
|
+
type: 'info',
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<KolToast _label="Legacy Toast Titel">Toast content</KolToast>
|
|
19
|
+
<KolToast _label="Zweiter Toast mit Schließen-Button" _hasCloser>
|
|
20
|
+
Toast content
|
|
21
|
+
</KolToast>
|
|
22
|
+
|
|
23
|
+
<KolButton _label="Weiteren Toast öffnen" _on={{ onClick: handleButtonClick }}></KolButton>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
package/src/shares/routes.ts
CHANGED
|
@@ -47,6 +47,7 @@ import { TOAST_ROUTES } from '../components/toast/routes';
|
|
|
47
47
|
import { VERSION_ROUTES } from '../components/version/routes';
|
|
48
48
|
import { SCENARIO_ROUTES } from '../scenarios/routes';
|
|
49
49
|
import { Routes } from './types';
|
|
50
|
+
import { TOAST_LEGACY_ROUTES } from '../components/toast-legacy/routes';
|
|
50
51
|
|
|
51
52
|
export const ROUTES: Routes = {
|
|
52
53
|
...HANDOUT_ROUTES,
|
|
@@ -96,6 +97,7 @@ export const ROUTES: Routes = {
|
|
|
96
97
|
...TABS_ROUTES,
|
|
97
98
|
...TEXTAREA_ROUTES,
|
|
98
99
|
...TOAST_ROUTES,
|
|
100
|
+
...TOAST_LEGACY_ROUTES,
|
|
99
101
|
...VERSION_ROUTES,
|
|
100
102
|
...SCENARIO_ROUTES,
|
|
101
103
|
};
|
package/dist/9230.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 9230.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9230],{9230:(e,t,a)=>{switch(location.pathname){case"/dev/toaster.html":a.e(8408).then(a.bind(a,8408));break;case"/dev/reprod-accordion-does-not-toggle-with-open.html":a.e(9598).then(a.bind(a,9598));break;case"/dev/details-synced-open-state.html":a.e(9329).then(a.bind(a,9329))}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|