@frontify/fondue-components 13.0.2 → 14.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 +56 -54
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +124 -34
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +36 -84
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +89 -36
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +30 -40
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +47 -24
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +28 -39
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components16.js +34 -16
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +21 -68
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +68 -36
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +34 -45
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +53 -130
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +133 -53
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +54 -28
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +28 -153
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +151 -116
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +117 -31
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +32 -65
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +66 -7
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +10 -55
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +56 -32
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +89 -36
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components30.js +18 -4
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +32 -12
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +5 -155
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +10 -116
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +59 -22
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +112 -15
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +116 -30
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +21 -37
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +31 -129
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +37 -21
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +32 -38
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +130 -45
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +20 -7
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +45 -13
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +7 -14
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +13 -60
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +15 -18
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +60 -19
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +18 -5
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +18 -14
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +1 -1
- package/dist/fondue-components5.js +42 -45
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components50.js +12 -16
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +5 -35
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +18 -6
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +35 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +6 -4
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +12 -24
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +4 -16
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +23 -140
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +17 -16
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +142 -70
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +46 -48
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components60.js +16 -8
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +72 -32
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +8 -49
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +32 -10
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +48 -12
- 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 +11 -19
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +13 -15
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +20 -52
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +15 -15
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +43 -144
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components70.js +52 -25
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +14 -17
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +24 -5
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +16 -5
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +7 -2
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +4 -12
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +2 -39
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +18 -0
- package/dist/fondue-components77.js.map +1 -0
- package/dist/fondue-components78.js +42 -0
- package/dist/fondue-components78.js.map +1 -0
- package/dist/fondue-components8.js +146 -27
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +28 -125
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +183 -57
- package/dist/style.css +1 -1
- package/package.json +6 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components12.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components12.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 { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\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\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\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 * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\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\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\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 triggerOffset = 'compact',\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={SPACING_MAP[triggerOffset]}\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","SPACING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":"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"}
|
|
@@ -1,50 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
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-components31.js";
|
|
4
|
+
import u from "./fondue-components51.js";
|
|
5
|
+
const c = y(
|
|
6
6
|
({
|
|
7
|
-
as:
|
|
7
|
+
as: a = "div",
|
|
8
|
+
"data-test-id": r = "fondue-grid",
|
|
8
9
|
children: i,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"aria-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"aria-label": f,
|
|
20
|
-
"aria-labelledby": u,
|
|
21
|
-
...c
|
|
22
|
-
}, h) => /* @__PURE__ */ y(
|
|
23
|
-
e,
|
|
10
|
+
role: e,
|
|
11
|
+
"aria-label": d,
|
|
12
|
+
"aria-hidden": s,
|
|
13
|
+
"aria-describedby": t,
|
|
14
|
+
"aria-labelledby": o,
|
|
15
|
+
"aria-expanded": p,
|
|
16
|
+
"aria-haspopup": l,
|
|
17
|
+
...b
|
|
18
|
+
}, m) => /* @__PURE__ */ f(
|
|
19
|
+
a,
|
|
24
20
|
{
|
|
25
|
-
className:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"aria-
|
|
34
|
-
"aria-
|
|
35
|
-
|
|
36
|
-
"aria-labelledby": u,
|
|
37
|
-
"aria-expanded": m,
|
|
38
|
-
"aria-haspopup": n,
|
|
39
|
-
"data-test-id": s,
|
|
40
|
-
ref: h,
|
|
41
|
-
...c,
|
|
21
|
+
className: u.root,
|
|
22
|
+
"data-test-id": r,
|
|
23
|
+
style: n(b, { justify: "justify-items" }),
|
|
24
|
+
role: e,
|
|
25
|
+
"aria-label": d,
|
|
26
|
+
"aria-hidden": s,
|
|
27
|
+
"aria-describedby": t,
|
|
28
|
+
"aria-labelledby": o,
|
|
29
|
+
"aria-expanded": p,
|
|
30
|
+
"aria-haspopup": l,
|
|
31
|
+
ref: m,
|
|
42
32
|
children: i
|
|
43
33
|
}
|
|
44
34
|
)
|
|
45
35
|
);
|
|
46
|
-
|
|
36
|
+
c.displayName = "Grid";
|
|
47
37
|
export {
|
|
48
|
-
|
|
38
|
+
c as Grid
|
|
49
39
|
};
|
|
50
40
|
//# sourceMappingURL=fondue-components13.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components13.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components13.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,27 +1,50 @@
|
|
|
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
|
-
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { cn as x } from "./fondue-components33.js";
|
|
4
|
+
import a from "./fondue-components52.js";
|
|
5
|
+
const $ = g(
|
|
6
|
+
({
|
|
7
|
+
as: e = "span",
|
|
8
|
+
children: i,
|
|
9
|
+
className: r,
|
|
10
|
+
color: d = "default",
|
|
11
|
+
role: o,
|
|
12
|
+
size: t = "medium",
|
|
13
|
+
weight: l = "default",
|
|
14
|
+
"data-test-id": s = "fondue-heading",
|
|
15
|
+
"aria-describedby": p,
|
|
16
|
+
"aria-expanded": m,
|
|
17
|
+
"aria-haspopup": n,
|
|
18
|
+
"aria-hidden": b,
|
|
19
|
+
"aria-label": f,
|
|
20
|
+
"aria-labelledby": u,
|
|
21
|
+
...c
|
|
22
|
+
}, h) => /* @__PURE__ */ y(
|
|
23
|
+
e,
|
|
24
|
+
{
|
|
25
|
+
className: x([
|
|
26
|
+
a.root,
|
|
27
|
+
a[`size-${t}`],
|
|
28
|
+
a[`weight-${l}`],
|
|
29
|
+
a[`color-${d}`],
|
|
30
|
+
r
|
|
31
|
+
]),
|
|
32
|
+
role: o,
|
|
33
|
+
"aria-label": f,
|
|
34
|
+
"aria-hidden": b,
|
|
35
|
+
"aria-describedby": p,
|
|
36
|
+
"aria-labelledby": u,
|
|
37
|
+
"aria-expanded": m,
|
|
38
|
+
"aria-haspopup": n,
|
|
39
|
+
"data-test-id": s,
|
|
40
|
+
ref: h,
|
|
41
|
+
...c,
|
|
42
|
+
children: i
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
$.displayName = "Heading";
|
|
23
47
|
export {
|
|
24
|
-
|
|
25
|
-
s as LabelComponent
|
|
48
|
+
$ as Heading
|
|
26
49
|
};
|
|
27
50
|
//# sourceMappingURL=fondue-components14.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components14.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components14.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';\nimport { cn } from '#/utilities/styleUtilities';\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={cn([\n styles.root,\n styles[`size-${size}`],\n styles[`weight-${weight}`],\n styles[`color-${color}`],\n className,\n ])}\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","cn","styles"],"mappings":";;;;AA+BO,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,KAEPC,MAGI,gBAAAC;AAAA,IAAChB;AAAA,IAAA;AAAA,MACG,WAAWiB,EAAG;AAAA,QACVC,EAAO;AAAA,QACPA,EAAO,QAAQb,CAAI,EAAE;AAAA,QACrBa,EAAO,UAAUZ,CAAM,EAAE;AAAA,QACzBY,EAAO,SAASf,CAAK,EAAE;AAAA,QACvBD;AAAA,MAAA,CACH;AAAA,MACD,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,EACL;AAGZ;AAIAH,EAAQ,cAAc;"}
|
|
@@ -1,42 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
...l,
|
|
29
|
-
children: /* @__PURE__ */ i(
|
|
30
|
-
t.Indicator,
|
|
31
|
-
{
|
|
32
|
-
className: f({ variant: o, indeterminateState: a === null })
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
);
|
|
38
|
-
p.displayName = "LoadingBar";
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "@radix-ui/react-label";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { cn as w } from "./fondue-components33.js";
|
|
5
|
+
const m = ({ className: r, "data-test-id": d = "fondue-label", ...a }, i) => /* @__PURE__ */ l(
|
|
6
|
+
n.Root,
|
|
7
|
+
{
|
|
8
|
+
ref: i,
|
|
9
|
+
"data-required": a.required,
|
|
10
|
+
className: w(
|
|
11
|
+
'tw-group tw-flex tw-gap-1 tw-font-body--stack 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-body--stack after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',
|
|
16
|
+
r
|
|
17
|
+
),
|
|
18
|
+
"data-test-id": d,
|
|
19
|
+
onClick: (t) => {
|
|
20
|
+
const o = t.target.getAttribute("for"), e = o ? document.getElementById(o) : null;
|
|
21
|
+
e && e.getAttribute("role") === "combobox" && (t.preventDefault(), t.stopPropagation(), e.click());
|
|
22
|
+
},
|
|
23
|
+
...a
|
|
24
|
+
}
|
|
25
|
+
), f = s(m);
|
|
26
|
+
f.displayName = "Label";
|
|
39
27
|
export {
|
|
40
|
-
|
|
28
|
+
f as Label,
|
|
29
|
+
m as LabelComponent
|
|
41
30
|
};
|
|
42
31
|
//# sourceMappingURL=fondue-components15.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components15.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components15.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 } 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 onClick?: MouseEventHandler<HTMLLabelElement>;\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-body--stack 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-body--stack 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 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 );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","props","ref","jsx","LabelPrimitive","cn","event","targetId","target","Label","forwardRef"],"mappings":";;;;AAwBa,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,IACd,SAAS,CAACM,MAAU;AAIhB,YAAMC,IAAYD,EAAM,OAAuB,aAAa,KAAK,GAC3DE,IAASD,IAAW,SAAS,eAAeA,CAAQ,IAAI;AAE9D,MAAIC,KAAUA,EAAO,aAAa,MAAM,MAAM,eAC1CF,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtBE,EAAO,MAAM;AAAA,IAErB;AAAA,IACC,GAAGP;AAAA,EAAA;AACR,GAIKQ,IAAQC,EAAyCZ,CAAc;AAC5EW,EAAM,cAAc;"}
|
|
@@ -1,24 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-progress";
|
|
3
|
+
import { forwardRef as m } from "react";
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components53.js";
|
|
5
|
+
const p = m(
|
|
5
6
|
({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
7
|
+
value: a,
|
|
8
|
+
max: r = 100,
|
|
9
|
+
rounded: d = !0,
|
|
10
|
+
variant: o = "default",
|
|
11
|
+
size: e = "medium",
|
|
12
|
+
"data-test-id": n = "fondue-loading-bar",
|
|
13
|
+
...l
|
|
14
|
+
}, s) => /* @__PURE__ */ i(
|
|
15
|
+
t.Root,
|
|
11
16
|
{
|
|
12
|
-
ref:
|
|
13
|
-
"data-test-id":
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
ref: s,
|
|
18
|
+
"data-test-id": n,
|
|
19
|
+
className: g({ rounded: d, size: e, variant: 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({ variant: o, indeterminateState: a === null })
|
|
33
|
+
}
|
|
34
|
+
)
|
|
17
35
|
}
|
|
18
36
|
)
|
|
19
37
|
);
|
|
20
|
-
|
|
38
|
+
p.displayName = "LoadingBar";
|
|
21
39
|
export {
|
|
22
|
-
|
|
40
|
+
p as LoadingBar
|
|
23
41
|
};
|
|
24
42
|
//# 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/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 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={loadingBarContainerStyles({ rounded, size, 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={loadingBarStyles({ variant, indeterminateState: 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","loadingBarContainerStyles","loadingBarStyles"],"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,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAA0B,EAAE,SAAAR,GAAS,MAAAE,GAAM,SAAAD,GAAS;AAAA,MAC/D,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,SAAAR,GAAS,oBAAoBH,MAAU,KAAM,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/E;AAAA,EACJ;AAGZ;AACAF,EAAW,cAAc;"}
|
|
@@ -1,71 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ l(
|
|
23
|
-
a.Viewport,
|
|
24
|
-
{
|
|
25
|
-
className: o.viewport,
|
|
26
|
-
style: { maxHeight: e },
|
|
27
|
-
"data-scroll-padding": i,
|
|
28
|
-
"data-show-shadow": c,
|
|
29
|
-
"data-test-id": `${r}-viewport`,
|
|
30
|
-
children: m
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ l(
|
|
34
|
-
a.Scrollbar,
|
|
35
|
-
{
|
|
36
|
-
className: o.scrollbar,
|
|
37
|
-
orientation: "vertical",
|
|
38
|
-
"data-test-id": `${r}-vertical-scrollbar`,
|
|
39
|
-
children: /* @__PURE__ */ l(
|
|
40
|
-
a.Thumb,
|
|
41
|
-
{
|
|
42
|
-
className: o.thumb,
|
|
43
|
-
"data-test-id": `${r}-vertical-scrollbar-thumb`
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
/* @__PURE__ */ l(
|
|
49
|
-
a.Scrollbar,
|
|
50
|
-
{
|
|
51
|
-
className: o.scrollbar,
|
|
52
|
-
orientation: "horizontal",
|
|
53
|
-
"data-test-id": `${r}-horizontal-scrollbar`,
|
|
54
|
-
children: /* @__PURE__ */ l(
|
|
55
|
-
a.Thumb,
|
|
56
|
-
{
|
|
57
|
-
className: o.thumb,
|
|
58
|
-
"data-test-id": `${r}-horizontal-scrollbar-thumb`
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ l(a.Corner, { className: o.corner, "data-test-id": `${r}-corner` })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
), p = b(h);
|
|
67
|
-
p.displayName = "ScrollArea";
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import d from "./fondue-components54.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(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
ref: o,
|
|
13
|
+
"data-test-id": r,
|
|
14
|
+
"data-variant": t,
|
|
15
|
+
"data-size": a,
|
|
16
|
+
className: d.root
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
s.displayName = "LoadingCircle";
|
|
68
21
|
export {
|
|
69
|
-
|
|
22
|
+
s as LoadingCircle
|
|
70
23
|
};
|
|
71
24
|
//# 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/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,KAEjCC,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,EACrB;AAGb;AACAP,EAAc,cAAc;"}
|