@charcoal-ui/react 3.13.0 → 3.14.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/Switch/index.d.ts.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
- package/src/README.mdx +68 -0
- package/src/SSR.mdx +67 -0
- package/src/_lib/index.ts +1 -1
- package/src/components/Button/__snapshots__/index.story.storyshot +9 -9
- 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 +1 -1
- package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +23 -23
- package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +1 -1
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +14 -14
- package/src/components/Icon/__snapshots__/index.story.storyshot +1 -1
- package/src/components/IconButton/__snapshots__/index.story.storyshot +3 -3
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +4 -4
- package/src/components/Modal/index.story.tsx +7 -0
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +4 -4
- package/src/components/MultiSelect/index.test.tsx +6 -5
- package/src/components/Radio/__snapshots__/index.story.storyshot +5 -5
- 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/Switch/index.tsx +0 -1
- package/src/components/TagItem/__snapshots__/index.story.storyshot +8 -8
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +11 -11
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +13 -13
- package/src/components/Modal/__snapshots__/index.story.storyshot +0 -3932
- package/src/components/a11y.test.tsx +0 -99
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "rimraf dist .tsbuildinfo"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@charcoal-ui/esbuild-plugin-styled-components": "^3.
|
|
23
|
+
"@charcoal-ui/esbuild-plugin-styled-components": "^3.14.0",
|
|
24
24
|
"@react-types/dialog": "^3.5.8",
|
|
25
25
|
"@react-types/switch": "^3.1.2",
|
|
26
26
|
"@storybook/addon-actions": "^8.0.5",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"typescript": "^4.9.5"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@charcoal-ui/foundation": "^3.
|
|
52
|
-
"@charcoal-ui/icons": "^3.
|
|
53
|
-
"@charcoal-ui/styled": "^3.
|
|
54
|
-
"@charcoal-ui/theme": "^3.
|
|
55
|
-
"@charcoal-ui/utils": "^3.
|
|
51
|
+
"@charcoal-ui/foundation": "^3.14.0",
|
|
52
|
+
"@charcoal-ui/icons": "^3.14.0",
|
|
53
|
+
"@charcoal-ui/styled": "^3.14.0",
|
|
54
|
+
"@charcoal-ui/theme": "^3.14.0",
|
|
55
|
+
"@charcoal-ui/utils": "^3.14.0",
|
|
56
56
|
"@react-aria/button": "^3.9.1",
|
|
57
57
|
"@react-aria/checkbox": "^3.13.0",
|
|
58
58
|
"@react-aria/dialog": "^3.5.10",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"url": "https://github.com/pixiv/charcoal.git",
|
|
87
87
|
"directory": "packages/react"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "694af78ad36f1caa108a4c3fae4f51ce54b7f78b"
|
|
90
90
|
}
|
package/src/README.mdx
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, Props } from '@storybook/addon-docs'
|
|
2
|
+
|
|
3
|
+
<Meta title="react/README" />
|
|
4
|
+
|
|
5
|
+
# Quickstart
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@charcoal-ui/react)
|
|
8
|
+
|
|
9
|
+
## インストール
|
|
10
|
+
|
|
11
|
+
以下のいずれかのパッケージマネージャーを使用してインストールしてください
|
|
12
|
+
|
|
13
|
+
### npm
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @charcoal-ui/react
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### yarn
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn add @charcoal-ui/react
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### pnpm
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add @charcoal-ui/react
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### bun
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun add @charcoal-ui/react
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
`@charcoal-ui/styled`と合わせて使用してください。
|
|
40
|
+
`ThemeProvider`、`TokenInjector`を使用してください。詳しくは `@charcoal-ui/styled`のクイックスタートを参照してください。
|
|
41
|
+
|
|
42
|
+
必要に応じて`SSRProvider`や`OverlayProvider`も使用してください。
|
|
43
|
+
|
|
44
|
+
また、`ThemeProvider`、`TokenInjector`、`SSRProvider`、`OverlayProvider`を内包した CharcoalProvider を使用することもできます。
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { CharcoalProvider } from '@charcoal-ui/react'
|
|
48
|
+
import { prefersColorScheme, themeSelector } from '@charcoal-ui/styled'
|
|
49
|
+
import { dark, light } from '@charcoal-ui/theme'
|
|
50
|
+
import { FC, ReactNode } from 'react'
|
|
51
|
+
|
|
52
|
+
export const CharcoalProviderExample: FC<{ children: ReactNode }> = ({
|
|
53
|
+
children,
|
|
54
|
+
}) => {
|
|
55
|
+
return (
|
|
56
|
+
<CharcoalProvider
|
|
57
|
+
themeMap={{
|
|
58
|
+
':root': light,
|
|
59
|
+
[themeSelector('light')]: light,
|
|
60
|
+
[themeSelector('dark')]: dark,
|
|
61
|
+
[prefersColorScheme('dark')]: dark,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</CharcoalProvider>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
```
|
package/src/SSR.mdx
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs'
|
|
2
|
+
|
|
3
|
+
<Meta title="react/SSR Guide" />
|
|
4
|
+
|
|
5
|
+
# サーバーサイドレンダリング
|
|
6
|
+
|
|
7
|
+
charcoal は [Next.js](https://nextjs.org/) などのサーバーサイドレンダリングをサポートしています。
|
|
8
|
+
|
|
9
|
+
## SSRProvider
|
|
10
|
+
|
|
11
|
+
React18 以下で SSR を利用する際は`SSRProvider`をアプリケーションに適用してください。[react-aria の SSRProvider について](https://react-spectrum.adobe.com/react-aria/SSRProvider.html)
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { FC, ReactNode } from 'react'
|
|
15
|
+
import { SSRProvider } from '@charcoal-ui/react'
|
|
16
|
+
|
|
17
|
+
const YourAppProvider: FC<{ children: ReactNode }> = ({ children }) => {
|
|
18
|
+
return <SSRProvider>{children}</SSRProvider>
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ダークテーマ
|
|
23
|
+
|
|
24
|
+
ダークテーマを利用する場合は、`makeSetThemeScriptCode`を用いてアプリケーションの起動前にテーマを変更するスクリプトを実行してください。これによりクライアントサイドのレンダリングによるテーマのチラつきを抑えることができます。Next.js の場合は `_document.tsx` に下記のように記述することができます([Next.js の document.tsx について](https://nextjs.org/docs/advanced-features/custom-document))。
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
export default class MyDocument extends Document {
|
|
28
|
+
render() {
|
|
29
|
+
const setThemeScript = makeSetThemeScriptCode()
|
|
30
|
+
return (
|
|
31
|
+
<Html>
|
|
32
|
+
<Head>
|
|
33
|
+
<Script id="set-theme-script" strategy="beforeInteractive">
|
|
34
|
+
{setThemeScript}
|
|
35
|
+
</Script>
|
|
36
|
+
</Head>
|
|
37
|
+
<body>
|
|
38
|
+
<Main />
|
|
39
|
+
<NextScript />
|
|
40
|
+
</body>
|
|
41
|
+
</Html>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Modal
|
|
48
|
+
|
|
49
|
+
[Modal](/docs/react-modal--docs) を利用する際は `portalContainer`に `document.body`を適用してください。このとき、サーバサイドでは`isOpen`を `true` にしないでください。`document`を参照できずにエラーになります。
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { FC, ReactNode } from 'react'
|
|
53
|
+
import { Modal } from '@charcoal-ui/react'
|
|
54
|
+
|
|
55
|
+
const Example: FC<{ children: ReactNode }> = ({ children }) => {
|
|
56
|
+
return (
|
|
57
|
+
<Modal
|
|
58
|
+
title="modal"
|
|
59
|
+
isOpen={isOpen}
|
|
60
|
+
onClose={() => setIsOpen(false)}
|
|
61
|
+
portalContainer={document.body}
|
|
62
|
+
>
|
|
63
|
+
{children}
|
|
64
|
+
</Modal>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
```
|
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
|
.c0 {
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
-webkit-appearance: none;
|
|
@@ -116,7 +116,7 @@ exports[`Storybook Tests react/Button Danger 1`] = `
|
|
|
116
116
|
</div>
|
|
117
117
|
`;
|
|
118
118
|
|
|
119
|
-
exports[`Storybook Tests react/Button Default 1`] = `
|
|
119
|
+
exports[`Storybook Tests > react/Button > Default 1`] = `
|
|
120
120
|
.c0 {
|
|
121
121
|
cursor: pointer;
|
|
122
122
|
-webkit-appearance: none;
|
|
@@ -232,7 +232,7 @@ exports[`Storybook Tests react/Button Default 1`] = `
|
|
|
232
232
|
</div>
|
|
233
233
|
`;
|
|
234
234
|
|
|
235
|
-
exports[`Storybook Tests react/Button Disabled 1`] = `
|
|
235
|
+
exports[`Storybook Tests > react/Button > Disabled 1`] = `
|
|
236
236
|
.c0 {
|
|
237
237
|
cursor: pointer;
|
|
238
238
|
-webkit-appearance: none;
|
|
@@ -348,7 +348,7 @@ exports[`Storybook Tests react/Button Disabled 1`] = `
|
|
|
348
348
|
</div>
|
|
349
349
|
`;
|
|
350
350
|
|
|
351
|
-
exports[`Storybook Tests react/Button FullWidth 1`] = `
|
|
351
|
+
exports[`Storybook Tests > react/Button > FullWidth 1`] = `
|
|
352
352
|
.c0 {
|
|
353
353
|
cursor: pointer;
|
|
354
354
|
-webkit-appearance: none;
|
|
@@ -464,7 +464,7 @@ exports[`Storybook Tests react/Button FullWidth 1`] = `
|
|
|
464
464
|
</div>
|
|
465
465
|
`;
|
|
466
466
|
|
|
467
|
-
exports[`Storybook Tests react/Button IsActive 1`] = `
|
|
467
|
+
exports[`Storybook Tests > react/Button > IsActive 1`] = `
|
|
468
468
|
.c0 {
|
|
469
469
|
cursor: pointer;
|
|
470
470
|
-webkit-appearance: none;
|
|
@@ -574,7 +574,7 @@ exports[`Storybook Tests react/Button IsActive 1`] = `
|
|
|
574
574
|
</div>
|
|
575
575
|
`;
|
|
576
576
|
|
|
577
|
-
exports[`Storybook Tests react/Button Navigation 1`] = `
|
|
577
|
+
exports[`Storybook Tests > react/Button > Navigation 1`] = `
|
|
578
578
|
.c0 {
|
|
579
579
|
cursor: pointer;
|
|
580
580
|
-webkit-appearance: none;
|
|
@@ -690,7 +690,7 @@ exports[`Storybook Tests react/Button Navigation 1`] = `
|
|
|
690
690
|
</div>
|
|
691
691
|
`;
|
|
692
692
|
|
|
693
|
-
exports[`Storybook Tests react/Button Overlay 1`] = `
|
|
693
|
+
exports[`Storybook Tests > react/Button > Overlay 1`] = `
|
|
694
694
|
.c0 {
|
|
695
695
|
cursor: pointer;
|
|
696
696
|
-webkit-appearance: none;
|
|
@@ -806,7 +806,7 @@ exports[`Storybook Tests react/Button Overlay 1`] = `
|
|
|
806
806
|
</div>
|
|
807
807
|
`;
|
|
808
808
|
|
|
809
|
-
exports[`Storybook Tests react/Button Primary 1`] = `
|
|
809
|
+
exports[`Storybook Tests > react/Button > Primary 1`] = `
|
|
810
810
|
.c0 {
|
|
811
811
|
cursor: pointer;
|
|
812
812
|
-webkit-appearance: none;
|
|
@@ -922,7 +922,7 @@ exports[`Storybook Tests react/Button Primary 1`] = `
|
|
|
922
922
|
</div>
|
|
923
923
|
`;
|
|
924
924
|
|
|
925
|
-
exports[`Storybook Tests react/Button Small 1`] = `
|
|
925
|
+
exports[`Storybook Tests > react/Button > Small 1`] = `
|
|
926
926
|
.c0 {
|
|
927
927
|
cursor: pointer;
|
|
928
928
|
-webkit-appearance: none;
|
|
@@ -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
|
.c0 {
|
|
5
5
|
position: relative;
|
|
6
6
|
display: -webkit-box;
|
|
@@ -167,7 +167,7 @@ exports[`Storybook Tests react/Checkbox Checked 1`] = `
|
|
|
167
167
|
</div>
|
|
168
168
|
`;
|
|
169
169
|
|
|
170
|
-
exports[`Storybook Tests react/Checkbox Default 1`] = `
|
|
170
|
+
exports[`Storybook Tests > react/Checkbox > Default 1`] = `
|
|
171
171
|
.c0 {
|
|
172
172
|
position: relative;
|
|
173
173
|
display: -webkit-box;
|
|
@@ -325,7 +325,7 @@ exports[`Storybook Tests react/Checkbox Default 1`] = `
|
|
|
325
325
|
</div>
|
|
326
326
|
`;
|
|
327
327
|
|
|
328
|
-
exports[`Storybook Tests react/Checkbox Disabled 1`] = `
|
|
328
|
+
exports[`Storybook Tests > react/Checkbox > Disabled 1`] = `
|
|
329
329
|
.c0 {
|
|
330
330
|
position: relative;
|
|
331
331
|
display: -webkit-box;
|
|
@@ -493,7 +493,7 @@ exports[`Storybook Tests react/Checkbox Disabled 1`] = `
|
|
|
493
493
|
</div>
|
|
494
494
|
`;
|
|
495
495
|
|
|
496
|
-
exports[`Storybook Tests react/Checkbox Invalid 1`] = `
|
|
496
|
+
exports[`Storybook Tests > react/Checkbox > Invalid 1`] = `
|
|
497
497
|
.c0 {
|
|
498
498
|
position: relative;
|
|
499
499
|
display: -webkit-box;
|
|
@@ -662,7 +662,7 @@ exports[`Storybook Tests react/Checkbox Invalid 1`] = `
|
|
|
662
662
|
</div>
|
|
663
663
|
`;
|
|
664
664
|
|
|
665
|
-
exports[`Storybook Tests react/Checkbox Label 1`] = `
|
|
665
|
+
exports[`Storybook Tests > react/Checkbox > Label 1`] = `
|
|
666
666
|
.c0 {
|
|
667
667
|
position: relative;
|
|
668
668
|
display: -webkit-box;
|
|
@@ -830,7 +830,7 @@ exports[`Storybook Tests react/Checkbox Label 1`] = `
|
|
|
830
830
|
</div>
|
|
831
831
|
`;
|
|
832
832
|
|
|
833
|
-
exports[`Storybook Tests react/Checkbox ReadOnly 1`] = `
|
|
833
|
+
exports[`Storybook Tests > react/Checkbox > ReadOnly 1`] = `
|
|
834
834
|
.c0 {
|
|
835
835
|
position: relative;
|
|
836
836
|
display: -webkit-box;
|
|
@@ -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
|
.c0 {
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
-webkit-appearance: none;
|
|
@@ -51,7 +51,7 @@ exports[`Storybook Tests react/Clickable Button 1`] = `
|
|
|
51
51
|
</div>
|
|
52
52
|
`;
|
|
53
53
|
|
|
54
|
-
exports[`Storybook Tests react/Clickable Link 1`] = `
|
|
54
|
+
exports[`Storybook Tests > react/Clickable > Link 1`] = `
|
|
55
55
|
.c0 {
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
-webkit-appearance: none;
|
|
@@ -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
|
.c0 {
|
|
5
5
|
padding: 0;
|
|
6
6
|
margin: 0;
|
|
@@ -210,7 +210,7 @@ exports[`Storybook Tests react/internals/MenuList Basic 1`] = `
|
|
|
210
210
|
</div>
|
|
211
211
|
`;
|
|
212
212
|
|
|
213
|
-
exports[`Storybook Tests react/internals/MenuList Disabled 1`] = `
|
|
213
|
+
exports[`Storybook Tests > react/internals/MenuList > Disabled 1`] = `
|
|
214
214
|
.c0 {
|
|
215
215
|
padding: 0;
|
|
216
216
|
margin: 0;
|
|
@@ -291,32 +291,12 @@ exports[`Storybook Tests react/internals/MenuList Disabled 1`] = `
|
|
|
291
291
|
</div>
|
|
292
292
|
`;
|
|
293
293
|
|
|
294
|
-
exports[`Storybook Tests react/internals/MenuList Group 1`] = `
|
|
294
|
+
exports[`Storybook Tests > react/internals/MenuList > Group 1`] = `
|
|
295
295
|
.c0 {
|
|
296
296
|
padding: 0;
|
|
297
297
|
margin: 0;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.c2 {
|
|
301
|
-
display: block;
|
|
302
|
-
color: var(--charcoal-text3);
|
|
303
|
-
font-size: 12px;
|
|
304
|
-
font-weight: bold;
|
|
305
|
-
padding: 12px 0 8px 16px;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.c3 {
|
|
309
|
-
padding-left: 0;
|
|
310
|
-
margin: 0;
|
|
311
|
-
box-sizing: border-box;
|
|
312
|
-
list-style: none;
|
|
313
|
-
overflow: hidden;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.c1 {
|
|
317
|
-
display: block;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
300
|
.c4 {
|
|
321
301
|
list-style: none;
|
|
322
302
|
}
|
|
@@ -351,6 +331,26 @@ exports[`Storybook Tests react/internals/MenuList Group 1`] = `
|
|
|
351
331
|
background-color: var(--charcoal-surface3);
|
|
352
332
|
}
|
|
353
333
|
|
|
334
|
+
.c2 {
|
|
335
|
+
display: block;
|
|
336
|
+
color: var(--charcoal-text3);
|
|
337
|
+
font-size: 12px;
|
|
338
|
+
font-weight: bold;
|
|
339
|
+
padding: 12px 0 8px 16px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.c3 {
|
|
343
|
+
padding-left: 0;
|
|
344
|
+
margin: 0;
|
|
345
|
+
box-sizing: border-box;
|
|
346
|
+
list-style: none;
|
|
347
|
+
overflow: hidden;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.c1 {
|
|
351
|
+
display: block;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
354
|
<div
|
|
355
355
|
data-dark={false}
|
|
356
356
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/DropdownSelector > AssistiveText 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
width: 100%;
|
|
@@ -186,7 +186,7 @@ exports[`Storybook Tests react/DropdownSelector AssistiveText 1`] = `
|
|
|
186
186
|
</div>
|
|
187
187
|
`;
|
|
188
188
|
|
|
189
|
-
exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
189
|
+
exports[`Storybook Tests > react/DropdownSelector > CustomChildren 1`] = `
|
|
190
190
|
.c0 {
|
|
191
191
|
display: inline-block;
|
|
192
192
|
width: 100%;
|
|
@@ -351,7 +351,7 @@ exports[`Storybook Tests react/DropdownSelector CustomChildren 1`] = `
|
|
|
351
351
|
</div>
|
|
352
352
|
`;
|
|
353
353
|
|
|
354
|
-
exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
354
|
+
exports[`Storybook Tests > react/DropdownSelector > Default 1`] = `
|
|
355
355
|
.c0 {
|
|
356
356
|
display: inline-block;
|
|
357
357
|
width: 100%;
|
|
@@ -508,7 +508,7 @@ exports[`Storybook Tests react/DropdownSelector Default 1`] = `
|
|
|
508
508
|
</div>
|
|
509
509
|
`;
|
|
510
510
|
|
|
511
|
-
exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
511
|
+
exports[`Storybook Tests > react/DropdownSelector > Disabled 1`] = `
|
|
512
512
|
.c0 {
|
|
513
513
|
display: inline-block;
|
|
514
514
|
width: 100%;
|
|
@@ -667,7 +667,7 @@ exports[`Storybook Tests react/DropdownSelector Disabled 1`] = `
|
|
|
667
667
|
</div>
|
|
668
668
|
`;
|
|
669
669
|
|
|
670
|
-
exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
670
|
+
exports[`Storybook Tests > react/DropdownSelector > DisabledItem 1`] = `
|
|
671
671
|
.c0 {
|
|
672
672
|
display: inline-block;
|
|
673
673
|
width: 100%;
|
|
@@ -835,7 +835,7 @@ exports[`Storybook Tests react/DropdownSelector DisabledItem 1`] = `
|
|
|
835
835
|
</div>
|
|
836
836
|
`;
|
|
837
837
|
|
|
838
|
-
exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
838
|
+
exports[`Storybook Tests > react/DropdownSelector > InFormTag 1`] = `
|
|
839
839
|
.c4 {
|
|
840
840
|
cursor: pointer;
|
|
841
841
|
-webkit-appearance: none;
|
|
@@ -1110,7 +1110,7 @@ exports[`Storybook Tests react/DropdownSelector InFormTag 1`] = `
|
|
|
1110
1110
|
</div>
|
|
1111
1111
|
`;
|
|
1112
1112
|
|
|
1113
|
-
exports[`Storybook Tests react/DropdownSelector InModal 1`] = `
|
|
1113
|
+
exports[`Storybook Tests > react/DropdownSelector > InModal 1`] = `
|
|
1114
1114
|
<div
|
|
1115
1115
|
data-dark={false}
|
|
1116
1116
|
>
|
|
@@ -1130,7 +1130,7 @@ exports[`Storybook Tests react/DropdownSelector InModal 1`] = `
|
|
|
1130
1130
|
</div>
|
|
1131
1131
|
`;
|
|
1132
1132
|
|
|
1133
|
-
exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
1133
|
+
exports[`Storybook Tests > react/DropdownSelector > Invalid 1`] = `
|
|
1134
1134
|
.c0 {
|
|
1135
1135
|
display: inline-block;
|
|
1136
1136
|
width: 100%;
|
|
@@ -1292,7 +1292,7 @@ exports[`Storybook Tests react/DropdownSelector Invalid 1`] = `
|
|
|
1292
1292
|
</div>
|
|
1293
1293
|
`;
|
|
1294
1294
|
|
|
1295
|
-
exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
1295
|
+
exports[`Storybook Tests > react/DropdownSelector > InvalidAssistiveText 1`] = `
|
|
1296
1296
|
.c0 {
|
|
1297
1297
|
display: inline-block;
|
|
1298
1298
|
width: 100%;
|
|
@@ -1484,7 +1484,7 @@ exports[`Storybook Tests react/DropdownSelector InvalidAssistiveText 1`] = `
|
|
|
1484
1484
|
</div>
|
|
1485
1485
|
`;
|
|
1486
1486
|
|
|
1487
|
-
exports[`Storybook Tests react/DropdownSelector Label 1`] = `
|
|
1487
|
+
exports[`Storybook Tests > react/DropdownSelector > Label 1`] = `
|
|
1488
1488
|
.c3 {
|
|
1489
1489
|
font-size: 14px;
|
|
1490
1490
|
line-height: 22px;
|
|
@@ -1744,7 +1744,7 @@ exports[`Storybook Tests react/DropdownSelector Label 1`] = `
|
|
|
1744
1744
|
</div>
|
|
1745
1745
|
`;
|
|
1746
1746
|
|
|
1747
|
-
exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
1747
|
+
exports[`Storybook Tests > react/DropdownSelector > LongNames 1`] = `
|
|
1748
1748
|
.c0 {
|
|
1749
1749
|
display: inline-block;
|
|
1750
1750
|
width: 100%;
|
|
@@ -1901,7 +1901,7 @@ exports[`Storybook Tests react/DropdownSelector LongNames 1`] = `
|
|
|
1901
1901
|
</div>
|
|
1902
1902
|
`;
|
|
1903
1903
|
|
|
1904
|
-
exports[`Storybook Tests react/DropdownSelector RequiredText 1`] = `
|
|
1904
|
+
exports[`Storybook Tests > react/DropdownSelector > RequiredText 1`] = `
|
|
1905
1905
|
.c3 {
|
|
1906
1906
|
font-size: 14px;
|
|
1907
1907
|
line-height: 22px;
|
|
@@ -2198,7 +2198,7 @@ exports[`Storybook Tests react/DropdownSelector RequiredText 1`] = `
|
|
|
2198
2198
|
</div>
|
|
2199
2199
|
`;
|
|
2200
2200
|
|
|
2201
|
-
exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
2201
|
+
exports[`Storybook Tests > react/DropdownSelector > Section 1`] = `
|
|
2202
2202
|
.c0 {
|
|
2203
2203
|
display: inline-block;
|
|
2204
2204
|
width: 100%;
|
|
@@ -2370,7 +2370,7 @@ exports[`Storybook Tests react/DropdownSelector Section 1`] = `
|
|
|
2370
2370
|
</div>
|
|
2371
2371
|
`;
|
|
2372
2372
|
|
|
2373
|
-
exports[`Storybook Tests react/DropdownSelector SubLabel 1`] = `
|
|
2373
|
+
exports[`Storybook Tests > react/DropdownSelector > SubLabel 1`] = `
|
|
2374
2374
|
.c3 {
|
|
2375
2375
|
font-size: 14px;
|
|
2376
2376
|
line-height: 22px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/IconButton Default 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/IconButton > Default 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
-webkit-appearance: none;
|
|
@@ -113,7 +113,7 @@ exports[`Storybook Tests react/IconButton Default 1`] = `
|
|
|
113
113
|
</div>
|
|
114
114
|
`;
|
|
115
115
|
|
|
116
|
-
exports[`Storybook Tests react/IconButton IsActive 1`] = `
|
|
116
|
+
exports[`Storybook Tests > react/IconButton > IsActive 1`] = `
|
|
117
117
|
.c0 {
|
|
118
118
|
cursor: pointer;
|
|
119
119
|
-webkit-appearance: none;
|
|
@@ -219,7 +219,7 @@ exports[`Storybook Tests react/IconButton IsActive 1`] = `
|
|
|
219
219
|
</div>
|
|
220
220
|
`;
|
|
221
221
|
|
|
222
|
-
exports[`Storybook Tests react/IconButton Overlay 1`] = `
|
|
222
|
+
exports[`Storybook Tests > react/IconButton > Overlay 1`] = `
|
|
223
223
|
.c0 {
|
|
224
224
|
cursor: pointer;
|
|
225
225
|
-webkit-appearance: none;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/LoadingSpinner Default 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/LoadingSpinner > Default 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
box-sizing: content-box;
|
|
6
6
|
margin: auto;
|
|
@@ -46,7 +46,7 @@ exports[`Storybook Tests react/LoadingSpinner Default 1`] = `
|
|
|
46
46
|
</div>
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
-
exports[`Storybook Tests react/LoadingSpinner Padding 1`] = `
|
|
49
|
+
exports[`Storybook Tests > react/LoadingSpinner > Padding 1`] = `
|
|
50
50
|
.c0 {
|
|
51
51
|
box-sizing: content-box;
|
|
52
52
|
margin: auto;
|
|
@@ -92,7 +92,7 @@ exports[`Storybook Tests react/LoadingSpinner Padding 1`] = `
|
|
|
92
92
|
</div>
|
|
93
93
|
`;
|
|
94
94
|
|
|
95
|
-
exports[`Storybook Tests react/LoadingSpinner Size 1`] = `
|
|
95
|
+
exports[`Storybook Tests > react/LoadingSpinner > Size 1`] = `
|
|
96
96
|
.c0 {
|
|
97
97
|
box-sizing: content-box;
|
|
98
98
|
margin: auto;
|
|
@@ -138,7 +138,7 @@ exports[`Storybook Tests react/LoadingSpinner Size 1`] = `
|
|
|
138
138
|
</div>
|
|
139
139
|
`;
|
|
140
140
|
|
|
141
|
-
exports[`Storybook Tests react/LoadingSpinner Transparent 1`] = `
|
|
141
|
+
exports[`Storybook Tests > react/LoadingSpinner > Transparent 1`] = `
|
|
142
142
|
.c0 {
|
|
143
143
|
box-sizing: content-box;
|
|
144
144
|
margin: auto;
|
|
@@ -12,6 +12,7 @@ import styled from 'styled-components'
|
|
|
12
12
|
import { theme } from '../../styled'
|
|
13
13
|
import TextField from '../TextField'
|
|
14
14
|
import DropdownSelector from '../DropdownSelector'
|
|
15
|
+
import Checkbox from '../Checkbox'
|
|
15
16
|
import DropdownMenuItem from '../DropdownSelector/DropdownMenuItem'
|
|
16
17
|
import { Meta, StoryObj } from '@storybook/react'
|
|
17
18
|
|
|
@@ -54,6 +55,11 @@ export default {
|
|
|
54
55
|
</OverlayProvider>
|
|
55
56
|
)
|
|
56
57
|
},
|
|
58
|
+
parameters: {
|
|
59
|
+
storyshots: {
|
|
60
|
+
skip: true,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
57
63
|
} as Meta<typeof Modal>
|
|
58
64
|
|
|
59
65
|
const M = (props: ModalProps) => {
|
|
@@ -201,6 +207,7 @@ export const BottomSheet: StoryObj<typeof Modal> = {
|
|
|
201
207
|
</StyledModalText>
|
|
202
208
|
</ModalVStack>
|
|
203
209
|
<ModalButtons>
|
|
210
|
+
<Checkbox checked>test checkbox</Checkbox>
|
|
204
211
|
<Button variant="Danger" onClick={() => state.close()} fullWidth>
|
|
205
212
|
削除する
|
|
206
213
|
</Button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests react/MultiSelect Basic 1`] = `
|
|
3
|
+
exports[`Storybook Tests > react/MultiSelect > Basic 1`] = `
|
|
4
4
|
.c1 {
|
|
5
5
|
display: grid;
|
|
6
6
|
grid-template-columns: auto 1fr;
|
|
@@ -260,7 +260,7 @@ exports[`Storybook Tests react/MultiSelect Basic 1`] = `
|
|
|
260
260
|
</div>
|
|
261
261
|
`;
|
|
262
262
|
|
|
263
|
-
exports[`Storybook Tests react/MultiSelect Invalid 1`] = `
|
|
263
|
+
exports[`Storybook Tests > react/MultiSelect > Invalid 1`] = `
|
|
264
264
|
.c1 {
|
|
265
265
|
display: grid;
|
|
266
266
|
grid-template-columns: auto 1fr;
|
|
@@ -525,7 +525,7 @@ exports[`Storybook Tests react/MultiSelect Invalid 1`] = `
|
|
|
525
525
|
</div>
|
|
526
526
|
`;
|
|
527
527
|
|
|
528
|
-
exports[`Storybook Tests react/MultiSelect Overlay 1`] = `
|
|
528
|
+
exports[`Storybook Tests > react/MultiSelect > Overlay 1`] = `
|
|
529
529
|
.c1 {
|
|
530
530
|
display: grid;
|
|
531
531
|
grid-template-columns: auto 1fr;
|
|
@@ -789,7 +789,7 @@ exports[`Storybook Tests react/MultiSelect Overlay 1`] = `
|
|
|
789
789
|
</div>
|
|
790
790
|
`;
|
|
791
791
|
|
|
792
|
-
exports[`Storybook Tests react/MultiSelect Playground 1`] = `
|
|
792
|
+
exports[`Storybook Tests > react/MultiSelect > Playground 1`] = `
|
|
793
793
|
.c1 {
|
|
794
794
|
display: grid;
|
|
795
795
|
grid-template-columns: auto 1fr;
|