@ukic/web-components 2.25.1 → 3.0.0
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-4af10d35.js → helpers-94b33ab0.js} +3 -1
- package/dist/cjs/helpers-94b33ab0.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +8 -8
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +4 -4
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -3
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +12 -15
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +15 -27
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +27 -22
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/{ic-card.cjs.entry.js → ic-card-vertical.cjs.entry.js} +6 -6
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +6 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +6 -15
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -10
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +28 -0
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-row.cjs.entry.js +9 -10
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +12 -97
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +6 -6
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -9
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +6 -7
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +8 -8
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +8 -9
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +18 -23
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +11 -12
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +6 -7
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +3 -3
- 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 +9 -9
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +5 -5
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +7 -8
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +35 -33
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -3
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +40 -25
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -18
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +18 -24
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +13 -21
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +7 -7
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +4 -5
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +2 -11
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +40 -43
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +16 -16
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +5 -6
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +0 -11
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +4 -5
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -8
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +4 -4
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +49 -49
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +0 -7
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +83 -35
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +16 -16
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -13
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +4 -4
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +51 -16
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-f982899d.js +12 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/types-dc22e301.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/ic-accordion/ic-accordion.css +7 -7
- package/dist/collection/components/ic-accordion/ic-accordion.js +2 -2
- package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +5 -5
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +9 -9
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +7 -7
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
- package/dist/collection/components/ic-alert/ic-alert.js +0 -19
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +21 -61
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +10 -13
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +9 -10
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.css +33 -33
- package/dist/collection/components/ic-badge/ic-badge.js +18 -74
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +41 -43
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +2 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.css +7 -5
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +240 -214
- package/dist/collection/components/ic-button/ic-button.js +8 -9
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/{ic-card/ic-card.js → ic-card-vertical/ic-card-vertical.js} +5 -5
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -0
- package/dist/collection/components/{ic-card/test/basic/ic-card.spec.js → ic-card-vertical/test/basic/ic-card-vertical.spec.js} +41 -41
- package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +1 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +10 -10
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -136
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +3 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +4 -24
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +2 -2
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +1 -5
- package/dist/collection/components/ic-chip/ic-chip.js +8 -52
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +15 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/{ic-data-entity/ic-data-entity.css → ic-data-list/ic-data-list.css} +2 -2
- package/dist/collection/components/{ic-data-entity/ic-data-entity.js → ic-data-list/ic-data-list.js} +11 -33
- package/dist/collection/components/ic-data-list/ic-data-list.js.map +1 -0
- package/dist/collection/components/{ic-data-entity/test/basic/ic-data-entity.spec.js → ic-data-list/test/basic/ic-data-list.spec.js} +32 -32
- package/dist/collection/components/ic-data-list/test/basic/ic-data-list.spec.js.map +1 -0
- package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.js +8 -30
- package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
- package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js +4 -4
- package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.css +3 -12
- package/dist/collection/components/ic-dialog/ic-dialog.js +11 -214
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +3 -226
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.css +4 -4
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +6 -6
- package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.css +6 -6
- package/dist/collection/components/ic-footer/ic-footer.js +6 -6
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +1 -1
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +1 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +33 -107
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +4 -5
- package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +7 -7
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +9 -9
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js +7 -7
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.css +13 -13
- package/dist/collection/components/ic-hero/ic-hero.js +8 -30
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +6 -6
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +5 -5
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +3 -3
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +31 -26
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +9 -54
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +9 -9
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.css +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.js +24 -46
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +4 -4
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +2 -2
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js +4 -4
- package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.css +31 -31
- package/dist/collection/components/ic-link/ic-link.js +4 -25
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +18 -16
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +5 -4
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +7 -7
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.css +8 -8
- package/dist/collection/components/ic-menu/ic-menu.js +6 -29
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +21 -21
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +10 -10
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +7 -7
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +4 -4
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.css +2 -2
- package/dist/collection/components/ic-page-header/ic-page-header.js +5 -27
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js +15 -15
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.css +5 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js +39 -37
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +26 -26
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +2 -2
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +41 -45
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js +14 -18
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js.map +1 -1
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +11 -2
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +4 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -126
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -6
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +29 -96
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +6 -6
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +1 -1
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +15 -15
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +14 -12
- package/dist/collection/components/ic-select/ic-select.js +13 -148
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +6 -6
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +8 -8
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +6 -6
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.css +2 -2
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +3 -25
- package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
- package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js +1 -1
- package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +1 -57
- package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.types.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.css +52 -52
- package/dist/collection/components/ic-step/ic-step.js +49 -52
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/test/basic/ic-step.spec.js +30 -30
- package/dist/collection/components/ic-step/test/basic/ic-step.spec.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.css +4 -4
- package/dist/collection/components/ic-stepper/ic-stepper.js +14 -14
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper-test-examples.js +37 -37
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper-test-examples.js.map +1 -1
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js +234 -234
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.js +4 -26
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +1 -1
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.css +5 -5
- package/dist/collection/components/ic-tab/ic-tab.js +2 -2
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +2 -2
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +0 -34
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +2 -2
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -24
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +0 -28
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js +3 -18
- package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.css +8 -3
- package/dist/collection/components/ic-text-field/ic-text-field.js +67 -89
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +26 -11
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +70 -39
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
- package/dist/collection/components/ic-toast/ic-toast.css +10 -3
- package/dist/collection/components/ic-toast/ic-toast.js +83 -32
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +43 -7
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -43
- package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -1
- package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js +0 -20
- package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +50 -43
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +13 -13
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js +4 -4
- package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +11 -8
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +15 -15
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.types.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +19 -19
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +56 -6
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +4 -4
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.css +13 -5
- package/dist/collection/components/ic-typography/ic-typography.js +152 -17
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +55 -0
- package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -1
- package/dist/collection/utils/helpers.js +1 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +2 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion-group.js +8 -8
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +3 -3
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +127 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +25 -16
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +17 -31
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +4 -4
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +3 -3
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +10 -10
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/{ic-data-entity.d.ts → ic-card-vertical.d.ts} +4 -4
- package/dist/components/{ic-card.js → ic-card-vertical.js} +11 -11
- package/dist/components/ic-card-vertical.js.map +1 -0
- package/dist/components/ic-checkbox-group.js +6 -6
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +6 -21
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +9 -11
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +2 -2
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/{ic-card.d.ts → ic-data-list.d.ts} +4 -4
- package/dist/components/ic-data-list.js +51 -0
- package/dist/components/ic-data-list.js.map +1 -0
- package/dist/components/ic-data-row.js +10 -12
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.js +14 -112
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +7 -7
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +10 -10
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +13 -8
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +8 -8
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +8 -10
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +11 -16
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +10 -12
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +4 -4
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +6 -8
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +9 -9
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +3 -3
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +7 -10
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +9 -9
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +5 -5
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +2 -2
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +7 -9
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination.js +38 -36
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +3 -3
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +41 -26
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -25
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +20 -27
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +14 -29
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +7 -7
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +4 -6
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +1 -12
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +46 -49
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +16 -16
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +5 -7
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +0 -11
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +3 -5
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +1 -9
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +3 -3
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +51 -53
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -9
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +86 -36
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +16 -16
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +13 -13
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +12 -5
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +4 -4
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +57 -19
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/components/types.js.map +1 -1
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-014342a2.entry.js → p-05d32a4f.entry.js} +2 -2
- package/dist/core/{p-1d9fceb1.entry.js → p-086a6d4f.entry.js} +2 -2
- package/dist/core/p-0a00a786.entry.js +2 -0
- package/dist/core/p-0a00a786.entry.js.map +1 -0
- package/dist/core/p-145fcef3.entry.js +2 -0
- package/dist/core/p-145fcef3.entry.js.map +1 -0
- package/dist/core/{p-eb1d00a7.entry.js → p-15367990.entry.js} +2 -2
- package/dist/core/p-15367990.entry.js.map +1 -0
- package/dist/core/p-1737bf2c.entry.js +2 -0
- package/dist/core/p-1737bf2c.entry.js.map +1 -0
- package/dist/core/p-1ace2b02.entry.js +2 -0
- package/dist/core/p-1ace2b02.entry.js.map +1 -0
- package/dist/core/p-1e371012.entry.js +2 -0
- package/dist/core/p-1e371012.entry.js.map +1 -0
- package/dist/core/p-1f227289.entry.js +2 -0
- package/dist/core/p-1f227289.entry.js.map +1 -0
- package/dist/core/p-24275b92.entry.js +2 -0
- package/dist/core/p-24275b92.entry.js.map +1 -0
- package/dist/core/p-26b7b18f.js.map +1 -1
- package/dist/core/p-29e6c33f.entry.js +2 -0
- package/dist/core/p-29e6c33f.entry.js.map +1 -0
- package/dist/core/{p-5bba7e31.entry.js → p-2a6f01ad.entry.js} +2 -2
- package/dist/core/{p-8ce2dfd4.entry.js → p-2f86c53b.entry.js} +2 -2
- package/dist/core/p-2f86c53b.entry.js.map +1 -0
- package/dist/core/p-319e40c0.entry.js +2 -0
- package/dist/core/p-319e40c0.entry.js.map +1 -0
- package/dist/core/p-346c6920.entry.js +2 -0
- package/dist/core/p-346c6920.entry.js.map +1 -0
- package/dist/core/p-4b1445b3.entry.js +2 -0
- package/dist/core/p-4b1445b3.entry.js.map +1 -0
- package/dist/core/p-4b621c67.entry.js +2 -0
- package/dist/core/p-4b621c67.entry.js.map +1 -0
- package/dist/core/p-4ca2b177.entry.js +2 -0
- package/dist/core/p-4ca2b177.entry.js.map +1 -0
- package/dist/core/{p-3eda4e14.entry.js → p-54238d16.entry.js} +2 -2
- package/dist/core/p-54238d16.entry.js.map +1 -0
- package/dist/core/{p-c1db024d.entry.js → p-5515ad19.entry.js} +2 -2
- package/dist/core/p-5515ad19.entry.js.map +1 -0
- package/dist/core/p-5c8081d6.entry.js +2 -0
- package/dist/core/p-5c8081d6.entry.js.map +1 -0
- package/dist/core/{p-a8aea311.entry.js → p-5f941f3a.entry.js} +2 -2
- package/dist/core/{p-a8aea311.entry.js.map → p-5f941f3a.entry.js.map} +1 -1
- package/dist/core/p-5fd293b3.entry.js +2 -0
- package/dist/core/p-5fd293b3.entry.js.map +1 -0
- package/dist/core/p-60721d95.entry.js +2 -0
- package/dist/core/p-60721d95.entry.js.map +1 -0
- package/dist/core/{p-d69f353b.entry.js → p-64a5a1d8.entry.js} +2 -2
- package/dist/core/p-64a5a1d8.entry.js.map +1 -0
- package/dist/core/p-65e36461.entry.js +2 -0
- package/dist/core/p-65e36461.entry.js.map +1 -0
- package/dist/core/{p-a9a2987c.entry.js → p-66363c7d.entry.js} +2 -2
- package/dist/core/p-66363c7d.entry.js.map +1 -0
- package/dist/core/p-69728d76.entry.js +2 -0
- package/dist/core/p-69728d76.entry.js.map +1 -0
- package/dist/core/p-6b328c76.entry.js +2 -0
- package/dist/core/p-6b328c76.entry.js.map +1 -0
- package/dist/core/p-6b5ddacd.entry.js +2 -0
- package/dist/core/p-6b5ddacd.entry.js.map +1 -0
- package/dist/core/{p-92b9b56a.entry.js → p-7b3d6577.entry.js} +2 -2
- package/dist/core/p-7b3d6577.entry.js.map +1 -0
- package/dist/core/p-7d45828d.entry.js +2 -0
- package/dist/core/p-7d45828d.entry.js.map +1 -0
- package/dist/core/p-893eca54.entry.js +2 -0
- package/dist/core/p-893eca54.entry.js.map +1 -0
- package/dist/core/p-8ee262a4.entry.js +2 -0
- package/dist/core/p-8ee262a4.entry.js.map +1 -0
- package/dist/core/p-8f93d92b.entry.js +2 -0
- package/dist/core/p-8f93d92b.entry.js.map +1 -0
- package/dist/core/p-90bb13d2.entry.js +2 -0
- package/dist/core/p-90bb13d2.entry.js.map +1 -0
- package/dist/core/p-9189a82d.entry.js +2 -0
- package/dist/core/p-9189a82d.entry.js.map +1 -0
- package/dist/core/p-9190a84d.entry.js +2 -0
- package/dist/core/p-9190a84d.entry.js.map +1 -0
- package/dist/core/{p-08781606.entry.js → p-93f50a1a.entry.js} +2 -2
- package/dist/core/p-93f50a1a.entry.js.map +1 -0
- package/dist/core/p-9474baf3.entry.js +2 -0
- package/dist/core/p-9474baf3.entry.js.map +1 -0
- package/dist/core/{p-967d5546.entry.js → p-9857f6b0.entry.js} +2 -2
- package/dist/core/{p-7438ab1f.entry.js → p-a0e4d6bd.entry.js} +2 -2
- package/dist/core/p-a0e4d6bd.entry.js.map +1 -0
- package/dist/core/p-a1b9a808.entry.js +2 -0
- package/dist/core/p-a1b9a808.entry.js.map +1 -0
- package/dist/core/p-a79bec03.entry.js +2 -0
- package/dist/core/p-a79bec03.entry.js.map +1 -0
- package/dist/core/p-a84a4675.entry.js +2 -0
- package/dist/core/p-a84a4675.entry.js.map +1 -0
- package/dist/core/p-a928c7b3.entry.js +2 -0
- package/dist/core/p-a928c7b3.entry.js.map +1 -0
- package/dist/core/{p-6fae7e1f.entry.js → p-bf89c86d.entry.js} +2 -2
- package/dist/core/p-bf89c86d.entry.js.map +1 -0
- package/dist/core/{p-36cd5d32.js → p-d0524c73.js} +2 -2
- package/dist/core/p-d0524c73.js.map +1 -0
- package/dist/core/p-d24410ca.entry.js +2 -0
- package/dist/core/p-d24410ca.entry.js.map +1 -0
- package/dist/core/p-d52ca420.entry.js +2 -0
- package/dist/core/p-d52ca420.entry.js.map +1 -0
- package/dist/core/p-d67a30ca.entry.js +2 -0
- package/dist/core/p-d67a30ca.entry.js.map +1 -0
- package/dist/core/{p-1ef00a47.entry.js → p-de27c59e.entry.js} +2 -2
- package/dist/core/p-de27c59e.entry.js.map +1 -0
- package/dist/core/p-dec339ba.entry.js +2 -0
- package/dist/core/p-dec339ba.entry.js.map +1 -0
- package/dist/core/p-e4335135.entry.js +2 -0
- package/dist/core/p-e4335135.entry.js.map +1 -0
- package/dist/core/p-e56a2a06.entry.js +2 -0
- package/dist/core/p-e56a2a06.entry.js.map +1 -0
- package/dist/core/p-e696dc2a.entry.js +2 -0
- package/dist/core/p-e696dc2a.entry.js.map +1 -0
- package/dist/core/{p-f13195ab.entry.js → p-f0501be1.entry.js} +2 -2
- package/dist/core/p-f0501be1.entry.js.map +1 -0
- package/dist/core/{p-3b41756e.entry.js → p-f50462df.entry.js} +2 -2
- package/dist/core/p-feb80f37.entry.js +2 -0
- package/dist/core/p-feb80f37.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-354dbb8d.js → helpers-35ac5e03.js} +3 -2
- package/dist/esm/helpers-35ac5e03.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +8 -8
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +4 -4
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +1 -3
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +12 -15
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +15 -27
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +4 -4
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +3 -3
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +27 -22
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/{ic-card.entry.js → ic-card-vertical.entry.js} +6 -6
- package/dist/esm/ic-card-vertical.entry.js.map +1 -0
- package/dist/esm/ic-checkbox-group.entry.js +6 -5
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +6 -15
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -10
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +2 -2
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +24 -0
- package/dist/esm/ic-data-list.entry.js.map +1 -0
- package/dist/esm/ic-data-row.entry.js +9 -10
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +12 -97
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +6 -6
- package/dist/esm/ic-empty-state.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +9 -9
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +6 -7
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +8 -8
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +8 -9
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +18 -23
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +11 -12
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +6 -7
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +3 -3
- 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 +9 -9
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +5 -5
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +2 -2
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +7 -8
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination.entry.js +35 -33
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +3 -3
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +40 -25
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -18
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +18 -24
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +13 -21
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +7 -7
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +4 -5
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +2 -11
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +40 -43
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +16 -16
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +5 -6
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +0 -11
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +4 -5
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -8
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +4 -4
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +49 -49
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js +0 -7
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +83 -35
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +16 -16
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +13 -13
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +4 -4
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +52 -17
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-d1d2c456.js +12 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/types-6f6b41a5.js.map +1 -1
- package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +2 -2
- package/dist/types/components/ic-alert/ic-alert.d.ts +0 -4
- package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +0 -1
- package/dist/types/components/ic-badge/ic-badge.d.ts +3 -11
- package/dist/types/components/ic-button/ic-button.d.ts +0 -1
- package/dist/types/components/{ic-card/ic-card.d.ts → ic-card-vertical/ic-card-vertical.d.ts} +2 -2
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +0 -28
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +0 -4
- package/dist/types/components/ic-chip/ic-chip.d.ts +2 -9
- package/dist/types/components/ic-data-list/ic-data-list.d.ts +16 -0
- package/dist/types/components/ic-data-row/ic-data-row.d.ts +1 -5
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -37
- package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +1 -1
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +1 -1
- package/dist/types/components/ic-hero/ic-hero.d.ts +2 -6
- package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +0 -8
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +4 -8
- package/dist/types/components/ic-link/ic-link.d.ts +0 -4
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +1 -1
- package/dist/types/components/ic-menu/ic-menu.d.ts +0 -4
- package/dist/types/components/ic-page-header/ic-page-header.d.ts +0 -4
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +4 -4
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +4 -4
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +0 -24
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +3 -15
- package/dist/types/components/ic-select/ic-select.d.ts +1 -31
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -1
- package/dist/types/components/ic-skeleton/ic-skeleton.d.ts +0 -4
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +1 -10
- package/dist/types/components/ic-status-tag/ic-status-tag.types.d.ts +0 -1
- package/dist/types/components/ic-step/ic-step.d.ts +6 -6
- package/dist/types/components/ic-stepper/test/basic/ic-stepper-test-examples.d.ts +4 -4
- package/dist/types/components/ic-switch/ic-switch.d.ts +0 -4
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +0 -4
- package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +0 -5
- package/dist/types/components/ic-tab-panel/ic-tab-panel.d.ts +0 -6
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +7 -12
- package/dist/types/components/ic-toast/ic-toast.d.ts +8 -1
- package/dist/types/components/ic-toast-region/ic-toast-region.d.ts +0 -5
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -1
- package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.types.d.ts +1 -1
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +7 -0
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +1 -1
- package/dist/types/components/ic-typography/ic-typography.d.ts +23 -1
- package/dist/types/components.d.ts +144 -508
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +642 -768
- package/package.json +2 -2
- package/vscode-data.json +52 -245
- package/dist/cjs/helpers-4af10d35.js.map +0 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +0 -1
- package/dist/collection/components/ic-card/ic-card.js.map +0 -1
- package/dist/collection/components/ic-card/test/basic/ic-card.spec.js.map +0 -1
- package/dist/collection/components/ic-chip/ic-chip.types.js +0 -2
- package/dist/collection/components/ic-chip/ic-chip.types.js.map +0 -1
- package/dist/collection/components/ic-data-entity/ic-data-entity.js.map +0 -1
- package/dist/collection/components/ic-data-entity/test/basic/ic-data-entity.spec.js.map +0 -1
- package/dist/components/ic-alert2.js +0 -133
- package/dist/components/ic-alert2.js.map +0 -1
- package/dist/components/ic-card.js.map +0 -1
- package/dist/components/ic-data-entity.js +0 -53
- package/dist/components/ic-data-entity.js.map +0 -1
- package/dist/core/p-03434b02.entry.js +0 -2
- package/dist/core/p-03434b02.entry.js.map +0 -1
- package/dist/core/p-038a2ea1.entry.js +0 -2
- package/dist/core/p-038a2ea1.entry.js.map +0 -1
- package/dist/core/p-08781606.entry.js.map +0 -1
- package/dist/core/p-0a2cdf34.entry.js +0 -2
- package/dist/core/p-0a2cdf34.entry.js.map +0 -1
- package/dist/core/p-1145e33c.entry.js +0 -2
- package/dist/core/p-1145e33c.entry.js.map +0 -1
- package/dist/core/p-13f2c9dc.entry.js +0 -2
- package/dist/core/p-13f2c9dc.entry.js.map +0 -1
- package/dist/core/p-14c47aed.entry.js +0 -2
- package/dist/core/p-14c47aed.entry.js.map +0 -1
- package/dist/core/p-15138df1.entry.js +0 -2
- package/dist/core/p-15138df1.entry.js.map +0 -1
- package/dist/core/p-191d2571.entry.js +0 -2
- package/dist/core/p-191d2571.entry.js.map +0 -1
- package/dist/core/p-1e33ac04.entry.js +0 -2
- package/dist/core/p-1e33ac04.entry.js.map +0 -1
- package/dist/core/p-1eb6fc19.entry.js +0 -2
- package/dist/core/p-1eb6fc19.entry.js.map +0 -1
- package/dist/core/p-1ef00a47.entry.js.map +0 -1
- package/dist/core/p-1f4698e7.entry.js +0 -2
- package/dist/core/p-1f4698e7.entry.js.map +0 -1
- package/dist/core/p-24e6c926.entry.js +0 -2
- package/dist/core/p-24e6c926.entry.js.map +0 -1
- package/dist/core/p-261debaf.entry.js +0 -2
- package/dist/core/p-261debaf.entry.js.map +0 -1
- package/dist/core/p-277c3199.entry.js +0 -2
- package/dist/core/p-277c3199.entry.js.map +0 -1
- package/dist/core/p-2bc8a51d.entry.js +0 -2
- package/dist/core/p-2bc8a51d.entry.js.map +0 -1
- package/dist/core/p-36cd5d32.js.map +0 -1
- package/dist/core/p-37d152b9.entry.js +0 -2
- package/dist/core/p-37d152b9.entry.js.map +0 -1
- package/dist/core/p-3eda4e14.entry.js.map +0 -1
- package/dist/core/p-41b93fc2.entry.js +0 -2
- package/dist/core/p-41b93fc2.entry.js.map +0 -1
- package/dist/core/p-4a64ec92.entry.js +0 -2
- package/dist/core/p-4a64ec92.entry.js.map +0 -1
- package/dist/core/p-4a9eecd7.entry.js +0 -2
- package/dist/core/p-4a9eecd7.entry.js.map +0 -1
- package/dist/core/p-4ad38ad7.entry.js +0 -2
- package/dist/core/p-4ad38ad7.entry.js.map +0 -1
- package/dist/core/p-4ecf210f.entry.js +0 -2
- package/dist/core/p-4ecf210f.entry.js.map +0 -1
- package/dist/core/p-5128fc04.entry.js +0 -2
- package/dist/core/p-5128fc04.entry.js.map +0 -1
- package/dist/core/p-59732bc5.entry.js +0 -2
- package/dist/core/p-59732bc5.entry.js.map +0 -1
- package/dist/core/p-6a4a0752.entry.js +0 -2
- package/dist/core/p-6a4a0752.entry.js.map +0 -1
- package/dist/core/p-6e36ff34.entry.js +0 -2
- package/dist/core/p-6e36ff34.entry.js.map +0 -1
- package/dist/core/p-6fae7e1f.entry.js.map +0 -1
- package/dist/core/p-70a7cfa5.entry.js +0 -2
- package/dist/core/p-70a7cfa5.entry.js.map +0 -1
- package/dist/core/p-7438ab1f.entry.js.map +0 -1
- package/dist/core/p-7e5936a3.entry.js +0 -2
- package/dist/core/p-7e5936a3.entry.js.map +0 -1
- package/dist/core/p-80b87940.entry.js +0 -2
- package/dist/core/p-80b87940.entry.js.map +0 -1
- package/dist/core/p-85f6a2ef.entry.js +0 -2
- package/dist/core/p-85f6a2ef.entry.js.map +0 -1
- package/dist/core/p-8ce2dfd4.entry.js.map +0 -1
- package/dist/core/p-92b9b56a.entry.js.map +0 -1
- package/dist/core/p-98708868.entry.js +0 -2
- package/dist/core/p-98708868.entry.js.map +0 -1
- package/dist/core/p-a332f7d8.entry.js +0 -2
- package/dist/core/p-a332f7d8.entry.js.map +0 -1
- package/dist/core/p-a646c117.entry.js +0 -2
- package/dist/core/p-a646c117.entry.js.map +0 -1
- package/dist/core/p-a9a2987c.entry.js.map +0 -1
- package/dist/core/p-b47021d8.entry.js +0 -2
- package/dist/core/p-b47021d8.entry.js.map +0 -1
- package/dist/core/p-bb2f2048.entry.js +0 -2
- package/dist/core/p-bb2f2048.entry.js.map +0 -1
- package/dist/core/p-c1db024d.entry.js.map +0 -1
- package/dist/core/p-cf3a721c.entry.js +0 -2
- package/dist/core/p-cf3a721c.entry.js.map +0 -1
- package/dist/core/p-d19d50b6.entry.js +0 -2
- package/dist/core/p-d19d50b6.entry.js.map +0 -1
- package/dist/core/p-d69f353b.entry.js.map +0 -1
- package/dist/core/p-e735d773.entry.js +0 -2
- package/dist/core/p-e735d773.entry.js.map +0 -1
- package/dist/core/p-e928928a.entry.js +0 -2
- package/dist/core/p-e928928a.entry.js.map +0 -1
- package/dist/core/p-ea61b524.entry.js +0 -2
- package/dist/core/p-ea61b524.entry.js.map +0 -1
- package/dist/core/p-eb1d00a7.entry.js.map +0 -1
- package/dist/core/p-f13195ab.entry.js.map +0 -1
- package/dist/core/p-f861a72a.entry.js +0 -2
- package/dist/core/p-f861a72a.entry.js.map +0 -1
- package/dist/esm/helpers-354dbb8d.js.map +0 -1
- package/dist/esm/ic-card.entry.js.map +0 -1
- package/dist/esm/ic-data-entity.entry.js +0 -25
- package/dist/esm/ic-data-entity.entry.js.map +0 -1
- package/dist/types/components/ic-chip/ic-chip.types.d.ts +0 -1
- package/dist/types/components/ic-data-entity/ic-data-entity.d.ts +0 -20
- /package/dist/collection/components/{ic-card/ic-card.css → ic-card-vertical/ic-card-vertical.css} +0 -0
- /package/dist/core/{p-014342a2.entry.js.map → p-05d32a4f.entry.js.map} +0 -0
- /package/dist/core/{p-1d9fceb1.entry.js.map → p-086a6d4f.entry.js.map} +0 -0
- /package/dist/core/{p-5bba7e31.entry.js.map → p-2a6f01ad.entry.js.map} +0 -0
- /package/dist/core/{p-967d5546.entry.js.map → p-9857f6b0.entry.js.map} +0 -0
- /package/dist/core/{p-3b41756e.entry.js.map → p-f50462df.entry.js.map} +0 -0
@@ -11,22 +11,18 @@ export class TextField {
|
|
11
11
|
constructor() {
|
12
12
|
this.inheritedAttributes = {};
|
13
13
|
this.hostMutationObserver = null;
|
14
|
-
this.
|
15
|
-
this.numChars = value.length;
|
14
|
+
this.getMaxValueExceeded = (value) => {
|
16
15
|
if (this.type === "number") {
|
17
16
|
this.minValueUnattained = value && Number(value) < Number(this.min);
|
18
17
|
this.maxValueExceeded = Number(value) > Number(this.max);
|
19
18
|
}
|
20
|
-
if (this.maxLength > 0) {
|
21
|
-
this.maxLengthExceeded = this.numChars > this.maxLength;
|
22
|
-
}
|
23
19
|
};
|
24
20
|
this.getMaxCharactersReached = (value) => {
|
25
21
|
this.numChars = value.length;
|
26
22
|
this.maxCharactersReached =
|
27
23
|
this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;
|
28
|
-
if (this.
|
29
|
-
this.
|
24
|
+
if (this.maxCharactersWarning && !this.maxCharactersReached) {
|
25
|
+
this.maxCharactersWarning = false;
|
30
26
|
}
|
31
27
|
};
|
32
28
|
this.onInput = (ev) => {
|
@@ -66,9 +62,8 @@ export class TextField {
|
|
66
62
|
};
|
67
63
|
this.numChars = 0;
|
68
64
|
this.maxCharactersReached = false;
|
69
|
-
this.
|
65
|
+
this.maxCharactersWarning = false;
|
70
66
|
this.minCharactersUnattained = false;
|
71
|
-
this.maxLengthExceeded = false;
|
72
67
|
this.maxValueExceeded = false;
|
73
68
|
this.minValueUnattained = false;
|
74
69
|
this.ariaActiveDescendant = undefined;
|
@@ -82,6 +77,7 @@ export class TextField {
|
|
82
77
|
this.disabled = false;
|
83
78
|
this.fullWidth = false;
|
84
79
|
this.helperText = "";
|
80
|
+
this.hideCharCount = false;
|
85
81
|
this.hideLabel = false;
|
86
82
|
this.hiddenInput = true;
|
87
83
|
this.inputId = `ic-text-field-input-${inputIds++}`;
|
@@ -89,7 +85,6 @@ export class TextField {
|
|
89
85
|
this.label = undefined;
|
90
86
|
this.max = undefined;
|
91
87
|
this.maxCharacters = 0;
|
92
|
-
this.maxLength = 0;
|
93
88
|
this.min = undefined;
|
94
89
|
this.minCharacters = 0;
|
95
90
|
this.name = this.inputId;
|
@@ -100,7 +95,6 @@ export class TextField {
|
|
100
95
|
this.role = undefined;
|
101
96
|
this.rows = 1;
|
102
97
|
this.size = "default";
|
103
|
-
this.small = false;
|
104
98
|
this.spellcheck = false;
|
105
99
|
this.truncateValue = undefined;
|
106
100
|
this.type = "text";
|
@@ -116,12 +110,20 @@ export class TextField {
|
|
116
110
|
this.icChange = debounceEvent(this.icChange, this.debounce);
|
117
111
|
}
|
118
112
|
watchValueHandler(newValue) {
|
119
|
-
|
120
|
-
|
113
|
+
let value;
|
114
|
+
if (this.maxCharacters > 0) {
|
115
|
+
value = newValue.substring(0, this.maxCharacters);
|
116
|
+
this.value = value;
|
117
|
+
}
|
118
|
+
else {
|
119
|
+
value = newValue;
|
120
|
+
}
|
121
|
+
if (this.inputEl && this.inputEl.value !== value) {
|
122
|
+
this.inputEl.value = value;
|
121
123
|
}
|
122
|
-
this.
|
123
|
-
this.getMaxCharactersReached(
|
124
|
-
this.icChange.emit({ value
|
124
|
+
this.getMaxValueExceeded(value);
|
125
|
+
this.getMaxCharactersReached(value);
|
126
|
+
this.icChange.emit({ value });
|
125
127
|
}
|
126
128
|
connectedCallback() {
|
127
129
|
this.debounceChanged();
|
@@ -135,11 +137,13 @@ export class TextField {
|
|
135
137
|
if (this.value !== this.initialValue) {
|
136
138
|
this.watchValueHandler(this.value);
|
137
139
|
}
|
138
|
-
|
140
|
+
else if (this.maxCharacters > 0) {
|
141
|
+
this.value = this.value.substring(0, this.maxCharacters);
|
142
|
+
}
|
143
|
+
this.getMaxValueExceeded(this.value);
|
139
144
|
this.getMaxCharactersReached(this.value);
|
140
145
|
this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);
|
141
146
|
if (this.readonly) {
|
142
|
-
this.maxLengthExceeded = false;
|
143
147
|
this.maxValueExceeded = false;
|
144
148
|
this.minValueUnattained = false;
|
145
149
|
}
|
@@ -159,7 +163,7 @@ export class TextField {
|
|
159
163
|
}
|
160
164
|
handleKeyDown(ev) {
|
161
165
|
this.icKeydown.emit({ event: ev });
|
162
|
-
this.
|
166
|
+
this.maxCharactersWarning = this.maxCharactersReached;
|
163
167
|
}
|
164
168
|
/**
|
165
169
|
* Sets focus on the native `input`.
|
@@ -169,41 +173,39 @@ export class TextField {
|
|
169
173
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
170
174
|
}
|
171
175
|
render() {
|
172
|
-
const { inputId, name, label, required, size,
|
176
|
+
const { inputId, name, label, required, size, placeholder, helperText, hideCharCount, rows, resize, disabled, value, min, max, numChars, readonly, maxCharacters, maxCharactersWarning, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, } = this;
|
173
177
|
const disabledMode = readonly ? true : disabled;
|
174
|
-
const currentStatus =
|
175
|
-
maxValueExceeded ||
|
178
|
+
const currentStatus = maxValueExceeded ||
|
176
179
|
minValueUnattained ||
|
177
180
|
minCharactersUnattained ||
|
178
|
-
|
179
|
-
?
|
181
|
+
maxCharactersWarning
|
182
|
+
? maxCharactersWarning
|
180
183
|
? IcInformationStatus.Warning
|
181
184
|
: IcInformationStatus.Error
|
182
185
|
: validationStatus;
|
183
|
-
const currentValidationText =
|
184
|
-
?
|
185
|
-
:
|
186
|
-
? `Maximum
|
187
|
-
:
|
188
|
-
? `
|
189
|
-
:
|
190
|
-
? `Minimum
|
191
|
-
:
|
192
|
-
|
193
|
-
|
194
|
-
const maxNumChars = readonly ? 0 : maxLength;
|
195
|
-
const messageAriaLive = maxLengthExceeded ||
|
196
|
-
maxCharactersError ||
|
186
|
+
const currentValidationText = maxCharactersWarning
|
187
|
+
? `Maximum input is ${maxCharacters} characters`
|
188
|
+
: maxValueExceeded
|
189
|
+
? `Maximum value of ${max} exceeded`
|
190
|
+
: minValueUnattained
|
191
|
+
? `Minimum value of ${min} not met`
|
192
|
+
: minCharactersUnattained
|
193
|
+
? `Minimum input is ${minCharacters} characters`
|
194
|
+
: validationText;
|
195
|
+
const maxNumChars = readonly ? 0 : maxCharacters;
|
196
|
+
const messageAriaLive = maxCharactersWarning ||
|
197
197
|
maxValueExceeded ||
|
198
198
|
minValueUnattained ||
|
199
|
-
|
199
|
+
currentStatus === IcInformationStatus.Error
|
200
200
|
? "assertive"
|
201
201
|
: "polite";
|
202
202
|
const showStatusText = this.hasStatus(currentStatus) &&
|
203
203
|
!(currentStatus == IcInformationStatus.Success && validationInline) &&
|
204
204
|
!validationInlineInternal;
|
205
205
|
const multiline = rows > 1;
|
206
|
-
const
|
206
|
+
const charsRemaining = maxNumChars - numChars;
|
207
|
+
const hiddenRemainingCharCountDesc = `${charsRemaining} character${charsRemaining === 1 ? "" : "s"} remaining.`;
|
208
|
+
const hiddenCharCountDescId = maxCharacters > 0 ? `${inputId}-char-count-desc` : "";
|
207
209
|
const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(inputId, helperText !== "", showStatusText)}`.trim();
|
208
210
|
const disabledText = disabledMode && !readonly;
|
209
211
|
const showLeftIcon = !!this.el.querySelector(`[slot="icon"]`) && !disabledText;
|
@@ -211,7 +213,7 @@ export class TextField {
|
|
211
213
|
if (hiddenInput) {
|
212
214
|
renderHiddenInput(true, this.el, name, value, disabledMode);
|
213
215
|
}
|
214
|
-
return (h(Host, { class: { ["
|
216
|
+
return (h(Host, { class: { ["ic-text-field-full-width"]: fullWidth } }, h("ic-input-container", { readonly: readonly, disabled: disabledMode }, !this.hideLabel && (h("ic-input-label", { for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly })), h("ic-input-component-container", { size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (h("span", { class: {
|
215
217
|
["readonly"]: readonly,
|
216
218
|
["has-value"]: value.length > 0,
|
217
219
|
}, slot: "left-icon" }, h("slot", { name: "icon" }))), !multiline ? (h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: this.type, min: min, max: max, value: value, class: {
|
@@ -226,7 +228,7 @@ export class TextField {
|
|
226
228
|
!isEmptyString(validationText) ||
|
227
229
|
maxNumChars > 0 ||
|
228
230
|
maxValueExceeded ||
|
229
|
-
|
231
|
+
maxCharactersWarning ||
|
230
232
|
minCharactersUnattained ||
|
231
233
|
minValueUnattained) &&
|
232
234
|
!validationInlineInternal && (h("ic-input-validation", { status: this.hasStatus(currentStatus) === false ||
|
@@ -234,11 +236,9 @@ export class TextField {
|
|
234
236
|
validationInline) ||
|
235
237
|
validationInlineInternal
|
236
238
|
? ""
|
237
|
-
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (h("div", { slot: "validation-message-adornment" }, h("ic-typography", { variant: "caption", class: {
|
238
|
-
["
|
239
|
-
|
240
|
-
["disabled"]: disabledText,
|
241
|
-
} }, h("span", { "aria-live": "polite", id: `${inputId}-charcount`, class: "charcount" }, numChars, "/", maxNumChars), h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters.")))))))));
|
239
|
+
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (h("div", { slot: "validation-message-adornment" }, !hideCharCount && (h("ic-typography", { variant: "caption", class: {
|
240
|
+
["char-count-text"]: true,
|
241
|
+
} }, h("span", { class: "char-count" }, numChars, "/", maxNumChars))), h("span", { class: "remaining-char-count-desc", "aria-live": "polite" }, hiddenRemainingCharCountDesc), h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters."))))))));
|
242
242
|
}
|
243
243
|
static get is() { return "ic-text-field"; }
|
244
244
|
static get encapsulation() { return "shadow"; }
|
@@ -479,6 +479,24 @@ export class TextField {
|
|
479
479
|
"reflect": false,
|
480
480
|
"defaultValue": "\"\""
|
481
481
|
},
|
482
|
+
"hideCharCount": {
|
483
|
+
"type": "boolean",
|
484
|
+
"mutable": false,
|
485
|
+
"complexType": {
|
486
|
+
"original": "boolean",
|
487
|
+
"resolved": "boolean",
|
488
|
+
"references": {}
|
489
|
+
},
|
490
|
+
"required": false,
|
491
|
+
"optional": false,
|
492
|
+
"docs": {
|
493
|
+
"tags": [],
|
494
|
+
"text": "If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden."
|
495
|
+
},
|
496
|
+
"attribute": "hide-char-count",
|
497
|
+
"reflect": false,
|
498
|
+
"defaultValue": "false"
|
499
|
+
},
|
482
500
|
"hideLabel": {
|
483
501
|
"type": "boolean",
|
484
502
|
"mutable": false,
|
@@ -607,30 +625,12 @@ export class TextField {
|
|
607
625
|
"optional": false,
|
608
626
|
"docs": {
|
609
627
|
"tags": [],
|
610
|
-
"text": "The
|
628
|
+
"text": "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)"
|
611
629
|
},
|
612
630
|
"attribute": "max-characters",
|
613
631
|
"reflect": false,
|
614
632
|
"defaultValue": "0"
|
615
633
|
},
|
616
|
-
"maxLength": {
|
617
|
-
"type": "number",
|
618
|
-
"mutable": false,
|
619
|
-
"complexType": {
|
620
|
-
"original": "number",
|
621
|
-
"resolved": "number",
|
622
|
-
"references": {}
|
623
|
-
},
|
624
|
-
"required": false,
|
625
|
-
"optional": false,
|
626
|
-
"docs": {
|
627
|
-
"tags": [],
|
628
|
-
"text": "The count of characters in the field. Will display a warning if the bound is reached."
|
629
|
-
},
|
630
|
-
"attribute": "max-length",
|
631
|
-
"reflect": false,
|
632
|
-
"defaultValue": "0"
|
633
|
-
},
|
634
634
|
"min": {
|
635
635
|
"type": "any",
|
636
636
|
"mutable": false,
|
@@ -819,27 +819,6 @@ export class TextField {
|
|
819
819
|
"reflect": false,
|
820
820
|
"defaultValue": "\"default\""
|
821
821
|
},
|
822
|
-
"small": {
|
823
|
-
"type": "boolean",
|
824
|
-
"mutable": false,
|
825
|
-
"complexType": {
|
826
|
-
"original": "boolean",
|
827
|
-
"resolved": "boolean",
|
828
|
-
"references": {}
|
829
|
-
},
|
830
|
-
"required": false,
|
831
|
-
"optional": true,
|
832
|
-
"docs": {
|
833
|
-
"tags": [{
|
834
|
-
"name": "deprecated",
|
835
|
-
"text": "This prop should not be used anymore. Set prop `size` to \"small\" instead."
|
836
|
-
}],
|
837
|
-
"text": ""
|
838
|
-
},
|
839
|
-
"attribute": "small",
|
840
|
-
"reflect": false,
|
841
|
-
"defaultValue": "false"
|
842
|
-
},
|
843
822
|
"spellcheck": {
|
844
823
|
"type": "boolean",
|
845
824
|
"mutable": false,
|
@@ -1025,9 +1004,8 @@ export class TextField {
|
|
1025
1004
|
return {
|
1026
1005
|
"numChars": {},
|
1027
1006
|
"maxCharactersReached": {},
|
1028
|
-
"
|
1007
|
+
"maxCharactersWarning": {},
|
1029
1008
|
"minCharactersUnattained": {},
|
1030
|
-
"maxLengthExceeded": {},
|
1031
1009
|
"maxValueExceeded": {},
|
1032
1010
|
"minValueUnattained": {},
|
1033
1011
|
"initialValue": {}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-text-field.js","sourceRoot":"","sources":["../../../src/components/ic-text-field/ic-text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,CAAC,EACD,WAAW,GACZ,MAAM,eA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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} 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} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\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;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersError: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxLengthExceeded: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: 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 = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\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: boolean = false;\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: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\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: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `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 = undefined;\n\n /**\n * The maximum number of characters that can be entered in the field. Will display an error if too many characters are entered.\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached.\n */\n @Prop() maxLength: number = 0;\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 = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\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?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\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: number = 0;\n\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: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n this.getMaxLengthExceeded(newValue);\n\n this.getMaxCharactersReached(newValue);\n\n this.icChange.emit({ value: newValue });\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<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n }\n\n this.getMaxLengthExceeded(this.value);\n\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\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\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersError = this.maxCharactersReached;\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 getMaxLengthExceeded = (value: string) => {\n this.numChars = value.length;\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 if (this.maxLength > 0) {\n this.maxLengthExceeded = this.numChars > this.maxLength;\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersError && !this.maxCharactersReached) {\n this.maxCharactersError = 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 value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\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 (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\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 small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n maxCharacters,\n maxCharactersError,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const currentStatus =\n maxLengthExceeded ||\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersError\n ? maxCharactersError\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : maxCharactersError\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n const messageAriaLive =\n maxLengthExceeded ||\n maxCharactersError ||\n maxValueExceeded ||\n minValueUnattained ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n const hiddenCharCountDescId =\n maxLength > 0 ? `${inputId}-charcount-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\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 if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={small ? \"small\" : 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\"]: readonly,\n [\"has-value\"]: value.length > 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={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: 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={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.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 ? placeholder : \"\"}\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 autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersError ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\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 {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"error\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-text-field.js","sourceRoot":"","sources":["../../../src/components/ic-text-field/ic-text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,CAAC,EACD,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,GAMpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,gCAAgC,EAChC,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAE3D;;GAEG;AAMH,MAAM,OAAO,SAAS;;QACZ,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAA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n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\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} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\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;\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\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 = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\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: boolean = false;\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: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount: boolean = 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: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `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 = undefined;\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: number = 0;\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 = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\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?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\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: number = 0;\n\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: string = \"\";\n @State() initialValue = this.value;\n\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 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<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, 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(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\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\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersWarning = this.maxCharactersReached;\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 getMaxValueExceeded = (value: string) => {\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 = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\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 value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\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 (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\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 maxCharactersWarning,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : 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 ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const charsRemaining = maxNumChars - numChars;\n const hiddenRemainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\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 if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"ic-text-field-full-width\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\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\"]: readonly,\n [\"has-value\"]: value.length > 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={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: 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={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.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 ? placeholder : \"\"}\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 autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersWarning ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\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 {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography\n variant=\"caption\"\n class={{\n [\"char-count-text\"]: true,\n }}\n >\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span class=\"remaining-char-count-desc\" aria-live=\"polite\">\n {hiddenRemainingCharCountDesc}\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 )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"]}
|
@@ -79,12 +79,26 @@ describe("ic-text-field", () => {
|
|
79
79
|
});
|
80
80
|
expect(page.root).toMatchSnapshot("renders-readonly");
|
81
81
|
});
|
82
|
-
it("should render with max
|
82
|
+
it("should render with max characters", async () => {
|
83
83
|
const page = await newSpecPage({
|
84
84
|
components: [TextField],
|
85
|
-
html: `<ic-text-field label="Test label" value="
|
85
|
+
html: `<ic-text-field label="Test label" value="Test value" max-characters=25></ic-text-field>`,
|
86
86
|
});
|
87
|
-
expect(page.root).toMatchSnapshot("renders-with-
|
87
|
+
expect(page.root).toMatchSnapshot("renders-with-max-characters");
|
88
|
+
});
|
89
|
+
it("should render with max characters and hidden character count", async () => {
|
90
|
+
const page = await newSpecPage({
|
91
|
+
components: [TextField],
|
92
|
+
html: `<ic-text-field label="Test label" value="Test value" max-characters=25 hide-char-count></ic-text-field>`,
|
93
|
+
});
|
94
|
+
expect(page.root).toMatchSnapshot("renders-with-hidden-char-count");
|
95
|
+
});
|
96
|
+
it("should render with max characters and a value set which exceeds the max number of characters", async () => {
|
97
|
+
const page = await newSpecPage({
|
98
|
+
components: [TextField],
|
99
|
+
html: `<ic-text-field label="Test label" value="A long value which exceeds the max characters" max-characters=25></ic-text-field>`,
|
100
|
+
});
|
101
|
+
expect(page.root).toMatchSnapshot("renders-with-max-characters-long-value");
|
88
102
|
});
|
89
103
|
it("should render with name & full width", async () => {
|
90
104
|
const page = await newSpecPage({
|
@@ -165,14 +179,6 @@ describe("ic-text-field", () => {
|
|
165
179
|
const slot = page.root.shadowRoot.querySelector(`[slot="icon"]`);
|
166
180
|
expect(slot).toBeNull();
|
167
181
|
});
|
168
|
-
it("should not exceed max length if new value < max length", async () => {
|
169
|
-
const page = await newSpecPage({
|
170
|
-
components: [TextField],
|
171
|
-
html: `<ic-text-field label="Test label" rows=1 max-length=5></ic-text-field>`,
|
172
|
-
});
|
173
|
-
page.rootInstance.watchValueHandler("test");
|
174
|
-
expect(page.rootInstance.maxLengthExceeded).toBe(false);
|
175
|
-
});
|
176
182
|
it("should test keydown", async () => {
|
177
183
|
const page = await newSpecPage({
|
178
184
|
components: [TextField],
|
@@ -232,6 +238,15 @@ it("should render with min/max and min validation", async () => {
|
|
232
238
|
});
|
233
239
|
expect(page.root).toMatchSnapshot("renders-with-min");
|
234
240
|
});
|
241
|
+
it("should test setting value cannot exceed maxCharacters", async () => {
|
242
|
+
const page = await newSpecPage({
|
243
|
+
components: [TextField],
|
244
|
+
html: `<ic-text-field label="Test label" rows=1 max-characters=5 value="Test value"></ic-text-field>`,
|
245
|
+
});
|
246
|
+
expect(page.rootInstance.value).toBe("Test ");
|
247
|
+
page.rootInstance.watchValueHandler("Another test value");
|
248
|
+
expect(page.rootInstance.value).toBe("Anoth");
|
249
|
+
});
|
235
250
|
it("should test maxCharacters method", async () => {
|
236
251
|
const page = await newSpecPage({
|
237
252
|
components: [TextField],
|