@razorpay/blade 12.110.0 → 12.111.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/AnimateInteractions/AnimateInteractions.native.js +5 -5
- package/build/lib/native/components/AnimateInteractions/AnimateInteractions.native.js.map +1 -1
- package/build/lib/native/components/AnimateInteractions/AnimateInteractionsProvider.js +6 -0
- package/build/lib/native/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/native/components/BaseMotion/BaseMotion.native.js +22 -0
- package/build/lib/native/components/BaseMotion/BaseMotion.native.js.map +1 -0
- package/build/lib/native/components/BaseMotion/baseMotionInterpreter.native.js +11 -0
- package/build/lib/native/components/BaseMotion/baseMotionInterpreter.native.js.map +1 -0
- package/build/lib/native/components/BaseMotion/baseMotionUtils.js +4 -0
- package/build/lib/native/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/native/components/BaseMotion/index.js +3 -0
- package/build/lib/native/components/BaseMotion/index.js.map +1 -0
- package/build/lib/native/components/BaseMotion/types.js +2 -0
- package/build/lib/native/components/BaseMotion/types.js.map +1 -0
- package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js +2 -1
- package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js.map +1 -1
- package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js +4 -0
- package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/native/components/Fade/Fade.native.js +7 -5
- package/build/lib/native/components/Fade/Fade.native.js.map +1 -1
- package/build/lib/native/components/FilterChip/BaseFilterChip.native.js +2 -2
- package/build/lib/native/components/FilterChip/BaseFilterChip.native.js.map +1 -1
- package/build/lib/native/components/Morph/Morph.native.js +9 -5
- package/build/lib/native/components/Morph/Morph.native.js.map +1 -1
- package/build/lib/native/components/Move/Move.native.js +8 -5
- package/build/lib/native/components/Move/Move.native.js.map +1 -1
- package/build/lib/native/components/Scale/Scale.native.js +7 -5
- package/build/lib/native/components/Scale/Scale.native.js.map +1 -1
- package/build/lib/native/components/SegmentedControl/SegmentedControl.native.js +27 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControl.native.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlContext.js +8 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlItem.native.js +18 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlItem.native.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/index.js +3 -0
- package/build/lib/native/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/segmentedControlTokens.js +4 -0
- package/build/lib/native/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/native/components/Slide/Slide.native.js +7 -5
- package/build/lib/native/components/Slide/Slide.native.js.map +1 -1
- package/build/lib/native/components/Stagger/Stagger.native.js +10 -5
- package/build/lib/native/components/Stagger/Stagger.native.js.map +1 -1
- package/build/lib/native/components/Stagger/StaggerProvider.js +6 -0
- package/build/lib/native/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/native/components/index.js +3 -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/native/utils/msToSeconds.js +4 -0
- package/build/lib/native/utils/msToSeconds.js.map +1 -0
- package/build/lib/web/development/_virtual/flatten.js +1 -1
- package/build/lib/web/development/_virtual/flatten3.js +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +2 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/{useFocusWithin.js → useFocusWithin.web.js} +1 -1
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.web.js.map +1 -0
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +8 -1
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js +4 -1
- package/build/lib/web/development/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +40 -5
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +11 -21
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js +46 -0
- package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +35 -11
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/SegmentedControl/SegmentedControl.web.js +196 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControl.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlContext.js +18 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlIndicator.web.js +109 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlIndicator.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlItem.web.js +170 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlItem.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/index.js +3 -0
- package/build/lib/web/development/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/segmentedControlTokens.js +53 -0
- package/build/lib/web/development/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -1
- package/build/lib/web/development/components/index.js +3 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/array/flatten.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +3 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +2 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/{useFocusWithin.js → useFocusWithin.web.js} +1 -1
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.web.js.map +1 -0
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +8 -1
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js +4 -1
- package/build/lib/web/production/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +40 -5
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +11 -21
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js +46 -0
- package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +35 -11
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/SegmentedControl/SegmentedControl.web.js +196 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControl.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlContext.js +18 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlIndicator.web.js +109 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlIndicator.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlItem.web.js +170 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlItem.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/index.js +3 -0
- package/build/lib/web/production/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/segmentedControlTokens.js +53 -0
- package/build/lib/web/production/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -1
- package/build/lib/web/production/components/index.js +3 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +3 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +238 -8
- package/build/types/components/index.native.d.ts +410 -14
- package/package.json +1 -1
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js.map +0 -1
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js.map +0 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { useSegmentedControlContext } from './SegmentedControlContext.js';
|
|
6
|
+
import { itemHeight, paddingY, paddingX, itemBorderRadius, iconSizeMap, textSizeMap } from './segmentedControlTokens.js';
|
|
7
|
+
import '../Typography/index.js';
|
|
8
|
+
import '../../utils/index.js';
|
|
9
|
+
import '../../utils/makeAccessible/index.js';
|
|
10
|
+
import '../../utils/metaAttribute/index.js';
|
|
11
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
12
|
+
import getIn from '../../utils/lodashButBetter/get.js';
|
|
13
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
|
+
import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
|
|
15
|
+
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
16
|
+
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
17
|
+
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
18
|
+
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
19
|
+
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
20
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
21
|
+
import { Text } from '../Typography/Text/Text.js';
|
|
22
|
+
|
|
23
|
+
var _excluded = ["children", "value", "leading", "isDisabled", "accessibilityLabel", "testID"];
|
|
24
|
+
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; }
|
|
25
|
+
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; }
|
|
26
|
+
var StyledSegmentedControlButton = /*#__PURE__*/styled.button.withConfig({
|
|
27
|
+
displayName: "SegmentedControlItemweb__StyledSegmentedControlButton",
|
|
28
|
+
componentId: "i0wihp-0"
|
|
29
|
+
})(function (_ref) {
|
|
30
|
+
var theme = _ref.theme,
|
|
31
|
+
$size = _ref.$size,
|
|
32
|
+
$isSelected = _ref.$isSelected;
|
|
33
|
+
return {
|
|
34
|
+
appearance: 'none',
|
|
35
|
+
border: 'none',
|
|
36
|
+
cursor: 'pointer',
|
|
37
|
+
display: 'inline-flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
gap: makeSpace(theme.spacing[3]),
|
|
41
|
+
flex: 1,
|
|
42
|
+
height: makeSpace(itemHeight[$size]),
|
|
43
|
+
paddingTop: makeSpace(getIn(theme, paddingY[$size])),
|
|
44
|
+
paddingBottom: makeSpace(getIn(theme, paddingY[$size])),
|
|
45
|
+
paddingLeft: makeSpace(getIn(theme, paddingX[$size])),
|
|
46
|
+
paddingRight: makeSpace(getIn(theme, paddingX[$size])),
|
|
47
|
+
backgroundColor: 'transparent',
|
|
48
|
+
borderRadius: makeSpace(theme.border.radius[itemBorderRadius[$size]]),
|
|
49
|
+
position: 'relative',
|
|
50
|
+
zIndex: 1,
|
|
51
|
+
transitionProperty: 'background-color',
|
|
52
|
+
transitionTimingFunction: castWebType(theme.motion.easing.standard),
|
|
53
|
+
transitionDuration: castWebType(makeMotionTime(theme.motion.duration.gentle)),
|
|
54
|
+
'&:hover:not(:disabled)': {
|
|
55
|
+
backgroundColor: $isSelected ? 'transparent' : theme.colors.interactive.background.gray["default"]
|
|
56
|
+
},
|
|
57
|
+
'&:focus:not(:focus-visible)': {
|
|
58
|
+
outline: 'none'
|
|
59
|
+
},
|
|
60
|
+
'&:focus-visible': {
|
|
61
|
+
outline: 'none',
|
|
62
|
+
boxShadow: "inset 0px 0px 0px 4px ".concat(theme.colors.surface.border.primary.muted)
|
|
63
|
+
},
|
|
64
|
+
'&:disabled': {
|
|
65
|
+
cursor: 'not-allowed',
|
|
66
|
+
backgroundColor: 'transparent'
|
|
67
|
+
},
|
|
68
|
+
'&:disabled:hover': {
|
|
69
|
+
backgroundColor: 'transparent'
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
var SegmentedControlItem = function SegmentedControlItem(_ref2) {
|
|
74
|
+
var children = _ref2.children,
|
|
75
|
+
value = _ref2.value,
|
|
76
|
+
Leading = _ref2.leading,
|
|
77
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
78
|
+
isItemDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
79
|
+
accessibilityLabel = _ref2.accessibilityLabel,
|
|
80
|
+
testID = _ref2.testID,
|
|
81
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
82
|
+
var _useSegmentedControlC = useSegmentedControlContext(),
|
|
83
|
+
selectedValue = _useSegmentedControlC.selectedValue,
|
|
84
|
+
setSelectedValue = _useSegmentedControlC.setSelectedValue,
|
|
85
|
+
size = _useSegmentedControlC.size,
|
|
86
|
+
isGroupDisabled = _useSegmentedControlC.isDisabled,
|
|
87
|
+
baseId = _useSegmentedControlC.baseId,
|
|
88
|
+
totalItems = _useSegmentedControlC.totalItems,
|
|
89
|
+
firstEnabledValue = _useSegmentedControlC.firstEnabledValue,
|
|
90
|
+
itemRefs = _useSegmentedControlC.itemRefs;
|
|
91
|
+
var buttonRef = React__default.useRef(null);
|
|
92
|
+
var isSelected = selectedValue === value;
|
|
93
|
+
var isDisabled = isGroupDisabled || isItemDisabled;
|
|
94
|
+
var shouldReceiveFocus = !isDisabled && isSelected || selectedValue === undefined && !isDisabled && value === firstEnabledValue;
|
|
95
|
+
React__default.useEffect(function () {
|
|
96
|
+
if (!itemRefs) return undefined;
|
|
97
|
+
var map = itemRefs.current;
|
|
98
|
+
var node = buttonRef.current;
|
|
99
|
+
if (node) map.set(value, node);
|
|
100
|
+
return function () {
|
|
101
|
+
map["delete"](value);
|
|
102
|
+
};
|
|
103
|
+
}, [value, itemRefs]);
|
|
104
|
+
var handleKeyDown = React__default.useCallback(function (e) {
|
|
105
|
+
var _buttonRef$current;
|
|
106
|
+
var container = (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.closest('[role="radiogroup"]');
|
|
107
|
+
if (!container) return;
|
|
108
|
+
var buttons = Array.from(container.querySelectorAll('[role="radio"]:not(:disabled)'));
|
|
109
|
+
var currentIndex = buttons.indexOf(buttonRef.current);
|
|
110
|
+
var nextIndex = -1;
|
|
111
|
+
if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {
|
|
112
|
+
nextIndex = (currentIndex + 1) % buttons.length;
|
|
113
|
+
} else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {
|
|
114
|
+
nextIndex = (currentIndex - 1 + buttons.length) % buttons.length;
|
|
115
|
+
} else if (e.key === 'Home') {
|
|
116
|
+
nextIndex = 0;
|
|
117
|
+
} else if (e.key === 'End') {
|
|
118
|
+
nextIndex = buttons.length - 1;
|
|
119
|
+
}
|
|
120
|
+
if (nextIndex >= 0) {
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
var nextEl = buttons[nextIndex];
|
|
123
|
+
nextEl.focus();
|
|
124
|
+
setSelectedValue(function () {
|
|
125
|
+
var _nextEl$dataset$value;
|
|
126
|
+
return (_nextEl$dataset$value = nextEl.dataset.value) !== null && _nextEl$dataset$value !== void 0 ? _nextEl$dataset$value : '';
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, [setSelectedValue]);
|
|
130
|
+
var textColor = isDisabled ? 'interactive.text.gray.disabled' : isSelected ? 'interactive.text.gray.normal' : 'interactive.text.gray.muted';
|
|
131
|
+
var iconColor = isDisabled ? 'interactive.icon.gray.disabled' : isSelected ? 'interactive.icon.gray.normal' : 'interactive.icon.gray.muted';
|
|
132
|
+
return /*#__PURE__*/jsxs(StyledSegmentedControlButton, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
133
|
+
ref: buttonRef,
|
|
134
|
+
type: "button",
|
|
135
|
+
id: "".concat(baseId, "-").concat(value, "-item"),
|
|
136
|
+
"data-value": value,
|
|
137
|
+
tabIndex: shouldReceiveFocus ? 0 : -1,
|
|
138
|
+
$size: size,
|
|
139
|
+
$isSelected: isSelected,
|
|
140
|
+
disabled: isDisabled,
|
|
141
|
+
onClick: function onClick() {
|
|
142
|
+
setSelectedValue(function () {
|
|
143
|
+
return value;
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
onKeyDown: handleKeyDown
|
|
147
|
+
}, makeAccessible({
|
|
148
|
+
role: 'radio',
|
|
149
|
+
checked: isSelected,
|
|
150
|
+
label: accessibilityLabel,
|
|
151
|
+
setSize: totalItems
|
|
152
|
+
})), metaAttribute({
|
|
153
|
+
name: MetaConstants.SegmentedControlItem,
|
|
154
|
+
testID: testID
|
|
155
|
+
})), makeAnalyticsAttribute(rest)), {}, {
|
|
156
|
+
children: [Leading ? /*#__PURE__*/jsx(Leading, {
|
|
157
|
+
size: iconSizeMap[size],
|
|
158
|
+
color: iconColor
|
|
159
|
+
}) : null, children ? /*#__PURE__*/jsx(Text, {
|
|
160
|
+
as: "span",
|
|
161
|
+
color: textColor,
|
|
162
|
+
size: textSizeMap[size],
|
|
163
|
+
weight: "medium",
|
|
164
|
+
children: children
|
|
165
|
+
}) : null]
|
|
166
|
+
}));
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export { SegmentedControlItem };
|
|
170
|
+
//# sourceMappingURL=SegmentedControlItem.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControlItem.web.js","sources":["../../../../../../src/components/SegmentedControl/SegmentedControlItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { SegmentedControlItemProps, SegmentedControlSize } from './types';\nimport { useSegmentedControlContext } from './SegmentedControlContext';\nimport {\n paddingX,\n paddingY,\n textSizeMap,\n iconSizeMap,\n itemBorderRadius,\n itemHeight,\n} from './segmentedControlTokens';\nimport { Text } from '~components/Typography';\nimport { makeSpace, castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst StyledSegmentedControlButton = styled.button<{\n $size: SegmentedControlSize;\n $isSelected: boolean;\n}>(({ theme, $size, $isSelected }) => ({\n appearance: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: makeSpace(theme.spacing[3]),\n flex: 1,\n height: makeSpace(itemHeight[$size]),\n\n paddingTop: makeSpace(getIn(theme, paddingY[$size])),\n paddingBottom: makeSpace(getIn(theme, paddingY[$size])),\n paddingLeft: makeSpace(getIn(theme, paddingX[$size])),\n paddingRight: makeSpace(getIn(theme, paddingX[$size])),\n\n backgroundColor: 'transparent',\n borderRadius: makeSpace(theme.border.radius[itemBorderRadius[$size]]),\n\n position: 'relative' as const,\n zIndex: 1,\n\n transitionProperty: 'background-color',\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.gentle)),\n\n '&:hover:not(:disabled)': {\n backgroundColor: $isSelected ? 'transparent' : theme.colors.interactive.background.gray.default,\n },\n\n '&:focus:not(:focus-visible)': {\n outline: 'none',\n },\n\n '&:focus-visible': {\n outline: 'none',\n boxShadow: `inset 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`,\n },\n\n '&:disabled': {\n cursor: 'not-allowed',\n backgroundColor: 'transparent',\n },\n '&:disabled:hover': {\n backgroundColor: 'transparent',\n },\n}));\n\nconst SegmentedControlItem = ({\n children,\n value,\n leading: Leading,\n isDisabled: isItemDisabled = false,\n accessibilityLabel,\n testID,\n ...rest\n}: SegmentedControlItemProps): React.ReactElement => {\n const {\n selectedValue,\n setSelectedValue,\n size,\n isDisabled: isGroupDisabled,\n baseId,\n totalItems,\n firstEnabledValue,\n itemRefs,\n } = useSegmentedControlContext();\n\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const isSelected = selectedValue === value;\n const isDisabled = isGroupDisabled || isItemDisabled;\n\n const shouldReceiveFocus =\n (!isDisabled && isSelected) ||\n (selectedValue === undefined && !isDisabled && value === firstEnabledValue);\n\n React.useEffect(() => {\n if (!itemRefs) return undefined;\n const map = itemRefs.current;\n const node = buttonRef.current;\n if (node) map.set(value, node);\n return () => {\n map.delete(value);\n };\n }, [value, itemRefs]);\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLButtonElement>) => {\n const container = buttonRef.current?.closest('[role=\"radiogroup\"]');\n if (!container) return;\n\n const buttons = Array.from(\n container.querySelectorAll<HTMLButtonElement>('[role=\"radio\"]:not(:disabled)'),\n );\n const currentIndex = buttons.indexOf(buttonRef.current!);\n let nextIndex = -1;\n\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n nextIndex = (currentIndex + 1) % buttons.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n nextIndex = (currentIndex - 1 + buttons.length) % buttons.length;\n } else if (e.key === 'Home') {\n nextIndex = 0;\n } else if (e.key === 'End') {\n nextIndex = buttons.length - 1;\n }\n\n if (nextIndex >= 0) {\n e.preventDefault();\n const nextEl = buttons[nextIndex];\n nextEl.focus();\n setSelectedValue(() => nextEl.dataset.value ?? '');\n }\n },\n [setSelectedValue],\n );\n\n const textColor = isDisabled\n ? 'interactive.text.gray.disabled'\n : isSelected\n ? 'interactive.text.gray.normal'\n : 'interactive.text.gray.muted';\n const iconColor = isDisabled\n ? 'interactive.icon.gray.disabled'\n : isSelected\n ? 'interactive.icon.gray.normal'\n : 'interactive.icon.gray.muted';\n\n return (\n <StyledSegmentedControlButton\n ref={buttonRef}\n type=\"button\"\n id={`${baseId}-${value}-item`}\n data-value={value}\n tabIndex={shouldReceiveFocus ? 0 : -1}\n $size={size}\n $isSelected={isSelected}\n disabled={isDisabled}\n onClick={() => {\n setSelectedValue(() => value);\n }}\n onKeyDown={handleKeyDown}\n {...makeAccessible({\n role: 'radio',\n checked: isSelected,\n label: accessibilityLabel,\n setSize: totalItems,\n })}\n {...metaAttribute({ name: MetaConstants.SegmentedControlItem, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n {Leading ? <Leading size={iconSizeMap[size]} color={iconColor} /> : null}\n {children ? (\n <Text as=\"span\" color={textColor} size={textSizeMap[size]} weight=\"medium\">\n {children}\n </Text>\n ) : null}\n </StyledSegmentedControlButton>\n );\n};\n\nexport { SegmentedControlItem };\n"],"names":["StyledSegmentedControlButton","styled","button","withConfig","displayName","componentId","_ref","theme","$size","$isSelected","appearance","border","cursor","display","alignItems","justifyContent","gap","makeSpace","spacing","flex","height","itemHeight","paddingTop","getIn","paddingY","paddingBottom","paddingLeft","paddingX","paddingRight","backgroundColor","borderRadius","radius","itemBorderRadius","position","zIndex","transitionProperty","transitionTimingFunction","castWebType","motion","easing","standard","transitionDuration","makeMotionTime","duration","gentle","colors","interactive","background","gray","outline","boxShadow","concat","surface","primary","muted","SegmentedControlItem","_ref2","children","value","Leading","leading","_ref2$isDisabled","isDisabled","isItemDisabled","accessibilityLabel","testID","rest","_objectWithoutProperties","_excluded","_useSegmentedControlC","useSegmentedControlContext","selectedValue","setSelectedValue","size","isGroupDisabled","baseId","totalItems","firstEnabledValue","itemRefs","buttonRef","React","useRef","isSelected","shouldReceiveFocus","undefined","useEffect","map","current","node","set","handleKeyDown","useCallback","e","_buttonRef$current","container","closest","buttons","Array","from","querySelectorAll","currentIndex","indexOf","nextIndex","key","length","preventDefault","nextEl","focus","_nextEl$dataset$value","dataset","textColor","iconColor","_jsxs","_objectSpread","ref","type","id","tabIndex","disabled","onClick","onKeyDown","makeAccessible","role","checked","label","setSize","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","_jsx","iconSizeMap","color","Text","as","textSizeMap","weight"],"mappings":";;;;;;;;;;;;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|
+
medium: 'spacing.2',
|
|
4
|
+
large: 'spacing.3'
|
|
5
|
+
};
|
|
6
|
+
var paddingX = {
|
|
7
|
+
small: 'spacing.3',
|
|
8
|
+
medium: 'spacing.3',
|
|
9
|
+
large: 'spacing.3'
|
|
10
|
+
};
|
|
11
|
+
var containerPadding = {
|
|
12
|
+
small: 'spacing.2',
|
|
13
|
+
medium: 'spacing.2',
|
|
14
|
+
large: 'spacing.2'
|
|
15
|
+
};
|
|
16
|
+
var gap = {
|
|
17
|
+
small: 'spacing.1',
|
|
18
|
+
medium: 'spacing.1',
|
|
19
|
+
large: 'spacing.1'
|
|
20
|
+
};
|
|
21
|
+
var containerBorderRadius = {
|
|
22
|
+
small: 'small',
|
|
23
|
+
medium: 'small',
|
|
24
|
+
large: 'medium'
|
|
25
|
+
};
|
|
26
|
+
var itemBorderRadius = {
|
|
27
|
+
small: 'xsmall',
|
|
28
|
+
medium: 'xsmall',
|
|
29
|
+
large: 'small'
|
|
30
|
+
};
|
|
31
|
+
var containerHeight = {
|
|
32
|
+
small: 32,
|
|
33
|
+
medium: 36,
|
|
34
|
+
large: 48
|
|
35
|
+
};
|
|
36
|
+
var itemHeight = {
|
|
37
|
+
small: 24,
|
|
38
|
+
medium: 28,
|
|
39
|
+
large: 40
|
|
40
|
+
};
|
|
41
|
+
var textSizeMap = {
|
|
42
|
+
small: 'small',
|
|
43
|
+
medium: 'medium',
|
|
44
|
+
large: 'large'
|
|
45
|
+
};
|
|
46
|
+
var iconSizeMap = {
|
|
47
|
+
small: 'medium',
|
|
48
|
+
medium: 'medium',
|
|
49
|
+
large: 'large'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { containerBorderRadius, containerHeight, containerPadding, gap, iconSizeMap, itemBorderRadius, itemHeight, paddingX, paddingY, textSizeMap };
|
|
53
|
+
//# sourceMappingURL=segmentedControlTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmentedControlTokens.js","sources":["../../../../../../src/components/SegmentedControl/segmentedControlTokens.ts"],"sourcesContent":["import type { SegmentedControlSize } from './types';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\n\ntype SizeTokenMap = Record<SegmentedControlSize, DotNotationSpacingStringToken>;\n\nconst paddingY: SizeTokenMap = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.3',\n};\n\nconst paddingX: SizeTokenMap = {\n small: 'spacing.3',\n medium: 'spacing.3',\n large: 'spacing.3',\n};\n\nconst containerPadding: SizeTokenMap = {\n small: 'spacing.2',\n medium: 'spacing.2',\n large: 'spacing.2',\n};\n\nconst gap: SizeTokenMap = {\n small: 'spacing.1',\n medium: 'spacing.1',\n large: 'spacing.1',\n};\n\nconst containerBorderRadius: Record<SegmentedControlSize, 'small' | 'medium'> = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n};\n\nconst itemBorderRadius: Record<SegmentedControlSize, 'xsmall' | 'small'> = {\n small: 'xsmall',\n medium: 'xsmall',\n large: 'small',\n};\n\nconst containerHeight: Record<SegmentedControlSize, number> = {\n small: 32,\n medium: 36,\n large: 48,\n};\n\nconst itemHeight: Record<SegmentedControlSize, number> = {\n small: 24,\n medium: 28,\n large: 40,\n};\n\nconst textSizeMap: Record<SegmentedControlSize, 'small' | 'medium' | 'large'> = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n};\n\nconst iconSizeMap: Record<SegmentedControlSize, 'small' | 'medium' | 'large'> = {\n small: 'medium',\n medium: 'medium',\n large: 'large',\n};\n\nexport {\n paddingY,\n paddingX,\n containerPadding,\n containerBorderRadius,\n itemBorderRadius,\n containerHeight,\n itemHeight,\n gap,\n textSizeMap,\n iconSizeMap,\n};\n"],"names":["paddingY","small","medium","large","paddingX","containerPadding","gap","containerBorderRadius","itemBorderRadius","containerHeight","itemHeight","textSizeMap","iconSizeMap"],"mappings":"AAKA,IAAMA,QAAsB,GAAG;AAC7BC,EAAAA,KAAK,EAAE,WAAW;AAClBC,EAAAA,MAAM,EAAE,WAAW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AE,OAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaggerProvider.js","sources":["../../../../../../src/components/Stagger/StaggerProvider.tsx"],"sourcesContent":["import React from 'react';\nimport type { BaseMotionBoxProps } from '~components/BaseMotion';\n\ntype StaggerContextType = {\n isInsideStaggerContainer: boolean;\n staggerType: BaseMotionBoxProps['type'];\n};\n\nconst StaggerContext = React.createContext<StaggerContextType>({\n isInsideStaggerContainer: false,\n staggerType: 'inout',\n});\n\nconst useStagger = (): StaggerContextType => {\n const staggerContextValue = React.useContext(StaggerContext);\n return staggerContextValue;\n};\n\nexport { useStagger, StaggerContext };\n"],"names":["StaggerContext","React","createContext","isInsideStaggerContainer","staggerType","useStagger","staggerContextValue","useContext"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"StaggerProvider.js","sources":["../../../../../../src/components/Stagger/StaggerProvider.tsx"],"sourcesContent":["import React from 'react';\nimport type { BaseMotionBoxProps, MotionVariantsType } from '~components/BaseMotion';\n\ntype StaggerContextType = {\n isInsideStaggerContainer: boolean;\n staggerType: BaseMotionBoxProps['type'];\n /**\n * Native-only. Per-child stagger offset (in **seconds**) injected into the child's resolved\n * `transition.delay` at the `BaseMotionBox.native` choke point. Web relies on framer's\n * `staggerChildren` and never reads this field.\n */\n staggerDelay?: { enter: number; exit: number };\n /**\n * Native-only. The visibility target (`'animate' | 'exit'`) the parent `Stagger` drives every\n * child towards in lockstep (offset by `staggerDelay`). Web propagates visibility through\n * framer's variant cascade instead.\n */\n staggerVisibility?: keyof MotionVariantsType;\n /**\n * Native-only. Flags the child whose exit finishes last (largest total exit time). Its exit\n * completion drives the container's deferred unmount for `shouldUnmountWhenHidden`.\n */\n isLastStaggerChild?: boolean;\n /**\n * Native-only. Invoked by the last stagger child when its transition completes so the container\n * can unmount after the final exit animation. No-op on web.\n */\n onStaggerComplete?: (targetName: keyof MotionVariantsType) => void;\n};\n\nconst StaggerContext = React.createContext<StaggerContextType>({\n isInsideStaggerContainer: false,\n staggerType: 'inout',\n});\n\nconst useStagger = (): StaggerContextType => {\n const staggerContextValue = React.useContext(StaggerContext);\n return staggerContextValue;\n};\n\nexport { useStagger, StaggerContext };\nexport type { StaggerContextType };\n"],"names":["StaggerContext","React","createContext","isInsideStaggerContainer","staggerType","useStagger","staggerContextValue","useContext"],"mappings":";;AA8BA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,aAAa,CAAqB;AAC7DC,EAAAA,wBAAwB,EAAE,KAAK;AAC/BC,EAAAA,WAAW,EAAE,OAAA;AACf,CAAC,EAAC;AAEF,IAAMC,UAAU,GAAG,SAAbA,UAAUA,GAA6B;AAC3C,EAAA,IAAMC,mBAAmB,GAAGL,cAAK,CAACM,UAAU,CAACP,cAAc,CAAC,CAAA;AAC5D,EAAA,OAAOM,mBAAmB,CAAA;AAC5B;;;;"}
|
|
@@ -59,6 +59,7 @@ import './QuickFilters/index.js';
|
|
|
59
59
|
import './Radio/index.js';
|
|
60
60
|
import './TrustBadge/index.js';
|
|
61
61
|
import './Scale/index.js';
|
|
62
|
+
import './SegmentedControl/index.js';
|
|
62
63
|
import './SideNav/index.js';
|
|
63
64
|
import './Skeleton/index.js';
|
|
64
65
|
import './SkipNav/index.web.js';
|
|
@@ -652,6 +653,8 @@ export { Radio } from './Radio/Radio.js';
|
|
|
652
653
|
export { RadioGroup } from './Radio/RadioGroup/RadioGroup.js';
|
|
653
654
|
export { TrustBadge } from './TrustBadge/TrustBadge.web.js';
|
|
654
655
|
export { Scale } from './Scale/Scale.web.js';
|
|
656
|
+
export { SegmentedControl } from './SegmentedControl/SegmentedControl.web.js';
|
|
657
|
+
export { SegmentedControlItem } from './SegmentedControl/SegmentedControlItem.web.js';
|
|
655
658
|
export { SideNav } from './SideNav/SideNav.web.js';
|
|
656
659
|
export { SideNavLink } from './SideNav/SideNavItems/SideNavLink.web.js';
|
|
657
660
|
export { SideNavLevel } from './SideNav/SideNavLevel.web.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
|
|
2
|
-
import { __exports as flatten$1 } from '../../../../_virtual/
|
|
2
|
+
import { __exports as flatten$1 } from '../../../../_virtual/flatten2.js';
|
|
3
3
|
|
|
4
4
|
(function (exports) {
|
|
5
5
|
'use strict';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
|
|
2
|
-
import { __exports as flatten$1 } from '../../../../../_virtual/
|
|
2
|
+
import { __exports as flatten$1 } from '../../../../../_virtual/flatten4.js';
|
|
3
3
|
import '../../../../../_virtual/isArrayLike.js';
|
|
4
4
|
import { __exports as isArrayLike } from '../../../../../_virtual/isArrayLike2.js';
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
|
|
2
2
|
import { __exports as sortBy$1 } from '../../../../../_virtual/sortBy2.js';
|
|
3
3
|
import '../../../../../_virtual/orderBy.js';
|
|
4
|
-
import '../../../../../_virtual/
|
|
4
|
+
import '../../../../../_virtual/flatten.js';
|
|
5
5
|
import '../../../../../_virtual/isIterateeCall.js';
|
|
6
6
|
import { __exports as orderBy } from '../../../../../_virtual/orderBy2.js';
|
|
7
|
-
import { __exports as flatten } from '../../../../../_virtual/
|
|
7
|
+
import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
|
|
8
8
|
import { __exports as isIterateeCall } from '../../../../../_virtual/isIterateeCall2.js';
|
|
9
9
|
|
|
10
10
|
(function (exports) {
|
|
@@ -5,14 +5,14 @@ import '../../../../../_virtual/keysIn.js';
|
|
|
5
5
|
import '../../../../../_virtual/unset.js';
|
|
6
6
|
import '../../../../../_virtual/getSymbolsIn.js';
|
|
7
7
|
import '../../../../../_virtual/isDeepKey.js';
|
|
8
|
-
import '../../../../../_virtual/
|
|
8
|
+
import '../../../../../_virtual/flatten3.js';
|
|
9
9
|
import '../../../../../_virtual/isPlainObject.js';
|
|
10
10
|
import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
|
|
11
11
|
import { __exports as keysIn } from '../../../../../_virtual/keysIn2.js';
|
|
12
12
|
import { __exports as unset } from '../../../../../_virtual/unset2.js';
|
|
13
13
|
import { __exports as getSymbolsIn } from '../../../../../_virtual/getSymbolsIn2.js';
|
|
14
14
|
import { __exports as isDeepKey } from '../../../../../_virtual/isDeepKey2.js';
|
|
15
|
-
import { __exports as flatten } from '../../../../../_virtual/
|
|
15
|
+
import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
|
|
16
16
|
import { __exports as isPlainObject } from '../../../../../_virtual/isPlainObject2.js';
|
|
17
17
|
|
|
18
18
|
(function (exports) {
|
|
@@ -168,7 +168,9 @@ var MetaConstants = {
|
|
|
168
168
|
PreviewBody: 'preview-body',
|
|
169
169
|
PreviewFooter: 'preview-footer',
|
|
170
170
|
Pagination: 'pagination',
|
|
171
|
-
TimePicker: 'time-picker'
|
|
171
|
+
TimePicker: 'time-picker',
|
|
172
|
+
SegmentedControl: 'segmented-control',
|
|
173
|
+
SegmentedControlItem: 'segmented-control-item'
|
|
172
174
|
};
|
|
173
175
|
|
|
174
176
|
export { MetaConstants };
|
|
@@ -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 AppBar: 'app-bar',\n AppBarLeading: 'app-bar-leading',\n AppBarActions: 'app-bar-actions',\n TrustBadge: 'trust-badge',\n AnnouncementBanner: 'announcement-banner',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\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 BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatInput: 'chat-input',\n ChatMessage: 'chat-message',\n ChatMessageThumbnailPreview: 'chat-message-thumbnail-preview',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n CheckboxIconFade: 'checkbox-icon-fade',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n ColorInput: 'color-input',\n Component: 'blade-component',\n Counter: 'counter',\n CounterInput: 'counter-input',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n EmptyState: 'empty-state',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n InfoGroup: 'info-group',\n InfoItem: 'info-item',\n InfoItemKey: 'info-item-key',\n InfoItemValue: 'info-item-value',\n InfoItemIcon: 'info-item-icon',\n Indicator: 'indicator',\n InputGroup: 'input-group',\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 ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n TabNavIndicator: 'tab-nav-indicator',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\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 TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\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 TablePageSelectionButton: 'table-page-selection-button',\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 CardTearLine: 'card-tear-line',\n TicketCardBody: 'ticket-card-body',\n TicketCardFooter: 'ticket-card-footer',\n InfoCardBody: 'info-card-body',\n InfoCardFooter: 'info-card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n CollapsibleText: 'collapsible-text',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\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 StepGroup: 'step-group',\n StepItem: 'step-item',\n StepItemButton: 'step-item-button',\n PreviewWindow: 'preview-window',\n PreviewHeader: 'preview-header',\n PreviewBody: 'preview-body',\n PreviewFooter: 'preview-footer',\n Pagination: 'pagination',\n TimePicker: 'time-picker',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AppBar","AppBarLeading","AppBarActions","TrustBadge","AnnouncementBanner","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatInput","ChatMessage","ChatMessageThumbnailPreview","Checkbox","CheckboxGroup","CheckboxLabel","CheckboxIconFade","Chip","ChipGroup","ChipLabel","Code","ColorInput","Component","Counter","CounterInput","Display","Divider","Drawer","EmptyState","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","InfoGroup","InfoItem","InfoItemKey","InfoItemValue","InfoItemIcon","Indicator","InputGroup","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","TabNavIndicator","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","CardTearLine","TicketCardBody","TicketCardFooter","InfoCardBody","InfoCardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","CollapsibleText","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem","StepItemButton","PreviewWindow","PreviewHeader","PreviewBody","PreviewFooter","Pagination","TimePicker"],"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,MAAM,EAAE,SAAS;AACjBC,EAAAA,aAAa,EAAE,iBAAiB;AAChCC,EAAAA,aAAa,EAAE,iBAAiB;AAChCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,kBAAkB,EAAE,qBAAqB;AACzCC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,cAAc,EAA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;AAC/BC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,UAAU,EAAE,aAAA;AACd;;;;"}
|
|
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 AppBar: 'app-bar',\n AppBarLeading: 'app-bar-leading',\n AppBarActions: 'app-bar-actions',\n TrustBadge: 'trust-badge',\n AnnouncementBanner: 'announcement-banner',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\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 BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatInput: 'chat-input',\n ChatMessage: 'chat-message',\n ChatMessageThumbnailPreview: 'chat-message-thumbnail-preview',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n CheckboxIconFade: 'checkbox-icon-fade',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n ColorInput: 'color-input',\n Component: 'blade-component',\n Counter: 'counter',\n CounterInput: 'counter-input',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n EmptyState: 'empty-state',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n InfoGroup: 'info-group',\n InfoItem: 'info-item',\n InfoItemKey: 'info-item-key',\n InfoItemValue: 'info-item-value',\n InfoItemIcon: 'info-item-icon',\n Indicator: 'indicator',\n InputGroup: 'input-group',\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 ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n TabNavIndicator: 'tab-nav-indicator',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\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 TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\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 TablePageSelectionButton: 'table-page-selection-button',\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 CardTearLine: 'card-tear-line',\n TicketCardBody: 'ticket-card-body',\n TicketCardFooter: 'ticket-card-footer',\n InfoCardBody: 'info-card-body',\n InfoCardFooter: 'info-card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n CollapsibleText: 'collapsible-text',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\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 StepGroup: 'step-group',\n StepItem: 'step-item',\n StepItemButton: 'step-item-button',\n PreviewWindow: 'preview-window',\n PreviewHeader: 'preview-header',\n PreviewBody: 'preview-body',\n PreviewFooter: 'preview-footer',\n Pagination: 'pagination',\n TimePicker: 'time-picker',\n SegmentedControl: 'segmented-control',\n SegmentedControlItem: 'segmented-control-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AppBar","AppBarLeading","AppBarActions","TrustBadge","AnnouncementBanner","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatInput","ChatMessage","ChatMessageThumbnailPreview","Checkbox","CheckboxGroup","CheckboxLabel","CheckboxIconFade","Chip","ChipGroup","ChipLabel","Code","ColorInput","Component","Counter","CounterInput","Display","Divider","Drawer","EmptyState","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","InfoGroup","InfoItem","InfoItemKey","InfoItemValue","InfoItemIcon","Indicator","InputGroup","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","TabNavIndicator","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","CardTearLine","TicketCardBody","TicketCardFooter","InfoCardBody","InfoCardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","CollapsibleText","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem","StepItemButton","PreviewWindow","PreviewHeader","PreviewBody","PreviewFooter","Pagination","TimePicker","SegmentedControl","SegmentedControlItem"],"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,MAAM,EAAE,SAAS;AACjBC,EAAAA,aAAa,EAAE,iBAAiB;AAChCC,EAAAA,aAAa,EAAE,iBAAiB;AAChCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,kBAAkB,EAAE,qBAAqB;AACzCC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,cAAc,EAAE,kBAAkB;AAClCC,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,iBAAiB;AACjCC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,QAAQ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} from 'framer-motion';
|
|
3
3
|
import { AnimateInteractionsContext } from './AnimateInteractionsProvider.js';
|
|
4
|
-
import { useFocusWithin } from './useFocusWithin.js';
|
|
4
|
+
import { useFocusWithin } from './useFocusWithin.web.js';
|
|
5
5
|
import '../BaseMotion/index.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { BaseMotionEnhancerBox } from '../BaseMotion/BaseMotion.web.js';
|
package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var AnimateInteractionsContext = /*#__PURE__*/React__default.createContext({
|
|
4
|
-
isInsideAnimateInteractionsContainer: false
|
|
4
|
+
isInsideAnimateInteractionsContainer: false,
|
|
5
|
+
isInteracting: false
|
|
5
6
|
});
|
|
6
7
|
var useAnimateInteractions = function useAnimateInteractions() {
|
|
7
8
|
var animateInteractionsContextValue = React__default.useContext(AnimateInteractionsContext);
|
package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimateInteractionsProvider.js","sources":["../../../../../../src/components/AnimateInteractions/AnimateInteractionsProvider.tsx"],"sourcesContent":["import React from 'react';\n\ntype AnimateInteractionsContextType = {\n isInsideAnimateInteractionsContainer: boolean;\n};\n\nconst AnimateInteractionsContext = React.createContext<AnimateInteractionsContextType>({\n isInsideAnimateInteractionsContainer: false,\n});\n\nconst useAnimateInteractions = (): AnimateInteractionsContextType => {\n const animateInteractionsContextValue = React.useContext(AnimateInteractionsContext);\n return animateInteractionsContextValue;\n};\n\nexport { useAnimateInteractions, AnimateInteractionsContext };\n"],"names":["AnimateInteractionsContext","React","createContext","isInsideAnimateInteractionsContainer","useAnimateInteractions","animateInteractionsContextValue","useContext"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"AnimateInteractionsProvider.js","sources":["../../../../../../src/components/AnimateInteractions/AnimateInteractionsProvider.tsx"],"sourcesContent":["import React from 'react';\n\ntype AnimateInteractionsContextType = {\n isInsideAnimateInteractionsContainer: boolean;\n /**\n * Native-only: current interaction state of the parent `AnimateInteractions` container.\n *\n * On native there is no hover / DOM focus-within, so `AnimateInteractions.native` publishes a\n * press-and-hold flag here and the shared `BaseMotion.native` engine reads it to drive every\n * `on-animate-interactions` descendant towards `'animate'` (interacting) or `'exit'` (idle).\n *\n * Web ignores this field — framer control propagation handles descendant animation there.\n */\n isInteracting?: boolean;\n};\n\nconst AnimateInteractionsContext = React.createContext<AnimateInteractionsContextType>({\n isInsideAnimateInteractionsContainer: false,\n isInteracting: false,\n});\n\nconst useAnimateInteractions = (): AnimateInteractionsContextType => {\n const animateInteractionsContextValue = React.useContext(AnimateInteractionsContext);\n return animateInteractionsContextValue;\n};\n\nexport { useAnimateInteractions, AnimateInteractionsContext };\n"],"names":["AnimateInteractionsContext","React","createContext","isInsideAnimateInteractionsContainer","isInteracting","useAnimateInteractions","animateInteractionsContextValue","useContext"],"mappings":";;AAgBA,IAAMA,0BAA0B,gBAAGC,cAAK,CAACC,aAAa,CAAiC;AACrFC,EAAAA,oCAAoC,EAAE,KAAK;AAC3CC,EAAAA,aAAa,EAAE,KAAA;AACjB,CAAC,EAAC;AAEF,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,GAAyC;AACnE,EAAA,IAAMC,+BAA+B,GAAGL,cAAK,CAACM,UAAU,CAACP,0BAA0B,CAAC,CAAA;AACpF,EAAA,OAAOM,+BAA+B,CAAA;AACxC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusWithin.web.js","sources":["../../../../../../src/components/AnimateInteractions/useFocusWithin.web.ts"],"sourcesContent":["import { useEffect } from 'react';\n\ntype FocusWithinHandlers = {\n onFocusWithin?: () => void;\n onBlurWithin?: () => void;\n};\n\nexport const useFocusWithin = <T extends HTMLElement>(\n ref: React.RefObject<T>,\n { onFocusWithin, onBlurWithin }: FocusWithinHandlers,\n): void => {\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n\n const handleFocusIn = (): void => {\n onFocusWithin?.();\n };\n\n const handleFocusOut = (event: FocusEvent): void => {\n // Ensure that focus is not still within the container\n if (element && !element.contains(event.relatedTarget as Node)) {\n onBlurWithin?.();\n }\n };\n\n element.addEventListener('focusin', handleFocusIn);\n element.addEventListener('focusout', handleFocusOut);\n\n // eslint-disable-next-line consistent-return\n return () => {\n element.removeEventListener('focusin', handleFocusIn);\n element.removeEventListener('focusout', handleFocusOut);\n };\n }, [ref, onFocusWithin, onBlurWithin]);\n};\n"],"names":["useFocusWithin","ref","_ref","onFocusWithin","onBlurWithin","useEffect","element","current","handleFocusIn","handleFocusOut","event","contains","relatedTarget","addEventListener","removeEventListener"],"mappings":";;AAOO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CACzBC,GAAuB,EAAAC,IAAA,EAEd;AAAA,EAAA,IADPC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY,CAAA;AAE7BC,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAMC,OAAO,GAAGL,GAAG,CAACM,OAAO,CAAA;IAC3B,IAAI,CAACD,OAAO,EAAE,OAAA;AAEd,IAAA,IAAME,aAAa,GAAG,SAAhBA,aAAaA,GAAe;AAChCL,MAAAA,aAAa,KAAbA,IAAAA,IAAAA,aAAa,KAAbA,KAAAA,CAAAA,IAAAA,aAAa,EAAI,CAAA;KAClB,CAAA;AAED,IAAA,IAAMM,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAiB,EAAW;AAClD;MACA,IAAIJ,OAAO,IAAI,CAACA,OAAO,CAACK,QAAQ,CAACD,KAAK,CAACE,aAAqB,CAAC,EAAE;AAC7DR,QAAAA,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,IAAAA,YAAY,EAAI,CAAA;AAClB,OAAA;KACD,CAAA;AAEDE,IAAAA,OAAO,CAACO,gBAAgB,CAAC,SAAS,EAAEL,aAAa,CAAC,CAAA;AAClDF,IAAAA,OAAO,CAACO,gBAAgB,CAAC,UAAU,EAAEJ,cAAc,CAAC,CAAA;;AAEpD;AACA,IAAA,OAAO,YAAM;AACXH,MAAAA,OAAO,CAACQ,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC,CAAA;AACrDF,MAAAA,OAAO,CAACQ,mBAAmB,CAAC,UAAU,EAAEL,cAAc,CAAC,CAAA;KACxD,CAAA;GACF,EAAE,CAACR,GAAG,EAAEE,aAAa,EAAEC,YAAY,CAAC,CAAC,CAAA;AACxC;;;;"}
|
|
@@ -534,7 +534,14 @@ var BaseDatePicker = function BaseDatePicker(_ref) {
|
|
|
534
534
|
autoFocus: autoFocus,
|
|
535
535
|
necessityIndicator: necessityIndicator,
|
|
536
536
|
format: finalFormat,
|
|
537
|
-
placeholder: finalInputPlaceHolder
|
|
537
|
+
placeholder: finalInputPlaceHolder
|
|
538
|
+
// Chips show the clear (cross) button by default when a value is selected.
|
|
539
|
+
// Consumers can pass `showClearButton={false}` for filters that must always
|
|
540
|
+
// hold a value (e.g. a mandatory default date). The `?? true` default lives here
|
|
541
|
+
// (on the chip path) rather than at destructuring so the regular, non-chip
|
|
542
|
+
// DatePickerInput keeps its original `undefined` default and is unaffected.
|
|
543
|
+
,
|
|
544
|
+
showClearButton: showClearButton !== null && showClearButton !== void 0 ? showClearButton : true,
|
|
538
545
|
onClearButtonChange: handleClear
|
|
539
546
|
// Effective Selection type should only be used for selectionType 'range'
|
|
540
547
|
,
|