@razorpay/blade 12.97.1 → 12.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/ActionList/ActionListItem.js +1 -0
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +1 -0
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +1 -0
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -0
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +1 -0
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +1 -0
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js +1 -0
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js.map +1 -1
- package/build/lib/native/components/FileUpload/FileUploadItem.js +1 -0
- package/build/lib/native/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +1 -0
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Icons/ReticleIcon/ReticleIcon.js +13 -0
- package/build/lib/native/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -0
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/native/components/Input/SearchInput/SearchInput.js +1 -0
- package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +1 -0
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +1 -0
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverCloseButton.js +1 -0
- package/build/lib/native/components/Popover/PopoverCloseButton.js.map +1 -1
- package/build/lib/native/components/QuickFilters/QuickFilter.js +1 -0
- package/build/lib/native/components/QuickFilters/QuickFilter.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +1 -0
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -0
- package/build/lib/native/components/Tag/Tag.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/web/development/_virtual/cloneDeep.js +1 -1
- package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +45 -21
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js +4 -2
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/ReticleIcon/ReticleIcon.js +42 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +3 -2
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/index.js +1 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
- package/build/lib/web/production/_virtual/cloneDeep.js +1 -1
- package/build/lib/web/production/_virtual/cloneDeep3.js +1 -1
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +45 -21
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js +4 -2
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/ReticleIcon/ReticleIcon.js +42 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +3 -2
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/index.js +1 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
- package/build/lib/web/production/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
- package/build/types/components/index.d.ts +10 -2
- package/build/types/components/index.native.d.ts +3 -1
- package/package.json +1 -1
package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js
CHANGED
|
@@ -2,12 +2,12 @@ import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelper
|
|
|
2
2
|
import { __exports as matchesProperty$1 } from '../../../../../_virtual/matchesProperty2.js';
|
|
3
3
|
import '../../../../../_virtual/isMatch.js';
|
|
4
4
|
import '../../../../../_virtual/toKey.js';
|
|
5
|
-
import '../../../../../_virtual/
|
|
5
|
+
import '../../../../../_virtual/cloneDeep.js';
|
|
6
6
|
import '../../../../../_virtual/get.js';
|
|
7
7
|
import '../../../../../_virtual/has.js';
|
|
8
8
|
import { __exports as isMatch } from '../../../../../_virtual/isMatch2.js';
|
|
9
9
|
import { __exports as toKey } from '../../../../../_virtual/toKey2.js';
|
|
10
|
-
import { __exports as cloneDeep } from '../../../../../_virtual/
|
|
10
|
+
import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep2.js';
|
|
11
11
|
import { __exports as get } from '../../../../../_virtual/get2.js';
|
|
12
12
|
import { __exports as has } from '../../../../../_virtual/has2.js';
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
|
|
2
|
-
import { __exports as cloneDeep$1 } from '../../../../_virtual/
|
|
2
|
+
import { __exports as cloneDeep$1 } from '../../../../_virtual/cloneDeep4.js';
|
|
3
3
|
import '../../../../_virtual/cloneDeepWith3.js';
|
|
4
4
|
import { __exports as cloneDeepWith } from '../../../../_virtual/cloneDeepWith4.js';
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../node_modules/es-toolkit/dist/
|
|
1
|
+
import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
|
|
2
2
|
//# sourceMappingURL=cloneDeep.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
|
|
1
|
+
import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
|
|
2
2
|
//# sourceMappingURL=cloneDeep3.js.map
|
|
@@ -28,7 +28,8 @@ import { Divider } from '../Divider/Divider.js';
|
|
|
28
28
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
29
29
|
|
|
30
30
|
var _excluded = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"],
|
|
31
|
-
_excluded2 = ["
|
|
31
|
+
_excluded2 = ["style"],
|
|
32
|
+
_excluded3 = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"];
|
|
32
33
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
34
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
35
|
var _ActionListBox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
@@ -152,11 +153,33 @@ var useFilteredItems = function useFilteredItems(children) {
|
|
|
152
153
|
itemCount: items.length
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Custom outer element for VirtualizedList that enables scrolling inside BottomSheet.
|
|
159
|
+
* - data-allow-scroll: tells BottomSheet's useDrag to not capture touch events on this element
|
|
160
|
+
* - data-body-scroll-lock-ignore: allows this element to scroll even when body scroll is locked
|
|
161
|
+
* - touchAction: 'pan-y' enables vertical touch scrolling (overrides parent's 'none')
|
|
162
|
+
* - overscrollBehavior: 'contain' prevents scroll chaining to parent elements
|
|
163
|
+
*/
|
|
164
|
+
var BottomSheetCompatibleOuterElement = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
165
|
+
var style = _ref4.style,
|
|
166
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
167
|
+
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
168
|
+
ref: ref
|
|
169
|
+
}, props), {}, {
|
|
170
|
+
"data-allow-scroll": "true",
|
|
171
|
+
"data-body-scroll-lock-ignore": "true",
|
|
172
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
173
|
+
touchAction: 'pan-y',
|
|
174
|
+
overscrollBehavior: 'contain'
|
|
175
|
+
})
|
|
176
|
+
}));
|
|
177
|
+
});
|
|
178
|
+
var VirtualListItem = /*#__PURE__*/React__default.memo(function (_ref5) {
|
|
179
|
+
var index = _ref5.index,
|
|
180
|
+
style = _ref5.style,
|
|
181
|
+
data = _ref5.data,
|
|
182
|
+
onVirtualizedFocus = _ref5.onVirtualizedFocus;
|
|
160
183
|
var currentItem = data[index];
|
|
161
184
|
if (/*#__PURE__*/React__default.isValidElement(currentItem) && getComponentId(currentItem) === componentIds.ActionListItem) {
|
|
162
185
|
// Clone the element passed via `data` and add the `_virtualizedIndex` prop
|
|
@@ -177,11 +200,11 @@ var VirtualListItem = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
177
200
|
// Custom comparison function to determine if component should update
|
|
178
201
|
return prevProps.index === nextProps.index && prevProps.style === nextProps.style && prevProps.data[prevProps.index] === nextProps.data[nextProps.index];
|
|
179
202
|
});
|
|
180
|
-
var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (
|
|
181
|
-
var childrenWithId =
|
|
182
|
-
actionListItemWrapperRole =
|
|
183
|
-
isMultiSelectable =
|
|
184
|
-
rest = _objectWithoutProperties(
|
|
203
|
+
var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
204
|
+
var childrenWithId = _ref6.childrenWithId,
|
|
205
|
+
actionListItemWrapperRole = _ref6.actionListItemWrapperRole,
|
|
206
|
+
isMultiSelectable = _ref6.isMultiSelectable,
|
|
207
|
+
rest = _objectWithoutProperties(_ref6, _excluded3);
|
|
185
208
|
var virtualizedListRef = React__default.useRef(null);
|
|
186
209
|
var _React$useState = React__default.useState(0),
|
|
187
210
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -240,23 +263,24 @@ var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function
|
|
|
240
263
|
itemCount: itemCount,
|
|
241
264
|
itemData: itemData,
|
|
242
265
|
itemKey: function itemKey(index) {
|
|
243
|
-
var
|
|
266
|
+
var _ref7, _itemData$index$props, _itemData$index2, _itemData$index3, _itemData$index4;
|
|
244
267
|
return (// @ts-expect-error: props does exist
|
|
245
|
-
(
|
|
246
|
-
(_itemData$index3 = itemData[index]) === null || _itemData$index3 === void 0 ? void 0 : _itemData$index3.props.title) !== null &&
|
|
268
|
+
(_ref7 = (_itemData$index$props = (_itemData$index2 = itemData[index]) === null || _itemData$index2 === void 0 ? void 0 : _itemData$index2.props.value) !== null && _itemData$index$props !== void 0 ? _itemData$index$props : // @ts-expect-error: props does exist
|
|
269
|
+
(_itemData$index3 = itemData[index]) === null || _itemData$index3 === void 0 ? void 0 : _itemData$index3.props.title) !== null && _ref7 !== void 0 ? _ref7 : // @ts-expect-error: props does exist
|
|
247
270
|
(_itemData$index4 = itemData[index]) === null || _itemData$index4 === void 0 ? void 0 : _itemData$index4.props.key
|
|
248
271
|
);
|
|
249
272
|
},
|
|
250
|
-
onItemsRendered: function onItemsRendered(
|
|
251
|
-
var visibleStartIndex =
|
|
252
|
-
visibleStopIndex =
|
|
273
|
+
onItemsRendered: function onItemsRendered(_ref8) {
|
|
274
|
+
var visibleStartIndex = _ref8.visibleStartIndex,
|
|
275
|
+
visibleStopIndex = _ref8.visibleStopIndex;
|
|
253
276
|
setVisibleStartIndex(visibleStartIndex);
|
|
254
277
|
setVisibleStopIndex(visibleStopIndex);
|
|
255
278
|
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
279
|
+
outerElementType: isInBottomSheet ? BottomSheetCompatibleOuterElement : undefined,
|
|
280
|
+
children: useCallback(function (_ref9) {
|
|
281
|
+
var index = _ref9.index,
|
|
282
|
+
style = _ref9.style,
|
|
283
|
+
data = _ref9.data;
|
|
260
284
|
return /*#__PURE__*/jsx(VirtualListItem, {
|
|
261
285
|
index: index,
|
|
262
286
|
style: style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React, { useCallback } from 'react';\nimport type { VariableSizeList } from 'react-window';\nimport { VariableSizeList as VirtualizedList } from 'react-window';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { actionListMaxHeight, getActionListPadding } from './styles/getBaseListBoxWrapperStyles';\nimport { componentIds } from './componentIds';\nimport { ActionListSectionTitle } from './ActionListItem';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport {\n actionListSectionTitleHeight,\n actionListDividerHeight,\n getActionListItemHeight,\n} from '~components/BaseMenu/BaseMenuItem/tokens';\nimport { useTheme } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { Divider } from '~components/Divider';\nimport type { ActionListItemProps } from '~components/ActionList';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n} & DataAnalyticsAttribute;\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(React.memo(_ActionListBox), {\n displayName: 'ActionListBox',\n});\n\n/**\n * get the height of the item based on the componentId\n */\nconst getItemHeight = ({\n index,\n itemData,\n actionListItemHeight,\n}: {\n index: number;\n itemData: React.ReactNode[];\n actionListItemHeight: number;\n}): number => {\n if (getComponentId(itemData[index]) === componentIds.ActionListItem) {\n return actionListItemHeight;\n }\n\n if (getComponentId(itemData[index]) === componentIds.ActionListSectionTitle) {\n return actionListSectionTitleHeight;\n }\n // @ts-expect-error: key does exist\n if (itemData[index]?.key.includes('divider')) {\n return actionListDividerHeight;\n }\n return 0;\n};\n\n/**\n * Returns the height of item and height of container based on theme and device\n */\nconst getVirtualItemParams = ({\n theme,\n isMobile,\n itemCount,\n itemData,\n}: {\n theme: Theme;\n isMobile: boolean;\n itemCount: number;\n itemData: React.ReactNode[];\n}): {\n actionListItemHeight: number;\n actionListBoxHeight: number;\n} => {\n const itemHeightResponsive = getActionListItemHeight(theme);\n const actionListItemVerticalMargin = theme.spacing[1] * 2;\n const actionListPadding = getActionListPadding(theme);\n const actionListItemHeight =\n (isMobile ? itemHeightResponsive.itemHeightMobile : itemHeightResponsive.itemHeightDesktop) +\n actionListItemVerticalMargin;\n const shouldCalculateMinimumHeight = itemCount <= 10;\n const actionListBoxHeight = actionListMaxHeight - actionListPadding * 2;\n const actionListBoxMinHeight = shouldCalculateMinimumHeight\n ? itemData.reduce<number>((acc, _, index) => {\n const itemHeight = getItemHeight({ index, itemData, actionListItemHeight });\n return acc + itemHeight;\n }, 0)\n : actionListBoxHeight;\n const finalActionListBoxHeight = Math.min(actionListBoxHeight, actionListBoxMinHeight);\n\n return {\n actionListItemHeight,\n actionListBoxHeight: finalActionListBoxHeight,\n };\n};\n\n/**\n * Takes the children (ActionListItem) and returns the filtered items based on `filteredValues` state\n */\nconst useFilteredItems = (\n children: React.ReactNode[],\n): {\n itemData: React.ReactNode[];\n itemCount: number;\n} => {\n const childrenArray = React.Children.toArray(children); // Convert children to an array\n\n const { filteredValues, hasAutoCompleteInHeader, dropdownTriggerer } = useDropdown();\n\n const items = React.useMemo(() => {\n const hasAutoComplete =\n hasAutoCompleteInHeader || dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n if (!hasAutoComplete) {\n return childrenArray;\n }\n\n const filteredItems = childrenArray.reduce<React.ReactNode[]>((acc, item, index) => {\n if (getComponentId(item) === componentIds.ActionListSection) {\n const sectionTitle = (\n <ActionListSectionTitle\n key={index}\n // @ts-expect-error: props does exist\n title={item?.props.title}\n isInsideVirtualizedList\n />\n );\n // @ts-expect-error: props does exist\n const sectionChildren = item?.props.children;\n\n const divider =\n index !== childrenArray.length - 1 ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" key={`divider-${index}`} />\n ) : null;\n const filteredSectionChildren = sectionChildren.filter(\n (item: { props: { value: string } }) => filteredValues.includes(item.props.value),\n );\n if (filteredSectionChildren.length !== 0) {\n acc.push(sectionTitle, ...filteredSectionChildren, divider);\n }\n } else {\n // @ts-expect-error: props does exist\n const value = item?.props.value;\n if (filteredValues.includes(value)) {\n acc.push(item);\n }\n }\n return acc;\n }, []);\n\n return filteredItems;\n }, [filteredValues, hasAutoCompleteInHeader, dropdownTriggerer, childrenArray]);\n\n return {\n itemData: items,\n itemCount: items.length,\n };\n};\n\nconst VirtualListItem = React.memo(\n ({\n index,\n style,\n data,\n onVirtualizedFocus,\n }: {\n index: number;\n style: React.CSSProperties;\n data: React.ReactNode[];\n onVirtualizedFocus: (index: number) => void;\n }): React.ReactElement | null => {\n const currentItem = data[index];\n\n if (\n React.isValidElement(currentItem) &&\n getComponentId(currentItem) === componentIds.ActionListItem\n ) {\n // Clone the element passed via `data` and add the `_virtualizedIndex` prop\n const elementWithIndex = React.cloneElement(\n currentItem as React.ReactElement<ActionListItemProps>,\n {\n _virtualizedIndex: index,\n _onVirtualizedFocus: onVirtualizedFocus,\n },\n );\n\n return <div style={style}>{elementWithIndex}</div>;\n }\n\n return <div style={style}>{data[index]}</div>;\n },\n (prevProps, nextProps) => {\n // Custom comparison function to determine if component should update\n return (\n prevProps.index === nextProps.index &&\n prevProps.style === nextProps.style &&\n prevProps.data[prevProps.index] === nextProps.data[nextProps.index]\n );\n },\n);\n\nconst _ActionListVirtualizedBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const virtualizedListRef = React.useRef<VariableSizeList>(null);\n const [visibleStartIndex, setVisibleStartIndex] = React.useState(0);\n const [visibleStopIndex, setVisibleStopIndex] = React.useState(0);\n const items = React.Children.toArray(childrenWithId); // Convert children to an array\n const { isInBottomSheet } = useBottomSheetContext();\n const { itemData, itemCount } = useFilteredItems(items);\n\n const isMobile = useIsMobile();\n const { theme } = useTheme();\n const { actionListItemHeight, actionListBoxHeight } = React.useMemo(\n () => getVirtualItemParams({ theme, isMobile, itemCount, itemData }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [theme.name, isMobile, itemCount, itemData],\n );\n React.useEffect(() => {\n virtualizedListRef?.current?.resetAfterIndex(0);\n virtualizedListRef?.current?.scrollToItem(0);\n }, [itemCount]);\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n // in case of virtualized list, we only render visible items. so css will hide divider for every last item visible. instead of hiding the last divider of the list.\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n <VirtualizedList<React.ReactNode[]>\n ref={virtualizedListRef}\n height={actionListBoxHeight}\n width=\"100%\"\n itemSize={(index) => getItemHeight({ index, itemData, actionListItemHeight })}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={(index) =>\n // @ts-expect-error: props does exist\n itemData[index]?.props.value ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.title ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.key\n }\n onItemsRendered={({ visibleStartIndex, visibleStopIndex }) => {\n setVisibleStartIndex(visibleStartIndex);\n setVisibleStopIndex(visibleStopIndex);\n }}\n >\n {useCallback(\n ({ index, style, data }) => {\n return (\n <VirtualListItem\n index={index}\n style={style}\n data={data}\n onVirtualizedFocus={(index) => {\n // We need scroll Direction to determine the index to focus\n const scrollDirection =\n Math.round((visibleStartIndex + visibleStopIndex) / 2) > index\n ? 'top'\n : 'bottom';\n virtualizedListRef?.current?.resetAfterIndex(0);\n /**\n * we are scrolling to the item which is 3 items away from the current item.\n * since we can have 2 item sectoin header and divider which are not focusable.\n */\n virtualizedListRef?.current?.scrollToItem(\n index + (scrollDirection === 'top' ? -3 : 3),\n 'smart',\n );\n }}\n />\n );\n },\n [visibleStartIndex, visibleStopIndex],\n )}\n </VirtualizedList>\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListVirtualizedBox = assignWithoutSideEffects(React.memo(_ActionListVirtualizedBox), {\n displayName: 'ActionListVirtualizedBox',\n});\n\nexport { ActionListBox, ActionListVirtualizedBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","rest","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","makeAnalyticsAttribute","children","ActionListBox","assignWithoutSideEffects","memo","displayName","getItemHeight","_ref2","_itemData$index","index","itemData","actionListItemHeight","getComponentId","componentIds","ActionListItem","ActionListSectionTitle","actionListSectionTitleHeight","key","includes","actionListDividerHeight","getVirtualItemParams","_ref3","theme","isMobile","itemCount","itemHeightResponsive","getActionListItemHeight","actionListItemVerticalMargin","spacing","actionListPadding","getActionListPadding","itemHeightMobile","itemHeightDesktop","shouldCalculateMinimumHeight","actionListBoxHeight","actionListMaxHeight","actionListBoxMinHeight","reduce","acc","_","itemHeight","finalActionListBoxHeight","Math","min","useFilteredItems","childrenArray","Children","toArray","_useDropdown","useDropdown","filteredValues","hasAutoCompleteInHeader","dropdownTriggerer","items","useMemo","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","filteredItems","item","ActionListSection","sectionTitle","title","props","isInsideVirtualizedList","sectionChildren","divider","length","Divider","marginX","marginY","concat","filteredSectionChildren","filter","value","push","apply","_toConsumableArray","VirtualListItem","_ref4","style","data","onVirtualizedFocus","currentItem","isValidElement","elementWithIndex","cloneElement","_virtualizedIndex","_onVirtualizedFocus","prevProps","nextProps","_ActionListVirtualizedBox","_ref5","_excluded2","virtualizedListRef","useRef","_React$useState","useState","_React$useState2","_slicedToArray","visibleStartIndex","setVisibleStartIndex","_React$useState3","_React$useState4","visibleStopIndex","setVisibleStopIndex","_useBottomSheetContex2","_useFilteredItems","useIsMobile","_useTheme","useTheme","_React$useMemo","name","useEffect","_virtualizedListRef$c","_virtualizedListRef$c2","current","resetAfterIndex","scrollToItem","VirtualizedList","height","width","itemSize","itemKey","_ref6","_itemData$index$props","_itemData$index2","_itemData$index3","_itemData$index4","onItemsRendered","_ref7","useCallback","_ref8","_virtualizedListRef$c3","_virtualizedListRef$c4","scrollDirection","round","ActionListVirtualizedBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAM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C,EACD,CAACnC,iBAAiB,EAAEI,gBAAgB,CACtC,CAAA;KACe,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAE3B,CACF,CAAC,CAAA;AAEKiC,IAAAA,wBAAwB,gBAAGvI,wBAAwB,cAACvB,cAAK,CAACwB,IAAI,CAACwF,yBAAyB,CAAC,EAAE;AAC/FvF,EAAAA,WAAW,EAAE,0BAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React, { useCallback } from 'react';\nimport type { VariableSizeList } from 'react-window';\nimport { VariableSizeList as VirtualizedList } from 'react-window';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { actionListMaxHeight, getActionListPadding } from './styles/getBaseListBoxWrapperStyles';\nimport { componentIds } from './componentIds';\nimport { ActionListSectionTitle } from './ActionListItem';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport {\n actionListSectionTitleHeight,\n actionListDividerHeight,\n getActionListItemHeight,\n} from '~components/BaseMenu/BaseMenuItem/tokens';\nimport { useTheme } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { Divider } from '~components/Divider';\nimport type { ActionListItemProps } from '~components/ActionList';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n} & DataAnalyticsAttribute;\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(React.memo(_ActionListBox), {\n displayName: 'ActionListBox',\n});\n\n/**\n * get the height of the item based on the componentId\n */\nconst getItemHeight = ({\n index,\n itemData,\n actionListItemHeight,\n}: {\n index: number;\n itemData: React.ReactNode[];\n actionListItemHeight: number;\n}): number => {\n if (getComponentId(itemData[index]) === componentIds.ActionListItem) {\n return actionListItemHeight;\n }\n\n if (getComponentId(itemData[index]) === componentIds.ActionListSectionTitle) {\n return actionListSectionTitleHeight;\n }\n // @ts-expect-error: key does exist\n if (itemData[index]?.key.includes('divider')) {\n return actionListDividerHeight;\n }\n return 0;\n};\n\n/**\n * Returns the height of item and height of container based on theme and device\n */\nconst getVirtualItemParams = ({\n theme,\n isMobile,\n itemCount,\n itemData,\n}: {\n theme: Theme;\n isMobile: boolean;\n itemCount: number;\n itemData: React.ReactNode[];\n}): {\n actionListItemHeight: number;\n actionListBoxHeight: number;\n} => {\n const itemHeightResponsive = getActionListItemHeight(theme);\n const actionListItemVerticalMargin = theme.spacing[1] * 2;\n const actionListPadding = getActionListPadding(theme);\n const actionListItemHeight =\n (isMobile ? itemHeightResponsive.itemHeightMobile : itemHeightResponsive.itemHeightDesktop) +\n actionListItemVerticalMargin;\n const shouldCalculateMinimumHeight = itemCount <= 10;\n const actionListBoxHeight = actionListMaxHeight - actionListPadding * 2;\n const actionListBoxMinHeight = shouldCalculateMinimumHeight\n ? itemData.reduce<number>((acc, _, index) => {\n const itemHeight = getItemHeight({ index, itemData, actionListItemHeight });\n return acc + itemHeight;\n }, 0)\n : actionListBoxHeight;\n const finalActionListBoxHeight = Math.min(actionListBoxHeight, actionListBoxMinHeight);\n\n return {\n actionListItemHeight,\n actionListBoxHeight: finalActionListBoxHeight,\n };\n};\n\n/**\n * Takes the children (ActionListItem) and returns the filtered items based on `filteredValues` state\n */\nconst useFilteredItems = (\n children: React.ReactNode[],\n): {\n itemData: React.ReactNode[];\n itemCount: number;\n} => {\n const childrenArray = React.Children.toArray(children); // Convert children to an array\n\n const { filteredValues, hasAutoCompleteInHeader, dropdownTriggerer } = useDropdown();\n\n const items = React.useMemo(() => {\n const hasAutoComplete =\n hasAutoCompleteInHeader || dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n if (!hasAutoComplete) {\n return childrenArray;\n }\n\n const filteredItems = childrenArray.reduce<React.ReactNode[]>((acc, item, index) => {\n if (getComponentId(item) === componentIds.ActionListSection) {\n const sectionTitle = (\n <ActionListSectionTitle\n key={index}\n // @ts-expect-error: props does exist\n title={item?.props.title}\n isInsideVirtualizedList\n />\n );\n // @ts-expect-error: props does exist\n const sectionChildren = item?.props.children;\n\n const divider =\n index !== childrenArray.length - 1 ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" key={`divider-${index}`} />\n ) : null;\n const filteredSectionChildren = sectionChildren.filter(\n (item: { props: { value: string } }) => filteredValues.includes(item.props.value),\n );\n if (filteredSectionChildren.length !== 0) {\n acc.push(sectionTitle, ...filteredSectionChildren, divider);\n }\n } else {\n // @ts-expect-error: props does exist\n const value = item?.props.value;\n if (filteredValues.includes(value)) {\n acc.push(item);\n }\n }\n return acc;\n }, []);\n\n return filteredItems;\n }, [filteredValues, hasAutoCompleteInHeader, dropdownTriggerer, childrenArray]);\n\n return {\n itemData: items,\n itemCount: items.length,\n };\n};\n\n/**\n * Custom outer element for VirtualizedList that enables scrolling inside BottomSheet.\n * - data-allow-scroll: tells BottomSheet's useDrag to not capture touch events on this element\n * - data-body-scroll-lock-ignore: allows this element to scroll even when body scroll is locked\n * - touchAction: 'pan-y' enables vertical touch scrolling (overrides parent's 'none')\n * - overscrollBehavior: 'contain' prevents scroll chaining to parent elements\n */\nconst BottomSheetCompatibleOuterElement = React.forwardRef<\n HTMLDivElement,\n React.HTMLProps<HTMLDivElement>\n>(({ style, ...props }, ref) => (\n <div\n ref={ref}\n {...props}\n data-allow-scroll=\"true\"\n data-body-scroll-lock-ignore=\"true\"\n style={{\n ...style,\n touchAction: 'pan-y',\n overscrollBehavior: 'contain',\n }}\n />\n));\n\nconst VirtualListItem = React.memo(\n ({\n index,\n style,\n data,\n onVirtualizedFocus,\n }: {\n index: number;\n style: React.CSSProperties;\n data: React.ReactNode[];\n onVirtualizedFocus: (index: number) => void;\n }): React.ReactElement | null => {\n const currentItem = data[index];\n\n if (\n React.isValidElement(currentItem) &&\n getComponentId(currentItem) === componentIds.ActionListItem\n ) {\n // Clone the element passed via `data` and add the `_virtualizedIndex` prop\n const elementWithIndex = React.cloneElement(\n currentItem as React.ReactElement<ActionListItemProps>,\n {\n _virtualizedIndex: index,\n _onVirtualizedFocus: onVirtualizedFocus,\n },\n );\n\n return <div style={style}>{elementWithIndex}</div>;\n }\n\n return <div style={style}>{data[index]}</div>;\n },\n (prevProps, nextProps) => {\n // Custom comparison function to determine if component should update\n return (\n prevProps.index === nextProps.index &&\n prevProps.style === nextProps.style &&\n prevProps.data[prevProps.index] === nextProps.data[nextProps.index]\n );\n },\n);\n\nconst _ActionListVirtualizedBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const virtualizedListRef = React.useRef<VariableSizeList>(null);\n const [visibleStartIndex, setVisibleStartIndex] = React.useState(0);\n const [visibleStopIndex, setVisibleStopIndex] = React.useState(0);\n const items = React.Children.toArray(childrenWithId); // Convert children to an array\n const { isInBottomSheet } = useBottomSheetContext();\n const { itemData, itemCount } = useFilteredItems(items);\n\n const isMobile = useIsMobile();\n const { theme } = useTheme();\n const { actionListItemHeight, actionListBoxHeight } = React.useMemo(\n () => getVirtualItemParams({ theme, isMobile, itemCount, itemData }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [theme.name, isMobile, itemCount, itemData],\n );\n React.useEffect(() => {\n virtualizedListRef?.current?.resetAfterIndex(0);\n virtualizedListRef?.current?.scrollToItem(0);\n }, [itemCount]);\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n // in case of virtualized list, we only render visible items. so css will hide divider for every last item visible. instead of hiding the last divider of the list.\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n <VirtualizedList<React.ReactNode[]>\n ref={virtualizedListRef}\n height={actionListBoxHeight}\n width=\"100%\"\n itemSize={(index) => getItemHeight({ index, itemData, actionListItemHeight })}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={(index) =>\n // @ts-expect-error: props does exist\n itemData[index]?.props.value ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.title ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.key\n }\n onItemsRendered={({ visibleStartIndex, visibleStopIndex }) => {\n setVisibleStartIndex(visibleStartIndex);\n setVisibleStopIndex(visibleStopIndex);\n }}\n outerElementType={isInBottomSheet ? BottomSheetCompatibleOuterElement : undefined}\n >\n {useCallback(\n ({ index, style, data }) => {\n return (\n <VirtualListItem\n index={index}\n style={style}\n data={data}\n onVirtualizedFocus={(index) => {\n // We need scroll Direction to determine the index to focus\n const scrollDirection =\n Math.round((visibleStartIndex + visibleStopIndex) / 2) > index\n ? 'top'\n : 'bottom';\n virtualizedListRef?.current?.resetAfterIndex(0);\n /**\n * we are scrolling to the item which is 3 items away from the current item.\n * since we can have 2 item sectoin header and divider which are not focusable.\n */\n virtualizedListRef?.current?.scrollToItem(\n index + (scrollDirection === 'top' ? -3 : 3),\n 'smart',\n );\n }}\n />\n );\n },\n [visibleStartIndex, visibleStopIndex],\n )}\n </VirtualizedList>\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListVirtualizedBox = assignWithoutSideEffects(React.memo(_ActionListVirtualizedBox), {\n displayName: 'ActionListVirtualizedBox',\n});\n\nexport { ActionListBox, ActionListVirtualizedBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","rest","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","makeAnalyticsAttribute","children","ActionListBox","assignWithoutSideEffects","memo","displayName","getItemHeight","_ref2","_itemData$index","index","itemData","actionListItemHeight","getComponentId","componentIds","ActionListItem","ActionListSectionTitle","actionListSectionTitleHeight","key","includes","actionListDividerHeight","getVirtualItemParams","_ref3","theme","isMobile","itemCount","itemHeightResponsive","getActionListItemHeight","actionListItemVerticalMargin","spacing","actionListPadding","getActionListPadding","itemHeightMobile","itemHeightDesktop","shouldCalculateMinimumHeight","actionListBoxHeight","actionListMaxHeight","actionListBoxMinHeight","reduce","acc","_","itemHeight","finalActionListBoxHeight","Math","min","useFilteredItems","childrenArray","Children","toArray","_useDropdown","useDropdown","filteredValues","hasAutoCompleteInHeader","dropdownTriggerer","items","useMemo","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","filteredItems","item","ActionListSection","sectionTitle","title","props","isInsideVirtualizedList","sectionChildren","divider","length","Divider","marginX","marginY","concat","filteredSectionChildren","filter","value","push","apply","_toConsumableArray","BottomSheetCompatibleOuterElement","_ref4","style","_excluded2","touchAction","overscrollBehavior","VirtualListItem","_ref5","data","onVirtualizedFocus","currentItem","isValidElement","elementWithIndex","cloneElement","_virtualizedIndex","_onVirtualizedFocus","prevProps","nextProps","_ActionListVirtualizedBox","_ref6","_excluded3","virtualizedListRef","useRef","_React$useState","useState","_React$useState2","_slicedToArray","visibleStartIndex","setVisibleStartIndex","_React$useState3","_React$useState4","visibleStopIndex","setVisibleStopIndex","_useBottomSheetContex2","_useFilteredItems","useIsMobile","_useTheme","useTheme","_React$useMemo","name","useEffect","_virtualizedListRef$c","_virtualizedListRef$c2","current","resetAfterIndex","scrollToItem","VirtualizedList","height","width","itemSize","itemKey","_ref7","_itemData$index$props","_itemData$index2","_itemData$index3","_itemData$index4","onItemsRendered","_ref8","outerElementType","useCallback","_ref9","_virtualizedListRef$c3","_virtualizedListRef$c4","scrollDirection","round","ActionListVirtualizedBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,UAAU,CACrC,UAAAC,IAAA,EAA4EC,GAAG,EAAK;AAAA,EAAA,IAAjFC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,yBAAyB,GAAAH,IAAA,CAAzBG,yBAAyB;IAAEC,iBAAiB,GAAAJ,IAAA,CAAjBI,iBAAiB;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AACtE,EAAA,IAAAC,qBAAA,GAA4BC,qBAAqB,EAAE;IAA3CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe,CAAA;EAEvB,oBACEC,GAAA,CAACC,oBAAoB,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACnBH,IAAAA,eAAe,EAAEA,eAAgB;AACjCT,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EACLa,cAAc,CAAC;AACjBC,IAAAA,IAAI,EAAEZ,yBAAyB;AAC/Ba,IAAAA,eAAe,EAAEb,yBAAyB,KAAK,SAAS,GAAGC,iBAAiB,GAAGa,SAAAA;AACjF,GAAC,CAAC,CAAA,EACEC,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OACF,CAAC,CAAA;AACH,WAAA;AAAE,SACH,CAAC,CAAA;AAEN,OAAC,EACD,CAACpC,iBAAiB,EAAEI,gBAAgB,CACtC,CAAA;KACe,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAE3B,CACF,CAAC,CAAA;AAEKkC,IAAAA,wBAAwB,gBAAG7I,wBAAwB,cAACvB,cAAK,CAACwB,IAAI,CAAC6F,yBAAyB,CAAC,EAAE;AAC/F5F,EAAAA,WAAW,EAAE,0BAAA;AACf,CAAC;;;;"}
|
|
@@ -31,7 +31,7 @@ import { Text } from '../Typography/Text/Text.js';
|
|
|
31
31
|
import ChevronUpDownIcon from '../Icons/ChevronUpDownIcon/ChevronUpDownIcon.js';
|
|
32
32
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
33
33
|
|
|
34
|
-
var _excluded = ["onClick", "onBlur", "onKeyDown", "accessibilityLabel", "_isInsideSearchInput", "isDisabled", "onChange", "name", "testID", "value", "defaultValue", "icon", "leading", "size"];
|
|
34
|
+
var _excluded = ["onClick", "onBlur", "onKeyDown", "accessibilityLabel", "_isInsideSearchInput", "isDisabled", "onChange", "name", "testID", "value", "defaultValue", "icon", "leading", "showDisplayValue", "size"];
|
|
35
35
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
36
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
37
|
var StyledSearchTrailingDropdown = /*#__PURE__*/styled.button.withConfig({
|
|
@@ -89,6 +89,8 @@ var _InputDropdownButton = function _InputDropdownButton(_ref2) {
|
|
|
89
89
|
defaultValue = _ref2.defaultValue,
|
|
90
90
|
Icon = _ref2.icon,
|
|
91
91
|
leading = _ref2.leading,
|
|
92
|
+
_ref2$showDisplayValu = _ref2.showDisplayValue,
|
|
93
|
+
showDisplayValue = _ref2$showDisplayValu === void 0 ? true : _ref2$showDisplayValu,
|
|
92
94
|
_ref2$size = _ref2.size,
|
|
93
95
|
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
94
96
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
@@ -174,7 +176,7 @@ var _InputDropdownButton = function _InputDropdownButton(_ref2) {
|
|
|
174
176
|
}), leading, Icon && /*#__PURE__*/jsx(Icon, {
|
|
175
177
|
size: "medium",
|
|
176
178
|
color: isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'
|
|
177
|
-
}), /*#__PURE__*/jsx(Text, {
|
|
179
|
+
}), showDisplayValue && /*#__PURE__*/jsx(Text, {
|
|
178
180
|
variant: "body",
|
|
179
181
|
size: "medium",
|
|
180
182
|
weight: "regular",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputDropdownButton.web.js","sources":["../../../../../../src/components/Dropdown/InputDropdownButton.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { makeSpace } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport { spacing } from '~tokens/global';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { ChevronUpDownIcon } from '~components/Icons';\nimport { Box } from '~components/Box';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { Text } from '~components/Typography';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport { useId } from '~utils/useId';\nimport type { IconComponent } from '~components/Icons';\nimport { useControlledDropdownInput } from '~utils/useControlledDropdownInput';\nimport {\n inputDropdownButtonBorderRadius,\n baseInputHeight,\n inputDropdownButtonPadding,\n} from '~components/Input/BaseInput/baseInputTokens';\nimport type { BaseInputProps } from '~components/Input/BaseInput/BaseInput';\n\ntype BaseInputDropDownButtonProps = {\n /**\n * isOpen is used to control the open state of the dropdown\n */\n isOpen?: boolean;\n /**\n * onBlur is the callback function that is called when the dropdown is blurred\n */\n onBlur?: BaseButtonProps['onBlur'];\n /**\n * onKeyDown is the callback function that is called when the dropdown is keyed down\n */\n onKeyDown?: BaseButtonProps['onKeyDown'];\n /**\n * onClick is the callback function that is called when the dropdown is clicked\n */\n onClick?: BaseButtonProps['onClick'];\n /**\n * accessibilityLabel is the label of the dropdown\n */\n accessibilityLabel?: string;\n /**\n * @private\n */\n _isInsideSearchInput?: boolean;\n /**\n * isDisabled is the disabled state of the dropdown\n */\n isDisabled?: boolean;\n /**\n * onChange is the callback function that is called when the dropdown is changed\n */\n onChange?: (props: { name: string; value: string }) => void;\n /**\n * name is the name of the dropdown\n */\n name?: string;\n /**\n * testID is the testID of the dropdown\n */\n testID?: string;\n /**\n * icon is the icon of the dropdown\n */\n icon?: IconComponent;\n /**\n * leading is a custom leading element (e.g., flag image)\n */\n leading?: React.ReactNode;\n /**\n * size is the size of the dropdown button (inherited from parent input)\n * @default 'medium'\n */\n size?: NonNullable<BaseInputProps['size']>;\n} & DataAnalyticsAttribute;\n\ntype ControlledInputDropDownButtonProps = BaseInputDropDownButtonProps & {\n /**\n * value is the value of the dropdown\n */\n value: string;\n defaultValue?: never;\n};\n\ntype UncontrolledInputDropDownButtonProps = BaseInputDropDownButtonProps & {\n value?: never;\n /**\n * defaultValue is the default selected value of the dropdown\n */\n defaultValue: string;\n};\n\ntype InputDropDownButtonProps =\n | ControlledInputDropDownButtonProps\n | UncontrolledInputDropDownButtonProps;\n\nconst StyledSearchTrailingDropdown = styled.button<{\n $isSelected?: boolean;\n isDisabled?: boolean;\n $size: NonNullable<BaseInputProps['size']>;\n}>(({ theme, isDisabled, $size }) => {\n // The wrapper BaseBox in BaseInputVisuals already applies paddingY\n // So we need to subtract that from the baseInputHeight to get the correct button height\n const paddingValue = inputDropdownButtonPadding[$size];\n const wrapperVerticalPadding = spacing[paddingValue] * 2; // top + bottom padding from wrapper\n const buttonHeight = baseInputHeight[$size] - wrapperVerticalPadding;\n\n return {\n backgroundColor: theme.colors.transparent,\n gap: makeSpace(theme.spacing[2]),\n display: 'flex',\n boxSizing: 'border-box',\n height: makeSpace(buttonHeight),\n padding: makeSpace(theme.spacing[2]),\n alignItems: 'center',\n border: 'none',\n cursor: isDisabled ? 'not-allowed' : 'pointer',\n '&[disabled]': {\n cursor: 'not-allowed',\n pointerEvents: 'none',\n },\n '&:focus': {\n ...getFocusRingStyles({ theme }),\n backgroundColor: theme.colors.interactive.background.gray.faded,\n },\n '&:hover': {\n backgroundColor: theme.colors.interactive.background.gray.faded,\n },\n '&:focus-visible': {\n outlineOffset: makeSpace(theme.spacing[0]),\n },\n borderRadius: inputDropdownButtonBorderRadius[$size],\n };\n});\n\nconst _InputDropdownButton = ({\n onClick,\n onBlur,\n onKeyDown,\n accessibilityLabel,\n _isInsideSearchInput = false,\n isDisabled,\n onChange,\n name,\n testID,\n value,\n defaultValue,\n icon: Icon,\n leading,\n size = 'medium',\n ...rest\n}: InputDropDownButtonProps): React.ReactElement | null => {\n const idBase = useId('input-drop-down-button');\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n displayValue,\n } = useDropdown();\n\n useControlledDropdownInput({\n onChange: ({ name, values }) => {\n onChange?.({\n name: name || idBase,\n value: values[0],\n });\n },\n name,\n value,\n defaultValue,\n triggererRef,\n isSelectInput: false,\n });\n\n if (!displayValue) {\n return null;\n }\n\n return (\n <StyledSearchTrailingDropdown\n type=\"button\"\n $size={size}\n onClick={(e) => {\n if (isDisabled) return;\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n onClick?.(e as any);\n // Since this dropdown is inside another dropdown we should stop event stopPropagation.\n e?.stopPropagation();\n }}\n onBlur={(e) => {\n if (isDisabled) return;\n // With button trigger, there is no \"value\" as such. It's just clickable items\n // Setting it for web fails it on native typecheck and vice versa\n onBlur?.(e as any);\n e?.stopPropagation();\n }}\n onKeyDown={(e) => {\n if (isDisabled) return;\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n onKeyDown?.(e as any);\n e?.stopPropagation();\n }}\n {...makeAccessible({\n label: accessibilityLabel ?? `change ${displayValue} filter`,\n hasPopup: getActionListContainerRole(hasFooterAction, 'InputDropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n })}\n ref={triggererRef}\n isDisabled={isDisabled}\n {...makeAnalyticsAttribute(rest)}\n {...metaAttribute({ name: 'InputDropdownButton', testID })}\n >\n <Box\n padding={`spacing.${inputDropdownButtonPadding[size]}`}\n display=\"flex\"\n gap=\"spacing.2\"\n alignItems=\"center\"\n >\n {_isInsideSearchInput && (\n <Text\n variant=\"body\"\n size=\"medium\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n >\n {' '}\n in\n </Text>\n )}\n {leading}\n {Icon && (\n <Icon\n size=\"medium\"\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n )}\n\n <Text\n variant=\"body\"\n size=\"medium\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {displayValue}\n </Text>\n <ChevronUpDownIcon\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n </Box>\n </StyledSearchTrailingDropdown>\n );\n};\n\nconst InputDropdownButton = assignWithoutSideEffects(_InputDropdownButton, {\n componentId: dropdownComponentIds.triggers.InputDropdownButton,\n displayName: 'InputDropDown',\n});\n\nexport { InputDropdownButton };\n"],"names":["StyledSearchTrailingDropdown","styled","button","withConfig","displayName","componentId","_ref","theme","isDisabled","$size","paddingValue","inputDropdownButtonPadding","wrapperVerticalPadding","spacing","buttonHeight","baseInputHeight","backgroundColor","colors","transparent","gap","makeSpace","display","boxSizing","height","padding","alignItems","border","cursor","pointerEvents","_objectSpread","getFocusRingStyles","interactive","background","gray","faded","outlineOffset","borderRadius","inputDropdownButtonBorderRadius","_InputDropdownButton","_ref2","onClick","onBlur","onKeyDown","accessibilityLabel","_ref2$_isInsideSearch","_isInsideSearchInput","onChange","name","testID","value","defaultValue","Icon","icon","leading","_ref2$size","size","rest","_objectWithoutProperties","_excluded","idBase","useId","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","displayValue","useControlledDropdownInput","_ref3","values","isSelectInput","_jsx","type","e","stopPropagation","event","makeAccessible","label","concat","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","ref","makeAnalyticsAttribute","metaAttribute","children","_jsxs","Box","Text","variant","weight","color","ChevronUpDownIcon","InputDropdownButton","assignWithoutSideEffects","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,sDAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAI/C,CAAA,CAAA,UAAAC,IAAA,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C,QAAAA,KAAK,EAAE1F,UAAU,GAAG,4BAA4B,GAAG,yBAAA;AAA0B,OAC9E,CACF,eAEDmE,GAAA,CAACoB,IAAI,EAAA;AACHC,QAAAA,OAAO,EAAC,MAAM;AACdzC,QAAAA,IAAI,EAAC,QAAQ;AACb0C,QAAAA,MAAM,EAAC,SAAS;AAChBC,QAAAA,KAAK,EAAE1F,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAoF,QAAAA,QAAA,EAE7EtB,YAAAA;AAAY,OACT,CAAC,eACPK,GAAA,CAACwB,iBAAiB,EAAA;AAChBD,QAAAA,KAAK,EAAE1F,UAAU,GAAG,4BAA4B,GAAG,yBAAA;AAA0B,OAC9E,CAAC,CAAA;KACC,CAAA;AAAC,GAAA,CACsB,CAAC,CAAA;AAEnC,CAAC,CAAA;AAED,IAAM4F,mBAAmB,gBAAGC,wBAAwB,CAAC/D,oBAAoB,EAAE;AACzEjC,EAAAA,WAAW,EAAEiG,oBAAoB,CAACC,QAAQ,CAACH,mBAAmB;AAC9DhG,EAAAA,WAAW,EAAE,eAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"InputDropdownButton.web.js","sources":["../../../../../../src/components/Dropdown/InputDropdownButton.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { makeSpace } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport { spacing } from '~tokens/global';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { ChevronUpDownIcon } from '~components/Icons';\nimport { Box } from '~components/Box';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { Text } from '~components/Typography';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport { useId } from '~utils/useId';\nimport type { IconComponent } from '~components/Icons';\nimport { useControlledDropdownInput } from '~utils/useControlledDropdownInput';\nimport {\n inputDropdownButtonBorderRadius,\n baseInputHeight,\n inputDropdownButtonPadding,\n} from '~components/Input/BaseInput/baseInputTokens';\nimport type { BaseInputProps } from '~components/Input/BaseInput/BaseInput';\n\ntype BaseInputDropDownButtonProps = {\n /**\n * isOpen is used to control the open state of the dropdown\n */\n isOpen?: boolean;\n /**\n * onBlur is the callback function that is called when the dropdown is blurred\n */\n onBlur?: BaseButtonProps['onBlur'];\n /**\n * onKeyDown is the callback function that is called when the dropdown is keyed down\n */\n onKeyDown?: BaseButtonProps['onKeyDown'];\n /**\n * onClick is the callback function that is called when the dropdown is clicked\n */\n onClick?: BaseButtonProps['onClick'];\n /**\n * accessibilityLabel is the label of the dropdown\n */\n accessibilityLabel?: string;\n /**\n * @private\n */\n _isInsideSearchInput?: boolean;\n /**\n * isDisabled is the disabled state of the dropdown\n */\n isDisabled?: boolean;\n /**\n * onChange is the callback function that is called when the dropdown is changed\n */\n onChange?: (props: { name: string; value: string }) => void;\n /**\n * name is the name of the dropdown\n */\n name?: string;\n /**\n * testID is the testID of the dropdown\n */\n testID?: string;\n /**\n * icon is the icon of the dropdown\n */\n icon?: IconComponent;\n /**\n * leading is a custom leading element (e.g., flag image)\n */\n leading?: React.ReactNode;\n /**\n * showDisplayValue shows the selected value text in the trigger button.\n * When false, only the leading element (e.g., a flag) is shown.\n * @default true\n */\n showDisplayValue?: boolean;\n /**\n * size is the size of the dropdown button (inherited from parent input)\n * @default 'medium'\n */\n size?: NonNullable<BaseInputProps['size']>;\n} & DataAnalyticsAttribute;\n\ntype ControlledInputDropDownButtonProps = BaseInputDropDownButtonProps & {\n /**\n * value is the value of the dropdown\n */\n value: string;\n defaultValue?: never;\n};\n\ntype UncontrolledInputDropDownButtonProps = BaseInputDropDownButtonProps & {\n value?: never;\n /**\n * defaultValue is the default selected value of the dropdown\n */\n defaultValue: string;\n};\n\ntype InputDropDownButtonProps =\n | ControlledInputDropDownButtonProps\n | UncontrolledInputDropDownButtonProps;\n\nconst StyledSearchTrailingDropdown = styled.button<{\n $isSelected?: boolean;\n isDisabled?: boolean;\n $size: NonNullable<BaseInputProps['size']>;\n}>(({ theme, isDisabled, $size }) => {\n // The wrapper BaseBox in BaseInputVisuals already applies paddingY\n // So we need to subtract that from the baseInputHeight to get the correct button height\n const paddingValue = inputDropdownButtonPadding[$size];\n const wrapperVerticalPadding = spacing[paddingValue] * 2; // top + bottom padding from wrapper\n const buttonHeight = baseInputHeight[$size] - wrapperVerticalPadding;\n\n return {\n backgroundColor: theme.colors.transparent,\n gap: makeSpace(theme.spacing[2]),\n display: 'flex',\n boxSizing: 'border-box',\n height: makeSpace(buttonHeight),\n padding: makeSpace(theme.spacing[2]),\n alignItems: 'center',\n border: 'none',\n cursor: isDisabled ? 'not-allowed' : 'pointer',\n '&[disabled]': {\n cursor: 'not-allowed',\n pointerEvents: 'none',\n },\n '&:focus': {\n ...getFocusRingStyles({ theme }),\n backgroundColor: theme.colors.interactive.background.gray.faded,\n },\n '&:hover': {\n backgroundColor: theme.colors.interactive.background.gray.faded,\n },\n '&:focus-visible': {\n outlineOffset: makeSpace(theme.spacing[0]),\n },\n borderRadius: inputDropdownButtonBorderRadius[$size],\n };\n});\n\nconst _InputDropdownButton = ({\n onClick,\n onBlur,\n onKeyDown,\n accessibilityLabel,\n _isInsideSearchInput = false,\n isDisabled,\n onChange,\n name,\n testID,\n value,\n defaultValue,\n icon: Icon,\n leading,\n showDisplayValue = true,\n size = 'medium',\n ...rest\n}: InputDropDownButtonProps): React.ReactElement | null => {\n const idBase = useId('input-drop-down-button');\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n displayValue,\n } = useDropdown();\n\n useControlledDropdownInput({\n onChange: ({ name, values }) => {\n onChange?.({\n name: name || idBase,\n value: values[0],\n });\n },\n name,\n value,\n defaultValue,\n triggererRef,\n isSelectInput: false,\n });\n\n if (!displayValue) {\n return null;\n }\n\n return (\n <StyledSearchTrailingDropdown\n type=\"button\"\n $size={size}\n onClick={(e) => {\n if (isDisabled) return;\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n onClick?.(e as any);\n // Since this dropdown is inside another dropdown we should stop event stopPropagation.\n e?.stopPropagation();\n }}\n onBlur={(e) => {\n if (isDisabled) return;\n // With button trigger, there is no \"value\" as such. It's just clickable items\n // Setting it for web fails it on native typecheck and vice versa\n onBlur?.(e as any);\n e?.stopPropagation();\n }}\n onKeyDown={(e) => {\n if (isDisabled) return;\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n onKeyDown?.(e as any);\n e?.stopPropagation();\n }}\n {...makeAccessible({\n label: accessibilityLabel ?? `change ${displayValue} filter`,\n hasPopup: getActionListContainerRole(hasFooterAction, 'InputDropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n })}\n ref={triggererRef}\n isDisabled={isDisabled}\n {...makeAnalyticsAttribute(rest)}\n {...metaAttribute({ name: 'InputDropdownButton', testID })}\n >\n <Box\n padding={`spacing.${inputDropdownButtonPadding[size]}`}\n display=\"flex\"\n gap=\"spacing.2\"\n alignItems=\"center\"\n >\n {_isInsideSearchInput && (\n <Text\n variant=\"body\"\n size=\"medium\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n >\n {' '}\n in\n </Text>\n )}\n {leading}\n {Icon && (\n <Icon\n size=\"medium\"\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n )}\n\n {showDisplayValue && (\n <Text\n variant=\"body\"\n size=\"medium\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {displayValue}\n </Text>\n )}\n <ChevronUpDownIcon\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n </Box>\n </StyledSearchTrailingDropdown>\n );\n};\n\nconst InputDropdownButton = assignWithoutSideEffects(_InputDropdownButton, {\n componentId: dropdownComponentIds.triggers.InputDropdownButton,\n displayName: 'InputDropDown',\n});\n\nexport { InputDropdownButton };\n"],"names":["StyledSearchTrailingDropdown","styled","button","withConfig","displayName","componentId","_ref","theme","isDisabled","$size","paddingValue","inputDropdownButtonPadding","wrapperVerticalPadding","spacing","buttonHeight","baseInputHeight","backgroundColor","colors","transparent","gap","makeSpace","display","boxSizing","height","padding","alignItems","border","cursor","pointerEvents","_objectSpread","getFocusRingStyles","interactive","background","gray","faded","outlineOffset","borderRadius","inputDropdownButtonBorderRadius","_InputDropdownButton","_ref2","onClick","onBlur","onKeyDown","accessibilityLabel","_ref2$_isInsideSearch","_isInsideSearchInput","onChange","name","testID","value","defaultValue","Icon","icon","leading","_ref2$showDisplayValu","showDisplayValue","_ref2$size","size","rest","_objectWithoutProperties","_excluded","idBase","useId","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","displayValue","useControlledDropdownInput","_ref3","values","isSelectInput","_jsx","type","e","stopPropagation","event","makeAccessible","label","concat","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","ref","makeAnalyticsAttribute","metaAttribute","children","_jsxs","Box","Text","variant","weight","color","ChevronUpDownIcon","InputDropdownButton","assignWithoutSideEffects","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgHA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA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AAE5F,UAAU,GAAG,4BAA4B,GAAG,yBAA0B;QAAAsF,QAAA,EAAA,CAE5E,GAAG,EAAC,IAEP,CAAA;OAAM,CACP,EACAzC,OAAO,EACPF,IAAI,iBACH0B,GAAA,CAAC1B,IAAI,EAAA;AACHM,QAAAA,IAAI,EAAC,QAAQ;AACb2C,QAAAA,KAAK,EAAE5F,UAAU,GAAG,4BAA4B,GAAG,yBAAA;AAA0B,OAC9E,CACF,EAEA+C,gBAAgB,iBACfsB,GAAA,CAACoB,IAAI,EAAA;AACHC,QAAAA,OAAO,EAAC,MAAM;AACdzC,QAAAA,IAAI,EAAC,QAAQ;AACb0C,QAAAA,MAAM,EAAC,SAAS;AAChBC,QAAAA,KAAK,EAAE5F,UAAU,GAAG,4BAA4B,GAAG,0BAA2B;AAAAsF,QAAAA,QAAA,EAE7EtB,YAAAA;AAAY,OACT,CACP,eACDK,GAAA,CAACwB,iBAAiB,EAAA;AAChBD,QAAAA,KAAK,EAAE5F,UAAU,GAAG,4BAA4B,GAAG,yBAAA;AAA0B,OAC9E,CAAC,CAAA;KACC,CAAA;AAAC,GAAA,CACsB,CAAC,CAAA;AAEnC,CAAC,CAAA;AAED,IAAM8F,mBAAmB,gBAAGC,wBAAwB,CAACjE,oBAAoB,EAAE;AACzEjC,EAAAA,WAAW,EAAEmG,oBAAoB,CAACC,QAAQ,CAACH,mBAAmB;AAC9DlG,EAAAA,WAAW,EAAE,eAAA;AACf,CAAC;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import '../_Svg/index.js';
|
|
4
|
+
import '../useIconProps/index.js';
|
|
5
|
+
import '../../../utils/assignWithoutSideEffects/index.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
import useIconProps from '../useIconProps/useIconProps.js';
|
|
8
|
+
import Svg from '../_Svg/Svg/Svg.web.js';
|
|
9
|
+
import Path from '../_Svg/Path/Path.web.js';
|
|
10
|
+
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
11
|
+
|
|
12
|
+
var _excluded = ["size", "color"];
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
var _ReticleIcon = function _ReticleIcon(_ref) {
|
|
16
|
+
var size = _ref.size,
|
|
17
|
+
color = _ref.color,
|
|
18
|
+
styledProps = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
var _useIconProps = useIconProps({
|
|
20
|
+
size: size,
|
|
21
|
+
color: color
|
|
22
|
+
}),
|
|
23
|
+
height = _useIconProps.height,
|
|
24
|
+
width = _useIconProps.width,
|
|
25
|
+
iconColor = _useIconProps.iconColor;
|
|
26
|
+
return /*#__PURE__*/jsx(Svg, _objectSpread(_objectSpread({}, styledProps), {}, {
|
|
27
|
+
width: width,
|
|
28
|
+
height: height,
|
|
29
|
+
viewBox: "0 0 24 24",
|
|
30
|
+
fill: "none",
|
|
31
|
+
children: /*#__PURE__*/jsx(Path, {
|
|
32
|
+
d: "M13.0254 23H10.9629V13.8789H13.0254V23ZM10.1211 13.0332H1V10.9707H10.1211V13.0332ZM23.001 13.0332H13.8799V10.9707H23.001V13.0332ZM13.0254 10.1211H10.9629V1H13.0254V10.1211Z",
|
|
33
|
+
fill: iconColor
|
|
34
|
+
})
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
var ReticleIcon = /*#__PURE__*/assignWithoutSideEffects(_ReticleIcon, {
|
|
38
|
+
componentId: 'ReticleIcon'
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { ReticleIcon as default };
|
|
42
|
+
//# sourceMappingURL=ReticleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReticleIcon.js","sources":["../../../../../../../src/components/Icons/ReticleIcon/ReticleIcon.tsx"],"sourcesContent":["import { Svg, Path } from '../_Svg';\nimport type { IconComponent } from '..';\nimport useIconProps from '../useIconProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _ReticleIcon: IconComponent = ({ size, color, ...styledProps }) => {\n const { height, width, iconColor } = useIconProps({ size, color });\n\n return (\n <Svg {...styledProps} width={width} height={height} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d=\"M13.0254 23H10.9629V13.8789H13.0254V23ZM10.1211 13.0332H1V10.9707H10.1211V13.0332ZM23.001 13.0332H13.8799V10.9707H23.001V13.0332ZM13.0254 10.1211H10.9629V1H13.0254V10.1211Z\"\n fill={iconColor}\n />\n </Svg>\n );\n};\n\nconst ReticleIcon = assignWithoutSideEffects(_ReticleIcon, {\n componentId: 'ReticleIcon',\n});\n\nexport default ReticleIcon;\n"],"names":["_ReticleIcon","_ref","size","color","styledProps","_objectWithoutProperties","_excluded","_useIconProps","useIconProps","height","width","iconColor","_jsx","Svg","_objectSpread","viewBox","fill","children","Path","d","ReticleIcon","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;AAKA,IAAMA,YAA2B,GAAG,SAA9BA,YAA2BA,CAAAC,IAAA,EAAwC;AAAA,EAAA,IAAlCC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;AAAKC,IAAAA,WAAW,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;EAChE,IAAAC,aAAA,GAAqCC,YAAY,CAAC;AAAEN,MAAAA,IAAI,EAAJA,IAAI;AAAEC,MAAAA,KAAK,EAALA,KAAAA;AAAM,KAAC,CAAC;IAA1DM,MAAM,GAAAF,aAAA,CAANE,MAAM;IAAEC,KAAK,GAAAH,aAAA,CAALG,KAAK;IAAEC,SAAS,GAAAJ,aAAA,CAATI,SAAS,CAAA;EAEhC,oBACEC,GAAA,CAACC,GAAG,EAAAC,aAAA,CAAAA,aAAA,KAAKV,WAAW,CAAA,EAAA,EAAA,EAAA;AAAEM,IAAAA,KAAK,EAAEA,KAAM;AAACD,IAAAA,MAAM,EAAEA,MAAO;AAACM,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,IAAI,EAAC,MAAM;IAAAC,QAAA,eACjFL,GAAA,CAACM,IAAI,EAAA;AACHC,MAAAA,CAAC,EAAC,8KAA8K;AAChLH,MAAAA,IAAI,EAAEL,SAAAA;KACP,CAAA;AAAC,GAAA,CACC,CAAC,CAAA;AAEV,CAAC,CAAA;AAED,IAAMS,WAAW,gBAAGC,wBAAwB,CAACrB,YAAY,EAAE;AACzDsB,EAAAA,WAAW,EAAE,aAAA;AACf,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -317,6 +317,7 @@ import './RefreshIcon/index.js';
|
|
|
317
317
|
import './RepeatIcon/index.js';
|
|
318
318
|
import './ReportsIcon/index.js';
|
|
319
319
|
import './ResizerIcon/index.js';
|
|
320
|
+
import './ReticleIcon/index.js';
|
|
320
321
|
import './RewindIcon/index.js';
|
|
321
322
|
import './RotateClockWiseIcon/index.js';
|
|
322
323
|
import './RotateCounterClockWiseIcon/index.js';
|