@frontify/fondue-components 23.0.0 → 24.0.0-rc.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/fondue-components.js +50 -46
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +3 -3
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +104 -86
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +2 -2
- package/dist/fondue-components13.js +58 -57
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +2 -2
- package/dist/fondue-components15.js +2 -2
- package/dist/fondue-components16.js +2 -2
- package/dist/fondue-components17.js +56 -36
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +34 -16
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +18 -73
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +18 -36
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +71 -50
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +36 -138
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +50 -50
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +138 -33
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +52 -193
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +30 -134
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +191 -126
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +134 -30
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +130 -63
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +31 -101
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +64 -30
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +98 -52
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +30 -20
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +56 -23
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +20 -7
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +23 -6
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +8 -32
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +5 -3
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +32 -12
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +5 -155
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +18 -116
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +59 -22
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +111 -14
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +116 -30
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +21 -54
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +31 -130
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +53 -20
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +131 -53
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +20 -7
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +53 -13
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +7 -14
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +13 -5
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +15 -60
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +5 -18
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +60 -19
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +18 -5
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +18 -14
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +1 -1
- package/dist/fondue-components59.js +10 -16
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +4 -4
- package/dist/fondue-components60.js +4 -10
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +18 -35
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +10 -4
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +34 -10
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +35 -5
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +4 -24
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +12 -16
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +4 -151
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +25 -19
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +16 -77
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +2 -2
- package/dist/fondue-components70.js +152 -8
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +19 -37
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +76 -69
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +8 -11
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +36 -12
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +70 -12
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +10 -22
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +13 -34
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +12 -10
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +22 -67
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +34 -15
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +9 -24
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +67 -18
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +14 -22
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +24 -6
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +18 -19
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +21 -5
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +8 -4
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +19 -4
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +4 -14
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +5 -2
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +4 -39
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +39 -20
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +24 -0
- package/dist/fondue-components93.js.map +1 -0
- package/dist/fondue-components94.js +5 -0
- package/dist/fondue-components94.js.map +1 -0
- package/dist/fondue-components95.js +20 -0
- package/dist/fondue-components95.js.map +1 -0
- package/dist/index.d.ts +116 -3
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
function s(e, n) {
|
|
2
|
+
const r = 'tr[tabindex="0"]', t = e.closest("table");
|
|
3
|
+
if (!t)
|
|
4
|
+
return null;
|
|
5
|
+
const o = Array.from(t.querySelectorAll(r)), l = o.indexOf(e) + (n === "ArrowUp" ? -1 : 1);
|
|
6
|
+
return l >= 0 && l < o.length ? o[l] : null;
|
|
7
|
+
}
|
|
8
|
+
function a(e) {
|
|
9
|
+
const n = e.target, r = n.closest("tr");
|
|
10
|
+
if (!r || n !== r || !["ArrowUp", "ArrowDown"].includes(e.key))
|
|
11
|
+
return;
|
|
12
|
+
const t = s(r, e.key);
|
|
13
|
+
t && (e.preventDefault(), t.focus());
|
|
14
|
+
}
|
|
15
|
+
const u = [HTMLButtonElement, HTMLAnchorElement], i = ["button", "link"];
|
|
16
|
+
function f(e) {
|
|
17
|
+
if (!e)
|
|
18
|
+
return !1;
|
|
19
|
+
const { target: n, currentTarget: r } = e;
|
|
20
|
+
let t = n instanceof Element ? n : null;
|
|
21
|
+
if (!r.contains(t))
|
|
22
|
+
return !0;
|
|
23
|
+
for (; t && !(t instanceof HTMLTableRowElement); ) {
|
|
24
|
+
if (u.some((c) => t instanceof c))
|
|
25
|
+
return !0;
|
|
26
|
+
const o = t.getAttribute("role");
|
|
27
|
+
if (o && i.includes(o))
|
|
28
|
+
return !0;
|
|
29
|
+
t = t.parentElement;
|
|
30
|
+
}
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
9
33
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_ as default,
|
|
13
|
-
t as root,
|
|
14
|
-
g as trigger,
|
|
15
|
-
i as triggerList,
|
|
16
|
-
r as triggerListWrapper
|
|
34
|
+
a as handleKeyDown,
|
|
35
|
+
f as shouldIgnoreRowClick
|
|
17
36
|
};
|
|
18
37
|
//# sourceMappingURL=fondue-components80.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components80.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components80.js","sources":["../src/components/Table/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type KeyboardEvent, type MouseEvent } from 'react';\n\nfunction getAdjacentRow(currentRow: HTMLElement, key: 'ArrowUp' | 'ArrowDown'): HTMLElement | null {\n const selector = 'tr[tabindex=\"0\"]';\n const table = currentRow.closest('table');\n if (!table) {\n return null;\n }\n\n const rows = Array.from(table.querySelectorAll(selector));\n const currentIndex = rows.indexOf(currentRow);\n const nextIndex = currentIndex + (key === 'ArrowUp' ? -1 : 1);\n\n return nextIndex >= 0 && nextIndex < rows.length ? (rows[nextIndex] as HTMLElement) : null;\n}\n\nexport function handleKeyDown(event: KeyboardEvent<HTMLTableElement>) {\n const target = event.target as HTMLElement;\n const currentRow = target.closest('tr');\n\n if (!currentRow || target !== currentRow || !['ArrowUp', 'ArrowDown'].includes(event.key)) {\n return;\n }\n\n const nextRow = getAdjacentRow(currentRow, event.key as 'ArrowUp' | 'ArrowDown');\n if (nextRow) {\n event.preventDefault();\n nextRow.focus();\n }\n}\n\nconst INTERACTIVE_ELEMENTS_LIST = [HTMLButtonElement, HTMLAnchorElement];\nconst INTERACTIVE_ROLES_LIST = ['button', 'link'];\n\nexport function shouldIgnoreRowClick(event?: MouseEvent): boolean {\n if (!event) {\n return false;\n }\n\n const { target, currentTarget } = event;\n\n let element = target instanceof Element ? target : null;\n\n if (!currentTarget.contains(element)) {\n return true;\n }\n\n while (element && !(element instanceof HTMLTableRowElement)) {\n if (INTERACTIVE_ELEMENTS_LIST.some((interactiveElement) => element instanceof interactiveElement)) {\n return true;\n }\n\n const role = element.getAttribute('role');\n if (role && INTERACTIVE_ROLES_LIST.includes(role)) {\n return true;\n }\n\n element = element.parentElement;\n }\n\n return false;\n}\n"],"names":["getAdjacentRow","currentRow","key","selector","table","rows","nextIndex","handleKeyDown","event","target","nextRow","INTERACTIVE_ELEMENTS_LIST","INTERACTIVE_ROLES_LIST","shouldIgnoreRowClick","currentTarget","element","interactiveElement","role"],"mappings":"AAIA,SAASA,EAAeC,GAAyBC,GAAkD;AAC/F,QAAMC,IAAW,oBACXC,IAAQH,EAAW,QAAQ,OAAO;AACxC,MAAI,CAACG;AACD,WAAO;AAGX,QAAMC,IAAO,MAAM,KAAKD,EAAM,iBAAiBD,CAAQ,CAAC,GAElDG,IADeD,EAAK,QAAQJ,CAAU,KACVC,MAAQ,YAAY,KAAK;AAE3D,SAAOI,KAAa,KAAKA,IAAYD,EAAK,SAAUA,EAAKC,CAAS,IAAoB;AAC1F;AAEO,SAASC,EAAcC,GAAwC;AAClE,QAAMC,IAASD,EAAM,QACfP,IAAaQ,EAAO,QAAQ,IAAI;AAEtC,MAAI,CAACR,KAAcQ,MAAWR,KAAc,CAAC,CAAC,WAAW,WAAW,EAAE,SAASO,EAAM,GAAG;AACpF;AAGJ,QAAME,IAAUV,EAAeC,GAAYO,EAAM,GAA8B;AAC/E,EAAIE,MACAF,EAAM,eAAA,GACNE,EAAQ,MAAA;AAEhB;AAEA,MAAMC,IAA4B,CAAC,mBAAmB,iBAAiB,GACjEC,IAAyB,CAAC,UAAU,MAAM;AAEzC,SAASC,EAAqBL,GAA6B;AAC9D,MAAI,CAACA;AACD,WAAO;AAGX,QAAM,EAAE,QAAAC,GAAQ,eAAAK,EAAA,IAAkBN;AAElC,MAAIO,IAAUN,aAAkB,UAAUA,IAAS;AAEnD,MAAI,CAACK,EAAc,SAASC,CAAO;AAC/B,WAAO;AAGX,SAAOA,KAAW,EAAEA,aAAmB,wBAAsB;AACzD,QAAIJ,EAA0B,KAAK,CAACK,MAAuBD,aAAmBC,CAAkB;AAC5F,aAAO;AAGX,UAAMC,IAAOF,EAAQ,aAAa,MAAM;AACxC,QAAIE,KAAQL,EAAuB,SAASK,CAAI;AAC5C,aAAO;AAGX,IAAAF,IAAUA,EAAQ;AAAA,EACtB;AAEA,SAAO;AACX;"}
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"size-x-small": "_size-x-small_1cjgh_19",
|
|
7
|
-
"size-small": "_size-small_1cjgh_24",
|
|
8
|
-
"size-medium": "_size-medium_1cjgh_29",
|
|
9
|
-
"size-large": "_size-large_1cjgh_34",
|
|
10
|
-
"color-default": "_color-default_1cjgh_39",
|
|
11
|
-
"color-weak": "_color-weak_1cjgh_43",
|
|
12
|
-
"color-x-weak": "_color-x-weak_1cjgh_47",
|
|
13
|
-
"color-disabled": "_color-disabled_1cjgh_51",
|
|
14
|
-
"color-negative": "_color-negative_1cjgh_55",
|
|
15
|
-
"color-positive": "_color-positive_1cjgh_59",
|
|
16
|
-
"color-warning": "_color-warning_1cjgh_63",
|
|
17
|
-
"color-interactive": "_color-interactive_1cjgh_67",
|
|
18
|
-
"color-box-neutral": "_color-box-neutral_1cjgh_71",
|
|
19
|
-
"color-box-selected": "_color-box-selected_1cjgh_75",
|
|
20
|
-
"color-box-disabled": "_color-box-disabled_1cjgh_79",
|
|
21
|
-
"color-box-positive": "_color-box-positive_1cjgh_83",
|
|
22
|
-
"color-box-negative": "_color-box-negative_1cjgh_87",
|
|
23
|
-
"color-box-warning": "_color-box-warning_1cjgh_91"
|
|
1
|
+
const t = "_root_fv6i9_3", n = "_mainContent_fv6i9_15", o = "_actionButton_fv6i9_28", e = "_secondaryContent_fv6i9_123", _ = {
|
|
2
|
+
root: t,
|
|
3
|
+
mainContent: n,
|
|
4
|
+
actionButton: o,
|
|
5
|
+
secondaryContent: e
|
|
24
6
|
};
|
|
25
7
|
export {
|
|
8
|
+
o as actionButton,
|
|
26
9
|
_ as default,
|
|
27
|
-
|
|
10
|
+
n as mainContent,
|
|
11
|
+
t as root,
|
|
12
|
+
e as secondaryContent
|
|
28
13
|
};
|
|
29
14
|
//# sourceMappingURL=fondue-components81.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components81.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components81.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,22 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useRef as W, useState as p, useEffect as w, useLayoutEffect as I } from "react";
|
|
2
|
+
const T = (e, s) => e.filter((f) => {
|
|
3
|
+
var c;
|
|
4
|
+
const t = (c = f.ref) == null ? void 0 : c.current;
|
|
5
|
+
return t ? t.offsetLeft + t.offsetWidth > (s == null ? void 0 : s.scrollLeft) + s.offsetWidth || t.offsetLeft - s.scrollLeft < 0 : !1;
|
|
6
|
+
}), a = (e, s) => {
|
|
7
|
+
const f = s.current, t = e == null ? void 0 : e.querySelector('[data-state="active"]');
|
|
8
|
+
if (!e || !(t instanceof HTMLButtonElement) || !(f instanceof HTMLSpanElement))
|
|
9
|
+
return;
|
|
10
|
+
const u = getComputedStyle(e).direction === "rtl", r = (e == null ? void 0 : e.scrollLeft) > (t == null ? void 0 : t.offsetLeft), l = (t == null ? void 0 : t.offsetLeft) + (t == null ? void 0 : t.offsetWidth) > (e == null ? void 0 : e.offsetWidth), o = (n) => u ? e.offsetWidth - n - t.offsetWidth : n;
|
|
11
|
+
if (r) {
|
|
12
|
+
if (e.offsetWidth > t.offsetWidth + t.offsetLeft)
|
|
13
|
+
f.style.insetInlineStart = `${o(t.offsetLeft)}px`;
|
|
14
|
+
else {
|
|
15
|
+
const i = e.offsetWidth - t.offsetWidth;
|
|
16
|
+
f.style.insetInlineStart = `${o(i)}px`;
|
|
17
|
+
}
|
|
18
|
+
f.style.width = `${t == null ? void 0 : t.offsetWidth}px`;
|
|
19
|
+
} else if (l) {
|
|
20
|
+
const n = e.clientWidth - t.offsetWidth;
|
|
21
|
+
f.style.insetInlineStart = `${o(n)}px`, f.style.width = `${t.offsetWidth}px`;
|
|
22
|
+
} else
|
|
23
|
+
f.style.insetInlineStart = `${o(t.offsetLeft)}px`, f.style.width = `${t.offsetWidth}px`;
|
|
24
|
+
}, b = ({
|
|
25
|
+
activeTab: e
|
|
26
|
+
}) => {
|
|
27
|
+
const s = W(null), f = W(null), [t, c] = p([]), [u, r] = p([]);
|
|
28
|
+
return w(() => {
|
|
29
|
+
const o = s.current, n = o == null ? void 0 : o.querySelector('[data-state="active"]');
|
|
30
|
+
n instanceof HTMLButtonElement && o instanceof HTMLDivElement && (a(o, f), n.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "end" }));
|
|
31
|
+
}, [e, f]), I(() => {
|
|
32
|
+
var i;
|
|
33
|
+
const o = s.current, n = o == null ? void 0 : o.querySelector('[data-state="active"]');
|
|
34
|
+
if (o instanceof HTMLDivElement && n instanceof HTMLButtonElement) {
|
|
35
|
+
a(o, f);
|
|
36
|
+
const d = new MutationObserver(() => {
|
|
37
|
+
n.scrollIntoView({ behavior: "instant", block: "nearest", inline: "end" }), a(o, f);
|
|
38
|
+
});
|
|
39
|
+
o.parentNode && d.observe(o.parentNode, { childList: !0 });
|
|
40
|
+
const h = new IntersectionObserver(
|
|
41
|
+
() => {
|
|
42
|
+
r(T(t, o)), a(o, f);
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
root: o,
|
|
46
|
+
threshold: 1
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
for (const v of t)
|
|
50
|
+
(i = v.ref) != null && i.current && h.observe(v.ref.current);
|
|
51
|
+
return () => {
|
|
52
|
+
h.disconnect(), d.disconnect();
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}, [t, s, f]), {
|
|
56
|
+
triggerListRef: s,
|
|
57
|
+
activeIndicatorRef: f,
|
|
58
|
+
triggersOutOfView: u,
|
|
59
|
+
triggers: t,
|
|
60
|
+
addTrigger: (o) => {
|
|
61
|
+
o.previousElement || c((n) => [...n, o]), c((n) => {
|
|
62
|
+
const i = n.findIndex((d) => d.element === o.previousElement);
|
|
63
|
+
return n[i] = o, [...n];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
10
67
|
};
|
|
11
68
|
export {
|
|
12
|
-
|
|
13
|
-
_ as iconError,
|
|
14
|
-
n as iconSuccess,
|
|
15
|
-
t as input,
|
|
16
|
-
p as inputWrapper,
|
|
17
|
-
r as loadingStatus,
|
|
18
|
-
c as placeholder,
|
|
19
|
-
o as root,
|
|
20
|
-
s as slot
|
|
69
|
+
b as useTabTriggers
|
|
21
70
|
};
|
|
22
71
|
//# sourceMappingURL=fondue-components82.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components82.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"fondue-components82.js","sources":["../src/components/Tabs/hooks/useTabTriggers.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { type TabTrigger } from '../types';\n\nconst getOverflowingTriggers = (triggers: TabTrigger[], triggerListElement: HTMLDivElement) => {\n return triggers.filter((trigger) => {\n const triggerElement = trigger.ref?.current;\n if (!triggerElement) {\n return false;\n }\n return (\n triggerElement.offsetLeft + triggerElement.offsetWidth >\n triggerListElement?.scrollLeft + triggerListElement.offsetWidth ||\n triggerElement.offsetLeft - triggerListElement.scrollLeft < 0\n );\n });\n};\n\nconst moveActiveIndicator = (triggerListElement: HTMLDivElement, activeIndicatorRef: RefObject<HTMLSpanElement>) => {\n const activeIndicatorElement = activeIndicatorRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (\n !triggerListElement ||\n !(activeTriggerElement instanceof HTMLButtonElement) ||\n !(activeIndicatorElement instanceof HTMLSpanElement)\n ) {\n return;\n }\n\n // Get the computed direction to handle RTL correctly\n const direction = getComputedStyle(triggerListElement).direction;\n const isRTL = direction === 'rtl';\n\n const isOverflowingLeft = triggerListElement?.scrollLeft > activeTriggerElement?.offsetLeft;\n const isOverflowingRight =\n activeTriggerElement?.offsetLeft + activeTriggerElement?.offsetWidth > triggerListElement?.offsetWidth;\n\n // Helper function to calculate position based on direction\n const getInlineStartPosition = (position: number) => {\n if (isRTL) {\n // In RTL, insetInlineStart maps to 'right', so we need to calculate from the right edge\n return triggerListElement.offsetWidth - position - activeTriggerElement.offsetWidth;\n }\n return position;\n };\n\n if (isOverflowingLeft) {\n const willFitAllItemsToTheLeft =\n triggerListElement.offsetWidth > activeTriggerElement.offsetWidth + activeTriggerElement.offsetLeft;\n if (willFitAllItemsToTheLeft) {\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(activeTriggerElement.offsetLeft)}px`;\n } else {\n const position = triggerListElement.offsetWidth - activeTriggerElement.offsetWidth;\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(position)}px`;\n }\n activeIndicatorElement.style.width = `${activeTriggerElement?.offsetWidth}px`;\n } else if (isOverflowingRight) {\n const position = triggerListElement.clientWidth - activeTriggerElement.offsetWidth;\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(position)}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n } else {\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(activeTriggerElement.offsetLeft)}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n }\n};\n\nexport const useTabTriggers = ({\n activeTab,\n}: {\n activeTab?: string;\n}): {\n triggerListRef: RefObject<HTMLDivElement>;\n activeIndicatorRef: RefObject<HTMLSpanElement>;\n triggers: TabTrigger[];\n triggersOutOfView: TabTrigger[];\n addTrigger: (trigger: TabTrigger) => void;\n} => {\n const triggerListRef = useRef<HTMLDivElement | null>(null);\n const activeIndicatorRef = useRef<HTMLSpanElement | null>(null);\n const [triggers, setTriggers] = useState<TabTrigger[]>([]);\n const [triggersOutOfView, setTriggersOutOfView] = useState<TabTrigger[]>([]);\n\n // move the active indicator and scroll to the correct position when the tab changes\n useEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (activeTriggerElement instanceof HTMLButtonElement && triggerListElement instanceof HTMLDivElement) {\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n activeTriggerElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'end' });\n }\n }, [activeTab, activeIndicatorRef]);\n\n useLayoutEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (triggerListElement instanceof HTMLDivElement && activeTriggerElement instanceof HTMLButtonElement) {\n // move the active indicator to the initial active tab\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n\n // observe addition of the dropdown trigger which reduces the available width\n const mutationObserver = new MutationObserver(() => {\n activeTriggerElement.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'end' });\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n });\n if (triggerListElement.parentNode) {\n mutationObserver.observe(triggerListElement.parentNode, { childList: true });\n }\n\n // calculate the overflowing elements when item starts overflowing the parent\n const intersectionObserver = new IntersectionObserver(\n () => {\n setTriggersOutOfView(getOverflowingTriggers(triggers, triggerListElement));\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n },\n {\n root: triggerListElement,\n threshold: 1,\n },\n );\n for (const trigger of triggers) {\n if (trigger.ref?.current) {\n intersectionObserver.observe(trigger.ref.current);\n }\n }\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n }\n }, [triggers, triggerListRef, activeIndicatorRef]);\n\n const addTrigger = (trigger: TabTrigger) => {\n if (!trigger.previousElement) {\n setTriggers((prev) => [...prev, trigger]);\n }\n\n setTriggers((prev) => {\n const index = prev.findIndex((element) => element.element === trigger.previousElement);\n prev[index] = trigger;\n return [...prev];\n });\n };\n\n return {\n triggerListRef,\n activeIndicatorRef,\n triggersOutOfView,\n triggers,\n addTrigger,\n };\n};\n"],"names":["getOverflowingTriggers","triggers","triggerListElement","trigger","triggerElement","_a","moveActiveIndicator","activeIndicatorRef","activeIndicatorElement","activeTriggerElement","isRTL","isOverflowingLeft","isOverflowingRight","getInlineStartPosition","position","useTabTriggers","activeTab","triggerListRef","useRef","setTriggers","useState","triggersOutOfView","setTriggersOutOfView","useEffect","useLayoutEffect","mutationObserver","intersectionObserver","prev","index","element"],"mappings":"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"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
success: c,
|
|
9
|
-
error: n,
|
|
10
|
-
loadingStatus: e,
|
|
11
|
-
spin: a
|
|
1
|
+
const t = "_root_1f9jh_5", r = "_triggerListWrapper_1f9jh_13", e = "_trigger_1f9jh_13", i = "_activeIndicator_1f9jh_61", o = "_triggerList_1f9jh_13", g = "_content_1f9jh_149", _ = {
|
|
2
|
+
root: t,
|
|
3
|
+
triggerListWrapper: r,
|
|
4
|
+
trigger: e,
|
|
5
|
+
activeIndicator: i,
|
|
6
|
+
triggerList: o,
|
|
7
|
+
content: g
|
|
12
8
|
};
|
|
13
9
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
c as success,
|
|
22
|
-
t as textarea,
|
|
23
|
-
_ as tools,
|
|
24
|
-
l as toolsButton
|
|
10
|
+
i as activeIndicator,
|
|
11
|
+
g as content,
|
|
12
|
+
_ as default,
|
|
13
|
+
t as root,
|
|
14
|
+
e as trigger,
|
|
15
|
+
o as triggerList,
|
|
16
|
+
r as triggerListWrapper
|
|
25
17
|
};
|
|
26
18
|
//# sourceMappingURL=fondue-components83.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components83.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components83.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const o = "_root_1m55x_2", _ = {
|
|
2
|
+
root: o,
|
|
3
|
+
"weight-default": "_weight-default_1m55x_7",
|
|
4
|
+
"weight-strong": "_weight-strong_1m55x_11",
|
|
5
|
+
"weight-x-strong": "_weight-x-strong_1m55x_15",
|
|
6
|
+
"size-x-small": "_size-x-small_1m55x_19",
|
|
7
|
+
"size-small": "_size-small_1m55x_24",
|
|
8
|
+
"size-medium": "_size-medium_1m55x_29",
|
|
9
|
+
"size-large": "_size-large_1m55x_34",
|
|
10
|
+
"color-default": "_color-default_1m55x_39",
|
|
11
|
+
"color-weak": "_color-weak_1m55x_43",
|
|
12
|
+
"color-disabled": "_color-disabled_1m55x_47",
|
|
13
|
+
"color-negative": "_color-negative_1m55x_51",
|
|
14
|
+
"color-positive": "_color-positive_1m55x_55",
|
|
15
|
+
"color-warning": "_color-warning_1m55x_59",
|
|
16
|
+
"color-interactive": "_color-interactive_1m55x_63",
|
|
17
|
+
"color-box-neutral": "_color-box-neutral_1m55x_67",
|
|
18
|
+
"color-box-selected": "_color-box-selected_1m55x_71",
|
|
19
|
+
"color-box-disabled": "_color-box-disabled_1m55x_75",
|
|
20
|
+
"color-box-positive": "_color-box-positive_1m55x_79",
|
|
21
|
+
"color-box-negative": "_color-box-negative_1m55x_83",
|
|
22
|
+
"color-box-warning": "_color-box-warning_1m55x_87"
|
|
4
23
|
};
|
|
5
24
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
r as light
|
|
25
|
+
_ as default,
|
|
26
|
+
o as root
|
|
9
27
|
};
|
|
10
28
|
//# sourceMappingURL=fondue-components84.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components84.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components84.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Flyout_close: "Close",
|
|
11
|
-
Select_clear: "clear input",
|
|
12
|
-
Select_toggleMenu: "toggle menu",
|
|
13
|
-
Switch_defaultLabel: "Switch",
|
|
14
|
-
Table_sortByDescending: "Sort by ${column} descending",
|
|
15
|
-
Table_sortByAscending: "Sort by ${column} ascending",
|
|
16
|
-
Table_sortDescending: "Sort descending",
|
|
17
|
-
Table_sortAscending: "Sort ascending",
|
|
18
|
-
Badge_dismiss: "Dismiss ${label}"
|
|
1
|
+
const o = "_root_m6yyd_5", t = "_slot_m6yyd_67", c = "_input_m6yyd_67", n = "_placeholder_m6yyd_72", s = "_iconSuccess_m6yyd_150", _ = "_iconError_m6yyd_158", r = "_loadingStatus_m6yyd_171", y = "_inputWrapper_m6yyd_195", p = {
|
|
2
|
+
root: o,
|
|
3
|
+
slot: t,
|
|
4
|
+
input: c,
|
|
5
|
+
placeholder: n,
|
|
6
|
+
iconSuccess: s,
|
|
7
|
+
iconError: _,
|
|
8
|
+
loadingStatus: r,
|
|
9
|
+
inputWrapper: y
|
|
19
10
|
};
|
|
20
11
|
export {
|
|
21
|
-
|
|
12
|
+
p as default,
|
|
13
|
+
_ as iconError,
|
|
14
|
+
s as iconSuccess,
|
|
15
|
+
c as input,
|
|
16
|
+
y as inputWrapper,
|
|
17
|
+
r as loadingStatus,
|
|
18
|
+
n as placeholder,
|
|
19
|
+
o as root,
|
|
20
|
+
t as slot
|
|
22
21
|
};
|
|
23
22
|
//# sourceMappingURL=fondue-components85.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components85.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components85.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_1prse_5", s = "_textarea_1prse_73", t = "_slot_1prse_123", r = "_decorator_1prse_137", _ = "_tools_1prse_150", e = "_toolsButton_1prse_162", c = "_success_1prse_194", n = "_error_1prse_198", a = "_loadingStatus_1prse_202", l = "_spin_1prse_1", p = {
|
|
2
2
|
root: o,
|
|
3
|
-
|
|
3
|
+
textarea: s,
|
|
4
|
+
slot: t,
|
|
5
|
+
decorator: r,
|
|
6
|
+
tools: _,
|
|
7
|
+
toolsButton: e,
|
|
8
|
+
success: c,
|
|
9
|
+
error: n,
|
|
10
|
+
loadingStatus: a,
|
|
11
|
+
spin: l
|
|
4
12
|
};
|
|
5
13
|
export {
|
|
6
|
-
r as
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
r as decorator,
|
|
15
|
+
p as default,
|
|
16
|
+
n as error,
|
|
17
|
+
a as loadingStatus,
|
|
18
|
+
o as root,
|
|
19
|
+
t as slot,
|
|
20
|
+
l as spin,
|
|
21
|
+
c as success,
|
|
22
|
+
s as textarea,
|
|
23
|
+
_ as tools,
|
|
24
|
+
e as toolsButton
|
|
9
25
|
};
|
|
10
26
|
//# sourceMappingURL=fondue-components86.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components86.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components86.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const a = "_base_9n8a0_1", s = "_dark_9n8a0_249", t = "_light_9n8a0_330", _ = {
|
|
2
|
+
base: a,
|
|
3
|
+
dark: s,
|
|
4
|
+
light: t
|
|
3
5
|
};
|
|
4
6
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
a as base,
|
|
8
|
+
s as dark,
|
|
9
|
+
_ as default,
|
|
10
|
+
t as light
|
|
7
11
|
};
|
|
8
12
|
//# sourceMappingURL=fondue-components87.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components87.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components87.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const e = {
|
|
2
|
+
ColorPicker_selectColor: "Select Color",
|
|
3
|
+
ColorPicker_selectFormat: "Select a color format",
|
|
4
|
+
ColorPicker_hexValue: "Hex color value",
|
|
5
|
+
ColorPicker_redChannel: "Red Color Channel",
|
|
6
|
+
ColorPicker_greenChannel: "Green Color Channel",
|
|
7
|
+
ColorPicker_blueChannel: "Blue Color Channel",
|
|
8
|
+
ColorPicker_opacity: "Color Opacity",
|
|
9
|
+
Dialog_close: "Close",
|
|
10
|
+
Flyout_close: "Close",
|
|
11
|
+
Select_clear: "clear input",
|
|
12
|
+
Select_toggleMenu: "toggle menu",
|
|
13
|
+
Switch_defaultLabel: "Switch",
|
|
14
|
+
Table_sortByDescending: "Sort by ${column} descending",
|
|
15
|
+
Table_sortByAscending: "Sort by ${column} ascending",
|
|
16
|
+
Table_sortDescending: "Sort descending",
|
|
17
|
+
Table_sortAscending: "Sort ascending",
|
|
18
|
+
Badge_dismiss: "Dismiss ${label}"
|
|
4
19
|
};
|
|
5
20
|
export {
|
|
6
|
-
|
|
21
|
+
e as enUS
|
|
7
22
|
};
|
|
8
23
|
//# sourceMappingURL=fondue-components88.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components88.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components88.js","sources":["../src/locales/en-US.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const enUS = {\n ColorPicker_selectColor: 'Select Color',\n ColorPicker_selectFormat: 'Select a color format',\n ColorPicker_hexValue: 'Hex color value',\n ColorPicker_redChannel: 'Red Color Channel',\n ColorPicker_greenChannel: 'Green Color Channel',\n ColorPicker_blueChannel: 'Blue Color Channel',\n ColorPicker_opacity: 'Color Opacity',\n Dialog_close: 'Close',\n Flyout_close: 'Close',\n Select_clear: 'clear input',\n Select_toggleMenu: 'toggle menu',\n Switch_defaultLabel: 'Switch',\n Table_sortByDescending: 'Sort by ${column} descending',\n Table_sortByAscending: 'Sort by ${column} ascending',\n Table_sortDescending: 'Sort descending',\n Table_sortAscending: 'Sort ascending',\n Badge_dismiss: 'Dismiss ${label}',\n};\n"],"names":["enUS"],"mappings":"AAEO,MAAMA,IAAO;AAAA,EAChB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,0BAA0B;AAAA,EAC1B,yBAAyB;AAAA,EACzB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,eAAe;AACnB;"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_jwtp8_4", t = "_arrow_jwtp8_27", r = {
|
|
2
2
|
root: o,
|
|
3
|
-
|
|
4
|
-
caret: t,
|
|
5
|
-
colorName: _,
|
|
6
|
-
button: n,
|
|
7
|
-
colorIndicator: e,
|
|
8
|
-
actions: r
|
|
3
|
+
arrow: t
|
|
9
4
|
};
|
|
10
5
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t as caret,
|
|
14
|
-
c as clearIcon,
|
|
15
|
-
e as colorIndicator,
|
|
16
|
-
_ as colorName,
|
|
17
|
-
a as default,
|
|
6
|
+
t as arrow,
|
|
7
|
+
r as default,
|
|
18
8
|
o as root
|
|
19
9
|
};
|
|
20
10
|
//# sourceMappingURL=fondue-components89.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components89.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components89.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -2,11 +2,11 @@ import { jsx as e, jsxs as P } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconCross as j } from "@frontify/fondue-icons";
|
|
3
3
|
import * as d from "@radix-ui/react-dialog";
|
|
4
4
|
import { createContext as q, forwardRef as l, useRef as B, useContext as z, useMemo as E } from "react";
|
|
5
|
-
import { useSyncRefs as L } from "./fondue-
|
|
6
|
-
import { useTranslation as _ } from "./fondue-
|
|
7
|
-
import { addShowFocusRing as $, addAutoFocusAttribute as k } from "./fondue-
|
|
8
|
-
import { useFondueTheme as G, ThemeProvider as I } from "./fondue-
|
|
9
|
-
import n from "./fondue-
|
|
5
|
+
import { useSyncRefs as L } from "./fondue-components51.js";
|
|
6
|
+
import { useTranslation as _ } from "./fondue-components36.js";
|
|
7
|
+
import { addShowFocusRing as $, addAutoFocusAttribute as k } from "./fondue-components52.js";
|
|
8
|
+
import { useFondueTheme as G, ThemeProvider as I } from "./fondue-components33.js";
|
|
9
|
+
import n from "./fondue-components53.js";
|
|
10
10
|
const p = q({ isModal: !1 });
|
|
11
11
|
p.displayName = "DialogContext";
|
|
12
12
|
const h = ({ children: t, modal: o, onOpenChange: a, open: i }) => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = "_root_b0bc4_2", t = {
|
|
2
|
+
root: o
|
|
3
|
+
};
|
|
2
4
|
export {
|
|
3
|
-
t as
|
|
5
|
+
t as default,
|
|
6
|
+
o as root
|
|
4
7
|
};
|
|
5
8
|
//# sourceMappingURL=fondue-components90.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components90.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components90.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,43 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children: o,
|
|
5
|
-
value: r,
|
|
6
|
-
label: s
|
|
7
|
-
}) => o && typeof o == "string" ? {
|
|
8
|
-
value: r || o,
|
|
9
|
-
label: s || o
|
|
10
|
-
} : {
|
|
11
|
-
value: r || "",
|
|
12
|
-
label: s || r || "",
|
|
13
|
-
...o ? { children: o } : null
|
|
14
|
-
}, w = (o, r) => u(o) && o.type === r, y = (o, r, s, p = 0) => {
|
|
15
|
-
const n = [];
|
|
16
|
-
let t = 0;
|
|
17
|
-
return a.forEach(o, (e) => {
|
|
18
|
-
if (w(e, E) && u(e))
|
|
19
|
-
g(e.props).label.toLowerCase().includes((s == null ? void 0 : s.toLowerCase()) || "") && (n.push(r(e, p + t)), t++);
|
|
20
|
-
else if (u(e) && (e != null && e.props.children)) {
|
|
21
|
-
const { parsedChildren: m, subElementCount: C } = y(
|
|
22
|
-
e.props.children,
|
|
23
|
-
r,
|
|
24
|
-
"",
|
|
25
|
-
p + t
|
|
26
|
-
);
|
|
27
|
-
e = f(e, {
|
|
28
|
-
children: m,
|
|
29
|
-
key: `group-${p + t}`
|
|
30
|
-
}), n.push(e), t += C;
|
|
31
|
-
} else
|
|
32
|
-
n.push(e);
|
|
33
|
-
}), {
|
|
34
|
-
parsedChildren: n,
|
|
35
|
-
subElementCount: t
|
|
36
|
-
};
|
|
1
|
+
const r = (e) => {
|
|
2
|
+
if (e)
|
|
3
|
+
return `rgba(${e.red}, ${e.green}, ${e.blue}, ${e.alpha ?? 1})`;
|
|
37
4
|
};
|
|
38
5
|
export {
|
|
39
|
-
|
|
40
|
-
w as isReactLeaf,
|
|
41
|
-
y as recursiveMap
|
|
6
|
+
r as colorToCss
|
|
42
7
|
};
|
|
43
8
|
//# sourceMappingURL=fondue-components91.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components91.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components91.js","sources":["../src/components/Badge/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RgbaColor } from './types';\n\nexport const DEFAULT_COLOR = { red: 255, green: 255, blue: 255, alpha: 1, name: '' };\n\n/**\n * Converts a color object to a CSS color string.\n * @param {RgbaColor} color - The color object to be converted.\n * @returns {string}\n * @example\n * colorToCss({ red: 255, green: 255, blue: 255, alpha: 1 }); // 'rgba(255, 255, 255, 1)'\n * @example\n * colorToCss({ red: 255, green: 87, blue: 51, alpha: 1 }); // 'rgba(255, 87, 51, 1)'\n * @example\n * colorToCss({ red: 0, green: 0, blue: 0, alpha: 0 }); // 'rgba(0, 0, 0, 0)'\n */\nexport const colorToCss = (color?: RgbaColor) => {\n if (!color) {\n return undefined;\n }\n return `rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha ?? 1})`;\n};\n"],"names":["colorToCss","color"],"mappings":"AAiBO,MAAMA,IAAa,CAACC,MAAsB;AAC7C,MAAKA;AAGL,WAAO,QAAQA,EAAM,GAAG,KAAKA,EAAM,KAAK,KAAKA,EAAM,IAAI,KAAKA,EAAM,SAAS,CAAC;AAChF;"}
|