@getflip/swirl-components 0.432.0 → 0.433.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 +1 -1
- package/dist/cjs/floating-ui.dom-C8bqk2dV.js +1624 -0
- package/dist/cjs/swirl-autocomplete.cjs.entry.js +4 -4
- package/dist/cjs/swirl-menu.cjs.entry.js +4 -4
- package/dist/cjs/swirl-popover_2.cjs.entry.js +6 -6
- package/dist/cjs/swirl-skeleton-box.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tooltip.cjs.entry.js +10 -10
- package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.css +1 -2
- package/dist/collection/components/swirl-tooltip/swirl-tooltip.js +3 -3
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/floating-ui.dom.js +1617 -0
- package/dist/components/swirl-autocomplete.js +4 -4
- package/dist/components/swirl-menu.js +4 -4
- package/dist/components/swirl-popover2.js +6 -6
- package/dist/components/swirl-skeleton-box2.js +1 -1
- package/dist/components/swirl-tooltip2.js +10 -10
- package/dist/esm/floating-ui.dom-CLsTbQHn.js +1617 -0
- package/dist/esm/swirl-autocomplete.entry.js +4 -4
- package/dist/esm/swirl-menu.entry.js +4 -4
- package/dist/esm/swirl-popover_2.entry.js +6 -6
- package/dist/esm/swirl-skeleton-box.entry.js +1 -1
- package/dist/esm/swirl-tooltip.entry.js +10 -10
- package/dist/swirl-components/p-13d33aa2.entry.js +1 -0
- package/dist/swirl-components/{p-f53180cb.entry.js → p-322f18d4.entry.js} +1 -1
- package/dist/swirl-components/p-52737e44.entry.js +1 -0
- package/dist/swirl-components/{p-35461505.entry.js → p-8d0be9c3.entry.js} +1 -1
- package/dist/swirl-components/p-CLsTbQHn.js +1 -0
- package/dist/swirl-components/{p-85371da0.entry.js → p-c8c1b0b2.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/floating-ui.dom.browser.min-PA1q-Uql.js +0 -12
- package/dist/components/floating-ui.dom.browser.min.js +0 -5
- package/dist/esm/floating-ui.dom.browser.min-BtsCuEVE.js +0 -5
- package/dist/swirl-components/p-5c638e8c.entry.js +0 -1
- package/dist/swirl-components/p-BtsCuEVE.js +0 -1
- package/dist/swirl-components/p-de985b44.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-31zRgX-7.js');
|
|
4
|
-
var
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-C8bqk2dV.js');
|
|
5
5
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
6
6
|
var utils = require('./utils-UfZG-xPD.js');
|
|
7
7
|
|
|
@@ -151,7 +151,7 @@ const SwirlAutocomplete = class {
|
|
|
151
151
|
if (this.disableAutoUpdate) {
|
|
152
152
|
this.disableAutoUpdate();
|
|
153
153
|
}
|
|
154
|
-
this.disableAutoUpdate =
|
|
154
|
+
this.disableAutoUpdate = floatingUi_dom.autoUpdate(this.inputEl, this.listboxContainerEl, this.reposition.bind(this), { animationFrame: true });
|
|
155
155
|
this.listboxContainerEl.scrollTop = 0;
|
|
156
156
|
this.updateSuggestions(this.inputEl.querySelector("input").value);
|
|
157
157
|
});
|
|
@@ -160,8 +160,8 @@ const SwirlAutocomplete = class {
|
|
|
160
160
|
if (!Boolean(this.listboxContainerEl)) {
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
this.position = await
|
|
164
|
-
middleware: [
|
|
163
|
+
this.position = await floatingUi_dom.computePosition(this.inputEl, this.listboxContainerEl, {
|
|
164
|
+
middleware: [floatingUi_dom.offset({ crossAxis: -16, mainAxis: 16 })],
|
|
165
165
|
placement: "bottom-start",
|
|
166
166
|
strategy: "fixed",
|
|
167
167
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-31zRgX-7.js');
|
|
4
|
-
var
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-C8bqk2dV.js');
|
|
5
5
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
6
6
|
var utils = require('./utils-UfZG-xPD.js');
|
|
7
7
|
|
|
@@ -58,10 +58,10 @@ const SwirlMenu = class {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
requestAnimationFrame(async () => {
|
|
61
|
-
this.position = await
|
|
61
|
+
this.position = await floatingUi_dom.computePosition(trigger, this.menuContainer, {
|
|
62
62
|
placement: "right-start",
|
|
63
63
|
strategy: "fixed",
|
|
64
|
-
middleware: [
|
|
64
|
+
middleware: [floatingUi_dom.offset({ mainAxis: -10, crossAxis: 0 }), floatingUi_dom.shift(), floatingUi_dom.flip()],
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
};
|
|
@@ -129,7 +129,7 @@ const SwirlMenu = class {
|
|
|
129
129
|
if (this.disableAutoUpdate) {
|
|
130
130
|
this.disableAutoUpdate();
|
|
131
131
|
}
|
|
132
|
-
this.disableAutoUpdate =
|
|
132
|
+
this.disableAutoUpdate = floatingUi_dom.autoUpdate(this.el.parentElement, this.menuContainer, this.reposition);
|
|
133
133
|
}
|
|
134
134
|
watchValue() {
|
|
135
135
|
this.updateActiveItem();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-31zRgX-7.js');
|
|
4
|
-
var
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-C8bqk2dV.js');
|
|
5
5
|
var bodyScrollLock_esm = require('./bodyScrollLock.esm-DMDeaEpJ.js');
|
|
6
6
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
7
7
|
var utils = require('./utils-UfZG-xPD.js');
|
|
@@ -51,16 +51,16 @@ const SwirlPopover = class {
|
|
|
51
51
|
? { mainAxis: this.offset, crossAxis: 0 }
|
|
52
52
|
: { mainAxis: this.offset[0], crossAxis: this.offset[1] };
|
|
53
53
|
const shiftPaddingX = utils.getPixelsFromRemToken("--s-space-16");
|
|
54
|
-
const shiftWithPadding =
|
|
54
|
+
const shiftWithPadding = floatingUi_dom.shift({
|
|
55
55
|
padding: {
|
|
56
56
|
left: shiftPaddingX,
|
|
57
57
|
right: shiftPaddingX,
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
const middleware = this.enableFlip
|
|
61
|
-
? [
|
|
62
|
-
: [
|
|
63
|
-
this.position = await
|
|
61
|
+
? [floatingUi_dom.offset(offsetOptions), shiftWithPadding, floatingUi_dom.flip()]
|
|
62
|
+
: [floatingUi_dom.offset(offsetOptions), shiftWithPadding];
|
|
63
|
+
this.position = await floatingUi_dom.computePosition(this.triggerEl, this.contentContainer, {
|
|
64
64
|
middleware,
|
|
65
65
|
placement: this.placement,
|
|
66
66
|
strategy: "fixed",
|
|
@@ -186,7 +186,7 @@ const SwirlPopover = class {
|
|
|
186
186
|
if (this.disableAutoUpdate) {
|
|
187
187
|
this.disableAutoUpdate();
|
|
188
188
|
}
|
|
189
|
-
this.disableAutoUpdate =
|
|
189
|
+
this.disableAutoUpdate = floatingUi_dom.autoUpdate(this.triggerEl, this.contentContainer, () => this.reposition());
|
|
190
190
|
this.scrollContainer.scrollTop = 0;
|
|
191
191
|
this.lockBodyScroll();
|
|
192
192
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-31zRgX-7.js');
|
|
4
4
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
5
5
|
|
|
6
|
-
const swirlSkeletonBoxCss = ":host{display:block}:host *{box-sizing:border-box}.skeleton-box{position:relative;overflow:hidden;min-height:var(--s-font-size-sm);background-color:var(--s-surface-raised-hovered)}.skeleton-box:
|
|
6
|
+
const swirlSkeletonBoxCss = ":host{display:block}:host *{box-sizing:border-box}.skeleton-box{position:relative;overflow:hidden;min-height:var(--s-font-size-sm);background-color:var(--s-surface-raised-hovered)}.skeleton-box:after{position:relative;display:block;width:100%;height:100%;background-image:linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 0,\n rgba(255, 255, 255, 0) 12%,\n var(--s-surface-raised-default) 50%,\n rgba(255, 255, 255, 0) 88%,\n rgba(255, 255, 255, 0) 100%\n );content:\"\";transform:translateX(-100%);animation:skeleton-box-shimmer 3s infinite}@keyframes skeleton-box-shimmer{100%{transform:translateX(100%)}}.skeleton-box--static:before{display:none}.skeleton-box--border-radius-pill{border-radius:100rem}.skeleton-box--border-radius-none{border-radius:0}";
|
|
7
7
|
|
|
8
8
|
const SwirlSkeletonBox = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-31zRgX-7.js');
|
|
4
|
-
var
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-C8bqk2dV.js');
|
|
5
5
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
6
6
|
var utils = require('./utils-UfZG-xPD.js');
|
|
7
7
|
|
|
@@ -39,10 +39,10 @@ const SwirlTooltip = class {
|
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
const middleware = [
|
|
42
|
-
...this.options.middleware.filter((middleware) => middleware.name !== "arrow"),
|
|
43
|
-
|
|
42
|
+
...this.options.middleware.filter((middleware) => middleware && middleware.name !== "arrow"),
|
|
43
|
+
floatingUi_dom.arrow({ element: this.arrowElement, padding: 12 }),
|
|
44
44
|
];
|
|
45
|
-
this.actualPosition = await
|
|
45
|
+
this.actualPosition = await floatingUi_dom.computePosition(referenceElement, this.popperEl, { ...this.options, middleware });
|
|
46
46
|
const arrowX = this.actualPosition.middlewareData.arrow?.x;
|
|
47
47
|
const arrowY = this.actualPosition.middlewareData.arrow?.y;
|
|
48
48
|
this.arrowStyles = {
|
|
@@ -68,8 +68,8 @@ const SwirlTooltip = class {
|
|
|
68
68
|
const shiftPaddingX = utils.getPixelsFromRemToken("--s-space-16");
|
|
69
69
|
this.options = {
|
|
70
70
|
middleware: [
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
floatingUi_dom.offset(margin),
|
|
72
|
+
floatingUi_dom.shift({
|
|
73
73
|
padding: {
|
|
74
74
|
top: shiftPaddingY,
|
|
75
75
|
bottom: shiftPaddingY,
|
|
@@ -77,7 +77,7 @@ const SwirlTooltip = class {
|
|
|
77
77
|
right: shiftPaddingX,
|
|
78
78
|
},
|
|
79
79
|
}),
|
|
80
|
-
|
|
80
|
+
floatingUi_dom.flip(),
|
|
81
81
|
],
|
|
82
82
|
placement: this.position,
|
|
83
83
|
strategy: this.positioning,
|
|
@@ -126,7 +126,7 @@ const SwirlTooltip = class {
|
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
this.reposition();
|
|
129
|
-
this.disableAutoUpdate =
|
|
129
|
+
this.disableAutoUpdate = floatingUi_dom.autoUpdate(referenceElement, this.popperEl, this.reposition.bind(this));
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
async hide() {
|
|
@@ -142,7 +142,7 @@ const SwirlTooltip = class {
|
|
|
142
142
|
"tooltip--active": this.active,
|
|
143
143
|
"tooltip--visible": this.visible,
|
|
144
144
|
});
|
|
145
|
-
return (index.h(index.Host, { key: '
|
|
145
|
+
return (index.h(index.Host, { key: 'e5a7884c4f3f45294efc913baa4767a937afd07d', onKeydown: this.onKeydown }, index.h("span", { key: '9952c41dc93f61aa103e87f4384e17c271c9a600', class: className }, index.h("span", { key: '7fcef15d2b640e8cb685fae4275321c0776c0f20', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.onFocusOut, onClick: this.hide, onFocusin: this.onFocusIn }, index.h("slot", { key: '7b975f73546287509b4b04b6c14e304c976e291b' })), index.h("span", { key: 'a385f4ab99e66b5164b1151fffed552a61718da9', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
|
|
146
146
|
top: Boolean(this.actualPosition)
|
|
147
147
|
? `${this.actualPosition?.y}px`
|
|
148
148
|
: "",
|
|
@@ -151,7 +151,7 @@ const SwirlTooltip = class {
|
|
|
151
151
|
: "",
|
|
152
152
|
position: this.positioning,
|
|
153
153
|
maxWidth: this.maxWidth,
|
|
154
|
-
} }, this.visible && (index.h("span", { key: '
|
|
154
|
+
} }, this.visible && (index.h("span", { key: '7792c9acbe8745684b460789492aafc71e9e75c7', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, index.h("span", { key: 'd4c6edd15ff7a8bb22932fccc9a2d555ccde11c0', class: "tooltip__content", innerHTML: this.content }))), index.h("span", { key: '117ba01694bfb6a78db345392a7de85977d2ba03', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
|
|
155
155
|
...this.arrowStyles,
|
|
156
156
|
visibility: this.visible ? "visible" : "hidden",
|
|
157
157
|
} })))));
|
|
@@ -33,7 +33,7 @@ export class SwirlTooltip {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const middleware = [
|
|
36
|
-
...this.options.middleware.filter((middleware) => middleware.name !== "arrow"),
|
|
36
|
+
...this.options.middleware.filter((middleware) => middleware && middleware.name !== "arrow"),
|
|
37
37
|
arrow({ element: this.arrowElement, padding: 12 }),
|
|
38
38
|
];
|
|
39
39
|
this.actualPosition = await computePosition(referenceElement, this.popperEl, { ...this.options, middleware });
|
|
@@ -136,7 +136,7 @@ export class SwirlTooltip {
|
|
|
136
136
|
"tooltip--active": this.active,
|
|
137
137
|
"tooltip--visible": this.visible,
|
|
138
138
|
});
|
|
139
|
-
return (h(Host, { key: '
|
|
139
|
+
return (h(Host, { key: 'e5a7884c4f3f45294efc913baa4767a937afd07d', onKeydown: this.onKeydown }, h("span", { key: '9952c41dc93f61aa103e87f4384e17c271c9a600', class: className }, h("span", { key: '7fcef15d2b640e8cb685fae4275321c0776c0f20', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.onFocusOut, onClick: this.hide, onFocusin: this.onFocusIn }, h("slot", { key: '7b975f73546287509b4b04b6c14e304c976e291b' })), h("span", { key: 'a385f4ab99e66b5164b1151fffed552a61718da9', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
|
|
140
140
|
top: Boolean(this.actualPosition)
|
|
141
141
|
? `${this.actualPosition?.y}px`
|
|
142
142
|
: "",
|
|
@@ -145,7 +145,7 @@ export class SwirlTooltip {
|
|
|
145
145
|
: "",
|
|
146
146
|
position: this.positioning,
|
|
147
147
|
maxWidth: this.maxWidth,
|
|
148
|
-
} }, this.visible && (h("span", { key: '
|
|
148
|
+
} }, this.visible && (h("span", { key: '7792c9acbe8745684b460789492aafc71e9e75c7', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, h("span", { key: 'd4c6edd15ff7a8bb22932fccc9a2d555ccde11c0', class: "tooltip__content", innerHTML: this.content }))), h("span", { key: '117ba01694bfb6a78db345392a7de85977d2ba03', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
|
|
149
149
|
...this.arrowStyles,
|
|
150
150
|
visibility: this.visible ? "visible" : "hidden",
|
|
151
151
|
} })))));
|