@razorpay/blade 11.9.1 → 11.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/build/lib/native/components/Box/Box.js +1 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js +1 -1
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +2 -2
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/utils.js +4 -0
- package/build/lib/native/components/Input/BaseInput/utils.js.map +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/native/components/Input/PhoneNumberInput/PhoneNumberInput.native.js +7 -0
- package/build/lib/native/components/Input/PhoneNumberInput/PhoneNumberInput.native.js.map +1 -0
- package/build/lib/native/components/Input/TextArea/TextArea.js +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/index.js +1 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js +6 -1
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js.map +1 -1
- package/build/lib/web/development/components/Box/Box.js +2 -1
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +8 -6
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +7 -6
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js +1 -0
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +13 -4
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js +4 -2
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js +4 -5
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js +4 -5
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +8 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +8 -5
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +43 -28
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +9 -7
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/utils.js +73 -0
- package/build/lib/web/development/components/Input/BaseInput/utils.js.map +1 -0
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +111 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +242 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/index.js +2 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/index.js.map +1 -0
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +1 -1
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +45 -115
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +3 -1
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js +6 -1
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js.map +1 -1
- package/build/lib/web/production/components/Box/Box.js +2 -1
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +8 -6
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +7 -6
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js +1 -0
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +13 -4
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js +4 -2
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js +4 -5
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js +4 -5
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +8 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +8 -5
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +43 -28
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +9 -7
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/utils.js +73 -0
- package/build/lib/web/production/components/Input/BaseInput/utils.js.map +1 -0
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +111 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +242 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/index.js +2 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/index.js.map +1 -0
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +1 -1
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +45 -115
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +3 -1
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +448 -3
- package/build/types/components/index.native.d.ts +104 -2
- package/build/types/tokens/index.d.ts +3 -1
- package/build/types/tokens/index.native.d.ts +3 -1
- package/package.json +4 -4
|
@@ -3,6 +3,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import React__default, { useState } from 'react';
|
|
5
5
|
import '../BaseInput/index.js';
|
|
6
|
+
import { getKeyboardAndAutocompleteProps } from '../BaseInput/utils.js';
|
|
6
7
|
import isEmpty from '../../../utils/lodashButBetter/isEmpty.js';
|
|
7
8
|
import '../../Icons/index.js';
|
|
8
9
|
import '../../Button/IconButton/index.js';
|
|
@@ -28,122 +29,51 @@ import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffect
|
|
|
28
29
|
var _excluded = ["label", "accessibilityLabel", "labelPosition", "placeholder", "type", "defaultValue", "name", "value", "maxCharacters", "onChange", "onClick", "onFocus", "onBlur", "onSubmit", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "icon", "prefix", "showClearButton", "onClearButtonClick", "isLoading", "suffix", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "autoCapitalize", "testID", "size", "leadingIcon", "trailingIcon"];
|
|
29
30
|
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; }
|
|
30
31
|
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(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; }
|
|
31
|
-
var getKeyboardAndAutocompleteProps = function getKeyboardAndAutocompleteProps(_ref) {
|
|
32
|
-
var _ref$type = _ref.type,
|
|
33
|
-
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
34
|
-
keyboardReturnKeyType = _ref.keyboardReturnKeyType,
|
|
35
|
-
autoCompleteSuggestionType = _ref.autoCompleteSuggestionType,
|
|
36
|
-
autoCapitalize = _ref.autoCapitalize;
|
|
37
|
-
var keyboardAndAutocompleteProps = {
|
|
38
|
-
type: type,
|
|
39
|
-
keyboardType: 'text',
|
|
40
|
-
keyboardReturnKeyType: 'default',
|
|
41
|
-
autoCompleteSuggestionType: 'none',
|
|
42
|
-
autoCapitalize: autoCapitalize
|
|
43
|
-
};
|
|
44
|
-
var keyboardConfigMap = {
|
|
45
|
-
text: {
|
|
46
|
-
keyboardType: 'text',
|
|
47
|
-
keyboardReturnKeyType: 'default',
|
|
48
|
-
autoCompleteSuggestionType: 'none',
|
|
49
|
-
autoCapitalize: undefined
|
|
50
|
-
},
|
|
51
|
-
telephone: {
|
|
52
|
-
keyboardType: 'telephone',
|
|
53
|
-
keyboardReturnKeyType: 'done',
|
|
54
|
-
autoCompleteSuggestionType: 'telephone',
|
|
55
|
-
autoCapitalize: undefined
|
|
56
|
-
},
|
|
57
|
-
email: {
|
|
58
|
-
keyboardType: 'email',
|
|
59
|
-
keyboardReturnKeyType: 'done',
|
|
60
|
-
autoCompleteSuggestionType: 'email',
|
|
61
|
-
autoCapitalize: 'none'
|
|
62
|
-
},
|
|
63
|
-
url: {
|
|
64
|
-
keyboardType: 'url',
|
|
65
|
-
keyboardReturnKeyType: 'go',
|
|
66
|
-
autoCompleteSuggestionType: 'none',
|
|
67
|
-
autoCapitalize: 'none'
|
|
68
|
-
},
|
|
69
|
-
number: {
|
|
70
|
-
keyboardType: 'decimal',
|
|
71
|
-
keyboardReturnKeyType: 'done',
|
|
72
|
-
autoCompleteSuggestionType: 'none',
|
|
73
|
-
autoCapitalize: undefined
|
|
74
|
-
},
|
|
75
|
-
search: {
|
|
76
|
-
keyboardType: 'search',
|
|
77
|
-
keyboardReturnKeyType: 'search',
|
|
78
|
-
autoCompleteSuggestionType: 'none',
|
|
79
|
-
autoCapitalize: undefined
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var keyboardConfig = keyboardConfigMap[type];
|
|
83
|
-
keyboardAndAutocompleteProps.keyboardType = keyboardConfig.keyboardType;
|
|
84
|
-
keyboardAndAutocompleteProps.keyboardReturnKeyType = keyboardReturnKeyType !== null && keyboardReturnKeyType !== void 0 ? keyboardReturnKeyType : keyboardConfig.keyboardReturnKeyType;
|
|
85
|
-
keyboardAndAutocompleteProps.autoCompleteSuggestionType = autoCompleteSuggestionType !== null && autoCompleteSuggestionType !== void 0 ? autoCompleteSuggestionType : keyboardConfig.autoCompleteSuggestionType;
|
|
86
|
-
keyboardAndAutocompleteProps.autoCapitalize = keyboardConfig.autoCapitalize;
|
|
87
|
-
if (type === 'number') {
|
|
88
|
-
/* the default keyboardType:numeric shows alphanumeric keyboard on iOS but number pad on android. making it type:text and keyboardType:decimal fixes this on all platforms.
|
|
89
|
-
* source: https://css-tricks.com/everything-you-ever-wanted-to-know-about-keyboardType/#aa-decimal
|
|
90
|
-
*/
|
|
91
|
-
keyboardAndAutocompleteProps.type = 'text';
|
|
92
|
-
}
|
|
93
|
-
if (type === 'search') {
|
|
94
|
-
/* when input type:search is provided at that time browser adds a weird close button which collides with our clear button and then we have 2 clear buttons
|
|
95
|
-
* source: https://github.com/razorpay/blade/issues/857#issue-1457367160
|
|
96
|
-
*/
|
|
97
|
-
keyboardAndAutocompleteProps.type = 'text';
|
|
98
|
-
}
|
|
99
|
-
return keyboardAndAutocompleteProps;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
32
|
// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists
|
|
103
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
104
34
|
var isReactNative = function isReactNative(_textInputRef) {
|
|
105
35
|
return getPlatformType() === 'react-native';
|
|
106
36
|
};
|
|
107
|
-
var _TextInput = function _TextInput(
|
|
108
|
-
var label =
|
|
109
|
-
accessibilityLabel =
|
|
110
|
-
|
|
111
|
-
labelPosition =
|
|
112
|
-
placeholder =
|
|
113
|
-
|
|
114
|
-
type =
|
|
115
|
-
defaultValue =
|
|
116
|
-
name =
|
|
117
|
-
value =
|
|
118
|
-
maxCharacters =
|
|
119
|
-
_onChange =
|
|
120
|
-
onClick =
|
|
121
|
-
onFocus =
|
|
122
|
-
onBlur =
|
|
123
|
-
onSubmit =
|
|
124
|
-
isDisabled =
|
|
125
|
-
necessityIndicator =
|
|
126
|
-
validationState =
|
|
127
|
-
errorText =
|
|
128
|
-
helpText =
|
|
129
|
-
successText =
|
|
130
|
-
isRequired =
|
|
131
|
-
icon =
|
|
132
|
-
prefix =
|
|
133
|
-
showClearButton =
|
|
134
|
-
onClearButtonClick =
|
|
135
|
-
isLoading =
|
|
136
|
-
suffix =
|
|
137
|
-
autoFocus =
|
|
138
|
-
keyboardReturnKeyType =
|
|
139
|
-
autoCompleteSuggestionType =
|
|
140
|
-
autoCapitalize =
|
|
141
|
-
testID =
|
|
142
|
-
|
|
143
|
-
size =
|
|
144
|
-
leadingIcon =
|
|
145
|
-
trailingIcon =
|
|
146
|
-
styledProps = _objectWithoutProperties(
|
|
37
|
+
var _TextInput = function _TextInput(_ref, ref) {
|
|
38
|
+
var label = _ref.label,
|
|
39
|
+
accessibilityLabel = _ref.accessibilityLabel,
|
|
40
|
+
_ref$labelPosition = _ref.labelPosition,
|
|
41
|
+
labelPosition = _ref$labelPosition === void 0 ? 'top' : _ref$labelPosition,
|
|
42
|
+
placeholder = _ref.placeholder,
|
|
43
|
+
_ref$type = _ref.type,
|
|
44
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
45
|
+
defaultValue = _ref.defaultValue,
|
|
46
|
+
name = _ref.name,
|
|
47
|
+
value = _ref.value,
|
|
48
|
+
maxCharacters = _ref.maxCharacters,
|
|
49
|
+
_onChange = _ref.onChange,
|
|
50
|
+
onClick = _ref.onClick,
|
|
51
|
+
onFocus = _ref.onFocus,
|
|
52
|
+
onBlur = _ref.onBlur,
|
|
53
|
+
onSubmit = _ref.onSubmit,
|
|
54
|
+
isDisabled = _ref.isDisabled,
|
|
55
|
+
necessityIndicator = _ref.necessityIndicator,
|
|
56
|
+
validationState = _ref.validationState,
|
|
57
|
+
errorText = _ref.errorText,
|
|
58
|
+
helpText = _ref.helpText,
|
|
59
|
+
successText = _ref.successText,
|
|
60
|
+
isRequired = _ref.isRequired,
|
|
61
|
+
icon = _ref.icon,
|
|
62
|
+
prefix = _ref.prefix,
|
|
63
|
+
showClearButton = _ref.showClearButton,
|
|
64
|
+
onClearButtonClick = _ref.onClearButtonClick,
|
|
65
|
+
isLoading = _ref.isLoading,
|
|
66
|
+
suffix = _ref.suffix,
|
|
67
|
+
autoFocus = _ref.autoFocus,
|
|
68
|
+
keyboardReturnKeyType = _ref.keyboardReturnKeyType,
|
|
69
|
+
autoCompleteSuggestionType = _ref.autoCompleteSuggestionType,
|
|
70
|
+
autoCapitalize = _ref.autoCapitalize,
|
|
71
|
+
testID = _ref.testID,
|
|
72
|
+
_ref$size = _ref.size,
|
|
73
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
74
|
+
leadingIcon = _ref.leadingIcon,
|
|
75
|
+
trailingIcon = _ref.trailingIcon,
|
|
76
|
+
styledProps = _objectWithoutProperties(_ref, _excluded);
|
|
147
77
|
var textInputRef = React__default.useRef(null);
|
|
148
78
|
var mergedRef = useMergeRefs(ref, textInputRef);
|
|
149
79
|
var _useState = useState(false),
|
|
@@ -200,9 +130,9 @@ var _TextInput = function _TextInput(_ref2, ref) {
|
|
|
200
130
|
value: value,
|
|
201
131
|
name: name,
|
|
202
132
|
maxCharacters: maxCharacters,
|
|
203
|
-
onChange: function onChange(
|
|
204
|
-
var name =
|
|
205
|
-
value =
|
|
133
|
+
onChange: function onChange(_ref2) {
|
|
134
|
+
var name = _ref2.name,
|
|
135
|
+
value = _ref2.value;
|
|
206
136
|
if (showClearButton && value !== null && value !== void 0 && value.length) {
|
|
207
137
|
// show the clear button when the user starts typing in
|
|
208
138
|
setShouldShowClearButton(true);
|
|
@@ -225,7 +155,7 @@ var _TextInput = function _TextInput(_ref2, ref) {
|
|
|
225
155
|
isRequired: isRequired,
|
|
226
156
|
leadingIcon: leadingIcon !== null && leadingIcon !== void 0 ? leadingIcon : icon,
|
|
227
157
|
prefix: prefix,
|
|
228
|
-
|
|
158
|
+
trailingInteractionElement: renderInteractionElement(),
|
|
229
159
|
trailingIcon: trailingIcon,
|
|
230
160
|
suffix: suffix,
|
|
231
161
|
validationState: validationState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leadingIcon` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n} & StyledPropsBlade;\n\ntype TextInputKeyboardAndAutoComplete = Pick<\n BaseInputProps,\n 'keyboardType' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'autoCapitalize'\n> & {\n type: Type;\n};\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\nconst getKeyboardAndAutocompleteProps = ({\n type = 'text',\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n}: TextInputKeyboardAndAutoComplete): TextInputKeyboardAndAutoComplete => {\n const keyboardAndAutocompleteProps: TextInputKeyboardAndAutoComplete = {\n type,\n keyboardType: 'text',\n keyboardReturnKeyType: 'default',\n autoCompleteSuggestionType: 'none',\n autoCapitalize,\n };\n\n const keyboardConfigMap = {\n text: {\n keyboardType: 'text',\n keyboardReturnKeyType: 'default',\n autoCompleteSuggestionType: 'none',\n autoCapitalize: undefined,\n },\n telephone: {\n keyboardType: 'telephone',\n keyboardReturnKeyType: 'done',\n autoCompleteSuggestionType: 'telephone',\n autoCapitalize: undefined,\n },\n email: {\n keyboardType: 'email',\n keyboardReturnKeyType: 'done',\n autoCompleteSuggestionType: 'email',\n autoCapitalize: 'none',\n },\n url: {\n keyboardType: 'url',\n keyboardReturnKeyType: 'go',\n autoCompleteSuggestionType: 'none',\n autoCapitalize: 'none',\n },\n number: {\n keyboardType: 'decimal',\n keyboardReturnKeyType: 'done',\n autoCompleteSuggestionType: 'none',\n autoCapitalize: undefined,\n },\n search: {\n keyboardType: 'search',\n keyboardReturnKeyType: 'search',\n autoCompleteSuggestionType: 'none',\n autoCapitalize: undefined,\n },\n } as const;\n\n const keyboardConfig = keyboardConfigMap[type];\n\n keyboardAndAutocompleteProps.keyboardType = keyboardConfig.keyboardType;\n\n keyboardAndAutocompleteProps.keyboardReturnKeyType =\n keyboardReturnKeyType ?? keyboardConfig.keyboardReturnKeyType;\n\n keyboardAndAutocompleteProps.autoCompleteSuggestionType =\n autoCompleteSuggestionType ?? keyboardConfig.autoCompleteSuggestionType;\n\n keyboardAndAutocompleteProps.autoCapitalize = keyboardConfig.autoCapitalize;\n\n if (type === 'number') {\n /* the default keyboardType:numeric shows alphanumeric keyboard on iOS but number pad on android. making it type:text and keyboardType:decimal fixes this on all platforms.\n * source: https://css-tricks.com/everything-you-ever-wanted-to-know-about-keyboardType/#aa-decimal\n */\n keyboardAndAutocompleteProps.type = 'text';\n }\n\n if (type === 'search') {\n /* when input type:search is provided at that time browser adds a weird close button which collides with our clear button and then we have 2 clear buttons\n * source: https://github.com/razorpay/blade/issues/857#issue-1457367160\n */\n keyboardAndAutocompleteProps.type = 'text';\n }\n\n return keyboardAndAutocompleteProps;\n};\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n ...styledProps\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRef>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? value)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton) {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n maxCharacters={maxCharacters}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={leadingIcon ?? icon}\n prefix={prefix}\n interactionElement={renderInteractionElement()}\n trailingIcon={trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={maxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["getKeyboardAndAutocompleteProps","_ref","_ref$type","type","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","keyboardAndAutocompleteProps","keyboardType","keyboardConfigMap","text","undefined","telephone","email","url","number","search","keyboardConfig","isReactNative","_textInputRef","getPlatformType","_TextInput","_ref2","ref","label","accessibilityLabel","_ref2$labelPosition","labelPosition","placeholder","_ref2$type","defaultValue","name","value","maxCharacters","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","testID","_ref2$size","size","leadingIcon","trailingIcon","styledProps","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","renderInteractionElement","_jsx","Spinner","color","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","hideLabelText","_ref3","length","interactionElement","trailingFooterSlot","_value$length","BaseBox","marginTop","hintMarginTop","marginRight","children","CharacterCounter","currentCount","maxCount","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,IAAMA,+BAA+B,GAAG,SAAlCA,+BAA+BA,CAAA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B,GAAA,CAAC4B,gBAAgB,EAAA;AACfC,UAAAA,YAAY,EAAAP,CAAAA,aAAA,GAAEjE,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAE8D,MAAM,MAAAG,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AACjCQ,UAAAA,QAAQ,EAAExE,aAAc;AACxBsB,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAH,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACXrD,+BAA+B,CAAC;AAClCG,IAAAA,IAAI,EAAJA,IAAI;AACJC,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFiD,IAAAA,IAAI,EAAEA,IAAAA;GACFG,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKiC,IAAAA,SAAS,gBAAGe,wBAAwB,eAAC5C,cAAK,CAAC6C,UAAU,CAACtF,UAAU,CAAC,EAAE;AACvEuF,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leadingIcon` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n ...styledProps\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRef>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? value)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton) {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n maxCharacters={maxCharacters}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={maxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","styledProps","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","renderInteractionElement","_jsx","Spinner","color","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","hideLabelText","_ref2","length","trailingInteractionElement","trailingFooterSlot","_value$length","BaseBox","marginTop","hintMarginTop","marginRight","children","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,I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,gBAAgB,EAAA;AACfC,UAAAA,YAAY,EAAAP,CAAAA,aAAA,GAAEpE,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEiE,MAAM,MAAAG,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AACjCQ,UAAAA,QAAQ,EAAE3E,aAAc;AACxByB,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAN,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACXqD,+BAA+B,CAAC;AAClChF,IAAAA,IAAI,EAAJA,IAAI;AACJwB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFG,IAAAA,IAAI,EAAEA,IAAAA;GACFG,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKiC,IAAAA,SAAS,gBAAGgB,wBAAwB,eAAC7C,cAAK,CAAC8C,UAAU,CAAC3F,UAAU,CAAC,EAAE;AACvE4F,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
@@ -27,6 +27,7 @@ import './Input/OTPInput/index.js';
|
|
|
27
27
|
import './Input/PasswordInput/index.js';
|
|
28
28
|
import './Input/TextArea/index.js';
|
|
29
29
|
import './Input/TextInput/index.js';
|
|
30
|
+
import './Input/PhoneNumberInput/index.js';
|
|
30
31
|
import './Link/index.js';
|
|
31
32
|
import './List/index.js';
|
|
32
33
|
import './LiveAnnouncer/index.web.js';
|
|
@@ -371,6 +372,7 @@ export { OTPInput } from './Input/OTPInput/OTPInput.js';
|
|
|
371
372
|
export { PasswordInput } from './Input/PasswordInput/PasswordInput.js';
|
|
372
373
|
export { TextArea } from './Input/TextArea/TextArea.js';
|
|
373
374
|
export { TextInput } from './Input/TextInput/TextInput.js';
|
|
375
|
+
export { PhoneNumberInput } from './Input/PhoneNumberInput/PhoneNumberInput.web.js';
|
|
374
376
|
export { default as Link } from './Link/Link/Link.js';
|
|
375
377
|
export { List } from './List/List.js';
|
|
376
378
|
export { ListItem } from './List/ListItem.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sources":["../../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 32: 32,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /**
|
|
1
|
+
{"version":3,"file":"size.js","sources":["../../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 32: 32,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /** 56 px */\n 56: 56,\n /** 64 px */\n 64: 64,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 176 px */\n 176: 176,\n /** 200 px */\n 200: 200,\n /** 240 px */\n 240: 240,\n /** 300 px */\n 300: 300,\n /** 360 px */\n 360: 360,\n /** 400 px */\n 400: 400,\n /** 584 px */\n 584: 584,\n /** 640 px */\n 640: 640,\n /** 760 px */\n 760: 760,\n /** 800 px */\n 800: 800,\n /** 1024 px */\n 1024: 1024,\n /** 1136 px */\n 1136: 1136,\n} as const;\n\nexport type Size = typeof size;\n"],"names":["size"],"mappings":"AAAA;AACA;AACA;AACO,IAAMA,IAAI,GAAG;AAClB;AACA,EAAA,C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,IAAI;AACV;AACA,EAAA,IAAI,EAAE,IAAA;AACR;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metaConstants.js","sources":["../../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","TextArea","TextInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton"],"mappings":"AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,mBAAmB,EAAE,uBAAuB;AAC5CC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,cAAc,EAAE,kBAAkB;AAClCC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,QAAQ,EAAE,WAAW;AACrBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,E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A,IAAI,EAAE,MAAM;AACZC,EAAAA,QAAQ,EAAE,WAAW;AACrBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,iBAAiB,EAAE,oBAAoB;AACvCC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,kBAAkB,EAAE,sBAAsB;AAC1CC,EAAAA,cAAc,EAAE,iBAAiB;AACjCC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,eAAe,EAAE,mBAAmB;AACpCC,EAAAA,QAAQ,EAAE,UAAA;AACZ;;;;"}
|
|
1
|
+
{"version":3,"file":"metaConstants.js","sources":["../../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollO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