@frontify/fondue-components 27.0.1 → 28.0.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 +55 -53
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +1 -1
- package/dist/fondue-components100.js +17 -6
- package/dist/fondue-components100.js.map +1 -1
- package/dist/fondue-components101.js +150 -11
- package/dist/fondue-components101.js.map +1 -1
- package/dist/fondue-components102.js +44 -70
- package/dist/fondue-components102.js.map +1 -1
- package/dist/fondue-components103.js +14 -15
- package/dist/fondue-components103.js.map +1 -1
- package/dist/fondue-components104.js +15 -7
- package/dist/fondue-components104.js.map +1 -1
- package/dist/fondue-components105.js +107 -85
- package/dist/fondue-components105.js.map +1 -1
- package/dist/fondue-components106.js +11 -79
- package/dist/fondue-components106.js.map +1 -1
- package/dist/fondue-components107.js +17 -31
- package/dist/fondue-components107.js.map +1 -1
- package/dist/fondue-components108.js +11 -19
- package/dist/fondue-components108.js.map +1 -1
- package/dist/fondue-components109.js +16 -39
- package/dist/fondue-components109.js.map +1 -1
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components110.js +9 -0
- package/dist/fondue-components110.js.map +1 -0
- package/dist/fondue-components111.js +15 -0
- package/dist/fondue-components111.js.map +1 -0
- package/dist/fondue-components112.js +74 -0
- package/dist/fondue-components112.js.map +1 -0
- package/dist/fondue-components113.js +18 -0
- package/dist/fondue-components113.js.map +1 -0
- package/dist/fondue-components114.js +10 -0
- package/dist/fondue-components114.js.map +1 -0
- package/dist/fondue-components115.js +92 -0
- package/dist/fondue-components115.js.map +1 -0
- package/dist/fondue-components116.js +84 -0
- package/dist/fondue-components116.js.map +1 -0
- package/dist/fondue-components117.js +34 -0
- package/dist/fondue-components117.js.map +1 -0
- package/dist/fondue-components118.js +32 -0
- package/dist/fondue-components118.js.map +1 -0
- package/dist/fondue-components12.js +7 -37
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components120.js +44 -0
- package/dist/fondue-components120.js.map +1 -0
- package/dist/fondue-components121.js +22 -0
- package/dist/fondue-components121.js.map +1 -0
- package/dist/fondue-components122.js +24 -0
- package/dist/fondue-components122.js.map +1 -0
- package/dist/fondue-components123.js +43 -0
- package/dist/fondue-components123.js.map +1 -0
- package/dist/fondue-components124.js +71 -0
- package/dist/fondue-components124.js.map +1 -0
- package/dist/fondue-components125.js +34 -0
- package/dist/fondue-components125.js.map +1 -0
- package/dist/fondue-components126.js +12 -0
- package/dist/fondue-components126.js.map +1 -0
- package/dist/fondue-components127.js +156 -0
- package/dist/fondue-components127.js.map +1 -0
- package/dist/fondue-components128.js +111 -0
- package/dist/fondue-components128.js.map +1 -0
- package/dist/fondue-components129.js +19 -0
- package/dist/fondue-components129.js.map +1 -0
- package/dist/fondue-components13.js +36 -121
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components130.js +19 -0
- package/dist/fondue-components130.js.map +1 -0
- package/dist/fondue-components131.js +32 -0
- package/dist/fondue-components131.js.map +1 -0
- package/dist/fondue-components132.js +16 -0
- package/dist/fondue-components132.js.map +1 -0
- package/dist/fondue-components133.js +10 -0
- package/dist/fondue-components133.js.map +1 -0
- package/dist/fondue-components14.js +121 -36
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +30 -39
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components16.js +44 -41
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +42 -57
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +55 -41
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +39 -16
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +17 -43
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +42 -69
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +72 -16
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +18 -77
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +75 -34
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +34 -53
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +55 -23
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +23 -55
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +52 -97
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +98 -31
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +31 -194
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +184 -134
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +143 -130
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +131 -30
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +29 -78
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +67 -110
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +121 -34
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +36 -56
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +56 -20
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +20 -23
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +25 -7
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +7 -8
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +9 -41
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +41 -5
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +1 -1
- package/dist/fondue-components45.js +3 -11
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +13 -32
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +32 -54
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +48 -125
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +130 -20
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +21 -53
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +53 -8
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +8 -13
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +13 -17
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +16 -4
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +5 -18
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +18 -19
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +18 -4
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +43 -12
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +24 -4
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +1 -1
- package/dist/fondue-components60.js +22 -17
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +4 -10
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +11 -35
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +4 -6
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +17 -4
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +10 -12
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +35 -7
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +6 -12
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +1 -1
- package/dist/fondue-components69.js +12 -24
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +1 -1
- package/dist/fondue-components70.js +8 -16
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +13 -20
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +5 -20
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +24 -19
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +17 -20
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +20 -19
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +20 -8
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +20 -11
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +20 -11
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +19 -7
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +8 -13
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +10 -22
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +11 -34
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +6 -10
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +12 -67
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +22 -14
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +34 -25
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +8 -16
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +67 -24
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +14 -8
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +24 -25
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +18 -6
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +24 -4
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +8 -4
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +30 -16
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +6 -216
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +4 -18
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +4 -16
- package/dist/fondue-components97.js.map +1 -1
- package/dist/fondue-components98.js +188 -122
- package/dist/fondue-components98.js.map +1 -1
- package/dist/fondue-components99.js +18 -44
- package/dist/fondue-components99.js.map +1 -1
- package/dist/index.d.ts +101 -24
- package/dist/style.css +1 -1
- package/package.json +5 -3
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import a from "./fondue-components64.js";
|
|
4
|
+
const x = g(
|
|
5
|
+
({
|
|
6
|
+
as: e = "span",
|
|
7
|
+
children: i,
|
|
8
|
+
className: r,
|
|
9
|
+
color: d = "default",
|
|
10
|
+
role: o,
|
|
11
|
+
size: l = "medium",
|
|
12
|
+
weight: t = "default",
|
|
13
|
+
"data-test-id": s = "fondue-heading",
|
|
14
|
+
"aria-describedby": p,
|
|
15
|
+
"aria-expanded": n,
|
|
16
|
+
"aria-haspopup": b,
|
|
17
|
+
"aria-hidden": m,
|
|
18
|
+
"aria-label": f,
|
|
19
|
+
"aria-labelledby": u,
|
|
20
|
+
...h
|
|
21
|
+
}, y) => /* @__PURE__ */ c(
|
|
22
|
+
e,
|
|
15
23
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ l("span", { className: [a.visibleText, a.contentArea].filter(Boolean).join(" "), children: r })
|
|
37
|
-
]
|
|
24
|
+
className: [
|
|
25
|
+
a.root,
|
|
26
|
+
a[`size-${l}`],
|
|
27
|
+
a[`weight-${t}`],
|
|
28
|
+
a[`color-${d}`],
|
|
29
|
+
r
|
|
30
|
+
].filter(Boolean).join(" "),
|
|
31
|
+
role: o,
|
|
32
|
+
"aria-label": f,
|
|
33
|
+
"aria-hidden": m,
|
|
34
|
+
"aria-describedby": p,
|
|
35
|
+
"aria-labelledby": u,
|
|
36
|
+
"aria-expanded": n,
|
|
37
|
+
"aria-haspopup": b,
|
|
38
|
+
"data-test-id": s,
|
|
39
|
+
ref: y,
|
|
40
|
+
...h,
|
|
41
|
+
children: i
|
|
38
42
|
}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
x.displayName = "Heading";
|
|
42
46
|
export {
|
|
43
|
-
|
|
44
|
-
A as LabelComponent
|
|
47
|
+
x as Heading
|
|
45
48
|
};
|
|
46
49
|
//# sourceMappingURL=fondue-components16.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components16.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components16.js","sources":["../src/components/Heading/Heading.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ElementType, type ForwardedRef, forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport styles from './styles/heading.module.scss';\n\ntype HeadingWeight = 'default' | 'strong';\ntype HeadingSize = 'medium' | 'large' | 'x-large' | 'xx-large';\ntype HeadingColor = 'default' | 'weak' | 'x-weak' | 'disabled' | 'negative' | 'positive' | 'warning' | 'interactive';\n\ntype TagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'p';\n\nexport type HeadingProps<TTag extends TagType = 'span'> = CommonAriaProps & {\n 'data-test-id'?: string;\n as?: TTag;\n children?: ReactNode;\n color?: HeadingColor;\n size?: HeadingSize;\n weight?: HeadingWeight;\n className?: string;\n};\n\ntype HeadingElementType<TTag extends TagType> = TTag extends 'span'\n ? HTMLSpanElement\n : TTag extends 'p'\n ? HTMLParagraphElement\n : HTMLHeadingElement;\n\nexport const Heading = forwardRef(\n (\n {\n as: Tag = 'span' as ElementType,\n children,\n className,\n color = 'default',\n role,\n size = 'medium',\n weight = 'default',\n 'data-test-id': dataTestId = 'fondue-heading',\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-haspopup': ariaHasPopup,\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n return (\n <Tag\n className={[\n styles.root,\n styles[`size-${size}`],\n styles[`weight-${weight}`],\n styles[`color-${color}`],\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n role={role}\n aria-label={ariaLabel}\n aria-hidden={ariaHidden}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n data-test-id={dataTestId}\n ref={ref}\n {...props}\n >\n {children}\n </Tag>\n );\n },\n) as (<TTag extends TagType = 'span'>(\n props: HeadingProps<TTag> & { ref?: ForwardedRef<HeadingElementType<TTag>> },\n) => JSX.Element) & { displayName: string };\n\nHeading.displayName = 'Heading';\n"],"names":["Heading","forwardRef","Tag","children","className","color","role","size","weight","dataTestId","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaHidden","ariaLabel","ariaLabelledBy","props","ref","jsx","styles"],"mappings":";;;AA8BO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,IAAIC,IAAM;AAAA,IACV,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,MAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,gBAAgBC,IAAa;AAAA,IAC7B,oBAAoBC;AAAA,IACpB,iBAAiBC;AAAA,IACjB,iBAAiBC;AAAA,IACjB,eAAeC;AAAA,IACf,cAAcC;AAAA,IACd,mBAAmBC;AAAA,IACnB,GAAGC;AAAA,EAAA,GAEPC,MAGI,gBAAAC;AAAA,IAAChB;AAAA,IAAA;AAAA,MACG,WAAW;AAAA,QACPiB,EAAO;AAAA,QACPA,EAAO,QAAQZ,CAAI,EAAE;AAAA,QACrBY,EAAO,UAAUX,CAAM,EAAE;AAAA,QACzBW,EAAO,SAASd,CAAK,EAAE;AAAA,QACvBD;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACb,MAAAE;AAAA,MACA,cAAYQ;AAAA,MACZ,eAAaD;AAAA,MACb,oBAAkBH;AAAA,MAClB,mBAAiBK;AAAA,MACjB,iBAAeJ;AAAA,MACf,iBAAeC;AAAA,MACf,gBAAcH;AAAA,MACd,KAAAQ;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAb;AAAA,IAAA;AAAA,EAAA;AAIjB;AAIAH,EAAQ,cAAc;"}
|
|
@@ -1,61 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (r) {
|
|
25
|
-
a.preventDefault();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
e == null || e(a), t && (a.preventDefault(), l(t));
|
|
1
|
+
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "@radix-ui/react-label";
|
|
3
|
+
import { forwardRef as b, useRef as p, useLayoutEffect as x } from "react";
|
|
4
|
+
import a from "./fondue-components65.js";
|
|
5
|
+
const A = ({ className: s, "data-test-id": d = "fondue-label", children: r, variant: f = "default", ...i }, u) => {
|
|
6
|
+
const n = p(null);
|
|
7
|
+
return x(() => {
|
|
8
|
+
var o;
|
|
9
|
+
const e = (o = n.current) == null ? void 0 : o.querySelectorAll("button,input,a,[tabindex]");
|
|
10
|
+
if (e)
|
|
11
|
+
for (const t of e)
|
|
12
|
+
t.setAttribute("tabindex", "-1"), t.setAttribute("id", ""), t.setAttribute("data-test-id", "");
|
|
13
|
+
}, []), /* @__PURE__ */ c(
|
|
14
|
+
m.Root,
|
|
15
|
+
{
|
|
16
|
+
ref: u,
|
|
17
|
+
"data-required": i.required,
|
|
18
|
+
"data-variant": f,
|
|
19
|
+
className: [a.root, s].filter(Boolean).join(" "),
|
|
20
|
+
"data-test-id": d,
|
|
21
|
+
onClick: (e) => {
|
|
22
|
+
const o = e.target.getAttribute("for"), t = o ? document.getElementById(o) : null;
|
|
23
|
+
t && t.getAttribute("role") === "combobox" && (e.preventDefault(), e.stopPropagation(), t.click());
|
|
29
24
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
href: r ? void 0 : g,
|
|
48
|
-
onClick: x,
|
|
49
|
-
"aria-disabled": r || void 0,
|
|
50
|
-
tabIndex: r ? -1 : void 0,
|
|
51
|
-
...s,
|
|
52
|
-
children: c
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
L.displayName = "Link";
|
|
25
|
+
...i,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ l(
|
|
28
|
+
"span",
|
|
29
|
+
{
|
|
30
|
+
className: [a.hiddenText, a.contentArea].filter(Boolean).join(" "),
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
ref: n,
|
|
33
|
+
children: r
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ l("span", { className: [a.visibleText, a.contentArea].filter(Boolean).join(" "), children: r })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}, g = b(A);
|
|
41
|
+
g.displayName = "Label";
|
|
58
42
|
export {
|
|
59
|
-
|
|
43
|
+
g as Label,
|
|
44
|
+
A as LabelComponent
|
|
60
45
|
};
|
|
61
46
|
//# sourceMappingURL=fondue-components17.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components17.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components17.js","sources":["../src/components/Label/Label.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type ForwardedRef, forwardRef, type MouseEventHandler, type ReactNode, useRef, useLayoutEffect } from 'react';\n\nimport styles from './styles/label.module.scss';\n\ntype LabelVariant = 'default' | 'strong';\n\nexport type LabelProps = {\n id?: string;\n children: ReactNode;\n /**\n * The id of the input element the label is associated with\n */\n htmlFor: string;\n /**\n * Add an asterisk to the label to indicate it is required\n * @default false\n */\n required?: boolean;\n /**\n * The variant of the label\n * @default \"default\"\n */\n variant?: LabelVariant;\n className?: string;\n onClick?: MouseEventHandler<HTMLLabelElement>;\n 'data-test-id'?: string;\n};\n\nexport const LabelComponent = (\n { className, 'data-test-id': dataTestId = 'fondue-label', children, variant = 'default', ...props }: LabelProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) => {\n const hiddenTextRef = useRef<HTMLSpanElement>(null);\n\n useLayoutEffect(() => {\n // prevent duplicated interactive elements within the hidden element\n const interactiveElements = hiddenTextRef.current?.querySelectorAll('button,input,a,[tabindex]');\n if (interactiveElements) {\n for (const element of interactiveElements) {\n element.setAttribute('tabindex', '-1');\n element.setAttribute('id', '');\n element.setAttribute('data-test-id', '');\n }\n }\n }, []);\n\n return (\n <LabelPrimitive.Root\n ref={ref}\n data-required={props.required}\n data-variant={variant}\n className={[styles.root, className].filter(Boolean).join(' ')}\n data-test-id={dataTestId}\n onClick={(event) => {\n // Add support of Select component, Radix only allows native `select`\n // but we use `div[role=combobox]` because of downshift\n // https://github.com/radix-ui/primitives/blob/6e75e117977c9e6ffa939e6951a707f16ba0f95e/packages/react/label/src/label.tsx#L22\n const targetId = (event.target as HTMLElement).getAttribute('for');\n const target = targetId ? document.getElementById(targetId) : null;\n\n if (target && target.getAttribute('role') === 'combobox') {\n event.preventDefault();\n event.stopPropagation();\n target.click();\n }\n }}\n {...props}\n >\n {/* Hidden version with medium font weight to reserve space */}\n <span\n className={[styles.hiddenText, styles.contentArea].filter(Boolean).join(' ')}\n aria-hidden=\"true\"\n ref={hiddenTextRef}\n >\n {children}\n </span>\n {/* Visible version (inherits all styling from parent) */}\n <span className={[styles.visibleText, styles.contentArea].filter(Boolean).join(' ')}>{children}</span>\n </LabelPrimitive.Root>\n );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","children","variant","props","ref","hiddenTextRef","useRef","useLayoutEffect","interactiveElements","_a","element","jsxs","LabelPrimitive","styles","event","targetId","target","jsx","Label","forwardRef"],"mappings":";;;;AA+BO,MAAMA,IAAiB,CAC1B,EAAE,WAAAC,GAAW,gBAAgBC,IAAa,gBAAgB,UAAAC,GAAU,SAAAC,IAAU,WAAW,GAAGC,EAAA,GAC5FC,MACC;AACD,QAAMC,IAAgBC,EAAwB,IAAI;AAElD,SAAAC,EAAgB,MAAM;;AAElB,UAAMC,KAAsBC,IAAAJ,EAAc,YAAd,gBAAAI,EAAuB,iBAAiB;AACpE,QAAID;AACA,iBAAWE,KAAWF;AAClB,QAAAE,EAAQ,aAAa,YAAY,IAAI,GACrCA,EAAQ,aAAa,MAAM,EAAE,GAC7BA,EAAQ,aAAa,gBAAgB,EAAE;AAAA,EAGnD,GAAG,CAAA,CAAE,GAGD,gBAAAC;AAAA,IAACC,EAAe;AAAA,IAAf;AAAA,MACG,KAAAR;AAAA,MACA,iBAAeD,EAAM;AAAA,MACrB,gBAAcD;AAAA,MACd,WAAW,CAACW,EAAO,MAAMd,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MAC5D,gBAAcC;AAAA,MACd,SAAS,CAACc,MAAU;AAIhB,cAAMC,IAAYD,EAAM,OAAuB,aAAa,KAAK,GAC3DE,IAASD,IAAW,SAAS,eAAeA,CAAQ,IAAI;AAE9D,QAAIC,KAAUA,EAAO,aAAa,MAAM,MAAM,eAC1CF,EAAM,eAAA,GACNA,EAAM,gBAAA,GACNE,EAAO,MAAA;AAAA,MAEf;AAAA,MACC,GAAGb;AAAA,MAGJ,UAAA;AAAA,QAAA,gBAAAc;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,CAACJ,EAAO,YAAYA,EAAO,WAAW,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,YAC3E,eAAY;AAAA,YACZ,KAAKR;AAAA,YAEJ,UAAAJ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGL,gBAAAgB,EAAC,QAAA,EAAK,WAAW,CAACJ,EAAO,aAAaA,EAAO,WAAW,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAI,UAAAZ,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3G,GAEaiB,IAAQC,EAAyCrB,CAAc;AAC5EoB,EAAM,cAAc;"}
|
|
@@ -1,47 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useCallback as D } from "react";
|
|
3
|
+
import { useFondueRouter as H } from "./fondue-components23.js";
|
|
4
|
+
import o from "./fondue-components66.js";
|
|
5
|
+
const L = j(
|
|
6
6
|
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"--loading-bar-value": a,
|
|
28
|
-
"--loading-bar-max": r,
|
|
29
|
-
"--loading-bar-proportion": "calc(var(--loading-bar-value) / var(--loading-bar-max))"
|
|
30
|
-
},
|
|
31
|
-
...l,
|
|
32
|
-
children: /* @__PURE__ */ t(
|
|
33
|
-
o.Indicator,
|
|
34
|
-
{
|
|
35
|
-
className: d.indicator,
|
|
36
|
-
"data-variant": i,
|
|
37
|
-
"data-indeterminate": a === null
|
|
7
|
+
id: n,
|
|
8
|
+
className: u,
|
|
9
|
+
children: c,
|
|
10
|
+
size: m = "medium",
|
|
11
|
+
weight: f = "regular",
|
|
12
|
+
truncate: p = !1,
|
|
13
|
+
wrap: d = "nowrap",
|
|
14
|
+
underline: $ = "auto",
|
|
15
|
+
color: k = "primary",
|
|
16
|
+
href: t,
|
|
17
|
+
onContainer: i,
|
|
18
|
+
onPress: e,
|
|
19
|
+
disabled: r = !1,
|
|
20
|
+
...s
|
|
21
|
+
}, v) => {
|
|
22
|
+
const { navigate: l, useHref: w } = H(), g = w(t), x = D(
|
|
23
|
+
(a) => {
|
|
24
|
+
if (r) {
|
|
25
|
+
a.preventDefault();
|
|
26
|
+
return;
|
|
38
27
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
e == null || e(a), t && (a.preventDefault(), l(t));
|
|
29
|
+
},
|
|
30
|
+
[t, l, e, r]
|
|
31
|
+
), y = r ? o.disabled : o[i ? `color-on-container-${i}` : `color-${k}`];
|
|
32
|
+
return /* @__PURE__ */ C(
|
|
33
|
+
"a",
|
|
34
|
+
{
|
|
35
|
+
id: n,
|
|
36
|
+
className: [
|
|
37
|
+
o.root,
|
|
38
|
+
o[`size-${m}`],
|
|
39
|
+
o[`weight-${f}`],
|
|
40
|
+
o[`wrap-${d}`],
|
|
41
|
+
o[`underline-${$}`],
|
|
42
|
+
p && o.truncate,
|
|
43
|
+
y,
|
|
44
|
+
u
|
|
45
|
+
].filter(Boolean).join(" "),
|
|
46
|
+
ref: v,
|
|
47
|
+
href: r ? void 0 : g,
|
|
48
|
+
onClick: x,
|
|
49
|
+
"aria-disabled": r || void 0,
|
|
50
|
+
tabIndex: r ? -1 : void 0,
|
|
51
|
+
...s,
|
|
52
|
+
children: c
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
42
56
|
);
|
|
43
|
-
|
|
57
|
+
L.displayName = "Link";
|
|
44
58
|
export {
|
|
45
|
-
|
|
59
|
+
L as Link
|
|
46
60
|
};
|
|
47
61
|
//# sourceMappingURL=fondue-components18.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components18.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components18.js","sources":["../src/components/Link/Link.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode, type MouseEvent, useCallback } from 'react';\n\nimport { useFondueRouter } from '../RouterProvider/RouterProvider';\n\nimport styles from './styles/link.module.scss';\n\ntype LinkSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\ntype LinkWeight = 'regular' | 'medium' | 'bold';\ntype LinkColor = 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'highlight';\ntype LinkOnContainerColor = 'secondary' | 'disabled' | 'error' | 'success' | 'warning' | 'highlight';\ntype LinkWrap = 'wrap' | 'nowrap';\ntype LinkUnderline = 'auto' | 'always' | 'hover' | 'none';\n\nexport type LinkProps = {\n children?: ReactNode;\n /**\n * The link to navigate to when clicked\n */\n href: string;\n /**\n * Id of the element\n */\n id?: string;\n /**\n * Size of the text\n *\n * @default 'medium'\n */\n size?: LinkSize;\n /**\n * Weight of the font\n *\n * @default 'regular'\n */\n weight?: LinkWeight;\n /**\n * Color of the text\n *\n * @default 'primary'\n */\n color?: LinkColor;\n /**\n * The texts color when used within a container\n *\n * @description optional color prop that uses the inverse container color when accessibility contrast is needed\n **/\n onContainer?: LinkOnContainerColor;\n /**\n * Truncate the text if it overflows\n */\n truncate?: boolean;\n /**\n * Wrap the text if it overflows\n * @default 'nowrap'\n */\n wrap?: LinkWrap;\n /**\n * Underline behavior of the link\n * @default 'auto'\n */\n underline?: LinkUnderline;\n /**\n * The target attribute for the link\n * @default '_self'\n */\n target?: string;\n /**\n * The rel attribute for the link\n * @default 'noopener noreferrer'\n */\n rel?: string;\n className?: string;\n onPress?: (event: MouseEvent<HTMLAnchorElement>) => void;\n 'data-test-id'?: string;\n /**\n * Aria label for the component.\n */\n 'aria-label'?: string;\n /**\n * Aria labelled by for the component.\n */\n 'aria-labelledby'?: string;\n /**\n * Aria described by for the component.\n */\n 'aria-describedby'?: string;\n /**\n * Aria details for extend description of the component.\n */\n 'aria-details'?: string;\n /**\n * Disable the link\n *\n * @default false\n */\n disabled?: boolean;\n};\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n id,\n className,\n children,\n size = 'medium',\n weight = 'regular',\n truncate = false,\n wrap = 'nowrap',\n underline = 'auto',\n color = 'primary',\n href,\n onContainer,\n onPress,\n disabled = false,\n ...props\n },\n ref,\n ) => {\n const { navigate, useHref } = useFondueRouter();\n const resolvedHref = useHref(href);\n\n const handleClick = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n onPress?.(event);\n\n if (href) {\n event.preventDefault();\n navigate(href);\n }\n },\n [href, navigate, onPress, disabled],\n );\n\n const computedColor = disabled\n ? styles.disabled\n : styles[onContainer ? `color-on-container-${onContainer}` : `color-${color}`];\n\n return (\n <a\n id={id}\n className={[\n styles.root,\n styles[`size-${size}`],\n styles[`weight-${weight}`],\n styles[`wrap-${wrap}`],\n styles[`underline-${underline}`],\n truncate && styles.truncate,\n computedColor,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n ref={ref}\n href={disabled ? undefined : resolvedHref}\n onClick={handleClick}\n aria-disabled={disabled || undefined}\n tabIndex={disabled ? -1 : undefined}\n {...props}\n >\n {children}\n </a>\n );\n },\n);\nLink.displayName = 'Link';\n"],"names":["Link","forwardRef","id","className","children","size","weight","truncate","wrap","underline","color","href","onContainer","onPress","disabled","props","ref","navigate","useHref","useFondueRouter","resolvedHref","handleClick","useCallback","event","computedColor","styles","jsx"],"mappings":";;;;AAoGO,MAAMA,IAAOC;AAAA,EAChB,CACI;AAAA,IACI,IAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,MAAAC,IAAO;AAAA,IACP,WAAAC,IAAY;AAAA,IACZ,OAAAC,IAAQ;AAAA,IACR,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,GAAGC;AAAA,EAAA,GAEPC,MACC;AACD,UAAM,EAAE,UAAAC,GAAU,SAAAC,EAAA,IAAYC,EAAA,GACxBC,IAAeF,EAAQP,CAAI,GAE3BU,IAAcC;AAAA,MAChB,CAACC,MAAyC;AACtC,YAAIT,GAAU;AACV,UAAAS,EAAM,eAAA;AACN;AAAA,QACJ;AACA,QAAAV,KAAA,QAAAA,EAAUU,IAENZ,MACAY,EAAM,eAAA,GACNN,EAASN,CAAI;AAAA,MAErB;AAAA,MACA,CAACA,GAAMM,GAAUJ,GAASC,CAAQ;AAAA,IAAA,GAGhCU,IAAgBV,IAChBW,EAAO,WACPA,EAAOb,IAAc,sBAAsBA,CAAW,KAAK,SAASF,CAAK,EAAE;AAEjF,WACI,gBAAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,IAAAxB;AAAA,QACA,WAAW;AAAA,UACPuB,EAAO;AAAA,UACPA,EAAO,QAAQpB,CAAI,EAAE;AAAA,UACrBoB,EAAO,UAAUnB,CAAM,EAAE;AAAA,UACzBmB,EAAO,QAAQjB,CAAI,EAAE;AAAA,UACrBiB,EAAO,aAAahB,CAAS,EAAE;AAAA,UAC/BF,KAAYkB,EAAO;AAAA,UACnBD;AAAA,UACArB;AAAA,QAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,QACb,KAAAa;AAAA,QACA,MAAMF,IAAW,SAAYM;AAAA,QAC7B,SAASC;AAAA,QACT,iBAAeP,KAAY;AAAA,QAC3B,UAAUA,IAAW,KAAK;AAAA,QACzB,GAAGC;AAAA,QAEH,UAAAX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGb;AACJ;AACAJ,EAAK,cAAc;"}
|
|
@@ -1,24 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-progress";
|
|
3
|
+
import { forwardRef as c } from "react";
|
|
4
|
+
import d from "./fondue-components67.js";
|
|
5
|
+
const g = c(
|
|
5
6
|
({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
7
|
+
value: a,
|
|
8
|
+
max: r = 100,
|
|
9
|
+
rounded: e = !0,
|
|
10
|
+
variant: i = "default",
|
|
11
|
+
size: n = "medium",
|
|
12
|
+
"data-test-id": s = "fondue-loading-bar",
|
|
13
|
+
...l
|
|
14
|
+
}, m) => /* @__PURE__ */ t(
|
|
15
|
+
o.Root,
|
|
11
16
|
{
|
|
12
|
-
ref:
|
|
13
|
-
"data-test-id":
|
|
14
|
-
|
|
15
|
-
"data-
|
|
16
|
-
|
|
17
|
+
ref: m,
|
|
18
|
+
"data-test-id": s,
|
|
19
|
+
className: d.container,
|
|
20
|
+
"data-rounded": e,
|
|
21
|
+
"data-size": n,
|
|
22
|
+
"data-variant": i,
|
|
23
|
+
"aria-busy": a !== r,
|
|
24
|
+
value: a,
|
|
25
|
+
max: r,
|
|
26
|
+
style: {
|
|
27
|
+
"--loading-bar-value": a,
|
|
28
|
+
"--loading-bar-max": r,
|
|
29
|
+
"--loading-bar-proportion": "calc(var(--loading-bar-value) / var(--loading-bar-max))"
|
|
30
|
+
},
|
|
31
|
+
...l,
|
|
32
|
+
children: /* @__PURE__ */ t(
|
|
33
|
+
o.Indicator,
|
|
34
|
+
{
|
|
35
|
+
className: d.indicator,
|
|
36
|
+
"data-variant": i,
|
|
37
|
+
"data-indeterminate": a === null
|
|
38
|
+
}
|
|
39
|
+
)
|
|
17
40
|
}
|
|
18
41
|
)
|
|
19
42
|
);
|
|
20
|
-
|
|
43
|
+
g.displayName = "LoadingBar";
|
|
21
44
|
export {
|
|
22
|
-
|
|
45
|
+
g as LoadingBar
|
|
23
46
|
};
|
|
24
47
|
//# sourceMappingURL=fondue-components19.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components19.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components19.js","sources":["../src/components/LoadingBar/LoadingBar.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ProgressRadixPrimitive from '@radix-ui/react-progress';\nimport { forwardRef, type CSSProperties, type ElementRef, type ForwardedRef } from 'react';\n\nimport styles from './styles/loadingBar.module.scss';\n\nexport type LoadingBarProps = {\n /**\n * The current value of the loading bar. If `null`, the loading bar will be in an indeterminate state.\n * @default null\n */\n value: number | null;\n /**\n * The maximum value of the loading bar\n * @default 100\n */\n max?: number;\n /**\n * @default 'fondue-loading-bar'\n */\n 'data-test-id'?: string;\n /**\n * Add rounded corners to the loading bar\n * @default true\n */\n rounded?: boolean;\n /**\n * The style of the loading bar\n * @default \"default\"\n */\n variant?: 'default' | 'positive' | 'negative';\n /**\n * The size of the loading bar\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /**\n * The label of the loading bar for accessibility purposes\n */\n getValueLabel?: (value: number, max: number) => string;\n} & ({ 'aria-label': string } | { 'aria-labelledby': string });\n\nexport const LoadingBar = forwardRef<ElementRef<typeof ProgressRadixPrimitive.Root>, LoadingBarProps>(\n (\n {\n value,\n max = 100,\n rounded = true,\n variant = 'default',\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-loading-bar',\n ...props\n }: LoadingBarProps,\n ref: ForwardedRef<ElementRef<typeof ProgressRadixPrimitive.Root>>,\n ) => {\n return (\n <ProgressRadixPrimitive.Root\n ref={ref}\n data-test-id={dataTestId}\n className={styles.container}\n data-rounded={rounded}\n data-size={size}\n data-variant={variant}\n aria-busy={value !== max}\n value={value}\n max={max}\n style={\n {\n '--loading-bar-value': value,\n '--loading-bar-max': max,\n '--loading-bar-proportion': 'calc(var(--loading-bar-value) / var(--loading-bar-max))',\n } as CSSProperties\n }\n {...props}\n >\n <ProgressRadixPrimitive.Indicator\n className={styles.indicator}\n data-variant={variant}\n data-indeterminate={value === null}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","variant","size","dataTestId","props","ref","jsx","ProgressRadixPrimitive","styles"],"mappings":";;;;AA2CO,MAAMA,IAAaC;AAAA,EACtB,CACI;AAAA,IACI,OAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,GAAGC;AAAA,EAAA,GAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAAO;AAAA,MAClB,gBAAcR;AAAA,MACd,aAAWE;AAAA,MACX,gBAAcD;AAAA,MACd,aAAWH,MAAUC;AAAA,MACrB,OAAAD;AAAA,MACA,KAAAC;AAAA,MACA,OACI;AAAA,QACI,uBAAuBD;AAAA,QACvB,qBAAqBC;AAAA,QACrB,4BAA4B;AAAA,MAAA;AAAA,MAGnC,GAAGK;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACC,EAAuB;AAAA,QAAvB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,gBAAcP;AAAA,UACd,sBAAoBH,MAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IAClC;AAAA,EAAA;AAIhB;AACAF,EAAW,cAAc;"}
|
|
@@ -1,50 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
size: e = "medium",
|
|
11
|
-
icon: i,
|
|
12
|
-
action: s,
|
|
13
|
-
onDismiss: l,
|
|
14
|
-
className: c = "",
|
|
15
|
-
children: m
|
|
16
|
-
}) => {
|
|
17
|
-
const { t: u } = N();
|
|
18
|
-
return /* @__PURE__ */ p(
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import d from "./fondue-components68.js";
|
|
4
|
+
const s = i(
|
|
5
|
+
({
|
|
6
|
+
variant: t = "progress",
|
|
7
|
+
size: a = "medium",
|
|
8
|
+
"data-test-id": r = "fondue-loading-circle-content"
|
|
9
|
+
}, o) => /* @__PURE__ */ e(
|
|
19
10
|
"div",
|
|
20
11
|
{
|
|
21
|
-
|
|
22
|
-
"data-variant": n,
|
|
23
|
-
"data-emphasis": d,
|
|
24
|
-
"data-size": e,
|
|
12
|
+
ref: o,
|
|
25
13
|
"data-test-id": r,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
children: [
|
|
30
|
-
i ? /* @__PURE__ */ t("div", { className: a.icon, children: i }) : null,
|
|
31
|
-
/* @__PURE__ */ t("div", { className: a.content, children: m }),
|
|
32
|
-
s ? /* @__PURE__ */ t("div", { className: a.action, children: s }) : null,
|
|
33
|
-
l ? /* @__PURE__ */ t(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
type: "button",
|
|
37
|
-
"aria-label": o || u("Notice_dismiss"),
|
|
38
|
-
className: a.dismiss,
|
|
39
|
-
onClick: l,
|
|
40
|
-
children: /* @__PURE__ */ t(f, { size: e === "large" ? "20" : "16" })
|
|
41
|
-
}
|
|
42
|
-
) : null
|
|
43
|
-
]
|
|
14
|
+
"data-variant": t,
|
|
15
|
+
"data-size": a,
|
|
16
|
+
className: d.root
|
|
44
17
|
}
|
|
45
|
-
)
|
|
46
|
-
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
s.displayName = "LoadingCircle";
|
|
47
21
|
export {
|
|
48
|
-
|
|
22
|
+
s as LoadingCircle
|
|
49
23
|
};
|
|
50
24
|
//# sourceMappingURL=fondue-components20.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components20.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components20.js","sources":["../src/components/LoadingCircle/LoadingCircle.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef } from 'react';\n\nimport styles from './styles/loadingCircleStyles.module.scss';\n\nexport type LoadingCircleProps = {\n /**\n * The variant of the loading circle.\n * @default 'progress'\n */\n variant?: 'progress' | 'success' | 'danger';\n /**\n * The size of the loading circle\n * @default \"medium\"\n */\n size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n 'data-test-id'?: string;\n};\n\nexport const LoadingCircle = forwardRef<HTMLDivElement, LoadingCircleProps>(\n (\n {\n variant = 'progress',\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-loading-circle-content',\n }: LoadingCircleProps,\n ref: ForwardedRef<HTMLDivElement>,\n ) => {\n return (\n <div\n ref={ref}\n data-test-id={dataTestId}\n data-variant={variant}\n data-size={size}\n className={styles.root}\n ></div>\n );\n },\n);\nLoadingCircle.displayName = 'LoadingCircle';\n"],"names":["LoadingCircle","forwardRef","variant","size","dataTestId","ref","jsx","styles"],"mappings":";;;AAoBO,MAAMA,IAAgBC;AAAA,EACzB,CACI;AAAA,IACI,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,EAAA,GAEjCC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,gBAAcD;AAAA,MACd,gBAAcF;AAAA,MACd,aAAWC;AAAA,MACX,WAAWI,EAAO;AAAA,IAAA;AAAA,EAAA;AAIlC;AACAP,EAAc,cAAc;"}
|