@frontify/fondue-components 10.0.1 → 11.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-components10.js +1 -1
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +55 -51
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +11 -10
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +11 -10
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +2 -2
- package/dist/fondue-components18.js +62 -60
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +1 -1
- package/dist/fondue-components21.js +60 -60
- package/dist/fondue-components22.js +3 -3
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +32 -28
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +5 -5
- package/dist/fondue-components28.js +1 -1
- package/dist/fondue-components3.js +11 -10
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components31.js +1 -1
- package/dist/fondue-components32.js +15 -15
- package/dist/fondue-components33.js +15 -15
- package/dist/fondue-components34.js +10 -10
- package/dist/fondue-components36.js +13 -13
- package/dist/fondue-components37.js +631 -11
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +13 -15
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +15 -60
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +18 -17
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +59 -17
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +18 -17
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +16 -4
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +3 -13
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +13 -3
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +5 -35
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +35 -13
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +12 -4
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +4 -24
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +24 -16
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +16 -139
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +142 -16
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +16 -70
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +73 -8
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +8 -33
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +32 -48
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +48 -10
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +10 -12
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +12 -7
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +7 -12
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +12 -20
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +21 -15
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +14 -52
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +52 -14
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +14 -17
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +16 -5
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +7 -2
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +2 -15
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +14 -38
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +42 -0
- package/dist/fondue-components69.js.map +1 -0
- package/dist/fondue-components7.js +68 -64
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +1 -1
- package/dist/fondue-components9.js +81 -76
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +26 -11
- package/dist/style.css +1 -1
- package/package.json +55 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
3
|
import { propsToCssVariables as y } from "./fondue-components25.js";
|
|
4
|
-
import x from "./fondue-
|
|
4
|
+
import x from "./fondue-components43.js";
|
|
5
5
|
const u = n(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/flex.module.scss';\n\nexport type FlexProps = LayoutComponentProps & {\n /**\n * The element to render the Flex component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n /**\n * The display property.\n * @default 'flex'\n */\n display?: Responsive<'none' | 'flex' | 'inline-flex'>;\n /**\n * The direction of the children.\n * @default 'row'\n */\n direction?: Responsive<'row' | 'row-reverse' | 'column' | 'column-reverse'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'>;\n /**\n * The wrap property.\n */\n wrap?: Responsive<'nowrap' | 'wrap' | 'wrap-reverse'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(\n (\n {\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-flex',\n children,\n 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 ...props\n },\n ref,\n ) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-content' })}\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 ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nFlex.displayName = 'Flex';\n"],"names":["Flex","forwardRef","Component","dataTestId","children","role","ariaLabel","ariaHidden","ariaDescribedBy","ariaLabelledBy","ariaExpanded","ariaHasPopup","props","ref","jsx","styles","propsToCssVariables"],"mappings":";;;;AAuDO,MAAMA,IAAOC;AAAA,EAChB,CACI;AAAA,IACI,IAAIC,IAAY;AAAA,IAChB,gBAAgBC,IAAa;AAAA,IAC7B,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAcC;AAAA,IACd,eAAeC;AAAA,IACf,oBAAoBC;AAAA,IACpB,mBAAmBC;AAAA,IACnB,iBAAiBC;AAAA,IACjB,iBAAiBC;AAAA,IACjB,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACG,WAAWa,EAAO;AAAA,MAClB,gBAAcZ;AAAA,MACd,OAAOa,EAAoBJ,GAAO,EAAE,SAAS,mBAAmB;AAAA,MAChE,MAAAP;AAAA,MACA,cAAYC;AAAA,MACZ,eAAaC;AAAA,MACb,oBAAkBC;AAAA,MAClB,mBAAiBC;AAAA,MACjB,iBAAeC;AAAA,MACf,iBAAeC;AAAA,MACf,KAAAE;AAAA,MAEC,UAAAT;AAAA,IAAA;AAAA,EACL;AAGZ;AACAJ,EAAK,cAAc;"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as a, jsxs as l
|
|
2
|
-
import { IconCross as
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as b } from "@frontify/fondue-icons";
|
|
3
|
+
import { useFondueTheme as w, ThemeProvider as x } from "./fondue-components37.js";
|
|
3
4
|
import * as i from "@radix-ui/react-popover";
|
|
4
5
|
import { forwardRef as s } from "react";
|
|
5
|
-
import { addAutoFocusAttribute as
|
|
6
|
-
import d from "./fondue-
|
|
6
|
+
import { addAutoFocusAttribute as C, addShowFocusRing as T } from "./fondue-components38.js";
|
|
7
|
+
import d from "./fondue-components44.js";
|
|
7
8
|
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(i.Root, { ...o, children: t });
|
|
8
9
|
n.displayName = "Flyout.Root";
|
|
9
|
-
const
|
|
10
|
+
const m = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...r }, u) => /* @__PURE__ */ a(
|
|
10
11
|
i.Trigger,
|
|
11
12
|
{
|
|
12
|
-
onMouseDown:
|
|
13
|
+
onMouseDown: C,
|
|
13
14
|
"data-auto-focus-visible": "true",
|
|
14
15
|
"data-auto-focus-trigger": !0,
|
|
15
16
|
"data-test-id": e,
|
|
@@ -19,66 +20,69 @@ const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-tr
|
|
|
19
20
|
children: o
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
|
-
|
|
23
|
-
const
|
|
23
|
+
m.displayName = "Flyout.Trigger";
|
|
24
|
+
const y = ({
|
|
24
25
|
align: t = "start",
|
|
25
26
|
maxWidth: o = "360px",
|
|
26
27
|
padding: e = "compact",
|
|
27
28
|
rounded: r = "medium",
|
|
28
29
|
width: u = "fit-content",
|
|
29
|
-
shadow:
|
|
30
|
+
shadow: F = "medium",
|
|
30
31
|
"data-test-id": g = "fondue-flyout-content",
|
|
31
|
-
children:
|
|
32
|
-
...
|
|
33
|
-
}, v) =>
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */ a(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
children: h,
|
|
33
|
+
...N
|
|
34
|
+
}, v) => {
|
|
35
|
+
const R = w();
|
|
36
|
+
return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ l(x, { theme: R, children: [
|
|
37
|
+
/* @__PURE__ */ a("div", { className: d.overlay }),
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
|
+
i.Content,
|
|
40
|
+
{
|
|
41
|
+
style: {
|
|
42
|
+
"--flyout-max-width": o,
|
|
43
|
+
"--flyout-width": u
|
|
44
|
+
},
|
|
45
|
+
ref: v,
|
|
46
|
+
align: t,
|
|
47
|
+
collisionPadding: 8,
|
|
48
|
+
sideOffset: 8,
|
|
49
|
+
className: d.root,
|
|
50
|
+
"data-flyout-spacing": e,
|
|
51
|
+
"data-rounded": r,
|
|
52
|
+
"data-shadow": F,
|
|
53
|
+
"data-test-id": g,
|
|
54
|
+
onFocus: T,
|
|
55
|
+
...N,
|
|
56
|
+
children: h
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }) });
|
|
60
|
+
};
|
|
61
|
+
y.displayName = "Flyout.Content";
|
|
62
|
+
const c = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, r) => /* @__PURE__ */ l("div", { "data-test-id": e, ref: r, className: d.header, children: [
|
|
59
63
|
/* @__PURE__ */ a("div", { children: o }),
|
|
60
|
-
t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(
|
|
64
|
+
t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(b, { size: 20 }) })
|
|
61
65
|
] });
|
|
62
|
-
|
|
66
|
+
c.displayName = "Flyout.Header";
|
|
63
67
|
const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: d.footer, children: t });
|
|
64
68
|
f.displayName = "Flyout.Footer";
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const
|
|
69
|
+
const p = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: d.body, children: t });
|
|
70
|
+
p.displayName = "Flyout.Body";
|
|
71
|
+
const D = {
|
|
68
72
|
Root: n,
|
|
69
|
-
Trigger: s(
|
|
70
|
-
Content: s(
|
|
71
|
-
Header: s(
|
|
73
|
+
Trigger: s(m),
|
|
74
|
+
Content: s(y),
|
|
75
|
+
Header: s(c),
|
|
72
76
|
Footer: s(f),
|
|
73
|
-
Body: s(
|
|
77
|
+
Body: s(p)
|
|
74
78
|
};
|
|
75
79
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
D as Flyout,
|
|
81
|
+
p as FlyoutBody,
|
|
82
|
+
y as FlyoutContent,
|
|
79
83
|
f as FlyoutFooter,
|
|
80
|
-
|
|
84
|
+
c as FlyoutHeader,
|
|
81
85
|
n as FlyoutRoot,
|
|
82
|
-
|
|
86
|
+
m as FlyoutTrigger
|
|
83
87
|
};
|
|
84
88
|
//# sourceMappingURL=fondue-components11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components11.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 { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\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 const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\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?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\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 const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\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
|
|
1
|
+
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport { ThemeProvider, useFondueTheme } from '@frontify/fondue-tokens/theme-provider';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\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 const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\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?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\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 const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\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 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={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\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={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\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={styles.body}>\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","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { propsToCssVariables as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { propsToCssVariables as n } from "./fondue-components25.js";
|
|
4
|
+
import u from "./fondue-components45.js";
|
|
5
|
+
const c = y(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
8
8
|
"data-test-id": r = "fondue-grid",
|
|
@@ -15,12 +15,12 @@ const u = f(
|
|
|
15
15
|
"aria-expanded": p,
|
|
16
16
|
"aria-haspopup": l,
|
|
17
17
|
...b
|
|
18
|
-
}) => /* @__PURE__ */
|
|
18
|
+
}, m) => /* @__PURE__ */ f(
|
|
19
19
|
a,
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: u.root,
|
|
22
22
|
"data-test-id": r,
|
|
23
|
-
style:
|
|
23
|
+
style: n(b, { justify: "justify-items" }),
|
|
24
24
|
role: e,
|
|
25
25
|
"aria-label": d,
|
|
26
26
|
"aria-hidden": s,
|
|
@@ -28,12 +28,13 @@ const u = f(
|
|
|
28
28
|
"aria-labelledby": o,
|
|
29
29
|
"aria-expanded": p,
|
|
30
30
|
"aria-haspopup": l,
|
|
31
|
+
ref: m,
|
|
31
32
|
children: i
|
|
32
33
|
}
|
|
33
34
|
)
|
|
34
35
|
);
|
|
35
|
-
|
|
36
|
+
c.displayName = "Grid";
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
c as Grid
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=fondue-components12.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components12.js","sources":["../src/components/Grid/Grid.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/grid.module.scss';\n\nexport type GridProps = LayoutComponentProps & {\n /**\n * The element to render the Grid component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n\n /**\n * The display property.\n * @default 'grid'\n */\n display?: 'none' | 'grid' | 'inline-grid';\n /**\n * The columns property.\n */\n columns?: Responsive<string | number>;\n /**\n * The rows property.\n */\n rows?: Responsive<string | number>;\n /**\n * The flow property.\n */\n flow?: Responsive<'row' | 'column' | 'dense' | 'row-dense' | 'column-dense'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'start' | 'center' | 'end' | 'baseline' | 'stretch'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'start' | 'center' | 'end' | 'between'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n ({\n
|
|
1
|
+
{"version":3,"file":"fondue-components12.js","sources":["../src/components/Grid/Grid.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/grid.module.scss';\n\nexport type GridProps = LayoutComponentProps & {\n /**\n * The element to render the Grid component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n\n /**\n * The display property.\n * @default 'grid'\n */\n display?: 'none' | 'grid' | 'inline-grid';\n /**\n * The columns property.\n */\n columns?: Responsive<string | number>;\n /**\n * The rows property.\n */\n rows?: Responsive<string | number>;\n /**\n * The flow property.\n */\n flow?: Responsive<'row' | 'column' | 'dense' | 'row-dense' | 'column-dense'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'start' | 'center' | 'end' | 'baseline' | 'stretch'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'start' | 'center' | 'end' | 'between'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n (\n {\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-grid',\n children,\n 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 ...props\n },\n ref,\n ) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-items' })}\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 ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nGrid.displayName = 'Grid';\n"],"names":["Grid","forwardRef","Component","dataTestId","children","role","ariaLabel","ariaHidden","ariaDescribedBy","ariaLabelledBy","ariaExpanded","ariaHasPopup","props","ref","jsx","styles","propsToCssVariables"],"mappings":";;;;AA2DO,MAAMA,IAAOC;AAAA,EAChB,CACI;AAAA,IACI,IAAIC,IAAY;AAAA,IAChB,gBAAgBC,IAAa;AAAA,IAC7B,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAcC;AAAA,IACd,eAAeC;AAAA,IACf,oBAAoBC;AAAA,IACpB,mBAAmBC;AAAA,IACnB,iBAAiBC;AAAA,IACjB,iBAAiBC;AAAA,IACjB,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACG,WAAWa,EAAO;AAAA,MAClB,gBAAcZ;AAAA,MACd,OAAOa,EAAoBJ,GAAO,EAAE,SAAS,iBAAiB;AAAA,MAC9D,MAAAP;AAAA,MACA,cAAYC;AAAA,MACZ,eAAaC;AAAA,MACb,oBAAkBC;AAAA,MAClB,mBAAiBC;AAAA,MACjB,iBAAeC;AAAA,MACf,iBAAeC;AAAA,MACf,KAAAE;AAAA,MAEC,UAAAT;AAAA,IAAA;AAAA,EACL;AAGZ;AACAJ,EAAK,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-progress";
|
|
3
3
|
import { forwardRef as m } from "react";
|
|
4
|
-
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components46.js";
|
|
5
5
|
const p = m(
|
|
6
6
|
({
|
|
7
7
|
value: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-scroll-area";
|
|
3
3
|
import { forwardRef as b } from "react";
|
|
4
|
-
import a from "./fondue-
|
|
4
|
+
import a from "./fondue-components47.js";
|
|
5
5
|
const h = ({
|
|
6
6
|
type: t,
|
|
7
7
|
maxHeight: e = "100%",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { propsToCssVariables as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { propsToCssVariables as c } from "./fondue-components25.js";
|
|
4
|
+
import f from "./fondue-components48.js";
|
|
5
|
+
const y = m(
|
|
6
6
|
({
|
|
7
7
|
"data-test-id": a = "fondue-section",
|
|
8
8
|
children: e,
|
|
@@ -14,12 +14,12 @@ const f = n(
|
|
|
14
14
|
"aria-expanded": t,
|
|
15
15
|
"aria-haspopup": p,
|
|
16
16
|
...l
|
|
17
|
-
}) => /* @__PURE__ */
|
|
17
|
+
}, b) => /* @__PURE__ */ n(
|
|
18
18
|
"section",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: f.root,
|
|
21
21
|
"data-test-id": a,
|
|
22
|
-
style:
|
|
22
|
+
style: c(l),
|
|
23
23
|
role: r,
|
|
24
24
|
"aria-label": i,
|
|
25
25
|
"aria-hidden": o,
|
|
@@ -27,12 +27,13 @@ const f = n(
|
|
|
27
27
|
"aria-labelledby": s,
|
|
28
28
|
"aria-expanded": t,
|
|
29
29
|
"aria-haspopup": p,
|
|
30
|
+
ref: b,
|
|
30
31
|
children: e
|
|
31
32
|
}
|
|
32
33
|
)
|
|
33
34
|
);
|
|
34
|
-
|
|
35
|
+
y.displayName = "Section";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
y as Section
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=fondue-components16.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components16.js","sources":["../src/components/Section/Section.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/section.module.scss';\n\nexport type SectionProps = LayoutComponentProps & {\n /**\n * The display property.\n * @default 'block'\n */\n display?: Responsive<'none' | 'block' | 'inline-block' | 'inline'>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Section = forwardRef<HTMLDivElement, SectionProps>(\n ({\n
|
|
1
|
+
{"version":3,"file":"fondue-components16.js","sources":["../src/components/Section/Section.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/section.module.scss';\n\nexport type SectionProps = LayoutComponentProps & {\n /**\n * The display property.\n * @default 'block'\n */\n display?: Responsive<'none' | 'block' | 'inline-block' | 'inline'>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Section = forwardRef<HTMLDivElement, SectionProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-section',\n children,\n 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 ...props\n },\n ref,\n ) => {\n return (\n <section\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props)}\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 ref={ref}\n >\n {children}\n </section>\n );\n },\n);\nSection.displayName = 'Section';\n"],"names":["Section","forwardRef","dataTestId","children","role","ariaLabel","ariaHidden","ariaDescribedBy","ariaLabelledBy","ariaExpanded","ariaHasPopup","props","ref","jsx","styles","propsToCssVariables"],"mappings":";;;;AAqBO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAcC;AAAA,IACd,eAAeC;AAAA,IACf,oBAAoBC;AAAA,IACpB,mBAAmBC;AAAA,IACnB,iBAAiBC;AAAA,IACjB,iBAAiBC;AAAA,IACjB,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAWC,EAAO;AAAA,MAClB,gBAAcZ;AAAA,MACd,OAAOa,EAAoBJ,CAAK;AAAA,MAChC,MAAAP;AAAA,MACA,cAAYC;AAAA,MACZ,eAAaC;AAAA,MACb,oBAAkBC;AAAA,MAClB,mBAAiBC;AAAA,MACjB,iBAAeC;AAAA,MACf,iBAAeC;AAAA,MACf,KAAAE;AAAA,MAEC,UAAAT;AAAA,IAAA;AAAA,EACL;AAGZ;AACAH,EAAQ,cAAc;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "@radix-ui/react-toggle-group";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
|
-
import { useControllableState as N } from "./fondue-
|
|
5
|
-
import e from "./fondue-
|
|
4
|
+
import { useControllableState as N } from "./fondue-components49.js";
|
|
5
|
+
import e from "./fondue-components50.js";
|
|
6
6
|
const d = ({ children: a, value: o, defaultValue: s, onValueChange: p, ...m }, f) => {
|
|
7
7
|
const [g, C] = N({
|
|
8
8
|
prop: o,
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { IconCaretDown as
|
|
3
|
-
import * as
|
|
4
|
-
import { Slot as
|
|
5
|
-
import { useSelect as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { ForwardedRefCombobox as
|
|
8
|
-
import { ForwardedRefSelectItem as
|
|
9
|
-
import { SelectMenu as
|
|
10
|
-
import { ForwardedRefSelectSlot as
|
|
11
|
-
import a from "./fondue-
|
|
12
|
-
import { useSelectData as
|
|
13
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { IconCaretDown as j, IconCheckMark as E, IconExclamationMarkTriangle as H } from "@frontify/fondue-icons";
|
|
3
|
+
import * as g from "@radix-ui/react-popover";
|
|
4
|
+
import { Slot as T } from "@radix-ui/react-slot";
|
|
5
|
+
import { useSelect as V } from "downshift";
|
|
6
|
+
import { forwardRef as $, useRef as A, useState as q } from "react";
|
|
7
|
+
import { ForwardedRefCombobox as J } from "./fondue-components51.js";
|
|
8
|
+
import { ForwardedRefSelectItem as K, ForwardedRefSelectItemGroup as L } from "./fondue-components52.js";
|
|
9
|
+
import { SelectMenu as Q } from "./fondue-components53.js";
|
|
10
|
+
import { ForwardedRefSelectSlot as U } from "./fondue-components54.js";
|
|
11
|
+
import a from "./fondue-components55.js";
|
|
12
|
+
import { useSelectData as W } from "./fondue-components56.js";
|
|
13
|
+
const S = ({
|
|
14
14
|
children: h,
|
|
15
|
-
onSelect:
|
|
15
|
+
onSelect: s,
|
|
16
16
|
value: I,
|
|
17
|
-
defaultValue:
|
|
18
|
-
placeholder:
|
|
19
|
-
status:
|
|
17
|
+
defaultValue: b,
|
|
18
|
+
placeholder: N = "",
|
|
19
|
+
status: l = "neutral",
|
|
20
20
|
disabled: m,
|
|
21
21
|
alignMenu: C = "start",
|
|
22
|
-
|
|
23
|
-
"
|
|
22
|
+
side: w = "bottom",
|
|
23
|
+
"aria-label": x,
|
|
24
|
+
"data-test-id": c = "fondue-select"
|
|
24
25
|
}, d) => {
|
|
25
|
-
const { inputSlots:
|
|
26
|
-
items:
|
|
27
|
-
defaultSelectedItem:
|
|
28
|
-
selectedItem:
|
|
26
|
+
const { inputSlots: R, menuSlots: y, items: F, clearButton: u, getItemByValue: p } = W(h), k = p(b), v = p(I), n = A(!1), [M, f] = q(!1), { getToggleButtonProps: P, getMenuProps: B, getItemProps: G, reset: O, selectedItem: r, isOpen: z, highlightedIndex: D } = V({
|
|
27
|
+
items: F,
|
|
28
|
+
defaultSelectedItem: k,
|
|
29
|
+
selectedItem: v,
|
|
29
30
|
onIsOpenChange: () => {
|
|
30
31
|
f(!1);
|
|
31
32
|
},
|
|
@@ -33,65 +34,65 @@ const g = ({
|
|
|
33
34
|
f(!0);
|
|
34
35
|
},
|
|
35
36
|
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
36
|
-
|
|
37
|
+
s == null || s((e == null ? void 0 : e.value) ?? null);
|
|
37
38
|
},
|
|
38
39
|
itemToString: (e) => e ? e.label : ""
|
|
39
40
|
});
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ i(g.Root, { open: z, children: [
|
|
41
42
|
/* @__PURE__ */ o(
|
|
42
|
-
|
|
43
|
+
g.Anchor,
|
|
43
44
|
{
|
|
44
45
|
asChild: !0,
|
|
45
46
|
onMouseDown: (e) => {
|
|
46
|
-
|
|
47
|
+
n.current = !0, e.currentTarget.dataset.showFocusRing = "false";
|
|
47
48
|
},
|
|
48
49
|
onFocus: (e) => {
|
|
49
|
-
|
|
50
|
+
n.current || (e.target.dataset.showFocusRing = "true");
|
|
50
51
|
},
|
|
51
52
|
onBlur: (e) => {
|
|
52
|
-
e.target.dataset.showFocusRing = "false",
|
|
53
|
+
e.target.dataset.showFocusRing = "false", n.current = !1;
|
|
53
54
|
},
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ i(
|
|
55
56
|
"div",
|
|
56
57
|
{
|
|
57
58
|
className: a.root,
|
|
58
|
-
"data-status":
|
|
59
|
+
"data-status": l,
|
|
59
60
|
"data-disabled": m,
|
|
60
61
|
"data-empty": !r,
|
|
61
|
-
"data-test-id":
|
|
62
|
-
...m ? {} :
|
|
63
|
-
"aria-label":
|
|
62
|
+
"data-test-id": c,
|
|
63
|
+
...m ? {} : P({
|
|
64
|
+
"aria-label": x,
|
|
64
65
|
...d ? { ref: d } : {}
|
|
65
66
|
}),
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */ o("span", { className: a.selectedValue, children: r ? r.label :
|
|
68
|
-
|
|
68
|
+
/* @__PURE__ */ o("span", { className: a.selectedValue, children: r ? r.label : N }),
|
|
69
|
+
R,
|
|
69
70
|
u && /* @__PURE__ */ o(
|
|
70
|
-
|
|
71
|
+
T,
|
|
71
72
|
{
|
|
72
73
|
onClick: (e) => {
|
|
73
|
-
e.stopPropagation(),
|
|
74
|
+
e.stopPropagation(), O();
|
|
74
75
|
},
|
|
75
76
|
className: a.clear,
|
|
76
77
|
children: u
|
|
77
78
|
}
|
|
78
79
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */ o(
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
/* @__PURE__ */ i("div", { className: a.icons, children: [
|
|
81
|
+
/* @__PURE__ */ o(j, { size: 16, className: a.caret }),
|
|
82
|
+
l === "success" ? /* @__PURE__ */ o(
|
|
83
|
+
E,
|
|
83
84
|
{
|
|
84
85
|
size: 16,
|
|
85
86
|
className: a.iconSuccess,
|
|
86
|
-
"data-test-id": `${
|
|
87
|
+
"data-test-id": `${c}-success-icon`
|
|
87
88
|
}
|
|
88
89
|
) : null,
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
l === "error" ? /* @__PURE__ */ o(
|
|
91
|
+
H,
|
|
91
92
|
{
|
|
92
93
|
size: 16,
|
|
93
94
|
className: a.iconError,
|
|
94
|
-
"data-test-id": `${
|
|
95
|
+
"data-test-id": `${c}-error-icon`
|
|
95
96
|
}
|
|
96
97
|
) : null
|
|
97
98
|
] })
|
|
@@ -101,33 +102,34 @@ const g = ({
|
|
|
101
102
|
}
|
|
102
103
|
),
|
|
103
104
|
/* @__PURE__ */ o(
|
|
104
|
-
|
|
105
|
+
Q,
|
|
105
106
|
{
|
|
106
107
|
align: C,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
side: w,
|
|
109
|
+
highlightedIndex: D,
|
|
110
|
+
getMenuProps: B,
|
|
111
|
+
getItemProps: G,
|
|
110
112
|
selectedItem: r,
|
|
111
|
-
hasInteractedSinceOpening:
|
|
112
|
-
children:
|
|
113
|
+
hasInteractedSinceOpening: M,
|
|
114
|
+
children: y
|
|
113
115
|
}
|
|
114
116
|
)
|
|
115
117
|
] });
|
|
116
118
|
};
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
+
S.displayName = "Select";
|
|
120
|
+
const X = $(S), t = X;
|
|
119
121
|
t.displayName = "Select";
|
|
120
|
-
t.Combobox =
|
|
122
|
+
t.Combobox = J;
|
|
121
123
|
t.Combobox.displayName = "Select.Combobox";
|
|
122
|
-
t.Item =
|
|
124
|
+
t.Item = K;
|
|
123
125
|
t.Item.displayName = "Select.Item";
|
|
124
|
-
t.Group =
|
|
126
|
+
t.Group = L;
|
|
125
127
|
t.Group.displayName = "Select.Group";
|
|
126
|
-
t.Slot =
|
|
128
|
+
t.Slot = U;
|
|
127
129
|
t.Slot.displayName = "Select.Slot";
|
|
128
130
|
export {
|
|
129
|
-
|
|
131
|
+
X as ForwardedRefSelect,
|
|
130
132
|
t as Select,
|
|
131
|
-
|
|
133
|
+
S as SelectInput
|
|
132
134
|
};
|
|
133
135
|
//# sourceMappingURL=fondue-components18.js.map
|