@getflip/swirl-components 0.96.2 → 0.97.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.
@@ -70,6 +70,7 @@
70
70
  display: block;
71
71
  margin-top: var(--s-space-4);
72
72
  margin-bottom: var(--s-space-8);
73
+ color: var(--s-text-subdued);
73
74
  font-size: var(--s-font-size-sm);
74
75
  line-height: var(--s-line-height-sm);
75
76
  }
@@ -19,7 +19,9 @@ export class SwirlFileUploader {
19
19
  this.label = undefined;
20
20
  this.multiple = undefined;
21
21
  this.showDropzone = true;
22
+ this.uploadButtonIcon = undefined;
22
23
  this.uploadButtonLabel = "Select file";
24
+ this.uploadButtonVariant = "flat";
23
25
  }
24
26
  /**
25
27
  * Reset the file input.
@@ -39,7 +41,7 @@ export class SwirlFileUploader {
39
41
  return (h(Host, null, h("div", { class: className }, h("label", { class: "file-uploader__label", htmlFor: this.inputId, id: `${this.inputEl}-label` }, this.label), this.description && (h("span", { class: "file-uploader__description", id: `${this.inputId}-description` }, this.description)), h("div", { class: "file-uploader__dropzone" }, this.showDropzone ? ([
40
42
  h("swirl-icon-cloud-upload", { class: "file-uploader__dropzone-icon" }),
41
43
  h("div", { class: "file-uploader__dropzone-label", id: `${this.inputId}-additional-label` }, h("span", { class: "file-uploader__dropzone-cta" }, this.ctaLabel), " ", h("span", { class: "file-uploader__drag-drop-label" }, this.dragDropLabel)),
42
- ]) : (h("swirl-button", { class: "file-uploader__upload-button", disabled: this.disabled, swirlAriaDescribedby: ariaDescribedby, intent: "primary", label: this.uploadButtonLabel, onClick: this.onUploadButtonClick, variant: "flat" })), h("input", { accept: this.accept, "aria-describedby": ariaDescribedby, "aria-disabled": this.disabled, autoComplete: "off", class: "file-uploader__input", disabled: this.disabled, id: this.inputId, multiple: this.multiple, name: this.inputName, onChange: this.onChange, ref: (el) => (this.inputEl = el), tabIndex: tabIndex, type: "file" })))));
44
+ ]) : (h("swirl-button", { class: "file-uploader__upload-button", disabled: this.disabled, icon: this.uploadButtonIcon, intent: "primary", label: this.uploadButtonLabel, onClick: this.onUploadButtonClick, swirlAriaDescribedby: ariaDescribedby, variant: this.uploadButtonVariant })), h("input", { accept: this.accept, "aria-describedby": ariaDescribedby, "aria-disabled": this.disabled, autoComplete: "off", class: "file-uploader__input", disabled: this.disabled, id: this.inputId, multiple: this.multiple, name: this.inputName, onChange: this.onChange, ref: (el) => (this.inputEl = el), tabIndex: tabIndex, type: "file" })))));
43
45
  }
44
46
  static get is() { return "swirl-file-uploader"; }
45
47
  static get encapsulation() { return "scoped"; }
@@ -228,6 +230,23 @@ export class SwirlFileUploader {
228
230
  "reflect": false,
229
231
  "defaultValue": "true"
230
232
  },
233
+ "uploadButtonIcon": {
234
+ "type": "string",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "string",
238
+ "resolved": "string",
239
+ "references": {}
240
+ },
241
+ "required": false,
242
+ "optional": true,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": ""
246
+ },
247
+ "attribute": "upload-button-icon",
248
+ "reflect": false
249
+ },
231
250
  "uploadButtonLabel": {
232
251
  "type": "string",
233
252
  "mutable": false,
@@ -245,6 +264,29 @@ export class SwirlFileUploader {
245
264
  "attribute": "upload-button-label",
246
265
  "reflect": false,
247
266
  "defaultValue": "\"Select file\""
267
+ },
268
+ "uploadButtonVariant": {
269
+ "type": "string",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "SwirlButtonVariant",
273
+ "resolved": "\"flat\" | \"floating\" | \"ghost\" | \"on-image\" | \"outline\" | \"plain\"",
274
+ "references": {
275
+ "SwirlButtonVariant": {
276
+ "location": "import",
277
+ "path": "../swirl-button/swirl-button"
278
+ }
279
+ }
280
+ },
281
+ "required": false,
282
+ "optional": true,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": ""
286
+ },
287
+ "attribute": "upload-button-variant",
288
+ "reflect": false,
289
+ "defaultValue": "\"flat\""
248
290
  }
249
291
  };
250
292
  }