@frontify/fondue-components 19.5.0 → 19.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components.js +20 -18
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +3 -3
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components12.js +2 -2
- package/dist/fondue-components13.js +3 -3
- package/dist/fondue-components14.js +2 -2
- package/dist/fondue-components15.js +2 -2
- package/dist/fondue-components16.js +19 -29
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +1 -1
- package/dist/fondue-components18.js +1 -1
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +2 -2
- package/dist/fondue-components21.js +2 -2
- package/dist/fondue-components22.js +6 -6
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +2 -2
- package/dist/fondue-components25.js +4 -4
- package/dist/fondue-components26.js +135 -127
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +127 -31
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +33 -59
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +58 -101
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +101 -12
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +12 -55
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +55 -20
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +20 -7
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +7 -6
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +7 -32
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +32 -5
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +5 -12
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +10 -153
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +59 -22
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +29 -38
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +17 -17
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +112 -15
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +19 -30
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +32 -62
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +53 -121
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +129 -20
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +21 -45
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +53 -8
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +8 -13
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +13 -15
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +14 -4
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +5 -60
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +59 -17
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +18 -19
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +18 -4
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +3 -13
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +13 -3
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +3 -17
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +19 -35
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +8 -4
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +4 -4
- package/dist/fondue-components60.js +35 -13
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +1 -1
- package/dist/fondue-components62.js +12 -24
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +4 -16
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +23 -149
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +17 -19
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +148 -75
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +19 -8
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +77 -34
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +8 -71
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +2 -2
- package/dist/fondue-components70.js +34 -10
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +70 -12
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +10 -12
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +12 -20
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +13 -34
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +20 -55
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +34 -15
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +9 -24
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +55 -14
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +14 -22
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +25 -6
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +13 -5
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +23 -2
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +5 -15
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +4 -2
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +4 -4
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +4 -39
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +5 -0
- package/dist/fondue-components87.js.map +1 -0
- package/dist/fondue-components88.js +20 -0
- package/dist/fondue-components88.js.map +1 -0
- package/dist/fondue-components89.js +43 -0
- package/dist/fondue-components89.js.map +1 -0
- package/dist/fondue-components9.js +4 -4
- package/dist/index.d.ts +74 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components85.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components85.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-components86.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components86.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components86.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;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components87.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const o = "_root_1761r_5", t = "_colorName_1761r_55", c = "_button_1761r_63", r = "_colorIndicator_1761r_76", _ = "_actions_1761r_95", a = "_clear_1761r_105", n = "_caret_1761r_118", s = {
|
|
2
|
+
root: o,
|
|
3
|
+
colorName: t,
|
|
4
|
+
button: c,
|
|
5
|
+
colorIndicator: r,
|
|
6
|
+
actions: _,
|
|
7
|
+
clear: a,
|
|
8
|
+
caret: n
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
_ as actions,
|
|
12
|
+
c as button,
|
|
13
|
+
n as caret,
|
|
14
|
+
a as clear,
|
|
15
|
+
r as colorIndicator,
|
|
16
|
+
t as colorName,
|
|
17
|
+
s as default,
|
|
18
|
+
o as root
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=fondue-components88.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components88.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Children as a, isValidElement as u, cloneElement as f } from "react";
|
|
2
|
+
import { ForwardedRefSelectItem as E } from "./fondue-components67.js";
|
|
3
|
+
const g = ({
|
|
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
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
g as getSelectOptionValue,
|
|
40
|
+
w as isReactLeaf,
|
|
41
|
+
y as recursiveMap
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=fondue-components89.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components89.js","sources":["../src/components/Select/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n Children,\n cloneElement,\n isValidElement,\n type JSXElementConstructor,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\nimport { ForwardedRefSelectItem, type SelectItemProps } from './SelectItem';\n\n/**\n * Extracts and returns an object containing `value` and `label` from a given SelectItemProps object.\n * It prioritizes explicit `value` and `label` properties but will fall back to using `children` as the value or label if necessary.\n *\n * @param {SelectItemProps} props - The properties of a select item, which include potential children, value, and label.\n * @returns {{ value: string; label: string, children?: ReactNode }} An object containing `value` and `label` as strings.\n *\n * @example\n * // Returns { value: 'option1', label: 'Option 1' }\n * getSelectOptionValue({ value: 'option1', label: 'Option 1' });\n *\n * @example\n * // Uses children as the value and label when they are not explicitly provided\n * // Returns { value: 'Default', label: 'Default' }\n * getSelectOptionValue({ children: 'Default' });\n */\nexport const getSelectOptionValue = ({\n children,\n value,\n label,\n}: SelectItemProps): {\n value: string;\n label: string;\n children?: ReactNode;\n} => {\n if (children && typeof children === 'string') {\n return {\n value: value ? value : children,\n label: label ? label : children,\n };\n }\n\n return {\n value: value || '',\n label: label ? label : value || '',\n ...(children ? { children } : null),\n };\n};\n/**\n * Determines if the child is a leaf node of React, meaning it has one final child of a native type;\n *\n * @param {ReactNode} child - The React child node to check.\n * @param {JSXElementConstructor<never>} Component - The React component constructor used for comparison.\n * @returns {boolean} Returns true if the `child` is a valid React element of the specified `Component` type.\n *\n * @example\n * // Assuming ForwardedRefSelectItem is a component that renders an <input> element\n * // Returns true\n * isReactLeaf(<ForwardedRefSelectItem />, ForwardedRefSelectItem);\n *\n * @example\n * // Returns false for non-matching types or non-leaf components\n * isReactLeaf(<div><ForwardedRefSelectItem /></div>, ForwardedRefSelectItem);\n */\nexport const isReactLeaf = (child: ReactNode, Component: JSXElementConstructor<never>): child is ReactElement =>\n isValidElement(child) && child.type === Component;\n\n/**\n * Recursively maps through React children, applying a callback to each child that meets the specified conditions.\n * This function is useful for deeply nested structures where modifications or checks are needed at multiple levels.\n *\n * @param {ReactNode} children - The children to be recursively processed.\n * @param {function(ReactNode, number): ReactNode} callback - A function that is called for each child that meets the condition. It receives the child and its index, and returns a React node.\n * @param {string} [filterText=''] - Optional text used to filter children based on their properties.\n * @param {number} [nextIndex=0] - The starting index for numbering children, defaults to 0.\n * @returns {{ parsedChildren: ReactNode[], subElementCount: number }} An object containing the transformed children array and the count of all processed sub-elements.\n *\n * @example\n * // Example usage in a select component where only items containing a certain text are modified\n * recursiveMap(children, (child, index) => React.cloneElement(child, { extraProp: 'value' }), 'specific text');\n *\n * @example\n * // Nested structure transformation, adding class names based on index\n * recursiveMap(children, (child, index) => React.cloneElement(child, { className: `item-${index}` }));\n */\nexport const recursiveMap = (\n children: ReactNode,\n callback: (child: ReactNode, nextIndex: number) => ReactNode,\n filterText?: string,\n nextIndex: number = 0,\n): {\n parsedChildren: ReactNode[];\n subElementCount: number;\n} => {\n const resultingChildren: ReactNode[] = [];\n let itemCounter = 0;\n Children.forEach(children, (child) => {\n if (isReactLeaf(child, ForwardedRefSelectItem) && isValidElement<SelectItemProps>(child)) {\n if (\n getSelectOptionValue(child.props)\n .label.toLowerCase()\n .includes(filterText?.toLowerCase() || '')\n ) {\n resultingChildren.push(callback(child, nextIndex + itemCounter));\n itemCounter++;\n }\n } else if (isValidElement<{ children: ReactNode }>(child) && child?.props.children) {\n const { parsedChildren, subElementCount } = recursiveMap(\n child.props.children,\n callback,\n '',\n nextIndex + itemCounter,\n );\n child = cloneElement(child, {\n children: parsedChildren,\n key: `group-${nextIndex + itemCounter}`,\n });\n resultingChildren.push(child);\n itemCounter += subElementCount;\n } else {\n resultingChildren.push(child);\n }\n });\n return {\n parsedChildren: resultingChildren,\n subElementCount: itemCounter,\n };\n};\n"],"names":["getSelectOptionValue","children","value","label","isReactLeaf","child","Component","isValidElement","recursiveMap","callback","filterText","nextIndex","resultingChildren","itemCounter","Children","ForwardedRefSelectItem","parsedChildren","subElementCount","cloneElement"],"mappings":";;AA6BO,MAAMA,IAAuB,CAAC;AAAA,EACjC,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AACJ,MAKQF,KAAY,OAAOA,KAAa,WACzB;AAAA,EACH,OAAOC,KAAgBD;AAAA,EACvB,OAAOE,KAAgBF;AAAA,IAIxB;AAAA,EACH,OAAOC,KAAS;AAAA,EAChB,OAAOC,KAAgBD,KAAS;AAAA,EAChC,GAAID,IAAW,EAAE,UAAAA,MAAa;AAAA,GAmBzBG,IAAc,CAACC,GAAkBC,MAC1CC,EAAeF,CAAK,KAAKA,EAAM,SAASC,GAoB/BE,IAAe,CACxBP,GACAQ,GACAC,GACAC,IAAoB,MAInB;AACD,QAAMC,IAAiC,CAAA;AACvC,MAAIC,IAAc;AAClB,SAAAC,EAAS,QAAQb,GAAU,CAACI,MAAU;AAClC,QAAID,EAAYC,GAAOU,CAAsB,KAAKR,EAAgCF,CAAK;AACnF,MACIL,EAAqBK,EAAM,KAAK,EAC3B,MAAM,cACN,UAASK,KAAA,gBAAAA,EAAY,kBAAiB,EAAE,MAE7CE,EAAkB,KAAKH,EAASJ,GAAOM,IAAYE,CAAW,CAAC,GAC/DA;AAAA,aAEGN,EAAwCF,CAAK,MAAKA,KAAA,QAAAA,EAAO,MAAM,WAAU;AAChF,YAAM,EAAE,gBAAAW,GAAgB,iBAAAC,EAAA,IAAoBT;AAAA,QACxCH,EAAM,MAAM;AAAA,QACZI;AAAA,QACA;AAAA,QACAE,IAAYE;AAAA,MAAA;AAEhB,MAAAR,IAAQa,EAAab,GAAO;AAAA,QACxB,UAAUW;AAAA,QACV,KAAK,SAASL,IAAYE,CAAW;AAAA,MAAA,CACxC,GACDD,EAAkB,KAAKP,CAAK,GAC5BQ,KAAeI;AAAA,IACnB;AACI,MAAAL,EAAkB,KAAKP,CAAK;AAAA,EAEpC,CAAC,GACM;AAAA,IACH,gBAAgBO;AAAA,IAChB,iBAAiBC;AAAA,EAAA;AAEzB;"}
|
|
@@ -2,10 +2,10 @@ import { jsx as o, 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 { addShowFocusRing as $, addAutoFocusAttribute as k } from "./fondue-
|
|
7
|
-
import { useFondueTheme as G, ThemeProvider as I } from "./fondue-
|
|
8
|
-
import r from "./fondue-
|
|
5
|
+
import { useSyncRefs as L } from "./fondue-components48.js";
|
|
6
|
+
import { addShowFocusRing as $, addAutoFocusAttribute as k } from "./fondue-components49.js";
|
|
7
|
+
import { useFondueTheme as G, ThemeProvider as I } from "./fondue-components31.js";
|
|
8
|
+
import r from "./fondue-components50.js";
|
|
9
9
|
const m = q({ isModal: !1 });
|
|
10
10
|
m.displayName = "DialogContext";
|
|
11
11
|
const y = ({ children: t, ...e }) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ declare type AtLeastOneAttr<T> = Partial<T> & {
|
|
|
160
160
|
|
|
161
161
|
declare type AvailableTheme = keyof typeof default_2;
|
|
162
162
|
|
|
163
|
-
export declare const Badge: ({ "aria-label": ariaLabel, "data-test-id": dataTestId, children, disabled,
|
|
163
|
+
export declare const Badge: ({ "aria-label": ariaLabel, "data-test-id": dataTestId, children, disabled, emphasis, onClick, onDismiss, size, status, title, variant, }: BadgeProps) => JSX_2.Element;
|
|
164
164
|
|
|
165
165
|
declare type BadgeEmphasis = 'strong' | 'weak';
|
|
166
166
|
|
|
@@ -186,11 +186,7 @@ declare type BadgeProps = {
|
|
|
186
186
|
*/
|
|
187
187
|
onClick?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
190
|
-
*/
|
|
191
|
-
dismissable?: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Click handler on dismiss
|
|
189
|
+
* Click handler on dismiss - providing this will show the dismiss button
|
|
194
190
|
*/
|
|
195
191
|
onDismiss?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
196
192
|
/**
|
|
@@ -1835,6 +1831,23 @@ declare type TabsTriggerProps = {
|
|
|
1835
1831
|
children: ReactNode;
|
|
1836
1832
|
};
|
|
1837
1833
|
|
|
1834
|
+
export declare const Tag: typeof TagRoot & {
|
|
1835
|
+
HoverContent: typeof TagHoverContent;
|
|
1836
|
+
SecondaryContent: typeof TagSecondaryContent;
|
|
1837
|
+
displayName?: string;
|
|
1838
|
+
};
|
|
1839
|
+
|
|
1840
|
+
declare type TagEmphasis = 'strong' | 'weak';
|
|
1841
|
+
|
|
1842
|
+
declare const TagHoverContent: {
|
|
1843
|
+
({ children }: TagHoverContentProps): JSX_2.Element;
|
|
1844
|
+
displayName: string;
|
|
1845
|
+
};
|
|
1846
|
+
|
|
1847
|
+
declare type TagHoverContentProps = {
|
|
1848
|
+
children: ReactNode;
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1838
1851
|
declare type TagPropMap = {
|
|
1839
1852
|
a: {
|
|
1840
1853
|
href?: string;
|
|
@@ -1861,7 +1874,60 @@ declare type TagPropMap = {
|
|
|
1861
1874
|
};
|
|
1862
1875
|
};
|
|
1863
1876
|
|
|
1864
|
-
declare type TagProps
|
|
1877
|
+
declare type TagProps = {
|
|
1878
|
+
/**
|
|
1879
|
+
* @default 'strong'
|
|
1880
|
+
*/
|
|
1881
|
+
emphasis?: TagEmphasis;
|
|
1882
|
+
/**
|
|
1883
|
+
* @default 'default'
|
|
1884
|
+
*/
|
|
1885
|
+
variant?: TagStyle;
|
|
1886
|
+
/**
|
|
1887
|
+
* @default 'default'
|
|
1888
|
+
*/
|
|
1889
|
+
size?: TagSize;
|
|
1890
|
+
/**
|
|
1891
|
+
* @default false
|
|
1892
|
+
*/
|
|
1893
|
+
disabled?: boolean;
|
|
1894
|
+
/**
|
|
1895
|
+
* Click handler
|
|
1896
|
+
*/
|
|
1897
|
+
onClick?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
1898
|
+
/**
|
|
1899
|
+
* Click handler on dismiss - providing this will show the dismiss button
|
|
1900
|
+
*/
|
|
1901
|
+
onDismiss?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
1902
|
+
/**
|
|
1903
|
+
* Click handler on add click - providing this will show the add button
|
|
1904
|
+
*/
|
|
1905
|
+
onAddClick?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
1906
|
+
title?: string;
|
|
1907
|
+
'aria-label'?: string;
|
|
1908
|
+
'data-test-id'?: string;
|
|
1909
|
+
children: ReactNode;
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1912
|
+
declare type TagProps_2<TTag extends TagType_2> = TagPropMap[TTag];
|
|
1913
|
+
|
|
1914
|
+
declare const TagRoot: {
|
|
1915
|
+
({ "aria-label": ariaLabel, "data-test-id": dataTestId, children, disabled, emphasis, onAddClick, onClick, onDismiss, size, title, variant, }: TagProps): JSX_2.Element;
|
|
1916
|
+
displayName: string;
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
declare const TagSecondaryContent: {
|
|
1920
|
+
({ children }: TagSecondaryContentProps): JSX_2.Element;
|
|
1921
|
+
displayName: string;
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
declare type TagSecondaryContentProps = {
|
|
1925
|
+
children: ReactNode;
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
declare type TagSize = 'default' | 'small';
|
|
1929
|
+
|
|
1930
|
+
declare type TagStyle = 'default' | 'positive' | 'highlight' | 'warning' | 'negative';
|
|
1865
1931
|
|
|
1866
1932
|
declare type TagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'p';
|
|
1867
1933
|
|
|
@@ -2080,7 +2146,7 @@ declare type TextInputProps = {
|
|
|
2080
2146
|
'aria-errormessage'?: string;
|
|
2081
2147
|
};
|
|
2082
2148
|
|
|
2083
|
-
declare type TextProps<TTag extends TagType_2 = 'span'> = CommonAriaProps &
|
|
2149
|
+
declare type TextProps<TTag extends TagType_2 = 'span'> = CommonAriaProps & TagProps_2<TTag> & {
|
|
2084
2150
|
/**
|
|
2085
2151
|
* Id of the element
|
|
2086
2152
|
*/
|