@educarehq/solaris-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/educarehq-solaris-ui.d.ts +5 -0
- package/esm2022/educarehq-solaris-ui.js +5 -0
- package/esm2022/educarehq-solaris-ui.js.map +1 -0
- package/esm2022/index.js +70 -0
- package/esm2022/index.js.map +1 -0
- package/esm2022/lib/components/actions/button/directives/button-icon.directive.js +17 -0
- package/esm2022/lib/components/actions/button/directives/button-icon.directive.js.map +1 -0
- package/esm2022/lib/components/actions/button/directives/button.directive.js +60 -0
- package/esm2022/lib/components/actions/button/directives/button.directive.js.map +1 -0
- package/esm2022/lib/components/actions/button/model/button.types.js +1 -0
- package/esm2022/lib/components/actions/button/model/button.types.js.map +1 -0
- package/esm2022/lib/components/actions/button-group/component/button-group.component.js +21 -0
- package/esm2022/lib/components/actions/button-group/component/button-group.component.js.map +1 -0
- package/esm2022/lib/components/actions/button-group/model/button-group.types.js +1 -0
- package/esm2022/lib/components/actions/button-group/model/button-group.types.js.map +1 -0
- package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js +17 -0
- package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js.map +1 -0
- package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js +58 -0
- package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js.map +1 -0
- package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js +1 -0
- package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js.map +1 -0
- package/esm2022/lib/components/data-display/badge/component/badge.component.js +24 -0
- package/esm2022/lib/components/data-display/badge/component/badge.component.js.map +1 -0
- package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js +17 -0
- package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/badge/model/badge.types.js +1 -0
- package/esm2022/lib/components/data-display/badge/model/badge.types.js.map +1 -0
- package/esm2022/lib/components/data-display/card/component/card.component.js +20 -0
- package/esm2022/lib/components/data-display/card/component/card.component.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-content.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-content.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-description.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-description.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js +19 -0
- package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-header.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-header.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-media.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-media.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/directives/card-title.directive.js +17 -0
- package/esm2022/lib/components/data-display/card/directives/card-title.directive.js.map +1 -0
- package/esm2022/lib/components/data-display/card/model/card.types.js +1 -0
- package/esm2022/lib/components/data-display/card/model/card.types.js.map +1 -0
- package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js +18 -0
- package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js.map +1 -0
- package/esm2022/lib/components/feedback/alert/component/alert.component.js +90 -0
- package/esm2022/lib/components/feedback/alert/component/alert.component.js.map +1 -0
- package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js +17 -0
- package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js.map +1 -0
- package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js +17 -0
- package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js.map +1 -0
- package/esm2022/lib/components/feedback/alert/model/alert.types.js +1 -0
- package/esm2022/lib/components/feedback/alert/model/alert.types.js.map +1 -0
- package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js +69 -0
- package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js.map +1 -0
- package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js +1 -0
- package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js.map +1 -0
- package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js +227 -0
- package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js.map +1 -0
- package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js +1 -0
- package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js.map +1 -0
- package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js +441 -0
- package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js.map +1 -0
- package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js +1 -0
- package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js.map +1 -0
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js +214 -0
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +1 -0
- package/esm2022/lib/components/forms/email-field/model/email-field.types.js +1 -0
- package/esm2022/lib/components/forms/email-field/model/email-field.types.js.map +1 -0
- package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js +69 -0
- package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/component/form-error.component.js +19 -0
- package/esm2022/lib/components/forms/form-field/component/form-error.component.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js +394 -0
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/component/form-hint.component.js +18 -0
- package/esm2022/lib/components/forms/form-field/component/form-hint.component.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/component/form-label.component.js +18 -0
- package/esm2022/lib/components/forms/form-field/component/form-label.component.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js +14 -0
- package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js +17 -0
- package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js +17 -0
- package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/index.js +8 -0
- package/esm2022/lib/components/forms/form-field/index.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/model/form-control.contract.js +3 -0
- package/esm2022/lib/components/forms/form-field/model/form-control.contract.js.map +1 -0
- package/esm2022/lib/components/forms/form-field/model/form-field.types.js +1 -0
- package/esm2022/lib/components/forms/form-field/model/form-field.types.js.map +1 -0
- package/esm2022/lib/components/forms/input/directives/input.directive.js +148 -0
- package/esm2022/lib/components/forms/input/directives/input.directive.js.map +1 -0
- package/esm2022/lib/components/forms/input/index.js +2 -0
- package/esm2022/lib/components/forms/input/index.js.map +1 -0
- package/esm2022/lib/components/forms/input/model/input.defaults.js +27 -0
- package/esm2022/lib/components/forms/input/model/input.defaults.js.map +1 -0
- package/esm2022/lib/components/forms/input/model/input.types.js +1 -0
- package/esm2022/lib/components/forms/input/model/input.types.js.map +1 -0
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +1119 -0
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +1 -0
- package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js +1 -0
- package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +1 -0
- package/esm2022/lib/components/forms/option/component/option.component.js +149 -0
- package/esm2022/lib/components/forms/option/component/option.component.js.map +1 -0
- package/esm2022/lib/components/forms/option/directives/option-slots.directive.js +58 -0
- package/esm2022/lib/components/forms/option/directives/option-slots.directive.js.map +1 -0
- package/esm2022/lib/components/forms/option/index.js +3 -0
- package/esm2022/lib/components/forms/option/index.js.map +1 -0
- package/esm2022/lib/components/forms/option/model/option.types.js +1 -0
- package/esm2022/lib/components/forms/option/model/option.types.js.map +1 -0
- package/esm2022/lib/components/forms/option-group/component/option-group.component.js +103 -0
- package/esm2022/lib/components/forms/option-group/component/option-group.component.js.map +1 -0
- package/esm2022/lib/components/forms/option-group/index.js +2 -0
- package/esm2022/lib/components/forms/option-group/index.js.map +1 -0
- package/esm2022/lib/components/forms/option-group/model/option-group.types.js +1 -0
- package/esm2022/lib/components/forms/option-group/model/option-group.types.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js +299 -0
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-field-constants.js +5 -0
- package/esm2022/lib/components/forms/password-field/model/password-field-constants.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-field.types.js +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-field.types.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-policy.types.js +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-policy.types.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/model/password-strength.js +67 -0
- package/esm2022/lib/components/forms/password-field/model/password-strength.js.map +1 -0
- package/esm2022/lib/components/forms/password-field/validators/password.validator.js +45 -0
- package/esm2022/lib/components/forms/password-field/validators/password.validator.js.map +1 -0
- package/esm2022/lib/components/forms/radio/component/radio.component.js +219 -0
- package/esm2022/lib/components/forms/radio/component/radio.component.js.map +1 -0
- package/esm2022/lib/components/forms/radio/model/radio.types.js +1 -0
- package/esm2022/lib/components/forms/radio/model/radio.types.js.map +1 -0
- package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js +348 -0
- package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js.map +1 -0
- package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js +3 -0
- package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js.map +1 -0
- package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js +1 -0
- package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js.map +1 -0
- package/esm2022/lib/components/forms/select/component/select.component.js +819 -0
- package/esm2022/lib/components/forms/select/component/select.component.js.map +1 -0
- package/esm2022/lib/components/forms/select/model/select.types.js +1 -0
- package/esm2022/lib/components/forms/select/model/select.types.js.map +1 -0
- package/esm2022/lib/components/forms/switch/component/switch.component.js +211 -0
- package/esm2022/lib/components/forms/switch/component/switch.component.js.map +1 -0
- package/esm2022/lib/components/forms/switch/index.js +2 -0
- package/esm2022/lib/components/forms/switch/index.js.map +1 -0
- package/esm2022/lib/components/forms/switch/model/switch.types.js +1 -0
- package/esm2022/lib/components/forms/switch/model/switch.types.js.map +1 -0
- package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js +369 -0
- package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js.map +1 -0
- package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js +1 -0
- package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js.map +1 -0
- package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js +137 -0
- package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js.map +1 -0
- package/esm2022/lib/components/forms/textarea/model/textarea.types.js +1 -0
- package/esm2022/lib/components/forms/textarea/model/textarea.types.js.map +1 -0
- package/esm2022/lib/components/icon/component/solaris-icon.component.js +20 -0
- package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +1 -0
- package/esm2022/lib/components/icon/index.js +2 -0
- package/esm2022/lib/components/icon/index.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +29 -0
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +317 -0
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/directives/popover.directive.js +16 -0
- package/esm2022/lib/components/interaction/popover/directives/popover.directive.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/index.js +4 -0
- package/esm2022/lib/components/interaction/popover/index.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/model/popover-position.js +145 -0
- package/esm2022/lib/components/interaction/popover/model/popover-position.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/model/popover.types.js +1 -0
- package/esm2022/lib/components/interaction/popover/model/popover.types.js.map +1 -0
- package/esm2022/lib/components/interaction/popover/token/popover.tokens.js +3 -0
- package/esm2022/lib/components/interaction/popover/token/popover.tokens.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js +23 -0
- package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js +405 -0
- package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/index.js +3 -0
- package/esm2022/lib/components/interaction/tooltip/index.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js +209 -0
- package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js +1 -0
- package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js.map +1 -0
- package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js +3 -0
- package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js.map +1 -0
- package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js +25 -0
- package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js.map +1 -0
- package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js +1 -0
- package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js.map +1 -0
- package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js +1 -0
- package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js.map +1 -0
- package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js +10 -0
- package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js.map +1 -0
- package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js +60 -0
- package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js.map +1 -0
- package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js +10 -0
- package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js.map +1 -0
- package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js +3 -0
- package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js.map +1 -0
- package/esm2022/lib/services/icon/icons/index.js +2 -0
- package/esm2022/lib/services/icon/icons/index.js.map +1 -0
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +207 -0
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +1 -0
- package/esm2022/lib/services/icon/index.js +5 -0
- package/esm2022/lib/services/icon/index.js.map +1 -0
- package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js +1 -0
- package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +1 -0
- package/esm2022/lib/services/icon/model/solaris-icon.types.js +1 -0
- package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +1 -0
- package/esm2022/lib/services/icon/provider/provide-solaris-icons.js +10 -0
- package/esm2022/lib/services/icon/provider/provide-solaris-icons.js.map +1 -0
- package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js +43 -0
- package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js.map +1 -0
- package/esm2022/lib/services/icon/token/solaris-icon.tokens.js +3 -0
- package/esm2022/lib/services/icon/token/solaris-icon.tokens.js.map +1 -0
- package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js +1 -0
- package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js.map +1 -0
- package/esm2022/lib/services/theme/model/solaris-theme.types.js +1 -0
- package/esm2022/lib/services/theme/model/solaris-theme.types.js.map +1 -0
- package/esm2022/lib/services/theme/provider/provide-solaris-theme.js +10 -0
- package/esm2022/lib/services/theme/provider/provide-solaris-theme.js.map +1 -0
- package/esm2022/lib/services/theme/service/solaris-theme.service.js +22 -0
- package/esm2022/lib/services/theme/service/solaris-theme.service.js.map +1 -0
- package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js +10 -0
- package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js.map +1 -0
- package/esm2022/lib/services/theme/token/solaris-theme.tokens.js +3 -0
- package/esm2022/lib/services/theme/token/solaris-theme.tokens.js.map +1 -0
- package/esm2022/lib/services/translation/index.js +6 -0
- package/esm2022/lib/services/translation/index.js.map +1 -0
- package/esm2022/lib/services/translation/model/solaris-locale.types.js +1 -0
- package/esm2022/lib/services/translation/model/solaris-locale.types.js.map +1 -0
- package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js +1 -0
- package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js.map +1 -0
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +40 -0
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +1 -0
- package/esm2022/lib/services/translation/model/solaris-translation.types.js +1 -0
- package/esm2022/lib/services/translation/model/solaris-translation.types.js.map +1 -0
- package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js +20 -0
- package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js.map +1 -0
- package/esm2022/lib/services/translation/provider/provide-solaris-translate.js +10 -0
- package/esm2022/lib/services/translation/provider/provide-solaris-translate.js.map +1 -0
- package/esm2022/lib/services/translation/service/solaris-translate.service.js +87 -0
- package/esm2022/lib/services/translation/service/solaris-translate.service.js.map +1 -0
- package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js +32 -0
- package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js.map +1 -0
- package/esm2022/lib/services/translation/token/solaris-translate.tokens.js +3 -0
- package/esm2022/lib/services/translation/token/solaris-translate.tokens.js.map +1 -0
- package/esm2022/lib/testing/provide-solaris-testing.js +11 -0
- package/esm2022/lib/testing/provide-solaris-testing.js.map +1 -0
- package/esm2022/lib/testing/solaris-test-utilities.js +12 -0
- package/esm2022/lib/testing/solaris-test-utilities.js.map +1 -0
- package/index.d.ts +106 -0
- package/lib/components/actions/button/directives/button-icon.directive.d.ts +5 -0
- package/lib/components/actions/button/directives/button.directive.d.ts +22 -0
- package/lib/components/actions/button/model/button.types.d.ts +5 -0
- package/lib/components/actions/button-group/component/button-group.component.d.ts +10 -0
- package/lib/components/actions/button-group/model/button-group.types.d.ts +2 -0
- package/lib/components/actions/icon-button/directives/icon-button-badge.directive.d.ts +5 -0
- package/lib/components/actions/icon-button/directives/icon-button.directive.d.ts +21 -0
- package/lib/components/actions/icon-button/model/icon-button.types.d.ts +5 -0
- package/lib/components/data-display/badge/component/badge.component.d.ts +12 -0
- package/lib/components/data-display/badge/directives/badge-icon.directive.d.ts +5 -0
- package/lib/components/data-display/badge/model/badge.types.d.ts +6 -0
- package/lib/components/data-display/card/component/card.component.d.ts +10 -0
- package/lib/components/data-display/card/directives/card-actions.directive.d.ts +5 -0
- package/lib/components/data-display/card/directives/card-content.directive.d.ts +5 -0
- package/lib/components/data-display/card/directives/card-description.directive.d.ts +5 -0
- package/lib/components/data-display/card/directives/card-footer.directive.d.ts +6 -0
- package/lib/components/data-display/card/directives/card-header.directive.d.ts +5 -0
- package/lib/components/data-display/card/directives/card-media.directive.d.ts +5 -0
- package/lib/components/data-display/card/directives/card-title.directive.d.ts +5 -0
- package/lib/components/data-display/card/model/card.types.d.ts +4 -0
- package/lib/components/feedback/alert/component/alert-actions.component.d.ts +5 -0
- package/lib/components/feedback/alert/component/alert.component.d.ts +26 -0
- package/lib/components/feedback/alert/directives/alert-description.directive.d.ts +5 -0
- package/lib/components/feedback/alert/directives/alert-title.directive.d.ts +5 -0
- package/lib/components/feedback/alert/model/alert.types.d.ts +5 -0
- package/lib/components/feedback/skeleton/component/skeleton.component.d.ts +17 -0
- package/lib/components/feedback/skeleton/model/skeleton.types.d.ts +5 -0
- package/lib/components/forms/checkbox/component/checkbox.component.d.ts +70 -0
- package/lib/components/forms/checkbox/model/checkbox.types.d.ts +5 -0
- package/lib/components/forms/checkbox-group/component/checkbox-group.component.d.ts +123 -0
- package/lib/components/forms/checkbox-group/model/checkbox-group.types.d.ts +5 -0
- package/lib/components/forms/email-field/component/email-field.component.d.ts +66 -0
- package/lib/components/forms/email-field/model/email-field.types.d.ts +6 -0
- package/lib/components/forms/email-field/validators/email-field.validators.d.ts +8 -0
- package/lib/components/forms/form-field/component/form-error.component.d.ts +5 -0
- package/lib/components/forms/form-field/component/form-field.component.d.ts +90 -0
- package/lib/components/forms/form-field/component/form-hint.component.d.ts +5 -0
- package/lib/components/forms/form-field/component/form-label.component.d.ts +5 -0
- package/lib/components/forms/form-field/directives/form-field-trigger.directive.d.ts +5 -0
- package/lib/components/forms/form-field/directives/form-prefix.directive.d.ts +5 -0
- package/lib/components/forms/form-field/directives/form-suffix.directive.d.ts +5 -0
- package/lib/components/forms/form-field/index.d.ts +8 -0
- package/lib/components/forms/form-field/model/form-control.contract.d.ts +11 -0
- package/lib/components/forms/form-field/model/form-field.types.d.ts +5 -0
- package/lib/components/forms/input/directives/input.directive.d.ts +37 -0
- package/lib/components/forms/input/index.d.ts +2 -0
- package/lib/components/forms/input/model/input.defaults.d.ts +2 -0
- package/lib/components/forms/input/model/input.types.d.ts +4 -0
- package/lib/components/forms/multi-select/component/multi-select.component.d.ts +202 -0
- package/lib/components/forms/multi-select/model/multi-select.types.d.ts +5 -0
- package/lib/components/forms/option/component/option.component.d.ts +58 -0
- package/lib/components/forms/option/directives/option-slots.directive.d.ts +21 -0
- package/lib/components/forms/option/index.d.ts +3 -0
- package/lib/components/forms/option/model/option.types.d.ts +3 -0
- package/lib/components/forms/option-group/component/option-group.component.d.ts +32 -0
- package/lib/components/forms/option-group/index.d.ts +2 -0
- package/lib/components/forms/option-group/model/option-group.types.d.ts +2 -0
- package/lib/components/forms/password-field/component/password-field.component.d.ts +81 -0
- package/lib/components/forms/password-field/model/password-field-constants.d.ts +4 -0
- package/lib/components/forms/password-field/model/password-field.types.d.ts +6 -0
- package/lib/components/forms/password-field/model/password-policy.types.d.ts +10 -0
- package/lib/components/forms/password-field/model/password-strength.d.ts +2 -0
- package/lib/components/forms/password-field/validators/password.validator.d.ts +3 -0
- package/lib/components/forms/radio/component/radio.component.d.ts +68 -0
- package/lib/components/forms/radio/model/radio.types.d.ts +4 -0
- package/lib/components/forms/radio-group/component/radio-group.component.d.ts +86 -0
- package/lib/components/forms/radio-group/model/radio-group.token.d.ts +2 -0
- package/lib/components/forms/radio-group/model/radio-group.types.d.ts +5 -0
- package/lib/components/forms/select/component/select.component.d.ts +158 -0
- package/lib/components/forms/select/model/select.types.d.ts +4 -0
- package/lib/components/forms/switch/component/switch.component.d.ts +66 -0
- package/lib/components/forms/switch/index.d.ts +2 -0
- package/lib/components/forms/switch/model/switch.types.d.ts +4 -0
- package/lib/components/forms/switch-group/component/switch-group.component.d.ts +91 -0
- package/lib/components/forms/switch-group/model/switch-group.types.d.ts +5 -0
- package/lib/components/forms/textarea/directives/textarea.directive.d.ts +37 -0
- package/lib/components/forms/textarea/model/textarea.types.d.ts +5 -0
- package/lib/components/icon/component/solaris-icon.component.d.ts +13 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/interaction/popover/component/popover-panel.component.d.ts +10 -0
- package/lib/components/interaction/popover/directives/popover-trigger.directive.d.ts +65 -0
- package/lib/components/interaction/popover/directives/popover.directive.d.ts +7 -0
- package/lib/components/interaction/popover/index.d.ts +4 -0
- package/lib/components/interaction/popover/model/popover-position.d.ts +4 -0
- package/lib/components/interaction/popover/model/popover.types.d.ts +7 -0
- package/lib/components/interaction/popover/token/popover.tokens.d.ts +12 -0
- package/lib/components/interaction/tooltip/component/tooltip-panel.component.d.ts +9 -0
- package/lib/components/interaction/tooltip/directive/tooltip.directive.d.ts +80 -0
- package/lib/components/interaction/tooltip/index.d.ts +3 -0
- package/lib/components/interaction/tooltip/model/tooltip-position.d.ts +5 -0
- package/lib/components/interaction/tooltip/model/tooltip.types.d.ts +22 -0
- package/lib/components/interaction/tooltip/token/tooltip.tokens.d.ts +21 -0
- package/lib/services/accessibility/directives/visually-hidden.directive.d.ts +5 -0
- package/lib/services/accessibility/model/solaris-accessibility-config.interface.d.ts +4 -0
- package/lib/services/accessibility/model/solaris-accessibility.types.d.ts +5 -0
- package/lib/services/accessibility/provider/provide-solaris-accessibility.d.ts +3 -0
- package/lib/services/accessibility/service/solaris-accessibility.service.d.ts +15 -0
- package/lib/services/accessibility/testing/solaris-accessibility-testing.provider.d.ts +3 -0
- package/lib/services/accessibility/token/solaris-accessibility.tokens.d.ts +3 -0
- package/lib/services/icon/icons/index.d.ts +1 -0
- package/lib/services/icon/icons/solaris-built-in-icons.d.ts +2 -0
- package/lib/services/icon/index.d.ts +8 -0
- package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +36 -0
- package/lib/services/icon/model/solaris-icon.types.d.ts +4 -0
- package/lib/services/icon/provider/provide-solaris-icons.d.ts +3 -0
- package/lib/services/icon/service/solaris-icon-registry.service.d.ts +12 -0
- package/lib/services/icon/token/solaris-icon.tokens.d.ts +6 -0
- package/lib/services/theme/model/solaris-theme-config.interface.d.ts +5 -0
- package/lib/services/theme/model/solaris-theme.types.d.ts +3 -0
- package/lib/services/theme/provider/provide-solaris-theme.d.ts +3 -0
- package/lib/services/theme/service/solaris-theme.service.d.ts +9 -0
- package/lib/services/theme/testing/solaris-theme-testing.provider.d.ts +3 -0
- package/lib/services/theme/token/solaris-theme.tokens.d.ts +3 -0
- package/lib/services/translation/index.d.ts +8 -0
- package/lib/services/translation/model/solaris-locale.types.d.ts +4 -0
- package/lib/services/translation/model/solaris-translate-config.interface.d.ts +8 -0
- package/lib/services/translation/model/solaris-translate-defaults.d.ts +2 -0
- package/lib/services/translation/model/solaris-translation.types.d.ts +3 -0
- package/lib/services/translation/pipe/solaris-translate.pipe.d.ts +8 -0
- package/lib/services/translation/provider/provide-solaris-translate.d.ts +3 -0
- package/lib/services/translation/service/solaris-translate.service.d.ts +15 -0
- package/lib/services/translation/testing/solaris-translate-testing.provider.d.ts +3 -0
- package/lib/services/translation/token/solaris-translate.tokens.d.ts +3 -0
- package/lib/testing/provide-solaris-testing.d.ts +10 -0
- package/lib/testing/solaris-test-utilities.d.ts +3 -0
- package/package.json +9 -5
- package/styles/_button.scss +50 -220
- package/styles/_core.scss +37 -37
- package/styles/_icon-button.scss +43 -219
- package/styles/_index.scss +19 -19
- package/styles/_input.scss +255 -0
- package/styles/_popover.scss +68 -0
- package/styles/_theme.scss +36 -36
- package/styles/_tooltip.scss +3 -0
- package/fesm2022/educarehq-solaris-ui.mjs +0 -1047
- package/fesm2022/educarehq-solaris-ui.mjs.map +0 -1
- package/types/educarehq-solaris-ui.d.ts +0 -408
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { Component, input, output, computed, signal, effect, forwardRef, inject, ElementRef, ContentChildren, NgZone, } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { SolarisFormControl } from '../../form-field/model/form-control.contract';
|
|
4
|
+
import { SolarisCheckboxComponent } from '../../checkbox/component/checkbox.component';
|
|
5
|
+
import { SolarisTranslateService } from '../../../../services/translation';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
let nextId = 0;
|
|
8
|
+
function generateId() {
|
|
9
|
+
return `solaris-checkbox-group-${++nextId}`;
|
|
10
|
+
}
|
|
11
|
+
function defaultCompare(a, b) {
|
|
12
|
+
return Object.is(a, b);
|
|
13
|
+
}
|
|
14
|
+
export class SolarisCheckboxGroupComponent extends SolarisFormControl {
|
|
15
|
+
elementRef = inject(ElementRef);
|
|
16
|
+
translateService = inject(SolarisTranslateService);
|
|
17
|
+
ngZone = inject(NgZone);
|
|
18
|
+
checkboxes;
|
|
19
|
+
/** Inputs */
|
|
20
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
21
|
+
layout = input('list', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
22
|
+
columns = input(1, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
23
|
+
density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
|
|
24
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
25
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
26
|
+
transform: (v) => v ?? false });
|
|
27
|
+
readonlyInput = input(false, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), alias: 'readonly',
|
|
28
|
+
transform: (v) => v ?? false });
|
|
29
|
+
requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required',
|
|
30
|
+
transform: (v) => v ?? false });
|
|
31
|
+
invalidInput = input(undefined, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'invalid' });
|
|
32
|
+
labelInput = input(undefined, { ...(ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {}), alias: 'label' });
|
|
33
|
+
labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
|
|
34
|
+
hintInput = input(undefined, { ...(ngDevMode ? { debugName: "hintInput" } : /* istanbul ignore next */ {}), alias: 'hint' });
|
|
35
|
+
hintKey = input(...(ngDevMode ? [undefined, { debugName: "hintKey" }] : /* istanbul ignore next */ []));
|
|
36
|
+
errorInput = input(undefined, { ...(ngDevMode ? { debugName: "errorInput" } : /* istanbul ignore next */ {}), alias: 'error' });
|
|
37
|
+
errorKey = input(...(ngDevMode ? [undefined, { debugName: "errorKey" }] : /* istanbul ignore next */ []));
|
|
38
|
+
minSelected = input(...(ngDevMode ? [undefined, { debugName: "minSelected" }] : /* istanbul ignore next */ []));
|
|
39
|
+
maxSelected = input(...(ngDevMode ? [undefined, { debugName: "maxSelected" }] : /* istanbul ignore next */ []));
|
|
40
|
+
selectAll = input(false, ...(ngDevMode ? [{ debugName: "selectAll" }] : /* istanbul ignore next */ []));
|
|
41
|
+
selectAllLabel = input(...(ngDevMode ? [undefined, { debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
|
|
42
|
+
selectAllLabelKey = input(...(ngDevMode ? [undefined, { debugName: "selectAllLabelKey" }] : /* istanbul ignore next */ []));
|
|
43
|
+
compareWith = input(defaultCompare, ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
|
|
44
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
45
|
+
ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** Outputs */
|
|
47
|
+
valueChange = output();
|
|
48
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
49
|
+
change = output();
|
|
50
|
+
/** Internal state */
|
|
51
|
+
_value = signal([], ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
52
|
+
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
|
|
53
|
+
_describedByIds = signal([], ...(ngDevMode ? [{ debugName: "_describedByIds" }] : /* istanbul ignore next */ []));
|
|
54
|
+
cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
55
|
+
autoInvalid = signal(false, ...(ngDevMode ? [{ debugName: "autoInvalid" }] : /* istanbul ignore next */ []));
|
|
56
|
+
/** CVA callbacks */
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
58
|
+
onChange = () => { };
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
60
|
+
onTouched = () => { };
|
|
61
|
+
/** Subscriptions cleanup */
|
|
62
|
+
checkboxCvaSubscriptions = new Map();
|
|
63
|
+
contentInitialized = false;
|
|
64
|
+
checkboxQuerySubscription = null;
|
|
65
|
+
focusListenersAttached = false;
|
|
66
|
+
/** IDs */
|
|
67
|
+
groupId = computed(() => {
|
|
68
|
+
// SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK and Solaris Checkbox.
|
|
69
|
+
return this.elementRef.nativeElement.getAttribute('id') || generateId();
|
|
70
|
+
}, ...(ngDevMode ? [{ debugName: "groupId" }] : /* istanbul ignore next */ []));
|
|
71
|
+
labelId = computed(() => `${this.groupId()}-label`, ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
72
|
+
hintId = computed(() => `${this.groupId()}-hint`, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
73
|
+
errorId = computed(() => `${this.groupId()}-error`, ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/** Computed */
|
|
75
|
+
columnsStr = computed(() => String(this.columns()), ...(ngDevMode ? [{ debugName: "columnsStr" }] : /* istanbul ignore next */ []));
|
|
76
|
+
effectiveDensity = computed(() => {
|
|
77
|
+
return this.density() ?? 'comfortable';
|
|
78
|
+
}, ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : /* istanbul ignore next */ []));
|
|
79
|
+
isEffectivelyDisabled = computed(() => {
|
|
80
|
+
return this.disabledInput() || this.cvaDisabled();
|
|
81
|
+
}, ...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
|
|
82
|
+
isEffectivelyReadonly = computed(() => {
|
|
83
|
+
return this.readonlyInput();
|
|
84
|
+
}, ...(ngDevMode ? [{ debugName: "isEffectivelyReadonly" }] : /* istanbul ignore next */ []));
|
|
85
|
+
isEffectivelyInvalid = computed(() => {
|
|
86
|
+
return this.invalidInput() ?? this.autoInvalid();
|
|
87
|
+
}, ...(ngDevMode ? [{ debugName: "isEffectivelyInvalid" }] : /* istanbul ignore next */ []));
|
|
88
|
+
isEffectivelyRequired = computed(() => {
|
|
89
|
+
return this.requiredInput();
|
|
90
|
+
}, ...(ngDevMode ? [{ debugName: "isEffectivelyRequired" }] : /* istanbul ignore next */ []));
|
|
91
|
+
labelText = computed(() => {
|
|
92
|
+
const key = this.labelKey();
|
|
93
|
+
if (key) {
|
|
94
|
+
const translated = this.translateService.translate(key);
|
|
95
|
+
return translated !== key ? translated : undefined;
|
|
96
|
+
}
|
|
97
|
+
return this.labelInput();
|
|
98
|
+
}, ...(ngDevMode ? [{ debugName: "labelText" }] : /* istanbul ignore next */ []));
|
|
99
|
+
hintText = computed(() => {
|
|
100
|
+
const key = this.hintKey();
|
|
101
|
+
if (key) {
|
|
102
|
+
const translated = this.translateService.translate(key);
|
|
103
|
+
return translated !== key ? translated : undefined;
|
|
104
|
+
}
|
|
105
|
+
return this.hintInput();
|
|
106
|
+
}, ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
|
|
107
|
+
errorText = computed(() => {
|
|
108
|
+
const key = this.errorKey();
|
|
109
|
+
if (key) {
|
|
110
|
+
const translated = this.translateService.translate(key);
|
|
111
|
+
return translated !== key ? translated : undefined;
|
|
112
|
+
}
|
|
113
|
+
return this.errorInput();
|
|
114
|
+
}, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
115
|
+
selectAllLabelText = computed(() => {
|
|
116
|
+
const customLabel = this.selectAllLabel();
|
|
117
|
+
if (customLabel)
|
|
118
|
+
return customLabel;
|
|
119
|
+
const key = this.selectAllLabelKey();
|
|
120
|
+
if (key) {
|
|
121
|
+
const translated = this.translateService.translate(key);
|
|
122
|
+
if (translated !== key)
|
|
123
|
+
return translated;
|
|
124
|
+
}
|
|
125
|
+
return this.translateService.translate('solaris.checkboxGroup.selectAll');
|
|
126
|
+
}, ...(ngDevMode ? [{ debugName: "selectAllLabelText" }] : /* istanbul ignore next */ []));
|
|
127
|
+
effectiveAriaLabel = computed(() => {
|
|
128
|
+
const key = this.ariaLabelKey();
|
|
129
|
+
if (key) {
|
|
130
|
+
const translated = this.translateService.translate(key);
|
|
131
|
+
return translated !== key ? translated : undefined;
|
|
132
|
+
}
|
|
133
|
+
return this.ariaLabel();
|
|
134
|
+
}, ...(ngDevMode ? [{ debugName: "effectiveAriaLabel" }] : /* istanbul ignore next */ []));
|
|
135
|
+
ariaLabelledBy = computed(() => {
|
|
136
|
+
if (this.labelText()) {
|
|
137
|
+
return this.labelId();
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
141
|
+
ariaDescribedBy = computed(() => {
|
|
142
|
+
const customIds = this._describedByIds();
|
|
143
|
+
const ownIds = [];
|
|
144
|
+
if (this.hintText())
|
|
145
|
+
ownIds.push(this.hintId());
|
|
146
|
+
if (this.showError())
|
|
147
|
+
ownIds.push(this.errorId());
|
|
148
|
+
const all = [...customIds, ...ownIds];
|
|
149
|
+
return all.length > 0 ? all.join(' ') : null;
|
|
150
|
+
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
151
|
+
showError = computed(() => {
|
|
152
|
+
if (this.isEffectivelyInvalid()) {
|
|
153
|
+
return this.errorText() ?? null;
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}, ...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
|
|
157
|
+
/** Select-all computed */
|
|
158
|
+
selectAllChecked = computed(() => {
|
|
159
|
+
const children = this.getEnabledCheckboxes();
|
|
160
|
+
if (children.length === 0)
|
|
161
|
+
return false;
|
|
162
|
+
return children.every((c) => this.isChildValueInValue(c));
|
|
163
|
+
}, ...(ngDevMode ? [{ debugName: "selectAllChecked" }] : /* istanbul ignore next */ []));
|
|
164
|
+
selectAllIndeterminate = computed(() => {
|
|
165
|
+
const children = this.getEnabledCheckboxes();
|
|
166
|
+
if (children.length === 0)
|
|
167
|
+
return false;
|
|
168
|
+
const checkedCount = children.filter((c) => this.isChildValueInValue(c)).length;
|
|
169
|
+
return checkedCount > 0 && checkedCount < children.length;
|
|
170
|
+
}, ...(ngDevMode ? [{ debugName: "selectAllIndeterminate" }] : /* istanbul ignore next */ []));
|
|
171
|
+
/** SolarisFormControl implementation */
|
|
172
|
+
get id() {
|
|
173
|
+
return this.groupId();
|
|
174
|
+
}
|
|
175
|
+
get focused() {
|
|
176
|
+
return this._focused();
|
|
177
|
+
}
|
|
178
|
+
get disabled() {
|
|
179
|
+
return this.isEffectivelyDisabled();
|
|
180
|
+
}
|
|
181
|
+
get readonly() {
|
|
182
|
+
return this.isEffectivelyReadonly();
|
|
183
|
+
}
|
|
184
|
+
get invalid() {
|
|
185
|
+
return this.isEffectivelyInvalid();
|
|
186
|
+
}
|
|
187
|
+
get required() {
|
|
188
|
+
return this.isEffectivelyRequired();
|
|
189
|
+
}
|
|
190
|
+
get describedByIds() {
|
|
191
|
+
return this._describedByIds();
|
|
192
|
+
}
|
|
193
|
+
setDescribedByIds(ids) {
|
|
194
|
+
this._describedByIds.set([...ids]);
|
|
195
|
+
}
|
|
196
|
+
focus() {
|
|
197
|
+
const first = this.checkboxes?.get(0);
|
|
198
|
+
if (first) {
|
|
199
|
+
first.focus();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/** CVA implementation */
|
|
203
|
+
writeValue(value) {
|
|
204
|
+
this._value.set(Array.isArray(value) ? [...value] : []);
|
|
205
|
+
this.syncChildrenToValue();
|
|
206
|
+
}
|
|
207
|
+
registerOnChange(fn) {
|
|
208
|
+
this.onChange = fn;
|
|
209
|
+
}
|
|
210
|
+
registerOnTouched(fn) {
|
|
211
|
+
this.onTouched = fn;
|
|
212
|
+
}
|
|
213
|
+
setDisabledState(isDisabled) {
|
|
214
|
+
this.cvaDisabled.set(isDisabled);
|
|
215
|
+
this.propagateDisabledToChildren();
|
|
216
|
+
}
|
|
217
|
+
/** ContentChildren lifecycle */
|
|
218
|
+
ngAfterContentInit() {
|
|
219
|
+
this.contentInitialized = true;
|
|
220
|
+
this.attachFocusListeners();
|
|
221
|
+
this.initCheckboxes();
|
|
222
|
+
this.syncChildrenToValue();
|
|
223
|
+
this.propagateDisabledToChildren();
|
|
224
|
+
this.propagateReadonlyToChildren();
|
|
225
|
+
this.checkboxQuerySubscription = this.checkboxes.changes.subscribe(() => {
|
|
226
|
+
this.initCheckboxes();
|
|
227
|
+
this.syncChildrenToValue();
|
|
228
|
+
this.propagateDisabledToChildren();
|
|
229
|
+
this.propagateReadonlyToChildren();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
ngOnDestroy() {
|
|
233
|
+
this.unsubscribeAllCheckboxes();
|
|
234
|
+
if (this.checkboxQuerySubscription) {
|
|
235
|
+
this.checkboxQuerySubscription.unsubscribe();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/** Focus tracking */
|
|
239
|
+
attachFocusListeners() {
|
|
240
|
+
if (this.focusListenersAttached)
|
|
241
|
+
return;
|
|
242
|
+
this.focusListenersAttached = true;
|
|
243
|
+
// SECURITY_EXCEPTION: nativeElement.focusin/focusout are standard DOM events for focus tracking. Same pattern used by Solaris FormField.
|
|
244
|
+
const native = this.elementRef.nativeElement;
|
|
245
|
+
this.ngZone.runOutsideAngular(() => {
|
|
246
|
+
native.addEventListener('focusin', () => {
|
|
247
|
+
this.ngZone.run(() => this._focused.set(true));
|
|
248
|
+
});
|
|
249
|
+
native.addEventListener('focusout', (e) => {
|
|
250
|
+
const related = e.relatedTarget;
|
|
251
|
+
if (related && native.contains(related))
|
|
252
|
+
return;
|
|
253
|
+
this.ngZone.run(() => {
|
|
254
|
+
this._focused.set(false);
|
|
255
|
+
this.onTouched();
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/** Init checkbox tracking */
|
|
261
|
+
initCheckboxes() {
|
|
262
|
+
this.unsubscribeAllCheckboxes();
|
|
263
|
+
this.checkboxes.forEach((checkbox) => {
|
|
264
|
+
const sub = checkbox.checkedChange.subscribe((checked) => {
|
|
265
|
+
this.onChildCheckedChange(checkbox, checked);
|
|
266
|
+
});
|
|
267
|
+
this.checkboxCvaSubscriptions.set(checkbox, sub);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
unsubscribeAllCheckboxes() {
|
|
271
|
+
this.checkboxCvaSubscriptions.forEach((sub) => sub.unsubscribe());
|
|
272
|
+
this.checkboxCvaSubscriptions.clear();
|
|
273
|
+
}
|
|
274
|
+
/** Child checkbox interaction */
|
|
275
|
+
onChildCheckedChange(child, checked) {
|
|
276
|
+
if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const childValue = child.value();
|
|
280
|
+
const currentValue = [...this._value()];
|
|
281
|
+
const cmp = this.compareWith();
|
|
282
|
+
if (checked) {
|
|
283
|
+
const exists = currentValue.some((v) => cmp(v, childValue));
|
|
284
|
+
if (!exists) {
|
|
285
|
+
currentValue.push(childValue);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
const index = currentValue.findIndex((v) => cmp(v, childValue));
|
|
290
|
+
if (index !== -1) {
|
|
291
|
+
currentValue.splice(index, 1);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
this.updateValue(currentValue);
|
|
295
|
+
}
|
|
296
|
+
/** Select all interaction */
|
|
297
|
+
onSelectAllChange(checked) {
|
|
298
|
+
if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const children = this.getEnabledCheckboxes();
|
|
302
|
+
const cmp = this.compareWith();
|
|
303
|
+
let currentValue = [...this._value()];
|
|
304
|
+
if (checked) {
|
|
305
|
+
for (const child of children) {
|
|
306
|
+
const childValue = child.value();
|
|
307
|
+
const exists = currentValue.some((v) => cmp(v, childValue));
|
|
308
|
+
if (!exists) {
|
|
309
|
+
currentValue.push(childValue);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
const removeValues = children.map((c) => c.value());
|
|
315
|
+
currentValue = currentValue.filter((v) => !removeValues.some((rv) => cmp(rv, v)));
|
|
316
|
+
}
|
|
317
|
+
this.updateValue(currentValue);
|
|
318
|
+
}
|
|
319
|
+
/** Value update */
|
|
320
|
+
updateValue(newValue) {
|
|
321
|
+
this._value.set(newValue);
|
|
322
|
+
this.syncChildrenToValue();
|
|
323
|
+
this.onChange(newValue);
|
|
324
|
+
this.valueChange.emit(newValue);
|
|
325
|
+
this.change.emit(newValue);
|
|
326
|
+
}
|
|
327
|
+
/** Sync checkboxes to current value */
|
|
328
|
+
syncChildrenToValue() {
|
|
329
|
+
if (!this.contentInitialized || !this.checkboxes)
|
|
330
|
+
return;
|
|
331
|
+
const currentValue = this._value();
|
|
332
|
+
const cmp = this.compareWith();
|
|
333
|
+
this.checkboxes.forEach((checkbox) => {
|
|
334
|
+
const childValue = checkbox.value();
|
|
335
|
+
const isChecked = currentValue.some((v) => cmp(v, childValue));
|
|
336
|
+
checkbox.writeValue(isChecked);
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/** Get enabled (non-disabled, non-readonly) checkboxes */
|
|
340
|
+
getEnabledCheckboxes() {
|
|
341
|
+
if (!this.checkboxes)
|
|
342
|
+
return [];
|
|
343
|
+
return this.checkboxes.filter((c) => !c.disabled && !c.readonly);
|
|
344
|
+
}
|
|
345
|
+
/** Check if a child's value is selected */
|
|
346
|
+
isChildValueInValue(child) {
|
|
347
|
+
const childValue = child.value();
|
|
348
|
+
const cmp = this.compareWith();
|
|
349
|
+
return this._value().some((v) => cmp(v, childValue));
|
|
350
|
+
}
|
|
351
|
+
/** Propagate disabled to children */
|
|
352
|
+
propagateDisabledToChildren() {
|
|
353
|
+
if (!this.contentInitialized || !this.checkboxes)
|
|
354
|
+
return;
|
|
355
|
+
const isDisabled = this.isEffectivelyDisabled();
|
|
356
|
+
this.checkboxes.forEach((checkbox) => {
|
|
357
|
+
checkbox.setDisabledState(isDisabled);
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/** Propagate readonly to children */
|
|
361
|
+
propagateReadonlyToChildren() {
|
|
362
|
+
if (!this.contentInitialized || !this.checkboxes)
|
|
363
|
+
return;
|
|
364
|
+
const isReadonly = this.isEffectivelyReadonly();
|
|
365
|
+
this.checkboxes.forEach((checkbox) => {
|
|
366
|
+
checkbox.setCvaReadonlyState(isReadonly);
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/** Effect: propagate disabled/readonly when inputs change */
|
|
370
|
+
_propagateEffect = effect(() => {
|
|
371
|
+
if (!this.contentInitialized)
|
|
372
|
+
return;
|
|
373
|
+
this.isEffectivelyDisabled();
|
|
374
|
+
this.isEffectivelyReadonly();
|
|
375
|
+
this.propagateDisabledToChildren();
|
|
376
|
+
this.propagateReadonlyToChildren();
|
|
377
|
+
}, ...(ngDevMode ? [{ debugName: "_propagateEffect" }] : /* istanbul ignore next */ []));
|
|
378
|
+
/** Effect: re-validate on value/min/max changes */
|
|
379
|
+
_validateEffect = effect(() => {
|
|
380
|
+
this._value();
|
|
381
|
+
this.minSelected();
|
|
382
|
+
this.maxSelected();
|
|
383
|
+
this.validateBounds();
|
|
384
|
+
}, ...(ngDevMode ? [{ debugName: "_validateEffect" }] : /* istanbul ignore next */ []));
|
|
385
|
+
validateBounds() {
|
|
386
|
+
const count = this._value().length;
|
|
387
|
+
const min = this.minSelected();
|
|
388
|
+
const max = this.maxSelected();
|
|
389
|
+
const isOutOfBounds = (min != null && count < min) || (max != null && count > max);
|
|
390
|
+
this.autoInvalid.set(!!isOutOfBounds);
|
|
391
|
+
}
|
|
392
|
+
constructor() {
|
|
393
|
+
super();
|
|
394
|
+
}
|
|
395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisCheckboxGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisCheckboxGroupComponent, isStandalone: true, selector: "solaris-checkbox-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, labelInput: { classPropertyName: "labelInput", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, hintInput: { classPropertyName: "hintInput", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, hintKey: { classPropertyName: "hintKey", publicName: "hintKey", isSignal: true, isRequired: false, transformFunction: null }, errorInput: { classPropertyName: "errorInput", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, minSelected: { classPropertyName: "minSelected", publicName: "minSelected", isSignal: true, isRequired: false, transformFunction: null }, maxSelected: { classPropertyName: "maxSelected", publicName: "maxSelected", isSignal: true, isRequired: false, transformFunction: null }, selectAll: { classPropertyName: "selectAll", publicName: "selectAll", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabelKey: { classPropertyName: "selectAllLabelKey", publicName: "selectAllLabelKey", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", change: "change" }, host: { attributes: { "role": "group" }, properties: { "attr.data-orientation": "orientation()", "attr.data-layout": "layout()", "attr.data-columns": "columnsStr()", "attr.data-density": "effectiveDensity()", "attr.data-size": "size()", "attr.data-disabled": "isEffectivelyDisabled() ? \"\" : null", "attr.data-readonly": "isEffectivelyReadonly() ? \"\" : null", "attr.data-invalid": "isEffectivelyInvalid() ? \"\" : null", "attr.data-select-all": "selectAll() ? \"\" : null", "attr.aria-label": "effectiveAriaLabel() ?? null", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-describedby": "ariaDescribedBy()", "attr.aria-invalid": "isEffectivelyInvalid() ? \"true\" : null", "attr.aria-required": "isEffectivelyRequired() ? \"true\" : null" } }, providers: [
|
|
397
|
+
{
|
|
398
|
+
provide: NG_VALUE_ACCESSOR,
|
|
399
|
+
useExisting: forwardRef(() => SolarisCheckboxGroupComponent),
|
|
400
|
+
multi: true,
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
provide: SolarisFormControl,
|
|
404
|
+
useExisting: forwardRef(() => SolarisCheckboxGroupComponent),
|
|
405
|
+
},
|
|
406
|
+
], queries: [{ propertyName: "checkboxes", predicate: SolarisCheckboxComponent }], usesInheritance: true, ngImport: i0, template: "@if (labelText(); as text) {\n <span class=\"solaris-checkbox-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n@if (selectAll()) {\n <div class=\"solaris-checkbox-group__select-all\">\n <solaris-checkbox\n [checked]=\"selectAllChecked()\"\n [indeterminate]=\"selectAllIndeterminate()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"isEffectivelyReadonly()\"\n (checkedChange)=\"onSelectAllChange($event)\"\n >\n {{ selectAllLabelText() }}\n </solaris-checkbox>\n </div>\n}\n<div class=\"solaris-checkbox-group__options\" role=\"group\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-checkbox-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-checkbox-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n", styles: [":host{--solaris-checkbox-group-gap: var(--solaris-spacing-3);--solaris-checkbox-group-row-gap: var(--solaris-spacing-3);--solaris-checkbox-group-column-gap: var(--solaris-spacing-3);--solaris-checkbox-group-label-color: var(--solaris-text-strong);--solaris-checkbox-group-hint-color: var(--solaris-text-muted);--solaris-checkbox-group-error-color: var(--solaris-text-danger);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-2);--solaris-checkbox-group-label-font-size: var(--solaris-font-size-sm);--solaris-checkbox-group-label-line-height: var(--solaris-line-height-md);--solaris-checkbox-group-hint-font-size: var(--solaris-font-size-xs);--solaris-checkbox-group-hint-line-height: var(--solaris-line-height-sm);--solaris-checkbox-group-error-font-size: var(--solaris-font-size-xs);--solaris-checkbox-group-error-line-height: var(--solaris-line-height-sm);display:block;box-sizing:border-box}.solaris-checkbox-group__label{display:block;font:var(--solaris-font-weight-medium) var(--solaris-checkbox-group-label-font-size)/var(--solaris-checkbox-group-label-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-label-color);margin:0 0 var(--solaris-spacing-2)}.solaris-checkbox-group__select-all{margin-bottom:var(--solaris-checkbox-group-select-all-gap)}.solaris-checkbox-group__options{display:flex;flex-direction:column;gap:var(--solaris-checkbox-group-gap)}:host([data-orientation=horizontal]) .solaris-checkbox-group__options{flex-direction:row;flex-wrap:wrap}:host([data-layout=grid]) .solaris-checkbox-group__options{display:grid;grid-template-columns:1fr;gap:var(--solaris-checkbox-group-row-gap) var(--solaris-checkbox-group-column-gap)}:host([data-layout=grid][data-columns=\"2\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(2,1fr)}:host([data-layout=grid][data-columns=\"3\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(3,1fr)}:host([data-layout=grid][data-columns=\"4\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(4,1fr)}:host([data-layout=grid][data-columns=auto]) .solaris-checkbox-group__options{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))}:host([data-density=compact]){--solaris-checkbox-group-gap: var(--solaris-spacing-2);--solaris-checkbox-group-row-gap: var(--solaris-spacing-2);--solaris-checkbox-group-column-gap: var(--solaris-spacing-2);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-1)}:host([data-density=comfortable]){--solaris-checkbox-group-gap: var(--solaris-spacing-4);--solaris-checkbox-group-row-gap: var(--solaris-spacing-4);--solaris-checkbox-group-column-gap: var(--solaris-spacing-4);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-3)}:host([data-disabled]){opacity:.5;cursor:not-allowed}:host([data-readonly]){cursor:default}.solaris-checkbox-group__hint{font:var(--solaris-font-weight-regular) var(--solaris-checkbox-group-hint-font-size)/var(--solaris-checkbox-group-hint-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-hint-color);margin:var(--solaris-spacing-1) 0 0}.solaris-checkbox-group__error{font:var(--solaris-font-weight-regular) var(--solaris-checkbox-group-error-font-size)/var(--solaris-checkbox-group-error-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-error-color);margin:var(--solaris-spacing-1) 0 0}\n"], dependencies: [{ kind: "component", type: SolarisCheckboxComponent, selector: "solaris-checkbox", inputs: ["checked", "indeterminate", "disabled", "readonly", "required", "invalid", "appearance", "color", "size", "density", "radius", "label", "labelKey", "name", "value", "ariaLabel", "ariaLabelKey"], outputs: ["checkedChange", "indeterminateChange", "change"] }] });
|
|
407
|
+
}
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisCheckboxGroupComponent, decorators: [{
|
|
409
|
+
type: Component,
|
|
410
|
+
args: [{ selector: 'solaris-checkbox-group', standalone: true, imports: [SolarisCheckboxComponent], providers: [
|
|
411
|
+
{
|
|
412
|
+
provide: NG_VALUE_ACCESSOR,
|
|
413
|
+
useExisting: forwardRef(() => SolarisCheckboxGroupComponent),
|
|
414
|
+
multi: true,
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
provide: SolarisFormControl,
|
|
418
|
+
useExisting: forwardRef(() => SolarisCheckboxGroupComponent),
|
|
419
|
+
},
|
|
420
|
+
], host: {
|
|
421
|
+
role: 'group',
|
|
422
|
+
'[attr.data-orientation]': 'orientation()',
|
|
423
|
+
'[attr.data-layout]': 'layout()',
|
|
424
|
+
'[attr.data-columns]': 'columnsStr()',
|
|
425
|
+
'[attr.data-density]': 'effectiveDensity()',
|
|
426
|
+
'[attr.data-size]': 'size()',
|
|
427
|
+
'[attr.data-disabled]': 'isEffectivelyDisabled() ? "" : null',
|
|
428
|
+
'[attr.data-readonly]': 'isEffectivelyReadonly() ? "" : null',
|
|
429
|
+
'[attr.data-invalid]': 'isEffectivelyInvalid() ? "" : null',
|
|
430
|
+
'[attr.data-select-all]': 'selectAll() ? "" : null',
|
|
431
|
+
'[attr.aria-label]': 'effectiveAriaLabel() ?? null',
|
|
432
|
+
'[attr.aria-labelledby]': 'ariaLabelledBy()',
|
|
433
|
+
'[attr.aria-describedby]': 'ariaDescribedBy()',
|
|
434
|
+
'[attr.aria-invalid]': 'isEffectivelyInvalid() ? "true" : null',
|
|
435
|
+
'[attr.aria-required]': 'isEffectivelyRequired() ? "true" : null',
|
|
436
|
+
}, template: "@if (labelText(); as text) {\n <span class=\"solaris-checkbox-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n@if (selectAll()) {\n <div class=\"solaris-checkbox-group__select-all\">\n <solaris-checkbox\n [checked]=\"selectAllChecked()\"\n [indeterminate]=\"selectAllIndeterminate()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"isEffectivelyReadonly()\"\n (checkedChange)=\"onSelectAllChange($event)\"\n >\n {{ selectAllLabelText() }}\n </solaris-checkbox>\n </div>\n}\n<div class=\"solaris-checkbox-group__options\" role=\"group\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-checkbox-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-checkbox-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n", styles: [":host{--solaris-checkbox-group-gap: var(--solaris-spacing-3);--solaris-checkbox-group-row-gap: var(--solaris-spacing-3);--solaris-checkbox-group-column-gap: var(--solaris-spacing-3);--solaris-checkbox-group-label-color: var(--solaris-text-strong);--solaris-checkbox-group-hint-color: var(--solaris-text-muted);--solaris-checkbox-group-error-color: var(--solaris-text-danger);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-2);--solaris-checkbox-group-label-font-size: var(--solaris-font-size-sm);--solaris-checkbox-group-label-line-height: var(--solaris-line-height-md);--solaris-checkbox-group-hint-font-size: var(--solaris-font-size-xs);--solaris-checkbox-group-hint-line-height: var(--solaris-line-height-sm);--solaris-checkbox-group-error-font-size: var(--solaris-font-size-xs);--solaris-checkbox-group-error-line-height: var(--solaris-line-height-sm);display:block;box-sizing:border-box}.solaris-checkbox-group__label{display:block;font:var(--solaris-font-weight-medium) var(--solaris-checkbox-group-label-font-size)/var(--solaris-checkbox-group-label-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-label-color);margin:0 0 var(--solaris-spacing-2)}.solaris-checkbox-group__select-all{margin-bottom:var(--solaris-checkbox-group-select-all-gap)}.solaris-checkbox-group__options{display:flex;flex-direction:column;gap:var(--solaris-checkbox-group-gap)}:host([data-orientation=horizontal]) .solaris-checkbox-group__options{flex-direction:row;flex-wrap:wrap}:host([data-layout=grid]) .solaris-checkbox-group__options{display:grid;grid-template-columns:1fr;gap:var(--solaris-checkbox-group-row-gap) var(--solaris-checkbox-group-column-gap)}:host([data-layout=grid][data-columns=\"2\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(2,1fr)}:host([data-layout=grid][data-columns=\"3\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(3,1fr)}:host([data-layout=grid][data-columns=\"4\"]) .solaris-checkbox-group__options{grid-template-columns:repeat(4,1fr)}:host([data-layout=grid][data-columns=auto]) .solaris-checkbox-group__options{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))}:host([data-density=compact]){--solaris-checkbox-group-gap: var(--solaris-spacing-2);--solaris-checkbox-group-row-gap: var(--solaris-spacing-2);--solaris-checkbox-group-column-gap: var(--solaris-spacing-2);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-1)}:host([data-density=comfortable]){--solaris-checkbox-group-gap: var(--solaris-spacing-4);--solaris-checkbox-group-row-gap: var(--solaris-spacing-4);--solaris-checkbox-group-column-gap: var(--solaris-spacing-4);--solaris-checkbox-group-select-all-gap: var(--solaris-spacing-3)}:host([data-disabled]){opacity:.5;cursor:not-allowed}:host([data-readonly]){cursor:default}.solaris-checkbox-group__hint{font:var(--solaris-font-weight-regular) var(--solaris-checkbox-group-hint-font-size)/var(--solaris-checkbox-group-hint-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-hint-color);margin:var(--solaris-spacing-1) 0 0}.solaris-checkbox-group__error{font:var(--solaris-font-weight-regular) var(--solaris-checkbox-group-error-font-size)/var(--solaris-checkbox-group-error-line-height) var(--solaris-font-family-sans);color:var(--solaris-checkbox-group-error-color);margin:var(--solaris-spacing-1) 0 0}\n"] }]
|
|
437
|
+
}], ctorParameters: () => [], propDecorators: { checkboxes: [{
|
|
438
|
+
type: ContentChildren,
|
|
439
|
+
args: [SolarisCheckboxComponent]
|
|
440
|
+
}], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], labelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], hintInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], hintKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintKey", required: false }] }], errorInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorKey", required: false }] }], minSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSelected", required: false }] }], maxSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelected", required: false }] }], selectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAll", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], selectAllLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabelKey", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], change: [{ type: i0.Output, args: ["change"] }] } });
|
|
441
|
+
//# sourceMappingURL=checkbox-group.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/checkbox-group/component/checkbox-group.component.ts","../../../../../../../../../packages/angular/src/lib/components/forms/checkbox-group/component/checkbox-group.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,eAAe,EAIf,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAA6B,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;;AAU3E,IAAI,MAAM,GAAG,CAAC,CAAC;AAEf,SAAS,UAAU;IACjB,OAAO,0BAA0B,EAAE,MAAM,EAAE,CAAC;AAC9C,CAAC;AAED,SAAS,cAAc,CAAC,CAAU,EAAE,CAAU;IAC5C,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC;AAqCD,MAAM,OAAO,6BACX,SAAQ,kBAAkB;IAGT,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IACzD,gBAAgB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;I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aAC7D;SACF,qDA6BgB,wBAAwB,oDCpF3C,63BA+BA,i2GDaY,wBAAwB;;4FAgCvB,6BAA6B;kBAnCzC,SAAS;+BACE,wBAAwB,cACtB,IAAI,WACP,CAAC,wBAAwB,CAAC,aACxB;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;4BAC5D,KAAK,EAAE,IAAI;yBACZ;wBACD;4BACE,OAAO,EAAE,kBAAkB;4BAC3B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;yBAC7D;qBACF,QAGK;wBACJ,IAAI,EAAE,OAAO;wBACb,yBAAyB,EAAE,eAAe;wBAC1C,oBAAoB,EAAE,UAAU;wBAChC,qBAAqB,EAAE,cAAc;wBACrC,qBAAqB,EAAE,oBAAoB;wBAC3C,kBAAkB,EAAE,QAAQ;wBAC5B,sBAAsB,EAAE,qCAAqC;wBAC7D,sBAAsB,EAAE,qCAAqC;wBAC7D,qBAAqB,EAAE,oCAAoC;wBAC3D,wBAAwB,EAAE,yBAAyB;wBACnD,mBAAmB,EAAE,8BAA8B;wBACnD,wBAAwB,EAAE,kBAAkB;wBAC5C,yBAAyB,EAAE,mBAAmB;wBAC9C,qBAAqB,EAAE,wCAAwC;wBAC/D,sBAAsB,EAAE,yCAAyC;qBAClE;;sBAUA,eAAe;uBAAC,wBAAwB","sourcesContent":["import {\n Component,\n input,\n output,\n computed,\n signal,\n effect,\n forwardRef,\n inject,\n ElementRef,\n ContentChildren,\n QueryList,\n type AfterContentInit,\n type OnDestroy,\n NgZone,\n} from '@angular/core';\nimport { type Subscription } from 'rxjs';\nimport { NG_VALUE_ACCESSOR, type ControlValueAccessor } from '@angular/forms';\n\nimport { SolarisFormControl } from '../../form-field/model/form-control.contract';\nimport { SolarisCheckboxComponent } from '../../checkbox/component/checkbox.component';\nimport { SolarisTranslateService } from '../../../../services/translation';\n\nimport type {\n SolarisCheckboxGroupOrientation,\n SolarisCheckboxGroupLayout,\n SolarisCheckboxGroupColumns,\n SolarisCheckboxGroupDensity,\n SolarisCheckboxGroupSize,\n} from '../model/checkbox-group.types';\n\nlet nextId = 0;\n\nfunction generateId(): string {\n return `solaris-checkbox-group-${++nextId}`;\n}\n\nfunction defaultCompare(a: unknown, b: unknown): boolean {\n return Object.is(a, b);\n}\n\n@Component({\n selector: 'solaris-checkbox-group',\n standalone: true,\n imports: [SolarisCheckboxComponent],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SolarisCheckboxGroupComponent),\n multi: true,\n },\n {\n provide: SolarisFormControl,\n useExisting: forwardRef(() => SolarisCheckboxGroupComponent),\n },\n ],\n templateUrl: './checkbox-group.component.html',\n styleUrls: ['./checkbox-group.component.scss'],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-layout]': 'layout()',\n '[attr.data-columns]': 'columnsStr()',\n '[attr.data-density]': 'effectiveDensity()',\n '[attr.data-size]': 'size()',\n '[attr.data-disabled]': 'isEffectivelyDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'isEffectivelyReadonly() ? \"\" : null',\n '[attr.data-invalid]': 'isEffectivelyInvalid() ? \"\" : null',\n '[attr.data-select-all]': 'selectAll() ? \"\" : null',\n '[attr.aria-label]': 'effectiveAriaLabel() ?? null',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[attr.aria-invalid]': 'isEffectivelyInvalid() ? \"true\" : null',\n '[attr.aria-required]': 'isEffectivelyRequired() ? \"true\" : null',\n },\n})\nexport class SolarisCheckboxGroupComponent\n extends SolarisFormControl\n implements ControlValueAccessor, AfterContentInit, OnDestroy\n{\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly translateService = inject(SolarisTranslateService);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(SolarisCheckboxComponent)\n protected checkboxes!: QueryList<SolarisCheckboxComponent>;\n\n /** Inputs */\n readonly orientation = input<SolarisCheckboxGroupOrientation>('vertical');\n readonly layout = input<SolarisCheckboxGroupLayout>('list');\n readonly columns = input<SolarisCheckboxGroupColumns>(1);\n readonly density = input<SolarisCheckboxGroupDensity>();\n readonly size = input<SolarisCheckboxGroupSize>('md');\n readonly disabledInput = input<boolean, boolean>(false, {\n alias: 'disabled',\n transform: (v: boolean) => v ?? false,\n });\n readonly readonlyInput = input<boolean, boolean>(false, {\n alias: 'readonly',\n transform: (v: boolean) => v ?? false,\n });\n readonly requiredInput = input<boolean, boolean>(false, {\n alias: 'required',\n transform: (v: boolean) => v ?? false,\n });\n readonly invalidInput = input<boolean | undefined>(undefined, {\n alias: 'invalid',\n });\n readonly labelInput = input<string>(undefined, { alias: 'label' });\n readonly labelKey = input<string>();\n readonly hintInput = input<string>(undefined, { alias: 'hint' });\n readonly hintKey = input<string>();\n readonly errorInput = input<string>(undefined, { alias: 'error' });\n readonly errorKey = input<string>();\n readonly minSelected = input<number>();\n readonly maxSelected = input<number>();\n readonly selectAll = input<boolean>(false);\n readonly selectAllLabel = input<string>();\n readonly selectAllLabelKey = input<string>();\n readonly compareWith =\n input<(a: unknown, b: unknown) => boolean>(defaultCompare);\n readonly ariaLabel = input<string>();\n readonly ariaLabelKey = input<string>();\n\n /** Outputs */\n readonly valueChange = output<unknown[]>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly change = output<unknown[]>();\n\n /** Internal state */\n private readonly _value = signal<unknown[]>([]);\n private readonly _focused = signal(false);\n private readonly _describedByIds = signal<string[]>([]);\n private readonly cvaDisabled = signal(false);\n private readonly autoInvalid = signal(false);\n\n /** CVA callbacks */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: unknown[]) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n /** Subscriptions cleanup */\n private readonly checkboxCvaSubscriptions = new Map<\n SolarisCheckboxComponent,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any\n >();\n private contentInitialized = false;\n private checkboxQuerySubscription: Subscription | null = null;\n private focusListenersAttached = false;\n\n /** IDs */\n protected readonly groupId = computed(() => {\n // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK and Solaris Checkbox.\n return this.elementRef.nativeElement.getAttribute('id') || generateId();\n });\n protected readonly labelId = computed(() => `${this.groupId()}-label`);\n protected readonly hintId = computed(() => `${this.groupId()}-hint`);\n protected readonly errorId = computed(() => `${this.groupId()}-error`);\n\n /** Computed */\n protected readonly columnsStr = computed(() => String(this.columns()));\n\n protected readonly effectiveDensity = computed<SolarisCheckboxGroupDensity>(\n () => {\n return this.density() ?? 'comfortable';\n },\n );\n\n protected readonly isEffectivelyDisabled = computed(() => {\n return this.disabledInput() || this.cvaDisabled();\n });\n\n protected readonly isEffectivelyReadonly = computed(() => {\n return this.readonlyInput();\n });\n\n protected readonly isEffectivelyInvalid = computed(() => {\n return this.invalidInput() ?? this.autoInvalid();\n });\n\n protected readonly isEffectivelyRequired = computed(() => {\n return this.requiredInput();\n });\n\n protected readonly labelText = computed(() => {\n const key = this.labelKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.labelInput();\n });\n\n protected readonly hintText = computed(() => {\n const key = this.hintKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.hintInput();\n });\n\n protected readonly errorText = computed(() => {\n const key = this.errorKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.errorInput();\n });\n\n protected readonly selectAllLabelText = computed(() => {\n const customLabel = this.selectAllLabel();\n if (customLabel) return customLabel;\n const key = this.selectAllLabelKey();\n if (key) {\n const translated = this.translateService.translate(key);\n if (translated !== key) return translated;\n }\n return this.translateService.translate('solaris.checkboxGroup.selectAll');\n });\n\n protected readonly effectiveAriaLabel = computed(() => {\n const key = this.ariaLabelKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.ariaLabel();\n });\n\n protected readonly ariaLabelledBy = computed(() => {\n if (this.labelText()) {\n return this.labelId();\n }\n return null;\n });\n\n protected readonly ariaDescribedBy = computed(() => {\n const customIds = this._describedByIds();\n const ownIds: string[] = [];\n if (this.hintText()) ownIds.push(this.hintId());\n if (this.showError()) ownIds.push(this.errorId());\n const all = [...customIds, ...ownIds];\n return all.length > 0 ? all.join(' ') : null;\n });\n\n protected readonly showError = computed(() => {\n if (this.isEffectivelyInvalid()) {\n return this.errorText() ?? null;\n }\n return null;\n });\n\n /** Select-all computed */\n protected readonly selectAllChecked = computed(() => {\n const children = this.getEnabledCheckboxes();\n if (children.length === 0) return false;\n return children.every((c) => this.isChildValueInValue(c));\n });\n\n protected readonly selectAllIndeterminate = computed(() => {\n const children = this.getEnabledCheckboxes();\n if (children.length === 0) return false;\n const checkedCount = children.filter((c) =>\n this.isChildValueInValue(c),\n ).length;\n return checkedCount > 0 && checkedCount < children.length;\n });\n\n /** SolarisFormControl implementation */\n get id(): string {\n return this.groupId();\n }\n\n get focused(): boolean {\n return this._focused();\n }\n\n get disabled(): boolean {\n return this.isEffectivelyDisabled();\n }\n\n get readonly(): boolean {\n return this.isEffectivelyReadonly();\n }\n\n get invalid(): boolean {\n return this.isEffectivelyInvalid();\n }\n\n get required(): boolean {\n return this.isEffectivelyRequired();\n }\n\n get describedByIds(): string[] {\n return this._describedByIds();\n }\n\n setDescribedByIds(ids: string[]): void {\n this._describedByIds.set([...ids]);\n }\n\n focus(): void {\n const first = this.checkboxes?.get(0);\n if (first) {\n first.focus();\n }\n }\n\n /** CVA implementation */\n writeValue(value: unknown[] | null): void {\n this._value.set(Array.isArray(value) ? [...value] : []);\n this.syncChildrenToValue();\n }\n\n registerOnChange(fn: (value: unknown[]) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n this.propagateDisabledToChildren();\n }\n\n /** ContentChildren lifecycle */\n ngAfterContentInit(): void {\n this.contentInitialized = true;\n this.attachFocusListeners();\n this.initCheckboxes();\n this.syncChildrenToValue();\n this.propagateDisabledToChildren();\n this.propagateReadonlyToChildren();\n\n this.checkboxQuerySubscription = this.checkboxes.changes.subscribe(() => {\n this.initCheckboxes();\n this.syncChildrenToValue();\n this.propagateDisabledToChildren();\n this.propagateReadonlyToChildren();\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribeAllCheckboxes();\n if (this.checkboxQuerySubscription) {\n this.checkboxQuerySubscription.unsubscribe();\n }\n }\n\n /** Focus tracking */\n private attachFocusListeners(): void {\n if (this.focusListenersAttached) return;\n this.focusListenersAttached = true;\n\n // SECURITY_EXCEPTION: nativeElement.focusin/focusout are standard DOM events for focus tracking. Same pattern used by Solaris FormField.\n const native = this.elementRef.nativeElement;\n this.ngZone.runOutsideAngular(() => {\n native.addEventListener('focusin', () => {\n this.ngZone.run(() => this._focused.set(true));\n });\n native.addEventListener('focusout', (e: FocusEvent) => {\n const related = e.relatedTarget as Node | null;\n if (related && native.contains(related)) return;\n this.ngZone.run(() => {\n this._focused.set(false);\n this.onTouched();\n });\n });\n });\n }\n\n /** Init checkbox tracking */\n private initCheckboxes(): void {\n this.unsubscribeAllCheckboxes();\n this.checkboxes.forEach((checkbox) => {\n const sub = checkbox.checkedChange.subscribe((checked: boolean) => {\n this.onChildCheckedChange(checkbox, checked);\n });\n this.checkboxCvaSubscriptions.set(checkbox, sub);\n });\n }\n\n private unsubscribeAllCheckboxes(): void {\n this.checkboxCvaSubscriptions.forEach((sub) => sub.unsubscribe());\n this.checkboxCvaSubscriptions.clear();\n }\n\n /** Child checkbox interaction */\n private onChildCheckedChange(\n child: SolarisCheckboxComponent,\n checked: boolean,\n ): void {\n if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {\n return;\n }\n\n const childValue = child.value();\n const currentValue = [...this._value()];\n const cmp = this.compareWith();\n\n if (checked) {\n const exists = currentValue.some((v) => cmp(v, childValue));\n if (!exists) {\n currentValue.push(childValue);\n }\n } else {\n const index = currentValue.findIndex((v) => cmp(v, childValue));\n if (index !== -1) {\n currentValue.splice(index, 1);\n }\n }\n\n this.updateValue(currentValue);\n }\n\n /** Select all interaction */\n protected onSelectAllChange(checked: boolean): void {\n if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {\n return;\n }\n\n const children = this.getEnabledCheckboxes();\n const cmp = this.compareWith();\n let currentValue = [...this._value()];\n\n if (checked) {\n for (const child of children) {\n const childValue = child.value();\n const exists = currentValue.some((v) => cmp(v, childValue));\n if (!exists) {\n currentValue.push(childValue);\n }\n }\n } else {\n const removeValues = children.map((c) => c.value());\n currentValue = currentValue.filter(\n (v) => !removeValues.some((rv) => cmp(rv, v)),\n );\n }\n\n this.updateValue(currentValue);\n }\n\n /** Value update */\n private updateValue(newValue: unknown[]): void {\n this._value.set(newValue);\n this.syncChildrenToValue();\n this.onChange(newValue);\n this.valueChange.emit(newValue);\n this.change.emit(newValue);\n }\n\n /** Sync checkboxes to current value */\n private syncChildrenToValue(): void {\n if (!this.contentInitialized || !this.checkboxes) return;\n const currentValue = this._value();\n const cmp = this.compareWith();\n\n this.checkboxes.forEach((checkbox) => {\n const childValue = checkbox.value();\n const isChecked = currentValue.some((v) => cmp(v, childValue));\n checkbox.writeValue(isChecked);\n });\n }\n\n /** Get enabled (non-disabled, non-readonly) checkboxes */\n private getEnabledCheckboxes(): SolarisCheckboxComponent[] {\n if (!this.checkboxes) return [];\n return this.checkboxes.filter((c) => !c.disabled && !c.readonly);\n }\n\n /** Check if a child's value is selected */\n private isChildValueInValue(child: SolarisCheckboxComponent): boolean {\n const childValue = child.value();\n const cmp = this.compareWith();\n return this._value().some((v) => cmp(v, childValue));\n }\n\n /** Propagate disabled to children */\n private propagateDisabledToChildren(): void {\n if (!this.contentInitialized || !this.checkboxes) return;\n const isDisabled = this.isEffectivelyDisabled();\n this.checkboxes.forEach((checkbox) => {\n checkbox.setDisabledState(isDisabled);\n });\n }\n\n /** Propagate readonly to children */\n private propagateReadonlyToChildren(): void {\n if (!this.contentInitialized || !this.checkboxes) return;\n const isReadonly = this.isEffectivelyReadonly();\n this.checkboxes.forEach((checkbox) => {\n checkbox.setCvaReadonlyState(isReadonly);\n });\n }\n\n /** Effect: propagate disabled/readonly when inputs change */\n private readonly _propagateEffect = effect(() => {\n if (!this.contentInitialized) return;\n this.isEffectivelyDisabled();\n this.isEffectivelyReadonly();\n this.propagateDisabledToChildren();\n this.propagateReadonlyToChildren();\n });\n\n /** Effect: re-validate on value/min/max changes */\n private readonly _validateEffect = effect(() => {\n this._value();\n this.minSelected();\n this.maxSelected();\n this.validateBounds();\n });\n\n private validateBounds(): void {\n const count = this._value().length;\n const min = this.minSelected();\n const max = this.maxSelected();\n const isOutOfBounds =\n (min != null && count < min) || (max != null && count > max);\n this.autoInvalid.set(!!isOutOfBounds);\n }\n\n constructor() {\n super();\n }\n}\n","@if (labelText(); as text) {\n <span class=\"solaris-checkbox-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n@if (selectAll()) {\n <div class=\"solaris-checkbox-group__select-all\">\n <solaris-checkbox\n [checked]=\"selectAllChecked()\"\n [indeterminate]=\"selectAllIndeterminate()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"isEffectivelyReadonly()\"\n (checkedChange)=\"onSelectAllChange($event)\"\n >\n {{ selectAllLabelText() }}\n </solaris-checkbox>\n </div>\n}\n<div class=\"solaris-checkbox-group__options\" role=\"group\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-checkbox-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-checkbox-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=checkbox-group.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/checkbox-group/model/checkbox-group.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SolarisCheckboxGroupOrientation = 'vertical' | 'horizontal';\nexport type SolarisCheckboxGroupLayout = 'list' | 'grid';\nexport type SolarisCheckboxGroupColumns = 1 | 2 | 3 | 4 | 'auto';\nexport type SolarisCheckboxGroupDensity = 'compact' | 'comfortable';\nexport type SolarisCheckboxGroupSize = 'sm' | 'md' | 'lg';\n"]}
|