@frontify/fondue-components 1.5.3 → 2.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-components15.js +2 -2
- package/dist/fondue-components22.js +10 -10
- package/dist/fondue-components29.js +1 -1
- package/dist/fondue-components3.js +28 -25
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components31.js +14 -14
- package/dist/fondue-components32.js +1 -1
- package/dist/fondue-components33.js +14 -14
- package/dist/fondue-components35.js +1 -1
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +38 -2359
- package/dist/fondue-components36.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +37 -37
- package/dist/fondue-components37.js +0 -123
- package/dist/fondue-components37.js.map +0 -1
- package/dist/fondue-components38.js +0 -42
- package/dist/fondue-components38.js.map +0 -1
- package/dist/fondue-components39.js +0 -29
- package/dist/fondue-components39.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { extendTailwindMerge as e } from "
|
|
2
|
-
import { tv as o } from "
|
|
1
|
+
import { extendTailwindMerge as e } from "tailwind-merge";
|
|
2
|
+
import { tv as o } from "tailwind-variants";
|
|
3
3
|
const r = e({
|
|
4
4
|
prefix: "tw-",
|
|
5
5
|
extend: {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_content_1e0pr_5", n = "_subContent_1e0pr_6", e = "_item_1e0pr_16", o = "_subTrigger_1e0pr_17", s = "_subMenuIndicator_1e0pr_54", _ = "_group_1e0pr_60", r = "_slot_1e0pr_67", u = {
|
|
2
2
|
content: t,
|
|
3
3
|
subContent: n,
|
|
4
|
-
item:
|
|
5
|
-
subTrigger:
|
|
6
|
-
subMenuIndicator:
|
|
4
|
+
item: e,
|
|
5
|
+
subTrigger: o,
|
|
6
|
+
subMenuIndicator: s,
|
|
7
7
|
group: _,
|
|
8
|
-
slot:
|
|
8
|
+
slot: r
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
t as content,
|
|
12
|
-
|
|
12
|
+
u as default,
|
|
13
13
|
_ as group,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
e as item,
|
|
15
|
+
r as slot,
|
|
16
16
|
n as subContent,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
s as subMenuIndicator,
|
|
18
|
+
o as subTrigger
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=fondue-components22.js.map
|
|
@@ -3,7 +3,7 @@ import * as i from "@radix-ui/react-popover";
|
|
|
3
3
|
import { Slot as u } from "@radix-ui/react-slot";
|
|
4
4
|
import { isValidElement as f } from "react";
|
|
5
5
|
import t from "./fondue-components31.js";
|
|
6
|
-
import { recursiveMap as c, getSelectOptionValue as d } from "./fondue-
|
|
6
|
+
import { recursiveMap as c, getSelectOptionValue as d } from "./fondue-components36.js";
|
|
7
7
|
const v = ({ highlightedIndex: l, getMenuProps: s, getItemProps: m, children: n, filterText: p }) => /* @__PURE__ */ r(i.Portal, { children: /* @__PURE__ */ r(
|
|
8
8
|
i.Content,
|
|
9
9
|
{
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { buttonStyles as
|
|
5
|
-
import { iconStyles as
|
|
6
|
-
import { textStyles as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { cn as b } from "./fondue-components15.js";
|
|
4
|
+
import { buttonStyles as x } from "./fondue-components16.js";
|
|
5
|
+
import { iconStyles as S } from "./fondue-components17.js";
|
|
6
|
+
import { textStyles as k } from "./fondue-components18.js";
|
|
7
|
+
const y = r(
|
|
8
8
|
({
|
|
9
|
-
children:
|
|
10
|
-
type:
|
|
11
|
-
style:
|
|
12
|
-
size:
|
|
9
|
+
children: f,
|
|
10
|
+
type: u = "button",
|
|
11
|
+
style: m,
|
|
12
|
+
size: d = "medium",
|
|
13
13
|
"data-test-id": n = "fondue-button",
|
|
14
|
-
className:
|
|
15
|
-
onPress:
|
|
14
|
+
className: c = "",
|
|
15
|
+
onPress: i = () => {
|
|
16
16
|
},
|
|
17
17
|
...t
|
|
18
|
-
},
|
|
18
|
+
}, e) => /* @__PURE__ */ l(
|
|
19
19
|
"button",
|
|
20
20
|
{
|
|
21
|
-
ref:
|
|
22
|
-
type:
|
|
21
|
+
ref: e,
|
|
22
|
+
type: u,
|
|
23
23
|
"data-test-id": n,
|
|
24
|
-
className:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
className: b(
|
|
25
|
+
x({ size: d, style: m, ...t }),
|
|
26
|
+
k({ style: m, ...t }),
|
|
27
|
+
S({ style: m, ...t }),
|
|
28
|
+
c
|
|
29
29
|
),
|
|
30
|
-
onClick: a,
|
|
31
30
|
...t,
|
|
32
|
-
|
|
31
|
+
onClick: (o) => {
|
|
32
|
+
var a;
|
|
33
|
+
(a = t.onClick) == null || a.call(t, o), i == null || i(o);
|
|
34
|
+
},
|
|
35
|
+
children: f
|
|
33
36
|
}
|
|
34
37
|
)
|
|
35
38
|
);
|
|
36
|
-
|
|
39
|
+
y.displayName = "Button";
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
y as Button
|
|
39
42
|
};
|
|
40
43
|
//# sourceMappingURL=fondue-components3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components3.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type MouseEvent, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { buttonStyles } from './styles/buttonStyles';\nimport { iconStyles } from './styles/iconStyles';\nimport { textStyles } from './styles/textStyles';\n\ntype ButtonRounding = 'medium' | 'full';\n\ntype ButtonStyle = 'default' | 'positive' | 'negative' | 'danger' | 'loud';\n\ntype ButtonSize = 'small' | 'medium' | 'large';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\n\ntype ButtonEmphasis = 'default' | 'weak' | 'strong';\n\ntype ButtonAspect = 'default' | 'square';\n\nexport type ButtonProps = {\n /**\n * @default \"button\"\n */\n type?: ButtonType;\n /**\n * @default null\n */\n title?: string;\n /**\n * @default \"default\"\n */\n style?: ButtonStyle;\n /**\n * @default \"strong\"\n */\n emphasis?: ButtonEmphasis;\n /**\n * @default \"medium\"\n */\n size?: ButtonSize;\n /**\n * @default \"medium\"\n */\n rounding?: ButtonRounding;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * @default \"default\"\n */\n aspect?: ButtonAspect;\n /**\n * @default true\n */\n hugWidth?: boolean;\n children?: ReactNode;\n onPress?: (event?: MouseEvent<HTMLButtonElement>) => void;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(\n (\n {\n children,\n type = 'button',\n style,\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-button',\n className = '',\n onPress = () => {},\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n data-test-id={dataTestId}\n className={cn(\n buttonStyles({ size, style, ...props }),\n textStyles({ style, ...props }),\n iconStyles({ style, ...props }),\n className,\n )}\n
|
|
1
|
+
{"version":3,"file":"fondue-components3.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type MouseEvent, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { buttonStyles } from './styles/buttonStyles';\nimport { iconStyles } from './styles/iconStyles';\nimport { textStyles } from './styles/textStyles';\n\ntype ButtonRounding = 'medium' | 'full';\n\ntype ButtonStyle = 'default' | 'positive' | 'negative' | 'danger' | 'loud';\n\ntype ButtonSize = 'small' | 'medium' | 'large';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\n\ntype ButtonEmphasis = 'default' | 'weak' | 'strong';\n\ntype ButtonAspect = 'default' | 'square';\n\nexport type ButtonProps = {\n /**\n * @default \"button\"\n */\n type?: ButtonType;\n /**\n * @default null\n */\n title?: string;\n /**\n * @default \"default\"\n */\n style?: ButtonStyle;\n /**\n * @default \"strong\"\n */\n emphasis?: ButtonEmphasis;\n /**\n * @default \"medium\"\n */\n size?: ButtonSize;\n /**\n * @default \"medium\"\n */\n rounding?: ButtonRounding;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * @default \"default\"\n */\n aspect?: ButtonAspect;\n /**\n * @default true\n */\n hugWidth?: boolean;\n children?: ReactNode;\n onPress?: (event?: MouseEvent<HTMLButtonElement>) => void;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(\n (\n {\n children,\n type = 'button',\n style,\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-button',\n className = '',\n onPress = () => {},\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n data-test-id={dataTestId}\n className={cn(\n buttonStyles({ size, style, ...props }),\n textStyles({ style, ...props }),\n iconStyles({ style, ...props }),\n className,\n )}\n {...props}\n onClick={(event) => {\n // @ts-expect-error - Allows other components who use Button as a trigger to pass an action\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n props.onClick?.(event);\n onPress?.(event);\n }}\n >\n {children}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["Button","forwardRef","children","type","style","size","dataTestId","className","onPress","props","ref","jsx","cn","buttonStyles","textStyles","iconStyles","event","_a"],"mappings":";;;;;;AAmEO,MAAMA,IAASC;AAAA,EAClB,CACI;AAAA,IACI,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU,MAAM;AAAA,IAAC;AAAA,IACjB,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,MAAAP;AAAA,MACA,gBAAcG;AAAA,MACd,WAAWM;AAAA,QACPC,EAAa,EAAE,MAAAR,GAAM,OAAAD,GAAO,GAAGK,GAAO;AAAA,QACtCK,EAAW,EAAE,OAAAV,GAAO,GAAGK,GAAO;AAAA,QAC9BM,EAAW,EAAE,OAAAX,GAAO,GAAGK,GAAO;AAAA,QAC9BF;AAAA,MACJ;AAAA,MACC,GAAGE;AAAA,MACJ,SAAS,CAACO,MAAU;;AAGhB,SAAAC,IAAAR,EAAM,YAAN,QAAAQ,EAAA,KAAAR,GAAgBO,IAChBR,KAAA,QAAAA,EAAUQ;AAAA,MACd;AAAA,MAEC,UAAAd;AAAA,IAAA;AAAA,EAAA;AAIjB;AAEAF,EAAO,cAAc;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_tfduh_5", _ = "_input_tfduh_59", o = "_slot_tfduh_78", u = "_clear_tfduh_127", c = "_caret_tfduh_140", n = "_menu_tfduh_160", r = "_portal_tfduh_173", s = "_item_tfduh_177", e = "_group_tfduh_195", a = {
|
|
2
2
|
root: t,
|
|
3
3
|
input: _,
|
|
4
4
|
slot: o,
|
|
5
|
-
clear:
|
|
6
|
-
caret:
|
|
7
|
-
menu:
|
|
8
|
-
portal:
|
|
9
|
-
item:
|
|
10
|
-
group:
|
|
5
|
+
clear: u,
|
|
6
|
+
caret: c,
|
|
7
|
+
menu: n,
|
|
8
|
+
portal: r,
|
|
9
|
+
item: s,
|
|
10
|
+
group: e
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
c as caret,
|
|
14
|
+
u as clear,
|
|
15
|
+
a as default,
|
|
16
|
+
e as group,
|
|
17
17
|
_ as input,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
s as item,
|
|
19
|
+
n as menu,
|
|
20
|
+
r as portal,
|
|
21
21
|
t as root,
|
|
22
22
|
o as slot
|
|
23
23
|
};
|
|
@@ -3,7 +3,7 @@ import { IconCross as w } from "@frontify/fondue-icons";
|
|
|
3
3
|
import { useState as x, useMemo as S, Children as f, isValidElement as u, cloneElement as B, useCallback as E } from "react";
|
|
4
4
|
import { ForwardedRefSelectItem as I } from "./fondue-components28.js";
|
|
5
5
|
import { ForwardedRefSelectSlot as c } from "./fondue-components30.js";
|
|
6
|
-
import { getSelectOptionValue as v } from "./fondue-
|
|
6
|
+
import { getSelectOptionValue as v } from "./fondue-components36.js";
|
|
7
7
|
const i = (s) => {
|
|
8
8
|
const t = [];
|
|
9
9
|
return f.forEach(s, (o) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
input:
|
|
4
|
-
slot:
|
|
5
|
-
iconSuccess:
|
|
6
|
-
iconError:
|
|
1
|
+
const s = "_root_1nsu5_5", n = "_input_1nsu5_55", o = "_slot_1nsu5_74", t = "_iconSuccess_1nsu5_124", _ = "_iconError_1nsu5_132", c = "_loadingStatus_1nsu5_140", u = "_spin_1nsu5_1", i = {
|
|
2
|
+
root: s,
|
|
3
|
+
input: n,
|
|
4
|
+
slot: o,
|
|
5
|
+
iconSuccess: t,
|
|
6
|
+
iconError: _,
|
|
7
7
|
loadingStatus: c,
|
|
8
|
-
spin:
|
|
9
|
-
"tw-dark": "_tw-
|
|
8
|
+
spin: u,
|
|
9
|
+
"tw-dark": "_tw-dark_1nsu5_172"
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
i as default,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
_ as iconError,
|
|
14
|
+
t as iconSuccess,
|
|
15
|
+
n as input,
|
|
16
16
|
c as loadingStatus,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
s as root,
|
|
18
|
+
o as slot,
|
|
19
|
+
u as spin
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=fondue-components33.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue";
|
|
1
|
+
const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
|
|
2
2
|
export {
|
|
3
3
|
t as FOCUS_OUTLINE
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components35.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue'
|
|
1
|
+
{"version":3,"file":"fondue-components35.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
|