@public-ui/sample-react 3.0.0-rc.1 → 3.0.0-rc.11
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/1006.js +2 -0
- package/dist/1752.js +2 -0
- package/dist/1932.js +2 -0
- package/dist/2069.js +2 -0
- package/dist/2212.js +2 -0
- package/dist/2231.js +2 -0
- package/dist/2321.js +2 -0
- package/dist/2596.js +2 -0
- package/dist/2827.js +2 -0
- package/dist/2894.js +2 -0
- package/dist/3099.js +2 -0
- package/dist/3151.js +2 -0
- package/dist/3203.js +2 -0
- package/dist/3540.js +2 -0
- package/dist/3708.js +2 -0
- package/dist/373.js +2 -0
- package/dist/3918.js +2 -0
- package/dist/3920.js +2 -0
- package/dist/4030.js +2 -0
- package/dist/4048.js +2 -0
- package/dist/4108.js +2 -0
- package/dist/4201.js +2 -0
- package/dist/4587.js +2 -0
- package/dist/4611.js +2 -0
- package/dist/4641.js +2 -0
- package/dist/4876.js +2 -0
- package/dist/5249.js +2 -0
- package/dist/5301.js +1 -1
- package/dist/5690.js +2 -0
- package/dist/5746.js +2 -0
- package/dist/{2450.js → 6047.js} +2 -2
- package/dist/6066.js +2 -0
- package/dist/6256.js +2 -0
- package/dist/6304.js +2 -0
- package/dist/6781.js +2 -0
- package/dist/6790.js +2 -0
- package/dist/6984.js +2 -0
- package/dist/7013.js +2 -0
- package/dist/7178.js +2 -0
- package/dist/7347.js +2 -0
- package/dist/740.js +2 -0
- package/dist/7444.js +2 -0
- package/dist/7533.js +2 -0
- package/dist/7535.js +2 -0
- package/dist/775.js +2 -0
- package/dist/779.js +2 -0
- package/dist/8137.js +2 -0
- package/dist/8180.js +2 -0
- package/dist/8192.js +2 -0
- package/dist/8246.js +1 -0
- package/dist/833.js +2 -0
- package/dist/8378.js +2 -0
- package/dist/8605.js +2 -0
- package/dist/8625.js +2 -0
- package/dist/8840.js +2 -0
- package/dist/907.js +2 -0
- package/dist/9108.js +2 -0
- package/dist/9255.js +2 -0
- package/dist/9288.js +2 -0
- package/dist/9322.js +2 -0
- package/dist/9581.js +2 -0
- package/dist/9719.js +2 -0
- package/dist/9731.js +2 -0
- package/dist/9907.js +2 -0
- package/dist/9930.js +2 -0
- package/dist/9938.js +2 -0
- package/dist/assets/kreon/OFL.txt +93 -93
- package/dist/assets/material-icons/css/_mixins.scss +2 -2
- package/dist/assets/material-icons/css/_variables.scss +3 -3
- package/dist/assets/material-icons/css/material-icons.scss +16 -22
- package/dist/assets/material-icons/iconfont/filled.scss +3 -3
- package/dist/assets/material-icons/iconfont/material-icons.scss +5 -5
- package/dist/assets/material-icons/iconfont/outlined.scss +3 -3
- package/dist/assets/material-icons/iconfont/round.scss +3 -3
- package/dist/assets/material-icons/iconfont/sharp.scss +3 -3
- package/dist/assets/material-icons/iconfont/two-tone.scss +3 -3
- package/dist/assets/material-symbols/index.scss +3 -3
- package/dist/assets/material-symbols/outlined.scss +2 -2
- package/dist/assets/material-symbols/rounded.scss +2 -2
- package/dist/assets/material-symbols/sharp.scss +2 -2
- package/dist/assets/noto-sans/fonts/OFL.txt +93 -93
- package/dist/assets/roboto/LICENSE.txt +202 -202
- package/dist/index.html +1 -0
- package/dist/main.css +3 -3
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +32 -24
- package/public/assets/kreon/OFL.txt +93 -93
- package/public/assets/material-icons/css/_mixins.scss +2 -2
- package/public/assets/material-icons/css/_variables.scss +3 -3
- package/public/assets/material-icons/css/material-icons.scss +16 -22
- package/public/assets/material-icons/iconfont/filled.scss +3 -3
- package/public/assets/material-icons/iconfont/material-icons.scss +5 -5
- package/public/assets/material-icons/iconfont/outlined.scss +3 -3
- package/public/assets/material-icons/iconfont/round.scss +3 -3
- package/public/assets/material-icons/iconfont/sharp.scss +3 -3
- package/public/assets/material-icons/iconfont/two-tone.scss +3 -3
- package/public/assets/material-symbols/index.scss +3 -3
- package/public/assets/material-symbols/outlined.scss +2 -2
- package/public/assets/material-symbols/rounded.scss +2 -2
- package/public/assets/material-symbols/sharp.scss +2 -2
- package/public/assets/noto-sans/fonts/OFL.txt +93 -93
- package/public/assets/roboto/LICENSE.txt +202 -202
- package/public/index.html +1 -0
- package/src/App.tsx +1 -3
- package/src/components/SampleColumns.tsx +10 -0
- package/src/components/SampleDescription.tsx +27 -15
- package/src/components/Sidebar.tsx +29 -10
- package/src/components/badge/basic.tsx +1 -1
- package/src/components/badge/button.tsx +1 -1
- package/src/components/button/baselined.tsx +1 -1
- package/src/components/button/partials/cases.tsx +2 -2
- package/src/components/button/short-key.tsx +104 -3
- package/src/components/combobox/partials/variants.tsx +3 -2
- package/src/components/drawer/basic.tsx +9 -25
- package/src/components/drawer/controlled.tsx +0 -8
- package/src/components/form/error-list.tsx +66 -24
- package/src/components/handout/basic.tsx +25 -30
- package/src/components/icon/basic.tsx +2 -1
- package/src/components/input-checkbox/partials/variants.tsx +5 -4
- package/src/components/input-color/partials/cases.tsx +4 -2
- package/src/components/input-color/partials/variants.tsx +3 -2
- package/src/components/input-date/partials/cases.tsx +7 -4
- package/src/components/input-date/partials/minMax.tsx +3 -3
- package/src/components/input-date/partials/variants.tsx +4 -3
- package/src/components/input-date/show-hide-msg.tsx +1 -2
- package/src/components/input-email/partials/cases.tsx +6 -3
- package/src/components/input-email/partials/variants.tsx +3 -2
- package/src/components/input-file/partials/cases.tsx +6 -3
- package/src/components/input-file/partials/variants.tsx +3 -2
- package/src/components/input-number/partials/variants.tsx +3 -2
- package/src/components/input-password/partials/cases.tsx +8 -5
- package/src/components/input-password/partials/variants.tsx +3 -2
- package/src/components/input-radio/partials/variants.tsx +11 -8
- package/src/components/input-range/partials/cases.tsx +6 -3
- package/src/components/input-range/partials/variants.tsx +3 -2
- package/src/components/input-text/{hide-errors.tsx → hide-msg.tsx} +5 -5
- package/src/components/input-text/partials/cases.tsx +1 -1
- package/src/components/input-text/partials/variants.tsx +3 -2
- package/src/components/input-text/routes.ts +2 -2
- package/src/components/input-text/smart-button.tsx +14 -1
- package/src/components/input-text/text-formatter.tsx +1 -2
- package/src/components/link/access-key.tsx +1 -3
- package/src/components/link/short-key.tsx +1 -1
- package/src/components/link-button/aria-description.tsx +1 -1
- package/src/components/link-button/basic.tsx +8 -10
- package/src/components/modal/basic.tsx +28 -12
- package/src/components/nav/basic.tsx +8 -2
- package/src/components/nav/horizontal.tsx +2 -2
- package/src/components/pagination/basic.tsx +1 -1
- package/src/components/popover-button/basic.tsx +55 -0
- package/src/components/popover-button/routes.ts +8 -0
- package/src/components/progress/basic.tsx +12 -5
- package/src/components/select/partials/cases.tsx +22 -4
- package/src/components/select/partials/variants.tsx +3 -2
- package/src/components/single-select/partials/cases.tsx +9 -4
- package/src/components/single-select/partials/variants.tsx +8 -7
- package/src/components/split-button/basic.tsx +2 -2
- package/src/components/table/column-alignment.tsx +16 -12
- package/src/components/table/complex-headers.tsx +4 -3
- package/src/components/table/horizontal-scrollbar.tsx +12 -6
- package/src/components/table/interactive-child-elements.tsx +2 -0
- package/src/components/table/multi-sort.tsx +6 -4
- package/src/components/table/pagination-position.tsx +26 -5
- package/src/components/table/predefined-settings.tsx +41 -0
- package/src/components/table/render-cell.tsx +5 -5
- package/src/components/table/routes.ts +6 -4
- package/src/components/table/sort-data.tsx +16 -18
- package/src/components/table/stateful-with-selection.tsx +10 -6
- package/src/components/table/stateful-with-single-selection.tsx +6 -5
- package/src/components/table/stateless-with-selection.tsx +11 -7
- package/src/components/table/stateless-with-single-selection.tsx +9 -6
- package/src/components/table/stateless.tsx +1 -0
- package/src/components/table/with-footer.tsx +4 -3
- package/src/components/table/with-pagination.tsx +3 -3
- package/src/components/textarea/partials/cases.tsx +9 -4
- package/src/components/textarea/partials/variants.tsx +3 -2
- package/src/components/tree/basic.tsx +2 -1
- package/src/react.main.tsx +4 -9
- package/src/scenarios/appointment-form/PersonalInformationForm.tsx +4 -1
- package/src/scenarios/change-tabindex.tsx +24 -22
- package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +2 -2
- package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +4 -4
- package/src/scenarios/input-group-with-error.tsx +4 -4
- package/src/scenarios/routes.ts +2 -0
- package/src/scenarios/same-height-of-all-interactive-elements.tsx +62 -0
- package/src/shares/longOptions.ts +15 -0
- package/src/shares/routes.ts +3 -7
- package/src/shares/theme.ts +4 -8
- package/src/style.scss +17 -6
- package/unocss.config.ts +67 -68
- package/webpack.config.js +13 -2
- package/dist/1073.js +0 -2
- package/dist/1325.js +0 -2
- package/dist/1392.js +0 -2
- package/dist/1604.js +0 -2
- package/dist/175.js +0 -2
- package/dist/178.js +0 -2
- package/dist/1791.js +0 -2
- package/dist/2220.js +0 -2
- package/dist/2444.js +0 -2
- package/dist/2671.js +0 -2
- package/dist/2986.js +0 -2
- package/dist/3030.js +0 -2
- package/dist/3270.js +0 -2
- package/dist/3340.js +0 -2
- package/dist/3392.js +0 -2
- package/dist/3529.js +0 -2
- package/dist/3756.js +0 -2
- package/dist/3960.js +0 -2
- package/dist/399.js +0 -2
- package/dist/4145.js +0 -2
- package/dist/4288.js +0 -2
- package/dist/4539.js +0 -2
- package/dist/4563.js +0 -2
- package/dist/4571.js +0 -2
- package/dist/5260.js +0 -2
- package/dist/5333.js +0 -2
- package/dist/5523.js +0 -2
- package/dist/5551.js +0 -2
- package/dist/5575.js +0 -2
- package/dist/5665.js +0 -2
- package/dist/572.js +0 -2
- package/dist/5873.js +0 -2
- package/dist/5879.js +0 -2
- package/dist/5964.js +0 -2
- package/dist/6005.js +0 -2
- package/dist/618.js +0 -2
- package/dist/623.js +0 -2
- package/dist/643.js +0 -2
- package/dist/6610.js +0 -2
- package/dist/6618.js +0 -2
- package/dist/6711.js +0 -2
- package/dist/6740.js +0 -2
- package/dist/6786.js +0 -2
- package/dist/685.js +0 -2
- package/dist/6950.js +0 -2
- package/dist/7055.js +0 -2
- package/dist/7106.js +0 -2
- package/dist/7141.js +0 -2
- package/dist/7146.js +0 -2
- package/dist/7287.js +0 -2
- package/dist/7599.js +0 -2
- package/dist/7648.js +0 -2
- package/dist/7668.js +0 -2
- package/dist/7855.js +0 -2
- package/dist/8165.js +0 -2
- package/dist/8177.js +0 -2
- package/dist/8306.js +0 -2
- package/dist/8543.js +0 -2
- package/dist/866.js +0 -2
- package/dist/8859.js +0 -2
- package/dist/904.js +0 -2
- package/dist/9148.js +0 -2
- package/dist/9522.js +0 -2
- package/dist/9625.js +0 -2
- package/dist/9625.js.LICENSE.txt +0 -3
- package/dist/971.js +0 -2
- package/dist/971.js.LICENSE.txt +0 -3
- package/dist/9712.js +0 -2
- package/dist/9712.js.LICENSE.txt +0 -3
- package/dist/976.js +0 -2
- package/dist/976.js.LICENSE.txt +0 -3
- package/dist/982.js +0 -2
- package/dist/982.js.LICENSE.txt +0 -3
- package/dist/986.js +0 -2
- package/dist/986.js.LICENSE.txt +0 -3
- package/src/components/button-group/basic.tsx +0 -34
- package/src/components/button-group/routes.ts +0 -8
- package/src/components/indented-text/basic.tsx +0 -37
- package/src/components/indented-text/routes.ts +0 -8
- package/src/components/link-group/basic.tsx +0 -23
- package/src/components/link-group/horizontal.tsx +0 -23
- package/src/components/link-group/routes.ts +0 -10
- /package/dist/{1073.js.LICENSE.txt → 1006.js.LICENSE.txt} +0 -0
- /package/dist/{1325.js.LICENSE.txt → 1752.js.LICENSE.txt} +0 -0
- /package/dist/{1392.js.LICENSE.txt → 1932.js.LICENSE.txt} +0 -0
- /package/dist/{1604.js.LICENSE.txt → 2069.js.LICENSE.txt} +0 -0
- /package/dist/{175.js.LICENSE.txt → 2212.js.LICENSE.txt} +0 -0
- /package/dist/{178.js.LICENSE.txt → 2231.js.LICENSE.txt} +0 -0
- /package/dist/{1791.js.LICENSE.txt → 2321.js.LICENSE.txt} +0 -0
- /package/dist/{2220.js.LICENSE.txt → 2596.js.LICENSE.txt} +0 -0
- /package/dist/{2444.js.LICENSE.txt → 2827.js.LICENSE.txt} +0 -0
- /package/dist/{2450.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
- /package/dist/{2671.js.LICENSE.txt → 3099.js.LICENSE.txt} +0 -0
- /package/dist/{2986.js.LICENSE.txt → 3151.js.LICENSE.txt} +0 -0
- /package/dist/{3030.js.LICENSE.txt → 3203.js.LICENSE.txt} +0 -0
- /package/dist/{3270.js.LICENSE.txt → 3540.js.LICENSE.txt} +0 -0
- /package/dist/{3340.js.LICENSE.txt → 3708.js.LICENSE.txt} +0 -0
- /package/dist/{3392.js.LICENSE.txt → 373.js.LICENSE.txt} +0 -0
- /package/dist/{3529.js.LICENSE.txt → 3918.js.LICENSE.txt} +0 -0
- /package/dist/{3756.js.LICENSE.txt → 3920.js.LICENSE.txt} +0 -0
- /package/dist/{3960.js.LICENSE.txt → 4030.js.LICENSE.txt} +0 -0
- /package/dist/{399.js.LICENSE.txt → 4048.js.LICENSE.txt} +0 -0
- /package/dist/{4145.js.LICENSE.txt → 4108.js.LICENSE.txt} +0 -0
- /package/dist/{4288.js.LICENSE.txt → 4201.js.LICENSE.txt} +0 -0
- /package/dist/{4539.js.LICENSE.txt → 4587.js.LICENSE.txt} +0 -0
- /package/dist/{4563.js.LICENSE.txt → 4611.js.LICENSE.txt} +0 -0
- /package/dist/{4571.js.LICENSE.txt → 4641.js.LICENSE.txt} +0 -0
- /package/dist/{5260.js.LICENSE.txt → 4876.js.LICENSE.txt} +0 -0
- /package/dist/{5333.js.LICENSE.txt → 5249.js.LICENSE.txt} +0 -0
- /package/dist/{5523.js.LICENSE.txt → 5690.js.LICENSE.txt} +0 -0
- /package/dist/{5551.js.LICENSE.txt → 5746.js.LICENSE.txt} +0 -0
- /package/dist/{5575.js.LICENSE.txt → 6047.js.LICENSE.txt} +0 -0
- /package/dist/{5665.js.LICENSE.txt → 6066.js.LICENSE.txt} +0 -0
- /package/dist/{572.js.LICENSE.txt → 6256.js.LICENSE.txt} +0 -0
- /package/dist/{5873.js.LICENSE.txt → 6304.js.LICENSE.txt} +0 -0
- /package/dist/{5879.js.LICENSE.txt → 6781.js.LICENSE.txt} +0 -0
- /package/dist/{5964.js.LICENSE.txt → 6790.js.LICENSE.txt} +0 -0
- /package/dist/{6005.js.LICENSE.txt → 6984.js.LICENSE.txt} +0 -0
- /package/dist/{618.js.LICENSE.txt → 7013.js.LICENSE.txt} +0 -0
- /package/dist/{623.js.LICENSE.txt → 7178.js.LICENSE.txt} +0 -0
- /package/dist/{643.js.LICENSE.txt → 7347.js.LICENSE.txt} +0 -0
- /package/dist/{6610.js.LICENSE.txt → 740.js.LICENSE.txt} +0 -0
- /package/dist/{6618.js.LICENSE.txt → 7444.js.LICENSE.txt} +0 -0
- /package/dist/{6711.js.LICENSE.txt → 7533.js.LICENSE.txt} +0 -0
- /package/dist/{6740.js.LICENSE.txt → 7535.js.LICENSE.txt} +0 -0
- /package/dist/{6786.js.LICENSE.txt → 775.js.LICENSE.txt} +0 -0
- /package/dist/{685.js.LICENSE.txt → 779.js.LICENSE.txt} +0 -0
- /package/dist/{6950.js.LICENSE.txt → 8137.js.LICENSE.txt} +0 -0
- /package/dist/{7055.js.LICENSE.txt → 8180.js.LICENSE.txt} +0 -0
- /package/dist/{7106.js.LICENSE.txt → 8192.js.LICENSE.txt} +0 -0
- /package/dist/{7141.js.LICENSE.txt → 833.js.LICENSE.txt} +0 -0
- /package/dist/{7146.js.LICENSE.txt → 8378.js.LICENSE.txt} +0 -0
- /package/dist/{7287.js.LICENSE.txt → 8605.js.LICENSE.txt} +0 -0
- /package/dist/{7599.js.LICENSE.txt → 8625.js.LICENSE.txt} +0 -0
- /package/dist/{7648.js.LICENSE.txt → 8840.js.LICENSE.txt} +0 -0
- /package/dist/{7668.js.LICENSE.txt → 907.js.LICENSE.txt} +0 -0
- /package/dist/{7855.js.LICENSE.txt → 9108.js.LICENSE.txt} +0 -0
- /package/dist/{8165.js.LICENSE.txt → 9255.js.LICENSE.txt} +0 -0
- /package/dist/{8177.js.LICENSE.txt → 9288.js.LICENSE.txt} +0 -0
- /package/dist/{8306.js.LICENSE.txt → 9322.js.LICENSE.txt} +0 -0
- /package/dist/{8543.js.LICENSE.txt → 9581.js.LICENSE.txt} +0 -0
- /package/dist/{866.js.LICENSE.txt → 9719.js.LICENSE.txt} +0 -0
- /package/dist/{8859.js.LICENSE.txt → 9731.js.LICENSE.txt} +0 -0
- /package/dist/{904.js.LICENSE.txt → 9907.js.LICENSE.txt} +0 -0
- /package/dist/{9148.js.LICENSE.txt → 9930.js.LICENSE.txt} +0 -0
- /package/dist/{9522.js.LICENSE.txt → 9938.js.LICENSE.txt} +0 -0
|
@@ -6,36 +6,48 @@ import { PUBLIC_CODE_COMPONENT_URL, PUBLIC_DOC_COMPONENT_URL } from '../shares/c
|
|
|
6
6
|
import { KolLink } from '@public-ui/react';
|
|
7
7
|
|
|
8
8
|
import { HideMenusContext } from '../shares/HideMenusContext';
|
|
9
|
-
|
|
10
|
-
const getLocationPaths = () => {
|
|
11
|
-
return location.hash.split('/').slice(1);
|
|
12
|
-
};
|
|
9
|
+
import { useLocation } from 'react-router';
|
|
13
10
|
|
|
14
11
|
export const SampleDescription: FC<PropsWithChildren> = (props) => {
|
|
15
12
|
const hideMenus = useContext(HideMenusContext);
|
|
13
|
+
const location = useLocation();
|
|
14
|
+
const paths = location.pathname.split('/').slice(1);
|
|
16
15
|
|
|
17
16
|
const docLink = useMemo(() => {
|
|
18
|
-
const paths = getLocationPaths();
|
|
19
17
|
return paths[0] === 'scenarios'
|
|
20
18
|
? null // Scenarios are not a component and hence have no documentation.
|
|
21
19
|
: `${PUBLIC_DOC_COMPONENT_URL}/${paths[0]}`;
|
|
22
20
|
}, [location.hash]);
|
|
23
21
|
|
|
24
22
|
const codeLink = useMemo(() => {
|
|
25
|
-
const paths = getLocationPaths();
|
|
26
23
|
return paths[0] === 'scenarios'
|
|
27
24
|
? null // Scenarios are not a component and hence have no documentation.
|
|
28
25
|
: `${PUBLIC_CODE_COMPONENT_URL}/${paths[0]}/${paths[1]}.tsx`;
|
|
29
26
|
}, [location.hash]);
|
|
30
27
|
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<h1 className="visually-hidden">{location.pathname.replace(/\//g, ' ')}</h1>
|
|
31
|
+
{hideMenus ? null : (
|
|
32
|
+
<div className="grid sm:flex gap-4 justify-between pb-sm border-b-1 border-b-solid border-gray mb-2">
|
|
33
|
+
<div className="indented-text">{props.children}</div>
|
|
34
|
+
<ul className="flex flex-wrap gap-2 list-none m-0 p-0">
|
|
35
|
+
{codeLink && (
|
|
36
|
+
<li>
|
|
37
|
+
<KolLink _href={codeLink} _label="Code" _target="_blank" />
|
|
38
|
+
</li>
|
|
39
|
+
)}
|
|
40
|
+
{docLink && (
|
|
41
|
+
<li>
|
|
42
|
+
<KolLink _href={docLink} _label="Documentation" _target="_blank" />
|
|
43
|
+
</li>
|
|
44
|
+
)}
|
|
45
|
+
<li>
|
|
46
|
+
<KolLink _href={`#${location.pathname}?hideMenus`} _label="Standalone example" _target="_blank" />
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
</div>
|
|
50
|
+
)}
|
|
51
|
+
</>
|
|
40
52
|
);
|
|
41
53
|
};
|
|
@@ -7,6 +7,34 @@ import { THEME_OPTIONS } from '../shares/theme';
|
|
|
7
7
|
|
|
8
8
|
import type { Routes } from '../shares/types';
|
|
9
9
|
import Navigation from './Navigation';
|
|
10
|
+
|
|
11
|
+
type BuildInformationProps = {
|
|
12
|
+
buildDate?: string | null;
|
|
13
|
+
commitHash?: string | null;
|
|
14
|
+
};
|
|
15
|
+
const BuildInformation: FC<BuildInformationProps> = ({ buildDate, commitHash }) => {
|
|
16
|
+
if (!buildDate && !commitHash) {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="text-sm font-mono color-gray-5 m-t-2">
|
|
22
|
+
{buildDate && commitHash ? ( // date and hash provided
|
|
23
|
+
<>
|
|
24
|
+
Build: {commitHash}
|
|
25
|
+
<br />
|
|
26
|
+
at {buildDate}
|
|
27
|
+
</>
|
|
28
|
+
) : commitHash ? ( // hash only
|
|
29
|
+
`Build: ${commitHash}`
|
|
30
|
+
) : (
|
|
31
|
+
// date only
|
|
32
|
+
`Build date: ${buildDate}`
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
10
38
|
type Props = {
|
|
11
39
|
version: string;
|
|
12
40
|
theme: string;
|
|
@@ -47,16 +75,8 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
|
|
|
47
75
|
<KolHeading _label="KoliBri React"></KolHeading>
|
|
48
76
|
<KolVersion _label={version}></KolVersion>
|
|
49
77
|
</div>
|
|
50
|
-
{
|
|
51
|
-
<div className="text-sm font-mono color-gray-5 m-t-2">
|
|
52
|
-
{commitHash ? `Build: ${commitHash}` : ''}
|
|
53
|
-
<br />
|
|
54
|
-
{buildDate ? `at ${buildDate}` : ''}
|
|
55
|
-
</div>
|
|
56
|
-
)}
|
|
57
|
-
|
|
78
|
+
<BuildInformation buildDate={buildDate} commitHash={commitHash} />
|
|
58
79
|
<KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
|
|
59
|
-
|
|
60
80
|
<KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
|
|
61
81
|
<div className="flex flex-justify-between flex-items-center mt">
|
|
62
82
|
<KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
|
|
@@ -65,7 +85,6 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
|
|
|
65
85
|
</span>
|
|
66
86
|
<KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
|
|
67
87
|
</div>
|
|
68
|
-
|
|
69
88
|
<Navigation routes={routes} />
|
|
70
89
|
</div>
|
|
71
90
|
</aside>
|
|
@@ -11,7 +11,7 @@ export const BadgeBasic: FC = () => (
|
|
|
11
11
|
<p>KolBadge shows badges with a label, background color and optional icon.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
13
|
|
|
14
|
-
<div className="flex gap-2">
|
|
14
|
+
<div className="flex flex-wrap gap-2">
|
|
15
15
|
<KolBadge _label="black"></KolBadge>
|
|
16
16
|
<KolBadge _color="#86ffc6" _label="teal"></KolBadge>
|
|
17
17
|
<KolBadge _color="#06539e" _label="blue"></KolBadge>
|
|
@@ -23,7 +23,7 @@ export const BadgeButton: FC = () => (
|
|
|
23
23
|
</p>
|
|
24
24
|
</SampleDescription>
|
|
25
25
|
|
|
26
|
-
<div className="flex gap-2">
|
|
26
|
+
<div className="flex flex-wrap gap-2">
|
|
27
27
|
<KolBadge {...createBadgeProps('black')}></KolBadge>
|
|
28
28
|
<KolBadge _color="#86ffc6" {...createBadgeProps('teal')}></KolBadge>
|
|
29
29
|
<KolBadge _color="#06539e" {...createBadgeProps('blue')}></KolBadge>
|
|
@@ -19,7 +19,7 @@ export const ButtonBaselined: FC = () => {
|
|
|
19
19
|
<p>This KolButton sample is used for internal testing purposes: It features multiple buttons with and without icons which are vertically aligned.</p>
|
|
20
20
|
</SampleDescription>
|
|
21
21
|
|
|
22
|
-
<div className="flex">
|
|
22
|
+
<div className="flex flex-wrap gap-2">
|
|
23
23
|
<KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
|
|
24
24
|
<KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
|
|
25
25
|
<KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
|
|
@@ -20,10 +20,10 @@ export const ButtonCases: React.FC<ButtonSampleProps> = (props) => {
|
|
|
20
20
|
<KolButton _icons="codicon codicon-heart" _label="Secondary" _variant="secondary" _on={dummyEventHandler} {...other}>
|
|
21
21
|
{children}
|
|
22
22
|
</KolButton>
|
|
23
|
-
<KolButton _icons="codicon codicon-hubot" _label="
|
|
23
|
+
<KolButton _icons="codicon codicon-hubot" _label="Tertiary" _variant="tertiary" _on={dummyEventHandler} {...other}>
|
|
24
24
|
{children}
|
|
25
25
|
</KolButton>
|
|
26
|
-
<KolButton _icons="codicon codicon-hubot" _label="
|
|
26
|
+
<KolButton _icons="codicon codicon-hubot" _label="Normal" _variant="normal" _on={dummyEventHandler} {...other}>
|
|
27
27
|
{children}
|
|
28
28
|
</KolButton>
|
|
29
29
|
<KolButton _icons="codicon codicon-trash" _label="Danger" _variant="danger" _on={dummyEventHandler} {...other}>
|
|
@@ -1,8 +1,61 @@
|
|
|
1
|
-
import { KolButton } from '@public-ui/react';
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { createReactRenderElement, KolButton, KolHeading, KolTableStateful } from '@public-ui/react';
|
|
3
2
|
import type { FC } from 'react';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { SampleDescription } from '../SampleDescription';
|
|
5
6
|
import { useToasterService } from '../../hooks/useToasterService';
|
|
7
|
+
import { getRoot } from '../../shares/react-roots';
|
|
8
|
+
import type { KoliBriTableHeaders } from '@public-ui/components';
|
|
9
|
+
import { ToasterService } from '@public-ui/components';
|
|
10
|
+
|
|
11
|
+
const RowActions: FC<{ label: string }> = ({ label }) => {
|
|
12
|
+
const toaster = ToasterService.getInstance(document);
|
|
13
|
+
const editButtonRef = useRef<HTMLKolButtonElement | null>(null);
|
|
14
|
+
const deleteButtonRef = useRef<HTMLKolButtonElement | null>(null);
|
|
15
|
+
|
|
16
|
+
const handleEditClick = () => {
|
|
17
|
+
toaster.enqueue({
|
|
18
|
+
label: 'Edit clicked',
|
|
19
|
+
description: `The button "edit" has been clicked for ${label}`,
|
|
20
|
+
type: 'info',
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handleDeleteClick = () => {
|
|
25
|
+
toaster.enqueue({
|
|
26
|
+
label: 'Delete clicked',
|
|
27
|
+
description: `The button "delete" has been clicked for ${label}`,
|
|
28
|
+
type: 'warning',
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
33
|
+
switch (event.code) {
|
|
34
|
+
case 'KeyE':
|
|
35
|
+
void editButtonRef.current?.kolFocus();
|
|
36
|
+
handleEditClick();
|
|
37
|
+
return;
|
|
38
|
+
case 'KeyD':
|
|
39
|
+
void deleteButtonRef.current?.kolFocus();
|
|
40
|
+
handleDeleteClick();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
47
|
+
<div
|
|
48
|
+
style={{
|
|
49
|
+
display: 'flex',
|
|
50
|
+
gap: 'calc(10rem / var(--kolibri-root-font-size, 16))',
|
|
51
|
+
}}
|
|
52
|
+
onKeyUp={handleKeyUp}
|
|
53
|
+
>
|
|
54
|
+
<KolButton ref={editButtonRef} _label={'Edit'} _shortKey={'e'} _on={{ onClick: handleEditClick }} />
|
|
55
|
+
<KolButton ref={deleteButtonRef} _label={'Delete'} _shortKey={'d'} _variant={'danger'} _on={{ onClick: handleDeleteClick }} />
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
6
59
|
|
|
7
60
|
export const ButtonShortKey: FC = () => {
|
|
8
61
|
const { dummyClickEventHandler } = useToasterService();
|
|
@@ -11,11 +64,50 @@ export const ButtonShortKey: FC = () => {
|
|
|
11
64
|
onClick: dummyClickEventHandler,
|
|
12
65
|
};
|
|
13
66
|
|
|
67
|
+
type Data = {
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
const DATA: Data[] = [
|
|
71
|
+
{
|
|
72
|
+
label: 'Row 1',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: 'Row 2',
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
const HEADERS: KoliBriTableHeaders = {
|
|
80
|
+
horizontal: [
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
label: 'Label',
|
|
84
|
+
key: 'label',
|
|
85
|
+
textAlign: 'left',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: 'Actions',
|
|
89
|
+
key: 'actions',
|
|
90
|
+
textAlign: 'left',
|
|
91
|
+
|
|
92
|
+
render: (el, cell) => {
|
|
93
|
+
getRoot(createReactRenderElement(el)).render(<RowActions label={(cell.data as Data).label} />);
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
|
|
14
100
|
return (
|
|
15
101
|
<>
|
|
16
102
|
<SampleDescription>
|
|
17
103
|
<p>
|
|
18
|
-
|
|
104
|
+
The first sample shows KolButton with short key without functionality. The short key is purely visual. Its functionality needs to be developed
|
|
105
|
+
separately.
|
|
106
|
+
</p>
|
|
107
|
+
<p>
|
|
108
|
+
The second sample showcases a table where each row contains two KolButtons, each with its own shortcut key. To trigger an action, move the focus to
|
|
109
|
+
any of the "Actions" cells and press "e" or "d." Doing so will activate the corresponding action and display a Toast
|
|
110
|
+
notification for demonstration purposes.
|
|
19
111
|
</p>
|
|
20
112
|
</SampleDescription>
|
|
21
113
|
|
|
@@ -34,6 +126,15 @@ export const ButtonShortKey: FC = () => {
|
|
|
34
126
|
_on={dummyEventHandler}
|
|
35
127
|
/>
|
|
36
128
|
</div>
|
|
129
|
+
|
|
130
|
+
<KolHeading _level={2} _label="Interactive sample" className="mt" />
|
|
131
|
+
|
|
132
|
+
<KolTableStateful
|
|
133
|
+
_label={`Move focus within one of the "Actions" cells and press "e" or "d" to trigger an action.`}
|
|
134
|
+
_data={DATA}
|
|
135
|
+
_headers={HEADERS}
|
|
136
|
+
_minWidth="400px"
|
|
137
|
+
/>
|
|
37
138
|
</>
|
|
38
139
|
);
|
|
39
140
|
};
|
|
@@ -2,10 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import type { Components } from '@public-ui/components';
|
|
3
3
|
|
|
4
4
|
import { ComboboxCases } from './cases';
|
|
5
|
+
import { SampleColumns } from '../../SampleColumns';
|
|
5
6
|
|
|
6
7
|
export const ComboboxVariants = (props: Partial<Components.KolCombobox>) => {
|
|
7
8
|
return (
|
|
8
|
-
<
|
|
9
|
+
<SampleColumns>
|
|
9
10
|
<fieldset>
|
|
10
11
|
<legend>Text</legend>
|
|
11
12
|
<ComboboxCases {...props} />
|
|
@@ -14,6 +15,6 @@ export const ComboboxVariants = (props: Partial<Components.KolCombobox>) => {
|
|
|
14
15
|
<legend>Text (hideLabel)</legend>
|
|
15
16
|
<ComboboxCases {...props} _hideLabel />
|
|
16
17
|
</fieldset>
|
|
17
|
-
</
|
|
18
|
+
</SampleColumns>
|
|
18
19
|
);
|
|
19
20
|
};
|
|
@@ -14,47 +14,31 @@ export const DrawerBasic: FC = () => {
|
|
|
14
14
|
const defaultAlign = searchParams.get('align') as AlignPropType;
|
|
15
15
|
const hideMenus = useContext(HideMenusContext);
|
|
16
16
|
const drawerElement = useRef<HTMLKolDrawerElement>(null);
|
|
17
|
-
const drawerModalElement = useRef<HTMLKolDrawerElement>(null);
|
|
18
17
|
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
|
|
19
18
|
useEffect(() => {
|
|
20
19
|
if (defaultAlign) {
|
|
21
|
-
|
|
20
|
+
drawerElement.current?.open();
|
|
22
21
|
}
|
|
23
22
|
}, [defaultAlign]);
|
|
24
23
|
return (
|
|
25
24
|
<>
|
|
26
25
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
27
26
|
<SampleDescription>
|
|
28
|
-
<p>
|
|
29
|
-
KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments and the modal- and
|
|
30
|
-
non-modal modes.
|
|
31
|
-
</p>
|
|
27
|
+
<p>KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments.</p>
|
|
32
28
|
</SampleDescription>
|
|
33
29
|
|
|
34
30
|
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
|
|
35
31
|
<div className="flex flex-wrap gap-4">
|
|
36
32
|
<KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
<div className={align === 'left' || align == 'right' ? 'drawer-content-vertical' : ''}>
|
|
34
|
+
<p>
|
|
35
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
36
|
+
voluptua.
|
|
37
|
+
</p>
|
|
38
|
+
<KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
|
|
39
|
+
</div>
|
|
42
40
|
</KolDrawer>
|
|
43
41
|
<KolButton _label="Open drawer" _on={{ onClick: () => drawerElement.current?.open() }} />
|
|
44
|
-
<KolDrawer
|
|
45
|
-
ref={drawerModalElement}
|
|
46
|
-
_modal
|
|
47
|
-
_align={align}
|
|
48
|
-
_label="I am a Drawer Modal"
|
|
49
|
-
_on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
|
|
50
|
-
>
|
|
51
|
-
<p>
|
|
52
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
53
|
-
voluptua.
|
|
54
|
-
</p>
|
|
55
|
-
<KolButton _label="Close drawer modal" _on={{ onClick: () => drawerModalElement.current?.close() }} />
|
|
56
|
-
</KolDrawer>
|
|
57
|
-
<KolButton _label="Open drawer as modal" _on={{ onClick: () => drawerModalElement.current?.open() }} />
|
|
58
42
|
</div>
|
|
59
43
|
</>
|
|
60
44
|
);
|
|
@@ -14,7 +14,6 @@ export const DrawerControlled: FC = () => {
|
|
|
14
14
|
const defaultAlign = searchParams.get('align') as AlignPropType;
|
|
15
15
|
const hideMenus = useContext(HideMenusContext);
|
|
16
16
|
const [open, setOpen] = useState(false);
|
|
17
|
-
const [modalOpen, setModalOpen] = useState(false);
|
|
18
17
|
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
|
|
19
18
|
return (
|
|
20
19
|
<div>
|
|
@@ -34,13 +33,6 @@ export const DrawerControlled: FC = () => {
|
|
|
34
33
|
</div>
|
|
35
34
|
</KolDrawer>
|
|
36
35
|
<KolButton _label="Open drawer" _on={{ onClick: () => setOpen(true) }} />
|
|
37
|
-
<KolDrawer _open={modalOpen} _modal _align={align} _label="I'm a controlled modal drawer" _on={{ onClose: () => setModalOpen(false) }}>
|
|
38
|
-
<div>
|
|
39
|
-
<p>Lorem ipsum dolor sit amet,</p>
|
|
40
|
-
<KolButton _label="Close drawer" _on={{ onClick: () => setModalOpen(false) }} />
|
|
41
|
-
</div>
|
|
42
|
-
</KolDrawer>
|
|
43
|
-
<KolButton _label="Open drawer as modal" _on={{ onClick: () => setModalOpen(true) }} />
|
|
44
36
|
</div>
|
|
45
37
|
</div>
|
|
46
38
|
);
|
|
@@ -1,28 +1,70 @@
|
|
|
1
|
+
import { KolButton, KolForm, KolInputText } from '@public-ui/react';
|
|
1
2
|
import type { FC } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
4
|
import { SampleDescription } from '../SampleDescription';
|
|
4
|
-
import { KolForm, KolInputText } from '@public-ui/react';
|
|
5
5
|
|
|
6
|
-
export const FormErrorList: FC = () =>
|
|
7
|
-
|
|
8
|
-
<SampleDescription>
|
|
9
|
-
<p>This sample shows a form with error messages.</p>
|
|
10
|
-
</SampleDescription>
|
|
6
|
+
export const FormErrorList: FC = () => {
|
|
7
|
+
const formRef = useRef<HTMLKolFormElement | null>(null);
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
const scrollTo = () => {
|
|
10
|
+
formRef.current?.focusErrorList();
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Simulate the form submission
|
|
15
|
+
*/
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
formRef.current?.focusErrorList();
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<SampleDescription>
|
|
23
|
+
<p>This sample shows a form with error messages.</p>
|
|
24
|
+
</SampleDescription>
|
|
25
|
+
|
|
26
|
+
<KolForm
|
|
27
|
+
className="w-full"
|
|
28
|
+
ref={formRef}
|
|
29
|
+
_on={{
|
|
30
|
+
onSubmit: scrollTo,
|
|
31
|
+
}}
|
|
32
|
+
_errorList={[
|
|
33
|
+
{
|
|
34
|
+
message: 'Error in Input 2',
|
|
35
|
+
selector: '#input2',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
message: 'Error in Input 3',
|
|
39
|
+
selector: () => alert('Error in Input 3'),
|
|
40
|
+
},
|
|
41
|
+
]}
|
|
42
|
+
>
|
|
43
|
+
<div className="grid gap-2">
|
|
44
|
+
<KolInputText id="input1" _label="Input 1" />
|
|
45
|
+
<KolInputText
|
|
46
|
+
id="input2"
|
|
47
|
+
_label="Input 2"
|
|
48
|
+
_touched
|
|
49
|
+
_msg={{
|
|
50
|
+
_description: 'Input error',
|
|
51
|
+
_type: 'error',
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
<KolInputText
|
|
55
|
+
id="input3"
|
|
56
|
+
_label="Input 3"
|
|
57
|
+
_touched
|
|
58
|
+
_msg={{
|
|
59
|
+
_description: 'Input error',
|
|
60
|
+
_type: 'error',
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
<div>
|
|
64
|
+
<KolButton _label="ScrollTo" _type="submit" />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</KolForm>
|
|
68
|
+
</>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
KolNav,
|
|
30
30
|
KolProgress,
|
|
31
31
|
KolSelect,
|
|
32
|
-
|
|
32
|
+
KolTableStateful,
|
|
33
33
|
KolTabs,
|
|
34
34
|
KolTextarea,
|
|
35
35
|
KolVersion,
|
|
@@ -73,16 +73,14 @@ const TABLE_HEADERS: KoliBriTableHeaders = {
|
|
|
73
73
|
el.appendChild(renderElement);
|
|
74
74
|
getRoot(renderElement).render(<KolButtonWrapper _label={cell.label} style={{ fontSize: '75%' }} />);
|
|
75
75
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return 0;
|
|
85
|
-
});
|
|
76
|
+
compareFn: (first, second) => {
|
|
77
|
+
if ((first as TableDataType).monday < (second as TableDataType).monday) {
|
|
78
|
+
return -1;
|
|
79
|
+
}
|
|
80
|
+
if ((first as TableDataType).monday > (second as TableDataType).monday) {
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
return 0;
|
|
86
84
|
},
|
|
87
85
|
sortDirection: 'ASC',
|
|
88
86
|
textAlign: 'right',
|
|
@@ -97,16 +95,14 @@ const TABLE_HEADERS: KoliBriTableHeaders = {
|
|
|
97
95
|
el.appendChild(renderElement);
|
|
98
96
|
getRoot(renderElement).render(<KolBadge _color="#060" _label={cell.label}></KolBadge>);
|
|
99
97
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return 0;
|
|
109
|
-
});
|
|
98
|
+
compareFn: (first, second) => {
|
|
99
|
+
if ((first as TableDataType).tuesday < (second as TableDataType).tuesday) {
|
|
100
|
+
return -1;
|
|
101
|
+
}
|
|
102
|
+
if ((first as TableDataType).tuesday > (second as TableDataType).tuesday) {
|
|
103
|
+
return 1;
|
|
104
|
+
}
|
|
105
|
+
return 0;
|
|
110
106
|
},
|
|
111
107
|
sortDirection: 'DESC',
|
|
112
108
|
},
|
|
@@ -194,7 +190,7 @@ export const HandoutBasic: FC = () => {
|
|
|
194
190
|
|
|
195
191
|
return (
|
|
196
192
|
<div className="grid gap-4">
|
|
197
|
-
<div className="grid gap-4 grid-cols-[auto_1fr_1fr] items-center">
|
|
193
|
+
<div className="grid gap-4 md:grid-cols-[auto_1fr_1fr] items-center">
|
|
198
194
|
<KolKolibri className="block w-75px" _labeled={false}></KolKolibri>
|
|
199
195
|
<KolHeading _label="" _level={1}>
|
|
200
196
|
<span slot="expert">
|
|
@@ -252,10 +248,8 @@ export const HandoutBasic: FC = () => {
|
|
|
252
248
|
<p>
|
|
253
249
|
I am <KolAbbr>e.g.</KolAbbr> an abbreviation without label.
|
|
254
250
|
</p>
|
|
255
|
-
<
|
|
256
|
-
|
|
257
|
-
<KolProgress _variant="cycle" _max={100} _value={66} _label="Progress" />
|
|
258
|
-
</div>
|
|
251
|
+
<KolProgress _variant="bar" _max={100} _value={33} _label="Progress" />
|
|
252
|
+
<KolProgress _variant="cycle" _max={100} _value={66} _label="Progress" />
|
|
259
253
|
</div>
|
|
260
254
|
</KolCard>
|
|
261
255
|
<KolCard className="col-span-6 sm:col-span-6 md:col-span-6 xl:col-span-3" _label="Button, LinkButton and Tab" _level={2}>
|
|
@@ -430,7 +424,6 @@ export const HandoutBasic: FC = () => {
|
|
|
430
424
|
/>
|
|
431
425
|
</div>
|
|
432
426
|
{/* <KolSkipNav></KolSkipNav> */}
|
|
433
|
-
{/* <KolLinkGroup _label=""></KolLinkGroup> */}
|
|
434
427
|
<div>
|
|
435
428
|
<KolBreadcrumb
|
|
436
429
|
_label="Breadcrumb aus Text-Links"
|
|
@@ -448,7 +441,7 @@ export const HandoutBasic: FC = () => {
|
|
|
448
441
|
</KolCard>
|
|
449
442
|
<KolCard className="col-span-6 sm:col-span-6 md:col-span-4 xl:col-span-5" _label="Input" _level={2}>
|
|
450
443
|
<KolForm slot="">
|
|
451
|
-
<div className="grid gap-4 grid-cols-3 p-2">
|
|
444
|
+
<div className="grid gap-4 sm:grid-cols-2 md:grid-cols-3 p-2">
|
|
452
445
|
<KolInputColor _label={`Color`} />
|
|
453
446
|
<KolInputFile _label={`Upload file`} />
|
|
454
447
|
<KolInputNumber _label={`Number input`} />
|
|
@@ -467,7 +460,9 @@ export const HandoutBasic: FC = () => {
|
|
|
467
460
|
<div className="grid gap-4">
|
|
468
461
|
<KolInputRadio _orientation="horizontal" _options="[{'label':'Mr.','value':0},{'label':'Mrs.','value':1}]" _value="0" _label={`Salutation`} />
|
|
469
462
|
<KolInputCheckbox _label="">
|
|
470
|
-
|
|
463
|
+
<span slot="expert">
|
|
464
|
+
I accept the <KolAbbr _label="General Terms and Conditions">AGB</KolAbbr>.
|
|
465
|
+
</span>
|
|
471
466
|
</KolInputCheckbox>
|
|
472
467
|
</div>
|
|
473
468
|
<KolTextarea _rows={4} _label={`Textarea`} />
|
|
@@ -476,7 +471,7 @@ export const HandoutBasic: FC = () => {
|
|
|
476
471
|
</KolCard>
|
|
477
472
|
<KolCard className="col-span-6 sm:col-span-6 md:col-span-4 xl:col-span-5" _label="Table with Pagination" _level={2}>
|
|
478
473
|
<div slot="" className="grid gap-2 p-2">
|
|
479
|
-
<
|
|
474
|
+
<KolTableStateful _label="Table" _minWidth="auto" _headers={TABLE_HEADERS} _data={TABLE_DATA} _pagination></KolTableStateful>
|
|
480
475
|
</div>
|
|
481
476
|
</KolCard>
|
|
482
477
|
</div>
|
|
@@ -12,8 +12,9 @@ export const IconBasic: FC = () => (
|
|
|
12
12
|
</SampleDescription>
|
|
13
13
|
|
|
14
14
|
<div className="grid gap-4">
|
|
15
|
-
<KolIcon _label="" _icons="codicon codicon-home" />
|
|
15
|
+
<KolIcon className="block w-[1em] h-[1em]" _label="" _icons="codicon codicon-home" />
|
|
16
16
|
<KolIcon
|
|
17
|
+
className="block w-[1em] h-[1em]"
|
|
17
18
|
style={{
|
|
18
19
|
color: 'red',
|
|
19
20
|
}}
|
|
@@ -3,10 +3,11 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import { InputCheckboxCases } from './cases';
|
|
4
4
|
|
|
5
5
|
import type { Components } from '@public-ui/components';
|
|
6
|
+
import { SampleColumns } from '../../SampleColumns';
|
|
6
7
|
export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Components.KolInputCheckbox>(function InputCheckboxVariant(props, ref) {
|
|
7
8
|
return (
|
|
8
9
|
<>
|
|
9
|
-
<
|
|
10
|
+
<SampleColumns>
|
|
10
11
|
<fieldset>
|
|
11
12
|
<legend>Label align "left" with label</legend>
|
|
12
13
|
<InputCheckboxCases {...props} _labelAlign="left" />
|
|
@@ -15,8 +16,8 @@ export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Com
|
|
|
15
16
|
<legend>Label align "left" without Label (hideLabel)</legend>
|
|
16
17
|
<InputCheckboxCases ref={ref} {...props} _hideLabel _labelAlign="left" />
|
|
17
18
|
</fieldset>
|
|
18
|
-
</
|
|
19
|
-
<
|
|
19
|
+
</SampleColumns>
|
|
20
|
+
<SampleColumns>
|
|
20
21
|
<fieldset>
|
|
21
22
|
<legend>Label align "right" with label</legend>
|
|
22
23
|
<InputCheckboxCases {...props} />
|
|
@@ -25,7 +26,7 @@ export const InputCheckboxVariants = forwardRef<HTMLKolInputCheckboxElement, Com
|
|
|
25
26
|
<legend>Label align "right" without Label (hideLabel)</legend>
|
|
26
27
|
<InputCheckboxCases ref={ref} {...props} _hideLabel />
|
|
27
28
|
</fieldset>
|
|
28
|
-
</
|
|
29
|
+
</SampleColumns>
|
|
29
30
|
</>
|
|
30
31
|
);
|
|
31
32
|
});
|