@blueprintjs/labs 6.2.5 → 6.2.7
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueprintjs/labs",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.7",
|
|
4
4
|
"description": "Incubator for unstable and in-development Blueprint components",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"classnames": "^2.3.1",
|
|
12
12
|
"tslib": "~2.6.2",
|
|
13
13
|
"@blueprintjs/colors": "^5.1.16",
|
|
14
|
-
"@blueprintjs/core": "^6.11.
|
|
14
|
+
"@blueprintjs/core": "^6.11.3"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@types/react": "18",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"vitest": "4.0.7",
|
|
38
38
|
"@blueprintjs/node-build-scripts": "^9.3.3",
|
|
39
39
|
"@blueprintjs/stylelint-plugin": "^5.2.2",
|
|
40
|
-
"@blueprintjs/
|
|
41
|
-
"@blueprintjs/
|
|
40
|
+
"@blueprintjs/test-commons": "^4.0.4",
|
|
41
|
+
"@blueprintjs/webpack-build-scripts": "^6.2.16"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: Box
|
|
2
3
|
tag: new
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
# Box
|
|
6
7
|
|
|
7
8
|
**Box** is a generic layout component that exposes a subset of the [CSS box-model](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Box_model) and [flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout) APIs as props. It enables layout composition using Blueprint's spacing and sizing design tokens.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## Import
|
|
10
11
|
|
|
11
12
|
```ts copy
|
|
12
13
|
import { Box } from "@blueprintjs/labs";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Usage
|
|
16
17
|
|
|
17
18
|
Use **Box** to compose layouts with spacing, alignment, and sizing props.
|
|
18
19
|
|
|
19
20
|
@reactCodeExample BoxBasicExample
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
## Composition with asChild
|
|
22
23
|
|
|
23
24
|
When `asChild` is set, `<Box>` will not render an extra wrapper element. Instead it clones and enhances its single child, merging class names and props.
|
|
24
25
|
This is useful for applying layout to existing components without adding an extra DOM node.
|
|
25
26
|
|
|
26
27
|
@reactCodeExample BoxAsChildExample
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
## Layout props
|
|
29
30
|
|
|
30
31
|
Box supports a wide range of layout props that map to CSS properties:
|
|
31
32
|
|
|
@@ -38,22 +39,22 @@ Box supports a wide range of layout props that map to CSS properties:
|
|
|
38
39
|
|
|
39
40
|
Each prop accepts Blueprint token values to enforce consistent spacing and sizing.
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
## Examples
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
### Padding
|
|
44
45
|
|
|
45
46
|
@reactExample BoxPaddingExample
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
### Margin
|
|
48
49
|
|
|
49
50
|
@reactExample BoxMarginExample
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
### Object Card
|
|
52
53
|
|
|
53
54
|
A practical example demonstrating how to compose a card layout using Box with multiple layout props working together.
|
|
54
55
|
|
|
55
56
|
@reactExample BoxObjectCardExample
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
## Props interface
|
|
58
59
|
|
|
59
60
|
@interface BoxProps
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: Flex
|
|
2
3
|
tag: new
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
# Flex
|
|
6
7
|
|
|
7
8
|
**Flex** is a specialized layout component that wraps **Box** with `display="flex"` pre-applied. It simplifies flexbox layouts by providing convenient access to flexbox properties through props.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## Import
|
|
10
11
|
|
|
11
12
|
```ts copy
|
|
12
13
|
import { Flex } from "@blueprintjs/labs";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Usage
|
|
16
17
|
|
|
17
18
|
Use **Flex** to create flexbox layouts with alignment, direction, and spacing props. Flex automatically sets `display: flex`, so you can focus on layout properties.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## Flexbox props
|
|
20
21
|
|
|
21
22
|
Flex supports all Box props except `display`, with common flexbox patterns:
|
|
22
23
|
|
|
@@ -27,26 +28,26 @@ Flex supports all Box props except `display`, with common flexbox patterns:
|
|
|
27
28
|
|
|
28
29
|
Each prop accepts Blueprint token values for consistent spacing and sizing.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
## Examples
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
### Direction
|
|
33
34
|
|
|
34
35
|
Control the main axis and direction of how flex items are placed with the `flexDirection` property.
|
|
35
36
|
|
|
36
37
|
@reactCodeExample FlexDirectionExample
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
### Alignment
|
|
39
40
|
|
|
40
41
|
Align flex items along the cross axis with `alignItems` and distribute them along the main axis with `justifyContent`.
|
|
41
42
|
|
|
42
43
|
@reactCodeExample FlexAlignExample
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
### Gap
|
|
45
46
|
|
|
46
47
|
Add even spacing between flex items using the `gap` prop.
|
|
47
48
|
|
|
48
49
|
@reactCodeExample FlexGapExample
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
## Props interface
|
|
51
52
|
|
|
52
53
|
@interface FlexProps
|