@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,24 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { Children as a, isValidElement as u, cloneElement as f } from "react";
|
|
2
|
+
import { ForwardedRefSelectItem as E } from "./fondue-components71.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
|
+
};
|
|
20
37
|
};
|
|
21
38
|
export {
|
|
22
|
-
|
|
39
|
+
g as getSelectOptionValue,
|
|
40
|
+
w as isReactLeaf,
|
|
41
|
+
y as recursiveMap
|
|
23
42
|
};
|
|
24
43
|
//# sourceMappingURL=fondue-components92.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components92.js","sources":["../src/components/Select/
|
|
1
|
+
{"version":3,"file":"fondue-components92.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;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as s } from "@frontify/fondue-icons";
|
|
3
|
+
import { useTranslation as t } from "./fondue-components36.js";
|
|
4
|
+
import { Button as a } from "./fondue-components6.js";
|
|
5
|
+
import l from "./fondue-components74.js";
|
|
6
|
+
const f = ({ onClear: r }) => {
|
|
7
|
+
const { t: o } = t();
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
a,
|
|
10
|
+
{
|
|
11
|
+
"aria-label": o("Select_clear"),
|
|
12
|
+
type: "button",
|
|
13
|
+
size: "small",
|
|
14
|
+
emphasis: "weak",
|
|
15
|
+
aspect: "square",
|
|
16
|
+
onPress: r,
|
|
17
|
+
children: /* @__PURE__ */ e(s, { className: l.clearIcon, size: 16 })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
f as SelectClear
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=fondue-components93.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components93.js","sources":["../src/components/Select/SelectClear.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\n\nimport { useTranslation } from '#/hooks/useTranslation';\n\nimport { Button } from '../Button/Button';\n\nimport styles from './styles/select.module.scss';\n\nexport const SelectClear = ({ onClear }: { onClear?: () => void }) => {\n const { t } = useTranslation();\n\n return (\n <Button\n aria-label={t('Select_clear')}\n type=\"button\"\n size=\"small\"\n emphasis=\"weak\"\n aspect=\"square\"\n onPress={onClear}\n >\n <IconCross className={styles.clearIcon} size={16} />\n </Button>\n );\n};\n"],"names":["SelectClear","onClear","t","useTranslation","jsx","Button","IconCross","styles"],"mappings":";;;;;AAUO,MAAMA,IAAc,CAAC,EAAE,SAAAC,QAAwC;AAClE,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAEd,SACI,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,cAAYH,EAAE,cAAc;AAAA,MAC5B,MAAK;AAAA,MACL,MAAK;AAAA,MACL,UAAS;AAAA,MACT,QAAO;AAAA,MACP,SAASD;AAAA,MAET,4BAACK,GAAA,EAAU,WAAWC,EAAO,WAAW,MAAM,GAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAG9D;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components94.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE = 'focus-visible:tw-ring-focus has-[[data-show-focus-ring=true]]:tw-ring-focus';\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IAAgB;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const o = "_root_1n84t_5", t = "_clearIcon_1n84t_35", c = "_caret_1n84t_52", n = "_colorName_1n84t_70", _ = "_colorIndicator_1n84t_73", r = "_button_1n84t_94", a = "_actions_1n84t_125", s = {
|
|
2
|
+
root: o,
|
|
3
|
+
clearIcon: t,
|
|
4
|
+
caret: c,
|
|
5
|
+
colorName: n,
|
|
6
|
+
colorIndicator: _,
|
|
7
|
+
button: r,
|
|
8
|
+
actions: a
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
a as actions,
|
|
12
|
+
r as button,
|
|
13
|
+
c as caret,
|
|
14
|
+
t as clearIcon,
|
|
15
|
+
_ as colorIndicator,
|
|
16
|
+
n as colorName,
|
|
17
|
+
s as default,
|
|
18
|
+
o as root
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=fondue-components95.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fondue-components95.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ChangeEventHandler } from 'react';
|
|
|
4
4
|
import { CommonAriaAttrs } from '../../utilities/types';
|
|
5
5
|
import { Context } from 'react';
|
|
6
6
|
import { CSSProperties } from 'react';
|
|
7
|
-
import { default as default_2 } from '@frontify/fondue-tokens/
|
|
7
|
+
import { default as default_2 } from '@frontify/fondue-tokens/themes';
|
|
8
8
|
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
9
9
|
import { FocusEventHandler } from 'react';
|
|
10
10
|
import { FormEvent } from 'react';
|
|
@@ -598,7 +598,7 @@ declare type DialogTriggerProps = {
|
|
|
598
598
|
|
|
599
599
|
export declare const Divider: ForwardRefExoticComponent<DividerProps & RefAttributes<HTMLDivElement>>;
|
|
600
600
|
|
|
601
|
-
declare type DividerColor = 'weak' | 'default' | 'strong'
|
|
601
|
+
declare type DividerColor = 'weak' | 'default' | 'strong';
|
|
602
602
|
|
|
603
603
|
declare type DividerDirection = 'horizontal' | 'vertical';
|
|
604
604
|
|
|
@@ -1256,6 +1256,105 @@ declare type LayoutComponentProps = {
|
|
|
1256
1256
|
left?: Responsive<SpacingValue>;
|
|
1257
1257
|
};
|
|
1258
1258
|
|
|
1259
|
+
export declare const Link: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;
|
|
1260
|
+
|
|
1261
|
+
declare type LinkColor = 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'highlight';
|
|
1262
|
+
|
|
1263
|
+
declare type LinkOnContainerColor = 'secondary' | 'disabled' | 'error' | 'success' | 'warning' | 'highlight';
|
|
1264
|
+
|
|
1265
|
+
declare type LinkProps = {
|
|
1266
|
+
children?: ReactNode;
|
|
1267
|
+
/**
|
|
1268
|
+
* The link to navigate to when clicked
|
|
1269
|
+
*/
|
|
1270
|
+
href: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* Id of the element
|
|
1273
|
+
*/
|
|
1274
|
+
id?: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* Size of the text
|
|
1277
|
+
*
|
|
1278
|
+
* @default 'medium'
|
|
1279
|
+
*/
|
|
1280
|
+
size?: LinkSize;
|
|
1281
|
+
/**
|
|
1282
|
+
* Weight of the font
|
|
1283
|
+
*
|
|
1284
|
+
* @default 'regular'
|
|
1285
|
+
*/
|
|
1286
|
+
weight?: LinkWeight;
|
|
1287
|
+
/**
|
|
1288
|
+
* Color of the text
|
|
1289
|
+
*
|
|
1290
|
+
* @default 'primary'
|
|
1291
|
+
*/
|
|
1292
|
+
color?: LinkColor;
|
|
1293
|
+
/**
|
|
1294
|
+
* The texts color when used within a container
|
|
1295
|
+
*
|
|
1296
|
+
* @description optional color prop that uses the inverse container color when accessibility contrast is needed
|
|
1297
|
+
**/
|
|
1298
|
+
onContainer?: LinkOnContainerColor;
|
|
1299
|
+
/**
|
|
1300
|
+
* Truncate the text if it overflows
|
|
1301
|
+
*/
|
|
1302
|
+
truncate?: boolean;
|
|
1303
|
+
/**
|
|
1304
|
+
* Wrap the text if it overflows
|
|
1305
|
+
* @default 'nowrap'
|
|
1306
|
+
*/
|
|
1307
|
+
wrap?: LinkWrap;
|
|
1308
|
+
/**
|
|
1309
|
+
* Underline behavior of the link
|
|
1310
|
+
* @default 'auto'
|
|
1311
|
+
*/
|
|
1312
|
+
underline?: LinkUnderline;
|
|
1313
|
+
/**
|
|
1314
|
+
* The target attribute for the link
|
|
1315
|
+
* @default '_self'
|
|
1316
|
+
*/
|
|
1317
|
+
target?: string;
|
|
1318
|
+
/**
|
|
1319
|
+
* The rel attribute for the link
|
|
1320
|
+
* @default 'noopener noreferrer'
|
|
1321
|
+
*/
|
|
1322
|
+
rel?: string;
|
|
1323
|
+
className?: string;
|
|
1324
|
+
onPress?: (event: MouseEvent_2<HTMLAnchorElement>) => void;
|
|
1325
|
+
'data-test-id'?: string;
|
|
1326
|
+
/**
|
|
1327
|
+
* Aria label for the component.
|
|
1328
|
+
*/
|
|
1329
|
+
'aria-label'?: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* Aria labelled by for the component.
|
|
1332
|
+
*/
|
|
1333
|
+
'aria-labelledby'?: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* Aria described by for the component.
|
|
1336
|
+
*/
|
|
1337
|
+
'aria-describedby'?: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* Aria details for extend description of the component.
|
|
1340
|
+
*/
|
|
1341
|
+
'aria-details'?: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* Disable the link
|
|
1344
|
+
*
|
|
1345
|
+
* @default false
|
|
1346
|
+
*/
|
|
1347
|
+
disabled?: boolean;
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
declare type LinkSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
|
|
1351
|
+
|
|
1352
|
+
declare type LinkUnderline = 'auto' | 'always' | 'hover' | 'none';
|
|
1353
|
+
|
|
1354
|
+
declare type LinkWeight = 'regular' | 'medium' | 'bold';
|
|
1355
|
+
|
|
1356
|
+
declare type LinkWrap = 'wrap' | 'nowrap';
|
|
1357
|
+
|
|
1259
1358
|
export declare const LoadingBar: ForwardRefExoticComponent<LoadingBarProps & RefAttributes<HTMLDivElement>>;
|
|
1260
1359
|
|
|
1261
1360
|
declare type LoadingBarProps = {
|
|
@@ -1340,6 +1439,20 @@ declare type RgbaColor_2 = {
|
|
|
1340
1439
|
name?: string;
|
|
1341
1440
|
};
|
|
1342
1441
|
|
|
1442
|
+
export declare const RouterProvider: ({ children, navigate, useHref }: RouterProviderProps) => JSX_2.Element;
|
|
1443
|
+
|
|
1444
|
+
export declare type RouterProviderProps = {
|
|
1445
|
+
children: ReactNode;
|
|
1446
|
+
/**
|
|
1447
|
+
* Function to navigate to a specific path
|
|
1448
|
+
*/
|
|
1449
|
+
navigate: (path: string) => void;
|
|
1450
|
+
/**
|
|
1451
|
+
* Function to resolves a URL against the current location.
|
|
1452
|
+
*/
|
|
1453
|
+
useHref: (path: string) => string;
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1343
1456
|
declare const screens: {
|
|
1344
1457
|
xs: string;
|
|
1345
1458
|
sm: string;
|
|
@@ -1727,7 +1840,7 @@ declare type TableHeaderCellProps = {
|
|
|
1727
1840
|
*/
|
|
1728
1841
|
truncate?: boolean;
|
|
1729
1842
|
/**
|
|
1730
|
-
* Aria label for
|
|
1843
|
+
* Aria label for ascending/descending sort. Variables: {column} - column name
|
|
1731
1844
|
* @default "Sort by {column} ascending/descending"
|
|
1732
1845
|
*/
|
|
1733
1846
|
sortTranslations?: {
|