@skyux/forms 11.6.0 → 11.8.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.
@@ -108,9 +108,6 @@ const RESOURCES = {
108
108
  message: 'This file type is invalid',
109
109
  },
110
110
  skyux_file_attachment_file_upload_link_label: { message: 'Link to a file' },
111
- skyux_file_attachment_file_upload_link_placeholder: {
112
- message: 'Start with http:// or https://',
113
- },
114
111
  skyux_file_attachment_file_upload_or_click_to_browse: {
115
112
  message: 'or click to browse',
116
113
  },
@@ -416,7 +413,7 @@ class SkyFormErrorComponent {
416
413
  {{ errorText }}
417
414
  </sky-status-indicator>
418
415
  }
419
- `, isInline: true, styles: [":host{display:block;margin-top:var(--sky-margin-stacked-xs)}\n"], dependencies: [{ kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1$2.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
416
+ `, isInline: true, styles: ["@keyframes sky-modal-error{0%,50%{max-height:0;margin-top:0;opacity:0}to{max-height:500px;opacity:1}}:host{animation:sky-modal-error .3s ease-out 1;display:block;margin-top:var(--sky-margin-stacked-xs)}\n"], dependencies: [{ kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1$2.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
420
417
  }
421
418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFormErrorComponent, decorators: [{
422
419
  type: Component,
@@ -430,7 +427,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImpor
430
427
  {{ errorText }}
431
428
  </sky-status-indicator>
432
429
  }
433
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;margin-top:var(--sky-margin-stacked-xs)}\n"] }]
430
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@keyframes sky-modal-error{0%,50%{max-height:0;margin-top:0;opacity:0}to{max-height:500px;opacity:1}}:host{animation:sky-modal-error .3s ease-out 1;display:block;margin-top:var(--sky-margin-stacked-xs)}\n"] }]
434
431
  }], ctorParameters: () => [], propDecorators: { errorName: [{
435
432
  type: Input,
436
433
  args: [{ required: true }]
@@ -1166,11 +1163,11 @@ class SkyFieldGroupComponent {
1166
1163
  this.headingClass = `sky-font-heading-${value}`;
1167
1164
  }
1168
1165
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFieldGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1169
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFieldGroupComponent, isStandalone: true, selector: "sky-field-group", inputs: { headingText: "headingText", hintText: "hintText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute3], headingStyle: ["headingStyle", "headingStyle", numberAttribute3], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-xl": "this.stacked" } }, ngImport: i0, template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <span class=\"sky-field-group-legend-wrapper\">\n <legend\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n @if (headingLevel === 3) {\n <h3 [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n } @else if (headingLevel === 4) {\n <h4 [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n }\n </legend>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </span>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-field-group-hint-text sky-font-deemphasized\">\n {{ hintText }}\n </div>\n }\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}.sky-field-group-hint-text{margin-top:var(--sky-margin-stacked-xs)}.sky-field-group-content{margin-top:var(--sky-margin-stacked-sm)}h3,h4{margin:0}.sky-field-group-legend-wrapper{display:inline-flex}sky-help-inline{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
1166
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFieldGroupComponent, isStandalone: true, selector: "sky-field-group", inputs: { headingText: "headingText", hintText: "hintText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute3], headingStyle: ["headingStyle", "headingStyle", numberAttribute3], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-xl": "this.stacked" } }, ngImport: i0, template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span class=\"sky-margin-inline-xs\">\n @switch (headingLevel) {\n @case (4) {\n <h4 [class]=\"headingClass\">{{ headingText }}</h4>\n }\n @default {\n <h3 [class]=\"headingClass\">{{ headingText }}</h3>\n }\n }\n </span>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div\n class=\"sky-field-group-hint-text sky-margin-stacked-lg sky-font-deemphasized\"\n >\n {{ hintText }}\n </div>\n }\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}legend{display:flex}legend h3,legend h4{margin:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
1170
1167
  }
1171
1168
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFieldGroupComponent, decorators: [{
1172
1169
  type: Component,
1173
- args: [{ selector: 'sky-field-group', standalone: true, imports: [CommonModule, SkyHelpInlineModule, SkyIdModule], template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <span class=\"sky-field-group-legend-wrapper\">\n <legend\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n @if (headingLevel === 3) {\n <h3 [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n } @else if (headingLevel === 4) {\n <h4 [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n }\n </legend>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </span>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-field-group-hint-text sky-font-deemphasized\">\n {{ hintText }}\n </div>\n }\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}.sky-field-group-hint-text{margin-top:var(--sky-margin-stacked-xs)}.sky-field-group-content{margin-top:var(--sky-margin-stacked-sm)}h3,h4{margin:0}.sky-field-group-legend-wrapper{display:inline-flex}sky-help-inline{display:inline-flex}\n"] }]
1170
+ args: [{ selector: 'sky-field-group', standalone: true, imports: [CommonModule, SkyHelpInlineModule, SkyIdModule], template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span class=\"sky-margin-inline-xs\">\n @switch (headingLevel) {\n @case (4) {\n <h4 [class]=\"headingClass\">{{ headingText }}</h4>\n }\n @default {\n <h3 [class]=\"headingClass\">{{ headingText }}</h3>\n }\n }\n </span>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div\n class=\"sky-field-group-hint-text sky-margin-stacked-lg sky-font-deemphasized\"\n >\n {{ hintText }}\n </div>\n }\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}legend{display:flex}legend h3,legend h4{margin:0}\n"] }]
1174
1171
  }], propDecorators: { headingText: [{
1175
1172
  type: Input,
1176
1173
  args: [{ required: true }]
@@ -1956,970 +1953,973 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImpor
1956
1953
  }]
1957
1954
  }] });
1958
1955
 
1959
- const MAX_FILE_SIZE_DEFAULT = 500000;
1960
- const MIN_FILE_SIZE_DEFAULT = 0;
1961
1956
  /**
1962
- * Provides an element to attach multiple files where users can browse or drag and drop local files
1963
- * or provide hyperlinks to external files. You can leave the contents of the component
1964
- * blank to display the drop zone's default UI, or you can specify custom content to
1965
- * display instead. When the module initializes, it disables the ability to drag and
1966
- * drop files for the entire window to prevent the browser from opening files that are
1967
- * accidentally dropped outside the target zone. If you implement your own file drop functionality
1968
- * outside of the file drop component, you can place the `sky-file-drop-target` CSS class
1969
- * on the element that receives drop events to exempt it from the drop exclusion rule.
1957
+ * @internal
1970
1958
  */
1971
- class SkyFileDropComponent {
1959
+ class SkyInputBoxHostService {
1972
1960
  constructor() {
1973
- /**
1974
- * Fires when users add or remove files.
1975
- */
1976
- this.filesChanged = new EventEmitter();
1977
- /**
1978
- * Fires when the link input box triggers a blur event.
1979
- */
1980
- this.linkInputBlur = new EventEmitter();
1981
- /**
1982
- * Fires when users add or remove links.
1983
- */
1984
- this.linkChanged = new EventEmitter();
1985
- /**
1986
- * Whether users can drag and drop multiple files at the same time.
1987
- */
1988
- this.multiple = true;
1989
- /**
1990
- * Whether to disable the option to browse for files to attach.
1991
- */
1992
- this.noClick = false;
1993
- /**
1994
- * Whether to display the option to attach files from URLs rather than from local devices.
1995
- */
1996
- this.allowLinks = false;
1997
- /**
1998
- * Whether to hide `labelText` from view.
1999
- */
2000
- this.labelHidden = false;
2001
- /**
2002
- * Whether uploading a file or link is required.
2003
- * When you set this property to `true`, the component adds `aria-required` and `required`
2004
- * attributes to the input elements so that screen readers announce an invalid state until the input element
2005
- * is complete.
2006
- * For more information about the `aria-required` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-required).
2007
- */
2008
- this.required = false;
2009
- /**
2010
- * Whether the file attachment is stacked on another form component. When specified, the appropriate
2011
- * vertical spacing is automatically added to the file attachment.
2012
- */
2013
- this.stacked = false;
2014
- this.rejectedOver = false;
2015
- this.acceptedOver = false;
2016
- this.#_maxFileSize = MAX_FILE_SIZE_DEFAULT;
2017
- this.#_minFileSize = MIN_FILE_SIZE_DEFAULT;
2018
- this.#fileAttachmentService = inject(SkyFileAttachmentService);
2019
- this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
2020
- this.#resourcesSvc = inject(SkyLibResourcesService);
2021
- this.#idSvc = inject(SkyIdService);
2022
- this.errorId = this.#idSvc.generateId();
2023
- this.rejectedFiles = [];
1961
+ this.#requiredSubject = new BehaviorSubject(false);
1962
+ this.required = this.#requiredSubject.asObservable();
2024
1963
  }
2025
- /**
2026
- * The minimum size in bytes for valid files.
2027
- * @default 0
2028
- */
2029
- set minFileSize(value) {
2030
- this.#_minFileSize = value ?? MIN_FILE_SIZE_DEFAULT;
1964
+ #host;
1965
+ #requiredSubject;
1966
+ get controlId() {
1967
+ return this.#host?.controlId ?? '';
2031
1968
  }
2032
- get minFileSize() {
2033
- return this.#_minFileSize;
1969
+ get labelId() {
1970
+ return this.#host?.labelText ? this.#host.labelId : '';
2034
1971
  }
2035
- /**
2036
- * The maximum size in bytes for valid files.
2037
- * @default 500000
2038
- */
2039
- set maxFileSize(value) {
2040
- this.#_maxFileSize = value ?? MAX_FILE_SIZE_DEFAULT;
1972
+ get labelText() {
1973
+ return this.#host?.labelText ?? '';
2041
1974
  }
2042
- get maxFileSize() {
2043
- return this.#_maxFileSize;
1975
+ get ariaDescribedBy() {
1976
+ return this.#ariaDescribedBy;
1977
+ }
1978
+ #ariaDescribedBy;
1979
+ init(host) {
1980
+ this.#host = host;
1981
+ this.#ariaDescribedBy = host.ariaDescribedBy.asObservable();
2044
1982
  }
2045
- #enterEventTarget;
2046
- #_maxFileSize;
2047
- #_minFileSize;
2048
- #fileAttachmentService;
2049
- #liveAnnouncerSvc;
2050
- #resourcesSvc;
2051
- #idSvc;
2052
1983
  ngOnDestroy() {
2053
- this.filesChanged.complete();
2054
- this.linkChanged.complete();
2055
- this.linkInputBlur.complete();
1984
+ this.#requiredSubject.complete();
2056
1985
  }
2057
- dropClicked() {
2058
- if (!this.noClick && this.inputEl) {
2059
- this.inputEl.nativeElement.click();
1986
+ populate(args) {
1987
+ if (!this.#host) {
1988
+ throw new Error('Cannot populate the input box because `SkyInputBoxHostService` has not yet been initialized. Try running the `populate` method within an Angular lifecycle hook, such as `ngOnInit`.');
2060
1989
  }
1990
+ this.#host.populate(args);
2061
1991
  }
2062
- fileChangeEvent(fileChangeEvent) {
2063
- this.#handleFiles(fileChangeEvent.target?.files);
2064
- }
2065
- fileDragEnter(dragEnterEvent) {
2066
- // Save this target to know when the drag event leaves
2067
- this.#enterEventTarget = dragEnterEvent.target;
2068
- dragEnterEvent.stopPropagation();
2069
- dragEnterEvent.preventDefault();
2070
- }
2071
- fileDragOver(dragOverEvent) {
2072
- const transfer = dragOverEvent.dataTransfer;
2073
- dragOverEvent.stopPropagation();
2074
- dragOverEvent.preventDefault();
2075
- if (transfer) {
2076
- if (transfer.items) {
2077
- const files = Array.from(transfer.items);
2078
- for (const file of files) {
2079
- if (file.type &&
2080
- this.#fileAttachmentService.fileTypeRejected(file.type, this.acceptedTypes)) {
2081
- this.rejectedOver = true;
2082
- this.acceptedOver = false;
2083
- return;
2084
- }
2085
- }
2086
- if (files.length > 0 && !this.acceptedOver) {
2087
- this.rejectedOver = false;
2088
- this.acceptedOver = true;
2089
- }
2090
- } /* istanbul ignore next: untestable */
2091
- else if (transfer.files) {
2092
- // If the browser does not support DataTransfer.items,
2093
- // defer file-type checking to drop handler.
2094
- // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items#Browser_compatibility
2095
- this.rejectedOver = false;
2096
- this.acceptedOver = true;
2097
- }
1992
+ setHintText(hintText) {
1993
+ if (!this.#host) {
1994
+ throw new Error('Cannot set hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2098
1995
  }
1996
+ this.#host.setHostHintText(hintText);
2099
1997
  }
2100
- fileDrop(dropEvent) {
2101
- dropEvent.stopPropagation();
2102
- dropEvent.preventDefault();
2103
- this.#enterEventTarget = undefined;
2104
- this.rejectedOver = false;
2105
- this.acceptedOver = false;
2106
- if (dropEvent.dataTransfer && dropEvent.dataTransfer.files) {
2107
- const hasDirectory = this.#fileAttachmentService.hasDirectory(dropEvent.dataTransfer.files);
2108
- const invalidNumberOfFiles = !this.multiple && dropEvent.dataTransfer.files.length > 1;
2109
- if (hasDirectory || invalidNumberOfFiles) {
2110
- return;
2111
- }
2112
- this.#handleFiles(dropEvent.dataTransfer.files);
1998
+ setHintTextHidden(hide) {
1999
+ if (!this.#host) {
2000
+ throw new Error('Cannot hide hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2113
2001
  }
2002
+ this.#host.setHintTextHidden(hide);
2114
2003
  }
2115
- fileDragLeave(dragLeaveEvent) {
2116
- if (this.#enterEventTarget === dragLeaveEvent.target) {
2117
- this.rejectedOver = false;
2118
- this.acceptedOver = false;
2004
+ setHintTextScreenReaderOnly(hide) {
2005
+ if (!this.#host) {
2006
+ throw new Error('Cannot remove hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2119
2007
  }
2008
+ this.#host.setHintTextScreenReaderOnly(hide);
2120
2009
  }
2121
- addLinkEnter(event) {
2122
- if (event.which === 13) {
2123
- this.addLink(event);
2124
- }
2010
+ /**
2011
+ * Set required so that input box displays the label correctly. When the input is supplied by the consumer it is a content
2012
+ * child that input box can read required from and this is unnecessary. When the input is supplied internally by the
2013
+ * component the input box does not have a ref to it, so the component needs to inform the input box of its required state.
2014
+ */
2015
+ setRequired(required) {
2016
+ this.#requiredSubject.next(required);
2125
2017
  }
2126
- addLink(event) {
2127
- event.preventDefault();
2128
- this.linkChanged.emit({ url: this.linkUrl });
2129
- this.#announceState('skyux_file_attachment_file_upload_link_added', this.linkUrl);
2130
- this.linkUrl = undefined;
2018
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2019
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService }); }
2020
+ }
2021
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService, decorators: [{
2022
+ type: Injectable
2023
+ }] });
2024
+
2025
+ /**
2026
+ * @internal
2027
+ */
2028
+ class SkyInputBoxControlDirective {
2029
+ set autocomplete(value) {
2030
+ this.#_autocomplete = value;
2131
2031
  }
2132
- onLinkBlur() {
2133
- this.linkInputBlur.emit();
2032
+ get autocomplete() {
2033
+ return this.#_autocomplete || (this.#hostSvc ? 'off' : undefined);
2134
2034
  }
2135
- #announceState(resourceString, ...args) {
2136
- this.#resourcesSvc
2137
- .getString(resourceString, ...args)
2138
- .pipe(take(1))
2139
- .subscribe((internationalizedString) => {
2140
- this.#liveAnnouncerSvc.announce(internationalizedString);
2141
- });
2035
+ #_autocomplete;
2036
+ #hostSvc = inject(SkyInputBoxHostService, { optional: true });
2037
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2038
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: SkyInputBoxControlDirective, isStandalone: true, selector: "input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)", inputs: { autocomplete: "autocomplete" }, host: { properties: { "autocomplete": "this.autocomplete" } }, ngImport: i0 }); }
2039
+ }
2040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxControlDirective, decorators: [{
2041
+ type: Directive,
2042
+ args: [{
2043
+ selector:
2044
+ // eslint-disable-next-line @angular-eslint/directive-selector
2045
+ 'input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)',
2046
+ standalone: true,
2047
+ }]
2048
+ }], propDecorators: { autocomplete: [{
2049
+ type: HostBinding,
2050
+ args: ['autocomplete']
2051
+ }, {
2052
+ type: Input
2053
+ }] } });
2054
+
2055
+ /**
2056
+ * @internal
2057
+ */
2058
+ class SkyInputBoxHintTextPipe {
2059
+ transform(hintText, hostHintText) {
2060
+ if (hintText && hostHintText) {
2061
+ return `${hintText} ${hostHintText}`;
2062
+ }
2063
+ return hintText || hostHintText;
2142
2064
  }
2143
- #emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray) {
2144
- if (totalFiles === rejectedFileArray.length + validFileArray.length) {
2145
- this.filesChanged.emit({
2146
- files: validFileArray,
2147
- rejectedFiles: rejectedFileArray,
2148
- });
2149
- if (this.inputEl) {
2150
- this.inputEl.nativeElement.value = '';
2151
- }
2065
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2066
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, isStandalone: true, name: "skyInputBoxHintText" }); }
2067
+ }
2068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, decorators: [{
2069
+ type: Pipe,
2070
+ args: [{
2071
+ standalone: true,
2072
+ name: 'skyInputBoxHintText',
2073
+ }]
2074
+ }] });
2075
+
2076
+ const ARIA_DESCRIBEDBY_ATTR = 'aria-describedby';
2077
+ /**
2078
+ * @internal
2079
+ */
2080
+ class SkyInputBoxAdapterService {
2081
+ #renderer = inject(RendererFactory2).createRenderer(undefined, null);
2082
+ focusControl(elRef) {
2083
+ const control = elRef.nativeElement.querySelector('.sky-form-control');
2084
+ /* istanbul ignore else */
2085
+ if (control) {
2086
+ control.focus();
2152
2087
  }
2153
2088
  }
2154
- #filesRejected(file, validFileArray, rejectedFileArray, totalFiles) {
2155
- rejectedFileArray.push(file);
2156
- this.#emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray);
2157
- }
2158
- #loadFile(fileDrop, file, validFileArray, rejectedFileArray, totalFiles) {
2159
- const reader = new FileReader();
2160
- reader.addEventListener('load', (event) => {
2161
- file.url = event.target.result;
2162
- validFileArray.push(file);
2163
- fileDrop.#emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray);
2164
- this.#announceState('skyux_file_attachment_file_upload_file_added', file.file.name);
2165
- });
2166
- reader.addEventListener('error', () => {
2167
- fileDrop.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2168
- });
2169
- reader.addEventListener('abort', () => {
2170
- fileDrop.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2171
- });
2172
- reader.readAsDataURL(file.file);
2173
- }
2174
- #handleFiles(files) {
2175
- if (files) {
2176
- const validFileArray = [];
2177
- const rejectedFileArray = [];
2178
- const totalFiles = files.length;
2179
- const processedFiles = this.#fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
2180
- for (const file of processedFiles) {
2181
- if (file.errorType) {
2182
- this.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2183
- }
2184
- else {
2185
- this.#loadFile(this, file, validFileArray, rejectedFileArray, totalFiles);
2186
- }
2187
- }
2188
- this.rejectedFiles = rejectedFileArray;
2189
- }
2089
+ /**
2090
+ * Returns the inline help element.
2091
+ */
2092
+ getInlineHelpElement(elRef) {
2093
+ return elRef.nativeElement.querySelector('.sky-control-help');
2190
2094
  }
2191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2192
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFileDropComponent, isStandalone: true, selector: "sky-file-drop", inputs: { fileUploadAriaLabel: "fileUploadAriaLabel", linkUploadAriaLabel: "linkUploadAriaLabel", minFileSize: "minFileSize", maxFileSize: "maxFileSize", multiple: "multiple", validateFn: "validateFn", acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", noClick: "noClick", allowLinks: "allowLinks", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", required: ["required", "required", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { filesChanged: "filesChanged", linkInputBlur: "linkInputBlur", linkChanged: "linkChanged" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked" } }, providers: [
2193
- SkyFileAttachmentService,
2194
- { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
2195
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<fieldset>\n @if (labelText) {\n <legend\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n >\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div\n class=\"sky-file-drop-row\"\n [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\"\n >\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{\n 'sky-file-drop-accept': acceptedOver,\n 'sky-file-drop-reject': rejectedOver\n }\"\n >\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n [attr.aria-label]=\"\n fileUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\n \"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n ></button>\n\n <input\n #fileInput\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple : null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes : null\"\n (change)=\"fileChangeEvent($event)\"\n />\n\n @if (customEl.children.length === 0) {\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | skyLibResources\n }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{\n 'skyux_file_attachment_file_upload_or_click_to_browse'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drop_files_here'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n }\n\n <div #customEl class=\"sky-file-drop-contents-custom\">\n <ng-content />\n </div>\n </div>\n @if (allowLinks) {\n <div class=\"sky-file-drop-col\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label'\n | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n #uploadHintText=\"skyId\"\n skyId\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\n }}\n </div>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n</fieldset>\n<sky-form-errors\n [class.sky-file-drop-errors]=\"labelText && rejectedFiles.length\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [touched]=\"rejectedFiles.length > 0\"\n>\n @for (rejectedFile of rejectedFiles; track rejectedFile) {\n <div>\n @if (rejectedFile.errorType === 'fileType') {\n <sky-form-error\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : rejectedFile.errorParam\n \"\n />\n } @else if (rejectedFile.errorType === 'maxFileSize') {\n <sky-form-error\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (rejectedFile.errorType === 'minFileSize') {\n <sky-form-error\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (\n rejectedFile.errorType === 'validate' && rejectedFile.errorParam\n ) {\n <sky-form-error\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n }\n </div>\n }\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;inset:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
2196
- }
2197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropComponent, decorators: [{
2198
- type: Component,
2199
- args: [{ selector: 'sky-file-drop', providers: [
2200
- SkyFileAttachmentService,
2201
- { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
2202
- ], standalone: true, imports: [
2203
- CommonModule,
2204
- FormsModule,
2205
- SkyFileSizePipe,
2206
- SkyFormErrorComponent,
2207
- SkyFormErrorsComponent,
2208
- SkyFormsResourcesModule,
2209
- SkyHelpInlineModule,
2210
- SkyIconModule,
2211
- SkyIdModule,
2212
- ], template: "<fieldset>\n @if (labelText) {\n <legend\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n >\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div\n class=\"sky-file-drop-row\"\n [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\"\n >\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{\n 'sky-file-drop-accept': acceptedOver,\n 'sky-file-drop-reject': rejectedOver\n }\"\n >\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n [attr.aria-label]=\"\n fileUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\n \"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n ></button>\n\n <input\n #fileInput\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple : null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes : null\"\n (change)=\"fileChangeEvent($event)\"\n />\n\n @if (customEl.children.length === 0) {\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | skyLibResources\n }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{\n 'skyux_file_attachment_file_upload_or_click_to_browse'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drop_files_here'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n }\n\n <div #customEl class=\"sky-file-drop-contents-custom\">\n <ng-content />\n </div>\n </div>\n @if (allowLinks) {\n <div class=\"sky-file-drop-col\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label'\n | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n #uploadHintText=\"skyId\"\n skyId\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\n }}\n </div>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n</fieldset>\n<sky-form-errors\n [class.sky-file-drop-errors]=\"labelText && rejectedFiles.length\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [touched]=\"rejectedFiles.length > 0\"\n>\n @for (rejectedFile of rejectedFiles; track rejectedFile) {\n <div>\n @if (rejectedFile.errorType === 'fileType') {\n <sky-form-error\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : rejectedFile.errorParam\n \"\n />\n } @else if (rejectedFile.errorType === 'maxFileSize') {\n <sky-form-error\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (rejectedFile.errorType === 'minFileSize') {\n <sky-form-error\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (\n rejectedFile.errorType === 'validate' && rejectedFile.errorParam\n ) {\n <sky-form-error\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n }\n </div>\n }\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;inset:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"] }]
2213
- }], propDecorators: { filesChanged: [{
2214
- type: Output
2215
- }], linkInputBlur: [{
2216
- type: Output
2217
- }], linkChanged: [{
2218
- type: Output
2219
- }], fileUploadAriaLabel: [{
2220
- type: Input
2221
- }], linkUploadAriaLabel: [{
2222
- type: Input
2223
- }], minFileSize: [{
2224
- type: Input
2225
- }], maxFileSize: [{
2226
- type: Input
2227
- }], multiple: [{
2228
- type: Input
2229
- }], validateFn: [{
2230
- type: Input
2231
- }], acceptedTypes: [{
2232
- type: Input
2233
- }], acceptedTypesErrorMessage: [{
2234
- type: Input
2235
- }], noClick: [{
2236
- type: Input
2237
- }], allowLinks: [{
2238
- type: Input
2239
- }], labelText: [{
2240
- type: Input
2241
- }], labelHidden: [{
2242
- type: Input,
2243
- args: [{ transform: booleanAttribute }]
2244
- }], hintText: [{
2245
- type: Input
2246
- }], required: [{
2247
- type: Input,
2248
- args: [{ transform: booleanAttribute }]
2249
- }], helpPopoverContent: [{
2250
- type: Input
2251
- }], helpPopoverTitle: [{
2252
- type: Input
2253
- }], stacked: [{
2254
- type: Input,
2255
- args: [{ transform: booleanAttribute }]
2256
- }, {
2257
- type: HostBinding,
2258
- args: ['class.sky-margin-stacked-lg']
2259
- }], helpKey: [{
2260
- type: Input
2261
- }], inputEl: [{
2262
- type: ViewChild,
2263
- args: ['fileInput']
2264
- }] } });
2265
-
2266
- class SkyFileItemComponent {
2267
2095
  /**
2268
- * The summary information to display about file attachments. For local files,
2269
- * the default summary includes the file name, file size, file preview, and a delete button.
2270
- * For external files, the default summary includes the URL and a delete button.
2271
- * You can include additional inputs to display user-entered metadata.
2272
- * @required
2096
+ * Returns true if the provided element contains the focused element.
2273
2097
  */
2274
- set fileItem(value) {
2275
- this.#_fileItem = value;
2276
- if (value && 'file' in value) {
2277
- this.isFile = this.#fileItemService.isFile(value);
2278
- this.isImage = this.#fileItemService.isImage(value);
2279
- this.fileName = value.file.name;
2280
- this.fileSize = value.file.size;
2281
- }
2282
- else {
2283
- this.isFile = this.isImage = false;
2284
- this.fileName = '';
2285
- this.fileSize = undefined;
2098
+ isFocusInElement(el) {
2099
+ if (el) {
2100
+ return (el === document.activeElement || el.contains(document.activeElement));
2286
2101
  }
2287
- this.url = value?.url ?? '';
2288
- }
2289
- get fileItem() {
2290
- return this.#_fileItem;
2291
- }
2292
- #_fileItem;
2293
- #differ;
2294
- #fileItemService;
2295
- #liveAnnouncerSvc;
2296
- #resourcesSvc;
2297
- constructor(differs, fileItemService) {
2298
- /**
2299
- * Fires when users select the delete button for an item. The deleted item is passed to the
2300
- * function.
2301
- */
2302
- this.deleteFile = new EventEmitter();
2303
- this.fileName = '';
2304
- this.url = '';
2305
- this.isFile = false;
2306
- this.isImage = false;
2307
- this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
2308
- this.#resourcesSvc = inject(SkyLibResourcesService);
2309
- this.#differ = differs.find({}).create();
2310
- this.#fileItemService = fileItemService;
2102
+ return false;
2311
2103
  }
2312
- ngDoCheck() {
2313
- if (this.fileItem) {
2314
- const changes = this.#differ.diff(this.fileItem);
2315
- if (changes) {
2316
- let cls;
2317
- const extensionUpper = this.#fileItemService.getFileExtensionUpper(this.fileItem);
2318
- let fileTypeUpper;
2319
- switch (extensionUpper) {
2320
- case '.PDF':
2321
- cls = 'pdf';
2322
- break;
2323
- case '.GZ':
2324
- case '.RAR':
2325
- case '.TGZ':
2326
- case '.ZIP':
2327
- cls = 'archive';
2328
- break;
2329
- case '.PPT':
2330
- case '.PPTX':
2331
- cls = 'powerpoint';
2332
- break;
2333
- case '.DOC':
2334
- case '.DOCX':
2335
- cls = 'word';
2336
- break;
2337
- case '.XLS':
2338
- case '.XLSX':
2339
- cls = 'excel';
2340
- break;
2341
- case '.TXT':
2342
- cls = 'text';
2343
- break;
2344
- case '.HTM':
2345
- case '.HTML':
2346
- cls = 'code';
2347
- break;
2348
- default:
2349
- break;
2350
- }
2351
- if (!cls) {
2352
- fileTypeUpper = this.#fileItemService.getFileTypeUpper(this.fileItem);
2353
- switch (fileTypeUpper.substr(0, fileTypeUpper.indexOf('/'))) {
2354
- case 'AUDIO':
2355
- cls = 'audio';
2356
- break;
2357
- case 'IMAGE':
2358
- // Normally images are displayed as thumbnails, but if an image type is not recognized
2359
- // as being widely supported by modern browsers (e.g. TIFF files) then an icon should
2360
- // be displayed instead.
2361
- cls = 'image';
2362
- break;
2363
- case 'TEXT':
2364
- cls = 'text';
2365
- break;
2366
- case 'VIDEO':
2367
- cls = 'video';
2368
- break;
2369
- default:
2370
- break;
2371
- }
2372
- }
2373
- this.icon = 'file-' + (cls ? cls + '-' : '') + 'o';
2374
- }
2104
+ updateDescribedBy(inputRef, hintTextId, hintText) {
2105
+ const inputEl = inputRef.nativeElement;
2106
+ const describedByIds = inputEl
2107
+ .getAttribute(ARIA_DESCRIBEDBY_ATTR)
2108
+ ?.split(' ')
2109
+ .map((id) => id.trim()) ?? [];
2110
+ const hintTextIdIndex = describedByIds.indexOf(hintTextId);
2111
+ const previousCount = describedByIds.length;
2112
+ if (hintText && hintTextIdIndex < 0) {
2113
+ describedByIds.push(hintTextId);
2375
2114
  }
2376
- else {
2377
- this.icon = undefined;
2115
+ else if (!hintText && hintTextIdIndex >= 0) {
2116
+ describedByIds.splice(hintTextIdIndex, 1);
2117
+ }
2118
+ if (describedByIds.length !== previousCount) {
2119
+ this.#setDescribedByIds(inputEl, describedByIds);
2378
2120
  }
2379
2121
  }
2380
- itemDelete() {
2381
- this.deleteFile.emit(this.fileItem);
2382
- if (!this.isFile) {
2383
- this.#resourcesSvc
2384
- .getString('skyux_file_attachment_file_upload_link_removed', this.url)
2385
- .pipe(take(1))
2386
- .subscribe((resourceString) => {
2387
- this.#liveAnnouncerSvc.announce(resourceString);
2388
- });
2122
+ #setDescribedByIds(inputEl, describedByIds) {
2123
+ if (describedByIds.length === 0) {
2124
+ this.#renderer.removeAttribute(inputEl, ARIA_DESCRIBEDBY_ATTR);
2389
2125
  }
2390
2126
  else {
2391
- this.#resourcesSvc
2392
- .getString('skyux_file_attachment_file_upload_file_removed', this.fileName)
2393
- .pipe(take(1))
2394
- .subscribe((resourceString) => {
2395
- this.#liveAnnouncerSvc.announce(resourceString);
2396
- });
2127
+ this.#renderer.setAttribute(inputEl, ARIA_DESCRIBEDBY_ATTR, describedByIds.join(' '));
2397
2128
  }
2398
2129
  }
2399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileItemComponent, deps: [{ token: i0.KeyValueDiffers }, { token: SkyFileItemService }], target: i0.ɵɵFactoryTarget.Component }); }
2400
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFileItemComponent, isStandalone: true, selector: "sky-file-item", inputs: { fileItem: "fileItem" }, outputs: { deleteFile: "deleteFile" }, ngImport: i0, template: "@if (fileItem) {\n <div class=\"sky-file-item sky-padding-even-default\">\n <div class=\"sky-file-item-title\">\n <div class=\"sky-file-item-name-container\">\n <div class=\"sky-file-item-name\">\n @if (isFile) {\n <strong>{{ fileName }}</strong>\n } @else {\n <strong>{{ url }}</strong>\n }\n </div>\n @if (isFile) {\n <div class=\"sky-file-item-size\">({{ fileSize | skyFileSize }})</div>\n }\n </div>\n <div class=\"sky-file-item-controls\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-default sky-file-item-btn-delete\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete'\n | skyLibResources: (isFile ? fileName : url)\n \"\n (click)=\"itemDelete()\"\n >\n <sky-icon icon=\"trash-o\" size=\"lg\" />\n </button>\n </div>\n </div>\n <div class=\"sky-file-item-content\">\n <div class=\"sky-file-item-preview\">\n @if (isImage) {\n <div class=\"sky-file-item-preview-img-container\">\n <img\n class=\"sky-file-item-preview-img\"\n [src]=\"url\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n />\n </div>\n } @else {\n <div class=\"sky-file-item-preview-other\">\n <sky-icon [icon]=\"icon\" />\n </div>\n }\n </div>\n <div class=\"sky-file-item-content-custom\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".sky-file-item{border-top:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;border-right:1px solid #e2e3e4;background-color:#eeeeef;margin-bottom:10px}.sky-file-item-name-container{flex:1 1 auto;overflow:hidden}.sky-file-item-controls{flex:0 1 auto;padding-left:15px}.sky-file-item-name{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis}.sky-file-item-title{margin-bottom:10px;display:flex}.sky-file-item-content{display:flex}.sky-file-item-preview{flex-basis:25%}.sky-file-item-content-custom{flex-basis:75%}.sky-file-item-preview-img-container{text-align:center}.sky-file-item-preview-img{max-width:100%;height:auto;box-shadow:0 0 5px #666}.sky-file-item-preview-other{color:#686c73;font-size:100px;line-height:1;text-align:center;width:100%}\n"], dependencies: [{ kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }] }); }
2401
- }
2402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileItemComponent, decorators: [{
2403
- type: Component,
2404
- args: [{ imports: [SkyFileSizePipe, SkyFormsResourcesModule, SkyIconModule], selector: 'sky-file-item', standalone: true, template: "@if (fileItem) {\n <div class=\"sky-file-item sky-padding-even-default\">\n <div class=\"sky-file-item-title\">\n <div class=\"sky-file-item-name-container\">\n <div class=\"sky-file-item-name\">\n @if (isFile) {\n <strong>{{ fileName }}</strong>\n } @else {\n <strong>{{ url }}</strong>\n }\n </div>\n @if (isFile) {\n <div class=\"sky-file-item-size\">({{ fileSize | skyFileSize }})</div>\n }\n </div>\n <div class=\"sky-file-item-controls\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-default sky-file-item-btn-delete\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete'\n | skyLibResources: (isFile ? fileName : url)\n \"\n (click)=\"itemDelete()\"\n >\n <sky-icon icon=\"trash-o\" size=\"lg\" />\n </button>\n </div>\n </div>\n <div class=\"sky-file-item-content\">\n <div class=\"sky-file-item-preview\">\n @if (isImage) {\n <div class=\"sky-file-item-preview-img-container\">\n <img\n class=\"sky-file-item-preview-img\"\n [src]=\"url\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n />\n </div>\n } @else {\n <div class=\"sky-file-item-preview-other\">\n <sky-icon [icon]=\"icon\" />\n </div>\n }\n </div>\n <div class=\"sky-file-item-content-custom\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".sky-file-item{border-top:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;border-right:1px solid #e2e3e4;background-color:#eeeeef;margin-bottom:10px}.sky-file-item-name-container{flex:1 1 auto;overflow:hidden}.sky-file-item-controls{flex:0 1 auto;padding-left:15px}.sky-file-item-name{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis}.sky-file-item-title{margin-bottom:10px;display:flex}.sky-file-item-content{display:flex}.sky-file-item-preview{flex-basis:25%}.sky-file-item-content-custom{flex-basis:75%}.sky-file-item-preview-img-container{text-align:center}.sky-file-item-preview-img{max-width:100%;height:auto;box-shadow:0 0 5px #666}.sky-file-item-preview-other{color:#686c73;font-size:100px;line-height:1;text-align:center;width:100%}\n"] }]
2405
- }], ctorParameters: () => [{ type: i0.KeyValueDiffers }, { type: SkyFileItemService }], propDecorators: { fileItem: [{
2406
- type: Input
2407
- }], deleteFile: [{
2408
- type: Output
2409
- }] } });
2410
-
2411
- class SkyFileDropModule {
2412
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2413
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent], exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
2414
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
2415
- }
2416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, decorators: [{
2417
- type: NgModule,
2418
- args: [{
2419
- exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule],
2420
- imports: [SkyFileDropComponent, SkyFileItemComponent],
2421
- }]
2422
- }] });
2423
-
2424
- /**
2425
- * @deprecated Import either `SkyFileAttachmentModule` or `SkyFileDropModule`.
2426
- */
2427
- class SkyFileAttachmentsModule {
2428
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2429
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule], exports: [SkyFileAttachmentModule, SkyFileDropModule] }); }
2430
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule, SkyFileAttachmentModule, SkyFileDropModule] }); }
2130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2131
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService }); }
2431
2132
  }
2432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, decorators: [{
2433
- type: NgModule,
2434
- args: [{
2435
- exports: [SkyFileAttachmentModule, SkyFileDropModule],
2436
- imports: [SkyFileAttachmentModule, SkyFileDropModule],
2437
- }]
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService, decorators: [{
2134
+ type: Injectable
2438
2135
  }] });
2439
2136
 
2440
2137
  /**
2441
- * @internal
2138
+ * A wrapper component that provides styling and accessibility to form elements.
2442
2139
  */
2443
- class SkyInputBoxHostService {
2140
+ class SkyInputBoxComponent {
2444
2141
  constructor() {
2445
- this.#requiredSubject = new BehaviorSubject(false);
2446
- this.required = this.#requiredSubject.asObservable();
2142
+ this.#changeRef = inject(ChangeDetectorRef);
2143
+ this.#inputBoxHostSvc = inject(SkyInputBoxHostService);
2144
+ this.#adapterService = inject(SkyInputBoxAdapterService);
2145
+ this.#idSvc = inject(SkyIdService);
2146
+ this.#elementRef = inject(ElementRef);
2147
+ this.#renderer = inject(Renderer2);
2148
+ this.formControlHasFocus = false;
2149
+ this.hintTextHidden = false;
2150
+ this.hintTextScreenReaderOnly = false;
2151
+ this.controlId = this.#idSvc.generateId();
2152
+ this.labelId = this.#idSvc.generateId();
2153
+ this.errorId = this.#idSvc.generateId();
2154
+ this.hintTextId = this.#idSvc.generateId();
2155
+ this.ariaDescribedBy = new ReplaySubject(1);
2156
+ this.cssClass = '';
2157
+ this.characterCountScreenReader = 0;
2158
+ this.#_stacked = false;
2159
+ this.#ngUnsubscribe = new Subject();
2447
2160
  }
2448
- #host;
2449
- #requiredSubject;
2450
- get controlId() {
2451
- return this.#host?.controlId ?? '';
2161
+ #changeRef;
2162
+ #inputBoxHostSvc;
2163
+ #adapterService;
2164
+ #idSvc;
2165
+ #elementRef;
2166
+ #renderer;
2167
+ /**
2168
+ * The maximum number of characters allowed in the input. A [SKY UX character count](https://developer.blackbaud.com/skyux/components/character-count)
2169
+ * will be placed on the input element with the appropriate validator.
2170
+ */
2171
+ set characterLimit(value) {
2172
+ this.#_characterLimit =
2173
+ value === undefined ? undefined : coerceNumberProperty(value, undefined);
2174
+ this.#updateMaxLengthValidator();
2452
2175
  }
2453
- get labelId() {
2454
- return this.#host?.labelText ? this.#host.labelId : '';
2176
+ get characterLimit() {
2177
+ return this.#_characterLimit;
2455
2178
  }
2456
- get labelText() {
2457
- return this.#host?.labelText ?? '';
2179
+ /**
2180
+ * Whether the input box is stacked on another input box. When specified, the appropriate
2181
+ * vertical spacing is automatically added to the input box.
2182
+ */
2183
+ set stacked(value) {
2184
+ this.#_stacked = coerceBooleanProperty(value);
2185
+ this.cssClass = this.#_stacked ? 'sky-margin-stacked-lg' : '';
2186
+ }
2187
+ /**
2188
+ * [Persistent inline help text](https://developer.blackbaud.com/skyux/design/guidelines/user-assistance#inline-help) that provides
2189
+ * additional context to the user.
2190
+ */
2191
+ set hintText(value) {
2192
+ this.#_hintText = value;
2193
+ this.ariaDescribedBy.next(value ? this.hintTextId : undefined);
2194
+ }
2195
+ get hintText() {
2196
+ return this.#_hintText;
2197
+ }
2198
+ #requiredByFormField;
2199
+ get isDisabled() {
2200
+ return !!(this.disabled ||
2201
+ this.controlDir?.control?.disabled ||
2202
+ this.inputRef?.nativeElement?.disabled);
2203
+ }
2204
+ get hasErrorsComputed() {
2205
+ if (this.hasErrors === undefined) {
2206
+ return this.#controlHasErrors(this.controlDir);
2207
+ }
2208
+ return this.hasErrors;
2458
2209
  }
2459
- get ariaDescribedBy() {
2460
- return this.#ariaDescribedBy;
2210
+ get required() {
2211
+ return (this.#hasRequiredValidator() ||
2212
+ this.inputRef?.nativeElement.required ||
2213
+ this.#requiredByFormField);
2461
2214
  }
2462
- #ariaDescribedBy;
2463
- init(host) {
2464
- this.#host = host;
2465
- this.#ariaDescribedBy = host.ariaDescribedBy.asObservable();
2215
+ #_stacked;
2216
+ #_characterLimit;
2217
+ #_hintText;
2218
+ #previousInputRef;
2219
+ #previousMaxLengthValidator;
2220
+ #ngUnsubscribe;
2221
+ ngOnInit() {
2222
+ this.#inputBoxHostSvc.init(this);
2223
+ this.#inputBoxHostSvc.required
2224
+ .pipe(takeUntil$1(this.#ngUnsubscribe))
2225
+ .subscribe((required) => {
2226
+ this.#requiredByFormField = required;
2227
+ this.#changeRef.markForCheck();
2228
+ });
2229
+ }
2230
+ ngAfterContentChecked() {
2231
+ this.controlDir =
2232
+ this.formControl || this.formControlByName || this.ngModel;
2233
+ if (!this.formControlHasFocus) {
2234
+ this.characterCountScreenReader = this.controlDir?.value?.length || 0;
2235
+ }
2236
+ this.#updateInputRef();
2466
2237
  }
2467
2238
  ngOnDestroy() {
2468
- this.#requiredSubject.complete();
2239
+ this.ariaDescribedBy.complete();
2240
+ this.#ngUnsubscribe.next();
2241
+ this.#ngUnsubscribe.complete();
2469
2242
  }
2470
- populate(args) {
2471
- if (!this.#host) {
2472
- throw new Error('Cannot populate the input box because `SkyInputBoxHostService` has not yet been initialized. Try running the `populate` method within an Angular lifecycle hook, such as `ngOnInit`.');
2243
+ formControlFocusIn() {
2244
+ const inlineHelpEl = this.#adapterService.getInlineHelpElement(this.#elementRef);
2245
+ if (!this.#adapterService.isFocusInElement(inlineHelpEl)) {
2246
+ this.#updateHasFocus(true);
2473
2247
  }
2474
- this.#host.populate(args);
2475
2248
  }
2476
- setHintText(hintText) {
2477
- if (!this.#host) {
2478
- throw new Error('Cannot set hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2249
+ formControlFocusOut() {
2250
+ this.characterCountScreenReader = this.controlDir?.value?.length || 0;
2251
+ this.#updateHasFocus(false);
2252
+ }
2253
+ onInsetIconClick() {
2254
+ if (!this.isDisabled) {
2255
+ this.#adapterService.focusControl(this.#elementRef);
2479
2256
  }
2480
- this.#host.setHostHintText(hintText);
2257
+ }
2258
+ populate(args) {
2259
+ this.hostInputTemplate = args.inputTemplate;
2260
+ this.hostButtonsTemplate = args.buttonsTemplate;
2261
+ this.hostButtonsLeftTemplate = args.buttonsLeftTemplate;
2262
+ this.hostButtonsInsetTemplate = args.buttonsInsetTemplate;
2263
+ this.hostIconsInsetTemplate = args.iconsInsetTemplate;
2264
+ this.hostIconsInsetLeftTemplate = args.iconsInsetLeftTemplate;
2265
+ this.#changeRef.markForCheck();
2481
2266
  }
2482
2267
  setHintTextHidden(hide) {
2483
- if (!this.#host) {
2484
- throw new Error('Cannot hide hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2485
- }
2486
- this.#host.setHintTextHidden(hide);
2268
+ this.hintTextHidden = hide;
2269
+ this.#changeRef.markForCheck();
2270
+ }
2271
+ setHostHintText(value) {
2272
+ this.hostHintText = value;
2273
+ this.#changeRef.markForCheck();
2487
2274
  }
2488
2275
  setHintTextScreenReaderOnly(hide) {
2489
- if (!this.#host) {
2490
- throw new Error('Cannot remove hint text on the input box because `SkyInputBoxHostService` has not yet been initialized.');
2491
- }
2492
- this.#host.setHintTextScreenReaderOnly(hide);
2276
+ this.hintTextScreenReaderOnly = hide;
2277
+ this.#changeRef.markForCheck();
2493
2278
  }
2494
- /**
2495
- * Set required so that input box displays the label correctly. When the input is supplied by the consumer it is a content
2496
- * child that input box can read required from and this is unnecessary. When the input is supplied internally by the
2497
- * component the input box does not have a ref to it, so the component needs to inform the input box of its required state.
2498
- */
2499
- setRequired(required) {
2500
- this.#requiredSubject.next(required);
2279
+ #hasRequiredValidator() {
2280
+ return !!this.controlDir?.control?.hasValidator(Validators.required);
2501
2281
  }
2502
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2503
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService }); }
2504
- }
2505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHostService, decorators: [{
2506
- type: Injectable
2507
- }] });
2508
-
2509
- /**
2510
- * @internal
2511
- */
2512
- class SkyInputBoxControlDirective {
2513
- set autocomplete(value) {
2514
- this.#_autocomplete = value;
2282
+ #updateHasFocus(hasFocus) {
2283
+ // Some components manipulate the focus of elements inside an input box programmatically,
2284
+ // which can cause an `ExpressionChangedAfterItHasBeenCheckedError` if focus was set after
2285
+ // initial change detection. Using `setTimeout()` here fixes it.
2286
+ setTimeout(() => {
2287
+ this.formControlHasFocus = hasFocus;
2288
+ this.#changeRef.markForCheck();
2289
+ });
2515
2290
  }
2516
- get autocomplete() {
2517
- return this.#_autocomplete || (this.#hostSvc ? 'off' : undefined);
2291
+ #controlHasErrors(control) {
2292
+ return !!(control && control.invalid && (control.dirty || control.touched));
2518
2293
  }
2519
- #_autocomplete;
2520
- #hostSvc = inject(SkyInputBoxHostService, { optional: true });
2521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2522
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: SkyInputBoxControlDirective, isStandalone: true, selector: "input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)", inputs: { autocomplete: "autocomplete" }, host: { properties: { "autocomplete": "this.autocomplete" } }, ngImport: i0 }); }
2294
+ #updateInputRef() {
2295
+ if (!this.inputRef) {
2296
+ return;
2297
+ }
2298
+ const inputEl = this.inputRef.nativeElement;
2299
+ // Check for the Angular required validator and add an aria-required attribute
2300
+ // to match. For template-driven forms, the input will have a `required` attribute
2301
+ // so the aria-required attribute is unnecessary.
2302
+ const hasRequiredValidator = this.#hasRequiredValidator();
2303
+ const ariaRequired = inputEl.ariaRequired;
2304
+ if (hasRequiredValidator && ariaRequired !== 'true') {
2305
+ inputEl.ariaRequired = 'true';
2306
+ }
2307
+ else if (!hasRequiredValidator && ariaRequired === 'true') {
2308
+ inputEl.ariaRequired = null;
2309
+ }
2310
+ if (this.hasErrorsComputed) {
2311
+ this.#renderer.setAttribute(inputEl, 'aria-invalid', 'true');
2312
+ this.#renderer.setAttribute(inputEl, 'aria-errormessage', this.errorId);
2313
+ }
2314
+ else {
2315
+ this.#renderer.removeAttribute(inputEl, 'aria-invalid');
2316
+ this.#renderer.removeAttribute(inputEl, 'aria-errormessage');
2317
+ }
2318
+ this.#adapterService.updateDescribedBy(this.inputRef, this.hintTextId, this.hintText ?? this.hostHintText);
2319
+ if (this.inputRef !== this.#previousInputRef) {
2320
+ this.#renderer.addClass(inputEl, 'sky-form-control');
2321
+ this.#renderer.setAttribute(inputEl, 'id', this.controlId);
2322
+ this.#updateMaxLengthValidator();
2323
+ this.#previousInputRef = this.inputRef;
2324
+ }
2325
+ }
2326
+ #updateMaxLengthValidator() {
2327
+ const control = this.controlDir?.control;
2328
+ if (this.#previousMaxLengthValidator) {
2329
+ control?.removeValidators(this.#previousMaxLengthValidator);
2330
+ this.#previousMaxLengthValidator = undefined;
2331
+ }
2332
+ if (control && this.characterLimit !== undefined) {
2333
+ this.#previousMaxLengthValidator = Validators.maxLength(this.characterLimit);
2334
+ control.addValidators([this.#previousMaxLengthValidator]);
2335
+ }
2336
+ }
2337
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2338
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: "hasErrors", disabled: "disabled", labelText: "labelText", characterLimit: "characterLimit", stacked: "stacked", helpPopoverTitle: "helpPopoverTitle", helpPopoverContent: "helpPopoverContent", helpKey: "helpKey", hintText: "hintText" }, host: { properties: { "class": "this.cssClass" } }, providers: [
2339
+ SkyContentInfoProvider,
2340
+ SkyInputBoxAdapterService,
2341
+ SkyInputBoxHostService,
2342
+ {
2343
+ provide: SKY_FORM_ERRORS_ENABLED,
2344
+ useValue: true,
2345
+ },
2346
+ ], queries: [{ propertyName: "formControl", first: true, predicate: FormControlDirective, descendants: true }, { propertyName: "formControlByName", first: true, predicate: FormControlName, descendants: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }, { propertyName: "inputRef", first: true, predicate: SkyInputBoxControlDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div class=\"sky-form-group\">\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <div class=\"sky-input-box-form-group-inner\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n @if (labelText) {\n <label\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n }\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n @if ((helpPopoverContent || helpKey) && labelText) {\n <sky-help-inline\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n @if (characterLimit !== undefined) {\n <sky-character-counter-indicator\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n }\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n @if (hostInputTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostInputTemplate\" />\n }\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n @if (hostButtonsLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsLeftTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n />\n @if (hostButtonsTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n @if (hostButtonsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsInsetTemplate\" />\n }\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n @if (hostIconsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #iconsInsetLeftTemplate>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n @if (hostIconsInsetLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [touched]=\"controlDir?.touched\"\n [dirty]=\"controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n @if (hintText || hostHintText) {\n <div\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n }\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:initial}sky-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs);text-align:left}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{z-index:4}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{margin-top:-23px;padding-top:26px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: ["characterCount", "characterCountLimit"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i4$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyInputBoxHintTextPipe, name: "skyInputBoxHintText" }], encapsulation: i0.ViewEncapsulation.None }); }
2523
2347
  }
2524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxControlDirective, decorators: [{
2525
- type: Directive,
2526
- args: [{
2527
- selector:
2528
- // eslint-disable-next-line @angular-eslint/directive-selector
2529
- 'input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)',
2530
- standalone: true,
2531
- }]
2532
- }], propDecorators: { autocomplete: [{
2533
- type: HostBinding,
2534
- args: ['autocomplete']
2535
- }, {
2348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxComponent, decorators: [{
2349
+ type: Component,
2350
+ args: [{ selector: 'sky-input-box', providers: [
2351
+ SkyContentInfoProvider,
2352
+ SkyInputBoxAdapterService,
2353
+ SkyInputBoxHostService,
2354
+ {
2355
+ provide: SKY_FORM_ERRORS_ENABLED,
2356
+ useValue: true,
2357
+ },
2358
+ ], encapsulation: ViewEncapsulation.None, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div class=\"sky-form-group\">\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <div class=\"sky-input-box-form-group-inner\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n @if (labelText) {\n <label\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n }\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n @if ((helpPopoverContent || helpKey) && labelText) {\n <sky-help-inline\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n @if (characterLimit !== undefined) {\n <sky-character-counter-indicator\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n }\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n @if (hostInputTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostInputTemplate\" />\n }\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n @if (hostButtonsLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsLeftTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n />\n @if (hostButtonsTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n @if (hostButtonsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsInsetTemplate\" />\n }\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n @if (hostIconsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #iconsInsetLeftTemplate>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n @if (hostIconsInsetLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [touched]=\"controlDir?.touched\"\n [dirty]=\"controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n @if (hintText || hostHintText) {\n <div\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n }\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:initial}sky-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs);text-align:left}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{z-index:4}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{margin-top:-23px;padding-top:26px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"] }]
2359
+ }], propDecorators: { hasErrors: [{
2360
+ type: Input
2361
+ }], disabled: [{
2362
+ type: Input
2363
+ }], labelText: [{
2364
+ type: Input
2365
+ }], characterLimit: [{
2366
+ type: Input
2367
+ }], stacked: [{
2368
+ type: Input
2369
+ }], helpPopoverTitle: [{
2370
+ type: Input
2371
+ }], helpPopoverContent: [{
2372
+ type: Input
2373
+ }], helpKey: [{
2374
+ type: Input
2375
+ }], hintText: [{
2536
2376
  type: Input
2377
+ }], cssClass: [{
2378
+ type: HostBinding,
2379
+ args: ['class']
2380
+ }], formControl: [{
2381
+ type: ContentChild,
2382
+ args: [FormControlDirective]
2383
+ }], formControlByName: [{
2384
+ type: ContentChild,
2385
+ args: [FormControlName]
2386
+ }], ngModel: [{
2387
+ type: ContentChild,
2388
+ args: [NgModel]
2389
+ }], inputRef: [{
2390
+ type: ContentChild,
2391
+ args: [SkyInputBoxControlDirective, {
2392
+ read: ElementRef,
2393
+ }]
2537
2394
  }] } });
2538
2395
 
2539
- /**
2540
- * @internal
2541
- */
2542
- class SkyInputBoxHintTextPipe {
2543
- transform(hintText, hostHintText) {
2544
- if (hintText && hostHintText) {
2545
- return `${hintText} ${hostHintText}`;
2546
- }
2547
- return hintText || hostHintText;
2548
- }
2549
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2550
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, isStandalone: true, name: "skyInputBoxHintText" }); }
2396
+ class SkyInputBoxModule {
2397
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2398
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, declarations: [SkyInputBoxComponent], imports: [CommonModule,
2399
+ SkyCharacterCounterModule,
2400
+ SkyFormErrorsModule,
2401
+ SkyFormErrorModule,
2402
+ SkyFormsResourcesModule,
2403
+ SkyHelpInlineModule,
2404
+ SkyInputBoxControlDirective,
2405
+ SkyInputBoxHintTextPipe,
2406
+ SkyThemeModule], exports: [SkyInputBoxHintTextPipe,
2407
+ SkyInputBoxComponent,
2408
+ SkyInputBoxControlDirective,
2409
+ SkyFormErrorModule] }); }
2410
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, imports: [CommonModule,
2411
+ SkyCharacterCounterModule,
2412
+ SkyFormErrorsModule,
2413
+ SkyFormErrorModule,
2414
+ SkyFormsResourcesModule,
2415
+ SkyHelpInlineModule,
2416
+ SkyThemeModule, SkyFormErrorModule] }); }
2551
2417
  }
2552
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxHintTextPipe, decorators: [{
2553
- type: Pipe,
2418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, decorators: [{
2419
+ type: NgModule,
2554
2420
  args: [{
2555
- standalone: true,
2556
- name: 'skyInputBoxHintText',
2421
+ declarations: [SkyInputBoxComponent],
2422
+ imports: [
2423
+ CommonModule,
2424
+ SkyCharacterCounterModule,
2425
+ SkyFormErrorsModule,
2426
+ SkyFormErrorModule,
2427
+ SkyFormsResourcesModule,
2428
+ SkyHelpInlineModule,
2429
+ SkyInputBoxControlDirective,
2430
+ SkyInputBoxHintTextPipe,
2431
+ SkyThemeModule,
2432
+ ],
2433
+ exports: [
2434
+ SkyInputBoxHintTextPipe,
2435
+ SkyInputBoxComponent,
2436
+ SkyInputBoxControlDirective,
2437
+ SkyFormErrorModule,
2438
+ ],
2557
2439
  }]
2558
2440
  }] });
2559
2441
 
2560
- const ARIA_DESCRIBEDBY_ATTR = 'aria-describedby';
2561
- /**
2562
- * @internal
2563
- */
2564
- class SkyInputBoxAdapterService {
2565
- #renderer = inject(RendererFactory2).createRenderer(undefined, null);
2566
- focusControl(elRef) {
2567
- const control = elRef.nativeElement.querySelector('.sky-form-control');
2568
- /* istanbul ignore else */
2569
- if (control) {
2570
- control.focus();
2571
- }
2572
- }
2573
- /**
2574
- * Returns the inline help element.
2575
- */
2576
- getInlineHelpElement(elRef) {
2577
- return elRef.nativeElement.querySelector('.sky-control-help');
2578
- }
2579
- /**
2580
- * Returns true if the provided element contains the focused element.
2581
- */
2582
- isFocusInElement(el) {
2583
- if (el) {
2584
- return (el === document.activeElement || el.contains(document.activeElement));
2585
- }
2586
- return false;
2587
- }
2588
- updateDescribedBy(inputRef, hintTextId, hintText) {
2589
- const inputEl = inputRef.nativeElement;
2590
- const describedByIds = inputEl
2591
- .getAttribute(ARIA_DESCRIBEDBY_ATTR)
2592
- ?.split(' ')
2593
- .map((id) => id.trim()) ?? [];
2594
- const hintTextIdIndex = describedByIds.indexOf(hintTextId);
2595
- const previousCount = describedByIds.length;
2596
- if (hintText && hintTextIdIndex < 0) {
2597
- describedByIds.push(hintTextId);
2598
- }
2599
- else if (!hintText && hintTextIdIndex >= 0) {
2600
- describedByIds.splice(hintTextIdIndex, 1);
2601
- }
2602
- if (describedByIds.length !== previousCount) {
2603
- this.#setDescribedByIds(inputEl, describedByIds);
2604
- }
2605
- }
2606
- #setDescribedByIds(inputEl, describedByIds) {
2607
- if (describedByIds.length === 0) {
2608
- this.#renderer.removeAttribute(inputEl, ARIA_DESCRIBEDBY_ATTR);
2609
- }
2610
- else {
2611
- this.#renderer.setAttribute(inputEl, ARIA_DESCRIBEDBY_ATTR, describedByIds.join(' '));
2612
- }
2613
- }
2614
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2615
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService }); }
2616
- }
2617
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxAdapterService, decorators: [{
2618
- type: Injectable
2619
- }] });
2620
-
2442
+ const MAX_FILE_SIZE_DEFAULT = 500000;
2443
+ const MIN_FILE_SIZE_DEFAULT = 0;
2621
2444
  /**
2622
- * A wrapper component that provides styling and accessibility to form elements.
2445
+ * Provides an element to attach multiple files where users can browse or drag and drop local files
2446
+ * or provide hyperlinks to external files. You can leave the contents of the component
2447
+ * blank to display the drop zone's default UI, or you can specify custom content to
2448
+ * display instead. When the module initializes, it disables the ability to drag and
2449
+ * drop files for the entire window to prevent the browser from opening files that are
2450
+ * accidentally dropped outside the target zone. If you implement your own file drop functionality
2451
+ * outside of the file drop component, you can place the `sky-file-drop-target` CSS class
2452
+ * on the element that receives drop events to exempt it from the drop exclusion rule.
2623
2453
  */
2624
- class SkyInputBoxComponent {
2454
+ class SkyFileDropComponent {
2625
2455
  constructor() {
2626
- this.#changeRef = inject(ChangeDetectorRef);
2627
- this.#inputBoxHostSvc = inject(SkyInputBoxHostService);
2628
- this.#adapterService = inject(SkyInputBoxAdapterService);
2456
+ /**
2457
+ * Fires when users add or remove files.
2458
+ */
2459
+ this.filesChanged = new EventEmitter();
2460
+ /**
2461
+ * Fires when the link input box triggers a blur event.
2462
+ */
2463
+ this.linkInputBlur = new EventEmitter();
2464
+ /**
2465
+ * Fires when users add or remove links.
2466
+ */
2467
+ this.linkChanged = new EventEmitter();
2468
+ /**
2469
+ * Whether users can drag and drop multiple files at the same time.
2470
+ */
2471
+ this.multiple = true;
2472
+ /**
2473
+ * Whether to disable the option to browse for files to attach.
2474
+ */
2475
+ this.noClick = false;
2476
+ /**
2477
+ * Whether to display the option to attach files from URLs rather than from local devices.
2478
+ */
2479
+ this.allowLinks = false;
2480
+ /**
2481
+ * Whether to hide `labelText` from view.
2482
+ */
2483
+ this.labelHidden = false;
2484
+ /**
2485
+ * Whether uploading a file or link is required.
2486
+ * When you set this property to `true`, the component adds `aria-required` and `required`
2487
+ * attributes to the input elements so that screen readers announce an invalid state until the input element
2488
+ * is complete.
2489
+ * For more information about the `aria-required` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-required).
2490
+ */
2491
+ this.required = false;
2492
+ /**
2493
+ * Whether the file attachment is stacked on another form component. When specified, the appropriate
2494
+ * vertical spacing is automatically added to the file attachment.
2495
+ */
2496
+ this.stacked = false;
2497
+ this.rejectedOver = false;
2498
+ this.acceptedOver = false;
2499
+ this.#_maxFileSize = MAX_FILE_SIZE_DEFAULT;
2500
+ this.#_minFileSize = MIN_FILE_SIZE_DEFAULT;
2501
+ this.#fileAttachmentService = inject(SkyFileAttachmentService);
2502
+ this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
2503
+ this.#resourcesSvc = inject(SkyLibResourcesService);
2629
2504
  this.#idSvc = inject(SkyIdService);
2630
- this.#elementRef = inject(ElementRef);
2631
- this.#renderer = inject(Renderer2);
2632
- this.formControlHasFocus = false;
2633
- this.hintTextHidden = false;
2634
- this.hintTextScreenReaderOnly = false;
2635
- this.controlId = this.#idSvc.generateId();
2636
- this.labelId = this.#idSvc.generateId();
2637
2505
  this.errorId = this.#idSvc.generateId();
2638
- this.hintTextId = this.#idSvc.generateId();
2639
- this.ariaDescribedBy = new ReplaySubject(1);
2640
- this.cssClass = '';
2641
- this.characterCountScreenReader = 0;
2642
- this.#_stacked = false;
2643
- this.#ngUnsubscribe = new Subject();
2506
+ this.rejectedFiles = [];
2644
2507
  }
2645
- #changeRef;
2646
- #inputBoxHostSvc;
2647
- #adapterService;
2648
- #idSvc;
2649
- #elementRef;
2650
- #renderer;
2651
2508
  /**
2652
- * The maximum number of characters allowed in the input. A [SKY UX character count](https://developer.blackbaud.com/skyux/components/character-count)
2653
- * will be placed on the input element with the appropriate validator.
2509
+ * The minimum size in bytes for valid files.
2510
+ * @default 0
2654
2511
  */
2655
- set characterLimit(value) {
2656
- this.#_characterLimit =
2657
- value === undefined ? undefined : coerceNumberProperty(value, undefined);
2658
- this.#updateMaxLengthValidator();
2659
- }
2660
- get characterLimit() {
2661
- return this.#_characterLimit;
2512
+ set minFileSize(value) {
2513
+ this.#_minFileSize = value ?? MIN_FILE_SIZE_DEFAULT;
2662
2514
  }
2663
- /**
2664
- * Whether the input box is stacked on another input box. When specified, the appropriate
2665
- * vertical spacing is automatically added to the input box.
2666
- */
2667
- set stacked(value) {
2668
- this.#_stacked = coerceBooleanProperty(value);
2669
- this.cssClass = this.#_stacked ? 'sky-margin-stacked-lg' : '';
2515
+ get minFileSize() {
2516
+ return this.#_minFileSize;
2670
2517
  }
2671
2518
  /**
2672
- * [Persistent inline help text](https://developer.blackbaud.com/skyux/design/guidelines/user-assistance#inline-help) that provides
2673
- * additional context to the user.
2519
+ * The maximum size in bytes for valid files.
2520
+ * @default 500000
2674
2521
  */
2675
- set hintText(value) {
2676
- this.#_hintText = value;
2677
- this.ariaDescribedBy.next(value ? this.hintTextId : undefined);
2678
- }
2679
- get hintText() {
2680
- return this.#_hintText;
2681
- }
2682
- #requiredByFormField;
2683
- get isDisabled() {
2684
- return !!(this.disabled ||
2685
- this.controlDir?.control?.disabled ||
2686
- this.inputRef?.nativeElement?.disabled);
2687
- }
2688
- get hasErrorsComputed() {
2689
- if (this.hasErrors === undefined) {
2690
- return this.#controlHasErrors(this.controlDir);
2691
- }
2692
- return this.hasErrors;
2522
+ set maxFileSize(value) {
2523
+ this.#_maxFileSize = value ?? MAX_FILE_SIZE_DEFAULT;
2693
2524
  }
2694
- get required() {
2695
- return (this.#hasRequiredValidator() ||
2696
- this.inputRef?.nativeElement.required ||
2697
- this.#requiredByFormField);
2525
+ get maxFileSize() {
2526
+ return this.#_maxFileSize;
2698
2527
  }
2699
- #_stacked;
2700
- #_characterLimit;
2701
- #_hintText;
2702
- #previousInputRef;
2703
- #previousMaxLengthValidator;
2704
- #ngUnsubscribe;
2705
- ngOnInit() {
2706
- this.#inputBoxHostSvc.init(this);
2707
- this.#inputBoxHostSvc.required
2708
- .pipe(takeUntil$1(this.#ngUnsubscribe))
2709
- .subscribe((required) => {
2710
- this.#requiredByFormField = required;
2711
- this.#changeRef.markForCheck();
2712
- });
2528
+ #enterEventTarget;
2529
+ #_maxFileSize;
2530
+ #_minFileSize;
2531
+ #fileAttachmentService;
2532
+ #liveAnnouncerSvc;
2533
+ #resourcesSvc;
2534
+ #idSvc;
2535
+ ngOnDestroy() {
2536
+ this.filesChanged.complete();
2537
+ this.linkChanged.complete();
2538
+ this.linkInputBlur.complete();
2713
2539
  }
2714
- ngAfterContentChecked() {
2715
- this.controlDir =
2716
- this.formControl || this.formControlByName || this.ngModel;
2717
- if (!this.formControlHasFocus) {
2718
- this.characterCountScreenReader = this.controlDir?.value?.length || 0;
2540
+ dropClicked() {
2541
+ if (!this.noClick && this.inputEl) {
2542
+ this.inputEl.nativeElement.click();
2719
2543
  }
2720
- this.#updateInputRef();
2721
2544
  }
2722
- ngOnDestroy() {
2723
- this.ariaDescribedBy.complete();
2724
- this.#ngUnsubscribe.next();
2725
- this.#ngUnsubscribe.complete();
2545
+ fileChangeEvent(fileChangeEvent) {
2546
+ this.#handleFiles(fileChangeEvent.target?.files);
2726
2547
  }
2727
- formControlFocusIn() {
2728
- const inlineHelpEl = this.#adapterService.getInlineHelpElement(this.#elementRef);
2729
- if (!this.#adapterService.isFocusInElement(inlineHelpEl)) {
2730
- this.#updateHasFocus(true);
2548
+ fileDragEnter(dragEnterEvent) {
2549
+ // Save this target to know when the drag event leaves
2550
+ this.#enterEventTarget = dragEnterEvent.target;
2551
+ dragEnterEvent.stopPropagation();
2552
+ dragEnterEvent.preventDefault();
2553
+ }
2554
+ fileDragOver(dragOverEvent) {
2555
+ const transfer = dragOverEvent.dataTransfer;
2556
+ dragOverEvent.stopPropagation();
2557
+ dragOverEvent.preventDefault();
2558
+ if (transfer) {
2559
+ if (transfer.items) {
2560
+ const files = Array.from(transfer.items);
2561
+ for (const file of files) {
2562
+ if (file.type &&
2563
+ this.#fileAttachmentService.fileTypeRejected(file.type, this.acceptedTypes)) {
2564
+ this.rejectedOver = true;
2565
+ this.acceptedOver = false;
2566
+ return;
2567
+ }
2568
+ }
2569
+ if (files.length > 0 && !this.acceptedOver) {
2570
+ this.rejectedOver = false;
2571
+ this.acceptedOver = true;
2572
+ }
2573
+ } /* istanbul ignore next: untestable */
2574
+ else if (transfer.files) {
2575
+ // If the browser does not support DataTransfer.items,
2576
+ // defer file-type checking to drop handler.
2577
+ // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items#Browser_compatibility
2578
+ this.rejectedOver = false;
2579
+ this.acceptedOver = true;
2580
+ }
2731
2581
  }
2732
2582
  }
2733
- formControlFocusOut() {
2734
- this.characterCountScreenReader = this.controlDir?.value?.length || 0;
2735
- this.#updateHasFocus(false);
2583
+ fileDrop(dropEvent) {
2584
+ dropEvent.stopPropagation();
2585
+ dropEvent.preventDefault();
2586
+ this.#enterEventTarget = undefined;
2587
+ this.rejectedOver = false;
2588
+ this.acceptedOver = false;
2589
+ if (dropEvent.dataTransfer && dropEvent.dataTransfer.files) {
2590
+ const hasDirectory = this.#fileAttachmentService.hasDirectory(dropEvent.dataTransfer.files);
2591
+ const invalidNumberOfFiles = !this.multiple && dropEvent.dataTransfer.files.length > 1;
2592
+ if (hasDirectory || invalidNumberOfFiles) {
2593
+ return;
2594
+ }
2595
+ this.#handleFiles(dropEvent.dataTransfer.files);
2596
+ }
2736
2597
  }
2737
- onInsetIconClick() {
2738
- if (!this.isDisabled) {
2739
- this.#adapterService.focusControl(this.#elementRef);
2598
+ fileDragLeave(dragLeaveEvent) {
2599
+ if (this.#enterEventTarget === dragLeaveEvent.target) {
2600
+ this.rejectedOver = false;
2601
+ this.acceptedOver = false;
2740
2602
  }
2741
2603
  }
2742
- populate(args) {
2743
- this.hostInputTemplate = args.inputTemplate;
2744
- this.hostButtonsTemplate = args.buttonsTemplate;
2745
- this.hostButtonsLeftTemplate = args.buttonsLeftTemplate;
2746
- this.hostButtonsInsetTemplate = args.buttonsInsetTemplate;
2747
- this.hostIconsInsetTemplate = args.iconsInsetTemplate;
2748
- this.hostIconsInsetLeftTemplate = args.iconsInsetLeftTemplate;
2749
- this.#changeRef.markForCheck();
2604
+ addLinkEnter(event) {
2605
+ if (event.which === 13) {
2606
+ this.addLink(event);
2607
+ }
2750
2608
  }
2751
- setHintTextHidden(hide) {
2752
- this.hintTextHidden = hide;
2753
- this.#changeRef.markForCheck();
2609
+ addLink(event) {
2610
+ event.preventDefault();
2611
+ this.linkChanged.emit({ url: this.linkUrl });
2612
+ this.#announceState('skyux_file_attachment_file_upload_link_added', this.linkUrl);
2613
+ this.linkUrl = undefined;
2754
2614
  }
2755
- setHostHintText(value) {
2756
- this.hostHintText = value;
2757
- this.#changeRef.markForCheck();
2615
+ onLinkBlur() {
2616
+ this.linkInputBlur.emit();
2758
2617
  }
2759
- setHintTextScreenReaderOnly(hide) {
2760
- this.hintTextScreenReaderOnly = hide;
2761
- this.#changeRef.markForCheck();
2618
+ #announceState(resourceString, ...args) {
2619
+ this.#resourcesSvc
2620
+ .getString(resourceString, ...args)
2621
+ .pipe(take(1))
2622
+ .subscribe((internationalizedString) => {
2623
+ this.#liveAnnouncerSvc.announce(internationalizedString);
2624
+ });
2762
2625
  }
2763
- #hasRequiredValidator() {
2764
- return !!this.controlDir?.control?.hasValidator(Validators.required);
2626
+ #emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray) {
2627
+ if (totalFiles === rejectedFileArray.length + validFileArray.length) {
2628
+ this.filesChanged.emit({
2629
+ files: validFileArray,
2630
+ rejectedFiles: rejectedFileArray,
2631
+ });
2632
+ if (this.inputEl) {
2633
+ this.inputEl.nativeElement.value = '';
2634
+ }
2635
+ }
2765
2636
  }
2766
- #updateHasFocus(hasFocus) {
2767
- // Some components manipulate the focus of elements inside an input box programmatically,
2768
- // which can cause an `ExpressionChangedAfterItHasBeenCheckedError` if focus was set after
2769
- // initial change detection. Using `setTimeout()` here fixes it.
2770
- setTimeout(() => {
2771
- this.formControlHasFocus = hasFocus;
2772
- this.#changeRef.markForCheck();
2773
- });
2637
+ #filesRejected(file, validFileArray, rejectedFileArray, totalFiles) {
2638
+ rejectedFileArray.push(file);
2639
+ this.#emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray);
2774
2640
  }
2775
- #controlHasErrors(control) {
2776
- return !!(control && control.invalid && (control.dirty || control.touched));
2641
+ #loadFile(fileDrop, file, validFileArray, rejectedFileArray, totalFiles) {
2642
+ const reader = new FileReader();
2643
+ reader.addEventListener('load', (event) => {
2644
+ file.url = event.target.result;
2645
+ validFileArray.push(file);
2646
+ fileDrop.#emitFileChangeEvent(totalFiles, rejectedFileArray, validFileArray);
2647
+ this.#announceState('skyux_file_attachment_file_upload_file_added', file.file.name);
2648
+ });
2649
+ reader.addEventListener('error', () => {
2650
+ fileDrop.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2651
+ });
2652
+ reader.addEventListener('abort', () => {
2653
+ fileDrop.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2654
+ });
2655
+ reader.readAsDataURL(file.file);
2777
2656
  }
2778
- #updateInputRef() {
2779
- if (!this.inputRef) {
2780
- return;
2657
+ #handleFiles(files) {
2658
+ if (files) {
2659
+ const validFileArray = [];
2660
+ const rejectedFileArray = [];
2661
+ const totalFiles = files.length;
2662
+ const processedFiles = this.#fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
2663
+ for (const file of processedFiles) {
2664
+ if (file.errorType) {
2665
+ this.#filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
2666
+ }
2667
+ else {
2668
+ this.#loadFile(this, file, validFileArray, rejectedFileArray, totalFiles);
2669
+ }
2670
+ }
2671
+ this.rejectedFiles = rejectedFileArray;
2781
2672
  }
2782
- const inputEl = this.inputRef.nativeElement;
2783
- // Check for the Angular required validator and add an aria-required attribute
2784
- // to match. For template-driven forms, the input will have a `required` attribute
2785
- // so the aria-required attribute is unnecessary.
2786
- const hasRequiredValidator = this.#hasRequiredValidator();
2787
- const ariaRequired = inputEl.ariaRequired;
2788
- if (hasRequiredValidator && ariaRequired !== 'true') {
2789
- inputEl.ariaRequired = 'true';
2673
+ }
2674
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2675
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFileDropComponent, isStandalone: true, selector: "sky-file-drop", inputs: { fileUploadAriaLabel: "fileUploadAriaLabel", linkUploadAriaLabel: "linkUploadAriaLabel", linkUploadHintText: "linkUploadHintText", minFileSize: "minFileSize", maxFileSize: "maxFileSize", multiple: "multiple", validateFn: "validateFn", acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", noClick: "noClick", allowLinks: "allowLinks", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", required: ["required", "required", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { filesChanged: "filesChanged", linkInputBlur: "linkInputBlur", linkChanged: "linkChanged" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked" } }, providers: [
2676
+ SkyFileAttachmentService,
2677
+ { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
2678
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<fieldset>\n @if (labelText) {\n <legend\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n >\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div\n class=\"sky-file-drop-row\"\n [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\"\n >\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{\n 'sky-file-drop-accept': acceptedOver,\n 'sky-file-drop-reject': rejectedOver\n }\"\n >\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n [attr.aria-label]=\"\n fileUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\n \"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n ></button>\n\n <input\n #fileInput\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple : null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes : null\"\n (change)=\"fileChangeEvent($event)\"\n />\n\n @if (customEl.children.length === 0) {\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | skyLibResources\n }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{\n 'skyux_file_attachment_file_upload_or_click_to_browse'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drop_files_here'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n }\n\n <div #customEl class=\"sky-file-drop-contents-custom\">\n <ng-content />\n </div>\n </div>\n @if (allowLinks) {\n <div class=\"sky-file-drop-col\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label'\n | skyLibResources\n }}\n </div>\n </div>\n <sky-input-box stacked [hintText]=\"linkUploadHintText\">\n <input\n type=\"text\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </sky-input-box>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n</fieldset>\n<sky-form-errors\n [class.sky-file-drop-errors]=\"labelText && rejectedFiles.length\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [touched]=\"rejectedFiles.length > 0\"\n>\n @for (rejectedFile of rejectedFiles; track rejectedFile) {\n <div>\n @if (rejectedFile.errorType === 'fileType') {\n <sky-form-error\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : rejectedFile.errorParam\n \"\n />\n } @else if (rejectedFile.errorType === 'maxFileSize') {\n <sky-form-error\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (rejectedFile.errorType === 'minFileSize') {\n <sky-form-error\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (\n rejectedFile.errorType === 'validate' && rejectedFile.errorParam\n ) {\n <sky-form-error\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n }\n </div>\n }\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;inset:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "ngmodule", type: SkyInputBoxModule }, { kind: "component", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText"] }, { kind: "directive", type: SkyInputBoxControlDirective, selector: "input:not([skyId]):not(.sky-form-control),select:not([skyId]):not(.sky-form-control),textarea:not([skyId]):not(.sky-form-control)", inputs: ["autocomplete"] }] }); }
2679
+ }
2680
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropComponent, decorators: [{
2681
+ type: Component,
2682
+ args: [{ selector: 'sky-file-drop', providers: [
2683
+ SkyFileAttachmentService,
2684
+ { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
2685
+ ], standalone: true, imports: [
2686
+ CommonModule,
2687
+ FormsModule,
2688
+ SkyFileSizePipe,
2689
+ SkyFormErrorComponent,
2690
+ SkyFormErrorsComponent,
2691
+ SkyFormsResourcesModule,
2692
+ SkyHelpInlineModule,
2693
+ SkyIconModule,
2694
+ SkyIdModule,
2695
+ SkyInputBoxModule,
2696
+ ], template: "<fieldset>\n @if (labelText) {\n <legend\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n >\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div\n class=\"sky-file-drop-row\"\n [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\"\n >\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{\n 'sky-file-drop-accept': acceptedOver,\n 'sky-file-drop-reject': rejectedOver\n }\"\n >\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n [attr.aria-label]=\"\n fileUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\n \"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n ></button>\n\n <input\n #fileInput\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple : null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes : null\"\n (change)=\"fileChangeEvent($event)\"\n />\n\n @if (customEl.children.length === 0) {\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | skyLibResources\n }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{\n 'skyux_file_attachment_file_upload_or_click_to_browse'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drop_files_here'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\" />\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n }\n\n <div #customEl class=\"sky-file-drop-contents-custom\">\n <ng-content />\n </div>\n </div>\n @if (allowLinks) {\n <div class=\"sky-file-drop-col\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label'\n | skyLibResources\n }}\n </div>\n </div>\n <sky-input-box stacked [hintText]=\"linkUploadHintText\">\n <input\n type=\"text\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </sky-input-box>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n</fieldset>\n<sky-form-errors\n [class.sky-file-drop-errors]=\"labelText && rejectedFiles.length\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [touched]=\"rejectedFiles.length > 0\"\n>\n @for (rejectedFile of rejectedFiles; track rejectedFile) {\n <div>\n @if (rejectedFile.errorType === 'fileType') {\n <sky-form-error\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : rejectedFile.errorParam\n \"\n />\n } @else if (rejectedFile.errorType === 'maxFileSize') {\n <sky-form-error\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (rejectedFile.errorType === 'minFileSize') {\n <sky-form-error\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n } @else if (\n rejectedFile.errorType === 'validate' && rejectedFile.errorParam\n ) {\n <sky-form-error\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n }\n </div>\n }\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;inset:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"] }]
2697
+ }], propDecorators: { filesChanged: [{
2698
+ type: Output
2699
+ }], linkInputBlur: [{
2700
+ type: Output
2701
+ }], linkChanged: [{
2702
+ type: Output
2703
+ }], fileUploadAriaLabel: [{
2704
+ type: Input
2705
+ }], linkUploadAriaLabel: [{
2706
+ type: Input
2707
+ }], linkUploadHintText: [{
2708
+ type: Input
2709
+ }], minFileSize: [{
2710
+ type: Input
2711
+ }], maxFileSize: [{
2712
+ type: Input
2713
+ }], multiple: [{
2714
+ type: Input
2715
+ }], validateFn: [{
2716
+ type: Input
2717
+ }], acceptedTypes: [{
2718
+ type: Input
2719
+ }], acceptedTypesErrorMessage: [{
2720
+ type: Input
2721
+ }], noClick: [{
2722
+ type: Input
2723
+ }], allowLinks: [{
2724
+ type: Input
2725
+ }], labelText: [{
2726
+ type: Input
2727
+ }], labelHidden: [{
2728
+ type: Input,
2729
+ args: [{ transform: booleanAttribute }]
2730
+ }], hintText: [{
2731
+ type: Input
2732
+ }], required: [{
2733
+ type: Input,
2734
+ args: [{ transform: booleanAttribute }]
2735
+ }], helpPopoverContent: [{
2736
+ type: Input
2737
+ }], helpPopoverTitle: [{
2738
+ type: Input
2739
+ }], stacked: [{
2740
+ type: Input,
2741
+ args: [{ transform: booleanAttribute }]
2742
+ }, {
2743
+ type: HostBinding,
2744
+ args: ['class.sky-margin-stacked-lg']
2745
+ }], helpKey: [{
2746
+ type: Input
2747
+ }], inputEl: [{
2748
+ type: ViewChild,
2749
+ args: ['fileInput']
2750
+ }] } });
2751
+
2752
+ class SkyFileItemComponent {
2753
+ /**
2754
+ * The summary information to display about file attachments. For local files,
2755
+ * the default summary includes the file name, file size, file preview, and a delete button.
2756
+ * For external files, the default summary includes the URL and a delete button.
2757
+ * You can include additional inputs to display user-entered metadata.
2758
+ * @required
2759
+ */
2760
+ set fileItem(value) {
2761
+ this.#_fileItem = value;
2762
+ if (value && 'file' in value) {
2763
+ this.isFile = this.#fileItemService.isFile(value);
2764
+ this.isImage = this.#fileItemService.isImage(value);
2765
+ this.fileName = value.file.name;
2766
+ this.fileSize = value.file.size;
2790
2767
  }
2791
- else if (!hasRequiredValidator && ariaRequired === 'true') {
2792
- inputEl.ariaRequired = null;
2768
+ else {
2769
+ this.isFile = this.isImage = false;
2770
+ this.fileName = '';
2771
+ this.fileSize = undefined;
2793
2772
  }
2794
- if (this.hasErrorsComputed) {
2795
- this.#renderer.setAttribute(inputEl, 'aria-invalid', 'true');
2796
- this.#renderer.setAttribute(inputEl, 'aria-errormessage', this.errorId);
2773
+ this.url = value?.url ?? '';
2774
+ }
2775
+ get fileItem() {
2776
+ return this.#_fileItem;
2777
+ }
2778
+ #_fileItem;
2779
+ #differ;
2780
+ #fileItemService;
2781
+ #liveAnnouncerSvc;
2782
+ #resourcesSvc;
2783
+ constructor(differs, fileItemService) {
2784
+ /**
2785
+ * Fires when users select the delete button for an item. The deleted item is passed to the
2786
+ * function.
2787
+ */
2788
+ this.deleteFile = new EventEmitter();
2789
+ this.fileName = '';
2790
+ this.url = '';
2791
+ this.isFile = false;
2792
+ this.isImage = false;
2793
+ this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
2794
+ this.#resourcesSvc = inject(SkyLibResourcesService);
2795
+ this.#differ = differs.find({}).create();
2796
+ this.#fileItemService = fileItemService;
2797
+ }
2798
+ ngDoCheck() {
2799
+ if (this.fileItem) {
2800
+ const changes = this.#differ.diff(this.fileItem);
2801
+ if (changes) {
2802
+ let cls;
2803
+ const extensionUpper = this.#fileItemService.getFileExtensionUpper(this.fileItem);
2804
+ let fileTypeUpper;
2805
+ switch (extensionUpper) {
2806
+ case '.PDF':
2807
+ cls = 'pdf';
2808
+ break;
2809
+ case '.GZ':
2810
+ case '.RAR':
2811
+ case '.TGZ':
2812
+ case '.ZIP':
2813
+ cls = 'archive';
2814
+ break;
2815
+ case '.PPT':
2816
+ case '.PPTX':
2817
+ cls = 'powerpoint';
2818
+ break;
2819
+ case '.DOC':
2820
+ case '.DOCX':
2821
+ cls = 'word';
2822
+ break;
2823
+ case '.XLS':
2824
+ case '.XLSX':
2825
+ cls = 'excel';
2826
+ break;
2827
+ case '.TXT':
2828
+ cls = 'text';
2829
+ break;
2830
+ case '.HTM':
2831
+ case '.HTML':
2832
+ cls = 'code';
2833
+ break;
2834
+ default:
2835
+ break;
2836
+ }
2837
+ if (!cls) {
2838
+ fileTypeUpper = this.#fileItemService.getFileTypeUpper(this.fileItem);
2839
+ switch (fileTypeUpper.substr(0, fileTypeUpper.indexOf('/'))) {
2840
+ case 'AUDIO':
2841
+ cls = 'audio';
2842
+ break;
2843
+ case 'IMAGE':
2844
+ // Normally images are displayed as thumbnails, but if an image type is not recognized
2845
+ // as being widely supported by modern browsers (e.g. TIFF files) then an icon should
2846
+ // be displayed instead.
2847
+ cls = 'image';
2848
+ break;
2849
+ case 'TEXT':
2850
+ cls = 'text';
2851
+ break;
2852
+ case 'VIDEO':
2853
+ cls = 'video';
2854
+ break;
2855
+ default:
2856
+ break;
2857
+ }
2858
+ }
2859
+ this.icon = 'file-' + (cls ? cls + '-' : '') + 'o';
2860
+ }
2797
2861
  }
2798
2862
  else {
2799
- this.#renderer.removeAttribute(inputEl, 'aria-invalid');
2800
- this.#renderer.removeAttribute(inputEl, 'aria-errormessage');
2801
- }
2802
- this.#adapterService.updateDescribedBy(this.inputRef, this.hintTextId, this.hintText ?? this.hostHintText);
2803
- if (this.inputRef !== this.#previousInputRef) {
2804
- this.#renderer.addClass(inputEl, 'sky-form-control');
2805
- this.#renderer.setAttribute(inputEl, 'id', this.controlId);
2806
- this.#updateMaxLengthValidator();
2807
- this.#previousInputRef = this.inputRef;
2863
+ this.icon = undefined;
2808
2864
  }
2809
2865
  }
2810
- #updateMaxLengthValidator() {
2811
- const control = this.controlDir?.control;
2812
- if (this.#previousMaxLengthValidator) {
2813
- control?.removeValidators(this.#previousMaxLengthValidator);
2814
- this.#previousMaxLengthValidator = undefined;
2866
+ itemDelete() {
2867
+ this.deleteFile.emit(this.fileItem);
2868
+ if (!this.isFile) {
2869
+ this.#resourcesSvc
2870
+ .getString('skyux_file_attachment_file_upload_link_removed', this.url)
2871
+ .pipe(take(1))
2872
+ .subscribe((resourceString) => {
2873
+ this.#liveAnnouncerSvc.announce(resourceString);
2874
+ });
2815
2875
  }
2816
- if (control && this.characterLimit !== undefined) {
2817
- this.#previousMaxLengthValidator = Validators.maxLength(this.characterLimit);
2818
- control.addValidators([this.#previousMaxLengthValidator]);
2876
+ else {
2877
+ this.#resourcesSvc
2878
+ .getString('skyux_file_attachment_file_upload_file_removed', this.fileName)
2879
+ .pipe(take(1))
2880
+ .subscribe((resourceString) => {
2881
+ this.#liveAnnouncerSvc.announce(resourceString);
2882
+ });
2819
2883
  }
2820
2884
  }
2821
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2822
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: "hasErrors", disabled: "disabled", labelText: "labelText", characterLimit: "characterLimit", stacked: "stacked", helpPopoverTitle: "helpPopoverTitle", helpPopoverContent: "helpPopoverContent", helpKey: "helpKey", hintText: "hintText" }, host: { properties: { "class": "this.cssClass" } }, providers: [
2823
- SkyContentInfoProvider,
2824
- SkyInputBoxAdapterService,
2825
- SkyInputBoxHostService,
2826
- {
2827
- provide: SKY_FORM_ERRORS_ENABLED,
2828
- useValue: true,
2829
- },
2830
- ], queries: [{ propertyName: "formControl", first: true, predicate: FormControlDirective, descendants: true }, { propertyName: "formControlByName", first: true, predicate: FormControlName, descendants: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }, { propertyName: "inputRef", first: true, predicate: SkyInputBoxControlDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div class=\"sky-form-group\">\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <div class=\"sky-input-box-form-group-inner\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n @if (labelText) {\n <label\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n }\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n @if ((helpPopoverContent || helpKey) && labelText) {\n <sky-help-inline\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n @if (characterLimit !== undefined) {\n <sky-character-counter-indicator\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n }\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n @if (hostInputTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostInputTemplate\" />\n }\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n @if (hostButtonsLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsLeftTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n />\n @if (hostButtonsTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n @if (hostButtonsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsInsetTemplate\" />\n }\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n @if (hostIconsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #iconsInsetLeftTemplate>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n @if (hostIconsInsetLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [touched]=\"controlDir?.touched\"\n [dirty]=\"controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n @if (hintText || hostHintText) {\n <div\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n }\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:initial}sky-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs)}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{z-index:4}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{margin-top:-23px;padding-top:26px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: ["characterCount", "characterCountLimit"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i4$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyInputBoxHintTextPipe, name: "skyInputBoxHintText" }], encapsulation: i0.ViewEncapsulation.None }); }
2885
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileItemComponent, deps: [{ token: i0.KeyValueDiffers }, { token: SkyFileItemService }], target: i0.ɵɵFactoryTarget.Component }); }
2886
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyFileItemComponent, isStandalone: true, selector: "sky-file-item", inputs: { fileItem: "fileItem" }, outputs: { deleteFile: "deleteFile" }, ngImport: i0, template: "@if (fileItem) {\n <div class=\"sky-file-item sky-padding-even-default\">\n <div class=\"sky-file-item-title\">\n <div class=\"sky-file-item-name-container\">\n <div class=\"sky-file-item-name\">\n @if (isFile) {\n <strong>{{ fileName }}</strong>\n } @else {\n <strong>{{ url }}</strong>\n }\n </div>\n @if (isFile) {\n <div class=\"sky-file-item-size\">({{ fileSize | skyFileSize }})</div>\n }\n </div>\n <div class=\"sky-file-item-controls\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-default sky-file-item-btn-delete\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete'\n | skyLibResources: (isFile ? fileName : url)\n \"\n (click)=\"itemDelete()\"\n >\n <sky-icon icon=\"trash-o\" size=\"lg\" />\n </button>\n </div>\n </div>\n <div class=\"sky-file-item-content\">\n <div class=\"sky-file-item-preview\">\n @if (isImage) {\n <div class=\"sky-file-item-preview-img-container\">\n <img\n class=\"sky-file-item-preview-img\"\n [src]=\"url\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n />\n </div>\n } @else {\n <div class=\"sky-file-item-preview-other\">\n <sky-icon [icon]=\"icon\" />\n </div>\n }\n </div>\n <div class=\"sky-file-item-content-custom\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".sky-file-item{border-top:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;border-right:1px solid #e2e3e4;background-color:#eeeeef;margin-bottom:10px}.sky-file-item-name-container{flex:1 1 auto;overflow:hidden}.sky-file-item-controls{flex:0 1 auto;padding-left:15px}.sky-file-item-name{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis}.sky-file-item-title{margin-bottom:10px;display:flex}.sky-file-item-content{display:flex}.sky-file-item-preview{flex-basis:25%}.sky-file-item-content-custom{flex-basis:75%}.sky-file-item-preview-img-container{text-align:center}.sky-file-item-preview-img{max-width:100%;height:auto;box-shadow:0 0 5px #666}.sky-file-item-preview-other{color:#686c73;font-size:100px;line-height:1;text-align:center;width:100%}\n"], dependencies: [{ kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }] }); }
2831
2887
  }
2832
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxComponent, decorators: [{
2888
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileItemComponent, decorators: [{
2833
2889
  type: Component,
2834
- args: [{ selector: 'sky-input-box', providers: [
2835
- SkyContentInfoProvider,
2836
- SkyInputBoxAdapterService,
2837
- SkyInputBoxHostService,
2838
- {
2839
- provide: SKY_FORM_ERRORS_ENABLED,
2840
- useValue: true,
2841
- },
2842
- ], encapsulation: ViewEncapsulation.None, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div class=\"sky-form-group\">\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\" />\n <div class=\"sky-input-box-form-group-inner\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n @if (labelText) {\n <label\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n }\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n @if ((helpPopoverContent || helpKey) && labelText) {\n <sky-help-inline\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n }\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n @if (characterLimit !== undefined) {\n <sky-character-counter-indicator\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n }\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n @if (hostInputTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostInputTemplate\" />\n }\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n @if (hostButtonsLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsLeftTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n />\n @if (hostButtonsTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsTemplate\" />\n }\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n @if (hostButtonsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostButtonsInsetTemplate\" />\n }\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n @if (hostIconsInsetTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #iconsInsetLeftTemplate>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n @if (hostIconsInsetLeftTemplate) {\n <ng-container [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\" />\n }\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [touched]=\"controlDir?.touched\"\n [dirty]=\"controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n @if (hintText || hostHintText) {\n <div\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n }\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:initial}sky-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs)}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{z-index:4}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{margin-top:-23px;padding-top:26px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger);color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"] }]
2843
- }], propDecorators: { hasErrors: [{
2844
- type: Input
2845
- }], disabled: [{
2846
- type: Input
2847
- }], labelText: [{
2848
- type: Input
2849
- }], characterLimit: [{
2850
- type: Input
2851
- }], stacked: [{
2852
- type: Input
2853
- }], helpPopoverTitle: [{
2854
- type: Input
2855
- }], helpPopoverContent: [{
2856
- type: Input
2857
- }], helpKey: [{
2858
- type: Input
2859
- }], hintText: [{
2890
+ args: [{ imports: [SkyFileSizePipe, SkyFormsResourcesModule, SkyIconModule], selector: 'sky-file-item', standalone: true, template: "@if (fileItem) {\n <div class=\"sky-file-item sky-padding-even-default\">\n <div class=\"sky-file-item-title\">\n <div class=\"sky-file-item-name-container\">\n <div class=\"sky-file-item-name\">\n @if (isFile) {\n <strong>{{ fileName }}</strong>\n } @else {\n <strong>{{ url }}</strong>\n }\n </div>\n @if (isFile) {\n <div class=\"sky-file-item-size\">({{ fileSize | skyFileSize }})</div>\n }\n </div>\n <div class=\"sky-file-item-controls\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-default sky-file-item-btn-delete\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete'\n | skyLibResources: (isFile ? fileName : url)\n \"\n (click)=\"itemDelete()\"\n >\n <sky-icon icon=\"trash-o\" size=\"lg\" />\n </button>\n </div>\n </div>\n <div class=\"sky-file-item-content\">\n <div class=\"sky-file-item-preview\">\n @if (isImage) {\n <div class=\"sky-file-item-preview-img-container\">\n <img\n class=\"sky-file-item-preview-img\"\n [src]=\"url\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n />\n </div>\n } @else {\n <div class=\"sky-file-item-preview-other\">\n <sky-icon [icon]=\"icon\" />\n </div>\n }\n </div>\n <div class=\"sky-file-item-content-custom\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".sky-file-item{border-top:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;border-right:1px solid #e2e3e4;background-color:#eeeeef;margin-bottom:10px}.sky-file-item-name-container{flex:1 1 auto;overflow:hidden}.sky-file-item-controls{flex:0 1 auto;padding-left:15px}.sky-file-item-name{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis}.sky-file-item-title{margin-bottom:10px;display:flex}.sky-file-item-content{display:flex}.sky-file-item-preview{flex-basis:25%}.sky-file-item-content-custom{flex-basis:75%}.sky-file-item-preview-img-container{text-align:center}.sky-file-item-preview-img{max-width:100%;height:auto;box-shadow:0 0 5px #666}.sky-file-item-preview-other{color:#686c73;font-size:100px;line-height:1;text-align:center;width:100%}\n"] }]
2891
+ }], ctorParameters: () => [{ type: i0.KeyValueDiffers }, { type: SkyFileItemService }], propDecorators: { fileItem: [{
2860
2892
  type: Input
2861
- }], cssClass: [{
2862
- type: HostBinding,
2863
- args: ['class']
2864
- }], formControl: [{
2865
- type: ContentChild,
2866
- args: [FormControlDirective]
2867
- }], formControlByName: [{
2868
- type: ContentChild,
2869
- args: [FormControlName]
2870
- }], ngModel: [{
2871
- type: ContentChild,
2872
- args: [NgModel]
2873
- }], inputRef: [{
2874
- type: ContentChild,
2875
- args: [SkyInputBoxControlDirective, {
2876
- read: ElementRef,
2877
- }]
2893
+ }], deleteFile: [{
2894
+ type: Output
2878
2895
  }] } });
2879
2896
 
2880
- class SkyInputBoxModule {
2881
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2882
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, declarations: [SkyInputBoxComponent], imports: [CommonModule,
2883
- SkyCharacterCounterModule,
2884
- SkyFormErrorsModule,
2885
- SkyFormErrorModule,
2886
- SkyFormsResourcesModule,
2887
- SkyHelpInlineModule,
2888
- SkyInputBoxControlDirective,
2889
- SkyInputBoxHintTextPipe,
2890
- SkyThemeModule], exports: [SkyInputBoxHintTextPipe,
2891
- SkyInputBoxComponent,
2892
- SkyInputBoxControlDirective,
2893
- SkyFormErrorModule] }); }
2894
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, imports: [CommonModule,
2895
- SkyCharacterCounterModule,
2896
- SkyFormErrorsModule,
2897
- SkyFormErrorModule,
2898
- SkyFormsResourcesModule,
2899
- SkyHelpInlineModule,
2900
- SkyThemeModule, SkyFormErrorModule] }); }
2897
+ class SkyFileDropModule {
2898
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2899
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent], exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
2900
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
2901
2901
  }
2902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyInputBoxModule, decorators: [{
2902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileDropModule, decorators: [{
2903
2903
  type: NgModule,
2904
2904
  args: [{
2905
- declarations: [SkyInputBoxComponent],
2906
- imports: [
2907
- CommonModule,
2908
- SkyCharacterCounterModule,
2909
- SkyFormErrorsModule,
2910
- SkyFormErrorModule,
2911
- SkyFormsResourcesModule,
2912
- SkyHelpInlineModule,
2913
- SkyInputBoxControlDirective,
2914
- SkyInputBoxHintTextPipe,
2915
- SkyThemeModule,
2916
- ],
2917
- exports: [
2918
- SkyInputBoxHintTextPipe,
2919
- SkyInputBoxComponent,
2920
- SkyInputBoxControlDirective,
2921
- SkyFormErrorModule,
2922
- ],
2905
+ exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule],
2906
+ imports: [SkyFileDropComponent, SkyFileItemComponent],
2907
+ }]
2908
+ }] });
2909
+
2910
+ /**
2911
+ * @deprecated Import either `SkyFileAttachmentModule` or `SkyFileDropModule`.
2912
+ */
2913
+ class SkyFileAttachmentsModule {
2914
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2915
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule], exports: [SkyFileAttachmentModule, SkyFileDropModule] }); }
2916
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule, SkyFileAttachmentModule, SkyFileDropModule] }); }
2917
+ }
2918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyFileAttachmentsModule, decorators: [{
2919
+ type: NgModule,
2920
+ args: [{
2921
+ exports: [SkyFileAttachmentModule, SkyFileDropModule],
2922
+ imports: [SkyFileAttachmentModule, SkyFileDropModule],
2923
2923
  }]
2924
2924
  }] });
2925
2925
 
@@ -3626,14 +3626,14 @@ class SkyRadioGroupComponent {
3626
3626
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: SkyRadioGroupComponent, selector: "sky-radio-group", inputs: { ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", disabled: ["disabled", "disabled", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute], headingStyle: ["headingStyle", "headingStyle", numberAttribute4], name: "name", required: ["required", "required", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], value: "value", tabIndex: "tabIndex", headingText: "headingText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], hintText: "hintText", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stackedLg", "class.sky-margin-stacked-xl": "this.stackedXL" } }, providers: [
3627
3627
  SkyRadioGroupIdService,
3628
3628
  { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
3629
- ], queries: [{ propertyName: "radios", predicate: SkyRadioComponent, descendants: true }], ngImport: i0, template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n <span class=\"sky-radio-group-label-wrapper\">\n @if (headingText) {\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-sm': !hintText,\n 'sky-control-label-required': isRequired,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n @if (headingLevel === 3) {\n <h3 [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n } @else if (headingLevel === 4) {\n <h4 [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n } @else if (headingLevel === 5) {\n <h5 [class]=\"headingClass\">\n {{ headingText }}\n </h5>\n } @else {\n <span [class]=\"'sky-radio-group-heading-text ' + headingClass\">\n {{ headingText }}\n </span>\n }\n </legend>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n }\n </span>\n\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-radio-group-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"headingText\"\n [touched]=\"ngControl?.touched\"\n [dirty]=\"ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}.sky-radio-group-hint-text{margin-bottom:var(--sky-margin-stacked-lg)}.sky-radio-group-label-wrapper{display:flex}legend h3,legend h4,legend h5{margin:0;display:inline-block}legend span{line-height:1.1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
3629
+ ], queries: [{ propertyName: "radios", predicate: SkyRadioComponent, descendants: true }], ngImport: i0, template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n @if (headingText) {\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >\n @switch (headingLevel) {\n @case (3) {\n <h3 [class]=\"headingClass\">{{ headingText }}</h3>\n }\n @case (4) {\n <h4 [class]=\"headingClass\">{{ headingText }}</h4>\n }\n @case (5) {\n <h5 [class]=\"headingClass\">{{ headingText }}</h5>\n }\n @default {\n <span [class]=\"'sky-radio-group-heading-text ' + headingClass\">{{\n headingText\n }}</span>\n }\n }\n </span>\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_form_group_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div\n class=\"sky-font-deemphasized sky-radio-group-hint-text sky-margin-stacked-lg\"\n >\n {{ hintText }}\n </div>\n }\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"headingText\"\n [touched]=\"ngControl?.touched\"\n [dirty]=\"ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}legend h3,legend h4,legend h5{margin:0;display:inline-block}legend span{line-height:1.1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "touched", "dirty"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1$3.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
3630
3630
  }
3631
3631
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SkyRadioGroupComponent, decorators: [{
3632
3632
  type: Component,
3633
3633
  args: [{ selector: 'sky-radio-group', providers: [
3634
3634
  SkyRadioGroupIdService,
3635
3635
  { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
3636
- ], template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n <span class=\"sky-radio-group-label-wrapper\">\n @if (headingText) {\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-sm': !hintText,\n 'sky-control-label-required': isRequired,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n @if (headingLevel === 3) {\n <h3 [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n } @else if (headingLevel === 4) {\n <h4 [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n } @else if (headingLevel === 5) {\n <h5 [class]=\"headingClass\">\n {{ headingText }}\n </h5>\n } @else {\n <span [class]=\"'sky-radio-group-heading-text ' + headingClass\">\n {{ headingText }}\n </span>\n }\n </legend>\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n }\n </span>\n\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div class=\"sky-font-deemphasized sky-radio-group-hint-text\">\n {{ hintText }}\n </div>\n }\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"headingText\"\n [touched]=\"ngControl?.touched\"\n [dirty]=\"ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}.sky-radio-group-hint-text{margin-bottom:var(--sky-margin-stacked-lg)}.sky-radio-group-label-wrapper{display:flex}legend h3,legend h4,legend h5{margin:0;display:inline-block}legend span{line-height:1.1}\n"] }]
3636
+ ], template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n @if (headingText) {\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >\n @switch (headingLevel) {\n @case (3) {\n <h3 [class]=\"headingClass\">{{ headingText }}</h3>\n }\n @case (4) {\n <h4 [class]=\"headingClass\">{{ headingText }}</h4>\n }\n @case (5) {\n <h5 [class]=\"headingClass\">{{ headingText }}</h5>\n }\n @default {\n <span [class]=\"'sky-radio-group-heading-text ' + headingClass\">{{\n headingText\n }}</span>\n }\n }\n </span>\n @if (required) {\n <span class=\"sky-screen-reader-only\">{{\n 'skyux_form_group_required' | skyLibResources\n }}</span>\n }\n @if (helpPopoverContent || helpKey) {\n <sky-help-inline\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n }\n </legend>\n }\n <div #hintTextEl=\"skyId\" skyId>\n @if (hintText) {\n <div\n class=\"sky-font-deemphasized sky-radio-group-hint-text sky-margin-stacked-lg\"\n >\n {{ hintText }}\n </div>\n }\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"headingText\"\n [touched]=\"ngControl?.touched\"\n [dirty]=\"ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}legend h3,legend h4,legend h5{margin:0;display:inline-block}legend span{line-height:1.1}\n"] }]
3637
3637
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyRadioGroupIdService }, { type: i2.NgControl, decorators: [{
3638
3638
  type: Self
3639
3639
  }, {