@skyux/forms 11.11.2 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +966 -966
- package/esm2022/lib/modules/character-counter/character-counter-indicator.component.mjs +2 -2
- package/esm2022/lib/modules/checkbox/checkbox-label-text-label.component.mjs +2 -2
- package/esm2022/lib/modules/checkbox/checkbox.component.mjs +2 -2
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment-label.component.mjs +3 -3
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment.component.mjs +3 -3
- package/esm2022/lib/modules/file-attachment/file-drop/file-drop.component.mjs +3 -3
- package/esm2022/lib/modules/file-attachment/file-drop/file-item.component.mjs +3 -3
- package/esm2022/lib/modules/form-error/form-error.component.mjs +7 -5
- package/esm2022/lib/modules/input-box/input-box.component.mjs +3 -3
- package/esm2022/lib/modules/radio/radio.component.mjs +2 -2
- package/esm2022/lib/modules/selection-box/selection-box.component.mjs +2 -2
- package/esm2022/lib/modules/toggle-switch/toggle-switch.component.mjs +2 -2
- package/fesm2022/skyux-forms.mjs +47 -47
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/lib/modules/form-error/form-error.component.d.ts +2 -1
- package/package.json +9 -9
|
@@ -170,14 +170,14 @@ export class SkyToggleSwitchComponent {
|
|
|
170
170
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: SkyToggleSwitchComponent, selector: "sky-toggle-switch", inputs: { ariaLabel: "ariaLabel", checked: "checked", disabled: "disabled", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", tabIndex: "tabIndex", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], helpKey: "helpKey" }, outputs: { toggleChange: "toggleChange" }, providers: [
|
|
171
171
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
172
172
|
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
173
|
-
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], ngImport: i0, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n #toggle=\"skyId\"\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n @if (hasLabelComponent || labelText) {\n <label\n class=\"sky-toggle-switch-label\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n >\n @if (labelText) {\n @if (!labelHidden) {\n <ng-container>{{ labelText }}</ng-container>\n }\n } @else {\n <ng-content select=\"sky-toggle-switch-label\" />\n }\n </label>\n }\n <span class=\"sky-control-help-container\">\n @if (labelText && (helpPopoverContent || helpKey)) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.sky-toggle-switch-indicator{height:22px;width:22px;display:block;position:relative;top:0;left:22px;margin-left:-22px;border-radius:100%;box-shadow:0 1px 2px #000000bf;background-color:#fff}.sky-toggle-switch-indicator.sky-toggle-switch-transition{transition:left .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}.sky-theme-modern .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}.sky-theme-modern .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toggle-switch-button{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toggle-switch-button{background-color:#121212}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
173
|
+
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], ngImport: i0, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n #toggle=\"skyId\"\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n @if (hasLabelComponent || labelText) {\n <label\n class=\"sky-toggle-switch-label\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n >\n @if (labelText) {\n @if (!labelHidden) {\n <ng-container>{{ labelText }}</ng-container>\n }\n } @else {\n <ng-content select=\"sky-toggle-switch-label\" />\n }\n </label>\n }\n <span class=\"sky-control-help-container\">\n @if (labelText && (helpPopoverContent || helpKey)) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n", styles: ["body:not(.sky-theme-modern){--sky-override-required-color: var(--sky-highlight-color-danger);--sky-override-required-space: 5px}.sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.sky-toggle-switch-indicator{height:22px;width:22px;display:block;position:relative;top:0;left:22px;margin-left:-22px;border-radius:100%;box-shadow:0 1px 2px #000000bf;background-color:#fff}.sky-toggle-switch-indicator.sky-toggle-switch-transition{transition:left .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}.sky-theme-modern .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}.sky-theme-modern .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toggle-switch-button{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toggle-switch-button{background-color:#121212}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
174
174
|
}
|
|
175
175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: SkyToggleSwitchComponent, decorators: [{
|
|
176
176
|
type: Component,
|
|
177
177
|
args: [{ selector: 'sky-toggle-switch', providers: [
|
|
178
178
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
179
179
|
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
180
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n #toggle=\"skyId\"\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n @if (hasLabelComponent || labelText) {\n <label\n class=\"sky-toggle-switch-label\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n >\n @if (labelText) {\n @if (!labelHidden) {\n <ng-container>{{ labelText }}</ng-container>\n }\n } @else {\n <ng-content select=\"sky-toggle-switch-label\" />\n }\n </label>\n }\n <span class=\"sky-control-help-container\">\n @if (labelText && (helpPopoverContent || helpKey)) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.sky-toggle-switch-indicator{height:22px;width:22px;display:block;position:relative;top:0;left:22px;margin-left:-22px;border-radius:100%;box-shadow:0 1px 2px #000000bf;background-color:#fff}.sky-toggle-switch-indicator.sky-toggle-switch-transition{transition:left .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}.sky-theme-modern .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}.sky-theme-modern .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toggle-switch-button{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toggle-switch-button{background-color:#121212}\n"] }]
|
|
180
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n #toggle=\"skyId\"\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n @if (hasLabelComponent || labelText) {\n <label\n class=\"sky-toggle-switch-label\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n >\n @if (labelText) {\n @if (!labelHidden) {\n <ng-container>{{ labelText }}</ng-container>\n }\n } @else {\n <ng-content select=\"sky-toggle-switch-label\" />\n }\n </label>\n }\n <span class=\"sky-control-help-container\">\n @if (labelText && (helpPopoverContent || helpKey)) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n", styles: ["body:not(.sky-theme-modern){--sky-override-required-color: var(--sky-highlight-color-danger);--sky-override-required-space: 5px}.sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.sky-toggle-switch-indicator{height:22px;width:22px;display:block;position:relative;top:0;left:22px;margin-left:-22px;border-radius:100%;box-shadow:0 1px 2px #000000bf;background-color:#fff}.sky-toggle-switch-indicator.sky-toggle-switch-transition{transition:left .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}.sky-theme-modern .sky-toggle-switch-button .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{padding:1px;border:solid 1px #1870B8}.sky-theme-modern .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toggle-switch-button{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toggle-switch-button{background-color:#121212}\n"] }]
|
|
181
181
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.SkyIdService }], propDecorators: { ariaLabel: [{
|
|
182
182
|
type: Input
|
|
183
183
|
}], checked: [{
|