@wireapp/react-ui-kit 9.75.0 → 9.76.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.
@@ -49,8 +49,14 @@ export declare const DropdownMenu: {
49
49
  children: ReactNode;
50
50
  onClick: () => void;
51
51
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
52
- SubContent: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>>;
53
- SubTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>>;
52
+ SubTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {
53
+ cssObj?: CSSObject;
54
+ showIndicator?: boolean;
55
+ indicator?: ReactNode;
56
+ } & import("react").RefAttributes<HTMLDivElement>>;
57
+ SubContent: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubContentProps & {
58
+ cssObj?: CSSObject;
59
+ } & import("react").RefAttributes<HTMLDivElement>>;
54
60
  Sub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
55
61
  };
56
62
  //# sourceMappingURL=DropdownMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/Surface/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAIvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,YAAY;mBAAgB;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAC;8CAQ3D;QACD,QAAQ,EAAE,SAAS,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,SAAS,CAAC;KACpB;4BAUwC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAC;kCAYf;QAAC,QAAQ,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAC;;;;CAhCxF,CAAC"}
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/Surface/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAWvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,YAAY;mBAAgB;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAC;8CAQ3D;QACD,QAAQ,EAAE,SAAS,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,SAAS,CAAC;KACpB;4BAUwC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAC;kCAYf;QAAC,QAAQ,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAC;;iBAwB5E,SAAS;wBACF,OAAO;oBACX,SAAS;;;iBAmBuC,SAAS;;;CA7ExE,CAAC"}
@@ -25,6 +25,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.DropdownMenu = void 0;
27
27
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
28
+ /*
29
+ * Wire
30
+ * Copyright (C) 2025 Wire Swiss GmbH
31
+ *
32
+ * This program is free software: you can redistribute it and/or modify
33
+ * it under the terms of the GNU General Public License as published by
34
+ * the Free Software Foundation, either version 3 of the License, or
35
+ * (at your option) any later version.
36
+ *
37
+ * This program is distributed in the hope that it will be useful,
38
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
39
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40
+ * GNU General Public License for more details.
41
+ *
42
+ * You should have received a copy of the GNU General Public License
43
+ * along with this program. If not, see http://www.gnu.org/licenses/.
44
+ *
45
+ */
46
+ const react_1 = require("react");
28
47
  const DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
29
48
  const DropdownMenu_styles_1 = require("./DropdownMenu.styles");
30
49
  /**
@@ -75,6 +94,15 @@ const DropdownMenuItem = ({ children, onClick }) => {
75
94
  return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Item, { css: DropdownMenu_styles_1.itemStyle, onClick: onClick, children: (0, jsx_runtime_1.jsx)("span", { css: DropdownMenu_styles_1.textStyles, children: children }) }));
76
95
  };
77
96
  exports.DropdownMenu.Item = DropdownMenuItem;
78
- exports.DropdownMenu.SubContent = DropdownMenuPrimitive.SubContent;
79
- exports.DropdownMenu.SubTrigger = DropdownMenuPrimitive.SubTrigger;
97
+ const defaultSubmenuIndicator = ((0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.85355 12.1464C5.53857 12.4614 5 12.2383 5 11.7929L5 4.20711C5 3.76165 5.53857 3.53857 5.85355 3.85355L9.64645 7.64645C9.84171 7.84171 9.84171 8.15829 9.64645 8.35355L5.85355 12.1464Z", fill: "currentColor" }) }));
98
+ const DropdownMenuSubTrigger = (0, react_1.forwardRef)(({ children, cssObj, showIndicator = true, indicator, ...props }, ref) => {
99
+ return ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.SubTrigger, { ref: ref, css: { ...DropdownMenu_styles_1.itemStyle, ...DropdownMenu_styles_1.subTriggerStyle, ...cssObj }, ...props, children: [(0, jsx_runtime_1.jsx)("span", { css: DropdownMenu_styles_1.textStyles, children: children }), showIndicator ? ((0, jsx_runtime_1.jsx)("span", { css: { display: 'inline-flex', flexShrink: 0 }, children: indicator ?? defaultSubmenuIndicator })) : null] }));
100
+ });
101
+ DropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';
102
+ exports.DropdownMenu.SubTrigger = DropdownMenuSubTrigger;
103
+ const DropdownMenuSubContent = (0, react_1.forwardRef)(({ children, cssObj, ...props }, ref) => {
104
+ return ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.SubContent, { ref: ref, css: { ...DropdownMenu_styles_1.contentStyle, ...DropdownMenu_styles_1.subContentStyle, ...cssObj }, ...props, children: children }) }));
105
+ });
106
+ DropdownMenuSubContent.displayName = 'DropdownMenuSubContent';
107
+ exports.DropdownMenu.SubContent = DropdownMenuSubContent;
80
108
  exports.DropdownMenu.Sub = DropdownMenuPrimitive.Sub;
@@ -3,4 +3,6 @@ export declare const contentStyle: CSSObject;
3
3
  export declare const itemStyle: CSSObject;
4
4
  export declare const textStyles: CSSObject;
5
5
  export declare const triggerStyles: CSSObject;
6
+ export declare const subTriggerStyle: CSSObject;
7
+ export declare const subContentStyle: CSSObject;
6
8
  //# sourceMappingURL=DropdownMenu.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.styles.d.ts","sourceRoot":"","sources":["../../../src/Surface/DropdownMenu/DropdownMenu.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAkDpD,eAAO,MAAM,YAAY,EAAE,SA0B1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAkBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAIxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAS3B,CAAC"}
1
+ {"version":3,"file":"DropdownMenu.styles.d.ts","sourceRoot":"","sources":["../../../src/Surface/DropdownMenu/DropdownMenu.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAkDpD,eAAO,MAAM,YAAY,EAAE,SA0B1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAkBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAIxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAS3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAE7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAE7B,CAAC"}
@@ -18,7 +18,7 @@
18
18
  *
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.triggerStyles = exports.textStyles = exports.itemStyle = exports.contentStyle = void 0;
21
+ exports.subContentStyle = exports.subTriggerStyle = exports.triggerStyles = exports.textStyles = exports.itemStyle = exports.contentStyle = void 0;
22
22
  const react_1 = require("@emotion/react");
23
23
  const util_1 = require("../../utils/util");
24
24
  const slideUpAndFade = (0, react_1.keyframes) `
@@ -121,3 +121,9 @@ exports.triggerStyles = {
121
121
  background: 'none',
122
122
  cursor: 'pointer',
123
123
  };
124
+ exports.subTriggerStyle = {
125
+ justifyContent: 'space-between',
126
+ };
127
+ exports.subContentStyle = {
128
+ minWidth: '160px',
129
+ };
package/package.json CHANGED
@@ -79,6 +79,6 @@
79
79
  "test:watch": "jest --watch",
80
80
  "test:update": "jest --updateSnapshot"
81
81
  },
82
- "version": "9.75.0",
83
- "gitHead": "69baa7f2d0d5370be526465f242fe7c2e712755a"
82
+ "version": "9.76.0",
83
+ "gitHead": "f707884ff7384fb48b777498c2eedb4796378612"
84
84
  }