@public-ui/sample-react 2.0.4-rc.0 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +2 -1
- package/dist/104.js +2 -0
- package/dist/{4669.js → 1296.js} +2 -2
- package/dist/{8869.js → 1461.js} +2 -2
- package/dist/1684.js +2 -0
- package/dist/1685.js +2 -0
- package/dist/1888.js +2 -0
- package/dist/2120.js +2 -0
- package/dist/2240.js +2 -0
- package/dist/2364.js +2 -0
- package/dist/{4279.js → 2392.js} +2 -2
- package/dist/2444.js +2 -0
- package/dist/2628.js +2 -0
- package/dist/{3388.js → 2740.js} +2 -2
- package/dist/2764.js +2 -0
- package/dist/2782.js +2 -0
- package/dist/2812.js +2 -0
- package/dist/{3845.js → 2984.js} +2 -2
- package/dist/{5324.js → 3200.js} +2 -2
- package/dist/3204.js +2 -0
- package/dist/{3034.js → 3384.js} +2 -2
- package/dist/352.js +2 -0
- package/dist/3564.js +2 -0
- package/dist/{8612.js → 3920.js} +2 -2
- package/dist/4064.js +2 -0
- package/dist/4136.js +1 -0
- package/dist/4443.js +2 -0
- package/dist/4544.js +2 -0
- package/dist/{9865.js → 4728.js} +2 -2
- package/dist/4915.js +2 -0
- package/dist/4988.js +2 -0
- package/dist/5376.js +2 -0
- package/dist/5456.js +2 -0
- package/dist/5615.js +1 -1
- package/dist/5628.js +2 -0
- package/dist/5744.js +2 -0
- package/dist/5768.js +2 -0
- package/dist/{9330.js → 5839.js} +2 -2
- package/dist/5956.js +2 -0
- package/dist/5972.js +2 -0
- package/dist/6040.js +2 -0
- package/dist/{3600.js → 6112.js} +2 -2
- package/dist/6476.js +2 -0
- package/dist/6992.js +2 -0
- package/dist/7192.js +2 -0
- package/dist/7312.js +2 -0
- package/dist/736.js +2 -0
- package/dist/{8734.js → 7496.js} +2 -2
- package/dist/7508.js +2 -0
- package/dist/7596.js +2 -0
- package/dist/7712.js +2 -0
- package/dist/7804.js +2 -0
- package/dist/{9886.js → 7808.js} +2 -2
- package/dist/8188.js +2 -0
- package/dist/8232.js +2 -0
- package/dist/8248.js +2 -0
- package/dist/828.js +2 -0
- package/dist/8476.js +2 -0
- package/dist/8524.js +2 -0
- package/dist/9072.js +2 -0
- package/dist/9088.js +2 -0
- package/dist/{2079.js → 9224.js} +2 -2
- package/dist/9404.js +2 -0
- package/dist/9404.js.LICENSE.txt +3 -0
- package/dist/9424.js +2 -0
- package/dist/9424.js.LICENSE.txt +3 -0
- package/dist/9680.js +2 -0
- package/dist/9680.js.LICENSE.txt +3 -0
- package/dist/9888.js +2 -0
- package/dist/9888.js.LICENSE.txt +3 -0
- package/dist/9984.js +1 -1
- package/dist/main.css +1 -1
- package/dist/main.js +10276 -5799
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +14 -15
- package/src/App.tsx +16 -10
- package/src/components/BackPage.tsx +17 -0
- package/src/components/FocusInput.tsx +4 -2
- package/src/components/FormWrap.tsx +6 -2
- package/src/components/SampleDescription.tsx +4 -1
- package/src/components/Sidebar.tsx +12 -4
- package/src/components/abbr/basic.tsx +2 -1
- package/src/components/abbr/routes.ts +0 -1
- package/src/components/accordion/basic.tsx +3 -2
- package/src/components/accordion/headlines.tsx +2 -1
- package/src/components/accordion/list.tsx +3 -1
- package/src/components/accordion/routes.ts +0 -1
- package/src/components/alert/basic.tsx +3 -2
- package/src/components/alert/card-msg.tsx +2 -1
- package/src/components/alert/html.tsx +4 -3
- package/src/components/alert/routes.ts +0 -3
- package/src/components/avatar/basic.tsx +3 -1
- package/src/components/badge/basic.tsx +2 -1
- package/src/components/badge/button.tsx +2 -1
- package/src/components/badge/routes.ts +0 -2
- package/src/components/breadcrumb/basic.tsx +11 -10
- package/src/components/breadcrumb/routes.ts +0 -1
- package/src/components/button/access-key.tsx +3 -1
- package/src/components/button/baselined.tsx +2 -1
- package/src/components/button/basic.tsx +3 -1
- package/src/components/button/hide-label.tsx +2 -1
- package/src/components/button/icons.tsx +2 -1
- package/src/components/button/partials/cases.tsx +3 -2
- package/src/components/button/partials/variants.tsx +2 -1
- package/src/components/button/routes.ts +2 -6
- package/src/components/button/width.tsx +2 -1
- package/src/components/button-group/basic.tsx +2 -1
- package/src/components/button-group/routes.ts +0 -1
- package/src/components/button-link/basic.tsx +2 -1
- package/src/components/button-link/icons.tsx +2 -1
- package/src/components/button-link/image.tsx +2 -1
- package/src/components/button-link/routes.ts +0 -3
- package/src/components/card/basic.tsx +2 -1
- package/src/components/card/confirm.tsx +2 -1
- package/src/components/card/flex.tsx +2 -1
- package/src/components/card/routes.ts +0 -4
- package/src/components/card/selection.tsx +2 -1
- package/src/components/details/basic.tsx +7 -1
- package/src/components/details/routes.ts +0 -1
- package/src/components/handout/basic.tsx +38 -34
- package/src/components/handout/routes.ts +0 -1
- package/src/components/heading/badged.tsx +2 -1
- package/src/components/heading/basic.tsx +2 -1
- package/src/components/heading/paragraph.tsx +2 -1
- package/src/components/heading/routes.ts +0 -3
- package/src/components/icon/basic.tsx +2 -1
- package/src/components/icon/routes.ts +0 -1
- package/src/components/image/basic.tsx +3 -2
- package/src/components/image/routes.ts +0 -1
- package/src/components/indented-text/basic.tsx +2 -1
- package/src/components/indented-text/routes.ts +0 -1
- package/src/components/input-checkbox/basic.tsx +3 -1
- package/src/components/input-checkbox/button.tsx +3 -1
- package/src/components/input-checkbox/partials/cases.tsx +1 -1
- package/src/components/input-checkbox/partials/variants.tsx +1 -1
- package/src/components/input-checkbox/routes.ts +0 -1
- package/src/components/input-checkbox/switch.tsx +4 -2
- package/src/components/input-color/basic.tsx +3 -1
- package/src/components/input-color/partials/cases.tsx +1 -1
- package/src/components/input-color/partials/variants.tsx +1 -1
- package/src/components/input-color/routes.ts +0 -1
- package/src/components/input-date/basic.tsx +3 -1
- package/src/components/input-date/partials/cases.tsx +1 -1
- package/src/components/input-date/partials/variants.tsx +1 -1
- package/src/components/input-date/routes.ts +0 -1
- package/src/components/input-email/basic.tsx +3 -1
- package/src/components/input-email/partials/cases.tsx +1 -1
- package/src/components/input-email/partials/variants.tsx +1 -1
- package/src/components/input-email/routes.ts +0 -1
- package/src/components/input-file/basic.tsx +3 -1
- package/src/components/input-file/partials/cases.tsx +1 -1
- package/src/components/input-file/partials/variants.tsx +1 -1
- package/src/components/input-file/routes.ts +0 -1
- package/src/components/input-number/basic.tsx +17 -2
- package/src/components/input-number/partials/cases.tsx +1 -1
- package/src/components/input-number/partials/variants.tsx +1 -1
- package/src/components/input-number/routes.ts +0 -1
- package/src/components/input-password/basic.tsx +3 -1
- package/src/components/input-password/partials/cases.tsx +1 -1
- package/src/components/input-password/partials/variants.tsx +1 -1
- package/src/components/input-password/routes.ts +0 -1
- package/src/components/input-password/show-password.tsx +3 -1
- package/src/components/input-radio/basic.tsx +3 -1
- package/src/components/input-radio/horizontal.tsx +4 -2
- package/src/components/input-radio/partials/cases.tsx +1 -1
- package/src/components/input-radio/partials/variants.tsx +1 -1
- package/src/components/input-radio/routes.ts +0 -2
- package/src/components/input-radio/select.tsx +3 -2
- package/src/components/input-range/basic.tsx +3 -1
- package/src/components/input-range/partials/cases.tsx +1 -1
- package/src/components/input-range/partials/variants.tsx +1 -1
- package/src/components/input-range/routes.ts +0 -1
- package/src/components/input-text/basic.tsx +3 -1
- package/src/components/input-text/blur.tsx +3 -1
- package/src/components/input-text/focus.tsx +2 -1
- package/src/components/input-text/partials/cases.tsx +1 -1
- package/src/components/input-text/partials/variants.tsx +1 -1
- package/src/components/input-text/routes.ts +0 -1
- package/src/components/kolibri/basic.tsx +5 -2
- package/src/components/kolibri/routes.ts +0 -1
- package/src/components/link/basic.tsx +13 -8
- package/src/components/link/icons.tsx +7 -2
- package/src/components/link/image.tsx +5 -4
- package/src/components/link/routes.ts +0 -4
- package/src/components/link/target.tsx +8 -6
- package/src/components/link-button/basic.tsx +3 -4
- package/src/components/link-button/routes.ts +0 -1
- package/src/components/link-group/basic.tsx +6 -4
- package/src/components/link-group/horizontal.tsx +6 -4
- package/src/components/logo/basic.tsx +4 -2
- package/src/components/logo/routes.ts +0 -1
- package/src/components/modal/basic.tsx +3 -1
- package/src/components/modal/routes.ts +0 -1
- package/src/components/nav/aria-current.tsx +4 -3
- package/src/components/nav/basic.tsx +22 -4
- package/src/components/nav/horizontal.tsx +2 -1
- package/src/components/nav/links.ts +17 -17
- package/src/components/pagination/basic.tsx +2 -1
- package/src/components/pagination/routes.ts +0 -1
- package/src/components/progress/basic.tsx +2 -1
- package/src/components/progress/routes.ts +0 -1
- package/src/components/quote/basic.tsx +3 -1
- package/src/components/quote/block.tsx +3 -1
- package/src/components/quote/routes.ts +0 -1
- package/src/components/select/basic.tsx +3 -1
- package/src/components/select/partials/cases.tsx +3 -3
- package/src/components/select/partials/variants.tsx +1 -1
- package/src/components/select/routes.ts +0 -1
- package/src/components/skip-nav/basic.tsx +4 -1
- package/src/components/skip-nav/routes.ts +0 -1
- package/src/components/spin/basic.tsx +2 -1
- package/src/components/spin/custom.tsx +4 -2
- package/src/components/spin/cycle.tsx +2 -1
- package/src/components/spin/routes.ts +0 -1
- package/src/components/split-button/basic.tsx +3 -1
- package/src/components/table/badge-size.tsx +5 -3
- package/src/components/table/column-alignment.tsx +4 -2
- package/src/components/table/horizontal-scrollbar.tsx +4 -2
- package/src/components/table/pagination-position.tsx +8 -4
- package/src/components/table/render-cell.tsx +4 -3
- package/src/components/table/routes.ts +2 -3
- package/src/components/table/sort-data.tsx +6 -3
- package/src/components/table/with-pagination.tsx +6 -3
- package/src/components/tabs/basic.tsx +3 -1
- package/src/components/tabs/icons-only.tsx +3 -1
- package/src/components/tabs/routes.ts +0 -1
- package/src/components/textarea/adjust-height.tsx +2 -1
- package/src/components/textarea/basic.tsx +3 -1
- package/src/components/textarea/counter.tsx +3 -1
- package/src/components/textarea/disabled.tsx +2 -1
- package/src/components/textarea/partials/cases.tsx +2 -1
- package/src/components/textarea/partials/variants.tsx +1 -1
- package/src/components/textarea/placeholder.tsx +2 -1
- package/src/components/textarea/readonly.tsx +2 -1
- package/src/components/textarea/resize.tsx +2 -1
- package/src/components/textarea/routes.ts +2 -9
- package/src/components/textarea/rows.tsx +3 -2
- package/src/components/toast/basic.tsx +4 -1
- package/src/components/tree/basic.tsx +72 -0
- package/src/components/tree/routes.ts +9 -0
- package/src/components/types.tsx +14 -13
- package/src/components/version/basic.tsx +2 -1
- package/src/components/version/context.tsx +2 -1
- package/src/components/version/routes.ts +0 -2
- package/src/hooks/useSetCurrentLocation.ts +2 -1
- package/src/main.ts +0 -2
- package/src/react.main.tsx +3 -2
- package/src/scenarios/appointment-form/AppointmentForm.tsx +21 -12
- package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +13 -13
- package/src/scenarios/appointment-form/DistrictForm.tsx +13 -13
- package/src/scenarios/appointment-form/PersonalInformationForm.tsx +25 -7
- package/src/scenarios/appointment-form/Summary.tsx +4 -2
- package/src/scenarios/appointment-form/formUtils.ts +8 -0
- package/src/scenarios/complex-form/kopfdaten/component.tsx +2 -1
- package/src/scenarios/complex-form/location/component.tsx +3 -2
- package/src/scenarios/complex-form/schedule/component.tsx +1 -0
- package/src/scenarios/custom-tooltip-width.tsx +3 -1
- package/src/scenarios/inputs-get-value.tsx +6 -3
- package/src/scenarios/routes.ts +2 -2
- package/src/shares/randomEmoji.ts +4 -0
- package/src/shares/routes.ts +2 -0
- package/src/shares/store.ts +3 -3
- package/dist/1090.js +0 -2
- package/dist/1181.js +0 -2
- package/dist/1218.js +0 -2
- package/dist/1338.js +0 -2
- package/dist/1517.js +0 -2
- package/dist/1596.js +0 -2
- package/dist/2163.js +0 -2
- package/dist/2415.js +0 -2
- package/dist/2594.js +0 -2
- package/dist/2611.js +0 -2
- package/dist/2643.js +0 -2
- package/dist/3099.js +0 -2
- package/dist/3145.js +0 -2
- package/dist/3345.js +0 -2
- package/dist/3466.js +0 -2
- package/dist/3580.js +0 -2
- package/dist/3619.js +0 -2
- package/dist/3776.js +0 -2
- package/dist/4150.js +0 -2
- package/dist/42.js +0 -2
- package/dist/4378.js +0 -2
- package/dist/4463.js +0 -2
- package/dist/4686.js +0 -2
- package/dist/4756.js +0 -2
- package/dist/5027.js +0 -2
- package/dist/521.js +0 -2
- package/dist/5373.js +0 -2
- package/dist/5518.js +0 -2
- package/dist/5853.js +0 -2
- package/dist/6010.js +0 -2
- package/dist/6308.js +0 -2
- package/dist/7170.js +0 -2
- package/dist/755.js +0 -2
- package/dist/7654.js +0 -2
- package/dist/8037.js +0 -1
- package/dist/817.js +0 -2
- package/dist/881.js +0 -2
- package/dist/892.js +0 -2
- package/dist/8948.js +0 -2
- package/dist/8951.js +0 -2
- package/dist/9227.js +0 -2
- package/dist/9317.js +0 -2
- package/dist/9700.js +0 -2
- package/dist/9727.js +0 -2
- package/dist/9797.js +0 -2
- package/dist/9912.js +0 -2
- package/src/scenarios/appointment-form/ErrorList.tsx +0 -35
- /package/dist/{1090.js.LICENSE.txt → 104.js.LICENSE.txt} +0 -0
- /package/dist/{1181.js.LICENSE.txt → 1296.js.LICENSE.txt} +0 -0
- /package/dist/{1218.js.LICENSE.txt → 1461.js.LICENSE.txt} +0 -0
- /package/dist/{1338.js.LICENSE.txt → 1684.js.LICENSE.txt} +0 -0
- /package/dist/{1517.js.LICENSE.txt → 1685.js.LICENSE.txt} +0 -0
- /package/dist/{1596.js.LICENSE.txt → 1888.js.LICENSE.txt} +0 -0
- /package/dist/{2079.js.LICENSE.txt → 2120.js.LICENSE.txt} +0 -0
- /package/dist/{2163.js.LICENSE.txt → 2240.js.LICENSE.txt} +0 -0
- /package/dist/{2415.js.LICENSE.txt → 2364.js.LICENSE.txt} +0 -0
- /package/dist/{2594.js.LICENSE.txt → 2392.js.LICENSE.txt} +0 -0
- /package/dist/{2611.js.LICENSE.txt → 2444.js.LICENSE.txt} +0 -0
- /package/dist/{2643.js.LICENSE.txt → 2628.js.LICENSE.txt} +0 -0
- /package/dist/{3034.js.LICENSE.txt → 2740.js.LICENSE.txt} +0 -0
- /package/dist/{3099.js.LICENSE.txt → 2764.js.LICENSE.txt} +0 -0
- /package/dist/{3145.js.LICENSE.txt → 2782.js.LICENSE.txt} +0 -0
- /package/dist/{3345.js.LICENSE.txt → 2812.js.LICENSE.txt} +0 -0
- /package/dist/{3388.js.LICENSE.txt → 2984.js.LICENSE.txt} +0 -0
- /package/dist/{3466.js.LICENSE.txt → 3200.js.LICENSE.txt} +0 -0
- /package/dist/{3580.js.LICENSE.txt → 3204.js.LICENSE.txt} +0 -0
- /package/dist/{3600.js.LICENSE.txt → 3384.js.LICENSE.txt} +0 -0
- /package/dist/{3619.js.LICENSE.txt → 352.js.LICENSE.txt} +0 -0
- /package/dist/{3776.js.LICENSE.txt → 3564.js.LICENSE.txt} +0 -0
- /package/dist/{3845.js.LICENSE.txt → 3920.js.LICENSE.txt} +0 -0
- /package/dist/{4150.js.LICENSE.txt → 4064.js.LICENSE.txt} +0 -0
- /package/dist/{42.js.LICENSE.txt → 4443.js.LICENSE.txt} +0 -0
- /package/dist/{4279.js.LICENSE.txt → 4544.js.LICENSE.txt} +0 -0
- /package/dist/{4378.js.LICENSE.txt → 4728.js.LICENSE.txt} +0 -0
- /package/dist/{4463.js.LICENSE.txt → 4915.js.LICENSE.txt} +0 -0
- /package/dist/{4669.js.LICENSE.txt → 4988.js.LICENSE.txt} +0 -0
- /package/dist/{4686.js.LICENSE.txt → 5376.js.LICENSE.txt} +0 -0
- /package/dist/{4756.js.LICENSE.txt → 5456.js.LICENSE.txt} +0 -0
- /package/dist/{5027.js.LICENSE.txt → 5628.js.LICENSE.txt} +0 -0
- /package/dist/{521.js.LICENSE.txt → 5744.js.LICENSE.txt} +0 -0
- /package/dist/{5324.js.LICENSE.txt → 5768.js.LICENSE.txt} +0 -0
- /package/dist/{5373.js.LICENSE.txt → 5839.js.LICENSE.txt} +0 -0
- /package/dist/{5518.js.LICENSE.txt → 5956.js.LICENSE.txt} +0 -0
- /package/dist/{5853.js.LICENSE.txt → 5972.js.LICENSE.txt} +0 -0
- /package/dist/{6010.js.LICENSE.txt → 6040.js.LICENSE.txt} +0 -0
- /package/dist/{6308.js.LICENSE.txt → 6112.js.LICENSE.txt} +0 -0
- /package/dist/{7170.js.LICENSE.txt → 6476.js.LICENSE.txt} +0 -0
- /package/dist/{755.js.LICENSE.txt → 6992.js.LICENSE.txt} +0 -0
- /package/dist/{7654.js.LICENSE.txt → 7192.js.LICENSE.txt} +0 -0
- /package/dist/{817.js.LICENSE.txt → 7312.js.LICENSE.txt} +0 -0
- /package/dist/{8612.js.LICENSE.txt → 736.js.LICENSE.txt} +0 -0
- /package/dist/{8734.js.LICENSE.txt → 7496.js.LICENSE.txt} +0 -0
- /package/dist/{881.js.LICENSE.txt → 7508.js.LICENSE.txt} +0 -0
- /package/dist/{8869.js.LICENSE.txt → 7596.js.LICENSE.txt} +0 -0
- /package/dist/{892.js.LICENSE.txt → 7712.js.LICENSE.txt} +0 -0
- /package/dist/{8948.js.LICENSE.txt → 7804.js.LICENSE.txt} +0 -0
- /package/dist/{8951.js.LICENSE.txt → 7808.js.LICENSE.txt} +0 -0
- /package/dist/{9227.js.LICENSE.txt → 8188.js.LICENSE.txt} +0 -0
- /package/dist/{9317.js.LICENSE.txt → 8232.js.LICENSE.txt} +0 -0
- /package/dist/{9330.js.LICENSE.txt → 8248.js.LICENSE.txt} +0 -0
- /package/dist/{9700.js.LICENSE.txt → 828.js.LICENSE.txt} +0 -0
- /package/dist/{9727.js.LICENSE.txt → 8476.js.LICENSE.txt} +0 -0
- /package/dist/{9797.js.LICENSE.txt → 8524.js.LICENSE.txt} +0 -0
- /package/dist/{9865.js.LICENSE.txt → 9072.js.LICENSE.txt} +0 -0
- /package/dist/{9886.js.LICENSE.txt → 9088.js.LICENSE.txt} +0 -0
- /package/dist/{9912.js.LICENSE.txt → 9224.js.LICENSE.txt} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
+
import countries from 'world_countries_lists/data/countries/de/countries.json';
|
|
2
3
|
|
|
3
|
-
import { Components, SelectOption } from '@public-ui/components';
|
|
4
4
|
import { KolSelect } from '@public-ui/react';
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
6
5
|
|
|
7
|
-
import
|
|
6
|
+
import { ERROR_MSG } from '../../../shares/constants';
|
|
8
7
|
|
|
8
|
+
import type { Components, SelectOption } from '@public-ui/components';
|
|
9
9
|
type Country = {
|
|
10
10
|
id: number;
|
|
11
11
|
alpha2: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Components } from '@public-ui/components';
|
|
4
3
|
import { SelectCases } from './cases';
|
|
5
4
|
|
|
5
|
+
import type { Components } from '@public-ui/components';
|
|
6
6
|
export const SelectVariants = forwardRef<HTMLKolSelectElement, Components.KolSelect>(function SelectVariant(props, ref) {
|
|
7
7
|
return (
|
|
8
8
|
<div className="grid md:grid-cols-2 gap-4">
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import './custom.css';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
4
|
+
|
|
2
5
|
import { KolSpin } from '@public-ui/react';
|
|
3
|
-
import './custom.css';
|
|
4
6
|
|
|
5
|
-
import { FC } from 'react';
|
|
7
|
+
import type { FC } from 'react';
|
|
6
8
|
|
|
7
9
|
export const SpinCustom: FC = () => (
|
|
8
10
|
<KolSpin _show _variant="none">
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
1
3
|
import { ToasterService } from '@public-ui/components';
|
|
2
|
-
import React, { FC } from 'react';
|
|
3
4
|
import { KolSplitButton } from '@public-ui/react';
|
|
4
5
|
|
|
6
|
+
import type { FC } from 'react';
|
|
5
7
|
const toaster = ToasterService.getInstance(document);
|
|
6
8
|
|
|
7
9
|
export const SplitButtonBasic: FC = () => {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolBadge, KolTable } from '@public-ui/react';
|
|
4
5
|
|
|
5
6
|
import { getRoot } from '../../shares/react-roots';
|
|
6
|
-
import {
|
|
7
|
-
import { DATA, Data } from './test-data';
|
|
7
|
+
import { DATA } from './test-data';
|
|
8
8
|
|
|
9
|
+
import type { KoliBriTableHeaders } from '@public-ui/components';
|
|
10
|
+
import type { Data } from './test-data';
|
|
9
11
|
const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
|
|
10
12
|
day: '2-digit',
|
|
11
13
|
month: '2-digit',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { KolHeading, KolTable } from '@public-ui/react';
|
|
2
5
|
|
|
3
|
-
import { KolTable, KolHeading } from '@public-ui/react';
|
|
4
6
|
import { SampleDescription } from '../SampleDescription';
|
|
5
7
|
|
|
6
8
|
const DATA = [{ left: 'Left Example', center: 'Center Example', right: 'Right Example' }];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolHeading, KolInputCheckbox, KolTable } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
+
|
|
5
6
|
import { SampleDescription } from '../SampleDescription';
|
|
6
7
|
|
|
8
|
+
import type { KoliBriTableHeaders } from '@public-ui/components/src';
|
|
7
9
|
const DATA = [{ small: 'Small Example', large: 'Larger Example' }];
|
|
8
10
|
const HEADERS: KoliBriTableHeaders = {
|
|
9
11
|
horizontal: [
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolTable } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import { Data, DATA } from './test-data';
|
|
6
|
-
import { DATE_FORMATTER } from './formatter';
|
|
5
|
+
|
|
7
6
|
import { SampleDescription } from '../SampleDescription';
|
|
7
|
+
import { DATE_FORMATTER } from './formatter';
|
|
8
|
+
import { DATA } from './test-data';
|
|
9
|
+
|
|
10
|
+
import type { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
|
|
11
|
+
import type { Data } from './test-data';
|
|
8
12
|
const HEADERS: KoliBriTableHeaders = {
|
|
9
13
|
horizontal: [
|
|
10
14
|
[
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolButton, KolInputText, KolTable } from '@public-ui/react';
|
|
4
5
|
|
|
5
6
|
import { getRoot } from '../../shares/react-roots';
|
|
6
|
-
import { KoliBriTableHeaders } from '@public-ui/components';
|
|
7
|
-
import { DATE_FORMATTER } from './formatter';
|
|
8
7
|
import { SampleDescription } from '../SampleDescription';
|
|
8
|
+
import { DATE_FORMATTER } from './formatter';
|
|
9
9
|
|
|
10
|
+
import type { KoliBriTableHeaders } from '@public-ui/components';
|
|
10
11
|
type Data = {
|
|
11
12
|
order: number;
|
|
12
13
|
date: Date;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
|
-
|
|
3
2
|
import { TableBadgeSize } from './badge-size';
|
|
4
3
|
import { TableColumnAlignment } from './column-alignment';
|
|
4
|
+
import { TableHorizontalScrollbar } from './horizontal-scrollbar';
|
|
5
|
+
import { PaginationPosition } from './pagination-position';
|
|
5
6
|
import { TableRenderCell } from './render-cell';
|
|
6
7
|
import { TableSortData } from './sort-data';
|
|
7
8
|
import { TableWithPagination } from './with-pagination';
|
|
8
|
-
import { PaginationPosition } from './pagination-position';
|
|
9
|
-
import { TableHorizontalScrollbar } from './horizontal-scrollbar';
|
|
10
9
|
|
|
11
10
|
export const TABLE_ROUTES: Routes = {
|
|
12
11
|
table: {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolTable } from '@public-ui/react';
|
|
4
|
-
import { KoliBriTableHeaders } from '@public-ui/components';
|
|
5
|
-
import { DATA, Data } from './test-data';
|
|
6
5
|
|
|
6
|
+
import { DATA } from './test-data';
|
|
7
|
+
|
|
8
|
+
import type { KoliBriTableHeaders } from '@public-ui/components';
|
|
9
|
+
import type { Data } from './test-data';
|
|
7
10
|
const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
|
|
8
11
|
day: '2-digit',
|
|
9
12
|
month: '2-digit',
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolTable } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import { Data, DATA } from './test-data';
|
|
5
|
+
|
|
6
6
|
import { DATE_FORMATTER } from './formatter';
|
|
7
|
+
import { DATA } from './test-data';
|
|
7
8
|
|
|
9
|
+
import type { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
|
|
10
|
+
import type { Data } from './test-data';
|
|
8
11
|
const HEADERS: KoliBriTableHeaders = {
|
|
9
12
|
horizontal: [
|
|
10
13
|
[
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
3
4
|
|
|
4
|
-
import { FC } from 'react';
|
|
5
|
+
import type { FC } from 'react';
|
|
5
6
|
|
|
6
7
|
const VALUE = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
|
|
7
8
|
magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Components } from '@public-ui/components';
|
|
4
3
|
import { KolTextarea } from '@public-ui/react';
|
|
4
|
+
|
|
5
5
|
import { ERROR_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
+
import type { Components } from '@public-ui/components';
|
|
7
8
|
export const TextareaCases = forwardRef<HTMLKolTextareaElement, Components.KolTextarea>(function TextareaCases(props, ref) {
|
|
8
9
|
return (
|
|
9
10
|
<div className="grid gap-4">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Components } from '@public-ui/components';
|
|
4
3
|
import { TextareaCases } from './cases';
|
|
5
4
|
|
|
5
|
+
import type { Components } from '@public-ui/components';
|
|
6
6
|
export const TextareaVariants = forwardRef<HTMLKolTextareaElement, Components.KolTextarea>(function TextareaVariant(props, ref) {
|
|
7
7
|
return (
|
|
8
8
|
<div className="grid md:grid-cols-2 gap-4">
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
|
-
|
|
3
|
-
import { TextareaBasic } from './basic';
|
|
4
|
-
|
|
5
2
|
import { TextareaAdjustHeight } from './adjust-height';
|
|
6
|
-
|
|
3
|
+
import { TextareaBasic } from './basic';
|
|
4
|
+
import { TextareaCounter } from './counter';
|
|
7
5
|
import { TextareaDisabled } from './disabled';
|
|
8
|
-
|
|
9
6
|
import { TextareaPlaceholder } from './placeholder';
|
|
10
|
-
|
|
11
7
|
import { TextareaReadOnly } from './readonly';
|
|
12
|
-
|
|
13
8
|
import { TextareaResize } from './resize';
|
|
14
|
-
|
|
15
9
|
import { TextareaRows } from './rows';
|
|
16
|
-
import { TextareaCounter } from './counter';
|
|
17
10
|
|
|
18
11
|
export const TEXTAREA_ROUTES: Routes = {
|
|
19
12
|
textarea: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
4
|
+
|
|
5
|
+
import type { FC } from 'react';
|
|
5
6
|
|
|
6
7
|
export const TextareaRows: FC = () => (
|
|
7
8
|
<KolForm>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
1
3
|
import { ToasterService } from '@public-ui/components';
|
|
2
4
|
import { KolButton } from '@public-ui/react';
|
|
3
|
-
|
|
5
|
+
|
|
4
6
|
import { getRoot } from '../../shares/react-roots';
|
|
5
7
|
|
|
8
|
+
import type { FC } from 'react';
|
|
6
9
|
const toaster = ToasterService.getInstance(document);
|
|
7
10
|
|
|
8
11
|
export const ToastBasic: FC = () => {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import React, { useContext, useState } from 'react';
|
|
3
|
+
import { KolBadge, KolButton, KolTree, KolTreeItem } from '@public-ui/react';
|
|
4
|
+
import { getRandomEmoji } from '../../shares/randomEmoji';
|
|
5
|
+
import { useParams } from 'react-router';
|
|
6
|
+
import { HideMenusContext } from '../../shares/HideMenusContext';
|
|
7
|
+
|
|
8
|
+
export const TreeBasic: FC = () => {
|
|
9
|
+
const hideMenus = useContext(HideMenusContext);
|
|
10
|
+
const { subPage } = useParams();
|
|
11
|
+
const [homeLabel, setHomeLabel] = useState('1 Home');
|
|
12
|
+
const [showPets, setShowPets] = useState(false);
|
|
13
|
+
const [showEurope, setShowEurope] = useState(false);
|
|
14
|
+
const [showProducts, setShowProducts] = useState(true);
|
|
15
|
+
const updateHomeLabel = () => {
|
|
16
|
+
setHomeLabel(`1 Home ${getRandomEmoji()}`);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const getItemProps = (page: string) => {
|
|
20
|
+
return {
|
|
21
|
+
_href: `#/tree/basic/${page}${hideMenus ? '?hideMenus' : ''}`,
|
|
22
|
+
_active: page === subPage,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
29
|
+
|
|
30
|
+
<KolTree _label="Sitemap" class="block w-fit">
|
|
31
|
+
<KolTreeItem _label={homeLabel} {...getItemProps('home')}></KolTreeItem>
|
|
32
|
+
<KolTreeItem _label="2 About (open initially)" {...getItemProps('about')} _open>
|
|
33
|
+
<KolTreeItem _label="2.1 Team" {...getItemProps('team')}>
|
|
34
|
+
<KolTreeItem _label="2.1.1. Values" {...getItemProps('values')}></KolTreeItem>
|
|
35
|
+
<KolTreeItem _label="2.1.2. Members" {...getItemProps('members')}>
|
|
36
|
+
<KolTreeItem _label="2.1.2.1 Humans" {...getItemProps('humans')}></KolTreeItem>
|
|
37
|
+
{showPets && <KolTreeItem _label="2.1.2.2 Pets" {...getItemProps('pets')}></KolTreeItem>}
|
|
38
|
+
</KolTreeItem>
|
|
39
|
+
<KolTreeItem _label="2.1.3 Locations" {...getItemProps('locations')}>
|
|
40
|
+
{showEurope && (
|
|
41
|
+
<KolTreeItem _label="2.1.3.1 Europe" {...getItemProps('europe')}>
|
|
42
|
+
<KolTreeItem _label="2.1.3.1.1 Denmark" {...getItemProps('denmark')} />
|
|
43
|
+
<KolTreeItem _label="2.1.3.1.2 Netherlands" {...getItemProps('netherlands')} />
|
|
44
|
+
</KolTreeItem>
|
|
45
|
+
)}
|
|
46
|
+
</KolTreeItem>
|
|
47
|
+
</KolTreeItem>
|
|
48
|
+
</KolTreeItem>
|
|
49
|
+
{showProducts && (
|
|
50
|
+
<KolTreeItem _label="3. Products" {...getItemProps('products')}>
|
|
51
|
+
<KolTreeItem _label="3.1 Home" {...getItemProps('home-products')}>
|
|
52
|
+
<KolTreeItem _label="3.1.1 Refrigerators" {...getItemProps('fridges')}></KolTreeItem>
|
|
53
|
+
<KolTreeItem _label="3.1.2 Coffee makers" {...getItemProps('coffee-makers')}></KolTreeItem>
|
|
54
|
+
</KolTreeItem>
|
|
55
|
+
<KolTreeItem _label="3.1 Office" {...getItemProps('office-products')}>
|
|
56
|
+
<KolTreeItem _label="3.2.1 Printers" {...getItemProps('printers')}></KolTreeItem>
|
|
57
|
+
</KolTreeItem>
|
|
58
|
+
</KolTreeItem>
|
|
59
|
+
)}
|
|
60
|
+
</KolTree>
|
|
61
|
+
|
|
62
|
+
<p>Current tree item: {subPage ?? 'none'}</p>
|
|
63
|
+
|
|
64
|
+
<div className="flex flex-row gap-2">
|
|
65
|
+
<KolButton _label="Change label for '1 Home'" _on={{ onClick: updateHomeLabel }}></KolButton>
|
|
66
|
+
<KolButton _label="Toggle '2.1.2.2 Pets'" _on={{ onClick: () => setShowPets(!showPets) }}></KolButton>
|
|
67
|
+
<KolButton _label="Toggle '2.2.1 Europe' (two levels at once)" _on={{ onClick: () => setShowEurope(!showEurope) }}></KolButton>
|
|
68
|
+
<KolButton _label="Toggle '3. Products'" _on={{ onClick: () => setShowProducts(!showProducts) }}></KolButton>
|
|
69
|
+
</div>
|
|
70
|
+
</>
|
|
71
|
+
);
|
|
72
|
+
};
|
package/src/components/types.tsx
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { FormWrap } from './FormWrap';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
|
|
3
|
+
import type { ButtonVariants } from './button/partials/variants';
|
|
4
|
+
import type { InputCheckboxVariants } from './input-checkbox/partials/variants';
|
|
5
|
+
import type { InputColorVariants } from './input-color/partials/variants';
|
|
6
|
+
import type { InputDateVariants } from './input-date/partials/variants';
|
|
7
|
+
import type { InputEmailVariants } from './input-email/partials/variants';
|
|
8
|
+
import type { InputFileVariants } from './input-file/partials/variants';
|
|
9
|
+
import type { InputNumberVariants } from './input-number/partials/variants';
|
|
10
|
+
import type { InputPasswordVariants } from './input-password/partials/variants';
|
|
11
|
+
import type { InputRadioVariants } from './input-radio/partials/variants';
|
|
12
|
+
import type { InputRangeVariants } from './input-range/partials/variants';
|
|
13
|
+
import type { InputTextVariants } from './input-text/partials/variants';
|
|
14
|
+
import type { SelectVariants } from './select/partials/variants';
|
|
15
|
+
import type { TextareaVariants } from './textarea/partials/variants';
|
|
15
16
|
|
|
16
17
|
export type RefFormComponent =
|
|
17
18
|
| typeof InputCheckboxVariants
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { setCurrentLocation } from '@public-ui/components';
|
|
2
1
|
import { useLocation } from 'react-router';
|
|
3
2
|
|
|
3
|
+
import { setCurrentLocation } from '@public-ui/components';
|
|
4
|
+
|
|
4
5
|
export const useSetCurrentLocation = () => {
|
|
5
6
|
const routerLocation = useLocation();
|
|
6
7
|
setCurrentLocation('#' + routerLocation.pathname);
|
package/src/main.ts
CHANGED
package/src/react.main.tsx
CHANGED
|
@@ -2,12 +2,13 @@ import React, { StrictMode } from 'react';
|
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import { HashRouter as Router } from 'react-router-dom';
|
|
4
4
|
|
|
5
|
-
import { defineCustomElements } from '@public-ui/components/dist/loader';
|
|
6
|
-
import type { Generic } from 'adopted-style-sheets';
|
|
7
5
|
import { register } from '@public-ui/components';
|
|
6
|
+
import { defineCustomElements } from '@public-ui/components/dist/loader';
|
|
8
7
|
import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
|
|
8
|
+
|
|
9
9
|
import { App } from './App';
|
|
10
10
|
|
|
11
|
+
import type { Generic } from 'adopted-style-sheets';
|
|
11
12
|
type Theme = Generic.Theming.RegisterPatch<string, string, string>;
|
|
12
13
|
|
|
13
14
|
void (async () => {
|