@charcoal-ui/react 2.7.0 → 2.9.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/DropdownSelector/index.story.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +5 -2
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.story.d.ts.map +1 -1
- package/dist/index.cjs.js +52 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +52 -27
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
- package/src/components/DropdownSelector/index.story.tsx +4 -1
- package/src/components/LoadingSpinner/index.tsx +1 -0
- package/src/components/Modal/index.tsx +79 -61
- package/src/components/Radio/index.tsx +2 -0
- package/src/components/SegmentedControl/index.story.tsx +2 -0
- package/src/components/SegmentedControl/index.tsx +1 -0
- package/src/components/TextField/index.tsx +1 -0
- package/src/index.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export { default as Icon, type IconProps } from './components/Icon';
|
|
|
13
13
|
export { default as Modal, type ModalProps } from './components/Modal';
|
|
14
14
|
export { ModalHeader, ModalAlign, ModalBody, ModalButtons, } from './components/Modal/ModalPlumbing';
|
|
15
15
|
export { default as LoadingSpinner, LoadingSpinnerIcon, } from './components/LoadingSpinner';
|
|
16
|
-
export { default as DropdownSelector, DropdownSelectorItem, } from './components/DropdownSelector';
|
|
16
|
+
export { default as DropdownSelector, type DropdownSelectorProps, DropdownSelectorItem, } from './components/DropdownSelector';
|
|
17
17
|
export { default as SegmentedControl, type SegmentedControlProps, } from './components/SegmentedControl';
|
|
18
|
-
export { default as Checkbox } from './components/Checkbox';
|
|
18
|
+
export { default as Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
19
19
|
export { default as TagItem, type TagItemProps } from './components/TagItem';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,uBAAuB,EACvB,KAAK,SAAS,GACf,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,OAAO,IAAI,KAAK,EAChB,KAAK,UAAU,EACf,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,SA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,IAAI,WAAW,EACtB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACT,YAAY,GACb,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,kBAAkB,GACnB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,KAAK,qBAAqB,EAC1B,oBAAoB,GACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/index.esm.js
CHANGED
|
@@ -379,6 +379,8 @@ var RadioInput = styled5.input.attrs({ type: "radio" })`
|
|
|
379
379
|
width: 20px;
|
|
380
380
|
height: 20px;
|
|
381
381
|
|
|
382
|
+
cursor: pointer;
|
|
383
|
+
|
|
382
384
|
${({ hasError = false }) => theme((o) => [
|
|
383
385
|
o.borderRadius("oval"),
|
|
384
386
|
o.bg.surface1.hover.press,
|
|
@@ -1075,6 +1077,7 @@ var PrefixContainer = styled9.span`
|
|
|
1075
1077
|
top: 50%;
|
|
1076
1078
|
left: 8px;
|
|
1077
1079
|
transform: translateY(-50%);
|
|
1080
|
+
z-index: 1;
|
|
1078
1081
|
`;
|
|
1079
1082
|
var SuffixContainer = styled9.span`
|
|
1080
1083
|
position: absolute;
|
|
@@ -1302,7 +1305,7 @@ function Modal({
|
|
|
1302
1305
|
...underlayProps,
|
|
1303
1306
|
style: transitionEnabled ? { backgroundColor } : {}
|
|
1304
1307
|
},
|
|
1305
|
-
/* @__PURE__ */ React12.createElement(FocusScope, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React12.createElement(
|
|
1308
|
+
/* @__PURE__ */ React12.createElement(FocusScope, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React12.createElement(DialogContainer, { bottomSheet, size }, /* @__PURE__ */ React12.createElement(
|
|
1306
1309
|
ModalDialog,
|
|
1307
1310
|
{
|
|
1308
1311
|
ref,
|
|
@@ -1328,7 +1331,7 @@ function Modal({
|
|
|
1328
1331
|
}
|
|
1329
1332
|
)
|
|
1330
1333
|
)
|
|
1331
|
-
))
|
|
1334
|
+
)))
|
|
1332
1335
|
))
|
|
1333
1336
|
);
|
|
1334
1337
|
}
|
|
@@ -1340,6 +1343,8 @@ var ModalContext = React12.createContext({
|
|
|
1340
1343
|
});
|
|
1341
1344
|
var ModalBackground = animated(styled10.div`
|
|
1342
1345
|
z-index: ${({ zIndex }) => zIndex};
|
|
1346
|
+
overflow: scroll;
|
|
1347
|
+
display: flex;
|
|
1343
1348
|
position: fixed;
|
|
1344
1349
|
top: 0;
|
|
1345
1350
|
left: 0;
|
|
@@ -1348,34 +1353,52 @@ var ModalBackground = animated(styled10.div`
|
|
|
1348
1353
|
|
|
1349
1354
|
${theme((o) => [o.bg.surface4])}
|
|
1350
1355
|
`);
|
|
1356
|
+
var DialogContainer = styled10.div`
|
|
1357
|
+
position: relative;
|
|
1358
|
+
margin: auto;
|
|
1359
|
+
padding: 24px 0;
|
|
1360
|
+
width: ${(p) => {
|
|
1361
|
+
switch (p.size) {
|
|
1362
|
+
case "S": {
|
|
1363
|
+
return columnSystem(3, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
1364
|
+
}
|
|
1365
|
+
case "M": {
|
|
1366
|
+
return columnSystem(4, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
1367
|
+
}
|
|
1368
|
+
case "L": {
|
|
1369
|
+
return columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
1370
|
+
}
|
|
1371
|
+
default: {
|
|
1372
|
+
return unreachable(p.size);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}}px;
|
|
1376
|
+
|
|
1377
|
+
@media ${({ theme: theme4 }) => maxWidth(theme4.breakpoint.screen1)} {
|
|
1378
|
+
width: calc(100% - 48px);
|
|
1379
|
+
${(p) => p.bottomSheet !== false && css4`
|
|
1380
|
+
margin: 0;
|
|
1381
|
+
padding: 0;
|
|
1382
|
+
bottom: 0;
|
|
1383
|
+
position: absolute;
|
|
1384
|
+
width: 100%;
|
|
1385
|
+
${p.bottomSheet === "full" ? "height: 100%" : ""};
|
|
1386
|
+
`}
|
|
1387
|
+
}
|
|
1388
|
+
`;
|
|
1351
1389
|
var ModalDialog = animated(styled10.div`
|
|
1352
|
-
position:
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
transform: translate(-50%, -50%);
|
|
1356
|
-
width: ${(p) => p.size === "S" ? columnSystem(3, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : p.size === "M" ? columnSystem(4, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : p.size === "L" ? columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : unreachable(p.size)}px;
|
|
1390
|
+
position: relative;
|
|
1391
|
+
margin: auto;
|
|
1392
|
+
padding: 24px 0;
|
|
1357
1393
|
|
|
1358
1394
|
${theme((o) => [o.bg.background1, o.borderRadius(24)])}
|
|
1359
|
-
|
|
1360
1395
|
@media ${({ theme: theme4 }) => maxWidth(theme4.breakpoint.screen1)} {
|
|
1361
|
-
${(p) => p.bottomSheet
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
width: 100%;
|
|
1368
|
-
height: 100%;
|
|
1369
|
-
` : p.bottomSheet ? css4`
|
|
1370
|
-
top: auto;
|
|
1371
|
-
bottom: 0;
|
|
1372
|
-
left: 0;
|
|
1373
|
-
transform: none;
|
|
1374
|
-
border-radius: 0;
|
|
1375
|
-
width: 100%;
|
|
1376
|
-
` : css4`
|
|
1377
|
-
width: calc(100% - 48px);
|
|
1378
|
-
`}
|
|
1396
|
+
${(p) => p.bottomSheet !== false && css4`
|
|
1397
|
+
border-radius: 0;
|
|
1398
|
+
${p.bottomSheet === "full" && css4`
|
|
1399
|
+
height: 100%;
|
|
1400
|
+
`}
|
|
1401
|
+
`}
|
|
1379
1402
|
}
|
|
1380
1403
|
`);
|
|
1381
1404
|
var ModalCrossButton = styled10(IconButton_default)`
|
|
@@ -1435,6 +1458,7 @@ function LoadingSpinner({
|
|
|
1435
1458
|
return /* @__PURE__ */ React14.createElement(LoadingSpinnerRoot, { size, padding, transparent }, /* @__PURE__ */ React14.createElement(LoadingSpinnerIcon, null));
|
|
1436
1459
|
}
|
|
1437
1460
|
var LoadingSpinnerRoot = styled12.div.attrs({ role: "progressbar" })`
|
|
1461
|
+
box-sizing: content-box;
|
|
1438
1462
|
margin: auto;
|
|
1439
1463
|
padding: ${(props) => props.padding}px;
|
|
1440
1464
|
border-radius: 8px;
|
|
@@ -1845,7 +1869,8 @@ var SegmentedControl = forwardRef(
|
|
|
1845
1869
|
...props,
|
|
1846
1870
|
isDisabled: props.disabled,
|
|
1847
1871
|
isReadOnly: props.readonly,
|
|
1848
|
-
isRequired: props.required
|
|
1872
|
+
isRequired: props.required,
|
|
1873
|
+
"aria-label": props.name
|
|
1849
1874
|
}),
|
|
1850
1875
|
[props]
|
|
1851
1876
|
);
|