@charcoal-ui/react 4.0.0-beta.11 → 4.0.0-beta.13
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/IconButton/index.d.ts +1 -2
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -1
- package/dist/index.cjs.js +8 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -15
- package/src/_lib/index.ts +1 -1
- package/src/components/Button/__snapshots__/index.story.storyshot +9 -9
- package/src/components/Checkbox/CheckboxInput/__snapshots__/index.story.storyshot +6 -6
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +6 -6
- package/src/components/Clickable/__snapshots__/index.story.storyshot +2 -2
- package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +3 -3
- package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +3 -3
- package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +5 -5
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +53 -53
- package/src/components/Icon/__snapshots__/index.story.storyshot +1 -1
- package/src/components/IconButton/__snapshots__/index.story.storyshot +3 -3
- package/src/components/IconButton/index.tsx +3 -6
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +8 -8
- package/src/components/Modal/__snapshots__/index.story.storyshot +45 -28
- package/src/components/Modal/index.story.tsx +2 -0
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/Modal/useCustomModalOverlay.tsx +7 -1
- package/src/components/Radio/__snapshots__/index.story.storyshot +10 -10
- package/src/components/Radio/index.test.tsx +4 -3
- package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +2 -2
- package/src/components/Switch/__snapshots__/index.story.storyshot +4 -4
- package/src/components/TagItem/__snapshots__/index.story.storyshot +16 -16
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +31 -31
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +25 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/react",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -26,13 +26,10 @@
|
|
|
26
26
|
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
|
|
27
27
|
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
|
|
28
28
|
"clean": "rimraf dist .tsbuildinfo",
|
|
29
|
-
"test": "
|
|
29
|
+
"test": "vitest run --passWithNoTests"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@babel/preset-react": "^7.24.7",
|
|
34
|
-
"@babel/preset-typescript": "^7.24.7",
|
|
35
|
-
"@charcoal-ui/esbuild-plugin-styled-components": "^4.0.0-beta.11",
|
|
32
|
+
"@charcoal-ui/esbuild-plugin-styled-components": "^4.0.0-beta.13",
|
|
36
33
|
"@react-types/switch": "^3.1.2",
|
|
37
34
|
"@storybook/addon-actions": "^8.0.5",
|
|
38
35
|
"@storybook/react": "^8.0.5",
|
|
@@ -47,11 +44,9 @@
|
|
|
47
44
|
"@types/react-router-dom": "^5.3.3",
|
|
48
45
|
"@types/react-test-renderer": "^18.3.0",
|
|
49
46
|
"@types/warning": "^3.0.0",
|
|
47
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
50
48
|
"autoprefixer": "^10.4.19",
|
|
51
|
-
"babel-jest": "^29.7.0",
|
|
52
|
-
"jest": "^29.7.0",
|
|
53
49
|
"jest-axe": "^5.0.1",
|
|
54
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
55
50
|
"jsdom": "^24.1.0",
|
|
56
51
|
"npm-run-all": "^4.1.5",
|
|
57
52
|
"react": "^17.0.2",
|
|
@@ -59,13 +54,14 @@
|
|
|
59
54
|
"react-router-dom": "^6.2.1",
|
|
60
55
|
"rimraf": "^3.0.2",
|
|
61
56
|
"tsup": "^6.5.0",
|
|
62
|
-
"typescript": "^4.9.5"
|
|
57
|
+
"typescript": "^4.9.5",
|
|
58
|
+
"vitest": "^2.0.1"
|
|
63
59
|
},
|
|
64
60
|
"dependencies": {
|
|
65
|
-
"@charcoal-ui/foundation": "^4.0.0-beta.
|
|
66
|
-
"@charcoal-ui/icons": "^4.0.0-beta.
|
|
67
|
-
"@charcoal-ui/theme": "^4.0.0-beta.
|
|
68
|
-
"@charcoal-ui/utils": "^4.0.0-beta.
|
|
61
|
+
"@charcoal-ui/foundation": "^4.0.0-beta.13",
|
|
62
|
+
"@charcoal-ui/icons": "^4.0.0-beta.13",
|
|
63
|
+
"@charcoal-ui/theme": "^4.0.0-beta.13",
|
|
64
|
+
"@charcoal-ui/utils": "^4.0.0-beta.13",
|
|
69
65
|
"@react-aria/button": "^3.9.1",
|
|
70
66
|
"@react-aria/checkbox": "^3.13.0",
|
|
71
67
|
"@react-aria/dialog": "^3.5.10",
|
|
@@ -98,5 +94,5 @@
|
|
|
98
94
|
"url": "https://github.com/pixiv/charcoal.git",
|
|
99
95
|
"directory": "packages/react"
|
|
100
96
|
},
|
|
101
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "0b37817809ef7fc52094865f7fbdd9e8d025e9e5"
|
|
102
98
|
}
|
package/src/_lib/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ export function unreachable(): never
|
|
|
24
24
|
* @param value Value to be asserted as unreachable
|
|
25
25
|
*/
|
|
26
26
|
// NOTE: Uses separate overloads, _not_ `value?: never`, to not allow `undefined` to be passed
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
export function unreachable(value: never): never
|
|
29
29
|
export function unreachable(value?: never): never {
|
|
30
30
|
throw new Error(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/Button Danger 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/Button > Danger 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -13,7 +13,7 @@ exports[`Storybook Tests react/Button Danger 1`] = `
|
|
|
13
13
|
</div>
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
exports[`Storybook Tests react/Button Default 1`] = `
|
|
16
|
+
exports[`Storybook Tests > react/Button > Default 1`] = `
|
|
17
17
|
<div
|
|
18
18
|
data-dark={false}
|
|
19
19
|
>
|
|
@@ -25,7 +25,7 @@ exports[`Storybook Tests react/Button Default 1`] = `
|
|
|
25
25
|
</div>
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
|
-
exports[`Storybook Tests react/Button Disabled 1`] = `
|
|
28
|
+
exports[`Storybook Tests > react/Button > Disabled 1`] = `
|
|
29
29
|
<div
|
|
30
30
|
data-dark={false}
|
|
31
31
|
>
|
|
@@ -38,7 +38,7 @@ exports[`Storybook Tests react/Button Disabled 1`] = `
|
|
|
38
38
|
</div>
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
|
-
exports[`Storybook Tests react/Button FullWidth 1`] = `
|
|
41
|
+
exports[`Storybook Tests > react/Button > FullWidth 1`] = `
|
|
42
42
|
<div
|
|
43
43
|
data-dark={false}
|
|
44
44
|
>
|
|
@@ -51,7 +51,7 @@ exports[`Storybook Tests react/Button FullWidth 1`] = `
|
|
|
51
51
|
</div>
|
|
52
52
|
`;
|
|
53
53
|
|
|
54
|
-
exports[`Storybook Tests react/Button IsActive 1`] = `
|
|
54
|
+
exports[`Storybook Tests > react/Button > IsActive 1`] = `
|
|
55
55
|
<div
|
|
56
56
|
data-dark={false}
|
|
57
57
|
>
|
|
@@ -64,7 +64,7 @@ exports[`Storybook Tests react/Button IsActive 1`] = `
|
|
|
64
64
|
</div>
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
|
-
exports[`Storybook Tests react/Button Navigation 1`] = `
|
|
67
|
+
exports[`Storybook Tests > react/Button > Navigation 1`] = `
|
|
68
68
|
<div
|
|
69
69
|
data-dark={false}
|
|
70
70
|
>
|
|
@@ -77,7 +77,7 @@ exports[`Storybook Tests react/Button Navigation 1`] = `
|
|
|
77
77
|
</div>
|
|
78
78
|
`;
|
|
79
79
|
|
|
80
|
-
exports[`Storybook Tests react/Button Overlay 1`] = `
|
|
80
|
+
exports[`Storybook Tests > react/Button > Overlay 1`] = `
|
|
81
81
|
<div
|
|
82
82
|
data-dark={false}
|
|
83
83
|
>
|
|
@@ -90,7 +90,7 @@ exports[`Storybook Tests react/Button Overlay 1`] = `
|
|
|
90
90
|
</div>
|
|
91
91
|
`;
|
|
92
92
|
|
|
93
|
-
exports[`Storybook Tests react/Button Primary 1`] = `
|
|
93
|
+
exports[`Storybook Tests > react/Button > Primary 1`] = `
|
|
94
94
|
<div
|
|
95
95
|
data-dark={false}
|
|
96
96
|
>
|
|
@@ -103,7 +103,7 @@ exports[`Storybook Tests react/Button Primary 1`] = `
|
|
|
103
103
|
</div>
|
|
104
104
|
`;
|
|
105
105
|
|
|
106
|
-
exports[`Storybook Tests react/Button Small 1`] = `
|
|
106
|
+
exports[`Storybook Tests > react/Button > Small 1`] = `
|
|
107
107
|
<div
|
|
108
108
|
data-dark={false}
|
|
109
109
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/internals/CheckboxInput Checked 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/internals/CheckboxInput > Checked 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -13,7 +13,7 @@ exports[`Storybook Tests react/internals/CheckboxInput Checked 1`] = `
|
|
|
13
13
|
</div>
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
exports[`Storybook Tests react/internals/CheckboxInput Default 1`] = `
|
|
16
|
+
exports[`Storybook Tests > react/internals/CheckboxInput > Default 1`] = `
|
|
17
17
|
<div
|
|
18
18
|
data-dark={false}
|
|
19
19
|
>
|
|
@@ -25,7 +25,7 @@ exports[`Storybook Tests react/internals/CheckboxInput Default 1`] = `
|
|
|
25
25
|
</div>
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
|
-
exports[`Storybook Tests react/internals/CheckboxInput Disabled 1`] = `
|
|
28
|
+
exports[`Storybook Tests > react/internals/CheckboxInput > Disabled 1`] = `
|
|
29
29
|
<div
|
|
30
30
|
data-dark={false}
|
|
31
31
|
>
|
|
@@ -39,7 +39,7 @@ exports[`Storybook Tests react/internals/CheckboxInput Disabled 1`] = `
|
|
|
39
39
|
</div>
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
|
-
exports[`Storybook Tests react/internals/CheckboxInput Invalid 1`] = `
|
|
42
|
+
exports[`Storybook Tests > react/internals/CheckboxInput > Invalid 1`] = `
|
|
43
43
|
<div
|
|
44
44
|
data-dark={false}
|
|
45
45
|
>
|
|
@@ -53,13 +53,13 @@ exports[`Storybook Tests react/internals/CheckboxInput Invalid 1`] = `
|
|
|
53
53
|
</div>
|
|
54
54
|
`;
|
|
55
55
|
|
|
56
|
-
exports[`Storybook Tests react/internals/CheckboxInput Rounded 1`] = `
|
|
56
|
+
exports[`Storybook Tests > react/internals/CheckboxInput > Rounded 1`] = `
|
|
57
57
|
<div
|
|
58
58
|
data-dark={false}
|
|
59
59
|
>
|
|
60
60
|
<div
|
|
61
61
|
style={
|
|
62
|
-
{
|
|
62
|
+
Object {
|
|
63
63
|
"backgroundColor": "var(--charcoal-background2)",
|
|
64
64
|
"padding": 8,
|
|
65
65
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/Checkbox Checked 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/Checkbox > Checked 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -24,7 +24,7 @@ exports[`Storybook Tests react/Checkbox Checked 1`] = `
|
|
|
24
24
|
</div>
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
exports[`Storybook Tests react/Checkbox Default 1`] = `
|
|
27
|
+
exports[`Storybook Tests > react/Checkbox > Default 1`] = `
|
|
28
28
|
<div
|
|
29
29
|
data-dark={false}
|
|
30
30
|
>
|
|
@@ -37,7 +37,7 @@ exports[`Storybook Tests react/Checkbox Default 1`] = `
|
|
|
37
37
|
</div>
|
|
38
38
|
`;
|
|
39
39
|
|
|
40
|
-
exports[`Storybook Tests react/Checkbox Disabled 1`] = `
|
|
40
|
+
exports[`Storybook Tests > react/Checkbox > Disabled 1`] = `
|
|
41
41
|
<div
|
|
42
42
|
data-dark={false}
|
|
43
43
|
>
|
|
@@ -62,7 +62,7 @@ exports[`Storybook Tests react/Checkbox Disabled 1`] = `
|
|
|
62
62
|
</div>
|
|
63
63
|
`;
|
|
64
64
|
|
|
65
|
-
exports[`Storybook Tests react/Checkbox Invalid 1`] = `
|
|
65
|
+
exports[`Storybook Tests > react/Checkbox > Invalid 1`] = `
|
|
66
66
|
<div
|
|
67
67
|
data-dark={false}
|
|
68
68
|
>
|
|
@@ -87,7 +87,7 @@ exports[`Storybook Tests react/Checkbox Invalid 1`] = `
|
|
|
87
87
|
</div>
|
|
88
88
|
`;
|
|
89
89
|
|
|
90
|
-
exports[`Storybook Tests react/Checkbox Label 1`] = `
|
|
90
|
+
exports[`Storybook Tests > react/Checkbox > Label 1`] = `
|
|
91
91
|
<div
|
|
92
92
|
data-dark={false}
|
|
93
93
|
>
|
|
@@ -110,7 +110,7 @@ exports[`Storybook Tests react/Checkbox Label 1`] = `
|
|
|
110
110
|
</div>
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
|
-
exports[`Storybook Tests react/Checkbox ReadOnly 1`] = `
|
|
113
|
+
exports[`Storybook Tests > react/Checkbox > ReadOnly 1`] = `
|
|
114
114
|
<div
|
|
115
115
|
data-dark={false}
|
|
116
116
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/Clickable Button 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/Clickable > Button 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -13,7 +13,7 @@ exports[`Storybook Tests react/Clickable Button 1`] = `
|
|
|
13
13
|
</div>
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
exports[`Storybook Tests react/Clickable Link 1`] = `
|
|
16
|
+
exports[`Storybook Tests > react/Clickable > Link 1`] = `
|
|
17
17
|
<div
|
|
18
18
|
data-dark={false}
|
|
19
19
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/internals/ListItem Basic 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/internals/ListItem > Basic 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -27,7 +27,7 @@ exports[`Storybook Tests react/internals/ListItem Basic 1`] = `
|
|
|
27
27
|
className="charcoal-list-item"
|
|
28
28
|
href="#"
|
|
29
29
|
style={
|
|
30
|
-
{
|
|
30
|
+
Object {
|
|
31
31
|
"color": "red",
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -41,7 +41,7 @@ exports[`Storybook Tests react/internals/ListItem Basic 1`] = `
|
|
|
41
41
|
Switch
|
|
42
42
|
<div
|
|
43
43
|
style={
|
|
44
|
-
{
|
|
44
|
+
Object {
|
|
45
45
|
"marginLeft": "auto",
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/internals/MenuList Basic 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/internals/MenuList > Basic 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -121,7 +121,7 @@ exports[`Storybook Tests react/internals/MenuList Basic 1`] = `
|
|
|
121
121
|
</div>
|
|
122
122
|
`;
|
|
123
123
|
|
|
124
|
-
exports[`Storybook Tests react/internals/MenuList Disabled 1`] = `
|
|
124
|
+
exports[`Storybook Tests > react/internals/MenuList > Disabled 1`] = `
|
|
125
125
|
<div
|
|
126
126
|
data-dark={false}
|
|
127
127
|
>
|
|
@@ -152,7 +152,7 @@ exports[`Storybook Tests react/internals/MenuList Disabled 1`] = `
|
|
|
152
152
|
</div>
|
|
153
153
|
`;
|
|
154
154
|
|
|
155
|
-
exports[`Storybook Tests react/internals/MenuList Group 1`] = `
|
|
155
|
+
exports[`Storybook Tests > react/internals/MenuList > Group 1`] = `
|
|
156
156
|
<div
|
|
157
157
|
data-dark={false}
|
|
158
158
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/internals/Popover Basic 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/internals/Popover > Basic 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
data-dark={false}
|
|
6
6
|
>
|
|
@@ -8,7 +8,7 @@ exports[`Storybook Tests react/internals/Popover Basic 1`] = `
|
|
|
8
8
|
className="charcoal-button"
|
|
9
9
|
onClick={[Function]}
|
|
10
10
|
style={
|
|
11
|
-
{
|
|
11
|
+
Object {
|
|
12
12
|
"position": "absolute",
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ exports[`Storybook Tests react/internals/Popover Basic 1`] = `
|
|
|
19
19
|
className="charcoal-button"
|
|
20
20
|
onClick={[Function]}
|
|
21
21
|
style={
|
|
22
|
-
{
|
|
22
|
+
Object {
|
|
23
23
|
"position": "absolute",
|
|
24
24
|
"right": 8,
|
|
25
25
|
}
|
|
@@ -31,7 +31,7 @@ exports[`Storybook Tests react/internals/Popover Basic 1`] = `
|
|
|
31
31
|
className="charcoal-button"
|
|
32
32
|
onClick={[Function]}
|
|
33
33
|
style={
|
|
34
|
-
{
|
|
34
|
+
Object {
|
|
35
35
|
"bottom": 8,
|
|
36
36
|
"position": "absolute",
|
|
37
37
|
}
|
|
@@ -43,7 +43,7 @@ exports[`Storybook Tests react/internals/Popover Basic 1`] = `
|
|
|
43
43
|
className="charcoal-button"
|
|
44
44
|
onClick={[Function]}
|
|
45
45
|
style={
|
|
46
|
-
{
|
|
46
|
+
Object {
|
|
47
47
|
"bottom": 8,
|
|
48
48
|
"position": "absolute",
|
|
49
49
|
"right": 8,
|