@public-ui/sample-react 3.1.2-rc.1 → 3.1.2
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/assets/{Alert-DPawiK_u-DmZyHJ9j.js → Alert-Cyr4RO_F-B9EgtDyM.js} +2 -2
- package/dist/assets/{Alert-DPawiK_u-DmZyHJ9j.js.map → Alert-Cyr4RO_F-B9EgtDyM.js.map} +1 -1
- package/dist/assets/{Collapsible-CV9uH8QW-Dg5z06c5.js → Collapsible-65J9qjb2-BZlQW_uq.js} +2 -2
- package/dist/assets/{Collapsible-CV9uH8QW-Dg5z06c5.js.map → Collapsible-65J9qjb2-BZlQW_uq.js.map} +1 -1
- package/dist/assets/{CustomSuggestionsOptionsGroup-CXBAO9w1-CHlFfhWU.js → CustomSuggestionsOptionsGroup-Dgz5IVOs-DYuIiG_X.js} +2 -2
- package/dist/assets/{CustomSuggestionsOptionsGroup-CXBAO9w1-CHlFfhWU.js.map → CustomSuggestionsOptionsGroup-Dgz5IVOs-DYuIiG_X.js.map} +1 -1
- package/dist/assets/{FieldControlStateWrapper-CTXru6yD-BNTidkBA.js → FieldControlStateWrapper-Yb7_L3u1-Dykj6Tp-.js} +2 -2
- package/dist/assets/{FieldControlStateWrapper-CTXru6yD-BNTidkBA.js.map → FieldControlStateWrapper-Yb7_L3u1-Dykj6Tp-.js.map} +1 -1
- package/dist/assets/{FormFieldStateWrapper-CxxIHDZ9-C0d1L0Pw.js → FormFieldStateWrapper-Cj4-CJCr-BKjQSump.js} +2 -2
- package/dist/assets/{FormFieldStateWrapper-CxxIHDZ9-C0d1L0Pw.js.map → FormFieldStateWrapper-Cj4-CJCr-BKjQSump.js.map} +1 -1
- package/dist/assets/{Heading-Ced-SQXs-CfG3DPhj.js → Heading-1FTzB33X-Dwxb2Oks.js} +2 -2
- package/dist/assets/{Heading-Ced-SQXs-CfG3DPhj.js.map → Heading-1FTzB33X-Dwxb2Oks.js.map} +1 -1
- package/dist/assets/{Icon-DGRJwhHU-jfAbeC9o.js → Icon-FTWc_xI9-BqSY1w1g.js} +2 -2
- package/dist/assets/{Icon-DGRJwhHU-jfAbeC9o.js.map → Icon-FTWc_xI9-BqSY1w1g.js.map} +1 -1
- package/dist/assets/{Input-CBpXZ9FH-DATdGTMS.js → Input-D-VKrBBS-CVvAf0s9.js} +2 -2
- package/dist/assets/{Input-CBpXZ9FH-DATdGTMS.js.map → Input-D-VKrBBS-CVvAf0s9.js.map} +1 -1
- package/dist/assets/{InputStateWrapper-BV_Hdtp7-DCva5HcK.js → InputStateWrapper-CqW3i2M_-C3bvbHCV.js} +2 -2
- package/dist/assets/{InputStateWrapper-BV_Hdtp7-DCva5HcK.js.map → InputStateWrapper-CqW3i2M_-C3bvbHCV.js.map} +1 -1
- package/dist/assets/{InternalUnderlinedBadgeText-BuY-onQS-CBv_n62N.js → InternalUnderlinedBadgeText-BeTCgMOl-BAoZf6fz.js} +2 -2
- package/dist/assets/{InternalUnderlinedBadgeText-BuY-onQS-CBv_n62N.js.map → InternalUnderlinedBadgeText-BeTCgMOl-BAoZf6fz.js.map} +1 -1
- package/dist/assets/{Span-C76fzthN-hRfDLnsT.js → Span-B9Wi_b1J-D8hgbpRY.js} +2 -2
- package/dist/assets/{Span-C76fzthN-hRfDLnsT.js.map → Span-B9Wi_b1J-D8hgbpRY.js.map} +1 -1
- package/dist/assets/{access-and-short-key-B37XLwy2-SrYjEW27.js → access-and-short-key-B37XLwy2-LRrdzNMq.js} +2 -2
- package/dist/assets/{access-and-short-key-B37XLwy2-SrYjEW27.js.map → access-and-short-key-B37XLwy2-LRrdzNMq.js.map} +1 -1
- package/dist/assets/{align-D-ifSKu8-Cb8xjikV.js → align-D-ifSKu8-DhQk3v06.js} +2 -2
- package/dist/assets/{align-D-ifSKu8-Cb8xjikV.js.map → align-D-ifSKu8-DhQk3v06.js.map} +1 -1
- package/dist/assets/{align-floating-elements-7Np6z5EU-C3bEGNqG.js → align-floating-elements-7Np6z5EU-DQJxJ4Kr.js} +2 -2
- package/dist/assets/{align-floating-elements-7Np6z5EU-C3bEGNqG.js.map → align-floating-elements-7Np6z5EU-DQJxJ4Kr.js.map} +1 -1
- package/dist/assets/{associated.controller-B9GDDaFL-BVDn95U5.js → associated.controller-B9GDDaFL-n-gMjtxS.js} +2 -2
- package/dist/assets/{associated.controller-B9GDDaFL-BVDn95U5.js.map → associated.controller-B9GDDaFL-n-gMjtxS.js.map} +1 -1
- package/dist/assets/{auto-complete-mCkUnxg2-3Azo4kF9.js → auto-complete-mCkUnxg2-DcRuXSH3.js} +2 -2
- package/dist/assets/{auto-complete-mCkUnxg2-3Azo4kF9.js.map → auto-complete-mCkUnxg2-DcRuXSH3.js.map} +1 -1
- package/dist/assets/{button-variant-_wL6MroY-CvInrY0F.js → button-variant-_wL6MroY-D4qSmZ16.js} +2 -2
- package/dist/assets/{button-variant-_wL6MroY-CvInrY0F.js.map → button-variant-_wL6MroY-D4qSmZ16.js.map} +1 -1
- package/dist/assets/{color-BOIEtqEM-CxuoUTc5.js → color-BOIEtqEM-BGCbgFJF.js} +2 -2
- package/dist/assets/{color-BOIEtqEM-CxuoUTc5.js.map → color-BOIEtqEM-BGCbgFJF.js.map} +1 -1
- package/dist/assets/{controller-BVM81R_j-DrpPz6k5.js → controller-BbPdbRY2-BOXEHC_v.js} +2 -2
- package/dist/assets/{controller-BVM81R_j-DrpPz6k5.js.map → controller-BbPdbRY2-BOXEHC_v.js.map} +1 -1
- package/dist/assets/{controller-CM5wW8Ij-DuGpa6C0.js → controller-CM5wW8Ij-RzCbsWxY.js} +2 -2
- package/dist/assets/{controller-CM5wW8Ij-DuGpa6C0.js.map → controller-CM5wW8Ij-RzCbsWxY.js.map} +1 -1
- package/dist/assets/{controller-CLYkhP2y-CTaygRUb.js → controller-DR4po1JO-Q5JwJkXb.js} +2 -2
- package/dist/assets/{controller-CLYkhP2y-CTaygRUb.js.map → controller-DR4po1JO-Q5JwJkXb.js.map} +1 -1
- package/dist/assets/{controller-DdvAdxaY-BG35dAH5.js → controller-DxHklGK1-BidRDbKd.js} +2 -2
- package/dist/assets/{controller-DdvAdxaY-BG35dAH5.js.map → controller-DxHklGK1-BidRDbKd.js.map} +1 -1
- package/dist/assets/{controller-icon-BMXdGWBH-DU0WzD7H.js → controller-icon-DWR7m7FI-BUiMDOPT.js} +2 -2
- package/dist/assets/{controller-icon-BMXdGWBH-DU0WzD7H.js.map → controller-icon-DWR7m7FI-BUiMDOPT.js.map} +1 -1
- package/dist/assets/custom-class-nuoQ9Aml-CKD2nvBC.js +2 -0
- package/dist/assets/{custom-class-nuoQ9Aml-k3CvN0Q1.js.map → custom-class-nuoQ9Aml-CKD2nvBC.js.map} +1 -1
- package/dist/assets/{dev.utils-iUOH5jci-BDxF2tyy.js → dev.utils-D2KUwuu5-bmd9xpB6.js} +2 -2
- package/dist/assets/{dev.utils-iUOH5jci-BDxF2tyy.js.map → dev.utils-D2KUwuu5-bmd9xpB6.js.map} +1 -1
- package/dist/assets/{devtools-x5A7ew63-D2jJoaSE.js → devtools-iuvU9xiJ-p134dzCf.js} +2 -2
- package/dist/assets/{devtools-x5A7ew63-D2jJoaSE.js.map → devtools-iuvU9xiJ-p134dzCf.js.map} +1 -1
- package/dist/assets/disabled-BhpAFgSp-Dw79dM5w.js +2 -0
- package/dist/assets/{disabled-BhpAFgSp-Ci8x8L08.js.map → disabled-BhpAFgSp-Dw79dM5w.js.map} +1 -1
- package/dist/assets/has-closer-CQzjaTkv-ByVuU6U5.js +2 -0
- package/dist/assets/{has-closer-CQzjaTkv-DjcH2Sqw.js.map → has-closer-CQzjaTkv-ByVuU6U5.js.map} +1 -1
- package/dist/assets/hide-label-B9FhGrWP-rgJHO401.js +2 -0
- package/dist/assets/{hide-label-B9FhGrWP-DnKJv7Uw.js.map → hide-label-B9FhGrWP-rgJHO401.js.map} +1 -1
- package/dist/assets/href-rwDd36rS-CW9a0MwY.js +2 -0
- package/dist/assets/{href-rwDd36rS-CTKE580c.js.map → href-rwDd36rS-CW9a0MwY.js.map} +1 -1
- package/dist/assets/i18n-LBpyQ66X-BOFQwIMK.js +2 -0
- package/dist/assets/{i18n-LBpyQ66X-BxdFXj4b.js.map → i18n-LBpyQ66X-BOFQwIMK.js.map} +1 -1
- package/dist/assets/{icons-DNTuScEN-CnMKGJ3S.js → icons-DNTuScEN-B_Aff7lh.js} +2 -2
- package/dist/assets/{icons-DNTuScEN-CnMKGJ3S.js.map → icons-DNTuScEN-B_Aff7lh.js.map} +1 -1
- package/dist/assets/image-source-BfBEJ0rX-BvOI5rV1.js +2 -0
- package/dist/assets/{image-source-BfBEJ0rX-Cs6mS_aI.js.map → image-source-BfBEJ0rX-BvOI5rV1.js.map} +1 -1
- package/dist/assets/{index-sRqLaO-Y.js → index-BZjd7-d9.js} +33 -33
- package/dist/assets/index-BZjd7-d9.js.map +1 -0
- package/dist/assets/inline-cDaqwSfK-B_1p8WG3.js +2 -0
- package/dist/assets/{inline-cDaqwSfK-Ca_olGs6.js.map → inline-cDaqwSfK-B_1p8WG3.js.map} +1 -1
- package/dist/assets/{kol-abbr.entry-CO9LTHW0.js → kol-abbr.entry-BlQgUNkH.js} +2 -2
- package/dist/assets/{kol-abbr.entry-CO9LTHW0.js.map → kol-abbr.entry-BlQgUNkH.js.map} +1 -1
- package/dist/assets/{kol-accordion.entry-C6O2r3sW.js → kol-accordion.entry-DrkecTu0.js} +2 -2
- package/dist/assets/{kol-accordion.entry-C6O2r3sW.js.map → kol-accordion.entry-DrkecTu0.js.map} +1 -1
- package/dist/assets/{kol-alert-wc.entry-DMFRB8uw.js → kol-alert-wc.entry-DzRVowx7.js} +2 -2
- package/dist/assets/{kol-alert-wc.entry-DMFRB8uw.js.map → kol-alert-wc.entry-DzRVowx7.js.map} +1 -1
- package/dist/assets/{kol-alert.entry-BnqfZDIN.js → kol-alert.entry-n-LaJLhu.js} +2 -2
- package/dist/assets/{kol-alert.entry-BnqfZDIN.js.map → kol-alert.entry-n-LaJLhu.js.map} +1 -1
- package/dist/assets/{kol-avatar-wc.entry-D5J9pYxl.js → kol-avatar-wc.entry-CpadrBFG.js} +2 -2
- package/dist/assets/{kol-avatar-wc.entry-D5J9pYxl.js.map → kol-avatar-wc.entry-CpadrBFG.js.map} +1 -1
- package/dist/assets/{kol-avatar.entry-JmYiWnA_.js → kol-avatar.entry-8tW-yVNf.js} +2 -2
- package/dist/assets/{kol-avatar.entry-JmYiWnA_.js.map → kol-avatar.entry-8tW-yVNf.js.map} +1 -1
- package/dist/assets/{kol-badge.entry-O_AeYXIJ.js → kol-badge.entry-BhGsnIZ3.js} +2 -2
- package/dist/assets/{kol-badge.entry-O_AeYXIJ.js.map → kol-badge.entry-BhGsnIZ3.js.map} +1 -1
- package/dist/assets/{kol-breadcrumb.entry-BxLiQFH9.js → kol-breadcrumb.entry-Cnj1rEM0.js} +2 -2
- package/dist/assets/{kol-breadcrumb.entry-BxLiQFH9.js.map → kol-breadcrumb.entry-Cnj1rEM0.js.map} +1 -1
- package/dist/assets/{kol-button-link.entry-obKE1T36.js → kol-button-link.entry-C-x3SjQ5.js} +2 -2
- package/dist/assets/{kol-button-link.entry-obKE1T36.js.map → kol-button-link.entry-C-x3SjQ5.js.map} +1 -1
- package/dist/assets/{kol-button-wc.entry-B2-84boN.js → kol-button-wc.entry-BaAm3eD9.js} +2 -2
- package/dist/assets/{kol-button-wc.entry-B2-84boN.js.map → kol-button-wc.entry-BaAm3eD9.js.map} +1 -1
- package/dist/assets/{kol-button.entry-C1zzBW5z.js → kol-button.entry-EFuMtzTt.js} +2 -2
- package/dist/assets/{kol-button.entry-C1zzBW5z.js.map → kol-button.entry-EFuMtzTt.js.map} +1 -1
- package/dist/assets/{kol-card-wc.entry-D3a3Y3IG.js → kol-card-wc.entry-Dr_zYsPt.js} +2 -2
- package/dist/assets/{kol-card-wc.entry-D3a3Y3IG.js.map → kol-card-wc.entry-Dr_zYsPt.js.map} +1 -1
- package/dist/assets/{kol-card.entry-DlRidgmq.js → kol-card.entry-wzw9nzRG.js} +2 -2
- package/dist/assets/{kol-card.entry-DlRidgmq.js.map → kol-card.entry-wzw9nzRG.js.map} +1 -1
- package/dist/assets/{kol-combobox.entry-DUAUSC49.js → kol-combobox.entry-DahFb7-A.js} +2 -2
- package/dist/assets/{kol-combobox.entry-DUAUSC49.js.map → kol-combobox.entry-DahFb7-A.js.map} +1 -1
- package/dist/assets/{kol-details.entry-BiV6wNfB.js → kol-details.entry-DFceOZml.js} +2 -2
- package/dist/assets/{kol-details.entry-BiV6wNfB.js.map → kol-details.entry-DFceOZml.js.map} +1 -1
- package/dist/assets/{kol-drawer.entry-DTIemJ9E.js → kol-drawer.entry-C-ta79gR.js} +2 -2
- package/dist/assets/{kol-drawer.entry-DTIemJ9E.js.map → kol-drawer.entry-C-ta79gR.js.map} +1 -1
- package/dist/assets/{kol-form.entry-DAtdP0Op.js → kol-form.entry-Bifplkno.js} +2 -2
- package/dist/assets/{kol-form.entry-DAtdP0Op.js.map → kol-form.entry-Bifplkno.js.map} +1 -1
- package/dist/assets/{kol-heading.entry-CxRaKuF3.js → kol-heading.entry-BqO2snjf.js} +2 -2
- package/dist/assets/{kol-heading.entry-CxRaKuF3.js.map → kol-heading.entry-BqO2snjf.js.map} +1 -1
- package/dist/assets/{kol-icon.entry-B45vnsI-.js → kol-icon.entry-CAd3hS00.js} +2 -2
- package/dist/assets/{kol-icon.entry-B45vnsI-.js.map → kol-icon.entry-CAd3hS00.js.map} +1 -1
- package/dist/assets/{kol-image.entry-B8pgCPeL.js → kol-image.entry-DE1cmSyl.js} +2 -2
- package/dist/assets/{kol-image.entry-B8pgCPeL.js.map → kol-image.entry-DE1cmSyl.js.map} +1 -1
- package/dist/assets/{kol-input-checkbox.entry-CTzH4m_V.js → kol-input-checkbox.entry-CfkiFtW0.js} +2 -2
- package/dist/assets/{kol-input-checkbox.entry-CTzH4m_V.js.map → kol-input-checkbox.entry-CfkiFtW0.js.map} +1 -1
- package/dist/assets/{kol-input-color.entry-B1cO5C9r.js → kol-input-color.entry-Dpg-DM0A.js} +2 -2
- package/dist/assets/{kol-input-color.entry-B1cO5C9r.js.map → kol-input-color.entry-Dpg-DM0A.js.map} +1 -1
- package/dist/assets/{kol-input-date.entry-1S7u9b6A.js → kol-input-date.entry-BA6oWQTV.js} +2 -2
- package/dist/assets/{kol-input-date.entry-1S7u9b6A.js.map → kol-input-date.entry-BA6oWQTV.js.map} +1 -1
- package/dist/assets/{kol-input-email.entry-Ct2wtuXO.js → kol-input-email.entry-B0lYJhuS.js} +2 -2
- package/dist/assets/{kol-input-email.entry-Ct2wtuXO.js.map → kol-input-email.entry-B0lYJhuS.js.map} +1 -1
- package/dist/assets/{kol-input-file.entry-B8G1ohEC.js → kol-input-file.entry-CkMb4Aa2.js} +2 -2
- package/dist/assets/{kol-input-file.entry-B8G1ohEC.js.map → kol-input-file.entry-CkMb4Aa2.js.map} +1 -1
- package/dist/assets/{kol-input-number.entry-BkV3aZNm.js → kol-input-number.entry-C9Uz7ugl.js} +2 -2
- package/dist/assets/{kol-input-number.entry-BkV3aZNm.js.map → kol-input-number.entry-C9Uz7ugl.js.map} +1 -1
- package/dist/assets/{kol-input-password.entry-C1SQs2QM.js → kol-input-password.entry-CKDnNMKM.js} +2 -2
- package/dist/assets/{kol-input-password.entry-C1SQs2QM.js.map → kol-input-password.entry-CKDnNMKM.js.map} +1 -1
- package/dist/assets/{kol-input-radio.entry-Dv51AH7N.js → kol-input-radio.entry-Bvq2xuN_.js} +2 -2
- package/dist/assets/{kol-input-radio.entry-Dv51AH7N.js.map → kol-input-radio.entry-Bvq2xuN_.js.map} +1 -1
- package/dist/assets/{kol-input-range.entry-D-Yv0ta1.js → kol-input-range.entry-BsA0bzxZ.js} +2 -2
- package/dist/assets/{kol-input-range.entry-D-Yv0ta1.js.map → kol-input-range.entry-BsA0bzxZ.js.map} +1 -1
- package/dist/assets/{kol-input-text.entry-D6HpanSD.js → kol-input-text.entry-CvPv_SpQ.js} +2 -2
- package/dist/assets/{kol-input-text.entry-D6HpanSD.js.map → kol-input-text.entry-CvPv_SpQ.js.map} +1 -1
- package/dist/assets/{kol-kolibri.entry-BHhiMbBs.js → kol-kolibri.entry-DwC2eseI.js} +2 -2
- package/dist/assets/{kol-kolibri.entry-BHhiMbBs.js.map → kol-kolibri.entry-DwC2eseI.js.map} +1 -1
- package/dist/assets/{kol-link-button.entry-Yq4trsOK.js → kol-link-button.entry-B-j63Onl.js} +2 -2
- package/dist/assets/{kol-link-button.entry-Yq4trsOK.js.map → kol-link-button.entry-B-j63Onl.js.map} +1 -1
- package/dist/assets/{kol-link-wc.entry-DzYCh4t9.js → kol-link-wc.entry-BHI_sPLD.js} +2 -2
- package/dist/assets/{kol-link-wc.entry-DzYCh4t9.js.map → kol-link-wc.entry-BHI_sPLD.js.map} +1 -1
- package/dist/assets/{kol-link.entry-CZzimAnQ.js → kol-link.entry-B3v21TEB.js} +2 -2
- package/dist/assets/{kol-link.entry-CZzimAnQ.js.map → kol-link.entry-B3v21TEB.js.map} +1 -1
- package/dist/assets/{kol-modal.entry-XLTYxNsN.js → kol-modal.entry-Dng1owrN.js} +2 -2
- package/dist/assets/{kol-modal.entry-XLTYxNsN.js.map → kol-modal.entry-Dng1owrN.js.map} +1 -1
- package/dist/assets/{kol-nav.entry-BVKBKQSJ.js → kol-nav.entry-jMjLvsej.js} +2 -2
- package/dist/assets/{kol-nav.entry-BVKBKQSJ.js.map → kol-nav.entry-jMjLvsej.js.map} +1 -1
- package/dist/assets/{kol-pagination-wc.entry-CEM325PI.js → kol-pagination-wc.entry-D87Syo85.js} +2 -2
- package/dist/assets/{kol-pagination-wc.entry-CEM325PI.js.map → kol-pagination-wc.entry-D87Syo85.js.map} +1 -1
- package/dist/assets/{kol-pagination.entry-CB_cdI3Q.js → kol-pagination.entry-COcyxfvN.js} +2 -2
- package/dist/assets/{kol-pagination.entry-CB_cdI3Q.js.map → kol-pagination.entry-COcyxfvN.js.map} +1 -1
- package/dist/assets/{kol-popover-button-wc.entry-D3TsHOPw.js → kol-popover-button-wc.entry-DG-j1VTP.js} +2 -2
- package/dist/assets/{kol-popover-button-wc.entry-D3TsHOPw.js.map → kol-popover-button-wc.entry-DG-j1VTP.js.map} +1 -1
- package/dist/assets/{kol-popover-button.entry-Dg0UkZ4P.js → kol-popover-button.entry-BKS0FWbh.js} +2 -2
- package/dist/assets/{kol-popover-button.entry-Dg0UkZ4P.js.map → kol-popover-button.entry-BKS0FWbh.js.map} +1 -1
- package/dist/assets/{kol-popover-wc.entry-Dns-e0b3.js → kol-popover-wc.entry-Dn9H03F_.js} +2 -2
- package/dist/assets/{kol-popover-wc.entry-Dns-e0b3.js.map → kol-popover-wc.entry-Dn9H03F_.js.map} +1 -1
- package/dist/assets/{kol-progress.entry-CqPvcswV.js → kol-progress.entry-CdfEo3cm.js} +2 -2
- package/dist/assets/{kol-progress.entry-CqPvcswV.js.map → kol-progress.entry-CdfEo3cm.js.map} +1 -1
- package/dist/assets/{kol-quote.entry-BdilRJzm.js → kol-quote.entry-DxBanMdi.js} +2 -2
- package/dist/assets/{kol-quote.entry-BdilRJzm.js.map → kol-quote.entry-DxBanMdi.js.map} +1 -1
- package/dist/assets/{kol-select-wc.entry-D0xWvPWg.js → kol-select-wc.entry--0rvWXvM.js} +2 -2
- package/dist/assets/{kol-select-wc.entry-D0xWvPWg.js.map → kol-select-wc.entry--0rvWXvM.js.map} +1 -1
- package/dist/assets/{kol-select.entry-kFH0Ms7P.js → kol-select.entry-CiuPcTMM.js} +2 -2
- package/dist/assets/{kol-select.entry-kFH0Ms7P.js.map → kol-select.entry-CiuPcTMM.js.map} +1 -1
- package/dist/assets/{kol-single-select.entry-BYF1cAmw.js → kol-single-select.entry-DgWYHIHW.js} +2 -2
- package/dist/assets/{kol-single-select.entry-BYF1cAmw.js.map → kol-single-select.entry-DgWYHIHW.js.map} +1 -1
- package/dist/assets/{kol-skip-nav.entry-TR_KH9IQ.js → kol-skip-nav.entry-2JkSlLKT.js} +2 -2
- package/dist/assets/{kol-skip-nav.entry-TR_KH9IQ.js.map → kol-skip-nav.entry-2JkSlLKT.js.map} +1 -1
- package/dist/assets/{kol-spin.entry-CgbvAVRf.js → kol-spin.entry-7awF0wgN.js} +2 -2
- package/dist/assets/{kol-spin.entry-CgbvAVRf.js.map → kol-spin.entry-7awF0wgN.js.map} +1 -1
- package/dist/assets/{kol-split-button.entry-DImfZNKp.js → kol-split-button.entry-D2VVIMpP.js} +2 -2
- package/dist/assets/{kol-split-button.entry-DImfZNKp.js.map → kol-split-button.entry-D2VVIMpP.js.map} +1 -1
- package/dist/assets/{kol-table-settings-wc.entry-DwGg0JtN.js → kol-table-settings-wc.entry-DYLzkbkt.js} +2 -2
- package/dist/assets/{kol-table-settings-wc.entry-DwGg0JtN.js.map → kol-table-settings-wc.entry-DYLzkbkt.js.map} +1 -1
- package/dist/assets/{kol-table-stateful.entry-2ocbR_ry.js → kol-table-stateful.entry-BZkDxJij.js} +2 -2
- package/dist/assets/{kol-table-stateful.entry-2ocbR_ry.js.map → kol-table-stateful.entry-BZkDxJij.js.map} +1 -1
- package/dist/assets/{kol-table-stateless-wc.entry-CdNudf0i.js → kol-table-stateless-wc.entry-7ru8_gCj.js} +2 -2
- package/dist/assets/{kol-table-stateless-wc.entry-CdNudf0i.js.map → kol-table-stateless-wc.entry-7ru8_gCj.js.map} +1 -1
- package/dist/assets/{kol-table-stateless.entry-By-SwJJB.js → kol-table-stateless.entry-BGgmumN4.js} +2 -2
- package/dist/assets/{kol-table-stateless.entry-By-SwJJB.js.map → kol-table-stateless.entry-BGgmumN4.js.map} +1 -1
- package/dist/assets/{kol-tabs.entry-CcbVZAD5.js → kol-tabs.entry-CuYaiFrU.js} +2 -2
- package/dist/assets/{kol-tabs.entry-CcbVZAD5.js.map → kol-tabs.entry-CuYaiFrU.js.map} +1 -1
- package/dist/assets/{kol-textarea.entry-rXsY3y_7.js → kol-textarea.entry-B2JQgArr.js} +2 -2
- package/dist/assets/{kol-textarea.entry-rXsY3y_7.js.map → kol-textarea.entry-B2JQgArr.js.map} +1 -1
- package/dist/assets/{kol-toast-container.entry-m1LW5cqQ.js → kol-toast-container.entry-DUI9j7tb.js} +2 -2
- package/dist/assets/{kol-toast-container.entry-m1LW5cqQ.js.map → kol-toast-container.entry-DUI9j7tb.js.map} +1 -1
- package/dist/assets/{kol-toolbar.entry-DRl4fTJ7.js → kol-toolbar.entry-Dwa8t314.js} +2 -2
- package/dist/assets/{kol-toolbar.entry-DRl4fTJ7.js.map → kol-toolbar.entry-Dwa8t314.js.map} +1 -1
- package/dist/assets/{kol-tooltip-wc.entry-CXNiNpNH.js → kol-tooltip-wc.entry-CdiVj6TD.js} +2 -2
- package/dist/assets/{kol-tooltip-wc.entry-CXNiNpNH.js.map → kol-tooltip-wc.entry-CdiVj6TD.js.map} +1 -1
- package/dist/assets/{kol-tree-item-wc.entry-Nqk6XEjx.js → kol-tree-item-wc.entry-COcYaJUx.js} +2 -2
- package/dist/assets/{kol-tree-item-wc.entry-Nqk6XEjx.js.map → kol-tree-item-wc.entry-COcYaJUx.js.map} +1 -1
- package/dist/assets/{kol-tree-item.entry-Bjqx2WRs.js → kol-tree-item.entry-p5TwCnrJ.js} +2 -2
- package/dist/assets/{kol-tree-item.entry-Bjqx2WRs.js.map → kol-tree-item.entry-p5TwCnrJ.js.map} +1 -1
- package/dist/assets/{kol-tree-wc.entry-46MxyTIP.js → kol-tree-wc.entry-Byf_0HR3.js} +2 -2
- package/dist/assets/{kol-tree-wc.entry-46MxyTIP.js.map → kol-tree-wc.entry-Byf_0HR3.js.map} +1 -1
- package/dist/assets/{kol-tree.entry-DpbmkuCA.js → kol-tree.entry-DUz2MvSS.js} +2 -2
- package/dist/assets/{kol-tree.entry-DpbmkuCA.js.map → kol-tree.entry-DUz2MvSS.js.map} +1 -1
- package/dist/assets/{kol-version.entry-zSDCAxho.js → kol-version.entry-B5Fm7U67.js} +2 -2
- package/dist/assets/{kol-version.entry-zSDCAxho.js.map → kol-version.entry-B5Fm7U67.js.map} +1 -1
- package/dist/assets/{label-Dnmzb2S_-Zma6Pxm_.js → label-Dnmzb2S_-1VSZxvoO.js} +2 -2
- package/dist/assets/{label-Dnmzb2S_-Zma6Pxm_.js.map → label-Dnmzb2S_-1VSZxvoO.js.map} +1 -1
- package/dist/assets/{markdown-BSkXjaSn-CNxjZ6s3.js → markdown-BSkXjaSn-Cxzu4wrx.js} +2 -2
- package/dist/assets/{markdown-BSkXjaSn-CNxjZ6s3.js.map → markdown-BSkXjaSn-Cxzu4wrx.js.map} +1 -1
- package/dist/assets/{max-length-behavior-nTw1Zuyf-8RHkW56M.js → max-length-behavior-nTw1Zuyf-DksVlr1c.js} +2 -2
- package/dist/assets/{max-length-behavior-nTw1Zuyf-8RHkW56M.js.map → max-length-behavior-nTw1Zuyf-DksVlr1c.js.map} +1 -1
- package/dist/assets/multiple-Cj3JQafH-DjTr2L2Z.js +2 -0
- package/dist/assets/{multiple-Cj3JQafH-DBF4KrOC.js.map → multiple-Cj3JQafH-DjTr2L2Z.js.map} +1 -1
- package/dist/assets/open-CbvHO4XG-Dc7OEIot.js +2 -0
- package/dist/assets/{open-CbvHO4XG-Cm1wrUdB.js.map → open-CbvHO4XG-Dc7OEIot.js.map} +1 -1
- package/dist/assets/{orientation-eCMt8CD1-aGIn3O98.js → orientation-eCMt8CD1-CCv7wRw7.js} +2 -2
- package/dist/assets/{orientation-eCMt8CD1-aGIn3O98.js.map → orientation-eCMt8CD1-CCv7wRw7.js.map} +1 -1
- package/dist/assets/placeholder-BVhy3BzI-CTg5Xeve.js +2 -0
- package/dist/assets/{placeholder-BVhy3BzI-wu3GKehG.js.map → placeholder-BVhy3BzI-CTg5Xeve.js.map} +1 -1
- package/dist/assets/read-only-BetTuumR-B93cBEp2.js +2 -0
- package/dist/assets/{read-only-BetTuumR-NxVp9WKU.js.map → read-only-BetTuumR-B93cBEp2.js.map} +1 -1
- package/dist/assets/required-CnTTpFCN-fhOY-YdZ.js +2 -0
- package/dist/assets/{required-CnTTpFCN-DwUNrnv3.js.map → required-CnTTpFCN-fhOY-YdZ.js.map} +1 -1
- package/dist/assets/rows-DtS-0sp9-D8fmVgiy.js +2 -0
- package/dist/assets/{rows-DtS-0sp9-DfnnqW3G.js.map → rows-DtS-0sp9-D8fmVgiy.js.map} +1 -1
- package/dist/assets/show-DdPK3aM7-DtcKTglg.js +2 -0
- package/dist/assets/{show-DdPK3aM7-Cw-uYhEh.js.map → show-DdPK3aM7-DtcKTglg.js.map} +1 -1
- package/dist/assets/spell-check-B9ot-4t--rYV4ph5Q.js +2 -0
- package/dist/assets/{spell-check-B9ot-4t--B6qpur0N.js.map → spell-check-B9ot-4t--rYV4ph5Q.js.map} +1 -1
- package/dist/assets/{suggestions-B-jLvT4L-m1pQE2NY.js → suggestions-B-jLvT4L-BO3c5IS0.js} +2 -2
- package/dist/assets/{suggestions-B-jLvT4L-m1pQE2NY.js.map → suggestions-B-jLvT4L-BO3c5IS0.js.map} +1 -1
- package/dist/assets/{table-settings-DxLvhwRE-Ao6HmkWN.js → table-settings-DxLvhwRE-C5gTTxaJ.js} +2 -2
- package/dist/assets/{table-settings-DxLvhwRE-Ao6HmkWN.js.map → table-settings-DxLvhwRE-C5gTTxaJ.js.map} +1 -1
- package/dist/assets/test-component.entry-kW2eau8l.js +2 -0
- package/dist/assets/{test-component.entry-DOmC-t2_.js.map → test-component.entry-kW2eau8l.js.map} +1 -1
- package/dist/assets/tooltip-align-Cnin7S26-C4CqXyIM.js +2 -0
- package/dist/assets/{tooltip-align-Cnin7S26-DDXM0lR1.js.map → tooltip-align-Cnin7S26-C4CqXyIM.js.map} +1 -1
- package/dist/assets/{unique-nav-labels-CrfmPC99-B-kQWspD.js → unique-nav-labels-CrfmPC99-FOk8izWr.js} +2 -2
- package/dist/assets/{unique-nav-labels-CrfmPC99-B-kQWspD.js.map → unique-nav-labels-CrfmPC99-FOk8izWr.js.map} +1 -1
- package/dist/assets/{validation-BfjI5un_-_s5oPe3B.js → validation-BfjI5un_-BtAAVwnX.js} +2 -2
- package/dist/assets/{validation-BfjI5un_-_s5oPe3B.js.map → validation-BfjI5un_-BtAAVwnX.js.map} +1 -1
- package/dist/assets/validation-aqgnZOL6-D9JDYnW_.js +2 -0
- package/dist/assets/{validation-aqgnZOL6-bH5RAQkb.js.map → validation-aqgnZOL6-D9JDYnW_.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +22 -20
- package/src/components/input-text/text-formatter.tsx +240 -139
- package/src/scenarios/react-hook-form/disabled.tsx +52 -0
- package/src/scenarios/routes.ts +2 -0
- package/dist/assets/custom-class-nuoQ9Aml-k3CvN0Q1.js +0 -2
- package/dist/assets/disabled-BhpAFgSp-Ci8x8L08.js +0 -2
- package/dist/assets/has-closer-CQzjaTkv-DjcH2Sqw.js +0 -2
- package/dist/assets/hide-label-B9FhGrWP-DnKJv7Uw.js +0 -2
- package/dist/assets/href-rwDd36rS-CTKE580c.js +0 -2
- package/dist/assets/i18n-LBpyQ66X-BxdFXj4b.js +0 -2
- package/dist/assets/image-source-BfBEJ0rX-Cs6mS_aI.js +0 -2
- package/dist/assets/index-sRqLaO-Y.js.map +0 -1
- package/dist/assets/inline-cDaqwSfK-Ca_olGs6.js +0 -2
- package/dist/assets/multiple-Cj3JQafH-DBF4KrOC.js +0 -2
- package/dist/assets/open-CbvHO4XG-Cm1wrUdB.js +0 -2
- package/dist/assets/placeholder-BVhy3BzI-wu3GKehG.js +0 -2
- package/dist/assets/read-only-BetTuumR-NxVp9WKU.js +0 -2
- package/dist/assets/required-CnTTpFCN-DwUNrnv3.js +0 -2
- package/dist/assets/rows-DtS-0sp9-DfnnqW3G.js +0 -2
- package/dist/assets/show-DdPK3aM7-Cw-uYhEh.js +0 -2
- package/dist/assets/spell-check-B9ot-4t--B6qpur0N.js +0 -2
- package/dist/assets/test-component.entry-DOmC-t2_.js +0 -2
- package/dist/assets/tooltip-align-Cnin7S26-DDXM0lR1.js +0 -2
- package/dist/assets/validation-aqgnZOL6-bH5RAQkb.js +0 -2
|
@@ -1,48 +1,139 @@
|
|
|
1
|
-
import { KolForm, KolInputText } from '@public-ui/react-v19';
|
|
2
|
-
import
|
|
1
|
+
import { KolForm, KolHeading, KolInputText } from '@public-ui/react-v19';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { Controller, useForm } from 'react-hook-form';
|
|
4
|
-
|
|
5
4
|
import { SampleDescription } from '../SampleDescription';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/**
|
|
7
|
+
* IbanFormatter handles formatting and parsing of IBAN values.
|
|
8
|
+
* It groups characters in blocks of 4, separated by spaces.
|
|
9
|
+
* Example: "DE89370400440532013000" → "DE89 3704 0044 0532 0130 00"
|
|
10
|
+
*/
|
|
11
|
+
class IbanFormatter {
|
|
12
|
+
private readonly SEPARATOR = ' ';
|
|
13
|
+
private readonly CHARS_PER_GROUP = 4;
|
|
14
|
+
private readonly KEEP_ALPHANUM = /[^a-zA-Z0-9]/g;
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_on?: KolInputTextEvents;
|
|
20
|
-
_value?: string;
|
|
21
|
-
};
|
|
16
|
+
/**
|
|
17
|
+
* Removes all non-alphanumeric characters and converts to uppercase.
|
|
18
|
+
* This is the raw value stored in the form model.
|
|
19
|
+
*/
|
|
20
|
+
parse(value: string): string {
|
|
21
|
+
return value.replace(this.KEEP_ALPHANUM, '').toUpperCase();
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Formats the value into groups of 4 characters separated by spaces.
|
|
26
|
+
* This is the display value shown in the input field.
|
|
27
|
+
*/
|
|
28
|
+
format(value: string): string {
|
|
29
|
+
const clean = this.parse(value);
|
|
30
|
+
const regex = new RegExp(`(.{${this.CHARS_PER_GROUP}})(?!$)`, 'g');
|
|
31
|
+
return clean.replace(regex, `$1${this.SEPARATOR}`);
|
|
32
|
+
}
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the correct cursor position after formatting changes.
|
|
36
|
+
* This ensures the cursor stays at the expected position when separators are added/removed.
|
|
37
|
+
*/
|
|
38
|
+
adjustCursorPosition(oldValue: string, newValue: string, oldCursorPos: number): number {
|
|
39
|
+
const oldText = this.format(oldValue);
|
|
40
|
+
const newText = this.format(newValue);
|
|
41
|
+
|
|
42
|
+
if (oldCursorPos >= oldText.length) return newText.length;
|
|
43
|
+
|
|
44
|
+
// Count significant characters (excluding separators) up to cursor position
|
|
45
|
+
let significantChars = 0;
|
|
46
|
+
for (let i = 0; i < oldCursorPos && i < oldText.length; i++) {
|
|
47
|
+
if (oldText[i] !== this.SEPARATOR) significantChars++;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Find the corresponding position in the new formatted text
|
|
51
|
+
let count = 0;
|
|
52
|
+
for (let i = 0; i < newText.length; i++) {
|
|
53
|
+
if (newText[i] !== this.SEPARATOR && count++ === significantChars) return i;
|
|
54
|
+
}
|
|
55
|
+
return newText.length;
|
|
29
56
|
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* CurrencyFormatter handles formatting and parsing of currency values.
|
|
61
|
+
* It uses the browser's locale for formatting and intelligently detects
|
|
62
|
+
* decimal vs. thousand separators when parsing.
|
|
63
|
+
* Example: 1000000 → "1.000.000,00 €" (German locale)
|
|
64
|
+
*/
|
|
65
|
+
class CurrencyFormatter {
|
|
66
|
+
private readonly LOCALE = navigator.language;
|
|
67
|
+
private readonly CURRENCY_SYMBOL = ' €';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Parses a formatted currency string back to a raw number.
|
|
71
|
+
* Intelligently detects which character is the decimal separator:
|
|
72
|
+
* - German format: "1.000.000,00" → 1000000 (dot is thousand, comma is decimal)
|
|
73
|
+
* - English format: "1,000,000.00" → 1000000 (comma is thousand, dot is decimal)
|
|
74
|
+
*/
|
|
75
|
+
parse(value: string): number {
|
|
76
|
+
// Remove currency symbols and keep only digits, dots, and commas
|
|
77
|
+
const sanitized = value.replace(/[^\d.,]/g, '');
|
|
78
|
+
|
|
79
|
+
// Determine which character is the decimal separator
|
|
80
|
+
// The rightmost occurrence is typically the decimal separator
|
|
81
|
+
const lastCommaIndex = sanitized.lastIndexOf(',');
|
|
82
|
+
const lastDotIndex = sanitized.lastIndexOf('.');
|
|
30
83
|
|
|
31
|
-
|
|
32
|
-
|
|
84
|
+
let normalizedValue: string;
|
|
85
|
+
|
|
86
|
+
if (lastCommaIndex > lastDotIndex) {
|
|
87
|
+
// Comma is decimal separator (e.g., German: 1.000.000,00)
|
|
88
|
+
// Remove all dots (thousand separators) and replace comma with dot for parseFloat
|
|
89
|
+
normalizedValue = sanitized.replace(/\./g, '').replace(',', '.');
|
|
90
|
+
} else if (lastDotIndex > lastCommaIndex) {
|
|
91
|
+
// Dot is decimal separator (e.g., English: 1,000,000.00)
|
|
92
|
+
// Remove all commas (thousand separators)
|
|
93
|
+
normalizedValue = sanitized.replace(/,/g, '');
|
|
94
|
+
} else {
|
|
95
|
+
// No decimal separator present, remove all dots and commas
|
|
96
|
+
normalizedValue = sanitized.replace(/[.,]/g, '');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return parseFloat(normalizedValue) || 0;
|
|
33
100
|
}
|
|
34
101
|
|
|
35
|
-
|
|
36
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Formats a number as currency according to the browser's locale.
|
|
104
|
+
* Always shows 2 decimal places and appends the currency symbol.
|
|
105
|
+
*/
|
|
106
|
+
format(value: number | string): string {
|
|
107
|
+
const number = typeof value === 'string' ? this.parse(value) : value;
|
|
108
|
+
const formatted = new Intl.NumberFormat(this.LOCALE, {
|
|
109
|
+
minimumFractionDigits: 2,
|
|
110
|
+
maximumFractionDigits: 2,
|
|
111
|
+
}).format(number);
|
|
112
|
+
return formatted + this.CURRENCY_SYMBOL;
|
|
37
113
|
}
|
|
38
114
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Calculates the correct cursor position after formatting changes.
|
|
117
|
+
* This ensures the cursor stays aligned with digits when thousand separators are added/removed.
|
|
118
|
+
*/
|
|
119
|
+
adjustCursorPosition(oldValue: string, newValue: string, oldCursorPos: number): number {
|
|
120
|
+
const oldText = this.format(oldValue);
|
|
121
|
+
const newText = this.format(newValue);
|
|
122
|
+
|
|
123
|
+
if (oldCursorPos >= oldText.length) return newText.length;
|
|
124
|
+
|
|
125
|
+
// Count digits up to cursor position (ignoring separators and currency symbols)
|
|
126
|
+
let digitCount = 0;
|
|
127
|
+
for (let i = 0; i < oldCursorPos && i < oldText.length; i++) {
|
|
128
|
+
if (/\d/.test(oldText[i])) digitCount++;
|
|
44
129
|
}
|
|
45
|
-
|
|
130
|
+
|
|
131
|
+
// Find the corresponding position in the new formatted text
|
|
132
|
+
let count = 0;
|
|
133
|
+
for (let i = 0; i < newText.length; i++) {
|
|
134
|
+
if (/\d/.test(newText[i]) && count++ === digitCount) return i;
|
|
135
|
+
}
|
|
136
|
+
return newText.length;
|
|
46
137
|
}
|
|
47
138
|
}
|
|
48
139
|
|
|
@@ -50,129 +141,139 @@ type IbanExampleFormValues = {
|
|
|
50
141
|
iban: string;
|
|
51
142
|
};
|
|
52
143
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_on,
|
|
57
|
-
_value,
|
|
58
|
-
...props
|
|
59
|
-
}: KolInputTextProps & {
|
|
60
|
-
formatter: IbanFormatter;
|
|
61
|
-
selectionStartRef: React.MutableRefObject<number | null>;
|
|
62
|
-
}) {
|
|
63
|
-
const inputRef = useRef<HTMLKolInputTextElement | null>(null);
|
|
64
|
-
const normalizedOn = _on && typeof _on === 'object' ? (_on as KolInputTextEvents) : undefined;
|
|
65
|
-
const sanitizedSelectionRef = selectionStartRef as React.MutableRefObject<number | null>;
|
|
66
|
-
|
|
67
|
-
const element = inputRef.current;
|
|
68
|
-
const selectionStart = sanitizedSelectionRef.current;
|
|
69
|
-
const sanitizedFormatter: IbanFormatter = formatter;
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<KolInputText
|
|
73
|
-
{...props}
|
|
74
|
-
ref={inputRef}
|
|
75
|
-
_value={sanitizedFormatter.format(_value ?? '', element, selectionStart)}
|
|
76
|
-
_on={{
|
|
77
|
-
...normalizedOn,
|
|
78
|
-
onInput: (event: Event, value: unknown) => {
|
|
79
|
-
const selectionStartGetter = (inputRef.current as InputTextElementSelection | null)?.selectionStart;
|
|
80
|
-
selectionStartGetter?.().then((start) => {
|
|
81
|
-
sanitizedSelectionRef.current = start ?? null;
|
|
82
|
-
});
|
|
83
|
-
const parsedValue = sanitizedFormatter.parse(typeof value === 'string' ? value : '');
|
|
84
|
-
normalizedOn?.onInput?.(event, parsedValue);
|
|
85
|
-
},
|
|
86
|
-
}}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function KolFormattedIbanController(props: any) {
|
|
92
|
-
const { name, control, rules, defaultValue, shouldUnregister, disabled, formatter, selectionStartRef, ...componentProps } = props;
|
|
93
|
-
return (
|
|
94
|
-
<Controller
|
|
95
|
-
name={name}
|
|
96
|
-
control={control}
|
|
97
|
-
rules={rules}
|
|
98
|
-
defaultValue={defaultValue}
|
|
99
|
-
shouldUnregister={shouldUnregister}
|
|
100
|
-
disabled={disabled}
|
|
101
|
-
render={({ field, fieldState }) => {
|
|
102
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
103
|
-
const userHandlers = componentProps._on as KolInputTextEvents | undefined;
|
|
104
|
-
return (
|
|
105
|
-
<FormattedKolInputText
|
|
106
|
-
{...(componentProps as any)}
|
|
107
|
-
formatter={formatter}
|
|
108
|
-
selectionStartRef={selectionStartRef}
|
|
109
|
-
_value={field.value}
|
|
110
|
-
_touched={fieldState.isTouched}
|
|
111
|
-
_msg={
|
|
112
|
-
fieldState.error
|
|
113
|
-
? {
|
|
114
|
-
_type: 'error' as const,
|
|
115
|
-
_description: fieldState.error.message || String(fieldState.error),
|
|
116
|
-
}
|
|
117
|
-
: undefined
|
|
118
|
-
}
|
|
119
|
-
_on={{
|
|
120
|
-
onInput: (event: Event, value: unknown) => {
|
|
121
|
-
field.onChange(value);
|
|
122
|
-
userHandlers?.onInput?.(event, value);
|
|
123
|
-
},
|
|
124
|
-
onBlur: () => field.onBlur(),
|
|
125
|
-
}}
|
|
126
|
-
/>
|
|
127
|
-
);
|
|
128
|
-
}}
|
|
129
|
-
/>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
144
|
+
type CurrencyExampleFormValues = {
|
|
145
|
+
currency: number;
|
|
146
|
+
};
|
|
132
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Demo component showcasing two different text formatting strategies for input fields.
|
|
150
|
+
*
|
|
151
|
+
* Strategy 1 - Live Formatting (IBAN):
|
|
152
|
+
* - Formats text while typing
|
|
153
|
+
* - Maintains intelligent cursor positioning
|
|
154
|
+
* - Best for: Fixed-format values where users expect immediate visual feedback
|
|
155
|
+
*
|
|
156
|
+
* Strategy 2 - On-Blur Formatting (Currency):
|
|
157
|
+
* - Formats only when field loses focus (onBlur event)
|
|
158
|
+
* - Allows free typing without formatting interruptions
|
|
159
|
+
* - Best for: Numeric values where users might type in various formats
|
|
160
|
+
*/
|
|
133
161
|
export function InputTextFormatterDemo() {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const textInput1SelectionStart = useRef<number | null>(null);
|
|
137
|
-
|
|
138
|
-
const initialIbanExampleValues: IbanExampleFormValues = {
|
|
139
|
-
iban: 'DE89370400440532013000',
|
|
140
|
-
};
|
|
162
|
+
const ibanFormatter = new IbanFormatter();
|
|
163
|
+
const currencyFormatter = new CurrencyFormatter();
|
|
141
164
|
|
|
142
165
|
const ibanForm = useForm<IbanExampleFormValues>({
|
|
143
|
-
defaultValues:
|
|
144
|
-
mode: 'onTouched',
|
|
166
|
+
defaultValues: { iban: 'DE89370400440532013000' },
|
|
145
167
|
});
|
|
168
|
+
const currencyForm = useForm<CurrencyExampleFormValues>({
|
|
169
|
+
defaultValues: { currency: 1000000 },
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Handles input events for the IBAN field with live formatting.
|
|
174
|
+
* Updates the model value and adjusts cursor position to maintain UX during formatting.
|
|
175
|
+
*/
|
|
176
|
+
const handleIbanInput = (event: Event) => {
|
|
177
|
+
const input = event.target as HTMLInputElement;
|
|
178
|
+
const newValue = ibanFormatter.parse(input.value);
|
|
179
|
+
const newCursorPos = ibanFormatter.adjustCursorPosition(ibanForm.getValues('iban'), newValue, input.selectionStart || 0);
|
|
146
180
|
|
|
147
|
-
|
|
181
|
+
// Update the form model with the parsed (unformatted) value
|
|
182
|
+
ibanForm.setValue('iban', newValue);
|
|
148
183
|
|
|
149
|
-
|
|
150
|
-
|
|
184
|
+
// Use double requestAnimationFrame to ensure cursor position is set after React re-render
|
|
185
|
+
requestAnimationFrame(() => {
|
|
186
|
+
requestAnimationFrame(() => {
|
|
187
|
+
input.setSelectionRange(newCursorPos, newCursorPos);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
151
190
|
};
|
|
152
191
|
|
|
153
192
|
return (
|
|
154
193
|
<>
|
|
155
194
|
<SampleDescription>
|
|
195
|
+
<p>This example demonstrates two different formatting strategies for input fields:</p>
|
|
196
|
+
<ul>
|
|
197
|
+
<li>
|
|
198
|
+
<strong>Live Formatting (IBAN):</strong> Formatting happens while typing. The value is immediately formatted and displayed with intelligent cursor
|
|
199
|
+
positioning. Best for fixed-format values where users expect visual feedback during input.
|
|
200
|
+
</li>
|
|
201
|
+
<li>
|
|
202
|
+
<strong>On-Blur Formatting (Currency):</strong> Formatting happens when leaving the field (onBlur event). Allows free typing without interruption.
|
|
203
|
+
Best for numeric values where users might input in various formats.
|
|
204
|
+
</li>
|
|
205
|
+
</ul>
|
|
156
206
|
<p>
|
|
157
|
-
|
|
158
|
-
|
|
207
|
+
<strong>Key Concept:</strong> The form model always stores the <em>unformatted</em> value (raw IBAN string, numeric currency value), while the input
|
|
208
|
+
field displays the <em>formatted</em> value for better readability.
|
|
159
209
|
</p>
|
|
160
210
|
</SampleDescription>
|
|
161
|
-
<section className="w-full">
|
|
162
|
-
<div>
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
211
|
+
<section className="w-full flex flex-col">
|
|
212
|
+
<div className="p-2">
|
|
213
|
+
<KolHeading _label="Live Formatting - IBAN" _level={2} />
|
|
214
|
+
<p className="text-sm mb-2">Formatting occurs during input with intelligent cursor control</p>
|
|
215
|
+
<KolForm>
|
|
216
|
+
<form onSubmit={ibanForm.handleSubmit(async () => {})}>
|
|
217
|
+
<Controller
|
|
218
|
+
name="iban"
|
|
219
|
+
control={ibanForm.control}
|
|
220
|
+
render={({ field }) => (
|
|
221
|
+
<div className="block mt-2">
|
|
222
|
+
<KolInputText
|
|
223
|
+
id="field-iban"
|
|
224
|
+
_label="IBAN"
|
|
225
|
+
_value={ibanFormatter.format(field.value ?? '')}
|
|
226
|
+
_required
|
|
227
|
+
_on={{
|
|
228
|
+
onInput: handleIbanInput,
|
|
229
|
+
onBlur: field.onBlur,
|
|
230
|
+
}}
|
|
231
|
+
/>
|
|
232
|
+
</div>
|
|
233
|
+
)}
|
|
234
|
+
/>
|
|
235
|
+
</form>
|
|
174
236
|
</KolForm>
|
|
175
|
-
|
|
237
|
+
</div>
|
|
238
|
+
<div className="p-2">
|
|
239
|
+
<KolHeading _label="Model (Unformatted Value)" _level={2} />
|
|
240
|
+
<pre className="text-base">{JSON.stringify(ibanForm.watch(), null, 2)}</pre>
|
|
241
|
+
</div>
|
|
242
|
+
</section>
|
|
243
|
+
|
|
244
|
+
<section className="w-full flex flex-col">
|
|
245
|
+
<div className="p-2">
|
|
246
|
+
<KolHeading _label="On-Blur Formatting - Currency" _level={2} />
|
|
247
|
+
<p className="text-sm mb-2">Formatting occurs when leaving the field (onBlur) for uninterrupted input</p>
|
|
248
|
+
<KolForm>
|
|
249
|
+
<form onSubmit={currencyForm.handleSubmit(async () => {})}>
|
|
250
|
+
<Controller
|
|
251
|
+
name="currency"
|
|
252
|
+
control={currencyForm.control}
|
|
253
|
+
render={({ field }) => (
|
|
254
|
+
<div className="block mt-2">
|
|
255
|
+
<KolInputText
|
|
256
|
+
id="field-currency"
|
|
257
|
+
_label="Currency"
|
|
258
|
+
_value={currencyFormatter.format(field.value ?? 0)}
|
|
259
|
+
_on={{
|
|
260
|
+
onBlur: (event: Event) => {
|
|
261
|
+
const input = event.target as HTMLInputElement;
|
|
262
|
+
const parsedValue = currencyFormatter.parse(input.value);
|
|
263
|
+
field.onChange(parsedValue);
|
|
264
|
+
field.onBlur();
|
|
265
|
+
},
|
|
266
|
+
}}
|
|
267
|
+
/>
|
|
268
|
+
</div>
|
|
269
|
+
)}
|
|
270
|
+
/>
|
|
271
|
+
</form>
|
|
272
|
+
</KolForm>
|
|
273
|
+
</div>
|
|
274
|
+
<div className="p-2">
|
|
275
|
+
<KolHeading _label="Model (Numeric Value)" _level={2} />
|
|
276
|
+
<pre className="text-base">{JSON.stringify(currencyForm.watch(), null, 2)}</pre>
|
|
176
277
|
</div>
|
|
177
278
|
</section>
|
|
178
279
|
</>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { KolInputTextController } from '@public-ui/react-hook-form-adapter';
|
|
2
|
+
import { KolButton, KolForm } from '@public-ui/react-v19';
|
|
3
|
+
import React, { type BaseSyntheticEvent, type FC } from 'react';
|
|
4
|
+
import type { SubmitHandler } from 'react-hook-form';
|
|
5
|
+
import { useForm } from 'react-hook-form';
|
|
6
|
+
|
|
7
|
+
import { SampleDescription } from '../../components/SampleDescription';
|
|
8
|
+
|
|
9
|
+
interface FormData {
|
|
10
|
+
first: string;
|
|
11
|
+
second: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const defaultValues: FormData = {
|
|
15
|
+
first: '',
|
|
16
|
+
second: '',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const RHFDisabled: FC = () => {
|
|
20
|
+
const { control, handleSubmit, watch } = useForm<FormData>({
|
|
21
|
+
defaultValues,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const onSubmit: SubmitHandler<FormData> = (data) => {
|
|
25
|
+
alert(JSON.stringify(data, null, 2));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<SampleDescription>
|
|
31
|
+
<p>This sample shows two fields of which just one can be filled. The other gets disabled.</p>
|
|
32
|
+
</SampleDescription>
|
|
33
|
+
|
|
34
|
+
<KolForm
|
|
35
|
+
className="w-full max-w-xl"
|
|
36
|
+
_on={{
|
|
37
|
+
onSubmit: (event) => {
|
|
38
|
+
void handleSubmit(onSubmit)(event as unknown as BaseSyntheticEvent);
|
|
39
|
+
},
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<div className="grid gap-4">
|
|
43
|
+
<KolInputTextController name="first" control={control} _label="First" _disabled={!!watch('second')} />
|
|
44
|
+
|
|
45
|
+
<KolInputTextController name="second" control={control} _label="Second" _disabled={!!watch('first')} />
|
|
46
|
+
|
|
47
|
+
<KolButton _label="Submit" _type="submit" />
|
|
48
|
+
</div>
|
|
49
|
+
</KolForm>
|
|
50
|
+
</>
|
|
51
|
+
);
|
|
52
|
+
};
|
package/src/scenarios/routes.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { InputGroupWithError } from './input-group-with-error';
|
|
|
9
9
|
import { InputsGetValue } from './inputs-get-value';
|
|
10
10
|
import { PerformanceTest } from './performance-test';
|
|
11
11
|
import { RHFBasic } from './react-hook-form/basic';
|
|
12
|
+
import { RHFDisabled } from './react-hook-form/disabled';
|
|
12
13
|
import { SameHeightOfAllInteractiveElements } from './same-height-of-all-interactive-elements';
|
|
13
14
|
import { SampleFormWithValidation } from './sample-form-with-validation';
|
|
14
15
|
import { StaticForm } from './static-form';
|
|
@@ -25,6 +26,7 @@ export const SCENARIO_ROUTES: Routes = {
|
|
|
25
26
|
'input-group-with-error': InputGroupWithError,
|
|
26
27
|
'inputs-get-value': InputsGetValue,
|
|
27
28
|
'react-hook-form-adapter': RHFBasic,
|
|
29
|
+
'react-hook-form-adapter-disabled': RHFDisabled,
|
|
28
30
|
'same-height-of-all-interactive-elements': SameHeightOfAllInteractiveElements,
|
|
29
31
|
'static-form': StaticForm,
|
|
30
32
|
'sample-form-with-validation': SampleFormWithValidation,
|