@charcoal-ui/react 3.13.0 → 3.13.1

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": "@charcoal-ui/react",
3
- "version": "3.13.0",
3
+ "version": "3.13.1",
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.13.0",
23
+ "@charcoal-ui/esbuild-plugin-styled-components": "^3.13.1",
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.13.0",
52
- "@charcoal-ui/icons": "^3.13.0",
53
- "@charcoal-ui/styled": "^3.13.0",
54
- "@charcoal-ui/theme": "^3.13.0",
55
- "@charcoal-ui/utils": "^3.13.0",
51
+ "@charcoal-ui/foundation": "^3.13.1",
52
+ "@charcoal-ui/icons": "^3.13.1",
53
+ "@charcoal-ui/styled": "^3.13.1",
54
+ "@charcoal-ui/theme": "^3.13.1",
55
+ "@charcoal-ui/utils": "^3.13.1",
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": "f0267a5894ade5fd8f378a5f77dddf8ba27bd320"
89
+ "gitHead": "f347c33a7189c7e2d7e8d4ee698f12f9b406fb16"
90
90
  }
@@ -1060,7 +1060,7 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1060
1060
  opacity: 0.32;
1061
1061
  }
1062
1062
 
1063
- .c12 {
1063
+ .c17 {
1064
1064
  width: -webkit-fill-available;
1065
1065
  width: -moz-available;
1066
1066
  width: stretch;
@@ -1092,40 +1092,156 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1092
1092
  height: 40px;
1093
1093
  }
1094
1094
 
1095
- .c12:not(:disabled):not([aria-disabled]):focus,
1096
- .c12[aria-disabled='false']:focus {
1095
+ .c17:not(:disabled):not([aria-disabled]):focus,
1096
+ .c17[aria-disabled='false']:focus {
1097
1097
  outline: none;
1098
1098
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1099
1099
  }
1100
1100
 
1101
- .c12:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1102
- .c12[aria-disabled='false']:focus:not(:focus-visible) {
1101
+ .c17:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1102
+ .c17[aria-disabled='false']:focus:not(:focus-visible) {
1103
1103
  box-shadow: none;
1104
1104
  }
1105
1105
 
1106
- .c12:not(:disabled):not([aria-disabled]):focus-visible,
1107
- .c12[aria-disabled='false']:focus-visible {
1106
+ .c17:not(:disabled):not([aria-disabled]):focus-visible,
1107
+ .c17[aria-disabled='false']:focus-visible {
1108
1108
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1109
1109
  }
1110
1110
 
1111
- .c12:not(:disabled):not([aria-disabled]):hover,
1112
- .c12[aria-disabled='false']:hover {
1111
+ .c17:not(:disabled):not([aria-disabled]):hover,
1112
+ .c17[aria-disabled='false']:hover {
1113
1113
  color: var(--charcoal-text5-hover);
1114
1114
  background-color: var(--charcoal-assertive-hover);
1115
1115
  }
1116
1116
 
1117
- .c12:not(:disabled):not([aria-disabled]):active,
1118
- .c12[aria-disabled='false']:active {
1117
+ .c17:not(:disabled):not([aria-disabled]):active,
1118
+ .c17[aria-disabled='false']:active {
1119
1119
  color: var(--charcoal-text5-press);
1120
1120
  background-color: var(--charcoal-assertive-press);
1121
1121
  }
1122
1122
 
1123
+ .c17:disabled,
1124
+ .c17[aria-disabled]:not([aria-disabled='false']) {
1125
+ opacity: 0.32;
1126
+ }
1127
+
1128
+ .c12 {
1129
+ position: relative;
1130
+ display: -webkit-box;
1131
+ display: -webkit-flex;
1132
+ display: -ms-flexbox;
1133
+ display: flex;
1134
+ cursor: pointer;
1135
+ gap: 4px;
1136
+ }
1137
+
1138
+ .c12:has(input[readonly]) {
1139
+ cursor: default;
1140
+ }
1141
+
1123
1142
  .c12:disabled,
1124
1143
  .c12[aria-disabled]:not([aria-disabled='false']) {
1144
+ cursor: default;
1125
1145
  opacity: 0.32;
1126
1146
  }
1127
1147
 
1128
1148
  .c13 {
1149
+ position: relative;
1150
+ }
1151
+
1152
+ .c14[type='checkbox'] {
1153
+ -webkit-appearance: none;
1154
+ -moz-appearance: none;
1155
+ appearance: none;
1156
+ display: block;
1157
+ cursor: pointer;
1158
+ margin: 0;
1159
+ width: 20px;
1160
+ height: 20px;
1161
+ border-radius: 4px;
1162
+ -webkit-transition: 0.2s box-shadow,0.2s background-color;
1163
+ transition: 0.2s box-shadow,0.2s background-color;
1164
+ }
1165
+
1166
+ .c14[type='checkbox']:disabled {
1167
+ cursor: default;
1168
+ }
1169
+
1170
+ .c14[type='checkbox'][readonly] {
1171
+ cursor: default;
1172
+ opacity: 0.32;
1173
+ }
1174
+
1175
+ .c14[type='checkbox']:checked {
1176
+ background-color: var(--charcoal-brand);
1177
+ }
1178
+
1179
+ .c14[type='checkbox']:checked:not(:disabled):not([aria-disabled]):hover,
1180
+ .c14[type='checkbox']:checked[aria-disabled='false']:hover {
1181
+ background-color: var(--charcoal-brand-hover);
1182
+ }
1183
+
1184
+ .c14[type='checkbox']:checked:not(:disabled):not([aria-disabled]):active,
1185
+ .c14[type='checkbox']:checked[aria-disabled='false']:active {
1186
+ background-color: var(--charcoal-brand-press);
1187
+ }
1188
+
1189
+ .c14[type='checkbox']:not(:disabled):not([aria-disabled]):focus,
1190
+ .c14[type='checkbox'][aria-disabled='false']:focus {
1191
+ outline: none;
1192
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1193
+ }
1194
+
1195
+ .c14[type='checkbox']:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1196
+ .c14[type='checkbox'][aria-disabled='false']:focus:not(:focus-visible) {
1197
+ box-shadow: none;
1198
+ }
1199
+
1200
+ .c14[type='checkbox']:not(:disabled):not([aria-disabled]):focus-visible,
1201
+ .c14[type='checkbox'][aria-disabled='false']:focus-visible {
1202
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1203
+ }
1204
+
1205
+ .c14[type='checkbox']:not(:disabled):not([aria-disabled])[aria-invalid='true'],
1206
+ .c14[type='checkbox'][aria-disabled='false'][aria-invalid='true'] {
1207
+ box-shadow: 0 0 0 4px rgba(255,43,0,0.32);
1208
+ }
1209
+
1210
+ .c14[type='checkbox']:not(:checked) {
1211
+ border-width: 2px;
1212
+ border-style: solid;
1213
+ border-color: var(--charcoal-text4);
1214
+ }
1215
+
1216
+ .c15 {
1217
+ position: absolute;
1218
+ top: -2px;
1219
+ left: -2px;
1220
+ box-sizing: border-box;
1221
+ display: -webkit-box;
1222
+ display: -webkit-flex;
1223
+ display: -ms-flexbox;
1224
+ display: flex;
1225
+ -webkit-align-items: center;
1226
+ -webkit-box-align: center;
1227
+ -ms-flex-align: center;
1228
+ align-items: center;
1229
+ -webkit-box-pack: center;
1230
+ -webkit-justify-content: center;
1231
+ -ms-flex-pack: center;
1232
+ justify-content: center;
1233
+ width: 24px;
1234
+ height: 24px;
1235
+ color: var(--charcoal-text5);
1236
+ }
1237
+
1238
+ .c16 {
1239
+ color: var(--charcoal-text2);
1240
+ font-size: 14px;
1241
+ line-height: 20px;
1242
+ }
1243
+
1244
+ .c18 {
1129
1245
  -webkit-user-select: none;
1130
1246
  -moz-user-select: none;
1131
1247
  -ms-user-select: none;
@@ -1151,36 +1267,36 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1151
1267
  transition: 0.2s background-color,0.2s box-shadow;
1152
1268
  }
1153
1269
 
1154
- .c13:not(:disabled):not([aria-disabled]):hover,
1155
- .c13[aria-disabled='false']:hover {
1270
+ .c18:not(:disabled):not([aria-disabled]):hover,
1271
+ .c18[aria-disabled='false']:hover {
1156
1272
  color: var(--charcoal-text3-hover);
1157
1273
  background-color: var(--charcoal-transparent-hover);
1158
1274
  }
1159
1275
 
1160
- .c13:not(:disabled):not([aria-disabled]):active,
1161
- .c13[aria-disabled='false']:active {
1276
+ .c18:not(:disabled):not([aria-disabled]):active,
1277
+ .c18[aria-disabled='false']:active {
1162
1278
  color: var(--charcoal-text3-press);
1163
1279
  background-color: var(--charcoal-transparent-press);
1164
1280
  }
1165
1281
 
1166
- .c13:not(:disabled):not([aria-disabled]):focus,
1167
- .c13[aria-disabled='false']:focus {
1282
+ .c18:not(:disabled):not([aria-disabled]):focus,
1283
+ .c18[aria-disabled='false']:focus {
1168
1284
  outline: none;
1169
1285
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1170
1286
  }
1171
1287
 
1172
- .c13:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1173
- .c13[aria-disabled='false']:focus:not(:focus-visible) {
1288
+ .c18:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1289
+ .c18[aria-disabled='false']:focus:not(:focus-visible) {
1174
1290
  box-shadow: none;
1175
1291
  }
1176
1292
 
1177
- .c13:not(:disabled):not([aria-disabled]):focus-visible,
1178
- .c13[aria-disabled='false']:focus-visible {
1293
+ .c18:not(:disabled):not([aria-disabled]):focus-visible,
1294
+ .c18[aria-disabled='false']:focus-visible {
1179
1295
  box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1180
1296
  }
1181
1297
 
1182
- .c13:disabled,
1183
- .c13[aria-disabled]:not([aria-disabled='false']) {
1298
+ .c18:disabled,
1299
+ .c18[aria-disabled]:not([aria-disabled='false']) {
1184
1300
  opacity: 0.32;
1185
1301
  }
1186
1302
 
@@ -1221,7 +1337,7 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1221
1337
  background-color: var(--charcoal-surface4);
1222
1338
  }
1223
1339
 
1224
- .c14 {
1340
+ .c19 {
1225
1341
  position: absolute;
1226
1342
  top: 8px;
1227
1343
  right: 8px;
@@ -1230,13 +1346,13 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1230
1346
  transition: 0.2s color;
1231
1347
  }
1232
1348
 
1233
- .c14:not(:disabled):not([aria-disabled]):hover,
1234
- .c14[aria-disabled='false']:hover {
1349
+ .c19:not(:disabled):not([aria-disabled]):hover,
1350
+ .c19[aria-disabled='false']:hover {
1235
1351
  color: var(--charcoal-text3-hover);
1236
1352
  }
1237
1353
 
1238
- .c14:not(:disabled):not([aria-disabled]):active,
1239
- .c14[aria-disabled='false']:active {
1354
+ .c19:not(:disabled):not([aria-disabled]):active,
1355
+ .c19[aria-disabled='false']:active {
1240
1356
  color: var(--charcoal-text3-press);
1241
1357
  }
1242
1358
 
@@ -1413,8 +1529,51 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1413
1529
  <div
1414
1530
  className="c11"
1415
1531
  >
1532
+ <label
1533
+ aria-disabled={false}
1534
+ className="c12"
1535
+ >
1536
+ <div
1537
+ className="c13"
1538
+ >
1539
+ <input
1540
+ checked={true}
1541
+ className="c14"
1542
+ disabled={false}
1543
+ onChange={[Function]}
1544
+ onClick={[Function]}
1545
+ onDragStart={[Function]}
1546
+ onKeyDown={[Function]}
1547
+ onKeyUp={[Function]}
1548
+ onMouseDown={[Function]}
1549
+ onMouseEnter={[Function]}
1550
+ onMouseLeave={[Function]}
1551
+ onMouseUp={[Function]}
1552
+ onTouchCancel={[Function]}
1553
+ onTouchEnd={[Function]}
1554
+ onTouchMove={[Function]}
1555
+ onTouchStart={[Function]}
1556
+ type="checkbox"
1557
+ />
1558
+ <div
1559
+ aria-hidden={true}
1560
+ checked={true}
1561
+ className="c15"
1562
+ >
1563
+ <pixiv-icon
1564
+ name="24/Check"
1565
+ unsafe-non-guideline-scale={0.6666666666666666}
1566
+ />
1567
+ </div>
1568
+ </div>
1569
+ <div
1570
+ className="c16"
1571
+ >
1572
+ test checkbox
1573
+ </div>
1574
+ </label>
1416
1575
  <button
1417
- className="c0 c12"
1576
+ className="c0 c17"
1418
1577
  disabled={false}
1419
1578
  onClick={[Function]}
1420
1579
  >
@@ -1424,7 +1583,7 @@ exports[`Storybook Tests react/Modal BottomSheet 1`] = `
1424
1583
  </div>
1425
1584
  <button
1426
1585
  aria-label="Close"
1427
- className="c0 c13 c14"
1586
+ className="c0 c18 c19"
1428
1587
  onClick={[Function]}
1429
1588
  type="button"
1430
1589
  >
@@ -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
 
@@ -201,6 +202,7 @@ export const BottomSheet: StoryObj<typeof Modal> = {
201
202
  </StyledModalText>
202
203
  </ModalVStack>
203
204
  <ModalButtons>
205
+ <Checkbox checked>test checkbox</Checkbox>
204
206
  <Button variant="Danger" onClick={() => state.close()} fullWidth>
205
207
  削除する
206
208
  </Button>