@wireapp/react-ui-kit 9.52.0 → 9.53.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.d.ts +1 -1
- package/lib/Form/Button.d.ts.map +1 -1
- package/lib/Form/Button.js +3 -2
- package/lib/Form/Button.stories.d.ts +1 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +3 -2
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +2 -2
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.js +6 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.js +2 -20
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/Breadcrumbs.stories.js +14 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts +2 -0
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.js +1 -19
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts +1 -0
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.d.ts.map +1 -1
- package/lib/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.js +6 -1
- package/lib/Misc/ButtonGroup.d.ts +1 -1
- package/lib/Misc/ButtonGroup.d.ts.map +1 -1
- package/lib/Misc/ButtonGroup.js +23 -3
- package/lib/Misc/IconButton.d.ts +1 -1
- package/lib/Misc/IconButton.d.ts.map +1 -1
- package/lib/Misc/IconButton.js +21 -2
- package/lib/Modal/DropdownMenu/DropdownMenu.js +1 -1
- package/lib/Modal/DropdownMenu/DropdownMenu.stories.d.ts +2 -1
- package/lib/Modal/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/lib/Modal/DropdownMenu/DropdownMenu.stories.js +8 -6
- package/package.json +2 -2
package/lib/Form/Button.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export interface ButtonProps<T = HTMLButtonElement> extends TextProps<T> {
|
|
|
16
16
|
showLoading?: boolean;
|
|
17
17
|
isActive?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const Button: (
|
|
19
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
20
|
export declare const filterButtonProps: (props: ButtonProps) => Object;
|
|
21
21
|
//# sourceMappingURL=Button.d.ts.map
|
package/lib/Form/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Form/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Form/Button.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAC,SAAS,EAAkB,MAAM,SAAS,CAAC;AAGnD,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,2IAMlB,CAAC;AAIF,eAAO,MAAM,iBAAiB,UAAW,WAAW,WAEnD,CAAC"}
|
package/lib/Form/Button.js
CHANGED
|
@@ -20,6 +20,7 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
20
20
|
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
+
const react_1 = require("react");
|
|
23
24
|
const Button_styles_1 = require("./Button.styles");
|
|
24
25
|
const Identity_1 = require("../Identity");
|
|
25
26
|
const Misc_1 = require("../Misc");
|
|
@@ -34,8 +35,8 @@ var ButtonVariant;
|
|
|
34
35
|
ButtonVariant["SEND"] = "send";
|
|
35
36
|
ButtonVariant["CANCEL"] = "cancel";
|
|
36
37
|
})(ButtonVariant || (exports.ButtonVariant = ButtonVariant = {}));
|
|
37
|
-
|
|
38
|
-
exports.Button = Button;
|
|
38
|
+
exports.Button = (0, react_1.forwardRef)(({ showLoading, children, loadingColor = Identity_1.COLOR.WHITE, ...props }, ref) => ((0, jsx_runtime_1.jsx)("button", { ref: ref, css: (theme) => (0, Button_styles_1.buttonStyle)(theme, props), ...(0, exports.filterButtonProps)(props), children: showLoading ? (0, jsx_runtime_1.jsx)(Misc_1.Loading, { size: 30, color: loadingColor, style: { display: 'flex', margin: 'auto' } }) : children })));
|
|
39
|
+
exports.Button.displayName = 'Button';
|
|
39
40
|
const filterButtonProps = (props) => {
|
|
40
41
|
return (0, util_1.filterProps)((0, Text_1.filterTextProps)(props), ['backgroundColor', 'noCapital']);
|
|
41
42
|
};
|
|
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { ButtonVariant } from './Button';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./Button").ButtonProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
1
|
+
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
2
2
|
interface BreadcrumbItemProps {
|
|
3
3
|
name: string;
|
|
4
|
+
icon?: ReactNode;
|
|
4
5
|
isActive: boolean;
|
|
5
6
|
onClick: (event: ReactMouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
6
7
|
}
|
|
7
|
-
export declare const BreadcrumbItem: ({ name, isActive, onClick }: BreadcrumbItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const BreadcrumbItem: ({ name, icon, isActive, onClick }: BreadcrumbItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=BreadcrumbItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,UAAU,IAAI,eAAe,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,UAAU,IAAI,eAAe,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAI/D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAC1E;AAED,eAAO,MAAM,cAAc,sCAAqC,mBAAmB,qDAgBlF,CAAC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BreadcrumbItem = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const BreadcrumbItem_styles_1 = require("./BreadcrumbItem.styles");
|
|
6
|
-
const BreadcrumbItem = ({ name, isActive, onClick }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("li", { css: BreadcrumbItem_styles_1.listItemStyles, children: isActive ? ((0, jsx_runtime_1.
|
|
6
|
+
const BreadcrumbItem = ({ name, icon, isActive, onClick }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("li", { css: BreadcrumbItem_styles_1.listItemStyles, children: isActive ? ((0, jsx_runtime_1.jsxs)("span", { css: BreadcrumbItem_styles_1.activeItemStyles, children: [icon, name] })) : ((0, jsx_runtime_1.jsxs)("button", { type: "button", css: BreadcrumbItem_styles_1.buttonStyles, onClick: onClick, children: [icon, name] })) }));
|
|
8
8
|
};
|
|
9
9
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbItem.styles.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,cAAc,EAAE,SAI5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"BreadcrumbItem.styles.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,cAAc,EAAE,SAI5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAc1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAO9B,CAAC"}
|
|
@@ -32,12 +32,17 @@ exports.buttonStyles = {
|
|
|
32
32
|
cursor: 'pointer',
|
|
33
33
|
fontSize: '14px',
|
|
34
34
|
color: colors_v2_1.COLOR_V2.GRAY_70,
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
gap: '8px',
|
|
35
38
|
'&:hover': {
|
|
36
39
|
color: 'var(--main-color)',
|
|
37
40
|
},
|
|
38
41
|
};
|
|
39
42
|
exports.activeItemStyles = {
|
|
40
|
-
display: 'inline-
|
|
43
|
+
display: 'inline-flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
gap: '8px',
|
|
41
46
|
padding: '0 8px',
|
|
42
47
|
fontSize: '14px',
|
|
43
48
|
color: 'var(--main-color)',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
interface BreadcrumbsProps {
|
|
2
3
|
/**
|
|
3
4
|
* Maximum number of items to display before combining middle items into a dropdown.
|
|
@@ -6,6 +7,7 @@ interface BreadcrumbsProps {
|
|
|
6
7
|
maxNotCombinedItems?: number;
|
|
7
8
|
items: Array<{
|
|
8
9
|
name: string;
|
|
10
|
+
icon?: ReactNode;
|
|
9
11
|
}>;
|
|
10
12
|
onItemClick: (item: {
|
|
11
13
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/Misc/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/Misc/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAShC,UAAU,gBAAgB;IACxB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAC,CAAC,CAAC;IAE/C,WAAW,EAAE,CAAC,IAAI,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,iDAIrB,gBAAgB,qDAoDlB,CAAC"}
|
|
@@ -2,24 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Breadcrumbs = void 0;
|
|
4
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
5
|
const BreadcrumbItem_1 = require("./BreadcrumbItem/BreadcrumbItem");
|
|
24
6
|
const BreadcrumbLeaf_1 = require("./BreadcrumbLeaf/BreadcrumbLeaf");
|
|
25
7
|
const Breadcrumbs_styles_1 = require("./Breadcrumbs.styles");
|
|
@@ -37,13 +19,13 @@ const DEFAULT_MAX_VISIBLE_BREADCRUMBS = 4;
|
|
|
37
19
|
*/
|
|
38
20
|
const Breadcrumbs = ({ maxNotCombinedItems = DEFAULT_MAX_VISIBLE_BREADCRUMBS, items, onItemClick, }) => {
|
|
39
21
|
if (items.length <= maxNotCombinedItems) {
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)("ol", { css: Breadcrumbs_styles_1.listStyles, children: items.map((crumb, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: crumb.name, isActive: index === items.length - 1, onClick: () => onItemClick(crumb) }, crumb.name)] }))) }));
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("ol", { css: Breadcrumbs_styles_1.listStyles, children: items.map((crumb, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: crumb.name, icon: crumb.icon, isActive: index === items.length - 1, onClick: () => onItemClick(crumb) }, crumb.name)] }))) }));
|
|
41
23
|
}
|
|
42
24
|
const firstCrumb = items[0];
|
|
43
25
|
// eslint-disable-next-line no-magic-numbers
|
|
44
26
|
const lastTwoCrumbs = items.slice(-2);
|
|
45
27
|
// eslint-disable-next-line no-magic-numbers
|
|
46
28
|
const middleCrumbs = items.slice(1, -2);
|
|
47
|
-
return ((0, jsx_runtime_1.jsxs)("ol", { css: Breadcrumbs_styles_1.listStyles, children: [(0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: firstCrumb.name, isActive: false, onClick: () => onItemClick(firstCrumb) }), (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(CombainedBreadcrumbs_1.CombainedBreadcrumbs, { items: middleCrumbs, onItemClick: onItemClick }), (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), lastTwoCrumbs.map((crumb, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: crumb.name, isActive: index === lastTwoCrumbs.length - 1, onClick: () => onItemClick(crumb) }, crumb.name)] })))] }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("ol", { css: Breadcrumbs_styles_1.listStyles, children: [(0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: firstCrumb.name, icon: firstCrumb.icon, isActive: false, onClick: () => onItemClick(firstCrumb) }), (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(CombainedBreadcrumbs_1.CombainedBreadcrumbs, { items: middleCrumbs, onItemClick: onItemClick }), (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), lastTwoCrumbs.map((crumb, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(BreadcrumbLeaf_1.BreadcrumbLeaf, {}), (0, jsx_runtime_1.jsx)(BreadcrumbItem_1.BreadcrumbItem, { name: crumb.name, icon: crumb.icon, isActive: index === lastTwoCrumbs.length - 1, onClick: () => onItemClick(crumb) }, crumb.name)] })))] }));
|
|
48
30
|
};
|
|
49
31
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -5,4 +5,6 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof Breadcrumbs>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithCombinedItems: Story;
|
|
8
|
+
export declare const WithIcons: Story;
|
|
9
|
+
export declare const WithIconsAndCombinedItems: Story;
|
|
8
10
|
//# sourceMappingURL=Breadcrumbs.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.stories.d.ts","sourceRoot":"","sources":["../../../src/Misc/Breadcrumbs/Breadcrumbs.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.stories.d.ts","sourceRoot":"","sources":["../../../src/Misc/Breadcrumbs/Breadcrumbs.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAMlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAO/B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAavC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WithCombinedItems = exports.Default = void 0;
|
|
3
|
+
exports.WithIconsAndCombinedItems = exports.WithIcons = exports.WithCombinedItems = exports.Default = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const Breadcrumbs_1 = require("./Breadcrumbs");
|
|
6
|
+
const Icon_1 = require("../../Icon");
|
|
6
7
|
const meta = {
|
|
7
8
|
component: Breadcrumbs_1.Breadcrumbs,
|
|
8
9
|
title: 'Misc/Breadcrumbs',
|
|
@@ -17,3 +18,15 @@ exports.Default = {
|
|
|
17
18
|
exports.WithCombinedItems = {
|
|
18
19
|
render: () => ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.Breadcrumbs, { items: [{ name: 'Home' }, { name: 'Folder' }, { name: 'Subfolder 1' }, { name: 'Subfolder 2' }, { name: 'Subfolder 3' }], onItemClick: () => { } })),
|
|
19
20
|
};
|
|
21
|
+
exports.WithIcons = {
|
|
22
|
+
render: () => ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.Breadcrumbs, { items: [{ name: 'Home' }, { name: 'Folder', icon: (0, jsx_runtime_1.jsx)(Icon_1.TrashIcon, {}) }, { name: 'Subfolder' }], onItemClick: () => { } })),
|
|
23
|
+
};
|
|
24
|
+
exports.WithIconsAndCombinedItems = {
|
|
25
|
+
render: () => ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.Breadcrumbs, { items: [
|
|
26
|
+
{ name: 'Home' },
|
|
27
|
+
{ name: 'Folder', icon: (0, jsx_runtime_1.jsx)(Icon_1.TrashIcon, {}) },
|
|
28
|
+
{ name: 'Subfolder 1' },
|
|
29
|
+
{ name: 'Subfolder 2' },
|
|
30
|
+
{ name: 'Subfolder 3' },
|
|
31
|
+
], onItemClick: () => { } })),
|
|
32
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CombainedBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CombainedBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAMhC,UAAU,yBAAyB;IACjC,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAC,CAAC,CAAC;IAC/C,WAAW,EAAE,CAAC,IAAI,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,oBAAoB,2BAA0B,yBAAyB,qDAsBnF,CAAC"}
|
|
@@ -2,27 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CombainedBreadcrumbs = void 0;
|
|
4
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
5
|
const CombainedBreadcrumbs_styles_1 = require("./CombainedBreadcrumbs.styles");
|
|
24
6
|
const DropdownMenu_1 = require("../../../Modal/DropdownMenu");
|
|
25
7
|
const CombainedBreadcrumbs = ({ items, onItemClick }) => {
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", css: CombainedBreadcrumbs_styles_1.buttonStyles, children: "..." }) }) }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Content, { children: items.map(crumb => ((0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => onItemClick(crumb), children: crumb.name }, crumb.name))) })] }));
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", css: CombainedBreadcrumbs_styles_1.buttonStyles, children: "..." }) }) }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Content, { children: items.map(crumb => ((0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => onItemClick(crumb), children: (0, jsx_runtime_1.jsxs)("div", { css: CombainedBreadcrumbs_styles_1.itemStyles, children: [crumb.icon, crumb.name] }) }, crumb.name))) })] }));
|
|
27
9
|
};
|
|
28
10
|
exports.CombainedBreadcrumbs = CombainedBreadcrumbs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CombainedBreadcrumbs.styles.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,YAAY,EAAE,SAW1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"CombainedBreadcrumbs.styles.d.ts","sourceRoot":"","sources":["../../../../src/Misc/Breadcrumbs/CombainedBreadcrumbs/CombainedBreadcrumbs.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,YAAY,EAAE,SAW1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAIxB,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.buttonStyles = void 0;
|
|
21
|
+
exports.itemStyles = exports.buttonStyles = void 0;
|
|
22
22
|
const colors_v2_1 = require("../../../Identity/colors-v2");
|
|
23
23
|
exports.buttonStyles = {
|
|
24
24
|
background: 'none',
|
|
@@ -31,3 +31,8 @@ exports.buttonStyles = {
|
|
|
31
31
|
color: 'var(--main-color)',
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
+
exports.itemStyles = {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
gap: '8px',
|
|
38
|
+
};
|
|
@@ -8,7 +8,7 @@ interface ButtonGroupProps {
|
|
|
8
8
|
}
|
|
9
9
|
declare const ButtonGroup: {
|
|
10
10
|
({ children }: ButtonGroupProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
-
Button: (
|
|
11
|
+
Button: import("react").ForwardRefExoticComponent<GroupButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
};
|
|
13
13
|
export { ButtonGroup };
|
|
14
14
|
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/Misc/ButtonGroup.tsx"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/Misc/ButtonGroup.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AA0D5C,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,QAAA,MAAM,WAAW;mBAAgB,gBAAgB;;CAIhD,CAAC;AA2BF,OAAO,EAAC,WAAW,EAAC,CAAC"}
|
package/lib/Misc/ButtonGroup.js
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ButtonGroup = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2022 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");
|
|
5
24
|
const Identity_1 = require("../Identity");
|
|
6
25
|
const buttonGroupStyle = () => ({
|
|
7
26
|
display: 'flex',
|
|
@@ -52,13 +71,14 @@ const buttonStyle = (_, { disabled = false }) => ({
|
|
|
52
71
|
});
|
|
53
72
|
const ButtonGroup = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => buttonGroupStyle(theme), role: "group", "aria-label": "Button Group", children: children }));
|
|
54
73
|
exports.ButtonGroup = ButtonGroup;
|
|
55
|
-
const Button = ({ children, icon, ...props }) => {
|
|
56
|
-
return ((0, jsx_runtime_1.jsxs)("button", { css: (theme) => buttonStyle(theme, props), ...props, children: [icon, children && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({
|
|
74
|
+
const Button = (0, react_1.forwardRef)(({ children, icon, ...props }, ref) => {
|
|
75
|
+
return ((0, jsx_runtime_1.jsxs)("button", { ref: ref, css: (theme) => buttonStyle(theme, props), ...props, children: [icon, children && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({
|
|
57
76
|
marginLeft: !!icon && '6px',
|
|
58
77
|
fontSize: theme.fontSizes.small,
|
|
59
78
|
fontWeight: 'bold',
|
|
60
79
|
lineHeight: '0.875rem',
|
|
61
80
|
letterSpacing: '0.25px',
|
|
62
81
|
}), children: children }))] }));
|
|
63
|
-
};
|
|
82
|
+
});
|
|
83
|
+
Button.displayName = 'Button';
|
|
64
84
|
ButtonGroup.Button = Button;
|
package/lib/Misc/IconButton.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export interface IconButtonProps<T = HTMLButtonElement> extends TextProps<T> {
|
|
|
11
11
|
backgroundColor?: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const iconButtonStyle: <T>(theme: Theme, props: IconButtonProps<T>) => CSSObject;
|
|
14
|
-
export declare const IconButton: (
|
|
14
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/Misc/IconButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/Misc/IconButton.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAChC,OAAO,EAAC,SAAS,EAAkB,MAAM,SAAS,CAAC;AAGnD,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC1E,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,SAoF5E,CAAC;AAEH,eAAO,MAAM,UAAU,+IAIrB,CAAC"}
|
package/lib/Misc/IconButton.js
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IconButton = exports.iconButtonStyle = exports.IconButtonVariant = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2022 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");
|
|
5
24
|
const motions_1 = require("../Identity/motions");
|
|
6
25
|
const Text_1 = require("../Text");
|
|
7
26
|
const util_1 = require("../util");
|
|
@@ -91,8 +110,8 @@ const iconButtonStyle = (theme, { variant = IconButtonVariant.PRIMARY, group = f
|
|
|
91
110
|
}),
|
|
92
111
|
});
|
|
93
112
|
exports.iconButtonStyle = iconButtonStyle;
|
|
94
|
-
|
|
95
|
-
exports.IconButton = IconButton;
|
|
113
|
+
exports.IconButton = (0, react_1.forwardRef)(({ children, ...props }, ref) => ((0, jsx_runtime_1.jsx)("button", { ref: ref, css: (theme) => (0, exports.iconButtonStyle)(theme, props), ...filterButtonProps(props), children: children })));
|
|
114
|
+
exports.IconButton.displayName = 'IconButton';
|
|
96
115
|
const filterButtonProps = (props) => {
|
|
97
116
|
return (0, util_1.filterProps)((0, Text_1.filterTextProps)(props), ['backgroundColor']);
|
|
98
117
|
};
|
|
@@ -64,7 +64,7 @@ const DropdownMenu = ({ children }) => {
|
|
|
64
64
|
};
|
|
65
65
|
exports.DropdownMenu = DropdownMenu;
|
|
66
66
|
const DropdownMenuTrigger = ({ children, asChild = false, cssObj, }) => {
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Trigger, { asChild: asChild, css: { ...DropdownMenu_styles_1.triggerStyles, ...cssObj }, children: children }));
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Trigger, { asChild: asChild, css: !asChild && { ...DropdownMenu_styles_1.triggerStyles, ...cssObj }, children: children }));
|
|
68
68
|
};
|
|
69
69
|
exports.DropdownMenu.Trigger = DropdownMenuTrigger;
|
|
70
70
|
const DropdownMenuContent = ({ children }) => {
|
|
@@ -5,5 +5,6 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof DropdownMenu>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithLongItems: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const WithCustomButton: Story;
|
|
9
|
+
export declare const WithCustomIconButton: Story;
|
|
9
10
|
//# sourceMappingURL=DropdownMenu.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/Modal/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/Modal/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAM5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAMnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAa3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAelC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WithCustomIconButton = exports.WithCustomButton = exports.WithLongItems = exports.Default = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const DropdownMenu_1 = require("./DropdownMenu");
|
|
6
|
+
const Form_1 = require("../../Form");
|
|
6
7
|
const Icon_1 = require("../../Icon");
|
|
8
|
+
const Misc_1 = require("../../Misc");
|
|
7
9
|
const meta = {
|
|
8
10
|
component: DropdownMenu_1.DropdownMenu,
|
|
9
11
|
title: 'Modal/DropdownMenu',
|
|
@@ -18,9 +20,9 @@ exports.Default = {
|
|
|
18
20
|
exports.WithLongItems = {
|
|
19
21
|
render: () => ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { cssObj: { width: '40px', height: '40px' }, children: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, {}) }), (0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu.Content, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Copy the detail of this message" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Contact the sender" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Delete this message (works only if you are the owner)" })] })] })),
|
|
20
22
|
};
|
|
21
|
-
exports.
|
|
22
|
-
render: () => ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
exports.WithCustomButton = {
|
|
24
|
+
render: () => ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(Form_1.Button, { variant: Form_1.ButtonVariant.PRIMARY, children: "Open menu" }) }), (0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu.Content, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Copy" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Details" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Delete for me" })] })] })),
|
|
25
|
+
};
|
|
26
|
+
exports.WithCustomIconButton = {
|
|
27
|
+
render: () => ((0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(Misc_1.IconButton, { variant: Misc_1.IconButtonVariant.PRIMARY, children: (0, jsx_runtime_1.jsx)(Icon_1.PlusIcon, {}) }) }), (0, jsx_runtime_1.jsxs)(DropdownMenu_1.DropdownMenu.Content, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Copy" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Details" }), (0, jsx_runtime_1.jsx)(DropdownMenu_1.DropdownMenu.Item, { onClick: () => { }, children: "Delete for me" })] })] })),
|
|
26
28
|
};
|
package/package.json
CHANGED