@public-ui/sample-react 1.7.0-rc.15 → 1.7.0-rc.17
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/1586.js +2 -0
- 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/{2697.js → 5653.js} +2 -2
- package/dist/5866.js +1 -1
- package/dist/6012.js +1 -1
- package/dist/6068.js +1 -1
- package/dist/{9753.js → 6116.js} +2 -2
- package/dist/6210.js +1 -1
- package/dist/6320.js +1 -1
- package/dist/6365.js +2 -0
- package/dist/6558.js +1 -1
- package/dist/6655.js +1 -1
- package/dist/6813.js +1 -1
- package/dist/6908.js +1 -1
- package/dist/7029.js +1 -1
- package/dist/7255.js +1 -1
- package/dist/7447.js +1 -1
- 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/8061.js +1 -1
- package/dist/8065.js +1 -1
- 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/main.css +1 -1
- package/dist/main.js +2 -2
- package/package.json +9 -9
- package/src/components/FocusInput.tsx +7 -43
- package/src/components/FormWrap.tsx +21 -0
- package/src/components/Sidebar.tsx +2 -2
- package/src/components/badge/button.tsx +1 -1
- package/src/components/breadcrumb/basic.tsx +2 -2
- package/src/components/button/basic.tsx +4 -28
- package/src/components/button/hide-label.tsx +1 -1
- package/src/components/button/icons.tsx +1 -1
- package/src/components/button/partials/cases.tsx +16 -0
- package/src/components/button/partials/variants.tsx +27 -0
- package/src/components/button-group/basic.tsx +2 -2
- package/src/components/button-link/icons.tsx +5 -5
- package/src/components/handout/basic.tsx +41 -41
- package/src/components/heading/badged.tsx +6 -6
- package/src/components/icon/basic.tsx +2 -2
- package/src/components/input-checkbox/basic.tsx +2 -2
- package/src/components/input-checkbox/button.tsx +2 -9
- package/src/components/input-checkbox/partials/cases.tsx +5 -5
- package/src/components/input-checkbox/switch.tsx +2 -9
- package/src/components/input-color/basic.tsx +2 -2
- package/src/components/input-color/partials/cases.tsx +1 -1
- package/src/components/input-date/basic.tsx +2 -2
- package/src/components/input-email/basic.tsx +2 -2
- package/src/components/input-email/partials/cases.tsx +1 -1
- package/src/components/input-file/basic.tsx +2 -2
- package/src/components/input-file/partials/cases.tsx +1 -1
- package/src/components/input-number/basic.tsx +2 -2
- package/src/components/input-number/partials/cases.tsx +1 -1
- package/src/components/input-password/basic.tsx +2 -2
- package/src/components/input-password/partials/cases.tsx +1 -1
- package/src/components/input-password/show-password.tsx +1 -1
- package/src/components/input-radio/basic.tsx +2 -2
- package/src/components/input-range/basic.tsx +2 -2
- package/src/components/input-range/partials/cases.tsx +1 -1
- package/src/components/input-text/basic.tsx +2 -2
- package/src/components/input-text/partials/cases.tsx +1 -1
- package/src/components/link/icons.tsx +5 -5
- package/src/components/link/target.tsx +3 -3
- package/src/components/nav/active.tsx +2 -2
- package/src/components/nav/basic.tsx +2 -2
- package/src/components/pagination/basic.tsx +4 -3
- package/src/components/popover/basic.tsx +5 -5
- package/src/components/select/basic.tsx +2 -2
- package/src/components/select/partials/cases.tsx +1 -1
- package/src/components/split-button/basic.tsx +1 -1
- package/src/components/table/badge-size.tsx +1 -1
- package/src/components/table/routes.ts +2 -0
- package/src/components/table/with-pagination.tsx +22 -0
- package/src/components/tabs/basic.tsx +4 -4
- package/src/components/tabs/icons-only.tsx +4 -4
- package/src/components/textarea/basic.tsx +2 -2
- package/src/components/types.tsx +42 -0
- package/src/style.scss +10 -5
- package/dist/4378.js +0 -2
- package/dist/959.js +0 -2
- /package/dist/{2697.js.LICENSE.txt → 1586.js.LICENSE.txt} +0 -0
- /package/dist/{4378.js.LICENSE.txt → 5653.js.LICENSE.txt} +0 -0
- /package/dist/{959.js.LICENSE.txt → 6116.js.LICENSE.txt} +0 -0
- /package/dist/{9753.js.LICENSE.txt → 6365.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.0-rc.
|
|
3
|
+
"version": "1.7.0-rc.17",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,14 +8,14 @@
|
|
|
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.0-rc.
|
|
12
|
-
"@public-ui/react": "1.7.0-rc.
|
|
13
|
-
"@public-ui/themes": "1.7.0-rc.
|
|
14
|
-
"@types/node": "20.
|
|
15
|
-
"@types/react": "18.2.
|
|
16
|
-
"@types/react-dom": "18.2.
|
|
17
|
-
"@unocss/preset-uno": "0.56.
|
|
18
|
-
"@unocss/webpack": "0.56.
|
|
11
|
+
"@public-ui/components": "1.7.0-rc.17",
|
|
12
|
+
"@public-ui/react": "1.7.0-rc.17",
|
|
13
|
+
"@public-ui/themes": "1.7.0-rc.17",
|
|
14
|
+
"@types/node": "20.7.1",
|
|
15
|
+
"@types/react": "18.2.23",
|
|
16
|
+
"@types/react-dom": "18.2.8",
|
|
17
|
+
"@unocss/preset-uno": "0.56.4",
|
|
18
|
+
"@unocss/webpack": "0.56.4",
|
|
19
19
|
"ajv": "8.12.0",
|
|
20
20
|
"chromedriver": "116.0.0",
|
|
21
21
|
"cpy-cli": "5.0.0",
|
|
@@ -1,56 +1,20 @@
|
|
|
1
|
-
import { KolButton, KolForm } from '@public-ui/react';
|
|
2
1
|
import React, { FC, useLayoutEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { InputColorVariants } from './input-color/partials/variants';
|
|
5
|
-
import { InputDateVariants } from './input-date/partials/variants';
|
|
6
|
-
import { InputEmailVariants } from './input-email/partials/variants';
|
|
7
|
-
import { InputFileVariants } from './input-file/partials/variants';
|
|
8
|
-
import { InputNumberVariants } from './input-number/partials/variants';
|
|
9
|
-
import { InputPasswordVariants } from './input-password/partials/variants';
|
|
10
|
-
import { InputRadioVariants } from './input-radio/partials/variants';
|
|
11
|
-
import { InputRangeVariants } from './input-range/partials/variants';
|
|
12
|
-
import { InputTextVariants } from './input-text/partials/variants';
|
|
13
|
-
import { SelectVariants } from './select/partials/variants';
|
|
14
|
-
import { TextareaVariants } from './textarea/partials/variants';
|
|
2
|
+
import { RefComponent } from './types';
|
|
15
3
|
|
|
16
|
-
type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
| typeof InputColorVariants
|
|
20
|
-
| typeof InputDateVariants
|
|
21
|
-
| typeof InputEmailVariants
|
|
22
|
-
| typeof InputFileVariants
|
|
23
|
-
| typeof InputNumberVariants
|
|
24
|
-
| typeof InputPasswordVariants
|
|
25
|
-
| typeof InputRadioVariants
|
|
26
|
-
| typeof InputRangeVariants
|
|
27
|
-
| typeof InputTextVariants
|
|
28
|
-
| typeof SelectVariants
|
|
29
|
-
| typeof TextareaVariants;
|
|
30
|
-
props?: Record<string, unknown>;
|
|
31
|
-
};
|
|
4
|
+
type FokusElementProps = {
|
|
5
|
+
RefComponent: RefComponent;
|
|
6
|
+
} & Record<string, unknown>;
|
|
32
7
|
|
|
33
|
-
export const
|
|
8
|
+
export const FocusElement: FC<FokusElementProps> = (props) => {
|
|
34
9
|
const ref = useRef(null);
|
|
35
10
|
|
|
36
11
|
useLayoutEffect(() => {
|
|
37
12
|
setTimeout(() => {
|
|
38
|
-
if (ref.current) {
|
|
13
|
+
if (ref.current && window.self === window.top) {
|
|
39
14
|
(ref.current as unknown as HTMLElement).focus();
|
|
40
15
|
}
|
|
41
16
|
}, 500);
|
|
42
17
|
}, [ref]);
|
|
43
18
|
|
|
44
|
-
return
|
|
45
|
-
<KolForm>
|
|
46
|
-
<div className="grid gap-4">
|
|
47
|
-
<RefInput ref={ref} {...props} />
|
|
48
|
-
<div className="flex gap-4">
|
|
49
|
-
<KolButton _label="Submit" _icon="codicon codicon-arrow-right" _type="submit" _variant="primary" />
|
|
50
|
-
<KolButton _label="Reset" _type="reset" _variant="tertiary" />
|
|
51
|
-
<KolButton _label="Help" _type="button" _variant="ghost" />
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</KolForm>
|
|
55
|
-
);
|
|
19
|
+
return <props.RefComponent ref={ref} {...props} />;
|
|
56
20
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { KolButton, KolForm } from '@public-ui/react';
|
|
2
|
+
import React, { FC } from 'react';
|
|
3
|
+
import { FocusElement } from './FocusInput';
|
|
4
|
+
import { RefFormComponent } from './types';
|
|
5
|
+
|
|
6
|
+
type FormWrapProps = {
|
|
7
|
+
RefComponent: RefFormComponent;
|
|
8
|
+
} & Record<string, unknown>;
|
|
9
|
+
|
|
10
|
+
export const FormWrap: FC<FormWrapProps> = (props) => (
|
|
11
|
+
<KolForm>
|
|
12
|
+
<div className="grid gap-4">
|
|
13
|
+
<FocusElement {...props} />
|
|
14
|
+
<div className="flex gap-4">
|
|
15
|
+
<KolButton _label="Submit" _icons="codicon codicon-arrow-right" _type="submit" _variant="primary" />
|
|
16
|
+
<KolButton _label="Reset" _type="reset" _variant="tertiary" />
|
|
17
|
+
<KolButton _label="Help" _type="button" _variant="ghost" />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</KolForm>
|
|
21
|
+
);
|
|
@@ -65,11 +65,11 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
|
|
|
65
65
|
|
|
66
66
|
<KolHeading _label="Komponenten" _level={2} className="block mt"></KolHeading>
|
|
67
67
|
<div className="flex flex-justify-between flex-items-center mt">
|
|
68
|
-
<KolButton
|
|
68
|
+
<KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Vorherige Komponente auswählen" _on={{ onClick: handlePreviousClick }} />
|
|
69
69
|
<span className="text-center">
|
|
70
70
|
{formatSampleAsLabel()} ({getIndexOfSample() + 1}/{routeList.length})
|
|
71
71
|
</span>
|
|
72
|
-
<KolButton
|
|
72
|
+
<KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Nächste Komponente auswählen" _on={{ onClick: handleNextClick }} />
|
|
73
73
|
</div>
|
|
74
74
|
|
|
75
75
|
<ComponentNavContainer isMobile={isMobile}>
|
|
@@ -21,7 +21,7 @@ export const BreadcrumbBasic: FC = () => (
|
|
|
21
21
|
_links={[
|
|
22
22
|
{
|
|
23
23
|
_label: 'Startseite',
|
|
24
|
-
|
|
24
|
+
_icons: 'codicon codicon-home',
|
|
25
25
|
_hideLabel: true,
|
|
26
26
|
_href: '#/',
|
|
27
27
|
},
|
|
@@ -38,7 +38,7 @@ export const BreadcrumbBasic: FC = () => (
|
|
|
38
38
|
<KolBreadcrumb
|
|
39
39
|
_ariaLabel="Breadcrumb aus Icons- und Text-Links"
|
|
40
40
|
_links={[
|
|
41
|
-
{ _label: 'Startseite',
|
|
41
|
+
{ _label: 'Startseite', _icons: 'codicon codicon-home', _href: '#/' },
|
|
42
42
|
{
|
|
43
43
|
_label: 'Unterseite der Startseite und ich_bin_ein_echt_langes_zusammengesetztes_Worte_und_versuche_das_Layout_zu_brechen',
|
|
44
44
|
_href: '#/unterseite',
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { FocusElement } from '../FocusInput';
|
|
3
|
+
import { ButtonVariants } from './partials/variants';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const ARGS = {
|
|
7
|
-
_on: {
|
|
8
|
-
onClick: (_event, _value) => alert('Klick!'),
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const ButtonBasic: FC = () => (
|
|
13
|
-
<div className="grid gap-14">
|
|
14
|
-
<div className="flex flex-wrap gap-14">
|
|
15
|
-
<KolButton _label="Primary" _variant="primary" {...ARGS}></KolButton>
|
|
16
|
-
<KolButton _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
|
|
17
|
-
<KolButton _label="Normal" _variant="normal" {...ARGS}></KolButton>
|
|
18
|
-
<KolButton _label="Danger" _variant="danger" {...ARGS}></KolButton>
|
|
19
|
-
<KolButton _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
|
|
20
|
-
</div>
|
|
21
|
-
<div className="flex flex-wrap gap-14">
|
|
22
|
-
<KolButton _disabled _label="Primary" _variant="primary"></KolButton>
|
|
23
|
-
<KolButton _disabled _label="Secondary" _variant="secondary"></KolButton>
|
|
24
|
-
<KolButton _disabled _label="Normal" _variant="normal"></KolButton>
|
|
25
|
-
<KolButton _disabled _label="Danger" _variant="danger"></KolButton>
|
|
26
|
-
<KolButton _disabled _label="Ghost" _variant="ghost"></KolButton>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
5
|
+
export const ButtonBasic: FC = () => <FocusElement RefComponent={ButtonVariants} />;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Components } from '@public-ui/components';
|
|
2
|
+
import { KolButton } from '@public-ui/react';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
export const ButtonCases = forwardRef<HTMLKolButtonElement, Components.KolButton>(function InputCheckboxCases(props, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<div className="flex flex-wrap gap-4">
|
|
8
|
+
<KolButton {...props} _icons="codicon codicon-home" _label="Primary" _variant="primary"></KolButton>
|
|
9
|
+
<KolButton {...props} _icons="codicon codicon-heart" _label="Secondary" _variant="secondary"></KolButton>
|
|
10
|
+
<KolButton {...props} _icons="codicon codicon-hubot" _label="Normal" _variant="normal"></KolButton>
|
|
11
|
+
<KolButton {...props} _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary"></KolButton>
|
|
12
|
+
<KolButton {...props} _icons="codicon codicon-trash" _label="Danger" _variant="danger"></KolButton>
|
|
13
|
+
<KolButton ref={ref} {...props} _icons="codicon codicon-reactions" _label="Ghost" _variant="ghost"></KolButton>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Components } from '@public-ui/components';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { ButtonCases } from './cases';
|
|
4
|
+
|
|
5
|
+
export const ButtonVariants = forwardRef<HTMLKolButtonElement, Components.KolButton>(function InputCheckboxVariant(props, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<div className="grid gap-4">
|
|
8
|
+
<h1>Button</h1>
|
|
9
|
+
<section>
|
|
10
|
+
<h2>Button</h2>
|
|
11
|
+
<ButtonCases {...props} />
|
|
12
|
+
</section>
|
|
13
|
+
<section>
|
|
14
|
+
<h2>Button (disabled)</h2>
|
|
15
|
+
<ButtonCases {...props} _disabled />
|
|
16
|
+
</section>
|
|
17
|
+
<section>
|
|
18
|
+
<h2>Button (hideLabel)</h2>
|
|
19
|
+
<ButtonCases ref={ref} {...props} _hideLabel />
|
|
20
|
+
</section>
|
|
21
|
+
<section>
|
|
22
|
+
<h2>Button (disabled, hideLabel)</h2>
|
|
23
|
+
<ButtonCases {...props} _disabled _hideLabel />
|
|
24
|
+
</section>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -7,7 +7,7 @@ export const ButtonGroupBasic: FC = () => (
|
|
|
7
7
|
<KolButtonGroup>
|
|
8
8
|
<KolButton _label="Active" _variant="primary"></KolButton>
|
|
9
9
|
<KolButton _label="Not active" _disabled></KolButton>
|
|
10
|
-
<KolButton _label="Active"
|
|
11
|
-
<KolButton _label="Active"
|
|
10
|
+
<KolButton _label="Active" _icons="codicon codicon-home" _variant="danger"></KolButton>
|
|
11
|
+
<KolButton _label="Active" _icons="codicon codicon-trash" _hideLabel _variant="ghost"></KolButton>
|
|
12
12
|
</KolButtonGroup>
|
|
13
13
|
);
|
|
@@ -5,27 +5,27 @@ import { FC } from 'react';
|
|
|
5
5
|
|
|
6
6
|
export const ButtonLinkIcons: FC = () => (
|
|
7
7
|
<div className="grid gap-4">
|
|
8
|
-
<KolButtonLink
|
|
8
|
+
<KolButtonLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" />
|
|
9
9
|
<KolButtonLink
|
|
10
|
-
|
|
10
|
+
_icons={{
|
|
11
11
|
right: 'codicon codicon-home',
|
|
12
12
|
}}
|
|
13
13
|
_label="Ich bin ein Link mit Icon rechts"
|
|
14
14
|
/>
|
|
15
15
|
<KolButtonLink
|
|
16
|
-
|
|
16
|
+
_icons={{
|
|
17
17
|
top: 'codicon codicon-home',
|
|
18
18
|
}}
|
|
19
19
|
_label="Ich bin ein Link mit Icon oben"
|
|
20
20
|
/>
|
|
21
21
|
<KolButtonLink
|
|
22
|
-
|
|
22
|
+
_icons={{
|
|
23
23
|
bottom: 'codicon codicon-home',
|
|
24
24
|
}}
|
|
25
25
|
_label="Ich bin ein Link mit Icon unten"
|
|
26
26
|
/>
|
|
27
27
|
<KolButtonLink
|
|
28
|
-
|
|
28
|
+
_icons={{
|
|
29
29
|
top: 'codicon codicon-home',
|
|
30
30
|
right: 'codicon codicon-home',
|
|
31
31
|
bottom: 'codicon codicon-home',
|
|
@@ -785,56 +785,56 @@ export const HandoutBasic: FC = () => (
|
|
|
785
785
|
<KolTabs _ariaLabel="" _selected={0} _tabs={[{ _label: 'Button' }, { _label: 'LinkButton' }, { _label: 'Disabled Tab', _disabled: true }]}>
|
|
786
786
|
<div className="grid gap-2 py-2">
|
|
787
787
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
788
|
-
<KolButton
|
|
789
|
-
<KolButton _disabled
|
|
790
|
-
<KolButton _hideLabel
|
|
788
|
+
<KolButton _icons={{ left: 'codicon codicon-arrow-left' }} _label="primary" _variant="primary"></KolButton>
|
|
789
|
+
<KolButton _disabled _icons={{ left: 'codicon codicon-arrow-left' }} _label="primary" _variant="primary"></KolButton>
|
|
790
|
+
<KolButton _hideLabel _icons="codicon codicon-arrow-left" _label="primary" _variant="primary"></KolButton>
|
|
791
791
|
</div>
|
|
792
792
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
793
|
-
<KolButton
|
|
794
|
-
<KolButton _disabled
|
|
795
|
-
<KolButton _hideLabel
|
|
793
|
+
<KolButton _icons={{ right: 'codicon codicon-arrow-right' }} _label="secondary" _variant="secondary"></KolButton>
|
|
794
|
+
<KolButton _disabled _icons={{ right: 'codicon codicon-arrow-right' }} _label="secondary" _variant="secondary"></KolButton>
|
|
795
|
+
<KolButton _hideLabel _icons="codicon codicon-arrow-right" _label="secondary" _variant="secondary"></KolButton>
|
|
796
796
|
</div>
|
|
797
797
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
798
|
-
<KolButton
|
|
799
|
-
<KolButton _disabled
|
|
800
|
-
<KolButton _hideLabel
|
|
798
|
+
<KolButton _icons={{ top: 'codicon codicon-arrow-up' }} _label="danger" _variant="danger"></KolButton>
|
|
799
|
+
<KolButton _disabled _icons={{ top: 'codicon codicon-arrow-up' }} _label="danger" _variant="danger"></KolButton>
|
|
800
|
+
<KolButton _hideLabel _icons="codicon codicon-arrow-up" _label="danger" _variant="danger"></KolButton>
|
|
801
801
|
</div>
|
|
802
802
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
803
|
-
<KolButton
|
|
804
|
-
<KolButton _disabled
|
|
805
|
-
<KolButton _hideLabel
|
|
803
|
+
<KolButton _icons={{ bottom: 'codicon codicon-arrow-down' }} _label="normal" _variant="normal"></KolButton>
|
|
804
|
+
<KolButton _disabled _icons={{ bottom: 'codicon codicon-arrow-down' }} _label="normal" _variant="normal"></KolButton>
|
|
805
|
+
<KolButton _hideLabel _icons="codicon codicon-arrow-down" _label="normal" _variant="normal"></KolButton>
|
|
806
806
|
</div>
|
|
807
807
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
808
808
|
<KolButton _label="ghost" _variant="ghost"></KolButton>
|
|
809
809
|
<KolButton _disabled _label="ghost" _variant="ghost"></KolButton>
|
|
810
|
-
<KolButton
|
|
810
|
+
<KolButton _icons="codicon codicon-home" _hideLabel _label="ghost" _variant="ghost"></KolButton>
|
|
811
811
|
</div>
|
|
812
812
|
</div>
|
|
813
813
|
<div className="grid gap-2 py-2">
|
|
814
814
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
815
|
-
<KolLinkButton _href="#"
|
|
816
|
-
<KolLinkButton _href="#" _disabled
|
|
817
|
-
<KolLinkButton _href="#" _hideLabel
|
|
815
|
+
<KolLinkButton _href="#" _icons={{ left: 'codicon codicon-arrow-left' }} _label="primary" _variant="primary"></KolLinkButton>
|
|
816
|
+
<KolLinkButton _href="#" _disabled _icons={{ left: 'codicon codicon-arrow-left' }} _label="primary" _variant="primary"></KolLinkButton>
|
|
817
|
+
<KolLinkButton _href="#" _hideLabel _icons="codicon codicon-arrow-left" _label="primary" _variant="primary"></KolLinkButton>
|
|
818
818
|
</div>
|
|
819
819
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
820
|
-
<KolLinkButton _href="#"
|
|
821
|
-
<KolLinkButton _href="#" _disabled
|
|
822
|
-
<KolLinkButton _href="#" _hideLabel
|
|
820
|
+
<KolLinkButton _href="#" _icons={{ right: 'codicon codicon-arrow-right' }} _label="secondary" _variant="secondary"></KolLinkButton>
|
|
821
|
+
<KolLinkButton _href="#" _disabled _icons={{ right: 'codicon codicon-arrow-right' }} _label="secondary" _variant="secondary"></KolLinkButton>
|
|
822
|
+
<KolLinkButton _href="#" _hideLabel _icons="codicon codicon-arrow-right" _label="secondary" _variant="secondary"></KolLinkButton>
|
|
823
823
|
</div>
|
|
824
824
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
825
|
-
<KolLinkButton _href="#"
|
|
826
|
-
<KolLinkButton _href="#" _disabled
|
|
827
|
-
<KolLinkButton _href="#" _hideLabel
|
|
825
|
+
<KolLinkButton _href="#" _icons={{ top: 'codicon codicon-arrow-up' }} _label="danger" _variant="danger"></KolLinkButton>
|
|
826
|
+
<KolLinkButton _href="#" _disabled _icons={{ top: 'codicon codicon-arrow-up' }} _label="danger" _variant="danger"></KolLinkButton>
|
|
827
|
+
<KolLinkButton _href="#" _hideLabel _icons="codicon codicon-arrow-up" _label="danger" _variant="danger"></KolLinkButton>
|
|
828
828
|
</div>
|
|
829
829
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
830
|
-
<KolLinkButton _href="#"
|
|
831
|
-
<KolLinkButton _href="#" _disabled
|
|
832
|
-
<KolLinkButton _href="#" _hideLabel
|
|
830
|
+
<KolLinkButton _href="#" _icons={{ bottom: 'codicon codicon-arrow-down' }} _label="normal" _variant="normal"></KolLinkButton>
|
|
831
|
+
<KolLinkButton _href="#" _disabled _icons={{ bottom: 'codicon codicon-arrow-down' }} _label="normal" _variant="normal"></KolLinkButton>
|
|
832
|
+
<KolLinkButton _href="#" _hideLabel _icons="codicon codicon-arrow-down" _label="normal" _variant="normal"></KolLinkButton>
|
|
833
833
|
</div>
|
|
834
834
|
<div className="grid gap-2 grid-cols-[4fr_4fr_1fr] justify-items-center">
|
|
835
835
|
<KolLinkButton _href="#" _label="ghost" _variant="ghost"></KolLinkButton>
|
|
836
836
|
<KolLinkButton _href="#" _disabled _label="ghost" _variant="ghost"></KolLinkButton>
|
|
837
|
-
<KolLinkButton _href="#"
|
|
837
|
+
<KolLinkButton _href="#" _icons="codicon codicon-home" _hideLabel _label="ghost" _variant="ghost"></KolLinkButton>
|
|
838
838
|
</div>
|
|
839
839
|
</div>
|
|
840
840
|
</KolTabs>
|
|
@@ -845,8 +845,8 @@ export const HandoutBasic: FC = () => (
|
|
|
845
845
|
<KolAccordion _heading="Links" _level={3} _open>
|
|
846
846
|
<div className="grid gap-2" slot="content">
|
|
847
847
|
<KolLink _href="#" _label="Linktext"></KolLink>
|
|
848
|
-
<KolLink _href="#"
|
|
849
|
-
<KolLink _href="#"
|
|
848
|
+
<KolLink _href="#" _icons="codicon codicon-home" _label="Linktext mit Icon"></KolLink>
|
|
849
|
+
<KolLink _href="#" _icons="codicon codicon-home" _hideLabel _label="Linktext nur mit Icon"></KolLink>
|
|
850
850
|
<KolLink _href="/" _label="Besuchter Link"></KolLink>
|
|
851
851
|
<p>
|
|
852
852
|
Ich bin ein <KolLink _href="#" _label="externer Link" _target="w3c"></KolLink> im Fließtext.
|
|
@@ -859,8 +859,8 @@ export const HandoutBasic: FC = () => (
|
|
|
859
859
|
<KolAccordion _heading="ButtonLinks" _level={3}>
|
|
860
860
|
<div className="grid gap-2" slot="content">
|
|
861
861
|
<KolButtonLink _label="Linktext"></KolButtonLink>
|
|
862
|
-
<KolButtonLink
|
|
863
|
-
<KolButtonLink
|
|
862
|
+
<KolButtonLink _icons="codicon codicon-home" _label="Linktext mit Icon"></KolButtonLink>
|
|
863
|
+
<KolButtonLink _icons="codicon codicon-home" _hideLabel _label="Linktext nur mit Icon"></KolButtonLink>
|
|
864
864
|
<p>
|
|
865
865
|
Ich bin ein <KolButtonLink _label="Link"></KolButtonLink> im Fließtext.
|
|
866
866
|
</p>
|
|
@@ -868,7 +868,7 @@ export const HandoutBasic: FC = () => (
|
|
|
868
868
|
<KolLogo slot="expert" class="inline-flex w-50" _org={Bundesanstalt['Informationstechnikzentrum Bund']} />
|
|
869
869
|
</KolButtonLink>
|
|
870
870
|
<KolButtonLink
|
|
871
|
-
|
|
871
|
+
_icons={{
|
|
872
872
|
left: 'codicon codicon-arrow-left',
|
|
873
873
|
right: 'codicon codicon-arrow-right',
|
|
874
874
|
top: 'codicon codicon-arrow-up',
|
|
@@ -905,48 +905,48 @@ export const HandoutBasic: FC = () => (
|
|
|
905
905
|
_links={[
|
|
906
906
|
{
|
|
907
907
|
_label: 'Homepage',
|
|
908
|
-
|
|
908
|
+
_icons: 'codicon codicon-home',
|
|
909
909
|
_href: '#/',
|
|
910
910
|
},
|
|
911
911
|
{
|
|
912
912
|
_label: '2 Navigation point',
|
|
913
|
-
|
|
913
|
+
_icons: 'codicon codicon-home',
|
|
914
914
|
_href: '#/untermenu',
|
|
915
915
|
},
|
|
916
916
|
{
|
|
917
917
|
_active: true,
|
|
918
918
|
_label: '3 Navigation point',
|
|
919
919
|
_href: '#abc',
|
|
920
|
-
|
|
920
|
+
_icons: 'codicon codicon-home',
|
|
921
921
|
_children: [
|
|
922
922
|
{
|
|
923
923
|
_label: '3.1 Navigation point',
|
|
924
|
-
|
|
924
|
+
_icons: 'codicon codicon-home',
|
|
925
925
|
_href: '#/',
|
|
926
926
|
},
|
|
927
927
|
{
|
|
928
928
|
_label: '3.2 External navigation point',
|
|
929
|
-
|
|
929
|
+
_icons: 'codicon codicon-home',
|
|
930
930
|
_href: '#abc',
|
|
931
931
|
_target: '_blank',
|
|
932
932
|
},
|
|
933
933
|
{
|
|
934
934
|
_label: '3.3 Navigation point',
|
|
935
935
|
_href: '#abc',
|
|
936
|
-
|
|
936
|
+
_icons: 'codicon codicon-home',
|
|
937
937
|
_children: [
|
|
938
938
|
{
|
|
939
939
|
_active: true,
|
|
940
940
|
_label: '3.3.1 Navigation point (active)',
|
|
941
|
-
|
|
941
|
+
_icons: 'codicon codicon-home',
|
|
942
942
|
_href: '#abc',
|
|
943
943
|
},
|
|
944
|
-
{ _label: '3.3.2 Navigation point',
|
|
944
|
+
{ _label: '3.3.2 Navigation point', _icons: 'codicon codicon-home', _href: '#abc' },
|
|
945
945
|
],
|
|
946
946
|
},
|
|
947
947
|
],
|
|
948
948
|
},
|
|
949
|
-
{ _label: '3 Navigation point',
|
|
949
|
+
{ _label: '3 Navigation point', _icons: 'codicon codicon-home', _href: '#abc' },
|
|
950
950
|
]}
|
|
951
951
|
_hasCompactButton
|
|
952
952
|
/>
|
|
@@ -975,7 +975,7 @@ export const HandoutBasic: FC = () => (
|
|
|
975
975
|
<KolInputFile>Datei hochladen</KolInputFile>
|
|
976
976
|
<KolInputNumber>Zahleneingabe</KolInputNumber>
|
|
977
977
|
<KolInputDate _type="date">Datum</KolInputDate>
|
|
978
|
-
<KolInputEmail
|
|
978
|
+
<KolInputEmail _icons="{'left': 'codicon codicon-home'}" _error="Test einer Fehlermeldung" _touched>
|
|
979
979
|
E-Mail-Adresse
|
|
980
980
|
</KolInputEmail>
|
|
981
981
|
<KolInputText _hint="Ich bin ein Hinweis.">Vorname</KolInputText>
|
|
@@ -6,22 +6,22 @@ import { FC } from 'react';
|
|
|
6
6
|
export const HeadingBadged: FC = () => (
|
|
7
7
|
<div className="grid gap-4">
|
|
8
8
|
<KolHeading _label="" _level={1}>
|
|
9
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
9
|
+
Eine Überschrift mit einem <KolBadge _color="#f00" _label="Label"></KolBadge>
|
|
10
10
|
</KolHeading>
|
|
11
11
|
<KolHeading _label="" _level={2}>
|
|
12
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
12
|
+
Eine Überschrift mit einem <KolBadge _color="#0f0" _label="Label"></KolBadge>
|
|
13
13
|
</KolHeading>
|
|
14
14
|
<KolHeading _label="" _level={3}>
|
|
15
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
15
|
+
Eine Überschrift mit einem <KolBadge _color="#00f" _label="Label"></KolBadge>
|
|
16
16
|
</KolHeading>
|
|
17
17
|
<KolHeading _label="" _level={4}>
|
|
18
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
18
|
+
Eine Überschrift mit einem <KolBadge _color="#800080" _label="Label"></KolBadge>
|
|
19
19
|
</KolHeading>
|
|
20
20
|
<KolHeading _label="" _level={5}>
|
|
21
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
21
|
+
Eine Überschrift mit einem <KolBadge _color="#ff0" _label="Label"></KolBadge>
|
|
22
22
|
</KolHeading>
|
|
23
23
|
<KolHeading _label="" _level={6}>
|
|
24
|
-
Eine Überschrift mit einem <KolBadge _color="
|
|
24
|
+
Eine Überschrift mit einem <KolBadge _color="#ffc0cb" _label="Label"></KolBadge>
|
|
25
25
|
</KolHeading>
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
@@ -5,13 +5,13 @@ import { FC } from 'react';
|
|
|
5
5
|
|
|
6
6
|
export const IconBasic: FC = () => (
|
|
7
7
|
<div className="grid gap-4">
|
|
8
|
-
<KolIcon _ariaLabel=""
|
|
8
|
+
<KolIcon _ariaLabel="" _icons="codicon codicon-home" />
|
|
9
9
|
<KolIcon
|
|
10
10
|
style={{
|
|
11
11
|
color: 'red',
|
|
12
12
|
}}
|
|
13
13
|
_ariaLabel=""
|
|
14
|
-
|
|
14
|
+
_icons="codicon codicon-home"
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
17
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { FormWrap } from '../FormWrap';
|
|
2
3
|
import { InputCheckboxVariants } from './partials/variants';
|
|
3
|
-
import { FocusInput } from '../FocusInput';
|
|
4
4
|
|
|
5
|
-
export const InputCheckboxBasic: FC = () => <
|
|
5
|
+
export const InputCheckboxBasic: FC = () => <FormWrap RefComponent={InputCheckboxVariants} />;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormWrap } from '../FormWrap';
|
|
3
3
|
import { InputCheckboxVariants } from './partials/variants';
|
|
4
4
|
|
|
5
|
-
export const InputCheckboxButton: FC = () =>
|
|
6
|
-
<FocusInput
|
|
7
|
-
RefInput={InputCheckboxVariants}
|
|
8
|
-
props={{
|
|
9
|
-
_variant: 'button',
|
|
10
|
-
}}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
5
|
+
export const InputCheckboxButton: FC = () => <FormWrap RefComponent={InputCheckboxVariants} _variant="button" />;
|
|
@@ -10,7 +10,7 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
|
|
|
10
10
|
<div className="grid gap-4">
|
|
11
11
|
<KolInputCheckbox
|
|
12
12
|
{...props}
|
|
13
|
-
|
|
13
|
+
_icons={{
|
|
14
14
|
unchecked: 'codicon codicon-close',
|
|
15
15
|
}}
|
|
16
16
|
_label="Nicht ausgewählt"
|
|
@@ -18,7 +18,7 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
|
|
|
18
18
|
/>
|
|
19
19
|
<KolInputCheckbox
|
|
20
20
|
{...props}
|
|
21
|
-
|
|
21
|
+
_icons={{
|
|
22
22
|
unchecked: 'codicon codicon-close',
|
|
23
23
|
}}
|
|
24
24
|
_label="Unbestimmt (Indeterminate)"
|
|
@@ -29,7 +29,7 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
|
|
|
29
29
|
{...props}
|
|
30
30
|
ref={ref}
|
|
31
31
|
_checked
|
|
32
|
-
|
|
32
|
+
_icons={{
|
|
33
33
|
unchecked: 'codicon codicon-close',
|
|
34
34
|
}}
|
|
35
35
|
_label="Ausgewählt"
|
|
@@ -39,7 +39,7 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
|
|
|
39
39
|
<KolInputCheckbox
|
|
40
40
|
{...props}
|
|
41
41
|
_disabled
|
|
42
|
-
|
|
42
|
+
_icons={{
|
|
43
43
|
unchecked: 'codicon codicon-close',
|
|
44
44
|
}}
|
|
45
45
|
_label="Disabled"
|
|
@@ -49,7 +49,7 @@ export const InputCheckboxCases = forwardRef<HTMLKolInputCheckboxElement, Compon
|
|
|
49
49
|
<KolInputCheckbox
|
|
50
50
|
{...props}
|
|
51
51
|
_error={ERROR_MSG}
|
|
52
|
-
|
|
52
|
+
_icons={{
|
|
53
53
|
unchecked: 'codicon codicon-close',
|
|
54
54
|
}}
|
|
55
55
|
_label="Mit Fehler"
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { InputCheckboxVariants } from './partials/variants';
|
|
3
|
-
import {
|
|
3
|
+
import { FormWrap } from '../FormWrap';
|
|
4
4
|
|
|
5
|
-
export const InputCheckboxSwitch: FC = () =>
|
|
6
|
-
<FocusInput
|
|
7
|
-
RefInput={InputCheckboxVariants}
|
|
8
|
-
props={{
|
|
9
|
-
_variant: 'switch',
|
|
10
|
-
}}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
5
|
+
export const InputCheckboxSwitch: FC = () => <FormWrap RefComponent={InputCheckboxVariants} _variant="switch" />;
|