@doist/reactist 19.1.0 → 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 +2 -0
- package/dist/reactist.cjs.development.js +125 -70
- 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/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.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/base-field/base-field.js +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 +1 -1
- package/styles/banner.css +7 -0
- package/styles/banner.module.css.css +1 -0
- package/styles/reactist.css +1 -0
package/README.md
CHANGED
|
@@ -74,6 +74,8 @@ This command will prompt you to provide all the information needed to create a n
|
|
|
74
74
|
|
|
75
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
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
|
+
|
|
77
79
|
## Storybook
|
|
78
80
|
|
|
79
81
|
For the first development mode run:
|
|
@@ -831,7 +831,81 @@ function Alert({
|
|
|
831
831
|
})) : null));
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
|
|
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"];
|
|
835
909
|
const sizeMapping = {
|
|
836
910
|
xsmall: 16,
|
|
837
911
|
small: 24,
|
|
@@ -846,7 +920,7 @@ function Loading(_ref) {
|
|
|
846
920
|
size = 'small',
|
|
847
921
|
exceptionallySetClassName
|
|
848
922
|
} = _ref,
|
|
849
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
923
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
850
924
|
|
|
851
925
|
const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
|
|
852
926
|
const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
@@ -889,7 +963,7 @@ function Notice({
|
|
|
889
963
|
|
|
890
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"};
|
|
891
965
|
|
|
892
|
-
const _excluded$
|
|
966
|
+
const _excluded$b = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
893
967
|
const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
894
968
|
let {
|
|
895
969
|
as,
|
|
@@ -901,7 +975,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
901
975
|
lineClamp,
|
|
902
976
|
exceptionallySetClassName
|
|
903
977
|
} = _ref,
|
|
904
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
978
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
905
979
|
|
|
906
980
|
const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
|
|
907
981
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -917,7 +991,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
917
991
|
|
|
918
992
|
var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
|
|
919
993
|
|
|
920
|
-
const _excluded$
|
|
994
|
+
const _excluded$c = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
|
|
921
995
|
/**
|
|
922
996
|
* A toast that shows a message, and an optional action associated with it.
|
|
923
997
|
*
|
|
@@ -942,7 +1016,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
942
1016
|
onDismiss,
|
|
943
1017
|
dismissLabel = 'Close'
|
|
944
1018
|
} = _ref,
|
|
945
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1019
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
946
1020
|
|
|
947
1021
|
return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
|
|
948
1022
|
ref: ref,
|
|
@@ -992,26 +1066,6 @@ function ToastContentSlot({
|
|
|
992
1066
|
}, children);
|
|
993
1067
|
}
|
|
994
1068
|
|
|
995
|
-
let uid = 0;
|
|
996
|
-
|
|
997
|
-
function uniqueId() {
|
|
998
|
-
return uid++;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
function generateElementId(prefix) {
|
|
1002
|
-
const num = uniqueId();
|
|
1003
|
-
return prefix + "-" + num;
|
|
1004
|
-
}
|
|
1005
|
-
function useId(providedId) {
|
|
1006
|
-
const ref = React.useRef(providedId != null ? providedId : null);
|
|
1007
|
-
|
|
1008
|
-
if (!ref.current) {
|
|
1009
|
-
ref.current = generateElementId('element');
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
return ref.current;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
1069
|
/**
|
|
1016
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
|
|
1017
1071
|
*
|
|
@@ -1183,7 +1237,7 @@ function useToastsAnimation() {
|
|
|
1183
1237
|
};
|
|
1184
1238
|
}
|
|
1185
1239
|
|
|
1186
|
-
const _excluded$
|
|
1240
|
+
const _excluded$d = ["toastId"];
|
|
1187
1241
|
/** @private */
|
|
1188
1242
|
|
|
1189
1243
|
const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
|
|
@@ -1292,7 +1346,7 @@ function ToastsProvider({
|
|
|
1292
1346
|
let {
|
|
1293
1347
|
toastId
|
|
1294
1348
|
} = _ref,
|
|
1295
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1349
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1296
1350
|
|
|
1297
1351
|
return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
|
|
1298
1352
|
key: toastId,
|
|
@@ -1368,7 +1422,7 @@ function Toast(props) {
|
|
|
1368
1422
|
|
|
1369
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"};
|
|
1370
1424
|
|
|
1371
|
-
const _excluded$
|
|
1425
|
+
const _excluded$e = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
1372
1426
|
const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
1373
1427
|
let {
|
|
1374
1428
|
level,
|
|
@@ -1380,7 +1434,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1380
1434
|
align,
|
|
1381
1435
|
exceptionallySetClassName
|
|
1382
1436
|
} = _ref,
|
|
1383
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1437
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
1384
1438
|
|
|
1385
1439
|
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
1386
1440
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
@@ -1397,7 +1451,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1397
1451
|
}), children);
|
|
1398
1452
|
});
|
|
1399
1453
|
|
|
1400
|
-
const _excluded$
|
|
1454
|
+
const _excluded$f = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
|
|
1401
1455
|
/**
|
|
1402
1456
|
* A semantic link that looks like a button, exactly matching the `Button` component in all visual
|
|
1403
1457
|
* aspects.
|
|
@@ -1414,7 +1468,7 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
|
|
|
1414
1468
|
exceptionallySetClassName,
|
|
1415
1469
|
openInNewTab = false
|
|
1416
1470
|
} = _ref,
|
|
1417
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1471
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
1418
1472
|
|
|
1419
1473
|
return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1420
1474
|
as: as,
|
|
@@ -1430,14 +1484,14 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
|
|
|
1430
1484
|
|
|
1431
1485
|
var modules_3d05deee = {"container":"fdc181b3"};
|
|
1432
1486
|
|
|
1433
|
-
const _excluded$
|
|
1487
|
+
const _excluded$g = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
1434
1488
|
const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
1435
1489
|
let {
|
|
1436
1490
|
as = 'a',
|
|
1437
1491
|
openInNewTab = false,
|
|
1438
1492
|
exceptionallySetClassName
|
|
1439
1493
|
} = _ref,
|
|
1440
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1494
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
1441
1495
|
|
|
1442
1496
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1443
1497
|
as: as,
|
|
@@ -1449,7 +1503,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
|
|
|
1449
1503
|
}));
|
|
1450
1504
|
});
|
|
1451
1505
|
|
|
1452
|
-
const _excluded$
|
|
1506
|
+
const _excluded$h = ["checked", "indeterminate", "disabled"];
|
|
1453
1507
|
const svgPath = {
|
|
1454
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',
|
|
1455
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',
|
|
@@ -1488,7 +1542,7 @@ function CheckboxIcon(_ref) {
|
|
|
1488
1542
|
indeterminate,
|
|
1489
1543
|
disabled
|
|
1490
1544
|
} = _ref,
|
|
1491
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1545
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
1492
1546
|
|
|
1493
1547
|
const pathKey = getPathKey({
|
|
1494
1548
|
checked,
|
|
@@ -1509,7 +1563,7 @@ function CheckboxIcon(_ref) {
|
|
|
1509
1563
|
|
|
1510
1564
|
var modules_664a6a80 = {"container":"_84dfdb83","disabled":"_131a2ca4","checked":"_95b1556d","keyFocused":"_49de7ebd","icon":"_6b4b1851","label":"_9047f3bd"};
|
|
1511
1565
|
|
|
1512
|
-
const _excluded$
|
|
1566
|
+
const _excluded$i = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
|
|
1513
1567
|
const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
|
|
1514
1568
|
var _ref2, _props$checked, _props$checked2;
|
|
1515
1569
|
|
|
@@ -1521,7 +1575,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1521
1575
|
defaultChecked,
|
|
1522
1576
|
onChange
|
|
1523
1577
|
} = _ref,
|
|
1524
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1578
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1525
1579
|
|
|
1526
1580
|
const isControlledComponent = typeof props.checked === 'boolean';
|
|
1527
1581
|
|
|
@@ -1736,7 +1790,7 @@ var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
|
|
|
1736
1790
|
|
|
1737
1791
|
var modules_aaf25250 = {"inputWrapper":"fb09cd05","bordered":"f65f40dd","error":"_29118bf0","startIcon":"a40eb111"};
|
|
1738
1792
|
|
|
1739
|
-
const _excluded$
|
|
1793
|
+
const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
|
|
1740
1794
|
const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
|
|
1741
1795
|
let {
|
|
1742
1796
|
variant = 'default',
|
|
@@ -1751,7 +1805,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1751
1805
|
hidden,
|
|
1752
1806
|
'aria-describedby': ariaDescribedBy
|
|
1753
1807
|
} = _ref,
|
|
1754
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1808
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1755
1809
|
|
|
1756
1810
|
const id = useId(props.id);
|
|
1757
1811
|
const internalRef = React.useRef(null);
|
|
@@ -1800,7 +1854,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1800
1854
|
|
|
1801
1855
|
var modules_1fa9b208 = {"selectWrapper":"a804edbf","bordered":"_50a3655f","error":"a6d38abf"};
|
|
1802
1856
|
|
|
1803
|
-
const _excluded$
|
|
1857
|
+
const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
|
|
1804
1858
|
const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
|
|
1805
1859
|
let {
|
|
1806
1860
|
variant = 'default',
|
|
@@ -1816,7 +1870,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
|
|
|
1816
1870
|
hidden,
|
|
1817
1871
|
'aria-describedby': ariaDescribedBy
|
|
1818
1872
|
} = _ref,
|
|
1819
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1873
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1820
1874
|
|
|
1821
1875
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
1822
1876
|
variant: variant,
|
|
@@ -1854,7 +1908,7 @@ function SelectChevron(props) {
|
|
|
1854
1908
|
|
|
1855
1909
|
var modules_8e05f7c9 = {"container":"ec63c3f1","disabled":"_7de9c06d","checked":"a37981fc","toggle":"_2a17ac45","label":"_68cc9707","handle":"_91409c7f","keyFocused":"a6490371"};
|
|
1856
1910
|
|
|
1857
|
-
const _excluded$
|
|
1911
|
+
const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
|
|
1858
1912
|
const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
|
|
1859
1913
|
var _ref2, _props$checked, _props$checked2;
|
|
1860
1914
|
|
|
@@ -1870,7 +1924,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1870
1924
|
'aria-labelledby': originalAriaLabelledby,
|
|
1871
1925
|
onChange
|
|
1872
1926
|
} = _ref,
|
|
1873
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1927
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1874
1928
|
|
|
1875
1929
|
const id = useId(originalId);
|
|
1876
1930
|
const hintId = useId();
|
|
@@ -1930,7 +1984,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1930
1984
|
|
|
1931
1985
|
var modules_2728c236 = {"textAreaContainer":"_21dbfa84","innerContainer":"_43588660","bordered":"f081b428","error":"a862f0e5","autoExpand":"_46360b15"};
|
|
1932
1986
|
|
|
1933
|
-
const _excluded$
|
|
1987
|
+
const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
|
|
1934
1988
|
const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
1935
1989
|
let {
|
|
1936
1990
|
variant = 'default',
|
|
@@ -1947,7 +2001,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
1947
2001
|
rows,
|
|
1948
2002
|
autoExpand = false
|
|
1949
2003
|
} = _ref,
|
|
1950
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2004
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1951
2005
|
|
|
1952
2006
|
const containerRef = React.useRef(null);
|
|
1953
2007
|
const internalRef = React.useRef(null);
|
|
@@ -1991,7 +2045,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
1991
2045
|
}))));
|
|
1992
2046
|
});
|
|
1993
2047
|
|
|
1994
|
-
const _excluded$
|
|
2048
|
+
const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
|
|
1995
2049
|
const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
1996
2050
|
let {
|
|
1997
2051
|
variant = 'default',
|
|
@@ -2008,7 +2062,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
2008
2062
|
'aria-describedby': ariaDescribedBy,
|
|
2009
2063
|
startIcon
|
|
2010
2064
|
} = _ref,
|
|
2011
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2065
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2012
2066
|
|
|
2013
2067
|
const internalRef = React.useRef(null);
|
|
2014
2068
|
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
@@ -2077,7 +2131,7 @@ function emailToIndex(email, maxIndex) {
|
|
|
2077
2131
|
|
|
2078
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"};
|
|
2079
2133
|
|
|
2080
|
-
const _excluded$
|
|
2134
|
+
const _excluded$o = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
|
|
2081
2135
|
const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
2082
2136
|
|
|
2083
2137
|
function Avatar(_ref) {
|
|
@@ -2089,7 +2143,7 @@ function Avatar(_ref) {
|
|
|
2089
2143
|
colorList = AVATAR_COLORS,
|
|
2090
2144
|
exceptionallySetClassName
|
|
2091
2145
|
} = _ref,
|
|
2092
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2146
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
2093
2147
|
|
|
2094
2148
|
const userInitials = getInitials(user.name) || getInitials(user.email);
|
|
2095
2149
|
const avatarSize = size ? size : 'l';
|
|
@@ -2111,14 +2165,14 @@ Avatar.displayName = 'Avatar';
|
|
|
2111
2165
|
|
|
2112
2166
|
var modules_33c7c985 = {"badge":"c717b894","badge-info":"_0fddcc47","badge-positive":"_62550d9b","badge-promote":"_5fdf5bab","badge-attention":"_2d52906f"};
|
|
2113
2167
|
|
|
2114
|
-
const _excluded$
|
|
2168
|
+
const _excluded$p = ["tone", "label"];
|
|
2115
2169
|
|
|
2116
2170
|
function Badge(_ref) {
|
|
2117
2171
|
let {
|
|
2118
2172
|
tone,
|
|
2119
2173
|
label
|
|
2120
2174
|
} = _ref,
|
|
2121
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2175
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
2122
2176
|
|
|
2123
2177
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2124
2178
|
as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
|
|
@@ -2130,7 +2184,7 @@ function Badge(_ref) {
|
|
|
2130
2184
|
|
|
2131
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"};
|
|
2132
2186
|
|
|
2133
|
-
const _excluded$
|
|
2187
|
+
const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
|
|
2134
2188
|
_excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
2135
2189
|
_excluded3 = ["exceptionallySetClassName", "children"],
|
|
2136
2190
|
_excluded4 = ["exceptionallySetClassName", "withDivider"],
|
|
@@ -2168,7 +2222,7 @@ function Modal(_ref) {
|
|
|
2168
2222
|
children,
|
|
2169
2223
|
portalElement
|
|
2170
2224
|
} = _ref,
|
|
2171
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2225
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
2172
2226
|
|
|
2173
2227
|
const setOpen = React.useCallback(visible => {
|
|
2174
2228
|
if (!visible) {
|
|
@@ -2417,7 +2471,7 @@ function usePrevious(value) {
|
|
|
2417
2471
|
|
|
2418
2472
|
var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
|
|
2419
2473
|
|
|
2420
|
-
const _excluded$
|
|
2474
|
+
const _excluded$r = ["as", "children", "id", "exceptionallySetClassName"],
|
|
2421
2475
|
_excluded2$2 = ["children", "space"],
|
|
2422
2476
|
_excluded3$1 = ["children", "id", "as", "render"];
|
|
2423
2477
|
const TabsContext = /*#__PURE__*/React.createContext(null);
|
|
@@ -2468,7 +2522,7 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref, ref) {
|
|
|
2468
2522
|
id,
|
|
2469
2523
|
exceptionallySetClassName
|
|
2470
2524
|
} = _ref,
|
|
2471
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2525
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
2472
2526
|
|
|
2473
2527
|
const tabContextValue = React.useContext(TabsContext);
|
|
2474
2528
|
|
|
@@ -2578,7 +2632,7 @@ function TabAwareSlot({
|
|
|
2578
2632
|
}) : null;
|
|
2579
2633
|
}
|
|
2580
2634
|
|
|
2581
|
-
const _excluded$
|
|
2635
|
+
const _excluded$s = ["children", "onItemSelect"],
|
|
2582
2636
|
_excluded2$3 = ["exceptionallySetClassName"],
|
|
2583
2637
|
_excluded3$2 = ["as"],
|
|
2584
2638
|
_excluded4$1 = ["exceptionallySetClassName", "modal"],
|
|
@@ -2600,7 +2654,7 @@ function Menu(_ref) {
|
|
|
2600
2654
|
children,
|
|
2601
2655
|
onItemSelect
|
|
2602
2656
|
} = _ref,
|
|
2603
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2657
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
2604
2658
|
|
|
2605
2659
|
const [anchorRect, handleAnchorRectChange] = React.useState(null);
|
|
2606
2660
|
const getAnchorRect = React.useMemo(() => {
|
|
@@ -2814,7 +2868,7 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, re
|
|
|
2814
2868
|
}, label) : null, children);
|
|
2815
2869
|
});
|
|
2816
2870
|
|
|
2817
|
-
const _excluded$
|
|
2871
|
+
const _excluded$t = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
2818
2872
|
/**
|
|
2819
2873
|
* @deprecated
|
|
2820
2874
|
*/
|
|
@@ -2830,7 +2884,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
2830
2884
|
onClick,
|
|
2831
2885
|
children
|
|
2832
2886
|
} = _ref,
|
|
2833
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2887
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
2834
2888
|
|
|
2835
2889
|
const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
|
|
2836
2890
|
'reactist_button--loading': loading
|
|
@@ -2853,7 +2907,7 @@ Button$1.defaultProps = {
|
|
|
2853
2907
|
disabled: false
|
|
2854
2908
|
};
|
|
2855
2909
|
|
|
2856
|
-
const _excluded$
|
|
2910
|
+
const _excluded$u = ["children", "onClick", "tooltip", "className"];
|
|
2857
2911
|
|
|
2858
2912
|
class Box$1 extends React.Component {
|
|
2859
2913
|
constructor(props, context) {
|
|
@@ -3006,7 +3060,7 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
|
|
|
3006
3060
|
tooltip,
|
|
3007
3061
|
className
|
|
3008
3062
|
} = _ref,
|
|
3009
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3063
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
3010
3064
|
|
|
3011
3065
|
function handleClick(event) {
|
|
3012
3066
|
event.preventDefault();
|
|
@@ -3133,7 +3187,7 @@ function ColorItem({
|
|
|
3133
3187
|
|
|
3134
3188
|
ColorItem.displayName = 'ColorItem';
|
|
3135
3189
|
|
|
3136
|
-
const _excluded$
|
|
3190
|
+
const _excluded$v = ["children", "className", "translateKey", "isMac"];
|
|
3137
3191
|
// Support for setting up how to translate modifiers globally.
|
|
3138
3192
|
//
|
|
3139
3193
|
|
|
@@ -3215,7 +3269,7 @@ function KeyboardShortcut(_ref) {
|
|
|
3215
3269
|
translateKey = globalTranslateKey,
|
|
3216
3270
|
isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
|
|
3217
3271
|
} = _ref,
|
|
3218
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3272
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
3219
3273
|
|
|
3220
3274
|
const shortcuts = typeof children === 'string' ? [children] : children;
|
|
3221
3275
|
return /*#__PURE__*/React.createElement("span", _objectSpread2({
|
|
@@ -3630,7 +3684,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
3630
3684
|
});
|
|
3631
3685
|
Input.displayName = 'Input';
|
|
3632
3686
|
|
|
3633
|
-
const _excluded$
|
|
3687
|
+
const _excluded$w = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
3634
3688
|
|
|
3635
3689
|
function Select(_ref) {
|
|
3636
3690
|
let {
|
|
@@ -3641,7 +3695,7 @@ function Select(_ref) {
|
|
|
3641
3695
|
className = '',
|
|
3642
3696
|
defaultValue
|
|
3643
3697
|
} = _ref,
|
|
3644
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3698
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
3645
3699
|
|
|
3646
3700
|
const selectClassName = classNames('reactist_select', {
|
|
3647
3701
|
disabled
|
|
@@ -3675,7 +3729,7 @@ const CloseIcon$1 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
3675
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"
|
|
3676
3730
|
}));
|
|
3677
3731
|
|
|
3678
|
-
const _excluded$
|
|
3732
|
+
const _excluded$x = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
|
|
3679
3733
|
|
|
3680
3734
|
function DeprecatedNotification(_ref) {
|
|
3681
3735
|
let {
|
|
@@ -3691,7 +3745,7 @@ function DeprecatedNotification(_ref) {
|
|
|
3691
3745
|
className,
|
|
3692
3746
|
'aria-live': ariaLive = 'polite'
|
|
3693
3747
|
} = _ref,
|
|
3694
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3748
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
3695
3749
|
|
|
3696
3750
|
const titleId = title ? id + "-title" : null;
|
|
3697
3751
|
const titleIdAttribute = titleId ? {
|
|
@@ -3743,7 +3797,7 @@ function DeprecatedNotification(_ref) {
|
|
|
3743
3797
|
|
|
3744
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"};
|
|
3745
3799
|
|
|
3746
|
-
const _excluded$
|
|
3800
|
+
const _excluded$y = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
|
|
3747
3801
|
_excluded2$4 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
3748
3802
|
_excluded3$3 = ["exceptionallySetClassName", "children"],
|
|
3749
3803
|
_excluded4$2 = ["exceptionallySetClassName", "withDivider"],
|
|
@@ -3778,7 +3832,7 @@ function DeprecatedModal(_ref) {
|
|
|
3778
3832
|
autoFocus = true,
|
|
3779
3833
|
children
|
|
3780
3834
|
} = _ref,
|
|
3781
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3835
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
3782
3836
|
|
|
3783
3837
|
const contextValue = React.useMemo(() => ({
|
|
3784
3838
|
onDismiss,
|
|
@@ -3950,6 +4004,7 @@ function DeprecatedModalActions(_ref5) {
|
|
|
3950
4004
|
exports.Alert = Alert;
|
|
3951
4005
|
exports.Avatar = Avatar;
|
|
3952
4006
|
exports.Badge = Badge;
|
|
4007
|
+
exports.Banner = Banner;
|
|
3953
4008
|
exports.Box = Box;
|
|
3954
4009
|
exports.Button = Button;
|
|
3955
4010
|
exports.ButtonLink = ButtonLink;
|