@moda/om 21.9.0 → 21.11.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/index.cjs.js +78 -71
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +78 -71
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/Field/Field.d.ts +2 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Field/Field.tsx +3 -2
- package/src/components/OtpInput/OtpInput.tsx +35 -31
package/dist/index.cjs.js
CHANGED
|
@@ -1355,11 +1355,11 @@ var StateProps = function StateProps(_ref) {
|
|
|
1355
1355
|
}, stringifyProps(props)), ' ', !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React.createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React.createElement("span", null, ' />'));
|
|
1356
1356
|
};
|
|
1357
1357
|
|
|
1358
|
-
var _excluded$
|
|
1358
|
+
var _excluded$H = ["props", "children"];
|
|
1359
1359
|
var State = function State(_ref) {
|
|
1360
1360
|
var props = _ref.props,
|
|
1361
1361
|
children = _ref.children,
|
|
1362
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
1362
|
+
rest = _objectWithoutProperties(_ref, _excluded$H);
|
|
1363
1363
|
var styles = useStyles();
|
|
1364
1364
|
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React.cloneElement(children, props);
|
|
1365
1365
|
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
@@ -1370,12 +1370,12 @@ var State = function State(_ref) {
|
|
|
1370
1370
|
}, innerChildren));
|
|
1371
1371
|
};
|
|
1372
1372
|
|
|
1373
|
-
var _excluded$
|
|
1373
|
+
var _excluded$G = ["states", "children"];
|
|
1374
1374
|
var States = function States(_ref) {
|
|
1375
1375
|
var _ref$states = _ref.states,
|
|
1376
1376
|
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1377
1377
|
children = _ref.children,
|
|
1378
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
1378
|
+
rest = _objectWithoutProperties(_ref, _excluded$G);
|
|
1379
1379
|
return /*#__PURE__*/React.createElement(React.Fragment, null, states.map(function (props, index) {
|
|
1380
1380
|
return /*#__PURE__*/React.createElement(State, _extends$1({
|
|
1381
1381
|
key: index,
|
|
@@ -5431,7 +5431,7 @@ function requireDist$3() {
|
|
|
5431
5431
|
|
|
5432
5432
|
var distExports$3 = requireDist$3();
|
|
5433
5433
|
|
|
5434
|
-
var _excluded$
|
|
5434
|
+
var _excluded$F = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5435
5435
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5436
5436
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5437
5437
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5477,7 +5477,7 @@ var AspectRatioBox = /*#__PURE__*/React.forwardRef(function (_ref2, forwardedRef
|
|
|
5477
5477
|
outlined = _ref2$outlined === void 0 ? false : _ref2$outlined,
|
|
5478
5478
|
children = _ref2.children,
|
|
5479
5479
|
className = _ref2.className,
|
|
5480
|
-
rest = _objectWithoutProperties(_ref2, _excluded$
|
|
5480
|
+
rest = _objectWithoutProperties(_ref2, _excluded$F);
|
|
5481
5481
|
var _scaleDimensions = scaleDimensions({
|
|
5482
5482
|
width: aspectWidth,
|
|
5483
5483
|
height: aspectHeight,
|
|
@@ -5505,22 +5505,22 @@ var AspectRatioBox = /*#__PURE__*/React.forwardRef(function (_ref2, forwardedRef
|
|
|
5505
5505
|
});
|
|
5506
5506
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5507
5507
|
|
|
5508
|
-
var _excluded$
|
|
5508
|
+
var _excluded$E = ["className", "theme", "children"];
|
|
5509
5509
|
var Badge = function Badge(_ref) {
|
|
5510
5510
|
var className = _ref.className,
|
|
5511
5511
|
theme = _ref.theme,
|
|
5512
5512
|
children = _ref.children,
|
|
5513
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5513
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
5514
5514
|
return /*#__PURE__*/React.createElement("span", _extends$1({
|
|
5515
5515
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5516
5516
|
}, rest), children);
|
|
5517
5517
|
};
|
|
5518
5518
|
|
|
5519
|
-
var _excluded$
|
|
5519
|
+
var _excluded$D = ["children", "className"];
|
|
5520
5520
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5521
5521
|
var children = _ref.children,
|
|
5522
5522
|
className = _ref.className,
|
|
5523
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5523
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
5524
5524
|
var position = 0;
|
|
5525
5525
|
return /*#__PURE__*/React.createElement("ol", _extends$1({
|
|
5526
5526
|
itemScope: true,
|
|
@@ -5538,7 +5538,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5538
5538
|
}));
|
|
5539
5539
|
};
|
|
5540
5540
|
|
|
5541
|
-
var _excluded$
|
|
5541
|
+
var _excluded$C = ["className", "styleless", "disabled"];
|
|
5542
5542
|
|
|
5543
5543
|
// Define minimal LinkProps that work with both v5 and v7
|
|
5544
5544
|
// Using Omit to remove conflicting HTML attributes, then add router-specific props
|
|
@@ -5557,7 +5557,7 @@ var Clickable = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
5557
5557
|
_ref$styleless = _ref.styleless,
|
|
5558
5558
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5559
5559
|
disabled = _ref.disabled,
|
|
5560
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5560
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
5561
5561
|
var baseClassName = classNames({
|
|
5562
5562
|
Clickable: !styleless,
|
|
5563
5563
|
'Clickable--disabled': disabled
|
|
@@ -5585,14 +5585,14 @@ var Clickable = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
5585
5585
|
});
|
|
5586
5586
|
Clickable.displayName = 'Clickable';
|
|
5587
5587
|
|
|
5588
|
-
var _excluded$
|
|
5588
|
+
var _excluded$B = ["className", "disabled", "children", "underlined"];
|
|
5589
5589
|
var ControlLink = function ControlLink(_ref) {
|
|
5590
5590
|
var className = _ref.className,
|
|
5591
5591
|
disabled = _ref.disabled,
|
|
5592
5592
|
children = _ref.children,
|
|
5593
5593
|
_ref$underlined = _ref.underlined,
|
|
5594
5594
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5595
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5595
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5596
5596
|
return /*#__PURE__*/React.createElement(Clickable, _extends$1({}, rest, {
|
|
5597
5597
|
className: classNames('ControlLink', {
|
|
5598
5598
|
'ControlLink--underlined': underlined
|
|
@@ -5603,12 +5603,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5603
5603
|
}), children);
|
|
5604
5604
|
};
|
|
5605
5605
|
|
|
5606
|
-
var _excluded$
|
|
5606
|
+
var _excluded$A = ["children", "position", "className"];
|
|
5607
5607
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5608
5608
|
var children = _ref.children,
|
|
5609
5609
|
position = _ref.position,
|
|
5610
5610
|
className = _ref.className,
|
|
5611
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5611
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5612
5612
|
return /*#__PURE__*/React.createElement("li", {
|
|
5613
5613
|
className: classNames('Breadcrumb', className),
|
|
5614
5614
|
itemProp: "itemListElement",
|
|
@@ -7352,11 +7352,11 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
7352
7352
|
};
|
|
7353
7353
|
};
|
|
7354
7354
|
|
|
7355
|
-
var _excluded$
|
|
7355
|
+
var _excluded$z = ["children", "className"];
|
|
7356
7356
|
var Breakpoint = function Breakpoint(_ref) {
|
|
7357
7357
|
var children = _ref.children,
|
|
7358
7358
|
className = _ref.className,
|
|
7359
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7359
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
7360
7360
|
var _discriminate = discriminate(rest),
|
|
7361
7361
|
mode = _discriminate.mode,
|
|
7362
7362
|
breakpoint = _discriminate.breakpoint;
|
|
@@ -7367,7 +7367,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
7367
7367
|
}, omit(['at', 'gt', 'lt'], rest)), children) : null;
|
|
7368
7368
|
};
|
|
7369
7369
|
|
|
7370
|
-
var _excluded$
|
|
7370
|
+
var _excluded$y = ["secondary", "tertiary", "elevated", "chip", "hover", "focus", "disabled", "className"];
|
|
7371
7371
|
var Button = function Button(_ref) {
|
|
7372
7372
|
var secondary = _ref.secondary,
|
|
7373
7373
|
tertiary = _ref.tertiary,
|
|
@@ -7377,7 +7377,7 @@ var Button = function Button(_ref) {
|
|
|
7377
7377
|
focus = _ref.focus,
|
|
7378
7378
|
disabled = _ref.disabled,
|
|
7379
7379
|
className = _ref.className,
|
|
7380
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7380
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
7381
7381
|
return /*#__PURE__*/React.createElement(Clickable, _extends$1({
|
|
7382
7382
|
className: classNames('Button', {
|
|
7383
7383
|
'Button--chip': chip,
|
|
@@ -7501,7 +7501,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
7501
7501
|
};
|
|
7502
7502
|
Circle12.displayName = 'Circle12';
|
|
7503
7503
|
|
|
7504
|
-
var _excluded$
|
|
7504
|
+
var _excluded$x = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon", "dataTestId", "id"];
|
|
7505
7505
|
var CHECKED_ITEM_PROPS = {
|
|
7506
7506
|
className: 'Checkbox__check-mark',
|
|
7507
7507
|
height: '85%',
|
|
@@ -7520,7 +7520,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
7520
7520
|
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
7521
7521
|
dataTestId = _ref.dataTestId,
|
|
7522
7522
|
id = _ref.id,
|
|
7523
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7523
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
7524
7524
|
var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
7525
7525
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7526
7526
|
isChecked = _useState2[0],
|
|
@@ -7610,7 +7610,7 @@ var SKU_COLORS = {
|
|
|
7610
7610
|
yellow: '#ffca44'
|
|
7611
7611
|
};
|
|
7612
7612
|
|
|
7613
|
-
var _excluded$
|
|
7613
|
+
var _excluded$w = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled", "title"];
|
|
7614
7614
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
7615
7615
|
var _SKU_COLORS;
|
|
7616
7616
|
var className = _ref.className,
|
|
@@ -7626,7 +7626,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
7626
7626
|
onMouseEnter = _ref.onMouseEnter,
|
|
7627
7627
|
disabled = _ref.disabled,
|
|
7628
7628
|
title = _ref.title,
|
|
7629
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7629
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
7630
7630
|
var handleClick = React.useCallback(function (_event) {
|
|
7631
7631
|
onClick === null || onClick === void 0 || onClick(color, title);
|
|
7632
7632
|
}, [color, title, onClick]);
|
|
@@ -7661,7 +7661,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
7661
7661
|
}));
|
|
7662
7662
|
};
|
|
7663
7663
|
|
|
7664
|
-
var _excluded$
|
|
7664
|
+
var _excluded$v = ["className", "children", "onClose", "shards", "autoFocus"];
|
|
7665
7665
|
var Modal = function Modal(_ref) {
|
|
7666
7666
|
var className = _ref.className,
|
|
7667
7667
|
children = _ref.children,
|
|
@@ -7669,7 +7669,7 @@ var Modal = function Modal(_ref) {
|
|
|
7669
7669
|
shards = _ref.shards,
|
|
7670
7670
|
_ref$autoFocus = _ref.autoFocus,
|
|
7671
7671
|
autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
|
7672
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7672
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
7673
7673
|
return /*#__PURE__*/React.createElement("div", _extends$1({
|
|
7674
7674
|
className: classNames('Modal', className),
|
|
7675
7675
|
role: "dialog",
|
|
@@ -7682,14 +7682,14 @@ var Modal = function Modal(_ref) {
|
|
|
7682
7682
|
}, children));
|
|
7683
7683
|
};
|
|
7684
7684
|
|
|
7685
|
-
var _excluded$
|
|
7685
|
+
var _excluded$u = ["className", "children", "show"];
|
|
7686
7686
|
var UNMOUNT_DELAY_MS = 500;
|
|
7687
7687
|
var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
7688
7688
|
var className = _ref.className,
|
|
7689
7689
|
children = _ref.children,
|
|
7690
7690
|
_ref$show = _ref.show,
|
|
7691
7691
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
7692
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7692
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
7693
7693
|
var _useState = React.useState(show),
|
|
7694
7694
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7695
7695
|
open = _useState2[0],
|
|
@@ -7716,7 +7716,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
7716
7716
|
});
|
|
7717
7717
|
Overlay.displayName = 'Overlay';
|
|
7718
7718
|
|
|
7719
|
-
var _excluded$
|
|
7719
|
+
var _excluded$t = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards", "autoFocus"];
|
|
7720
7720
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
7721
7721
|
var children = _ref.children,
|
|
7722
7722
|
className = _ref.className,
|
|
@@ -7727,7 +7727,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
7727
7727
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
7728
7728
|
shards = _ref.shards,
|
|
7729
7729
|
autoFocus = _ref.autoFocus,
|
|
7730
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7730
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
7731
7731
|
var element = React.useMemo(function () {
|
|
7732
7732
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
7733
7733
|
}, []);
|
|
@@ -7753,7 +7753,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
7753
7753
|
}, children))), element);
|
|
7754
7754
|
};
|
|
7755
7755
|
|
|
7756
|
-
var _excluded$
|
|
7756
|
+
var _excluded$s = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
7757
7757
|
var Stack = function Stack(_ref) {
|
|
7758
7758
|
var className = _ref.className,
|
|
7759
7759
|
children = _ref.children,
|
|
@@ -7763,7 +7763,7 @@ var Stack = function Stack(_ref) {
|
|
|
7763
7763
|
alignItems = _ref.alignItems,
|
|
7764
7764
|
justifyContent = _ref.justifyContent,
|
|
7765
7765
|
style = _ref.style,
|
|
7766
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7766
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
7767
7767
|
return /*#__PURE__*/React.createElement("div", _extends$1({
|
|
7768
7768
|
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
7769
7769
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
@@ -7773,7 +7773,7 @@ var Stack = function Stack(_ref) {
|
|
|
7773
7773
|
}, rest), children);
|
|
7774
7774
|
};
|
|
7775
7775
|
|
|
7776
|
-
var _excluded$
|
|
7776
|
+
var _excluded$r = ["as", "className", "treatment", "color", "family", "children", "style"];
|
|
7777
7777
|
var Text = function Text(_ref) {
|
|
7778
7778
|
var _ref$as = _ref.as,
|
|
7779
7779
|
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
@@ -7785,7 +7785,7 @@ var Text = function Text(_ref) {
|
|
|
7785
7785
|
family = _ref.family,
|
|
7786
7786
|
children = _ref.children,
|
|
7787
7787
|
style = _ref.style,
|
|
7788
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7788
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
7789
7789
|
return /*#__PURE__*/React.createElement(Component, _extends$1({
|
|
7790
7790
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
7791
7791
|
style: _objectSpread2({
|
|
@@ -7794,13 +7794,13 @@ var Text = function Text(_ref) {
|
|
|
7794
7794
|
}, rest), children);
|
|
7795
7795
|
};
|
|
7796
7796
|
|
|
7797
|
-
var _excluded$
|
|
7797
|
+
var _excluded$q = ["title", "message", "actions", "contentClassName"];
|
|
7798
7798
|
var Dialog = function Dialog(_ref) {
|
|
7799
7799
|
var title = _ref.title,
|
|
7800
7800
|
message = _ref.message,
|
|
7801
7801
|
actions = _ref.actions,
|
|
7802
7802
|
contentClassName = _ref.contentClassName,
|
|
7803
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7803
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
7804
7804
|
var titleId = React.useId();
|
|
7805
7805
|
return /*#__PURE__*/React.createElement(ModalOverlay, _extends$1({
|
|
7806
7806
|
contentClassName: classNames('Dialog', contentClassName),
|
|
@@ -7902,21 +7902,21 @@ var useConfirm = function useConfirm() {
|
|
|
7902
7902
|
return React.useContext(ConfirmContext);
|
|
7903
7903
|
};
|
|
7904
7904
|
|
|
7905
|
-
var _excluded$
|
|
7905
|
+
var _excluded$p = ["className", "children"];
|
|
7906
7906
|
var Constrain = function Constrain(_ref) {
|
|
7907
7907
|
var className = _ref.className,
|
|
7908
7908
|
children = _ref.children,
|
|
7909
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7909
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
7910
7910
|
return /*#__PURE__*/React.createElement("div", _extends$1({
|
|
7911
7911
|
className: classNames('Constrain', className)
|
|
7912
7912
|
}, rest), children);
|
|
7913
7913
|
};
|
|
7914
7914
|
|
|
7915
|
-
var _excluded$
|
|
7915
|
+
var _excluded$o = ["className", "children"];
|
|
7916
7916
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
7917
7917
|
var className = _ref.className,
|
|
7918
7918
|
children = _ref.children,
|
|
7919
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7919
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
7920
7920
|
return /*#__PURE__*/React.createElement("div", _extends$1({
|
|
7921
7921
|
className: classNames('ExceedConstrain', className)
|
|
7922
7922
|
}, rest), children);
|
|
@@ -9880,7 +9880,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
9880
9880
|
};
|
|
9881
9881
|
Warning16.displayName = 'Warning16';
|
|
9882
9882
|
|
|
9883
|
-
var _excluded$
|
|
9883
|
+
var _excluded$n = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
9884
9884
|
var TextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9885
9885
|
var className = _ref.className,
|
|
9886
9886
|
disabled = _ref.disabled,
|
|
@@ -9890,7 +9890,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
9890
9890
|
label = _ref.label,
|
|
9891
9891
|
_onChange = _ref.onChange,
|
|
9892
9892
|
onChangeEvent = _ref.onChangeEvent,
|
|
9893
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9893
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
9894
9894
|
return /*#__PURE__*/React.createElement("input", _extends$1({
|
|
9895
9895
|
className: classNames('TextInput', className, {
|
|
9896
9896
|
'TextInput--focus': focus,
|
|
@@ -10346,7 +10346,7 @@ var Search20 = function Search20(_a) {
|
|
|
10346
10346
|
};
|
|
10347
10347
|
Search20.displayName = 'Search20';
|
|
10348
10348
|
|
|
10349
|
-
var _excluded$
|
|
10349
|
+
var _excluded$m = ["className", "onChange", "onClear", "roundBorders", "noBorders", "value", "searchIconSize"];
|
|
10350
10350
|
var SEARCH_ICON_DEFAULT_SIZE = 20;
|
|
10351
10351
|
var DEFAULT_INPUT_VALUE = '';
|
|
10352
10352
|
var SearchInput = function SearchInput(_ref) {
|
|
@@ -10361,7 +10361,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
10361
10361
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
10362
10362
|
_ref$searchIconSize = _ref.searchIconSize,
|
|
10363
10363
|
searchIconSize = _ref$searchIconSize === void 0 ? SEARCH_ICON_DEFAULT_SIZE : _ref$searchIconSize,
|
|
10364
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10364
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
10365
10365
|
var ref = React.useRef(null);
|
|
10366
10366
|
var _useState = React.useState(value),
|
|
10367
10367
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -10626,7 +10626,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
10626
10626
|
}), label);
|
|
10627
10627
|
};
|
|
10628
10628
|
|
|
10629
|
-
var _excluded$
|
|
10629
|
+
var _excluded$l = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className", "dataTestId", "extraOption", "onCloseDropdown"];
|
|
10630
10630
|
var SelectOptions = function SelectOptions(_ref) {
|
|
10631
10631
|
var idRef = _ref.idRef,
|
|
10632
10632
|
searchable = _ref.searchable,
|
|
@@ -10640,7 +10640,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
10640
10640
|
dataTestId = _ref.dataTestId,
|
|
10641
10641
|
extraOption = _ref.extraOption,
|
|
10642
10642
|
onCloseDropdown = _ref.onCloseDropdown,
|
|
10643
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10643
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
10644
10644
|
var _useState = React.useState(''),
|
|
10645
10645
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10646
10646
|
searchPhrase = _useState2[0],
|
|
@@ -10825,7 +10825,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
10825
10825
|
};
|
|
10826
10826
|
};
|
|
10827
10827
|
|
|
10828
|
-
var _excluded$
|
|
10828
|
+
var _excluded$k = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId", "colorSwatch", "extraOption", "paddingRight", "smallMobileText"];
|
|
10829
10829
|
var Select = function Select(_ref) {
|
|
10830
10830
|
var _ref2, _ref3;
|
|
10831
10831
|
var _ref$allowAutoFill = _ref.allowAutoFill,
|
|
@@ -10855,7 +10855,7 @@ var Select = function Select(_ref) {
|
|
|
10855
10855
|
paddingRight = _ref.paddingRight,
|
|
10856
10856
|
_ref$smallMobileText = _ref.smallMobileText,
|
|
10857
10857
|
smallMobileText = _ref$smallMobileText === void 0 ? false : _ref$smallMobileText,
|
|
10858
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10858
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10859
10859
|
var _useFormControlContex = useFormControlContext(),
|
|
10860
10860
|
errorDisplayedByParent = _useFormControlContex.displaysError;
|
|
10861
10861
|
var _useSelect = useSelect({
|
|
@@ -11048,7 +11048,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
11048
11048
|
};
|
|
11049
11049
|
Exit16.displayName = 'Exit16';
|
|
11050
11050
|
|
|
11051
|
-
var _excluded$
|
|
11051
|
+
var _excluded$j = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
11052
11052
|
var MultiSelect = function MultiSelect(_ref) {
|
|
11053
11053
|
var className = _ref.className,
|
|
11054
11054
|
defaultValue = _ref.defaultValue,
|
|
@@ -11063,7 +11063,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11063
11063
|
searchable = _ref.searchable,
|
|
11064
11064
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
11065
11065
|
value = _ref.value,
|
|
11066
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11066
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11067
11067
|
var _useSelect = useSelect({
|
|
11068
11068
|
value: value,
|
|
11069
11069
|
defaultValue: defaultValue
|
|
@@ -11176,14 +11176,16 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11176
11176
|
}));
|
|
11177
11177
|
};
|
|
11178
11178
|
|
|
11179
|
-
var _excluded$
|
|
11179
|
+
var _excluded$i = ["className", "children", "error", "label", "placeholder", "showErrorIcon"];
|
|
11180
11180
|
var Field = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11181
11181
|
var className = _ref.className,
|
|
11182
11182
|
children = _ref.children,
|
|
11183
11183
|
error = _ref.error,
|
|
11184
11184
|
label = _ref.label,
|
|
11185
11185
|
placeholder = _ref.placeholder,
|
|
11186
|
-
|
|
11186
|
+
_ref$showErrorIcon = _ref.showErrorIcon,
|
|
11187
|
+
showErrorIcon = _ref$showErrorIcon === void 0 ? true : _ref$showErrorIcon,
|
|
11188
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11187
11189
|
var id = React.useId();
|
|
11188
11190
|
var errorId = "".concat(id, "-error");
|
|
11189
11191
|
var fieldContextValue = React.useMemo(function () {
|
|
@@ -11209,7 +11211,7 @@ var Field = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11209
11211
|
label: label,
|
|
11210
11212
|
shiftIconLeftwards: error && children.type === Select,
|
|
11211
11213
|
'aria-describedby': ariaDescribedBy
|
|
11212
|
-
}, rest), children.props)), error && /*#__PURE__*/React.createElement("span", {
|
|
11214
|
+
}, rest), children.props)), error && showErrorIcon && /*#__PURE__*/React.createElement("span", {
|
|
11213
11215
|
className: "Field__icon"
|
|
11214
11216
|
}, /*#__PURE__*/React.createElement(Warning16, null))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextInput, _extends$1({
|
|
11215
11217
|
ref: ref,
|
|
@@ -11227,16 +11229,16 @@ var Field = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11227
11229
|
});
|
|
11228
11230
|
Field.displayName = 'Field';
|
|
11229
11231
|
|
|
11230
|
-
var _excluded$
|
|
11232
|
+
var _excluded$h = ["onChange"];
|
|
11231
11233
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11232
11234
|
var onChange = _ref.onChange,
|
|
11233
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11235
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11234
11236
|
return /*#__PURE__*/React.createElement(Field, _extends$1({}, rest, {
|
|
11235
11237
|
onChangeEvent: onChange
|
|
11236
11238
|
}));
|
|
11237
11239
|
};
|
|
11238
11240
|
|
|
11239
|
-
var _excluded$
|
|
11241
|
+
var _excluded$g = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11240
11242
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11241
11243
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11242
11244
|
var _ref2;
|
|
@@ -11250,7 +11252,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11250
11252
|
onFocus = _ref.onFocus,
|
|
11251
11253
|
onBlur = _ref.onBlur,
|
|
11252
11254
|
onChange = _ref.onChange,
|
|
11253
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11255
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11254
11256
|
var _useState = React.useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11255
11257
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11256
11258
|
value = _useState2[0],
|
|
@@ -11288,18 +11290,18 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11288
11290
|
}, /*#__PURE__*/React.createElement(CreditCardNumberInputField, rest));
|
|
11289
11291
|
};
|
|
11290
11292
|
|
|
11291
|
-
var _excluded$
|
|
11293
|
+
var _excluded$f = ["term", "children", "className"];
|
|
11292
11294
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11293
11295
|
var term = _ref.term,
|
|
11294
11296
|
children = _ref.children,
|
|
11295
11297
|
className = _ref.className,
|
|
11296
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11298
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11297
11299
|
return /*#__PURE__*/React.createElement("dl", _extends$1({
|
|
11298
11300
|
className: classNames('DefinitionList', className)
|
|
11299
11301
|
}, rest), /*#__PURE__*/React.createElement("dt", null, term), /*#__PURE__*/React.createElement("dd", null, children));
|
|
11300
11302
|
};
|
|
11301
11303
|
|
|
11302
|
-
var _excluded$
|
|
11304
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11303
11305
|
var Divider = function Divider(_ref) {
|
|
11304
11306
|
var text = _ref.text,
|
|
11305
11307
|
treatment = _ref.treatment,
|
|
@@ -11307,7 +11309,7 @@ var Divider = function Divider(_ref) {
|
|
|
11307
11309
|
family = _ref.family,
|
|
11308
11310
|
type = _ref.type,
|
|
11309
11311
|
className = _ref.className,
|
|
11310
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11312
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11311
11313
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11312
11314
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
11313
11315
|
return /*#__PURE__*/React.createElement("div", _extends$1({
|
|
@@ -11340,7 +11342,7 @@ var LineAboveDivider = function LineAboveDivider(props) {
|
|
|
11340
11342
|
}));
|
|
11341
11343
|
};
|
|
11342
11344
|
|
|
11343
|
-
var _excluded$
|
|
11345
|
+
var _excluded$d = ["name", "children", "className", "virtual", "icon", "data-testid", "defaultExpanded", "expanded", "onToggle", "background", "border"];
|
|
11344
11346
|
var Expandable = function Expandable(_ref) {
|
|
11345
11347
|
var name = _ref.name,
|
|
11346
11348
|
children = _ref.children,
|
|
@@ -11358,7 +11360,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11358
11360
|
background = _ref$background === void 0 ? 'light' : _ref$background,
|
|
11359
11361
|
_ref$border = _ref.border,
|
|
11360
11362
|
border = _ref$border === void 0 ? true : _ref$border,
|
|
11361
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11363
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11362
11364
|
var _useState = React.useState(defaultExpanded),
|
|
11363
11365
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11364
11366
|
expanded = _useState2[0],
|
|
@@ -11389,11 +11391,11 @@ var Expandable = function Expandable(_ref) {
|
|
|
11389
11391
|
}, expanded || !virtual ? children : null));
|
|
11390
11392
|
};
|
|
11391
11393
|
|
|
11392
|
-
var _excluded$
|
|
11394
|
+
var _excluded$c = ["className", "hidden"];
|
|
11393
11395
|
var Label = function Label(_ref) {
|
|
11394
11396
|
var className = _ref.className,
|
|
11395
11397
|
hidden = _ref.hidden,
|
|
11396
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11398
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11397
11399
|
return /*#__PURE__*/React.createElement("label", _extends$1({
|
|
11398
11400
|
className: classNames('Label', className, {
|
|
11399
11401
|
'Label--hidden': hidden
|
|
@@ -11603,11 +11605,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11603
11605
|
}));
|
|
11604
11606
|
};
|
|
11605
11607
|
|
|
11606
|
-
var _excluded$
|
|
11608
|
+
var _excluded$b = ["className"];
|
|
11607
11609
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11608
11610
|
var Loading = function Loading(_ref) {
|
|
11609
11611
|
var className = _ref.className,
|
|
11610
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11612
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11611
11613
|
var _useCursor = distExports.useCursor({
|
|
11612
11614
|
max: FRAMES.length
|
|
11613
11615
|
}),
|
|
@@ -12544,6 +12546,7 @@ var OTPInput = function OTPInput(_a) {
|
|
|
12544
12546
|
}));
|
|
12545
12547
|
};
|
|
12546
12548
|
|
|
12549
|
+
var _excluded$a = ["aria-describedby", "aria-label", "autoComplete", "className", "disabled", "error", "focus", "id", "inputClassName", "inputType", "label", "name", "numInputs", "onChange", "onPaste", "placeholder", "renderSeparator", "required", "shouldAutoFocus", "value"];
|
|
12547
12550
|
var getInputAriaLabel = function getInputAriaLabel(index, inputCount, ariaLabel, label) {
|
|
12548
12551
|
var baseLabel = ariaLabel || label || 'One-time password digit';
|
|
12549
12552
|
return "".concat(baseLabel, " ").concat(index + 1, " of ").concat(inputCount);
|
|
@@ -12572,8 +12575,13 @@ var OtpInput = function OtpInput(_ref) {
|
|
|
12572
12575
|
required = _ref.required,
|
|
12573
12576
|
shouldAutoFocus = _ref.shouldAutoFocus,
|
|
12574
12577
|
_ref$value = _ref.value,
|
|
12575
|
-
value = _ref$value === void 0 ? '' : _ref$value
|
|
12576
|
-
|
|
12578
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
12579
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
12580
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", {
|
|
12581
|
+
type: "hidden",
|
|
12582
|
+
name: name,
|
|
12583
|
+
value: value
|
|
12584
|
+
}), /*#__PURE__*/React.createElement(OTPInput, _extends$1({}, rest, {
|
|
12577
12585
|
containerStyle: classNames('OtpInput', className),
|
|
12578
12586
|
inputType: inputType,
|
|
12579
12587
|
numInputs: numInputs,
|
|
@@ -12597,11 +12605,10 @@ var OtpInput = function OtpInput(_ref) {
|
|
|
12597
12605
|
'OtpInput__input--focus': focus
|
|
12598
12606
|
}),
|
|
12599
12607
|
disabled: disabled,
|
|
12600
|
-
name: name,
|
|
12601
12608
|
required: required
|
|
12602
12609
|
}));
|
|
12603
12610
|
}
|
|
12604
|
-
});
|
|
12611
|
+
})));
|
|
12605
12612
|
};
|
|
12606
12613
|
OtpInput.displayName = 'OtpInput';
|
|
12607
12614
|
|