@frontify/fondue-components 1.2.3 → 1.3.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 +16 -4
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +46 -114
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +45 -34
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +8 -2360
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +11 -142
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +154 -29
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +121 -0
- package/dist/fondue-components15.js.map +1 -0
- package/dist/fondue-components16.js +121 -0
- package/dist/fondue-components16.js.map +1 -0
- package/dist/fondue-components17.js +23 -0
- package/dist/fondue-components17.js.map +1 -0
- package/dist/fondue-components18.js +63 -0
- package/dist/fondue-components18.js.map +1 -0
- package/dist/fondue-components19.js +20 -0
- package/dist/fondue-components19.js.map +1 -0
- package/dist/fondue-components20.js +38 -0
- package/dist/fondue-components20.js.map +1 -0
- package/dist/fondue-components21.js +28 -0
- package/dist/fondue-components21.js.map +1 -0
- package/dist/fondue-components22.js +11 -0
- package/dist/fondue-components22.js.map +1 -0
- package/dist/fondue-components23.js +8 -0
- package/dist/fondue-components23.js.map +1 -0
- package/dist/fondue-components24.js +18 -0
- package/dist/fondue-components24.js.map +1 -0
- package/dist/fondue-components25.js +2363 -0
- package/dist/fondue-components25.js.map +1 -0
- package/dist/fondue-components26.js +146 -0
- package/dist/fondue-components26.js.map +1 -0
- package/dist/fondue-components27.js +32 -0
- package/dist/fondue-components27.js.map +1 -0
- package/dist/fondue-components3.js +5 -5
- package/dist/fondue-components4.js +44 -51
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components5.js +22 -34
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components6.js +58 -8
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components7.js +23 -11
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +38 -153
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +46 -117
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +377 -8
- package/dist/style.css +1 -1
- package/package.json +41 -31
|
@@ -1,56 +1,49 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
color: s = "#CCC"
|
|
17
|
-
}) => a ? /* @__PURE__ */ t(
|
|
18
|
-
"div",
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { IconMinus as m, IconCheckMark as h } from "@frontify/fondue-icons";
|
|
3
|
+
import * as o from "@radix-ui/react-checkbox";
|
|
4
|
+
import { forwardRef as k } from "react";
|
|
5
|
+
import { cn as p } from "./fondue-components13.js";
|
|
6
|
+
import { checkboxStyles as l, checkboxIndicatorStyles as w } from "./fondue-components17.js";
|
|
7
|
+
const f = ({
|
|
8
|
+
className: a,
|
|
9
|
+
value: c,
|
|
10
|
+
onChange: i,
|
|
11
|
+
defaultValue: d,
|
|
12
|
+
"data-test-id": r = "fondue-checkbox",
|
|
13
|
+
...e
|
|
14
|
+
}, n) => /* @__PURE__ */ t(
|
|
15
|
+
o.Root,
|
|
19
16
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
ref: n,
|
|
18
|
+
checked: c,
|
|
19
|
+
defaultChecked: d,
|
|
20
|
+
className: p(l(e), a),
|
|
21
|
+
onClick: i,
|
|
22
|
+
"data-test-id": r,
|
|
23
|
+
...e,
|
|
24
|
+
children: /* @__PURE__ */ s(o.Indicator, { className: w, children: [
|
|
25
|
+
/* @__PURE__ */ t(
|
|
26
|
+
m,
|
|
27
|
+
{
|
|
28
|
+
size: 16,
|
|
29
|
+
className: 'tw-hidden tw-opacity-0 group-data-[state="indeterminate"]:tw-block group-data-[state="indeterminate"]:tw-opacity-100 tw-transition-opacity',
|
|
30
|
+
"data-test-id": "icon-indeterminate"
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ t(
|
|
34
|
+
h,
|
|
35
|
+
{
|
|
36
|
+
size: 16,
|
|
37
|
+
className: 'tw-hidden tw-opacity-0 group-data-[state="checked"]:tw-block group-data-[state="checked"]:tw-opacity-100 tw-transition-opacity',
|
|
38
|
+
"data-test-id": "icon-checked"
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] })
|
|
35
42
|
}
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
className: "tw-flex tw-items-center tw-w-full",
|
|
41
|
-
style: { height: d[e] },
|
|
42
|
-
"data-test-id": i,
|
|
43
|
-
children: /* @__PURE__ */ t(
|
|
44
|
-
"hr",
|
|
45
|
-
{
|
|
46
|
-
className: `tw-border-t tw-m-0 tw-w-full ${l[r]}`,
|
|
47
|
-
style: { borderTopColor: s },
|
|
48
|
-
"data-test-id": "fondue-divider-line"
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
);
|
|
43
|
+
), x = k(f);
|
|
44
|
+
x.displayName = "Checkbox";
|
|
53
45
|
export {
|
|
54
|
-
|
|
46
|
+
x as Checkbox,
|
|
47
|
+
f as CheckboxComponent
|
|
55
48
|
};
|
|
56
49
|
//# sourceMappingURL=fondue-components4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components4.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components4.js","sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark, IconMinus } from '@frontify/fondue-icons';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { type FormEvent, forwardRef, type ForwardedRef } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { checkboxIndicatorStyles, checkboxStyles } from './styles/checkboxStyles';\n\nexport type CheckboxProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the checkbox\n * Used for uncontrolled components\n * @default false\n */\n defaultValue?: boolean | 'indeterminate';\n /**\n * The controlled value of the checkbox\n * @default false\n */\n value?: boolean | 'indeterminate';\n /**\n * The size of the checkbox\n * @default \"default\"\n */\n size?: 'default' | 'large';\n /**\n * The emphasis of the checkbox\n * @default \"default\"\n */\n emphasis?: 'default' | 'weak';\n /**\n * Disable the checkbox\n * @default false\n */\n disabled?: boolean;\n /**\n * Make the checkbox required in form\n * @default false\n */\n required?: boolean;\n /**\n * Make the checkbox read-only\n * @default false\n */\n readOnly?: boolean;\n className?: string;\n /**\n * Event handler called when the checkbox value changes\n */\n onChange?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is blurred\n */\n onBlur?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is focused\n */\n onFocus?: (event: FormEvent<HTMLButtonElement>) => void;\n 'data-test-id'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n};\n\nexport const CheckboxComponent = (\n {\n className,\n value,\n onChange,\n defaultValue,\n 'data-test-id': dataTestId = 'fondue-checkbox',\n ...props\n }: CheckboxProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n checked={value}\n defaultChecked={defaultValue}\n className={cn(checkboxStyles(props), className)}\n onClick={onChange}\n data-test-id={dataTestId}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={checkboxIndicatorStyles}>\n <IconMinus\n size={16}\n className='tw-hidden tw-opacity-0 group-data-[state=\"indeterminate\"]:tw-block group-data-[state=\"indeterminate\"]:tw-opacity-100 tw-transition-opacity'\n data-test-id=\"icon-indeterminate\"\n />\n\n <IconCheckMark\n size={16}\n className='tw-hidden tw-opacity-0 group-data-[state=\"checked\"]:tw-block group-data-[state=\"checked\"]:tw-opacity-100 tw-transition-opacity'\n data-test-id=\"icon-checked\"\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n};\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(CheckboxComponent);\nCheckbox.displayName = 'Checkbox';\n"],"names":["CheckboxComponent","className","value","onChange","defaultValue","dataTestId","props","ref","jsx","CheckboxPrimitive","cn","checkboxStyles","jsxs","checkboxIndicatorStyles","IconMinus","IconCheckMark","Checkbox","forwardRef"],"mappings":";;;;;;AAoEO,MAAMA,IAAoB,CAC7B;AAAA,EACI,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MAGI,gBAAAC;AAAA,EAACC,EAAkB;AAAA,EAAlB;AAAA,IACG,KAAAF;AAAA,IACA,SAASL;AAAA,IACT,gBAAgBE;AAAA,IAChB,WAAWM,EAAGC,EAAeL,CAAK,GAAGL,CAAS;AAAA,IAC9C,SAASE;AAAA,IACT,gBAAcE;AAAA,IACb,GAAGC;AAAA,IAEJ,UAAC,gBAAAM,EAAAH,EAAkB,WAAlB,EAA4B,WAAWI,GACpC,UAAA;AAAA,MAAA,gBAAAL;AAAA,QAACM;AAAA,QAAA;AAAA,UACG,MAAM;AAAA,UACN,WAAU;AAAA,UACV,gBAAa;AAAA,QAAA;AAAA,MACjB;AAAA,MAEA,gBAAAN;AAAA,QAACO;AAAA,QAAA;AAAA,UACG,MAAM;AAAA,UACN,WAAU;AAAA,UACV,gBAAa;AAAA,QAAA;AAAA,MACjB;AAAA,IAAA,GACJ;AAAA,EAAA;AAAA,GAKCC,IAAWC,EAA6CjB,CAAiB;AACtFgB,EAAS,cAAc;"}
|
|
@@ -1,38 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
className: f({ rounded: d, size: e, style: t }),
|
|
20
|
-
"aria-busy": a !== r,
|
|
21
|
-
value: a,
|
|
22
|
-
max: r,
|
|
23
|
-
style: a ? { "--loading-bar-value": `${a}%` } : {},
|
|
24
|
-
...s,
|
|
25
|
-
children: /* @__PURE__ */ i(
|
|
26
|
-
o.Indicator,
|
|
27
|
-
{
|
|
28
|
-
className: g({ style: t, indeterminateState: a === null })
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
)
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "@radix-ui/react-separator";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { cn as p } from "./fondue-components13.js";
|
|
5
|
+
import { dividerStyles as f } from "./fondue-components18.js";
|
|
6
|
+
const r = ({ "data-test-id": o = "fondue-divider", direction: t = "horizontal", className: i, ...e }, d) => /* @__PURE__ */ a(
|
|
7
|
+
m.Root,
|
|
8
|
+
{
|
|
9
|
+
ref: d,
|
|
10
|
+
className: p(
|
|
11
|
+
f({
|
|
12
|
+
direction: t,
|
|
13
|
+
...e
|
|
14
|
+
}),
|
|
15
|
+
i
|
|
16
|
+
),
|
|
17
|
+
"data-test-id": o
|
|
18
|
+
}
|
|
33
19
|
);
|
|
34
|
-
|
|
20
|
+
r.displayName = "Divider";
|
|
21
|
+
const D = s(r);
|
|
35
22
|
export {
|
|
36
|
-
|
|
23
|
+
D as Divider,
|
|
24
|
+
r as DividerComponent
|
|
37
25
|
};
|
|
38
26
|
//# sourceMappingURL=fondue-components5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components5.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components5.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n style?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const DividerComponent = (\n { 'data-test-id': dataTestId = 'fondue-divider', direction = 'horizontal', className, ...props }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n): ReactElement => {\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n ...props,\n }),\n className,\n )}\n data-test-id={dataTestId}\n />\n );\n};\n\nDividerComponent.displayName = 'Divider';\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(DividerComponent);\n"],"names":["DividerComponent","dataTestId","direction","className","props","ref","jsx","Separator","cn","dividerStyles","Divider","forwardRef"],"mappings":";;;;;AAuCO,MAAMA,IAAmB,CAC5B,EAAE,gBAAgBC,IAAa,kBAAkB,WAAAC,IAAY,cAAc,WAAAC,GAAW,GAAGC,EAAM,GAC/FC,MAGI,gBAAAC;AAAA,EAACC,EAAU;AAAA,EAAV;AAAA,IACG,KAAAF;AAAA,IACA,WAAWG;AAAA,MACPC,EAAc;AAAA,QACV,WAAAP;AAAA,QACA,GAAGE;AAAA,MAAA,CACN;AAAA,MACDD;AAAA,IACJ;AAAA,IACA,gBAAcF;AAAA,EAAA;AAAA;AAK1BD,EAAiB,cAAc;AAElB,MAAAU,IAAUC,EAAyCX,CAAgB;"}
|
|
@@ -1,11 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as a, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as g } from "@frontify/fondue-icons";
|
|
3
|
+
import * as r from "@radix-ui/react-popover";
|
|
4
|
+
import { forwardRef as d } from "react";
|
|
5
|
+
import { flyoutContentStyles as N, flyoutHeaderStyles as C, flyoutFooterStyles as h, flyoutBodyStyles as x } from "./fondue-components19.js";
|
|
6
|
+
const i = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
|
|
7
|
+
i.displayName = "Flyout.Root";
|
|
8
|
+
const y = ({ children: t, "data-test-id": o = "fondue-flyout-trigger" }, e) => /* @__PURE__ */ a(r.Trigger, { "data-test-id": o, asChild: !0, ref: e, children: t });
|
|
9
|
+
y.displayName = "Flyout.Trigger";
|
|
10
|
+
const n = ({
|
|
11
|
+
align: t = "start",
|
|
12
|
+
maxWidth: o = "360px",
|
|
13
|
+
padding: e = "compact",
|
|
14
|
+
"data-test-id": s = "fondue-flyout-content",
|
|
15
|
+
children: m,
|
|
16
|
+
...l
|
|
17
|
+
}, p) => /* @__PURE__ */ a(r.Portal, { children: /* @__PURE__ */ a(
|
|
18
|
+
r.Content,
|
|
19
|
+
{
|
|
20
|
+
style: {
|
|
21
|
+
"--flyout-max-width": o
|
|
22
|
+
},
|
|
23
|
+
ref: p,
|
|
24
|
+
align: t,
|
|
25
|
+
collisionPadding: 8,
|
|
26
|
+
sideOffset: 8,
|
|
27
|
+
className: N({ ...l }),
|
|
28
|
+
"data-flyout-spacing": e,
|
|
29
|
+
"data-test-id": s,
|
|
30
|
+
...l,
|
|
31
|
+
children: m
|
|
32
|
+
}
|
|
33
|
+
) });
|
|
34
|
+
n.displayName = "Flyout.Content";
|
|
35
|
+
const u = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, s) => /* @__PURE__ */ F("div", { "data-test-id": e, ref: s, className: C, children: [
|
|
36
|
+
/* @__PURE__ */ a("div", { children: o }),
|
|
37
|
+
t && /* @__PURE__ */ a(r.Close, { role: "button", "data-test-id": `${e}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ a(g, { size: 20 }) })
|
|
38
|
+
] });
|
|
39
|
+
u.displayName = "Flyout.Header";
|
|
40
|
+
const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: h, children: t });
|
|
41
|
+
f.displayName = "Flyout.Footer";
|
|
42
|
+
const c = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: x, children: t });
|
|
43
|
+
c.displayName = "Flyout.Body";
|
|
44
|
+
const S = {
|
|
45
|
+
Root: i,
|
|
46
|
+
Trigger: d(y),
|
|
47
|
+
Content: d(n),
|
|
48
|
+
Header: d(u),
|
|
49
|
+
Footer: d(f),
|
|
50
|
+
Body: d(c)
|
|
51
|
+
};
|
|
6
52
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
n as
|
|
53
|
+
S as Flyout,
|
|
54
|
+
c as FlyoutBody,
|
|
55
|
+
n as FlyoutContent,
|
|
56
|
+
f as FlyoutFooter,
|
|
57
|
+
u as FlyoutHeader,
|
|
58
|
+
i as FlyoutRoot,
|
|
59
|
+
y as FlyoutTrigger
|
|
10
60
|
};
|
|
11
61
|
//# sourceMappingURL=fondue-components6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components6.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components6.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { flyoutBodyStyles, flyoutContentStyles, flyoutFooterStyles, flyoutHeaderStyles } from './styles/flyoutStyles';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type FlyoutContentProps = {\n /**\n * Add rounded corners to the flyout\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport const FlyoutTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n className={flyoutContentStyles({ ...props })}\n data-flyout-spacing={padding}\n data-test-id={dataTestId}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={flyoutHeaderStyles}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={flyoutFooterStyles}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={flyoutBodyStyles}>\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","dataTestId","ref","jsx","FlyoutContent","align","maxWidth","padding","flyoutContentStyles","FlyoutHeader","showCloseButton","flyoutHeaderStyles","IconCross","FlyoutFooter","flyoutFooterStyles","FlyoutBody","flyoutBodyStyles","Flyout","forwardRef"],"mappings":";;;;;AAwEO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,EAAS,CAAA;AAEnDD,EAAW,cAAc;AAEZ,MAAAI,IAAgB,CACzB,EAAE,UAAAH,GAAU,gBAAgBI,IAAa,2BACzCC,MAGI,gBAAAC,EAACJ,EAAa,SAAb,EAAqB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GACnD,UAAAL,EACL,CAAA;AAGRG,EAAc,cAAc;AAErB,MAAMI,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,gBAAgBN,IAAa;AAAA,EAC7B,UAAAJ;AAAA,EACA,GAAGC;AACP,GACAI,MAGI,gBAAAC,EAACJ,EAAa,QAAb,EACG,UAAA,gBAAAI;AAAA,EAACJ,EAAa;AAAA,EAAb;AAAA,IACG,OACI;AAAA,MACI,sBAAsBO;AAAA,IAC1B;AAAA,IAEJ,KAAAJ;AAAA,IACA,OAAAG;AAAA,IACA,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,WAAWG,EAAoB,EAAE,GAAGV,GAAO;AAAA,IAC3C,uBAAqBS;AAAA,IACrB,gBAAcN;AAAA,IACb,GAAGH;AAAA,IAEH,UAAAD;AAAA,EAAA;AAET,EAAA,CAAA;AAGRO,EAAc,cAAc;AAEf,MAAAK,IAAe,CACxB,EAAE,iBAAAC,GAAiB,UAAAb,GAAU,gBAAgBI,IAAa,uBAAuB,GACjFC,wBAGK,OAAI,EAAA,gBAAcD,GAAY,KAAAC,GAAU,WAAWS,GAChD,UAAA;AAAA,EAAA,gBAAAR,EAAC,SAAK,UAAAN,GAAS;AAAA,EACda,KACI,gBAAAP,EAAAJ,EAAa,OAAb,EAAmB,MAAK,UAAS,gBAAc,GAAGE,CAAU,UAAU,WAAU,qBAC7E,4BAACW,GAAU,EAAA,MAAM,GAAI,CAAA,GACzB;AAER,EAAA,CAAA;AAGRH,EAAa,cAAc;AAEd,MAAAI,IAAe,CACxB,EAAE,UAAAhB,GAAU,gBAAgBI,IAAa,0BACzCC,wBAGK,OAAI,EAAA,gBAAcD,GAAY,KAAAC,GAAU,WAAWY,GAC/C,UAAAjB,EACL,CAAA;AAGRgB,EAAa,cAAc;AAEd,MAAAE,IAAa,CACtB,EAAE,UAAAlB,GAAU,gBAAgBI,IAAa,wBACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,uBAAoB,WAAU,WAAWc,GAC7E,UAAAnB,EACL,CAAA;AAGRkB,EAAW,cAAc;AAElB,MAAME,IAAS;AAAA,EAClB,MAAMrB;AAAA,EACN,SAASsB,EAAkDlB,CAAa;AAAA,EACxE,SAASkB,EAA+Cd,CAAa;AAAA,EACrE,QAAQc,EAA8CT,CAAY;AAAA,EAClE,QAAQS,EAA8CL,CAAY;AAAA,EAClE,MAAMK,EAA4CH,CAAU;AAChE;"}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "@radix-ui/react-label";
|
|
3
|
+
import { forwardRef as i } from "react";
|
|
4
|
+
import { cn as n } from "./fondue-components13.js";
|
|
5
|
+
const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
|
|
6
|
+
d.Root,
|
|
7
|
+
{
|
|
8
|
+
ref: r,
|
|
9
|
+
"data-required": t.required,
|
|
10
|
+
className: n(
|
|
11
|
+
'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state="checked"]:tw-font-medium peer-data-[state="indeterminate"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',
|
|
12
|
+
// Disabled state if siblings has disabled state
|
|
13
|
+
"has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed",
|
|
14
|
+
// Required asterisk
|
|
15
|
+
'after:tw-hidden data-[required="true"]:after:tw-flex after:tw-content-["*"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
"data-test-id": a,
|
|
19
|
+
...t
|
|
9
20
|
}
|
|
10
|
-
|
|
21
|
+
), w = i(s);
|
|
22
|
+
w.displayName = "Label";
|
|
11
23
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
w as Label,
|
|
25
|
+
s as LabelComponent
|
|
14
26
|
};
|
|
15
27
|
//# sourceMappingURL=fondue-components7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components7.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components7.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 ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\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 className?: string;\n 'data-test-id'?: string;\n};\n\nexport const LabelComponent = (\n { className, 'data-test-id': dataTestId = 'fondue-label', ...props }: LabelProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) => {\n return (\n <LabelPrimitive.Root\n ref={ref}\n data-required={props.required}\n className={cn(\n 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state=\"checked\"]:tw-font-medium peer-data-[state=\"indeterminate\"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',\n // Disabled state if siblings has disabled state\n 'has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed',\n // Required asterisk\n 'after:tw-hidden data-[required=\"true\"]:after:tw-flex after:tw-content-[\"*\"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',\n className,\n )}\n data-test-id={dataTestId}\n {...props}\n />\n );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","props","ref","jsx","LabelPrimitive","cn","Label","forwardRef"],"mappings":";;;;AAuBa,MAAAA,IAAiB,CAC1B,EAAE,WAAAC,GAAW,gBAAgBC,IAAa,gBAAgB,GAAGC,EAAM,GACnEC,MAGI,gBAAAC;AAAA,EAACC,EAAe;AAAA,EAAf;AAAA,IACG,KAAAF;AAAA,IACA,iBAAeD,EAAM;AAAA,IACrB,WAAWI;AAAA,MACP;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACAN;AAAA,IACJ;AAAA,IACA,gBAAcC;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,GAKHK,IAAQC,EAAyCT,CAAc;AAC5EQ,EAAM,cAAc;"}
|
|
@@ -1,157 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-progress";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components20.js";
|
|
5
|
+
const p = s(
|
|
6
|
+
({
|
|
7
|
+
value: a,
|
|
8
|
+
max: r = 100,
|
|
9
|
+
rounded: d = !0,
|
|
10
|
+
style: o = "default",
|
|
11
|
+
size: e = "medium",
|
|
12
|
+
"data-test-id": n = "fondue-loading-bar",
|
|
13
|
+
...l
|
|
14
|
+
}, m) => /* @__PURE__ */ i(
|
|
15
|
+
t.Root,
|
|
16
|
+
{
|
|
17
|
+
ref: m,
|
|
18
|
+
"data-test-id": n,
|
|
19
|
+
className: g({ rounded: d, size: e, style: o }),
|
|
20
|
+
"aria-busy": a !== r,
|
|
21
|
+
value: a,
|
|
22
|
+
max: r,
|
|
23
|
+
style: {
|
|
24
|
+
"--loading-bar-value": a,
|
|
25
|
+
"--loading-bar-max": r,
|
|
26
|
+
"--loading-bar-proportion": "calc(var(--loading-bar-value) / var(--loading-bar-max))"
|
|
27
|
+
},
|
|
28
|
+
...l,
|
|
29
|
+
children: /* @__PURE__ */ i(
|
|
30
|
+
t.Indicator,
|
|
31
|
+
{
|
|
32
|
+
className: f({ style: o, indeterminateState: a === null })
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
disabled: !1,
|
|
40
|
-
style: "default",
|
|
41
|
-
emphasis: "default",
|
|
42
|
-
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
disabled: !1,
|
|
46
|
-
style: "default",
|
|
47
|
-
emphasis: "weak",
|
|
48
|
-
class: "tw-border-transparent hover:tw-bg-button-background-hover hover:tw-border-button-border active:tw-bg-button-background-pressed"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
disabled: !1,
|
|
52
|
-
style: "default",
|
|
53
|
-
emphasis: "strong",
|
|
54
|
-
class: "tw-bg-button-strong-background tw-border-button-strong-border hover:tw-bg-button-strong-background-hover active:tw-bg-button-strong-background-pressed"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
disabled: !1,
|
|
58
|
-
style: "positive",
|
|
59
|
-
emphasis: "default",
|
|
60
|
-
class: "tw-bg-button-positive-background tw-border-button-positive-border hover:tw-bg-button-positive-background-hover active:tw-bg-button-positive-background-pressed"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
disabled: !1,
|
|
64
|
-
style: "positive",
|
|
65
|
-
emphasis: "weak",
|
|
66
|
-
class: "tw-border-transparent hover:tw-bg-button-positive-background-hover hover:tw-border-button-positive-border active:tw-bg-button-positive-background-pressed"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
disabled: !1,
|
|
70
|
-
style: "positive",
|
|
71
|
-
emphasis: "strong",
|
|
72
|
-
class: "tw-bg-button-strong-positive-background tw-border-button-strong-positive-border hover:tw-bg-button-strong-positive-background-hover active:tw-bg-button-strong-positive-background-pressed"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
disabled: !1,
|
|
76
|
-
style: "negative",
|
|
77
|
-
emphasis: "default",
|
|
78
|
-
class: "tw-bg-button-negative-background tw-border-button-negative-border hover:tw-bg-button-negative-background-hover active:tw-bg-button-negative-background-pressed"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
disabled: !1,
|
|
82
|
-
style: "negative",
|
|
83
|
-
emphasis: "weak",
|
|
84
|
-
class: "tw-border-transparent hover:tw-bg-button-negative-background-hover hover:tw-border-button-negative-border active:tw-bg-button-negative-background-pressed"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
disabled: !1,
|
|
88
|
-
style: "negative",
|
|
89
|
-
emphasis: "strong",
|
|
90
|
-
class: "tw-bg-button-strong-negative-background tw-border-button-strong-negative-border hover:tw-bg-button-strong-negative-background-hover active:tw-bg-button-strong-negative-background-pressed"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
disabled: !1,
|
|
94
|
-
style: "danger",
|
|
95
|
-
emphasis: "default",
|
|
96
|
-
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
disabled: !1,
|
|
100
|
-
style: "danger",
|
|
101
|
-
emphasis: "weak",
|
|
102
|
-
class: "tw-border-transparent hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
disabled: !1,
|
|
106
|
-
style: "danger",
|
|
107
|
-
emphasis: "strong",
|
|
108
|
-
class: "tw-bg-button-danger-background tw-border-button-danger-border hover:tw-bg-button-danger-background-hover active:tw-bg-button-danger-background-pressed"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
disabled: !1,
|
|
112
|
-
style: "loud",
|
|
113
|
-
emphasis: "default",
|
|
114
|
-
class: "tw-bg-box-selected tw-border-button-border hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed "
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
disabled: !1,
|
|
118
|
-
style: "loud",
|
|
119
|
-
emphasis: "weak",
|
|
120
|
-
class: "tw-border-transparent hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
disabled: !1,
|
|
124
|
-
style: "loud",
|
|
125
|
-
emphasis: "strong",
|
|
126
|
-
class: "tw-bg-box-selected-strong tw-border-box-selected-strong hover:tw-bg-box-selected-strong-hover active:tw-bg-box-selected-strong-pressed "
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
aspect: "default",
|
|
130
|
-
size: "small",
|
|
131
|
-
class: "tw-px-2"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
aspect: "default",
|
|
135
|
-
size: "medium",
|
|
136
|
-
class: "tw-px-4"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
aspect: "default",
|
|
140
|
-
size: "large",
|
|
141
|
-
class: "tw-px-6"
|
|
142
|
-
}
|
|
143
|
-
],
|
|
144
|
-
defaultVariants: {
|
|
145
|
-
style: "default",
|
|
146
|
-
emphasis: "strong",
|
|
147
|
-
size: "medium",
|
|
148
|
-
rounding: "medium",
|
|
149
|
-
hugWidth: !0,
|
|
150
|
-
aspect: "default",
|
|
151
|
-
disabled: !1
|
|
152
|
-
}
|
|
153
|
-
});
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
p.displayName = "LoadingBar";
|
|
154
39
|
export {
|
|
155
|
-
|
|
40
|
+
p as LoadingBar
|
|
156
41
|
};
|
|
157
42
|
//# sourceMappingURL=fondue-components8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components8.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components8.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 { loadingBarContainerStyles, loadingBarStyles } from './styles/loadingBarStyles';\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 style?: '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 style = '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={loadingBarContainerStyles({ rounded, size, style })}\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={loadingBarStyles({ style, indeterminateState: value === null })}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","style","size","dataTestId","props","ref","jsx","ProgressRadixPrimitive","loadingBarContainerStyles","loadingBarStyles"],"mappings":";;;;AA2CO,MAAMA,IAAaC;AAAA,EACtB,CACI;AAAA,IACI,OAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAA0B,EAAE,SAAAR,GAAS,MAAAE,GAAM,OAAAD,GAAO;AAAA,MAC7D,aAAWH,MAAUC;AAAA,MACrB,OAAAD;AAAA,MACA,KAAAC;AAAA,MACA,OACI;AAAA,QACI,uBAAuBD;AAAA,QACvB,qBAAqBC;AAAA,QACrB,4BAA4B;AAAA,MAChC;AAAA,MAEH,GAAGK;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACC,EAAuB;AAAA,QAAvB;AAAA,UACG,WAAWE,EAAiB,EAAE,OAAAR,GAAO,oBAAoBH,MAAU,MAAM;AAAA,QAAA;AAAA,MAC7E;AAAA,IAAA;AAAA,EAAA;AAIhB;AACAF,EAAW,cAAc;"}
|