@danske/sapphire-angular 1.12.4
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/LICENSE +7 -0
- package/README.md +25 -0
- package/esm2020/danske-sapphire-angular.mjs +5 -0
- package/esm2020/lib/badge/public_api.mjs +3 -0
- package/esm2020/lib/badge/src/badge.component.mjs +66 -0
- package/esm2020/lib/badge/src/badge.module.mjs +18 -0
- package/esm2020/lib/button/public_api.mjs +12 -0
- package/esm2020/lib/button/src/button-group.component.mjs +57 -0
- package/esm2020/lib/button/src/button-icon.directive.mjs +13 -0
- package/esm2020/lib/button/src/button.component.mjs +100 -0
- package/esm2020/lib/button/src/button.module.mjs +48 -0
- package/esm2020/lib/button/src/icon-button.component.mjs +95 -0
- package/esm2020/lib/button/src/toggle-button-required-validator.mjs +27 -0
- package/esm2020/lib/button/src/toggle-button.component.mjs +124 -0
- package/esm2020/lib/checkbox/public_api.mjs +8 -0
- package/esm2020/lib/checkbox/src/checkbox-required-validator.mjs +26 -0
- package/esm2020/lib/checkbox/src/checkbox.component.mjs +264 -0
- package/esm2020/lib/checkbox/src/checkbox.module.mjs +21 -0
- package/esm2020/lib/common/auto-id.decorator.mjs +24 -0
- package/esm2020/lib/common/coerce-boolean.decorator.mjs +32 -0
- package/esm2020/lib/common/constructor.mjs +2 -0
- package/esm2020/lib/common/disabled.mjs +16 -0
- package/esm2020/lib/common/focused.directive.mjs +64 -0
- package/esm2020/lib/common/placement.mjs +60 -0
- package/esm2020/lib/common/platform.mjs +45 -0
- package/esm2020/lib/common/pressed.directive.mjs +55 -0
- package/esm2020/lib/common/public_api.mjs +4 -0
- package/esm2020/lib/common/sapphire-view-encapsulation.mjs +83 -0
- package/esm2020/lib/common/scroll-monitor.directive.mjs +63 -0
- package/esm2020/lib/common/tabindex.mjs +19 -0
- package/esm2020/lib/common/visually-hidden.directive.mjs +32 -0
- package/esm2020/lib/contextual-help/public_api.mjs +3 -0
- package/esm2020/lib/contextual-help/src/contextual-help.component.mjs +112 -0
- package/esm2020/lib/contextual-help/src/contextual-help.module.mjs +33 -0
- package/esm2020/lib/core.module.mjs +179 -0
- package/esm2020/lib/field/public_api.mjs +8 -0
- package/esm2020/lib/field/src/field-control.mjs +17 -0
- package/esm2020/lib/field/src/field-error.directive.mjs +20 -0
- package/esm2020/lib/field/src/field-label.directive.mjs +17 -0
- package/esm2020/lib/field/src/field-note-suffix.directive.mjs +28 -0
- package/esm2020/lib/field/src/field-note.directive.mjs +17 -0
- package/esm2020/lib/field/src/field.component.mjs +153 -0
- package/esm2020/lib/field/src/field.module.mjs +49 -0
- package/esm2020/lib/icon/public_api.mjs +4 -0
- package/esm2020/lib/icon/src/icon-size-provider.mjs +18 -0
- package/esm2020/lib/icon/src/icon.component.mjs +67 -0
- package/esm2020/lib/icon/src/icon.module.mjs +18 -0
- package/esm2020/lib/label/public_api.mjs +6 -0
- package/esm2020/lib/label/src/label.component.mjs +61 -0
- package/esm2020/lib/link/public_api.mjs +7 -0
- package/esm2020/lib/link/src/link.component.mjs +62 -0
- package/esm2020/lib/link/src/link.module.mjs +16 -0
- package/esm2020/lib/listbox/public_api.mjs +10 -0
- package/esm2020/lib/listbox/src/cdk-option-scroll-issue-patch.mjs +30 -0
- package/esm2020/lib/listbox/src/listbox-child.mjs +7 -0
- package/esm2020/lib/listbox/src/listbox-input.directive.mjs +42 -0
- package/esm2020/lib/listbox/src/listbox-item.component.mjs +49 -0
- package/esm2020/lib/listbox/src/listbox.component.mjs +273 -0
- package/esm2020/lib/listbox/src/listbox.module.mjs +81 -0
- package/esm2020/lib/listbox/src/option-icon.directive.mjs +22 -0
- package/esm2020/lib/listbox/src/option-primary-text.directive.mjs +25 -0
- package/esm2020/lib/listbox/src/option-secondary-text.directive.mjs +22 -0
- package/esm2020/lib/listbox/src/option.component.mjs +58 -0
- package/esm2020/lib/listbox/src/section.directive.mjs +46 -0
- package/esm2020/lib/menu/public_api.mjs +10 -0
- package/esm2020/lib/menu/src/menu-item.component.mjs +45 -0
- package/esm2020/lib/menu/src/menu-section.component.mjs +27 -0
- package/esm2020/lib/menu/src/menu-trigger.directive.mjs +149 -0
- package/esm2020/lib/menu/src/menu.component.mjs +33 -0
- package/esm2020/lib/menu/src/menu.module.mjs +39 -0
- package/esm2020/lib/modal/public_api.mjs +19 -0
- package/esm2020/lib/modal/src/dialog/confirmation-dialog.component.mjs +61 -0
- package/esm2020/lib/modal/src/dialog/danger-dialog.component.mjs +62 -0
- package/esm2020/lib/modal/src/dialog/dialog-close-button.directive.mjs +18 -0
- package/esm2020/lib/modal/src/dialog/dialog-content.directive.mjs +29 -0
- package/esm2020/lib/modal/src/dialog/dialog-footer.component.mjs +43 -0
- package/esm2020/lib/modal/src/dialog/dialog-header.component.mjs +65 -0
- package/esm2020/lib/modal/src/dialog/dialog-trigger.directive.mjs +37 -0
- package/esm2020/lib/modal/src/dialog/dialog.component.mjs +60 -0
- package/esm2020/lib/modal/src/modal-base.component.mjs +89 -0
- package/esm2020/lib/modal/src/modal-close-button.directive.mjs +28 -0
- package/esm2020/lib/modal/src/modal-trigger.directive.mjs +42 -0
- package/esm2020/lib/modal/src/modal.module.mjs +143 -0
- package/esm2020/lib/modal/src/modal.service.mjs +58 -0
- package/esm2020/lib/modal/src/panel/inline-panel.component.mjs +15 -0
- package/esm2020/lib/modal/src/panel/panel-back-button.directive.mjs +13 -0
- package/esm2020/lib/modal/src/panel/panel-close-button.directive.mjs +16 -0
- package/esm2020/lib/modal/src/panel/panel-content.component.mjs +38 -0
- package/esm2020/lib/modal/src/panel/panel-footer.component.mjs +38 -0
- package/esm2020/lib/modal/src/panel/panel-header.component.mjs +68 -0
- package/esm2020/lib/modal/src/panel/panel-trigger.directive.mjs +37 -0
- package/esm2020/lib/modal/src/panel/panel.component.mjs +37 -0
- package/esm2020/lib/notification-badge/public_api.mjs +3 -0
- package/esm2020/lib/notification-badge/src/notification-badge.component.mjs +28 -0
- package/esm2020/lib/notification-badge/src/notification-badge.module.mjs +18 -0
- package/esm2020/lib/pagination/public_api.mjs +3 -0
- package/esm2020/lib/pagination/src/pagination.component.mjs +85 -0
- package/esm2020/lib/pagination/src/pagination.module.mjs +36 -0
- package/esm2020/lib/popover/public_api.mjs +10 -0
- package/esm2020/lib/popover/src/popover-close-button.directive.mjs +32 -0
- package/esm2020/lib/popover/src/popover-title.directive.mjs +24 -0
- package/esm2020/lib/popover/src/popover-trigger.directive.mjs +301 -0
- package/esm2020/lib/popover/src/popover.component.mjs +88 -0
- package/esm2020/lib/popover/src/popover.module.mjs +38 -0
- package/esm2020/lib/radio/public_api.mjs +8 -0
- package/esm2020/lib/radio/src/radio-group.component.mjs +195 -0
- package/esm2020/lib/radio/src/radio.component.mjs +279 -0
- package/esm2020/lib/radio/src/radio.module.mjs +22 -0
- package/esm2020/lib/segmented-tabs/public_api.mjs +6 -0
- package/esm2020/lib/segmented-tabs/src/segmented-tab-content.directive.mjs +15 -0
- package/esm2020/lib/segmented-tabs/src/segmented-tab-label.directive.mjs +20 -0
- package/esm2020/lib/segmented-tabs/src/segmented-tab.component.mjs +69 -0
- package/esm2020/lib/segmented-tabs/src/segmented-tabs.component.mjs +215 -0
- package/esm2020/lib/segmented-tabs/src/segmented-tabs.module.mjs +39 -0
- package/esm2020/lib/select/public_api.mjs +10 -0
- package/esm2020/lib/select/src/basic-select/basic-select.component.mjs +127 -0
- package/esm2020/lib/select/src/common/hidden-select.component.mjs +33 -0
- package/esm2020/lib/select/src/common/select-component-base.mjs +267 -0
- package/esm2020/lib/select/src/common/select-value-holder.mjs +86 -0
- package/esm2020/lib/select/src/select/searchable-select.directive.mjs +90 -0
- package/esm2020/lib/select/src/select/select.component.mjs +351 -0
- package/esm2020/lib/select/src/select/select.module.mjs +113 -0
- package/esm2020/lib/select/src/select/selection-text.directive.mjs +19 -0
- package/esm2020/lib/skeleton/public_api.mjs +6 -0
- package/esm2020/lib/skeleton/src/skeleton-block.directive.mjs +16 -0
- package/esm2020/lib/skeleton/src/skeleton-circle.directive.mjs +16 -0
- package/esm2020/lib/skeleton/src/skeleton-text.directive.mjs +43 -0
- package/esm2020/lib/skeleton/src/skeleton.component.mjs +29 -0
- package/esm2020/lib/skeleton/src/skeleton.module.mjs +37 -0
- package/esm2020/lib/skeleton/src/util.mjs +2 -0
- package/esm2020/lib/surface/public_api.mjs +7 -0
- package/esm2020/lib/surface/src/surface.component.mjs +25 -0
- package/esm2020/lib/surface/src/surface.module.mjs +16 -0
- package/esm2020/lib/switch/public_api.mjs +4 -0
- package/esm2020/lib/switch/src/switch-required-validator.mjs +27 -0
- package/esm2020/lib/switch/src/switch.component.mjs +216 -0
- package/esm2020/lib/switch/src/switch.module.mjs +19 -0
- package/esm2020/lib/table/public_api.mjs +15 -0
- package/esm2020/lib/table/src/table-body.directive.mjs +20 -0
- package/esm2020/lib/table/src/table-cell.directive.mjs +87 -0
- package/esm2020/lib/table/src/table-head-cell.component.mjs +57 -0
- package/esm2020/lib/table/src/table-head.directive.mjs +32 -0
- package/esm2020/lib/table/src/table-row.directive.mjs +48 -0
- package/esm2020/lib/table/src/table-sort-header.directive.mjs +44 -0
- package/esm2020/lib/table/src/table-sort.directive.mjs +26 -0
- package/esm2020/lib/table/src/table.component.mjs +82 -0
- package/esm2020/lib/table/src/table.directive.mjs +20 -0
- package/esm2020/lib/table/src/table.module.mjs +74 -0
- package/esm2020/lib/text-field/public_api.mjs +12 -0
- package/esm2020/lib/text-field/src/text-field-affix.directive.mjs +26 -0
- package/esm2020/lib/text-field/src/text-field-input.directive.mjs +51 -0
- package/esm2020/lib/text-field/src/text-field-postfix.directive.mjs +13 -0
- package/esm2020/lib/text-field/src/text-field-prefix.directive.mjs +13 -0
- package/esm2020/lib/text-field/src/text-field-textarea-autosize.directive.mjs +73 -0
- package/esm2020/lib/text-field/src/text-field.component.mjs +78 -0
- package/esm2020/lib/text-field/src/text-field.module.mjs +67 -0
- package/esm2020/lib/theme/public_api.mjs +34 -0
- package/esm2020/lib/theme/src/sapphire-overlay-container.service.mjs +38 -0
- package/esm2020/lib/theme/src/theme-base.directive.mjs +87 -0
- package/esm2020/lib/theme/src/theme-check.directive.mjs +29 -0
- package/esm2020/lib/theme/src/theme-root.directive.mjs +23 -0
- package/esm2020/lib/theme/src/theme.module.mjs +32 -0
- package/esm2020/lib/theme/src/themes.mjs +27 -0
- package/esm2020/lib/theme/src/top-level-theme-ref.service.mjs +21 -0
- package/esm2020/lib/tooltip/public_api.mjs +5 -0
- package/esm2020/lib/tooltip/src/tooltip.component.mjs +47 -0
- package/esm2020/lib/tooltip/src/tooltip.directive.mjs +223 -0
- package/esm2020/lib/tooltip/src/tooltip.module.mjs +30 -0
- package/esm2020/lib/tooltip/src/truncated-with-tooltip.directive.mjs +56 -0
- package/esm2020/lib/typography/public_api.mjs +8 -0
- package/esm2020/lib/typography/src/heading.component.mjs +44 -0
- package/esm2020/lib/typography/src/paragraph.component.mjs +24 -0
- package/esm2020/lib/typography/src/typography.module.mjs +19 -0
- package/esm2020/public-api.mjs +30 -0
- package/fesm2015/danske-sapphire-angular.mjs +8010 -0
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -0
- package/fesm2020/danske-sapphire-angular.mjs +7890 -0
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/badge/public_api.d.ts +2 -0
- package/lib/badge/src/badge.component.d.ts +35 -0
- package/lib/badge/src/badge.module.d.ts +8 -0
- package/lib/button/public_api.d.ts +7 -0
- package/lib/button/src/button-group.component.d.ts +26 -0
- package/lib/button/src/button-icon.directive.d.ts +5 -0
- package/lib/button/src/button.component.d.ts +31 -0
- package/lib/button/src/button.module.d.ts +14 -0
- package/lib/button/src/icon-button.component.d.ts +26 -0
- package/lib/button/src/toggle-button-required-validator.d.ts +10 -0
- package/lib/button/src/toggle-button.component.d.ts +39 -0
- package/lib/checkbox/public_api.d.ts +3 -0
- package/lib/checkbox/src/checkbox-required-validator.d.ts +10 -0
- package/lib/checkbox/src/checkbox.component.d.ts +112 -0
- package/lib/checkbox/src/checkbox.module.d.ts +11 -0
- package/lib/common/auto-id.decorator.d.ts +7 -0
- package/lib/common/coerce-boolean.decorator.d.ts +7 -0
- package/lib/common/constructor.d.ts +2 -0
- package/lib/common/disabled.d.ts +9 -0
- package/lib/common/focused.directive.d.ts +30 -0
- package/lib/common/placement.d.ts +11 -0
- package/lib/common/platform.d.ts +9 -0
- package/lib/common/pressed.directive.d.ts +27 -0
- package/lib/common/public_api.d.ts +2 -0
- package/lib/common/sapphire-view-encapsulation.d.ts +37 -0
- package/lib/common/scroll-monitor.directive.d.ts +23 -0
- package/lib/common/tabindex.d.ts +12 -0
- package/lib/common/visually-hidden.directive.d.ts +11 -0
- package/lib/contextual-help/public_api.d.ts +2 -0
- package/lib/contextual-help/src/contextual-help.component.d.ts +50 -0
- package/lib/contextual-help/src/contextual-help.module.d.ts +7 -0
- package/lib/core.module.d.ts +30 -0
- package/lib/field/public_api.d.ts +7 -0
- package/lib/field/src/field-control.d.ts +16 -0
- package/lib/field/src/field-error.directive.d.ts +8 -0
- package/lib/field/src/field-label.directive.d.ts +8 -0
- package/lib/field/src/field-note-suffix.directive.d.ts +15 -0
- package/lib/field/src/field-note.directive.d.ts +8 -0
- package/lib/field/src/field.component.d.ts +77 -0
- package/lib/field/src/field.module.d.ts +14 -0
- package/lib/icon/public_api.d.ts +3 -0
- package/lib/icon/src/icon-size-provider.d.ts +23 -0
- package/lib/icon/src/icon.component.d.ts +18 -0
- package/lib/icon/src/icon.module.d.ts +8 -0
- package/lib/label/public_api.d.ts +5 -0
- package/lib/label/src/label.component.d.ts +43 -0
- package/lib/link/public_api.d.ts +2 -0
- package/lib/link/src/link.component.d.ts +13 -0
- package/lib/link/src/link.module.d.ts +7 -0
- package/lib/listbox/public_api.d.ts +9 -0
- package/lib/listbox/src/cdk-option-scroll-issue-patch.d.ts +17 -0
- package/lib/listbox/src/listbox-child.d.ts +6 -0
- package/lib/listbox/src/listbox-input.directive.d.ts +16 -0
- package/lib/listbox/src/listbox-item.component.d.ts +21 -0
- package/lib/listbox/src/listbox.component.d.ts +127 -0
- package/lib/listbox/src/listbox.module.d.ts +22 -0
- package/lib/listbox/src/option-icon.directive.d.ts +10 -0
- package/lib/listbox/src/option-primary-text.directive.d.ts +14 -0
- package/lib/listbox/src/option-secondary-text.directive.d.ts +10 -0
- package/lib/listbox/src/option.component.d.ts +21 -0
- package/lib/listbox/src/section.directive.d.ts +14 -0
- package/lib/menu/public_api.d.ts +5 -0
- package/lib/menu/src/menu-item.component.d.ts +12 -0
- package/lib/menu/src/menu-section.component.d.ts +12 -0
- package/lib/menu/src/menu-trigger.directive.d.ts +34 -0
- package/lib/menu/src/menu.component.d.ts +10 -0
- package/lib/menu/src/menu.module.d.ts +13 -0
- package/lib/modal/public_api.d.ts +18 -0
- package/lib/modal/src/dialog/confirmation-dialog.component.d.ts +43 -0
- package/lib/modal/src/dialog/danger-dialog.component.d.ts +44 -0
- package/lib/modal/src/dialog/dialog-close-button.directive.d.ts +7 -0
- package/lib/modal/src/dialog/dialog-content.directive.d.ts +13 -0
- package/lib/modal/src/dialog/dialog-footer.component.d.ts +20 -0
- package/lib/modal/src/dialog/dialog-header.component.d.ts +25 -0
- package/lib/modal/src/dialog/dialog-trigger.directive.d.ts +13 -0
- package/lib/modal/src/dialog/dialog.component.d.ts +33 -0
- package/lib/modal/src/modal-base.component.d.ts +33 -0
- package/lib/modal/src/modal-close-button.directive.d.ts +9 -0
- package/lib/modal/src/modal-trigger.directive.d.ts +24 -0
- package/lib/modal/src/modal.module.d.ts +30 -0
- package/lib/modal/src/modal.service.d.ts +26 -0
- package/lib/modal/src/panel/inline-panel.component.d.ts +6 -0
- package/lib/modal/src/panel/panel-back-button.directive.d.ts +5 -0
- package/lib/modal/src/panel/panel-close-button.directive.d.ts +6 -0
- package/lib/modal/src/panel/panel-content.component.d.ts +14 -0
- package/lib/modal/src/panel/panel-footer.component.d.ts +21 -0
- package/lib/modal/src/panel/panel-header.component.d.ts +26 -0
- package/lib/modal/src/panel/panel-trigger.directive.d.ts +13 -0
- package/lib/modal/src/panel/panel.component.d.ts +18 -0
- package/lib/notification-badge/public_api.d.ts +2 -0
- package/lib/notification-badge/src/notification-badge.component.d.ts +10 -0
- package/lib/notification-badge/src/notification-badge.module.d.ts +8 -0
- package/lib/pagination/public_api.d.ts +2 -0
- package/lib/pagination/src/pagination.component.d.ts +32 -0
- package/lib/pagination/src/pagination.module.d.ts +12 -0
- package/lib/popover/public_api.d.ts +5 -0
- package/lib/popover/src/popover-close-button.directive.d.ts +13 -0
- package/lib/popover/src/popover-title.directive.d.ts +11 -0
- package/lib/popover/src/popover-trigger.directive.d.ts +86 -0
- package/lib/popover/src/popover.component.d.ts +32 -0
- package/lib/popover/src/popover.module.d.ts +12 -0
- package/lib/radio/public_api.d.ts +3 -0
- package/lib/radio/src/radio-group.component.d.ts +65 -0
- package/lib/radio/src/radio.component.d.ts +99 -0
- package/lib/radio/src/radio.module.d.ts +12 -0
- package/lib/segmented-tabs/public_api.d.ts +5 -0
- package/lib/segmented-tabs/src/segmented-tab-content.directive.d.ts +6 -0
- package/lib/segmented-tabs/src/segmented-tab-label.directive.d.ts +6 -0
- package/lib/segmented-tabs/src/segmented-tab.component.d.ts +27 -0
- package/lib/segmented-tabs/src/segmented-tabs.component.d.ts +48 -0
- package/lib/segmented-tabs/src/segmented-tabs.module.d.ts +13 -0
- package/lib/select/public_api.d.ts +5 -0
- package/lib/select/src/basic-select/basic-select.component.d.ts +50 -0
- package/lib/select/src/common/hidden-select.component.d.ts +19 -0
- package/lib/select/src/common/select-component-base.d.ts +109 -0
- package/lib/select/src/common/select-value-holder.d.ts +54 -0
- package/lib/select/src/select/searchable-select.directive.d.ts +40 -0
- package/lib/select/src/select/select.component.d.ts +80 -0
- package/lib/select/src/select/select.module.d.ts +26 -0
- package/lib/select/src/select/selection-text.directive.d.ts +11 -0
- package/lib/skeleton/public_api.d.ts +5 -0
- package/lib/skeleton/src/skeleton-block.directive.d.ts +5 -0
- package/lib/skeleton/src/skeleton-circle.directive.d.ts +5 -0
- package/lib/skeleton/src/skeleton-text.directive.d.ts +13 -0
- package/lib/skeleton/src/skeleton.component.d.ts +13 -0
- package/lib/skeleton/src/skeleton.module.d.ts +11 -0
- package/lib/skeleton/src/util.d.ts +1 -0
- package/lib/surface/public_api.d.ts +2 -0
- package/lib/surface/src/surface.component.d.ts +11 -0
- package/lib/surface/src/surface.module.d.ts +7 -0
- package/lib/switch/public_api.d.ts +3 -0
- package/lib/switch/src/switch-required-validator.d.ts +10 -0
- package/lib/switch/src/switch.component.d.ts +91 -0
- package/lib/switch/src/switch.module.d.ts +9 -0
- package/lib/table/public_api.d.ts +10 -0
- package/lib/table/src/table-body.directive.d.ts +7 -0
- package/lib/table/src/table-cell.directive.d.ts +30 -0
- package/lib/table/src/table-head-cell.component.d.ts +19 -0
- package/lib/table/src/table-head.directive.d.ts +10 -0
- package/lib/table/src/table-row.directive.d.ts +16 -0
- package/lib/table/src/table-sort-header.directive.d.ts +11 -0
- package/lib/table/src/table-sort.directive.d.ts +13 -0
- package/lib/table/src/table.component.d.ts +37 -0
- package/lib/table/src/table.directive.d.ts +7 -0
- package/lib/table/src/table.module.d.ts +19 -0
- package/lib/text-field/public_api.d.ts +7 -0
- package/lib/text-field/src/text-field-affix.directive.d.ts +10 -0
- package/lib/text-field/src/text-field-input.directive.d.ts +16 -0
- package/lib/text-field/src/text-field-postfix.directive.d.ts +5 -0
- package/lib/text-field/src/text-field-prefix.directive.d.ts +5 -0
- package/lib/text-field/src/text-field-textarea-autosize.directive.d.ts +20 -0
- package/lib/text-field/src/text-field.component.d.ts +23 -0
- package/lib/text-field/src/text-field.module.d.ts +17 -0
- package/lib/theme/public_api.d.ts +24 -0
- package/lib/theme/src/sapphire-overlay-container.service.d.ts +14 -0
- package/lib/theme/src/theme-base.directive.d.ts +14 -0
- package/lib/theme/src/theme-check.directive.d.ts +14 -0
- package/lib/theme/src/theme-root.directive.d.ts +13 -0
- package/lib/theme/src/theme.module.d.ts +14 -0
- package/lib/theme/src/themes.d.ts +16 -0
- package/lib/theme/src/top-level-theme-ref.service.d.ts +13 -0
- package/lib/tooltip/public_api.d.ts +4 -0
- package/lib/tooltip/src/tooltip.component.d.ts +10 -0
- package/lib/tooltip/src/tooltip.directive.d.ts +39 -0
- package/lib/tooltip/src/tooltip.module.d.ts +11 -0
- package/lib/tooltip/src/truncated-with-tooltip.directive.d.ts +26 -0
- package/lib/typography/public_api.d.ts +3 -0
- package/lib/typography/src/heading.component.d.ts +17 -0
- package/lib/typography/src/paragraph.component.d.ts +8 -0
- package/lib/typography/src/typography.module.d.ts +9 -0
- package/package.json +45 -0
- package/public-api.d.ts +26 -0
- package/src/lib/listbox/src/README.md +67 -0
- package/theme-assets/default-dark.css +1 -0
- package/theme-assets/default.css +1 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input, HostBinding, forwardRef, isDevMode, } from '@angular/core';
|
|
3
|
+
import { CoerceBoolean } from '../../common/coerce-boolean.decorator';
|
|
4
|
+
import { UseComponentStylesOnHost } from '../../common/sapphire-view-encapsulation';
|
|
5
|
+
import { ICON_SIZE_PROVIDER, } from '../../icon/src/icon-size-provider';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
8
|
+
export class IconButtonComponent {
|
|
9
|
+
get derivedVariantAndStyleClass() {
|
|
10
|
+
let derivedVariantAndStyle;
|
|
11
|
+
if (this.variant === 'primary') {
|
|
12
|
+
derivedVariantAndStyle = 'primary-fill';
|
|
13
|
+
}
|
|
14
|
+
else if (this.variant === 'neutral') {
|
|
15
|
+
// TODO(v2): Remove as we remove this deprecated value for variant-prop
|
|
16
|
+
derivedVariantAndStyle = 'tertiary-ghost';
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// Making 'ghost' the default for all non-primary variants is to match previous api and avoid breaking changes
|
|
20
|
+
// TODO(v2) make 'fill' the default value for 'appearance' prop
|
|
21
|
+
derivedVariantAndStyle = `${this.variant}-${this.appearance && ['fill', 'ghost'].includes(this.appearance)
|
|
22
|
+
? this.appearance
|
|
23
|
+
: 'ghost'}`;
|
|
24
|
+
}
|
|
25
|
+
return `sapphire-icon-button--${derivedVariantAndStyle}`;
|
|
26
|
+
}
|
|
27
|
+
constructor(elementRef) {
|
|
28
|
+
this.elementRef = elementRef;
|
|
29
|
+
this.variant = 'tertiary';
|
|
30
|
+
// TODO(v2): Change default to 'fill'
|
|
31
|
+
this.appearance = 'ghost';
|
|
32
|
+
/**
|
|
33
|
+
* Applies different styles for a better contrast with the secondary color background.
|
|
34
|
+
* @default 'primary'
|
|
35
|
+
*/
|
|
36
|
+
this.surface = 'primary';
|
|
37
|
+
this.size = 'medium';
|
|
38
|
+
/**
|
|
39
|
+
* The behavior of the button when used in an HTML form.
|
|
40
|
+
*/
|
|
41
|
+
this.type = 'button';
|
|
42
|
+
}
|
|
43
|
+
ngAfterViewInit() {
|
|
44
|
+
const { ariaLabel, ariaHidden } = this.elementRef.nativeElement;
|
|
45
|
+
if (!ariaLabel && ariaHidden !== 'true' && isDevMode()) {
|
|
46
|
+
console.warn(`Label is required for accessibility reasons. Please, provide attribute "aria-label" value or set aria-hidden="true" for non-interactive elements.`, this.elementRef.nativeElement);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
IconButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IconButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
IconButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: IconButtonComponent, selector: "button[sp-icon-button], a[sp-icon-button]", inputs: { variant: "variant", appearance: "appearance", surface: "surface", size: "size", disabled: "disabled", type: "type" }, host: { properties: { "attr.disabled": "disabled || null", "class.is-disabled": "disabled", "class.sapphire-icon-button--large": "size === \"large\"", "class.sapphire-icon-button--small": "size === \"small\"", "class.sapphire-icon-button--extra-small": "size === \"extraSmall\"", "class.sapphire-icon-button--secondary-surface": "surface === \"secondary\"", "class": "this.derivedVariantAndStyleClass", "type": "this.type" }, classAttribute: "sapphire-icon-button" }, providers: [
|
|
52
|
+
{
|
|
53
|
+
provide: ICON_SIZE_PROVIDER,
|
|
54
|
+
useExisting: forwardRef(() => IconButtonComponent),
|
|
55
|
+
},
|
|
56
|
+
], hostDirectives: [{ directive: i1.UseComponentStylesOnHost }], ngImport: i0, template: "<span class=\"sapphire-icon-button__icon\">\n <ng-content></ng-content>\n</span>\n", styles: [".sapphire-icon-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:var(--sapphire-icon-button-size-height-m);width:var(--sapphire-icon-button-size-width-m);flex-shrink:0;border-radius:var(--sapphire-icon-button-size-radius-m);border-style:solid;border-width:0;border-color:transparent;transition-property:opacity,background-color,color;transition-duration:var(--sapphire-icon-button-time-transition);transition-timing-function:ease-in-out;cursor:pointer}a.sapphire-icon-button{text-decoration:none}.sapphire-icon-button:disabled,.sapphire-icon-button.is-disabled{opacity:var(--sapphire-icon-button-opacity-disabled);cursor:not-allowed}.sapphire-icon-button:focus{outline:none}.sapphire-icon-button.is-focus,.sapphire-icon-button:not(.js-focus):focus-visible{outline:var(--sapphire-icon-button-size-focus-ring-border) solid var(--sapphire-icon-button-color-focus-ring);outline-offset:var(--sapphire-icon-button-size-focus-ring-offset)}.sapphire-icon-button--primary-fill{background-color:var(--sapphire-icon-button-color-background-primary-default);color:var(--sapphire-icon-button-color-content-primary-default)}.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-primary-hover)}.sapphire-icon-button--primary-fill.is-focus,.sapphire-icon-button--primary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-primary-focus)}.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-primary-active)}.sapphire-icon-button--secondary-fill{background-color:var(--sapphire-icon-button-color-background-secondary-default);color:var(--sapphire-icon-button-color-content-secondary-default)}.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-hover);color:var(--sapphire-icon-button-color-content-secondary-hover)}.sapphire-icon-button--secondary-fill.is-focus,.sapphire-icon-button--secondary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-focus)}.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-active);color:var(--sapphire-icon-button-color-content-secondary-active)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-default)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-hover)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-focus)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-active)}.sapphire-icon-button--secondary-ghost{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-default);color:var(--sapphire-icon-button-color-content-secondary-default)}.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-hover);color:var(--sapphire-icon-button-color-content-secondary-hover)}.sapphire-icon-button--secondary-ghost.is-focus,.sapphire-icon-button--secondary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-focus)}.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-active);color:var(--sapphire-icon-button-color-content-secondary-active)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-default)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-hover)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-focus)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-active)}.sapphire-icon-button--tertiary-fill{background-color:var(--sapphire-icon-button-color-background-tertiary-default);color:var(--sapphire-icon-button-color-content-tertiary-default)}.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-hover);color:var(--sapphire-icon-button-color-content-tertiary-hover)}.sapphire-icon-button--tertiary-fill.is-focus,.sapphire-icon-button--tertiary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-focus)}.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-active);color:var(--sapphire-icon-button-color-content-tertiary-active)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-default)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-hover)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-focus)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-active)}.sapphire-icon-button--tertiary-ghost{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-default);color:var(--sapphire-icon-button-color-content-tertiary-default)}.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-hover);color:var(--sapphire-icon-button-color-content-tertiary-hover)}.sapphire-icon-button--tertiary-ghost.is-focus,.sapphire-icon-button--tertiary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-focus)}.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-active);color:var(--sapphire-icon-button-color-content-tertiary-active)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-default)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-hover)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-focus)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-active)}.sapphire-icon-button--danger-fill{background-color:var(--sapphire-icon-button-color-background-danger-default);color:var(--sapphire-icon-button-color-content-danger-default)}.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-hover);color:var(--sapphire-icon-button-color-content-danger-hover)}.sapphire-icon-button--danger-fill.is-focus,.sapphire-icon-button--danger-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-focus)}.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-active);color:var(--sapphire-icon-button-color-content-danger-active)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-default)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-hover)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-focus)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-active)}.sapphire-icon-button--danger-ghost{background-color:var(--sapphire-icon-button-color-background-danger-ghost-default);color:var(--sapphire-icon-button-color-content-danger-default)}.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-ghost-hover);color:var(--sapphire-icon-button-color-content-danger-hover)}.sapphire-icon-button--danger-ghost.is-focus,.sapphire-icon-button--danger-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-ghost-focus)}.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-ghost-active);color:var(--sapphire-icon-button-color-content-danger-active)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-default)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-hover)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-focus)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-active)}.sapphire-icon-button__icon{display:flex;flex-direction:column;justify-content:center;align-items:center;height:var(--sapphire-icon-button-size-icon-m);width:var(--sapphire-icon-button-size-icon-m)}.sapphire-icon-button--large .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-l);width:var(--sapphire-icon-button-size-icon-l)}.sapphire-icon-button--small .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-s);width:var(--sapphire-icon-button-size-icon-s)}.sapphire-icon-button--extra-small .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-xs);width:var(--sapphire-icon-button-size-icon-xs)}.sapphire-icon-button--large{height:var(--sapphire-icon-button-size-height-l);width:var(--sapphire-icon-button-size-width-l);border-radius:var(--sapphire-icon-button-size-radius-l)}.sapphire-icon-button--small{height:var(--sapphire-icon-button-size-height-s);width:var(--sapphire-icon-button-size-width-s);border-radius:var(--sapphire-icon-button-size-radius-s)}.sapphire-icon-button--extra-small{height:var(--sapphire-icon-button-size-height-xs);width:var(--sapphire-icon-button-size-width-xs);border-radius:var(--sapphire-icon-button-size-radius-xs)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
|
+
__decorate([
|
|
58
|
+
CoerceBoolean
|
|
59
|
+
], IconButtonComponent.prototype, "disabled", void 0);
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IconButtonComponent, decorators: [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{ selector: 'button[sp-icon-button], a[sp-icon-button]', providers: [
|
|
63
|
+
{
|
|
64
|
+
provide: ICON_SIZE_PROVIDER,
|
|
65
|
+
useExisting: forwardRef(() => IconButtonComponent),
|
|
66
|
+
},
|
|
67
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
68
|
+
'[attr.disabled]': 'disabled || null',
|
|
69
|
+
'[class.is-disabled]': 'disabled',
|
|
70
|
+
class: 'sapphire-icon-button',
|
|
71
|
+
'[class.sapphire-icon-button--large]': 'size === "large"',
|
|
72
|
+
'[class.sapphire-icon-button--small]': 'size === "small"',
|
|
73
|
+
'[class.sapphire-icon-button--extra-small]': 'size === "extraSmall"',
|
|
74
|
+
'[class.sapphire-icon-button--secondary-surface]': 'surface === "secondary"',
|
|
75
|
+
}, hostDirectives: [UseComponentStylesOnHost], template: "<span class=\"sapphire-icon-button__icon\">\n <ng-content></ng-content>\n</span>\n", styles: [".sapphire-icon-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:var(--sapphire-icon-button-size-height-m);width:var(--sapphire-icon-button-size-width-m);flex-shrink:0;border-radius:var(--sapphire-icon-button-size-radius-m);border-style:solid;border-width:0;border-color:transparent;transition-property:opacity,background-color,color;transition-duration:var(--sapphire-icon-button-time-transition);transition-timing-function:ease-in-out;cursor:pointer}a.sapphire-icon-button{text-decoration:none}.sapphire-icon-button:disabled,.sapphire-icon-button.is-disabled{opacity:var(--sapphire-icon-button-opacity-disabled);cursor:not-allowed}.sapphire-icon-button:focus{outline:none}.sapphire-icon-button.is-focus,.sapphire-icon-button:not(.js-focus):focus-visible{outline:var(--sapphire-icon-button-size-focus-ring-border) solid var(--sapphire-icon-button-color-focus-ring);outline-offset:var(--sapphire-icon-button-size-focus-ring-offset)}.sapphire-icon-button--primary-fill{background-color:var(--sapphire-icon-button-color-background-primary-default);color:var(--sapphire-icon-button-color-content-primary-default)}.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-primary-hover)}.sapphire-icon-button--primary-fill.is-focus,.sapphire-icon-button--primary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-primary-focus)}.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--primary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-primary-active)}.sapphire-icon-button--secondary-fill{background-color:var(--sapphire-icon-button-color-background-secondary-default);color:var(--sapphire-icon-button-color-content-secondary-default)}.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-hover);color:var(--sapphire-icon-button-color-content-secondary-hover)}.sapphire-icon-button--secondary-fill.is-focus,.sapphire-icon-button--secondary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-focus)}.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-active);color:var(--sapphire-icon-button-color-content-secondary-active)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-default)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-hover)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-focus)}.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-surface-secondary-active)}.sapphire-icon-button--secondary-ghost{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-default);color:var(--sapphire-icon-button-color-content-secondary-default)}.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-hover);color:var(--sapphire-icon-button-color-content-secondary-hover)}.sapphire-icon-button--secondary-ghost.is-focus,.sapphire-icon-button--secondary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-focus)}.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-active);color:var(--sapphire-icon-button-color-content-secondary-active)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-default)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-hover)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-focus)}.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--secondary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-secondary-ghost-surface-secondary-active)}.sapphire-icon-button--tertiary-fill{background-color:var(--sapphire-icon-button-color-background-tertiary-default);color:var(--sapphire-icon-button-color-content-tertiary-default)}.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-hover);color:var(--sapphire-icon-button-color-content-tertiary-hover)}.sapphire-icon-button--tertiary-fill.is-focus,.sapphire-icon-button--tertiary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-focus)}.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-active);color:var(--sapphire-icon-button-color-content-tertiary-active)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-default)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-hover)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-focus)}.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-surface-secondary-active)}.sapphire-icon-button--tertiary-ghost{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-default);color:var(--sapphire-icon-button-color-content-tertiary-default)}.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-hover);color:var(--sapphire-icon-button-color-content-tertiary-hover)}.sapphire-icon-button--tertiary-ghost.is-focus,.sapphire-icon-button--tertiary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-focus)}.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-active);color:var(--sapphire-icon-button-color-content-tertiary-active)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-default)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-hover)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-focus)}.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--tertiary-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-tertiary-ghost-surface-secondary-active)}.sapphire-icon-button--danger-fill{background-color:var(--sapphire-icon-button-color-background-danger-default);color:var(--sapphire-icon-button-color-content-danger-default)}.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-hover);color:var(--sapphire-icon-button-color-content-danger-hover)}.sapphire-icon-button--danger-fill.is-focus,.sapphire-icon-button--danger-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-focus)}.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-active);color:var(--sapphire-icon-button-color-content-danger-active)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-default)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-hover)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-focus)}.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-fill.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-surface-secondary-active)}.sapphire-icon-button--danger-ghost{background-color:var(--sapphire-icon-button-color-background-danger-ghost-default);color:var(--sapphire-icon-button-color-content-danger-default)}.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-ghost-hover);color:var(--sapphire-icon-button-color-content-danger-hover)}.sapphire-icon-button--danger-ghost.is-focus,.sapphire-icon-button--danger-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-ghost-focus)}.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-icon-button-color-background-danger-ghost-active);color:var(--sapphire-icon-button-color-content-danger-active)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-default)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-hover)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface.is-focus,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-icon-button-color-background-danger-ghost-surface-secondary-focus)}.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-icon-button--danger-ghost.sapphire-icon-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-active)}.sapphire-icon-button__icon{display:flex;flex-direction:column;justify-content:center;align-items:center;height:var(--sapphire-icon-button-size-icon-m);width:var(--sapphire-icon-button-size-icon-m)}.sapphire-icon-button--large .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-l);width:var(--sapphire-icon-button-size-icon-l)}.sapphire-icon-button--small .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-s);width:var(--sapphire-icon-button-size-icon-s)}.sapphire-icon-button--extra-small .sapphire-icon-button__icon{height:var(--sapphire-icon-button-size-icon-xs);width:var(--sapphire-icon-button-size-icon-xs)}.sapphire-icon-button--large{height:var(--sapphire-icon-button-size-height-l);width:var(--sapphire-icon-button-size-width-l);border-radius:var(--sapphire-icon-button-size-radius-l)}.sapphire-icon-button--small{height:var(--sapphire-icon-button-size-height-s);width:var(--sapphire-icon-button-size-width-s);border-radius:var(--sapphire-icon-button-size-radius-s)}.sapphire-icon-button--extra-small{height:var(--sapphire-icon-button-size-height-xs);width:var(--sapphire-icon-button-size-width-xs);border-radius:var(--sapphire-icon-button-size-radius-xs)}\n"] }]
|
|
76
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { variant: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], appearance: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], surface: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], size: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], disabled: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], derivedVariantAndStyleClass: [{
|
|
87
|
+
type: HostBinding,
|
|
88
|
+
args: ['class']
|
|
89
|
+
}], type: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}, {
|
|
92
|
+
type: HostBinding,
|
|
93
|
+
args: ['type']
|
|
94
|
+
}] } });
|
|
95
|
+
//# sourceMappingURL=data:application/json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wic2FwcGhpcmUtaWNvbi1idXR0b25fX2ljb25cIj5cbiAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuPC9zcGFuPlxuIl19
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Directive, forwardRef, Input } from '@angular/core';
|
|
2
|
+
import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const TOGGLE_BUTTON_REQUIRED_VALIDATOR = {
|
|
5
|
+
provide: NG_VALIDATORS,
|
|
6
|
+
useExisting: forwardRef(() => SapphireToggleButtonRequiredValidator),
|
|
7
|
+
multi: true,
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Validator for Sapphire checkbox's isRequired attribute in template-driven checkbox.
|
|
11
|
+
*/
|
|
12
|
+
export class SapphireToggleButtonRequiredValidator extends CheckboxRequiredValidator {
|
|
13
|
+
}
|
|
14
|
+
SapphireToggleButtonRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: SapphireToggleButtonRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
SapphireToggleButtonRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: SapphireToggleButtonRequiredValidator, selector: "button[sp-toggle-button][required][formControlName],\n button[sp-toggle-button][required][formControl],\n button[sp-toggle-button][required][ngModel]", inputs: { required: "required" }, providers: [TOGGLE_BUTTON_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: SapphireToggleButtonRequiredValidator, decorators: [{
|
|
17
|
+
type: Directive,
|
|
18
|
+
args: [{
|
|
19
|
+
selector: `button[sp-toggle-button][required][formControlName],
|
|
20
|
+
button[sp-toggle-button][required][formControl],
|
|
21
|
+
button[sp-toggle-button][required][ngModel]`,
|
|
22
|
+
providers: [TOGGLE_BUTTON_REQUIRED_VALIDATOR],
|
|
23
|
+
}]
|
|
24
|
+
}], propDecorators: { required: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}] } });
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWJ1dHRvbi1yZXF1aXJlZC12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2J1dHRvbi9zcmMvdG9nZ2xlLWJ1dHRvbi1yZXF1aXJlZC12YWxpZGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFZLE1BQU0sZUFBZSxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxhQUFhLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7QUFFMUUsTUFBTSxnQ0FBZ0MsR0FBYTtJQUNqRCxPQUFPLEVBQUUsYUFBYTtJQUN0QixXQUFXLEVBQUUsVUFBVSxDQUFDLEdBQUcsRUFBRSxDQUFDLHFDQUFxQyxDQUFDO0lBQ3BFLEtBQUssRUFBRSxJQUFJO0NBQ1osQ0FBQztBQUVGOztHQUVHO0FBT0gsTUFBTSxPQUFPLHFDQUFzQyxTQUFRLHlCQUF5Qjs7a0lBQXZFLHFDQUFxQztzSEFBckMscUNBQXFDLDBPQUZyQyxDQUFDLGdDQUFnQyxDQUFDOzJGQUVsQyxxQ0FBcUM7a0JBTmpELFNBQVM7bUJBQUM7b0JBQ1QsUUFBUSxFQUFFOzt5REFFNkM7b0JBQ3ZELFNBQVMsRUFBRSxDQUFDLGdDQUFnQyxDQUFDO2lCQUM5Qzs4QkFHQyxRQUFRO3NCQURQLEtBQUsiLCJzb3VyY2VzQ29udG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pcmVkITogYm9vbGVhbjtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, forwardRef, HostBinding, HostListener, Input, isDevMode, Output, } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { IconComponent } from '../../icon/public_api';
|
|
5
|
+
import { CoerceBoolean } from '../../common/coerce-boolean.decorator';
|
|
6
|
+
import { ButtonIconDirective } from './button-icon.directive';
|
|
7
|
+
import { UseComponentStylesOnHost } from '../../common/sapphire-view-encapsulation';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
10
|
+
import * as i2 from "@angular/common";
|
|
11
|
+
/**
|
|
12
|
+
* A button with a toggleable `isSelected` state. By default, the selection is
|
|
13
|
+
* toggled when the button is pressed, allowing user to switch between two
|
|
14
|
+
* states or modes.
|
|
15
|
+
*/
|
|
16
|
+
export class ToggleButtonComponent {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.size = 'medium';
|
|
19
|
+
/**
|
|
20
|
+
* Whether selected is controlled. If it's controlled via input binding,
|
|
21
|
+
* then we just output selectChanges, without updating this._selected.
|
|
22
|
+
*/
|
|
23
|
+
this.isSelectedControlled = false;
|
|
24
|
+
this.selectedChange = new EventEmitter();
|
|
25
|
+
this.iconAlign = 'left';
|
|
26
|
+
this.onTouched = () => { };
|
|
27
|
+
this.controlValueAccessorChangeFn = () => { };
|
|
28
|
+
}
|
|
29
|
+
writeValue(value) {
|
|
30
|
+
this.selected = !!value;
|
|
31
|
+
}
|
|
32
|
+
registerOnChange(fn) {
|
|
33
|
+
this.controlValueAccessorChangeFn = fn;
|
|
34
|
+
}
|
|
35
|
+
registerOnTouched(fn) {
|
|
36
|
+
this.onTouched = fn;
|
|
37
|
+
}
|
|
38
|
+
setDisabledState(isDisabled) {
|
|
39
|
+
this.disabled = isDisabled;
|
|
40
|
+
}
|
|
41
|
+
ngOnChanges(changes) {
|
|
42
|
+
this.isSelectedControlled = changes.selected?.currentValue !== undefined;
|
|
43
|
+
}
|
|
44
|
+
ngAfterContentInit() {
|
|
45
|
+
if (this.icon) {
|
|
46
|
+
if (!this.buttonIcon && isDevMode()) {
|
|
47
|
+
console.error(`Icon is used in a button.
|
|
48
|
+
You should either add spButtonIcon on the icon or use sp-icon-button instead of sp-button"`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
_onBlur() {
|
|
53
|
+
this.onTouched();
|
|
54
|
+
}
|
|
55
|
+
handleClick() {
|
|
56
|
+
const newValue = !this.selected;
|
|
57
|
+
this.selectedChange.emit(newValue);
|
|
58
|
+
this.controlValueAccessorChangeFn(newValue);
|
|
59
|
+
if (!this.isSelectedControlled) {
|
|
60
|
+
this.selected = newValue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
ToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ToggleButtonComponent, selector: "button[sp-toggle-button]", inputs: { size: "size", selected: "selected", disabled: "disabled", iconAlign: "iconAlign" }, outputs: { selectedChange: "selectedChange" }, host: { attributes: { "type": "button" }, listeners: { "blur": "_onBlur()", "click": "handleClick()" }, properties: { "attr.disabled": "disabled || null", "class.is-disabled": "disabled", "class.sapphire-button": "true", "class.sapphire-button--selected": "selected", "class.sapphire-button--unselected": "!selected", "class.sapphire-button--large": "size === \"large\"", "class.sapphire-button--small": "size === \"small\"", "class.sapphire-button--with-left-icon": "buttonIcon && iconAlign === \"left\"", "class.sapphire-button--with-right-icon": "buttonIcon && iconAlign === \"right\"", "attr.aria-pressed": "this.selected" } }, providers: [
|
|
66
|
+
{
|
|
67
|
+
provide: NG_VALUE_ACCESSOR,
|
|
68
|
+
useExisting: forwardRef(() => ToggleButtonComponent),
|
|
69
|
+
multi: true,
|
|
70
|
+
},
|
|
71
|
+
], queries: [{ propertyName: "buttonIcon", first: true, predicate: ButtonIconDirective, descendants: true }, { propertyName: "icon", first: true, predicate: IconComponent, descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: i1.UseComponentStylesOnHost }], ngImport: i0, template: "<span *ngIf=\"buttonIcon && iconAlign === 'left'\" class=\"sapphire-button__icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n</span>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n\n<span *ngIf=\"buttonIcon && iconAlign === 'right'\" class=\"sapphire-button__icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n</span>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n<ng-template #iconContent>\n <ng-content select=\"[spButtonIcon]\"></ng-content>\n</ng-template>\n", styles: [".sapphire-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;margin:0;font-family:var(--sapphire-button-font-name);font-weight:var(--sapphire-button-font-weight);font-size:var(--sapphire-button-size-font-m);text-transform:var(--sapphire-button-font-text-transform);letter-spacing:var(--sapphire-button-font-letter-spacing);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0 var(--sapphire-button-size-spacing-horizontal-m);height:var(--sapphire-button-size-height-m);min-width:var(--sapphire-button-size-min-width-no-icon-m);max-width:-moz-fit-content;max-width:fit-content;flex-shrink:0;border-radius:var(--sapphire-button-size-radius-m);border-style:solid;border-width:0;border-color:transparent;transition-property:opacity,background-color,color;transition-duration:var(--sapphire-button-time-transition);transition-timing-function:ease-in-out;cursor:pointer}a.sapphire-button{text-decoration:none}.sapphire-button:disabled,.sapphire-button.is-disabled{opacity:var(--sapphire-button-opacity-disabled);cursor:not-allowed}.sapphire-button:focus{outline:none}.sapphire-button.is-focus,.sapphire-button:not(.js-focus):focus-visible{outline:var(--sapphire-button-size-focus-ring-border) solid var(--sapphire-button-color-focus-ring);outline-offset:var(--sapphire-button-size-focus-ring-offset)}.sapphire-button--with-left-icon,.sapphire-button--with-right-icon{min-width:var(--sapphire-button-size-min-width-with-icon-default)}.sapphire-button--with-right-icon .sapphire-button__icon{margin-left:var(--sapphire-button-size-spacing-icon-gap)}.sapphire-button--with-left-icon .sapphire-button__icon{margin-right:var(--sapphire-button-size-spacing-icon-gap)}.sapphire-button--primary-fill{background-color:var(--sapphire-button-color-background-primary-default);color:var(--sapphire-button-color-content-primary-default)}.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-primary-hover)}.sapphire-button--primary-fill.is-focus,.sapphire-button--primary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-primary-focus)}.sapphire-button--primary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-primary-active)}.sapphire-button--secondary-fill{background-color:var(--sapphire-button-color-background-secondary-default);color:var(--sapphire-button-color-content-secondary-default)}.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-hover);color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-fill.is-focus,.sapphire-button--secondary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-focus)}.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-active);color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-default)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-hover)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-focus)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-active)}.sapphire-button--secondary-ghost{background-color:var(--sapphire-button-color-background-secondary-ghost-default);color:var(--sapphire-button-color-content-secondary-default)}.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-ghost-hover);color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-ghost.is-focus,.sapphire-button--secondary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-ghost-focus)}.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-ghost-active);color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-default)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-hover)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-focus)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-active)}.sapphire-button--secondary-text{color:var(--sapphire-button-color-content-secondary-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-secondary-text);padding:0}.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--tertiary-fill{background-color:var(--sapphire-button-color-background-tertiary-default);color:var(--sapphire-button-color-content-tertiary-default)}.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-hover);color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-fill.is-focus,.sapphire-button--tertiary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-focus)}.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-active);color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-default)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-hover)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-focus)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-active)}.sapphire-button--tertiary-ghost{background-color:var(--sapphire-button-color-background-tertiary-ghost-default);color:var(--sapphire-button-color-content-tertiary-default)}.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-ghost-hover);color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-ghost.is-focus,.sapphire-button--tertiary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-ghost-focus)}.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-ghost-active);color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-default)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-hover)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-focus)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-active)}.sapphire-button--tertiary-text{color:var(--sapphire-button-color-content-tertiary-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-tertiary-text);padding:0}.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--danger-fill{background-color:var(--sapphire-button-color-background-danger-default);color:var(--sapphire-button-color-content-danger-default)}.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-hover);color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-fill.is-focus,.sapphire-button--danger-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-focus)}.sapphire-button--danger-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-active);color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--danger-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-danger-surface-secondary-default)}.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-surface-secondary-hover)}.sapphire-button--danger-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-surface-secondary-focus)}.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-surface-secondary-active)}.sapphire-button--danger-ghost{background-color:var(--sapphire-button-color-background-danger-ghost-default);color:var(--sapphire-button-color-content-danger-default)}.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-ghost-hover);color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-ghost.is-focus,.sapphire-button--danger-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-ghost-focus)}.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-active);color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-default)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-hover)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-focus)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-active)}.sapphire-button--danger-text{color:var(--sapphire-button-color-content-danger-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-danger-text);padding:0}.sapphire-button--danger-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--selected{background-color:var(--sapphire-button-color-background-selected-default);color:var(--sapphire-button-color-content-selected-default)}.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-selected-hover)}.sapphire-button--selected.is-focus,.sapphire-button--selected:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-selected-focus)}.sapphire-button--selected:not(:disabled):not(.is-disabled).is-active,.sapphire-button--selected:not(:disabled):not(.is-disabled):active,.sapphire-button--selected:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-selected-active);color:var(--sapphire-button-color-content-selected-active)}.sapphire-button--unselected{background-color:var(--sapphire-button-color-background-unselected-default);color:var(--sapphire-button-color-content-unselected-default)}.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-unselected-hover)}.sapphire-button--unselected.is-focus,.sapphire-button--unselected:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-unselected-focus)}.sapphire-button--unselected:not(:disabled):not(.is-disabled).is-active,.sapphire-button--unselected:not(:disabled):not(.is-disabled):active,.sapphire-button--unselected:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-unselected-active);color:var(--sapphire-button-color-content-unselected-active)}.sapphire-button__icon{display:flex;flex-direction:column;justify-content:center;align-items:center;height:var(--sapphire-button-size-icon-m);width:var(--sapphire-button-size-icon-m)}.sapphire-button--large .sapphire-button__icon{height:var(--sapphire-button-size-icon-l);width:var(--sapphire-button-size-icon-l)}.sapphire-button--small .sapphire-button__icon{height:var(--sapphire-button-size-icon-s);width:var(--sapphire-button-size-icon-s)}.sapphire-button--large{height:var(--sapphire-button-size-height-l);min-width:var(--sapphire-button-size-min-width-no-icon-l);padding:0 var(--sapphire-button-size-spacing-horizontal-l);font-size:var(--sapphire-button-size-font-l);border-radius:var(--sapphire-button-size-radius-l)}.sapphire-button--small{height:var(--sapphire-button-size-height-s);min-width:var(--sapphire-button-size-min-width-no-icon-s);padding:0 var(--sapphire-button-size-spacing-horizontal-s);font-size:var(--sapphire-button-size-font-s);border-radius:var(--sapphire-button-size-radius-s)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
|
+
__decorate([
|
|
73
|
+
CoerceBoolean
|
|
74
|
+
], ToggleButtonComponent.prototype, "selected", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
CoerceBoolean
|
|
77
|
+
], ToggleButtonComponent.prototype, "disabled", void 0);
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{ selector: 'button[sp-toggle-button]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
81
|
+
{
|
|
82
|
+
provide: NG_VALUE_ACCESSOR,
|
|
83
|
+
useExisting: forwardRef(() => ToggleButtonComponent),
|
|
84
|
+
multi: true,
|
|
85
|
+
},
|
|
86
|
+
], host: {
|
|
87
|
+
'[attr.disabled]': 'disabled || null',
|
|
88
|
+
'[class.is-disabled]': 'disabled',
|
|
89
|
+
'[class.sapphire-button]': 'true',
|
|
90
|
+
type: 'button',
|
|
91
|
+
'[class.sapphire-button--selected]': 'selected',
|
|
92
|
+
'[class.sapphire-button--unselected]': '!selected',
|
|
93
|
+
'[class.sapphire-button--large]': 'size === "large"',
|
|
94
|
+
'[class.sapphire-button--small]': 'size === "small"',
|
|
95
|
+
'[class.sapphire-button--with-left-icon]': 'buttonIcon && iconAlign === "left"',
|
|
96
|
+
'[class.sapphire-button--with-right-icon]': 'buttonIcon && iconAlign === "right"',
|
|
97
|
+
}, hostDirectives: [UseComponentStylesOnHost], template: "<span *ngIf=\"buttonIcon && iconAlign === 'left'\" class=\"sapphire-button__icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n</span>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n\n<span *ngIf=\"buttonIcon && iconAlign === 'right'\" class=\"sapphire-button__icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n</span>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n<ng-template #iconContent>\n <ng-content select=\"[spButtonIcon]\"></ng-content>\n</ng-template>\n", styles: [".sapphire-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;margin:0;font-family:var(--sapphire-button-font-name);font-weight:var(--sapphire-button-font-weight);font-size:var(--sapphire-button-size-font-m);text-transform:var(--sapphire-button-font-text-transform);letter-spacing:var(--sapphire-button-font-letter-spacing);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0 var(--sapphire-button-size-spacing-horizontal-m);height:var(--sapphire-button-size-height-m);min-width:var(--sapphire-button-size-min-width-no-icon-m);max-width:-moz-fit-content;max-width:fit-content;flex-shrink:0;border-radius:var(--sapphire-button-size-radius-m);border-style:solid;border-width:0;border-color:transparent;transition-property:opacity,background-color,color;transition-duration:var(--sapphire-button-time-transition);transition-timing-function:ease-in-out;cursor:pointer}a.sapphire-button{text-decoration:none}.sapphire-button:disabled,.sapphire-button.is-disabled{opacity:var(--sapphire-button-opacity-disabled);cursor:not-allowed}.sapphire-button:focus{outline:none}.sapphire-button.is-focus,.sapphire-button:not(.js-focus):focus-visible{outline:var(--sapphire-button-size-focus-ring-border) solid var(--sapphire-button-color-focus-ring);outline-offset:var(--sapphire-button-size-focus-ring-offset)}.sapphire-button--with-left-icon,.sapphire-button--with-right-icon{min-width:var(--sapphire-button-size-min-width-with-icon-default)}.sapphire-button--with-right-icon .sapphire-button__icon{margin-left:var(--sapphire-button-size-spacing-icon-gap)}.sapphire-button--with-left-icon .sapphire-button__icon{margin-right:var(--sapphire-button-size-spacing-icon-gap)}.sapphire-button--primary-fill{background-color:var(--sapphire-button-color-background-primary-default);color:var(--sapphire-button-color-content-primary-default)}.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-primary-hover)}.sapphire-button--primary-fill.is-focus,.sapphire-button--primary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-primary-focus)}.sapphire-button--primary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--primary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-primary-active)}.sapphire-button--secondary-fill{background-color:var(--sapphire-button-color-background-secondary-default);color:var(--sapphire-button-color-content-secondary-default)}.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-hover);color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-fill.is-focus,.sapphire-button--secondary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-focus)}.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-active);color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-default)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-hover)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-focus)}.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-surface-secondary-active)}.sapphire-button--secondary-ghost{background-color:var(--sapphire-button-color-background-secondary-ghost-default);color:var(--sapphire-button-color-content-secondary-default)}.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-ghost-hover);color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-ghost.is-focus,.sapphire-button--secondary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-ghost-focus)}.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-ghost-active);color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-default)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-hover)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-focus)}.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-secondary-ghost-surface-secondary-active)}.sapphire-button--secondary-text{color:var(--sapphire-button-color-content-secondary-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-secondary-text);padding:0}.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-secondary-hover)}.sapphire-button--secondary-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):active,.sapphire-button--secondary-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-secondary-active)}.sapphire-button--tertiary-fill{background-color:var(--sapphire-button-color-background-tertiary-default);color:var(--sapphire-button-color-content-tertiary-default)}.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-hover);color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-fill.is-focus,.sapphire-button--tertiary-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-focus)}.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-active);color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-default)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-hover)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-focus)}.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-surface-secondary-active)}.sapphire-button--tertiary-ghost{background-color:var(--sapphire-button-color-background-tertiary-ghost-default);color:var(--sapphire-button-color-content-tertiary-default)}.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-ghost-hover);color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-ghost.is-focus,.sapphire-button--tertiary-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-ghost-focus)}.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-ghost-active);color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-default)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-hover)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-focus)}.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-tertiary-ghost-surface-secondary-active)}.sapphire-button--tertiary-text{color:var(--sapphire-button-color-content-tertiary-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-tertiary-text);padding:0}.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-tertiary-hover)}.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):active,.sapphire-button--tertiary-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-tertiary-active)}.sapphire-button--danger-fill{background-color:var(--sapphire-button-color-background-danger-default);color:var(--sapphire-button-color-content-danger-default)}.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-hover);color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-fill.is-focus,.sapphire-button--danger-fill:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-focus)}.sapphire-button--danger-fill:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-fill:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-active);color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--danger-fill.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-danger-surface-secondary-default)}.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-surface-secondary-hover)}.sapphire-button--danger-fill.sapphire-button--secondary-surface.is-focus,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-surface-secondary-focus)}.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-fill.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-surface-secondary-active)}.sapphire-button--danger-ghost{background-color:var(--sapphire-button-color-background-danger-ghost-default);color:var(--sapphire-button-color-content-danger-default)}.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-ghost-hover);color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-ghost.is-focus,.sapphire-button--danger-ghost:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-ghost-focus)}.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-ghost:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-active);color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-default)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-hover)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface.is-focus,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-focus)}.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-ghost.sapphire-button--secondary-surface:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-danger-ghost-surface-secondary-active)}.sapphire-button--danger-text{color:var(--sapphire-button-color-content-danger-default);border-radius:var(--sapphire-button-size-radius-text);background:var(--sapphire-button-color-background-danger-text);padding:0}.sapphire-button--danger-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{color:var(--sapphire-button-color-content-danger-hover)}.sapphire-button--danger-text:not(:disabled):not(.is-disabled).is-active,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):active,.sapphire-button--danger-text:not(:disabled):not(.is-disabled):focus-visible:active{color:var(--sapphire-button-color-content-danger-active)}.sapphire-button--selected{background-color:var(--sapphire-button-color-background-selected-default);color:var(--sapphire-button-color-content-selected-default)}.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--selected:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-selected-hover)}.sapphire-button--selected.is-focus,.sapphire-button--selected:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-selected-focus)}.sapphire-button--selected:not(:disabled):not(.is-disabled).is-active,.sapphire-button--selected:not(:disabled):not(.is-disabled):active,.sapphire-button--selected:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-selected-active);color:var(--sapphire-button-color-content-selected-active)}.sapphire-button--unselected{background-color:var(--sapphire-button-color-background-unselected-default);color:var(--sapphire-button-color-content-unselected-default)}.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,.sapphire-button--unselected:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover{background-color:var(--sapphire-button-color-background-unselected-hover)}.sapphire-button--unselected.is-focus,.sapphire-button--unselected:not(.js-focus):focus-visible{background-color:var(--sapphire-button-color-background-unselected-focus)}.sapphire-button--unselected:not(:disabled):not(.is-disabled).is-active,.sapphire-button--unselected:not(:disabled):not(.is-disabled):active,.sapphire-button--unselected:not(:disabled):not(.is-disabled):focus-visible:active{background-color:var(--sapphire-button-color-background-unselected-active);color:var(--sapphire-button-color-content-unselected-active)}.sapphire-button__icon{display:flex;flex-direction:column;justify-content:center;align-items:center;height:var(--sapphire-button-size-icon-m);width:var(--sapphire-button-size-icon-m)}.sapphire-button--large .sapphire-button__icon{height:var(--sapphire-button-size-icon-l);width:var(--sapphire-button-size-icon-l)}.sapphire-button--small .sapphire-button__icon{height:var(--sapphire-button-size-icon-s);width:var(--sapphire-button-size-icon-s)}.sapphire-button--large{height:var(--sapphire-button-size-height-l);min-width:var(--sapphire-button-size-min-width-no-icon-l);padding:0 var(--sapphire-button-size-spacing-horizontal-l);font-size:var(--sapphire-button-size-font-l);border-radius:var(--sapphire-button-size-radius-l)}.sapphire-button--small{height:var(--sapphire-button-size-height-s);min-width:var(--sapphire-button-size-min-width-no-icon-s);padding:0 var(--sapphire-button-size-spacing-horizontal-s);font-size:var(--sapphire-button-size-font-s);border-radius:var(--sapphire-button-size-radius-s)}\n"] }]
|
|
98
|
+
}], ctorParameters: function () { return []; }, propDecorators: { size: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], selected: [{
|
|
101
|
+
type: HostBinding,
|
|
102
|
+
args: ['attr.aria-pressed']
|
|
103
|
+
}, {
|
|
104
|
+
type: Input
|
|
105
|
+
}], selectedChange: [{
|
|
106
|
+
type: Output
|
|
107
|
+
}], disabled: [{
|
|
108
|
+
type: Input
|
|
109
|
+
}], iconAlign: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], buttonIcon: [{
|
|
112
|
+
type: ContentChild,
|
|
113
|
+
args: [ButtonIconDirective]
|
|
114
|
+
}], icon: [{
|
|
115
|
+
type: ContentChild,
|
|
116
|
+
args: [IconComponent]
|
|
117
|
+
}], _onBlur: [{
|
|
118
|
+
type: HostListener,
|
|
119
|
+
args: ['blur']
|
|
120
|
+
}], handleClick: [{
|
|
121
|
+
type: HostListener,
|
|
122
|
+
args: ['click']
|
|
123
|
+
}] } });
|
|
124
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2J1dHRvbi9zcmMvdG9nZ2xlLWJ1dHRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2J1dHRvbi9zcmMvYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBRUwsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxZQUFZLEVBQ1osWUFBWSxFQUNaLFVBQVUsRUFDVixXQUFXLEVBQ1gsWUFBWSxFQUNaLEtBQUssRUFDTCxTQUFTLEVBRVQsTUFBTSxHQUVQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBd0IsaUJBQWlCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUd6RSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGFBQW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NvbnRlbnRcIj48L25nLWNvbnRhaW5lcj5cbjwvc3Bhbj5cblxuPG5nLXRlbXBsYXRlICNjb250ZW50PlxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L25nLXRlbXBsYXRlPlxuPG5nLXRlbXBsYXRlICNpY29uQ29udGVudD5cbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW3NwQnV0dG9uSWNvbl1cIj48L25nLWNvbnRlbnQ+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// We have separate public_api.ts file for each angular module, to have them
|
|
2
|
+
// exposed as separate entry points. The build is still not emitting separate
|
|
3
|
+
// entry points, which will be addressed in this task:
|
|
4
|
+
// WCCJ-838
|
|
5
|
+
export * from './src/checkbox.component';
|
|
6
|
+
export * from './src/checkbox.module';
|
|
7
|
+
export * from './src/checkbox-required-validator';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvY2hlY2tib3gvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw0RUFBNEU7QUFDNUUsNkVBQTZFO0FBQzdFLHNEQUFzRDtBQUN0RCxXQUFXO0FBQ1gsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsbUNBQW1DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBXZSBoYXZlIHNlcGFyYXRlIHB1YmxpY19hcGkudHMgZmlsZSBmb3IgZWFjaCBhbmd1bGFyIG1vZHVsZSwgdG8gaGF2ZSB0aGVtXG4vLyBleHBvc2VkIGFzIHNlcGFyYXRlIGVudHJ5IHBvaW50cy4gVGhlIGJ1aWxkIGlzIHN0aWxsIG5vdCBlbWl0dGluZyBzZXBhcmF0ZVxuLy8gZW50cnkgcG9pbnRzLCB3aGljaCB3aWxsIGJlIGFkZHJlc3NlZCBpbiB0aGlzIHRhc2s6XG4vLyBXQ0NKLTgzOFxuZXhwb3J0ICogZnJvbSAnLi9zcmMvY2hlY2tib3guY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NoZWNrYm94Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jaGVja2JveC1yZXF1aXJlZC12YWxpZGF0b3InO1xuIl19
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Directive, forwardRef, Input } from '@angular/core';
|
|
2
|
+
import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const CHECKBOX_REQUIRED_VALIDATOR = {
|
|
5
|
+
provide: NG_VALIDATORS,
|
|
6
|
+
useExisting: forwardRef(() => SapphireCheckboxRequiredValidator),
|
|
7
|
+
multi: true,
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Validator for Sapphire checkbox's "required" attribute in template-driven checkbox.
|
|
11
|
+
*/
|
|
12
|
+
export class SapphireCheckboxRequiredValidator extends CheckboxRequiredValidator {
|
|
13
|
+
}
|
|
14
|
+
SapphireCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: SapphireCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
SapphireCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: SapphireCheckboxRequiredValidator, selector: "sp-checkbox[required][formControlName],\n sp-checkbox[required][formControl], sp-checkbox[required][ngModel]", inputs: { required: "required" }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: SapphireCheckboxRequiredValidator, decorators: [{
|
|
17
|
+
type: Directive,
|
|
18
|
+
args: [{
|
|
19
|
+
selector: `sp-checkbox[required][formControlName],
|
|
20
|
+
sp-checkbox[required][formControl], sp-checkbox[required][ngModel]`,
|
|
21
|
+
providers: [CHECKBOX_REQUIRED_VALIDATOR],
|
|
22
|
+
}]
|
|
23
|
+
}], propDecorators: { required: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}] } });
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3gtcmVxdWlyZWQtdmFsaWRhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jaGVja2JveC9zcmMvY2hlY2tib3gtcmVxdWlyZWQtdmFsaWRhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBWSxNQUFNLGVBQWUsQ0FBQztBQUN2RSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsYUFBYSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBRTFFLE1BQU0sMkJBQTJCLEdBQWE7SUFDNUMsT0FBTyxFQUFFLGFBQWE7SUFDdEIsV0FBVyxFQUFFLFVBQVUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxpQ0FBaUMsQ0FBQztJQUNoRSxLQUFLLEVBQUUsSUFBSTtDQUNaLENBQUM7QUFFRjs7R0FFRztBQU1ILE1BQU0sT0FBTyxpQ0FBa0MsU0FBUSx5QkFBeUI7OzhIQUFuRSxpQ0FBaUM7a0hBQWpDLGlDQUFpQyxxTEFGakMsQ0FBQywyQkFBMkIsQ0FBQzsyRkFFN0IsaUNBQWlDO2tCQUw3QyxTQUFTO21CQUFDO29CQUNULFF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