@getflip/swirl-components 0.389.0 → 0.390.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.
Files changed (58) hide show
  1. package/components.json +161 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-color-input.cjs.entry.js +2 -2
  4. package/dist/cjs/swirl-components.cjs.js +1 -1
  5. package/dist/cjs/swirl-date-input.cjs.entry.js +17 -8
  6. package/dist/cjs/swirl-form-control.cjs.entry.js +16 -2
  7. package/dist/cjs/swirl-resource-list-section.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-separator.cjs.entry.js +5 -1
  9. package/dist/cjs/swirl-text-input.cjs.entry.js +4 -4
  10. package/dist/cjs/swirl-time-input.cjs.entry.js +1 -1
  11. package/dist/collection/components/swirl-color-input/swirl-color-input.js +21 -2
  12. package/dist/collection/components/swirl-date-input/swirl-date-input.js +37 -9
  13. package/dist/collection/components/swirl-form-control/swirl-form-control.css +6 -16
  14. package/dist/collection/components/swirl-form-control/swirl-form-control.js +36 -1
  15. package/dist/collection/components/swirl-resource-list-section/swirl-resource-list-section.js +1 -1
  16. package/dist/collection/components/swirl-separator/swirl-separator.js +31 -1
  17. package/dist/collection/components/swirl-text-input/swirl-text-input.css +1 -5
  18. package/dist/collection/components/swirl-text-input/swirl-text-input.js +22 -3
  19. package/dist/collection/components/swirl-time-input/swirl-time-input.js +20 -1
  20. package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
  21. package/dist/components/swirl-color-input.js +4 -3
  22. package/dist/components/swirl-date-input.js +19 -9
  23. package/dist/components/swirl-form-control.js +18 -2
  24. package/dist/components/swirl-resource-list-section.js +1 -1
  25. package/dist/components/swirl-separator2.js +6 -1
  26. package/dist/components/swirl-text-input2.js +5 -4
  27. package/dist/components/swirl-time-input.js +2 -1
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/swirl-color-input.entry.js +2 -2
  30. package/dist/esm/swirl-components.js +1 -1
  31. package/dist/esm/swirl-date-input.entry.js +17 -8
  32. package/dist/esm/swirl-form-control.entry.js +16 -2
  33. package/dist/esm/swirl-resource-list-section.entry.js +1 -1
  34. package/dist/esm/swirl-separator.entry.js +5 -1
  35. package/dist/esm/swirl-text-input.entry.js +4 -4
  36. package/dist/esm/swirl-time-input.entry.js +1 -1
  37. package/dist/swirl-components/p-180ed63e.entry.js +1 -0
  38. package/dist/swirl-components/{p-a320aae9.entry.js → p-3cb7f345.entry.js} +1 -1
  39. package/dist/swirl-components/{p-87554dba.entry.js → p-57dfce0c.entry.js} +1 -1
  40. package/dist/swirl-components/p-81b2e380.entry.js +1 -0
  41. package/dist/swirl-components/p-81ee71b8.entry.js +1 -0
  42. package/dist/swirl-components/p-83cb302b.entry.js +1 -0
  43. package/dist/swirl-components/p-b243a736.entry.js +1 -0
  44. package/dist/swirl-components/swirl-components.esm.js +1 -1
  45. package/dist/types/components/swirl-color-input/swirl-color-input.d.ts +1 -0
  46. package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +3 -2
  47. package/dist/types/components/swirl-form-control/swirl-form-control.d.ts +2 -0
  48. package/dist/types/components/swirl-separator/swirl-separator.d.ts +2 -0
  49. package/dist/types/components/swirl-text-input/swirl-text-input.d.ts +1 -0
  50. package/dist/types/components/swirl-time-input/swirl-time-input.d.ts +1 -0
  51. package/dist/types/components.d.ts +20 -2
  52. package/package.json +1 -1
  53. package/vscode-data.json +32 -0
  54. package/dist/swirl-components/p-5dd8a1b1.entry.js +0 -1
  55. package/dist/swirl-components/p-5f5034b5.entry.js +0 -1
  56. package/dist/swirl-components/p-90243eec.entry.js +0 -1
  57. package/dist/swirl-components/p-d17cd35b.entry.js +0 -1
  58. package/dist/swirl-components/p-fc54fadf.entry.js +0 -1
@@ -5,6 +5,7 @@ export class SwirlSeparator {
5
5
  this.borderColor = "default";
6
6
  this.color = "default";
7
7
  this.orientation = "horizontal";
8
+ this.semantics = "separator";
8
9
  this.spacing = "8";
9
10
  }
10
11
  componentWillLoad() {
@@ -27,7 +28,10 @@ export class SwirlSeparator {
27
28
  paddingLeft: `var(--s-space-${this.spacing})`,
28
29
  };
29
30
  const className = classnames("separator", `separator--color-${this.color}`, `separator--orientation-${this.orientation}`);
30
- return (h(Host, { key: '17b01a0eecb1f97564885965da64a90967730e14', "aria-orientation": this.orientation, class: className, role: "separator", style: styles }, h("span", { key: 'e9f7f71c5da01191f232455e8f5e6d9c39131a24', class: "separator__line" }), this.label && (h(Fragment, { key: '1f9f5c1d0b16766ed8677d7657946c335a5ab8ac' }, h("span", { key: 'ae1e1cc3149d5f0be42ea4be999cfda0fcfb6def', class: "separator__label" }, this.label), h("span", { key: '029ca069ba60923d67310941f464a92212e4fbd5', class: "separator__line" })))));
31
+ const attributes = this.semantics === "separator"
32
+ ? { "aria-orientation": this.orientation }
33
+ : {};
34
+ return (h(Host, { key: '23acb3a29638b92737838e75a54d7616e6c9150e', ...attributes, class: className, role: this.semantics, style: styles }, h("span", { key: '3ebf80f47fb36438403551f560db91ecf7d7e559', class: "separator__line" }), this.label && (h(Fragment, { key: '84ac7960ba714ab27559751c11bd7c4b56ac3176' }, h("span", { key: '6f8dc3ad3bde938789e28ad05c67da657262a4d1', class: "separator__label" }, this.label), h("span", { key: '63ddb77ea887a890bb1731d12a939783b592e21a', class: "separator__line" })))));
31
35
  }
32
36
  static get is() { return "swirl-separator"; }
33
37
  static get encapsulation() { return "shadow"; }
@@ -140,6 +144,32 @@ export class SwirlSeparator {
140
144
  "reflect": false,
141
145
  "defaultValue": "\"horizontal\""
142
146
  },
147
+ "semantics": {
148
+ "type": "string",
149
+ "attribute": "semantics",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "SwirlSeparatorSemantics",
153
+ "resolved": "\"none\" | \"separator\"",
154
+ "references": {
155
+ "SwirlSeparatorSemantics": {
156
+ "location": "local",
157
+ "path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-separator/swirl-separator.tsx",
158
+ "id": "src/components/swirl-separator/swirl-separator.tsx::SwirlSeparatorSemantics"
159
+ }
160
+ }
161
+ },
162
+ "required": false,
163
+ "optional": true,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": ""
167
+ },
168
+ "getter": false,
169
+ "setter": false,
170
+ "reflect": false,
171
+ "defaultValue": "\"separator\""
172
+ },
143
173
  "spacing": {
144
174
  "type": "string",
145
175
  "attribute": "spacing",
@@ -32,10 +32,6 @@
32
32
  width: 100%;
33
33
  }
34
34
 
35
- .text-input--disabled .text-input__character-counter {
36
- color: var(--s-text-disabled);
37
- }
38
-
39
35
  .text-input--font-size-sm {
40
36
  font-size: var(--s-font-size-sm);
41
37
  line-height: var(--s-line-height-sm);
@@ -146,7 +142,7 @@
146
142
  }
147
143
 
148
144
  .text-input__input:disabled {
149
- color: var(--s-text-disabled);
145
+ color: var(--s-text-subdued);
150
146
  background-color: transparent;
151
147
  }
152
148
 
@@ -133,10 +133,11 @@ export class SwirlTextInput {
133
133
  const ariaInvalid = this.invalid === true || this.invalid === false
134
134
  ? String(this.invalid)
135
135
  : undefined;
136
- const showStepper = this.type === "number" && !this.disabled;
136
+ const showStepper = this.type === "number" && !this.disabled && !this.readonly;
137
137
  const showPasswordToggle = this.type === "password" && !this.disabled;
138
138
  const showClearButton = this.clearable &&
139
139
  !this.disabled &&
140
+ !this.readonly &&
140
141
  Boolean(this.value) &&
141
142
  !showPasswordToggle &&
142
143
  !showStepper &&
@@ -145,13 +146,12 @@ export class SwirlTextInput {
145
146
  const className = classnames("text-input", `text-input--font-size-${this.fontSize}`, `text-input--type-${this.type}`, {
146
147
  "text-input--auto-grow": this.autoGrow,
147
148
  "text-input--clearable": this.clearable,
148
- "text-input--disabled": this.disabled,
149
149
  "text-input--disable-dynamic-width": this.disableDynamicWidth || Boolean(this.placeholder),
150
150
  "text-input--has-suffix": Boolean(this.suffixLabel),
151
151
  "text-input--inline": this.inline,
152
152
  "text-input--show-password": this.type === "password" && this.showPassword,
153
153
  });
154
- return (h(Host, { key: '118c43993df15e8a56132135bd6e5bd7b20c7fa5' }, h("div", { key: 'b32019d666499025e823f65c84107090b3e0bdde', class: className }, this.prefixLabel && (h("span", { key: 'e92f359d218821987e795d91ba09de0a5ac83787', class: "text-input__prefix" }, this.prefixLabel)), h(Tag, { key: '311c606dc2c9b78965d35543c79c828bbf04939d', "aria-autocomplete": this.swirlAriaAutocomplete, "aria-controls": this.swirlAriaControls, "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-expanded": this.swirlAriaExpanded, "aria-invalid": ariaInvalid, autoComplete: this.autoComplete, autoFocus: this.autoFocus, class: "text-input__input", disabled: this.disabled, inputMode: this.mode, maxLength: this.maxLength, max: this.type === "number" ? this.max : undefined, min: this.type === "number" ? this.min : undefined, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyPress: this.onKeyPress, placeholder: !Boolean(this.suffixLabel) ? this.placeholder : undefined, ref: (el) => (this.inputEl = el), required: this.required, role: this.swirlRole, name: this.inputName, rows: this.rows > 1 ? this.rows : this.autoGrow ? 1 : undefined, spellcheck: this.spellCheck, step: this.type === "number" ? this.step : undefined, type: type, value: this.value }, this.rows > 1 && this.value), this.suffixLabel && (h("span", { key: '2e2987f816f1a26b074ca67fc67d2b88031af88e', class: "text-input__suffix" }, this.suffixLabel)), showClearButton && (h("button", { key: '82218c372d0374651f5cb3a07a679c5f045dabfc', "aria-label": this.clearButtonLabel, class: "text-input__clear-button", onClick: this.clear, part: "text-input__clear-button", type: "button" }, h("swirl-icon-cancel", { key: '9c42c315b34e9a614a145d2e8a00da2b28fcc21e', size: this.iconSize }))), showPasswordToggle && (h("button", { key: 'd78dcd286ba441a8d5df0a9d9e8b02c466dab617', "aria-label": this.passwordToggleLabel, class: "text-input__password-toggle", onClick: this.togglePassword, type: "button" }, this.showPassword ? (h("swirl-icon-visibility-off", { size: this.iconSize })) : (h("swirl-icon-visibility", { size: this.iconSize })))), showStepper && (h("span", { key: 'e29c6cb14c6bb8ff7ebf67800b2b267ca0208df9', class: "text-input__stepper" }, h("button", { key: '6218def82164fd3b57015d3fb8c40391cefcf84d', "aria-hidden": "true", class: "text-input__step-button", onClick: this.increaseValue, tabIndex: -1, type: "button" }, h("swirl-icon-expand-less", { key: '9b338df89a94563b9f9fde0ba16cb1fae537c203', size: this.iconSize })), h("button", { key: '6d31cb2c37f9a2887c57f2350afe184a76dd09f8', "aria-hidden": "true", class: "text-input__step-button", onClick: this.decreaseValue, tabIndex: -1, type: "button" }, h("swirl-icon-expand-more", { key: 'f2b7974999012a8ad29d84dd5df8a908605f57b4', size: this.iconSize })))), this.showCharacterCounter && (h("span", { key: '4dae89e8b35db216b513bbca04dff56c48b64696', class: "text-input__character-counter", "aria-live": "polite" }, h("swirl-visually-hidden", { key: 'c48b6c6017b6b2a8524a2f3f5e9d2d8869026b3f' }, this.characterCounterLabel), this.value?.length || 0, " ", Boolean(this.maxLength) ? `/ ${this.maxLength}` : "")))));
154
+ return (h(Host, { key: '47932ba64512368fef5948a2560afdf722ae106c' }, h("div", { key: '089210f7581a26934fa1851899e1b279c96a4f55', class: className }, this.prefixLabel && (h("span", { key: '7d77cb2af315fe8909fa92f7ea328e4970c853fb', class: "text-input__prefix" }, this.prefixLabel)), h(Tag, { key: '1c73d0168a7ca0e7380b665c0e398b3dfb8be35b', "aria-autocomplete": this.swirlAriaAutocomplete, "aria-controls": this.swirlAriaControls, "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-expanded": this.swirlAriaExpanded, "aria-invalid": ariaInvalid, autoComplete: this.autoComplete, autoFocus: this.autoFocus, class: "text-input__input", disabled: this.disabled, inputMode: this.mode, maxLength: this.maxLength, max: this.type === "number" ? this.max : undefined, min: this.type === "number" ? this.min : undefined, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyPress: this.onKeyPress, placeholder: !Boolean(this.suffixLabel) ? this.placeholder : undefined, ref: (el) => (this.inputEl = el), required: this.required, role: this.swirlRole, name: this.inputName, rows: this.rows > 1 ? this.rows : this.autoGrow ? 1 : undefined, spellcheck: this.spellCheck, step: this.type === "number" ? this.step : undefined, type: type, value: this.value, readonly: this.readonly }, this.rows > 1 && this.value), this.suffixLabel && (h("span", { key: '2ae0f456126a27f0256b5dfd851da830ea379018', class: "text-input__suffix" }, this.suffixLabel)), showClearButton && (h("button", { key: 'ea47c05178f0ce61188ca8ed15f3bbe6f132b1dc', "aria-label": this.clearButtonLabel, class: "text-input__clear-button", onClick: this.clear, part: "text-input__clear-button", type: "button" }, h("swirl-icon-cancel", { key: 'd419f462f82b28bc6c8602f3d4cf65d2649d0234', size: this.iconSize }))), showPasswordToggle && (h("button", { key: '565f3c92ef3fd90d1d43c673b94feec9bcf213cf', "aria-label": this.passwordToggleLabel, class: "text-input__password-toggle", onClick: this.togglePassword, type: "button" }, this.showPassword ? (h("swirl-icon-visibility-off", { size: this.iconSize })) : (h("swirl-icon-visibility", { size: this.iconSize })))), showStepper && (h("span", { key: 'ec02752a5258a06827fc156fd4b4cd5a0e712751', class: "text-input__stepper" }, h("button", { key: 'c698d2fda7bf64b338920410ef0c894955cf6372', "aria-hidden": "true", class: "text-input__step-button", onClick: this.increaseValue, tabIndex: -1, type: "button" }, h("swirl-icon-expand-less", { key: '0f662dd62d1a315d288622a31e4f0dfb0ee530e0', size: this.iconSize })), h("button", { key: '49fc4ece3d4b67e3b6fa38ecdb681edf5e2e0791', "aria-hidden": "true", class: "text-input__step-button", onClick: this.decreaseValue, tabIndex: -1, type: "button" }, h("swirl-icon-expand-more", { key: '49de410032a3f513ba78e7f6a986645441db80eb', size: this.iconSize })))), this.showCharacterCounter && (h("span", { key: 'cc12de838a87f683af5ab14009cedcd1f98b39bb', class: "text-input__character-counter", "aria-live": "polite" }, h("swirl-visually-hidden", { key: '8df695b8970b8f35d7b119bff1cfe573c427f1e6' }, this.characterCounterLabel), this.value?.length || 0, " ", Boolean(this.maxLength) ? `/ ${this.maxLength}` : "")))));
155
155
  }
156
156
  static get is() { return "swirl-text-input"; }
157
157
  static get encapsulation() { return "scoped"; }
@@ -818,6 +818,25 @@ export class SwirlTextInput {
818
818
  "getter": false,
819
819
  "setter": false,
820
820
  "reflect": true
821
+ },
822
+ "readonly": {
823
+ "type": "boolean",
824
+ "attribute": "readonly",
825
+ "mutable": false,
826
+ "complexType": {
827
+ "original": "boolean",
828
+ "resolved": "boolean",
829
+ "references": {}
830
+ },
831
+ "required": false,
832
+ "optional": true,
833
+ "docs": {
834
+ "tags": [],
835
+ "text": ""
836
+ },
837
+ "getter": false,
838
+ "setter": false,
839
+ "reflect": false
821
840
  }
822
841
  };
823
842
  }
@@ -136,7 +136,7 @@ export class SwirlTimeInput {
136
136
  const className = classnames("time-input", {
137
137
  "time-input--inline": this.inline,
138
138
  });
139
- return (h(Host, { key: 'ae938e34b6749f2d8769188b03ba397f48053c7c' }, h("div", { key: '820bb9a8af14ec2e0566610cdc7acf685ebaab49', class: className }, h("input", { key: '01f30edbb831a35124af67a6a9632b8177f30d17', "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "time-input__input", disabled: this.disabled, id: this.id, inputmode: "numeric", onBlur: this.onBlur, onClick: this.onClick, onFocus: this.onFocus, placeholder: this.placeholder, ref: (el) => (this.inputEl = el), required: this.required, type: "text" }), h("span", { key: '8e239ac224665ffcd26ec4f2ef3786394ae21bbb', class: "time-input__icon" }, h("swirl-icon-time-outlined", { key: 'a23c7d2781e37cd572778bab9bca884d7800fbf6', size: this.iconSize })))));
139
+ return (h(Host, { key: 'e23b038bf99ddfd9893ff2b2cc2981ee7de0fbda' }, h("div", { key: '26b6cbb9a67cfb986bae34b2ff604862992f7076', class: className }, h("input", { key: 'd5123ad3101a1c0571e491d91c5916fba51aabe9', "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "time-input__input", disabled: this.disabled, id: this.id, inputmode: "numeric", onBlur: this.onBlur, onClick: this.onClick, onFocus: this.onFocus, placeholder: this.placeholder, ref: (el) => (this.inputEl = el), required: this.required, type: "text", readonly: this.readonly }), h("span", { key: 'd53e9ea53813798aa0cdd2ce7f6f685053859862', class: "time-input__icon" }, h("swirl-icon-time-outlined", { key: '61e91a6ae302b0b64d4283525f02b97bad37e9ad', size: this.iconSize })))));
140
140
  }
141
141
  static get is() { return "swirl-time-input"; }
142
142
  static get encapsulation() { return "scoped"; }
@@ -343,6 +343,25 @@ export class SwirlTimeInput {
343
343
  "getter": false,
344
344
  "setter": false,
345
345
  "reflect": true
346
+ },
347
+ "readonly": {
348
+ "type": "boolean",
349
+ "attribute": "readonly",
350
+ "mutable": false,
351
+ "complexType": {
352
+ "original": "boolean",
353
+ "resolved": "boolean",
354
+ "references": {}
355
+ },
356
+ "required": false,
357
+ "optional": true,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": ""
361
+ },
362
+ "getter": false,
363
+ "setter": false,
364
+ "reflect": false
346
365
  }
347
366
  };
348
367
  }