@getflip/swirl-components 0.56.0 → 0.57.1
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 +34 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-form-control.cjs.entry.js +3 -1
- package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
- package/dist/cjs/swirl-select.cjs.entry.js +2 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-form-control/swirl-form-control.css +14 -0
- package/dist/collection/components/swirl-form-control/swirl-form-control.js +19 -0
- package/dist/collection/components/swirl-modal/swirl-modal.css +9 -5
- package/dist/collection/components/swirl-select/swirl-select.js +20 -1
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-form-control.js +4 -1
- package/dist/components/swirl-modal.js +1 -1
- package/dist/components/swirl-select.js +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-form-control.entry.js +3 -1
- package/dist/esm/swirl-modal.entry.js +1 -1
- package/dist/esm/swirl-select.entry.js +2 -1
- package/dist/swirl-components/p-165f0d02.entry.js +10 -0
- package/dist/swirl-components/p-475b4d45.entry.js +1 -0
- package/dist/swirl-components/{p-4c3a5cda.entry.js → p-ec92d2e5.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-form-control/swirl-form-control.d.ts +1 -0
- package/dist/types/components/swirl-select/swirl-select.d.ts +1 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/vscode-data.json +8 -0
- package/dist/swirl-components/p-0511c7be.entry.js +0 -1
- package/dist/swirl-components/p-0de7d1ea.entry.js +0 -10
|
@@ -148,6 +148,20 @@
|
|
|
148
148
|
max-width: calc(100% - 6rem);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
.form-control--hide-label .form-control__label-text {
|
|
152
|
+
position: absolute;
|
|
153
|
+
display: inline;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
width: 1px;
|
|
156
|
+
height: 1px;
|
|
157
|
+
margin: -1px;
|
|
158
|
+
padding: 0;
|
|
159
|
+
border: 0;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
word-wrap: normal;
|
|
162
|
+
clip: rect(0, 0, 0, 0);
|
|
163
|
+
}
|
|
164
|
+
|
|
151
165
|
.form-control__label {
|
|
152
166
|
position: relative;
|
|
153
167
|
display: flex;
|
|
@@ -29,6 +29,7 @@ export class SwirlFormControl {
|
|
|
29
29
|
this.description = undefined;
|
|
30
30
|
this.disabled = undefined;
|
|
31
31
|
this.errorMessage = undefined;
|
|
32
|
+
this.hideLabel = undefined;
|
|
32
33
|
this.inline = undefined;
|
|
33
34
|
this.invalid = undefined;
|
|
34
35
|
this.label = undefined;
|
|
@@ -116,6 +117,7 @@ export class SwirlFormControl {
|
|
|
116
117
|
"form-control--has-focus": this.hasFocus,
|
|
117
118
|
"form-control--has-placeholder": hasPlaceholder,
|
|
118
119
|
"form-control--has-value": hasValue,
|
|
120
|
+
"form-control--hide-label": this.hideLabel,
|
|
119
121
|
"form-control--inline": this.inline,
|
|
120
122
|
"form-control--invalid": this.invalid,
|
|
121
123
|
"form-control--is-select": isSelect,
|
|
@@ -187,6 +189,23 @@ export class SwirlFormControl {
|
|
|
187
189
|
"attribute": "error-message",
|
|
188
190
|
"reflect": false
|
|
189
191
|
},
|
|
192
|
+
"hideLabel": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "boolean",
|
|
197
|
+
"resolved": "boolean",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": ""
|
|
205
|
+
},
|
|
206
|
+
"attribute": "hide-label",
|
|
207
|
+
"reflect": false
|
|
208
|
+
},
|
|
190
209
|
"inline": {
|
|
191
210
|
"type": "boolean",
|
|
192
211
|
"mutable": false,
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.modal--variant-drawer .modal__header {
|
|
114
|
-
padding-left: calc(var(--s-space-8) + 2.5rem + var(--s-space-8));
|
|
115
114
|
padding-right: var(--s-space-16);
|
|
115
|
+
padding-left: calc(var(--s-space-8) + 2.5rem + var(--s-space-8));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
@media (min-width: 768px) {
|
|
@@ -160,6 +160,13 @@
|
|
|
160
160
|
padding-top: var(--s-space-16);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
.modal--has-custom-footer .modal__custom-footer {
|
|
164
|
+
padding-top: var(--s-space-16);
|
|
165
|
+
padding-right: var(--s-space-24);
|
|
166
|
+
padding-bottom: var(--s-space-16);
|
|
167
|
+
padding-left: var(--s-space-24);
|
|
168
|
+
}
|
|
169
|
+
|
|
163
170
|
@media (min-width: 768px) {
|
|
164
171
|
.modal--scrolled .modal__header {
|
|
165
172
|
border-bottom-color: var(--s-border-default);
|
|
@@ -197,6 +204,7 @@
|
|
|
197
204
|
|
|
198
205
|
.modal__close-button {
|
|
199
206
|
position: absolute;
|
|
207
|
+
z-index: 1;
|
|
200
208
|
top: var(--s-space-8);
|
|
201
209
|
left: var(--s-space-8);
|
|
202
210
|
}
|
|
@@ -262,10 +270,6 @@
|
|
|
262
270
|
}
|
|
263
271
|
|
|
264
272
|
.modal__custom-footer {
|
|
265
|
-
padding-top: var(--s-space-16);
|
|
266
|
-
padding-right: var(--s-space-24);
|
|
267
|
-
padding-bottom: var(--s-space-16);
|
|
268
|
-
padding-left: var(--s-space-24);
|
|
269
273
|
flex-shrink: 0;
|
|
270
274
|
}
|
|
271
275
|
|
|
@@ -31,6 +31,7 @@ export class SwirlSelect {
|
|
|
31
31
|
this.label = undefined;
|
|
32
32
|
this.multiSelect = undefined;
|
|
33
33
|
this.required = undefined;
|
|
34
|
+
this.selectId = Math.round(Math.random() * 1000000).toString();
|
|
34
35
|
this.swirlAriaDescribedby = undefined;
|
|
35
36
|
this.value = undefined;
|
|
36
37
|
this.options = [];
|
|
@@ -62,7 +63,7 @@ export class SwirlSelect {
|
|
|
62
63
|
"select--disabled": this.disabled,
|
|
63
64
|
"select--inline": this.inline,
|
|
64
65
|
});
|
|
65
|
-
return (h(Host, { onKeyDown: this.onKeyDown }, h("div", { class: className }, h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, class: "select__label", disabled: this.disabled, id:
|
|
66
|
+
return (h(Host, { onKeyDown: this.onKeyDown }, h("div", { class: className }, h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, class: "select__label", disabled: this.disabled, id: `trigger-${this.selectId}`, readOnly: true, type: "text", value: label }), h("span", { class: "select__indicator" }, this.open ? (h("swirl-icon-expand-less", null)) : (h("swirl-icon-expand-more", null))), h("swirl-popover", { animation: "scale-in-y", class: "select__popover", enableFlip: false, label: this.label, offset: [16, -16], onPopoverClose: this.onClose, onPopoverOpen: this.onOpen, popoverId: `select-options-${this.selectId}`, ref: (el) => (this.popover = el), trigger: `trigger-${this.selectId}`, useContainerWidth: "swirl-form-control" }, h("swirl-option-list", { onValueChange: this.select, multiSelect: this.multiSelect, value: this.value }, h("slot", { onSlotchange: this.onSlotChange }))))));
|
|
66
67
|
}
|
|
67
68
|
static get is() { return "swirl-select"; }
|
|
68
69
|
static get encapsulation() { return "scoped"; }
|
|
@@ -180,6 +181,24 @@ export class SwirlSelect {
|
|
|
180
181
|
"attribute": "required",
|
|
181
182
|
"reflect": false
|
|
182
183
|
},
|
|
184
|
+
"selectId": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "string",
|
|
189
|
+
"resolved": "string",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": ""
|
|
197
|
+
},
|
|
198
|
+
"attribute": "select-id",
|
|
199
|
+
"reflect": false,
|
|
200
|
+
"defaultValue": "Math.round(Math.random() * 1000000).toString()"
|
|
201
|
+
},
|
|
183
202
|
"swirlAriaDescribedby": {
|
|
184
203
|
"type": "string",
|
|
185
204
|
"mutable": false,
|