@ukic/web-components 3.21.0 → 3.23.0
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/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-3a796e7a.js → helpers-81cd6930.js} +3 -16
- package/dist/cjs/helpers-81cd6930.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +7 -3
- package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +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 +5 -3
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +7 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +13 -5
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +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 +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +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-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +212 -80
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +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 +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- 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-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
- package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- 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 +11 -11
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-side-navigation.cjs.entry.js +18 -9
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
- package/dist/cjs/ic-step.cjs.entry.js +14 -14
- package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +5 -5
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +8 -7
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-d337cd8a.js +12 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
- package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
- package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +15 -3
- package/dist/collection/components/ic-chip/ic-chip.js +5 -1
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
- package/dist/collection/components/ic-menu/ic-menu.css +6 -1
- package/dist/collection/components/ic-menu/ic-menu.js +184 -53
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.css +1 -2
- package/dist/collection/components/ic-select/ic-select.js +414 -589
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.types.js +2 -0
- package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -9
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +7 -6
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +21 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +32 -0
- package/dist/collection/utils/helpers.js +2 -15
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +3 -16
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +6 -2
- package/dist/components/ic-action-chip.js.map +1 -1
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +6 -2
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +14 -5
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-menu2.js +213 -79
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar.d.ts +11 -0
- package/dist/components/ic-pagination-bar.js +523 -0
- package/dist/components/ic-pagination-bar.js.map +1 -0
- package/dist/components/ic-pagination.js +1 -375
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +82 -11
- package/dist/components/ic-pagination2.js.map +1 -0
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +11 -11
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +1 -994
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-select2.js +804 -0
- package/dist/components/ic-select2.js.map +1 -0
- package/dist/components/ic-side-navigation.js +18 -9
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +4 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -2
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-text-field.js +1 -528
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +114 -11
- package/dist/components/ic-text-field2.js.map +1 -0
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +7 -6
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +2 -2
- package/dist/components/ic-tooltip2.js +5 -3
- package/dist/components/ic-tooltip2.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-0a24c536.entry.js → p-05fd2707.entry.js} +2 -2
- package/dist/core/{p-85e15d01.entry.js → p-09505807.entry.js} +2 -2
- package/dist/core/{p-96bc7d24.entry.js → p-09caf7ed.entry.js} +2 -2
- package/dist/core/p-09caf7ed.entry.js.map +1 -0
- package/dist/core/p-0fb7f915.entry.js +2 -0
- package/dist/core/p-0fb7f915.entry.js.map +1 -0
- package/dist/core/{p-41a5da12.entry.js → p-1b81ec88.entry.js} +2 -2
- package/dist/core/p-1b81ec88.entry.js.map +1 -0
- package/dist/core/{p-99951365.entry.js → p-2691cc80.entry.js} +2 -2
- package/dist/core/{p-94916588.entry.js → p-2a124daf.entry.js} +2 -2
- package/dist/core/{p-04c77b2d.entry.js → p-2b87c592.entry.js} +2 -2
- package/dist/core/{p-4aa56990.entry.js → p-2bd80913.entry.js} +2 -2
- package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
- package/dist/core/p-393af2bc.entry.js +2 -0
- package/dist/core/p-393af2bc.entry.js.map +1 -0
- package/dist/core/{p-a3dea729.entry.js → p-3aed13ba.entry.js} +2 -2
- package/dist/core/{p-8da90b72.entry.js → p-46fd555f.entry.js} +2 -2
- package/dist/core/{p-43cc0f1d.entry.js → p-48a628f0.entry.js} +2 -2
- package/dist/core/{p-9a4e067f.entry.js → p-4f56acff.entry.js} +2 -2
- package/dist/core/{p-3021290f.entry.js → p-506d428a.entry.js} +2 -2
- package/dist/core/{p-a1b2f483.entry.js → p-50dca790.entry.js} +2 -2
- package/dist/core/p-53ab3c0f.entry.js +2 -0
- package/dist/core/p-53ab3c0f.entry.js.map +1 -0
- package/dist/core/{p-feef7c2c.entry.js → p-56de4f4b.entry.js} +2 -2
- package/dist/core/{p-b4e322fe.entry.js → p-5900cb65.entry.js} +2 -2
- package/dist/core/{p-78a54069.entry.js → p-5976de6e.entry.js} +2 -2
- package/dist/core/{p-2af89564.entry.js → p-61d79fc6.entry.js} +2 -2
- package/dist/core/{p-2af89564.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
- package/dist/core/p-659d048d.entry.js +2 -0
- package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
- package/dist/core/p-6b4ec95f.entry.js +3 -0
- package/dist/core/p-6b4ec95f.entry.js.map +1 -0
- package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
- package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
- package/dist/core/{p-07075461.entry.js → p-7b538fd1.entry.js} +2 -2
- package/dist/core/{p-cfd43558.entry.js → p-80d85403.entry.js} +2 -2
- package/dist/core/{p-7f279c8a.entry.js → p-83578f1d.entry.js} +2 -2
- package/dist/core/{p-7f279c8a.entry.js.map → p-83578f1d.entry.js.map} +1 -1
- package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
- package/dist/core/p-880f7548.entry.js.map +1 -0
- package/dist/core/{p-79949920.entry.js → p-8a833e82.entry.js} +2 -2
- package/dist/core/{p-0aba9e31.entry.js → p-90678e67.entry.js} +2 -2
- package/dist/core/{p-a851eb65.entry.js → p-9502fb86.entry.js} +2 -2
- package/dist/core/{p-2ca7f050.entry.js → p-99433296.entry.js} +2 -2
- package/dist/core/p-99433296.entry.js.map +1 -0
- package/dist/core/{p-f6de08fb.entry.js → p-9c2b2cb9.entry.js} +2 -2
- package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
- package/dist/core/{p-f0ecb80b.entry.js → p-a08d6b46.entry.js} +2 -2
- package/dist/core/{p-9057a186.entry.js → p-a2953aad.entry.js} +2 -2
- package/dist/core/p-a2953aad.entry.js.map +1 -0
- package/dist/core/p-a321feee.entry.js +2 -0
- package/dist/core/p-a321feee.entry.js.map +1 -0
- package/dist/core/{p-208f470f.entry.js → p-a780a34b.entry.js} +2 -2
- package/dist/core/{p-387b7bca.entry.js → p-aad03a3c.entry.js} +2 -2
- package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
- package/dist/core/{p-707ae6e9.entry.js → p-b52c44eb.entry.js} +2 -2
- package/dist/core/{p-716e7eaf.entry.js → p-b777f0a1.entry.js} +2 -2
- package/dist/core/p-b777f0a1.entry.js.map +1 -0
- package/dist/core/p-b77b1e1f.js +2 -0
- package/dist/core/p-b77b1e1f.js.map +1 -0
- package/dist/core/{p-780babc0.entry.js → p-b997ad5e.entry.js} +2 -2
- package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
- package/dist/core/{p-ded4cd76.entry.js → p-cbca04bb.entry.js} +2 -2
- package/dist/core/{p-99687bce.entry.js → p-cc64e5ef.entry.js} +2 -2
- package/dist/core/{p-812c5e61.entry.js → p-cfbacca1.entry.js} +2 -2
- package/dist/core/{p-0da2caa2.entry.js → p-daec7e69.entry.js} +2 -2
- package/dist/core/{p-1590fd69.entry.js → p-e7767c0d.entry.js} +2 -2
- package/dist/core/p-e938eb31.entry.js +2 -0
- package/dist/core/p-e938eb31.entry.js.map +1 -0
- package/dist/core/{p-dce11b9d.entry.js → p-ea7a3d30.entry.js} +2 -2
- package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
- package/dist/core/p-ebd688b9.entry.js.map +1 -0
- package/dist/core/{p-a674b13b.entry.js → p-ef70ea50.entry.js} +2 -2
- package/dist/core/{p-d25d0aad.entry.js → p-f64996f1.entry.js} +2 -2
- package/dist/core/{p-db17a793.entry.js → p-f661ba76.entry.js} +2 -2
- package/dist/core/{p-a03bb31c.entry.js → p-f84ac9c6.entry.js} +2 -2
- package/dist/core/{p-f3406b42.entry.js → p-fb9376f0.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
- package/dist/esm/helpers-66681c73.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-action-chip.entry.js +7 -3
- package/dist/esm/ic-action-chip.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +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 +5 -3
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -5
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +7 -3
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +13 -5
- package/dist/esm/ic-classification-banner.entry.js.map +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 +1 -1
- package/dist/esm/ic-footer.entry.js +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-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +212 -80
- package/dist/esm/ic-input-component-container_3.entry.js.map +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 +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- 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-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination-bar.entry.js +385 -0
- package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination_3.entry.js +1406 -0
- package/dist/esm/ic-pagination_3.entry.js.map +1 -0
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- 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 +11 -11
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-side-navigation.entry.js +18 -9
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +3 -3
- package/dist/esm/ic-step.entry.js +14 -14
- package/dist/esm/ic-stepper.entry.js +3 -3
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +5 -5
- package/dist/esm/ic-tab-context.entry.js +1 -2
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +8 -7
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +3 -3
- package/dist/esm/ic-toggle-button.entry.js +3 -3
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-a7a720e7.js +12 -16
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
- package/dist/types/components/ic-select/ic-select.d.ts +53 -80
- package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +253 -5
- package/dist/types/utils/helpers.d.ts +2 -4
- package/hydrate/index.js +1145 -773
- package/hydrate/index.mjs +1145 -773
- package/package.json +2 -2
- package/vscode-data.json +131 -0
- package/dist/cjs/helpers-3a796e7a.js.map +0 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
- package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-select.cjs.entry.js +0 -879
- package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
- package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
- package/dist/core/p-0d7fd892.entry.js +0 -2
- package/dist/core/p-29b61bb5.entry.js +0 -3
- package/dist/core/p-29b61bb5.entry.js.map +0 -1
- package/dist/core/p-2ca7f050.entry.js.map +0 -1
- package/dist/core/p-41a5da12.entry.js.map +0 -1
- package/dist/core/p-4aadabc8.entry.js +0 -2
- package/dist/core/p-4aadabc8.entry.js.map +0 -1
- package/dist/core/p-716e7eaf.entry.js.map +0 -1
- package/dist/core/p-808e1ef5.entry.js +0 -2
- package/dist/core/p-808e1ef5.entry.js.map +0 -1
- package/dist/core/p-880afd4b.entry.js.map +0 -1
- package/dist/core/p-8fe4e0ad.entry.js +0 -2
- package/dist/core/p-8fe4e0ad.entry.js.map +0 -1
- package/dist/core/p-9057a186.entry.js.map +0 -1
- package/dist/core/p-96bc7d24.entry.js.map +0 -1
- package/dist/core/p-b8c0c142.entry.js.map +0 -1
- package/dist/core/p-c5b9519d.entry.js +0 -2
- package/dist/core/p-c5b9519d.entry.js.map +0 -1
- package/dist/core/p-d1730d4d.entry.js +0 -2
- package/dist/core/p-d1730d4d.entry.js.map +0 -1
- package/dist/core/p-dbc8bf0c.js +0 -2
- package/dist/core/p-dbc8bf0c.js.map +0 -1
- package/dist/core/p-fdb587ab.entry.js +0 -2
- package/dist/core/p-fdb587ab.entry.js.map +0 -1
- package/dist/esm/helpers-0f85537f.js.map +0 -1
- package/dist/esm/ic-pagination.entry.js.map +0 -1
- package/dist/esm/ic-select.entry.js +0 -875
- package/dist/esm/ic-select.entry.js.map +0 -1
- package/dist/esm/ic-text-field.entry.js.map +0 -1
- /package/dist/core/{p-0a24c536.entry.js.map → p-05fd2707.entry.js.map} +0 -0
- /package/dist/core/{p-85e15d01.entry.js.map → p-09505807.entry.js.map} +0 -0
- /package/dist/core/{p-99951365.entry.js.map → p-2691cc80.entry.js.map} +0 -0
- /package/dist/core/{p-94916588.entry.js.map → p-2a124daf.entry.js.map} +0 -0
- /package/dist/core/{p-04c77b2d.entry.js.map → p-2b87c592.entry.js.map} +0 -0
- /package/dist/core/{p-4aa56990.entry.js.map → p-2bd80913.entry.js.map} +0 -0
- /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
- /package/dist/core/{p-a3dea729.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
- /package/dist/core/{p-8da90b72.entry.js.map → p-46fd555f.entry.js.map} +0 -0
- /package/dist/core/{p-43cc0f1d.entry.js.map → p-48a628f0.entry.js.map} +0 -0
- /package/dist/core/{p-9a4e067f.entry.js.map → p-4f56acff.entry.js.map} +0 -0
- /package/dist/core/{p-3021290f.entry.js.map → p-506d428a.entry.js.map} +0 -0
- /package/dist/core/{p-a1b2f483.entry.js.map → p-50dca790.entry.js.map} +0 -0
- /package/dist/core/{p-feef7c2c.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
- /package/dist/core/{p-b4e322fe.entry.js.map → p-5900cb65.entry.js.map} +0 -0
- /package/dist/core/{p-78a54069.entry.js.map → p-5976de6e.entry.js.map} +0 -0
- /package/dist/core/{p-0d7fd892.entry.js.map → p-659d048d.entry.js.map} +0 -0
- /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
- /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
- /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
- /package/dist/core/{p-07075461.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
- /package/dist/core/{p-cfd43558.entry.js.map → p-80d85403.entry.js.map} +0 -0
- /package/dist/core/{p-79949920.entry.js.map → p-8a833e82.entry.js.map} +0 -0
- /package/dist/core/{p-0aba9e31.entry.js.map → p-90678e67.entry.js.map} +0 -0
- /package/dist/core/{p-a851eb65.entry.js.map → p-9502fb86.entry.js.map} +0 -0
- /package/dist/core/{p-f6de08fb.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
- /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
- /package/dist/core/{p-f0ecb80b.entry.js.map → p-a08d6b46.entry.js.map} +0 -0
- /package/dist/core/{p-208f470f.entry.js.map → p-a780a34b.entry.js.map} +0 -0
- /package/dist/core/{p-387b7bca.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
- /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
- /package/dist/core/{p-707ae6e9.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
- /package/dist/core/{p-780babc0.entry.js.map → p-b997ad5e.entry.js.map} +0 -0
- /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
- /package/dist/core/{p-ded4cd76.entry.js.map → p-cbca04bb.entry.js.map} +0 -0
- /package/dist/core/{p-99687bce.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
- /package/dist/core/{p-812c5e61.entry.js.map → p-cfbacca1.entry.js.map} +0 -0
- /package/dist/core/{p-0da2caa2.entry.js.map → p-daec7e69.entry.js.map} +0 -0
- /package/dist/core/{p-1590fd69.entry.js.map → p-e7767c0d.entry.js.map} +0 -0
- /package/dist/core/{p-dce11b9d.entry.js.map → p-ea7a3d30.entry.js.map} +0 -0
- /package/dist/core/{p-a674b13b.entry.js.map → p-ef70ea50.entry.js.map} +0 -0
- /package/dist/core/{p-d25d0aad.entry.js.map → p-f64996f1.entry.js.map} +0 -0
- /package/dist/core/{p-db17a793.entry.js.map → p-f661ba76.entry.js.map} +0 -0
- /package/dist/core/{p-a03bb31c.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
- /package/dist/core/{p-f3406b42.entry.js.map → p-fb9376f0.entry.js.map} +0 -0
|
@@ -1,531 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { H as isEmptyString, W as checkSlotInChildMutations, r as removeDisabledFalse, V as debounceEvent, t as removeFormResetListener, b as inheritAttributes, s as addFormResetListener, o as onComponentRequiredPropUndefined, A as IcInformationStatus, w as getInputDescribedByText, u as renderHiddenInput, v as removeHiddenInput, i as isSlotUsed } from './helpers.js';
|
|
3
|
-
import { e as IGNORED_KEYBOARD_CHARACTERS, I as IC_INHERITED_ARIA } from './constants.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './ic-input-component-container2.js';
|
|
5
|
-
import { d as defineCustomElement$5 } from './ic-input-container2.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './ic-input-label2.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './ic-input-validation2.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
9
|
-
|
|
10
|
-
const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}.show-validation{margin-top:var(--ic-space-xs)}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
|
|
11
|
-
const IcTextFieldStyle0 = icTextFieldCss;
|
|
12
|
-
|
|
13
|
-
let inputIds = 0;
|
|
14
|
-
const MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, "title"];
|
|
15
|
-
const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.__registerHost();
|
|
19
|
-
this.__attachShadow();
|
|
20
|
-
this.getValidationText = createEvent(this, "getValidationText", 7);
|
|
21
|
-
this.icBlur = createEvent(this, "icBlur", 7);
|
|
22
|
-
this.icChange = createEvent(this, "icChange", 7);
|
|
23
|
-
this.icFocus = createEvent(this, "icFocus", 7);
|
|
24
|
-
this.icInput = createEvent(this, "icInput", 7);
|
|
25
|
-
this.icKeydown = createEvent(this, "icKeydown", 7);
|
|
26
|
-
this.icScroll = createEvent(this, "icScroll", 7);
|
|
27
|
-
this.inheritedAttributes = {};
|
|
28
|
-
this.hostMutationObserver = null;
|
|
29
|
-
this.numChars = 0;
|
|
30
|
-
this.maxCharactersReached = false;
|
|
31
|
-
this.maxCharactersWarning = false;
|
|
32
|
-
this.minCharactersUnattained = false;
|
|
33
|
-
this.maxValueExceeded = false;
|
|
34
|
-
this.minValueUnattained = false;
|
|
35
|
-
this.isFocussed = false;
|
|
36
|
-
/**
|
|
37
|
-
* The automatic capitalisation of the text value as it is entered/edited by the user.
|
|
38
|
-
* Available options: "off", "none", "on", "sentences", "words", "characters".
|
|
39
|
-
*/
|
|
40
|
-
this.autocapitalize = "off";
|
|
41
|
-
/**
|
|
42
|
-
* The state of autocompletion the browser can apply on the text value.
|
|
43
|
-
*/
|
|
44
|
-
this.autocomplete = "off";
|
|
45
|
-
/**
|
|
46
|
-
* The state of autocorrection the browser can apply when the user is entering/editing the text value.
|
|
47
|
-
*/
|
|
48
|
-
this.autocorrect = "off";
|
|
49
|
-
/**
|
|
50
|
-
* If `true`, the form control will have input focus when the page loads.
|
|
51
|
-
*/
|
|
52
|
-
this.autofocus = false;
|
|
53
|
-
/**
|
|
54
|
-
* If `true`, the disabled state will be set.
|
|
55
|
-
*/
|
|
56
|
-
this.disabled = false;
|
|
57
|
-
/**
|
|
58
|
-
* Specify whether the text field fills the full width of the container.
|
|
59
|
-
* If `true`, this overrides the --input-width CSS variable.
|
|
60
|
-
*/
|
|
61
|
-
this.fullWidth = false;
|
|
62
|
-
/**
|
|
63
|
-
* The helper text that will be displayed for additional field guidance.
|
|
64
|
-
*/
|
|
65
|
-
this.helperText = "";
|
|
66
|
-
/**
|
|
67
|
-
* If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.
|
|
68
|
-
*/
|
|
69
|
-
this.hideCharCount = false;
|
|
70
|
-
/**
|
|
71
|
-
* If `true`, the label will be hidden and the required label value will be applied as an aria-label.
|
|
72
|
-
*/
|
|
73
|
-
this.hideLabel = false;
|
|
74
|
-
/**
|
|
75
|
-
* @internal If `true`, the hidden form input will stop rendering for form submission.
|
|
76
|
-
*/
|
|
77
|
-
this.hiddenInput = true;
|
|
78
|
-
/**
|
|
79
|
-
* The ID for the input.
|
|
80
|
-
*/
|
|
81
|
-
this.inputId = `ic-text-field-input-${inputIds++}`;
|
|
82
|
-
/**
|
|
83
|
-
* A hint to the browser for which keyboard to display.
|
|
84
|
-
* Possible values: `"none"`, `"text"`, `"tel"`, `"url"`,
|
|
85
|
-
* `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
|
|
86
|
-
*/
|
|
87
|
-
this.inputmode = "text";
|
|
88
|
-
/**
|
|
89
|
-
* The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)
|
|
90
|
-
*/
|
|
91
|
-
this.maxCharacters = 0;
|
|
92
|
-
/**
|
|
93
|
-
* The text to display as the warning message when the maximum number of characters (the `maxCharacters` prop value) is reached.
|
|
94
|
-
*/
|
|
95
|
-
// prettier-ignore
|
|
96
|
-
this.maxCharactersMessage = `Maximum input is ${this.maxCharacters} characters`;
|
|
97
|
-
/**
|
|
98
|
-
* The text to display as the error message when the maximum value (the `max` prop value) has been exceeded.
|
|
99
|
-
*/
|
|
100
|
-
this.maxMessage = `Maximum value of ${this.max} exceeded`;
|
|
101
|
-
/**
|
|
102
|
-
* The minimum number of characters that can be entered in the field.
|
|
103
|
-
*/
|
|
104
|
-
this.minCharacters = 0;
|
|
105
|
-
/**
|
|
106
|
-
* The text to display as the error message when the minimum number of characters (the `minCharacters` prop value) has not been met.
|
|
107
|
-
*/
|
|
108
|
-
// prettier-ignore
|
|
109
|
-
this.minCharactersMessage = `Minimum input is ${this.minCharacters} characters`;
|
|
110
|
-
/**
|
|
111
|
-
* The text to display as the error message when the minimum value (the `min` prop value) has not been met.
|
|
112
|
-
*/
|
|
113
|
-
this.minMessage = `Minimum value of ${this.min} not met`;
|
|
114
|
-
/**
|
|
115
|
-
* The name of the control, which is submitted with the form data.
|
|
116
|
-
*/
|
|
117
|
-
this.name = this.inputId;
|
|
118
|
-
/**
|
|
119
|
-
* The placeholder value to be displayed.
|
|
120
|
-
*/
|
|
121
|
-
this.placeholder = "";
|
|
122
|
-
/**
|
|
123
|
-
* If `true`, the read only state will be set.
|
|
124
|
-
*/
|
|
125
|
-
this.readonly = false;
|
|
126
|
-
/**
|
|
127
|
-
* If `true`, the input will require a value.
|
|
128
|
-
*/
|
|
129
|
-
this.required = false;
|
|
130
|
-
/**
|
|
131
|
-
* If `true`, the multiline text area will be resizeable.
|
|
132
|
-
*/
|
|
133
|
-
this.resize = false;
|
|
134
|
-
/**
|
|
135
|
-
* The number of rows to transform the text field into a text area with a specific height.
|
|
136
|
-
*/
|
|
137
|
-
this.rows = 1;
|
|
138
|
-
/**
|
|
139
|
-
* The size of the text field component.
|
|
140
|
-
*/
|
|
141
|
-
this.size = "medium";
|
|
142
|
-
/**
|
|
143
|
-
* If `true`, the value of the text field will have its spelling and grammar checked.
|
|
144
|
-
*/
|
|
145
|
-
this.spellcheck = false;
|
|
146
|
-
/**
|
|
147
|
-
* Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
|
148
|
-
*/
|
|
149
|
-
this.theme = "inherit";
|
|
150
|
-
/**
|
|
151
|
-
* @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.
|
|
152
|
-
*/
|
|
153
|
-
this.truncateValue = false;
|
|
154
|
-
/**
|
|
155
|
-
* The type of control to display. The default type is text.
|
|
156
|
-
*/
|
|
157
|
-
this.type = "text";
|
|
158
|
-
/**
|
|
159
|
-
* The value of the `aria-live` attribute on the validation message. When set to "default", the `aria-live` value will be handled automatically, e.g. "assertive" for `validation-status="error"`.
|
|
160
|
-
*/
|
|
161
|
-
this.validationAriaLive = "default";
|
|
162
|
-
/**
|
|
163
|
-
* If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.
|
|
164
|
-
*/
|
|
165
|
-
this.validationInline = false;
|
|
166
|
-
/**
|
|
167
|
-
* @internal If `true`, the validation will display inline.
|
|
168
|
-
*/
|
|
169
|
-
this.validationInlineInternal = false;
|
|
170
|
-
/**
|
|
171
|
-
* The validation state - e.g. 'error' | 'warning' | 'success'.
|
|
172
|
-
*/
|
|
173
|
-
this.validationStatus = "";
|
|
174
|
-
/**
|
|
175
|
-
* The text to display as the validation message.
|
|
176
|
-
*/
|
|
177
|
-
this.validationText = "";
|
|
178
|
-
/**
|
|
179
|
-
* The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.
|
|
180
|
-
*/
|
|
181
|
-
this.debounce = 0;
|
|
182
|
-
/**
|
|
183
|
-
* The value of the text field.
|
|
184
|
-
*/
|
|
185
|
-
this.value = "";
|
|
186
|
-
this.initialValue = this.value;
|
|
187
|
-
this.checkChildHydration = () => {
|
|
188
|
-
var _a, _b;
|
|
189
|
-
if (this.hideLabel ||
|
|
190
|
-
((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("ic-typography")) === null || _b === void 0 ? void 0 : _b.classList.contains("hydrated"))) {
|
|
191
|
-
this.setFocus();
|
|
192
|
-
clearInterval(this.interval);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
this.getNumberOfCharacters = (value) => value !== null && value !== undefined ? value.length : 0;
|
|
196
|
-
this.getMaxValueExceeded = (value) => {
|
|
197
|
-
this.numChars = this.getNumberOfCharacters(value);
|
|
198
|
-
if (this.type === "number") {
|
|
199
|
-
this.minValueUnattained = !!value && Number(value) < Number(this.min);
|
|
200
|
-
this.maxValueExceeded = Number(value) > Number(this.max);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
this.getMaxCharactersReached = (value) => {
|
|
204
|
-
this.numChars = this.getNumberOfCharacters(value);
|
|
205
|
-
this.maxCharactersReached =
|
|
206
|
-
this.maxCharacters > 0 && this.numChars >= this.maxCharacters;
|
|
207
|
-
if (this.maxCharactersWarning && !this.maxCharactersReached) {
|
|
208
|
-
this.maxCharactersWarning = false;
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
this.onInput = (ev) => {
|
|
212
|
-
this.value = ev.target.value;
|
|
213
|
-
this.icInput.emit({ value: this.value });
|
|
214
|
-
};
|
|
215
|
-
this.onBlur = (ev) => {
|
|
216
|
-
const target = ev.target;
|
|
217
|
-
target.removeEventListener("wheel", this.onWheel);
|
|
218
|
-
const { value } = target;
|
|
219
|
-
this.numChars = value.length;
|
|
220
|
-
this.minCharactersUnattained =
|
|
221
|
-
this.minCharacters > 0 && this.numChars < this.minCharacters;
|
|
222
|
-
this.icBlur.emit({ value });
|
|
223
|
-
this.isFocussed = false;
|
|
224
|
-
};
|
|
225
|
-
this.onFocus = (ev) => {
|
|
226
|
-
const target = ev.target;
|
|
227
|
-
target.addEventListener("wheel", this.onWheel);
|
|
228
|
-
this.icFocus.emit({ value: target.value });
|
|
229
|
-
this.isFocussed = true;
|
|
230
|
-
};
|
|
231
|
-
this.onTextAreaScroll = () => {
|
|
232
|
-
this.icScroll.emit();
|
|
233
|
-
};
|
|
234
|
-
this.onWheel = (ev) => {
|
|
235
|
-
const target = ev.target;
|
|
236
|
-
if (target.type === "number") {
|
|
237
|
-
target.blur();
|
|
238
|
-
setTimeout(() => {
|
|
239
|
-
target.focus();
|
|
240
|
-
}, 0);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
this.hasStatus = (status) => status !== "" && !this.disabled;
|
|
244
|
-
this.handleFormReset = () => {
|
|
245
|
-
this.value = this.initialValue;
|
|
246
|
-
};
|
|
247
|
-
this.showValidationMargin = () => {
|
|
248
|
-
const maxNumChars = this.readonly ? 0 : this.maxCharacters;
|
|
249
|
-
const emptyString = isEmptyString(this.validationStatus) ||
|
|
250
|
-
isEmptyString(this.validationText);
|
|
251
|
-
const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;
|
|
252
|
-
const charsOutsideRange = maxNumChars > 0 || this.minCharactersUnattained;
|
|
253
|
-
return ((!emptyString || valueOutsideRange || charsOutsideRange) &&
|
|
254
|
-
!this.validationInlineInternal);
|
|
255
|
-
};
|
|
256
|
-
// triggered when attributes of host element change
|
|
257
|
-
this.hostMutationCallback = (mutationList) => {
|
|
258
|
-
let forceComponentUpdate = false;
|
|
259
|
-
mutationList.forEach(({ attributeName, type, addedNodes, removedNodes }) => {
|
|
260
|
-
if (attributeName && MUTABLE_ATTRIBUTES.includes(attributeName)) {
|
|
261
|
-
const attribute = this.el.getAttribute(attributeName);
|
|
262
|
-
if (attribute) {
|
|
263
|
-
this.inheritedAttributes[attributeName] = attribute;
|
|
264
|
-
}
|
|
265
|
-
forceComponentUpdate = true;
|
|
266
|
-
}
|
|
267
|
-
else if (type === "childList") {
|
|
268
|
-
forceComponentUpdate = checkSlotInChildMutations(addedNodes, removedNodes, "icon");
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
if (forceComponentUpdate) {
|
|
272
|
-
forceUpdate(this);
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
watchDisabledHandler() {
|
|
277
|
-
removeDisabledFalse(this.disabled, this.el);
|
|
278
|
-
}
|
|
279
|
-
debounceChanged() {
|
|
280
|
-
this.icChange = debounceEvent(this.icChange, this.debounce);
|
|
281
|
-
}
|
|
282
|
-
watchValueHandler(newValue) {
|
|
283
|
-
let value;
|
|
284
|
-
if (this.maxCharacters > 0) {
|
|
285
|
-
value = newValue.substring(0, this.maxCharacters);
|
|
286
|
-
if (value.length < newValue.length) {
|
|
287
|
-
this.maxCharactersWarning = true;
|
|
288
|
-
}
|
|
289
|
-
this.value = value;
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
value = newValue;
|
|
293
|
-
}
|
|
294
|
-
if (this.inputEl && this.inputEl.value !== value) {
|
|
295
|
-
this.inputEl.value = value;
|
|
296
|
-
}
|
|
297
|
-
this.getMaxValueExceeded(value);
|
|
298
|
-
this.getMaxCharactersReached(value);
|
|
299
|
-
this.icChange.emit({ value });
|
|
300
|
-
}
|
|
301
|
-
connectedCallback() {
|
|
302
|
-
this.debounceChanged();
|
|
303
|
-
}
|
|
304
|
-
disconnectedCallback() {
|
|
305
|
-
var _a;
|
|
306
|
-
removeFormResetListener(this.el, this.handleFormReset);
|
|
307
|
-
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
308
|
-
}
|
|
309
|
-
componentWillLoad() {
|
|
310
|
-
if (this.value !== this.initialValue) {
|
|
311
|
-
this.watchValueHandler(this.value);
|
|
312
|
-
}
|
|
313
|
-
else if (this.maxCharacters > 0) {
|
|
314
|
-
this.value = this.value.substring(0, this.maxCharacters);
|
|
315
|
-
}
|
|
316
|
-
this.getMaxValueExceeded(this.value);
|
|
317
|
-
this.getMaxCharactersReached(this.value);
|
|
318
|
-
this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);
|
|
319
|
-
if (this.readonly) {
|
|
320
|
-
this.maxValueExceeded = false;
|
|
321
|
-
this.minValueUnattained = false;
|
|
322
|
-
}
|
|
323
|
-
addFormResetListener(this.el, this.handleFormReset);
|
|
324
|
-
removeDisabledFalse(this.disabled, this.el);
|
|
325
|
-
}
|
|
326
|
-
componentDidLoad() {
|
|
327
|
-
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Text Field");
|
|
328
|
-
if (this.validationInlineInternal) {
|
|
329
|
-
this.getValidationText.emit({ value: this.validationText });
|
|
330
|
-
}
|
|
331
|
-
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
|
332
|
-
this.hostMutationObserver.observe(this.el, {
|
|
333
|
-
attributes: true,
|
|
334
|
-
childList: true,
|
|
335
|
-
});
|
|
336
|
-
if (this.autofocus && !this.disabled && !this.readonly) {
|
|
337
|
-
this.interval = setInterval(this.checkChildHydration, 50);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
handleKeyDown(ev) {
|
|
341
|
-
var _a, _b;
|
|
342
|
-
this.icKeydown.emit({
|
|
343
|
-
event: ev,
|
|
344
|
-
cursorPosition: (_a = this.inputEl.selectionStart) !== null && _a !== void 0 ? _a : 0,
|
|
345
|
-
selectionEnd: (_b = this.inputEl.selectionEnd) !== null && _b !== void 0 ? _b : 0,
|
|
346
|
-
});
|
|
347
|
-
if (!ev.ctrlKey && !IGNORED_KEYBOARD_CHARACTERS.includes(ev.key)) {
|
|
348
|
-
this.maxCharactersWarning = this.maxCharactersReached;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Sets focus on the native `input`.
|
|
353
|
-
*/
|
|
354
|
-
async setFocus() {
|
|
355
|
-
var _a;
|
|
356
|
-
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
357
|
-
}
|
|
358
|
-
render() {
|
|
359
|
-
const { inputId, name, label, required, size, placeholder, helperText, hideCharCount, rows, resize, disabled, value, min, max, numChars, readonly, maxCharacters, maxCharactersMessage, maxCharactersWarning, maxCharactersReached, maxMessage, minCharacters, minCharactersMessage, minCharactersUnattained, minMessage, minValueUnattained, maxValueExceeded, validationAriaLive, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, theme, hideLabel, type, autocapitalize, ariaActiveDescendant, inheritedAttributes, ariaExpanded, ariaOwns, autocomplete, role, isFocussed, } = this;
|
|
360
|
-
const el = this.el;
|
|
361
|
-
const disabledMode = readonly || disabled;
|
|
362
|
-
const currentStatus = maxValueExceeded ||
|
|
363
|
-
minValueUnattained ||
|
|
364
|
-
minCharactersUnattained ||
|
|
365
|
-
maxCharactersWarning
|
|
366
|
-
? maxCharactersWarning
|
|
367
|
-
? IcInformationStatus.Warning
|
|
368
|
-
: IcInformationStatus.Error
|
|
369
|
-
: validationStatus;
|
|
370
|
-
const currentValidationText = maxCharactersWarning
|
|
371
|
-
? maxCharactersMessage
|
|
372
|
-
: maxValueExceeded
|
|
373
|
-
? maxMessage
|
|
374
|
-
: minValueUnattained
|
|
375
|
-
? minMessage
|
|
376
|
-
: minCharactersUnattained
|
|
377
|
-
? minCharactersMessage
|
|
378
|
-
: validationText;
|
|
379
|
-
const maxNumChars = readonly ? 0 : maxCharacters;
|
|
380
|
-
const messageAriaLive = validationAriaLive === "default"
|
|
381
|
-
? maxCharactersWarning ||
|
|
382
|
-
maxValueExceeded ||
|
|
383
|
-
minValueUnattained ||
|
|
384
|
-
currentStatus === IcInformationStatus.Error
|
|
385
|
-
? "assertive"
|
|
386
|
-
: "polite"
|
|
387
|
-
: validationAriaLive;
|
|
388
|
-
const showStatusText = this.hasStatus(currentStatus) &&
|
|
389
|
-
!(currentStatus == IcInformationStatus.Success && validationInline) &&
|
|
390
|
-
!validationInlineInternal;
|
|
391
|
-
const multiline = rows > 1;
|
|
392
|
-
const hiddenCharCountDescId = maxCharacters > 0 ? `${inputId}-char-count-desc` : "";
|
|
393
|
-
const charsRemaining = maxNumChars - numChars;
|
|
394
|
-
const remainingCharCountDescId = maxCharacters > 0 ? `${inputId}-remaining-char-count-desc` : "";
|
|
395
|
-
const remainingCharCountDesc = `${charsRemaining} character${charsRemaining === 1 ? "" : "s"} remaining.`;
|
|
396
|
-
const describedBy = `${getInputDescribedByText(this.el, inputId, helperText !== "", showStatusText)} ${hiddenCharCountDescId} ${numChars > 0 ? remainingCharCountDescId : ""}`.trim();
|
|
397
|
-
const disabledText = disabledMode && !readonly;
|
|
398
|
-
const showLeftIcon = !!this.el.querySelector(`[slot="icon"]`) && !disabledText;
|
|
399
|
-
const invalid = `${currentStatus === IcInformationStatus.Error}`;
|
|
400
|
-
hiddenInput
|
|
401
|
-
? renderHiddenInput(this.el, value, name, disabledMode)
|
|
402
|
-
: removeHiddenInput(this.el);
|
|
403
|
-
return (h(Host, { key: '6300558c65d21c3cf9fcb2af66774cbdf274cf89', class: {
|
|
404
|
-
"ic-text-field-full-width": fullWidth,
|
|
405
|
-
"ic-text-field-disabled": disabledMode,
|
|
406
|
-
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
407
|
-
} }, h("ic-input-container", { key: '6f0d1a6cf4ed01bd98c3b69d37f6ffb473e1201e', readonly: readonly, disabled: disabledMode }, !hideLabel && (h("ic-input-label", { key: '71cc64b0733fbe16b21f389000c8a6813ad9f07f', for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly }, h("slot", { key: '985b82195b09acc991bbed6c0be5210cba70f59e', name: "helper-text", slot: "helper-text" }))), h("ic-input-component-container", { key: '95df2f453e06c5dec6788e98db94e5e4ce129d04', size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (h("span", { key: '62a052203a6b9e35858e7103f505bdf38eda7349', class: {
|
|
408
|
-
readonly,
|
|
409
|
-
"has-value": this.getNumberOfCharacters(value) > 0,
|
|
410
|
-
}, slot: "left-icon" }, h("slot", { key: '12ee0976840d954f7f855740db4098983ccf73a5', name: "icon" }))), !multiline ? (h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: type, min: min, max: max, value: value, class: {
|
|
411
|
-
"no-left-pad": !showLeftIcon && readonly,
|
|
412
|
-
readonly,
|
|
413
|
-
"truncate-value": truncateValue,
|
|
414
|
-
}, placeholder: placeholder ? placeholder : "", 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": ariaActiveDescendant, "aria-expanded": ariaExpanded, "aria-owns": ariaOwns, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, role: role || undefined, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))) : (h("textarea", Object.assign({ id: inputId, class: {
|
|
415
|
-
"no-resize": resize === false || !!readonly,
|
|
416
|
-
"no-left-pad": !showLeftIcon && !!readonly,
|
|
417
|
-
readonly: !!readonly,
|
|
418
|
-
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), isSlotUsed(el, "clear-button") && (h("slot", { key: '4bd5b1b44a9fded9be98c35d3e49f357b99adf26', name: "clear-button" })), isSlotUsed(el, "search-submit-button") && (h("slot", { key: 'fccd3ae4e454d661540f45b748440aa8c9c28baf', name: "search-submit-button" }))), isSlotUsed(el, "menu") && h("slot", { key: 'aca9fabb2b029547a713e75be81c179e3c1e3b52', name: "menu" }), h("ic-input-validation", { key: '1d2443ab140751bd21f247f5136254498ffc8004', class: { "show-validation": this.showValidationMargin() }, status: this.hasStatus(currentStatus) === false ||
|
|
419
|
-
(currentStatus === IcInformationStatus.Success &&
|
|
420
|
-
validationInline) ||
|
|
421
|
-
validationInlineInternal
|
|
422
|
-
? ""
|
|
423
|
-
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, isSlotUsed(el, "validation-text") && (h("slot", { key: 'e8f5abdc72b047998c5164ec7bef70eab2d7af81', name: "validation-text", slot: "validation-message" })), !readonly && maxNumChars > 0 && (h("div", { key: '9458320139c6c17b4db3f40ef91ed8f35667e612', slot: "validation-message-adornment" }, !hideCharCount && (h("ic-typography", { key: '26663bbc0dbc1e5183cfb4af5b2f9a244fa303c5', variant: "caption", class: "char-count-text" }, h("span", { key: '84a9de3338f2fee09b3712fcc56dd509bbc672e2', class: "char-count" }, numChars, "/", maxNumChars))), h("span", { key: 'cb1d19f9755ea5b393e03ab19da262c67ce6e19e', class: "remaining-char-count-desc", "aria-live": "polite", hidden: !isFocussed, id: remainingCharCountDescId }, remainingCharCountDesc), h("span", { key: '87cfdac09956c5e749ff4c06bb58228d2d40feb5', hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters.")))))));
|
|
424
|
-
}
|
|
425
|
-
get el() { return this; }
|
|
426
|
-
static get watchers() { return {
|
|
427
|
-
"disabled": ["watchDisabledHandler"],
|
|
428
|
-
"debounce": ["debounceChanged"],
|
|
429
|
-
"value": ["watchValueHandler"]
|
|
430
|
-
}; }
|
|
431
|
-
static get style() { return IcTextFieldStyle0; }
|
|
432
|
-
}, [1, "ic-text-field", {
|
|
433
|
-
"ariaActiveDescendant": [1, "aria-active-descendant"],
|
|
434
|
-
"ariaAutocomplete": [1, "aria-autocomplete"],
|
|
435
|
-
"ariaExpanded": [1, "aria-expanded"],
|
|
436
|
-
"ariaOwns": [1, "aria-owns"],
|
|
437
|
-
"autocapitalize": [1],
|
|
438
|
-
"autocomplete": [1],
|
|
439
|
-
"autocorrect": [1],
|
|
440
|
-
"autofocus": [4],
|
|
441
|
-
"disabled": [4],
|
|
442
|
-
"fullWidth": [4, "full-width"],
|
|
443
|
-
"helperText": [1, "helper-text"],
|
|
444
|
-
"hideCharCount": [4, "hide-char-count"],
|
|
445
|
-
"hideLabel": [4, "hide-label"],
|
|
446
|
-
"hiddenInput": [4, "hidden-input"],
|
|
447
|
-
"inputId": [1, "input-id"],
|
|
448
|
-
"inputmode": [1],
|
|
449
|
-
"label": [1],
|
|
450
|
-
"max": [8],
|
|
451
|
-
"maxCharacters": [2, "max-characters"],
|
|
452
|
-
"maxCharactersMessage": [1, "max-characters-message"],
|
|
453
|
-
"maxMessage": [1, "max-message"],
|
|
454
|
-
"min": [8],
|
|
455
|
-
"minCharacters": [2, "min-characters"],
|
|
456
|
-
"minCharactersMessage": [1, "min-characters-message"],
|
|
457
|
-
"minMessage": [1, "min-message"],
|
|
458
|
-
"name": [1],
|
|
459
|
-
"placeholder": [1],
|
|
460
|
-
"readonly": [516],
|
|
461
|
-
"required": [4],
|
|
462
|
-
"resize": [4],
|
|
463
|
-
"role": [1],
|
|
464
|
-
"rows": [2],
|
|
465
|
-
"size": [1],
|
|
466
|
-
"spellcheck": [4],
|
|
467
|
-
"theme": [1],
|
|
468
|
-
"truncateValue": [4, "truncate-value"],
|
|
469
|
-
"type": [1],
|
|
470
|
-
"validationAriaLive": [1, "validation-aria-live"],
|
|
471
|
-
"validationInline": [4, "validation-inline"],
|
|
472
|
-
"validationInlineInternal": [4, "validation-inline-internal"],
|
|
473
|
-
"validationStatus": [1, "validation-status"],
|
|
474
|
-
"validationText": [1, "validation-text"],
|
|
475
|
-
"debounce": [2],
|
|
476
|
-
"value": [1537],
|
|
477
|
-
"numChars": [32],
|
|
478
|
-
"maxCharactersReached": [32],
|
|
479
|
-
"maxCharactersWarning": [32],
|
|
480
|
-
"minCharactersUnattained": [32],
|
|
481
|
-
"maxValueExceeded": [32],
|
|
482
|
-
"minValueUnattained": [32],
|
|
483
|
-
"isFocussed": [32],
|
|
484
|
-
"initialValue": [32],
|
|
485
|
-
"setFocus": [64]
|
|
486
|
-
}, [[0, "keydown", "handleKeyDown"]], {
|
|
487
|
-
"disabled": ["watchDisabledHandler"],
|
|
488
|
-
"debounce": ["debounceChanged"],
|
|
489
|
-
"value": ["watchValueHandler"]
|
|
490
|
-
}]);
|
|
491
|
-
function defineCustomElement$1() {
|
|
492
|
-
if (typeof customElements === "undefined") {
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
const components = ["ic-text-field", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-typography"];
|
|
496
|
-
components.forEach(tagName => { switch (tagName) {
|
|
497
|
-
case "ic-text-field":
|
|
498
|
-
if (!customElements.get(tagName)) {
|
|
499
|
-
customElements.define(tagName, TextField);
|
|
500
|
-
}
|
|
501
|
-
break;
|
|
502
|
-
case "ic-input-component-container":
|
|
503
|
-
if (!customElements.get(tagName)) {
|
|
504
|
-
defineCustomElement$6();
|
|
505
|
-
}
|
|
506
|
-
break;
|
|
507
|
-
case "ic-input-container":
|
|
508
|
-
if (!customElements.get(tagName)) {
|
|
509
|
-
defineCustomElement$5();
|
|
510
|
-
}
|
|
511
|
-
break;
|
|
512
|
-
case "ic-input-label":
|
|
513
|
-
if (!customElements.get(tagName)) {
|
|
514
|
-
defineCustomElement$4();
|
|
515
|
-
}
|
|
516
|
-
break;
|
|
517
|
-
case "ic-input-validation":
|
|
518
|
-
if (!customElements.get(tagName)) {
|
|
519
|
-
defineCustomElement$3();
|
|
520
|
-
}
|
|
521
|
-
break;
|
|
522
|
-
case "ic-typography":
|
|
523
|
-
if (!customElements.get(tagName)) {
|
|
524
|
-
defineCustomElement$2();
|
|
525
|
-
}
|
|
526
|
-
break;
|
|
527
|
-
} });
|
|
528
|
-
}
|
|
1
|
+
import { T as TextField, d as defineCustomElement$1 } from './ic-text-field2.js';
|
|
529
2
|
|
|
530
3
|
const IcTextField = TextField;
|
|
531
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ic-text-field.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,izMAAizM,CAAC;AACz0M,0BAAe,cAAc;;ACgD7B,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAAC;MAY9C,SAAS;IALtB;;;;;;;;;;;QAMU,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAAoB,GAA4B,IAAI,CAAC;QAKpD,aAAQ,GAAW,CAAC,CAAC;QACrB,yBAAoB,GAAY,KAAK,CAAC;QACtC,yBAAoB,GAAY,KAAK,CAAC;QACtC,4BAAuB,GAAY,KAAK,CAAC;QACzC,qBAAgB,GAAY,KAAK,CAAC;QAClC,uBAAkB,GAAY,KAAK,CAAC;QACpC,eAAU,GAAY,KAAK,CAA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,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACH,CACP,CACmB,CACH,CAChB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n background: transparent;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\n.show-validation {\n margin-top: var(--ic-space-xs);\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n IcValidationAriaLive,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n removeHiddenInput,\n} from \"../../utils/helpers\";\nimport {\n IC_INHERITED_ARIA,\n IGNORED_KEYBOARD_CHARACTERS,\n} from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldKeydownEventDetail,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot helper-text - Content is set as the helper text for the text field.\n * @slot validation-text - Content is set as validation text for the text field.\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver | null = null;\n private interval: ReturnType<typeof setInterval>;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n @State() isFocussed: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete?: IcAriaAutocompleteTypes;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string | null;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns?: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete?: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect?: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max?: string | number;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters = 0;\n\n /**\n * The text to display as the warning message when the maximum number of characters (the `maxCharacters` prop value) is reached.\n */\n // prettier-ignore\n @Prop() maxCharactersMessage = `Maximum input is ${this.maxCharacters} characters`;\n\n /**\n * The text to display as the error message when the maximum value (the `max` prop value) has been exceeded.\n */\n @Prop() maxMessage = `Maximum value of ${this.max} exceeded`;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min?: string | number;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters = 0;\n\n /**\n * The text to display as the error message when the minimum number of characters (the `minCharacters` prop value) has not been met.\n */\n // prettier-ignore\n @Prop() minCharactersMessage = `Minimum input is ${this.minCharacters} characters`;\n\n /**\n * The text to display as the error message when the minimum value (the `min` prop value) has not been met.\n */\n @Prop() minMessage = `Minimum value of ${this.min} not met`;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string | null;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue = false;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * The value of the `aria-live` attribute on the validation message. When set to \"default\", the `aria-live` value will be handled automatically, e.g. \"assertive\" for `validation-status=\"error\"`.\n */\n @Prop() validationAriaLive: IcValidationAriaLive = \"default\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value = \"\";\n @State() initialValue = this.value;\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n if (value.length < newValue.length) {\n this.maxCharactersWarning = true;\n }\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<IcTextFieldKeydownEventDetail>;\n\n /**\n * Emitted when the textarea variant is scrolled.\n */\n @Event() icScroll: EventEmitter;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el as HTMLElement, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(\n this.el as HTMLElement,\n MUTABLE_ATTRIBUTES\n );\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el as HTMLElement, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n\n if (this.autofocus && !this.disabled && !this.readonly) {\n this.interval = setInterval(this.checkChildHydration, 50);\n }\n }\n\n private checkChildHydration = () => {\n if (\n this.hideLabel ||\n this.el.shadowRoot\n ?.querySelector(\"ic-typography\")\n ?.classList.contains(\"hydrated\")\n ) {\n this.setFocus();\n clearInterval(this.interval);\n }\n };\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({\n event: ev,\n cursorPosition: this.inputEl.selectionStart ?? 0,\n selectionEnd: this.inputEl.selectionEnd ?? 0,\n });\n\n if (!ev.ctrlKey && !IGNORED_KEYBOARD_CHARACTERS.includes(ev.key)) {\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getNumberOfCharacters = (value: string) =>\n value !== null && value !== undefined ? value.length : 0;\n\n private getMaxValueExceeded = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n if (this.type === \"number\") {\n this.minValueUnattained = !!value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n this.maxCharactersReached =\n this.maxCharacters > 0 && this.numChars >= this.maxCharacters;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.removeEventListener(\"wheel\", this.onWheel);\n const { value } = target;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 && this.numChars < this.minCharacters;\n this.icBlur.emit({ value });\n this.isFocussed = false;\n };\n\n private onFocus = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.addEventListener(\"wheel\", this.onWheel);\n this.icFocus.emit({ value: target.value });\n this.isFocussed = true;\n };\n\n private onTextAreaScroll = () => {\n this.icScroll.emit();\n };\n\n private onWheel = (ev: WheelEvent) => {\n const target = ev.target as HTMLInputElement;\n if (target.type === \"number\") {\n target.blur();\n setTimeout(() => {\n target.focus();\n }, 0);\n }\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n private showValidationMargin = (): boolean => {\n const maxNumChars = this.readonly ? 0 : this.maxCharacters;\n const emptyString =\n isEmptyString(this.validationStatus) ||\n isEmptyString(this.validationText);\n const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;\n const charsOutsideRange = maxNumChars > 0 || this.minCharactersUnattained;\n return (\n (!emptyString || valueOutsideRange || charsOutsideRange) &&\n !this.validationInlineInternal\n );\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\n this.inheritedAttributes[attributeName] = attribute;\n }\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersMessage,\n maxCharactersWarning,\n maxCharactersReached,\n maxMessage,\n minCharacters,\n minCharactersMessage,\n minCharactersUnattained,\n minMessage,\n minValueUnattained,\n maxValueExceeded,\n validationAriaLive,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n theme,\n hideLabel,\n type,\n autocapitalize,\n ariaActiveDescendant,\n inheritedAttributes,\n ariaExpanded,\n ariaOwns,\n autocomplete,\n role,\n isFocussed,\n } = this;\n\n const el = this.el as HTMLElement;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? maxCharactersMessage\n : maxValueExceeded\n ? maxMessage\n : minValueUnattained\n ? minMessage\n : minCharactersUnattained\n ? minCharactersMessage\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n validationAriaLive === \"default\"\n ? maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\"\n : validationAriaLive;\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const charsRemaining = maxNumChars - numChars;\n const remainingCharCountDescId =\n maxCharacters > 0 ? `${inputId}-remaining-char-count-desc` : \"\";\n const remainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n\n const describedBy = `${getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n showStatusText\n )} ${hiddenCharCountDescId} ${\n numChars > 0 ? remainingCharCountDescId : \"\"\n }`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n hiddenInput\n ? renderHiddenInput(this.el as HTMLElement, value, name, disabledMode)\n : removeHiddenInput(this.el as HTMLElement);\n\n return (\n <Host\n class={{\n \"ic-text-field-full-width\": fullWidth,\n \"ic-text-field-disabled\": disabledMode,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n readonly,\n \"has-value\": this.getNumberOfCharacters(value) > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={type}\n min={min}\n max={max}\n value={value}\n class={{\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={ariaActiveDescendant}\n aria-expanded={ariaExpanded}\n aria-owns={ariaOwns}\n autocomplete={autocomplete}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={role || undefined}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n \"no-resize\": resize === false || !!readonly,\n \"no-left-pad\": !showLeftIcon && !!readonly,\n readonly: !!readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onScroll={this.onTextAreaScroll}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocomplete={autocomplete}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(el, \"menu\") && <slot name=\"menu\"></slot>}\n <ic-input-validation\n class={{ \"show-validation\": this.showValidationMargin() }}\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {isSlotUsed(el, \"validation-text\") && (\n <slot name=\"validation-text\" slot=\"validation-message\"></slot>\n )}\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography variant=\"caption\" class=\"char-count-text\">\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span\n class=\"remaining-char-count-desc\"\n aria-live=\"polite\"\n hidden={!isFocussed}\n id={remainingCharCountDescId}\n >\n {remainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ic-text-field.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|