@getflip/swirl-components-react 0.1.0 → 0.1.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/dist/{flip-action-list-item.entry.1b728e6a.js → flip-action-list-item.entry.0f7f7d1d.js} +1 -1
- package/dist/{flip-action-list-section.entry.da3e6186.js → flip-action-list-section.entry.e3180209.js} +1 -1
- package/dist/{flip-action-list.entry.400a309a.js → flip-action-list.entry.6281e19f.js} +1 -1
- package/dist/flip-avatar-group.entry.649a0faa.js +19 -0
- package/dist/{flip-avatar.entry.2eb3242e.js → flip-avatar.entry.8261b415.js} +1 -1
- package/dist/flip-badge.entry.d0a48796.js +19 -0
- package/dist/{flip-banner.entry.b3012465.js → flip-banner.entry.f03180a7.js} +1 -1
- package/dist/flip-button-group.entry.e48f9cab.js +15 -0
- package/dist/{flip-button_2.entry.a323451d.js → flip-button.entry.d68ba496.js} +5 -15
- package/dist/{flip-checkbox.entry.2f740fb8.js → flip-checkbox.entry.03f73a8f.js} +9 -9
- package/dist/{flip-chip.entry.e9729ac7.js → flip-chip.entry.232a1cad.js} +1 -1
- package/dist/{flip-description-list-item.entry.c789511e.js → flip-description-list-item.entry.460331a8.js} +1 -1
- package/dist/{flip-description-list.entry.3b158436.js → flip-description-list.entry.489d5885.js} +1 -1
- package/dist/{flip-dialog.entry.f2be9a9c.js → flip-dialog.entry.cbf334d1.js} +1 -1
- package/dist/flip-file-uploader.entry.bbfb166b.js +31 -0
- package/dist/{flip-icon-add-photo.entry.a1003bdf.js → flip-icon-add-photo.entry.b807c3bc.js} +1 -1
- package/dist/{flip-icon-add.entry.7103fbe7.js → flip-icon-add.entry.df6780ff.js} +1 -1
- package/dist/{flip-icon-admin-panel-settings.entry.36a12e47.js → flip-icon-admin-panel-settings.entry.5afd720c.js} +1 -1
- package/dist/{flip-icon-arrow-back.entry.e35ba078.js → flip-icon-arrow-back.entry.43439868.js} +1 -1
- package/dist/{flip-icon-arrow-forward.entry.5138c404.js → flip-icon-arrow-forward.entry.1f80c674.js} +1 -1
- package/dist/{flip-icon-arrow-right-small.entry.d1eeb150.js → flip-icon-arrow-right-small.entry.5bb4f048.js} +1 -1
- package/dist/{flip-icon-attachment.entry.594b602b.js → flip-icon-attachment.entry.e7a4173b.js} +1 -1
- package/dist/{flip-icon-cancel_2.entry.eb8d1a8c.js → flip-icon-cancel_2.entry.99f63020.js} +1 -1
- package/dist/{flip-icon-chat-bubble.entry.f56fcdc4.js → flip-icon-chat-bubble.entry.60ca55cf.js} +1 -1
- package/dist/{flip-icon-check-circle.entry.e4f8169d.js → flip-icon-check-circle.entry.36b7fab2.js} +1 -1
- package/dist/{flip-icon-check-small.entry.308d57d1.js → flip-icon-check-small.entry.26aa4c8e.js} +1 -1
- package/dist/{flip-icon-check-strong.entry.b61365d2.js → flip-icon-check-strong.entry.bf6545d9.js} +1 -1
- package/dist/{flip-icon-check.entry.f2c6b547.js → flip-icon-check.entry.88a7260b.js} +1 -1
- package/dist/{flip-icon-chevron-left.entry.dbe9b291.js → flip-icon-chevron-left.entry.1eab612e.js} +1 -1
- package/dist/{flip-icon-chevron-right.entry.9565c0f1.js → flip-icon-chevron-right.entry.b55b235e.js} +1 -1
- package/dist/{flip-icon-close-small.entry.8bfcf1b1.js → flip-icon-close-small.entry.2c855d87.js} +1 -1
- package/dist/{flip-icon-close.entry.41992748.js → flip-icon-close.entry.8b5754bd.js} +1 -1
- package/dist/flip-icon-cloud-upload.entry.943d15aa.js +15 -0
- package/dist/{flip-icon-comment.entry.2aac2c10.js → flip-icon-comment.entry.966dd929.js} +1 -1
- package/dist/{flip-icon-copy.entry.8e59bf1d.js → flip-icon-copy.entry.a762687c.js} +1 -1
- package/dist/{flip-icon-date-range.entry.c1dd2730.js → flip-icon-date-range.entry.c3029ef5.js} +1 -1
- package/dist/{flip-icon-delete.entry.bc0b61ff.js → flip-icon-delete.entry.9a13cea4.js} +1 -1
- package/dist/{flip-icon-description.entry.e01b2d40.js → flip-icon-description.entry.c16ff02b.js} +1 -1
- package/dist/{flip-icon-download.entry.a512f353.js → flip-icon-download.entry.3b48f816.js} +1 -1
- package/dist/{flip-icon-edit.entry.7e3cd472.js → flip-icon-edit.entry.86590692.js} +1 -1
- package/dist/{flip-icon-emoji-mood.entry.df7b536f.js → flip-icon-emoji-mood.entry.5f75c0e7.js} +1 -1
- package/dist/{flip-icon-emoji-satisfied.entry.e3e5352b.js → flip-icon-emoji-satisfied.entry.a24e9f8b.js} +1 -1
- package/dist/{flip-icon-error.entry.96c3c29b.js → flip-icon-error.entry.0a68ce3b.js} +1 -1
- package/dist/{flip-icon-expand-less.entry.3e970433.js → flip-icon-expand-less.entry.d099c577.js} +1 -1
- package/dist/{flip-icon-expand-more.entry.4c1fa160.js → flip-icon-expand-more.entry.d3b47154.js} +1 -1
- package/dist/{flip-icon-file.entry.3a18cce8.js → flip-icon-file.entry.9edd9ac5.js} +1 -1
- package/dist/{flip-icon-folder-shared.entry.38b22cd2.js → flip-icon-folder-shared.entry.a79740f8.js} +1 -1
- package/dist/{flip-icon-group-assign.entry.a640254f.js → flip-icon-group-assign.entry.ef36d758.js} +1 -1
- package/dist/{flip-icon-groups-custom.entry.d77901cd.js → flip-icon-groups-custom.entry.99781f2b.js} +1 -1
- package/dist/{flip-icon-groups.entry.80196d79.js → flip-icon-groups.entry.33d1e274.js} +1 -1
- package/dist/{flip-icon-image.entry.601bf2ae.js → flip-icon-image.entry.e653564c.js} +1 -1
- package/dist/{flip-icon-info.entry.b480a255.js → flip-icon-info.entry.c0153488.js} +1 -1
- package/dist/{flip-icon-inventory.entry.bb8a5615.js → flip-icon-inventory.entry.394f2024.js} +1 -1
- package/dist/{flip-icon-like.entry.af8b36e2.js → flip-icon-like.entry.db6411bc.js} +1 -1
- package/dist/{flip-icon-link.entry.be72688c.js → flip-icon-link.entry.35fba400.js} +1 -1
- package/dist/{flip-icon-lock.entry.440459fe.js → flip-icon-lock.entry.73ad40b7.js} +1 -1
- package/dist/{flip-icon-logout.entry.dde0bfc8.js → flip-icon-logout.entry.bfdaf585.js} +1 -1
- package/dist/{flip-icon-mail.entry.b57a0093.js → flip-icon-mail.entry.10764728.js} +1 -1
- package/dist/{flip-icon-manage-accounts.entry.11cc3149.js → flip-icon-manage-accounts.entry.13926348.js} +1 -1
- package/dist/{flip-icon-mention.entry.32771810.js → flip-icon-mention.entry.43a08812.js} +1 -1
- package/dist/{flip-icon-message.entry.636088c3.js → flip-icon-message.entry.e45d5f55.js} +1 -1
- package/dist/{flip-icon-more-horizontal.entry.38f14508.js → flip-icon-more-horizontal.entry.175a91a7.js} +1 -1
- package/dist/{flip-icon-more-vertikal.entry.8a4c613a.js → flip-icon-more-vertikal.entry.855f16e5.js} +1 -1
- package/dist/{flip-icon-notifications-active.entry.5658308d.js → flip-icon-notifications-active.entry.0591ff75.js} +1 -1
- package/dist/{flip-icon-notifications-off.entry.8d3b11ff.js → flip-icon-notifications-off.entry.59926148.js} +1 -1
- package/dist/{flip-icon-notifications.entry.91f77dd2.js → flip-icon-notifications.entry.b3b4169c.js} +1 -1
- package/dist/{flip-icon-people-alt.entry.b0b2e20c.js → flip-icon-people-alt.entry.b9304d1e.js} +1 -1
- package/dist/{flip-icon-person-off.entry.e79df0e6.js → flip-icon-person-off.entry.26c00153.js} +1 -1
- package/dist/{flip-icon-person.entry.1bc59e68.js → flip-icon-person.entry.ed4eca20.js} +1 -1
- package/dist/{flip-icon-phone.entry.03e81177.js → flip-icon-phone.entry.add9f8fc.js} +1 -1
- package/dist/{flip-icon-poll.entry.4e059f77.js → flip-icon-poll.entry.37836068.js} +1 -1
- package/dist/{flip-icon-recieved.entry.e3410f9e.js → flip-icon-recieved.entry.850deffd.js} +1 -1
- package/dist/{flip-icon-search-strong.entry.ec0849a6.js → flip-icon-search-strong.entry.fec41c91.js} +1 -1
- package/dist/{flip-icon-send.entry.3f80869c.js → flip-icon-send.entry.e687d6bb.js} +1 -1
- package/dist/{flip-icon-settings.entry.c86a7bca.js → flip-icon-settings.entry.2e503ce9.js} +1 -1
- package/dist/{flip-icon-time-filled.entry.ad86a08f.js → flip-icon-time-filled.entry.27c31492.js} +1 -1
- package/dist/{flip-icon-time-outlined.entry.75a29f76.js → flip-icon-time-outlined.entry.c1a0b4dd.js} +1 -1
- package/dist/{flip-icon-today.entry.ab272990.js → flip-icon-today.entry.4d38a769.js} +1 -1
- package/dist/{flip-icon-user-assign.entry.1f331180.js → flip-icon-user-assign.entry.10daebb0.js} +1 -1
- package/dist/{flip-icon-video-camera.entry.40ea3d7d.js → flip-icon-video-camera.entry.984108e1.js} +1 -1
- package/dist/{flip-icon-visibility-off.entry.ed4db3b5.js → flip-icon-visibility-off.entry.6a6e6a24.js} +1 -1
- package/dist/{flip-icon-visibility.entry.1a7dfd44.js → flip-icon-visibility.entry.0d16fd8e.js} +1 -1
- package/dist/{flip-icon-warning.entry.1c1540b8.js → flip-icon-warning.entry.f8cdae30.js} +1 -1
- package/dist/{flip-spinner.entry.f8f179be.js → flip-inline-error_2.entry.17e93f00.js} +17 -6
- package/dist/{flip-link.entry.fe817ab1.js → flip-link.entry.2f2bd6f0.js} +1 -1
- package/dist/flip-popover.entry.6309d3d5.js +179 -0
- package/dist/{flip-radio-group.entry.187f29ee.js → flip-radio-group.entry.afff6fac.js} +1 -1
- package/dist/{flip-radio.entry.817d976d.js → flip-radio.entry.9f9bc376.js} +1 -1
- package/dist/flip-resource-list-file-item.entry.f74d3bd3.js +19 -0
- package/dist/flip-resource-list-item.entry.96075846.js +40 -0
- package/dist/flip-resource-list.entry.d85444bc.js +49 -0
- package/dist/{flip-search.entry.6717d77a.js → flip-search.entry.52636549.js} +1 -1
- package/dist/{flip-stack.entry.50d88d6f.js → flip-stack.entry.90b930f5.js} +1 -1
- package/dist/{flip-switch.entry.ef96875e.js → flip-switch.entry.6b0e71bc.js} +1 -1
- package/dist/flip-tab.entry.56a0d1cd.js +17 -0
- package/dist/flip-tabs.entry.0c8b74db.js +91 -0
- package/dist/{flip-tag.entry.31a7d0f7.js → flip-tag.entry.202b87db.js} +1 -1
- package/dist/{flip-theme-provider.entry.9c054d33.js → flip-theme-provider.entry.6402a4bc.js} +1 -1
- package/dist/{flip-thumbnail.entry.449e93ef.js → flip-thumbnail.entry.9c3af9fe.js} +1 -1
- package/dist/{flip-toast-provider.entry.59025e1a.js → flip-toast-provider.entry.cbe2040b.js} +1 -1
- package/dist/{flip-toast.entry.78522d59.js → flip-toast.entry.647ec44c.js} +1 -1
- package/dist/flip-tooltip.entry.f43ae208.js +94 -0
- package/dist/{flip-visually-hidden.entry.ae0ff292.js → flip-visually-hidden.entry.70e706df.js} +1 -1
- package/dist/floating-ui.dom.esm-1a4e8b8a.87557233.js +752 -0
- package/dist/main.c9b46168.js +1329 -0
- package/dist/swirl-components-react.js +83 -76
- package/dist/swirl-components-react.umd.cjs +17 -17
- package/package.json +2 -2
- package/dist/flip-avatar-group.entry.71bf1f2a.js +0 -19
- package/dist/flip-badge.entry.ebda6058.js +0 -19
- package/dist/flip-inline-error.entry.38c26d13.js +0 -17
- package/dist/flip-popover.entry.18c5ead6.js +0 -878
- package/dist/flip-tooltip.entry.8b5f35c7.js +0 -102
- package/dist/main.7e7363a7.js +0 -1322
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import { r, h as e, H as
|
|
1
|
+
import { r as i, h as e, H as r } from "./main.c9b46168.js";
|
|
2
2
|
import { c as n } from "./index-3c78bcaf.2675909b.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const t = ":host{display:inline-flex}:host *{box-sizing:border-box}.
|
|
5
|
+
const t = ":host{display:inline-flex}:host *{box-sizing:border-box}.inline-error{display:inline-flex;color:var(--s-text-critical);line-height:var(--s-line-height-base)}.inline-error--size-s{font-size:var(--s-font-size-sm)}.inline-error--size-s .inline-error__icon{padding-top:0.1875rem}.inline-error--size-s .inline-error__message{padding-top:0}.inline-error__icon{display:inline-flex;color:var(--s-icon-critical)}.inline-error__message{margin-left:var(--s-space-4);padding-top:var(--s-space-2)}", o = class {
|
|
6
6
|
constructor(s) {
|
|
7
|
-
|
|
7
|
+
i(this, s), this.size = "m";
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const s = this.size === "m" ? 24 : 16, a = n("inline-error", `inline-error--size-${this.size}`);
|
|
11
|
+
return e(r, null, e("span", { class: a }, e("span", { class: "inline-error__icon" }, e("flip-icon-error", { size: s })), e("span", { class: "inline-error__message" }, this.message)));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
o.style = t;
|
|
15
|
+
const l = ":host{display:inline-flex}:host *{box-sizing:border-box}.spinner{position:relative;display:inline-flex;overflow:hidden;width:2.25rem;height:2.25rem}.spinner--size-s{width:1.5rem;height:1.5rem}.spinner--size-s .spinner__circle{stroke-width:0.1875rem}.spinner__indicator{position:absolute;inset:0;width:100%;height:100%;transform-origin:center center;-webkit-animation:spinner-rotate 2s linear infinite;animation:spinner-rotate 2s linear infinite}.spinner__background{stroke:var(--s-border-default);stroke-linecap:round}.spinner__circle{-webkit-animation:spinner-dash 1.5s ease-in-out infinite;animation:spinner-dash 1.5s ease-in-out infinite;stroke:var(--s-interactive-primary-default);stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}@-webkit-keyframes spinner-rotate{100%{transform:rotate(360deg)}}@keyframes spinner-rotate{100%{transform:rotate(360deg)}}@-webkit-keyframes spinner-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes spinner-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}", c = class {
|
|
16
|
+
constructor(s) {
|
|
17
|
+
i(this, s), this.size = "m";
|
|
8
18
|
}
|
|
9
19
|
render() {
|
|
10
20
|
const s = n("spinner", `spinner--size-${this.size}`);
|
|
11
|
-
return e(
|
|
21
|
+
return e(r, null, e("span", { class: s, role: Boolean(this.label) ? "status" : void 0 }, e("svg", { "aria-hidden": "true", class: "spinner__indicator", focusable: "false", viewBox: "0 0 50 50" }, e("circle", { class: "spinner__background", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "4" }), e("circle", { class: "spinner__circle", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "4" })), this.label && e("flip-visually-hidden", null, e("span", { class: "spinner__label" }, this.label))));
|
|
12
22
|
}
|
|
13
23
|
};
|
|
14
|
-
|
|
24
|
+
c.style = l;
|
|
15
25
|
export {
|
|
16
|
-
|
|
26
|
+
o as flip_inline_error,
|
|
27
|
+
c as flip_spinner
|
|
17
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as i, h as r, H as t } from "./main.
|
|
1
|
+
import { r as i, h as r, H as t } from "./main.c9b46168.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const s = ":host{display:inline-flex}:host *{box-sizing:border-box}.link{color:var(--s-interactive-primary-default);line-height:var(--s-line-height-base);text-underline-offset:var(--s-space-4)}.link:hover{color:var(--s-interactive-primary-hovered)}.link:active{color:var(--s-interactive-primary-pressed)}", a = class {
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { r as w, h as r, H as k, g as _ } from "./main.c9b46168.js";
|
|
2
|
+
import { a as x, c as S, s as C, f as T } from "./floating-ui.dom.esm-1a4e8b8a.87557233.js";
|
|
3
|
+
import { c as A } from "./index-3c78bcaf.2675909b.js";
|
|
4
|
+
import { q as m } from "./utils-03e3261c.f5223801.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
function B(t) {
|
|
8
|
+
if (Array.isArray(t)) {
|
|
9
|
+
for (var o = 0, e = Array(t.length); o < t.length; o++)
|
|
10
|
+
e[o] = t[o];
|
|
11
|
+
return e;
|
|
12
|
+
} else
|
|
13
|
+
return Array.from(t);
|
|
14
|
+
}
|
|
15
|
+
var f = !1;
|
|
16
|
+
if (typeof window < "u") {
|
|
17
|
+
var h = {
|
|
18
|
+
get passive() {
|
|
19
|
+
f = !0;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
window.addEventListener("testPassive", null, h), window.removeEventListener("testPassive", null, h);
|
|
23
|
+
}
|
|
24
|
+
var p = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), s = [], c = !1, b = -1, l = void 0, a = void 0, d = void 0, y = function(o) {
|
|
25
|
+
return s.some(function(e) {
|
|
26
|
+
return !!(e.options.allowTouchMove && e.options.allowTouchMove(o));
|
|
27
|
+
});
|
|
28
|
+
}, u = function(o) {
|
|
29
|
+
var e = o || window.event;
|
|
30
|
+
return y(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
31
|
+
}, I = function(o) {
|
|
32
|
+
if (d === void 0) {
|
|
33
|
+
var e = !!o && o.reserveScrollBarGap === !0, n = window.innerWidth - document.documentElement.clientWidth;
|
|
34
|
+
if (e && n > 0) {
|
|
35
|
+
var i = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
36
|
+
d = document.body.style.paddingRight, document.body.style.paddingRight = i + n + "px";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
l === void 0 && (l = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
40
|
+
}, P = function() {
|
|
41
|
+
d !== void 0 && (document.body.style.paddingRight = d, d = void 0), l !== void 0 && (document.body.style.overflow = l, l = void 0);
|
|
42
|
+
}, E = function() {
|
|
43
|
+
return window.requestAnimationFrame(function() {
|
|
44
|
+
if (a === void 0) {
|
|
45
|
+
a = {
|
|
46
|
+
position: document.body.style.position,
|
|
47
|
+
top: document.body.style.top,
|
|
48
|
+
left: document.body.style.left
|
|
49
|
+
};
|
|
50
|
+
var o = window, e = o.scrollY, n = o.scrollX, i = o.innerHeight;
|
|
51
|
+
document.body.style.position = "fixed", document.body.style.top = -e, document.body.style.left = -n, setTimeout(function() {
|
|
52
|
+
return window.requestAnimationFrame(function() {
|
|
53
|
+
var v = i - window.innerHeight;
|
|
54
|
+
v && e >= i && (document.body.style.top = -(e + v));
|
|
55
|
+
});
|
|
56
|
+
}, 300);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}, M = function() {
|
|
60
|
+
if (a !== void 0) {
|
|
61
|
+
var o = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
62
|
+
document.body.style.position = a.position, document.body.style.top = a.top, document.body.style.left = a.left, window.scrollTo(e, o), a = void 0;
|
|
63
|
+
}
|
|
64
|
+
}, Y = function(o) {
|
|
65
|
+
return o ? o.scrollHeight - o.scrollTop <= o.clientHeight : !1;
|
|
66
|
+
}, F = function(o, e) {
|
|
67
|
+
var n = o.targetTouches[0].clientY - b;
|
|
68
|
+
return y(o.target) ? !1 : e && e.scrollTop === 0 && n > 0 || Y(e) && n < 0 ? u(o) : (o.stopPropagation(), !0);
|
|
69
|
+
}, L = function(o, e) {
|
|
70
|
+
if (!o) {
|
|
71
|
+
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!s.some(function(i) {
|
|
75
|
+
return i.targetElement === o;
|
|
76
|
+
})) {
|
|
77
|
+
var n = {
|
|
78
|
+
targetElement: o,
|
|
79
|
+
options: e || {}
|
|
80
|
+
};
|
|
81
|
+
s = [].concat(B(s), [n]), p ? E() : I(e), p && (o.ontouchstart = function(i) {
|
|
82
|
+
i.targetTouches.length === 1 && (b = i.targetTouches[0].clientY);
|
|
83
|
+
}, o.ontouchmove = function(i) {
|
|
84
|
+
i.targetTouches.length === 1 && F(i, o);
|
|
85
|
+
}, c || (document.addEventListener("touchmove", u, f ? { passive: !1 } : void 0), c = !0));
|
|
86
|
+
}
|
|
87
|
+
}, g = function(o) {
|
|
88
|
+
if (!o) {
|
|
89
|
+
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
s = s.filter(function(e) {
|
|
93
|
+
return e.targetElement !== o;
|
|
94
|
+
}), p && (o.ontouchstart = null, o.ontouchmove = null, c && s.length === 0 && (document.removeEventListener("touchmove", u, f ? { passive: !1 } : void 0), c = !1)), p ? M() : P();
|
|
95
|
+
};
|
|
96
|
+
const D = ":host{position:relative;z-index:var(--s-z-40);display:inline-flex}:host *{box-sizing:border-box}.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:0.15s popover-fade-in;animation:0.15s popover-fade-in}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:none;animation:none}}.popover--active:not(.popover--closing) .popover__content{-webkit-animation:0.15s popover-slide-in;animation:0.15s popover-slide-in}@media (min-width: 768px){.popover--active:not(.popover--closing) .popover__content{transform-origin:top left;-webkit-animation:0.15s popover-fade-scale-in;animation:0.15s popover-fade-scale-in}}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__content{-webkit-animation:none;animation:none}}.popover--closing .popover__backdrop{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (prefers-reduced-motion){.popover--closing .popover__backdrop{-webkit-animation:none;animation:none}}.popover--closing .popover__content{-webkit-animation:0.15s popover-slide-out;animation:0.15s popover-slide-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 768px){.popover--closing .popover__content{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out}}@media (prefers-reduced-motion){.popover--closing .popover__content{-webkit-animation:none;animation:none}}.popover--inactive .popover__content{display:none}.popover__backdrop{position:fixed;z-index:0;background-color:rgba(0, 0, 0, 0.2);-webkit-animation:0.15s popover-backdrop-fade-in;animation:0.15s popover-backdrop-fade-in;inset:0}@media (prefers-reduced-motion){.popover__backdrop{-webkit-animation:none;animation:none}}@media (min-width: 768px){.popover__backdrop{display:none}}.popover__content{position:fixed;z-index:2;right:0;bottom:0;left:0;overflow:hidden;border-top-left-radius:var(--s-border-radius-xl);border-top-right-radius:var(--s-border-radius-xl);background-color:var(--s-surface-overlay-default)}@media (min-width: 768px){.popover__content{right:unset;bottom:unset;left:unset;max-width:22.5rem;border-radius:var(--s-border-radius-xl);-webkit-animation:none;animation:none;box-shadow:0.125rem 0.25rem 2.5rem rgba(0, 0, 0, 0.14)}}.popover__scroll-container{overflow-x:hidden;overflow-y:auto;width:100%;max-height:90vh;padding-top:var(--s-space-24);padding-bottom:var(--s-space-24);overscroll-behavior:contain}@media (min-width: 768px){.popover__scroll-container{max-height:19rem;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8)}}.popover__handle{position:absolute;top:var(--s-space-8);left:50%;width:2.5rem;height:0.375rem;border-radius:0.1875rem;background-color:var(--s-border-default);transform:translatex(-50%)}@media (min-width: 768px){.popover__handle{display:none}}@-webkit-keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes popover-fade-scale-in{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popover-fade-scale-in{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}", H = class {
|
|
97
|
+
constructor(t) {
|
|
98
|
+
w(this, t), this.active = !1, this.closing = !1, this.close = () => {
|
|
99
|
+
var o;
|
|
100
|
+
this.closing || (this.disableAutoUpdate && this.disableAutoUpdate(), this.closing = !0, setTimeout(() => {
|
|
101
|
+
this.active = !1, this.closing = !1, this.updateTriggerAttributes();
|
|
102
|
+
}, 150), this.unlockBodyScroll(), (o = this.triggerEl) === null || o === void 0 || o.focus());
|
|
103
|
+
}, this.open = () => {
|
|
104
|
+
this.active = !0, this.updateChildMenuItems(), this.updateTriggerAttributes(), requestAnimationFrame(async () => {
|
|
105
|
+
await this.reposition(), this.childMenuItems.length > 0 ? this.childMenuItems[0].focus() : this.contentContainer.focus(), this.disableAutoUpdate && this.disableAutoUpdate(), this.disableAutoUpdate = x(this.triggerEl, this.contentContainer, this.reposition), this.scrollContainer.scrollTop = 0, this.lockBodyScroll();
|
|
106
|
+
});
|
|
107
|
+
}, this.toggle = () => {
|
|
108
|
+
this.active ? this.close() : this.open();
|
|
109
|
+
}, this.onKeydown = (o) => {
|
|
110
|
+
o.code === "Escape" && this.active && this.close();
|
|
111
|
+
}, this.onContentClick = () => {
|
|
112
|
+
!this.active || this.close();
|
|
113
|
+
}, this.reposition = async () => {
|
|
114
|
+
const o = !window.matchMedia("(min-width: 768px)").matches;
|
|
115
|
+
if (!(!Boolean(this.triggerEl) || !Boolean(this.contentContainer))) {
|
|
116
|
+
if (o) {
|
|
117
|
+
this.position = void 0;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.position = await S(this.triggerEl, this.contentContainer, {
|
|
121
|
+
middleware: [C(), T()],
|
|
122
|
+
placement: "bottom-start",
|
|
123
|
+
strategy: "fixed"
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
componentDidLoad() {
|
|
129
|
+
this.connectTrigger(), this.updateChildMenuItems(), this.updateTriggerAttributes();
|
|
130
|
+
}
|
|
131
|
+
disconnectedCallback() {
|
|
132
|
+
g(this.scrollContainer);
|
|
133
|
+
}
|
|
134
|
+
onWindowFocusout(t) {
|
|
135
|
+
if (!this.active)
|
|
136
|
+
return;
|
|
137
|
+
const o = t.relatedTarget;
|
|
138
|
+
(o === null || !this.el.contains(o) && !this.childMenuItems.some((n) => {
|
|
139
|
+
var i;
|
|
140
|
+
return (i = o.shadowRoot) === null || i === void 0 ? void 0 : i.contains(n);
|
|
141
|
+
})) && this.close();
|
|
142
|
+
}
|
|
143
|
+
connectTrigger() {
|
|
144
|
+
var t;
|
|
145
|
+
const o = m(document.body, `#${this.trigger}`)[0];
|
|
146
|
+
this.triggerEl = (o == null ? void 0 : o.children[0]) || ((t = o == null ? void 0 : o.shadowRoot) === null || t === void 0 ? void 0 : t.children[0]) || o, Boolean(this.triggerEl) && this.triggerEl.addEventListener("click", this.toggle);
|
|
147
|
+
}
|
|
148
|
+
updateTriggerAttributes() {
|
|
149
|
+
!Boolean(this.triggerEl) || (this.triggerEl.setAttribute("aria-controls", this.popoverId), this.triggerEl.setAttribute("aria-expanded", String(this.active)), this.triggerEl.setAttribute("aria-haspopup", "dialog"));
|
|
150
|
+
}
|
|
151
|
+
updateChildMenuItems() {
|
|
152
|
+
this.childMenuItems = m(this.el, '[role="menuitem"]');
|
|
153
|
+
}
|
|
154
|
+
lockBodyScroll() {
|
|
155
|
+
window.matchMedia("(min-width: 768px)").matches || L(this.scrollContainer);
|
|
156
|
+
}
|
|
157
|
+
unlockBodyScroll() {
|
|
158
|
+
g(this.scrollContainer);
|
|
159
|
+
}
|
|
160
|
+
render() {
|
|
161
|
+
var t, o;
|
|
162
|
+
const e = A("popover", {
|
|
163
|
+
"popover--closing": this.closing,
|
|
164
|
+
"popover--active": this.active,
|
|
165
|
+
"popover--inactive": !this.active
|
|
166
|
+
});
|
|
167
|
+
return r(k, { id: this.popoverId }, r("div", { class: e, onKeyDown: this.onKeydown }, r("div", { "aria-hidden": this.active ? "false" : "true", "aria-label": this.label, class: "popover__content", onClick: this.onContentClick, role: "dialog", tabindex: "-1", ref: (n) => this.contentContainer = n, style: {
|
|
168
|
+
top: Boolean(this.position) ? `${(t = this.position) === null || t === void 0 ? void 0 : t.y}px` : "",
|
|
169
|
+
left: Boolean(this.position) ? `${(o = this.position) === null || o === void 0 ? void 0 : o.x}px` : ""
|
|
170
|
+
} }, r("span", { class: "popover__handle" }), r("div", { class: "popover__scroll-container", ref: (n) => this.scrollContainer = n }, r("slot", null))), this.active && r("div", { class: "popover__backdrop", onClick: this.close })));
|
|
171
|
+
}
|
|
172
|
+
get el() {
|
|
173
|
+
return _(this);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
H.style = D;
|
|
177
|
+
export {
|
|
178
|
+
H as flip_popover
|
|
179
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as a, c as s, h as r, H as l, g as n } from "./main.
|
|
1
|
+
import { r as a, c as s, h as r, H as l, g as n } from "./main.c9b46168.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const u = ".sc-flip-radio-group-h{display:block}.sc-flip-radio-group-h *.sc-flip-radio-group{box-sizing:border-box}.radio-group.sc-flip-radio-group{display:flex;flex-direction:column;gap:var(--s-space-4)}", d = class {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { r as l, c as a, h as e, H as n } from "./main.c9b46168.js";
|
|
2
|
+
import { c } from "./index-3c78bcaf.2675909b.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const p = ':host{display:block;width:100%}:host *{box-sizing:border-box}.resource-list-file-item{position:relative;display:flex;width:100%;padding:var(--s-space-12) var(--s-space-16);align-items:center;background-color:var(--s-background-default);line-height:var(--s-line-height-base);gap:var(--s-space-12)}.resource-list-file-item:focus{background-color:var(--s-background-hovered);outline:none}.resource-list-file-item--has-control .resource-list-file-item__label-container{padding-right:calc(var(--s-space-12) + 2.5rem)}.resource-list-file-item__icon{color:var(--s-icon-highlight)}.resource-list-file-item__label-container{position:relative;display:flex;min-width:0;min-height:2.875rem;flex-grow:1;justify-content:center;flex-direction:column}.resource-list-file-item__label-container:after{position:absolute;right:0;bottom:calc(-1 * var(--s-space-12) + 0.0625rem);left:0;height:0.0625rem;background-color:var(--s-border-default);content:""}.resource-list-file-item__label{overflow:hidden;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.resource-list-file-item__description{overflow:hidden;margin-top:var(--s-space-2);color:var(--s-text-subdued);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);white-space:nowrap;text-overflow:ellipsis}.resource-list-file-item__error-message{margin-top:var(--s-space-2)}.resource-list-file-item__remove-button{position:absolute;top:50%;right:var(--s-space-16);display:inline-flex;transform:translateY(-50%)}.resource-list-file-item__spinner{position:absolute;top:50%;right:var(--s-space-24);display:inline-flex;transform:translateY(-50%)}', m = class {
|
|
6
|
+
constructor(i) {
|
|
7
|
+
l(this, i), this.remove = a(this, "remove", 7), this.icon = "<flip-icon-file></flip-icon-file>", this.removeButtonLabel = "Remove file";
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const i = Boolean(this.errorMessage), r = !i && Boolean(this.description), s = !i && this.loading, t = this.removable && !s, o = c("resource-list-file-item", {
|
|
11
|
+
"resource-list-file-item--has-control": s || t
|
|
12
|
+
});
|
|
13
|
+
return e(n, { role: "row" }, e("div", { class: o, role: "gridcell" }, e("span", { class: "resource-list-file-item__icon", innerHTML: this.icon }), e("span", { class: "resource-list-file-item__label-container" }, e("span", { class: "resource-list-file-item__label", id: "label" }, this.label), r && e("span", { class: "resource-list-file-item__description" }, this.description), i && e("span", { "aria-live": "polite", class: "resource-list-file-item__error-message" }, e("flip-inline-error", { message: this.errorMessage, size: "s" }))), s && e("span", { class: "resource-list-file-item__spinner" }, e("flip-spinner", { size: "s" })), t && e("span", { class: "resource-list-file-item__remove-button" }, e("flip-button", { hideLabel: !0, icon: "<flip-icon-close></flip-icon-close>", label: this.removeButtonLabel, onClick: this.remove.emit }))));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
m.style = p;
|
|
17
|
+
export {
|
|
18
|
+
m as flip_resource_list_file_item
|
|
19
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { r as n, c as d, h as t, H as u, g as h } from "./main.c9b46168.js";
|
|
2
|
+
import { c as m } from "./index-3c78bcaf.2675909b.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const b = ':host{display:block;width:100%}:host *{box-sizing:border-box}.resource-list-item{position:relative;width:100%}.resource-list-item--checked .resource-list-item__checkbox{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.resource-list-item--has-menu .resource-list-item__label-container{padding-right:calc(var(--s-space-16) + 2.5rem + var(--s-space-12))}@media (--from-tablet){.resource-list-item--selectable .resource-list-item__content{padding-left:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}}.resource-list-item--selectable .resource-list-item__label-container{padding-right:calc(var(--s-space-16) + 1.5rem + var(--s-space-12))}@media (--from-tablet){.resource-list-item--selectable .resource-list-item__label-container{padding-right:var(--s-space-16)}}.resource-list-item--hide-divider .resource-list-item__label-container:after{display:none}.resource-list-item__content{--flip-avatar-group-border-color:var(--s-background-default);--flip-badge-border-color:var(--s-background-default);display:flex;width:100%;padding-top:var(--s-space-12);padding-right:0;padding-bottom:var(--s-space-12);padding-left:var(--s-space-16);align-items:center;border:none;color:var(--s-text-default);background-color:var(--s-background-default);font:inherit;line-height:var(--s-line-height-base);text-align:left;text-decoration:none;cursor:pointer;gap:var(--s-space-12)}.resource-list-item__content:hover:not(:disabled){background-color:var(--s-background-hovered)}.resource-list-item__content:hover:not(:disabled) .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-hovered);--flip-badge-border-color:var(--s-background-hovered)}.resource-list-item__content:active:not(:disabled){background-color:var(--s-background-pressed)}.resource-list-item__content:active:not(:disabled) .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-pressed);--flip-badge-border-color:var(--s-background-pressed)}.resource-list-item__content:focus{background-color:var(--s-background-hovered);outline:none}.resource-list-item__content:focus .resource-list-item__media{--flip-avatar-group-border-color:var(--s-background-hovered);--flip-badge-border-color:var(--s-background-hovered)}.resource-list-item__content:disabled{color:var(--s-text-disabled);background-color:var(--s-background-default);cursor:default}.resource-list-item__content:disabled .resource-list-item__description{color:var(--s-text-disabled)}.resource-list-item__media{display:inline-flex}.resource-list-item__label-container{position:relative;display:flex;min-width:0;min-height:2.875rem;padding-right:var(--s-space-16);flex-grow:1;justify-content:center;flex-direction:column}.resource-list-item__label-container:after{position:absolute;right:0;bottom:calc(-1 * var(--s-space-12) + 0.0625rem);left:0;height:0.0625rem;background-color:var(--s-border-default);content:""}.resource-list-item__label{overflow:hidden;font-weight:var(--s-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.resource-list-item__description{overflow:hidden;margin-top:var(--s-space-2);color:var(--s-text-subdued);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);white-space:nowrap;text-overflow:ellipsis}.resource-list-item__menu-trigger{position:absolute;top:50%;right:var(--s-space-16);transform:translateY(-50%)}.resource-list-item__checkbox{position:absolute;top:50%;right:var(--s-space-16);display:flex;width:1.25rem;height:1.25rem;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s);transform:translateY(-50%)}@media (--from-tablet){.resource-list-item__checkbox{right:auto;left:var(--s-space-16)}}.resource-list-item__checkbox-icon{display:inline-flex;width:1.0625rem;height:1.0625rem}.resource-list-item__checkbox-icon>*::part(icon){width:1.0625rem;height:1.0625rem}.resource-list-item__meta{position:absolute;top:calc(var(--s-space-12) + var(--s-space-4));right:var(--s-space-16);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}', p = class {
|
|
6
|
+
constructor(e) {
|
|
7
|
+
n(this, e), this.valueChange = d(this, "valueChange", 7), this.checked = !1, this.menuTriggerLabel = "Options", this.onClick = () => {
|
|
8
|
+
!this.selectable || (this.checked = !this.checked, this.valueChange.emit(this.checked));
|
|
9
|
+
}, this.onMenuTriggerClick = (r) => {
|
|
10
|
+
this.disabled && !Boolean(this.href) && r.stopPropagation();
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
this.forceAvatarProps(), this.forceThumbnailProps();
|
|
15
|
+
}
|
|
16
|
+
forceAvatarProps() {
|
|
17
|
+
const e = this.el.querySelector("flip-avatar");
|
|
18
|
+
!Boolean(e) || (e.removeAttribute("interactive"), e.removeAttribute("show-label"), e.removeAttribute("variant"), e.setAttribute("size", "l"));
|
|
19
|
+
}
|
|
20
|
+
forceThumbnailProps() {
|
|
21
|
+
const e = this.el.querySelector("flip-thumbnail");
|
|
22
|
+
!Boolean(e) || (e.setAttribute("format", "landscape"), ["s", "m"].includes(e.getAttribute("size")) || e.setAttribute("size", "m"));
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
const e = Boolean(this.href) && !this.selectable ? "a" : "button", r = this.disabled && !Boolean(this.href), i = Boolean(this.menuTriggerId), s = i && !Boolean(this.meta) && !this.selectable, o = Boolean(this.meta) && !this.selectable, a = this.selectable ? String(this.checked) : void 0, l = this.selectable ? "checkbox" : void 0, c = m("resource-list-item", {
|
|
26
|
+
"resource-list-item--checked": this.checked,
|
|
27
|
+
"resource-list-item--has-menu": i,
|
|
28
|
+
"resource-list-item--hide-divider": this.hideDivider,
|
|
29
|
+
"resource-list-item--selectable": this.selectable
|
|
30
|
+
});
|
|
31
|
+
return t(u, { role: "row" }, t("div", { class: c, role: "gridcell" }, t(e, { "aria-checked": a, "aria-disabled": r ? "true" : void 0, "aria-labelledby": "label", class: "resource-list-item__content", href: this.href, disabled: r, onClick: this.onClick, role: l, tabIndex: 0 }, Boolean(this.media) && t("span", { class: "resource-list-item__media", innerHTML: this.media }), t("span", { class: "resource-list-item__label-container" }, t("span", { class: "resource-list-item__label", id: "label" }, this.label), this.description && t("span", { class: "resource-list-item__description" }, this.description))), this.selectable && t("span", { "aria-hidden": "true", class: "resource-list-item__checkbox" }, t("span", { class: "resource-list-item__checkbox-icon" }, this.checked && t("flip-icon-check-strong", null))), o && t("span", { class: "resource-list-item__meta" }, this.meta), s && t("flip-button", { "aria-disabled": r ? "true" : void 0, class: "resource-list-item__menu-trigger", disabled: r, hideLabel: !0, icon: "<flip-icon-more-horizontal></flip-icon-more-horizontal>", id: this.menuTriggerId, intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })));
|
|
32
|
+
}
|
|
33
|
+
get el() {
|
|
34
|
+
return h(this);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
p.style = b;
|
|
38
|
+
export {
|
|
39
|
+
p as flip_resource_list_item
|
|
40
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as i, h as o, H as r, g as l } from "./main.c9b46168.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const n = ":host{display:block;width:100%}:host *{box-sizing:border-box}", c = class {
|
|
5
|
+
constructor(s) {
|
|
6
|
+
i(this, s), this.focusedIndex = 0, this.onFocus = () => {
|
|
7
|
+
this.focusItemAtIndex(this.focusedIndex);
|
|
8
|
+
}, this.onKeyDown = (e) => {
|
|
9
|
+
if (e.key === "ArrowDown")
|
|
10
|
+
e.preventDefault(), this.focusItemAtIndex((this.focusedIndex + 1) % this.items.length);
|
|
11
|
+
else if (e.key === "ArrowUp") {
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
const t = this.focusedIndex === 0 ? this.items.length - 1 : this.focusedIndex - 1;
|
|
14
|
+
this.focusItemAtIndex(t);
|
|
15
|
+
} else
|
|
16
|
+
e.key === "Home" ? (e.preventDefault(), this.focusItemAtIndex(0)) : e.key === "End" && (e.preventDefault(), this.focusItemAtIndex(this.items.length - 1));
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
this.collectItems(), this.removeItemsFromTabOrder();
|
|
21
|
+
}
|
|
22
|
+
collectItems() {
|
|
23
|
+
this.items = Array.from(this.el.querySelectorAll("flip-resource-list-item, flip-resource-list-file-item"));
|
|
24
|
+
}
|
|
25
|
+
removeItemsFromTabOrder() {
|
|
26
|
+
this.items.forEach((s) => {
|
|
27
|
+
var e, t;
|
|
28
|
+
return (t = (e = s.shadowRoot) === null || e === void 0 ? void 0 : e.querySelector(".resource-list-item__content, .resource-list-file-item")) === null || t === void 0 ? void 0 : t.setAttribute("tabIndex", "-1");
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
focusItemAtIndex(s) {
|
|
32
|
+
this.removeItemsFromTabOrder();
|
|
33
|
+
const e = this.items[s];
|
|
34
|
+
if (!Boolean(e))
|
|
35
|
+
return;
|
|
36
|
+
const t = e.shadowRoot.querySelector(".resource-list-item__content, .resource-list-file-item");
|
|
37
|
+
t.setAttribute("tabIndex", "0"), t.focus(), this.focusedIndex = s;
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return o(r, { onKeyDown: this.onKeyDown }, o("flip-stack", { "aria-label": this.label, onFocus: this.onFocus, role: "grid", tabIndex: 0 }, o("slot", null)));
|
|
41
|
+
}
|
|
42
|
+
get el() {
|
|
43
|
+
return l(this);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
c.style = n;
|
|
47
|
+
export {
|
|
48
|
+
c as flip_resource_list
|
|
49
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { r as s, h as a, H as i } from "./main.c9b46168.js";
|
|
2
|
+
import { c as o } from "./index-3c78bcaf.2675909b.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const e = ":host{display:block;width:100%}:host *{box-sizing:border-box}.tab{display:none;width:100%;padding:var(--s-space-8)}.tab--active{display:block}", l = class {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
s(this, t);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const t = o("tab", { "tab--active": this.active });
|
|
11
|
+
return a(i, { "aria-labelledby": `tab-${this.tabId}`, id: this.tabId, role: "tabpanel", tabIndex: this.active ? 0 : -1 }, a("div", { class: t }, a("slot", null)));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
l.style = e;
|
|
15
|
+
export {
|
|
16
|
+
l as flip_tab
|
|
17
|
+
};
|