@charcoal-ui/react 3.12.0 → 3.13.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/README.md +1 -1
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/core/SSRProvider.d.ts +3 -1
- package/dist/core/SSRProvider.d.ts.map +1 -1
- package/dist/index.cjs.js +113 -104
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +13 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
- package/src/components/Button/__snapshots__/index.story.storyshot +9 -9
- package/src/components/Button/index.story.tsx +1 -1
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +6 -6
- package/src/components/Checkbox/index.story.tsx +1 -1
- package/src/components/Clickable/__snapshots__/index.story.storyshot +2 -2
- package/src/components/Clickable/index.story.tsx +1 -1
- package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +1 -1
- package/src/components/DropdownSelector/ListItem/index.story.tsx +1 -1
- package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +3 -3
- package/src/components/DropdownSelector/MenuList/index.story.tsx +1 -1
- package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +1 -1
- package/src/components/DropdownSelector/Popover/index.story.tsx +1 -1
- package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +14 -936
- package/src/components/DropdownSelector/index.story.tsx +2 -2
- package/src/components/Icon/__snapshots__/index.story.storyshot +1 -1
- package/src/components/Icon/index.story.tsx +1 -1
- package/src/components/IconButton/__snapshots__/index.story.storyshot +6 -3
- package/src/components/IconButton/index.story.tsx +1 -1
- package/src/components/IconButton/index.tsx +1 -1
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +4 -4
- package/src/components/LoadingSpinner/index.story.tsx +1 -1
- package/src/components/Modal/__snapshots__/index.story.storyshot +24 -12
- package/src/components/Modal/index.story.tsx +2 -2
- package/src/components/Modal/index.tsx +6 -2
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +4 -4
- package/src/components/MultiSelect/index.story.tsx +1 -1
- package/src/components/Radio/__snapshots__/index.story.storyshot +5 -5
- package/src/components/Radio/index.story.tsx +1 -1
- package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +2 -2
- package/src/components/SegmentedControl/index.story.tsx +1 -1
- package/src/components/Switch/__snapshots__/index.story.storyshot +4 -4
- package/src/components/Switch/index.story.tsx +1 -1
- package/src/components/TagItem/__snapshots__/index.story.storyshot +9 -9
- package/src/components/TagItem/index.story.tsx +2 -2
- package/src/components/TextArea/TextArea.story.tsx +1 -1
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +11 -11
- package/src/components/TextField/TextField.story.tsx +1 -1
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +13 -13
- package/src/core/SSRProvider.tsx +12 -1
- package/src/index.ts +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests TextArea AssistiveText 1`] = `
|
|
3
|
+
exports[`Storybook Tests react/TextArea AssistiveText 1`] = `
|
|
4
4
|
.c3 {
|
|
5
5
|
font-size: 14px;
|
|
6
6
|
line-height: 22px;
|
|
@@ -229,7 +229,7 @@ exports[`Storybook Tests TextArea AssistiveText 1`] = `
|
|
|
229
229
|
</div>
|
|
230
230
|
`;
|
|
231
231
|
|
|
232
|
-
exports[`Storybook Tests TextArea AutoHeight 1`] = `
|
|
232
|
+
exports[`Storybook Tests react/TextArea AutoHeight 1`] = `
|
|
233
233
|
.c3 {
|
|
234
234
|
font-size: 14px;
|
|
235
235
|
line-height: 22px;
|
|
@@ -445,7 +445,7 @@ exports[`Storybook Tests TextArea AutoHeight 1`] = `
|
|
|
445
445
|
</div>
|
|
446
446
|
`;
|
|
447
447
|
|
|
448
|
-
exports[`Storybook Tests TextArea Default 1`] = `
|
|
448
|
+
exports[`Storybook Tests react/TextArea Default 1`] = `
|
|
449
449
|
.c6 {
|
|
450
450
|
cursor: pointer;
|
|
451
451
|
-webkit-appearance: none;
|
|
@@ -707,7 +707,7 @@ exports[`Storybook Tests TextArea Default 1`] = `
|
|
|
707
707
|
</div>
|
|
708
708
|
`;
|
|
709
709
|
|
|
710
|
-
exports[`Storybook Tests TextArea Disabled 1`] = `
|
|
710
|
+
exports[`Storybook Tests react/TextArea Disabled 1`] = `
|
|
711
711
|
.c3 {
|
|
712
712
|
font-size: 14px;
|
|
713
713
|
line-height: 22px;
|
|
@@ -925,7 +925,7 @@ exports[`Storybook Tests TextArea Disabled 1`] = `
|
|
|
925
925
|
</div>
|
|
926
926
|
`;
|
|
927
927
|
|
|
928
|
-
exports[`Storybook Tests TextArea Invalid 1`] = `
|
|
928
|
+
exports[`Storybook Tests react/TextArea Invalid 1`] = `
|
|
929
929
|
.c3 {
|
|
930
930
|
font-size: 14px;
|
|
931
931
|
line-height: 22px;
|
|
@@ -1156,7 +1156,7 @@ exports[`Storybook Tests TextArea Invalid 1`] = `
|
|
|
1156
1156
|
</div>
|
|
1157
1157
|
`;
|
|
1158
1158
|
|
|
1159
|
-
exports[`Storybook Tests TextArea Label 1`] = `
|
|
1159
|
+
exports[`Storybook Tests react/TextArea Label 1`] = `
|
|
1160
1160
|
.c3 {
|
|
1161
1161
|
font-size: 14px;
|
|
1162
1162
|
line-height: 22px;
|
|
@@ -1358,7 +1358,7 @@ exports[`Storybook Tests TextArea Label 1`] = `
|
|
|
1358
1358
|
</div>
|
|
1359
1359
|
`;
|
|
1360
1360
|
|
|
1361
|
-
exports[`Storybook Tests TextArea Placeholder 1`] = `
|
|
1361
|
+
exports[`Storybook Tests react/TextArea Placeholder 1`] = `
|
|
1362
1362
|
.c3 {
|
|
1363
1363
|
font-size: 14px;
|
|
1364
1364
|
line-height: 22px;
|
|
@@ -1575,7 +1575,7 @@ exports[`Storybook Tests TextArea Placeholder 1`] = `
|
|
|
1575
1575
|
</div>
|
|
1576
1576
|
`;
|
|
1577
1577
|
|
|
1578
|
-
exports[`Storybook Tests TextArea ReadOnly 1`] = `
|
|
1578
|
+
exports[`Storybook Tests react/TextArea ReadOnly 1`] = `
|
|
1579
1579
|
.c3 {
|
|
1580
1580
|
font-size: 14px;
|
|
1581
1581
|
line-height: 22px;
|
|
@@ -1791,7 +1791,7 @@ exports[`Storybook Tests TextArea ReadOnly 1`] = `
|
|
|
1791
1791
|
</div>
|
|
1792
1792
|
`;
|
|
1793
1793
|
|
|
1794
|
-
exports[`Storybook Tests TextArea Required 1`] = `
|
|
1794
|
+
exports[`Storybook Tests react/TextArea Required 1`] = `
|
|
1795
1795
|
.c3 {
|
|
1796
1796
|
font-size: 14px;
|
|
1797
1797
|
line-height: 22px;
|
|
@@ -2040,7 +2040,7 @@ exports[`Storybook Tests TextArea Required 1`] = `
|
|
|
2040
2040
|
</div>
|
|
2041
2041
|
`;
|
|
2042
2042
|
|
|
2043
|
-
exports[`Storybook Tests TextArea ShowCount 1`] = `
|
|
2043
|
+
exports[`Storybook Tests react/TextArea ShowCount 1`] = `
|
|
2044
2044
|
.c3 {
|
|
2045
2045
|
font-size: 14px;
|
|
2046
2046
|
line-height: 22px;
|
|
@@ -2271,7 +2271,7 @@ exports[`Storybook Tests TextArea ShowCount 1`] = `
|
|
|
2271
2271
|
</div>
|
|
2272
2272
|
`;
|
|
2273
2273
|
|
|
2274
|
-
exports[`Storybook Tests TextArea SubLabel 1`] = `
|
|
2274
|
+
exports[`Storybook Tests react/TextArea SubLabel 1`] = `
|
|
2275
2275
|
.c6 {
|
|
2276
2276
|
cursor: pointer;
|
|
2277
2277
|
-webkit-appearance: none;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Storybook Tests TextField Affix 1`] = `
|
|
3
|
+
exports[`Storybook Tests react/TextField Affix 1`] = `
|
|
4
4
|
.c3 {
|
|
5
5
|
font-size: 14px;
|
|
6
6
|
line-height: 22px;
|
|
@@ -253,7 +253,7 @@ exports[`Storybook Tests TextField Affix 1`] = `
|
|
|
253
253
|
</div>
|
|
254
254
|
`;
|
|
255
255
|
|
|
256
|
-
exports[`Storybook Tests TextField AssistiveText 1`] = `
|
|
256
|
+
exports[`Storybook Tests react/TextField AssistiveText 1`] = `
|
|
257
257
|
.c3 {
|
|
258
258
|
font-size: 14px;
|
|
259
259
|
line-height: 22px;
|
|
@@ -486,7 +486,7 @@ exports[`Storybook Tests TextField AssistiveText 1`] = `
|
|
|
486
486
|
</div>
|
|
487
487
|
`;
|
|
488
488
|
|
|
489
|
-
exports[`Storybook Tests TextField Default 1`] = `
|
|
489
|
+
exports[`Storybook Tests react/TextField Default 1`] = `
|
|
490
490
|
.c6 {
|
|
491
491
|
cursor: pointer;
|
|
492
492
|
-webkit-appearance: none;
|
|
@@ -751,7 +751,7 @@ exports[`Storybook Tests TextField Default 1`] = `
|
|
|
751
751
|
</div>
|
|
752
752
|
`;
|
|
753
753
|
|
|
754
|
-
exports[`Storybook Tests TextField Disabled 1`] = `
|
|
754
|
+
exports[`Storybook Tests react/TextField Disabled 1`] = `
|
|
755
755
|
.c3 {
|
|
756
756
|
font-size: 14px;
|
|
757
757
|
line-height: 22px;
|
|
@@ -973,7 +973,7 @@ exports[`Storybook Tests TextField Disabled 1`] = `
|
|
|
973
973
|
</div>
|
|
974
974
|
`;
|
|
975
975
|
|
|
976
|
-
exports[`Storybook Tests TextField Invalid 1`] = `
|
|
976
|
+
exports[`Storybook Tests react/TextField Invalid 1`] = `
|
|
977
977
|
.c3 {
|
|
978
978
|
font-size: 14px;
|
|
979
979
|
line-height: 22px;
|
|
@@ -1208,7 +1208,7 @@ exports[`Storybook Tests TextField Invalid 1`] = `
|
|
|
1208
1208
|
</div>
|
|
1209
1209
|
`;
|
|
1210
1210
|
|
|
1211
|
-
exports[`Storybook Tests TextField Label 1`] = `
|
|
1211
|
+
exports[`Storybook Tests react/TextField Label 1`] = `
|
|
1212
1212
|
.c3 {
|
|
1213
1213
|
font-size: 14px;
|
|
1214
1214
|
line-height: 22px;
|
|
@@ -1414,7 +1414,7 @@ exports[`Storybook Tests TextField Label 1`] = `
|
|
|
1414
1414
|
</div>
|
|
1415
1415
|
`;
|
|
1416
1416
|
|
|
1417
|
-
exports[`Storybook Tests TextField Number 1`] = `
|
|
1417
|
+
exports[`Storybook Tests react/TextField Number 1`] = `
|
|
1418
1418
|
.c3 {
|
|
1419
1419
|
font-size: 14px;
|
|
1420
1420
|
line-height: 22px;
|
|
@@ -1630,7 +1630,7 @@ exports[`Storybook Tests TextField Number 1`] = `
|
|
|
1630
1630
|
</div>
|
|
1631
1631
|
`;
|
|
1632
1632
|
|
|
1633
|
-
exports[`Storybook Tests TextField Placeholder 1`] = `
|
|
1633
|
+
exports[`Storybook Tests react/TextField Placeholder 1`] = `
|
|
1634
1634
|
.c3 {
|
|
1635
1635
|
font-size: 14px;
|
|
1636
1636
|
line-height: 22px;
|
|
@@ -1851,7 +1851,7 @@ exports[`Storybook Tests TextField Placeholder 1`] = `
|
|
|
1851
1851
|
</div>
|
|
1852
1852
|
`;
|
|
1853
1853
|
|
|
1854
|
-
exports[`Storybook Tests TextField Prefix 1`] = `
|
|
1854
|
+
exports[`Storybook Tests react/TextField Prefix 1`] = `
|
|
1855
1855
|
.c3 {
|
|
1856
1856
|
font-size: 14px;
|
|
1857
1857
|
line-height: 22px;
|
|
@@ -2105,7 +2105,7 @@ exports[`Storybook Tests TextField Prefix 1`] = `
|
|
|
2105
2105
|
</div>
|
|
2106
2106
|
`;
|
|
2107
2107
|
|
|
2108
|
-
exports[`Storybook Tests TextField ReadOnly 1`] = `
|
|
2108
|
+
exports[`Storybook Tests react/TextField ReadOnly 1`] = `
|
|
2109
2109
|
.c3 {
|
|
2110
2110
|
font-size: 14px;
|
|
2111
2111
|
line-height: 22px;
|
|
@@ -2325,7 +2325,7 @@ exports[`Storybook Tests TextField ReadOnly 1`] = `
|
|
|
2325
2325
|
</div>
|
|
2326
2326
|
`;
|
|
2327
2327
|
|
|
2328
|
-
exports[`Storybook Tests TextField RequiredText 1`] = `
|
|
2328
|
+
exports[`Storybook Tests react/TextField RequiredText 1`] = `
|
|
2329
2329
|
.c3 {
|
|
2330
2330
|
font-size: 14px;
|
|
2331
2331
|
line-height: 22px;
|
|
@@ -2564,7 +2564,7 @@ exports[`Storybook Tests TextField RequiredText 1`] = `
|
|
|
2564
2564
|
</div>
|
|
2565
2565
|
`;
|
|
2566
2566
|
|
|
2567
|
-
exports[`Storybook Tests TextField ShowCount 1`] = `
|
|
2567
|
+
exports[`Storybook Tests react/TextField ShowCount 1`] = `
|
|
2568
2568
|
.c3 {
|
|
2569
2569
|
font-size: 14px;
|
|
2570
2570
|
line-height: 22px;
|
|
@@ -2812,7 +2812,7 @@ exports[`Storybook Tests TextField ShowCount 1`] = `
|
|
|
2812
2812
|
</div>
|
|
2813
2813
|
`;
|
|
2814
2814
|
|
|
2815
|
-
exports[`Storybook Tests TextField SubLabel 1`] = `
|
|
2815
|
+
exports[`Storybook Tests react/TextField SubLabel 1`] = `
|
|
2816
2816
|
.c6 {
|
|
2817
2817
|
cursor: pointer;
|
|
2818
2818
|
-webkit-appearance: none;
|
package/src/core/SSRProvider.tsx
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { SSRProvider as OriginSSRProvider } from '@react-aria/ssr'
|
|
2
|
+
import { version, Fragment } from 'react'
|
|
3
|
+
|
|
4
|
+
export function isReactVersionOver(minVersion: number): boolean {
|
|
5
|
+
// version history on the react side: https://github.com/facebook/react/commits/main/packages/shared/ReactVersion.js
|
|
6
|
+
const reactMajorVersion = parseInt(version.split('.')[0], 10)
|
|
7
|
+
return Number.isFinite(reactMajorVersion)
|
|
8
|
+
? reactMajorVersion >= minVersion
|
|
9
|
+
: false
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const SSRProvider = isReactVersionOver(18) ? Fragment : OriginSSRProvider
|
package/src/index.ts
CHANGED
|
@@ -38,7 +38,11 @@ export {
|
|
|
38
38
|
} from './components/TextField'
|
|
39
39
|
export { default as TextArea, type TextAreaProps } from './components/TextArea'
|
|
40
40
|
export { default as Icon, type IconProps } from './components/Icon'
|
|
41
|
-
export {
|
|
41
|
+
export {
|
|
42
|
+
default as Modal,
|
|
43
|
+
type ModalProps,
|
|
44
|
+
ModalCloseButton,
|
|
45
|
+
} from './components/Modal'
|
|
42
46
|
export {
|
|
43
47
|
ModalHeader,
|
|
44
48
|
ModalAlign,
|