@razorpay/blade 10.10.0 → 10.12.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/build/components/index.d.ts +116 -58
- package/build/components/index.development.web.js +328 -272
- package/build/components/index.development.web.js.map +1 -1
- package/build/components/index.native.d.ts +116 -58
- package/build/components/index.native.js +25 -25
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +311 -263
- package/build/components/index.production.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { useMemo, useCallback, useState, useEffect, useRef, useContext, createContext, Fragment as Fragment$1, Children, cloneElement, forwardRef } from 'react';
|
|
3
|
+
import React__default, { useMemo, useCallback, useState, useEffect, useRef, useContext, createContext, Fragment as Fragment$1, useImperativeHandle, Children, cloneElement, forwardRef } from 'react';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import styled, { ThemeProvider, css, keyframes } from 'styled-components';
|
|
6
6
|
import _objectWithoutProperties$1 from '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -459,6 +459,8 @@ var getActionListItemRole = function getActionListItemRole(dropdownTriggerer, hr
|
|
|
459
459
|
var componentIds = {
|
|
460
460
|
ActionList: 'ActionList',
|
|
461
461
|
ActionListItem: 'ActionListItem',
|
|
462
|
+
ActionListItemBadge: 'ActionListItemBadge',
|
|
463
|
+
ActionListItemBadgeGroup: 'ActionListItemBadgeGroup',
|
|
462
464
|
ActionListItemAsset: 'ActionListItemAsset',
|
|
463
465
|
ActionListItemIcon: 'ActionListItemIcon',
|
|
464
466
|
ActionListItemText: 'ActionListItemText',
|
|
@@ -621,7 +623,8 @@ var getActionListProperties = function getActionListProperties(children) {
|
|
|
621
623
|
};
|
|
622
624
|
var validateActionListItemProps = function validateActionListItemProps(_ref) {
|
|
623
625
|
var leading = _ref.leading,
|
|
624
|
-
trailing = _ref.trailing
|
|
626
|
+
trailing = _ref.trailing,
|
|
627
|
+
titleSuffix = _ref.titleSuffix;
|
|
625
628
|
{
|
|
626
629
|
React__default.Children.map(trailing, function (child) {
|
|
627
630
|
if (!isValidAllowedChildren(child, componentIds.ActionListItemIcon) && !isValidAllowedChildren(child, componentIds.ActionListItemText)) {
|
|
@@ -631,6 +634,14 @@ var validateActionListItemProps = function validateActionListItemProps(_ref) {
|
|
|
631
634
|
});
|
|
632
635
|
}
|
|
633
636
|
});
|
|
637
|
+
React__default.Children.map(titleSuffix, function (child) {
|
|
638
|
+
if (!isValidAllowedChildren(child, componentIds.ActionListItemBadge) && !isValidAllowedChildren(child, componentIds.ActionListItemBadgeGroup)) {
|
|
639
|
+
throwBladeError({
|
|
640
|
+
message: "Only ".concat(componentIds.ActionListItemBadge, " and ").concat(componentIds.ActionListItemBadgeGroup, " are allowed in titleSuffix prop"),
|
|
641
|
+
moduleName: 'ActionListItem'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
});
|
|
634
645
|
React__default.Children.map(leading, function (child) {
|
|
635
646
|
if (!isValidAllowedChildren(child, componentIds.ActionListItemIcon) && !isValidAllowedChildren(child, componentIds.ActionListItemText) && !isValidAllowedChildren(child, componentIds.ActionListItemAsset)) {
|
|
636
647
|
throwBladeError({
|
|
@@ -2918,8 +2929,12 @@ var getElevationValue = function getElevationValue(elevation, theme, breakpoint)
|
|
|
2918
2929
|
};
|
|
2919
2930
|
var getAllProps = function getAllProps(props, breakpoint) {
|
|
2920
2931
|
var _props$paddingTop, _props$paddingBottom, _props$paddingRight, _props$paddingLeft, _props$marginBottom, _props$marginTop, _props$marginRight, _props$marginLeft;
|
|
2921
|
-
var hasBorder = props.
|
|
2922
|
-
|
|
2932
|
+
var hasBorder = props.borderWidth || props.borderColor;
|
|
2933
|
+
var hasBorderRight = props.borderRight || props.borderRightColor || props.borderRightWidth;
|
|
2934
|
+
var hasBorderLeft = props.borderLeft || props.borderLeftColor || props.borderLeftWidth;
|
|
2935
|
+
var hasBorderTop = props.borderTop || props.borderTopColor || props.borderTopWidth;
|
|
2936
|
+
var hasBorderBottom = props.borderBottom || props.borderBottomColor || props.borderBottomWidth;
|
|
2937
|
+
return _objectSpread$6h(_objectSpread$6h({
|
|
2923
2938
|
display: getResponsiveValue(props.display, breakpoint),
|
|
2924
2939
|
overflow: getResponsiveValue(props.overflow, breakpoint),
|
|
2925
2940
|
overflowX: getResponsiveValue(props.overflowX, breakpoint),
|
|
@@ -3010,7 +3025,13 @@ var getAllProps = function getAllProps(props, breakpoint) {
|
|
|
3010
3025
|
borderTopRightRadius: getBorderRadiusValue(props.borderTopRightRadius, props.theme, breakpoint),
|
|
3011
3026
|
borderBottomRightRadius: getBorderRadiusValue(props.borderBottomRightRadius, props.theme, breakpoint),
|
|
3012
3027
|
borderBottomLeftRadius: getBorderRadiusValue(props.borderBottomLeftRadius, props.theme, breakpoint),
|
|
3013
|
-
borderStyle: hasBorder ? 'solid' : undefined
|
|
3028
|
+
borderStyle: hasBorder ? 'solid' : undefined
|
|
3029
|
+
}, !hasBorder && {
|
|
3030
|
+
borderTopStyle: hasBorderTop ? 'solid' : undefined,
|
|
3031
|
+
borderBottomStyle: hasBorderBottom ? 'solid' : undefined,
|
|
3032
|
+
borderLeftStyle: hasBorderLeft ? 'solid' : undefined,
|
|
3033
|
+
borderRightStyle: hasBorderRight ? 'solid' : undefined
|
|
3034
|
+
}), {}, {
|
|
3014
3035
|
touchAction: getResponsiveValue(props.touchAction, breakpoint),
|
|
3015
3036
|
userSelect: getResponsiveValue(props.userSelect, breakpoint),
|
|
3016
3037
|
pointerEvents: getResponsiveValue(props.pointerEvents),
|
|
@@ -14154,37 +14175,6 @@ var useActionListContext = function useActionListContext() {
|
|
|
14154
14175
|
}
|
|
14155
14176
|
return context;
|
|
14156
14177
|
};
|
|
14157
|
-
/**
|
|
14158
|
-
* ### ActionList
|
|
14159
|
-
*
|
|
14160
|
-
* List of multiple actionable items. Can be used as menu items inside `Dropdown`,
|
|
14161
|
-
* `BottomSheet` and as selectable items when combined with `SelectInput`
|
|
14162
|
-
*
|
|
14163
|
-
* #### Usage
|
|
14164
|
-
*
|
|
14165
|
-
* ```jsx
|
|
14166
|
-
* <Dropdown>
|
|
14167
|
-
* <SelectInput label="Select Action" />
|
|
14168
|
-
* <DropdownOverlay>
|
|
14169
|
-
* <DropdownHeader title="Header Title" />
|
|
14170
|
-
* <ActionList>
|
|
14171
|
-
* <ActionListItem
|
|
14172
|
-
* title="Home"
|
|
14173
|
-
* value="home"
|
|
14174
|
-
* leading={<ActionListItemIcon icon={HomeIcon} />}
|
|
14175
|
-
* />
|
|
14176
|
-
* <ActionListItem
|
|
14177
|
-
* title="Pricing"
|
|
14178
|
-
* value="pricing"
|
|
14179
|
-
* leading={<ActionListItemAsset src="https://flagcdn.com/w20/in.png" alt="India Flag" />}
|
|
14180
|
-
* />
|
|
14181
|
-
* </ActionList>
|
|
14182
|
-
* <DropdownFooter><Button>Apply</Button></DropdownFooter>
|
|
14183
|
-
* </DropdownOverlay>
|
|
14184
|
-
* </Dropdown>
|
|
14185
|
-
* ```
|
|
14186
|
-
*
|
|
14187
|
-
*/
|
|
14188
14178
|
var _ActionList = function _ActionList(_ref) {
|
|
14189
14179
|
var children = _ref.children,
|
|
14190
14180
|
_ref$surfaceLevel = _ref.surfaceLevel,
|
|
@@ -14257,6 +14247,38 @@ var _ActionList = function _ActionList(_ref) {
|
|
|
14257
14247
|
}))
|
|
14258
14248
|
});
|
|
14259
14249
|
};
|
|
14250
|
+
|
|
14251
|
+
/**
|
|
14252
|
+
* ### ActionList
|
|
14253
|
+
*
|
|
14254
|
+
* List of multiple actionable items. Can be used as menu items inside `Dropdown`,
|
|
14255
|
+
* `BottomSheet` and as selectable items when combined with `SelectInput`
|
|
14256
|
+
*
|
|
14257
|
+
* #### Usage
|
|
14258
|
+
*
|
|
14259
|
+
* ```jsx
|
|
14260
|
+
* <Dropdown>
|
|
14261
|
+
* <SelectInput label="Select Action" />
|
|
14262
|
+
* <DropdownOverlay>
|
|
14263
|
+
* <DropdownHeader title="Header Title" />
|
|
14264
|
+
* <ActionList>
|
|
14265
|
+
* <ActionListItem
|
|
14266
|
+
* title="Home"
|
|
14267
|
+
* value="home"
|
|
14268
|
+
* leading={<ActionListItemIcon icon={HomeIcon} />}
|
|
14269
|
+
* />
|
|
14270
|
+
* <ActionListItem
|
|
14271
|
+
* title="Pricing"
|
|
14272
|
+
* value="pricing"
|
|
14273
|
+
* leading={<ActionListItemAsset src="https://flagcdn.com/w20/in.png" alt="India Flag" />}
|
|
14274
|
+
* />
|
|
14275
|
+
* </ActionList>
|
|
14276
|
+
* <DropdownFooter><Button>Apply</Button></DropdownFooter>
|
|
14277
|
+
* </DropdownOverlay>
|
|
14278
|
+
* </Dropdown>
|
|
14279
|
+
* ```
|
|
14280
|
+
*
|
|
14281
|
+
*/
|
|
14260
14282
|
var ActionList = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.memo(_ActionList), {
|
|
14261
14283
|
displayName: componentIds.ActionList,
|
|
14262
14284
|
componentId: componentIds.ActionList
|
|
@@ -15636,8 +15658,173 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
15636
15658
|
});
|
|
15637
15659
|
};
|
|
15638
15660
|
|
|
15661
|
+
var getStyledBadgeStyles = function getStyledBadgeStyles(_ref) {
|
|
15662
|
+
var theme = _ref.theme,
|
|
15663
|
+
backgroundColor = _ref.backgroundColor;
|
|
15664
|
+
return {
|
|
15665
|
+
backgroundColor: getIn(theme.colors, backgroundColor),
|
|
15666
|
+
borderRadius: makeBorderSize(theme.border.radius.max),
|
|
15667
|
+
display: 'flex',
|
|
15668
|
+
flexWrap: 'nowrap'
|
|
15669
|
+
};
|
|
15670
|
+
};
|
|
15671
|
+
|
|
15639
15672
|
function ownKeys$1t(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15640
15673
|
function _objectSpread$1s(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1t(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15674
|
+
var StyledBadge = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
15675
|
+
displayName: "StyledBadgeweb__StyledBadge",
|
|
15676
|
+
componentId: "sc-1svn4tv-0"
|
|
15677
|
+
})(function (props) {
|
|
15678
|
+
return _objectSpread$1s(_objectSpread$1s({}, getStyledBadgeStyles(props)), {}, {
|
|
15679
|
+
width: 'fit-content'
|
|
15680
|
+
});
|
|
15681
|
+
});
|
|
15682
|
+
|
|
15683
|
+
var verticalPadding$1 = {
|
|
15684
|
+
small: 'spacing.0',
|
|
15685
|
+
medium: 'spacing.1',
|
|
15686
|
+
large: 'spacing.2'
|
|
15687
|
+
};
|
|
15688
|
+
var horizontalPadding$1 = {
|
|
15689
|
+
small: 'spacing.3',
|
|
15690
|
+
medium: 'spacing.3',
|
|
15691
|
+
large: 'spacing.4'
|
|
15692
|
+
};
|
|
15693
|
+
var iconPadding = {
|
|
15694
|
+
small: 'spacing.1',
|
|
15695
|
+
medium: 'spacing.2',
|
|
15696
|
+
large: 'spacing.2'
|
|
15697
|
+
};
|
|
15698
|
+
var iconSize = {
|
|
15699
|
+
small: 'xsmall',
|
|
15700
|
+
medium: 'small',
|
|
15701
|
+
large: 'small'
|
|
15702
|
+
};
|
|
15703
|
+
|
|
15704
|
+
var getStringFromReactText = function getStringFromReactText(childReactText) {
|
|
15705
|
+
if (isEmpty$1(childReactText)) {
|
|
15706
|
+
return undefined;
|
|
15707
|
+
}
|
|
15708
|
+
if (Array.isArray(childReactText)) {
|
|
15709
|
+
return childReactText.join('');
|
|
15710
|
+
}
|
|
15711
|
+
return String(childReactText);
|
|
15712
|
+
};
|
|
15713
|
+
|
|
15714
|
+
var _excluded$C = ["children", "contrast", "fontWeight", "icon", "size", "variant", "testID"];
|
|
15715
|
+
function ownKeys$1s(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15716
|
+
function _objectSpread$1r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1s(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1s(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15717
|
+
var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
|
|
15718
|
+
var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
|
|
15719
|
+
return feedbackVariants.includes(variant);
|
|
15720
|
+
};
|
|
15721
|
+
var getColorProps$1 = function getColorProps(_ref) {
|
|
15722
|
+
var variant = _ref.variant,
|
|
15723
|
+
contrast = _ref.contrast;
|
|
15724
|
+
var props = {
|
|
15725
|
+
iconColor: 'feedback.icon.neutral.lowContrast',
|
|
15726
|
+
textColor: 'feedback.text.neutral.lowContrast',
|
|
15727
|
+
backgroundColor: 'feedback.background.neutral.lowContrast'
|
|
15728
|
+
};
|
|
15729
|
+
if (isFeedbackVariant$1(variant)) {
|
|
15730
|
+
props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15731
|
+
props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15732
|
+
props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15733
|
+
} else {
|
|
15734
|
+
props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15735
|
+
props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15736
|
+
props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
15737
|
+
}
|
|
15738
|
+
return props;
|
|
15739
|
+
};
|
|
15740
|
+
var _Badge = function _Badge(_ref2) {
|
|
15741
|
+
var children = _ref2.children,
|
|
15742
|
+
_ref2$contrast = _ref2.contrast,
|
|
15743
|
+
contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
|
|
15744
|
+
_ref2$fontWeight = _ref2.fontWeight,
|
|
15745
|
+
fontWeight = _ref2$fontWeight === void 0 ? 'regular' : _ref2$fontWeight,
|
|
15746
|
+
Icon = _ref2.icon,
|
|
15747
|
+
_ref2$size = _ref2.size,
|
|
15748
|
+
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
15749
|
+
_ref2$variant = _ref2.variant,
|
|
15750
|
+
variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
|
|
15751
|
+
testID = _ref2.testID,
|
|
15752
|
+
styledProps = _objectWithoutProperties$1(_ref2, _excluded$C);
|
|
15753
|
+
var childrenString = getStringFromReactText(children);
|
|
15754
|
+
{
|
|
15755
|
+
if (!(childrenString !== null && childrenString !== void 0 && childrenString.trim())) {
|
|
15756
|
+
throwBladeError({
|
|
15757
|
+
message: 'Text as children is required for Badge.',
|
|
15758
|
+
moduleName: 'Badge'
|
|
15759
|
+
});
|
|
15760
|
+
}
|
|
15761
|
+
}
|
|
15762
|
+
var _getColorProps = getColorProps$1({
|
|
15763
|
+
variant: variant,
|
|
15764
|
+
contrast: contrast
|
|
15765
|
+
}),
|
|
15766
|
+
backgroundColor = _getColorProps.backgroundColor,
|
|
15767
|
+
iconColor = _getColorProps.iconColor,
|
|
15768
|
+
textColor = _getColorProps.textColor;
|
|
15769
|
+
var badgeTextSizes = {
|
|
15770
|
+
small: {
|
|
15771
|
+
variant: 'body',
|
|
15772
|
+
size: 'xsmall'
|
|
15773
|
+
},
|
|
15774
|
+
medium: {
|
|
15775
|
+
variant: 'body',
|
|
15776
|
+
size: 'small'
|
|
15777
|
+
},
|
|
15778
|
+
large: {
|
|
15779
|
+
variant: 'body',
|
|
15780
|
+
size: 'small'
|
|
15781
|
+
}
|
|
15782
|
+
};
|
|
15783
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread$1r(_objectSpread$1r(_objectSpread$1r({
|
|
15784
|
+
display: isReactNative$4() ? 'flex' : 'inline-flex'
|
|
15785
|
+
}, metaAttribute({
|
|
15786
|
+
name: MetaConstants.Badge,
|
|
15787
|
+
testID: testID
|
|
15788
|
+
})), getStyledProps(styledProps)), {}, {
|
|
15789
|
+
children: /*#__PURE__*/jsx(StyledBadge, {
|
|
15790
|
+
backgroundColor: backgroundColor,
|
|
15791
|
+
size: size,
|
|
15792
|
+
textAlign: 'left',
|
|
15793
|
+
children: /*#__PURE__*/jsxs(BaseBox, {
|
|
15794
|
+
paddingRight: horizontalPadding$1[size],
|
|
15795
|
+
paddingLeft: horizontalPadding$1[size],
|
|
15796
|
+
paddingTop: verticalPadding$1[size],
|
|
15797
|
+
paddingBottom: verticalPadding$1[size],
|
|
15798
|
+
display: "flex",
|
|
15799
|
+
flexDirection: "row",
|
|
15800
|
+
justifyContent: "center",
|
|
15801
|
+
alignItems: "center",
|
|
15802
|
+
overflow: "hidden",
|
|
15803
|
+
children: [Icon ? /*#__PURE__*/jsx(BaseBox, {
|
|
15804
|
+
paddingRight: Boolean(Icon) ? iconPadding[size] : 'spacing.0',
|
|
15805
|
+
display: "flex",
|
|
15806
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
15807
|
+
color: iconColor,
|
|
15808
|
+
size: iconSize[size]
|
|
15809
|
+
})
|
|
15810
|
+
}) : null, /*#__PURE__*/jsx(Text, _objectSpread$1r(_objectSpread$1r({}, badgeTextSizes[size]), {}, {
|
|
15811
|
+
type: "normal",
|
|
15812
|
+
weight: fontWeight,
|
|
15813
|
+
truncateAfterLines: 1,
|
|
15814
|
+
color: textColor,
|
|
15815
|
+
children: children
|
|
15816
|
+
}))]
|
|
15817
|
+
})
|
|
15818
|
+
})
|
|
15819
|
+
}));
|
|
15820
|
+
};
|
|
15821
|
+
var Badge = /*#__PURE__*/assignWithoutSideEffects(_Badge, {
|
|
15822
|
+
displayName: 'Badge',
|
|
15823
|
+
componentId: 'Badge'
|
|
15824
|
+
});
|
|
15825
|
+
|
|
15826
|
+
function ownKeys$1r(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15827
|
+
function _objectSpread$1q(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1r(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15641
15828
|
var ActionListItemContext = /*#__PURE__*/React__default.createContext({});
|
|
15642
15829
|
var StyledActionListSectionTitle = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
15643
15830
|
displayName: "ActionListItem__StyledActionListSectionTitle",
|
|
@@ -15655,7 +15842,7 @@ var _ActionListSection = function _ActionListSection(_ref) {
|
|
|
15655
15842
|
_hideDivider = _ref._hideDivider;
|
|
15656
15843
|
var _useActionListContext = useActionListContext(),
|
|
15657
15844
|
surfaceLevel = _useActionListContext.surfaceLevel;
|
|
15658
|
-
return /*#__PURE__*/jsxs(BaseBox, _objectSpread$
|
|
15845
|
+
return /*#__PURE__*/jsxs(BaseBox, _objectSpread$1q(_objectSpread$1q(_objectSpread$1q({}, makeAccessible({
|
|
15659
15846
|
role: getActionListSectionRole(),
|
|
15660
15847
|
label: title
|
|
15661
15848
|
})), {}, {
|
|
@@ -15664,7 +15851,7 @@ var _ActionListSection = function _ActionListSection(_ref) {
|
|
|
15664
15851
|
name: MetaConstants.ActionListSection,
|
|
15665
15852
|
testID: testID
|
|
15666
15853
|
})), {}, {
|
|
15667
|
-
children: [/*#__PURE__*/jsx(StyledActionListSectionTitle, _objectSpread$
|
|
15854
|
+
children: [/*#__PURE__*/jsx(StyledActionListSectionTitle, _objectSpread$1q(_objectSpread$1q({}, makeAccessible({
|
|
15668
15855
|
hidden: true
|
|
15669
15856
|
})), {}, {
|
|
15670
15857
|
children: /*#__PURE__*/jsx(Text, {
|
|
@@ -15673,7 +15860,7 @@ var _ActionListSection = function _ActionListSection(_ref) {
|
|
|
15673
15860
|
weight: "bold",
|
|
15674
15861
|
children: title
|
|
15675
15862
|
})
|
|
15676
|
-
})), /*#__PURE__*/jsx(BaseBox, _objectSpread$
|
|
15863
|
+
})), /*#__PURE__*/jsx(BaseBox, _objectSpread$1q(_objectSpread$1q({}, makeAccessible({
|
|
15677
15864
|
// On web, we just wrap it in another listbox to announce item count properly for particular group.
|
|
15678
15865
|
// On React Native, we ignore it since `menu` + `group` role will take care of accessibility
|
|
15679
15866
|
role: isReactNative$4() ? undefined : 'listbox'
|
|
@@ -15704,8 +15891,29 @@ var _ActionListItemIcon = function _ActionListItemIcon(_ref2) {
|
|
|
15704
15891
|
var ActionListItemIcon = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemIcon, {
|
|
15705
15892
|
componentId: componentIds.ActionListItemIcon
|
|
15706
15893
|
});
|
|
15707
|
-
var
|
|
15894
|
+
var _ActionListItemBadgeGroup = function _ActionListItemBadgeGroup(_ref3) {
|
|
15708
15895
|
var children = _ref3.children;
|
|
15896
|
+
return /*#__PURE__*/jsx(Box, {
|
|
15897
|
+
display: "flex",
|
|
15898
|
+
alignItems: "center",
|
|
15899
|
+
flexDirection: "row",
|
|
15900
|
+
children: children
|
|
15901
|
+
});
|
|
15902
|
+
};
|
|
15903
|
+
var ActionListItemBadgeGroup = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemBadgeGroup, {
|
|
15904
|
+
componentId: componentIds.ActionListItemBadgeGroup
|
|
15905
|
+
});
|
|
15906
|
+
var _ActionListItemBadge = function _ActionListItemBadge(props) {
|
|
15907
|
+
return /*#__PURE__*/jsx(Badge, _objectSpread$1q({
|
|
15908
|
+
size: "medium",
|
|
15909
|
+
marginLeft: "spacing.3"
|
|
15910
|
+
}, props));
|
|
15911
|
+
};
|
|
15912
|
+
var ActionListItemBadge = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemBadge, {
|
|
15913
|
+
componentId: componentIds.ActionListItemBadge
|
|
15914
|
+
});
|
|
15915
|
+
var _ActionListItemText = function _ActionListItemText(_ref4) {
|
|
15916
|
+
var children = _ref4.children;
|
|
15709
15917
|
var _React$useContext2 = React__default.useContext(ActionListItemContext),
|
|
15710
15918
|
isDisabled = _React$useContext2.isDisabled;
|
|
15711
15919
|
return /*#__PURE__*/jsx(Text, {
|
|
@@ -15739,15 +15947,16 @@ var makeActionListItemClickable = function makeActionListItemClickable(clickHand
|
|
|
15739
15947
|
onClick: clickHandler
|
|
15740
15948
|
};
|
|
15741
15949
|
};
|
|
15742
|
-
var _ActionListItemBody = function _ActionListItemBody(
|
|
15743
|
-
var selectionType =
|
|
15744
|
-
intent =
|
|
15745
|
-
description =
|
|
15746
|
-
isDisabled =
|
|
15747
|
-
leading =
|
|
15748
|
-
trailing =
|
|
15749
|
-
title =
|
|
15750
|
-
|
|
15950
|
+
var _ActionListItemBody = function _ActionListItemBody(_ref5) {
|
|
15951
|
+
var selectionType = _ref5.selectionType,
|
|
15952
|
+
intent = _ref5.intent,
|
|
15953
|
+
description = _ref5.description,
|
|
15954
|
+
isDisabled = _ref5.isDisabled,
|
|
15955
|
+
leading = _ref5.leading,
|
|
15956
|
+
trailing = _ref5.trailing,
|
|
15957
|
+
title = _ref5.title,
|
|
15958
|
+
titleSuffix = _ref5.titleSuffix,
|
|
15959
|
+
isSelected = _ref5.isSelected;
|
|
15751
15960
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
15752
15961
|
children: [/*#__PURE__*/jsxs(BaseBox, {
|
|
15753
15962
|
display: "flex",
|
|
@@ -15762,7 +15971,7 @@ var _ActionListItemBody = function _ActionListItemBody(_ref4) {
|
|
|
15762
15971
|
children: selectionType === 'multiple' ?
|
|
15763
15972
|
/*#__PURE__*/
|
|
15764
15973
|
// Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us
|
|
15765
|
-
jsx(ActionListCheckboxWrapper, _objectSpread$
|
|
15974
|
+
jsx(ActionListCheckboxWrapper, _objectSpread$1q(_objectSpread$1q({
|
|
15766
15975
|
hasDescription: Boolean(description)
|
|
15767
15976
|
}, makeAccessible({
|
|
15768
15977
|
hidden: true
|
|
@@ -15774,14 +15983,17 @@ var _ActionListItemBody = function _ActionListItemBody(_ref4) {
|
|
|
15774
15983
|
children: null
|
|
15775
15984
|
})
|
|
15776
15985
|
})) : leading
|
|
15777
|
-
}), /*#__PURE__*/
|
|
15986
|
+
}), /*#__PURE__*/jsxs(BaseBox, {
|
|
15778
15987
|
paddingLeft: selectionType === 'multiple' || !leading ? 'spacing.0' : 'spacing.3',
|
|
15779
15988
|
paddingRight: "spacing.3",
|
|
15780
|
-
|
|
15989
|
+
display: "flex",
|
|
15990
|
+
alignItems: "center",
|
|
15991
|
+
flexDirection: "row",
|
|
15992
|
+
children: [/*#__PURE__*/jsx(Text, {
|
|
15781
15993
|
truncateAfterLines: 1,
|
|
15782
15994
|
color: intent === 'negative' ? 'feedback.text.negative.lowContrast' : getNormalTextColor(isDisabled),
|
|
15783
15995
|
children: title
|
|
15784
|
-
})
|
|
15996
|
+
}), titleSuffix]
|
|
15785
15997
|
}), /*#__PURE__*/jsx(BaseBox, {
|
|
15786
15998
|
marginLeft: "auto",
|
|
15787
15999
|
children: trailing
|
|
@@ -15855,9 +16067,10 @@ var _ActionListItem = function _ActionListItem(props) {
|
|
|
15855
16067
|
React__default.useEffect(function () {
|
|
15856
16068
|
validateActionListItemProps({
|
|
15857
16069
|
leading: props.leading,
|
|
15858
|
-
trailing: props.trailing
|
|
16070
|
+
trailing: props.trailing,
|
|
16071
|
+
titleSuffix: props.titleSuffix
|
|
15859
16072
|
});
|
|
15860
|
-
}, [props.leading, props.trailing]);
|
|
16073
|
+
}, [props.leading, props.trailing, props.titleSuffix]);
|
|
15861
16074
|
React__default.useEffect(function () {
|
|
15862
16075
|
{
|
|
15863
16076
|
if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput && props.intent === 'negative') {
|
|
@@ -15873,7 +16086,7 @@ var _ActionListItem = function _ActionListItem(props) {
|
|
|
15873
16086
|
intent: props.intent,
|
|
15874
16087
|
isDisabled: props.isDisabled
|
|
15875
16088
|
},
|
|
15876
|
-
children: /*#__PURE__*/jsx(StyledActionListItem, _objectSpread$
|
|
16089
|
+
children: /*#__PURE__*/jsx(StyledActionListItem, _objectSpread$1q(_objectSpread$1q(_objectSpread$1q(_objectSpread$1q({
|
|
15877
16090
|
isVisible: hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true,
|
|
15878
16091
|
as: !isReactNative$4() ? renderOnWebAs : undefined,
|
|
15879
16092
|
id: "".concat(dropdownBaseId, "-").concat(props._index),
|
|
@@ -15927,6 +16140,7 @@ var _ActionListItem = function _ActionListItem(props) {
|
|
|
15927
16140
|
leading: props.leading,
|
|
15928
16141
|
trailing: props.trailing,
|
|
15929
16142
|
title: props.title,
|
|
16143
|
+
titleSuffix: props.titleSuffix,
|
|
15930
16144
|
isSelected: isSelected
|
|
15931
16145
|
})
|
|
15932
16146
|
}))
|
|
@@ -15978,8 +16192,8 @@ var StyledAlert = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
15978
16192
|
componentId: "sc-1dcpe4h-0"
|
|
15979
16193
|
})(getCommonStyles);
|
|
15980
16194
|
|
|
15981
|
-
function ownKeys$
|
|
15982
|
-
function _objectSpread$
|
|
16195
|
+
function ownKeys$1q(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16196
|
+
function _objectSpread$1p(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1q(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15983
16197
|
var StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
15984
16198
|
displayName: "StyledIconButtonweb__StyledButton",
|
|
15985
16199
|
componentId: "sc-1f4cg7d-0"
|
|
@@ -16032,7 +16246,7 @@ var StyledIconButton = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
|
16032
16246
|
onTouchEnd = _ref.onTouchEnd,
|
|
16033
16247
|
onTouchStart = _ref.onTouchStart,
|
|
16034
16248
|
tabIndex = _ref.tabIndex;
|
|
16035
|
-
return /*#__PURE__*/jsx(StyledButton, _objectSpread$
|
|
16249
|
+
return /*#__PURE__*/jsx(StyledButton, _objectSpread$1p(_objectSpread$1p(_objectSpread$1p({
|
|
16036
16250
|
ref: ref,
|
|
16037
16251
|
onClick: castWebType(onClick),
|
|
16038
16252
|
contrast: contrast,
|
|
@@ -16136,19 +16350,19 @@ var getBaseButtonStyles = function getBaseButtonStyles(_ref) {
|
|
|
16136
16350
|
};
|
|
16137
16351
|
};
|
|
16138
16352
|
|
|
16139
|
-
function ownKeys$
|
|
16140
|
-
function _objectSpread$
|
|
16353
|
+
function ownKeys$1p(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16354
|
+
function _objectSpread$1o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1p(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16141
16355
|
var StyledBaseButton = /*#__PURE__*/styled.button.withConfig({
|
|
16142
16356
|
shouldForwardProp: omitPropsFromHTML,
|
|
16143
16357
|
displayName: 'StyledBaseButton'
|
|
16144
16358
|
}).attrs(function (props) {
|
|
16145
|
-
return _objectSpread$
|
|
16359
|
+
return _objectSpread$1o({}, props.accessibilityProps);
|
|
16146
16360
|
}).withConfig({
|
|
16147
16361
|
displayName: "StyledBaseButtonweb__StyledBaseButton",
|
|
16148
16362
|
componentId: "sc-26bt38-0"
|
|
16149
16363
|
})(function (props) {
|
|
16150
16364
|
var styledPropsCSSObject = useStyledProps(props);
|
|
16151
|
-
return _objectSpread$
|
|
16365
|
+
return _objectSpread$1o(_objectSpread$1o({}, getBaseButtonStyles(props)), {}, {
|
|
16152
16366
|
display: 'inline-flex',
|
|
16153
16367
|
transitionProperty: 'background-color, border-color, box-shadow',
|
|
16154
16368
|
transitionTimingFunction: getIn(props.theme.motion, props.motionEasing),
|
|
@@ -16417,9 +16631,9 @@ var SpinningBox = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
16417
16631
|
return css(["padding:1px;width:max-content;display:inline-flex;animation:", " ", " ", " infinite;"], rotate, makeMotionTime(getIn(theme.motion, motion.duration)), getIn(theme.motion, motion.easing));
|
|
16418
16632
|
});
|
|
16419
16633
|
|
|
16420
|
-
var _excluded$
|
|
16421
|
-
function ownKeys$
|
|
16422
|
-
function _objectSpread$
|
|
16634
|
+
var _excluded$B = ["label", "labelPosition", "accessibilityLabel", "contrast", "intent", "size", "testID"];
|
|
16635
|
+
function ownKeys$1o(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16636
|
+
function _objectSpread$1n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1o(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16423
16637
|
var getColor = function getColor(_ref) {
|
|
16424
16638
|
var contrast = _ref.contrast,
|
|
16425
16639
|
intent = _ref.intent,
|
|
@@ -16443,14 +16657,14 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
16443
16657
|
_ref2$size = _ref2.size,
|
|
16444
16658
|
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
16445
16659
|
testID = _ref2.testID,
|
|
16446
|
-
styledProps = _objectWithoutProperties$1(_ref2, _excluded$
|
|
16660
|
+
styledProps = _objectWithoutProperties$1(_ref2, _excluded$B);
|
|
16447
16661
|
var _useTheme = useTheme(),
|
|
16448
16662
|
theme = _useTheme.theme;
|
|
16449
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread$
|
|
16663
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread$1n(_objectSpread$1n(_objectSpread$1n({}, metaAttribute({
|
|
16450
16664
|
name: MetaConstants.Spinner,
|
|
16451
16665
|
testID: testID
|
|
16452
16666
|
})), getStyledProps(styledProps)), {}, {
|
|
16453
|
-
children: /*#__PURE__*/jsxs(BaseBox, _objectSpread$
|
|
16667
|
+
children: /*#__PURE__*/jsxs(BaseBox, _objectSpread$1n(_objectSpread$1n({
|
|
16454
16668
|
display: "flex",
|
|
16455
16669
|
alignItems: "center",
|
|
16456
16670
|
flexDirection: labelPosition === 'right' ? 'row' : 'column'
|
|
@@ -16483,19 +16697,9 @@ var BaseSpinner = function BaseSpinner(_ref2) {
|
|
|
16483
16697
|
}));
|
|
16484
16698
|
};
|
|
16485
16699
|
|
|
16486
|
-
var
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
}
|
|
16490
|
-
if (Array.isArray(childReactText)) {
|
|
16491
|
-
return childReactText.join('');
|
|
16492
|
-
}
|
|
16493
|
-
return String(childReactText);
|
|
16494
|
-
};
|
|
16495
|
-
|
|
16496
|
-
var _excluded$B = ["href", "target", "rel", "variant", "intent", "contrast", "size", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "onClick", "onBlur", "onKeyDown", "type", "children", "testID", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "accessibilityProps", "onTouchEnd", "onTouchStart"];
|
|
16497
|
-
function ownKeys$1p(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16498
|
-
function _objectSpread$1o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1p(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16700
|
+
var _excluded$A = ["href", "target", "rel", "variant", "intent", "contrast", "size", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "onClick", "onBlur", "onKeyDown", "type", "children", "testID", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "accessibilityProps", "onTouchEnd", "onTouchStart"];
|
|
16701
|
+
function ownKeys$1n(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16702
|
+
function _objectSpread$1m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1n(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16499
16703
|
var getRenderElement = function getRenderElement(href) {
|
|
16500
16704
|
if (isReactNative$4()) {
|
|
16501
16705
|
return undefined; // as property doesn't work with react native
|
|
@@ -16701,7 +16905,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
|
|
|
16701
16905
|
accessibilityProps = _ref4.accessibilityProps,
|
|
16702
16906
|
onTouchEnd = _ref4.onTouchEnd,
|
|
16703
16907
|
onTouchStart = _ref4.onTouchStart,
|
|
16704
|
-
rest = _objectWithoutProperties$1(_ref4, _excluded$
|
|
16908
|
+
rest = _objectWithoutProperties$1(_ref4, _excluded$A);
|
|
16705
16909
|
var isLink = Boolean(href);
|
|
16706
16910
|
var childrenString = getStringFromReactText(children);
|
|
16707
16911
|
// Button cannot be disabled when its rendered as Link
|
|
@@ -16762,7 +16966,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
|
|
|
16762
16966
|
return getRenderElement(href);
|
|
16763
16967
|
}, [href]);
|
|
16764
16968
|
var defaultRel = target === '_blank' ? 'noreferrer noopener' : undefined;
|
|
16765
|
-
return /*#__PURE__*/jsxs(StyledBaseButton, _objectSpread$
|
|
16969
|
+
return /*#__PURE__*/jsxs(StyledBaseButton, _objectSpread$1m(_objectSpread$1m(_objectSpread$1m({
|
|
16766
16970
|
ref: ref
|
|
16767
16971
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
|
|
16768
16972
|
// @ts-ignore: On React Native it will always be undefined but TS doesn't understand that
|
|
@@ -16771,7 +16975,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
|
|
|
16771
16975
|
href: href,
|
|
16772
16976
|
target: target,
|
|
16773
16977
|
rel: rel !== null && rel !== void 0 ? rel : defaultRel,
|
|
16774
|
-
accessibilityProps: _objectSpread$
|
|
16978
|
+
accessibilityProps: _objectSpread$1m({}, makeAccessible(_objectSpread$1m({
|
|
16775
16979
|
role: isLink ? 'link' : 'button'
|
|
16776
16980
|
}, accessibilityProps))),
|
|
16777
16981
|
isLoading: isLoading,
|
|
@@ -16877,19 +17081,19 @@ var getStyledLinkStyles = function getStyledLinkStyles(_ref) {
|
|
|
16877
17081
|
};
|
|
16878
17082
|
};
|
|
16879
17083
|
|
|
16880
|
-
function ownKeys$
|
|
16881
|
-
function _objectSpread$
|
|
17084
|
+
function ownKeys$1m(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17085
|
+
function _objectSpread$1l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1m(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16882
17086
|
var StyledLink$1 = /*#__PURE__*/styled.button.withConfig({
|
|
16883
17087
|
shouldForwardProp: omitPropsFromHTML,
|
|
16884
17088
|
displayName: 'StyledLink'
|
|
16885
17089
|
}).attrs(function (props) {
|
|
16886
|
-
return _objectSpread$
|
|
17090
|
+
return _objectSpread$1l({}, props.accessibilityProps);
|
|
16887
17091
|
}).withConfig({
|
|
16888
17092
|
displayName: "StyledBaseLinkweb__StyledLink",
|
|
16889
17093
|
componentId: "sc-1yj1z8h-0"
|
|
16890
17094
|
})(function (props) {
|
|
16891
17095
|
var styledPropsCSSObject = useStyledProps(props);
|
|
16892
|
-
return _objectSpread$
|
|
17096
|
+
return _objectSpread$1l(_objectSpread$1l({}, getStyledLinkStyles(props)), {}, {
|
|
16893
17097
|
display: 'inline-block',
|
|
16894
17098
|
borderRadius: makeBorderSize(props.theme.border.radius.small),
|
|
16895
17099
|
transitionProperty: 'box-shadow',
|
|
@@ -16939,10 +17143,10 @@ var useInteraction = function useInteraction() {
|
|
|
16939
17143
|
};
|
|
16940
17144
|
};
|
|
16941
17145
|
|
|
16942
|
-
var _excluded$
|
|
17146
|
+
var _excluded$z = ["children", "icon", "iconPosition", "isDisabled", "onClick", "onKeyDown", "variant", "href", "target", "rel", "intent", "contrast", "accessibilityProps", "className", "style", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"],
|
|
16943
17147
|
_excluded2 = ["currentInteraction", "setCurrentInteraction"];
|
|
16944
|
-
function ownKeys$
|
|
16945
|
-
function _objectSpread$
|
|
17148
|
+
function ownKeys$1l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17149
|
+
function _objectSpread$1k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1l(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16946
17150
|
var getColorToken = function getColorToken(_ref) {
|
|
16947
17151
|
var variant = _ref.variant,
|
|
16948
17152
|
intent = _ref.intent,
|
|
@@ -17059,7 +17263,7 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
|
|
|
17059
17263
|
onPointerEnter = _ref3.onPointerEnter,
|
|
17060
17264
|
onTouchStart = _ref3.onTouchStart,
|
|
17061
17265
|
onTouchEnd = _ref3.onTouchEnd,
|
|
17062
|
-
styledProps = _objectWithoutProperties$1(_ref3, _excluded$
|
|
17266
|
+
styledProps = _objectWithoutProperties$1(_ref3, _excluded$z);
|
|
17063
17267
|
var _useState = useState(false),
|
|
17064
17268
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17065
17269
|
isVisited = _useState2[0],
|
|
@@ -17117,13 +17321,13 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
|
|
|
17117
17321
|
}
|
|
17118
17322
|
};
|
|
17119
17323
|
var asProp = isReactNative$4() ? undefined : 'span';
|
|
17120
|
-
return /*#__PURE__*/jsx(StyledLink$1, _objectSpread$
|
|
17324
|
+
return /*#__PURE__*/jsx(StyledLink$1, _objectSpread$1k(_objectSpread$1k(_objectSpread$1k(_objectSpread$1k({
|
|
17121
17325
|
ref: ref
|
|
17122
17326
|
}, metaAttribute({
|
|
17123
17327
|
name: MetaConstants.Link,
|
|
17124
17328
|
testID: testID
|
|
17125
17329
|
})), {}, {
|
|
17126
|
-
accessibilityProps: _objectSpread$
|
|
17330
|
+
accessibilityProps: _objectSpread$1k({}, makeAccessible(_objectSpread$1k({
|
|
17127
17331
|
role: role,
|
|
17128
17332
|
disabled: disabled
|
|
17129
17333
|
}, accessibilityProps))),
|
|
@@ -17209,9 +17413,9 @@ var BaseLink = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__defaul
|
|
|
17209
17413
|
componentId: 'BaseLink'
|
|
17210
17414
|
});
|
|
17211
17415
|
|
|
17212
|
-
var _excluded$
|
|
17213
|
-
function ownKeys$
|
|
17214
|
-
function _objectSpread$
|
|
17416
|
+
var _excluded$y = ["description", "title", "isDismissible", "onDismiss", "contrast", "isFullWidth", "intent", "actions", "testID"];
|
|
17417
|
+
function ownKeys$1k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17418
|
+
function _objectSpread$1j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1k(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17215
17419
|
var isReactNative$3 = getPlatformType() === 'react-native';
|
|
17216
17420
|
|
|
17217
17421
|
// Need extra wrappers on React Native only for alignment
|
|
@@ -17237,7 +17441,7 @@ var Alert = function Alert(_ref) {
|
|
|
17237
17441
|
intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
|
|
17238
17442
|
actions = _ref.actions,
|
|
17239
17443
|
testID = _ref.testID,
|
|
17240
|
-
styledProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
17444
|
+
styledProps = _objectWithoutProperties$1(_ref, _excluded$y);
|
|
17241
17445
|
{
|
|
17242
17446
|
if (!(actions !== null && actions !== void 0 && actions.primary) && actions !== null && actions !== void 0 && actions.secondary) {
|
|
17243
17447
|
throwBladeError({
|
|
@@ -17342,7 +17546,7 @@ var Alert = function Alert(_ref) {
|
|
|
17342
17546
|
var secondaryAction = actions !== null && actions !== void 0 && actions.secondary ? /*#__PURE__*/jsx(BaseBox, {
|
|
17343
17547
|
marginRight: "spacing.4",
|
|
17344
17548
|
display: isReactNative$3 ? castNativeType('flex') : castWebType('inline-flex'),
|
|
17345
|
-
children: /*#__PURE__*/jsx(BaseLink, _objectSpread$
|
|
17549
|
+
children: /*#__PURE__*/jsx(BaseLink, _objectSpread$1j(_objectSpread$1j({
|
|
17346
17550
|
size: textSize,
|
|
17347
17551
|
contrast: contrast,
|
|
17348
17552
|
intent: intent
|
|
@@ -17379,7 +17583,7 @@ var Alert = function Alert(_ref) {
|
|
|
17379
17583
|
icon: CloseIcon
|
|
17380
17584
|
})
|
|
17381
17585
|
}) : null;
|
|
17382
|
-
var a11yProps = makeAccessible(_objectSpread$
|
|
17586
|
+
var a11yProps = makeAccessible(_objectSpread$1j({
|
|
17383
17587
|
// React Native doesn't has status as role
|
|
17384
17588
|
role: isReactNative$3 || intent === 'negative' || intent === 'notice' ? 'alert' : 'status'
|
|
17385
17589
|
}, intent === 'notice' && {
|
|
@@ -17388,7 +17592,7 @@ var Alert = function Alert(_ref) {
|
|
|
17388
17592
|
if (!isVisible) {
|
|
17389
17593
|
return null;
|
|
17390
17594
|
}
|
|
17391
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread$
|
|
17595
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread$1j(_objectSpread$1j(_objectSpread$1j(_objectSpread$1j({}, a11yProps), metaAttribute({
|
|
17392
17596
|
name: MetaConstants.Alert,
|
|
17393
17597
|
testID: testID
|
|
17394
17598
|
})), getStyledProps(styledProps)), {}, {
|
|
@@ -17408,161 +17612,6 @@ var Alert = function Alert(_ref) {
|
|
|
17408
17612
|
}));
|
|
17409
17613
|
};
|
|
17410
17614
|
|
|
17411
|
-
var getStyledBadgeStyles = function getStyledBadgeStyles(_ref) {
|
|
17412
|
-
var theme = _ref.theme,
|
|
17413
|
-
backgroundColor = _ref.backgroundColor;
|
|
17414
|
-
return {
|
|
17415
|
-
backgroundColor: getIn(theme.colors, backgroundColor),
|
|
17416
|
-
borderRadius: makeBorderSize(theme.border.radius.max),
|
|
17417
|
-
display: 'flex',
|
|
17418
|
-
flexWrap: 'nowrap'
|
|
17419
|
-
};
|
|
17420
|
-
};
|
|
17421
|
-
|
|
17422
|
-
function ownKeys$1l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17423
|
-
function _objectSpread$1k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1l(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17424
|
-
var StyledBadge = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
17425
|
-
displayName: "StyledBadgeweb__StyledBadge",
|
|
17426
|
-
componentId: "sc-1svn4tv-0"
|
|
17427
|
-
})(function (props) {
|
|
17428
|
-
return _objectSpread$1k(_objectSpread$1k({}, getStyledBadgeStyles(props)), {}, {
|
|
17429
|
-
width: 'fit-content'
|
|
17430
|
-
});
|
|
17431
|
-
});
|
|
17432
|
-
|
|
17433
|
-
var verticalPadding$1 = {
|
|
17434
|
-
small: 'spacing.0',
|
|
17435
|
-
medium: 'spacing.1',
|
|
17436
|
-
large: 'spacing.2'
|
|
17437
|
-
};
|
|
17438
|
-
var horizontalPadding$1 = {
|
|
17439
|
-
small: 'spacing.3',
|
|
17440
|
-
medium: 'spacing.3',
|
|
17441
|
-
large: 'spacing.4'
|
|
17442
|
-
};
|
|
17443
|
-
var iconPadding = {
|
|
17444
|
-
small: 'spacing.1',
|
|
17445
|
-
medium: 'spacing.2',
|
|
17446
|
-
large: 'spacing.2'
|
|
17447
|
-
};
|
|
17448
|
-
var iconSize = {
|
|
17449
|
-
small: 'xsmall',
|
|
17450
|
-
medium: 'small',
|
|
17451
|
-
large: 'small'
|
|
17452
|
-
};
|
|
17453
|
-
|
|
17454
|
-
var _excluded$y = ["children", "contrast", "fontWeight", "icon", "size", "variant", "testID"];
|
|
17455
|
-
function ownKeys$1k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17456
|
-
function _objectSpread$1j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1k(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17457
|
-
var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
|
|
17458
|
-
var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
|
|
17459
|
-
return feedbackVariants.includes(variant);
|
|
17460
|
-
};
|
|
17461
|
-
var getColorProps$1 = function getColorProps(_ref) {
|
|
17462
|
-
var variant = _ref.variant,
|
|
17463
|
-
contrast = _ref.contrast;
|
|
17464
|
-
var props = {
|
|
17465
|
-
iconColor: 'feedback.icon.neutral.lowContrast',
|
|
17466
|
-
textColor: 'feedback.text.neutral.lowContrast',
|
|
17467
|
-
backgroundColor: 'feedback.background.neutral.lowContrast'
|
|
17468
|
-
};
|
|
17469
|
-
if (isFeedbackVariant$1(variant)) {
|
|
17470
|
-
props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17471
|
-
props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17472
|
-
props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17473
|
-
} else {
|
|
17474
|
-
props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17475
|
-
props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17476
|
-
props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
|
|
17477
|
-
}
|
|
17478
|
-
return props;
|
|
17479
|
-
};
|
|
17480
|
-
var _Badge = function _Badge(_ref2) {
|
|
17481
|
-
var children = _ref2.children,
|
|
17482
|
-
_ref2$contrast = _ref2.contrast,
|
|
17483
|
-
contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
|
|
17484
|
-
_ref2$fontWeight = _ref2.fontWeight,
|
|
17485
|
-
fontWeight = _ref2$fontWeight === void 0 ? 'regular' : _ref2$fontWeight,
|
|
17486
|
-
Icon = _ref2.icon,
|
|
17487
|
-
_ref2$size = _ref2.size,
|
|
17488
|
-
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
17489
|
-
_ref2$variant = _ref2.variant,
|
|
17490
|
-
variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
|
|
17491
|
-
testID = _ref2.testID,
|
|
17492
|
-
styledProps = _objectWithoutProperties$1(_ref2, _excluded$y);
|
|
17493
|
-
var childrenString = getStringFromReactText(children);
|
|
17494
|
-
{
|
|
17495
|
-
if (!(childrenString !== null && childrenString !== void 0 && childrenString.trim())) {
|
|
17496
|
-
throwBladeError({
|
|
17497
|
-
message: 'Text as children is required for Badge.',
|
|
17498
|
-
moduleName: 'Badge'
|
|
17499
|
-
});
|
|
17500
|
-
}
|
|
17501
|
-
}
|
|
17502
|
-
var _getColorProps = getColorProps$1({
|
|
17503
|
-
variant: variant,
|
|
17504
|
-
contrast: contrast
|
|
17505
|
-
}),
|
|
17506
|
-
backgroundColor = _getColorProps.backgroundColor,
|
|
17507
|
-
iconColor = _getColorProps.iconColor,
|
|
17508
|
-
textColor = _getColorProps.textColor;
|
|
17509
|
-
var badgeTextSizes = {
|
|
17510
|
-
small: {
|
|
17511
|
-
variant: 'body',
|
|
17512
|
-
size: 'xsmall'
|
|
17513
|
-
},
|
|
17514
|
-
medium: {
|
|
17515
|
-
variant: 'body',
|
|
17516
|
-
size: 'small'
|
|
17517
|
-
},
|
|
17518
|
-
large: {
|
|
17519
|
-
variant: 'body',
|
|
17520
|
-
size: 'small'
|
|
17521
|
-
}
|
|
17522
|
-
};
|
|
17523
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread$1j(_objectSpread$1j(_objectSpread$1j({
|
|
17524
|
-
display: isReactNative$4() ? 'flex' : 'inline-flex'
|
|
17525
|
-
}, metaAttribute({
|
|
17526
|
-
name: MetaConstants.Badge,
|
|
17527
|
-
testID: testID
|
|
17528
|
-
})), getStyledProps(styledProps)), {}, {
|
|
17529
|
-
children: /*#__PURE__*/jsx(StyledBadge, {
|
|
17530
|
-
backgroundColor: backgroundColor,
|
|
17531
|
-
size: size,
|
|
17532
|
-
textAlign: 'left',
|
|
17533
|
-
children: /*#__PURE__*/jsxs(BaseBox, {
|
|
17534
|
-
paddingRight: horizontalPadding$1[size],
|
|
17535
|
-
paddingLeft: horizontalPadding$1[size],
|
|
17536
|
-
paddingTop: verticalPadding$1[size],
|
|
17537
|
-
paddingBottom: verticalPadding$1[size],
|
|
17538
|
-
display: "flex",
|
|
17539
|
-
flexDirection: "row",
|
|
17540
|
-
justifyContent: "center",
|
|
17541
|
-
alignItems: "center",
|
|
17542
|
-
overflow: "hidden",
|
|
17543
|
-
children: [Icon ? /*#__PURE__*/jsx(BaseBox, {
|
|
17544
|
-
paddingRight: Boolean(Icon) ? iconPadding[size] : 'spacing.0',
|
|
17545
|
-
display: "flex",
|
|
17546
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
17547
|
-
color: iconColor,
|
|
17548
|
-
size: iconSize[size]
|
|
17549
|
-
})
|
|
17550
|
-
}) : null, /*#__PURE__*/jsx(Text, _objectSpread$1j(_objectSpread$1j({}, badgeTextSizes[size]), {}, {
|
|
17551
|
-
type: "normal",
|
|
17552
|
-
weight: fontWeight,
|
|
17553
|
-
truncateAfterLines: 1,
|
|
17554
|
-
color: textColor,
|
|
17555
|
-
children: children
|
|
17556
|
-
}))]
|
|
17557
|
-
})
|
|
17558
|
-
})
|
|
17559
|
-
}));
|
|
17560
|
-
};
|
|
17561
|
-
var Badge = /*#__PURE__*/assignWithoutSideEffects(_Badge, {
|
|
17562
|
-
displayName: 'Badge',
|
|
17563
|
-
componentId: 'Badge'
|
|
17564
|
-
});
|
|
17565
|
-
|
|
17566
17615
|
var CardSurface = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
17567
17616
|
displayName: "CardSurfaceweb__CardSurface",
|
|
17568
17617
|
componentId: "sc-1pgxikk-0"
|
|
@@ -20280,7 +20329,7 @@ var ComponentIds = {
|
|
|
20280
20329
|
BottomSheetGrabHandle: 'BottomSheetGrabHandle'
|
|
20281
20330
|
};
|
|
20282
20331
|
|
|
20283
|
-
var _excluded$p = ["children", "selectionType", "onDismiss", "testID"];
|
|
20332
|
+
var _excluded$p = ["children", "isOpen", "onOpenChange", "selectionType", "onDismiss", "testID"];
|
|
20284
20333
|
function ownKeys$$(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20285
20334
|
function _objectSpread$_(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$$(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$$(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20286
20335
|
var validDropdownChildren = [dropdownComponentIds.triggers.SelectInput, dropdownComponentIds.triggers.DropdownButton, dropdownComponentIds.triggers.DropdownLink, dropdownComponentIds.DropdownOverlay, dropdownComponentIds.triggers.AutoComplete, ComponentIds.BottomSheet];
|
|
@@ -20313,12 +20362,14 @@ var validDropdownChildren = [dropdownComponentIds.triggers.SelectInput, dropdown
|
|
|
20313
20362
|
*/
|
|
20314
20363
|
var _Dropdown = function _Dropdown(_ref) {
|
|
20315
20364
|
var children = _ref.children,
|
|
20365
|
+
isOpenControlled = _ref.isOpen,
|
|
20366
|
+
onOpenChange = _ref.onOpenChange,
|
|
20316
20367
|
_ref$selectionType = _ref.selectionType,
|
|
20317
20368
|
selectionType = _ref$selectionType === void 0 ? 'single' : _ref$selectionType,
|
|
20318
20369
|
onDismiss = _ref.onDismiss,
|
|
20319
20370
|
testID = _ref.testID,
|
|
20320
20371
|
styledProps = _objectWithoutProperties$1(_ref, _excluded$p);
|
|
20321
|
-
var _React$useState = React__default.useState(false),
|
|
20372
|
+
var _React$useState = React__default.useState(isOpenControlled !== null && isOpenControlled !== void 0 ? isOpenControlled : false),
|
|
20322
20373
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20323
20374
|
isOpen = _React$useState2[0],
|
|
20324
20375
|
setIsOpen = _React$useState2[1];
|
|
@@ -20384,7 +20435,6 @@ var _Dropdown = function _Dropdown(_ref) {
|
|
|
20384
20435
|
var triggererRef = React__default.useRef(null);
|
|
20385
20436
|
var actionListItemRef = React__default.useRef(null);
|
|
20386
20437
|
var dropdownTriggerer = React__default.useRef();
|
|
20387
|
-
var isFirstRenderRef = React__default.useRef(true);
|
|
20388
20438
|
var isTagDismissedRef = React__default.useRef({
|
|
20389
20439
|
value: false
|
|
20390
20440
|
});
|
|
@@ -20393,22 +20443,22 @@ var _Dropdown = function _Dropdown(_ref) {
|
|
|
20393
20443
|
});
|
|
20394
20444
|
var dropdownContainerRef = React__default.useRef(null);
|
|
20395
20445
|
var dropdownBaseId = useId('dropdown');
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
if (
|
|
20399
|
-
|
|
20400
|
-
return;
|
|
20401
|
-
}
|
|
20402
|
-
if (!isOpen && onDismiss) {
|
|
20403
|
-
onDismiss();
|
|
20446
|
+
useDidUpdate(function () {
|
|
20447
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
20448
|
+
if (!isOpen) {
|
|
20449
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
20404
20450
|
}
|
|
20405
20451
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20406
20452
|
}, [isOpen]);
|
|
20453
|
+
React__default.useEffect(function () {
|
|
20454
|
+
if (isOpenControlled !== undefined) {
|
|
20455
|
+
setIsOpen(isOpenControlled);
|
|
20456
|
+
}
|
|
20457
|
+
}, [isOpenControlled]);
|
|
20407
20458
|
var close = React__default.useCallback(function () {
|
|
20408
20459
|
setActiveTagIndex(-1);
|
|
20409
20460
|
setIsOpen(false);
|
|
20410
|
-
|
|
20411
|
-
}, [onDismiss]);
|
|
20461
|
+
}, []);
|
|
20412
20462
|
React__default.Children.map(children, function (child) {
|
|
20413
20463
|
if ( /*#__PURE__*/React__default.isValidElement(child)) {
|
|
20414
20464
|
{
|
|
@@ -23019,7 +23069,7 @@ var otpToArray = function otpToArray(code) {
|
|
|
23019
23069
|
* />
|
|
23020
23070
|
* ```
|
|
23021
23071
|
*/
|
|
23022
|
-
var
|
|
23072
|
+
var _OTPInput = function _OTPInput(_ref, incomingRef) {
|
|
23023
23073
|
var autoFocus = _ref.autoFocus,
|
|
23024
23074
|
errorText = _ref.errorText,
|
|
23025
23075
|
helpText = _ref.helpText,
|
|
@@ -23061,6 +23111,11 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
23061
23111
|
helpTextId = _useFormId.helpTextId,
|
|
23062
23112
|
errorTextId = _useFormId.errorTextId,
|
|
23063
23113
|
successTextId = _useFormId.successTextId;
|
|
23114
|
+
useImperativeHandle(incomingRef, function () {
|
|
23115
|
+
return inputRefs.map(function (ref) {
|
|
23116
|
+
return ref.current;
|
|
23117
|
+
});
|
|
23118
|
+
}, [inputRefs]);
|
|
23064
23119
|
useEffect(function () {
|
|
23065
23120
|
// Effect for calling `onOTPFilled` callback
|
|
23066
23121
|
if (inputValue && inputValue.length >= otpLength) {
|
|
@@ -23323,6 +23378,7 @@ var OTPInput = function OTPInput(_ref) {
|
|
|
23323
23378
|
})]
|
|
23324
23379
|
}));
|
|
23325
23380
|
};
|
|
23381
|
+
var OTPInput = /*#__PURE__*/React__default.forwardRef(_OTPInput);
|
|
23326
23382
|
|
|
23327
23383
|
var InputChevronIcon = function InputChevronIcon(props) {
|
|
23328
23384
|
return /*#__PURE__*/jsxs(BaseBox, {
|
|
@@ -31093,5 +31149,5 @@ var PopoverInteractiveWrapper = /*#__PURE__*/React__default.forwardRef(function
|
|
|
31093
31149
|
})));
|
|
31094
31150
|
});
|
|
31095
31151
|
|
|
31096
|
-
export { Accordion, AccordionItem, ActionList, ActionListItem, ActionListItemAsset, ActionListItemIcon, ActionListItemText, ActionListSection, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AwardIcon, Badge, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeProvider, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader, Box, BoxIcon, BriefcaseIcon, BulkPayoutsIcon, Button, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, Carousel, CarouselItem, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleButton, CollapsibleLink, CommandIcon, CompassIcon, ComponentIds$1 as ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, Divider, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, ImageIcon, InboxIcon, Indicator, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkIcon, List, ListIcon, ListItem, ListItemCode, ListItemLink, ListItemText, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalFooter, ModalHeader, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PowerIcon, PrinterIcon, ProgressBar, QRCodeIcon, Radio, RadioGroup, RadioIcon$1 as RadioIcon, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, TabletIcon, Tag, TagIcon, TargetIcon, Text, TextArea, TextInput, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, Title, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useActionListContext, useTheme };
|
|
31152
|
+
export { Accordion, AccordionItem, ActionList, ActionListItem, ActionListItemAsset, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AwardIcon, Badge, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeProvider, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader, Box, BoxIcon, BriefcaseIcon, BulkPayoutsIcon, Button, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, Carousel, CarouselItem, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleButton, CollapsibleLink, CommandIcon, CompassIcon, ComponentIds$1 as ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, Divider, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, ImageIcon, InboxIcon, Indicator, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkIcon, List, ListIcon, ListItem, ListItemCode, ListItemLink, ListItemText, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalFooter, ModalHeader, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PowerIcon, PrinterIcon, ProgressBar, QRCodeIcon, Radio, RadioGroup, RadioIcon$1 as RadioIcon, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, TabletIcon, Tag, TagIcon, TargetIcon, Text, TextArea, TextInput, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, Title, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useActionListContext, useTheme };
|
|
31097
31153
|
//# sourceMappingURL=index.development.web.js.map
|