@ukic/canary-web-components 2.0.0-canary.4 → 2.0.0-canary.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-bbe55215.js → helpers-86375e76.js} +6 -6
- package/dist/cjs/{helpers-bbe55215.js.map → helpers-86375e76.js.map} +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +4 -8
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +61 -32
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -8
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +2 -2
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +48 -11
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +10 -4
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +38 -61
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +3 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +12 -15
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +69 -0
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-4cf27b16.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js +8 -1
- package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
- package/dist/components/helpers.js +5 -5
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert2.js +1 -1
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-back-to-top.js +3 -7
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-button2.js +28 -4
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +4 -7
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-popover-menu.js +9 -3
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-side-navigation.js +40 -61
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-status-tag.js +2 -1
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-text-field2.js +52 -10
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-toast.js +11 -14
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button.js +117 -0
- package/dist/components/ic-toggle-button.js.map +1 -0
- package/dist/components/ic-tooltip2.js +32 -27
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -1
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-39e20b87.entry.js → p-010053ab.entry.js} +2 -2
- package/dist/core/{p-5157cfab.entry.js → p-03fdee20.entry.js} +2 -2
- package/dist/core/p-03fdee20.entry.js.map +1 -0
- package/dist/core/{p-4ee59448.entry.js → p-043e4073.entry.js} +2 -2
- package/dist/core/{p-4314aa0e.entry.js → p-0aa1fe4e.entry.js} +2 -2
- package/dist/core/{p-be980606.entry.js → p-1e9f689b.entry.js} +2 -2
- package/dist/core/{p-1bc034aa.entry.js → p-217db3af.entry.js} +2 -2
- package/dist/core/p-217db3af.entry.js.map +1 -0
- package/dist/core/p-234edce6.entry.js +2 -0
- package/dist/core/p-234edce6.entry.js.map +1 -0
- package/dist/core/{p-b5cf6d65.entry.js → p-26ca8030.entry.js} +2 -2
- package/dist/core/p-26ca8030.entry.js.map +1 -0
- package/dist/core/p-2addb040.entry.js +2 -0
- package/dist/core/{p-a51e5c7c.entry.js.map → p-2addb040.entry.js.map} +1 -1
- package/dist/core/{p-75bf6162.entry.js → p-3294eba4.entry.js} +2 -2
- package/dist/core/{p-75bf6162.entry.js.map → p-3294eba4.entry.js.map} +1 -1
- package/dist/core/{p-939baa93.entry.js → p-3e36c9e4.entry.js} +2 -2
- package/dist/core/{p-939baa93.entry.js.map → p-3e36c9e4.entry.js.map} +1 -1
- package/dist/core/{p-bd9cecce.entry.js → p-4119a26b.entry.js} +2 -2
- package/dist/core/{p-3d618bc2.entry.js → p-452be32a.entry.js} +2 -2
- package/dist/core/{p-85508347.entry.js → p-5332a426.entry.js} +2 -2
- package/dist/core/{p-d77960f6.entry.js → p-56645c00.entry.js} +2 -2
- package/dist/core/{p-c1256810.entry.js → p-5f8c4c83.entry.js} +2 -2
- package/dist/core/p-5f8c4c83.entry.js.map +1 -0
- package/dist/core/{p-67eea079.entry.js → p-78ad0c34.entry.js} +2 -2
- package/dist/core/p-78ad0c34.entry.js.map +1 -0
- package/dist/core/{p-55d5541f.entry.js → p-79b39c8a.entry.js} +2 -2
- package/dist/core/{p-53083575.entry.js → p-7a0790e4.entry.js} +2 -2
- package/dist/core/p-7a0790e4.entry.js.map +1 -0
- package/dist/core/{p-2dc35696.entry.js → p-7b17f3ce.entry.js} +2 -2
- package/dist/core/{p-2e9e8e7c.entry.js → p-7e0197a4.entry.js} +2 -2
- package/dist/core/p-8cde58bf.entry.js +2 -0
- package/dist/core/p-8cde58bf.entry.js.map +1 -0
- package/dist/core/{p-f0e9a83f.entry.js → p-8eaed5b7.entry.js} +2 -2
- package/dist/core/{p-ab9f8a3f.entry.js → p-93828f0e.entry.js} +2 -2
- package/dist/core/{p-3ee25a6d.entry.js → p-99a9ce86.entry.js} +2 -2
- package/dist/core/{p-20a76d1d.entry.js → p-9c6e48fb.entry.js} +2 -2
- package/dist/core/{p-485823b6.entry.js → p-a048beab.entry.js} +2 -2
- package/dist/core/{p-bc187bb5.entry.js → p-a561980f.entry.js} +2 -2
- package/dist/core/{p-7eae5f70.entry.js → p-a6a90c56.entry.js} +2 -2
- package/dist/core/{p-f23d2102.entry.js → p-ae337896.entry.js} +2 -2
- package/dist/core/{p-4409f656.entry.js → p-b4591bfe.entry.js} +2 -2
- package/dist/core/{p-9fa6844f.entry.js → p-b7d5ced3.entry.js} +2 -2
- package/dist/core/{p-03f8fa1a.entry.js → p-c2884fcd.entry.js} +2 -2
- package/dist/core/{p-6bd0e984.entry.js → p-cae71c32.entry.js} +2 -2
- package/dist/core/{p-47abbd06.entry.js → p-cedabab7.entry.js} +2 -2
- package/dist/core/{p-76959313.entry.js → p-da1f0a53.entry.js} +2 -2
- package/dist/core/{p-f87e8411.entry.js → p-dd0a5ef0.entry.js} +2 -2
- package/dist/core/p-dd0a5ef0.entry.js.map +1 -0
- package/dist/core/{p-8fd4ca0a.js → p-e0102744.js} +1 -1
- package/dist/core/{p-8fd4ca0a.js.map → p-e0102744.js.map} +1 -1
- package/dist/core/p-e0d8d7a5.entry.js +2 -0
- package/dist/core/p-e0d8d7a5.entry.js.map +1 -0
- package/dist/core/p-e2ccb52b.entry.js +2 -0
- package/dist/core/p-e2ccb52b.entry.js.map +1 -0
- package/dist/core/{p-b97dc365.entry.js → p-e31125df.entry.js} +2 -2
- package/dist/core/{p-a7481232.entry.js → p-e9bc9ee2.entry.js} +2 -2
- package/dist/core/p-e9bc9ee2.entry.js.map +1 -0
- package/dist/core/{p-0c18b6a0.entry.js → p-eb922333.entry.js} +2 -2
- package/dist/core/{p-0c18b6a0.entry.js.map → p-eb922333.entry.js.map} +1 -1
- package/dist/core/p-f2318ddc.entry.js +2 -0
- package/dist/core/p-f2318ddc.entry.js.map +1 -0
- package/dist/core/{p-e9e145aa.entry.js → p-f4c11be0.entry.js} +2 -2
- package/dist/core/{p-41aa0ed3.entry.js → p-faaa06d7.entry.js} +2 -2
- package/dist/core/{p-5bb32ee6.entry.js → p-fc406db5.entry.js} +2 -2
- package/dist/core/{p-03487f12.entry.js → p-fddc7254.entry.js} +2 -2
- package/dist/core/{p-7de813a3.entry.js → p-fff91bd9.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-268c2b7f.js → helpers-229a5574.js} +6 -6
- package/dist/esm/{helpers-268c2b7f.js.map → helpers-229a5574.js.map} +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +4 -8
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +61 -32
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +2 -2
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +5 -8
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +2 -2
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +48 -11
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +10 -4
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +38 -61
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +3 -2
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +12 -15
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +65 -0
- package/dist/esm/ic-toggle-button.entry.js.map +1 -0
- package/dist/esm/ic-top-navigation.entry.js +3 -2
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-93509377.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/hydrate/index.js +274 -145
- package/package.json +25 -17
- package/dist/core/p-0083465b.entry.js +0 -2
- package/dist/core/p-0083465b.entry.js.map +0 -1
- package/dist/core/p-1bc034aa.entry.js.map +0 -1
- package/dist/core/p-5157cfab.entry.js.map +0 -1
- package/dist/core/p-53083575.entry.js.map +0 -1
- package/dist/core/p-67eea079.entry.js.map +0 -1
- package/dist/core/p-8da152c4.entry.js +0 -2
- package/dist/core/p-8da152c4.entry.js.map +0 -1
- package/dist/core/p-9c27b73e.entry.js +0 -2
- package/dist/core/p-9c27b73e.entry.js.map +0 -1
- package/dist/core/p-a51e5c7c.entry.js +0 -2
- package/dist/core/p-a7481232.entry.js.map +0 -1
- package/dist/core/p-b5cf6d65.entry.js.map +0 -1
- package/dist/core/p-c1256810.entry.js.map +0 -1
- package/dist/core/p-d76cfa5a.entry.js +0 -2
- package/dist/core/p-d76cfa5a.entry.js.map +0 -1
- package/dist/core/p-f87e8411.entry.js.map +0 -1
- /package/dist/core/{p-39e20b87.entry.js.map → p-010053ab.entry.js.map} +0 -0
- /package/dist/core/{p-4ee59448.entry.js.map → p-043e4073.entry.js.map} +0 -0
- /package/dist/core/{p-4314aa0e.entry.js.map → p-0aa1fe4e.entry.js.map} +0 -0
- /package/dist/core/{p-be980606.entry.js.map → p-1e9f689b.entry.js.map} +0 -0
- /package/dist/core/{p-bd9cecce.entry.js.map → p-4119a26b.entry.js.map} +0 -0
- /package/dist/core/{p-3d618bc2.entry.js.map → p-452be32a.entry.js.map} +0 -0
- /package/dist/core/{p-85508347.entry.js.map → p-5332a426.entry.js.map} +0 -0
- /package/dist/core/{p-d77960f6.entry.js.map → p-56645c00.entry.js.map} +0 -0
- /package/dist/core/{p-55d5541f.entry.js.map → p-79b39c8a.entry.js.map} +0 -0
- /package/dist/core/{p-2dc35696.entry.js.map → p-7b17f3ce.entry.js.map} +0 -0
- /package/dist/core/{p-2e9e8e7c.entry.js.map → p-7e0197a4.entry.js.map} +0 -0
- /package/dist/core/{p-f0e9a83f.entry.js.map → p-8eaed5b7.entry.js.map} +0 -0
- /package/dist/core/{p-ab9f8a3f.entry.js.map → p-93828f0e.entry.js.map} +0 -0
- /package/dist/core/{p-3ee25a6d.entry.js.map → p-99a9ce86.entry.js.map} +0 -0
- /package/dist/core/{p-20a76d1d.entry.js.map → p-9c6e48fb.entry.js.map} +0 -0
- /package/dist/core/{p-485823b6.entry.js.map → p-a048beab.entry.js.map} +0 -0
- /package/dist/core/{p-bc187bb5.entry.js.map → p-a561980f.entry.js.map} +0 -0
- /package/dist/core/{p-7eae5f70.entry.js.map → p-a6a90c56.entry.js.map} +0 -0
- /package/dist/core/{p-f23d2102.entry.js.map → p-ae337896.entry.js.map} +0 -0
- /package/dist/core/{p-4409f656.entry.js.map → p-b4591bfe.entry.js.map} +0 -0
- /package/dist/core/{p-9fa6844f.entry.js.map → p-b7d5ced3.entry.js.map} +0 -0
- /package/dist/core/{p-03f8fa1a.entry.js.map → p-c2884fcd.entry.js.map} +0 -0
- /package/dist/core/{p-6bd0e984.entry.js.map → p-cae71c32.entry.js.map} +0 -0
- /package/dist/core/{p-47abbd06.entry.js.map → p-cedabab7.entry.js.map} +0 -0
- /package/dist/core/{p-76959313.entry.js.map → p-da1f0a53.entry.js.map} +0 -0
- /package/dist/core/{p-b97dc365.entry.js.map → p-e31125df.entry.js.map} +0 -0
- /package/dist/core/{p-e9e145aa.entry.js.map → p-f4c11be0.entry.js.map} +0 -0
- /package/dist/core/{p-41aa0ed3.entry.js.map → p-faaa06d7.entry.js.map} +0 -0
- /package/dist/core/{p-5bb32ee6.entry.js.map → p-fc406db5.entry.js.map} +0 -0
- /package/dist/core/{p-03487f12.entry.js.map → p-fddc7254.entry.js.map} +0 -0
- /package/dist/core/{p-7de813a3.entry.js.map → p-fff91bd9.entry.js.map} +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-86375e76.js');
|
7
7
|
const types = require('./types-17dba796.js');
|
8
8
|
|
9
9
|
const paginationNextPrevious = `<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
@@ -968,12 +968,28 @@ const TextField = class {
|
|
968
968
|
this.maxLengthExceeded = value.length > this.maxLength ? true : false;
|
969
969
|
}
|
970
970
|
};
|
971
|
+
this.getMaxCharactersReached = (value) => {
|
972
|
+
this.numChars = value.length;
|
973
|
+
if (this.maxCharacters > 0) {
|
974
|
+
this.maxCharactersReached = this.numChars >= this.maxCharacters;
|
975
|
+
if (this.maxCharactersError && !this.maxCharactersReached) {
|
976
|
+
this.maxCharactersError = false;
|
977
|
+
}
|
978
|
+
}
|
979
|
+
};
|
980
|
+
this.getMinCharactersUnattained = (value) => {
|
981
|
+
this.numChars = value.length;
|
982
|
+
if (this.minCharacters > 0) {
|
983
|
+
this.minCharactersUnattained = this.numChars < this.minCharacters;
|
984
|
+
}
|
985
|
+
};
|
971
986
|
this.onInput = (ev) => {
|
972
987
|
this.value = ev.target.value;
|
973
988
|
this.icInput.emit({ value: this.value });
|
974
989
|
};
|
975
990
|
this.onBlur = (ev) => {
|
976
991
|
const value = ev.target.value;
|
992
|
+
this.getMinCharactersUnattained(value);
|
977
993
|
this.icBlur.emit({ value: value });
|
978
994
|
};
|
979
995
|
this.onFocus = (ev) => {
|
@@ -998,6 +1014,9 @@ const TextField = class {
|
|
998
1014
|
this.value = this.initialValue;
|
999
1015
|
};
|
1000
1016
|
this.numChars = 0;
|
1017
|
+
this.maxCharactersReached = false;
|
1018
|
+
this.maxCharactersError = false;
|
1019
|
+
this.minCharactersUnattained = false;
|
1001
1020
|
this.maxLengthExceeded = false;
|
1002
1021
|
this.maxValueExceeded = false;
|
1003
1022
|
this.minValueUnattained = false;
|
@@ -1018,8 +1037,10 @@ const TextField = class {
|
|
1018
1037
|
this.inputmode = "text";
|
1019
1038
|
this.label = undefined;
|
1020
1039
|
this.max = undefined;
|
1040
|
+
this.maxCharacters = 0;
|
1021
1041
|
this.maxLength = 0;
|
1022
1042
|
this.min = undefined;
|
1043
|
+
this.minCharacters = 0;
|
1023
1044
|
this.name = this.inputId;
|
1024
1045
|
this.placeholder = "";
|
1025
1046
|
this.readonly = false;
|
@@ -1048,6 +1069,7 @@ const TextField = class {
|
|
1048
1069
|
this.inputEl.value = newValue;
|
1049
1070
|
}
|
1050
1071
|
this.getMaxLengthExceeded(newValue);
|
1072
|
+
this.getMaxCharactersReached(newValue);
|
1051
1073
|
this.icChange.emit({ value: newValue });
|
1052
1074
|
}
|
1053
1075
|
connectedCallback() {
|
@@ -1061,6 +1083,7 @@ const TextField = class {
|
|
1061
1083
|
this.watchValueHandler(this.value);
|
1062
1084
|
}
|
1063
1085
|
this.getMaxLengthExceeded(this.value);
|
1086
|
+
this.getMaxCharactersReached(this.value);
|
1064
1087
|
this.inheritedAttributes = helpers.inheritAttributes(this.el, [
|
1065
1088
|
...helpers.IC_INHERITED_ARIA,
|
1066
1089
|
"title",
|
@@ -1081,6 +1104,7 @@ const TextField = class {
|
|
1081
1104
|
}
|
1082
1105
|
handleKeyDown(ev) {
|
1083
1106
|
this.icKeydown.emit({ event: ev });
|
1107
|
+
this.maxCharactersError = this.maxCharactersReached;
|
1084
1108
|
}
|
1085
1109
|
/**
|
1086
1110
|
* Sets focus on the native `input`.
|
@@ -1095,21 +1119,32 @@ const TextField = class {
|
|
1095
1119
|
return iconEl !== null;
|
1096
1120
|
}
|
1097
1121
|
render() {
|
1098
|
-
const { inputId, name, label, required, size, small, placeholder, helperText, rows, resize, disabled, value, min, max, maxLength, numChars, readonly, maxLengthExceeded, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, } = this;
|
1122
|
+
const { inputId, name, label, required, size, small, placeholder, helperText, rows, resize, disabled, value, min, max, maxLength, numChars, readonly, maxLengthExceeded, maxCharacters, maxCharactersError, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, } = this;
|
1099
1123
|
const disabledMode = readonly ? true : disabled;
|
1100
1124
|
const placeholderText = disabled ? "" : placeholder;
|
1101
|
-
const currentStatus = maxLengthExceeded ||
|
1102
|
-
|
1125
|
+
const currentStatus = maxLengthExceeded ||
|
1126
|
+
maxValueExceeded ||
|
1127
|
+
minValueUnattained ||
|
1128
|
+
minCharactersUnattained ||
|
1129
|
+
maxCharactersError
|
1130
|
+
? maxCharactersError
|
1131
|
+
? types.IcInformationStatus.Warning
|
1132
|
+
: types.IcInformationStatus.Error
|
1103
1133
|
: validationStatus;
|
1104
1134
|
const currentValidationText = maxLengthExceeded
|
1105
1135
|
? "Maximum length exceeded"
|
1106
|
-
:
|
1107
|
-
? `Maximum
|
1108
|
-
:
|
1109
|
-
? `
|
1110
|
-
:
|
1136
|
+
: maxCharactersError
|
1137
|
+
? `Maximum input is ${maxCharacters} characters`
|
1138
|
+
: maxValueExceeded
|
1139
|
+
? `Maximum value of ${max} exceeded`
|
1140
|
+
: minValueUnattained
|
1141
|
+
? `Minimum value of ${min} not met`
|
1142
|
+
: minCharactersUnattained
|
1143
|
+
? `Minimum input is ${minCharacters} characters`
|
1144
|
+
: validationText;
|
1111
1145
|
const maxNumChars = readonly ? 0 : maxLength;
|
1112
1146
|
const messageAriaLive = maxLengthExceeded ||
|
1147
|
+
maxCharactersError ||
|
1113
1148
|
maxValueExceeded ||
|
1114
1149
|
minValueUnattained ||
|
1115
1150
|
(maxLength === 0 && currentStatus === types.IcInformationStatus.Error)
|
@@ -1136,14 +1171,16 @@ const TextField = class {
|
|
1136
1171
|
["no-left-pad"]: !this.showLeftIcon && readonly,
|
1137
1172
|
["readonly"]: readonly,
|
1138
1173
|
["truncate-value"]: truncateValue,
|
1139
|
-
}, placeholder: placeholderText, required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": this.ariaActiveDescendant, "aria-expanded": this.ariaExpanded, "aria-owns": this.ariaOwns, autocomplete: this.autocomplete, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, role: this.role }, this.inheritedAttributes))), multiline && (index.h("textarea", Object.assign({ id: inputId, class: {
|
1174
|
+
}, placeholder: placeholderText, required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": this.ariaActiveDescendant, "aria-expanded": this.ariaExpanded, "aria-owns": this.ariaOwns, autocomplete: this.autocomplete, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, role: this.role, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), multiline && (index.h("textarea", Object.assign({ id: inputId, class: {
|
1140
1175
|
["no-resize"]: resize === false || readonly,
|
1141
1176
|
["no-left-pad"]: !this.showLeftIcon && readonly,
|
1142
1177
|
["readonly"]: readonly,
|
1143
|
-
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholderText, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode }, this.inheritedAttributes))), helpers.isSlotUsed(this.el, "clear-button") && (index.h("slot", { name: "clear-button" })), helpers.isSlotUsed(this.el, "search-submit-button") && (index.h("slot", { name: "search-submit-button" }))), helpers.isSlotUsed(this.el, "menu") && index.h("slot", { name: "menu" }), (!helpers.isEmptyString(validationStatus) ||
|
1178
|
+
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholderText, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), helpers.isSlotUsed(this.el, "clear-button") && (index.h("slot", { name: "clear-button" })), helpers.isSlotUsed(this.el, "search-submit-button") && (index.h("slot", { name: "search-submit-button" }))), helpers.isSlotUsed(this.el, "menu") && index.h("slot", { name: "menu" }), (!helpers.isEmptyString(validationStatus) ||
|
1144
1179
|
!helpers.isEmptyString(validationText) ||
|
1145
1180
|
maxNumChars > 0 ||
|
1146
1181
|
maxValueExceeded ||
|
1182
|
+
maxCharactersError ||
|
1183
|
+
minCharactersUnattained ||
|
1147
1184
|
minValueUnattained) &&
|
1148
1185
|
!validationInlineInternal && (index.h("ic-input-validation", { status: this.hasStatus(currentStatus) === false ||
|
1149
1186
|
(currentStatus === types.IcInformationStatus.Success &&
|