@frontify/fondue 12.0.0-beta.215 → 12.0.0-beta.217
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/components/Table/Table.es.js +10 -10
- package/dist/components/Table/Table.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/layout/LegacyStack/LegacyStack.d.ts +18 -0
- package/dist/layout/{Stack/Stack.es.js → LegacyStack/LegacyStack.es.js} +23 -22
- package/dist/layout/LegacyStack/LegacyStack.es.js.map +1 -0
- package/dist/layout/LegacyStack/index.d.ts +1 -0
- package/dist/layout/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/layout/Stack/Stack.d.ts +0 -17
- package/dist/layout/Stack/Stack.es.js.map +0 -1
- package/dist/layout/Stack/index.d.ts +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export type LegacyStackSpacing = 'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
3
|
+
export type LegacyStackJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
4
|
+
export type LegacyStackAlign = 'start' | 'end' | 'stretch' | 'center';
|
|
5
|
+
export type LegacyStackProps = {
|
|
6
|
+
padding: LegacyStackSpacing;
|
|
7
|
+
spacing: LegacyStackSpacing;
|
|
8
|
+
direction?: 'row' | 'column';
|
|
9
|
+
wrap?: boolean;
|
|
10
|
+
justify?: LegacyStackJustify;
|
|
11
|
+
align?: LegacyStackAlign;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
'data-test-id'?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const LegacyStack: {
|
|
16
|
+
({ children, padding, spacing, direction, wrap, justify, align, "data-test-id": dataTestId, }: LegacyStackProps): ReactElement;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { merge as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { merge as r } from "../../utilities/merge.es.js";
|
|
2
|
+
import l from "react";
|
|
3
|
+
const c = {
|
|
4
4
|
none: "tw-p-0",
|
|
5
5
|
xxs: "tw-p-xxs",
|
|
6
6
|
xs: "tw-p-xs",
|
|
@@ -9,7 +9,7 @@ const l = {
|
|
|
9
9
|
l: "tw-p-l",
|
|
10
10
|
xl: "tw-p-xl",
|
|
11
11
|
xxl: "tw-p-xxl"
|
|
12
|
-
},
|
|
12
|
+
}, o = {
|
|
13
13
|
none: "tw-gap-0",
|
|
14
14
|
xxs: "tw-gap-xxs",
|
|
15
15
|
xs: "tw-gap-xs",
|
|
@@ -18,44 +18,45 @@ const l = {
|
|
|
18
18
|
l: "tw-gap-l",
|
|
19
19
|
xl: "tw-gap-xl",
|
|
20
20
|
xxl: "tw-gap-xxl"
|
|
21
|
-
},
|
|
21
|
+
}, i = {
|
|
22
22
|
start: "tw-justify-start",
|
|
23
23
|
end: "tw-justify-end",
|
|
24
24
|
center: "tw-justify-center",
|
|
25
25
|
between: "tw-justify-between",
|
|
26
26
|
around: "tw-justify-around",
|
|
27
27
|
evenly: "tw-justify-evenly"
|
|
28
|
-
},
|
|
28
|
+
}, d = {
|
|
29
29
|
start: "tw-items-start",
|
|
30
30
|
end: "tw-items-end",
|
|
31
31
|
center: "tw-items-center",
|
|
32
32
|
stretch: "tw-items-stretch"
|
|
33
|
-
}, m = ({
|
|
33
|
+
}, f = "fondue-legacy-stack", m = ({
|
|
34
34
|
children: t,
|
|
35
35
|
padding: e,
|
|
36
36
|
spacing: s,
|
|
37
|
-
direction:
|
|
38
|
-
wrap:
|
|
37
|
+
direction: a = "row",
|
|
38
|
+
wrap: w = !1,
|
|
39
39
|
justify: n = "start",
|
|
40
|
-
align: x = "stretch"
|
|
41
|
-
|
|
40
|
+
align: x = "stretch",
|
|
41
|
+
"data-test-id": p = f
|
|
42
|
+
}) => /* @__PURE__ */ l.createElement(
|
|
42
43
|
"div",
|
|
43
44
|
{
|
|
44
|
-
"data-test-id":
|
|
45
|
-
className:
|
|
45
|
+
"data-test-id": p,
|
|
46
|
+
className: r([
|
|
46
47
|
"tw-flex",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
c[e],
|
|
49
|
+
o[s],
|
|
50
|
+
i[n],
|
|
51
|
+
d[x],
|
|
52
|
+
a === "row" ? "tw-flex-row" : "tw-flex-col",
|
|
53
|
+
w ? "tw-flex-wrap" : "tw-flex-nowrap"
|
|
53
54
|
])
|
|
54
55
|
},
|
|
55
56
|
t
|
|
56
57
|
);
|
|
57
|
-
m.displayName = "
|
|
58
|
+
m.displayName = "FondueLegacyStack";
|
|
58
59
|
export {
|
|
59
|
-
m as
|
|
60
|
+
m as LegacyStack
|
|
60
61
|
};
|
|
61
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=LegacyStack.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegacyStack.es.js","sources":["../../../src/layout/LegacyStack/LegacyStack.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { merge } from '@utilities/merge';\nimport React, { ReactElement, ReactNode } from 'react';\n\nexport type LegacyStackSpacing = 'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\nexport type LegacyStackJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';\n\nexport type LegacyStackAlign = 'start' | 'end' | 'stretch' | 'center';\n\nexport type LegacyStackProps = {\n padding: LegacyStackSpacing;\n spacing: LegacyStackSpacing;\n direction?: 'row' | 'column';\n wrap?: boolean;\n justify?: LegacyStackJustify;\n align?: LegacyStackAlign;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst paddingMap: Record<LegacyStackSpacing, string> = {\n none: 'tw-p-0',\n xxs: 'tw-p-xxs',\n xs: 'tw-p-xs',\n s: 'tw-p-s',\n m: 'tw-p-m',\n l: 'tw-p-l',\n xl: 'tw-p-xl',\n xxl: 'tw-p-xxl',\n};\n\nconst spacingMap: Record<LegacyStackSpacing, string> = {\n none: 'tw-gap-0',\n xxs: 'tw-gap-xxs',\n xs: 'tw-gap-xs',\n s: 'tw-gap-s',\n m: 'tw-gap-m',\n l: 'tw-gap-l',\n xl: 'tw-gap-xl',\n xxl: 'tw-gap-xxl',\n};\n\nconst justifyMap: Record<LegacyStackJustify, string> = {\n start: 'tw-justify-start',\n end: 'tw-justify-end',\n center: 'tw-justify-center',\n between: 'tw-justify-between',\n around: 'tw-justify-around',\n evenly: 'tw-justify-evenly',\n};\n\nconst alignMap: Record<LegacyStackAlign, string> = {\n start: 'tw-items-start',\n end: 'tw-items-end',\n center: 'tw-items-center',\n stretch: 'tw-items-stretch',\n};\n\nconst DEFAULT_DATA_TEST_ID = 'fondue-legacy-stack';\n\nexport const LegacyStack = ({\n children,\n padding,\n spacing,\n direction = 'row',\n wrap = false,\n justify = 'start',\n align = 'stretch',\n 'data-test-id': dataTestId = DEFAULT_DATA_TEST_ID,\n}: LegacyStackProps): ReactElement => {\n return (\n <div\n data-test-id={dataTestId}\n className={merge([\n 'tw-flex',\n paddingMap[padding],\n spacingMap[spacing],\n justifyMap[justify],\n alignMap[align],\n direction === 'row' ? 'tw-flex-row' : 'tw-flex-col',\n wrap ? 'tw-flex-wrap' : 'tw-flex-nowrap',\n ])}\n >\n {children}\n </div>\n );\n};\nLegacyStack.displayName = 'FondueLegacyStack';\n"],"names":["paddingMap","spacingMap","justifyMap","alignMap","DEFAULT_DATA_TEST_ID","LegacyStack","children","padding","spacing","direction","wrap","justify","align","dataTestId","React","merge"],"mappings":";;AAsBA,MAAMA,IAAiD;AAAA,EACnD,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACT,GAEMC,IAAiD;AAAA,EACnD,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACT,GAEMC,IAAiD;AAAA,EACnD,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACZ,GAEMC,IAA6C;AAAA,EAC/C,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AACb,GAEMC,IAAuB,uBAEhBC,IAAc,CAAC;AAAA,EACxB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,gBAAgBC,IAAaT;AACjC,MAEQ,gBAAAU,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAcD;AAAA,IACd,WAAWE,EAAM;AAAA,MACb;AAAA,MACAf,EAAWO,CAAO;AAAA,MAClBN,EAAWO,CAAO;AAAA,MAClBN,EAAWS,CAAO;AAAA,MAClBR,EAASS,CAAK;AAAA,MACdH,MAAc,QAAQ,gBAAgB;AAAA,MACtCC,IAAO,iBAAiB;AAAA,IAAA,CAC3B;AAAA,EAAA;AAAA,EAEAJ;AAAA;AAIbD,EAAY,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LegacyStack';
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './LegacyStack';
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
export type StackSpacing = 'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
3
|
-
export type StackJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
4
|
-
export type StackAlign = 'start' | 'end' | 'stretch' | 'center';
|
|
5
|
-
export type StackProps = {
|
|
6
|
-
padding: StackSpacing;
|
|
7
|
-
spacing: StackSpacing;
|
|
8
|
-
direction?: 'row' | 'column';
|
|
9
|
-
wrap?: boolean;
|
|
10
|
-
justify?: StackJustify;
|
|
11
|
-
align?: StackAlign;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
};
|
|
14
|
-
export declare const Stack: {
|
|
15
|
-
({ children, padding, spacing, direction, wrap, justify, align, }: StackProps): ReactElement;
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.es.js","sources":["../../../src/layout/Stack/Stack.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { merge } from '@utilities/merge';\nimport React, { ReactElement, ReactNode } from 'react';\n\nexport type StackSpacing = 'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\nexport type StackJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';\n\nexport type StackAlign = 'start' | 'end' | 'stretch' | 'center';\n\nexport type StackProps = {\n padding: StackSpacing;\n spacing: StackSpacing;\n direction?: 'row' | 'column';\n wrap?: boolean;\n justify?: StackJustify;\n align?: StackAlign;\n children?: ReactNode;\n};\n\nconst paddingMap: Record<StackSpacing, string> = {\n none: 'tw-p-0',\n xxs: 'tw-p-xxs',\n xs: 'tw-p-xs',\n s: 'tw-p-s',\n m: 'tw-p-m',\n l: 'tw-p-l',\n xl: 'tw-p-xl',\n xxl: 'tw-p-xxl',\n};\n\nconst spacingMap: Record<StackSpacing, string> = {\n none: 'tw-gap-0',\n xxs: 'tw-gap-xxs',\n xs: 'tw-gap-xs',\n s: 'tw-gap-s',\n m: 'tw-gap-m',\n l: 'tw-gap-l',\n xl: 'tw-gap-xl',\n xxl: 'tw-gap-xxl',\n};\n\nconst justifyMap: Record<StackJustify, string> = {\n start: 'tw-justify-start',\n end: 'tw-justify-end',\n center: 'tw-justify-center',\n between: 'tw-justify-between',\n around: 'tw-justify-around',\n evenly: 'tw-justify-evenly',\n};\n\nconst alignMap: Record<StackAlign, string> = {\n start: 'tw-items-start',\n end: 'tw-items-end',\n center: 'tw-items-center',\n stretch: 'tw-items-stretch',\n};\n\nexport const Stack = ({\n children,\n padding,\n spacing,\n direction = 'row',\n wrap = false,\n justify = 'start',\n align = 'stretch',\n}: StackProps): ReactElement => {\n return (\n <div\n data-test-id=\"stack\"\n className={merge([\n 'tw-flex',\n paddingMap[padding],\n spacingMap[spacing],\n justifyMap[justify],\n alignMap[align],\n direction === 'row' ? 'tw-flex-row' : 'tw-flex-col',\n wrap ? 'tw-flex-wrap' : 'tw-flex-nowrap',\n ])}\n >\n {children}\n </div>\n );\n};\nStack.displayName = 'FondueStack';\n"],"names":["paddingMap","spacingMap","justifyMap","alignMap","Stack","children","padding","spacing","direction","wrap","justify","align","React","merge"],"mappings":";;AAqBA,MAAMA,IAA2C;AAAA,EAC7C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACT,GAEMC,IAA2C;AAAA,EAC7C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACT,GAEMC,IAA2C;AAAA,EAC7C,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACZ,GAEMC,IAAuC;AAAA,EACzC,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AACb,GAEaC,IAAQ,CAAC;AAAA,EAClB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AACZ,MAEQ,gBAAAC,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAa;AAAA,IACb,WAAWC,EAAM;AAAA,MACb;AAAA,MACAb,EAAWM,CAAO;AAAA,MAClBL,EAAWM,CAAO;AAAA,MAClBL,EAAWQ,CAAO;AAAA,MAClBP,EAASQ,CAAK;AAAA,MACdH,MAAc,QAAQ,gBAAgB;AAAA,MACtCC,IAAO,iBAAiB;AAAA,IAAA,CAC3B;AAAA,EAAA;AAAA,EAEAJ;AAAA;AAIbD,EAAM,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Stack';
|