@ukic/web-components 3.0.0-alpha.4 → 3.0.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-69219f14.js → helpers-dd569d97.js} +33 -28
- package/dist/cjs/helpers-dd569d97.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +4 -4
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +3 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +18 -17
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +20 -10
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -4
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +3 -3
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +6 -7
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +4 -5
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +7 -8
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +6 -7
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +14 -7
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +22 -25
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +21 -25
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +10 -12
- 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 +16 -9
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +11 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +7 -6
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +31 -6
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -3
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +5 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +9 -23
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +9 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +10 -6
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +18 -14
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +14 -10
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -3
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +5 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +37 -19
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +20 -20
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +31 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -6
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +13 -7
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.js +10 -1
- package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -0
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +7 -1
- package/dist/collection/components/ic-alert/ic-alert.js +3 -3
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +1 -1
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +5 -2
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +31 -4
- 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 +14 -0
- 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 +3 -3
- package/dist/collection/components/ic-badge/ic-badge.js +2 -2
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +4 -7
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +44 -19
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +693 -416
- package/dist/collection/components/ic-button/ic-button.js +62 -43
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +9 -9
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +18 -18
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +27 -14
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js +10 -0
- package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -0
- 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 +3 -0
- 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.js +27 -2
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +3 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.css +1 -1
- package/dist/collection/components/ic-divider/ic-divider.js +8 -8
- package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +4 -4
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.css +2 -2
- package/dist/collection/components/ic-footer/ic-footer.js +9 -10
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +2 -2
- 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.js +6 -7
- package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js +1 -1
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +4 -0
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +7 -8
- 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 +1 -1
- 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 +9 -9
- package/dist/collection/components/ic-hero/ic-hero.js +8 -9
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +2 -2
- 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 +0 -4
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +64 -9
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +43 -0
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +38 -17
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +22 -40
- 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 -0
- 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 +6 -19
- package/dist/collection/components/ic-input-label/ic-input-label.js +11 -33
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +9 -4
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +7 -7
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.css +0 -24
- package/dist/collection/components/ic-link/ic-link.js +14 -16
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +3 -3
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.css +31 -19
- package/dist/collection/components/ic-menu/ic-menu.js +4 -4
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +57 -15
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +14 -1
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +14 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +37 -10
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +3 -3
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +14 -9
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +32 -7
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js +3 -3
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +28 -26
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +56 -7
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +3 -3
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +9 -6
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +27 -2
- 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 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js +27 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.js +10 -22
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +10 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +6 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
- package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js +3 -0
- package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +22 -9
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +8 -0
- 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.spec.js +6 -0
- 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.js +6 -0
- 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 +3 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -5
- 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.spec.js +4 -1
- 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 +49 -36
- package/dist/collection/components/ic-select/ic-select.js +44 -14
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +10 -0
- 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 +48 -31
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +16 -12
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.types.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +6 -6
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +5 -5
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +15 -32
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.css +3 -0
- package/dist/collection/components/ic-switch/ic-switch.js +6 -0
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +3 -0
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +6 -0
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +16 -0
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +8 -0
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -17
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.css +60 -9
- package/dist/collection/components/ic-text-field/ic-text-field.js +64 -25
- 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 -12
- 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 +2 -2
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.js +31 -31
- package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js +7 -7
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js.map +1 -1
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js +11 -11
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +189 -54
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +62 -32
- 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 +10 -0
- 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 +23 -16
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +79 -27
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +121 -0
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +41 -17
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +39 -9
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +3 -3
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.css +4 -6
- package/dist/collection/utils/helpers.js +24 -19
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +6 -6
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +30 -25
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +4 -4
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +9 -5
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +3 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +43 -19
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +21 -19
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +25 -13
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -0
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +11 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +4 -4
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +7 -8
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +5 -6
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +8 -9
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +7 -8
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +16 -7
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +21 -23
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +12 -17
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +8 -8
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +13 -15
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +20 -11
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +4 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +13 -9
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +9 -7
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +33 -7
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +6 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +5 -2
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +6 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination.js +9 -22
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +8 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +11 -6
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +20 -14
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +15 -11
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-status-tag.js +5 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-switch.js +9 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -18
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab.js +5 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +40 -20
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +22 -22
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +38 -6
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +20 -8
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +15 -8
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +899 -123
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-2ef46ead.entry.js → p-07cd8a50.entry.js} +2 -2
- package/dist/core/p-07cd8a50.entry.js.map +1 -0
- package/dist/core/p-0821fc5b.entry.js +2 -0
- package/dist/core/p-0821fc5b.entry.js.map +1 -0
- package/dist/core/p-0b8c3770.entry.js +2 -0
- package/dist/core/p-0b8c3770.entry.js.map +1 -0
- package/dist/core/p-0d505c1f.entry.js +2 -0
- package/dist/core/p-0d505c1f.entry.js.map +1 -0
- package/dist/core/p-1234f7a5.entry.js +2 -0
- package/dist/core/p-1234f7a5.entry.js.map +1 -0
- package/dist/core/{p-c9cf932c.entry.js → p-193582d4.entry.js} +2 -2
- package/dist/core/p-193582d4.entry.js.map +1 -0
- package/dist/core/p-225384ab.entry.js +2 -0
- package/dist/core/p-225384ab.entry.js.map +1 -0
- package/dist/core/{p-d93bac01.entry.js → p-3420a999.entry.js} +2 -2
- package/dist/core/p-3420a999.entry.js.map +1 -0
- package/dist/core/{p-d4a83e25.entry.js → p-3994d86d.entry.js} +2 -2
- package/dist/core/p-3994d86d.entry.js.map +1 -0
- package/dist/core/p-3bfc4a52.entry.js +2 -0
- package/dist/core/p-3bfc4a52.entry.js.map +1 -0
- package/dist/core/p-3cfef37a.entry.js +2 -0
- package/dist/core/p-3cfef37a.entry.js.map +1 -0
- package/dist/core/{p-95f603dd.entry.js → p-406e58af.entry.js} +2 -2
- package/dist/core/p-406e58af.entry.js.map +1 -0
- package/dist/core/p-48e98730.js +2 -0
- package/dist/core/p-48e98730.js.map +1 -0
- package/dist/core/{p-5cd016e1.entry.js → p-4af52174.entry.js} +2 -2
- package/dist/core/p-4af52174.entry.js.map +1 -0
- package/dist/core/{p-f5b2b26d.entry.js → p-4dc48606.entry.js} +2 -2
- package/dist/core/{p-7bff1e96.entry.js → p-4f72a02a.entry.js} +2 -2
- package/dist/core/p-4f72a02a.entry.js.map +1 -0
- package/dist/core/p-518ea375.entry.js +2 -0
- package/dist/core/p-518ea375.entry.js.map +1 -0
- package/dist/core/p-520c6089.entry.js +2 -0
- package/dist/core/p-520c6089.entry.js.map +1 -0
- package/dist/core/p-580b1593.entry.js +2 -0
- package/dist/core/p-580b1593.entry.js.map +1 -0
- package/dist/core/p-59800237.entry.js +2 -0
- package/dist/core/p-59800237.entry.js.map +1 -0
- package/dist/core/{p-acbd15ab.entry.js → p-5ba8e679.entry.js} +2 -2
- package/dist/core/p-5ba8e679.entry.js.map +1 -0
- package/dist/core/p-5d417fc0.entry.js +2 -0
- package/dist/core/p-5d417fc0.entry.js.map +1 -0
- package/dist/core/{p-922984cb.entry.js → p-5d653608.entry.js} +2 -2
- package/dist/core/p-61510f00.entry.js +2 -0
- package/dist/core/p-61510f00.entry.js.map +1 -0
- package/dist/core/p-6159b077.entry.js +2 -0
- package/dist/core/p-6159b077.entry.js.map +1 -0
- package/dist/core/p-6859019c.entry.js +2 -0
- package/dist/core/p-6859019c.entry.js.map +1 -0
- package/dist/core/p-705db6a5.entry.js +2 -0
- package/dist/core/p-705db6a5.entry.js.map +1 -0
- package/dist/core/{p-7b35de65.entry.js → p-7124b387.entry.js} +2 -2
- package/dist/core/p-810744b5.entry.js +2 -0
- package/dist/core/p-810744b5.entry.js.map +1 -0
- package/dist/core/p-810f5a2d.entry.js +2 -0
- package/dist/core/p-810f5a2d.entry.js.map +1 -0
- package/dist/core/p-8a2670c1.entry.js +2 -0
- package/dist/core/p-8a2670c1.entry.js.map +1 -0
- package/dist/core/{p-29767574.entry.js → p-91c1327d.entry.js} +2 -2
- package/dist/core/p-98dbbb34.entry.js +2 -0
- package/dist/core/p-98dbbb34.entry.js.map +1 -0
- package/dist/core/p-9c1d4f72.entry.js +2 -0
- package/dist/core/p-9c1d4f72.entry.js.map +1 -0
- package/dist/core/{p-428f95f8.entry.js → p-a23c515d.entry.js} +2 -2
- package/dist/core/p-a23c515d.entry.js.map +1 -0
- package/dist/core/p-a24bcf5f.entry.js +2 -0
- package/dist/core/p-a24bcf5f.entry.js.map +1 -0
- package/dist/core/p-aefebee9.entry.js +2 -0
- package/dist/core/p-aefebee9.entry.js.map +1 -0
- package/dist/core/{p-806a0fab.entry.js → p-b27dfa1b.entry.js} +2 -2
- package/dist/core/{p-690c5e80.entry.js → p-b2a41070.entry.js} +2 -2
- package/dist/core/{p-ef78bebc.entry.js → p-b51e378c.entry.js} +2 -2
- package/dist/core/p-b51e378c.entry.js.map +1 -0
- package/dist/core/{p-a9341313.entry.js → p-b5439baa.entry.js} +2 -2
- package/dist/core/p-b9aa801f.entry.js +2 -0
- package/dist/core/p-b9aa801f.entry.js.map +1 -0
- package/dist/core/{p-4a3b1f06.entry.js → p-bc7b8a1e.entry.js} +2 -2
- package/dist/core/p-bc7b8a1e.entry.js.map +1 -0
- package/dist/core/{p-cedc375e.entry.js → p-c2b359d9.entry.js} +2 -2
- package/dist/core/p-c2b359d9.entry.js.map +1 -0
- package/dist/core/{p-ee6dd94c.entry.js → p-c67f7603.entry.js} +2 -2
- package/dist/core/p-c6e91e13.entry.js +2 -0
- package/dist/core/p-c6e91e13.entry.js.map +1 -0
- package/dist/core/p-c83e933c.entry.js +2 -0
- package/dist/core/p-c83e933c.entry.js.map +1 -0
- package/dist/core/p-ca27ab19.entry.js +2 -0
- package/dist/core/p-ca27ab19.entry.js.map +1 -0
- package/dist/core/p-cfe32b37.entry.js +2 -0
- package/dist/core/p-cfe32b37.entry.js.map +1 -0
- package/dist/core/p-d2909711.entry.js +2 -0
- package/dist/core/p-d2909711.entry.js.map +1 -0
- package/dist/core/p-da85eaf6.entry.js +2 -0
- package/dist/core/p-da85eaf6.entry.js.map +1 -0
- package/dist/core/p-dcb2073d.entry.js +2 -0
- package/dist/core/p-dcb2073d.entry.js.map +1 -0
- package/dist/core/{p-705eb610.entry.js → p-ded2dbed.entry.js} +2 -2
- package/dist/core/p-ded2dbed.entry.js.map +1 -0
- package/dist/core/p-f42c0469.entry.js +2 -0
- package/dist/core/p-f42c0469.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-e8797e8d.js → helpers-e594bfc6.js} +31 -26
- package/dist/esm/helpers-e594bfc6.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +8 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +4 -4
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +9 -6
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +3 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +18 -17
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +20 -10
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -4
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +3 -3
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +6 -7
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +4 -5
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +7 -8
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +6 -7
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +14 -7
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +22 -25
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +21 -25
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +10 -12
- 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 +16 -9
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +11 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +7 -6
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +31 -6
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -3
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +5 -1
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +9 -23
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +6 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +9 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +10 -6
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +18 -14
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +14 -10
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +5 -4
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +7 -3
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -19
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +5 -2
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +37 -19
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +20 -20
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +31 -4
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +15 -6
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +13 -7
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-accordion/ic-accordion.d.ts +2 -0
- package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +5 -0
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +1 -0
- package/dist/types/components/ic-button/ic-button.d.ts +10 -6
- package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +4 -3
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
- package/dist/types/components/ic-chip/ic-chip.d.ts +5 -0
- package/dist/types/components/ic-divider/ic-divider.d.ts +4 -4
- package/dist/types/components/ic-footer/ic-footer.d.ts +3 -3
- package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +3 -3
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +3 -3
- package/dist/types/components/ic-hero/ic-hero.d.ts +3 -3
- package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +8 -2
- package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -4
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +0 -4
- package/dist/types/components/ic-link/ic-link.d.ts +2 -2
- package/dist/types/components/ic-menu/ic-menu.d.ts +1 -1
- package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +11 -4
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +7 -3
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +7 -3
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +9 -3
- package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +5 -0
- package/dist/types/components/ic-page-header/ic-page-header.d.ts +5 -1
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +1 -4
- package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +1 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -6
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -0
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -0
- package/dist/types/components/ic-select/ic-select.d.ts +7 -2
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -3
- package/dist/types/components/ic-side-navigation/ic-side-navigation.types.d.ts +2 -2
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
- package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
- package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
- package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +0 -4
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +10 -3
- package/dist/types/components/ic-theme/ic-theme.d.ts +8 -8
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +10 -5
- package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +12 -5
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +7 -3
- package/dist/types/components.d.ts +180 -68
- package/dist/types/utils/helpers.d.ts +12 -8
- package/dist/types/utils/types.d.ts +5 -5
- package/hydrate/index.js +536 -362
- package/package.json +4 -2
- package/vscode-data.json +211 -76
- package/dist/cjs/helpers-69219f14.js.map +0 -1
- package/dist/core/p-13d5875c.entry.js +0 -2
- package/dist/core/p-13d5875c.entry.js.map +0 -1
- package/dist/core/p-19872973.entry.js +0 -2
- package/dist/core/p-19872973.entry.js.map +0 -1
- package/dist/core/p-2140431c.entry.js +0 -2
- package/dist/core/p-2140431c.entry.js.map +0 -1
- package/dist/core/p-2e909738.entry.js +0 -2
- package/dist/core/p-2e909738.entry.js.map +0 -1
- package/dist/core/p-2eae9b27.entry.js +0 -2
- package/dist/core/p-2eae9b27.entry.js.map +0 -1
- package/dist/core/p-2ef46ead.entry.js.map +0 -1
- package/dist/core/p-37dea10d.entry.js +0 -2
- package/dist/core/p-37dea10d.entry.js.map +0 -1
- package/dist/core/p-3d9726a3.entry.js +0 -2
- package/dist/core/p-3d9726a3.entry.js.map +0 -1
- package/dist/core/p-428f95f8.entry.js.map +0 -1
- package/dist/core/p-4973c563.entry.js +0 -2
- package/dist/core/p-4973c563.entry.js.map +0 -1
- package/dist/core/p-4a3b1f06.entry.js.map +0 -1
- package/dist/core/p-5cd016e1.entry.js.map +0 -1
- package/dist/core/p-5ef8e106.entry.js +0 -2
- package/dist/core/p-5ef8e106.entry.js.map +0 -1
- package/dist/core/p-5f4a6555.entry.js +0 -2
- package/dist/core/p-5f4a6555.entry.js.map +0 -1
- package/dist/core/p-605c0c92.entry.js +0 -2
- package/dist/core/p-605c0c92.entry.js.map +0 -1
- package/dist/core/p-655a9e0f.entry.js +0 -2
- package/dist/core/p-655a9e0f.entry.js.map +0 -1
- package/dist/core/p-65a16de9.entry.js +0 -2
- package/dist/core/p-65a16de9.entry.js.map +0 -1
- package/dist/core/p-705eb610.entry.js.map +0 -1
- package/dist/core/p-76263187.entry.js +0 -2
- package/dist/core/p-76263187.entry.js.map +0 -1
- package/dist/core/p-78c1f1cc.entry.js +0 -2
- package/dist/core/p-78c1f1cc.entry.js.map +0 -1
- package/dist/core/p-79d0be03.entry.js +0 -2
- package/dist/core/p-79d0be03.entry.js.map +0 -1
- package/dist/core/p-7bff1e96.entry.js.map +0 -1
- package/dist/core/p-85173458.entry.js +0 -2
- package/dist/core/p-85173458.entry.js.map +0 -1
- package/dist/core/p-95f603dd.entry.js.map +0 -1
- package/dist/core/p-979c2792.entry.js +0 -2
- package/dist/core/p-979c2792.entry.js.map +0 -1
- package/dist/core/p-97fb2bdf.entry.js +0 -2
- package/dist/core/p-97fb2bdf.entry.js.map +0 -1
- package/dist/core/p-9ec7f96c.entry.js +0 -2
- package/dist/core/p-9ec7f96c.entry.js.map +0 -1
- package/dist/core/p-9fa93dfe.entry.js +0 -2
- package/dist/core/p-9fa93dfe.entry.js.map +0 -1
- package/dist/core/p-acbd15ab.entry.js.map +0 -1
- package/dist/core/p-ae0775aa.entry.js +0 -2
- package/dist/core/p-ae0775aa.entry.js.map +0 -1
- package/dist/core/p-b7eb8ef9.js +0 -2
- package/dist/core/p-b7eb8ef9.js.map +0 -1
- package/dist/core/p-ba6ecc15.entry.js +0 -2
- package/dist/core/p-ba6ecc15.entry.js.map +0 -1
- package/dist/core/p-bbeb03ef.entry.js +0 -2
- package/dist/core/p-bbeb03ef.entry.js.map +0 -1
- package/dist/core/p-c0fc3d02.entry.js +0 -2
- package/dist/core/p-c0fc3d02.entry.js.map +0 -1
- package/dist/core/p-c396bd4d.entry.js +0 -2
- package/dist/core/p-c396bd4d.entry.js.map +0 -1
- package/dist/core/p-c9cf932c.entry.js.map +0 -1
- package/dist/core/p-cedc375e.entry.js.map +0 -1
- package/dist/core/p-d4a83e25.entry.js.map +0 -1
- package/dist/core/p-d93bac01.entry.js.map +0 -1
- package/dist/core/p-eb3b4935.entry.js +0 -2
- package/dist/core/p-eb3b4935.entry.js.map +0 -1
- package/dist/core/p-ebafab37.entry.js +0 -2
- package/dist/core/p-ebafab37.entry.js.map +0 -1
- package/dist/core/p-ef78bebc.entry.js.map +0 -1
- package/dist/core/p-f0ae2b99.entry.js +0 -2
- package/dist/core/p-f0ae2b99.entry.js.map +0 -1
- package/dist/core/p-f24984c5.entry.js +0 -2
- package/dist/core/p-f24984c5.entry.js.map +0 -1
- package/dist/core/p-f71c00ce.entry.js +0 -2
- package/dist/core/p-f71c00ce.entry.js.map +0 -1
- package/dist/core/p-fdd0b732.entry.js +0 -2
- package/dist/core/p-fdd0b732.entry.js.map +0 -1
- package/dist/esm/helpers-e8797e8d.js.map +0 -1
- /package/dist/core/{p-f5b2b26d.entry.js.map → p-4dc48606.entry.js.map} +0 -0
- /package/dist/core/{p-922984cb.entry.js.map → p-5d653608.entry.js.map} +0 -0
- /package/dist/core/{p-7b35de65.entry.js.map → p-7124b387.entry.js.map} +0 -0
- /package/dist/core/{p-29767574.entry.js.map → p-91c1327d.entry.js.map} +0 -0
- /package/dist/core/{p-806a0fab.entry.js.map → p-b27dfa1b.entry.js.map} +0 -0
- /package/dist/core/{p-690c5e80.entry.js.map → p-b2a41070.entry.js.map} +0 -0
- /package/dist/core/{p-a9341313.entry.js.map → p-b5439baa.entry.js.map} +0 -0
- /package/dist/core/{p-ee6dd94c.entry.js.map → p-c67f7603.entry.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-tab-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,
|
1
|
+
{"file":"ic-tab-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,ujBAAujB;;MCYhkB,QAAQ;;;sBAIyB,KAAK;;0BAQlB,KAAK;qBAGN,SAAS;;IAEvC,gBAAgB;QACdA,wCAAgC,CAC9B,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,CACZ,CAAC;KACH;IAED,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE1C,QACEC,QAACC,UAAI,IACH,IAAI,EAAC,SAAS,gBACF,KAAK,EACjB,KAAK,EAAE;gBACL,CAAC,qBAAqB,GAAG,IAAI,CAAC,MAAM;gBACpC,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,yBAAyB,GAAG,UAAU;aACxC,IAEDD,kCACE,KAAK,EAAE,IAAI,CAAC,KAAK,mBACH,UAAU,EACxB,UAAU,EAAE,IAAI,CAAC,UAAU,IAE3BA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA,qBAAa,CACT,CACe,CAClB,EACP;KACH;;;;;;;","names":["onComponentRequiredPropUndefined","h","Host"],"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"sourcesContent":[":host {\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-space-1px) solid var(--ic-tab-bottom-border);\n}\n\n:host(.ic-tab-group-monochrome) {\n border-bottom: var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome);\n}\n\n:host(.ic-tab-group-inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n:host ic-horizontal-scroll {\n --splitter-color: var(--ic-tab-divider);\n}\n\n:host(.ic-tab-group-monochrome) ic-horizontal-scroll {\n --splitter-color: var(--ic-tab-divider-monochrome);\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TabGroup {\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab Group\"\n );\n }\n\n render() {\n const { theme, label, monochrome } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"ic-tab-group-inline\"]: this.inline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-group-monochrome\"]: monochrome,\n }}\n >\n <ic-horizontal-scroll\n theme={this.theme}\n focus-trigger=\"tabFocus\"\n monochrome={this.monochrome}\n >\n <div class=\"tabs-container\">\n <slot></slot>\n </div>\n </ic-horizontal-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f982899d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-dd569d97.js');
|
7
7
|
|
8
8
|
const icTabPanelCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host:not[hidden]{display:block}:host{color:var(--ic-color-text-primary)}";
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f982899d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-dd569d97.js');
|
7
7
|
|
8
8
|
const icTabCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--indicator-initial-color:rgba(23 89 188 / 0%);--focus-indicator:var(--ic-border-focus);display:flex;align-items:center;border-radius:0;color:var(--ic-tab-label);--ic-typography-color:var(--ic-tab-label);height:2.5rem;padding:0 var(--ic-space-md);cursor:pointer;position:relative;border-bottom:var(--ic-space-xxs) solid var(--indicator-initial-color);gap:var(--ic-space-xs);transition:all var(--ic-easing-transition-fast)}::slotted([slot=\"icon\"]){fill:var(--ic-tab-icon)}:host(:focus){box-shadow:var(--focus-indicator);border-radius:var(--ic-border-radius)}:host(:focus-visible){outline:var(--ic-hc-focus-outline)}:host(:hover){background-color:var(--ic-tab-item-hover)}:host(:active){background-color:var(--ic-tab-item-pressed)}:host(.ic-tab-selected){border-bottom:var(--ic-space-xxs) solid var(--ic-tab-item)}:host(.ic-tab-disabled){pointer-events:none;color:var(--ic-architectural-300)}:host(.ic-tab-disabled) ic-typography{color:var(--ic-architectural-300);--ic-typography-color:var(--ic-architectural-300)}:host(.ic-tab-monochrome){color:var(--ic-tab-label-monochrome)}:host(.ic-tab-monochrome) ::slotted([slot=\"icon\"]){fill:var(--ic-tab-icon-monochrome)}:host(.ic-tab-monochrome.ic-tab-selected){border-bottom:var(--ic-space-xxs) solid var(--ic-tab-item-monochrome)}:host(.ic-tab-monochrome:hover){background-color:var(--ic-tab-item-hover-monochrome)}:host(.ic-tab-monochrome:active){background-color:var(--ic-tab-item-pressed-monochrome)}@media (prefers-reduced-motion: no-preference){:host(.ic-tab-selected.with-transition){transition:all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow)}}.ic-tab-label{pointer-events:none;text-wrap:nowrap}::slotted(svg){fill:currentcolor}@media (forced-colors: active){:host{border-bottom:var(--ic-space-xxs) solid canvas}:host(.ic-tab-disabled){color:GrayText}:host(.ic-tab-disabled) ic-typography{color:GrayText;--ic-typography-color:GrayText}}";
|
9
9
|
|
@@ -56,6 +56,9 @@ const Tab = class {
|
|
56
56
|
this.tabPosition = undefined;
|
57
57
|
this.theme = "inherit";
|
58
58
|
}
|
59
|
+
watchDisabledHandler() {
|
60
|
+
helpers.removeDisabledFalse(this.disabled, this.el);
|
61
|
+
}
|
59
62
|
disabledWatchHandler() {
|
60
63
|
this.tabEnabled.emit();
|
61
64
|
}
|
@@ -93,7 +96,7 @@ const Tab = class {
|
|
93
96
|
}
|
94
97
|
get el() { return index.getElement(this); }
|
95
98
|
static get watchers() { return {
|
96
|
-
"disabled": ["disabledWatchHandler"]
|
99
|
+
"disabled": ["watchDisabledHandler", "disabledWatchHandler"]
|
97
100
|
}; }
|
98
101
|
};
|
99
102
|
Tab.style = icTabCss;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-tab.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,qxIAAqxI;;MCyBzxI,GAAG;;;;;;;;QACN,mBAAc,GAAY,KAAK,CAAC;QAEhC,oBAAe,GAAY,IAAI,CAAC;QAuFhC,gBAAW,GAAG;YACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,QAAQ,EAAE,IAAI,CAAC,WAAW;aAC3B,CAAC,CAAC;YACH,IAAI,IAAI,CAAC,cAAc,EAAE;gBACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,QAAQ,EAAE,IAAI,CAAC,WAAW;iBAC3B,CAAC,CAAC;gBACH,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;aAC7B;SACF,CAAC;QAEM,gBAAW,GAAG;YACpB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;gBAE7B,I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AC7B,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,mBAAmB,GAAG,UAAU;aAClC,EACD,IAAI,EAAC,KAAK,mBACK,GAAG,QAAQ,EAAE,EAC5B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,eAAe,mBACb,GAAG,QAAQ,EAAE,EAC5B,QAAQ,EAAE,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC,IAE1BC,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAIF,kBAAM,IAAI,EAAC,MAAM,GAAQ,EACzDA,2BAAe,KAAK,EAAC,cAAc,EAAC,OAAO,EAAC,OAAO,IACjDA,sBACEA,qBAAa,CACR,CACO,EACfE,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAIF,kBAAM,IAAI,EAAC,OAAO,GAAQ,CACtD,EACP;KACH;;;;;;;;;;","names":["removeDisabledFalse","h","Host","isSlotUsed"],"sources":["src/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","src/components/ic-tab/ic-tab.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --focus-indicator: var(--ic-border-focus);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--ic-tab-label);\n\n --ic-typography-color: var(--ic-tab-label);\n\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-tab-icon);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--ic-tab-item-hover);\n}\n\n:host(:active) {\n background-color: var(--ic-tab-item-pressed);\n}\n\n:host(.ic-tab-selected) {\n border-bottom: var(--ic-space-xxs) solid var(--ic-tab-item);\n}\n\n:host(.ic-tab-disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n:host(.ic-tab-disabled) ic-typography {\n color: var(--ic-architectural-300);\n\n --ic-typography-color: var(--ic-architectural-300);\n}\n\n:host(.ic-tab-monochrome) {\n color: var(--ic-tab-label-monochrome);\n}\n\n:host(.ic-tab-monochrome) ::slotted([slot=\"icon\"]) {\n fill: var(--ic-tab-icon-monochrome);\n}\n\n:host(.ic-tab-monochrome.ic-tab-selected) {\n border-bottom: var(--ic-space-xxs) solid var(--ic-tab-item-monochrome);\n}\n\n:host(.ic-tab-monochrome:hover) {\n background-color: var(--ic-tab-item-hover-monochrome);\n}\n\n:host(.ic-tab-monochrome:active) {\n background-color: var(--ic-tab-item-pressed-monochrome);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.ic-tab-selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.ic-tab-disabled) {\n color: GrayText;\n }\n\n :host(.ic-tab-disabled) ic-typography {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.ic-tab-disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport { IcTabClickEventDetail } from \"./ic-tab.types\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\n@Component({\n tag: \"ic-tab\",\n styleUrl: \"ic-tab.css\",\n shadow: true,\n})\nexport class Tab {\n private focusFromClick: boolean = false;\n private focusTabId: string;\n private isInitialRender: boolean = true;\n\n @Element() el: HTMLIcTabElement;\n\n /** @internal The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel. */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /** @internal If `true`, the tab will display with a selected indicator and tabIndex will be set. */\n @Prop({ reflect: true }) selected?: boolean = false;\n\n /** @internal The shared ID between panel and tab. */\n @Prop({ reflect: true }) tabId?: string;\n\n /** @internal The position of the tab inside the tabs array in context. */\n @Prop() tabPosition?: number;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n @Watch(\"disabled\")\n disabledWatchHandler(): void {\n this.tabEnabled.emit();\n }\n\n /**\n * @internal Emitted when a tab is selected.\n */\n @Event() tabClick: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is dynamically created.\n */\n @Event() tabCreated: EventEmitter<HTMLIcTabElement>;\n\n /**\n * @internal Emitted when a tab's disabled prop changes\n */\n @Event() tabEnabled: EventEmitter<void>;\n\n /**\n * @internal Emitted when a tab is focussed.\n */\n @Event() tabFocus: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is unmounted.\n */\n @Event() tabRemoved: EventEmitter<void>;\n\n connectedCallback(): void {\n this.tabCreated.emit(this.el);\n }\n\n disconnectedCallback(): void {\n document\n .querySelector<HTMLIcTabContextElement>(\n `ic-tab-context[context-id=${this.contextId}]`\n )\n ?.tabRemovedHandler(!!this.focusTabId);\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n /**\n * Sets focus on the tab.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el) {\n this.el.focus();\n }\n }\n\n private handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n\n private handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n\n private handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a separate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n\n render() {\n const {\n disabled,\n selected,\n theme,\n monochrome,\n handleClick,\n handleFocus,\n handleMouseDown,\n } = this;\n return (\n <Host\n class={{\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-selected\"]: selected,\n [\"ic-tab-disabled\"]: disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-monochrome\"]: monochrome,\n }}\n role=\"tab\"\n aria-selected={`${selected}`}\n onClick={handleClick}\n onFocus={handleFocus}\n onMouseDown={handleMouseDown}\n aria-disabled={`${disabled}`}\n tabindex={selected ? 0 : -1}\n >\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n <ic-typography class=\"ic-tab-label\" variant=\"label\">\n <span>\n <slot></slot>\n </span>\n </ic-typography>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":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EAAC,MAAM,GAAQ,EACzDA,2BAAe,KAAK,EAAC,cAAc,EAAC,OAAO,EAAC,OAAO,IACjDA,sBACEA,qBAAa,CACR,CACO,EACfE,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAIF,kBAAM,IAAI,EAAC,OAAO,GAAQ,CACtD,EACP;KACH;;;;;;;;;;","names":["removeDisabledFalse","h","Host","isSlotUsed"],"sources":["src/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","src/components/ic-tab/ic-tab.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --focus-indicator: var(--ic-border-focus);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--ic-tab-label);\n\n --ic-typography-color: var(--ic-tab-label);\n\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-tab-icon);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--ic-tab-item-hover);\n}\n\n:host(:active) {\n background-color: var(--ic-tab-item-pressed);\n}\n\n:host(.ic-tab-selected) {\n border-bottom: var(--ic-space-xxs) solid var(--ic-tab-item);\n}\n\n:host(.ic-tab-disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n:host(.ic-tab-disabled) ic-typography {\n color: var(--ic-architectural-300);\n\n --ic-typography-color: var(--ic-architectural-300);\n}\n\n:host(.ic-tab-monochrome) {\n color: var(--ic-tab-label-monochrome);\n}\n\n:host(.ic-tab-monochrome) ::slotted([slot=\"icon\"]) {\n fill: var(--ic-tab-icon-monochrome);\n}\n\n:host(.ic-tab-monochrome.ic-tab-selected) {\n border-bottom: var(--ic-space-xxs) solid var(--ic-tab-item-monochrome);\n}\n\n:host(.ic-tab-monochrome:hover) {\n background-color: var(--ic-tab-item-hover-monochrome);\n}\n\n:host(.ic-tab-monochrome:active) {\n background-color: var(--ic-tab-item-pressed-monochrome);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.ic-tab-selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.ic-tab-disabled) {\n color: GrayText;\n }\n\n :host(.ic-tab-disabled) ic-typography {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.ic-tab-disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport { IcTabClickEventDetail } from \"./ic-tab.types\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\n@Component({\n tag: \"ic-tab\",\n styleUrl: \"ic-tab.css\",\n shadow: true,\n})\nexport class Tab {\n private focusFromClick: boolean = false;\n private focusTabId: string;\n private isInitialRender: boolean = true;\n\n @Element() el: HTMLIcTabElement;\n\n /** @internal The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel. */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /** @internal If `true`, the tab will display with a selected indicator and tabIndex will be set. */\n @Prop({ reflect: true }) selected?: boolean = false;\n\n /** @internal The shared ID between panel and tab. */\n @Prop({ reflect: true }) tabId?: string;\n\n /** @internal The position of the tab inside the tabs array in context. */\n @Prop() tabPosition?: number;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n @Watch(\"disabled\")\n disabledWatchHandler(): void {\n this.tabEnabled.emit();\n }\n\n /**\n * @internal Emitted when a tab is selected.\n */\n @Event() tabClick: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is dynamically created.\n */\n @Event() tabCreated: EventEmitter<HTMLIcTabElement>;\n\n /**\n * @internal Emitted when a tab's disabled prop changes\n */\n @Event() tabEnabled: EventEmitter<void>;\n\n /**\n * @internal Emitted when a tab is focussed.\n */\n @Event() tabFocus: EventEmitter<IcTabClickEventDetail>;\n\n /**\n * @internal Emitted when a tab is unmounted.\n */\n @Event() tabRemoved: EventEmitter<void>;\n\n connectedCallback(): void {\n this.tabCreated.emit(this.el);\n }\n\n disconnectedCallback(): void {\n document\n .querySelector<HTMLIcTabContextElement>(\n `ic-tab-context[context-id=${this.contextId}]`\n )\n ?.tabRemovedHandler(!!this.focusTabId);\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidUpdate(): void {\n this.isInitialRender = false;\n }\n\n /**\n * Sets focus on the tab.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el) {\n this.el.focus();\n }\n }\n\n private handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n\n private handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n\n private handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a separate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n\n render() {\n const {\n disabled,\n selected,\n theme,\n monochrome,\n handleClick,\n handleFocus,\n handleMouseDown,\n } = this;\n return (\n <Host\n class={{\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-selected\"]: selected,\n [\"ic-tab-disabled\"]: disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-monochrome\"]: monochrome,\n }}\n role=\"tab\"\n aria-selected={`${selected}`}\n onClick={handleClick}\n onFocus={handleFocus}\n onMouseDown={handleMouseDown}\n aria-disabled={`${disabled}`}\n tabindex={selected ? 0 : -1}\n >\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n <ic-typography class=\"ic-tab-label\" variant=\"label\">\n <span>\n <slot></slot>\n </span>\n </ic-typography>\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f982899d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-dd569d97.js');
|
7
7
|
|
8
|
-
const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(--text-field-placeholder-color
|
8
|
+
const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
|
9
9
|
|
10
10
|
let inputIds = 0;
|
11
11
|
const MUTABLE_ATTRIBUTES = [...helpers.IC_INHERITED_ARIA, "title"];
|
@@ -20,6 +20,14 @@ const TextField = class {
|
|
20
20
|
this.icKeydown = index.createEvent(this, "icKeydown", 7);
|
21
21
|
this.inheritedAttributes = {};
|
22
22
|
this.hostMutationObserver = null;
|
23
|
+
this.checkChildHydration = () => {
|
24
|
+
var _a;
|
25
|
+
const el = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("ic-typography");
|
26
|
+
if (el && el.classList.contains("hydrated")) {
|
27
|
+
this.setFocus();
|
28
|
+
clearInterval(this.interval);
|
29
|
+
}
|
30
|
+
};
|
23
31
|
this.getMaxValueExceeded = (value) => {
|
24
32
|
if (this.type === "number") {
|
25
33
|
this.minValueUnattained = value && Number(value) < Number(this.min);
|
@@ -82,7 +90,7 @@ const TextField = class {
|
|
82
90
|
this.autocapitalize = "off";
|
83
91
|
this.autocomplete = "off";
|
84
92
|
this.autocorrect = "off";
|
85
|
-
this.
|
93
|
+
this.autofocus = false;
|
86
94
|
this.disabled = false;
|
87
95
|
this.fullWidth = false;
|
88
96
|
this.helperText = "";
|
@@ -105,6 +113,7 @@ const TextField = class {
|
|
105
113
|
this.rows = 1;
|
106
114
|
this.size = "medium";
|
107
115
|
this.spellcheck = false;
|
116
|
+
this.theme = "inherit";
|
108
117
|
this.truncateValue = undefined;
|
109
118
|
this.type = "text";
|
110
119
|
this.validationInline = false;
|
@@ -115,6 +124,9 @@ const TextField = class {
|
|
115
124
|
this.value = "";
|
116
125
|
this.initialValue = this.value;
|
117
126
|
}
|
127
|
+
watchDisabledHandler() {
|
128
|
+
helpers.removeDisabledFalse(this.disabled, this.el);
|
129
|
+
}
|
118
130
|
debounceChanged() {
|
119
131
|
this.icChange = helpers.debounceEvent(this.icChange, this.debounce);
|
120
132
|
}
|
@@ -169,6 +181,9 @@ const TextField = class {
|
|
169
181
|
attributes: true,
|
170
182
|
childList: true,
|
171
183
|
});
|
184
|
+
if (this.autofocus && !this.disabled && !this.readonly) {
|
185
|
+
this.interval = setInterval(this.checkChildHydration, 50);
|
186
|
+
}
|
172
187
|
}
|
173
188
|
handleKeyDown(ev) {
|
174
189
|
this.icKeydown.emit({ event: ev });
|
@@ -177,12 +192,12 @@ const TextField = class {
|
|
177
192
|
/**
|
178
193
|
* Sets focus on the native `input`.
|
179
194
|
*/
|
180
|
-
|
195
|
+
setFocus() {
|
181
196
|
var _a;
|
182
197
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
183
198
|
}
|
184
199
|
render() {
|
185
|
-
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;
|
200
|
+
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, theme, } = this;
|
186
201
|
const disabledMode = readonly || disabled;
|
187
202
|
const currentStatus = maxValueExceeded ||
|
188
203
|
minValueUnattained ||
|
@@ -222,18 +237,22 @@ const TextField = class {
|
|
222
237
|
if (hiddenInput) {
|
223
238
|
helpers.renderHiddenInput(true, this.el, name, value, disabledMode);
|
224
239
|
}
|
225
|
-
return (index.h(index.Host, { class: {
|
226
|
-
|
227
|
-
[
|
240
|
+
return (index.h(index.Host, { class: {
|
241
|
+
"ic-text-field-full-width": fullWidth,
|
242
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
243
|
+
"ic-text-field-disabled": disabledMode,
|
244
|
+
} }, index.h("ic-input-container", { readonly: readonly, disabled: disabledMode }, !this.hideLabel && (index.h("ic-input-label", { for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly })), index.h("ic-input-component-container", { size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (index.h("span", { class: {
|
245
|
+
readonly,
|
246
|
+
"has-value": value.length > 0,
|
228
247
|
}, slot: "left-icon" }, index.h("slot", { name: "icon" }))), !multiline ? (index.h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: this.type, min: min, max: max, value: value, class: {
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
}, placeholder: placeholder ? placeholder : "", required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": this.ariaActiveDescendant, "aria-expanded": this.ariaExpanded, "aria-owns": this.ariaOwns, autocomplete: this.autocomplete, autocapitalize: this.autocapitalize,
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder ? placeholder : "", readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize,
|
248
|
+
"no-left-pad": !showLeftIcon && readonly,
|
249
|
+
readonly,
|
250
|
+
"truncate-value": truncateValue,
|
251
|
+
}, placeholder: placeholder ? placeholder : "", required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": this.ariaActiveDescendant, "aria-expanded": this.ariaExpanded, "aria-owns": this.ariaOwns, autocomplete: this.autocomplete, autocapitalize: this.autocapitalize, spellcheck: spellcheck, inputmode: inputmode, role: this.role, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))) : (index.h("textarea", Object.assign({ id: inputId, class: {
|
252
|
+
"no-resize": resize === false || readonly,
|
253
|
+
"no-left-pad": !showLeftIcon && readonly,
|
254
|
+
readonly,
|
255
|
+
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder ? placeholder : "", readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), helpers.isSlotUsed(this.el, "clear-button") && (index.h("slot", { name: "clear-button" })), helpers.isSlotUsed(this.el, "search-submit-button") && (index.h("slot", { name: "search-submit-button" }))), helpers.isSlotUsed(this.el, "menu") && index.h("slot", { name: "menu" }), (!helpers.isEmptyString(validationStatus) ||
|
237
256
|
!helpers.isEmptyString(validationText) ||
|
238
257
|
maxNumChars > 0 ||
|
239
258
|
maxValueExceeded ||
|
@@ -245,12 +264,11 @@ const TextField = class {
|
|
245
264
|
validationInline) ||
|
246
265
|
validationInlineInternal
|
247
266
|
? ""
|
248
|
-
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (index.h("div", { slot: "validation-message-adornment" }, !hideCharCount && (index.h("ic-typography", { variant: "caption", class: {
|
249
|
-
["char-count-text"]: true,
|
250
|
-
} }, index.h("span", { class: "char-count" }, numChars, "/", maxNumChars))), index.h("span", { class: "remaining-char-count-desc", "aria-live": "polite" }, hiddenRemainingCharCountDesc), index.h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters."))))))));
|
267
|
+
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (index.h("div", { slot: "validation-message-adornment" }, !hideCharCount && (index.h("ic-typography", { variant: "caption", class: "char-count-text" }, index.h("span", { class: "char-count" }, numChars, "/", maxNumChars))), index.h("span", { class: "remaining-char-count-desc", "aria-live": "polite" }, hiddenRemainingCharCountDesc), index.h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters."))))))));
|
251
268
|
}
|
252
269
|
get el() { return index.getElement(this); }
|
253
270
|
static get watchers() { return {
|
271
|
+
"disabled": ["watchDisabledHandler"],
|
254
272
|
"debounce": ["debounceChanged"],
|
255
273
|
"value": ["watchValueHandler"]
|
256
274
|
}; }
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,8yIAA8yI;;AC0Cr0I,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAGA,yBAAiB,EAAE,OAAO,CAAC,CAAC;MAU9C,SAAS;;;;;;;;;QACZ,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAAoB,GAAqB,IAAI,CAAC;QA0U9C,wBAAmB,GAAG,CAAC,KAAa;YAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,IAAI,CAAC,kBAAkB,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC1D;SACF,CAAC;QAEM,4BAAuB,GAAG,CAAC,KAAa;YAC9C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;YAC7B,IAAI,CAAC,oBAAoB;gBACvB,IAAI,CAAC,aAAa,GAAG,CAAC,G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A,qBAAa,CAAC,cAAc,CAAC;YAC9B,WAAW,GAAG,CAAC;YACf,gBAAgB;YAChB,oBAAoB;YACpB,uBAAuB;YACvB,kBAAkB;YAClB,CAAC,wBAAwB,KACvBH,iCACE,MAAM,EACJ,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,KAAK;iBACtC,aAAa,KAAKH,2BAAmB,CAAC,OAAO;oBAC5C,gBAAgB,CAAC;gBACnB,wBAAwB;kBACpB,EAAE;kBACF,aAAa,EAEnB,OAAO,EAAE,cAAc,GAAG,qBAAqB,GAAG,EAAE,EACpD,YAAY,EAAE,eAAe,EAC7B,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,SAAS,IAEnB,CAAC,QAAQ,IAAI,WAAW,GAAG,CAAC,KAC3BG,iBAAK,IAAI,EAAC,8BAA8B,IACrC,CAAC,aAAa,KACbA,2BACE,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE;gBACL,CAAC,iBAAiB,GAAG,IAAI;aAC1B,IAEDA,kBAAM,KAAK,EAAC,YAAY,IACrB,QAAQ,OAAG,WAAW,CAClB,CACO,CACjB,EACDA,kBAAM,KAAK,EAAC,2BAA2B,eAAW,QAAQ,IACvD,4BAA4B,CACxB,EACPA,kBAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACH,CACP,CACmB,CACvB,CACgB,CAChB,EACP;KACH;;;;;;;;;;;","names":["IC_INHERITED_ARIA","checkSlotInChildMutations","forceUpdate","debounceEvent","removeFormResetListener","inheritAttributes","addFormResetListener","removeDisabledFalse","onComponentRequiredPropUndefined","IcInformationStatus","getInputDescribedByText","renderHiddenInput","h","Host","isSlotUsed","isEmptyString"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--text-field-placeholder-color, var(--ic-color-text-tertiary));\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-color-text-primary));\n background-color: var(--input-bg-color, var(--ic-architectural-white));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--text-field-disabled-text-color, var(--ic-architectural-200));\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-text-primary);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-color-text-secondary);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-text-tertiary);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-text-primary);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} 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 = \"medium\";\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 || 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"],"version":3}
|
1
|
+
{"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,4uMAA4uM;;AC2CnwM,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAGA,yBAAiB,EAAE,OAAO,CAAC,CAAC;MAU9C,SAAS;;;;;;;;;QACZ,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAAoB,GAAqB,IAAI,CAAC;QA0U9C,wBAAmB,GAAG;;YAC5B,MAAM,EAAE,GAAG,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,aAAa,CAAC,eAAe,CAAC,CAAC;YAC9D,IAAI,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;gBAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9B;SACF,CAAC;QAiBM,wBAAmB,GAAG,CAAC,KAAa;YAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,IAAI,CAAC,kBAAkB,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC1D;SACF,CAAC;QAEM,4B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;;;;;;;","names":["IC_INHERITED_ARIA","checkSlotInChildMutations","forceUpdate","removeDisabledFalse","debounceEvent","removeFormResetListener","inheritAttributes","addFormResetListener","onComponentRequiredPropUndefined","IcInformationStatus","getInputDescribedByText","renderHiddenInput","h","Host","isSlotUsed","isEmptyString"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n} 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 private interval: ReturnType<typeof setInterval>;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\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 @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: 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 = \"medium\";\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 /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: 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 if (this.autofocus && !this.disabled && !this.readonly) {\n this.interval = setInterval(this.checkChildHydration, 50);\n }\n }\n\n private checkChildHydration = () => {\n const el = this.el.shadowRoot?.querySelector(\"ic-typography\");\n if (el && el.classList.contains(\"hydrated\")) {\n this.setFocus();\n clearInterval(this.interval);\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 setFocus() {\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 theme,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? `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\n class={{\n \"ic-text-field-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-text-field-disabled\": disabledMode,\n }}\n >\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,\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,\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 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,\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 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 variant=\"caption\" class=\"char-count-text\">\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"],"version":3}
|
@@ -3,12 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f982899d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-dd569d97.js');
|
7
7
|
|
8
8
|
const Theme = class {
|
9
9
|
constructor(hostRef) {
|
10
10
|
index.registerInstance(this, hostRef);
|
11
|
-
this.
|
11
|
+
this.brandChange = index.createEvent(this, "brandChange", 7);
|
12
12
|
this.darkModeChangeHandler = () => {
|
13
13
|
if (this.theme === "system") {
|
14
14
|
this.themeClass =
|
@@ -21,41 +21,41 @@ const Theme = class {
|
|
21
21
|
this.themeClass = `ic-theme-${this.theme}`;
|
22
22
|
}
|
23
23
|
};
|
24
|
-
this.
|
25
|
-
if (helpers.
|
26
|
-
helpers.
|
27
|
-
console.warn(`The
|
24
|
+
this.checkBrandColorContrast = () => {
|
25
|
+
if (helpers.getBrandColorBrightness() < helpers.BLACK_MIN_COLOR_BRIGHTNESS &&
|
26
|
+
helpers.getBrandColorBrightness() > helpers.WHITE_MAX_COLOR_BRIGHTNESS) {
|
27
|
+
console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`);
|
28
28
|
}
|
29
29
|
};
|
30
|
-
this.
|
31
|
-
const colorRGBA = helpers.convertToRGBA(this.
|
30
|
+
this.setBrandColor = () => {
|
31
|
+
const colorRGBA = helpers.convertToRGBA(this.brandColor);
|
32
32
|
if (colorRGBA) {
|
33
33
|
const { r, g, b, a } = colorRGBA;
|
34
34
|
const { style } = document.documentElement;
|
35
|
-
style.setProperty("--ic-
|
36
|
-
style.setProperty("--ic-
|
37
|
-
style.setProperty("--ic-
|
38
|
-
style.setProperty("--ic-
|
39
|
-
this.
|
40
|
-
this.
|
41
|
-
mode: helpers.
|
35
|
+
style.setProperty("--ic-brand-color-primary-r", `${r}`);
|
36
|
+
style.setProperty("--ic-brand-color-primary-g", `${g}`);
|
37
|
+
style.setProperty("--ic-brand-color-primary-b", `${b}`);
|
38
|
+
style.setProperty("--ic-brand-color-primary-a", `${a}`);
|
39
|
+
this.checkBrandColorContrast();
|
40
|
+
this.brandChange.emit({
|
41
|
+
mode: helpers.getBrandForegroundAppearance(),
|
42
42
|
color: colorRGBA,
|
43
43
|
});
|
44
44
|
}
|
45
45
|
};
|
46
46
|
this.themeClass = "";
|
47
|
-
this.
|
47
|
+
this.brandColor = null;
|
48
48
|
this.theme = "light";
|
49
49
|
}
|
50
|
-
|
51
|
-
this.
|
50
|
+
watchBrandColorPropHandler() {
|
51
|
+
this.setBrandColor();
|
52
52
|
}
|
53
53
|
watchThemePropHandler() {
|
54
54
|
this.darkModeChangeHandler();
|
55
55
|
}
|
56
56
|
componentWillLoad() {
|
57
57
|
this.darkModeChangeHandler();
|
58
|
-
this.
|
58
|
+
this.setBrandColor();
|
59
59
|
window.matchMedia &&
|
60
60
|
window
|
61
61
|
.matchMedia("(prefers-color-scheme: dark)")
|
@@ -66,7 +66,7 @@ const Theme = class {
|
|
66
66
|
return (index.h(index.Host, { class: themeClass }, index.h("slot", null)));
|
67
67
|
}
|
68
68
|
static get watchers() { return {
|
69
|
-
"
|
69
|
+
"brandColor": ["watchBrandColorPropHandler"],
|
70
70
|
"theme": ["watchThemePropHandler"]
|
71
71
|
}; }
|
72
72
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-theme.entry.cjs.js","mappings":";;;;;;;
|
1
|
+
{"file":"ic-theme.entry.cjs.js","mappings":";;;;;;;MAyBa,KAAK;;;;QAsCR,0BAAqB,GAAG;YAC9B,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;gBAC3B,IAAI,CAAC,UAAU;oBACb,MAAM,CAAC,UAAU;wBACjB,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO;0BACrD,eAAe;0BACf,gBAAgB,CAAC;aACxB;iBAAM;gBACL,IAAI,CAAC,UAAU,GAAG,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC;aAC5C;SACF,CAAC;QAEM,4BAAuB,GAAG;YAChC,IACEA,+BAAuB,EAAE,GAAGC,kCAA0B;gBACtDD,+BAAuB,EAAE,GAAGE,kCAA0B,EACtD;gBACA,OAAO,CAAC,IAAI,CACV,2TAA2T,CAC5T,CAAC;aACH;SACF,CAAC;QAEM,kBAAa,GAAG;YACtB,MAAM,SAAS,GAAGC,qBAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAEjD,IAAI,SAAS,EAAE;gBACb,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,C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h","Host"],"sources":["src/components/ic-theme/ic-theme.tsx"],"sourcesContent":["import {\n Component,\n Host,\n Event,\n EventEmitter,\n h,\n Watch,\n Prop,\n State,\n} from \"@stencil/core\";\n\nimport { IcColor, IcBrand } from \"../../utils/types\";\nimport {\n convertToRGBA,\n getBrandForegroundAppearance,\n} from \"../../utils/helpers\";\nimport { getBrandColorBrightness } from \"../../utils/helpers\";\nimport {\n BLACK_MIN_COLOR_BRIGHTNESS,\n WHITE_MAX_COLOR_BRIGHTNESS,\n} from \"../../utils/constants\";\n\n@Component({\n tag: \"ic-theme\",\n})\nexport class Theme {\n @State() themeClass: string = \"\";\n\n /**\n * The brand colour. Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() brandColor?: IcColor = null;\n\n @Watch(\"brandColor\")\n watchBrandColorPropHandler(): void {\n this.setBrandColor();\n }\n\n /**\n * The theme mode. Can be \"dark\", \"light\", or \"system\". \"system\" will use the device or browser settings.\n */\n @Prop() theme: \"dark\" | \"light\" | \"system\" = \"light\";\n\n @Watch(\"theme\")\n watchThemePropHandler(): void {\n this.darkModeChangeHandler();\n }\n\n /**\n * @internal Emitted when the brand color is changed.\n */\n @Event() brandChange: EventEmitter<IcBrand>;\n\n componentWillLoad(): void {\n this.darkModeChangeHandler();\n this.setBrandColor();\n\n window.matchMedia &&\n window\n .matchMedia(\"(prefers-color-scheme: dark)\")\n .addEventListener(\"change\", this.darkModeChangeHandler);\n }\n\n private darkModeChangeHandler = (): void => {\n if (this.theme === \"system\") {\n this.themeClass =\n window.matchMedia &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"ic-theme-dark\"\n : \"ic-theme-light\";\n } else {\n this.themeClass = `ic-theme-${this.theme}`;\n }\n };\n\n private checkBrandColorContrast = (): void => {\n if (\n getBrandColorBrightness() < BLACK_MIN_COLOR_BRIGHTNESS &&\n getBrandColorBrightness() > WHITE_MAX_COLOR_BRIGHTNESS\n ) {\n console.warn(\n `The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`\n );\n }\n };\n\n private setBrandColor = () => {\n const colorRGBA = convertToRGBA(this.brandColor);\n\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const { style } = document.documentElement;\n style.setProperty(\"--ic-brand-color-primary-r\", `${r}`);\n style.setProperty(\"--ic-brand-color-primary-g\", `${g}`);\n style.setProperty(\"--ic-brand-color-primary-b\", `${b}`);\n style.setProperty(\"--ic-brand-color-primary-a\", `${a}`);\n\n this.checkBrandColorContrast();\n\n this.brandChange.emit({\n mode: getBrandForegroundAppearance(),\n color: colorRGBA,\n });\n }\n };\n\n render() {\n const { themeClass } = this;\n\n return (\n <Host class={themeClass}>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-f982899d.js');
|
6
6
|
const closeIcon = require('./close-icon-7f6ef8e4.js');
|
7
|
-
const helpers = require('./helpers-
|
7
|
+
const helpers = require('./helpers-dd569d97.js');
|
8
8
|
|
9
9
|
const icToastCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant=\"neutral\"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant=\"info\"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant=\"warning\"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant=\"error\"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant=\"success\"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-light)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}";
|
10
10
|
|