@educarehq/solaris-ui 0.2.0 → 0.3.1
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/fesm2022/educarehq-solaris-ui.mjs +12261 -0
- package/fesm2022/educarehq-solaris-ui.mjs.map +1 -0
- package/package.json +5 -5
- package/styles/_button.scss +510 -510
- package/styles/_dropdown-menu.scss +72 -0
- package/styles/_icon-button.scss +481 -481
- package/styles/_input.scss +255 -255
- package/styles/_popover.scss +73 -68
- package/styles/_theme.scss +46 -36
- package/styles/_toast.scss +9 -0
- package/styles/token/border/_border.scss +5 -0
- package/styles/token/border/_index.scss +1 -0
- package/styles/token/color/_dark.scss +78 -0
- package/styles/token/color/_high-contrast.scss +27 -0
- package/styles/token/color/_index.scss +3 -0
- package/styles/token/color/_light.scss +69 -0
- package/styles/token/density/_comfortable.scss +15 -0
- package/styles/token/density/_compact.scss +15 -0
- package/styles/token/density/_index.scss +2 -0
- package/styles/token/motion/_index.scss +2 -0
- package/styles/token/motion/_motion.scss +15 -0
- package/styles/token/motion/_reduced-motion.scss +15 -0
- package/styles/token/opacity/_index.scss +1 -0
- package/styles/token/opacity/_opacity.scss +4 -0
- package/styles/token/radius/_index.scss +1 -0
- package/styles/token/radius/_radius.scss +8 -0
- package/styles/token/shadow/_index.scss +1 -0
- package/styles/token/shadow/_shadow.scss +26 -0
- package/styles/token/spacing/_index.scss +1 -0
- package/styles/token/spacing/_spacing.scss +15 -0
- package/styles/token/typography/_font-family.scss +13 -0
- package/styles/token/typography/_index.scss +2 -0
- package/styles/token/typography/_typography.scss +25 -0
- package/styles/token/z-index/_index.scss +1 -0
- package/styles/token/z-index/_z-index.scss +10 -0
- package/types/educarehq-solaris-ui.d.ts +3201 -0
- package/educarehq-solaris-ui.d.ts +0 -5
- package/esm2022/educarehq-solaris-ui.js +0 -5
- package/esm2022/educarehq-solaris-ui.js.map +0 -1
- package/esm2022/index.js +0 -70
- package/esm2022/index.js.map +0 -1
- package/esm2022/lib/components/actions/button/directives/button-icon.directive.js +0 -17
- package/esm2022/lib/components/actions/button/directives/button-icon.directive.js.map +0 -1
- package/esm2022/lib/components/actions/button/directives/button.directive.js +0 -60
- package/esm2022/lib/components/actions/button/directives/button.directive.js.map +0 -1
- package/esm2022/lib/components/actions/button/model/button.types.js +0 -1
- package/esm2022/lib/components/actions/button/model/button.types.js.map +0 -1
- package/esm2022/lib/components/actions/button-group/component/button-group.component.js +0 -21
- package/esm2022/lib/components/actions/button-group/component/button-group.component.js.map +0 -1
- package/esm2022/lib/components/actions/button-group/model/button-group.types.js +0 -1
- package/esm2022/lib/components/actions/button-group/model/button-group.types.js.map +0 -1
- package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js +0 -17
- package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js.map +0 -1
- package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js +0 -58
- package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js.map +0 -1
- package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js +0 -1
- package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js.map +0 -1
- package/esm2022/lib/components/data-display/badge/component/badge.component.js +0 -24
- package/esm2022/lib/components/data-display/badge/component/badge.component.js.map +0 -1
- package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js +0 -17
- package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/badge/model/badge.types.js +0 -1
- package/esm2022/lib/components/data-display/badge/model/badge.types.js.map +0 -1
- package/esm2022/lib/components/data-display/card/component/card.component.js +0 -20
- package/esm2022/lib/components/data-display/card/component/card.component.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-content.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-content.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-description.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-description.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js +0 -19
- package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-header.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-header.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-media.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-media.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/directives/card-title.directive.js +0 -17
- package/esm2022/lib/components/data-display/card/directives/card-title.directive.js.map +0 -1
- package/esm2022/lib/components/data-display/card/model/card.types.js +0 -1
- package/esm2022/lib/components/data-display/card/model/card.types.js.map +0 -1
- package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js +0 -18
- package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js.map +0 -1
- package/esm2022/lib/components/feedback/alert/component/alert.component.js +0 -90
- package/esm2022/lib/components/feedback/alert/component/alert.component.js.map +0 -1
- package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js +0 -17
- package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js.map +0 -1
- package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js +0 -17
- package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js.map +0 -1
- package/esm2022/lib/components/feedback/alert/model/alert.types.js +0 -1
- package/esm2022/lib/components/feedback/alert/model/alert.types.js.map +0 -1
- package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js +0 -69
- package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js.map +0 -1
- package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js +0 -1
- package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js.map +0 -1
- package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js +0 -227
- package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js.map +0 -1
- package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js +0 -1
- package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js.map +0 -1
- package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js +0 -441
- package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js.map +0 -1
- package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js +0 -1
- package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js.map +0 -1
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js +0 -214
- package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +0 -1
- package/esm2022/lib/components/forms/email-field/model/email-field.types.js +0 -1
- package/esm2022/lib/components/forms/email-field/model/email-field.types.js.map +0 -1
- package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js +0 -69
- package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/component/form-error.component.js +0 -19
- package/esm2022/lib/components/forms/form-field/component/form-error.component.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js +0 -394
- package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/component/form-hint.component.js +0 -18
- package/esm2022/lib/components/forms/form-field/component/form-hint.component.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/component/form-label.component.js +0 -18
- package/esm2022/lib/components/forms/form-field/component/form-label.component.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js +0 -14
- package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js +0 -17
- package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js +0 -17
- package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/index.js +0 -8
- package/esm2022/lib/components/forms/form-field/index.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/model/form-control.contract.js +0 -3
- package/esm2022/lib/components/forms/form-field/model/form-control.contract.js.map +0 -1
- package/esm2022/lib/components/forms/form-field/model/form-field.types.js +0 -1
- package/esm2022/lib/components/forms/form-field/model/form-field.types.js.map +0 -1
- package/esm2022/lib/components/forms/input/directives/input.directive.js +0 -148
- package/esm2022/lib/components/forms/input/directives/input.directive.js.map +0 -1
- package/esm2022/lib/components/forms/input/index.js +0 -2
- package/esm2022/lib/components/forms/input/index.js.map +0 -1
- package/esm2022/lib/components/forms/input/model/input.defaults.js +0 -27
- package/esm2022/lib/components/forms/input/model/input.defaults.js.map +0 -1
- package/esm2022/lib/components/forms/input/model/input.types.js +0 -1
- package/esm2022/lib/components/forms/input/model/input.types.js.map +0 -1
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +0 -1119
- package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +0 -1
- package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js +0 -1
- package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +0 -1
- package/esm2022/lib/components/forms/option/component/option.component.js +0 -149
- package/esm2022/lib/components/forms/option/component/option.component.js.map +0 -1
- package/esm2022/lib/components/forms/option/directives/option-slots.directive.js +0 -58
- package/esm2022/lib/components/forms/option/directives/option-slots.directive.js.map +0 -1
- package/esm2022/lib/components/forms/option/index.js +0 -3
- package/esm2022/lib/components/forms/option/index.js.map +0 -1
- package/esm2022/lib/components/forms/option/model/option.types.js +0 -1
- package/esm2022/lib/components/forms/option/model/option.types.js.map +0 -1
- package/esm2022/lib/components/forms/option-group/component/option-group.component.js +0 -103
- package/esm2022/lib/components/forms/option-group/component/option-group.component.js.map +0 -1
- package/esm2022/lib/components/forms/option-group/index.js +0 -2
- package/esm2022/lib/components/forms/option-group/index.js.map +0 -1
- package/esm2022/lib/components/forms/option-group/model/option-group.types.js +0 -1
- package/esm2022/lib/components/forms/option-group/model/option-group.types.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js +0 -299
- package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-field-constants.js +0 -5
- package/esm2022/lib/components/forms/password-field/model/password-field-constants.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-field.types.js +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-field.types.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-policy.types.js +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-policy.types.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/model/password-strength.js +0 -67
- package/esm2022/lib/components/forms/password-field/model/password-strength.js.map +0 -1
- package/esm2022/lib/components/forms/password-field/validators/password.validator.js +0 -45
- package/esm2022/lib/components/forms/password-field/validators/password.validator.js.map +0 -1
- package/esm2022/lib/components/forms/radio/component/radio.component.js +0 -219
- package/esm2022/lib/components/forms/radio/component/radio.component.js.map +0 -1
- package/esm2022/lib/components/forms/radio/model/radio.types.js +0 -1
- package/esm2022/lib/components/forms/radio/model/radio.types.js.map +0 -1
- package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js +0 -348
- package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js.map +0 -1
- package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js +0 -3
- package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js.map +0 -1
- package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js +0 -1
- package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js.map +0 -1
- package/esm2022/lib/components/forms/select/component/select.component.js +0 -819
- package/esm2022/lib/components/forms/select/component/select.component.js.map +0 -1
- package/esm2022/lib/components/forms/select/model/select.types.js +0 -1
- package/esm2022/lib/components/forms/select/model/select.types.js.map +0 -1
- package/esm2022/lib/components/forms/switch/component/switch.component.js +0 -211
- package/esm2022/lib/components/forms/switch/component/switch.component.js.map +0 -1
- package/esm2022/lib/components/forms/switch/index.js +0 -2
- package/esm2022/lib/components/forms/switch/index.js.map +0 -1
- package/esm2022/lib/components/forms/switch/model/switch.types.js +0 -1
- package/esm2022/lib/components/forms/switch/model/switch.types.js.map +0 -1
- package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js +0 -369
- package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js.map +0 -1
- package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js +0 -1
- package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js.map +0 -1
- package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js +0 -137
- package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js.map +0 -1
- package/esm2022/lib/components/forms/textarea/model/textarea.types.js +0 -1
- package/esm2022/lib/components/forms/textarea/model/textarea.types.js.map +0 -1
- package/esm2022/lib/components/icon/component/solaris-icon.component.js +0 -20
- package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +0 -1
- package/esm2022/lib/components/icon/index.js +0 -2
- package/esm2022/lib/components/icon/index.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +0 -29
- package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +0 -317
- package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/directives/popover.directive.js +0 -16
- package/esm2022/lib/components/interaction/popover/directives/popover.directive.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/index.js +0 -4
- package/esm2022/lib/components/interaction/popover/index.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/model/popover-position.js +0 -145
- package/esm2022/lib/components/interaction/popover/model/popover-position.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/model/popover.types.js +0 -1
- package/esm2022/lib/components/interaction/popover/model/popover.types.js.map +0 -1
- package/esm2022/lib/components/interaction/popover/token/popover.tokens.js +0 -3
- package/esm2022/lib/components/interaction/popover/token/popover.tokens.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js +0 -23
- package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js +0 -405
- package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/index.js +0 -3
- package/esm2022/lib/components/interaction/tooltip/index.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js +0 -209
- package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js +0 -1
- package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js.map +0 -1
- package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js +0 -3
- package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js.map +0 -1
- package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js +0 -25
- package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js.map +0 -1
- package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js +0 -1
- package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js.map +0 -1
- package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js +0 -1
- package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js.map +0 -1
- package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js +0 -10
- package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js.map +0 -1
- package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js +0 -60
- package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js.map +0 -1
- package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js +0 -10
- package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js.map +0 -1
- package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js +0 -3
- package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js.map +0 -1
- package/esm2022/lib/services/icon/icons/index.js +0 -2
- package/esm2022/lib/services/icon/icons/index.js.map +0 -1
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +0 -207
- package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +0 -1
- package/esm2022/lib/services/icon/index.js +0 -5
- package/esm2022/lib/services/icon/index.js.map +0 -1
- package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js +0 -1
- package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +0 -1
- package/esm2022/lib/services/icon/model/solaris-icon.types.js +0 -1
- package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +0 -1
- package/esm2022/lib/services/icon/provider/provide-solaris-icons.js +0 -10
- package/esm2022/lib/services/icon/provider/provide-solaris-icons.js.map +0 -1
- package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js +0 -43
- package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js.map +0 -1
- package/esm2022/lib/services/icon/token/solaris-icon.tokens.js +0 -3
- package/esm2022/lib/services/icon/token/solaris-icon.tokens.js.map +0 -1
- package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js +0 -1
- package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js.map +0 -1
- package/esm2022/lib/services/theme/model/solaris-theme.types.js +0 -1
- package/esm2022/lib/services/theme/model/solaris-theme.types.js.map +0 -1
- package/esm2022/lib/services/theme/provider/provide-solaris-theme.js +0 -10
- package/esm2022/lib/services/theme/provider/provide-solaris-theme.js.map +0 -1
- package/esm2022/lib/services/theme/service/solaris-theme.service.js +0 -22
- package/esm2022/lib/services/theme/service/solaris-theme.service.js.map +0 -1
- package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js +0 -10
- package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js.map +0 -1
- package/esm2022/lib/services/theme/token/solaris-theme.tokens.js +0 -3
- package/esm2022/lib/services/theme/token/solaris-theme.tokens.js.map +0 -1
- package/esm2022/lib/services/translation/index.js +0 -6
- package/esm2022/lib/services/translation/index.js.map +0 -1
- package/esm2022/lib/services/translation/model/solaris-locale.types.js +0 -1
- package/esm2022/lib/services/translation/model/solaris-locale.types.js.map +0 -1
- package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js +0 -1
- package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js.map +0 -1
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +0 -40
- package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +0 -1
- package/esm2022/lib/services/translation/model/solaris-translation.types.js +0 -1
- package/esm2022/lib/services/translation/model/solaris-translation.types.js.map +0 -1
- package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js +0 -20
- package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js.map +0 -1
- package/esm2022/lib/services/translation/provider/provide-solaris-translate.js +0 -10
- package/esm2022/lib/services/translation/provider/provide-solaris-translate.js.map +0 -1
- package/esm2022/lib/services/translation/service/solaris-translate.service.js +0 -87
- package/esm2022/lib/services/translation/service/solaris-translate.service.js.map +0 -1
- package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js +0 -32
- package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js.map +0 -1
- package/esm2022/lib/services/translation/token/solaris-translate.tokens.js +0 -3
- package/esm2022/lib/services/translation/token/solaris-translate.tokens.js.map +0 -1
- package/esm2022/lib/testing/provide-solaris-testing.js +0 -11
- package/esm2022/lib/testing/provide-solaris-testing.js.map +0 -1
- package/esm2022/lib/testing/solaris-test-utilities.js +0 -12
- package/esm2022/lib/testing/solaris-test-utilities.js.map +0 -1
- package/index.d.ts +0 -106
- package/lib/components/actions/button/directives/button-icon.directive.d.ts +0 -5
- package/lib/components/actions/button/directives/button.directive.d.ts +0 -22
- package/lib/components/actions/button/model/button.types.d.ts +0 -5
- package/lib/components/actions/button-group/component/button-group.component.d.ts +0 -10
- package/lib/components/actions/button-group/model/button-group.types.d.ts +0 -2
- package/lib/components/actions/icon-button/directives/icon-button-badge.directive.d.ts +0 -5
- package/lib/components/actions/icon-button/directives/icon-button.directive.d.ts +0 -21
- package/lib/components/actions/icon-button/model/icon-button.types.d.ts +0 -5
- package/lib/components/data-display/badge/component/badge.component.d.ts +0 -12
- package/lib/components/data-display/badge/directives/badge-icon.directive.d.ts +0 -5
- package/lib/components/data-display/badge/model/badge.types.d.ts +0 -6
- package/lib/components/data-display/card/component/card.component.d.ts +0 -10
- package/lib/components/data-display/card/directives/card-actions.directive.d.ts +0 -5
- package/lib/components/data-display/card/directives/card-content.directive.d.ts +0 -5
- package/lib/components/data-display/card/directives/card-description.directive.d.ts +0 -5
- package/lib/components/data-display/card/directives/card-footer.directive.d.ts +0 -6
- package/lib/components/data-display/card/directives/card-header.directive.d.ts +0 -5
- package/lib/components/data-display/card/directives/card-media.directive.d.ts +0 -5
- package/lib/components/data-display/card/directives/card-title.directive.d.ts +0 -5
- package/lib/components/data-display/card/model/card.types.d.ts +0 -4
- package/lib/components/feedback/alert/component/alert-actions.component.d.ts +0 -5
- package/lib/components/feedback/alert/component/alert.component.d.ts +0 -26
- package/lib/components/feedback/alert/directives/alert-description.directive.d.ts +0 -5
- package/lib/components/feedback/alert/directives/alert-title.directive.d.ts +0 -5
- package/lib/components/feedback/alert/model/alert.types.d.ts +0 -5
- package/lib/components/feedback/skeleton/component/skeleton.component.d.ts +0 -17
- package/lib/components/feedback/skeleton/model/skeleton.types.d.ts +0 -5
- package/lib/components/forms/checkbox/component/checkbox.component.d.ts +0 -70
- package/lib/components/forms/checkbox/model/checkbox.types.d.ts +0 -5
- package/lib/components/forms/checkbox-group/component/checkbox-group.component.d.ts +0 -123
- package/lib/components/forms/checkbox-group/model/checkbox-group.types.d.ts +0 -5
- package/lib/components/forms/email-field/component/email-field.component.d.ts +0 -66
- package/lib/components/forms/email-field/model/email-field.types.d.ts +0 -6
- package/lib/components/forms/email-field/validators/email-field.validators.d.ts +0 -8
- package/lib/components/forms/form-field/component/form-error.component.d.ts +0 -5
- package/lib/components/forms/form-field/component/form-field.component.d.ts +0 -90
- package/lib/components/forms/form-field/component/form-hint.component.d.ts +0 -5
- package/lib/components/forms/form-field/component/form-label.component.d.ts +0 -5
- package/lib/components/forms/form-field/directives/form-field-trigger.directive.d.ts +0 -5
- package/lib/components/forms/form-field/directives/form-prefix.directive.d.ts +0 -5
- package/lib/components/forms/form-field/directives/form-suffix.directive.d.ts +0 -5
- package/lib/components/forms/form-field/index.d.ts +0 -8
- package/lib/components/forms/form-field/model/form-control.contract.d.ts +0 -11
- package/lib/components/forms/form-field/model/form-field.types.d.ts +0 -5
- package/lib/components/forms/input/directives/input.directive.d.ts +0 -37
- package/lib/components/forms/input/index.d.ts +0 -2
- package/lib/components/forms/input/model/input.defaults.d.ts +0 -2
- package/lib/components/forms/input/model/input.types.d.ts +0 -4
- package/lib/components/forms/multi-select/component/multi-select.component.d.ts +0 -202
- package/lib/components/forms/multi-select/model/multi-select.types.d.ts +0 -5
- package/lib/components/forms/option/component/option.component.d.ts +0 -58
- package/lib/components/forms/option/directives/option-slots.directive.d.ts +0 -21
- package/lib/components/forms/option/index.d.ts +0 -3
- package/lib/components/forms/option/model/option.types.d.ts +0 -3
- package/lib/components/forms/option-group/component/option-group.component.d.ts +0 -32
- package/lib/components/forms/option-group/index.d.ts +0 -2
- package/lib/components/forms/option-group/model/option-group.types.d.ts +0 -2
- package/lib/components/forms/password-field/component/password-field.component.d.ts +0 -81
- package/lib/components/forms/password-field/model/password-field-constants.d.ts +0 -4
- package/lib/components/forms/password-field/model/password-field.types.d.ts +0 -6
- package/lib/components/forms/password-field/model/password-policy.types.d.ts +0 -10
- package/lib/components/forms/password-field/model/password-strength.d.ts +0 -2
- package/lib/components/forms/password-field/validators/password.validator.d.ts +0 -3
- package/lib/components/forms/radio/component/radio.component.d.ts +0 -68
- package/lib/components/forms/radio/model/radio.types.d.ts +0 -4
- package/lib/components/forms/radio-group/component/radio-group.component.d.ts +0 -86
- package/lib/components/forms/radio-group/model/radio-group.token.d.ts +0 -2
- package/lib/components/forms/radio-group/model/radio-group.types.d.ts +0 -5
- package/lib/components/forms/select/component/select.component.d.ts +0 -158
- package/lib/components/forms/select/model/select.types.d.ts +0 -4
- package/lib/components/forms/switch/component/switch.component.d.ts +0 -66
- package/lib/components/forms/switch/index.d.ts +0 -2
- package/lib/components/forms/switch/model/switch.types.d.ts +0 -4
- package/lib/components/forms/switch-group/component/switch-group.component.d.ts +0 -91
- package/lib/components/forms/switch-group/model/switch-group.types.d.ts +0 -5
- package/lib/components/forms/textarea/directives/textarea.directive.d.ts +0 -37
- package/lib/components/forms/textarea/model/textarea.types.d.ts +0 -5
- package/lib/components/icon/component/solaris-icon.component.d.ts +0 -13
- package/lib/components/icon/index.d.ts +0 -1
- package/lib/components/interaction/popover/component/popover-panel.component.d.ts +0 -10
- package/lib/components/interaction/popover/directives/popover-trigger.directive.d.ts +0 -65
- package/lib/components/interaction/popover/directives/popover.directive.d.ts +0 -7
- package/lib/components/interaction/popover/index.d.ts +0 -4
- package/lib/components/interaction/popover/model/popover-position.d.ts +0 -4
- package/lib/components/interaction/popover/model/popover.types.d.ts +0 -7
- package/lib/components/interaction/popover/token/popover.tokens.d.ts +0 -12
- package/lib/components/interaction/tooltip/component/tooltip-panel.component.d.ts +0 -9
- package/lib/components/interaction/tooltip/directive/tooltip.directive.d.ts +0 -80
- package/lib/components/interaction/tooltip/index.d.ts +0 -3
- package/lib/components/interaction/tooltip/model/tooltip-position.d.ts +0 -5
- package/lib/components/interaction/tooltip/model/tooltip.types.d.ts +0 -22
- package/lib/components/interaction/tooltip/token/tooltip.tokens.d.ts +0 -21
- package/lib/services/accessibility/directives/visually-hidden.directive.d.ts +0 -5
- package/lib/services/accessibility/model/solaris-accessibility-config.interface.d.ts +0 -4
- package/lib/services/accessibility/model/solaris-accessibility.types.d.ts +0 -5
- package/lib/services/accessibility/provider/provide-solaris-accessibility.d.ts +0 -3
- package/lib/services/accessibility/service/solaris-accessibility.service.d.ts +0 -15
- package/lib/services/accessibility/testing/solaris-accessibility-testing.provider.d.ts +0 -3
- package/lib/services/accessibility/token/solaris-accessibility.tokens.d.ts +0 -3
- package/lib/services/icon/icons/index.d.ts +0 -1
- package/lib/services/icon/icons/solaris-built-in-icons.d.ts +0 -2
- package/lib/services/icon/index.d.ts +0 -8
- package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +0 -36
- package/lib/services/icon/model/solaris-icon.types.d.ts +0 -4
- package/lib/services/icon/provider/provide-solaris-icons.d.ts +0 -3
- package/lib/services/icon/service/solaris-icon-registry.service.d.ts +0 -12
- package/lib/services/icon/token/solaris-icon.tokens.d.ts +0 -6
- package/lib/services/theme/model/solaris-theme-config.interface.d.ts +0 -5
- package/lib/services/theme/model/solaris-theme.types.d.ts +0 -3
- package/lib/services/theme/provider/provide-solaris-theme.d.ts +0 -3
- package/lib/services/theme/service/solaris-theme.service.d.ts +0 -9
- package/lib/services/theme/testing/solaris-theme-testing.provider.d.ts +0 -3
- package/lib/services/theme/token/solaris-theme.tokens.d.ts +0 -3
- package/lib/services/translation/index.d.ts +0 -8
- package/lib/services/translation/model/solaris-locale.types.d.ts +0 -4
- package/lib/services/translation/model/solaris-translate-config.interface.d.ts +0 -8
- package/lib/services/translation/model/solaris-translate-defaults.d.ts +0 -2
- package/lib/services/translation/model/solaris-translation.types.d.ts +0 -3
- package/lib/services/translation/pipe/solaris-translate.pipe.d.ts +0 -8
- package/lib/services/translation/provider/provide-solaris-translate.d.ts +0 -3
- package/lib/services/translation/service/solaris-translate.service.d.ts +0 -15
- package/lib/services/translation/testing/solaris-translate-testing.provider.d.ts +0 -3
- package/lib/services/translation/token/solaris-translate.tokens.d.ts +0 -3
- package/lib/testing/provide-solaris-testing.d.ts +0 -10
- package/lib/testing/solaris-test-utilities.d.ts +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/feedback/skeleton/component/skeleton.component.ts","../../../../../../../../../packages/angular/src/lib/components/feedback/skeleton/component/skeleton.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;;AA2B3D,MAAM,OAAO,wBAAwB;IAC1B,OAAO,GAAG,KAAK,CAAyB,MAAM,8EAAC,CAAC;IAChD,SAAS,GAAG,KAAK,CAA2B,OAAO,gFAAC,CAAC;IACrD,IAAI,GAAG,KAAK,CAAsB,IAAI,2EAAC,CAAC;IACxC,MAAM,GAAG,KAAK,CAAwB,MAAM,6EAAC,CAAC;IAC9C,OAAO,GAAG,KAAK,wFAA0B,CAAC;IAC1C,KAAK,GAAG,KAAK,sFAAU,CAAC;IACxB,MAAM,GAAG,KAAK,uFAAU,CAAC;IACzB,KAAK,GAAG,KAAK,CAAS,CAAC,4EAAC,CAAC;IAEzB,eAAe,GAAG,QAAQ,CAAwB,GAAG,EAAE;QAC9D,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;YACjB,OAAO,CAAC,CAAC;QACX,CAAC;QACD,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,KAAK,aAAa,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAAC,KAAK,UAAU,EAAE,CAAC;YACrB,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,sFAAC,CAAC;IAEM,WAAW,GAAG,QAAQ,CAC7B,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,MAAM,kFACpD,CAAC;IAEO,UAAU,GAAG,QAAQ,CAAW,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACf,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG;YACb,MAAM;YACN,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;SACN,CAAC;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC5C,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;gBAC3B,OAAO,WAAW,CAAC;YACrB,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC,iFAAC,CAAC;wGArDQ,wBAAwB;4FAAxB,wBAAwB,+5CC3BrC,sKAKA;;4FDsBa,wBAAwB;kBAjBpC,SAAS;+BACE,kBAAkB,cAChB,IAAI,QAGV;wBACJ,aAAa,EAAE,MAAM;wBACrB,qBAAqB,EAAE,WAAW;wBAClC,uBAAuB,EAAE,aAAa;wBACtC,kBAAkB,EAAE,QAAQ;wBAC5B,oBAAoB,EAAE,mBAAmB;wBACzC,qBAAqB,EAAE,WAAW;wBAClC,uBAAuB,EAAE,2BAA2B;wBACpD,eAAe,EAAE,iBAAiB;wBAClC,gBAAgB,EAAE,kBAAkB;qBACrC","sourcesContent":["import { Component, input, computed } from '@angular/core';\r\n\r\nimport type {\r\n SolarisSkeletonVariant,\r\n SolarisSkeletonAnimation,\r\n SolarisSkeletonSize,\r\n SolarisSkeletonRadius,\r\n SolarisSkeletonDensity,\r\n} from '../model/skeleton.types';\r\n\r\n@Component({\r\n selector: 'solaris-skeleton',\r\n standalone: true,\r\n templateUrl: './skeleton.component.html',\r\n styleUrls: ['./skeleton.component.scss'],\r\n host: {\r\n 'aria-hidden': 'true',\r\n '[attr.data-variant]': 'variant()',\r\n '[attr.data-animation]': 'animation()',\r\n '[attr.data-size]': 'size()',\r\n '[attr.data-radius]': 'effectiveRadius()',\r\n '[attr.data-density]': 'density()',\r\n '[attr.data-multiline]': 'isMultiLine() ? \"\" : null',\r\n '[style.width]': 'width() || null',\r\n '[style.height]': 'height() || null',\r\n },\r\n})\r\nexport class SolarisSkeletonComponent {\r\n readonly variant = input<SolarisSkeletonVariant>('text');\r\n readonly animation = input<SolarisSkeletonAnimation>('pulse');\r\n readonly size = input<SolarisSkeletonSize>('md');\r\n readonly radius = input<SolarisSkeletonRadius>('text');\r\n readonly density = input<SolarisSkeletonDensity>();\r\n readonly width = input<string>();\r\n readonly height = input<string>();\r\n readonly lines = input<number>(1);\r\n\r\n readonly effectiveRadius = computed<SolarisSkeletonRadius>(() => {\r\n const r = this.radius();\r\n if (r !== 'text') {\r\n return r;\r\n }\r\n const v = this.variant();\r\n if (v === 'rectangular') {\r\n return 'sm';\r\n }\r\n if (v === 'circular') {\r\n return 'full';\r\n }\r\n return 'sm';\r\n });\r\n\r\n readonly isMultiLine = computed(\r\n () => this.lines() > 1 && this.variant() === 'text',\r\n );\r\n\r\n readonly lineWidths = computed<string[]>(() => {\r\n const count = this.lines();\r\n if (count <= 1) {\r\n return [];\r\n }\r\n const customWidth = this.width();\r\n const widths = [\r\n '100%',\r\n '92%',\r\n '85%',\r\n '78%',\r\n '70%',\r\n '95%',\r\n '88%',\r\n '82%',\r\n '75%',\r\n '68%',\r\n ];\r\n return Array.from({ length: count }, (_, i) => {\r\n if (i === 0 && customWidth) {\r\n return customWidth;\r\n }\r\n return widths[i % widths.length];\r\n });\r\n });\r\n}\r\n","@if (isMultiLine()) {\r\n @for (width of lineWidths(); track $index) {\r\n <span class=\"solaris-skeleton-line\" [style.width]=\"width\"></span>\r\n }\r\n}\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=skeleton.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/feedback/skeleton/model/skeleton.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SolarisSkeletonVariant = 'text' | 'rectangular' | 'circular';\r\n\r\nexport type SolarisSkeletonAnimation = 'pulse' | 'wave' | 'none';\r\n\r\nexport type SolarisSkeletonSize = 'sm' | 'md' | 'lg';\r\n\r\nexport type SolarisSkeletonRadius = 'text' | 'none' | 'sm' | 'full';\r\n\r\nexport type SolarisSkeletonDensity = 'compact' | 'comfortable';\r\n"]}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { Component, input, output, computed, signal, effect, forwardRef, inject, ElementRef, viewChild, afterNextRender, } from '@angular/core';
|
|
2
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
import { SolarisFormControl } from '../../form-field/model/form-control.contract';
|
|
4
|
-
import { SolarisTranslateService } from '../../../../services/translation';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
let nextId = 0;
|
|
7
|
-
function generateId() {
|
|
8
|
-
return `solaris-checkbox-${++nextId}`;
|
|
9
|
-
}
|
|
10
|
-
export class SolarisCheckboxComponent extends SolarisFormControl {
|
|
11
|
-
elementRef = inject(ElementRef);
|
|
12
|
-
translateService = inject(SolarisTranslateService);
|
|
13
|
-
inputElementRef = viewChild('inputElement', ...(ngDevMode ? [{ debugName: "inputElementRef" }] : /* istanbul ignore next */ []));
|
|
14
|
-
_checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
|
|
15
|
-
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
|
|
16
|
-
_describedByIds = signal([], ...(ngDevMode ? [{ debugName: "_describedByIds" }] : /* istanbul ignore next */ []));
|
|
17
|
-
cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
18
|
-
cvaReadonly = signal(false, ...(ngDevMode ? [{ debugName: "cvaReadonly" }] : /* istanbul ignore next */ []));
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
20
|
-
onChange = () => { };
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
22
|
-
onTouched = () => { };
|
|
23
|
-
hasProjectedContent = signal(false, ...(ngDevMode ? [{ debugName: "hasProjectedContent" }] : /* istanbul ignore next */ []));
|
|
24
|
-
contentChecked = false;
|
|
25
|
-
checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), transform: (v) => v ?? false });
|
|
26
|
-
indeterminate = input(false, { ...(ngDevMode ? { debugName: "indeterminate" } : /* istanbul ignore next */ {}), transform: (v) => v ?? false });
|
|
27
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
28
|
-
transform: (v) => v ?? false });
|
|
29
|
-
readonlyInput = input(false, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), alias: 'readonly',
|
|
30
|
-
transform: (v) => v ?? false });
|
|
31
|
-
requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required',
|
|
32
|
-
transform: (v) => v ?? false });
|
|
33
|
-
invalidInput = input(undefined, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'invalid' });
|
|
34
|
-
appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
35
|
-
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
36
|
-
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
37
|
-
density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
|
|
38
|
-
radius = input('sm', ...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
39
|
-
checkboxLabel = input(undefined, { ...(ngDevMode ? { debugName: "checkboxLabel" } : /* istanbul ignore next */ {}), alias: 'label' });
|
|
40
|
-
labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
|
|
41
|
-
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
42
|
-
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
43
|
-
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
44
|
-
ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
45
|
-
checkedChange = output();
|
|
46
|
-
indeterminateChange = output();
|
|
47
|
-
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
48
|
-
change = output();
|
|
49
|
-
effectiveDensity = computed(() => {
|
|
50
|
-
return this.density() ?? 'comfortable';
|
|
51
|
-
}, ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : /* istanbul ignore next */ []));
|
|
52
|
-
isEffectivelyDisabled = computed(() => {
|
|
53
|
-
return this.disabledInput() || this.cvaDisabled();
|
|
54
|
-
}, ...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
|
|
55
|
-
isEffectivelyInvalid = computed(() => {
|
|
56
|
-
return this.invalidInput() ?? false;
|
|
57
|
-
}, ...(ngDevMode ? [{ debugName: "isEffectivelyInvalid" }] : /* istanbul ignore next */ []));
|
|
58
|
-
isEffectivelyReadonly = computed(() => {
|
|
59
|
-
return this.readonlyInput() || this.cvaReadonly();
|
|
60
|
-
}, ...(ngDevMode ? [{ debugName: "isEffectivelyReadonly" }] : /* istanbul ignore next */ []));
|
|
61
|
-
elementId = computed(() => {
|
|
62
|
-
// SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK form controls.
|
|
63
|
-
const existingId = this.elementRef.nativeElement.getAttribute('id');
|
|
64
|
-
return existingId || generateId();
|
|
65
|
-
}, ...(ngDevMode ? [{ debugName: "elementId" }] : /* istanbul ignore next */ []));
|
|
66
|
-
ariaDescribedBy = computed(() => {
|
|
67
|
-
const ids = this._describedByIds();
|
|
68
|
-
return ids.length > 0 ? ids.join(' ') : null;
|
|
69
|
-
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
70
|
-
labelText = computed(() => {
|
|
71
|
-
const key = this.labelKey();
|
|
72
|
-
if (key) {
|
|
73
|
-
const translated = this.translateService.translate(key);
|
|
74
|
-
return translated !== key ? translated : undefined;
|
|
75
|
-
}
|
|
76
|
-
return this.checkboxLabel();
|
|
77
|
-
}, ...(ngDevMode ? [{ debugName: "labelText" }] : /* istanbul ignore next */ []));
|
|
78
|
-
effectiveAriaLabel = computed(() => {
|
|
79
|
-
const key = this.ariaLabelKey();
|
|
80
|
-
if (key) {
|
|
81
|
-
const translated = this.translateService.translate(key);
|
|
82
|
-
return translated !== key ? translated : undefined;
|
|
83
|
-
}
|
|
84
|
-
return this.ariaLabel();
|
|
85
|
-
}, ...(ngDevMode ? [{ debugName: "effectiveAriaLabel" }] : /* istanbul ignore next */ []));
|
|
86
|
-
ariaLabelledBy = computed(() => {
|
|
87
|
-
const labelId = this.elementId() + '-label';
|
|
88
|
-
if (this.hasProjectedContent() || this.labelText()) {
|
|
89
|
-
return labelId;
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
93
|
-
get id() {
|
|
94
|
-
return this.elementId();
|
|
95
|
-
}
|
|
96
|
-
get focused() {
|
|
97
|
-
return this._focused();
|
|
98
|
-
}
|
|
99
|
-
get disabled() {
|
|
100
|
-
return this.isEffectivelyDisabled();
|
|
101
|
-
}
|
|
102
|
-
get readonly() {
|
|
103
|
-
return this.isEffectivelyReadonly();
|
|
104
|
-
}
|
|
105
|
-
get invalid() {
|
|
106
|
-
return this.isEffectivelyInvalid();
|
|
107
|
-
}
|
|
108
|
-
get required() {
|
|
109
|
-
return this.requiredInput();
|
|
110
|
-
}
|
|
111
|
-
get describedByIds() {
|
|
112
|
-
return this._describedByIds();
|
|
113
|
-
}
|
|
114
|
-
setDescribedByIds(ids) {
|
|
115
|
-
this._describedByIds.set([...ids]);
|
|
116
|
-
}
|
|
117
|
-
focus() {
|
|
118
|
-
const input = this.inputElementRef();
|
|
119
|
-
if (input) {
|
|
120
|
-
// SECURITY_EXCEPTION: nativeElement.focus() is the standard DOM API to focus an element. No alternative exists.
|
|
121
|
-
input.nativeElement.focus();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
syncIndeterminate = effect(() => {
|
|
125
|
-
const el = this.inputElementRef();
|
|
126
|
-
if (el) {
|
|
127
|
-
// SECURITY_EXCEPTION: nativeElement.indeterminate is the standard DOM property to set indeterminate on a native checkbox. No HTML attribute alternative exists.
|
|
128
|
-
el.nativeElement.indeterminate = this.indeterminate();
|
|
129
|
-
}
|
|
130
|
-
}, ...(ngDevMode ? [{ debugName: "syncIndeterminate" }] : /* istanbul ignore next */ []));
|
|
131
|
-
syncCheckedFromInput = effect(() => {
|
|
132
|
-
this._checked.set(this.checked());
|
|
133
|
-
}, ...(ngDevMode ? [{ debugName: "syncCheckedFromInput" }] : /* istanbul ignore next */ []));
|
|
134
|
-
writeValue(value) {
|
|
135
|
-
this._checked.set(value === true);
|
|
136
|
-
}
|
|
137
|
-
registerOnChange(fn) {
|
|
138
|
-
this.onChange = fn;
|
|
139
|
-
}
|
|
140
|
-
registerOnTouched(fn) {
|
|
141
|
-
this.onTouched = fn;
|
|
142
|
-
}
|
|
143
|
-
setDisabledState(isDisabled) {
|
|
144
|
-
this.cvaDisabled.set(isDisabled);
|
|
145
|
-
}
|
|
146
|
-
/** Set readonly state from parent group. */
|
|
147
|
-
setCvaReadonlyState(isReadonly) {
|
|
148
|
-
this.cvaReadonly.set(isReadonly);
|
|
149
|
-
}
|
|
150
|
-
onInputChange(event) {
|
|
151
|
-
if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {
|
|
152
|
-
event.preventDefault();
|
|
153
|
-
const input = event.target;
|
|
154
|
-
input.checked = this._checked();
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
const input = event.target;
|
|
158
|
-
if (this.indeterminate()) {
|
|
159
|
-
this.indeterminateChange.emit(false);
|
|
160
|
-
input.checked = true;
|
|
161
|
-
}
|
|
162
|
-
this._checked.set(input.checked);
|
|
163
|
-
this.onChange(input.checked);
|
|
164
|
-
this.checkedChange.emit(input.checked);
|
|
165
|
-
this.change.emit(event);
|
|
166
|
-
this.onTouched();
|
|
167
|
-
}
|
|
168
|
-
onBlur() {
|
|
169
|
-
this._focused.set(false);
|
|
170
|
-
this.onTouched();
|
|
171
|
-
}
|
|
172
|
-
onFocus() {
|
|
173
|
-
this._focused.set(true);
|
|
174
|
-
}
|
|
175
|
-
constructor() {
|
|
176
|
-
super();
|
|
177
|
-
afterNextRender(() => {
|
|
178
|
-
if (this.contentChecked) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this.contentChecked = true;
|
|
182
|
-
// SECURITY_EXCEPTION: nativeElement.childNodes is the standard DOM API to check for projected content in the host element. Same pattern used by Angular CDK content projection detection.
|
|
183
|
-
const nativeElement = this.elementRef.nativeElement;
|
|
184
|
-
const hasContent = Array.from(nativeElement.childNodes).some((node) => node.nodeType !== Node.COMMENT_NODE);
|
|
185
|
-
this.hasProjectedContent.set(hasContent);
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisCheckboxComponent, isStandalone: true, selector: "solaris-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", 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 }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, checkboxLabel: { classPropertyName: "checkboxLabel", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", 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: { checkedChange: "checkedChange", indeterminateChange: "indeterminateChange", change: "change" }, host: { properties: { "attr.data-appearance": "appearance()", "attr.data-color": "color()", "attr.data-size": "size()", "attr.data-radius": "radius()", "attr.data-density": "effectiveDensity()", "attr.data-checked": "_checked() ? \"\" : null", "attr.data-indeterminate": "indeterminate() ? \"\" : null", "attr.data-disabled": "isEffectivelyDisabled() ? \"\" : null", "attr.data-readonly": "isEffectivelyReadonly() ? \"\" : null", "attr.data-invalid": "isEffectivelyInvalid() ? \"\" : null", "attr.data-focused": "_focused() ? \"\" : null" } }, providers: [
|
|
190
|
-
{
|
|
191
|
-
provide: NG_VALUE_ACCESSOR,
|
|
192
|
-
useExisting: forwardRef(() => SolarisCheckboxComponent),
|
|
193
|
-
multi: true,
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
provide: SolarisFormControl,
|
|
197
|
-
useExisting: SolarisCheckboxComponent,
|
|
198
|
-
},
|
|
199
|
-
], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"solaris-checkbox__label\" [for]=\"elementId()\">\n <input\n type=\"checkbox\"\n class=\"solaris-checkbox__input\"\n [id]=\"elementId()\"\n [checked]=\"_checked()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [required]=\"required\"\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.name]=\"name() ?? null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n #inputElement\n />\n <span class=\"solaris-checkbox__control\" aria-hidden=\"true\">\n @if (indeterminate()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\" />\n </svg>\n } @else if (_checked()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n </span>\n @if (hasProjectedContent()) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n <ng-content />\n </span>\n } @else if (labelText(); as text) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n {{ text }}\n </span>\n }\n</label>\n", styles: [":host{--solaris-checkbox-size: initial;--solaris-checkbox-icon-size: initial;--solaris-checkbox-gap: initial;--solaris-checkbox-border-color: initial;--solaris-checkbox-border-width: initial;--solaris-checkbox-background: initial;--solaris-checkbox-color: initial;--solaris-checkbox-focus-ring-color: initial;--solaris-checkbox-disabled-opacity: initial;--solaris-checkbox-radius: var(--solaris-radius-sm);--solaris-checkbox-readonly-background: initial;--solaris-checkbox-invalid-border-color: initial;--solaris-checkbox-custom-control-background: initial;--solaris-checkbox-custom-control-color: initial;--solaris-checkbox-custom-control-border-color: initial;--solaris-checkbox-custom-control-hover-background: initial;--solaris-checkbox-label-font-size: initial;--solaris-checkbox-label-line-height: initial;display:inline-flex;vertical-align:middle;outline:none}.solaris-checkbox__label{display:inline-flex;align-items:center;gap:var(--solaris-checkbox-gap);cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.solaris-checkbox__input{position:absolute;opacity:0;width:0;height:0;margin:0;padding:0;pointer-events:none}.solaris-checkbox__control{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--solaris-checkbox-size);height:var(--solaris-checkbox-size);border:var(--solaris-checkbox-border-width) solid var(--solaris-checkbox-border-color);border-radius:var(--solaris-checkbox-radius);background:var(--solaris-checkbox-background);color:var(--solaris-checkbox-color);box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;position:relative}.solaris-checkbox__icon{display:block;width:100%;height:100%;padding:calc(var(--solaris-spacing-1) / 2);box-sizing:border-box}.solaris-checkbox__label-text{font-size:var(--solaris-checkbox-label-font-size);line-height:var(--solaris-checkbox-label-line-height);color:inherit}:host([data-size=sm]){--solaris-checkbox-size: var(--solaris-spacing-4);--solaris-checkbox-icon-size: calc(var(--solaris-spacing-5) / 2);--solaris-checkbox-gap: var(--solaris-spacing-2);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 4);--solaris-checkbox-label-font-size: var(--solaris-font-size-sm);--solaris-checkbox-label-line-height: var(--solaris-line-height-sm)}:host([data-size=md]){--solaris-checkbox-size: var(--solaris-spacing-5);--solaris-checkbox-icon-size: var(--solaris-spacing-3);--solaris-checkbox-gap: var(--solaris-spacing-2);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 4);--solaris-checkbox-label-font-size: var(--solaris-font-size-md);--solaris-checkbox-label-line-height: var(--solaris-line-height-md)}:host([data-size=lg]){--solaris-checkbox-size: var(--solaris-spacing-6);--solaris-checkbox-icon-size: calc( var(--solaris-spacing-4) - var(--solaris-spacing-1) / 2 );--solaris-checkbox-gap: var(--solaris-spacing-3);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 2);--solaris-checkbox-label-font-size: var(--solaris-font-size-lg);--solaris-checkbox-label-line-height: var(--solaris-line-height-lg)}:host([data-density=compact]){--solaris-checkbox-gap: var(--solaris-spacing-1)}:host([data-density=comfortable]){--solaris-checkbox-gap: var(--solaris-spacing-3)}:host([data-appearance=outline]){--solaris-checkbox-background: transparent}:host([data-appearance=surface]){--solaris-checkbox-background: var(--solaris-surface-muted);--solaris-checkbox-border-color: transparent;--solaris-checkbox-border-width: var(--solaris-spacing-0)}:host([data-appearance=surface][data-checked]),:host([data-appearance=surface][data-indeterminate]){--solaris-checkbox-border-width: var(--solaris-spacing-0)}:host([data-color=neutral]){--solaris-checkbox-border-color: var(--solaris-border-default)}:host([data-color=neutral][data-checked]),:host([data-color=neutral][data-indeterminate]){--solaris-checkbox-background: var(--solaris-text-default);--solaris-checkbox-color: var(--solaris-text-inverse);--solaris-checkbox-border-color: var(--solaris-text-default)}:host([data-color=primary]){--solaris-checkbox-border-color: var( --solaris-primary-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-primary-base)}:host([data-color=primary][data-checked]),:host([data-color=primary][data-indeterminate]){--solaris-checkbox-background: var(--solaris-primary-base);--solaris-checkbox-color: var( --solaris-primary-text, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-checkbox-border-color: var( --solaris-success-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-success-base)}:host([data-color=success][data-checked]),:host([data-color=success][data-indeterminate]){--solaris-checkbox-background: var(--solaris-success-base);--solaris-checkbox-color: var( --solaris-success-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-checkbox-border-color: var( --solaris-warning-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-warning-base)}:host([data-color=warning][data-checked]),:host([data-color=warning][data-indeterminate]){--solaris-checkbox-background: var(--solaris-warning-base);--solaris-checkbox-color: var( --solaris-warning-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-checkbox-border-color: var( --solaris-danger-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-danger-base)}:host([data-color=danger][data-checked]),:host([data-color=danger][data-indeterminate]){--solaris-checkbox-background: var(--solaris-danger-base);--solaris-checkbox-color: var( --solaris-danger-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-checkbox-border-color: var( --solaris-info-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-info-base)}:host([data-color=info][data-checked]),:host([data-color=info][data-indeterminate]){--solaris-checkbox-background: var(--solaris-info-base);--solaris-checkbox-color: var( --solaris-info-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-checkbox-border-color: var( --solaris-checkbox-custom-control-border-color, var(--solaris-border-default) );--solaris-checkbox-background: var( --solaris-checkbox-custom-control-background, transparent );--solaris-checkbox-color: var( --solaris-checkbox-custom-control-color, inherit )}:host([data-color=custom][data-checked]),:host([data-color=custom][data-indeterminate]){--solaris-checkbox-background: var( --solaris-checkbox-custom-control-background, var(--solaris-primary-base) );--solaris-checkbox-color: var( --solaris-checkbox-custom-control-color, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var( --solaris-checkbox-custom-control-border-color, var( --solaris-checkbox-custom-control-background, var(--solaris-primary-base) ) )}.solaris-checkbox__label:hover .solaris-checkbox__control,:host([data-color=custom]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-border-color)}:host([data-color=primary]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-primary-hover, var(--solaris-primary-base))}:host([data-color=success]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-success-hover, var(--solaris-success-base))}:host([data-color=warning]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-warning-hover, var(--solaris-warning-base))}:host([data-color=danger]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-danger-hover, var(--solaris-danger-base))}:host([data-color=info]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-info-hover, var(--solaris-info-base))}.solaris-checkbox__input:focus-visible+.solaris-checkbox__control{outline:var(--solaris-border-width-sm) solid var(--solaris-checkbox-focus-ring-color);outline-offset:calc(var(--solaris-spacing-1) / 2)}:host([data-invalid]){--solaris-checkbox-border-color: var( --solaris-checkbox-invalid-border-color, var(--solaris-danger-base) );--solaris-checkbox-focus-ring-color: var(--solaris-danger-base)}:host([data-invalid][data-checked]),:host([data-invalid][data-indeterminate]){--solaris-checkbox-background: var(--solaris-danger-base);--solaris-checkbox-color: var( --solaris-danger-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-danger-base)}:host([data-invalid]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-invalid-border-color, var(--solaris-danger-base))}:host([data-disabled]){--solaris-checkbox-disabled-opacity: .5}:host([data-disabled]) .solaris-checkbox__label{cursor:not-allowed}:host([data-disabled]) .solaris-checkbox__control{opacity:var(--solaris-checkbox-disabled-opacity)}:host([data-disabled]) .solaris-checkbox__label-text{opacity:var(--solaris-checkbox-disabled-opacity)}:host([data-readonly]){--solaris-checkbox-border-color: var( --solaris-surface-muted, var(--solaris-border-subtle) )}:host([data-readonly]) .solaris-checkbox__label{cursor:not-allowed}:host([data-readonly]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-border-color)}:host([data-readonly][data-checked]) .solaris-checkbox__control,:host([data-readonly][data-indeterminate]) .solaris-checkbox__control{background:var(--solaris-checkbox-readonly-background, var(--solaris-surface-muted));--solaris-checkbox-border-color: var( --solaris-checkbox-readonly-background, var(--solaris-surface-muted) )}:host([data-radius=md]){--solaris-checkbox-radius: var(--solaris-radius-md)}:host([data-radius=lg]){--solaris-checkbox-radius: var(--solaris-radius-lg)}:host([data-radius=full]){--solaris-checkbox-radius: var(--solaris-radius-full)}\n"] });
|
|
200
|
-
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisCheckboxComponent, decorators: [{
|
|
202
|
-
type: Component,
|
|
203
|
-
args: [{ selector: 'solaris-checkbox', standalone: true, providers: [
|
|
204
|
-
{
|
|
205
|
-
provide: NG_VALUE_ACCESSOR,
|
|
206
|
-
useExisting: forwardRef(() => SolarisCheckboxComponent),
|
|
207
|
-
multi: true,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
provide: SolarisFormControl,
|
|
211
|
-
useExisting: SolarisCheckboxComponent,
|
|
212
|
-
},
|
|
213
|
-
], host: {
|
|
214
|
-
'[attr.data-appearance]': 'appearance()',
|
|
215
|
-
'[attr.data-color]': 'color()',
|
|
216
|
-
'[attr.data-size]': 'size()',
|
|
217
|
-
'[attr.data-radius]': 'radius()',
|
|
218
|
-
'[attr.data-density]': 'effectiveDensity()',
|
|
219
|
-
'[attr.data-checked]': '_checked() ? "" : null',
|
|
220
|
-
'[attr.data-indeterminate]': 'indeterminate() ? "" : null',
|
|
221
|
-
'[attr.data-disabled]': 'isEffectivelyDisabled() ? "" : null',
|
|
222
|
-
'[attr.data-readonly]': 'isEffectivelyReadonly() ? "" : null',
|
|
223
|
-
'[attr.data-invalid]': 'isEffectivelyInvalid() ? "" : null',
|
|
224
|
-
'[attr.data-focused]': '_focused() ? "" : null',
|
|
225
|
-
}, template: "<label class=\"solaris-checkbox__label\" [for]=\"elementId()\">\n <input\n type=\"checkbox\"\n class=\"solaris-checkbox__input\"\n [id]=\"elementId()\"\n [checked]=\"_checked()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [required]=\"required\"\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.name]=\"name() ?? null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n #inputElement\n />\n <span class=\"solaris-checkbox__control\" aria-hidden=\"true\">\n @if (indeterminate()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\" />\n </svg>\n } @else if (_checked()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n </span>\n @if (hasProjectedContent()) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n <ng-content />\n </span>\n } @else if (labelText(); as text) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n {{ text }}\n </span>\n }\n</label>\n", styles: [":host{--solaris-checkbox-size: initial;--solaris-checkbox-icon-size: initial;--solaris-checkbox-gap: initial;--solaris-checkbox-border-color: initial;--solaris-checkbox-border-width: initial;--solaris-checkbox-background: initial;--solaris-checkbox-color: initial;--solaris-checkbox-focus-ring-color: initial;--solaris-checkbox-disabled-opacity: initial;--solaris-checkbox-radius: var(--solaris-radius-sm);--solaris-checkbox-readonly-background: initial;--solaris-checkbox-invalid-border-color: initial;--solaris-checkbox-custom-control-background: initial;--solaris-checkbox-custom-control-color: initial;--solaris-checkbox-custom-control-border-color: initial;--solaris-checkbox-custom-control-hover-background: initial;--solaris-checkbox-label-font-size: initial;--solaris-checkbox-label-line-height: initial;display:inline-flex;vertical-align:middle;outline:none}.solaris-checkbox__label{display:inline-flex;align-items:center;gap:var(--solaris-checkbox-gap);cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.solaris-checkbox__input{position:absolute;opacity:0;width:0;height:0;margin:0;padding:0;pointer-events:none}.solaris-checkbox__control{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--solaris-checkbox-size);height:var(--solaris-checkbox-size);border:var(--solaris-checkbox-border-width) solid var(--solaris-checkbox-border-color);border-radius:var(--solaris-checkbox-radius);background:var(--solaris-checkbox-background);color:var(--solaris-checkbox-color);box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;position:relative}.solaris-checkbox__icon{display:block;width:100%;height:100%;padding:calc(var(--solaris-spacing-1) / 2);box-sizing:border-box}.solaris-checkbox__label-text{font-size:var(--solaris-checkbox-label-font-size);line-height:var(--solaris-checkbox-label-line-height);color:inherit}:host([data-size=sm]){--solaris-checkbox-size: var(--solaris-spacing-4);--solaris-checkbox-icon-size: calc(var(--solaris-spacing-5) / 2);--solaris-checkbox-gap: var(--solaris-spacing-2);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 4);--solaris-checkbox-label-font-size: var(--solaris-font-size-sm);--solaris-checkbox-label-line-height: var(--solaris-line-height-sm)}:host([data-size=md]){--solaris-checkbox-size: var(--solaris-spacing-5);--solaris-checkbox-icon-size: var(--solaris-spacing-3);--solaris-checkbox-gap: var(--solaris-spacing-2);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 4);--solaris-checkbox-label-font-size: var(--solaris-font-size-md);--solaris-checkbox-label-line-height: var(--solaris-line-height-md)}:host([data-size=lg]){--solaris-checkbox-size: var(--solaris-spacing-6);--solaris-checkbox-icon-size: calc( var(--solaris-spacing-4) - var(--solaris-spacing-1) / 2 );--solaris-checkbox-gap: var(--solaris-spacing-3);--solaris-checkbox-border-width: calc(var(--solaris-spacing-1) / 2);--solaris-checkbox-label-font-size: var(--solaris-font-size-lg);--solaris-checkbox-label-line-height: var(--solaris-line-height-lg)}:host([data-density=compact]){--solaris-checkbox-gap: var(--solaris-spacing-1)}:host([data-density=comfortable]){--solaris-checkbox-gap: var(--solaris-spacing-3)}:host([data-appearance=outline]){--solaris-checkbox-background: transparent}:host([data-appearance=surface]){--solaris-checkbox-background: var(--solaris-surface-muted);--solaris-checkbox-border-color: transparent;--solaris-checkbox-border-width: var(--solaris-spacing-0)}:host([data-appearance=surface][data-checked]),:host([data-appearance=surface][data-indeterminate]){--solaris-checkbox-border-width: var(--solaris-spacing-0)}:host([data-color=neutral]){--solaris-checkbox-border-color: var(--solaris-border-default)}:host([data-color=neutral][data-checked]),:host([data-color=neutral][data-indeterminate]){--solaris-checkbox-background: var(--solaris-text-default);--solaris-checkbox-color: var(--solaris-text-inverse);--solaris-checkbox-border-color: var(--solaris-text-default)}:host([data-color=primary]){--solaris-checkbox-border-color: var( --solaris-primary-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-primary-base)}:host([data-color=primary][data-checked]),:host([data-color=primary][data-indeterminate]){--solaris-checkbox-background: var(--solaris-primary-base);--solaris-checkbox-color: var( --solaris-primary-text, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-checkbox-border-color: var( --solaris-success-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-success-base)}:host([data-color=success][data-checked]),:host([data-color=success][data-indeterminate]){--solaris-checkbox-background: var(--solaris-success-base);--solaris-checkbox-color: var( --solaris-success-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-checkbox-border-color: var( --solaris-warning-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-warning-base)}:host([data-color=warning][data-checked]),:host([data-color=warning][data-indeterminate]){--solaris-checkbox-background: var(--solaris-warning-base);--solaris-checkbox-color: var( --solaris-warning-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-checkbox-border-color: var( --solaris-danger-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-danger-base)}:host([data-color=danger][data-checked]),:host([data-color=danger][data-indeterminate]){--solaris-checkbox-background: var(--solaris-danger-base);--solaris-checkbox-color: var( --solaris-danger-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-checkbox-border-color: var( --solaris-info-border, var(--solaris-border-default) );--solaris-checkbox-focus-ring-color: var(--solaris-info-base)}:host([data-color=info][data-checked]),:host([data-color=info][data-indeterminate]){--solaris-checkbox-background: var(--solaris-info-base);--solaris-checkbox-color: var( --solaris-info-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-checkbox-border-color: var( --solaris-checkbox-custom-control-border-color, var(--solaris-border-default) );--solaris-checkbox-background: var( --solaris-checkbox-custom-control-background, transparent );--solaris-checkbox-color: var( --solaris-checkbox-custom-control-color, inherit )}:host([data-color=custom][data-checked]),:host([data-color=custom][data-indeterminate]){--solaris-checkbox-background: var( --solaris-checkbox-custom-control-background, var(--solaris-primary-base) );--solaris-checkbox-color: var( --solaris-checkbox-custom-control-color, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var( --solaris-checkbox-custom-control-border-color, var( --solaris-checkbox-custom-control-background, var(--solaris-primary-base) ) )}.solaris-checkbox__label:hover .solaris-checkbox__control,:host([data-color=custom]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-border-color)}:host([data-color=primary]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-primary-hover, var(--solaris-primary-base))}:host([data-color=success]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-success-hover, var(--solaris-success-base))}:host([data-color=warning]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-warning-hover, var(--solaris-warning-base))}:host([data-color=danger]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-danger-hover, var(--solaris-danger-base))}:host([data-color=info]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-info-hover, var(--solaris-info-base))}.solaris-checkbox__input:focus-visible+.solaris-checkbox__control{outline:var(--solaris-border-width-sm) solid var(--solaris-checkbox-focus-ring-color);outline-offset:calc(var(--solaris-spacing-1) / 2)}:host([data-invalid]){--solaris-checkbox-border-color: var( --solaris-checkbox-invalid-border-color, var(--solaris-danger-base) );--solaris-checkbox-focus-ring-color: var(--solaris-danger-base)}:host([data-invalid][data-checked]),:host([data-invalid][data-indeterminate]){--solaris-checkbox-background: var(--solaris-danger-base);--solaris-checkbox-color: var( --solaris-danger-on-solid, var(--solaris-text-inverse) );--solaris-checkbox-border-color: var(--solaris-danger-base)}:host([data-invalid]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-invalid-border-color, var(--solaris-danger-base))}:host([data-disabled]){--solaris-checkbox-disabled-opacity: .5}:host([data-disabled]) .solaris-checkbox__label{cursor:not-allowed}:host([data-disabled]) .solaris-checkbox__control{opacity:var(--solaris-checkbox-disabled-opacity)}:host([data-disabled]) .solaris-checkbox__label-text{opacity:var(--solaris-checkbox-disabled-opacity)}:host([data-readonly]){--solaris-checkbox-border-color: var( --solaris-surface-muted, var(--solaris-border-subtle) )}:host([data-readonly]) .solaris-checkbox__label{cursor:not-allowed}:host([data-readonly]) .solaris-checkbox__label:hover .solaris-checkbox__control{border-color:var(--solaris-checkbox-border-color)}:host([data-readonly][data-checked]) .solaris-checkbox__control,:host([data-readonly][data-indeterminate]) .solaris-checkbox__control{background:var(--solaris-checkbox-readonly-background, var(--solaris-surface-muted));--solaris-checkbox-border-color: var( --solaris-checkbox-readonly-background, var(--solaris-surface-muted) )}:host([data-radius=md]){--solaris-checkbox-radius: var(--solaris-radius-md)}:host([data-radius=lg]){--solaris-checkbox-radius: var(--solaris-radius-lg)}:host([data-radius=full]){--solaris-checkbox-radius: var(--solaris-radius-full)}\n"] }]
|
|
226
|
-
}], ctorParameters: () => [], propDecorators: { inputElementRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", 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 }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], checkboxLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], indeterminateChange: [{ type: i0.Output, args: ["indeterminateChange"] }], change: [{ type: i0.Output, args: ["change"] }] } });
|
|
227
|
-
//# sourceMappingURL=checkbox.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/checkbox/component/checkbox.component.ts","../../../../../../../../../packages/angular/src/lib/components/forms/checkbox/component/checkbox.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,SAAS,EACT,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAA6B,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;;AAU3E,IAAI,MAAM,GA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xB,wBAAwB,i4FA3BxB;YACT;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;gBACvD,KAAK,EAAE,IAAI;aACZ;YACD;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,WAAW,EAAE,wBAAwB;aACtC;SACF,kLC7CH,qqDAsDA;;4FDQa,wBAAwB;kBA9BpC,SAAS;+BACE,kBAAkB,cAChB,IAAI,aACL;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,yBAAyB,CAAC;4BACvD,KAAK,EAAE,IAAI;yBACZ;wBACD;4BACE,OAAO,EAAE,kBAAkB;4BAC3B,WAAW,0BAA0B;yBACtC;qBACF,QAGK;wBACJ,wBAAwB,EAAE,cAAc;wBACxC,mBAAmB,EAAE,SAAS;wBAC9B,kBAAkB,EAAE,QAAQ;wBAC5B,oBAAoB,EAAE,UAAU;wBAChC,qBAAqB,EAAE,oBAAoB;wBAC3C,qBAAqB,EAAE,wBAAwB;wBAC/C,2BAA2B,EAAE,6BAA6B;wBAC1D,sBAAsB,EAAE,qCAAqC;wBAC7D,sBAAsB,EAAE,qCAAqC;wBAC7D,qBAAqB,EAAE,oCAAoC;wBAC3D,qBAAqB,EAAE,wBAAwB;qBAChD;uGAUyC,cAAc","sourcesContent":["import {\n Component,\n input,\n output,\n computed,\n signal,\n effect,\n forwardRef,\n inject,\n ElementRef,\n viewChild,\n afterNextRender,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, type ControlValueAccessor } from '@angular/forms';\n\nimport { SolarisFormControl } from '../../form-field/model/form-control.contract';\nimport { SolarisTranslateService } from '../../../../services/translation';\n\nimport type {\n SolarisCheckboxAppearance,\n SolarisCheckboxColor,\n SolarisCheckboxSize,\n SolarisCheckboxRadius,\n SolarisCheckboxDensity,\n} from '../model/checkbox.types';\n\nlet nextId = 0;\n\nfunction generateId(): string {\n return `solaris-checkbox-${++nextId}`;\n}\n\n@Component({\n selector: 'solaris-checkbox',\n standalone: true,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SolarisCheckboxComponent),\n multi: true,\n },\n {\n provide: SolarisFormControl,\n useExisting: SolarisCheckboxComponent,\n },\n ],\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n host: {\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-color]': 'color()',\n '[attr.data-size]': 'size()',\n '[attr.data-radius]': 'radius()',\n '[attr.data-density]': 'effectiveDensity()',\n '[attr.data-checked]': '_checked() ? \"\" : null',\n '[attr.data-indeterminate]': 'indeterminate() ? \"\" : null',\n '[attr.data-disabled]': 'isEffectivelyDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'isEffectivelyReadonly() ? \"\" : null',\n '[attr.data-invalid]': 'isEffectivelyInvalid() ? \"\" : null',\n '[attr.data-focused]': '_focused() ? \"\" : null',\n },\n})\nexport class SolarisCheckboxComponent\n extends SolarisFormControl\n implements ControlValueAccessor\n{\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly translateService = inject(SolarisTranslateService);\n\n private readonly inputElementRef =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n protected readonly _checked = signal(false);\n protected readonly _focused = signal(false);\n private readonly _describedByIds = signal<string[]>([]);\n private readonly cvaDisabled = signal(false);\n private readonly cvaReadonly = signal(false);\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n protected readonly hasProjectedContent = signal(false);\n private contentChecked = false;\n\n readonly checked = input<boolean, boolean>(false, {\n transform: (v: boolean) => v ?? false,\n });\n readonly indeterminate = input<boolean, boolean>(false, {\n transform: (v: boolean) => v ?? false,\n });\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 appearance = input<SolarisCheckboxAppearance>('outline');\n readonly color = input<SolarisCheckboxColor>('primary');\n readonly size = input<SolarisCheckboxSize>('md');\n readonly density = input<SolarisCheckboxDensity>();\n readonly radius = input<SolarisCheckboxRadius>('sm');\n readonly checkboxLabel = input<string>(undefined, { alias: 'label' });\n readonly labelKey = input<string>();\n readonly name = input<string>();\n readonly value = input<unknown>();\n readonly ariaLabel = input<string>();\n readonly ariaLabelKey = input<string>();\n\n readonly checkedChange = output<boolean>();\n readonly indeterminateChange = output<boolean>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly change = output<Event>();\n\n protected readonly effectiveDensity = computed<SolarisCheckboxDensity>(() => {\n return this.density() ?? 'comfortable';\n });\n\n protected readonly isEffectivelyDisabled = computed(() => {\n return this.disabledInput() || this.cvaDisabled();\n });\n\n protected readonly isEffectivelyInvalid = computed(() => {\n return this.invalidInput() ?? false;\n });\n\n protected readonly isEffectivelyReadonly = computed(() => {\n return this.readonlyInput() || this.cvaReadonly();\n });\n protected readonly elementId = 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 form controls.\n const existingId = this.elementRef.nativeElement.getAttribute('id');\n return existingId || generateId();\n });\n\n protected readonly ariaDescribedBy = computed(() => {\n const ids = this._describedByIds();\n return ids.length > 0 ? ids.join(' ') : null;\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.checkboxLabel();\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 const labelId = this.elementId() + '-label';\n if (this.hasProjectedContent() || this.labelText()) {\n return labelId;\n }\n return null;\n });\n\n get id(): string {\n return this.elementId();\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.requiredInput();\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 input = this.inputElementRef();\n if (input) {\n // SECURITY_EXCEPTION: nativeElement.focus() is the standard DOM API to focus an element. No alternative exists.\n input.nativeElement.focus();\n }\n }\n\n private readonly syncIndeterminate = effect(() => {\n const el = this.inputElementRef();\n if (el) {\n // SECURITY_EXCEPTION: nativeElement.indeterminate is the standard DOM property to set indeterminate on a native checkbox. No HTML attribute alternative exists.\n el.nativeElement.indeterminate = this.indeterminate();\n }\n });\n\n private readonly syncCheckedFromInput = effect(() => {\n this._checked.set(this.checked());\n });\n\n writeValue(value: boolean | null): void {\n this._checked.set(value === true);\n }\n\n registerOnChange(fn: (value: boolean) => 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 }\n\n /** Set readonly state from parent group. */\n setCvaReadonlyState(isReadonly: boolean): void {\n this.cvaReadonly.set(isReadonly);\n }\n\n protected onInputChange(event: Event): void {\n if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {\n event.preventDefault();\n const input = event.target as HTMLInputElement;\n input.checked = this._checked();\n return;\n }\n\n const input = event.target as HTMLInputElement;\n\n if (this.indeterminate()) {\n this.indeterminateChange.emit(false);\n input.checked = true;\n }\n\n this._checked.set(input.checked);\n this.onChange(input.checked);\n this.checkedChange.emit(input.checked);\n this.change.emit(event);\n this.onTouched();\n }\n\n protected onBlur(): void {\n this._focused.set(false);\n this.onTouched();\n }\n\n protected onFocus(): void {\n this._focused.set(true);\n }\n\n constructor() {\n super();\n\n afterNextRender(() => {\n if (this.contentChecked) {\n return;\n }\n this.contentChecked = true;\n // SECURITY_EXCEPTION: nativeElement.childNodes is the standard DOM API to check for projected content in the host element. Same pattern used by Angular CDK content projection detection.\n const nativeElement = this.elementRef.nativeElement;\n const hasContent = Array.from(nativeElement.childNodes).some(\n (node) => node.nodeType !== Node.COMMENT_NODE,\n );\n this.hasProjectedContent.set(hasContent);\n });\n }\n}\n","<label class=\"solaris-checkbox__label\" [for]=\"elementId()\">\n <input\n type=\"checkbox\"\n class=\"solaris-checkbox__input\"\n [id]=\"elementId()\"\n [checked]=\"_checked()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [required]=\"required\"\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.name]=\"name() ?? null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n #inputElement\n />\n <span class=\"solaris-checkbox__control\" aria-hidden=\"true\">\n @if (indeterminate()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\" />\n </svg>\n } @else if (_checked()) {\n <svg\n class=\"solaris-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n </span>\n @if (hasProjectedContent()) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n <ng-content />\n </span>\n } @else if (labelText(); as text) {\n <span class=\"solaris-checkbox__label-text\" [id]=\"elementId() + '-label'\">\n {{ text }}\n </span>\n }\n</label>\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=checkbox.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/checkbox/model/checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SolarisCheckboxAppearance = 'outline' | 'surface';\n\nexport type SolarisCheckboxColor =\n | 'neutral'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'custom';\n\nexport type SolarisCheckboxSize = 'sm' | 'md' | 'lg';\n\nexport type SolarisCheckboxRadius = 'sm' | 'md' | 'lg' | 'full';\n\nexport type SolarisCheckboxDensity = 'compact' | 'comfortable';\n"]}
|