@public-ui/sample-react 4.0.0-alpha.5 → 4.0.0-alpha.6
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/README.md +1 -1
- package/dist/assets/Alert-DQ2Dvx1k-ag7m4LxQ.js +2 -0
- package/dist/assets/{Alert-Bjkk9lQv-ARqglia_.js.map → Alert-DQ2Dvx1k-ag7m4LxQ.js.map} +1 -1
- package/dist/assets/Collapsible-CYivy6zV-BOX8VHAn.js +2 -0
- package/dist/assets/{Collapsible-IuDix1Q--Clfk9PjU.js.map → Collapsible-CYivy6zV-BOX8VHAn.js.map} +1 -1
- package/dist/assets/CustomSuggestionsOptionsGroup-CCu6Plt7-I3lOtHmn.js +2 -0
- package/dist/assets/CustomSuggestionsOptionsGroup-CCu6Plt7-I3lOtHmn.js.map +1 -0
- package/dist/assets/FieldControlStateWrapper-Buho_4Oh-DOUM2w5c.js +2 -0
- package/dist/assets/{FieldControlStateWrapper-DW4yI_q9-Bonm2OcB.js.map → FieldControlStateWrapper-Buho_4Oh-DOUM2w5c.js.map} +1 -1
- package/dist/assets/FormFieldStateWrapper-DCnlBW-f-CArqxJyl.js +2 -0
- package/dist/assets/FormFieldStateWrapper-DCnlBW-f-CArqxJyl.js.map +1 -0
- package/dist/assets/Heading-C10swMyu-CfCZk-GX.js +2 -0
- package/dist/assets/{Heading-Bgh5mGuN-NZ2eqsFZ.js.map → Heading-C10swMyu-CfCZk-GX.js.map} +1 -1
- package/dist/assets/Icon-B3ooeNpT-92o1PUMi.js +2 -0
- package/dist/assets/Icon-B3ooeNpT-92o1PUMi.js.map +1 -0
- package/dist/assets/Input-BxAqpZGt-DB0vfFJo.js +2 -0
- package/dist/assets/{Input-iXL6EXuW-CiyhDO1S.js.map → Input-BxAqpZGt-DB0vfFJo.js.map} +1 -1
- package/dist/assets/InputStateWrapper-pD2moAra-DWCvXQNK.js +2 -0
- package/dist/assets/{InputStateWrapper-BskUoUzv-Y1QuPvo7.js.map → InputStateWrapper-pD2moAra-DWCvXQNK.js.map} +1 -1
- package/dist/assets/InternalUnderlinedBadgeText-SJouHY4e-COPH6Ml5.js +2 -0
- package/dist/assets/{InternalUnderlinedBadgeText-Ba_Akx7b-YDli6NRt.js.map → InternalUnderlinedBadgeText-SJouHY4e-COPH6Ml5.js.map} +1 -1
- package/dist/assets/Span-wBFswd-7-BsrvhhjT.js +2 -0
- package/dist/assets/{Span-CS0Z30Mv-DkVBt8xF.js.map → Span-wBFswd-7-BsrvhhjT.js.map} +1 -1
- package/dist/assets/access-and-short-key-B37XLwy2-CiS427M_.js +2 -0
- package/dist/assets/{access-and-short-key-B37XLwy2-BBCIaEXs.js.map → access-and-short-key-B37XLwy2-CiS427M_.js.map} +1 -1
- package/dist/assets/align-D-ifSKu8-XG8WTj3C.js +2 -0
- package/dist/assets/{align-D-ifSKu8-DHxE7OrW.js.map → align-D-ifSKu8-XG8WTj3C.js.map} +1 -1
- package/dist/assets/align-floating-elements-BkpeqvtE-D-l3UmIy.js +2 -0
- package/dist/assets/{align-floating-elements-BkpeqvtE-CQbyIoMm.js.map → align-floating-elements-BkpeqvtE-D-l3UmIy.js.map} +1 -1
- package/dist/assets/associated.controller-ByY2WiIp-D_Lza8s7.js +2 -0
- package/dist/assets/{associated.controller-ByY2WiIp-D-SArd22.js.map → associated.controller-ByY2WiIp-D_Lza8s7.js.map} +1 -1
- package/dist/assets/auto-complete-mCkUnxg2-QSKMNhpi.js +2 -0
- package/dist/assets/{auto-complete-mCkUnxg2-CPy57VVu.js.map → auto-complete-mCkUnxg2-QSKMNhpi.js.map} +1 -1
- package/dist/assets/clsx-eK3rPvPS-B-dksMZM.js +2 -0
- package/dist/assets/clsx-eK3rPvPS-B-dksMZM.js.map +1 -0
- package/dist/assets/color-BOIEtqEM-HbuRyAx_.js +2 -0
- package/dist/assets/{color-BOIEtqEM-L8c8JCkp.js.map → color-BOIEtqEM-HbuRyAx_.js.map} +1 -1
- package/dist/assets/controller-B2dey74I-BkCmLXk6.js +2 -0
- package/dist/assets/{controller-mXm-vPdA-B6Pyo-EF.js.map → controller-B2dey74I-BkCmLXk6.js.map} +1 -1
- package/dist/assets/controller-C5Ill7ej-dltkCBRl.js +2 -0
- package/dist/assets/{controller-C5Ill7ej-DA9_ZpJu.js.map → controller-C5Ill7ej-dltkCBRl.js.map} +1 -1
- package/dist/assets/controller-CA5l6Keq-DBHX1Gse.js +2 -0
- package/dist/assets/{controller-C5WSxdih-C0Th29pR.js.map → controller-CA5l6Keq-DBHX1Gse.js.map} +1 -1
- package/dist/assets/controller-CfC2FAMi-BRjpM6kg.js +2 -0
- package/dist/assets/{controller-CX1IIODr-BkmhUxT6.js.map → controller-CfC2FAMi-BRjpM6kg.js.map} +1 -1
- package/dist/assets/controller-icon-CKuey-0T-BH8jPae_.js +2 -0
- package/dist/assets/{controller-icon-Bj9jDliX-GITfFrxl.js.map → controller-icon-CKuey-0T-BH8jPae_.js.map} +1 -1
- package/dist/assets/custom-class-nuoQ9Aml-B0lRTd1o.js +2 -0
- package/dist/assets/{custom-class-nuoQ9Aml-DkG_pprU.js.map → custom-class-nuoQ9Aml-B0lRTd1o.js.map} +1 -1
- package/dist/assets/{dev.utils-CjBWUBVB-BTpX7uqU.js → dev.utils-JixUzvyB-di5gZcih.js} +2 -4
- package/dist/assets/{dev.utils-CjBWUBVB-BTpX7uqU.js.map → dev.utils-JixUzvyB-di5gZcih.js.map} +1 -1
- package/dist/assets/devtools-CJ4_uUII-BOhX_4Fr.js +14 -0
- package/dist/assets/{devtools-DSsrYXN7-E4mOPBwO.js.map → devtools-CJ4_uUII-BOhX_4Fr.js.map} +1 -1
- package/dist/assets/disabled-BhpAFgSp-BoKnH5Lj.js +2 -0
- package/dist/assets/{disabled-BhpAFgSp-By2R53CP.js.map → disabled-BhpAFgSp-BoKnH5Lj.js.map} +1 -1
- package/dist/assets/has-closer-CQzjaTkv-77fIFRh2.js +2 -0
- package/dist/assets/{has-closer-CQzjaTkv-CJOSQHj3.js.map → has-closer-CQzjaTkv-77fIFRh2.js.map} +1 -1
- package/dist/assets/hide-label-B9FhGrWP-DvxeN0M8.js +2 -0
- package/dist/assets/{hide-label-B9FhGrWP-DKlgXtKv.js.map → hide-label-B9FhGrWP-DvxeN0M8.js.map} +1 -1
- package/dist/assets/href-rwDd36rS-YjsLcYi9.js +2 -0
- package/dist/assets/{href-rwDd36rS-CEz5jHM0.js.map → href-rwDd36rS-YjsLcYi9.js.map} +1 -1
- package/dist/assets/i18n-C5ifExT3-DbkujNMR.js +2 -0
- package/dist/assets/{i18n-C5ifExT3-Biq4UyHg.js.map → i18n-C5ifExT3-DbkujNMR.js.map} +1 -1
- package/dist/assets/icons-B5i9zwjJ-Cvt5iH8B.js +2 -0
- package/dist/assets/{icons-B5i9zwjJ-Dzqwsqxx.js.map → icons-B5i9zwjJ-Cvt5iH8B.js.map} +1 -1
- package/dist/assets/image-source-BfBEJ0rX-D9D_HGWp.js +2 -0
- package/dist/assets/{image-source-BfBEJ0rX-BecuGTZi.js.map → image-source-BfBEJ0rX-D9D_HGWp.js.map} +1 -1
- package/dist/assets/{index-CQ_Buelw.js → index-B7VtF6vh.js} +199 -283
- package/dist/assets/index-B7VtF6vh.js.map +1 -0
- package/dist/assets/{index-DhV7zTY5.css → index-BWt2lYpR.css} +1 -1
- package/dist/assets/isObject-DvSELytj-DhzEQer1.js +2 -0
- package/dist/assets/{isObject-DvSELytj-B0RigBxT.js.map → isObject-DvSELytj-DhzEQer1.js.map} +1 -1
- package/dist/assets/keyboard-D6PoWr38-BGYQJqo4.js +2 -0
- package/dist/assets/{keyboard-D6PoWr38-Bn_Qh8Bq.js.map → keyboard-D6PoWr38-BGYQJqo4.js.map} +1 -1
- package/dist/assets/{kol-abbr.entry-CVbEazxY.js → kol-abbr.entry-Rj_uSGh3.js} +2 -4
- package/dist/assets/{kol-abbr.entry-CVbEazxY.js.map → kol-abbr.entry-Rj_uSGh3.js.map} +1 -1
- package/dist/assets/{kol-accordion.entry-CV7ohUuG.js → kol-accordion.entry-DJ3RYTNJ.js} +22 -19
- package/dist/assets/kol-accordion.entry-DJ3RYTNJ.js.map +1 -0
- package/dist/assets/kol-alert-wc.entry-DJ6v9ZTT.js +2 -0
- package/dist/assets/{kol-alert-wc.entry-CYKnpWcF.js.map → kol-alert-wc.entry-DJ6v9ZTT.js.map} +1 -1
- package/dist/assets/{kol-alert.entry-CNzUQYLU.js → kol-alert.entry-B5576s7m.js} +2 -4
- package/dist/assets/{kol-alert.entry-CNzUQYLU.js.map → kol-alert.entry-B5576s7m.js.map} +1 -1
- package/dist/assets/kol-avatar-wc.entry-DXhvK3Kl.js +2 -0
- package/dist/assets/{kol-avatar-wc.entry-BblqyWKG.js.map → kol-avatar-wc.entry-DXhvK3Kl.js.map} +1 -1
- package/dist/assets/{kol-avatar.entry-DUW_BVfA.js → kol-avatar.entry-BcHd56mE.js} +2 -4
- package/dist/assets/{kol-avatar.entry-DUW_BVfA.js.map → kol-avatar.entry-BcHd56mE.js.map} +1 -1
- package/dist/assets/{kol-badge.entry-C3zN15_z.js → kol-badge.entry-BFzaTblg.js} +2 -4
- package/dist/assets/{kol-badge.entry-C3zN15_z.js.map → kol-badge.entry-BFzaTblg.js.map} +1 -1
- package/dist/assets/{kol-breadcrumb.entry--_VVs4l-.js → kol-breadcrumb.entry-DXcoSgfX.js} +8 -15
- package/dist/assets/{kol-breadcrumb.entry--_VVs4l-.js.map → kol-breadcrumb.entry-DXcoSgfX.js.map} +1 -1
- package/dist/assets/{kol-button-link.entry-Br3472GN.js → kol-button-link.entry-Dkr0G9Wc.js} +5 -7
- package/dist/assets/{kol-button-link.entry-Br3472GN.js.map → kol-button-link.entry-Dkr0G9Wc.js.map} +1 -1
- package/dist/assets/kol-button-wc.entry-Da4NjoPo.js +2 -0
- package/dist/assets/kol-button-wc.entry-Da4NjoPo.js.map +1 -0
- package/dist/assets/{kol-button.entry-BaZ02nHO.js → kol-button.entry-9bfCehKG.js} +2 -4
- package/dist/assets/{kol-button.entry-BaZ02nHO.js.map → kol-button.entry-9bfCehKG.js.map} +1 -1
- package/dist/assets/kol-card-wc.entry-BBVEBvEJ.js +2 -0
- package/dist/assets/{kol-card-wc.entry-BoWT-ryV.js.map → kol-card-wc.entry-BBVEBvEJ.js.map} +1 -1
- package/dist/assets/{kol-card.entry-Bdt_-GvY.js → kol-card.entry-RLjINNxB.js} +2 -4
- package/dist/assets/{kol-card.entry-Bdt_-GvY.js.map → kol-card.entry-RLjINNxB.js.map} +1 -1
- package/dist/assets/kol-combobox.entry-D_d0J5Vp.js +383 -0
- package/dist/assets/kol-combobox.entry-D_d0J5Vp.js.map +1 -0
- package/dist/assets/{kol-details.entry-BfD1K4If.js → kol-details.entry-VevfCFxw.js} +22 -19
- package/dist/assets/kol-details.entry-VevfCFxw.js.map +1 -0
- package/dist/assets/{kol-drawer.entry-c11KWvha.js → kol-drawer.entry-XUJXIPaP.js} +3 -5
- package/dist/assets/{kol-drawer.entry-c11KWvha.js.map → kol-drawer.entry-XUJXIPaP.js.map} +1 -1
- package/dist/assets/{kol-form.entry-D-LVNbGl.js → kol-form.entry-BgQGx9ZA.js} +6 -8
- package/dist/assets/{kol-form.entry-D-LVNbGl.js.map → kol-form.entry-BgQGx9ZA.js.map} +1 -1
- package/dist/assets/{kol-heading.entry-CCNAcKwT.js → kol-heading.entry-CLT7GAYs.js} +3 -5
- package/dist/assets/{kol-heading.entry-CCNAcKwT.js.map → kol-heading.entry-CLT7GAYs.js.map} +1 -1
- package/dist/assets/{kol-icon.entry-DbZ8n3YR.js → kol-icon.entry-BixwiJYG.js} +4 -5
- package/dist/assets/{kol-icon.entry-DbZ8n3YR.js.map → kol-icon.entry-BixwiJYG.js.map} +1 -1
- package/dist/assets/{kol-image.entry-Doe1SGMb.js → kol-image.entry-BN9CbBs4.js} +3 -5
- package/dist/assets/{kol-image.entry-Doe1SGMb.js.map → kol-image.entry-BN9CbBs4.js.map} +1 -1
- package/dist/assets/{kol-input-checkbox.entry-Bn3dg1V8.js → kol-input-checkbox.entry-B-zCzsDw.js} +3 -5
- package/dist/assets/{kol-input-checkbox.entry-Bn3dg1V8.js.map → kol-input-checkbox.entry-B-zCzsDw.js.map} +1 -1
- package/dist/assets/{kol-input-color.entry-0XDQSN0x.js → kol-input-color.entry-CZYwFnpi.js} +3 -5
- package/dist/assets/{kol-input-color.entry-0XDQSN0x.js.map → kol-input-color.entry-CZYwFnpi.js.map} +1 -1
- package/dist/assets/{kol-input-date.entry-CVwl1xfx.js → kol-input-date.entry-eMgTWFCq.js} +3 -5
- package/dist/assets/{kol-input-date.entry-CVwl1xfx.js.map → kol-input-date.entry-eMgTWFCq.js.map} +1 -1
- package/dist/assets/{kol-input-email.entry-D4pj5A7b.js → kol-input-email.entry-DSuKdAcU.js} +3 -5
- package/dist/assets/{kol-input-email.entry-D4pj5A7b.js.map → kol-input-email.entry-DSuKdAcU.js.map} +1 -1
- package/dist/assets/{kol-input-file.entry-C8xPfnOP.js → kol-input-file.entry-DIEpXXxW.js} +3 -5
- package/dist/assets/{kol-input-file.entry-C8xPfnOP.js.map → kol-input-file.entry-DIEpXXxW.js.map} +1 -1
- package/dist/assets/{kol-input-number.entry-DwCXhQWQ.js → kol-input-number.entry-D7xNprMP.js} +3 -5
- package/dist/assets/{kol-input-number.entry-DwCXhQWQ.js.map → kol-input-number.entry-D7xNprMP.js.map} +1 -1
- package/dist/assets/{kol-input-password.entry-Q-lcjouP.js → kol-input-password.entry-CI_Ivb_e.js} +3 -5
- package/dist/assets/{kol-input-password.entry-Q-lcjouP.js.map → kol-input-password.entry-CI_Ivb_e.js.map} +1 -1
- package/dist/assets/{kol-input-radio.entry-CciQW3YW.js → kol-input-radio.entry-CbirBKHh.js} +3 -5
- package/dist/assets/{kol-input-radio.entry-CciQW3YW.js.map → kol-input-radio.entry-CbirBKHh.js.map} +1 -1
- package/dist/assets/{kol-input-range.entry-iU6Li2fT.js → kol-input-range.entry-BdhQkyvG.js} +9 -11
- package/dist/assets/{kol-input-range.entry-iU6Li2fT.js.map → kol-input-range.entry-BdhQkyvG.js.map} +1 -1
- package/dist/assets/{kol-input-text.entry-PHh_wEiq.js → kol-input-text.entry-BB-dqqfS.js} +3 -5
- package/dist/assets/{kol-input-text.entry-PHh_wEiq.js.map → kol-input-text.entry-BB-dqqfS.js.map} +1 -1
- package/dist/assets/{kol-kolibri.entry-BR0b_jra.js → kol-kolibri.entry-DYU5XjFI.js} +3 -5
- package/dist/assets/{kol-kolibri.entry-BR0b_jra.js.map → kol-kolibri.entry-DYU5XjFI.js.map} +1 -1
- package/dist/assets/{kol-link-button.entry-CunQFFKa.js → kol-link-button.entry-Dab9HQai.js} +3 -5
- package/dist/assets/{kol-link-button.entry-CunQFFKa.js.map → kol-link-button.entry-Dab9HQai.js.map} +1 -1
- package/dist/assets/kol-link-wc.entry-DkWCDGLc.js +2 -0
- package/dist/assets/kol-link-wc.entry-DkWCDGLc.js.map +1 -0
- package/dist/assets/{kol-link.entry-C6_wnPZ-.js → kol-link.entry-C2Im_Hvq.js} +6 -8
- package/dist/assets/{kol-link.entry-C6_wnPZ-.js.map → kol-link.entry-C2Im_Hvq.js.map} +1 -1
- package/dist/assets/{kol-modal.entry-DsZdFm5_.js → kol-modal.entry-yJUKSJxX.js} +3 -5
- package/dist/assets/{kol-modal.entry-DsZdFm5_.js.map → kol-modal.entry-yJUKSJxX.js.map} +1 -1
- package/dist/assets/{kol-nav.entry-CSfQbw6S.js → kol-nav.entry-2rsrfjTj.js} +3 -5
- package/dist/assets/{kol-nav.entry-CSfQbw6S.js.map → kol-nav.entry-2rsrfjTj.js.map} +1 -1
- package/dist/assets/kol-pagination-wc.entry-D9DU5jW0.js +2 -0
- package/dist/assets/{kol-pagination-wc.entry-DI1SD0UY.js.map → kol-pagination-wc.entry-D9DU5jW0.js.map} +1 -1
- package/dist/assets/{kol-pagination.entry-gk3T6sII.js → kol-pagination.entry-D3myaZvZ.js} +3 -5
- package/dist/assets/{kol-pagination.entry-gk3T6sII.js.map → kol-pagination.entry-D3myaZvZ.js.map} +1 -1
- package/dist/assets/kol-popover-button-wc.entry-FIGHen9E.js +2 -0
- package/dist/assets/kol-popover-button-wc.entry-FIGHen9E.js.map +1 -0
- package/dist/assets/{kol-popover-button.entry-C7lTlK8K.js → kol-popover-button.entry-CY91hFv7.js} +3 -5
- package/dist/assets/{kol-popover-button.entry-C7lTlK8K.js.map → kol-popover-button.entry-CY91hFv7.js.map} +1 -1
- package/dist/assets/kol-popover-wc.entry-DqlXiAZp.js +2 -0
- package/dist/assets/kol-popover-wc.entry-DqlXiAZp.js.map +1 -0
- package/dist/assets/{kol-progress.entry-kqMDpH9z.js → kol-progress.entry-DjgBY3GT.js} +3 -5
- package/dist/assets/{kol-progress.entry-kqMDpH9z.js.map → kol-progress.entry-DjgBY3GT.js.map} +1 -1
- package/dist/assets/{kol-quote.entry-CMPN1qSV.js → kol-quote.entry-DxpC3dEF.js} +6 -8
- package/dist/assets/{kol-quote.entry-CMPN1qSV.js.map → kol-quote.entry-DxpC3dEF.js.map} +1 -1
- package/dist/assets/{kol-select.entry-FMTmeJJJ.js → kol-select.entry-DAo3ybSo.js} +6 -6
- package/dist/assets/{kol-select.entry-FMTmeJJJ.js.map → kol-select.entry-DAo3ybSo.js.map} +1 -1
- package/dist/assets/kol-single-select.entry-DKYv5ZhW.js +393 -0
- package/dist/assets/kol-single-select.entry-DKYv5ZhW.js.map +1 -0
- package/dist/assets/{kol-skip-nav.entry-DafyzlxB.js → kol-skip-nav.entry-I7EWJU2v.js} +3 -5
- package/dist/assets/{kol-skip-nav.entry-DafyzlxB.js.map → kol-skip-nav.entry-I7EWJU2v.js.map} +1 -1
- package/dist/assets/{kol-spin.entry-BY2L9jhT.js → kol-spin.entry-DL_vZ5nJ.js} +3 -5
- package/dist/assets/{kol-spin.entry-BY2L9jhT.js.map → kol-spin.entry-DL_vZ5nJ.js.map} +1 -1
- package/dist/assets/{kol-split-button.entry-BFNmHzhp.js → kol-split-button.entry-DY971jfJ.js} +3 -5
- package/dist/assets/{kol-split-button.entry-BFNmHzhp.js.map → kol-split-button.entry-DY971jfJ.js.map} +1 -1
- package/dist/assets/kol-table-settings-wc.entry-CH8HxW_P.js +2 -0
- package/dist/assets/kol-table-settings-wc.entry-CH8HxW_P.js.map +1 -0
- package/dist/assets/{kol-table-stateful.entry-CYI7kfSl.js → kol-table-stateful.entry-BEWFASyI.js} +10 -12
- package/dist/assets/kol-table-stateful.entry-BEWFASyI.js.map +1 -0
- package/dist/assets/kol-table-stateless-wc.entry-ExdLRzNi.js +2 -0
- package/dist/assets/kol-table-stateless-wc.entry-ExdLRzNi.js.map +1 -0
- package/dist/assets/{kol-table-stateless.entry-hMXFjEhF.js → kol-table-stateless.entry-Dyxr5ovU.js} +10 -12
- package/dist/assets/{kol-table-stateless.entry-hMXFjEhF.js.map → kol-table-stateless.entry-Dyxr5ovU.js.map} +1 -1
- package/dist/assets/{kol-tabs.entry-CSiT-Vja.js → kol-tabs.entry-B6U7FePp.js} +3 -5
- package/dist/assets/{kol-tabs.entry-CSiT-Vja.js.map → kol-tabs.entry-B6U7FePp.js.map} +1 -1
- package/dist/assets/{kol-textarea.entry-DJ_7Lsr5.js → kol-textarea.entry-Du2Ma6u_.js} +3 -5
- package/dist/assets/{kol-textarea.entry-DJ_7Lsr5.js.map → kol-textarea.entry-Du2Ma6u_.js.map} +1 -1
- package/dist/assets/{kol-toast-container.entry-D8Xpm0Xn.js → kol-toast-container.entry-Fn64Fiv_.js} +3 -5
- package/dist/assets/{kol-toast-container.entry-D8Xpm0Xn.js.map → kol-toast-container.entry-Fn64Fiv_.js.map} +1 -1
- package/dist/assets/{kol-toolbar.entry-9ySC-BAN.js → kol-toolbar.entry-DV1rBvlk.js} +3 -5
- package/dist/assets/{kol-toolbar.entry-9ySC-BAN.js.map → kol-toolbar.entry-DV1rBvlk.js.map} +1 -1
- package/dist/assets/kol-tooltip-wc.entry-DJ7k4HlU.js +2 -0
- package/dist/assets/kol-tooltip-wc.entry-DJ7k4HlU.js.map +1 -0
- package/dist/assets/kol-tree-item-wc.entry-DBgM3alG.js +2 -0
- package/dist/assets/{kol-tree-item-wc.entry-Di09kCIU.js.map → kol-tree-item-wc.entry-DBgM3alG.js.map} +1 -1
- package/dist/assets/{kol-tree-item.entry-dMSBzhie.js → kol-tree-item.entry-DKCYg25X.js} +3 -5
- package/dist/assets/{kol-tree-item.entry-dMSBzhie.js.map → kol-tree-item.entry-DKCYg25X.js.map} +1 -1
- package/dist/assets/kol-tree-wc.entry-NduGASXe.js +2 -0
- package/dist/assets/{kol-tree-wc.entry-BOC80-CT.js.map → kol-tree-wc.entry-NduGASXe.js.map} +1 -1
- package/dist/assets/{kol-tree.entry-DAhnyulw.js → kol-tree.entry-DuUAYTVZ.js} +3 -5
- package/dist/assets/{kol-tree.entry-DAhnyulw.js.map → kol-tree.entry-DuUAYTVZ.js.map} +1 -1
- package/dist/assets/{kol-version.entry-MhIHSMgx.js → kol-version.entry-Bba3CoxI.js} +3 -5
- package/dist/assets/{kol-version.entry-MhIHSMgx.js.map → kol-version.entry-Bba3CoxI.js.map} +1 -1
- package/dist/assets/label-Dnmzb2S_-Cdyj_kq1.js +2 -0
- package/dist/assets/{label-Dnmzb2S_-DuyBXWC_.js.map → label-Dnmzb2S_-Cdyj_kq1.js.map} +1 -1
- package/dist/assets/link-variant-DQEKOyAU-ex0r5ur_.js +2 -0
- package/dist/assets/{link-variant-DQEKOyAU-Ct9RtX1_.js.map → link-variant-DQEKOyAU-ex0r5ur_.js.map} +1 -1
- package/dist/assets/{markdown-BSkXjaSn-CrcoKTw6.js → markdown-BSkXjaSn-BA5_b1rt.js} +9 -11
- package/dist/assets/{markdown-BSkXjaSn-CrcoKTw6.js.map → markdown-BSkXjaSn-BA5_b1rt.js.map} +1 -1
- package/dist/assets/max-length-behavior-nTw1Zuyf-B6u64YUk.js +2 -0
- package/dist/assets/{max-length-behavior-nTw1Zuyf-GucXJFxa.js.map → max-length-behavior-nTw1Zuyf-B6u64YUk.js.map} +1 -1
- package/dist/assets/multiple-Cj3JQafH-BHn8rKEu.js +2 -0
- package/dist/assets/{multiple-Cj3JQafH-CDntOvdZ.js.map → multiple-Cj3JQafH-BHn8rKEu.js.map} +1 -1
- package/dist/assets/open-CbvHO4XG-C4qNZN5K.js +2 -0
- package/dist/assets/{open-CbvHO4XG-BCQ9q6gh.js.map → open-CbvHO4XG-C4qNZN5K.js.map} +1 -1
- package/dist/assets/orientation-eCMt8CD1-DU0R7kFe.js +2 -0
- package/dist/assets/{orientation-eCMt8CD1-C96vm09b.js.map → orientation-eCMt8CD1-DU0R7kFe.js.map} +1 -1
- package/dist/assets/placeholder-BVhy3BzI-CRJ8ifgl.js +2 -0
- package/dist/assets/{placeholder-BVhy3BzI-CI6o3wD7.js.map → placeholder-BVhy3BzI-CRJ8ifgl.js.map} +1 -1
- package/dist/assets/read-only-BetTuumR-DJj30mVR.js +2 -0
- package/dist/assets/{read-only-BetTuumR-CipqDJTL.js.map → read-only-BetTuumR-DJj30mVR.js.map} +1 -1
- package/dist/assets/required-CnTTpFCN-Btn4cDt_.js +2 -0
- package/dist/assets/{required-CnTTpFCN-BJy5YV3r.js.map → required-CnTTpFCN-Btn4cDt_.js.map} +1 -1
- package/dist/assets/reuse-CX4AQDkS-BaVSFETn.js +2 -0
- package/dist/assets/{reuse-CX4AQDkS-Cyh-fyjG.js.map → reuse-CX4AQDkS-BaVSFETn.js.map} +1 -1
- package/dist/assets/rows-DtS-0sp9-BDwZuKKk.js +2 -0
- package/dist/assets/{rows-DtS-0sp9-DJxBfTGp.js.map → rows-DtS-0sp9-BDwZuKKk.js.map} +1 -1
- package/dist/assets/show-DdPK3aM7-BlHQ5ahJ.js +2 -0
- package/dist/assets/{show-DdPK3aM7-BuMisXZl.js.map → show-DdPK3aM7-BlHQ5ahJ.js.map} +1 -1
- package/dist/assets/spell-check-B9ot-4t--e3lri7-Z.js +2 -0
- package/dist/assets/{spell-check-B9ot-4t--BhdHVhbC.js.map → spell-check-B9ot-4t--e3lri7-Z.js.map} +1 -1
- package/dist/assets/suggestions-B-jLvT4L-D-fAMa4U.js +2 -0
- package/dist/assets/{suggestions-B-jLvT4L-DDe9bNUy.js.map → suggestions-B-jLvT4L-D-fAMa4U.js.map} +1 -1
- package/dist/assets/table-settings-DxLvhwRE-D2NlbOR5.js +2 -0
- package/dist/assets/{table-settings-DxLvhwRE-CduVPZXa.js.map → table-settings-DxLvhwRE-D2NlbOR5.js.map} +1 -1
- package/dist/assets/test-component.entry-CQa2Xcnh.js +2 -0
- package/dist/assets/{test-component.entry-BL3eLwXM.js.map → test-component.entry-CQa2Xcnh.js.map} +1 -1
- package/dist/assets/tooltip-align-Cnin7S26-75G_E4Br.js +2 -0
- package/dist/assets/{tooltip-align-Cnin7S26-CqWSaesg.js.map → tooltip-align-Cnin7S26-75G_E4Br.js.map} +1 -1
- package/dist/assets/tooltip-open-tracking-rBbBgPWP-DRkgcff2.js +2 -0
- package/dist/assets/{tooltip-open-tracking-rBbBgPWP-CZrYVTp5.js.map → tooltip-open-tracking-rBbBgPWP-DRkgcff2.js.map} +1 -1
- package/dist/assets/tslib.es6-CxX45GIN-BGVaTf34.js +2 -0
- package/dist/assets/{tslib.es6-CxX45GIN-BAJoBDh7.js.map → tslib.es6-CxX45GIN-BGVaTf34.js.map} +1 -1
- package/dist/assets/unique-nav-labels-CrfmPC99-CMd9WiMX.js +2 -0
- package/dist/assets/{unique-nav-labels-CrfmPC99-CdxUbk1s.js.map → unique-nav-labels-CrfmPC99-CMd9WiMX.js.map} +1 -1
- package/dist/assets/validation-BfjI5un_-CreD_hIG.js +2 -0
- package/dist/assets/{validation-BfjI5un_-BhDYUf6-.js.map → validation-BfjI5un_-CreD_hIG.js.map} +1 -1
- package/dist/assets/validation-aqgnZOL6-CHFQ0FwF.js +2 -0
- package/dist/assets/{validation-aqgnZOL6-Vhr1set_.js.map → validation-aqgnZOL6-CHFQ0FwF.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +24 -27
- package/src/components/accordion/basic.tsx +9 -5
- package/src/components/breadcrumb/basic.tsx +1 -0
- package/src/components/button/icons.tsx +0 -1
- package/src/components/handout/basic.tsx +9 -2
- package/src/components/input-number/number-formatter.tsx +215 -0
- package/src/components/input-number/routes.ts +2 -0
- package/src/components/input-text/partials/cases.tsx +1 -0
- package/src/components/input-text/text-formatter.tsx +129 -102
- package/src/components/table/multi-sort.tsx +38 -70
- package/src/components/table/predefined-settings.tsx +3 -3
- package/src/components/table/routes.ts +2 -0
- package/src/components/table/settings-column-options.tsx +58 -0
- package/src/components/table/stateful-with-selection.tsx +1 -1
- package/src/components/table/stateful-with-single-selection.tsx +1 -1
- package/src/components/table/stateless-with-selection.tsx +2 -2
- package/src/components/table/stateless-with-settings-menu.tsx +58 -6
- package/src/components/table/stateless-with-single-selection.tsx +2 -2
- package/src/scenarios/appointment-form/AppointmentForm.tsx +115 -97
- package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +83 -75
- package/src/scenarios/appointment-form/DistrictForm.tsx +49 -49
- package/src/scenarios/appointment-form/PersonalInformationForm.tsx +110 -144
- package/src/scenarios/appointment-form/Summary.tsx +11 -10
- package/src/scenarios/appointment-form/formUtils.ts +26 -7
- package/src/scenarios/sample-form-with-validation.tsx +37 -69
- package/src/style.scss +9 -10
- package/dist/assets/Alert-Bjkk9lQv-ARqglia_.js +0 -4
- package/dist/assets/Collapsible-IuDix1Q--Clfk9PjU.js +0 -4
- package/dist/assets/CustomSuggestionsToggle-DZmSWiAa-BTwKHo2H.js +0 -4
- package/dist/assets/CustomSuggestionsToggle-DZmSWiAa-BTwKHo2H.js.map +0 -1
- package/dist/assets/FieldControlStateWrapper-DW4yI_q9-Bonm2OcB.js +0 -4
- package/dist/assets/FormFieldStateWrapper-C48vTgbZ-sskh_yfO.js +0 -4
- package/dist/assets/FormFieldStateWrapper-C48vTgbZ-sskh_yfO.js.map +0 -1
- package/dist/assets/Heading-Bgh5mGuN-NZ2eqsFZ.js +0 -4
- package/dist/assets/Icon-BwahBiNp-UizyCGpl.js +0 -4
- package/dist/assets/Icon-BwahBiNp-UizyCGpl.js.map +0 -1
- package/dist/assets/Input-iXL6EXuW-CiyhDO1S.js +0 -4
- package/dist/assets/InputStateWrapper-BskUoUzv-Y1QuPvo7.js +0 -4
- package/dist/assets/InternalUnderlinedBadgeText-Ba_Akx7b-YDli6NRt.js +0 -4
- package/dist/assets/Span-CS0Z30Mv-DkVBt8xF.js +0 -4
- package/dist/assets/access-and-short-key-B37XLwy2-BBCIaEXs.js +0 -4
- package/dist/assets/align-D-ifSKu8-DHxE7OrW.js +0 -4
- package/dist/assets/align-floating-elements-BkpeqvtE-CQbyIoMm.js +0 -4
- package/dist/assets/associated.controller-ByY2WiIp-D-SArd22.js +0 -4
- package/dist/assets/auto-complete-mCkUnxg2-CPy57VVu.js +0 -4
- package/dist/assets/clsx-eK3rPvPS-BT_IL7Fz.js +0 -4
- package/dist/assets/clsx-eK3rPvPS-BT_IL7Fz.js.map +0 -1
- package/dist/assets/color-BOIEtqEM-L8c8JCkp.js +0 -4
- package/dist/assets/controller-C5Ill7ej-DA9_ZpJu.js +0 -4
- package/dist/assets/controller-C5WSxdih-C0Th29pR.js +0 -4
- package/dist/assets/controller-CX1IIODr-BkmhUxT6.js +0 -4
- package/dist/assets/controller-icon-Bj9jDliX-GITfFrxl.js +0 -4
- package/dist/assets/controller-mXm-vPdA-B6Pyo-EF.js +0 -4
- package/dist/assets/custom-class-nuoQ9Aml-DkG_pprU.js +0 -4
- package/dist/assets/devtools-DSsrYXN7-E4mOPBwO.js +0 -16
- package/dist/assets/disabled-BhpAFgSp-By2R53CP.js +0 -4
- package/dist/assets/has-closer-CQzjaTkv-CJOSQHj3.js +0 -4
- package/dist/assets/hide-label-B9FhGrWP-DKlgXtKv.js +0 -4
- package/dist/assets/href-rwDd36rS-CEz5jHM0.js +0 -4
- package/dist/assets/i18n-C5ifExT3-Biq4UyHg.js +0 -4
- package/dist/assets/icons-B5i9zwjJ-Dzqwsqxx.js +0 -4
- package/dist/assets/image-source-BfBEJ0rX-BecuGTZi.js +0 -4
- package/dist/assets/index-CQ_Buelw.js.map +0 -1
- package/dist/assets/isObject-DvSELytj-B0RigBxT.js +0 -4
- package/dist/assets/keyboard-D6PoWr38-Bn_Qh8Bq.js +0 -4
- package/dist/assets/kol-accordion.entry-CV7ohUuG.js.map +0 -1
- package/dist/assets/kol-alert-wc.entry-CYKnpWcF.js +0 -4
- package/dist/assets/kol-avatar-wc.entry-BblqyWKG.js +0 -4
- package/dist/assets/kol-button-wc.entry-2_mO99Hh.js +0 -4
- package/dist/assets/kol-button-wc.entry-2_mO99Hh.js.map +0 -1
- package/dist/assets/kol-card-wc.entry-BoWT-ryV.js +0 -4
- package/dist/assets/kol-combobox.entry-0wHAnFPY.js +0 -371
- package/dist/assets/kol-combobox.entry-0wHAnFPY.js.map +0 -1
- package/dist/assets/kol-details.entry-BfD1K4If.js.map +0 -1
- package/dist/assets/kol-link-wc.entry-xTBYHT0z.js +0 -4
- package/dist/assets/kol-link-wc.entry-xTBYHT0z.js.map +0 -1
- package/dist/assets/kol-pagination-wc.entry-DI1SD0UY.js +0 -4
- package/dist/assets/kol-popover-button-wc.entry-BfyJh1Tk.js +0 -4
- package/dist/assets/kol-popover-button-wc.entry-BfyJh1Tk.js.map +0 -1
- package/dist/assets/kol-popover-wc.entry-BRbFm4ZE.js +0 -4
- package/dist/assets/kol-popover-wc.entry-BRbFm4ZE.js.map +0 -1
- package/dist/assets/kol-single-select.entry-J9fTeb4w.js +0 -387
- package/dist/assets/kol-single-select.entry-J9fTeb4w.js.map +0 -1
- package/dist/assets/kol-table-settings-wc.entry-M3lIgfdY.js +0 -4
- package/dist/assets/kol-table-settings-wc.entry-M3lIgfdY.js.map +0 -1
- package/dist/assets/kol-table-stateful.entry-CYI7kfSl.js.map +0 -1
- package/dist/assets/kol-table-stateless-wc.entry-C4MdwyvP.js +0 -4
- package/dist/assets/kol-table-stateless-wc.entry-C4MdwyvP.js.map +0 -1
- package/dist/assets/kol-tooltip-wc.entry-tWLuyz_1.js +0 -4
- package/dist/assets/kol-tooltip-wc.entry-tWLuyz_1.js.map +0 -1
- package/dist/assets/kol-tree-item-wc.entry-Di09kCIU.js +0 -4
- package/dist/assets/kol-tree-wc.entry-BOC80-CT.js +0 -4
- package/dist/assets/label-Dnmzb2S_-DuyBXWC_.js +0 -4
- package/dist/assets/link-variant-DQEKOyAU-Ct9RtX1_.js +0 -4
- package/dist/assets/max-length-behavior-nTw1Zuyf-GucXJFxa.js +0 -4
- package/dist/assets/multiple-Cj3JQafH-CDntOvdZ.js +0 -4
- package/dist/assets/open-CbvHO4XG-BCQ9q6gh.js +0 -4
- package/dist/assets/orientation-eCMt8CD1-C96vm09b.js +0 -4
- package/dist/assets/placeholder-BVhy3BzI-CI6o3wD7.js +0 -4
- package/dist/assets/read-only-BetTuumR-CipqDJTL.js +0 -4
- package/dist/assets/required-CnTTpFCN-BJy5YV3r.js +0 -4
- package/dist/assets/reuse-CX4AQDkS-Cyh-fyjG.js +0 -4
- package/dist/assets/rows-DtS-0sp9-DJxBfTGp.js +0 -4
- package/dist/assets/show-DdPK3aM7-BuMisXZl.js +0 -4
- package/dist/assets/spell-check-B9ot-4t--BhdHVhbC.js +0 -4
- package/dist/assets/suggestions-B-jLvT4L-DDe9bNUy.js +0 -4
- package/dist/assets/table-settings-DxLvhwRE-CduVPZXa.js +0 -4
- package/dist/assets/test-component.entry-BL3eLwXM.js +0 -4
- package/dist/assets/tooltip-align-Cnin7S26-CqWSaesg.js +0 -4
- package/dist/assets/tooltip-open-tracking-rBbBgPWP-CZrYVTp5.js +0 -4
- package/dist/assets/tslib.es6-CxX45GIN-BAJoBDh7.js +0 -4
- package/dist/assets/unique-nav-labels-CrfmPC99-CdxUbk1s.js +0 -4
- package/dist/assets/validation-BfjI5un_-BhDYUf6-.js +0 -4
- package/dist/assets/validation-aqgnZOL6-Vhr1set_.js +0 -4
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KolSelectController } from '@public-ui/react-hook-form-adapter';
|
|
2
2
|
import React, { useRef, useState } from 'react';
|
|
3
|
+
import { useFormContext } from 'react-hook-form';
|
|
3
4
|
|
|
4
|
-
import { KolButton, KolForm, KolHeading
|
|
5
|
+
import { KolButton, KolForm, KolHeading } from '@public-ui/react-v19';
|
|
5
6
|
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import type { FormFieldName, FormValues } from './AppointmentForm';
|
|
8
|
+
import { createErrorList, focusErrorList, touchFields } from './formUtils';
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
fieldsToValidate: FormFieldName[];
|
|
12
|
+
onComplete: () => void;
|
|
13
|
+
};
|
|
9
14
|
|
|
10
15
|
const LOCATION_OPTIONS = [
|
|
11
16
|
{
|
|
@@ -30,61 +35,56 @@ const LOCATION_OPTIONS = [
|
|
|
30
35
|
},
|
|
31
36
|
];
|
|
32
37
|
|
|
33
|
-
export function DistrictForm() {
|
|
34
|
-
const
|
|
35
|
-
|
|
38
|
+
export function DistrictForm({ fieldsToValidate, onComplete }: Props) {
|
|
39
|
+
const {
|
|
40
|
+
clearErrors,
|
|
41
|
+
control,
|
|
42
|
+
formState: { errors },
|
|
43
|
+
getValues,
|
|
44
|
+
setValue,
|
|
45
|
+
trigger,
|
|
46
|
+
} = useFormContext<FormValues>();
|
|
47
|
+
const errorList = createErrorList<FormValues>(errors, fieldsToValidate);
|
|
36
48
|
const [sectionSubmitted, setSectionSubmitted] = useState(false);
|
|
37
|
-
const
|
|
49
|
+
const formRef = useRef<HTMLKolFormElement>(null);
|
|
50
|
+
|
|
51
|
+
const handleSubmit = async () => {
|
|
52
|
+
setSectionSubmitted(true);
|
|
53
|
+
touchFields<FormValues>(fieldsToValidate, getValues, setValue);
|
|
54
|
+
const isValid = await trigger(fieldsToValidate, { shouldFocus: true });
|
|
55
|
+
if (isValid) {
|
|
56
|
+
setSectionSubmitted(false);
|
|
57
|
+
onComplete();
|
|
58
|
+
} else {
|
|
59
|
+
focusErrorList(formRef);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
38
62
|
return (
|
|
39
63
|
<div className="p-2">
|
|
40
64
|
<KolHeading _level={2} _label="Select a district"></KolHeading>
|
|
41
65
|
<KolForm
|
|
42
|
-
ref={
|
|
66
|
+
ref={formRef}
|
|
43
67
|
_errorList={sectionSubmitted ? errorList : []}
|
|
44
68
|
_on={{
|
|
45
69
|
onSubmit: () => {
|
|
46
|
-
|
|
47
|
-
form
|
|
48
|
-
.validateForm()
|
|
49
|
-
.then((res) => {
|
|
50
|
-
if (res && Object.keys(res).length > 0) throw Error();
|
|
51
|
-
void form.submitForm();
|
|
52
|
-
})
|
|
53
|
-
.catch(() => {
|
|
54
|
-
focusErrorList(formikRef);
|
|
55
|
-
});
|
|
70
|
+
void handleSubmit();
|
|
56
71
|
},
|
|
57
72
|
}}
|
|
58
73
|
>
|
|
59
|
-
<
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
void form.setFieldTouched('district', true);
|
|
74
|
-
}}
|
|
75
|
-
_on={{
|
|
76
|
-
onChange: (event, values: unknown) => {
|
|
77
|
-
setSectionSubmitted(false);
|
|
78
|
-
// Select und Radio setzen den Wert immer initial.
|
|
79
|
-
if (event.target) {
|
|
80
|
-
const [value] = values as [FormValues['district']];
|
|
81
|
-
void form.setFieldValue('district', value, true);
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
}}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
</Field>
|
|
74
|
+
<KolSelectController
|
|
75
|
+
control={control}
|
|
76
|
+
name="district"
|
|
77
|
+
id="field-district"
|
|
78
|
+
_label="District"
|
|
79
|
+
_options={[{ label: 'Please select…', value: '' }, ...LOCATION_OPTIONS]}
|
|
80
|
+
_required
|
|
81
|
+
_on={{
|
|
82
|
+
onChange: () => {
|
|
83
|
+
setSectionSubmitted(false);
|
|
84
|
+
clearErrors(fieldsToValidate);
|
|
85
|
+
},
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
88
|
|
|
89
89
|
<KolButton _label="Next" _type="submit" className="mt-2" />
|
|
90
90
|
</KolForm>
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KolInputEmailController, KolInputTextController, KolSelectController } from '@public-ui/react-hook-form-adapter';
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useFormContext } from 'react-hook-form';
|
|
3
4
|
|
|
4
|
-
import { KolButton, KolForm, KolHeading
|
|
5
|
+
import { KolButton, KolForm, KolHeading } from '@public-ui/react-v19';
|
|
5
6
|
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import type { FormFieldName, FormValues } from './AppointmentForm';
|
|
8
|
+
import { createErrorList, focusErrorList, touchFields } from './formUtils';
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
fieldsToValidate: FormFieldName[];
|
|
12
|
+
onComplete: () => void;
|
|
13
|
+
};
|
|
9
14
|
|
|
10
15
|
const SALUTATION_OPTIONS = [
|
|
11
16
|
{
|
|
@@ -26,168 +31,129 @@ const SALUTATION_OPTIONS = [
|
|
|
26
31
|
},
|
|
27
32
|
];
|
|
28
33
|
|
|
29
|
-
export function PersonalInformationForm() {
|
|
30
|
-
const
|
|
34
|
+
export function PersonalInformationForm({ fieldsToValidate, onComplete }: Props) {
|
|
35
|
+
const {
|
|
36
|
+
clearErrors,
|
|
37
|
+
control,
|
|
38
|
+
formState: { errors },
|
|
39
|
+
getValues,
|
|
40
|
+
setValue,
|
|
41
|
+
trigger,
|
|
42
|
+
watch,
|
|
43
|
+
} = useFormContext<FormValues>();
|
|
31
44
|
const [sectionSubmitted, setSectionSubmitted] = useState(false);
|
|
32
|
-
const errorList = createErrorList(
|
|
33
|
-
const
|
|
45
|
+
const errorList = createErrorList<FormValues>(errors, fieldsToValidate);
|
|
46
|
+
const formRef = useRef<HTMLKolFormElement>(null);
|
|
47
|
+
const salutation = watch('salutation');
|
|
34
48
|
|
|
35
49
|
useEffect(() => {
|
|
36
|
-
focusErrorList(
|
|
50
|
+
focusErrorList(formRef);
|
|
37
51
|
}, [sectionSubmitted]);
|
|
52
|
+
|
|
53
|
+
const fieldsForValidation = salutation === 'Company' ? fieldsToValidate : fieldsToValidate.filter((field) => field !== 'company');
|
|
54
|
+
|
|
55
|
+
const handleSubmit = async () => {
|
|
56
|
+
setSectionSubmitted(true);
|
|
57
|
+
touchFields<FormValues>(fieldsForValidation, getValues, setValue);
|
|
58
|
+
const isValid = await trigger(fieldsForValidation, { shouldFocus: true });
|
|
59
|
+
if (isValid) {
|
|
60
|
+
onComplete();
|
|
61
|
+
} else {
|
|
62
|
+
focusErrorList(formRef);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
38
65
|
return (
|
|
39
66
|
<div className="p-2">
|
|
40
67
|
<KolHeading _level={2} _label="Enter your contact details"></KolHeading>
|
|
41
68
|
<KolForm
|
|
42
|
-
ref={
|
|
69
|
+
ref={formRef}
|
|
43
70
|
_errorList={sectionSubmitted ? errorList : []}
|
|
44
71
|
_on={{
|
|
45
72
|
onSubmit: () => {
|
|
46
|
-
void
|
|
47
|
-
setSectionSubmitted(true);
|
|
48
|
-
focusErrorList(formikRef);
|
|
73
|
+
void handleSubmit();
|
|
49
74
|
},
|
|
50
75
|
}}
|
|
51
76
|
>
|
|
52
|
-
<
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
<KolSelectController
|
|
78
|
+
control={control}
|
|
79
|
+
name="salutation"
|
|
80
|
+
id="field-salutation"
|
|
81
|
+
_label="Salutation"
|
|
82
|
+
_options={[{ label: 'Please select…', value: '' }, ...SALUTATION_OPTIONS]}
|
|
83
|
+
_required
|
|
84
|
+
_on={{
|
|
85
|
+
onChange: () => {
|
|
86
|
+
setSectionSubmitted(false);
|
|
87
|
+
clearErrors(fieldsToValidate);
|
|
88
|
+
},
|
|
89
|
+
}}
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
{salutation === 'Company' && (
|
|
93
|
+
<div className="block mt-2">
|
|
94
|
+
<KolInputTextController
|
|
95
|
+
control={control}
|
|
96
|
+
name="company"
|
|
97
|
+
id="field-company"
|
|
98
|
+
_label="Company"
|
|
67
99
|
_required
|
|
68
100
|
_on={{
|
|
69
|
-
onChange: (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
void form.setFieldValue('salutation', value, true);
|
|
73
|
-
}
|
|
101
|
+
onChange: () => {
|
|
102
|
+
setSectionSubmitted(false);
|
|
103
|
+
clearErrors(fieldsToValidate);
|
|
74
104
|
},
|
|
75
105
|
}}
|
|
76
106
|
/>
|
|
77
|
-
|
|
78
|
-
</Field>
|
|
79
|
-
|
|
80
|
-
{form.values.salutation === 'Company' && (
|
|
81
|
-
<Field name="company">
|
|
82
|
-
{({ field }: FieldProps<FormValues['company']>) => (
|
|
83
|
-
<div className="block mt-2">
|
|
84
|
-
<KolInputText
|
|
85
|
-
onBlur={() => {
|
|
86
|
-
void form.setFieldTouched('company', true);
|
|
87
|
-
}}
|
|
88
|
-
id="field-company"
|
|
89
|
-
_label="Company"
|
|
90
|
-
_value={field.value}
|
|
91
|
-
_msg={{
|
|
92
|
-
_type: 'error',
|
|
93
|
-
_description: form.errors.company || '',
|
|
94
|
-
}}
|
|
95
|
-
_touched={form.touched.company}
|
|
96
|
-
_required
|
|
97
|
-
_on={{
|
|
98
|
-
onChange: (event, value: unknown) => {
|
|
99
|
-
if (event.target) {
|
|
100
|
-
void form.setFieldValue('company', value, true);
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
}}
|
|
104
|
-
/>
|
|
105
|
-
</div>
|
|
106
|
-
)}
|
|
107
|
-
</Field>
|
|
107
|
+
</div>
|
|
108
108
|
)}
|
|
109
109
|
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
_required
|
|
126
|
-
_on={{
|
|
127
|
-
onChange: (event, value: unknown) => {
|
|
128
|
-
if (event.target) {
|
|
129
|
-
void form.setFieldValue('name', value, true);
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
}}
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
135
|
-
)}
|
|
136
|
-
</Field>
|
|
110
|
+
<div className="block mt-2">
|
|
111
|
+
<KolInputTextController
|
|
112
|
+
control={control}
|
|
113
|
+
name="name"
|
|
114
|
+
id="field-name"
|
|
115
|
+
_label="First name and surname"
|
|
116
|
+
_required
|
|
117
|
+
_on={{
|
|
118
|
+
onChange: () => {
|
|
119
|
+
setSectionSubmitted(false);
|
|
120
|
+
clearErrors(fieldsToValidate);
|
|
121
|
+
},
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
137
125
|
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
_required
|
|
154
|
-
_on={{
|
|
155
|
-
onChange: (event, value: unknown) => {
|
|
156
|
-
if (event.target) {
|
|
157
|
-
void form.setFieldValue('email', value, true);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
}}
|
|
161
|
-
/>
|
|
162
|
-
</div>
|
|
163
|
-
)}
|
|
164
|
-
</Field>
|
|
126
|
+
<div className="block mt-2">
|
|
127
|
+
<KolInputEmailController
|
|
128
|
+
control={control}
|
|
129
|
+
name="email"
|
|
130
|
+
id="field-email"
|
|
131
|
+
_label="E-Mail"
|
|
132
|
+
_required
|
|
133
|
+
_on={{
|
|
134
|
+
onChange: () => {
|
|
135
|
+
setSectionSubmitted(false);
|
|
136
|
+
clearErrors(fieldsToValidate);
|
|
137
|
+
},
|
|
138
|
+
}}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
165
141
|
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (event.target) {
|
|
182
|
-
void form.setFieldTouched('phone', true);
|
|
183
|
-
void form.setFieldValue('phone', value, true);
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
}}
|
|
187
|
-
/>
|
|
188
|
-
</div>
|
|
189
|
-
)}
|
|
190
|
-
</Field>
|
|
142
|
+
<div className="block mt-2">
|
|
143
|
+
<KolInputTextController
|
|
144
|
+
control={control}
|
|
145
|
+
name="phone"
|
|
146
|
+
id="field-phone"
|
|
147
|
+
_type="tel"
|
|
148
|
+
_label="Telephone number"
|
|
149
|
+
_on={{
|
|
150
|
+
onChange: () => {
|
|
151
|
+
setSectionSubmitted(false);
|
|
152
|
+
clearErrors(fieldsToValidate);
|
|
153
|
+
},
|
|
154
|
+
}}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
191
157
|
|
|
192
158
|
<KolButton _label="Next" _type="submit" className="mt-2" />
|
|
193
159
|
</KolForm>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFormikContext } from 'formik';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { useFormContext, useWatch } from 'react-hook-form';
|
|
3
3
|
|
|
4
4
|
import { KolHeading } from '@public-ui/react-v19';
|
|
5
5
|
|
|
@@ -9,7 +9,8 @@ const ValueFallback = () => <i>Nicht angegeben</i>;
|
|
|
9
9
|
const ValueWithFallback = ({ value }: { value: string }) => (value ? value : <ValueFallback />);
|
|
10
10
|
|
|
11
11
|
export function Summary() {
|
|
12
|
-
const {
|
|
12
|
+
const { control } = useFormContext<FormValues>();
|
|
13
|
+
const values = useWatch({ control });
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<>
|
|
@@ -18,38 +19,38 @@ export function Summary() {
|
|
|
18
19
|
<dl>
|
|
19
20
|
<dt>District</dt>
|
|
20
21
|
<dd>
|
|
21
|
-
<ValueWithFallback value={values
|
|
22
|
+
<ValueWithFallback value={values?.district ?? ''} />
|
|
22
23
|
</dd>
|
|
23
24
|
<dt>Appointment</dt>
|
|
24
|
-
<dd>{values
|
|
25
|
+
<dd>{values?.date && values?.time ? `${values.date} ${values.time} Uhr` : <ValueFallback />}</dd>
|
|
25
26
|
|
|
26
|
-
{values
|
|
27
|
+
{values?.salutation === 'Company' ? (
|
|
27
28
|
<>
|
|
28
29
|
<dt>Company</dt>
|
|
29
30
|
<dd>
|
|
30
|
-
<ValueWithFallback value={values
|
|
31
|
+
<ValueWithFallback value={values?.company ?? ''} />
|
|
31
32
|
</dd>
|
|
32
33
|
</>
|
|
33
34
|
) : (
|
|
34
35
|
<>
|
|
35
36
|
<dt>Salutation</dt>
|
|
36
37
|
<dd>
|
|
37
|
-
<ValueWithFallback value={values
|
|
38
|
+
<ValueWithFallback value={values?.salutation ?? ''} />
|
|
38
39
|
</dd>
|
|
39
40
|
</>
|
|
40
41
|
)}
|
|
41
42
|
|
|
42
43
|
<dt>Name</dt>
|
|
43
44
|
<dd>
|
|
44
|
-
<ValueWithFallback value={values
|
|
45
|
+
<ValueWithFallback value={values?.name ?? ''} />
|
|
45
46
|
</dd>
|
|
46
47
|
<dt>E-Mail</dt>
|
|
47
48
|
<dd>
|
|
48
|
-
<ValueWithFallback value={values
|
|
49
|
+
<ValueWithFallback value={values?.email ?? ''} />
|
|
49
50
|
</dd>
|
|
50
51
|
<dt>Phone number</dt>
|
|
51
52
|
<dd>
|
|
52
|
-
<ValueWithFallback value={values
|
|
53
|
+
<ValueWithFallback value={values?.phone ?? ''} />
|
|
53
54
|
</dd>
|
|
54
55
|
</dl>
|
|
55
56
|
</>
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import type { ErrorListPropType } from '@public-ui/components';
|
|
2
|
+
import type { FieldErrors, Path, UseFormGetValues, UseFormSetValue } from 'react-hook-form';
|
|
2
3
|
|
|
3
|
-
export function createErrorList
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export function createErrorList<TFieldValues extends Record<string, unknown>>(
|
|
5
|
+
errors: FieldErrors<TFieldValues>,
|
|
6
|
+
fields?: Array<Path<TFieldValues>>,
|
|
7
|
+
): ErrorListPropType[] {
|
|
8
|
+
const entries: Array<[Path<TFieldValues>, FieldErrors<TFieldValues>[Path<TFieldValues>]]> | Array<[string, FieldErrors<TFieldValues>[string]]> =
|
|
9
|
+
fields?.map((field) => [field, errors[field]]) ?? (Object.entries(errors) as Array<[string, FieldErrors<TFieldValues>[string]]>);
|
|
10
|
+
|
|
11
|
+
return entries
|
|
12
|
+
.map(([fieldName, error]) => ({
|
|
13
|
+
message: typeof error === 'object' && error ? String('message' in error ? error.message : '') : '',
|
|
14
|
+
selector: `#field-${String(fieldName)}`,
|
|
15
|
+
}))
|
|
16
|
+
.filter(({ message }) => Boolean(message));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function focusErrorList(formRef: React.RefObject<HTMLKolFormElement | null>) {
|
|
20
|
+
formRef.current?.focusErrorList().catch(console.warn);
|
|
8
21
|
}
|
|
9
22
|
|
|
10
|
-
export function
|
|
11
|
-
|
|
23
|
+
export function touchFields<TFieldValues extends Record<string, unknown>>(
|
|
24
|
+
fields: Array<Path<TFieldValues>>,
|
|
25
|
+
getValues: UseFormGetValues<TFieldValues>,
|
|
26
|
+
setValue: UseFormSetValue<TFieldValues>,
|
|
27
|
+
): void {
|
|
28
|
+
fields.forEach((name) => {
|
|
29
|
+
setValue(name, getValues(name), { shouldTouch: true });
|
|
30
|
+
});
|
|
12
31
|
}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
2
|
+
import {
|
|
3
|
+
KolComboboxController,
|
|
4
|
+
KolInputCheckboxController,
|
|
5
|
+
KolInputColorController,
|
|
6
|
+
KolInputDateController,
|
|
7
|
+
KolInputEmailController,
|
|
8
|
+
KolInputNumberController,
|
|
9
|
+
KolInputPasswordController,
|
|
10
|
+
KolInputRadioController,
|
|
11
|
+
KolInputRangeController,
|
|
12
|
+
KolInputTextController,
|
|
13
|
+
KolSelectController,
|
|
14
|
+
KolSingleSelectController,
|
|
15
|
+
KolTextareaController,
|
|
16
|
+
} from '@public-ui/react-hook-form-adapter';
|
|
17
|
+
import { KolAlert, KolButton, KolHeading, KolLink } from '@public-ui/react-v19';
|
|
2
18
|
import React from 'react';
|
|
3
19
|
import type { FieldError } from 'react-hook-form';
|
|
4
20
|
import { useForm } from 'react-hook-form';
|
|
5
21
|
import { z } from 'zod';
|
|
6
22
|
|
|
7
|
-
import {
|
|
8
|
-
KolAlert,
|
|
9
|
-
KolButton,
|
|
10
|
-
KolCombobox,
|
|
11
|
-
KolHeading,
|
|
12
|
-
KolInputCheckbox,
|
|
13
|
-
KolInputColor,
|
|
14
|
-
KolInputDate,
|
|
15
|
-
KolInputEmail,
|
|
16
|
-
KolInputNumber,
|
|
17
|
-
KolInputPassword,
|
|
18
|
-
KolInputRadio,
|
|
19
|
-
KolInputRange,
|
|
20
|
-
KolInputText,
|
|
21
|
-
KolLink,
|
|
22
|
-
KolSelect,
|
|
23
|
-
KolSingleSelect,
|
|
24
|
-
KolTextarea,
|
|
25
|
-
} from '@public-ui/react-v19';
|
|
26
|
-
|
|
27
23
|
import { SampleDescription } from '../components/SampleDescription';
|
|
28
24
|
import { useToasterService } from '../hooks/useToasterService';
|
|
29
25
|
import { COUNTRY_SUGGESTIONS } from '../shares/country';
|
|
@@ -59,11 +55,9 @@ export const SampleFormWithValidation: React.FC = () => {
|
|
|
59
55
|
const { dummyClickEventHandler } = useToasterService();
|
|
60
56
|
const {
|
|
61
57
|
handleSubmit,
|
|
62
|
-
formState: { errors
|
|
58
|
+
formState: { errors },
|
|
63
59
|
reset,
|
|
64
|
-
|
|
65
|
-
trigger,
|
|
66
|
-
watch,
|
|
60
|
+
control,
|
|
67
61
|
} = useForm({
|
|
68
62
|
mode: 'onBlur',
|
|
69
63
|
reValidateMode: 'onChange',
|
|
@@ -74,35 +68,6 @@ export const SampleFormWithValidation: React.FC = () => {
|
|
|
74
68
|
},
|
|
75
69
|
});
|
|
76
70
|
|
|
77
|
-
const err = (key: keyof z.infer<typeof formSchema>) => {
|
|
78
|
-
const fieldError = errors[key];
|
|
79
|
-
|
|
80
|
-
if (!fieldError || typeof fieldError !== 'object' || !('message' in fieldError)) {
|
|
81
|
-
return undefined;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return {
|
|
85
|
-
_description: fieldError.message as string,
|
|
86
|
-
_type: 'error' as const,
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const isTouched = (key: keyof z.infer<typeof formSchema>) => {
|
|
91
|
-
return !!touchedFields[key];
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const bind = <K extends keyof z.infer<typeof formSchema>>(key: K) => ({
|
|
95
|
-
id: `field-${key as string}`,
|
|
96
|
-
_name: key,
|
|
97
|
-
_value: watch(key) as z.infer<typeof formSchema>[K],
|
|
98
|
-
_touched: isTouched(key),
|
|
99
|
-
_msg: err(key),
|
|
100
|
-
_on: {
|
|
101
|
-
onInput: (_: Event, v: unknown) => setValue(key, v as any, { shouldTouch: true, shouldValidate: true }),
|
|
102
|
-
onBlur: () => trigger(key),
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
|
|
106
71
|
const onReset = () => {
|
|
107
72
|
reset(undefined, {
|
|
108
73
|
keepErrors: false,
|
|
@@ -147,40 +112,43 @@ export const SampleFormWithValidation: React.FC = () => {
|
|
|
147
112
|
)}
|
|
148
113
|
|
|
149
114
|
<form onSubmit={handleSubmit(dummyClickEventHandler)} noValidate className="grid gap-4 mt-6">
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
<
|
|
157
|
-
<
|
|
115
|
+
<KolInputDateController control={control as any} name="date" _label="Date" />
|
|
116
|
+
<KolInputTextController control={control as any} name="text" _label="Text (≥ 10 chars)" />
|
|
117
|
+
<KolInputEmailController control={control as any} name="email" _label="Email" />
|
|
118
|
+
<KolInputPasswordController control={control as any} name="password" _label="Password" />
|
|
119
|
+
<KolInputRangeController control={control as any} name="range" _label="Range (≥ 30)" _min={0} _max={100} />
|
|
120
|
+
<KolInputNumberController control={control as any} name="number" _label="Number (1 – 10)" />
|
|
121
|
+
<KolInputCheckboxController control={control as any} name="checkbox" _label="Accept terms" />
|
|
122
|
+
<KolInputRadioController
|
|
123
|
+
control={control as any}
|
|
124
|
+
name="radio"
|
|
158
125
|
_label="Gender"
|
|
159
126
|
_options={[
|
|
160
127
|
{ label: 'Female', value: 'f' },
|
|
161
128
|
{ label: 'Male', value: 'm' },
|
|
162
129
|
]}
|
|
163
|
-
{...bind('radio')}
|
|
164
130
|
/>
|
|
165
|
-
<
|
|
166
|
-
<
|
|
131
|
+
<KolInputColorController control={control as any} name="color" _label="Favorite Color" />
|
|
132
|
+
<KolSelectController
|
|
133
|
+
control={control as any}
|
|
134
|
+
name="select"
|
|
167
135
|
_label="Select"
|
|
168
136
|
_options={[
|
|
169
137
|
{ label: 'Option A', value: 'A' },
|
|
170
138
|
{ label: 'Option B', value: 'B' },
|
|
171
139
|
]}
|
|
172
|
-
{...bind('select')}
|
|
173
140
|
/>
|
|
174
|
-
<
|
|
141
|
+
<KolSingleSelectController
|
|
142
|
+
control={control as any}
|
|
143
|
+
name="singleSelect"
|
|
175
144
|
_label="Single Select"
|
|
176
145
|
_options={[
|
|
177
146
|
{ label: 'Option A', value: 'A' },
|
|
178
147
|
{ label: 'Option B', value: 'B' },
|
|
179
148
|
]}
|
|
180
|
-
{...bind('singleSelect')}
|
|
181
149
|
/>
|
|
182
|
-
<
|
|
183
|
-
<
|
|
150
|
+
<KolComboboxController control={control as any} name="combobox" _label="Country" _suggestions={COUNTRY_SUGGESTIONS} />
|
|
151
|
+
<KolTextareaController control={control as any} name="textarea" _label="Message" _rows={4} />
|
|
184
152
|
|
|
185
153
|
<div className="flex gap-4 mt-4">
|
|
186
154
|
<KolButton _label="Submit" _type="submit" _variant="primary" />
|