@doist/reactist 19.0.1 → 19.1.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/README.md +14 -0
- package/dist/reactist.cjs.development.js +127 -71
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/new-components/banner/banner.js +61 -0
- package/es/new-components/banner/banner.js.map +1 -0
- package/es/new-components/banner/banner.module.css.js +4 -0
- package/es/new-components/banner/banner.module.css.js.map +1 -0
- package/es/new-components/base-field/base-field.js +1 -1
- package/es/new-components/spinner/spinner.js +2 -1
- package/es/new-components/spinner/spinner.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +1 -1
- package/es/new-components/toast/use-toasts.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/new-components/banner/banner.d.ts +28 -0
- package/lib/new-components/banner/banner.js +2 -0
- package/lib/new-components/banner/banner.js.map +1 -0
- package/lib/new-components/banner/banner.module.css.js +2 -0
- package/lib/new-components/banner/banner.module.css.js.map +1 -0
- package/lib/new-components/banner/banner.test.d.ts +1 -0
- package/lib/new-components/banner/index.d.ts +2 -0
- package/lib/new-components/base-field/base-field.js +1 -1
- package/lib/new-components/spinner/spinner.js +1 -1
- package/lib/new-components/spinner/spinner.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.js +1 -1
- package/lib/new-components/toast/use-toasts.js +1 -1
- package/package.json +5 -2
- package/styles/banner.css +7 -0
- package/styles/banner.module.css.css +1 -0
- package/styles/reactist.css +1 -0
package/README.md
CHANGED
|
@@ -62,6 +62,20 @@ The setup task will install dependencies and run various validations (linting, t
|
|
|
62
62
|
|
|
63
63
|
We identified two major modes of development for Reactist. First, running an interactive storybook and see the changes you make to a component in an isolated environment. This is especially helpful when developing new components. And second, improving existing components in real-life applications.
|
|
64
64
|
|
|
65
|
+
## Creating new components
|
|
66
|
+
|
|
67
|
+
The development of new components is streamlined by the ability to generate new component templates using [plop](https://plopjs.com/):
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
npm run plop component
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This command will prompt you to provide all the information needed to create a new component template. The most important piece of information needed is the component name, which you can provide even as a phrase (e.g. "dropdown select" will generate a `DropdownSelect` component template).
|
|
74
|
+
|
|
75
|
+
The generated source files include the component implementation with sample props and styles, plus a small test file and storybook source files as well.
|
|
76
|
+
|
|
77
|
+
You also need to export your new component by adding a reference to it in the [top-level index file](src/index.ts).
|
|
78
|
+
|
|
65
79
|
## Storybook
|
|
66
80
|
|
|
67
81
|
For the first development mode run:
|
|
@@ -594,7 +594,8 @@ function Spinner({
|
|
|
594
594
|
width: size,
|
|
595
595
|
height: size,
|
|
596
596
|
viewBox: "0 0 24 24",
|
|
597
|
-
className: modules_c7f5018f.svg
|
|
597
|
+
className: modules_c7f5018f.svg,
|
|
598
|
+
"data-chromatic": "ignore"
|
|
598
599
|
}, /*#__PURE__*/React.createElement("g", {
|
|
599
600
|
fill: "none",
|
|
600
601
|
fillRule: "nonzero"
|
|
@@ -830,7 +831,81 @@ function Alert({
|
|
|
830
831
|
})) : null));
|
|
831
832
|
}
|
|
832
833
|
|
|
833
|
-
|
|
834
|
+
let uid = 0;
|
|
835
|
+
|
|
836
|
+
function uniqueId() {
|
|
837
|
+
return uid++;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
function generateElementId(prefix) {
|
|
841
|
+
const num = uniqueId();
|
|
842
|
+
return prefix + "-" + num;
|
|
843
|
+
}
|
|
844
|
+
function useId(providedId) {
|
|
845
|
+
const ref = React.useRef(providedId != null ? providedId : null);
|
|
846
|
+
|
|
847
|
+
if (!ref.current) {
|
|
848
|
+
ref.current = generateElementId('element');
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
return ref.current;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
var modules_afa80466 = {"banner":"c1dffd60","banner-info":"_9d552538","banner-promotion":"d797752e","title":"_8cd610da","title-without-description":"_78ea5373","title-info":"_319c73fa","title-promotion":"fc84253f","description":"af4bd758","description-info":"b95a8c07","description-promotion":"_3c33f615"};
|
|
855
|
+
|
|
856
|
+
const _excluded$9 = ["id", "tone", "icon", "title", "description", "action"];
|
|
857
|
+
const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
858
|
+
let {
|
|
859
|
+
id,
|
|
860
|
+
tone,
|
|
861
|
+
icon,
|
|
862
|
+
title,
|
|
863
|
+
description,
|
|
864
|
+
action
|
|
865
|
+
} = _ref,
|
|
866
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
867
|
+
|
|
868
|
+
const titleId = useId();
|
|
869
|
+
const descriptionId = useId();
|
|
870
|
+
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
871
|
+
ref: ref,
|
|
872
|
+
id: id,
|
|
873
|
+
role: "status",
|
|
874
|
+
"aria-labelledby": titleId,
|
|
875
|
+
"aria-describedby": descriptionId,
|
|
876
|
+
"aria-live": "polite",
|
|
877
|
+
tabIndex: 0,
|
|
878
|
+
borderRadius: "standard",
|
|
879
|
+
className: [modules_afa80466.banner, modules_afa80466["banner-" + tone]]
|
|
880
|
+
}), /*#__PURE__*/React.createElement(Columns, {
|
|
881
|
+
space: "medium",
|
|
882
|
+
alignY: "center"
|
|
883
|
+
}, /*#__PURE__*/React.createElement(Column, {
|
|
884
|
+
width: "content",
|
|
885
|
+
"aria-hidden": true,
|
|
886
|
+
style: {
|
|
887
|
+
/* Make sure the icon is centered vertically */
|
|
888
|
+
lineHeight: 0
|
|
889
|
+
}
|
|
890
|
+
}, icon), /*#__PURE__*/React.createElement(Column, null, /*#__PURE__*/React.createElement(Box, {
|
|
891
|
+
paddingY: "xsmall"
|
|
892
|
+
}, description ? /*#__PURE__*/React.createElement(Box, {
|
|
893
|
+
id: titleId,
|
|
894
|
+
className: [modules_afa80466.title, modules_afa80466["title-" + tone]]
|
|
895
|
+
}, title) : /*#__PURE__*/React.createElement(Box, {
|
|
896
|
+
id: titleId,
|
|
897
|
+
className: [modules_afa80466.title, // If the banner does not have a description, we need to slightly tweak
|
|
898
|
+
// the styling of the title applying an extra css class
|
|
899
|
+
modules_afa80466["title-without-description"], modules_afa80466["title-" + tone]]
|
|
900
|
+
}, title), description ? /*#__PURE__*/React.createElement(Box, {
|
|
901
|
+
id: descriptionId,
|
|
902
|
+
className: [modules_afa80466.description, modules_afa80466["description-" + tone]]
|
|
903
|
+
}, description) : null)), action ? /*#__PURE__*/React.createElement(Column, {
|
|
904
|
+
width: "content"
|
|
905
|
+
}, action) : null));
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
const _excluded$a = ["size", "exceptionallySetClassName"];
|
|
834
909
|
const sizeMapping = {
|
|
835
910
|
xsmall: 16,
|
|
836
911
|
small: 24,
|
|
@@ -845,7 +920,7 @@ function Loading(_ref) {
|
|
|
845
920
|
size = 'small',
|
|
846
921
|
exceptionallySetClassName
|
|
847
922
|
} = _ref,
|
|
848
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
923
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
849
924
|
|
|
850
925
|
const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
|
|
851
926
|
const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
@@ -888,7 +963,7 @@ function Notice({
|
|
|
888
963
|
|
|
889
964
|
var modules_a9637dd3 = {"text":"a83bd4e0","size-caption":"_266d6623","size-copy":"a8d37c6e","size-subtitle":"_39f4eb1f","weight-semibold":"_7be5c531","weight-bold":"e214ff2e","tone-secondary":"_6a3e5ade","tone-danger":"_8f5b5f2b","tone-positive":"_9ae47ae4","lineClampMultipleLines":"_969f18f7","lineClamp-1":"_2f303ac3","lineClamp-2":"d3e04245","lineClamp-3":"_33411704","lineClamp-4":"bfc32640","lineClamp-5":"f813c82f"};
|
|
890
965
|
|
|
891
|
-
const _excluded$
|
|
966
|
+
const _excluded$b = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
892
967
|
const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
893
968
|
let {
|
|
894
969
|
as,
|
|
@@ -900,7 +975,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
900
975
|
lineClamp,
|
|
901
976
|
exceptionallySetClassName
|
|
902
977
|
} = _ref,
|
|
903
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
978
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
904
979
|
|
|
905
980
|
const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
|
|
906
981
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -916,7 +991,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
916
991
|
|
|
917
992
|
var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
|
|
918
993
|
|
|
919
|
-
const _excluded$
|
|
994
|
+
const _excluded$c = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
|
|
920
995
|
/**
|
|
921
996
|
* A toast that shows a message, and an optional action associated with it.
|
|
922
997
|
*
|
|
@@ -941,7 +1016,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
941
1016
|
onDismiss,
|
|
942
1017
|
dismissLabel = 'Close'
|
|
943
1018
|
} = _ref,
|
|
944
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1019
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
945
1020
|
|
|
946
1021
|
return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
|
|
947
1022
|
ref: ref,
|
|
@@ -991,26 +1066,6 @@ function ToastContentSlot({
|
|
|
991
1066
|
}, children);
|
|
992
1067
|
}
|
|
993
1068
|
|
|
994
|
-
let uid = 0;
|
|
995
|
-
|
|
996
|
-
function uniqueId() {
|
|
997
|
-
return uid++;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
function generateElementId(prefix) {
|
|
1001
|
-
const num = uniqueId();
|
|
1002
|
-
return prefix + "-" + num;
|
|
1003
|
-
}
|
|
1004
|
-
function useId(providedId) {
|
|
1005
|
-
const ref = React.useRef(providedId != null ? providedId : null);
|
|
1006
|
-
|
|
1007
|
-
if (!ref.current) {
|
|
1008
|
-
ref.current = generateElementId('element');
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
return ref.current;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
1069
|
/**
|
|
1015
1070
|
* Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
|
|
1016
1071
|
*
|
|
@@ -1182,7 +1237,7 @@ function useToastsAnimation() {
|
|
|
1182
1237
|
};
|
|
1183
1238
|
}
|
|
1184
1239
|
|
|
1185
|
-
const _excluded$
|
|
1240
|
+
const _excluded$d = ["toastId"];
|
|
1186
1241
|
/** @private */
|
|
1187
1242
|
|
|
1188
1243
|
const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
|
|
@@ -1291,7 +1346,7 @@ function ToastsProvider({
|
|
|
1291
1346
|
let {
|
|
1292
1347
|
toastId
|
|
1293
1348
|
} = _ref,
|
|
1294
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1349
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1295
1350
|
|
|
1296
1351
|
return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
|
|
1297
1352
|
key: toastId,
|
|
@@ -1367,7 +1422,7 @@ function Toast(props) {
|
|
|
1367
1422
|
|
|
1368
1423
|
var modules_949d2ff4 = {"heading":"_71a1610c","weight-light":"_63750f40","tone-secondary":"_9ce984cf","tone-danger":"_1acad35e","size-largest":"_3da27a00","size-larger":"df220733","size-smaller":"eb373739","lineClampMultipleLines":"f53cfd2b","lineClamp-1":"e4819fc9","lineClamp-2":"a0ed6177","lineClamp-3":"_180d433e","lineClamp-4":"_40826ad9","lineClamp-5":"_5999b247"};
|
|
1369
1424
|
|
|
1370
|
-
const _excluded$
|
|
1425
|
+
const _excluded$e = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
1371
1426
|
const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
1372
1427
|
let {
|
|
1373
1428
|
level,
|
|
@@ -1379,7 +1434,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1379
1434
|
align,
|
|
1380
1435
|
exceptionallySetClassName
|
|
1381
1436
|
} = _ref,
|
|
1382
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1437
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
1383
1438
|
|
|
1384
1439
|
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
1385
1440
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
@@ -1396,7 +1451,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1396
1451
|
}), children);
|
|
1397
1452
|
});
|
|
1398
1453
|
|
|
1399
|
-
const _excluded$
|
|
1454
|
+
const _excluded$f = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
|
|
1400
1455
|
/**
|
|
1401
1456
|
* A semantic link that looks like a button, exactly matching the `Button` component in all visual
|
|
1402
1457
|
* aspects.
|
|
@@ -1413,7 +1468,7 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
|
|
|
1413
1468
|
exceptionallySetClassName,
|
|
1414
1469
|
openInNewTab = false
|
|
1415
1470
|
} = _ref,
|
|
1416
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1471
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
1417
1472
|
|
|
1418
1473
|
return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1419
1474
|
as: as,
|
|
@@ -1429,14 +1484,14 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
|
|
|
1429
1484
|
|
|
1430
1485
|
var modules_3d05deee = {"container":"fdc181b3"};
|
|
1431
1486
|
|
|
1432
|
-
const _excluded$
|
|
1487
|
+
const _excluded$g = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
1433
1488
|
const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
1434
1489
|
let {
|
|
1435
1490
|
as = 'a',
|
|
1436
1491
|
openInNewTab = false,
|
|
1437
1492
|
exceptionallySetClassName
|
|
1438
1493
|
} = _ref,
|
|
1439
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1494
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
1440
1495
|
|
|
1441
1496
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1442
1497
|
as: as,
|
|
@@ -1448,7 +1503,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
|
|
|
1448
1503
|
}));
|
|
1449
1504
|
});
|
|
1450
1505
|
|
|
1451
|
-
const _excluded$
|
|
1506
|
+
const _excluded$h = ["checked", "indeterminate", "disabled"];
|
|
1452
1507
|
const svgPath = {
|
|
1453
1508
|
checked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',
|
|
1454
1509
|
unchecked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',
|
|
@@ -1487,7 +1542,7 @@ function CheckboxIcon(_ref) {
|
|
|
1487
1542
|
indeterminate,
|
|
1488
1543
|
disabled
|
|
1489
1544
|
} = _ref,
|
|
1490
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1545
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
1491
1546
|
|
|
1492
1547
|
const pathKey = getPathKey({
|
|
1493
1548
|
checked,
|
|
@@ -1508,7 +1563,7 @@ function CheckboxIcon(_ref) {
|
|
|
1508
1563
|
|
|
1509
1564
|
var modules_664a6a80 = {"container":"_84dfdb83","disabled":"_131a2ca4","checked":"_95b1556d","keyFocused":"_49de7ebd","icon":"_6b4b1851","label":"_9047f3bd"};
|
|
1510
1565
|
|
|
1511
|
-
const _excluded$
|
|
1566
|
+
const _excluded$i = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
|
|
1512
1567
|
const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
|
|
1513
1568
|
var _ref2, _props$checked, _props$checked2;
|
|
1514
1569
|
|
|
@@ -1520,7 +1575,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1520
1575
|
defaultChecked,
|
|
1521
1576
|
onChange
|
|
1522
1577
|
} = _ref,
|
|
1523
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1578
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1524
1579
|
|
|
1525
1580
|
const isControlledComponent = typeof props.checked === 'boolean';
|
|
1526
1581
|
|
|
@@ -1735,7 +1790,7 @@ var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
|
|
|
1735
1790
|
|
|
1736
1791
|
var modules_aaf25250 = {"inputWrapper":"fb09cd05","bordered":"f65f40dd","error":"_29118bf0","startIcon":"a40eb111"};
|
|
1737
1792
|
|
|
1738
|
-
const _excluded$
|
|
1793
|
+
const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
|
|
1739
1794
|
const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
|
|
1740
1795
|
let {
|
|
1741
1796
|
variant = 'default',
|
|
@@ -1750,7 +1805,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1750
1805
|
hidden,
|
|
1751
1806
|
'aria-describedby': ariaDescribedBy
|
|
1752
1807
|
} = _ref,
|
|
1753
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1808
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1754
1809
|
|
|
1755
1810
|
const id = useId(props.id);
|
|
1756
1811
|
const internalRef = React.useRef(null);
|
|
@@ -1799,7 +1854,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1799
1854
|
|
|
1800
1855
|
var modules_1fa9b208 = {"selectWrapper":"a804edbf","bordered":"_50a3655f","error":"a6d38abf"};
|
|
1801
1856
|
|
|
1802
|
-
const _excluded$
|
|
1857
|
+
const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
|
|
1803
1858
|
const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
|
|
1804
1859
|
let {
|
|
1805
1860
|
variant = 'default',
|
|
@@ -1815,7 +1870,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
|
|
|
1815
1870
|
hidden,
|
|
1816
1871
|
'aria-describedby': ariaDescribedBy
|
|
1817
1872
|
} = _ref,
|
|
1818
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1873
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1819
1874
|
|
|
1820
1875
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
1821
1876
|
variant: variant,
|
|
@@ -1853,7 +1908,7 @@ function SelectChevron(props) {
|
|
|
1853
1908
|
|
|
1854
1909
|
var modules_8e05f7c9 = {"container":"ec63c3f1","disabled":"_7de9c06d","checked":"a37981fc","toggle":"_2a17ac45","label":"_68cc9707","handle":"_91409c7f","keyFocused":"a6490371"};
|
|
1855
1910
|
|
|
1856
|
-
const _excluded$
|
|
1911
|
+
const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
|
|
1857
1912
|
const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
|
|
1858
1913
|
var _ref2, _props$checked, _props$checked2;
|
|
1859
1914
|
|
|
@@ -1869,7 +1924,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1869
1924
|
'aria-labelledby': originalAriaLabelledby,
|
|
1870
1925
|
onChange
|
|
1871
1926
|
} = _ref,
|
|
1872
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1927
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1873
1928
|
|
|
1874
1929
|
const id = useId(originalId);
|
|
1875
1930
|
const hintId = useId();
|
|
@@ -1929,7 +1984,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1929
1984
|
|
|
1930
1985
|
var modules_2728c236 = {"textAreaContainer":"_21dbfa84","innerContainer":"_43588660","bordered":"f081b428","error":"a862f0e5","autoExpand":"_46360b15"};
|
|
1931
1986
|
|
|
1932
|
-
const _excluded$
|
|
1987
|
+
const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
|
|
1933
1988
|
const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
1934
1989
|
let {
|
|
1935
1990
|
variant = 'default',
|
|
@@ -1946,7 +2001,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
1946
2001
|
rows,
|
|
1947
2002
|
autoExpand = false
|
|
1948
2003
|
} = _ref,
|
|
1949
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2004
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1950
2005
|
|
|
1951
2006
|
const containerRef = React.useRef(null);
|
|
1952
2007
|
const internalRef = React.useRef(null);
|
|
@@ -1990,7 +2045,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
1990
2045
|
}))));
|
|
1991
2046
|
});
|
|
1992
2047
|
|
|
1993
|
-
const _excluded$
|
|
2048
|
+
const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
|
|
1994
2049
|
const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
1995
2050
|
let {
|
|
1996
2051
|
variant = 'default',
|
|
@@ -2007,7 +2062,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
2007
2062
|
'aria-describedby': ariaDescribedBy,
|
|
2008
2063
|
startIcon
|
|
2009
2064
|
} = _ref,
|
|
2010
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2065
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2011
2066
|
|
|
2012
2067
|
const internalRef = React.useRef(null);
|
|
2013
2068
|
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
@@ -2076,7 +2131,7 @@ function emailToIndex(email, maxIndex) {
|
|
|
2076
2131
|
|
|
2077
2132
|
var modules_08f3eeac = {"avatar":"_38a1be89","size-xxs":"d32e92ae","size-xs":"_0667d719","size-s":"cf529fcf","size-m":"_6e268eab","size-l":"d64c62cf","size-xl":"_44fb77de","size-xxl":"_01f85e0e","size-xxxl":"_41a5fe19","tablet-size-xxs":"_6ab1577d","tablet-size-xs":"b52a4963","tablet-size-s":"_714a8419","tablet-size-m":"_81cd4d51","tablet-size-l":"bf0a4edb","tablet-size-xl":"e4f0dabd","tablet-size-xxl":"_67ea065d","tablet-size-xxxl":"_2af7f76f","desktop-size-xxs":"_759081dc","desktop-size-xs":"_8290d1c1","desktop-size-s":"_48ea172d","desktop-size-m":"_758f6641","desktop-size-l":"f9ada088","desktop-size-xl":"d3bb7470","desktop-size-xxl":"_9a312ee3","desktop-size-xxxl":"a1d30c23"};
|
|
2078
2133
|
|
|
2079
|
-
const _excluded$
|
|
2134
|
+
const _excluded$o = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
|
|
2080
2135
|
const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
2081
2136
|
|
|
2082
2137
|
function Avatar(_ref) {
|
|
@@ -2088,7 +2143,7 @@ function Avatar(_ref) {
|
|
|
2088
2143
|
colorList = AVATAR_COLORS,
|
|
2089
2144
|
exceptionallySetClassName
|
|
2090
2145
|
} = _ref,
|
|
2091
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2146
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
2092
2147
|
|
|
2093
2148
|
const userInitials = getInitials(user.name) || getInitials(user.email);
|
|
2094
2149
|
const avatarSize = size ? size : 'l';
|
|
@@ -2110,14 +2165,14 @@ Avatar.displayName = 'Avatar';
|
|
|
2110
2165
|
|
|
2111
2166
|
var modules_33c7c985 = {"badge":"c717b894","badge-info":"_0fddcc47","badge-positive":"_62550d9b","badge-promote":"_5fdf5bab","badge-attention":"_2d52906f"};
|
|
2112
2167
|
|
|
2113
|
-
const _excluded$
|
|
2168
|
+
const _excluded$p = ["tone", "label"];
|
|
2114
2169
|
|
|
2115
2170
|
function Badge(_ref) {
|
|
2116
2171
|
let {
|
|
2117
2172
|
tone,
|
|
2118
2173
|
label
|
|
2119
2174
|
} = _ref,
|
|
2120
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2175
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
2121
2176
|
|
|
2122
2177
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2123
2178
|
as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
|
|
@@ -2129,7 +2184,7 @@ function Badge(_ref) {
|
|
|
2129
2184
|
|
|
2130
2185
|
var modules_8f59d13b = {"overlay":"_8aa86dd3","fadein":"_20c07ee6","fitContent":"_713bc08f","container":"_45139719","full":"ec8619a2","large":"_86a1d5a4","medium":"_11d61de3","small":"aee19643","xlarge":"fe449c81","expand":"_61ffb38f","buttonContainer":"_49ffdac0","headerContent":"ee92ccb3"};
|
|
2131
2186
|
|
|
2132
|
-
const _excluded$
|
|
2187
|
+
const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
|
|
2133
2188
|
_excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
2134
2189
|
_excluded3 = ["exceptionallySetClassName", "children"],
|
|
2135
2190
|
_excluded4 = ["exceptionallySetClassName", "withDivider"],
|
|
@@ -2167,7 +2222,7 @@ function Modal(_ref) {
|
|
|
2167
2222
|
children,
|
|
2168
2223
|
portalElement
|
|
2169
2224
|
} = _ref,
|
|
2170
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2225
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
2171
2226
|
|
|
2172
2227
|
const setOpen = React.useCallback(visible => {
|
|
2173
2228
|
if (!visible) {
|
|
@@ -2416,7 +2471,7 @@ function usePrevious(value) {
|
|
|
2416
2471
|
|
|
2417
2472
|
var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
|
|
2418
2473
|
|
|
2419
|
-
const _excluded$
|
|
2474
|
+
const _excluded$r = ["as", "children", "id", "exceptionallySetClassName"],
|
|
2420
2475
|
_excluded2$2 = ["children", "space"],
|
|
2421
2476
|
_excluded3$1 = ["children", "id", "as", "render"];
|
|
2422
2477
|
const TabsContext = /*#__PURE__*/React.createContext(null);
|
|
@@ -2467,7 +2522,7 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref, ref) {
|
|
|
2467
2522
|
id,
|
|
2468
2523
|
exceptionallySetClassName
|
|
2469
2524
|
} = _ref,
|
|
2470
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2525
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
2471
2526
|
|
|
2472
2527
|
const tabContextValue = React.useContext(TabsContext);
|
|
2473
2528
|
|
|
@@ -2577,7 +2632,7 @@ function TabAwareSlot({
|
|
|
2577
2632
|
}) : null;
|
|
2578
2633
|
}
|
|
2579
2634
|
|
|
2580
|
-
const _excluded$
|
|
2635
|
+
const _excluded$s = ["children", "onItemSelect"],
|
|
2581
2636
|
_excluded2$3 = ["exceptionallySetClassName"],
|
|
2582
2637
|
_excluded3$2 = ["as"],
|
|
2583
2638
|
_excluded4$1 = ["exceptionallySetClassName", "modal"],
|
|
@@ -2599,7 +2654,7 @@ function Menu(_ref) {
|
|
|
2599
2654
|
children,
|
|
2600
2655
|
onItemSelect
|
|
2601
2656
|
} = _ref,
|
|
2602
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2657
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
2603
2658
|
|
|
2604
2659
|
const [anchorRect, handleAnchorRectChange] = React.useState(null);
|
|
2605
2660
|
const getAnchorRect = React.useMemo(() => {
|
|
@@ -2813,7 +2868,7 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, re
|
|
|
2813
2868
|
}, label) : null, children);
|
|
2814
2869
|
});
|
|
2815
2870
|
|
|
2816
|
-
const _excluded$
|
|
2871
|
+
const _excluded$t = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
2817
2872
|
/**
|
|
2818
2873
|
* @deprecated
|
|
2819
2874
|
*/
|
|
@@ -2829,7 +2884,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
2829
2884
|
onClick,
|
|
2830
2885
|
children
|
|
2831
2886
|
} = _ref,
|
|
2832
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2887
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
2833
2888
|
|
|
2834
2889
|
const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
|
|
2835
2890
|
'reactist_button--loading': loading
|
|
@@ -2852,7 +2907,7 @@ Button$1.defaultProps = {
|
|
|
2852
2907
|
disabled: false
|
|
2853
2908
|
};
|
|
2854
2909
|
|
|
2855
|
-
const _excluded$
|
|
2910
|
+
const _excluded$u = ["children", "onClick", "tooltip", "className"];
|
|
2856
2911
|
|
|
2857
2912
|
class Box$1 extends React.Component {
|
|
2858
2913
|
constructor(props, context) {
|
|
@@ -3005,7 +3060,7 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
|
|
|
3005
3060
|
tooltip,
|
|
3006
3061
|
className
|
|
3007
3062
|
} = _ref,
|
|
3008
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3063
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
3009
3064
|
|
|
3010
3065
|
function handleClick(event) {
|
|
3011
3066
|
event.preventDefault();
|
|
@@ -3132,7 +3187,7 @@ function ColorItem({
|
|
|
3132
3187
|
|
|
3133
3188
|
ColorItem.displayName = 'ColorItem';
|
|
3134
3189
|
|
|
3135
|
-
const _excluded$
|
|
3190
|
+
const _excluded$v = ["children", "className", "translateKey", "isMac"];
|
|
3136
3191
|
// Support for setting up how to translate modifiers globally.
|
|
3137
3192
|
//
|
|
3138
3193
|
|
|
@@ -3214,7 +3269,7 @@ function KeyboardShortcut(_ref) {
|
|
|
3214
3269
|
translateKey = globalTranslateKey,
|
|
3215
3270
|
isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
|
|
3216
3271
|
} = _ref,
|
|
3217
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3272
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
3218
3273
|
|
|
3219
3274
|
const shortcuts = typeof children === 'string' ? [children] : children;
|
|
3220
3275
|
return /*#__PURE__*/React.createElement("span", _objectSpread2({
|
|
@@ -3629,7 +3684,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
3629
3684
|
});
|
|
3630
3685
|
Input.displayName = 'Input';
|
|
3631
3686
|
|
|
3632
|
-
const _excluded$
|
|
3687
|
+
const _excluded$w = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
3633
3688
|
|
|
3634
3689
|
function Select(_ref) {
|
|
3635
3690
|
let {
|
|
@@ -3640,7 +3695,7 @@ function Select(_ref) {
|
|
|
3640
3695
|
className = '',
|
|
3641
3696
|
defaultValue
|
|
3642
3697
|
} = _ref,
|
|
3643
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3698
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
3644
3699
|
|
|
3645
3700
|
const selectClassName = classNames('reactist_select', {
|
|
3646
3701
|
disabled
|
|
@@ -3674,7 +3729,7 @@ const CloseIcon$1 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
3674
3729
|
d: "M11.293 12L5.146 5.854a.5.5 0 1 1 .708-.708L12 11.293l6.146-6.147a.5.5 0 0 1 .708.708L12.707 12l6.147 6.146a.5.5 0 0 1-.708.708L12 12.707l-6.146 6.147a.5.5 0 0 1-.708-.708L11.293 12z"
|
|
3675
3730
|
}));
|
|
3676
3731
|
|
|
3677
|
-
const _excluded$
|
|
3732
|
+
const _excluded$x = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
|
|
3678
3733
|
|
|
3679
3734
|
function DeprecatedNotification(_ref) {
|
|
3680
3735
|
let {
|
|
@@ -3690,7 +3745,7 @@ function DeprecatedNotification(_ref) {
|
|
|
3690
3745
|
className,
|
|
3691
3746
|
'aria-live': ariaLive = 'polite'
|
|
3692
3747
|
} = _ref,
|
|
3693
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3748
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
3694
3749
|
|
|
3695
3750
|
const titleId = title ? id + "-title" : null;
|
|
3696
3751
|
const titleIdAttribute = titleId ? {
|
|
@@ -3742,7 +3797,7 @@ function DeprecatedNotification(_ref) {
|
|
|
3742
3797
|
|
|
3743
3798
|
var modules_8f59d13b$1 = {"reach-portal":"ad18b0a0","fadein":"f7a1b219","fitContent":"_8ed9bb5c","container":"f67e892e","full":"_4139421e","large":"_649eb5fe","medium":"_5323e676","small":"_56ca7ae6","xlarge":"a7be0fce","overlay":"_88a7a680","expand":"b29456b8","buttonContainer":"_09ef1f4f","headerContent":"_0e5b530a"};
|
|
3744
3799
|
|
|
3745
|
-
const _excluded$
|
|
3800
|
+
const _excluded$y = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
|
|
3746
3801
|
_excluded2$4 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
3747
3802
|
_excluded3$3 = ["exceptionallySetClassName", "children"],
|
|
3748
3803
|
_excluded4$2 = ["exceptionallySetClassName", "withDivider"],
|
|
@@ -3777,7 +3832,7 @@ function DeprecatedModal(_ref) {
|
|
|
3777
3832
|
autoFocus = true,
|
|
3778
3833
|
children
|
|
3779
3834
|
} = _ref,
|
|
3780
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3835
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
3781
3836
|
|
|
3782
3837
|
const contextValue = React.useMemo(() => ({
|
|
3783
3838
|
onDismiss,
|
|
@@ -3949,6 +4004,7 @@ function DeprecatedModalActions(_ref5) {
|
|
|
3949
4004
|
exports.Alert = Alert;
|
|
3950
4005
|
exports.Avatar = Avatar;
|
|
3951
4006
|
exports.Badge = Badge;
|
|
4007
|
+
exports.Banner = Banner;
|
|
3952
4008
|
exports.Box = Box;
|
|
3953
4009
|
exports.Button = Button;
|
|
3954
4010
|
exports.ButtonLink = ButtonLink;
|