@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,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Invalid = exports.WithSubmitCombo = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Input_1 = require("./Input");
|
|
6
|
+
const InputBlock_1 = require("./InputBlock");
|
|
7
|
+
const InputSubmitCombo_1 = require("./InputSubmitCombo");
|
|
8
|
+
const RoundIconButton_1 = require("./RoundIconButton");
|
|
9
|
+
const Icon_1 = require("../Icon");
|
|
10
|
+
const meta = {
|
|
11
|
+
title: 'Form/InputBlock',
|
|
12
|
+
component: InputBlock_1.InputBlock,
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: 'centered',
|
|
15
|
+
},
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
};
|
|
18
|
+
exports.default = meta;
|
|
19
|
+
exports.Default = {
|
|
20
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputBlock_1.InputBlock, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "First input" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Second input" })] })),
|
|
21
|
+
};
|
|
22
|
+
exports.WithSubmitCombo = {
|
|
23
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputBlock_1.InputBlock, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Regular input" }), (0, jsx_runtime_1.jsxs)(InputSubmitCombo_1.InputSubmitCombo, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Input with submit" }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { type: "submit", children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}) })] })] })),
|
|
24
|
+
};
|
|
25
|
+
exports.Invalid = {
|
|
26
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputBlock_1.InputBlock, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Invalid input", markInvalid: true }), (0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Another invalid input", markInvalid: true })] })),
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FC<import("./InputLabel").InputLabelProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithInput: Story;
|
|
14
|
+
export declare const Invalid: Story;
|
|
15
|
+
//# sourceMappingURL=InputLabel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputLabel.stories.d.ts","sourceRoot":"","sources":["../../src/Form/InputLabel.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAKrD,QAAA,MAAM,IAAI;;;;;;;CAOyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Invalid = exports.WithInput = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Input_1 = require("./Input");
|
|
6
|
+
const InputLabel_1 = require("./InputLabel");
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Form/InputLabel',
|
|
9
|
+
component: InputLabel_1.InputLabel,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
};
|
|
15
|
+
exports.default = meta;
|
|
16
|
+
exports.Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'Label Text',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
exports.WithInput = {
|
|
22
|
+
args: {
|
|
23
|
+
children: 'Email address',
|
|
24
|
+
htmlFor: 'example-input',
|
|
25
|
+
},
|
|
26
|
+
decorators: [
|
|
27
|
+
Story => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Story, {}), (0, jsx_runtime_1.jsx)(Input_1.Input, { id: "example-input", type: "email", placeholder: "Enter email" })] })),
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
exports.Invalid = {
|
|
31
|
+
args: {
|
|
32
|
+
children: 'Invalid Label',
|
|
33
|
+
markInvalid: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, ...props }: import("./InputSubmitCombo").InputSubmitComboProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithMultipleButtons: Story;
|
|
14
|
+
export declare const Invalid: Story;
|
|
15
|
+
//# sourceMappingURL=InputSubmitCombo.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputSubmitCombo.stories.d.ts","sourceRoot":"","sources":["../../src/Form/InputSubmitCombo.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAQrD,QAAA,MAAM,IAAI;;;;;;;CAO+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAYjC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Invalid = exports.WithMultipleButtons = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Input_1 = require("./Input");
|
|
6
|
+
const InputSubmitCombo_1 = require("./InputSubmitCombo");
|
|
7
|
+
const RoundIconButton_1 = require("./RoundIconButton");
|
|
8
|
+
const Icon_1 = require("../Icon");
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Form/InputSubmitCombo',
|
|
11
|
+
component: InputSubmitCombo_1.InputSubmitCombo,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
};
|
|
17
|
+
exports.default = meta;
|
|
18
|
+
exports.Default = {
|
|
19
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputSubmitCombo_1.InputSubmitCombo, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Type a message...", name: "message" }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { type: "submit", children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}) })] })),
|
|
20
|
+
};
|
|
21
|
+
exports.WithMultipleButtons = {
|
|
22
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputSubmitCombo_1.InputSubmitCombo, { children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Type a message...", name: "message" }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.AttachmentIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { type: "submit", children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}) })] })),
|
|
23
|
+
};
|
|
24
|
+
exports.Invalid = {
|
|
25
|
+
render: () => ((0, jsx_runtime_1.jsxs)(InputSubmitCombo_1.InputSubmitCombo, { markInvalid: true, children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Invalid input", name: "message", markInvalid: true }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { type: "submit", children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}) })] })),
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./RangeInput").RangeInputProps<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithSteps: Story;
|
|
14
|
+
export declare const Disabled: Story;
|
|
15
|
+
export declare const CustomRange: Story;
|
|
16
|
+
//# sourceMappingURL=RangeInput.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeInput.stories.d.ts","sourceRoot":"","sources":["../../src/Form/RangeInput.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAIrD,QAAA,MAAM,IAAI;;;;;;;CAOyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.CustomRange = exports.Disabled = exports.WithSteps = exports.Default = void 0;
|
|
22
|
+
const RangeInput_1 = require("./RangeInput");
|
|
23
|
+
const meta = {
|
|
24
|
+
title: 'Form/RangeInput',
|
|
25
|
+
component: RangeInput_1.RangeInput,
|
|
26
|
+
parameters: {
|
|
27
|
+
layout: 'centered',
|
|
28
|
+
},
|
|
29
|
+
tags: ['autodocs'],
|
|
30
|
+
};
|
|
31
|
+
exports.default = meta;
|
|
32
|
+
exports.Default = {
|
|
33
|
+
args: {
|
|
34
|
+
defaultValue: 50,
|
|
35
|
+
min: 0,
|
|
36
|
+
max: 100,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
exports.WithSteps = {
|
|
40
|
+
args: {
|
|
41
|
+
defaultValue: 5,
|
|
42
|
+
min: 0,
|
|
43
|
+
max: 10,
|
|
44
|
+
step: 1,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
exports.Disabled = {
|
|
48
|
+
args: {
|
|
49
|
+
defaultValue: 50,
|
|
50
|
+
min: 0,
|
|
51
|
+
max: 100,
|
|
52
|
+
disabled: true,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
exports.CustomRange = {
|
|
56
|
+
args: {
|
|
57
|
+
defaultValue: 0,
|
|
58
|
+
min: -50,
|
|
59
|
+
max: 50,
|
|
60
|
+
step: 10,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FC<import("./RoundIconButton").RoundIconButtonProps<HTMLButtonElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const IconGallery: Story;
|
|
14
|
+
export declare const Disabled: Story;
|
|
15
|
+
//# sourceMappingURL=RoundIconButton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoundIconButton.stories.d.ts","sourceRoot":"","sources":["../../src/Form/RoundIconButton.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAoBrD,QAAA,MAAM,IAAI;;;;;;;CAO8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAyCzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Disabled = exports.IconGallery = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const RoundIconButton_1 = require("./RoundIconButton");
|
|
6
|
+
const Icon_1 = require("../Icon");
|
|
7
|
+
const Identity_1 = require("../Identity");
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Form/RoundIconButton',
|
|
10
|
+
component: RoundIconButton_1.RoundIconButton,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
tags: ['autodocs'],
|
|
15
|
+
};
|
|
16
|
+
exports.default = meta;
|
|
17
|
+
exports.Default = {
|
|
18
|
+
args: {
|
|
19
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.IconGallery = {
|
|
23
|
+
render: () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '8px', flexWrap: 'wrap' }, children: [(0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.AttachmentIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.CheckIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.GifIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.ImageIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.PingIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.PlaneIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.ProfileIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.TeamIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.TimedIcon, {}) }), (0, jsx_runtime_1.jsx)(RoundIconButton_1.RoundIconButton, { children: (0, jsx_runtime_1.jsx)(Icon_1.TrashIcon, { color: Identity_1.COLOR.RED }) })] })),
|
|
24
|
+
};
|
|
25
|
+
exports.Disabled = {
|
|
26
|
+
args: {
|
|
27
|
+
children: (0, jsx_runtime_1.jsx)(Icon_1.ArrowIcon, {}),
|
|
28
|
+
disabled: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
package/lib/Form/Select.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type Option = {
|
|
|
8
8
|
description?: string;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
interface SelectProps<IsMulti extends boolean, Group extends GroupBase<Option>> extends StateManagerProps<Option, IsMulti, Group> {
|
|
11
|
+
export interface SelectProps<IsMulti extends boolean, Group extends GroupBase<Option>> extends StateManagerProps<Option, IsMulti, Group> {
|
|
12
12
|
id: string;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
dataUieName: string;
|
|
@@ -26,5 +26,4 @@ interface SelectProps<IsMulti extends boolean, Group extends GroupBase<Option>>
|
|
|
26
26
|
menuListHeading?: string;
|
|
27
27
|
}
|
|
28
28
|
export declare const Select: <IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id, label, error, helperText, disabled, dataUieName, options, isMulti, wrapperCSS, menuCSS, markInvalid, required, isSearchable, overlayMenu, menuListHeading, ...props }: SelectProps<IsMulti, Group>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
30
29
|
//# sourceMappingURL=Select.d.ts.map
|
package/lib/Form/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAkBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAkBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CACnF,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,OAAO,UAAU,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,mMAiBpF,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,qDAqE7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: <IsMulti extends boolean = false, Group extends import("react-select").GroupBase<import("./Select").Option> = import("react-select").GroupBase<import("./Select").Option>>({ id, label, error, helperText, disabled, dataUieName, options, isMulti, wrapperCSS, menuCSS, markInvalid, required, isSearchable, overlayMenu, menuListHeading, ...props }: import("./Select").SelectProps<IsMulti, Group>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithLabel: Story;
|
|
14
|
+
export declare const Invalid: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../src/Form/Select.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAWrD,QAAA,MAAM,IAAI;;;;;;;CAOqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Disabled = exports.Invalid = exports.WithLabel = exports.Default = void 0;
|
|
22
|
+
const Select_1 = require("./Select");
|
|
23
|
+
const options = [
|
|
24
|
+
{ value: '', label: 'Select an option' },
|
|
25
|
+
{ value: '1', label: 'Option 1' },
|
|
26
|
+
{ value: '2', label: 'Option 2' },
|
|
27
|
+
{ value: '3', label: 'Option 3' },
|
|
28
|
+
];
|
|
29
|
+
const meta = {
|
|
30
|
+
title: 'Form/Select',
|
|
31
|
+
component: Select_1.Select,
|
|
32
|
+
parameters: {
|
|
33
|
+
layout: 'centered',
|
|
34
|
+
},
|
|
35
|
+
tags: ['autodocs'],
|
|
36
|
+
};
|
|
37
|
+
exports.default = meta;
|
|
38
|
+
exports.Default = {
|
|
39
|
+
args: {
|
|
40
|
+
id: 'default-select',
|
|
41
|
+
dataUieName: 'default-select',
|
|
42
|
+
options,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
exports.WithLabel = {
|
|
46
|
+
args: {
|
|
47
|
+
id: 'select-example',
|
|
48
|
+
dataUieName: 'select-with-label',
|
|
49
|
+
options,
|
|
50
|
+
label: 'Choose an option',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
exports.Invalid = {
|
|
54
|
+
args: {
|
|
55
|
+
id: 'invalid-select',
|
|
56
|
+
dataUieName: 'invalid-select',
|
|
57
|
+
options,
|
|
58
|
+
markInvalid: true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
exports.Disabled = {
|
|
62
|
+
args: {
|
|
63
|
+
id: 'disabled-select',
|
|
64
|
+
dataUieName: 'disabled-select',
|
|
65
|
+
options,
|
|
66
|
+
disabled: true,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ShakeBoxRef } from './ShakeBox';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<import("./ShakeBox").ShakeBoxProps & import("react").RefAttributes<ShakeBoxRef>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithForm: Story;
|
|
15
|
+
//# sourceMappingURL=ShakeBox.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShakeBox.stories.d.ts","sourceRoot":"","sources":["../../src/Form/ShakeBox.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAIrD,OAAO,EAAW,WAAW,EAAC,MAAM,YAAY,CAAC;AAEjD,QAAA,MAAM,IAAI;;;;;;;CAOuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAsBnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAsBF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WithForm = 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 Button_1 = require("./Button");
|
|
25
|
+
const Input_1 = require("./Input");
|
|
26
|
+
const ShakeBox_1 = require("./ShakeBox");
|
|
27
|
+
const meta = {
|
|
28
|
+
title: 'Form/ShakeBox',
|
|
29
|
+
component: ShakeBox_1.ShakeBox,
|
|
30
|
+
parameters: {
|
|
31
|
+
layout: 'centered',
|
|
32
|
+
},
|
|
33
|
+
tags: ['autodocs'],
|
|
34
|
+
};
|
|
35
|
+
exports.default = meta;
|
|
36
|
+
const DefaultStory = () => {
|
|
37
|
+
const ref = (0, react_1.useRef)(null);
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ShakeBox_1.ShakeBox, { ref: ref, children: (0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Type something..." }) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: () => {
|
|
39
|
+
ref.current?.shake();
|
|
40
|
+
}, style: { marginTop: '16px' }, children: "Shake Input" })] }));
|
|
41
|
+
};
|
|
42
|
+
exports.Default = {
|
|
43
|
+
render: () => (0, jsx_runtime_1.jsx)(DefaultStory, {}),
|
|
44
|
+
};
|
|
45
|
+
const FormStory = () => {
|
|
46
|
+
const ref = (0, react_1.useRef)(null);
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(ShakeBox_1.ShakeBox, { ref: ref, children: (0, jsx_runtime_1.jsxs)("form", { onSubmit: event => {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
ref.current?.shake();
|
|
50
|
+
}, children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { placeholder: "Required field", required: true }), (0, jsx_runtime_1.jsx)(Button_1.Button, { type: "submit", style: { marginTop: '16px' }, children: "Submit to shake" })] }) }));
|
|
51
|
+
};
|
|
52
|
+
exports.WithForm = {
|
|
53
|
+
render: () => (0, jsx_runtime_1.jsx)(FormStory, {}),
|
|
54
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./Switch").SwitchProps<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
render: ({ checked, disabled, ...args }: Omit<import("./Switch").SwitchProps<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Checked: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
export declare const DisabledChecked: Story;
|
|
17
|
+
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../src/Form/Switch.stories.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAcrD,QAAA,MAAM,IAAI;;;;;;;;CAQqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DisabledChecked = exports.Disabled = exports.Checked = 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 Switch_1 = require("./Switch");
|
|
25
|
+
const DefaultStory = ({ checked, disabled }) => {
|
|
26
|
+
const [isChecked, setIsChecked] = (0, react_1.useState)(checked);
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(Switch_1.Switch, { checked: isChecked, disabled: disabled, onToggle: () => setIsChecked(!isChecked) });
|
|
28
|
+
};
|
|
29
|
+
const meta = {
|
|
30
|
+
title: 'Form/Switch',
|
|
31
|
+
component: Switch_1.Switch,
|
|
32
|
+
parameters: {
|
|
33
|
+
layout: 'centered',
|
|
34
|
+
},
|
|
35
|
+
tags: ['autodocs'],
|
|
36
|
+
render: ({ checked, disabled, ...args }) => (0, jsx_runtime_1.jsx)(DefaultStory, { ...args, checked: checked, disabled: disabled }),
|
|
37
|
+
};
|
|
38
|
+
exports.default = meta;
|
|
39
|
+
exports.Default = {
|
|
40
|
+
args: {
|
|
41
|
+
checked: false,
|
|
42
|
+
disabled: false,
|
|
43
|
+
onToggle: () => { },
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
exports.Checked = {
|
|
47
|
+
args: {
|
|
48
|
+
checked: true,
|
|
49
|
+
disabled: false,
|
|
50
|
+
onToggle: () => { },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
exports.Disabled = {
|
|
54
|
+
args: {
|
|
55
|
+
checked: false,
|
|
56
|
+
disabled: true,
|
|
57
|
+
onToggle: () => { },
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
exports.DisabledChecked = {
|
|
61
|
+
args: {
|
|
62
|
+
checked: true,
|
|
63
|
+
disabled: true,
|
|
64
|
+
onToggle: () => { },
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./TextArea").TextAreaProps<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithLabel: Story;
|
|
14
|
+
export declare const Invalid: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
//# sourceMappingURL=TextArea.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../src/Form/TextArea.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAKrD,QAAA,MAAM,IAAI;;;;;;;CAOuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Disabled = exports.Invalid = exports.WithLabel = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const InputLabel_1 = require("./InputLabel");
|
|
6
|
+
const TextArea_1 = require("./TextArea");
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Form/TextArea',
|
|
9
|
+
component: TextArea_1.TextArea,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
};
|
|
15
|
+
exports.default = meta;
|
|
16
|
+
exports.Default = {
|
|
17
|
+
args: {
|
|
18
|
+
placeholder: 'Enter your message...',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
exports.WithLabel = {
|
|
22
|
+
render: () => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: "textarea-example", children: "Message" }), (0, jsx_runtime_1.jsx)(TextArea_1.TextArea, { id: "textarea-example", placeholder: "Type your message here..." })] })),
|
|
23
|
+
};
|
|
24
|
+
exports.Invalid = {
|
|
25
|
+
args: {
|
|
26
|
+
placeholder: 'Invalid input...',
|
|
27
|
+
markInvalid: true,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
exports.Disabled = {
|
|
31
|
+
args: {
|
|
32
|
+
placeholder: 'Disabled textarea...',
|
|
33
|
+
disabled: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
package/lib/Form/Tooltip.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
-
interface TooltipProps<T = HTMLDivElement> extends HTMLProps<T> {
|
|
2
|
+
export interface TooltipProps<T = HTMLDivElement> extends HTMLProps<T> {
|
|
3
3
|
body: ReactNode;
|
|
4
4
|
selector?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const Tooltip: ({ children, ...props }: TooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
7
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Form/Tooltip.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAA0B,SAAS,EAAmB,MAAM,OAAO,CAAC;AAqJrF,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Form/Tooltip.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAA0B,SAAS,EAAmB,MAAM,OAAO,CAAC;AAqJrF,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,cAAc,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACpE,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,eAAO,MAAM,OAAO,2BAA0B,YAAY,qDAmCzD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, ...props }: import("./Tooltip").TooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithInput: Story;
|
|
14
|
+
export declare const CustomPosition: Story;
|
|
15
|
+
export declare const LongContent: Story;
|
|
16
|
+
export declare const WithMarkup: Story;
|
|
17
|
+
//# sourceMappingURL=Tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../src/Form/Tooltip.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAMrD,QAAA,MAAM,IAAI;;;;;;;CAOsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC"}
|