reshaped 3.7.0-canary.13 → 3.7.0-canary.15

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.
@@ -31,7 +31,14 @@ const DropdownMenuContent = (props) => {
31
31
  ref: attributes?.ref,
32
32
  });
33
33
  const contentClassName = classNames(s.menu, className);
34
- return (_jsx(Popover.Content, { className: contentClassName, attributes: { ...attributes, ref }, children: children }));
34
+ const handleClick = (e) => {
35
+ /**
36
+ * Stop event propagation to make sure outside click doesn't get triggered
37
+ * after the content is closed
38
+ */
39
+ e.stopPropagation();
40
+ };
41
+ return (_jsx(Popover.Content, { className: contentClassName, attributes: { ...attributes, ref, onClick: handleClick }, children: children }));
35
42
  };
36
43
  const DropdownMenuSection = (props) => {
37
44
  const { children } = props;
@@ -42,11 +49,6 @@ const DropdownMenuItem = (props) => {
42
49
  const { handleClose } = useFlyoutContext();
43
50
  const subTriggerContext = React.useContext(DropdownMenuSubTriggerContext);
44
51
  const handleClick = (e) => {
45
- /**
46
- * Stop event propagation to make sure outside click doesn't get triggered
47
- * after the content is closed
48
- */
49
- e.stopPropagation();
50
52
  /**
51
53
  * Don't close the menu when clicking on a trigger of a submenu
52
54
  */
@@ -1 +1 @@
1
- .root{border:none}.label{display:block;margin-bottom:var(--rs-unit-x1)}.caption{display:block;margin-top:var(--rs-unit-x1)}.caption+.caption{margin-top:0}
1
+ .root{border:none}.label{display:block;margin-bottom:var(--rs-unit-x1)}.label:last-child{margin-bottom:0}.caption{display:block;margin-top:var(--rs-unit-x1)}.caption+.caption{margin-top:0}
@@ -23,3 +23,7 @@ export declare const required: {
23
23
  name: string;
24
24
  render: () => import("react").JSX.Element;
25
25
  };
26
+ export declare const composition: {
27
+ name: string;
28
+ render: () => import("react").JSX.Element;
29
+ };
@@ -2,6 +2,7 @@ import { expect } from "storybook/test";
2
2
  import { Example } from "../../../utilities/storybook/index.js";
3
3
  import FormControl from "../index.js";
4
4
  import TextField from "../../TextField/index.js";
5
+ import View from "../../View/index.js";
5
6
  export default {
6
7
  title: "Utility components/FormControl",
7
8
  component: FormControl,
@@ -88,3 +89,20 @@ export const required = {
88
89
  </Example.Item>
89
90
  </Example>),
90
91
  };
92
+ export const composition = {
93
+ name: "test: composition",
94
+ render: () => (<Example>
95
+ <Example.Item title="horizontal">
96
+ <FormControl>
97
+ <View direction="row" gap={10} align="center">
98
+ <View width="100px">
99
+ <FormControl.Label>Label</FormControl.Label>
100
+ </View>
101
+ <View.Item grow>
102
+ <TextField name="name" placeholder="Enter value"/>
103
+ </View.Item>
104
+ </View>
105
+ </FormControl>
106
+ </Example.Item>
107
+ </Example>),
108
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reshaped",
3
3
  "description": "Professionally crafted design system in React & Figma for building products of any scale and complexity",
4
- "version": "3.7.0-canary.13",
4
+ "version": "3.7.0-canary.15",
5
5
  "license": "MIT",
6
6
  "email": "hello@reshaped.so",
7
7
  "homepage": "https://reshaped.so",