@public-ui/sample-react 2.1.7 → 2.1.8
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/1487.js +1 -1
- package/dist/1636.js +1 -1
- package/dist/1792.js +1 -1
- package/dist/1795.js +1 -1
- package/dist/2017.js +1 -1
- package/dist/2322.js +1 -1
- package/dist/2538.js +1 -1
- package/dist/2567.js +1 -1
- package/dist/263.js +1 -1
- package/dist/2719.js +1 -1
- package/dist/3064.js +1 -1
- package/dist/3077.js +1 -1
- package/dist/3238.js +1 -1
- package/dist/3301.js +2 -0
- package/dist/3395.js +1 -1
- package/dist/35.js +1 -1
- package/dist/3521.js +1 -1
- package/dist/356.js +1 -1
- package/dist/3714.js +1 -1
- package/dist/3735.js +1 -1
- package/dist/3766.js +1 -1
- package/dist/3994.js +1 -1
- package/dist/4025.js +1 -1
- package/dist/4065.js +2 -0
- package/dist/4118.js +1 -1
- package/dist/4182.js +1 -1
- package/dist/4188.js +1 -1
- package/dist/4332.js +1 -1
- package/dist/4402.js +1 -1
- package/dist/4795.js +2 -0
- package/dist/4818.js +1 -1
- package/dist/4892.js +1 -1
- package/dist/4933.js +1 -1
- package/dist/4943.js +1 -1
- package/dist/495.js +1 -1
- package/dist/5034.js +1 -1
- package/dist/5056.js +1 -1
- package/dist/5138.js +1 -1
- package/dist/5296.js +1 -1
- package/dist/5356.js +1 -1
- package/dist/5551.js +1 -1
- package/dist/5835.js +1 -1
- package/dist/5840.js +1 -1
- package/dist/5889.js +1 -1
- package/dist/5912.js +1 -1
- package/dist/6082.js +1 -1
- package/dist/6099.js +1 -1
- package/dist/6181.js +1 -1
- package/dist/619.js +1 -1
- package/dist/6671.js +1 -1
- package/dist/6775.js +1 -1
- package/dist/7274.js +1 -1
- package/dist/7440.js +2 -0
- package/dist/7795.js +1 -1
- package/dist/7802.js +1 -1
- package/dist/7860.js +1 -1
- package/dist/8092.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8146.js +1 -1
- package/dist/8427.js +1 -1
- package/dist/8495.js +1 -1
- package/dist/8672.js +1 -1
- package/dist/8737.js +1 -1
- package/dist/8786.js +1 -1
- package/dist/8796.js +1 -1
- package/dist/8977.js +1 -1
- package/dist/9333.js +1 -1
- package/dist/9389.js +1 -1
- package/dist/9561.js +1 -1
- package/dist/9599.js +1 -1
- package/dist/9612.js +1 -1
- package/dist/9890.js +1 -1
- package/dist/index.html +1 -1
- package/dist/main.css +3 -3
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +16 -16
- package/public/index.html +1 -1
- package/src/@shared/_mixins.scss +3 -0
- package/src/App.tsx +1 -1
- package/src/components/FormWrap.tsx +1 -1
- package/src/components/Navigation.tsx +63 -0
- package/src/components/Sidebar.tsx +5 -41
- package/src/components/abbr/basic.tsx +12 -12
- package/src/components/alert/card-msg.tsx +3 -1
- package/src/components/alert/html.tsx +4 -2
- package/src/components/button/access-key.tsx +34 -25
- package/src/components/button/aria-description.tsx +20 -11
- package/src/components/button/baselined.tsx +22 -13
- package/src/components/button/icons.tsx +33 -26
- package/src/components/button/partials/cases.tsx +13 -6
- package/src/components/button/partials/variants.tsx +15 -17
- package/src/components/button/width.tsx +33 -28
- package/src/components/button-group/basic.tsx +25 -16
- package/src/components/button-link/basic.tsx +3 -3
- package/src/components/button-link/image.tsx +0 -1
- package/src/components/card/basic.tsx +1 -1
- package/src/components/combobox/partials/variants.tsx +1 -1
- package/src/components/details/basic.tsx +2 -2
- package/src/components/form/basic.tsx +1 -1
- package/src/components/form/error-list.tsx +1 -0
- package/src/components/handout/basic.tsx +304 -279
- package/src/components/input-checkbox/partials/variants.tsx +22 -10
- package/src/components/input-date/reset.tsx +1 -1
- package/src/components/input-password/show-password.tsx +1 -1
- package/src/components/input-text/partials/cases.tsx +1 -1
- package/src/components/input-text/routes.ts +2 -0
- package/src/components/input-text/smart-button.tsx +33 -0
- package/src/components/input-text/text-formatter.tsx +98 -45
- package/src/components/link/image.tsx +0 -1
- package/src/components/link/target.tsx +1 -1
- package/src/components/modal/basic.tsx +1 -1
- package/src/components/nav/basic.tsx +23 -12
- package/src/components/nav/horizontal.tsx +12 -3
- package/src/components/nav/links.ts +36 -0
- package/src/components/table/column-alignment.tsx +64 -62
- package/src/components/table/complex-headers.tsx +80 -78
- package/src/components/table/horizontal-scrollbar.tsx +30 -28
- package/src/components/table/interactive-child-elements.tsx +81 -69
- package/src/components/table/pagination-position.tsx +15 -13
- package/src/components/table/render-cell.tsx +14 -3
- package/src/components/table/sort-data.tsx +11 -8
- package/src/components/table/stateful-with-selection.tsx +47 -27
- package/src/components/table/stateful-with-single-selection.tsx +47 -27
- package/src/components/table/stateless-with-selection.tsx +37 -17
- package/src/components/table/stateless-with-single-selection.tsx +37 -17
- package/src/components/table/stateless.tsx +29 -27
- package/src/components/table/with-footer.tsx +1 -0
- package/src/components/table/with-pagination.tsx +1 -1
- package/src/components/tabs/behavior.tsx +61 -0
- package/src/components/tabs/routes.ts +2 -0
- package/src/components/textarea/adjust-height.tsx +1 -1
- package/src/components/textarea/counter.tsx +4 -1
- package/src/components/textarea/resize.tsx +1 -1
- package/src/components/textarea/rows.tsx +1 -1
- package/src/components/toast/basic.tsx +13 -11
- package/src/hooks/useToasterService.ts +21 -0
- package/src/react.main.tsx +6 -1
- package/src/scenarios/appointment-form/AppointmentForm.tsx +1 -0
- package/src/scenarios/custom-tooltip-width.tsx +26 -11
- package/src/scenarios/disabled-interactive-elements.tsx +123 -114
- package/src/scenarios/focus-elements.tsx +21 -16
- package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +1 -1
- package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +19 -0
- package/src/scenarios/input-group-with-error.tsx +41 -0
- package/src/scenarios/inputs-get-value.tsx +121 -119
- package/src/scenarios/routes.ts +4 -2
- package/src/scenarios/static-form.tsx +65 -62
- package/src/style.scss +10 -13
- package/tsconfig.json +1 -2
- package/unocss.config.ts +213 -0
- package/dist/3171.js +0 -2
- package/dist/4262.js +0 -2
- package/dist/479.js +0 -2
- package/dist/8710.js +0 -2
- package/src/scenarios/horizontal-scrollbar-advanced/layout.css +0 -31
- /package/dist/{3171.js.LICENSE.txt → 3301.js.LICENSE.txt} +0 -0
- /package/dist/{4262.js.LICENSE.txt → 4065.js.LICENSE.txt} +0 -0
- /package/dist/{479.js.LICENSE.txt → 4795.js.LICENSE.txt} +0 -0
- /package/dist/{8710.js.LICENSE.txt → 7440.js.LICENSE.txt} +0 -0
|
@@ -4,35 +4,40 @@ import { KolButton } from '@public-ui/react';
|
|
|
4
4
|
|
|
5
5
|
import type { FC } from 'react';
|
|
6
6
|
import { SampleDescription } from '../SampleDescription';
|
|
7
|
+
import { useToasterService } from '../../hooks/useToasterService';
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
_on: {
|
|
11
|
-
onClick: () => alert('Click!'),
|
|
12
|
-
},
|
|
13
|
-
};
|
|
9
|
+
export const ButtonWidth: FC = () => {
|
|
10
|
+
const { dummyClickEventHandler } = useToasterService();
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const ARGS = {
|
|
13
|
+
className: 'w-8rem',
|
|
14
|
+
_on: {
|
|
15
|
+
onClick: dummyClickEventHandler,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<KolButton
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<SampleDescription>
|
|
22
|
+
<p>This sample shows KolButton with adjusted widths.</p>
|
|
23
|
+
</SampleDescription>
|
|
24
|
+
|
|
25
|
+
<div className="grid gap-14">
|
|
26
|
+
<div className="flex flex-wrap gap-4">
|
|
27
|
+
<KolButton _label="Primary" _variant="primary" {...ARGS}></KolButton>
|
|
28
|
+
<KolButton _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
|
|
29
|
+
<KolButton _label="Normal" _variant="normal" {...ARGS}></KolButton>
|
|
30
|
+
<KolButton _label="Danger" _variant="danger" {...ARGS}></KolButton>
|
|
31
|
+
<KolButton _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
|
|
32
|
+
</div>
|
|
33
|
+
<div className="flex flex-wrap gap-4">
|
|
34
|
+
<KolButton _disabled _label="Primary" _variant="primary" {...ARGS}></KolButton>
|
|
35
|
+
<KolButton _disabled _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
|
|
36
|
+
<KolButton _disabled _label="Normal" _variant="normal" {...ARGS}></KolButton>
|
|
37
|
+
<KolButton _disabled _label="Danger" _variant="danger" {...ARGS}></KolButton>
|
|
38
|
+
<KolButton _disabled _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
|
|
39
|
+
</div>
|
|
35
40
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -4,22 +4,31 @@ import { KolBadge, KolButton, KolButtonGroup } from '@public-ui/react';
|
|
|
4
4
|
import { SampleDescription } from '../SampleDescription';
|
|
5
5
|
|
|
6
6
|
import type { FC } from 'react';
|
|
7
|
+
import { useToasterService } from '../../hooks/useToasterService';
|
|
7
8
|
|
|
8
|
-
export const ButtonGroupBasic: FC = () =>
|
|
9
|
-
|
|
10
|
-
<SampleDescription>
|
|
11
|
-
<p>KolButtonGroup shows multiple KolButton-elements visually grouped together.</p>
|
|
9
|
+
export const ButtonGroupBasic: FC = () => {
|
|
10
|
+
const { dummyClickEventHandler } = useToasterService();
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</SampleDescription>
|
|
12
|
+
const dummyEventHandler = {
|
|
13
|
+
onClick: dummyClickEventHandler,
|
|
14
|
+
};
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<SampleDescription>
|
|
19
|
+
<p>KolButtonGroup shows multiple KolButton-elements visually grouped together.</p>
|
|
20
|
+
|
|
21
|
+
<p>
|
|
22
|
+
<KolBadge _label="The component is deprecated and won't be available anymore in KoliBri version 3." _color="#db5461" />
|
|
23
|
+
</p>
|
|
24
|
+
</SampleDescription>
|
|
25
|
+
|
|
26
|
+
<KolButtonGroup>
|
|
27
|
+
<KolButton _label="Active" _variant="primary" _on={dummyEventHandler}></KolButton>
|
|
28
|
+
<KolButton _label="Not active" _disabled></KolButton>
|
|
29
|
+
<KolButton _label="Active" _icons="codicon codicon-home" _variant="danger" _on={dummyEventHandler}></KolButton>
|
|
30
|
+
<KolButton _label="Active" _icons="codicon codicon-trash" _hideLabel _variant="ghost" _on={dummyEventHandler}></KolButton>
|
|
31
|
+
</KolButtonGroup>
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -13,14 +13,14 @@ export const ButtonLinkBasic: FC = () => (
|
|
|
13
13
|
such as <code>block</code>, <code>inline-block</code> and <code>inline</code>. It also demonstrates the disabled-state.
|
|
14
14
|
</p>
|
|
15
15
|
</SampleDescription>
|
|
16
|
-
<
|
|
16
|
+
<section className="text-base">
|
|
17
17
|
<p>
|
|
18
18
|
In this paragraph, a link is inserted that contains no additional attributes. <KolButtonLink _label="Simple Link" /> It is rendered by default as an{' '}
|
|
19
19
|
<strong>inline element</strong>.
|
|
20
20
|
</p>
|
|
21
21
|
<p>
|
|
22
22
|
In this paragraph, a link is inserted that is rendered as an inline-block element.
|
|
23
|
-
<KolButtonLink style={{ display: 'inline-block',
|
|
23
|
+
<KolButtonLink className="m-4" style={{ display: 'inline-block', border: '1px dotted' }} _label="Simple Link" />. This allows you to assign width,
|
|
24
24
|
height, and other properties to it using CSS styles.
|
|
25
25
|
<br />
|
|
26
26
|
<br />
|
|
@@ -31,6 +31,6 @@ export const ButtonLinkBasic: FC = () => (
|
|
|
31
31
|
<p>
|
|
32
32
|
<KolButtonLink _label="Disabled ButtonLink" _disabled />
|
|
33
33
|
</p>
|
|
34
|
-
</
|
|
34
|
+
</section>
|
|
35
35
|
</>
|
|
36
36
|
);
|
|
@@ -13,7 +13,6 @@ export const ButtonLinkImage: FC = () => (
|
|
|
13
13
|
|
|
14
14
|
<div className="grid gap-4">
|
|
15
15
|
<KolButtonLink _label="I am a link that is rendered as text" />
|
|
16
|
-
<br />
|
|
17
16
|
<KolButtonLink _label="">
|
|
18
17
|
<img alt="Presentation of the KoliBri theming" slot="expert" src="abgrenzung.jpg" width="300" />
|
|
19
18
|
</KolButtonLink>
|
|
@@ -11,7 +11,7 @@ export const CardBasic: FC = () => (
|
|
|
11
11
|
<p>KolCard shows a card with title and slot content. The second sample features a close button.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
13
|
|
|
14
|
-
<div className="grid grid-cols-2 gap-4">
|
|
14
|
+
<div className="w-full grid grid-cols-2 gap-4">
|
|
15
15
|
<KolCard _label="Card with title and content">
|
|
16
16
|
<div>Card contents.</div>
|
|
17
17
|
</KolCard>
|
|
@@ -5,7 +5,7 @@ import { ComboboxCases } from './cases';
|
|
|
5
5
|
|
|
6
6
|
export const ComboboxVariants = (props: Partial<Components.KolCombobox>) => {
|
|
7
7
|
return (
|
|
8
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
8
|
+
<div className="w-full grid md:grid-cols-2 gap-4">
|
|
9
9
|
<fieldset>
|
|
10
10
|
<legend>Text</legend>
|
|
11
11
|
<ComboboxCases {...props} />
|
|
@@ -14,7 +14,7 @@ export const DetailsBasic: FC = () => (
|
|
|
14
14
|
</p>
|
|
15
15
|
</SampleDescription>
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<section className="grid gap-4">
|
|
18
18
|
<KolDetails _label="Closed initially">
|
|
19
19
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
20
20
|
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.
|
|
@@ -30,6 +30,6 @@ export const DetailsBasic: FC = () => (
|
|
|
30
30
|
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.
|
|
31
31
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
|
|
32
32
|
</KolDetails>
|
|
33
|
-
</
|
|
33
|
+
</section>
|
|
34
34
|
</>
|
|
35
35
|
);
|
|
@@ -9,7 +9,7 @@ export const FormBasic: FC = () => (
|
|
|
9
9
|
<p>KolForm renders a form around the input components provided in a slot. This sample shows a basic form with three input fields.</p>
|
|
10
10
|
</SampleDescription>
|
|
11
11
|
|
|
12
|
-
<KolForm>
|
|
12
|
+
<KolForm className="w-full">
|
|
13
13
|
<div className="grid gap-2">
|
|
14
14
|
<KolInputText id="input1" _label="Input 1" />
|
|
15
15
|
<KolInputText id="input2" _label="Input 2" />
|