@wireapp/react-ui-kit 9.31.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 +3 -3
- package/lib/Form/Select.d.ts.map +1 -1
- package/lib/Form/Select.js +2 -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/SelectComponents.d.ts +5 -1
- package/lib/Form/SelectComponents.d.ts.map +1 -1
- package/lib/Form/SelectComponents.js +16 -1
- package/lib/Form/SelectComponents.styles.d.ts +5 -0
- package/lib/Form/SelectComponents.styles.d.ts.map +1 -0
- package/lib/Form/SelectComponents.styles.js +38 -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,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"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Interactive = exports.WithCustomStyles = exports.DifferentIcons = exports.AllVariants = exports.CustomBackground = exports.Disabled = exports.Secondary = exports.Primary = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const IconButton_1 = require("./IconButton");
|
|
6
|
+
const Icon_1 = require("../Icon");
|
|
7
|
+
const colors_1 = require("../Identity/colors");
|
|
8
|
+
const meta = {
|
|
9
|
+
component: IconButton_1.IconButton,
|
|
10
|
+
title: 'Misc/IconButton',
|
|
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
|
+
argTypes: {
|
|
15
|
+
variant: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: Object.values(IconButton_1.IconButtonVariant),
|
|
18
|
+
},
|
|
19
|
+
backgroundColor: {
|
|
20
|
+
control: 'color',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
exports.default = meta;
|
|
25
|
+
exports.Primary = {
|
|
26
|
+
args: {
|
|
27
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}),
|
|
28
|
+
variant: IconButton_1.IconButtonVariant.PRIMARY,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
exports.Secondary = {
|
|
32
|
+
args: {
|
|
33
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}),
|
|
34
|
+
variant: IconButton_1.IconButtonVariant.SECONDARY,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
exports.Disabled = {
|
|
38
|
+
args: {
|
|
39
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}),
|
|
40
|
+
disabled: true,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
exports.CustomBackground = {
|
|
44
|
+
args: {
|
|
45
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}),
|
|
46
|
+
backgroundColor: colors_1.COLOR.BLUE,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const AllVariants = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '32px' }, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Primary Variant" }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '16px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: IconButton_1.IconButtonVariant.PRIMARY, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: IconButton_1.IconButtonVariant.PRIMARY, disabled: true, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Secondary Variant" }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '16px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: IconButton_1.IconButtonVariant.SECONDARY, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: IconButton_1.IconButtonVariant.SECONDARY, disabled: true, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) })] })] })] }));
|
|
50
|
+
exports.AllVariants = AllVariants;
|
|
51
|
+
const DifferentIcons = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '16px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.TrashIcon, {}) })] }));
|
|
52
|
+
exports.DifferentIcons = DifferentIcons;
|
|
53
|
+
const WithCustomStyles = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '16px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { style: { backgroundColor: colors_1.COLOR.GREEN }, children: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { style: { backgroundColor: colors_1.COLOR.RED }, children: (0, jsx_runtime_1.jsx)(Icon_1.TrashIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { style: { border: `2px solid ${colors_1.COLOR.BLUE}` }, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) })] }));
|
|
54
|
+
exports.WithCustomStyles = WithCustomStyles;
|
|
55
|
+
const Interactive = () => {
|
|
56
|
+
const handleClick = () => alert('Button clicked!');
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '16px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { onClick: handleClick, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { disabled: true, onClick: handleClick, children: (0, jsx_runtime_1.jsx)(Icon_1.InfoIcon, {}) })] }));
|
|
58
|
+
};
|
|
59
|
+
exports.Interactive = Interactive;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Loading } from './Loading';
|
|
3
|
+
declare const meta: Meta<typeof Loading>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Loading>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithProgress: Story;
|
|
8
|
+
export declare const CustomSize: Story;
|
|
9
|
+
export declare const CustomColor: Story;
|
|
10
|
+
export declare const Variants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ColorVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const SizeVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ProgressStages: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const OnDifferentBackgrounds: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Loading.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.stories.d.ts","sourceRoot":"","sources":["../../src/Misc/Loading.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAIlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAe9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,QAAQ,wDAMpB,CAAC;AAEF,eAAO,MAAM,aAAa,wDAOzB,CAAC;AAEF,eAAO,MAAM,YAAY,wDAOxB,CAAC;AAEF,eAAO,MAAM,cAAc,wDAiB1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,wDAYlC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnDifferentBackgrounds = exports.ProgressStages = exports.SizeVariants = exports.ColorVariants = exports.Variants = exports.CustomColor = exports.CustomSize = exports.WithProgress = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Loading_1 = require("./Loading");
|
|
6
|
+
const colors_1 = require("../Identity/colors");
|
|
7
|
+
const meta = {
|
|
8
|
+
component: Loading_1.Loading,
|
|
9
|
+
title: 'Misc/Loading',
|
|
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
|
+
argTypes: {
|
|
14
|
+
color: { control: 'color' },
|
|
15
|
+
progress: { control: { type: 'range', min: 0, max: 1, step: 0.01 } },
|
|
16
|
+
size: { control: { type: 'range', min: 16, max: 200, step: 1 } },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.default = meta;
|
|
20
|
+
exports.Default = {
|
|
21
|
+
args: {},
|
|
22
|
+
};
|
|
23
|
+
exports.WithProgress = {
|
|
24
|
+
args: {
|
|
25
|
+
progress: 0.33,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
exports.CustomSize = {
|
|
29
|
+
args: {
|
|
30
|
+
size: 100,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
exports.CustomColor = {
|
|
34
|
+
args: {
|
|
35
|
+
color: colors_1.COLOR.GREEN,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const Variants = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(Loading_1.Loading, {}), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0.33 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0.66, size: 100 })] }));
|
|
39
|
+
exports.Variants = Variants;
|
|
40
|
+
const ColorVariants = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.BLUE }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.GREEN }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.RED }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.ORANGE })] }));
|
|
41
|
+
exports.ColorVariants = ColorVariants;
|
|
42
|
+
const SizeVariants = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 24 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 48 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 96 })] }));
|
|
43
|
+
exports.SizeVariants = SizeVariants;
|
|
44
|
+
const ProgressStages = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '32px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0.25 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0.5 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 0.75 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { progress: 1 })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72, progress: 0 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72, progress: 0.25 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72, progress: 0.5 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72, progress: 0.75 }), (0, jsx_runtime_1.jsx)(Loading_1.Loading, { size: 72, progress: 1 })] })] }));
|
|
45
|
+
exports.ProgressStages = ProgressStages;
|
|
46
|
+
const OnDifferentBackgrounds = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '32px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', backgroundColor: colors_1.COLOR.WHITE }, children: (0, jsx_runtime_1.jsx)(Loading_1.Loading, {}) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', backgroundColor: colors_1.COLOR.GRAY }, children: (0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.WHITE }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', backgroundColor: colors_1.COLOR.BLACK }, children: (0, jsx_runtime_1.jsx)(Loading_1.Loading, { color: colors_1.COLOR.WHITE }) })] }));
|
|
47
|
+
exports.OnDifferentBackgrounds = OnDifferentBackgrounds;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Pagination } from './Pagination';
|
|
3
|
+
declare const meta: Meta<typeof Pagination>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pagination>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomNavigation: Story;
|
|
8
|
+
export declare const WithManyPages: Story;
|
|
9
|
+
export declare const Interactive: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CustomStyling: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const FirstPage: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const LastPage: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const MiddlePage: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=Pagination.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.stories.d.ts","sourceRoot":"","sources":["../../src/Misc/Pagination.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAKxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAUjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,eAAO,MAAM,WAAW,wDAgCvB,CAAC;AAEF,eAAO,MAAM,aAAa,wDAiBzB,CAAC;AAEF,eAAO,MAAM,SAAS,wDAWrB,CAAC;AAEF,eAAO,MAAM,QAAQ,wDAWpB,CAAC;AAEF,eAAO,MAAM,UAAU,wDAWtB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MiddlePage = exports.LastPage = exports.FirstPage = exports.CustomStyling = exports.Interactive = exports.WithManyPages = exports.CustomNavigation = 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 Pagination_1 = require("./Pagination");
|
|
25
|
+
const colors_1 = require("../Identity/colors");
|
|
26
|
+
const Text_1 = require("../Text");
|
|
27
|
+
const meta = {
|
|
28
|
+
component: Pagination_1.Pagination,
|
|
29
|
+
title: 'Misc/Pagination',
|
|
30
|
+
decorators: [
|
|
31
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '600px', margin: '0 auto' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
exports.default = meta;
|
|
35
|
+
exports.Default = {
|
|
36
|
+
args: {
|
|
37
|
+
currentPage: 0,
|
|
38
|
+
numberOfPages: 5,
|
|
39
|
+
goPage: () => { },
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
exports.CustomNavigation = {
|
|
43
|
+
args: {
|
|
44
|
+
currentPage: 0,
|
|
45
|
+
numberOfPages: 5,
|
|
46
|
+
goPage: () => { },
|
|
47
|
+
previousPageComponent: () => 'Previous',
|
|
48
|
+
nextPageComponent: () => 'Next',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
exports.WithManyPages = {
|
|
52
|
+
args: {
|
|
53
|
+
currentPage: 4,
|
|
54
|
+
numberOfPages: 20,
|
|
55
|
+
goPage: () => { },
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const Interactive = () => {
|
|
59
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(0);
|
|
60
|
+
const paginatedList = [
|
|
61
|
+
[1, 2],
|
|
62
|
+
[3, 4],
|
|
63
|
+
[5, 6],
|
|
64
|
+
[7, 8],
|
|
65
|
+
[9, 10],
|
|
66
|
+
[11, 12],
|
|
67
|
+
[13, 14],
|
|
68
|
+
[15, 16],
|
|
69
|
+
[17, 18],
|
|
70
|
+
];
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: { marginBottom: '24px' }, children: paginatedList[currentPage].map(item => ((0, jsx_runtime_1.jsx)(Text_1.Small, { center: true, bold: true, block: true, style: { border: `1px solid ${colors_1.COLOR.GRAY}`, margin: 10, padding: '8px' }, children: `Item ${item}` }, item))) }), (0, jsx_runtime_1.jsx)(Pagination_1.Pagination, { currentPage: currentPage, goPage: setCurrentPage, nextPageComponent: () => 'Next', numberOfPages: paginatedList.length, previousPageComponent: () => 'Previous' })] }));
|
|
72
|
+
};
|
|
73
|
+
exports.Interactive = Interactive;
|
|
74
|
+
const CustomStyling = () => {
|
|
75
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(0);
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(Pagination_1.Pagination, { currentPage: currentPage, goPage: setCurrentPage, numberOfPages: 5, previousPageComponent: () => (0, jsx_runtime_1.jsx)("div", { style: { color: colors_1.COLOR.BLUE, fontWeight: 'bold' }, children: '←' }), nextPageComponent: () => (0, jsx_runtime_1.jsx)("div", { style: { color: colors_1.COLOR.BLUE, fontWeight: 'bold' }, children: '→' }), style: {
|
|
77
|
+
backgroundColor: colors_1.COLOR.GRAY_LIGHTEN_92,
|
|
78
|
+
borderRadius: '8px',
|
|
79
|
+
padding: '16px',
|
|
80
|
+
} }));
|
|
81
|
+
};
|
|
82
|
+
exports.CustomStyling = CustomStyling;
|
|
83
|
+
const FirstPage = () => {
|
|
84
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(0);
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(Pagination_1.Pagination, { currentPage: currentPage, goPage: setCurrentPage, numberOfPages: 5, previousPageComponent: () => 'Previous', nextPageComponent: () => 'Next' }));
|
|
86
|
+
};
|
|
87
|
+
exports.FirstPage = FirstPage;
|
|
88
|
+
const LastPage = () => {
|
|
89
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(4);
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)(Pagination_1.Pagination, { currentPage: currentPage, goPage: setCurrentPage, numberOfPages: 5, previousPageComponent: () => 'Previous', nextPageComponent: () => 'Next' }));
|
|
91
|
+
};
|
|
92
|
+
exports.LastPage = LastPage;
|
|
93
|
+
const MiddlePage = () => {
|
|
94
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(5);
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(Pagination_1.Pagination, { currentPage: currentPage, goPage: setCurrentPage, numberOfPages: 10, previousPageComponent: () => 'Previous', nextPageComponent: () => 'Next' }));
|
|
96
|
+
};
|
|
97
|
+
exports.MiddlePage = MiddlePage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Pill } from './Pill';
|
|
3
|
+
declare const meta: Meta<typeof Pill>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pill>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Active: Story;
|
|
8
|
+
export declare const Error: Story;
|
|
9
|
+
export declare const Success: Story;
|
|
10
|
+
export declare const Warning: Story;
|
|
11
|
+
export declare const AllVariants: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const WithLongText: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Interactive: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Combinations: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Pill.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.stories.d.ts","sourceRoot":"","sources":["../../src/Misc/Pill.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,IAAI,EAAY,MAAM,QAAQ,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAmB3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,WAAW,wDAYvB,CAAC;AAEF,eAAO,MAAM,YAAY,wDAKxB,CAAC;AAEF,eAAO,MAAM,WAAW,wDASvB,CAAC;AAEF,eAAO,MAAM,YAAY,wDAyBxB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Combinations = exports.Interactive = exports.WithLongText = exports.AllVariants = exports.Warning = exports.Success = exports.Error = exports.Active = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Pill_1 = require("./Pill");
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Pill_1.Pill,
|
|
8
|
+
title: 'Misc/Pill',
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '600px', margin: '0 auto' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
11
|
+
],
|
|
12
|
+
argTypes: {
|
|
13
|
+
type: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: [null, ...Object.values(Pill_1.PILL_TYPE)],
|
|
16
|
+
},
|
|
17
|
+
active: {
|
|
18
|
+
control: 'boolean',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.default = meta;
|
|
23
|
+
exports.Default = {
|
|
24
|
+
args: {
|
|
25
|
+
children: 'Default Pill',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
exports.Active = {
|
|
29
|
+
args: {
|
|
30
|
+
children: 'Active Pill',
|
|
31
|
+
active: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.Error = {
|
|
35
|
+
args: {
|
|
36
|
+
children: 'Error Pill',
|
|
37
|
+
type: Pill_1.PILL_TYPE.error,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
exports.Success = {
|
|
41
|
+
args: {
|
|
42
|
+
children: 'Success Pill',
|
|
43
|
+
type: Pill_1.PILL_TYPE.success,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
exports.Warning = {
|
|
47
|
+
args: {
|
|
48
|
+
children: 'Warning Pill',
|
|
49
|
+
type: Pill_1.PILL_TYPE.warning,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const AllVariants = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { children: "Default Pill" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { active: true, children: "Active Pill" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.error, children: "Error Pill" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.success, children: "Success Pill" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.warning, children: "Warning Pill" })] })] }));
|
|
53
|
+
exports.AllVariants = AllVariants;
|
|
54
|
+
const WithLongText = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { children: "This is a very long text that should wrap nicely inside the pill component" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.success, children: "This is a very long successful message that should wrap nicely" })] }));
|
|
55
|
+
exports.WithLongText = WithLongText;
|
|
56
|
+
const Interactive = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '8px' }, children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { onClick: () => alert('Clicked!'), style: { cursor: 'pointer' }, children: "Clickable Pill" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { active: true, onClick: () => alert('Active pills can be clicked too!'), style: { cursor: 'pointer' }, children: "Active Clickable" })] }));
|
|
57
|
+
exports.Interactive = Interactive;
|
|
58
|
+
const Combinations = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.error, active: true, children: "Active Error" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.success, active: true, children: "Active Success" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.warning, active: true, children: "Active Warning" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.error, style: { opacity: 0.7 }, children: "Faded Error" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.success, style: { opacity: 0.7 }, children: "Faded Success" }), (0, jsx_runtime_1.jsx)(Pill_1.Pill, { type: Pill_1.PILL_TYPE.warning, style: { opacity: 0.7 }, children: "Faded Warning" })] })] }));
|
|
59
|
+
exports.Combinations = Combinations;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Modal } from './Modal';
|
|
3
|
+
declare const meta: Meta<typeof Modal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Modal>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithActions: Story;
|
|
8
|
+
export declare const Fullscreen: Story;
|
|
9
|
+
export declare const CustomWidth: Story;
|
|
10
|
+
export declare const WithLongContent: Story;
|
|
11
|
+
export declare const MultipleActions: Story;
|
|
12
|
+
//# sourceMappingURL=Modal.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../src/Modal/Modal.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAM5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAYpC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAgBzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAqB7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultipleActions = exports.WithLongContent = exports.CustomWidth = exports.Fullscreen = exports.WithActions = 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 Modal_1 = require("./Modal");
|
|
25
|
+
const Form_1 = require("../Form");
|
|
26
|
+
const Text_1 = require("../Text");
|
|
27
|
+
const meta = {
|
|
28
|
+
component: Modal_1.Modal,
|
|
29
|
+
title: 'Modal/Modal',
|
|
30
|
+
parameters: {
|
|
31
|
+
layout: 'fullscreen',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.default = meta;
|
|
35
|
+
const ModalDemo = ({ children }) => {
|
|
36
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { padding: '24px' }, children: [(0, jsx_runtime_1.jsx)(Form_1.Button, { onClick: () => setIsOpen(true), children: "Open Modal" }), children(isOpen, setIsOpen)] }));
|
|
38
|
+
};
|
|
39
|
+
exports.Default = {
|
|
40
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { onClose: () => setIsOpen(false), children: [(0, jsx_runtime_1.jsx)(Text_1.H2, { style: { margin: 0 }, children: "Normal Modal" }), (0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "This is a normal modal with default styling." }) }), (0, jsx_runtime_1.jsx)(Form_1.Button, { onClick: () => setIsOpen(false), children: "Close" })] })) })),
|
|
41
|
+
};
|
|
42
|
+
exports.WithActions = {
|
|
43
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { onClose: () => setIsOpen(false), bodyStyle: { width: 360 }, actions: [
|
|
44
|
+
{ title: 'Cancel', onClick: () => setIsOpen(false), bold: false },
|
|
45
|
+
{ title: 'Send', onClick: () => setIsOpen(false), bold: true },
|
|
46
|
+
], children: [(0, jsx_runtime_1.jsx)(Text_1.H2, { style: { margin: 0 }, children: "Modal with actions" }), (0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "This modal has action buttons at the bottom." }) })] })) })),
|
|
47
|
+
};
|
|
48
|
+
exports.Fullscreen = {
|
|
49
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { fullscreen: true, onClose: () => setIsOpen(false), children: [(0, jsx_runtime_1.jsx)(Text_1.H1, { children: "Fullscreen Modal" }), (0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "This modal takes up the entire screen." }) }), (0, jsx_runtime_1.jsx)(Form_1.Button, { onClick: () => setIsOpen(false), children: "Close" })] })) })),
|
|
50
|
+
};
|
|
51
|
+
exports.CustomWidth = {
|
|
52
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { onClose: () => setIsOpen(false), bodyStyle: { width: 800 }, children: [(0, jsx_runtime_1.jsx)(Text_1.H2, { style: { margin: 0 }, children: "Wide Modal" }), (0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "This modal has a custom width of 800px." }) }), (0, jsx_runtime_1.jsx)(Form_1.Button, { onClick: () => setIsOpen(false), children: "Close" })] })) })),
|
|
53
|
+
};
|
|
54
|
+
exports.WithLongContent = {
|
|
55
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { onClose: () => setIsOpen(false), children: [(0, jsx_runtime_1.jsx)(Text_1.H2, { style: { margin: 0 }, children: "Modal with Long Content" }), Array.from({ length: 10 }).map((_, index) => ((0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec euismod, nisl eget ultricies ultricies, nunc nunc aliquam nunc, vitae aliquam nunc nunc vitae nunc." }) }, index))), (0, jsx_runtime_1.jsx)(Form_1.Button, { onClick: () => setIsOpen(false), children: "Close" })] })) })),
|
|
56
|
+
};
|
|
57
|
+
exports.MultipleActions = {
|
|
58
|
+
render: () => ((0, jsx_runtime_1.jsx)(ModalDemo, { children: (isOpen, setIsOpen) => isOpen && ((0, jsx_runtime_1.jsxs)(Modal_1.Modal, { onClose: () => setIsOpen(false), bodyStyle: { width: 400 }, actions: [
|
|
59
|
+
{ title: 'Delete', onClick: () => setIsOpen(false), bold: false },
|
|
60
|
+
{ title: 'Edit', onClick: () => setIsOpen(false), bold: false },
|
|
61
|
+
{ title: 'Save', onClick: () => setIsOpen(false), bold: true },
|
|
62
|
+
], children: [(0, jsx_runtime_1.jsx)(Text_1.H2, { style: { margin: 0 }, children: "Multiple Actions" }), (0, jsx_runtime_1.jsx)(Text_1.Paragraph, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { block: true, children: "This modal has multiple action buttons." }) })] })) })),
|
|
63
|
+
};
|
package/lib/Text/Heading.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from '@emotion/react';
|
|
2
2
|
import { TextProps } from './Text';
|
|
3
3
|
import { Theme } from '../Layout';
|
|
4
|
-
interface HeadingProps<T = HTMLHeadingElement> extends TextProps<T> {
|
|
4
|
+
export interface HeadingProps<T = HTMLHeadingElement> extends TextProps<T> {
|
|
5
5
|
level?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const Heading: ({ level, ...props }: HeadingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -13,5 +13,4 @@ export declare const h3Style: <T>(theme: Theme, props: HeadingProps<T>) => CSSOb
|
|
|
13
13
|
export declare const H3: (props: HeadingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const h4Style: <T>(theme: Theme, props: HeadingProps<T>) => CSSObject;
|
|
15
15
|
export declare const H4: (props: HeadingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
17
16
|
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/Text/Heading.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,SAAS,EAA6B,MAAM,QAAQ,CAAC;AAE7D,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/Text/Heading.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,SAAS,EAA6B,MAAM,QAAQ,CAAC;AAE7D,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,kBAAkB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,OAAO,wBAAuB,YAAY,qDAYtD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,SAejE,CAAC;AAEH,eAAO,MAAM,EAAE,UAAW,YAAY,qDAErC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,SAgBjE,CAAC;AAEH,eAAO,MAAM,EAAE,UAAW,YAAY,qDAErC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,SAQjE,CAAC;AAEH,eAAO,MAAM,EAAE,UAAW,YAAY,qDAErC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,SASjE,CAAC;AAEH,eAAO,MAAM,EAAE,UAAW,YAAY,qDAErC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ level, ...props }: import("./Heading").HeadingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
level: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
color: {
|
|
16
|
+
control: "color";
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
noWrap: {
|
|
20
|
+
control: "boolean";
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
textTransform: {
|
|
24
|
+
control: "select";
|
|
25
|
+
options: string[];
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
export declare const Default: Story;
|
|
33
|
+
export declare const AllHeadingLevels: Story;
|
|
34
|
+
export declare const WithCustomColor: Story;
|
|
35
|
+
export declare const NoWrapHeading: Story;
|
|
36
|
+
export declare const TransformedText: Story;
|
|
37
|
+
export declare const LongText: Story;
|
|
38
|
+
//# sourceMappingURL=Heading.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.stories.d.ts","sourceRoot":"","sources":["../../src/Text/Heading.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAIrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC"}
|