@charcoal-ui/react 6.0.0-beta.1 → 6.0.0-rc.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/Icon/index.d.ts +14 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +161 -155
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layered.css +161 -155
- package/dist/layered.css.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/css-output.test.ts +1 -2
- package/src/__tests__/css-variables.test.ts +66 -0
- package/src/components/Button/__snapshots__/index.css.snap +30 -30
- package/src/components/Button/index.css +30 -30
- package/src/components/Button/index.story.tsx +18 -0
- package/src/components/Checkbox/CheckboxInput/index.css +10 -10
- package/src/components/Checkbox/__snapshots__/index.css.snap +1 -1
- package/src/components/Checkbox/index.css +1 -1
- package/src/components/Checkbox/index.story.tsx +18 -0
- package/src/components/Clickable/index.story.tsx +14 -0
- package/src/components/DropdownSelector/DropdownMenuItem/index.css +3 -3
- package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +2 -0
- package/src/components/DropdownSelector/ListItem/index.css +1 -1
- package/src/components/DropdownSelector/MenuItemGroup/index.css +1 -1
- package/src/components/DropdownSelector/Popover/index.css +2 -2
- package/src/components/DropdownSelector/__snapshots__/index.css.snap +6 -6
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +26 -13
- package/src/components/DropdownSelector/index.css +6 -6
- package/src/components/DropdownSelector/index.story.tsx +49 -0
- package/src/components/FieldLabel/__snapshots__/index.css.snap +3 -3
- package/src/components/FieldLabel/index.css +3 -3
- package/src/components/HintText/__snapshots__/index.css.snap +3 -3
- package/src/components/HintText/__snapshots__/index.story.storyshot +4 -0
- package/src/components/HintText/index.css +3 -3
- package/src/components/HintText/index.story.tsx +12 -0
- package/src/components/Icon/__snapshots__/index.story.storyshot +2 -0
- package/src/components/Icon/index.browser.test.tsx +280 -0
- package/src/components/Icon/index.test.tsx +94 -0
- package/src/components/Icon/index.tsx +49 -4
- package/src/components/IconButton/__snapshots__/index.css.snap +16 -16
- package/src/components/IconButton/__snapshots__/index.story.storyshot +6 -0
- package/src/components/IconButton/index.css +16 -16
- package/src/components/IconButton/index.story.tsx +15 -0
- package/src/components/LoadingSpinner/__snapshots__/index.css.snap +7 -7
- package/src/components/LoadingSpinner/index.css +7 -7
- package/src/components/LoadingSpinner/index.story.tsx +13 -0
- package/src/components/Modal/Dialog/index.css +1 -1
- package/src/components/Modal/ModalPlumbing.css +1 -1
- package/src/components/Modal/__snapshots__/index.css.snap +2 -2
- package/src/components/Modal/__snapshots__/index.story.storyshot +12 -2
- package/src/components/Modal/index.css +2 -2
- package/src/components/Modal/index.story.tsx +20 -0
- package/src/components/MultiSelect/__snapshots__/index.css.snap +10 -10
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +32 -0
- package/src/components/MultiSelect/index.css +10 -10
- package/src/components/MultiSelect/index.story.tsx +50 -0
- package/src/components/MultiSelect/index.tsx +1 -1
- package/src/components/Pagination/Pagination.story.tsx +11 -0
- package/src/components/Pagination/__snapshots__/index.css.snap +12 -15
- package/src/components/Pagination/index.css +12 -14
- package/src/components/Pagination/index.tsx +2 -1
- package/src/components/Radio/RadioInput/index.css +10 -10
- package/src/components/Radio/__snapshots__/index.css.snap +1 -1
- package/src/components/Radio/index.css +1 -1
- package/src/components/Radio/index.story.tsx +40 -0
- package/src/components/SegmentedControl/__snapshots__/index.css.snap +4 -4
- package/src/components/SegmentedControl/index.css +4 -4
- package/src/components/SegmentedControl/index.story.tsx +20 -0
- package/src/components/Switch/SwitchInput/index.css +9 -9
- package/src/components/Switch/__snapshots__/index.css.snap +1 -1
- package/src/components/Switch/index.css +1 -1
- package/src/components/Switch/index.story.tsx +19 -0
- package/src/components/TagItem/__snapshots__/index.css.snap +5 -4
- package/src/components/TagItem/__snapshots__/index.story.storyshot +2 -0
- package/src/components/TagItem/index.css +5 -4
- package/src/components/TagItem/index.story.tsx +17 -0
- package/src/components/TextArea/TextArea.story.tsx +30 -0
- package/src/components/TextArea/__snapshots__/index.css.snap +7 -5
- package/src/components/TextArea/index.css +8 -5
- package/src/components/TextEllipsis/__snapshots__/index.css.snap +3 -0
- package/src/components/TextEllipsis/index.css +4 -0
- package/src/components/TextField/AssistiveText/index.css +2 -2
- package/src/components/TextField/TextField.story.tsx +30 -0
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +2 -0
- package/src/components/TextField/__snapshots__/index.css.snap +6 -6
- package/src/components/TextField/index.css +6 -6
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.charcoal-text-area-container {
|
|
12
|
+
/* Runtime variable overridden by the React component. */
|
|
13
|
+
--charcoal-text-area-rows: 4;
|
|
14
|
+
|
|
12
15
|
position: relative;
|
|
13
16
|
overflow: hidden;
|
|
14
17
|
|
|
15
|
-
color: var(--charcoal-
|
|
16
|
-
background-color: var(--charcoal-
|
|
18
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
19
|
+
background-color: var(--charcoal-color-container-secondary-default-a);
|
|
17
20
|
border-radius: 4px;
|
|
18
21
|
transition:
|
|
19
22
|
0.2s background-color,
|
|
@@ -30,7 +33,7 @@
|
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
&:not([aria-disabled='true']):hover {
|
|
33
|
-
background-color: var(--charcoal-
|
|
36
|
+
background-color: var(--charcoal-color-container-secondary-hover-a);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
&[aria-invalid='true']:focus-within {
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
&::placeholder {
|
|
69
|
-
color: var(--charcoal-
|
|
72
|
+
color: var(--charcoal-color-text-placeholder-default);
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
|
|
@@ -77,5 +80,5 @@
|
|
|
77
80
|
|
|
78
81
|
line-height: 22px;
|
|
79
82
|
font-size: 14px;
|
|
80
|
-
color: var(--charcoal-
|
|
83
|
+
color: var(--charcoal-color-text-tertiary-default);
|
|
81
84
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
font-size: 14px;
|
|
3
3
|
line-height: 22px;
|
|
4
4
|
margin: 0;
|
|
5
|
-
color: var(--charcoal-
|
|
5
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.charcoal-text-field-assistive-text[data-invalid='true'] {
|
|
9
|
-
color: var(--charcoal-
|
|
9
|
+
color: var(--charcoal-color-text-negative-default);
|
|
10
10
|
}
|
|
@@ -79,6 +79,36 @@ export const Invalid: StoryObj<typeof TextField> = {
|
|
|
79
79
|
},
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
export const TokenV2: StoryObj<typeof TextField> = {
|
|
83
|
+
parameters: {
|
|
84
|
+
tokenVersion: 'v2',
|
|
85
|
+
},
|
|
86
|
+
render() {
|
|
87
|
+
return (
|
|
88
|
+
<div style={{ display: 'grid', gap: 24, width: 320 }}>
|
|
89
|
+
<TextField
|
|
90
|
+
label="Label"
|
|
91
|
+
showLabel
|
|
92
|
+
required
|
|
93
|
+
requiredText="*必須"
|
|
94
|
+
subLabel={<Clickable>Text Link</Clickable>}
|
|
95
|
+
placeholder="Placeholder"
|
|
96
|
+
assistiveText="説明が入ります"
|
|
97
|
+
showCount
|
|
98
|
+
maxLength={100}
|
|
99
|
+
/>
|
|
100
|
+
<TextField
|
|
101
|
+
label="Invalid"
|
|
102
|
+
invalid
|
|
103
|
+
placeholder="Placeholder"
|
|
104
|
+
assistiveText="エラーメッセージ"
|
|
105
|
+
/>
|
|
106
|
+
<TextField label="Disabled" disabled value="Disabled value" />
|
|
107
|
+
</div>
|
|
108
|
+
)
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
|
|
82
112
|
export const ReadOnly: StoryObj<typeof TextField> = {
|
|
83
113
|
render() {
|
|
84
114
|
return <TextField label="Label" readOnly value="読み取り専用" />
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
height: 40px;
|
|
14
14
|
transition: 0.2s background-color,
|
|
15
15
|
0.2s box-shadow;
|
|
16
|
-
color: var(--charcoal-
|
|
17
|
-
background-color: var(--charcoal-
|
|
16
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
17
|
+
background-color: var(--charcoal-color-container-secondary-default-a);
|
|
18
18
|
border-radius: 4px;
|
|
19
19
|
padding: 0 8px;
|
|
20
20
|
line-height: 22px;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.charcoal-text-field-container:not([aria-disabled='true']):hover {
|
|
29
|
-
background-color: var(--charcoal-
|
|
29
|
+
background-color: var(--charcoal-color-container-secondary-hover-a);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.charcoal-text-field-container:not([aria-disabled='true']):focus-within {
|
|
@@ -77,16 +77,16 @@
|
|
|
77
77
|
/* Display box-shadow for iOS Safari */
|
|
78
78
|
appearance: none;
|
|
79
79
|
background: transparent;
|
|
80
|
-
color: var(--charcoal-
|
|
80
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.charcoal-text-field-input::placeholder {
|
|
84
|
-
color: var(--charcoal-
|
|
84
|
+
color: var(--charcoal-color-text-placeholder-default);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.charcoal-text-field-line-counter {
|
|
88
88
|
line-height: 22px;
|
|
89
89
|
font-size: 14px;
|
|
90
|
-
color: var(--charcoal-
|
|
90
|
+
color: var(--charcoal-color-text-tertiary-default);
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
transition:
|
|
15
15
|
0.2s background-color,
|
|
16
16
|
0.2s box-shadow;
|
|
17
|
-
color: var(--charcoal-
|
|
18
|
-
background-color: var(--charcoal-
|
|
17
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
18
|
+
background-color: var(--charcoal-color-container-secondary-default-a);
|
|
19
19
|
border-radius: 4px;
|
|
20
20
|
padding: 0 8px;
|
|
21
21
|
line-height: 22px;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&:not([aria-disabled='true']):hover {
|
|
29
|
-
background-color: var(--charcoal-
|
|
29
|
+
background-color: var(--charcoal-color-container-secondary-hover-a);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&:not([aria-disabled='true']):focus-within {
|
|
@@ -79,15 +79,15 @@
|
|
|
79
79
|
appearance: none;
|
|
80
80
|
background: transparent;
|
|
81
81
|
|
|
82
|
-
color: var(--charcoal-
|
|
82
|
+
color: var(--charcoal-color-text-secondary-default);
|
|
83
83
|
|
|
84
84
|
&::placeholder {
|
|
85
|
-
color: var(--charcoal-
|
|
85
|
+
color: var(--charcoal-color-text-placeholder-default);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.charcoal-text-field-line-counter {
|
|
90
90
|
line-height: 22px;
|
|
91
91
|
font-size: 14px;
|
|
92
|
-
color: var(--charcoal-
|
|
92
|
+
color: var(--charcoal-color-text-tertiary-default);
|
|
93
93
|
}
|