@blockle/blocks-react 2.7.0 → 2.8.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/dist/components/form/Textarea/Textarea.d.ts +9 -4
- package/dist/components/form/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/form/Textarea/Textarea.js +2 -2
- package/dist/components/layout/Grid/Grid.css.js +1 -1
- package/dist/components/layout/Grid/Grid.d.ts +1 -4
- package/dist/components/layout/Grid/Grid.d.ts.map +1 -1
- package/dist/components/layout/Grid/Grid.js +5 -8
- package/dist/testUtils/testTheme.css.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLElementProps } from '@blockle/blocks-core';
|
|
1
|
+
import { Atoms, HTMLElementProps } from '@blockle/blocks-core';
|
|
2
2
|
export type TextareaProps = {
|
|
3
3
|
value?: string;
|
|
4
4
|
/**
|
|
@@ -6,10 +6,15 @@ export type TextareaProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
grow?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* The maximum
|
|
9
|
+
* The maximum block size the container can grow to when `grow` is true.
|
|
10
|
+
* The container stops at this limit and scrolls, while the `<textarea>`
|
|
11
|
+
* itself keeps growing inside it.
|
|
10
12
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
maxBlockSize?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* Props for the wrapper element. Accepts the same atoms as `Box`.
|
|
16
|
+
*/
|
|
17
|
+
containerProps?: Omit<HTMLElementProps<HTMLDivElement>, keyof Atoms> & Atoms;
|
|
13
18
|
} & HTMLElementProps<HTMLTextAreaElement>;
|
|
14
19
|
export declare const Textarea: React.FC<TextareaProps>;
|
|
15
20
|
//# 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,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAM9B,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC;CAE9E,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2C5C,CAAC"}
|
|
@@ -8,7 +8,7 @@ const Textarea = ({
|
|
|
8
8
|
ref,
|
|
9
9
|
value,
|
|
10
10
|
grow,
|
|
11
|
-
|
|
11
|
+
maxBlockSize,
|
|
12
12
|
containerProps,
|
|
13
13
|
...restProps
|
|
14
14
|
}) => {
|
|
@@ -29,7 +29,7 @@ const Textarea = ({
|
|
|
29
29
|
{
|
|
30
30
|
className: classnames(containerClassName, containerClassNameFromProps),
|
|
31
31
|
style: {
|
|
32
|
-
maxHeight: grow ?
|
|
32
|
+
maxHeight: grow ? maxBlockSize : void 0,
|
|
33
33
|
...containerStyleFromProps
|
|
34
34
|
},
|
|
35
35
|
...containerRestProps,
|
|
@@ -3,7 +3,7 @@ import { createResponsiveStyles, layers } from "@blockle/blocks-core";
|
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/layout/Grid/Grid.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const grid = style({
|
|
6
|
-
gridTemplateColumns: "repeat(12, 1fr)"
|
|
6
|
+
gridTemplateColumns: "repeat(12, minmax(0, 1fr))"
|
|
7
7
|
});
|
|
8
8
|
const responsiveColSpanStyles = createResponsiveStyles(
|
|
9
9
|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Atoms, HTMLElementProps } from '@blockle/blocks-core';
|
|
2
2
|
export type GridProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
|
|
5
|
-
gap?: Atoms['gap'];
|
|
6
|
-
rowGap?: Atoms['rowGap'];
|
|
7
|
-
} & HTMLElementProps<HTMLDivElement>;
|
|
4
|
+
} & Omit<Atoms, 'flexDirection'> & Omit<HTMLElementProps<HTMLDivElement>, keyof Atoms>;
|
|
8
5
|
export declare const Grid: React.FC<GridProps>;
|
|
9
6
|
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Grid/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Grid/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAK9B,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,GAC9B,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAEtD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAepC,CAAC"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classnames } from "@blockle/blocks-core";
|
|
2
3
|
import { Box } from "../Box/Box.js";
|
|
3
4
|
import { grid } from "./Grid.css.js";
|
|
4
5
|
const Grid = ({
|
|
5
6
|
children,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
rowGap,
|
|
7
|
+
display = "grid",
|
|
8
|
+
className,
|
|
9
9
|
...restProps
|
|
10
10
|
}) => {
|
|
11
11
|
return /* @__PURE__ */ jsx(
|
|
12
12
|
Box,
|
|
13
13
|
{
|
|
14
|
-
display
|
|
15
|
-
className: grid,
|
|
16
|
-
gap,
|
|
17
|
-
rowGap,
|
|
18
|
-
columnGap,
|
|
14
|
+
display,
|
|
15
|
+
className: classnames(grid, className),
|
|
19
16
|
...restProps,
|
|
20
17
|
children
|
|
21
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testTheme.css.d.ts","sourceRoot":"","sources":["../../src/testUtils/testTheme.css.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"testTheme.css.d.ts","sourceRoot":"","sources":["../../src/testUtils/testTheme.css.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,KAuGvB,CAAC"}
|