@blockle/blocks-react 2.6.0 → 2.6.1

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":"IconMask.css.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAQnB,CAAC"}
1
+ {"version":3,"file":"IconMask.css.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAUnB,CAAC"}
@@ -6,8 +6,10 @@ const iconMask = style({
6
6
  "@layer": {
7
7
  [layers.molecule]: {
8
8
  aspectRatio: "1 / 1",
9
- maskSize: "100%",
10
- backgroundColor: "currentcolor"
9
+ backgroundColor: "currentcolor",
10
+ maskPosition: "center",
11
+ maskRepeat: "no-repeat",
12
+ maskSize: "100%"
11
13
  }
12
14
  }
13
15
  });
@@ -8,7 +8,7 @@ const IconMask = ({
8
8
  src,
9
9
  size,
10
10
  style,
11
- display = "inline-block",
11
+ display = "block",
12
12
  ...restProps
13
13
  }) => {
14
14
  const [atomsProps, otherProps] = getAtomsAndProps(restProps);
@@ -26,7 +26,7 @@ const IconMask = ({
26
26
  className
27
27
  ),
28
28
  style: {
29
- mask: `url(${src}) no-repeat center`,
29
+ maskImage: `url(${src})`,
30
30
  ...style
31
31
  },
32
32
  ...otherProps
@@ -1,2 +1,3 @@
1
1
  export declare const textarea: string;
2
+ export declare const fieldSizingEnabled: string;
2
3
  //# sourceMappingURL=Textarea.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.css.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Textarea/Textarea.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAUnB,CAAC"}
1
+ {"version":3,"file":"Textarea.css.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Textarea/Textarea.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QASnB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC"}
@@ -8,12 +8,15 @@ const textarea = style({
8
8
  width: "100%",
9
9
  minHeight: "inherit",
10
10
  resize: "none",
11
- display: "block",
12
- fieldSizing: "content"
11
+ display: "block"
13
12
  }
14
13
  }
15
14
  });
15
+ const fieldSizingEnabled = style({
16
+ fieldSizing: "content"
17
+ });
16
18
  endFileScope();
17
19
  export {
20
+ fieldSizingEnabled,
18
21
  textarea
19
22
  };
@@ -1,7 +1,10 @@
1
1
  import { HTMLElementProps } from '@blockle/blocks-core';
2
2
  export type TextareaProps = {
3
3
  value?: string;
4
- ref?: React.RefObject<HTMLTextAreaElement>;
4
+ /**
5
+ * If true, the textarea will grow in height to fit its content.
6
+ */
7
+ grow?: boolean;
5
8
  } & HTMLElementProps<HTMLTextAreaElement>;
6
9
  export declare const Textarea: React.FC<TextareaProps>;
7
10
  //# 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,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;CAE5C,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsB5C,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;CAEhB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2B5C,CAAC"}
@@ -3,10 +3,11 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { classnames } from "@blockle/blocks-core";
4
4
  import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
5
5
  import { Box } from "../../layout/Box/Box.js";
6
- import { textarea } from "./Textarea.css.js";
6
+ import { textarea, fieldSizingEnabled } from "./Textarea.css.js";
7
7
  const Textarea = ({
8
8
  ref,
9
9
  value,
10
+ grow,
10
11
  ...restProps
11
12
  }) => {
12
13
  const containerClassName = useComponentStyles(
@@ -20,7 +21,11 @@ const Textarea = ({
20
21
  {
21
22
  ref,
22
23
  value,
23
- className: classnames(textarea, inputClassName),
24
+ className: classnames(
25
+ textarea,
26
+ grow && fieldSizingEnabled,
27
+ inputClassName
28
+ ),
24
29
  ...restProps
25
30
  }
26
31
  ) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks-react",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "React hooks and components for Blockle",
5
5
  "type": "module",
6
6
  "exports": {