@blockle/blocks-react 2.6.6 → 2.6.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/Alert/Alert.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAO9B,KAAK,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAErC,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAsDtC,CAAC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/Alert/Alert.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAO9B,KAAK,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAErC,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwDtC,CAAC"}
@@ -27,7 +27,7 @@ const Alert = ({
27
27
  ...restProps,
28
28
  children: [
29
29
  /* @__PURE__ */ jsx("div", { children }),
30
- /* @__PURE__ */ jsx(
30
+ onRequestClose ? /* @__PURE__ */ jsx(
31
31
  Button,
32
32
  {
33
33
  variant: "ghost",
@@ -55,7 +55,7 @@ const Alert = ({
55
55
  }
56
56
  )
57
57
  }
58
- )
58
+ ) : null
59
59
  ]
60
60
  }
61
61
  );
@@ -5,6 +5,11 @@ export type TextareaProps = {
5
5
  * If true, the textarea will grow in height to fit its content.
6
6
  */
7
7
  grow?: boolean;
8
+ /**
9
+ * The maximum height the textarea can grow to when `grow` is true.
10
+ */
11
+ maxHeight?: string | number;
12
+ containerProps?: HTMLElementProps<HTMLDivElement>;
8
13
  } & HTMLElementProps<HTMLTextAreaElement>;
9
14
  export declare const Textarea: React.FC<TextareaProps>;
10
15
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMzE,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAEhB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2B5C,CAAC"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMzE,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAEnD,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2C5C,CAAC"}
@@ -8,6 +8,8 @@ const Textarea = ({
8
8
  ref,
9
9
  value,
10
10
  grow,
11
+ maxHeight,
12
+ containerProps,
11
13
  ...restProps
12
14
  }) => {
13
15
  const containerClassName = useComponentStyles(
@@ -16,19 +18,37 @@ const Textarea = ({
16
18
  false
17
19
  );
18
20
  const inputClassName = useComponentStyles("textarea", { input: true });
19
- return /* @__PURE__ */ jsx(Box, { className: containerClassName, children: /* @__PURE__ */ jsx(
20
- "textarea",
21
+ const { className, ...inputProps } = restProps;
22
+ const {
23
+ className: containerClassNameFromProps,
24
+ style: containerStyleFromProps,
25
+ ...containerRestProps
26
+ } = containerProps || {};
27
+ return /* @__PURE__ */ jsx(
28
+ Box,
21
29
  {
22
- ref,
23
- value,
24
- className: classnames(
25
- textarea,
26
- grow && fieldSizingEnabled,
27
- inputClassName
28
- ),
29
- ...restProps
30
+ className: classnames(containerClassName, containerClassNameFromProps),
31
+ style: {
32
+ maxHeight: grow ? maxHeight : void 0,
33
+ ...containerStyleFromProps
34
+ },
35
+ ...containerRestProps,
36
+ children: /* @__PURE__ */ jsx(
37
+ "textarea",
38
+ {
39
+ ref,
40
+ value,
41
+ className: classnames(
42
+ textarea,
43
+ grow && fieldSizingEnabled,
44
+ inputClassName,
45
+ className
46
+ ),
47
+ ...inputProps
48
+ }
49
+ )
30
50
  }
31
- ) });
51
+ );
32
52
  };
33
53
  export {
34
54
  Textarea
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks-react",
3
- "version": "2.6.6",
3
+ "version": "2.6.8",
4
4
  "description": "React hooks and components for Blockle",
5
5
  "type": "module",
6
6
  "exports": {