@getflip/swirl-components 0.389.1 → 0.391.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +123 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-avatar.cjs.entry.js +2 -2
- package/dist/cjs/swirl-color-input.cjs.entry.js +2 -2
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-date-input.cjs.entry.js +17 -8
- package/dist/cjs/swirl-form-control.cjs.entry.js +16 -2
- package/dist/cjs/swirl-text-input.cjs.entry.js +4 -4
- package/dist/cjs/swirl-time-input.cjs.entry.js +1 -1
- package/dist/collection/components/swirl-avatar/swirl-avatar.css +5 -0
- package/dist/collection/components/swirl-avatar/swirl-avatar.js +2 -2
- package/dist/collection/components/swirl-color-input/swirl-color-input.js +21 -2
- package/dist/collection/components/swirl-date-input/swirl-date-input.js +37 -9
- package/dist/collection/components/swirl-form-control/swirl-form-control.css +6 -16
- package/dist/collection/components/swirl-form-control/swirl-form-control.js +36 -1
- package/dist/collection/components/swirl-text-input/swirl-text-input.css +1 -5
- package/dist/collection/components/swirl-text-input/swirl-text-input.js +22 -3
- package/dist/collection/components/swirl-time-input/swirl-time-input.js +20 -1
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -4
- package/dist/components/swirl-avatar.js +2 -2
- package/dist/components/swirl-color-input.js +4 -3
- package/dist/components/swirl-date-input.js +19 -9
- package/dist/components/swirl-form-control.js +18 -2
- package/dist/components/swirl-text-input2.js +5 -4
- package/dist/components/swirl-time-input.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-avatar.entry.js +2 -2
- package/dist/esm/swirl-color-input.entry.js +2 -2
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-date-input.entry.js +17 -8
- package/dist/esm/swirl-form-control.entry.js +16 -2
- package/dist/esm/swirl-text-input.entry.js +4 -4
- package/dist/esm/swirl-time-input.entry.js +1 -1
- package/dist/swirl-components/p-180ed63e.entry.js +1 -0
- package/dist/swirl-components/{p-a320aae9.entry.js → p-3cb7f345.entry.js} +1 -1
- package/dist/swirl-components/{p-87554dba.entry.js → p-57dfce0c.entry.js} +1 -1
- package/dist/swirl-components/p-81b2e380.entry.js +1 -0
- package/dist/swirl-components/p-81ee71b8.entry.js +1 -0
- package/dist/swirl-components/{p-e7744a13.entry.js → p-d1fa14ba.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-avatar/swirl-avatar.d.ts +1 -1
- package/dist/types/components/swirl-color-input/swirl-color-input.d.ts +1 -0
- package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +3 -2
- package/dist/types/components/swirl-form-control/swirl-form-control.d.ts +2 -0
- package/dist/types/components/swirl-text-input/swirl-text-input.d.ts +1 -0
- package/dist/types/components/swirl-time-input/swirl-time-input.d.ts +1 -0
- package/dist/types/components.d.ts +10 -0
- package/package.json +1 -1
- package/vscode-data.json +23 -0
- package/dist/swirl-components/p-5dd8a1b1.entry.js +0 -1
- package/dist/swirl-components/p-90243eec.entry.js +0 -1
- package/dist/swirl-components/p-d17cd35b.entry.js +0 -1
|
@@ -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: '
|
|
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: '
|
|
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
|
}
|