@public-ui/sample-react 2.1.7-rc.1 → 2.1.7
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/.gitignore +5 -1
- 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/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/4118.js +1 -1
- package/dist/4182.js +1 -1
- package/dist/4188.js +1 -1
- package/dist/4262.js +2 -0
- package/dist/4332.js +1 -1
- package/dist/4402.js +1 -1
- 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/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/8710.js +2 -0
- 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 +2 -0
- package/dist/9333.js.LICENSE.txt +3 -0
- 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/main.css +3 -2
- package/dist/main.js +1 -1
- package/package.json +11 -6
- package/src/components/Sidebar.tsx +45 -43
- package/src/components/abbr/basic.tsx +13 -13
- package/src/components/accordion/basic.tsx +5 -5
- package/src/components/accordion/headlines.tsx +12 -12
- package/src/components/alert/basic.tsx +6 -6
- package/src/components/alert/html.tsx +3 -3
- package/src/components/breadcrumb/basic.tsx +11 -11
- package/src/components/button/access-key.tsx +5 -5
- package/src/components/button/aria-description.tsx +17 -0
- package/src/components/button/routes.ts +2 -0
- package/src/components/button/width.tsx +1 -1
- package/src/components/button-link/aria-description.tsx +17 -0
- package/src/components/button-link/basic.tsx +7 -7
- package/src/components/button-link/icons.tsx +4 -4
- package/src/components/button-link/image.tsx +2 -2
- package/src/components/button-link/routes.ts +2 -0
- package/src/components/drawer/basic.tsx +2 -2
- package/src/components/handout/basic.tsx +69 -69
- package/src/components/handout/table-data.ts +538 -538
- package/src/components/heading/badged.tsx +6 -6
- package/src/components/input-checkbox/partials/cases.tsx +5 -5
- package/src/components/input-date/partials/cases.tsx +8 -8
- package/src/components/input-date/reset.tsx +21 -0
- package/src/components/input-date/routes.ts +2 -0
- package/src/components/input-email/partials/cases.tsx +1 -1
- package/src/components/input-file/partials/cases.tsx +3 -3
- package/src/components/input-number/partials/cases.tsx +8 -8
- package/src/components/input-password/show-password.tsx +3 -3
- package/src/components/input-radio/partials/cases.tsx +30 -15
- package/src/components/input-range/partials/cases.tsx +3 -3
- package/src/components/input-text/partials/cases.tsx +11 -11
- package/src/components/input-text/routes.ts +2 -0
- package/src/components/input-text/text-formatter.tsx +91 -0
- package/src/components/link/aria-description.tsx +17 -0
- package/src/components/link/basic.tsx +8 -7
- package/src/components/link/icons.tsx +5 -5
- package/src/components/link/image.tsx +2 -2
- package/src/components/link/routes.ts +2 -0
- package/src/components/link-button/aria-description.tsx +17 -0
- package/src/components/link-button/routes.ts +2 -0
- package/src/components/modal/basic.tsx +37 -18
- package/src/components/nav/links.ts +4 -4
- package/src/components/select/partials/cases.tsx +9 -9
- package/src/components/single-select/basic.tsx +23 -0
- package/src/components/single-select/partials/cases.tsx +39 -0
- package/src/components/single-select/partials/variants.tsx +19 -0
- package/src/components/single-select/routes.ts +8 -0
- package/src/components/skip-nav/basic.tsx +4 -4
- package/src/components/split-button/basic.tsx +2 -2
- package/src/components/split-button/routes.ts +2 -0
- package/src/components/split-button/with-context.tsx +37 -0
- package/src/components/table/interactive-child-elements.tsx +105 -0
- package/src/components/table/render-cell.tsx +1 -1
- package/src/components/table/routes.ts +6 -0
- package/src/components/table/stateful-with-selection.tsx +7 -7
- package/src/components/table/stateful-with-single-selection.tsx +84 -0
- package/src/components/table/stateless-with-selection.tsx +9 -6
- package/src/components/table/stateless-with-single-selection.tsx +68 -0
- package/src/components/tabs/basic.tsx +13 -13
- package/src/components/tabs/icons-only.tsx +8 -8
- package/src/scenarios/appointment-form/AppointmentForm.tsx +13 -13
- package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +6 -6
- package/src/scenarios/appointment-form/DistrictForm.tsx +8 -8
- package/src/scenarios/appointment-form/PersonalInformationForm.tsx +16 -16
- package/src/scenarios/appointment-form/Summary.tsx +6 -6
- package/src/scenarios/focus-elements.tsx +12 -0
- package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +80 -0
- package/src/scenarios/horizontal-scrollbar-advanced/databasedata.json +317 -0
- package/src/scenarios/horizontal-scrollbar-advanced/index.ts +1 -0
- package/src/scenarios/horizontal-scrollbar-advanced/layout.css +31 -0
- package/src/scenarios/inputs-get-value.tsx +36 -10
- package/src/scenarios/routes.ts +2 -0
- package/src/scenarios/static-form.tsx +9 -0
- package/src/shares/constants.ts +2 -2
- package/src/shares/routes.ts +2 -0
- package/src/style.scss +19 -1
- package/tsconfig.json +1 -1
- package/dist/4266.js +0 -2
- package/dist/4817.js +0 -2
- /package/dist/{4266.js.LICENSE.txt → 4262.js.LICENSE.txt} +0 -0
- /package/dist/{4817.js.LICENSE.txt → 8710.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "2.1.7
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"repository": {
|
|
@@ -33,9 +33,12 @@
|
|
|
33
33
|
"typescript": "5.5.4",
|
|
34
34
|
"world_countries_lists": "2.9.0",
|
|
35
35
|
"yup": "1.4.0",
|
|
36
|
-
"@public-ui/components": "2.1.7
|
|
37
|
-
"@public-ui/
|
|
38
|
-
"@public-ui/
|
|
36
|
+
"@public-ui/components": "2.1.7",
|
|
37
|
+
"@public-ui/react": "2.1.7",
|
|
38
|
+
"@public-ui/themes": "2.1.7"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@playwright/test": "1.45.3"
|
|
39
42
|
},
|
|
40
43
|
"files": [
|
|
41
44
|
".eslintignore",
|
|
@@ -55,11 +58,13 @@
|
|
|
55
58
|
"build": "rimraf dist && cross-env NODE_ENV=production webpack",
|
|
56
59
|
"build:deps": "pnpm --filter @public-ui/sample-react^... build",
|
|
57
60
|
"format": "prettier --check src",
|
|
58
|
-
"lint": "tsc --noemit && eslint \"{src,tests}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
|
|
61
|
+
"lint": "tsc --noemit && eslint \"{src,tests,e2e}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
|
|
59
62
|
"prepare:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" public/assets --dot",
|
|
60
63
|
"prepare:themes-assets": "cpy \"node_modules/@public-ui/themes/assets/**/*\" public/assets --dot",
|
|
61
64
|
"serve": "cross-env NODE_ENV=development webpack serve --devtool=source-map",
|
|
62
65
|
"start": "npm run serve -- --open",
|
|
63
|
-
"unused": "ts-prune -e src"
|
|
66
|
+
"unused": "ts-prune -e src",
|
|
67
|
+
"e2e": "playwright test",
|
|
68
|
+
"postinstall": "pnpm exec playwright install"
|
|
64
69
|
}
|
|
65
70
|
}
|
|
@@ -24,7 +24,7 @@ const ComponentNavContainer = ({ children, isMobile }: PropsWithChildren<{ isMob
|
|
|
24
24
|
{children}
|
|
25
25
|
</KolAccordion>
|
|
26
26
|
) : (
|
|
27
|
-
<div className="mt">{children}</div>
|
|
27
|
+
<div className="mt scrollable-container">{children}</div>
|
|
28
28
|
);
|
|
29
29
|
export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample, buildDate, commitHash, onThemeChange }) => {
|
|
30
30
|
/* KolSelect calls onChange initially by design - work around this with a state variable */
|
|
@@ -56,52 +56,54 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
|
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<aside className="app-sidebar p-4">
|
|
59
|
-
<div className="
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{(buildDate || commitHash) && (
|
|
64
|
-
<div className="text-sm font-mono color-gray-5 m-t-2">
|
|
65
|
-
{commitHash ? `Build: ${commitHash}` : ''}
|
|
66
|
-
<br />
|
|
67
|
-
{buildDate ? `at ${buildDate}` : ''}
|
|
59
|
+
<div className="scrollable-container-wrapper">
|
|
60
|
+
<div className="flex flex-justify-between flex-items-center">
|
|
61
|
+
<KolHeading _label="KoliBri React"></KolHeading>
|
|
62
|
+
<KolVersion _label={version}></KolVersion>
|
|
68
63
|
</div>
|
|
69
|
-
|
|
64
|
+
{(buildDate || commitHash) && (
|
|
65
|
+
<div className="text-sm font-mono color-gray-5 m-t-2">
|
|
66
|
+
{commitHash ? `Build: ${commitHash}` : ''}
|
|
67
|
+
<br />
|
|
68
|
+
{buildDate ? `at ${buildDate}` : ''}
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
<KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
<KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
|
|
75
|
+
<div className="flex flex-justify-between flex-items-center mt">
|
|
76
|
+
<KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
|
|
77
|
+
<span className="text-center">
|
|
78
|
+
{formatSampleAsLabel()} ({getIndexOfSample() + 1}/{routeList.length})
|
|
79
|
+
</span>
|
|
80
|
+
<KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
|
|
81
|
+
</div>
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
83
|
+
<ComponentNavContainer isMobile={isMobile}>
|
|
84
|
+
<nav>
|
|
85
|
+
<ul className="m0 p0 list-inside">
|
|
86
|
+
{Object.entries(routes).map(([parentName, children]) => (
|
|
87
|
+
<li key={parentName} className="mt-2">
|
|
88
|
+
{parentName}
|
|
89
|
+
<ul className="list-inside ml p0">
|
|
90
|
+
{Object.keys(children).map((childName) => (
|
|
91
|
+
<li key={`${parentName}/${childName}`}>
|
|
92
|
+
{/* Handle special case for nested routes in tree example - this might need a proper refactoring in the future */}
|
|
93
|
+
{parentName === 'tree' && childName === 'basic/:subPage' ? (
|
|
94
|
+
<KolLink _label="basic" _href={`#/${parentName}/basic/home`} _on={{ onClick: handleLinkClick }} />
|
|
95
|
+
) : (
|
|
96
|
+
<KolLink _label={childName} _href={`#/${parentName}/${childName}`} _on={{ onClick: handleLinkClick }} />
|
|
97
|
+
)}
|
|
98
|
+
</li>
|
|
99
|
+
))}
|
|
100
|
+
</ul>
|
|
101
|
+
</li>
|
|
102
|
+
))}
|
|
103
|
+
</ul>
|
|
104
|
+
</nav>
|
|
105
|
+
</ComponentNavContainer>
|
|
106
|
+
</div>
|
|
105
107
|
</aside>
|
|
106
108
|
);
|
|
107
109
|
};
|
|
@@ -11,35 +11,35 @@ export const AbbrBasic: FC = () => (
|
|
|
11
11
|
</SampleDescription>
|
|
12
12
|
|
|
13
13
|
<p>
|
|
14
|
-
|
|
14
|
+
I am <KolAbbr _label="zum Beispiel">e.g.</KolAbbr> an abbreviation.
|
|
15
15
|
</p>
|
|
16
16
|
<p>
|
|
17
|
-
|
|
17
|
+
I am{' '}
|
|
18
18
|
<KolAbbr _label="zum Beispiel" _tooltipAlign="right">
|
|
19
|
-
|
|
19
|
+
e.g.
|
|
20
20
|
</KolAbbr>{' '}
|
|
21
|
-
|
|
21
|
+
an abbreviation (right).
|
|
22
22
|
</p>
|
|
23
23
|
<p>
|
|
24
|
-
|
|
24
|
+
I am{' '}
|
|
25
25
|
<KolAbbr _label="zum Beispiel" _tooltipAlign="bottom">
|
|
26
|
-
|
|
26
|
+
e.g.
|
|
27
27
|
</KolAbbr>{' '}
|
|
28
|
-
|
|
28
|
+
an abbreviation (below).
|
|
29
29
|
</p>
|
|
30
30
|
<p>
|
|
31
|
-
|
|
31
|
+
I am{' '}
|
|
32
32
|
<KolAbbr _label="zum Beispiel" _tooltipAlign="left">
|
|
33
|
-
|
|
33
|
+
e.g.
|
|
34
34
|
</KolAbbr>{' '}
|
|
35
|
-
|
|
35
|
+
an abbreviation (left).
|
|
36
36
|
</p>
|
|
37
37
|
<p>
|
|
38
|
-
|
|
38
|
+
I am{' '}
|
|
39
39
|
<KolAbbr _label="zum Beispiel" _tooltipAlign="top">
|
|
40
|
-
|
|
40
|
+
e.g.
|
|
41
41
|
</KolAbbr>{' '}
|
|
42
|
-
|
|
42
|
+
an abbreviation (top).
|
|
43
43
|
</p>
|
|
44
44
|
</>
|
|
45
45
|
);
|
|
@@ -15,11 +15,11 @@ export const AccordionBasic: FC = () => (
|
|
|
15
15
|
</SampleDescription>
|
|
16
16
|
|
|
17
17
|
<div className="grid gap-4">
|
|
18
|
-
<KolAccordion _label="
|
|
19
|
-
<KolAccordion _label="
|
|
20
|
-
<KolAccordion _label="
|
|
21
|
-
<KolAccordion _label="
|
|
22
|
-
|
|
18
|
+
<KolAccordion _label="Heading Accordion Tab 1">Contents Accordion Tab 1</KolAccordion>
|
|
19
|
+
<KolAccordion _label="Heading Accordion Tab 2">Contents Accordion Tab 2</KolAccordion>
|
|
20
|
+
<KolAccordion _label="Heading Accordion Tab 2 (deactivated)" _disabled></KolAccordion>
|
|
21
|
+
<KolAccordion _label="Heading Accordion Tab 2 (disabled and open)" _disabled _open>
|
|
22
|
+
Contents Accordion Tab 2
|
|
23
23
|
</KolAccordion>
|
|
24
24
|
</div>
|
|
25
25
|
</>
|
|
@@ -11,23 +11,23 @@ export const AccordionHeadlines: FC = () => (
|
|
|
11
11
|
</SampleDescription>
|
|
12
12
|
|
|
13
13
|
<div className="grid gap-4">
|
|
14
|
-
<KolAccordion _label="
|
|
15
|
-
|
|
14
|
+
<KolAccordion _label="Heading Level 1" _level={1}>
|
|
15
|
+
Contents Accordion Tab 1
|
|
16
16
|
</KolAccordion>
|
|
17
|
-
<KolAccordion _label="
|
|
18
|
-
|
|
17
|
+
<KolAccordion _label="Heading Level 2" _level={2}>
|
|
18
|
+
Contents Accordion Tab 2
|
|
19
19
|
</KolAccordion>
|
|
20
|
-
<KolAccordion _label="
|
|
21
|
-
|
|
20
|
+
<KolAccordion _label="Heading Level 3" _level={3}>
|
|
21
|
+
Contents Accordion Tab 3
|
|
22
22
|
</KolAccordion>
|
|
23
|
-
<KolAccordion _label="
|
|
24
|
-
|
|
23
|
+
<KolAccordion _label="Heading Level 4" _level={4}>
|
|
24
|
+
Contents Accordion Tab 4
|
|
25
25
|
</KolAccordion>
|
|
26
|
-
<KolAccordion _label="
|
|
27
|
-
|
|
26
|
+
<KolAccordion _label="Heading Level 5" _level={5}>
|
|
27
|
+
Contents Accordion Tab 5
|
|
28
28
|
</KolAccordion>
|
|
29
|
-
<KolAccordion _label="
|
|
30
|
-
|
|
29
|
+
<KolAccordion _label="Heading Level 6" _level={6}>
|
|
30
|
+
Contents Accordion Tab 6
|
|
31
31
|
</KolAccordion>
|
|
32
32
|
</div>
|
|
33
33
|
</>
|
|
@@ -15,17 +15,17 @@ type PropsBasic = {
|
|
|
15
15
|
|
|
16
16
|
const AlertByType: FC<PropsByType> = ({ level, type, variant }) => (
|
|
17
17
|
<>
|
|
18
|
-
<KolAlert _label="
|
|
19
|
-
|
|
18
|
+
<KolAlert _label="This is the headline of the alert." _level={level} _type={type} _variant={variant}>
|
|
19
|
+
This is the text of the alert.
|
|
20
20
|
</KolAlert>
|
|
21
21
|
<KolAlert _type={type} _variant={variant}>
|
|
22
|
-
In
|
|
22
|
+
In this alert, only the text without the heading is used.
|
|
23
23
|
</KolAlert>
|
|
24
|
-
<KolAlert _label="
|
|
25
|
-
|
|
24
|
+
<KolAlert _label="This is the headline of the alert." _level={level} _type={type} _variant={variant} _hasCloser>
|
|
25
|
+
This is the text of the alert. With close button.
|
|
26
26
|
</KolAlert>
|
|
27
27
|
<KolAlert _type={type} _variant={variant} _hasCloser>
|
|
28
|
-
In
|
|
28
|
+
In this alert, only the text without the heading is used. With close button.
|
|
29
29
|
</KolAlert>
|
|
30
30
|
</>
|
|
31
31
|
);
|
|
@@ -11,11 +11,11 @@ export const AlertHtml: FC = () => (
|
|
|
11
11
|
</SampleDescription>
|
|
12
12
|
|
|
13
13
|
<div>
|
|
14
|
-
<KolAlert _label="
|
|
15
|
-
<h2 className="mt-2 mb-3">
|
|
14
|
+
<KolAlert _label="Output of HTML code in the alert" _type="info">
|
|
15
|
+
<h2 className="mt-2 mb-3">An H2 heading is output here</h2>
|
|
16
16
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
17
17
|
<div>
|
|
18
|
-
<h3>Text in
|
|
18
|
+
<h3>Text in a left-hand column</h3>
|
|
19
19
|
<p>
|
|
20
20
|
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quidem sed fugiat dolorum ratione et, ullam officia nobis nihil debitis, consectetur
|
|
21
21
|
dicta accusantium. Vitae debitis, quibusdam vel recusandae deleniti placeat dolorem?
|
|
@@ -15,43 +15,43 @@ export const BreadcrumbBasic: FC = () => (
|
|
|
15
15
|
<KolBreadcrumb
|
|
16
16
|
_label="Breadcrumb aus Text-Links"
|
|
17
17
|
_links={[
|
|
18
|
-
{ _label: '
|
|
19
|
-
{ _label: '
|
|
18
|
+
{ _label: 'Homepage', _href: '#/back-page' },
|
|
19
|
+
{ _label: 'Bottom of the homepage', _href: '#/back-page' },
|
|
20
20
|
{
|
|
21
|
-
_label: '
|
|
21
|
+
_label: 'Underside of the underside',
|
|
22
22
|
_href: '#/back-page',
|
|
23
23
|
},
|
|
24
24
|
]}
|
|
25
25
|
></KolBreadcrumb>
|
|
26
26
|
<KolBreadcrumb
|
|
27
|
-
_label="Breadcrumb
|
|
27
|
+
_label="Breadcrumb from icons or text links"
|
|
28
28
|
_links={[
|
|
29
29
|
{
|
|
30
|
-
_label: '
|
|
30
|
+
_label: 'Homepage',
|
|
31
31
|
_icons: 'codicon codicon-home',
|
|
32
32
|
_hideLabel: true,
|
|
33
33
|
_href: '#/back-page',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
_label: '
|
|
36
|
+
_label: 'Subpage of the start page with very long link test',
|
|
37
37
|
_href: '#/back-page',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
_label: '
|
|
40
|
+
_label: 'Underside of the underside',
|
|
41
41
|
_href: '#/back-page',
|
|
42
42
|
},
|
|
43
43
|
]}
|
|
44
44
|
></KolBreadcrumb>
|
|
45
45
|
<KolBreadcrumb
|
|
46
|
-
_label="Breadcrumb
|
|
46
|
+
_label="Breadcrumb from icons and text links"
|
|
47
47
|
_links={[
|
|
48
|
-
{ _label: '
|
|
48
|
+
{ _label: 'Homepage', _icons: 'codicon codicon-home', _href: '#/back-page' },
|
|
49
49
|
{
|
|
50
|
-
_label: '
|
|
50
|
+
_label: 'Subpage of the main page and I_am_a_really_long_compound_word_trying_to_break_the_layout',
|
|
51
51
|
_href: '#/back-page',
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
_label: '
|
|
54
|
+
_label: 'Underside of the underside',
|
|
55
55
|
_href: '#/back-page',
|
|
56
56
|
},
|
|
57
57
|
]}
|
|
@@ -14,12 +14,12 @@ export const ButtonAccessKey: FC = () => (
|
|
|
14
14
|
</SampleDescription>
|
|
15
15
|
|
|
16
16
|
<div className="flex flex-wrap gap-4">
|
|
17
|
-
<KolButton _label="
|
|
18
|
-
<KolButton _label="
|
|
19
|
-
<KolButton _label="Access key
|
|
20
|
-
<KolButton _label="access key
|
|
17
|
+
<KolButton _label="With S access key" _accessKey="S"></KolButton>
|
|
18
|
+
<KolButton _label="Very small s" _accessKey="s"></KolButton>
|
|
19
|
+
<KolButton _label="Access key does not appear in label" _accessKey="x"></KolButton>
|
|
20
|
+
<KolButton _label="access key without label" _hideLabel _accessKey="s" _icons="codicon codicon-dashboard"></KolButton>
|
|
21
21
|
<KolButton
|
|
22
|
-
_label="
|
|
22
|
+
_label="with inline icons"
|
|
23
23
|
_icons={{
|
|
24
24
|
left: 'codicon codicon-dashboard',
|
|
25
25
|
right: 'codicon codicon-dashboard',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KolButton } from '@public-ui/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
import { SampleDescription } from '../SampleDescription';
|
|
5
|
+
|
|
6
|
+
export const ButtonAriaDescription: FC = () => (
|
|
7
|
+
<>
|
|
8
|
+
<SampleDescription>
|
|
9
|
+
<p>This sample shows KolButton with aria-description</p>
|
|
10
|
+
</SampleDescription>
|
|
11
|
+
|
|
12
|
+
<div className="flex flex-wrap gap-4">
|
|
13
|
+
<KolButton _label="Button Text without area description"></KolButton>
|
|
14
|
+
<KolButton _label="Button Text" _ariaDescription="Button Area Description"></KolButton>
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
2
|
import { ButtonAccessKey } from './access-key';
|
|
3
|
+
import { ButtonAriaDescription } from './aria-description';
|
|
3
4
|
import { ButtonBaselined } from './baselined';
|
|
4
5
|
import { ButtonBasic } from './basic';
|
|
5
6
|
import { ButtonIcons } from './icons';
|
|
@@ -11,6 +12,7 @@ export const BUTTON_ROUTES: Routes = {
|
|
|
11
12
|
icons: ButtonIcons,
|
|
12
13
|
width: ButtonWidth,
|
|
13
14
|
'access-key': ButtonAccessKey,
|
|
15
|
+
'aria-description': ButtonAriaDescription,
|
|
14
16
|
baselined: ButtonBaselined,
|
|
15
17
|
},
|
|
16
18
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KolButtonLink } from '@public-ui/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
import { SampleDescription } from '../SampleDescription';
|
|
5
|
+
|
|
6
|
+
export const ButtonLinkAriaDescription: FC = () => (
|
|
7
|
+
<>
|
|
8
|
+
<SampleDescription>
|
|
9
|
+
<p>This sample shows KolButtonLink with aria-description</p>
|
|
10
|
+
</SampleDescription>
|
|
11
|
+
|
|
12
|
+
<div className="flex flex-wrap gap-4">
|
|
13
|
+
<KolButtonLink _label="Button Text without area description"></KolButtonLink>
|
|
14
|
+
<KolButtonLink _label="Button Text" _ariaDescription="Button Area Description"></KolButtonLink>
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
@@ -15,18 +15,18 @@ export const ButtonLinkBasic: FC = () => (
|
|
|
15
15
|
</SampleDescription>
|
|
16
16
|
<div>
|
|
17
17
|
<p>
|
|
18
|
-
In
|
|
19
|
-
<strong>inline
|
|
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
|
+
<strong>inline element</strong>.
|
|
20
20
|
</p>
|
|
21
21
|
<p>
|
|
22
|
-
In
|
|
23
|
-
<KolButtonLink style={{ display: 'inline-block', margin: '1rem', border: '1px dotted' }} _label="Simple Link" />.
|
|
24
|
-
|
|
22
|
+
In this paragraph, a link is inserted that is rendered as an inline-block element.
|
|
23
|
+
<KolButtonLink style={{ display: 'inline-block', margin: '1rem', border: '1px dotted' }} _label="Simple Link" />. This allows you to assign width,
|
|
24
|
+
height, and other properties to it using CSS styles.
|
|
25
25
|
<br />
|
|
26
26
|
<br />
|
|
27
|
-
|
|
27
|
+
After that, there is a link that is rendered as a block element.
|
|
28
28
|
<KolButtonLink style={{ display: 'block' }} _label="Simple Link" />
|
|
29
|
-
|
|
29
|
+
Therefore, I go over the entire width of the parent element to create a line break.
|
|
30
30
|
</p>
|
|
31
31
|
<p>
|
|
32
32
|
<KolButtonLink _label="Disabled ButtonLink" _disabled />
|
|
@@ -17,19 +17,19 @@ export const ButtonLinkIcons: FC = () => (
|
|
|
17
17
|
_icons={{
|
|
18
18
|
right: 'codicon codicon-home',
|
|
19
19
|
}}
|
|
20
|
-
_label="
|
|
20
|
+
_label="I am a link with an icon on the right"
|
|
21
21
|
/>
|
|
22
22
|
<KolButtonLink
|
|
23
23
|
_icons={{
|
|
24
24
|
top: 'codicon codicon-home',
|
|
25
25
|
}}
|
|
26
|
-
_label="
|
|
26
|
+
_label="I am a link with an icon at the top"
|
|
27
27
|
/>
|
|
28
28
|
<KolButtonLink
|
|
29
29
|
_icons={{
|
|
30
30
|
bottom: 'codicon codicon-home',
|
|
31
31
|
}}
|
|
32
|
-
_label="
|
|
32
|
+
_label="I am a link with icon below"
|
|
33
33
|
/>
|
|
34
34
|
<KolButtonLink
|
|
35
35
|
_icons={{
|
|
@@ -38,7 +38,7 @@ export const ButtonLinkIcons: FC = () => (
|
|
|
38
38
|
bottom: 'codicon codicon-home',
|
|
39
39
|
left: 'codicon codicon-home',
|
|
40
40
|
}}
|
|
41
|
-
_label="
|
|
41
|
+
_label="I am a link with all icons"
|
|
42
42
|
/>
|
|
43
43
|
</div>
|
|
44
44
|
</>
|
|
@@ -12,10 +12,10 @@ export const ButtonLinkImage: FC = () => (
|
|
|
12
12
|
</SampleDescription>
|
|
13
13
|
|
|
14
14
|
<div className="grid gap-4">
|
|
15
|
-
<KolButtonLink _label="
|
|
15
|
+
<KolButtonLink _label="I am a link that is rendered as text" />
|
|
16
16
|
<br />
|
|
17
17
|
<KolButtonLink _label="">
|
|
18
|
-
<img alt="
|
|
18
|
+
<img alt="Presentation of the KoliBri theming" slot="expert" src="abgrenzung.jpg" width="300" />
|
|
19
19
|
</KolButtonLink>
|
|
20
20
|
</div>
|
|
21
21
|
</>
|
|
@@ -2,11 +2,13 @@ import { Routes } from '../../shares/types';
|
|
|
2
2
|
import { ButtonLinkBasic } from './basic';
|
|
3
3
|
import { ButtonLinkIcons } from './icons';
|
|
4
4
|
import { ButtonLinkImage } from './image';
|
|
5
|
+
import { ButtonLinkAriaDescription } from './aria-description';
|
|
5
6
|
|
|
6
7
|
export const BUTTON_LINK_ROUTES: Routes = {
|
|
7
8
|
'button-link': {
|
|
8
9
|
basic: ButtonLinkBasic,
|
|
9
10
|
icons: ButtonLinkIcons,
|
|
10
11
|
image: ButtonLinkImage,
|
|
12
|
+
'aria-description': ButtonLinkAriaDescription,
|
|
11
13
|
},
|
|
12
14
|
};
|
|
@@ -33,7 +33,7 @@ export const DrawerBasic: FC = () => {
|
|
|
33
33
|
|
|
34
34
|
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
|
|
35
35
|
<div className="flex flex-wrap gap-4">
|
|
36
|
-
<KolDrawer ref={drawerElement} _label="
|
|
36
|
+
<KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
|
|
37
37
|
<p>
|
|
38
38
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
39
39
|
voluptua.
|
|
@@ -45,7 +45,7 @@ export const DrawerBasic: FC = () => {
|
|
|
45
45
|
ref={drawerModalElement}
|
|
46
46
|
_modal
|
|
47
47
|
_align={align}
|
|
48
|
-
_label="
|
|
48
|
+
_label="I am a Drawer Modal"
|
|
49
49
|
_on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
|
|
50
50
|
>
|
|
51
51
|
<p>
|