@wireapp/react-ui-kit 9.32.0 → 9.33.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/lib/Form/Button.stories.d.ts +26 -0
- package/lib/Form/Button.stories.d.ts.map +1 -0
- package/lib/Form/Button.stories.js +63 -0
- package/lib/Form/ButtonLink.stories.d.ts +15 -0
- package/lib/Form/ButtonLink.stories.d.ts.map +1 -0
- package/lib/Form/ButtonLink.stories.js +52 -0
- package/lib/Form/Checkbox.d.ts +1 -2
- package/lib/Form/Checkbox.d.ts.map +1 -1
- package/lib/Form/Checkbox.stories.d.ts +16 -0
- package/lib/Form/Checkbox.stories.d.ts.map +1 -0
- package/lib/Form/Checkbox.stories.js +35 -0
- package/lib/Form/CodeInput.d.ts +1 -0
- package/lib/Form/CodeInput.d.ts.map +1 -1
- package/lib/Form/CodeInput.stories.d.ts +15 -0
- package/lib/Form/CodeInput.stories.d.ts.map +1 -0
- package/lib/Form/CodeInput.stories.js +51 -0
- package/lib/Form/DropFileInput.stories.d.ts +13 -0
- package/lib/Form/DropFileInput.stories.d.ts.map +1 -0
- package/lib/Form/DropFileInput.stories.js +43 -0
- package/lib/Form/ErrorMessage.stories.d.ts +14 -0
- package/lib/Form/ErrorMessage.stories.d.ts.map +1 -0
- package/lib/Form/ErrorMessage.stories.js +23 -0
- package/lib/Form/Form.stories.d.ts +13 -0
- package/lib/Form/Form.stories.d.ts.map +1 -0
- package/lib/Form/Form.stories.js +23 -0
- package/lib/Form/IndicatorRangeInput.stories.d.ts +13 -0
- package/lib/Form/IndicatorRangeInput.stories.d.ts.map +1 -0
- package/lib/Form/IndicatorRangeInput.stories.js +51 -0
- package/lib/Form/Input.stories.d.ts +18 -0
- package/lib/Form/Input.stories.d.ts.map +1 -0
- package/lib/Form/Input.stories.js +56 -0
- package/lib/Form/InputBlock.stories.d.ts +15 -0
- package/lib/Form/InputBlock.stories.d.ts.map +1 -0
- package/lib/Form/InputBlock.stories.js +27 -0
- package/lib/Form/InputLabel.stories.d.ts +15 -0
- package/lib/Form/InputLabel.stories.d.ts.map +1 -0
- package/lib/Form/InputLabel.stories.js +35 -0
- package/lib/Form/InputSubmitCombo.stories.d.ts +15 -0
- package/lib/Form/InputSubmitCombo.stories.d.ts.map +1 -0
- package/lib/Form/InputSubmitCombo.stories.js +26 -0
- package/lib/Form/RangeInput.stories.d.ts +16 -0
- package/lib/Form/RangeInput.stories.d.ts.map +1 -0
- package/lib/Form/RangeInput.stories.js +62 -0
- package/lib/Form/RoundIconButton.stories.d.ts +15 -0
- package/lib/Form/RoundIconButton.stories.d.ts.map +1 -0
- package/lib/Form/RoundIconButton.stories.js +30 -0
- package/lib/Form/Select.d.ts +1 -2
- package/lib/Form/Select.d.ts.map +1 -1
- package/lib/Form/Select.stories.d.ts +16 -0
- package/lib/Form/Select.stories.d.ts.map +1 -0
- package/lib/Form/Select.stories.js +68 -0
- package/lib/Form/ShakeBox.stories.d.ts +15 -0
- package/lib/Form/ShakeBox.stories.d.ts.map +1 -0
- package/lib/Form/ShakeBox.stories.js +54 -0
- package/lib/Form/Switch.stories.d.ts +17 -0
- package/lib/Form/Switch.stories.d.ts.map +1 -0
- package/lib/Form/Switch.stories.js +66 -0
- package/lib/Form/TextArea.stories.d.ts +16 -0
- package/lib/Form/TextArea.stories.d.ts.map +1 -0
- package/lib/Form/TextArea.stories.js +35 -0
- package/lib/Form/Tooltip.d.ts +1 -2
- package/lib/Form/Tooltip.d.ts.map +1 -1
- package/lib/Form/Tooltip.stories.d.ts +17 -0
- package/lib/Form/Tooltip.stories.d.ts.map +1 -0
- package/lib/Form/Tooltip.stories.js +46 -0
- package/lib/Icon/SVGIcon.stories.d.ts +12 -0
- package/lib/Icon/SVGIcon.stories.d.ts.map +1 -0
- package/lib/Icon/SVGIcon.stories.js +60 -0
- package/lib/Identity/Animation.d.ts +8 -8
- package/lib/Identity/Animation.d.ts.map +1 -1
- package/lib/Identity/Animation.js +7 -30
- package/lib/Identity/Animation.stories.d.ts +6 -0
- package/lib/Identity/Animation.stories.d.ts.map +1 -0
- package/lib/Identity/Animation.stories.js +73 -0
- package/lib/Identity/Avatar.stories.d.ts +13 -0
- package/lib/Identity/Avatar.stories.d.ts.map +1 -0
- package/lib/Identity/Avatar.stories.js +64 -0
- package/lib/Identity/AvatarGrid.stories.d.ts +12 -0
- package/lib/Identity/AvatarGrid.stories.d.ts.map +1 -0
- package/lib/Identity/AvatarGrid.stories.js +90 -0
- package/lib/Identity/Logo.stories.d.ts +12 -0
- package/lib/Identity/Logo.stories.d.ts.map +1 -0
- package/lib/Identity/Logo.stories.js +62 -0
- package/lib/Identity/colors-v2.stories.d.ts +12 -0
- package/lib/Identity/colors-v2.stories.d.ts.map +1 -0
- package/lib/Identity/colors-v2.stories.js +78 -0
- package/lib/Identity/colors.stories.d.ts +10 -0
- package/lib/Identity/colors.stories.d.ts.map +1 -0
- package/lib/Identity/colors.stories.js +75 -0
- package/lib/Layout/Box.stories.d.ts +12 -0
- package/lib/Layout/Box.stories.d.ts.map +1 -0
- package/lib/Layout/Box.stories.js +58 -0
- package/lib/Layout/Column.stories.d.ts +10 -0
- package/lib/Layout/Column.stories.d.ts.map +1 -0
- package/lib/Layout/Column.stories.js +40 -0
- package/lib/Layout/Container.stories.d.ts +10 -0
- package/lib/Layout/Container.stories.d.ts.map +1 -0
- package/lib/Layout/Container.stories.js +38 -0
- package/lib/Layout/headerMenu/HeaderMenu.stories.d.ts +10 -0
- package/lib/Layout/headerMenu/HeaderMenu.stories.d.ts.map +1 -0
- package/lib/Layout/headerMenu/HeaderMenu.stories.js +49 -0
- package/lib/Menu/TabBar.stories.d.ts +11 -0
- package/lib/Menu/TabBar.stories.d.ts.map +1 -0
- package/lib/Menu/TabBar.stories.js +66 -0
- package/lib/Misc/ButtonGroup.stories.d.ts +10 -0
- package/lib/Misc/ButtonGroup.stories.d.ts.map +1 -0
- package/lib/Misc/ButtonGroup.stories.js +28 -0
- package/lib/Misc/IconButton.stories.d.ts +14 -0
- package/lib/Misc/IconButton.stories.d.ts.map +1 -0
- package/lib/Misc/IconButton.stories.js +59 -0
- package/lib/Misc/Loading.stories.d.ts +15 -0
- package/lib/Misc/Loading.stories.d.ts.map +1 -0
- package/lib/Misc/Loading.stories.js +47 -0
- package/lib/Misc/Pagination.stories.d.ts +14 -0
- package/lib/Misc/Pagination.stories.d.ts.map +1 -0
- package/lib/Misc/Pagination.stories.js +97 -0
- package/lib/Misc/Pill.stories.d.ts +15 -0
- package/lib/Misc/Pill.stories.d.ts.map +1 -0
- package/lib/Misc/Pill.stories.js +59 -0
- package/lib/Modal/Modal.stories.d.ts +12 -0
- package/lib/Modal/Modal.stories.d.ts.map +1 -0
- package/lib/Modal/Modal.stories.js +63 -0
- package/lib/Text/Heading.d.ts +1 -2
- package/lib/Text/Heading.d.ts.map +1 -1
- package/lib/Text/Heading.stories.d.ts +38 -0
- package/lib/Text/Heading.stories.d.ts.map +1 -0
- package/lib/Text/Heading.stories.js +67 -0
- package/lib/Text/Label.d.ts.map +1 -1
- package/lib/Text/Label.js +6 -2
- package/lib/Text/Label.stories.d.ts +403 -0
- package/lib/Text/Label.stories.d.ts.map +1 -0
- package/lib/Text/Label.stories.js +37 -0
- package/lib/Text/Line.stories.d.ts +19 -0
- package/lib/Text/Line.stories.d.ts.map +1 -0
- package/lib/Text/Line.stories.js +43 -0
- package/lib/Text/Link.stories.d.ts +27 -0
- package/lib/Text/Link.stories.d.ts.map +1 -0
- package/lib/Text/Link.stories.js +75 -0
- package/lib/Text/Paragraph.stories.d.ts +15 -0
- package/lib/Text/Paragraph.stories.d.ts.map +1 -0
- package/lib/Text/Paragraph.stories.js +30 -0
- package/lib/Text/Text.stories.d.ts +32 -0
- package/lib/Text/Text.stories.d.ts.map +1 -0
- package/lib/Text/Text.stories.js +59 -0
- package/lib/Text/TextLink.stories.d.ts +20 -0
- package/lib/Text/TextLink.stories.d.ts.map +1 -0
- package/lib/Text/TextLink.stories.js +37 -0
- package/lib/Text/Title.stories.d.ts +24 -0
- package/lib/Text/Title.stories.d.ts.map +1 -0
- package/lib/Text/Title.stories.js +63 -0
- package/package.json +17 -9
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmberScale = exports.RedScale = exports.PurpleScale = exports.TurquoiseScale = exports.GreenScale = exports.BlueScale = exports.GrayScale = exports.BaseColors = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const colors_v2_1 = require("./colors-v2");
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Identity/Colors/V2',
|
|
8
|
+
};
|
|
9
|
+
exports.default = meta;
|
|
10
|
+
const ColorBox = ({ color, name }) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: '8px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
11
|
+
backgroundColor: color,
|
|
12
|
+
border: '1px solid #E5E5E5',
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
height: '48px',
|
|
15
|
+
marginBottom: '4px',
|
|
16
|
+
width: '100%',
|
|
17
|
+
} }), (0, jsx_runtime_1.jsxs)("div", { style: { fontSize: '12px' }, children: [(0, jsx_runtime_1.jsx)("strong", { children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("code", { children: color })] })] }));
|
|
18
|
+
const ColorSection = ({ title, colors }) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: '32px' }, children: [(0, jsx_runtime_1.jsx)("h3", { children: title }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
19
|
+
display: 'grid',
|
|
20
|
+
gap: '16px',
|
|
21
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
|
|
22
|
+
}, children: Object.entries(colors).map(([key, value]) => ((0, jsx_runtime_1.jsx)(ColorBox, { color: value, name: key }, key))) })] }));
|
|
23
|
+
const getColorScale = (prefix) => {
|
|
24
|
+
const lightColors = Object.entries(colors_v2_1.COLOR_V2)
|
|
25
|
+
.filter(([key]) => key.includes(`${prefix}_LIGHT_`))
|
|
26
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
27
|
+
const darkColors = Object.entries(colors_v2_1.COLOR_V2)
|
|
28
|
+
.filter(([key]) => key.includes(`${prefix}_DARK_`))
|
|
29
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
30
|
+
return { lightColors, darkColors };
|
|
31
|
+
};
|
|
32
|
+
const BaseColors = () => {
|
|
33
|
+
const lightColors = Object.entries(colors_v2_1.COLOR_V2)
|
|
34
|
+
.filter(([key]) => key.includes('LIGHT_500'))
|
|
35
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
36
|
+
const darkColors = Object.entries(colors_v2_1.COLOR_V2)
|
|
37
|
+
.filter(([key]) => key.includes('DARK_500'))
|
|
38
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Base Light Colors", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Base Dark Colors", colors: darkColors })] }));
|
|
40
|
+
};
|
|
41
|
+
exports.BaseColors = BaseColors;
|
|
42
|
+
const GrayScale = () => {
|
|
43
|
+
const colors = Object.entries(colors_v2_1.COLOR_V2)
|
|
44
|
+
.filter(([key]) => key.includes('GRAY_'))
|
|
45
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
46
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Gray Scale", colors: colors });
|
|
47
|
+
};
|
|
48
|
+
exports.GrayScale = GrayScale;
|
|
49
|
+
const BlueScale = () => {
|
|
50
|
+
const { lightColors, darkColors } = getColorScale('BLUE');
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Blue Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Blue Scale (Dark)", colors: darkColors })] }));
|
|
52
|
+
};
|
|
53
|
+
exports.BlueScale = BlueScale;
|
|
54
|
+
const GreenScale = () => {
|
|
55
|
+
const { lightColors, darkColors } = getColorScale('GREEN');
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Green Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Green Scale (Dark)", colors: darkColors })] }));
|
|
57
|
+
};
|
|
58
|
+
exports.GreenScale = GreenScale;
|
|
59
|
+
const TurquoiseScale = () => {
|
|
60
|
+
const { lightColors, darkColors } = getColorScale('TURQUOISE');
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Turquoise Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Turquoise Scale (Dark)", colors: darkColors })] }));
|
|
62
|
+
};
|
|
63
|
+
exports.TurquoiseScale = TurquoiseScale;
|
|
64
|
+
const PurpleScale = () => {
|
|
65
|
+
const { lightColors, darkColors } = getColorScale('PURPLE');
|
|
66
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Purple Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Purple Scale (Dark)", colors: darkColors })] }));
|
|
67
|
+
};
|
|
68
|
+
exports.PurpleScale = PurpleScale;
|
|
69
|
+
const RedScale = () => {
|
|
70
|
+
const { lightColors, darkColors } = getColorScale('RED');
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Red Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Red Scale (Dark)", colors: darkColors })] }));
|
|
72
|
+
};
|
|
73
|
+
exports.RedScale = RedScale;
|
|
74
|
+
const AmberScale = () => {
|
|
75
|
+
const { lightColors, darkColors } = getColorScale('AMBER');
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorSection, { title: "Amber Scale (Light)", colors: lightColors }), (0, jsx_runtime_1.jsx)(ColorSection, { title: "Amber Scale (Dark)", colors: darkColors })] }));
|
|
77
|
+
};
|
|
78
|
+
exports.AmberScale = AmberScale;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
export declare const BaseColors: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const DarkVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const LightVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const OpaqueVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ComponentColors: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AllColorVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=colors.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.stories.d.ts","sourceRoot":"","sources":["../../src/Identity/colors.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAItC,QAAA,MAAM,IAAI,EAAE,IAEX,CAAC;AAEF,eAAe,IAAI,CAAC;AA8CpB,eAAO,MAAM,UAAU,wDAMtB,CAAC;AAEF,eAAO,MAAM,YAAY,wDAMxB,CAAC;AAEF,eAAO,MAAM,aAAa,wDAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,wDAM1B,CAAC;AAEF,eAAO,MAAM,eAAe,wDAM3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wDAuB5B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AllColorVariants = exports.ComponentColors = exports.OpaqueVariants = exports.LightVariants = exports.DarkVariants = exports.BaseColors = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("./colors");
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Identity/Colors/V1',
|
|
8
|
+
};
|
|
9
|
+
exports.default = meta;
|
|
10
|
+
const ColorBox = ({ color, name }) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: '8px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
11
|
+
backgroundColor: color,
|
|
12
|
+
border: '1px solid #E5E5E5',
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
height: '48px',
|
|
15
|
+
marginBottom: '4px',
|
|
16
|
+
width: '100%',
|
|
17
|
+
} }), (0, jsx_runtime_1.jsxs)("div", { style: { fontSize: '12px' }, children: [(0, jsx_runtime_1.jsx)("strong", { children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("code", { children: color })] })] }));
|
|
18
|
+
const ColorSection = ({ title, colors }) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: '32px' }, children: [(0, jsx_runtime_1.jsx)("h3", { children: title }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
19
|
+
display: 'grid',
|
|
20
|
+
gap: '16px',
|
|
21
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
|
|
22
|
+
}, children: Object.entries(colors)
|
|
23
|
+
.filter(([, value]) => typeof value === 'string')
|
|
24
|
+
.map(([key, value]) => ((0, jsx_runtime_1.jsx)(ColorBox, { color: value, name: key }, key))) })] }));
|
|
25
|
+
const BaseColors = () => {
|
|
26
|
+
const colors = Object.entries(colors_1.COLOR)
|
|
27
|
+
.filter(([key, value]) => typeof value === 'string' && !key.includes('_'))
|
|
28
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Base Colors", colors: colors });
|
|
30
|
+
};
|
|
31
|
+
exports.BaseColors = BaseColors;
|
|
32
|
+
const DarkVariants = () => {
|
|
33
|
+
const colors = Object.entries(colors_1.COLOR)
|
|
34
|
+
.filter(([key]) => key.includes('DARKEN'))
|
|
35
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
36
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Dark Variants", colors: colors });
|
|
37
|
+
};
|
|
38
|
+
exports.DarkVariants = DarkVariants;
|
|
39
|
+
const LightVariants = () => {
|
|
40
|
+
const colors = Object.entries(colors_1.COLOR)
|
|
41
|
+
.filter(([key]) => key.includes('LIGHTEN'))
|
|
42
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
43
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Light Variants", colors: colors });
|
|
44
|
+
};
|
|
45
|
+
exports.LightVariants = LightVariants;
|
|
46
|
+
const OpaqueVariants = () => {
|
|
47
|
+
const colors = Object.entries(colors_1.COLOR)
|
|
48
|
+
.filter(([key]) => key.includes('OPAQUE'))
|
|
49
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
50
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Opaque Variants", colors: colors });
|
|
51
|
+
};
|
|
52
|
+
exports.OpaqueVariants = OpaqueVariants;
|
|
53
|
+
const ComponentColors = () => {
|
|
54
|
+
const colors = Object.entries(colors_1.COLOR)
|
|
55
|
+
.filter(([key]) => ['DISABLED', 'ICON', 'LINK', 'TEXT'].includes(key))
|
|
56
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
57
|
+
return (0, jsx_runtime_1.jsx)(ColorSection, { title: "Component Colors", colors: colors });
|
|
58
|
+
};
|
|
59
|
+
exports.ComponentColors = ComponentColors;
|
|
60
|
+
const AllColorVariants = () => {
|
|
61
|
+
const baseColors = Object.entries(colors_1.COLOR)
|
|
62
|
+
.filter(([key, value]) => typeof value === 'string' && !key.includes('_'))
|
|
63
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
64
|
+
const colorsByBase = Object.keys(baseColors).map(baseColor => {
|
|
65
|
+
const variants = Object.entries(colors_1.COLOR)
|
|
66
|
+
.filter(([key, value]) => typeof value === 'string' && key.startsWith(baseColor) && key !== baseColor)
|
|
67
|
+
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
|
68
|
+
return {
|
|
69
|
+
base: baseColor,
|
|
70
|
+
variants: { [baseColor]: baseColors[baseColor], ...variants },
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: colorsByBase.map(({ base, variants }) => ((0, jsx_runtime_1.jsx)(ColorSection, { title: `${base} - All Variants`, colors: variants }, base))) }));
|
|
74
|
+
};
|
|
75
|
+
exports.AllColorVariants = AllColorVariants;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Box } from './Box';
|
|
3
|
+
declare const meta: Meta<typeof Box>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Box>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCustomPadding: Story;
|
|
8
|
+
export declare const WithCustomBorder: Story;
|
|
9
|
+
export declare const WithFormattedContent: Story;
|
|
10
|
+
export declare const Nested: Story;
|
|
11
|
+
export declare const Interactive: Story;
|
|
12
|
+
//# sourceMappingURL=Box.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../src/Layout/Box.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAU1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAMlC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAK/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAgBlC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAapB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Interactive = exports.Nested = exports.WithFormattedContent = exports.WithCustomBorder = exports.WithCustomPadding = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Box_1 = require("./Box");
|
|
6
|
+
const colors_1 = require("../Identity/colors");
|
|
7
|
+
const Text_1 = require("../Text");
|
|
8
|
+
const meta = {
|
|
9
|
+
component: Box_1.Box,
|
|
10
|
+
title: 'Layout/Box',
|
|
11
|
+
decorators: [
|
|
12
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '600px', margin: '0 auto' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
exports.default = meta;
|
|
16
|
+
const LOREM_IPSUM = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a mattis nibh, sed maximus leo. Fusce a lacinia sem,
|
|
17
|
+
vitae ornare dolor. Quisque rhoncus, magna non lacinia sagittis, erat augue fringilla metus, eu consectetur leo velit
|
|
18
|
+
non lacus. Phasellus ipsum turpis, dapibus ut purus in, lobortis consectetur mi.`;
|
|
19
|
+
exports.Default = {
|
|
20
|
+
args: {
|
|
21
|
+
children: LOREM_IPSUM,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
exports.WithCustomPadding = {
|
|
25
|
+
args: {
|
|
26
|
+
children: LOREM_IPSUM,
|
|
27
|
+
style: { padding: '32px' },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
exports.WithCustomBorder = {
|
|
31
|
+
args: {
|
|
32
|
+
children: LOREM_IPSUM,
|
|
33
|
+
style: { border: `2px solid ${colors_1.COLOR.BLUE}` },
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
exports.WithFormattedContent = {
|
|
37
|
+
args: {
|
|
38
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, style: { fontSize: '20px', fontWeight: 'bold', marginBottom: '16px' }, children: "Important Notice" }), (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, style: { marginBottom: '12px' }, children: LOREM_IPSUM }), (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, style: { color: colors_1.COLOR.GRAY }, children: "Last updated: 2025-01-01" })] })),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
exports.Nested = {
|
|
42
|
+
args: {
|
|
43
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, style: { marginBottom: '16px' }, children: "Outer box content" }), (0, jsx_runtime_1.jsx)(Box_1.Box, { style: { backgroundColor: colors_1.COLOR.GRAY_LIGHTEN_92 }, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { children: "Inner box content" }) })] })),
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
exports.Interactive = {
|
|
47
|
+
args: {
|
|
48
|
+
children: ((0, jsx_runtime_1.jsxs)("div", { style: { textAlign: 'center' }, children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, style: { marginBottom: '16px' }, children: "Click the button below" }), (0, jsx_runtime_1.jsx)("button", { style: {
|
|
49
|
+
backgroundColor: colors_1.COLOR.BLUE,
|
|
50
|
+
border: 'none',
|
|
51
|
+
borderRadius: '4px',
|
|
52
|
+
color: colors_1.COLOR.WHITE,
|
|
53
|
+
cursor: 'pointer',
|
|
54
|
+
padding: '8px 16px',
|
|
55
|
+
}, children: "Action Button" })] })),
|
|
56
|
+
style: { cursor: 'pointer' },
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Columns } from './Column';
|
|
3
|
+
declare const meta: Meta<typeof Columns>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Columns>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const TwoColumns: Story;
|
|
8
|
+
export declare const ResponsiveColumns: Story;
|
|
9
|
+
export declare const NestedColumns: Story;
|
|
10
|
+
//# sourceMappingURL=Column.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Column.stories.d.ts","sourceRoot":"","sources":["../../src/Layout/Column.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAS,OAAO,EAAC,MAAM,UAAU,CAAC;AAKzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAG9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAgBtC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NestedColumns = exports.ResponsiveColumns = exports.TwoColumns = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Column_1 = require("./Column");
|
|
6
|
+
const colors_1 = require("../Identity/colors");
|
|
7
|
+
const mediaQueries_1 = require("../mediaQueries");
|
|
8
|
+
const meta = {
|
|
9
|
+
component: Column_1.Columns,
|
|
10
|
+
title: 'Layout/Column',
|
|
11
|
+
};
|
|
12
|
+
exports.default = meta;
|
|
13
|
+
const Box = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
14
|
+
backgroundColor: colors_1.COLOR.GRAY_LIGHTEN_72,
|
|
15
|
+
border: `1px solid ${colors_1.COLOR.GRAY_LIGHTEN_48}`,
|
|
16
|
+
borderRadius: '4px',
|
|
17
|
+
padding: '16px',
|
|
18
|
+
textAlign: 'center',
|
|
19
|
+
}, children: children }));
|
|
20
|
+
exports.Default = {
|
|
21
|
+
args: {
|
|
22
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Column 1" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Column 2" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Column 3" }) })] })),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
exports.TwoColumns = {
|
|
26
|
+
args: {
|
|
27
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Column 1" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Column 2" }) })] })),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
exports.ResponsiveColumns = {
|
|
31
|
+
args: {
|
|
32
|
+
query: mediaQueries_1.QueryKeys.TABLET,
|
|
33
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Stacks on tablet" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Stacks on tablet" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Stacks on tablet" }) })] })),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
exports.NestedColumns = {
|
|
37
|
+
args: {
|
|
38
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Main Column" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsxs)(Column_1.Columns, { children: [(0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Nested 1" }) }), (0, jsx_runtime_1.jsx)(Column_1.Column, { children: (0, jsx_runtime_1.jsx)(Box, { children: "Nested 2" }) })] }) })] })),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Container } from './Container';
|
|
3
|
+
declare const meta: Meta<typeof Container>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Container>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CenteredText: Story;
|
|
8
|
+
export declare const VerticalCentered: Story;
|
|
9
|
+
export declare const Sizes: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=Container.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.stories.d.ts","sourceRoot":"","sources":["../../src/Layout/Container.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,SAAS,EAAmE,MAAM,aAAa,CAAC;AAIxG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAgBxC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF,eAAO,MAAM,KAAK,wDAkBjB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sizes = exports.VerticalCentered = exports.CenteredText = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Container_1 = require("./Container");
|
|
6
|
+
const colors_1 = require("../Identity/colors");
|
|
7
|
+
const meta = {
|
|
8
|
+
component: Container_1.Container,
|
|
9
|
+
title: 'Layout/Container',
|
|
10
|
+
};
|
|
11
|
+
exports.default = meta;
|
|
12
|
+
const DemoContent = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
13
|
+
backgroundColor: colors_1.COLOR.GRAY_LIGHTEN_72,
|
|
14
|
+
border: `1px solid ${colors_1.COLOR.GRAY_LIGHTEN_48}`,
|
|
15
|
+
borderRadius: '4px',
|
|
16
|
+
padding: '16px',
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
}, children: children }));
|
|
19
|
+
exports.Default = {
|
|
20
|
+
args: {
|
|
21
|
+
children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "Default Container" }),
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
exports.CenteredText = {
|
|
25
|
+
args: {
|
|
26
|
+
centerText: true,
|
|
27
|
+
children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "Centered Text Container" }),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
exports.VerticalCentered = {
|
|
31
|
+
args: {
|
|
32
|
+
verticalCenter: true,
|
|
33
|
+
style: { height: '400px' },
|
|
34
|
+
children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "Vertically Centered Container" }),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const Sizes = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [(0, jsx_runtime_1.jsx)(Container_1.ContainerXXS, { children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "XXS Container" }) }), (0, jsx_runtime_1.jsx)(Container_1.ContainerXS, { children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "XS Container" }) }), (0, jsx_runtime_1.jsx)(Container_1.ContainerSM, { children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "SM Container" }) }), (0, jsx_runtime_1.jsx)(Container_1.ContainerMD, { children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "MD Container" }) }), (0, jsx_runtime_1.jsx)(Container_1.ContainerLG, { children: (0, jsx_runtime_1.jsx)(DemoContent, { children: "LG Container" }) })] }));
|
|
38
|
+
exports.Sizes = Sizes;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { HeaderMenu } from './HeaderMenu';
|
|
3
|
+
declare const meta: Meta<typeof HeaderMenu>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof HeaderMenu>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithoutCenterElement: Story;
|
|
8
|
+
export declare const WithoutLogo: Story;
|
|
9
|
+
export declare const MinimalExample: Story;
|
|
10
|
+
//# sourceMappingURL=HeaderMenu.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/Layout/headerMenu/HeaderMenu.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAMxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAajC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAezC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MinimalExample = exports.WithoutLogo = exports.WithoutCenterElement = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const HeaderMenu_1 = require("./HeaderMenu");
|
|
6
|
+
const colors_1 = require("../../Identity/colors");
|
|
7
|
+
const Logo_1 = require("../../Identity/Logo");
|
|
8
|
+
const Text_1 = require("../../Text");
|
|
9
|
+
const meta = {
|
|
10
|
+
component: HeaderMenu_1.HeaderMenu,
|
|
11
|
+
title: 'Layout/HeaderMenu',
|
|
12
|
+
decorators: [
|
|
13
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { height: '400px', position: 'relative', paddingRight: '16px' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
14
|
+
],
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.default = meta;
|
|
20
|
+
const MenuLink = ({ children }) => ((0, jsx_runtime_1.jsx)(Text_1.Text, { style: {
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
display: 'block',
|
|
23
|
+
margin: '16px 16px 0 16px',
|
|
24
|
+
textDecoration: 'none',
|
|
25
|
+
}, children: children }));
|
|
26
|
+
exports.Default = {
|
|
27
|
+
args: {
|
|
28
|
+
logoElement: (0, jsx_runtime_1.jsx)(Logo_1.Logo, { height: 16 }),
|
|
29
|
+
centerElement: ((0, jsx_runtime_1.jsx)("div", { style: { color: colors_1.COLOR.GRAY }, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "Center Element" }) })),
|
|
30
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MenuLink, { children: 'First Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Second Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Third Link' })] })),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
exports.WithoutCenterElement = {
|
|
34
|
+
args: {
|
|
35
|
+
logoElement: (0, jsx_runtime_1.jsx)(Logo_1.Logo, { height: 16 }),
|
|
36
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MenuLink, { children: 'First Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Second Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Third Link' })] })),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
exports.WithoutLogo = {
|
|
40
|
+
args: {
|
|
41
|
+
centerElement: ((0, jsx_runtime_1.jsx)("div", { style: { color: colors_1.COLOR.GRAY }, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "Center Element" }) })),
|
|
42
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MenuLink, { children: 'First Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Second Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Third Link' })] })),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
exports.MinimalExample = {
|
|
46
|
+
args: {
|
|
47
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MenuLink, { children: 'First Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Second Link' }), (0, jsx_runtime_1.jsx)(MenuLink, { children: 'Third Link' })] })),
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TabBar } from './TabBar';
|
|
3
|
+
declare const meta: Meta<typeof TabBar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof TabBar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Interactive: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const WithContent: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const WithBadge: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CustomStyling: Story;
|
|
11
|
+
//# sourceMappingURL=TabBar.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabBar.stories.d.ts","sourceRoot":"","sources":["../../src/Menu/TabBar.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,MAAM,EAAa,MAAM,UAAU,CAAC;AAE5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAU7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,WAAW,wDAavB,CAAC;AAEF,eAAO,MAAM,WAAW,wDAoBvB,CAAC;AAEF,eAAO,MAAM,SAAS,wDA0BrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomStyling = exports.WithBadge = exports.WithContent = exports.Interactive = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const react_1 = require("react");
|
|
24
|
+
const TabBar_1 = require("./TabBar");
|
|
25
|
+
const meta = {
|
|
26
|
+
component: TabBar_1.TabBar,
|
|
27
|
+
title: 'Menu/TabBar',
|
|
28
|
+
decorators: [
|
|
29
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '600px', margin: '0 auto' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
exports.default = meta;
|
|
33
|
+
exports.Default = {
|
|
34
|
+
args: {
|
|
35
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: true, children: "First Tab" }), (0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: false, children: "Second Tab" }), (0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: false, children: "Third Tab" })] })),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const Interactive = () => {
|
|
39
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)(0);
|
|
40
|
+
const tabs = ['First Tab', 'Second Tab', 'Third Tab'];
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(TabBar_1.TabBar, { children: tabs.map((tab, index) => ((0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: activeTab === index, onClick: () => setActiveTab(index), children: tab }, tab))) }));
|
|
42
|
+
};
|
|
43
|
+
exports.Interactive = Interactive;
|
|
44
|
+
const WithContent = () => {
|
|
45
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)(0);
|
|
46
|
+
const tabs = ['Details', 'History', 'Settings'];
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(TabBar_1.TabBar, { children: tabs.map((tab, index) => ((0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: activeTab === index, onClick: () => setActiveTab(index), children: tab }, tab))) }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: '16px' }, children: [activeTab === 0 && (0, jsx_runtime_1.jsx)("div", { children: "Details content" }), activeTab === 1 && (0, jsx_runtime_1.jsx)("div", { children: "History content" }), activeTab === 2 && (0, jsx_runtime_1.jsx)("div", { children: "Settings content" })] })] }));
|
|
48
|
+
};
|
|
49
|
+
exports.WithContent = WithContent;
|
|
50
|
+
const WithBadge = () => {
|
|
51
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)(0);
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(TabBar_1.TabBar, { children: [(0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: activeTab === 0, onClick: () => setActiveTab(0), children: "Messages" }), (0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: activeTab === 1, onClick: () => setActiveTab(1), children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: ["Notifications", (0, jsx_runtime_1.jsx)("span", { style: {
|
|
53
|
+
backgroundColor: 'red',
|
|
54
|
+
borderRadius: '8px',
|
|
55
|
+
color: 'white',
|
|
56
|
+
fontSize: '12px',
|
|
57
|
+
padding: '2px 6px',
|
|
58
|
+
}, children: "3" })] }) })] }));
|
|
59
|
+
};
|
|
60
|
+
exports.WithBadge = WithBadge;
|
|
61
|
+
exports.CustomStyling = {
|
|
62
|
+
args: {
|
|
63
|
+
style: { backgroundColor: '#f5f5f5', padding: '8px' },
|
|
64
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: true, style: { fontWeight: 'bold' }, children: "Bold Tab" }), (0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: false, style: { color: 'blue' }, children: "Blue Tab" }), (0, jsx_runtime_1.jsx)(TabBar_1.TabBarItem, { active: false, style: { textTransform: 'none' }, children: "Normal Case Tab" })] })),
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ButtonGroup } from './ButtonGroup';
|
|
3
|
+
declare const meta: Meta<typeof ButtonGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ButtonGroup>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const SingleButton: Story;
|
|
8
|
+
export declare const WithIcons: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const MixedContent: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ButtonGroup.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.stories.d.ts","sourceRoot":"","sources":["../../src/Misc/ButtonGroup.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAUlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,SAAS,wDAarB,CAAC;AAEF,eAAO,MAAM,YAAY,wDAaxB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MixedContent = exports.WithIcons = exports.SingleButton = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const ButtonGroup_1 = require("./ButtonGroup");
|
|
6
|
+
const Icon_1 = require("../Icon");
|
|
7
|
+
const meta = {
|
|
8
|
+
component: ButtonGroup_1.ButtonGroup,
|
|
9
|
+
title: 'Misc/ButtonGroup',
|
|
10
|
+
decorators: [
|
|
11
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '600px', margin: '0 auto' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
exports.default = meta;
|
|
15
|
+
exports.Default = {
|
|
16
|
+
args: {
|
|
17
|
+
children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }), children: "Button" }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { children: "Text only" })] })),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
exports.SingleButton = {
|
|
21
|
+
args: {
|
|
22
|
+
children: (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { children: "Text only" }),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const WithIcons = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '20px' }, children: [(0, jsx_runtime_1.jsxs)(ButtonGroup_1.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) })] }), (0, jsx_runtime_1.jsxs)(ButtonGroup_1.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }), children: "Add" }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }), children: "Create" }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }), children: "New" })] })] }));
|
|
26
|
+
exports.WithIcons = WithIcons;
|
|
27
|
+
const MixedContent = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '20px' }, children: [(0, jsx_runtime_1.jsxs)(ButtonGroup_1.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { children: "Middle" }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }), children: "End" })] }), (0, jsx_runtime_1.jsxs)(ButtonGroup_1.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { children: "Start" }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { icon: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, { height: 12, width: 12 }) }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup.Button, { children: "End" })] })] }));
|
|
28
|
+
exports.MixedContent = MixedContent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { IconButton } from './IconButton';
|
|
3
|
+
declare const meta: Meta<typeof IconButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof IconButton>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const Secondary: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const CustomBackground: Story;
|
|
10
|
+
export declare const AllVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const DifferentIcons: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const WithCustomStyles: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Interactive: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=IconButton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../src/Misc/IconButton.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAoB,MAAM,cAAc,CAAC;AAK3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAmBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,WAAW,wDA0BvB,CAAC;AAEF,eAAO,MAAM,cAAc,wDAY1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wDAY5B,CAAC;AAEF,eAAO,MAAM,WAAW,wDAavB,CAAC"}
|