@razorpay/blade 11.9.0 → 11.10.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/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/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/Table/TableBody.web.js +3 -0
- package/build/lib/web/development/components/Table/TableBody.web.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/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/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/Table/TableBody.web.js +3 -0
- package/build/lib/web/production/components/Table/TableBody.web.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/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 +442 -3
- package/build/types/components/index.native.d.ts +98 -2
- 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,CAAAC,IAAA,EAKqC;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CAJxEE,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;IACbE,qBAAqB,GAAAH,IAAA,CAArBG,qBAAqB;IACrBC,0BAA0B,GAAAJ,IAAA,CAA1BI,0BAA0B;IAC1BC,cAAc,GAAAL,IAAA,CAAdK,cAAc,CAAA;AAEd,EAAA,IAAMC,4BAA8D,GAAG;AACrEJ,IAAAA,IAAI,EAAJA,IAAI;AACJK,IAAAA,YAAY,EAAE,MAAM;AACpBJ,IAAAA,qBAAqB,EAAE,SAAS;AAChCC,IAAAA,0BAA0B,EAAE,MAAM;AAClCC,IAAAA,cAAc,EAAdA,cAAAA;GACD,CAAA;AAED,EAAA,IAAMG,iBAAiB,GAAG;AACxBC,IAAAA,IAAI,EAAE;AACJF,MAAAA,YAAY,EAAE,MAAM;AACpBJ,MAAAA,qBAAqB,EAAE,SAAS;AAChCC,MAAAA,0BAA0B,EAAE,MAAM;AAClCC,MAAAA,cAAc,EAAEK,SAAAA;KACjB;AACDC,IAAAA,SAAS,EAAE;AACTJ,MAAAA,YAAY,EAAE,WAAW;AACzBJ,MAAAA,qBAAqB,EAAE,MAAM;AAC7BC,MAAAA,0BAA0B,EAAE,WAAW;AACvCC,MAAAA,cAAc,EAAEK,SAAAA;KACjB;AACDE,IAAAA,KAAK,EAAE;AACLL,MAAAA,YAAY,EAAE,OAAO;AACrBJ,MAAAA,qBAAqB,EAAE,MAAM;AAC7BC,MAAAA,0BAA0B,EAAE,OAAO;AACnCC,MAAAA,cAAc,EAAE,MA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AAAA,MAAA,IAAAiE,aAAA,CAAA;AAC7B,MAAA,OAAOhE,aAAa,gBAClB0C,GAAA,CAACuB,OAAO,EAAA;AAACC,QAAAA,SAAS,EAAEC,aAAa,CAAC7C,IAAI,CAAE;AAAC8C,QAAAA,WAAW,EAAC,WAAW;QAAAC,QAAA,eAC9D3B,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","forw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AoE,aAAA,CAAA;AAC7B,MAAA,OAAOnE,aAAa,gBAClB6C,GAAA,CAACuB,OAAO,EAAA;AAACC,QAAAA,SAAS,EAAEC,aAAa,CAAC7C,IAAI,CAAE;AAAC8C,QAAAA,WAAW,EAAC,WAAW;QAAAC,QAAA,eAC9D3B,GAAA,CAAC4B,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;;;;"}
|
|
@@ -228,6 +228,9 @@ var TableCheckboxCell = function TableCheckboxCell(_ref6) {
|
|
|
228
228
|
justifyContent: "center",
|
|
229
229
|
flex: 1,
|
|
230
230
|
width: makeSize(checkboxCellWidth),
|
|
231
|
+
onClick: function onClick(e) {
|
|
232
|
+
return e.stopPropagation();
|
|
233
|
+
},
|
|
231
234
|
children: /*#__PURE__*/jsx(Checkbox, {
|
|
232
235
|
isDisabled: isDisabled,
|
|
233
236
|
isChecked: isChecked,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst StyledBody = styled(Body)<{ $isSelectable: boolean; $showStripedRows: boolean }>(\n ({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n },\n);\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nconst StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n}));\n\nconst CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n}>(({ theme, rowDensity, showStripedRows }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingTop: makeSpace(getIn(theme, tableRow.paddingTop[rowDensity])),\n paddingBottom: makeSpace(getIn(theme, tableRow.paddingBottom[rowDensity])),\n paddingLeft: makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])),\n paddingRight: makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])),\n height: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderBottomColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{ $isSelectable: boolean; $isHoverable: boolean }>(\n ({ theme, $isSelectable, $isHoverable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n },\n);\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","rowDensity","paddingTop","makeSpace","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","width","borderBottomColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","size","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","makeSize","checkboxCellWidth","Checkbox","StyledRow","Row","_ref7","$isHoverable","cursor","_TableRow","_ref8","item","onHover","onClick","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAC7B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AACvC,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACC,6BAA6B,CAC5D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIE,KAAK,CAACN,KAAK,CAACO,MAAM,EAA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CAACL,IAAI,CAACU,EAAE,CAAC,CAAA;OAAC;AAC/DtB,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACApD,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMkF,QAAQ,gBAAGvE,wBAAwB,CAACmD,SAAS,EAAE;EACnD9F,WAAW,EAAE4C,YAAY,CAACsE,QAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst StyledBody = styled(Body)<{ $isSelectable: boolean; $showStripedRows: boolean }>(\n ({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n },\n);\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nconst StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n}));\n\nconst CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n}>(({ theme, rowDensity, showStripedRows }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingTop: makeSpace(getIn(theme, tableRow.paddingTop[rowDensity])),\n paddingBottom: makeSpace(getIn(theme, tableRow.paddingBottom[rowDensity])),\n paddingLeft: makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])),\n paddingRight: makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])),\n height: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderBottomColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{ $isSelectable: boolean; $isHoverable: boolean }>(\n ({ theme, $isSelectable, $isHoverable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n },\n);\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","rowDensity","paddingTop","makeSpace","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","width","borderBottomColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","size","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","makeSize","checkboxCellWidth","onClick","e","stopPropagation","Checkbox","StyledRow","Row","_ref7","$isHoverable","cursor","_TableRow","_ref8","item","onHover","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAC7B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AACvC,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK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2E,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAApF,IAAAA,QAAA,EAElDyE,CAAAA,aAAa,iBACZnE,GAAA,CAAC0C,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAEwB,UAAW;MACtBvB,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACC,UAAU,IAAImB,sBAAsB,CAACJ,IAAI,CAACS,EAAE,CAAC,CAAA;OAAC;AAC/DxB,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACApD,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMoF,QAAQ,gBAAGzE,wBAAwB,CAACsD,SAAS,EAAE;EACnDjG,WAAW,EAAE4C,YAAY,CAACwE,QAAAA;AAC5B,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":"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,eAA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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","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,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,cAAc,EAAE,i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AAW;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;;;;"}
|
|
@@ -3,12 +3,14 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { useMemoizedStyles } from './useMemoizedStyles.web.js';
|
|
4
4
|
import { omitPropsFromHTML } from '../../../utils/omitPropsFromHTML/index.js';
|
|
5
5
|
import '../../../utils/metaAttribute/index.js';
|
|
6
|
+
import '../../../utils/assignWithoutSideEffects/index.js';
|
|
6
7
|
import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.web.js';
|
|
7
8
|
import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
|
|
9
|
+
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
8
10
|
|
|
9
11
|
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; }
|
|
10
12
|
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; }
|
|
11
|
-
var
|
|
13
|
+
var _BaseBox = /*#__PURE__*/styled.div.attrs(function (props) {
|
|
12
14
|
return _objectSpread({}, metaAttribute({
|
|
13
15
|
name: props['data-blade-component'] || MetaConstants.BaseBox,
|
|
14
16
|
testID: props['data-testid'] || props.testID
|
|
@@ -20,6 +22,9 @@ var BaseBox = /*#__PURE__*/styled.div.attrs(function (props) {
|
|
|
20
22
|
var cssObject = useMemoizedStyles(props);
|
|
21
23
|
return cssObject;
|
|
22
24
|
});
|
|
25
|
+
var BaseBox = /*#__PURE__*/assignWithoutSideEffects(_BaseBox, {
|
|
26
|
+
componentId: 'BaseBox'
|
|
27
|
+
});
|
|
23
28
|
|
|
24
29
|
export { BaseBox };
|
|
25
30
|
//# sourceMappingURL=BaseBox.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseBox.web.js","sources":["../../../../../../../src/components/Box/BaseBox/BaseBox.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { BaseBoxProps } from './types';\nimport { useMemoizedStyles } from './useMemoizedStyles';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst
|
|
1
|
+
{"version":3,"file":"BaseBox.web.js","sources":["../../../../../../../src/components/Box/BaseBox/BaseBox.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { BaseBoxProps } from './types';\nimport { useMemoizedStyles } from './useMemoizedStyles';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _BaseBox = styled.div\n .attrs<BaseBoxProps>((props) => {\n return {\n ...metaAttribute({\n name: (props as never)['data-blade-component'] || MetaConstants.BaseBox,\n testID: (props as never)['data-testid'] || props.testID,\n }),\n };\n })\n .withConfig({\n shouldForwardProp: omitPropsFromHTML,\n displayName: 'BaseBox',\n })<BaseBoxProps>((props) => {\n const cssObject = useMemoizedStyles(props);\n return cssObject;\n});\n\nconst BaseBox = assignWithoutSideEffects(_BaseBox, { componentId: 'BaseBox' });\n\nexport { BaseBox };\n"],"names":["_BaseBox","styled","div","attrs","props","_objectSpread","metaAttribute","name","MetaConstants","BaseBox","testID","withConfig","shouldForwardProp","omitPropsFromHTML","displayName","cssObject","useMemoizedStyles","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,QAAQ,gBAAGC,MAAM,CAACC,GAAG,CACxBC,KAAK,CAAe,UAACC,KAAK,EAAK;EAC9B,OAAAC,aAAA,CACKC,EAAAA,EAAAA,aAAa,CAAC;IACfC,IAAI,EAAGH,KAAK,CAAW,sBAAsB,CAAC,IAAII,aAAa,CAACC,OAAO;AACvEC,IAAAA,MAAM,EAAGN,KAAK,CAAW,aAAa,CAAC,IAAIA,KAAK,CAACM,MAAAA;AACnD,GAAC,CAAC,CAAA,CAAA;AAEN,CAAC,CAAC,CACDC,UAAU,CAAC;AACVC,EAAAA,iBAAiB,EAAEC,iBAAiB;AACpCC,EAAAA,WAAW,EAAE,SAAA;AACf,CAAC,CAAC,CAAe,UAACV,KAAK,EAAK;AAC5B,EAAA,IAAMW,SAAS,GAAGC,iBAAiB,CAACZ,KAAK,CAAC,CAAA;AAC1C,EAAA,OAAOW,SAAS,CAAA;AAClB,CAAC,CAAC,CAAA;AAEF,IAAMN,OAAO,gBAAGQ,wBAAwB,CAACjB,QAAQ,EAAE;AAAEkB,EAAAA,WAAW,EAAE,SAAA;AAAU,CAAC;;;;"}
|
|
@@ -237,7 +237,8 @@ var _Box = function _Box(props, ref) {
|
|
|
237
237
|
})), makeBoxProps(props)));
|
|
238
238
|
};
|
|
239
239
|
var Box = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_Box), {
|
|
240
|
-
displayName: 'Box'
|
|
240
|
+
displayName: 'Box',
|
|
241
|
+
componentId: 'Box'
|
|
241
242
|
});
|
|
242
243
|
|
|
243
244
|
export { Box, makeBoxProps };
|