@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.
Files changed (158) hide show
  1. package/lib/Form/Button.stories.d.ts +26 -0
  2. package/lib/Form/Button.stories.d.ts.map +1 -0
  3. package/lib/Form/Button.stories.js +63 -0
  4. package/lib/Form/ButtonLink.stories.d.ts +15 -0
  5. package/lib/Form/ButtonLink.stories.d.ts.map +1 -0
  6. package/lib/Form/ButtonLink.stories.js +52 -0
  7. package/lib/Form/Checkbox.d.ts +1 -2
  8. package/lib/Form/Checkbox.d.ts.map +1 -1
  9. package/lib/Form/Checkbox.stories.d.ts +16 -0
  10. package/lib/Form/Checkbox.stories.d.ts.map +1 -0
  11. package/lib/Form/Checkbox.stories.js +35 -0
  12. package/lib/Form/CodeInput.d.ts +1 -0
  13. package/lib/Form/CodeInput.d.ts.map +1 -1
  14. package/lib/Form/CodeInput.stories.d.ts +15 -0
  15. package/lib/Form/CodeInput.stories.d.ts.map +1 -0
  16. package/lib/Form/CodeInput.stories.js +51 -0
  17. package/lib/Form/DropFileInput.stories.d.ts +13 -0
  18. package/lib/Form/DropFileInput.stories.d.ts.map +1 -0
  19. package/lib/Form/DropFileInput.stories.js +43 -0
  20. package/lib/Form/ErrorMessage.stories.d.ts +14 -0
  21. package/lib/Form/ErrorMessage.stories.d.ts.map +1 -0
  22. package/lib/Form/ErrorMessage.stories.js +23 -0
  23. package/lib/Form/Form.stories.d.ts +13 -0
  24. package/lib/Form/Form.stories.d.ts.map +1 -0
  25. package/lib/Form/Form.stories.js +23 -0
  26. package/lib/Form/IndicatorRangeInput.stories.d.ts +13 -0
  27. package/lib/Form/IndicatorRangeInput.stories.d.ts.map +1 -0
  28. package/lib/Form/IndicatorRangeInput.stories.js +51 -0
  29. package/lib/Form/Input.stories.d.ts +18 -0
  30. package/lib/Form/Input.stories.d.ts.map +1 -0
  31. package/lib/Form/Input.stories.js +56 -0
  32. package/lib/Form/InputBlock.stories.d.ts +15 -0
  33. package/lib/Form/InputBlock.stories.d.ts.map +1 -0
  34. package/lib/Form/InputBlock.stories.js +27 -0
  35. package/lib/Form/InputLabel.stories.d.ts +15 -0
  36. package/lib/Form/InputLabel.stories.d.ts.map +1 -0
  37. package/lib/Form/InputLabel.stories.js +35 -0
  38. package/lib/Form/InputSubmitCombo.stories.d.ts +15 -0
  39. package/lib/Form/InputSubmitCombo.stories.d.ts.map +1 -0
  40. package/lib/Form/InputSubmitCombo.stories.js +26 -0
  41. package/lib/Form/RangeInput.stories.d.ts +16 -0
  42. package/lib/Form/RangeInput.stories.d.ts.map +1 -0
  43. package/lib/Form/RangeInput.stories.js +62 -0
  44. package/lib/Form/RoundIconButton.stories.d.ts +15 -0
  45. package/lib/Form/RoundIconButton.stories.d.ts.map +1 -0
  46. package/lib/Form/RoundIconButton.stories.js +30 -0
  47. package/lib/Form/Select.d.ts +3 -3
  48. package/lib/Form/Select.d.ts.map +1 -1
  49. package/lib/Form/Select.js +2 -1
  50. package/lib/Form/Select.stories.d.ts +16 -0
  51. package/lib/Form/Select.stories.d.ts.map +1 -0
  52. package/lib/Form/Select.stories.js +68 -0
  53. package/lib/Form/SelectComponents.d.ts +5 -1
  54. package/lib/Form/SelectComponents.d.ts.map +1 -1
  55. package/lib/Form/SelectComponents.js +16 -1
  56. package/lib/Form/SelectComponents.styles.d.ts +5 -0
  57. package/lib/Form/SelectComponents.styles.d.ts.map +1 -0
  58. package/lib/Form/SelectComponents.styles.js +38 -0
  59. package/lib/Form/ShakeBox.stories.d.ts +15 -0
  60. package/lib/Form/ShakeBox.stories.d.ts.map +1 -0
  61. package/lib/Form/ShakeBox.stories.js +54 -0
  62. package/lib/Form/Switch.stories.d.ts +17 -0
  63. package/lib/Form/Switch.stories.d.ts.map +1 -0
  64. package/lib/Form/Switch.stories.js +66 -0
  65. package/lib/Form/TextArea.stories.d.ts +16 -0
  66. package/lib/Form/TextArea.stories.d.ts.map +1 -0
  67. package/lib/Form/TextArea.stories.js +35 -0
  68. package/lib/Form/Tooltip.d.ts +1 -2
  69. package/lib/Form/Tooltip.d.ts.map +1 -1
  70. package/lib/Form/Tooltip.stories.d.ts +17 -0
  71. package/lib/Form/Tooltip.stories.d.ts.map +1 -0
  72. package/lib/Form/Tooltip.stories.js +46 -0
  73. package/lib/Icon/SVGIcon.stories.d.ts +12 -0
  74. package/lib/Icon/SVGIcon.stories.d.ts.map +1 -0
  75. package/lib/Icon/SVGIcon.stories.js +60 -0
  76. package/lib/Identity/Animation.d.ts +8 -8
  77. package/lib/Identity/Animation.d.ts.map +1 -1
  78. package/lib/Identity/Animation.js +7 -30
  79. package/lib/Identity/Animation.stories.d.ts +6 -0
  80. package/lib/Identity/Animation.stories.d.ts.map +1 -0
  81. package/lib/Identity/Animation.stories.js +73 -0
  82. package/lib/Identity/Avatar.stories.d.ts +13 -0
  83. package/lib/Identity/Avatar.stories.d.ts.map +1 -0
  84. package/lib/Identity/Avatar.stories.js +64 -0
  85. package/lib/Identity/AvatarGrid.stories.d.ts +12 -0
  86. package/lib/Identity/AvatarGrid.stories.d.ts.map +1 -0
  87. package/lib/Identity/AvatarGrid.stories.js +90 -0
  88. package/lib/Identity/Logo.stories.d.ts +12 -0
  89. package/lib/Identity/Logo.stories.d.ts.map +1 -0
  90. package/lib/Identity/Logo.stories.js +62 -0
  91. package/lib/Identity/colors-v2.stories.d.ts +12 -0
  92. package/lib/Identity/colors-v2.stories.d.ts.map +1 -0
  93. package/lib/Identity/colors-v2.stories.js +78 -0
  94. package/lib/Identity/colors.stories.d.ts +10 -0
  95. package/lib/Identity/colors.stories.d.ts.map +1 -0
  96. package/lib/Identity/colors.stories.js +75 -0
  97. package/lib/Layout/Box.stories.d.ts +12 -0
  98. package/lib/Layout/Box.stories.d.ts.map +1 -0
  99. package/lib/Layout/Box.stories.js +58 -0
  100. package/lib/Layout/Column.stories.d.ts +10 -0
  101. package/lib/Layout/Column.stories.d.ts.map +1 -0
  102. package/lib/Layout/Column.stories.js +40 -0
  103. package/lib/Layout/Container.stories.d.ts +10 -0
  104. package/lib/Layout/Container.stories.d.ts.map +1 -0
  105. package/lib/Layout/Container.stories.js +38 -0
  106. package/lib/Layout/headerMenu/HeaderMenu.stories.d.ts +10 -0
  107. package/lib/Layout/headerMenu/HeaderMenu.stories.d.ts.map +1 -0
  108. package/lib/Layout/headerMenu/HeaderMenu.stories.js +49 -0
  109. package/lib/Menu/TabBar.stories.d.ts +11 -0
  110. package/lib/Menu/TabBar.stories.d.ts.map +1 -0
  111. package/lib/Menu/TabBar.stories.js +66 -0
  112. package/lib/Misc/ButtonGroup.stories.d.ts +10 -0
  113. package/lib/Misc/ButtonGroup.stories.d.ts.map +1 -0
  114. package/lib/Misc/ButtonGroup.stories.js +28 -0
  115. package/lib/Misc/IconButton.stories.d.ts +14 -0
  116. package/lib/Misc/IconButton.stories.d.ts.map +1 -0
  117. package/lib/Misc/IconButton.stories.js +59 -0
  118. package/lib/Misc/Loading.stories.d.ts +15 -0
  119. package/lib/Misc/Loading.stories.d.ts.map +1 -0
  120. package/lib/Misc/Loading.stories.js +47 -0
  121. package/lib/Misc/Pagination.stories.d.ts +14 -0
  122. package/lib/Misc/Pagination.stories.d.ts.map +1 -0
  123. package/lib/Misc/Pagination.stories.js +97 -0
  124. package/lib/Misc/Pill.stories.d.ts +15 -0
  125. package/lib/Misc/Pill.stories.d.ts.map +1 -0
  126. package/lib/Misc/Pill.stories.js +59 -0
  127. package/lib/Modal/Modal.stories.d.ts +12 -0
  128. package/lib/Modal/Modal.stories.d.ts.map +1 -0
  129. package/lib/Modal/Modal.stories.js +63 -0
  130. package/lib/Text/Heading.d.ts +1 -2
  131. package/lib/Text/Heading.d.ts.map +1 -1
  132. package/lib/Text/Heading.stories.d.ts +38 -0
  133. package/lib/Text/Heading.stories.d.ts.map +1 -0
  134. package/lib/Text/Heading.stories.js +67 -0
  135. package/lib/Text/Label.d.ts.map +1 -1
  136. package/lib/Text/Label.js +6 -2
  137. package/lib/Text/Label.stories.d.ts +403 -0
  138. package/lib/Text/Label.stories.d.ts.map +1 -0
  139. package/lib/Text/Label.stories.js +37 -0
  140. package/lib/Text/Line.stories.d.ts +19 -0
  141. package/lib/Text/Line.stories.d.ts.map +1 -0
  142. package/lib/Text/Line.stories.js +43 -0
  143. package/lib/Text/Link.stories.d.ts +27 -0
  144. package/lib/Text/Link.stories.d.ts.map +1 -0
  145. package/lib/Text/Link.stories.js +75 -0
  146. package/lib/Text/Paragraph.stories.d.ts +15 -0
  147. package/lib/Text/Paragraph.stories.d.ts.map +1 -0
  148. package/lib/Text/Paragraph.stories.js +30 -0
  149. package/lib/Text/Text.stories.d.ts +32 -0
  150. package/lib/Text/Text.stories.d.ts.map +1 -0
  151. package/lib/Text/Text.stories.js +59 -0
  152. package/lib/Text/TextLink.stories.d.ts +20 -0
  153. package/lib/Text/TextLink.stories.d.ts.map +1 -0
  154. package/lib/Text/TextLink.stories.js +37 -0
  155. package/lib/Text/Title.stories.d.ts +24 -0
  156. package/lib/Text/Title.stories.d.ts.map +1 -0
  157. package/lib/Text/Title.stories.js +63 -0
  158. 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
+ };
@@ -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;
@@ -23,7 +23,7 @@ interface SelectProps<IsMulti extends boolean, Group extends GroupBase<Option>>
23
23
  isMulti?: IsMulti;
24
24
  isSearchable?: boolean;
25
25
  overlayMenu?: boolean;
26
+ menuListHeading?: string;
26
27
  }
27
- 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, ...props }: SelectProps<IsMulti, Group>) => import("@emotion/react/jsx-runtime").JSX.Element;
28
- export {};
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
29
  //# sourceMappingURL=Select.d.ts.map
@@ -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;AAiBvF,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,UAAU,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CAC5E,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;CACvB;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,OAAO,UAAU,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,kLAgBpF,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,qDAoE7B,CAAC"}
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"}
@@ -11,7 +11,7 @@ const InputLabel_1 = require("./InputLabel");
11
11
  const SelectComponents_1 = require("./SelectComponents");
12
12
  const SelectStyles_1 = require("./SelectStyles");
13
13
  const enums_1 = require("../types/enums");
14
- const Select = ({ id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, menuCSS = {}, markInvalid = false, required = false, isSearchable = false, overlayMenu = true, ...props }) => {
14
+ const Select = ({ id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, menuCSS = {}, markInvalid = false, required = false, isSearchable = false, overlayMenu = true, menuListHeading, ...props }) => {
15
15
  const theme = (0, react_1.useTheme)();
16
16
  const hasError = !!error;
17
17
  return ((0, jsx_runtime_1.jsxs)("div", {
@@ -34,6 +34,7 @@ const Select = ({ id, label, error, helperText, disabled = false, dataUieName, o
34
34
  Menu: (0, SelectComponents_1.Menu)(dataUieName, menuCSS),
35
35
  ValueContainer: SelectComponents_1.ValueContainer,
36
36
  IndicatorsContainer: SelectComponents_1.IndicatorsContainer,
37
+ ...(menuListHeading && { MenuList: (0, SelectComponents_1.MenuList)(menuListHeading, dataUieName) }),
37
38
  }, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: isSearchable, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options, ...props }), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
38
39
  fontSize: theme.fontSizes.small,
39
40
  fontWeight: 400,
@@ -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
+ };
@@ -1,11 +1,15 @@
1
1
  import { CSSObject } from '@emotion/react';
2
- import { ContainerProps, DropdownIndicatorProps, OptionProps, ValueContainerProps, IndicatorsContainerProps, MenuProps, GroupBase, OptionsOrGroups } from 'react-select';
2
+ import { ContainerProps, DropdownIndicatorProps, OptionProps, ValueContainerProps, IndicatorsContainerProps, MenuProps, GroupBase, OptionsOrGroups, MenuListProps } from 'react-select';
3
3
  import { Option } from './Select';
4
4
  export declare const SelectContainer: (props: ContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
5
  export declare const isGroup: (options: OptionsOrGroups<Option, GroupBase<Option>>) => options is GroupBase<Option>[];
6
6
  export declare const DropdownIndicator: (props: DropdownIndicatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  export declare const CustomOption: (dataUieName: string) => (props: OptionProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
8
8
  export declare const Menu: (dataUieName: string, css?: CSSObject) => (props: MenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export declare const MenuList: {
10
+ (menuListHeading: string, dataUieName: string): (props: MenuListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
9
13
  export declare const renderValue: (value: any) => any;
10
14
  export declare const ValueContainer: ({ children, ...restProps }: ValueContainerProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
11
15
  export declare const IndicatorsContainer: ({ children, ...restProps }: IndicatorsContainerProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,SAAS,EACT,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAOhC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,KAAG,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,EAEzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,WAAW,CAAC,MAAM,CAAC,qDAsD/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,QAAQ,SAAS,aAAa,SAAS,qDAc9E,CAAC;AAEF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,mBAAmB,CAAC,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,wBAAwB,CAAC,MAAM,CAAC,qDAW7F,CAAC"}
1
+ {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAShC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,KAAG,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,EAEzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,WAAW,CAAC,MAAM,CAAC,qDAsD/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,QAAQ,SAAS,aAAa,SAAS,qDAc9E,CAAC;AAGF,eAAO,MAAM,QAAQ;sBAAqB,MAAM,eAAe,MAAM,WAAa,aAAa;;CA0B9F,CAAC;AAGF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,mBAAmB,CAAC,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,wBAAwB,CAAC,MAAM,CAAC,qDAW7F,CAAC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndicatorsContainer = exports.ValueContainer = exports.renderValue = exports.Menu = exports.CustomOption = exports.DropdownIndicator = exports.isGroup = exports.SelectContainer = void 0;
3
+ exports.IndicatorsContainer = exports.ValueContainer = exports.renderValue = exports.MenuList = exports.Menu = exports.CustomOption = exports.DropdownIndicator = exports.isGroup = exports.SelectContainer = void 0;
4
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
5
  const react_select_1 = require("react-select");
6
+ const SelectComponents_styles_1 = require("./SelectComponents.styles");
6
7
  const Icon_1 = require("../Icon");
7
8
  const ArrowDown_1 = require("../Icon/ArrowDown");
8
9
  const enums_1 = require("../types/enums");
@@ -53,6 +54,20 @@ const Menu = (dataUieName, css) => (props) => {
53
54
  }), children: children }) }));
54
55
  };
55
56
  exports.Menu = Menu;
57
+ // eslint-disable-next-line react/display-name
58
+ const MenuList = (menuListHeading, dataUieName) => (props) => {
59
+ const { selectProps, children } = props;
60
+ const handleClose = () => {
61
+ if (selectProps && selectProps.onMenuClose) {
62
+ selectProps.onMenuClose();
63
+ }
64
+ };
65
+ return ((0, jsx_runtime_1.jsx)(react_select_1.components.MenuList, { ...props, children: (0, jsx_runtime_1.jsxs)("div", { ...(dataUieName && {
66
+ 'data-uie-name': `menu-list-${dataUieName}`,
67
+ }), children: [(0, jsx_runtime_1.jsxs)("div", { css: (theme) => (0, SelectComponents_styles_1.menuListHeadingContainerStyles)(theme), children: [menuListHeading, (0, jsx_runtime_1.jsx)("button", { onClick: handleClose, css: SelectComponents_styles_1.menuListCloseButtonStyles, "aria-label": `Close: ${menuListHeading}`, children: (0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, { width: 16, height: 16 }) })] }), children] }) }));
68
+ };
69
+ exports.MenuList = MenuList;
70
+ exports.MenuList.displayName = 'MenuList';
56
71
  const renderValue = value => {
57
72
  if (Array.isArray(value)) {
58
73
  const currentValue = (i) => value[i].props.children;
@@ -0,0 +1,5 @@
1
+ import { CSSObject } from '@emotion/react';
2
+ import { Theme } from '../Theme/Theme';
3
+ export declare const menuListHeadingContainerStyles: (theme: Theme) => CSSObject;
4
+ export declare const menuListCloseButtonStyles: CSSObject;
5
+ //# sourceMappingURL=SelectComponents.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectComponents.styles.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,eAAO,MAAM,8BAA8B,UAAW,KAAK,KAAG,SAO5D,CAAC;AAEH,eAAO,MAAM,yBAAyB,EAAE,SAOvC,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /*
3
+ * Wire
4
+ * Copyright (C) 2024 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.menuListCloseButtonStyles = exports.menuListHeadingContainerStyles = void 0;
22
+ const menuListHeadingContainerStyles = (theme) => ({
23
+ display: 'flex',
24
+ justifyContent: 'space-between',
25
+ alignItems: 'center',
26
+ fontSize: theme.fontSizes.medium,
27
+ fontWeight: 600,
28
+ padding: '8px 16px',
29
+ });
30
+ exports.menuListHeadingContainerStyles = menuListHeadingContainerStyles;
31
+ exports.menuListCloseButtonStyles = {
32
+ background: 'transparent',
33
+ border: 'none',
34
+ cursor: 'pointer',
35
+ padding: 0,
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ };
@@ -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"}