@frontify/fondue-components 25.0.0 → 26.0.2
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-components100.js +9 -0
- package/dist/fondue-components100.js.map +1 -0
- package/dist/fondue-components101.js +15 -0
- package/dist/fondue-components101.js.map +1 -0
- package/dist/fondue-components102.js +74 -0
- package/dist/fondue-components102.js.map +1 -0
- package/dist/fondue-components103.js +18 -0
- package/dist/fondue-components103.js.map +1 -0
- package/dist/fondue-components104.js +10 -0
- package/dist/fondue-components104.js.map +1 -0
- package/dist/fondue-components105.js +92 -0
- package/dist/fondue-components105.js.map +1 -0
- package/dist/fondue-components106.js +84 -0
- package/dist/fondue-components106.js.map +1 -0
- package/dist/fondue-components107.js +34 -0
- package/dist/fondue-components107.js.map +1 -0
- package/dist/fondue-components108.js +24 -0
- package/dist/fondue-components108.js.map +1 -0
- package/dist/fondue-components109.js +43 -0
- package/dist/fondue-components109.js.map +1 -0
- package/dist/fondue-components26.js +23 -143
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +2 -2
- package/dist/fondue-components47.js +1 -1
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components71.js +20 -154
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +20 -19
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +18 -79
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +20 -8
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +19 -37
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +8 -71
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components90.js +5 -0
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components92.js +3 -15
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +4 -4
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +16 -4
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +209 -38
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +17 -19
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +23 -0
- package/dist/fondue-components97.js.map +1 -0
- package/dist/fondue-components98.js +154 -0
- package/dist/fondue-components98.js.map +1 -0
- package/dist/fondue-components99.js +48 -0
- package/dist/fondue-components99.js.map +1 -0
- package/dist/index.d.ts +122 -136
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,84 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
highlightedIndex: p,
|
|
10
|
-
getMenuProps: c,
|
|
11
|
-
getItemProps: m,
|
|
12
|
-
children: f,
|
|
13
|
-
filterText: d,
|
|
14
|
-
align: h,
|
|
15
|
-
side: v,
|
|
16
|
-
selectedItem: o,
|
|
17
|
-
hasInteractedSinceOpening: P,
|
|
18
|
-
viewportCollisionPadding: S = "compact",
|
|
19
|
-
onEscapeKeyDown: g
|
|
20
|
-
}) => {
|
|
21
|
-
const O = (e) => {
|
|
22
|
-
e.preventDefault();
|
|
23
|
-
}, N = {
|
|
24
|
-
compact: 8,
|
|
25
|
-
spacious: 24
|
|
26
|
-
}, { theme: A, dir: a } = T(), C = (e) => a === "ltr" ? e : e === "left" ? "right" : e === "right" ? "left" : e;
|
|
27
|
-
return /* @__PURE__ */ r(u.Portal, { children: /* @__PURE__ */ r(E, { theme: A, dir: a, children: /* @__PURE__ */ r(
|
|
28
|
-
u.Content,
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { SelectBase as u } from "./fondue-components98.js";
|
|
4
|
+
import { useMultiselect as a } from "./fondue-components96.js";
|
|
5
|
+
const n = ({ value: e, onSelect: t, defaultValue: l, ...o }, r) => {
|
|
6
|
+
const { selectedItemValues: m, toggleSelectedItem: c, clear: i } = a(t, e, l);
|
|
7
|
+
return /* @__PURE__ */ p(
|
|
8
|
+
u,
|
|
29
9
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className: i.portal,
|
|
37
|
-
children: /* @__PURE__ */ r(
|
|
38
|
-
"ul",
|
|
39
|
-
{
|
|
40
|
-
className: i.menu,
|
|
41
|
-
...c({}, { suppressRefError: !0 }),
|
|
42
|
-
"data-has-interacted": P ? "true" : "false",
|
|
43
|
-
"data-test-id": "fondue-select-menu",
|
|
44
|
-
children: F(
|
|
45
|
-
f,
|
|
46
|
-
(e, s) => {
|
|
47
|
-
if (((t) => (
|
|
48
|
-
// @ts-expect-error - We are explicitly checking for ref
|
|
49
|
-
M(t) && t.ref !== void 0
|
|
50
|
-
))(e)) {
|
|
51
|
-
const t = R(e.props), n = m({
|
|
52
|
-
item: t,
|
|
53
|
-
index: s,
|
|
54
|
-
...e.ref ? { ref: e.ref } : {}
|
|
55
|
-
}), l = (o == null ? void 0 : o.value) === t.value;
|
|
56
|
-
return /* @__PURE__ */ r(
|
|
57
|
-
D,
|
|
58
|
-
{
|
|
59
|
-
className: i.item,
|
|
60
|
-
"data-highlighted": p === s,
|
|
61
|
-
"data-selected": l,
|
|
62
|
-
onTouchStart: (V) => {
|
|
63
|
-
n.onClick && n.onClick(V);
|
|
64
|
-
},
|
|
65
|
-
...n,
|
|
66
|
-
"aria-selected": l,
|
|
67
|
-
children: e
|
|
68
|
-
},
|
|
69
|
-
e.props.value
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
d
|
|
74
|
-
).parsedChildren
|
|
75
|
-
}
|
|
76
|
-
)
|
|
10
|
+
ref: r,
|
|
11
|
+
multiple: !0,
|
|
12
|
+
selectedItemValues: m,
|
|
13
|
+
onItemSelect: c,
|
|
14
|
+
onClear: i,
|
|
15
|
+
...o
|
|
77
16
|
}
|
|
78
|
-
)
|
|
79
|
-
};
|
|
80
|
-
|
|
17
|
+
);
|
|
18
|
+
}, f = s(n);
|
|
19
|
+
f.displayName = "Select.Multi";
|
|
81
20
|
export {
|
|
82
|
-
|
|
21
|
+
f as SelectMultiple
|
|
83
22
|
};
|
|
84
23
|
//# sourceMappingURL=fondue-components73.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components73.js","sources":["../src/components/Select/
|
|
1
|
+
{"version":3,"file":"fondue-components73.js","sources":["../src/components/Select/SelectMultiple.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef } from 'react';\n\nimport { SelectBase, type SelectSharedProps } from './components/SelectBase';\nimport { useMultiselect } from './hooks/useMultiselect';\n\nexport type SelectMultipleProps = SelectSharedProps & {\n /**\n * The active value in the select component. This is used to control the select externally\n */\n value?: string[] | null;\n /**\n * Callback function that is called when items are selected\n */\n onSelect?: (selectedValues: string[] | null) => void;\n /**\n * The default value of the select component. Used for uncontrolled usages\n */\n defaultValue?: string[];\n};\n\nconst SelectMultipleInput = (\n { value, onSelect, defaultValue, ...rest }: SelectMultipleProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { selectedItemValues, toggleSelectedItem, clear } = useMultiselect(onSelect, value, defaultValue);\n\n return (\n <SelectBase\n ref={ref}\n multiple\n selectedItemValues={selectedItemValues}\n onItemSelect={toggleSelectedItem}\n onClear={clear}\n {...rest}\n />\n );\n};\n\nexport const SelectMultiple = forwardRef<HTMLDivElement, SelectMultipleProps>(SelectMultipleInput);\nSelectMultiple.displayName = 'Select.Multi';\n"],"names":["SelectMultipleInput","value","onSelect","defaultValue","rest","ref","selectedItemValues","toggleSelectedItem","clear","useMultiselect","jsx","SelectBase","SelectMultiple","forwardRef"],"mappings":";;;;AAsBA,MAAMA,IAAsB,CACxB,EAAE,OAAAC,GAAO,UAAAC,GAAU,cAAAC,GAAc,GAAGC,EAAA,GACpCC,MACC;AACD,QAAM,EAAE,oBAAAC,GAAoB,oBAAAC,GAAoB,OAAAC,EAAA,IAAUC,EAAeP,GAAUD,GAAOE,CAAY;AAEtG,SACI,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,KAAAN;AAAA,MACA,UAAQ;AAAA,MACR,oBAAAC;AAAA,MACA,cAAcC;AAAA,MACd,SAASC;AAAA,MACR,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGhB,GAEaQ,IAAiBC,EAAgDb,CAAmB;AACjGY,EAAe,cAAc;"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import { SelectBase as S } from "./fondue-components98.js";
|
|
4
|
+
import { useSingleSelect as a } from "./fondue-components97.js";
|
|
5
|
+
const p = ({ value: e, onSelect: t, defaultValue: l, ...o }, r) => {
|
|
6
|
+
const { selectedItemValues: m, selectItem: c, clear: s } = a(t, e, l);
|
|
7
|
+
return /* @__PURE__ */ n(
|
|
8
|
+
S,
|
|
9
|
+
{
|
|
10
|
+
ref: r,
|
|
11
|
+
multiple: !1,
|
|
12
|
+
selectedItemValues: m,
|
|
13
|
+
onItemSelect: c,
|
|
14
|
+
onClear: s,
|
|
15
|
+
...o
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}, f = i(p);
|
|
19
|
+
f.displayName = "Select";
|
|
7
20
|
export {
|
|
8
|
-
|
|
9
|
-
t as SelectSlot
|
|
21
|
+
f as SelectSingle
|
|
10
22
|
};
|
|
11
23
|
//# sourceMappingURL=fondue-components74.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components74.js","sources":["../src/components/Select/
|
|
1
|
+
{"version":3,"file":"fondue-components74.js","sources":["../src/components/Select/SelectSingle.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef } from 'react';\n\nimport { SelectBase, type SelectSharedProps } from './components/SelectBase';\nimport { useSingleSelect } from './hooks/useSingleSelect';\n\nexport type SelectSingleProps = SelectSharedProps & {\n /**\n * The active value in the select component. This is used to control the select externally\n */\n value?: string | null;\n /**\n * Callback function that is called when an item is selected\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The default value of the select component. Used for uncontrolled usages\n */\n defaultValue?: string;\n};\n\nconst SelectSingleInput = (\n { value, onSelect, defaultValue, ...rest }: SelectSingleProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { selectedItemValues, selectItem, clear } = useSingleSelect(onSelect, value, defaultValue);\n\n return (\n <SelectBase\n ref={ref}\n multiple={false}\n selectedItemValues={selectedItemValues}\n onItemSelect={selectItem}\n onClear={clear}\n {...rest}\n />\n );\n};\n\nexport const SelectSingle = forwardRef<HTMLDivElement, SelectSingleProps>(SelectSingleInput);\nSelectSingle.displayName = 'Select';\n"],"names":["SelectSingleInput","value","onSelect","defaultValue","rest","ref","selectedItemValues","selectItem","clear","useSingleSelect","jsx","SelectBase","SelectSingle","forwardRef"],"mappings":";;;;AAsBA,MAAMA,IAAoB,CACtB,EAAE,OAAAC,GAAO,UAAAC,GAAU,cAAAC,GAAc,GAAGC,EAAA,GACpCC,MACC;AACD,QAAM,EAAE,oBAAAC,GAAoB,YAAAC,GAAY,OAAAC,EAAA,IAAUC,EAAgBP,GAAUD,GAAOE,CAAY;AAE/F,SACI,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,KAAAN;AAAA,MACA,UAAU;AAAA,MACV,oBAAAC;AAAA,MACA,cAAcC;AAAA,MACd,SAASC;AAAA,MACR,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGhB,GAEaQ,IAAeC,EAA8Cb,CAAiB;AAC3FY,EAAa,cAAc;"}
|
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
itemValue: m,
|
|
17
|
-
group: g,
|
|
18
|
-
groupHeading: d
|
|
19
|
-
};
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { IconCheckMark as n } from "@frontify/fondue-icons";
|
|
3
|
+
import { forwardRef as l } from "react";
|
|
4
|
+
import a from "./fondue-components99.js";
|
|
5
|
+
const o = ({ "data-test-id": c = "fondue-select-item", ...e }, t) => /* @__PURE__ */ d("li", { "data-test-id": c, ref: t, ...e, children: [
|
|
6
|
+
/* @__PURE__ */ r("div", { className: a.itemValue, children: e.children }),
|
|
7
|
+
/* @__PURE__ */ r(n, { className: a.checkmarkIcon })
|
|
8
|
+
] });
|
|
9
|
+
o.displayName = "Select.Item";
|
|
10
|
+
const I = l(o), s = ({ children: c, groupId: e, heading: t, "data-test-id": i = "fondue-select-item-group" }, m) => /* @__PURE__ */ d("div", { "data-test-id": i, className: a.group, ref: m, children: [
|
|
11
|
+
t ? /* @__PURE__ */ r("div", { className: a.groupHeading, children: /* @__PURE__ */ r("span", { children: t }) }) : null,
|
|
12
|
+
c
|
|
13
|
+
] }, e);
|
|
14
|
+
s.displayName = "Select.Group";
|
|
15
|
+
const N = l(s);
|
|
20
16
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
k as default,
|
|
26
|
-
g as group,
|
|
27
|
-
d as groupHeading,
|
|
28
|
-
r as iconError,
|
|
29
|
-
s as iconSuccess,
|
|
30
|
-
u as icons,
|
|
31
|
-
_ as input,
|
|
32
|
-
l as item,
|
|
33
|
-
m as itemValue,
|
|
34
|
-
p as menu,
|
|
35
|
-
a as portal,
|
|
36
|
-
c as root,
|
|
37
|
-
o as selectedValue,
|
|
38
|
-
e as slot
|
|
17
|
+
I as ForwardedRefSelectItem,
|
|
18
|
+
N as ForwardedRefSelectItemGroup,
|
|
19
|
+
o as SelectItem,
|
|
20
|
+
s as SelectItemGroup
|
|
39
21
|
};
|
|
40
22
|
//# sourceMappingURL=fondue-components75.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components75.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components75.js","sources":["../src/components/Select/components/SelectItem.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark } from '@frontify/fondue-icons';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport styles from '../styles/select.module.scss';\n\nexport type SelectItemProps = {\n /**\n * The value of the select item.\n */\n value: string;\n /**\n * The data test id of the select item.\n */\n 'data-test-id'?: string;\n} & (\n | {\n /**\n * The label of the select item. Required when the child is not a string.\n */\n label: string;\n /**\n * The children of the select item. This can be a custom component or a string.\n */\n children?: ReactNode;\n }\n | {\n label?: string;\n children: string;\n }\n);\n\nexport const SelectItem = (\n { 'data-test-id': dataTestId = 'fondue-select-item', ...props }: SelectItemProps,\n forwardedRef?: ForwardedRef<HTMLLIElement>,\n) => {\n return (\n <li data-test-id={dataTestId} ref={forwardedRef} {...props}>\n <div className={styles.itemValue}>{props.children}</div>\n <IconCheckMark className={styles.checkmarkIcon} />\n </li>\n );\n};\nSelectItem.displayName = 'Select.Item';\n\nexport const ForwardedRefSelectItem = forwardRef<HTMLLIElement, SelectItemProps>(SelectItem);\n\nexport type SelectItemGroupProps = {\n /**\n * The children of the select item group. This can contain multiple `Select.Item` components.\n */\n children: ReactNode;\n /**\n * The internal group ID of the select item group.\n */\n groupId: string;\n /**\n * The groups heading\n */\n heading?: string;\n /**\n * The data test id of the select item group.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectItemGroup = (\n { children, groupId, heading, 'data-test-id': dataTestId = 'fondue-select-item-group' }: SelectItemGroupProps,\n forwardedRef?: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} className={styles.group} ref={forwardedRef} key={groupId}>\n {heading ? (\n <div className={styles.groupHeading}>\n <span>{heading}</span>\n </div>\n ) : null}\n {children}\n </div>\n );\n};\nSelectItemGroup.displayName = 'Select.Group';\n\nexport const ForwardedRefSelectItemGroup = forwardRef<HTMLDivElement, SelectItemGroupProps>(SelectItemGroup);\n"],"names":["SelectItem","dataTestId","props","forwardedRef","jsx","styles","IconCheckMark","ForwardedRefSelectItem","forwardRef","SelectItemGroup","children","groupId","heading","jsxs","ForwardedRefSelectItemGroup"],"mappings":";;;;AAiCO,MAAMA,IAAa,CACtB,EAAE,gBAAgBC,IAAa,sBAAsB,GAAGC,EAAA,GACxDC,wBAGK,MAAA,EAAG,gBAAcF,GAAY,KAAKE,GAAe,GAAGD,GACjD,UAAA;AAAA,EAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWC,EAAO,WAAY,YAAM,UAAS;AAAA,EAClD,gBAAAD,EAACE,GAAA,EAAc,WAAWD,EAAO,cAAA,CAAe;AAAA,GACpD;AAGRL,EAAW,cAAc;AAElB,MAAMO,IAAyBC,EAA2CR,CAAU,GAqB9ES,IAAkB,CAC3B,EAAE,UAAAC,GAAU,SAAAC,GAAS,SAAAC,GAAS,gBAAgBX,IAAa,2BAAA,GAC3DE,MAGI,gBAAAU,EAAC,SAAI,gBAAcZ,GAAY,WAAWI,EAAO,OAAO,KAAKF,GACxD,UAAA;AAAA,EAAAS,IACG,gBAAAR,EAAC,SAAI,WAAWC,EAAO,cACnB,UAAA,gBAAAD,EAAC,QAAA,EAAM,UAAAQ,EAAA,CAAQ,EAAA,CACnB,IACA;AAAA,EACHF;AAAA,EAAA,GAN2EC,CAOhF;AAGRF,EAAgB,cAAc;AAEvB,MAAMK,IAA8BN,EAAiDC,CAAe;"}
|
|
@@ -1,74 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const O = (n, s) => {
|
|
8
|
-
const [e, r] = S(!1), [m, i] = S(null), [l, f] = S({
|
|
9
|
-
menuComponents: [],
|
|
10
|
-
items: []
|
|
11
|
-
});
|
|
12
|
-
return x(() => {
|
|
13
|
-
i(null), s || f({
|
|
14
|
-
menuComponents: [],
|
|
15
|
-
items: []
|
|
16
|
-
}), s && (r(!0), s(n).then((u) => {
|
|
17
|
-
f({
|
|
18
|
-
menuComponents: u.map((o) => /* @__PURE__ */ E(L, { label: o.label, value: o.value, children: o.content ? o.content : o.label }, o.value)),
|
|
19
|
-
items: u.map((o) => ({ value: o.value, label: o.label, children: o.content }))
|
|
20
|
-
}), r(!1);
|
|
21
|
-
}).catch((u) => {
|
|
22
|
-
i(u), r(!1);
|
|
23
|
-
}));
|
|
24
|
-
}, [n, s]), { isLoading: e, error: m, menuComponents: l.menuComponents, items: l.items };
|
|
25
|
-
}, g = (n) => {
|
|
26
|
-
const s = [];
|
|
27
|
-
return v.forEach(n, (e) => {
|
|
28
|
-
if (C(e) && e.type === L)
|
|
29
|
-
s.push(I(e.props));
|
|
30
|
-
else if (C(e) && e.props.children) {
|
|
31
|
-
const r = g(e.props.children);
|
|
32
|
-
for (const m of r)
|
|
33
|
-
s.push(m);
|
|
34
|
-
}
|
|
35
|
-
}), s;
|
|
36
|
-
}, q = (n, s) => {
|
|
37
|
-
const [e, r] = S(""), { inputSlots: m, menuSlots: i, itemValues: l, clearButton: f } = b(() => {
|
|
38
|
-
const a = [], p = [];
|
|
39
|
-
let V;
|
|
40
|
-
v.toArray(n).some(
|
|
41
|
-
(t) => C(t) && t.type === y
|
|
42
|
-
) ? v.forEach(n, (t) => {
|
|
43
|
-
C(t) && t.type === y && (t.props.name === "menu" ? p.push(t.props.children) : t.props.name === "left" || t.props.name === "right" ? a.push(t) : t.props.name === "clear" && (t.props.children ? V = t : V = w(t, { children: /* @__PURE__ */ E(F, {}) })));
|
|
44
|
-
}) : p.push(n);
|
|
45
|
-
const R = g(p);
|
|
46
|
-
return { inputSlots: a, menuSlots: p, itemValues: R, clearButton: V };
|
|
47
|
-
}, [n]), u = b(
|
|
48
|
-
() => l.filter(
|
|
49
|
-
(a) => e === "" || a.label.toLowerCase().includes(e.toLowerCase())
|
|
50
|
-
),
|
|
51
|
-
[l, e]
|
|
52
|
-
), o = B(
|
|
53
|
-
(a) => a ? l.find((p) => p.value === a) : void 0,
|
|
54
|
-
[l]
|
|
55
|
-
), c = O(e, s);
|
|
56
|
-
return {
|
|
57
|
-
items: [...u, ...c.items],
|
|
58
|
-
menuSlots: [...i, ...c.menuComponents],
|
|
59
|
-
filterText: e,
|
|
60
|
-
inputSlots: m,
|
|
61
|
-
clearButton: f,
|
|
62
|
-
setFilterText: r,
|
|
63
|
-
getItemByValue: o,
|
|
64
|
-
asyncItemStatus: {
|
|
65
|
-
isLoading: c.isLoading,
|
|
66
|
-
error: c.error
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
};
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import m from "./fondue-components99.js";
|
|
4
|
+
const t = ({ children: e, name: o, "data-test-id": r = "fondue-select-slot", ...a }, s) => /* @__PURE__ */ l("div", { "data-test-id": r, ref: s, className: m.slot, "data-name": o, ...a, children: e });
|
|
5
|
+
t.displayName = "Select.Slot";
|
|
6
|
+
const S = d(t);
|
|
70
7
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
8
|
+
S as ForwardedRefSelectSlot,
|
|
9
|
+
t as SelectSlot
|
|
73
10
|
};
|
|
74
11
|
//# sourceMappingURL=fondue-components76.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components76.js","sources":["../src/components/Select/
|
|
1
|
+
{"version":3,"file":"fondue-components76.js","sources":["../src/components/Select/components/SelectSlot.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport styles from '../styles/select.module.scss';\n\nexport type SelectSlotProps = {\n /**\n * The children of the select slot. This can be a custom component.\n */\n children?: ReactNode;\n /**\n * The slot name that is used to determine the placement.\n */\n name: 'menu' | 'left' | 'right' | 'clear';\n /**\n * The data test id of the select slot.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-select-slot', ...props }: SelectSlotProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={forwardedRef} className={styles.slot} data-name={name} {...props}>\n {children}\n </div>\n );\n};\nSelectSlot.displayName = 'Select.Slot';\n\nexport const ForwardedRefSelectSlot = forwardRef<HTMLDivElement, SelectSlotProps>(SelectSlot);\n"],"names":["SelectSlot","children","name","dataTestId","props","forwardedRef","jsx","styles","ForwardedRefSelectSlot","forwardRef"],"mappings":";;;AAqBO,MAAMA,IAAa,CACtB,EAAE,UAAAC,GAAU,MAAAC,GAAM,gBAAgBC,IAAa,sBAAsB,GAAGC,EAAA,GACxEC,MAGI,gBAAAC,EAAC,OAAA,EAAI,gBAAcH,GAAY,KAAKE,GAAc,WAAWE,EAAO,MAAM,aAAWL,GAAO,GAAGE,GAC1F,UAAAH,GACL;AAGRD,EAAW,cAAc;AAElB,MAAMQ,IAAyBC,EAA4CT,CAAU;"}
|
|
@@ -10,6 +10,11 @@ const e = {
|
|
|
10
10
|
Flyout_close: "Close",
|
|
11
11
|
Select_clear: "clear input",
|
|
12
12
|
Select_toggleMenu: "toggle menu",
|
|
13
|
+
Select_error: "Error",
|
|
14
|
+
Select_selectedCount: "${count} selected: ${items}",
|
|
15
|
+
Select_singleItemSelected: "1 item selected",
|
|
16
|
+
Select_multipleItemsSelected: "${count} items selected",
|
|
17
|
+
Select_additionalItemsSelected: "${count} additional items selected",
|
|
13
18
|
Switch_defaultLabel: "Switch",
|
|
14
19
|
Table_sortByDescending: "Sort by ${column} descending",
|
|
15
20
|
Table_sortByAscending: "Sort by ${column} ascending",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components90.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 Notice_dismiss: 'Dismiss notice',\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;AAAA,EACf,gBAAgB;AACpB;"}
|
|
1
|
+
{"version":3,"file":"fondue-components90.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 Select_error: 'Error',\n Select_selectedCount: '${count} selected: ${items}',\n Select_singleItemSelected: '1 item selected',\n Select_multipleItemsSelected: '${count} items selected',\n Select_additionalItemsSelected: '${count} additional items selected',\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 Notice_dismiss: 'Dismiss notice',\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,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,8BAA8B;AAAA,EAC9B,gCAAgC;AAAA,EAChC,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,gBAAgB;AACpB;"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root: o
|
|
3
|
-
caret: c,
|
|
4
|
-
colorName: t,
|
|
5
|
-
colorIndicator: _,
|
|
6
|
-
button: n,
|
|
7
|
-
actions: r,
|
|
8
|
-
clearIcon: a
|
|
1
|
+
const o = "_root_1y4f3_2", t = {
|
|
2
|
+
root: o
|
|
9
3
|
};
|
|
10
4
|
export {
|
|
11
|
-
|
|
12
|
-
n as button,
|
|
13
|
-
c as caret,
|
|
14
|
-
a as clearIcon,
|
|
15
|
-
_ as colorIndicator,
|
|
16
|
-
t as colorName,
|
|
17
|
-
s as default,
|
|
5
|
+
t as default,
|
|
18
6
|
o as root
|
|
19
7
|
};
|
|
20
8
|
//# sourceMappingURL=fondue-components92.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components92.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components92.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components93.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components93.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;"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
const r =
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const o = "_root_18649_5", c = "_caret_18649_43", t = "_colorName_18649_58", _ = "_colorIndicator_18649_61", n = "_button_18649_82", r = "_actions_18649_113", a = "_clearIcon_18649_122", s = {
|
|
2
|
+
root: o,
|
|
3
|
+
caret: c,
|
|
4
|
+
colorName: t,
|
|
5
|
+
colorIndicator: _,
|
|
6
|
+
button: n,
|
|
7
|
+
actions: r,
|
|
8
|
+
clearIcon: a
|
|
4
9
|
};
|
|
5
10
|
export {
|
|
6
|
-
r as
|
|
11
|
+
r as actions,
|
|
12
|
+
n as button,
|
|
13
|
+
c as caret,
|
|
14
|
+
a as clearIcon,
|
|
15
|
+
_ as colorIndicator,
|
|
16
|
+
t as colorName,
|
|
17
|
+
s as default,
|
|
18
|
+
o as root
|
|
7
19
|
};
|
|
8
20
|
//# sourceMappingURL=fondue-components94.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components94.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components94.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|