@frontify/fondue-components 4.0.0 → 4.0.1
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 +32 -30
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +2 -2
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components12.js +2 -2
- package/dist/fondue-components13.js +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +2 -2
- package/dist/fondue-components17.js +2 -2
- package/dist/fondue-components18.js +6 -6
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +2 -2
- package/dist/fondue-components21.js +116 -65
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +64 -41
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +43 -32
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +32 -5
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +5 -12
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +10 -153
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +59 -22
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +17 -17
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +112 -15
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +2 -2
- package/dist/fondue-components30.js +19 -30
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +32 -28
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +23 -125
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +129 -20
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +21 -45
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +45 -28
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +28 -15
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +15 -60
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +60 -15
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +15 -19
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +4 -4
- package/dist/fondue-components40.js +18 -4
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +3 -11
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +11 -3
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +5 -35
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +35 -13
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +12 -4
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +4 -24
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +24 -16
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +16 -139
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +140 -16
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +16 -72
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +72 -8
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +8 -33
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +32 -48
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +48 -10
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +8 -10
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +12 -17
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +52 -6
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +15 -2
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +17 -10
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +5 -5
- package/dist/fondue-components60.js +6 -38
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +5 -0
- package/dist/fondue-components61.js.map +1 -0
- package/dist/fondue-components62.js +42 -0
- package/dist/fondue-components62.js.map +1 -0
- package/dist/fondue-components63.js +14 -0
- package/dist/fondue-components63.js.map +1 -0
- package/dist/fondue-components7.js +2 -2
- package/dist/fondue-components8.js +2 -2
- package/dist/fondue-components9.js +63 -60
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +54 -0
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1,35 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-tooltip";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { cn as T } from "./fondue-components26.js";
|
|
5
|
+
import n from "./fondue-components60.js";
|
|
6
|
+
const d = ({ children: t, enterDelay: r = 700, open: i, onOpenChange: e }) => /* @__PURE__ */ a(o.Provider, { children: /* @__PURE__ */ a(o.Root, { delayDuration: r, open: i, onOpenChange: e, children: t }) });
|
|
7
|
+
d.displayName = "Tooltip.Root";
|
|
8
|
+
const l = ({ asChild: t = !1, children: r, "data-test-id": i = "fondue-tooltip-trigger" }, e) => /* @__PURE__ */ a(o.Trigger, { "data-test-id": i, asChild: t, ref: e, children: r });
|
|
9
|
+
l.displayName = "Tooltip.Trigger";
|
|
10
|
+
const p = ({
|
|
11
|
+
children: t,
|
|
12
|
+
className: r,
|
|
13
|
+
maxWidth: i,
|
|
14
|
+
"data-test-id": e = "fondue-tooltip-content",
|
|
15
|
+
padding: m = "spacious",
|
|
16
|
+
...c
|
|
17
|
+
}, f) => /* @__PURE__ */ a(o.Portal, { children: /* @__PURE__ */ g(
|
|
18
|
+
o.Content,
|
|
19
|
+
{
|
|
20
|
+
"data-test-id": e,
|
|
21
|
+
"data-tooltip-spacing": m,
|
|
22
|
+
className: T(n.root, r),
|
|
23
|
+
style: { maxWidth: i },
|
|
24
|
+
collisionPadding: 16,
|
|
25
|
+
sideOffset: 8,
|
|
26
|
+
ref: f,
|
|
27
|
+
...c,
|
|
28
|
+
children: [
|
|
29
|
+
t,
|
|
30
|
+
/* @__PURE__ */ a(o.Arrow, { "aria-hidden": "true", className: n.arrow })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
) });
|
|
34
|
+
p.displayName = "Tooltip.Content";
|
|
35
|
+
const h = {
|
|
36
|
+
Root: d,
|
|
37
|
+
Trigger: s(l),
|
|
38
|
+
Content: s(p)
|
|
39
|
+
};
|
|
32
40
|
export {
|
|
33
|
-
|
|
41
|
+
h as Tooltip,
|
|
42
|
+
p as TooltipContent,
|
|
43
|
+
d as TooltipRoot,
|
|
44
|
+
l as TooltipTrigger
|
|
34
45
|
};
|
|
35
46
|
//# sourceMappingURL=fondue-components23.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components23.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components23.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/tooltip.module.scss';\n\nexport type TooltipRootProps = {\n /**\n * Sets the open state of the tooltip.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the tooltip changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The delay in milliseconds before the tooltip appears.\n * @default 700\n */\n enterDelay?: number;\n children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;\n};\n\nexport const TooltipRoot = ({ children, enterDelay = 700, open, onOpenChange }: TooltipRootProps) => {\n return (\n <RadixTooltip.Provider>\n <RadixTooltip.Root delayDuration={enterDelay} open={open} onOpenChange={onOpenChange}>\n {children}\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n};\nTooltipRoot.displayName = 'Tooltip.Root';\n\nexport type TooltipTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipTrigger = (\n { asChild = false, children, 'data-test-id': dataTestId = 'fondue-tooltip-trigger' }: TooltipTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixTooltip.Trigger data-test-id={dataTestId} asChild={asChild} ref={ref}>\n {children}\n </RadixTooltip.Trigger>\n );\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport type TooltipContentProps = {\n /**\n * @default \"spacious\"\n */\n padding?: 'spacious' | 'compact';\n /**\n * Defines the preferred side of the tooltip. It will not be respected if there are collisions with the viewport.\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n maxWidth?: string;\n className?: string;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipContent = (\n {\n children,\n className,\n maxWidth,\n 'data-test-id': dataTestId = 'fondue-tooltip-content',\n padding = 'spacious',\n ...props\n }: TooltipContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n data-test-id={dataTestId}\n data-tooltip-spacing={padding}\n className={cn(styles.root, className)}\n style={{ maxWidth }}\n collisionPadding={16}\n sideOffset={8}\n ref={ref}\n {...props}\n >\n {children}\n <RadixTooltip.Arrow aria-hidden=\"true\" className={styles.arrow} />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n );\n};\nTooltipContent.displayName = 'Tooltip.Content';\n\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: forwardRef<HTMLButtonElement, TooltipTriggerProps>(TooltipTrigger),\n Content: forwardRef<HTMLDivElement, TooltipContentProps>(TooltipContent),\n};\n"],"names":["TooltipRoot","children","enterDelay","open","onOpenChange","jsx","RadixTooltip","TooltipTrigger","asChild","dataTestId","ref","TooltipContent","className","maxWidth","padding","props","jsxs","cn","styles","Tooltip","forwardRef"],"mappings":";;;;;AA0Ba,MAAAA,IAAc,CAAC,EAAE,UAAAC,GAAU,YAAAC,IAAa,KAAK,MAAAC,GAAM,cAAAC,QAEvD,gBAAAC,EAAAC,EAAa,UAAb,EACG,UAAC,gBAAAD,EAAAC,EAAa,MAAb,EAAkB,eAAeJ,GAAY,MAAAC,GAAY,cAAAC,GACrD,UAAAH,GACL,EACJ,CAAA;AAGRD,EAAY,cAAc;AAYb,MAAAO,IAAiB,CAC1B,EAAE,SAAAC,IAAU,IAAO,UAAAP,GAAU,gBAAgBQ,IAAa,yBAAyB,GACnFC,MAGI,gBAAAL,EAACC,EAAa,SAAb,EAAqB,gBAAcG,GAAY,SAAAD,GAAkB,KAAAE,GAC7D,UAAAT,EACL,CAAA;AAGRM,EAAe,cAAc;AAiBtB,MAAMI,IAAiB,CAC1B;AAAA,EACI,UAAAV;AAAA,EACA,WAAAW;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBJ,IAAa;AAAA,EAC7B,SAAAK,IAAU;AAAA,EACV,GAAGC;AACP,GACAL,MAGI,gBAAAL,EAACC,EAAa,QAAb,EACG,UAAA,gBAAAU;AAAA,EAACV,EAAa;AAAA,EAAb;AAAA,IACG,gBAAcG;AAAA,IACd,wBAAsBK;AAAA,IACtB,WAAWG,EAAGC,EAAO,MAAMN,CAAS;AAAA,IACpC,OAAO,EAAE,UAAAC,EAAS;AAAA,IAClB,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,KAAAH;AAAA,IACC,GAAGK;AAAA,IAEH,UAAA;AAAA,MAAAd;AAAA,MACD,gBAAAI,EAACC,EAAa,OAAb,EAAmB,eAAY,QAAO,WAAWY,EAAO,OAAO;AAAA,IAAA;AAAA,EAAA;AAExE,EAAA,CAAA;AAGRP,EAAe,cAAc;AAEtB,MAAMQ,IAAU;AAAA,EACnB,MAAMnB;AAAA,EACN,SAASoB,EAAmDb,CAAc;AAAA,EAC1E,SAASa,EAAgDT,CAAc;AAC3E;"}
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const g = (t) => t.startsWith("aria-") || t === "role", s = {
|
|
2
|
+
m: "margin",
|
|
3
|
+
mx: "margin-x",
|
|
4
|
+
my: "margin-y",
|
|
5
|
+
mt: "margin-top",
|
|
6
|
+
mr: "margin-right",
|
|
7
|
+
mb: "margin-bottom",
|
|
8
|
+
ml: "margin-left",
|
|
9
|
+
p: "padding",
|
|
10
|
+
px: "padding-x",
|
|
11
|
+
py: "padding-y",
|
|
12
|
+
pt: "padding-top",
|
|
13
|
+
pr: "padding-right",
|
|
14
|
+
pb: "padding-bottom",
|
|
15
|
+
pl: "padding-left",
|
|
16
|
+
direction: "flex-direction",
|
|
17
|
+
align: "align-items",
|
|
18
|
+
wrap: "flex-wrap",
|
|
19
|
+
columns: "grid-template-columns",
|
|
20
|
+
rows: "grid-template-rows"
|
|
21
|
+
}, m = (t, n) => (t === "columns" || t === "rows") && typeof n == "number" ? `repeat(${n}, 1fr)` : n, l = (t, n = {}) => Object.entries(t).reduce((i, [r, o]) => {
|
|
22
|
+
if (g(r))
|
|
23
|
+
return i;
|
|
24
|
+
const e = r in n ? n[r] : r in s ? s[r] : r, a = e == null ? void 0 : e.replaceAll(/([\da-z]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
25
|
+
if (typeof o == "object")
|
|
26
|
+
for (const [d, p] of Object.entries(o))
|
|
27
|
+
p !== void 0 && (i[`--${d}-${a}`] = m(r, p));
|
|
28
|
+
else
|
|
29
|
+
i[`--${a}`] = m(r, o);
|
|
30
|
+
return i;
|
|
31
|
+
}, {});
|
|
4
32
|
export {
|
|
5
|
-
|
|
6
|
-
o as root
|
|
33
|
+
l as propsToCssVariables
|
|
7
34
|
};
|
|
8
35
|
//# sourceMappingURL=fondue-components24.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components24.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components24.js","sources":["../src/helpers/propsToCssVariables.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type CSSProperties } from 'react';\n\nimport { type Breakpoint } from './layout';\n\nconst isAriaProp = (key: string): boolean => {\n return key.startsWith('aria-') || key === 'role';\n};\n\nconst abbreviationToCssProperty: Record<string, string> = {\n m: 'margin',\n mx: 'margin-x',\n my: 'margin-y',\n mt: 'margin-top',\n mr: 'margin-right',\n mb: 'margin-bottom',\n ml: 'margin-left',\n p: 'padding',\n px: 'padding-x',\n py: 'padding-y',\n pt: 'padding-top',\n pr: 'padding-right',\n pb: 'padding-bottom',\n pl: 'padding-left',\n direction: 'flex-direction',\n align: 'align-items',\n wrap: 'flex-wrap',\n columns: 'grid-template-columns',\n rows: 'grid-template-rows',\n};\n\nconst transformValueBasedOnKey = (key: string, value: string | number): string | number => {\n if (key === 'columns' || key === 'rows') {\n if (typeof value === 'number') {\n return `repeat(${value}, 1fr)`;\n }\n return value;\n }\n return value;\n};\n\nexport const propsToCssVariables = (\n props: Record<string, string | number | boolean | { [key in Breakpoint]?: string | number | boolean }>,\n extraAbbreviationToCssProperty: Record<string, string> = {},\n): CSSProperties => {\n return Object.entries(props).reduce((acc, [key, value]) => {\n if (isAriaProp(key)) {\n return acc;\n }\n\n const cssProperty =\n key in extraAbbreviationToCssProperty\n ? extraAbbreviationToCssProperty[key]\n : key in abbreviationToCssProperty\n ? abbreviationToCssProperty[key]\n : key;\n const cssPropertyKebabCase = cssProperty?.replaceAll(/([\\da-z]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();\n\n if (typeof value === 'object') {\n for (const [breakpoint, breakpointValue] of Object.entries(value)) {\n if (breakpointValue !== undefined) {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${breakpoint}-${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, breakpointValue);\n }\n }\n } else {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, value);\n }\n\n return acc;\n }, {} as CSSProperties);\n};\n"],"names":["isAriaProp","key","abbreviationToCssProperty","transformValueBasedOnKey","value","propsToCssVariables","props","extraAbbreviationToCssProperty","acc","cssProperty","cssPropertyKebabCase","breakpoint","breakpointValue"],"mappings":"AAMA,MAAMA,IAAa,CAACC,MACTA,EAAI,WAAW,OAAO,KAAKA,MAAQ,QAGxCC,IAAoD;AAAA,EACtD,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACV,GAEMC,IAA2B,CAACF,GAAaG,OACvCH,MAAQ,aAAaA,MAAQ,WACzB,OAAOG,KAAU,WACV,UAAUA,CAAK,WAIvBA,GAGEC,IAAsB,CAC/BC,GACAC,IAAyD,OAElD,OAAO,QAAQD,CAAK,EAAE,OAAO,CAACE,GAAK,CAACP,GAAKG,CAAK,MAAM;AACnD,MAAAJ,EAAWC,CAAG;AACP,WAAAO;AAGL,QAAAC,IACFR,KAAOM,IACDA,EAA+BN,CAAG,IAClCA,KAAOC,IACLA,EAA0BD,CAAG,IAC7BA,GACNS,IAAuBD,KAAA,gBAAAA,EAAa,WAAW,+BAA+B,SAAS;AAEzF,MAAA,OAAOL,KAAU;AACjB,eAAW,CAACO,GAAYC,CAAe,KAAK,OAAO,QAAQR,CAAK;AAC5D,MAAIQ,MAAoB,WAEhBJ,EAAA,KAAKG,CAAU,IAAID,CAAoB,EAAE,IAAIP,EAAyBF,GAAKW,CAAe;AAAA;AAKtG,IAAAJ,EAAI,KAAKE,CAAoB,EAAE,IAAIP,EAAyBF,GAAKG,CAAK;AAGnE,SAAAI;AACX,GAAG,CAAmB,CAAA;"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
prefix: "tw-",
|
|
5
|
-
extend: {
|
|
6
|
-
classGroups: {
|
|
7
|
-
"font-size": ["text-body-x-small", "text-body-small", "text-body-medium", "text-body-large"]
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}), m = (...t) => r(...t), x = (t) => o(t);
|
|
1
|
+
const o = "_root_yrjuz_5", t = {
|
|
2
|
+
root: o
|
|
3
|
+
};
|
|
11
4
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
t as default,
|
|
6
|
+
o as root
|
|
14
7
|
};
|
|
15
8
|
//# sourceMappingURL=fondue-components25.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components25.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components25.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,158 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
rounding: {
|
|
10
|
-
medium: "tw-rounded",
|
|
11
|
-
full: "tw-rounded-full"
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
small: "tw-h-6 tw-text-body-small",
|
|
15
|
-
medium: "tw-h-9 tw-text-body-medium",
|
|
16
|
-
large: "tw-h-12 tw-text-body-large"
|
|
17
|
-
},
|
|
18
|
-
aspect: {
|
|
19
|
-
square: "tw-aspect-square tw-px-0",
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
hugWidth: {
|
|
23
|
-
false: "tw-w-full"
|
|
24
|
-
},
|
|
25
|
-
emphasis: {
|
|
26
|
-
default: "",
|
|
27
|
-
weak: "",
|
|
28
|
-
strong: ""
|
|
29
|
-
},
|
|
30
|
-
variant: {
|
|
31
|
-
default: "",
|
|
32
|
-
positive: "",
|
|
33
|
-
negative: "",
|
|
34
|
-
danger: "",
|
|
35
|
-
loud: ""
|
|
1
|
+
import { extendTailwindMerge as e } from "tailwind-merge";
|
|
2
|
+
import { tv as o } from "tailwind-variants";
|
|
3
|
+
const r = e({
|
|
4
|
+
prefix: "tw-",
|
|
5
|
+
extend: {
|
|
6
|
+
classGroups: {
|
|
7
|
+
"font-size": ["text-body-x-small", "text-body-small", "text-body-medium", "text-body-large"]
|
|
36
8
|
}
|
|
37
|
-
},
|
|
38
|
-
compoundVariants: [
|
|
39
|
-
{
|
|
40
|
-
disabled: !1,
|
|
41
|
-
variant: "default",
|
|
42
|
-
emphasis: "default",
|
|
43
|
-
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
disabled: !1,
|
|
47
|
-
variant: "default",
|
|
48
|
-
emphasis: "weak",
|
|
49
|
-
class: "tw-border-transparent hover:tw-bg-button-background-hover hover:tw-border-button-border active:tw-bg-button-background-pressed"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
disabled: !1,
|
|
53
|
-
variant: "default",
|
|
54
|
-
emphasis: "strong",
|
|
55
|
-
class: "tw-bg-button-strong-background tw-border-button-strong-border hover:tw-bg-button-strong-background-hover active:tw-bg-button-strong-background-pressed"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
disabled: !1,
|
|
59
|
-
variant: "positive",
|
|
60
|
-
emphasis: "default",
|
|
61
|
-
class: "tw-bg-button-positive-background tw-border-button-positive-border hover:tw-bg-button-positive-background-hover active:tw-bg-button-positive-background-pressed"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
disabled: !1,
|
|
65
|
-
variant: "positive",
|
|
66
|
-
emphasis: "weak",
|
|
67
|
-
class: "tw-border-transparent hover:tw-bg-button-positive-background-hover hover:tw-border-button-positive-border active:tw-bg-button-positive-background-pressed"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
disabled: !1,
|
|
71
|
-
variant: "positive",
|
|
72
|
-
emphasis: "strong",
|
|
73
|
-
class: "tw-bg-button-strong-positive-background tw-border-button-strong-positive-border hover:tw-bg-button-strong-positive-background-hover active:tw-bg-button-strong-positive-background-pressed"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
disabled: !1,
|
|
77
|
-
variant: "negative",
|
|
78
|
-
emphasis: "default",
|
|
79
|
-
class: "tw-bg-button-negative-background tw-border-button-negative-border hover:tw-bg-button-negative-background-hover active:tw-bg-button-negative-background-pressed"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
disabled: !1,
|
|
83
|
-
variant: "negative",
|
|
84
|
-
emphasis: "weak",
|
|
85
|
-
class: "tw-border-transparent hover:tw-bg-button-negative-background-hover hover:tw-border-button-negative-border active:tw-bg-button-negative-background-pressed"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
disabled: !1,
|
|
89
|
-
variant: "negative",
|
|
90
|
-
emphasis: "strong",
|
|
91
|
-
class: "tw-bg-button-strong-negative-background tw-border-button-strong-negative-border hover:tw-bg-button-strong-negative-background-hover active:tw-bg-button-strong-negative-background-pressed"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
disabled: !1,
|
|
95
|
-
variant: "danger",
|
|
96
|
-
emphasis: "default",
|
|
97
|
-
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
disabled: !1,
|
|
101
|
-
variant: "danger",
|
|
102
|
-
emphasis: "weak",
|
|
103
|
-
class: "tw-border-transparent hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
disabled: !1,
|
|
107
|
-
variant: "danger",
|
|
108
|
-
emphasis: "strong",
|
|
109
|
-
class: "tw-bg-button-danger-background tw-border-button-danger-border hover:tw-bg-button-danger-background-hover active:tw-bg-button-danger-background-pressed"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
disabled: !1,
|
|
113
|
-
variant: "loud",
|
|
114
|
-
emphasis: "default",
|
|
115
|
-
class: "tw-bg-box-selected tw-border-button-border hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed "
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
disabled: !1,
|
|
119
|
-
variant: "loud",
|
|
120
|
-
emphasis: "weak",
|
|
121
|
-
class: "tw-border-transparent hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
disabled: !1,
|
|
125
|
-
variant: "loud",
|
|
126
|
-
emphasis: "strong",
|
|
127
|
-
class: "tw-bg-box-selected-strong tw-border-box-selected-strong hover:tw-bg-box-selected-strong-hover active:tw-bg-box-selected-strong-pressed "
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
aspect: "default",
|
|
131
|
-
size: "small",
|
|
132
|
-
class: "tw-px-2"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
aspect: "default",
|
|
136
|
-
size: "medium",
|
|
137
|
-
class: "tw-px-4"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
aspect: "default",
|
|
141
|
-
size: "large",
|
|
142
|
-
class: "tw-px-6"
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
defaultVariants: {
|
|
146
|
-
variant: "default",
|
|
147
|
-
emphasis: "strong",
|
|
148
|
-
size: "medium",
|
|
149
|
-
rounding: "medium",
|
|
150
|
-
hugWidth: !0,
|
|
151
|
-
aspect: "default",
|
|
152
|
-
disabled: !1
|
|
153
9
|
}
|
|
154
|
-
});
|
|
10
|
+
}), m = (...t) => r(...t), x = (t) => o(t);
|
|
155
11
|
export {
|
|
156
|
-
|
|
12
|
+
m as cn,
|
|
13
|
+
x as sv
|
|
157
14
|
};
|
|
158
15
|
//# sourceMappingURL=fondue-components26.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components26.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components26.js","sources":["../src/utilities/styleUtilities.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { extendTailwindMerge } from 'tailwind-merge';\nimport { tv, type TV } from 'tailwind-variants';\n\ntype ClassNameValue = ClassNameArray | string | null | undefined | 0 | false;\ntype ClassNameArray = ClassNameValue[];\n\nconst customTwMerge = extendTailwindMerge({\n prefix: 'tw-',\n extend: {\n classGroups: {\n 'font-size': ['text-body-x-small', 'text-body-small', 'text-body-medium', 'text-body-large'],\n },\n },\n});\n\nexport const cn = (...classLists: ClassNameValue[]): string => {\n return customTwMerge(...classLists);\n};\n\nexport const sv: TV = (variants) => {\n return tv(variants);\n};\n"],"names":["customTwMerge","extendTailwindMerge","cn","classLists","sv","variants","tv"],"mappings":";;AAQA,MAAMA,IAAgBC,EAAoB;AAAA,EACtC,QAAQ;AAAA,EACR,QAAQ;AAAA,IACJ,aAAa;AAAA,MACT,aAAa,CAAC,qBAAqB,mBAAmB,oBAAoB,iBAAiB;AAAA,IAC/F;AAAA,EACJ;AACJ,CAAC,GAEYC,IAAK,IAAIC,MACXH,EAAc,GAAGG,CAAU,GAGzBC,IAAS,CAACC,MACZC,EAAGD,CAAQ;"}
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FOCUS_OUTLINE as t } from "./fondue-components61.js";
|
|
2
|
+
import { sv as e } from "./fondue-components26.js";
|
|
3
|
+
const o = e({
|
|
4
|
+
base: `tw-group tw-border tw-relative tw-flex tw-flex-row tw-gap-2 tw-items-center tw-justify-center tw-cursor-pointer tw-font-body tw-font-medium ${t}`,
|
|
3
5
|
variants: {
|
|
6
|
+
disabled: {
|
|
7
|
+
true: "tw-not-allowed tw-pointer-events-none tw-border-transparent tw-text-box-disabled-inverse tw-bg-box-disabled"
|
|
8
|
+
},
|
|
9
|
+
rounding: {
|
|
10
|
+
medium: "tw-rounded",
|
|
11
|
+
full: "tw-rounded-full"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
small: "tw-h-6 tw-text-body-small",
|
|
15
|
+
medium: "tw-h-9 tw-text-body-medium",
|
|
16
|
+
large: "tw-h-12 tw-text-body-large"
|
|
17
|
+
},
|
|
18
|
+
aspect: {
|
|
19
|
+
square: "tw-aspect-square tw-px-0",
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
hugWidth: {
|
|
23
|
+
false: "tw-w-full"
|
|
24
|
+
},
|
|
4
25
|
emphasis: {
|
|
5
26
|
default: "",
|
|
6
27
|
weak: "",
|
|
@@ -12,9 +33,6 @@ const s = t({
|
|
|
12
33
|
negative: "",
|
|
13
34
|
danger: "",
|
|
14
35
|
loud: ""
|
|
15
|
-
},
|
|
16
|
-
disabled: {
|
|
17
|
-
true: "tw-text-box-disabled-inverse"
|
|
18
36
|
}
|
|
19
37
|
},
|
|
20
38
|
compoundVariants: [
|
|
@@ -22,100 +40,119 @@ const s = t({
|
|
|
22
40
|
disabled: !1,
|
|
23
41
|
variant: "default",
|
|
24
42
|
emphasis: "default",
|
|
25
|
-
class: "
|
|
43
|
+
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
26
44
|
},
|
|
27
45
|
{
|
|
28
46
|
disabled: !1,
|
|
29
47
|
variant: "default",
|
|
30
48
|
emphasis: "weak",
|
|
31
|
-
class: "
|
|
49
|
+
class: "tw-border-transparent hover:tw-bg-button-background-hover hover:tw-border-button-border active:tw-bg-button-background-pressed"
|
|
32
50
|
},
|
|
33
51
|
{
|
|
34
52
|
disabled: !1,
|
|
35
53
|
variant: "default",
|
|
36
54
|
emphasis: "strong",
|
|
37
|
-
class: "
|
|
55
|
+
class: "tw-bg-button-strong-background tw-border-button-strong-border hover:tw-bg-button-strong-background-hover active:tw-bg-button-strong-background-pressed"
|
|
38
56
|
},
|
|
39
57
|
{
|
|
40
58
|
disabled: !1,
|
|
41
59
|
variant: "positive",
|
|
42
60
|
emphasis: "default",
|
|
43
|
-
class: "
|
|
61
|
+
class: "tw-bg-button-positive-background tw-border-button-positive-border hover:tw-bg-button-positive-background-hover active:tw-bg-button-positive-background-pressed"
|
|
44
62
|
},
|
|
45
63
|
{
|
|
46
64
|
disabled: !1,
|
|
47
65
|
variant: "positive",
|
|
48
66
|
emphasis: "weak",
|
|
49
|
-
class: "
|
|
67
|
+
class: "tw-border-transparent hover:tw-bg-button-positive-background-hover hover:tw-border-button-positive-border active:tw-bg-button-positive-background-pressed"
|
|
50
68
|
},
|
|
51
69
|
{
|
|
52
70
|
disabled: !1,
|
|
53
71
|
variant: "positive",
|
|
54
72
|
emphasis: "strong",
|
|
55
|
-
class: "
|
|
73
|
+
class: "tw-bg-button-strong-positive-background tw-border-button-strong-positive-border hover:tw-bg-button-strong-positive-background-hover active:tw-bg-button-strong-positive-background-pressed"
|
|
56
74
|
},
|
|
57
75
|
{
|
|
58
76
|
disabled: !1,
|
|
59
77
|
variant: "negative",
|
|
60
78
|
emphasis: "default",
|
|
61
|
-
class: "
|
|
79
|
+
class: "tw-bg-button-negative-background tw-border-button-negative-border hover:tw-bg-button-negative-background-hover active:tw-bg-button-negative-background-pressed"
|
|
62
80
|
},
|
|
63
81
|
{
|
|
64
82
|
disabled: !1,
|
|
65
83
|
variant: "negative",
|
|
66
84
|
emphasis: "weak",
|
|
67
|
-
class: "
|
|
85
|
+
class: "tw-border-transparent hover:tw-bg-button-negative-background-hover hover:tw-border-button-negative-border active:tw-bg-button-negative-background-pressed"
|
|
68
86
|
},
|
|
69
87
|
{
|
|
70
88
|
disabled: !1,
|
|
71
89
|
variant: "negative",
|
|
72
90
|
emphasis: "strong",
|
|
73
|
-
class: "
|
|
91
|
+
class: "tw-bg-button-strong-negative-background tw-border-button-strong-negative-border hover:tw-bg-button-strong-negative-background-hover active:tw-bg-button-strong-negative-background-pressed"
|
|
74
92
|
},
|
|
75
93
|
{
|
|
76
94
|
disabled: !1,
|
|
77
95
|
variant: "danger",
|
|
78
96
|
emphasis: "default",
|
|
79
|
-
class: "
|
|
97
|
+
class: "tw-bg-button-background tw-border-button-border hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
80
98
|
},
|
|
81
99
|
{
|
|
82
100
|
disabled: !1,
|
|
83
101
|
variant: "danger",
|
|
84
102
|
emphasis: "weak",
|
|
85
|
-
class: "
|
|
103
|
+
class: "tw-border-transparent hover:tw-bg-button-background-hover active:tw-bg-button-background-pressed"
|
|
86
104
|
},
|
|
87
105
|
{
|
|
88
106
|
disabled: !1,
|
|
89
107
|
variant: "danger",
|
|
90
108
|
emphasis: "strong",
|
|
91
|
-
class: "
|
|
109
|
+
class: "tw-bg-button-danger-background tw-border-button-danger-border hover:tw-bg-button-danger-background-hover active:tw-bg-button-danger-background-pressed"
|
|
92
110
|
},
|
|
93
111
|
{
|
|
94
112
|
disabled: !1,
|
|
95
113
|
variant: "loud",
|
|
96
114
|
emphasis: "default",
|
|
97
|
-
class: "
|
|
115
|
+
class: "tw-bg-box-selected tw-border-button-border hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed "
|
|
98
116
|
},
|
|
99
117
|
{
|
|
100
118
|
disabled: !1,
|
|
101
119
|
variant: "loud",
|
|
102
120
|
emphasis: "weak",
|
|
103
|
-
class: "
|
|
121
|
+
class: "tw-border-transparent hover:tw-bg-box-selected-hover active:tw-bg-box-selected-pressed"
|
|
104
122
|
},
|
|
105
123
|
{
|
|
106
124
|
disabled: !1,
|
|
107
125
|
variant: "loud",
|
|
108
126
|
emphasis: "strong",
|
|
109
|
-
class: "
|
|
127
|
+
class: "tw-bg-box-selected-strong tw-border-box-selected-strong hover:tw-bg-box-selected-strong-hover active:tw-bg-box-selected-strong-pressed "
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
aspect: "default",
|
|
131
|
+
size: "small",
|
|
132
|
+
class: "tw-px-2"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
aspect: "default",
|
|
136
|
+
size: "medium",
|
|
137
|
+
class: "tw-px-4"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
aspect: "default",
|
|
141
|
+
size: "large",
|
|
142
|
+
class: "tw-px-6"
|
|
110
143
|
}
|
|
111
144
|
],
|
|
112
145
|
defaultVariants: {
|
|
113
|
-
emphasis: "strong",
|
|
114
146
|
variant: "default",
|
|
147
|
+
emphasis: "strong",
|
|
148
|
+
size: "medium",
|
|
149
|
+
rounding: "medium",
|
|
150
|
+
hugWidth: !0,
|
|
151
|
+
aspect: "default",
|
|
115
152
|
disabled: !1
|
|
116
153
|
}
|
|
117
154
|
});
|
|
118
155
|
export {
|
|
119
|
-
|
|
156
|
+
o as buttonStyles
|
|
120
157
|
};
|
|
121
158
|
//# sourceMappingURL=fondue-components27.js.map
|