@cleartrip/talos-user-message 11.0.0 → 11.1.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.
|
@@ -111,6 +111,150 @@
|
|
|
111
111
|
}
|
|
112
112
|
})(jsxRuntime);
|
|
113
113
|
|
|
114
|
+
const staticContainerStyles = ctDesignStyleManager.makeStyles(() => {
|
|
115
|
+
return {
|
|
116
|
+
root: {
|
|
117
|
+
display: 'flex',
|
|
118
|
+
flexDirection: 'column',
|
|
119
|
+
pointerEvents: 'auto'
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
function getPointerEventsStyles(pointerEvents) {
|
|
124
|
+
if (pointerEvents === 'box-none') {
|
|
125
|
+
return {
|
|
126
|
+
pointerEvents: 'none',
|
|
127
|
+
'& > *': {
|
|
128
|
+
pointerEvents: 'auto'
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
if (pointerEvents === 'box-only') {
|
|
133
|
+
return {
|
|
134
|
+
pointerEvents: 'auto',
|
|
135
|
+
'& > *': {
|
|
136
|
+
pointerEvents: 'none'
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (pointerEvents === 'none') {
|
|
141
|
+
return {
|
|
142
|
+
pointerEvents: 'none'
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
pointerEvents: 'auto'
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const Container = React.forwardRef(({
|
|
150
|
+
id,
|
|
151
|
+
as: ContainerAs = 'div',
|
|
152
|
+
children,
|
|
153
|
+
styleConfig,
|
|
154
|
+
onClick,
|
|
155
|
+
onLayout,
|
|
156
|
+
onMouseEnter,
|
|
157
|
+
onMouseLeave,
|
|
158
|
+
onTransitionEnd,
|
|
159
|
+
onTouchStart,
|
|
160
|
+
onTouchEnd,
|
|
161
|
+
onTouchCancel,
|
|
162
|
+
onTouchMove,
|
|
163
|
+
pointerEvents,
|
|
164
|
+
hitSlop: _hitSlop,
|
|
165
|
+
hapticEnabled: _hapticEnabled,
|
|
166
|
+
hapticVariant: _hapticVariant,
|
|
167
|
+
hapticRepeat: _hapticRepeat
|
|
168
|
+
}, forwardedRef) => {
|
|
169
|
+
const localRef = React.useRef(null);
|
|
170
|
+
const handleFocus = React.useCallback(() => {
|
|
171
|
+
var _a;
|
|
172
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
173
|
+
}, []);
|
|
174
|
+
const handleGetBoundingRect = React.useCallback(callback => {
|
|
175
|
+
var _a;
|
|
176
|
+
const rect = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
177
|
+
if (rect) {
|
|
178
|
+
callback === null || callback === void 0 ? void 0 : callback({
|
|
179
|
+
x: rect.x,
|
|
180
|
+
y: rect.y,
|
|
181
|
+
width: rect.width,
|
|
182
|
+
height: rect.height
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}, []);
|
|
186
|
+
const handleAddEventListener = React.useCallback((type, listener, options) => {
|
|
187
|
+
var _a;
|
|
188
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener, options);
|
|
189
|
+
}, []);
|
|
190
|
+
const handleRemoveEventListener = React.useCallback((type, listener, options) => {
|
|
191
|
+
var _a;
|
|
192
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener, options);
|
|
193
|
+
}, []);
|
|
194
|
+
React.useImperativeHandle(forwardedRef, () => {
|
|
195
|
+
var _a;
|
|
196
|
+
return {
|
|
197
|
+
focus: handleFocus,
|
|
198
|
+
getBoundingRectWithCallback: handleGetBoundingRect,
|
|
199
|
+
getElementRef: () => localRef,
|
|
200
|
+
style: ((_a = localRef.current) === null || _a === void 0 ? void 0 : _a.style) || {},
|
|
201
|
+
classList: {
|
|
202
|
+
add: className => {
|
|
203
|
+
var _a;
|
|
204
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(className);
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
measure: _callback => {
|
|
208
|
+
var _a;
|
|
209
|
+
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
210
|
+
},
|
|
211
|
+
addEventListener: handleAddEventListener,
|
|
212
|
+
removeEventListener: handleRemoveEventListener
|
|
213
|
+
};
|
|
214
|
+
}, [handleFocus, handleGetBoundingRect, handleAddEventListener, handleRemoveEventListener]);
|
|
215
|
+
const {
|
|
216
|
+
root: rootStyles = []
|
|
217
|
+
} = styleConfig || {};
|
|
218
|
+
const pointerEventsStyle = React.useMemo(() => {
|
|
219
|
+
if (pointerEvents == null) return null;
|
|
220
|
+
return getPointerEventsStyles(pointerEvents);
|
|
221
|
+
}, [pointerEvents]);
|
|
222
|
+
const mergedRootStyles = ctDesignStyleManager.useWebMergeStyles([staticContainerStyles.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
|
|
223
|
+
React.useLayoutEffect(() => {
|
|
224
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
225
|
+
onLayout === null || onLayout === void 0 ? void 0 : onLayout({
|
|
226
|
+
layout: {
|
|
227
|
+
height: (_b = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
|
|
228
|
+
width: (_d = (_c = localRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0,
|
|
229
|
+
x: (_f = (_e = localRef.current) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect().x) !== null && _f !== void 0 ? _f : 0,
|
|
230
|
+
y: (_h = (_g = localRef.current) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect().y) !== null && _h !== void 0 ? _h : 0
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}, [onLayout]);
|
|
234
|
+
return jsxRuntimeExports.jsx(ContainerAs, {
|
|
235
|
+
id: id,
|
|
236
|
+
ref: localRef,
|
|
237
|
+
className: mergedRootStyles,
|
|
238
|
+
onClick: event => onClick === null || onClick === void 0 ? void 0 : onClick({
|
|
239
|
+
stopPropagation: () => event.stopPropagation(),
|
|
240
|
+
preventDefault: () => event.preventDefault(),
|
|
241
|
+
nativeEvent: {
|
|
242
|
+
locationX: event.clientX,
|
|
243
|
+
locationY: event.clientY
|
|
244
|
+
}
|
|
245
|
+
}),
|
|
246
|
+
onMouseEnter: onMouseEnter,
|
|
247
|
+
onMouseLeave: onMouseLeave,
|
|
248
|
+
onTransitionEnd: onTransitionEnd,
|
|
249
|
+
onTouchStart: onTouchStart,
|
|
250
|
+
onTouchEnd: onTouchEnd,
|
|
251
|
+
onTouchCancel: onTouchCancel,
|
|
252
|
+
onTouchMove: onTouchMove,
|
|
253
|
+
children: children
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
Container.displayName = 'Container';
|
|
257
|
+
|
|
114
258
|
const border = {
|
|
115
259
|
radius: {
|
|
116
260
|
0: 0,
|
|
@@ -189,6 +333,7 @@
|
|
|
189
333
|
neutral500: '#B3B3B3',
|
|
190
334
|
neutral700: '#808080',
|
|
191
335
|
neutral900: '#1A1A1A',
|
|
336
|
+
neutral900Muted: '#1A1A1ABF',
|
|
192
337
|
orange100: '#FFF1EC',
|
|
193
338
|
orange250: '#FFB8A5',
|
|
194
339
|
orange500: '#FF4F17',
|
|
@@ -2696,363 +2841,27 @@
|
|
|
2696
2841
|
styled[tagName] = styled(tagName);
|
|
2697
2842
|
});
|
|
2698
2843
|
|
|
2699
|
-
const
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
if (pointerEvents === 'box-only') {
|
|
2718
|
-
return {
|
|
2719
|
-
pointerEvents: 'auto',
|
|
2720
|
-
'& > *': {
|
|
2721
|
-
pointerEvents: 'none'
|
|
2722
|
-
}
|
|
2723
|
-
};
|
|
2724
|
-
}
|
|
2725
|
-
if (pointerEvents === 'none') {
|
|
2726
|
-
return {
|
|
2727
|
-
pointerEvents: 'none'
|
|
2728
|
-
};
|
|
2844
|
+
const duration = {
|
|
2845
|
+
shortest: 150,
|
|
2846
|
+
shorter: 200,
|
|
2847
|
+
short: 250,
|
|
2848
|
+
standard: 300,
|
|
2849
|
+
complex: 375,
|
|
2850
|
+
enteringScreen: 225,
|
|
2851
|
+
leavingScreen: 195
|
|
2852
|
+
};
|
|
2853
|
+
const easing = {
|
|
2854
|
+
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
2855
|
+
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
|
|
2856
|
+
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
2857
|
+
sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
|
|
2858
|
+
};
|
|
2859
|
+
function getAutoHeightDuration(height) {
|
|
2860
|
+
if (!height) {
|
|
2861
|
+
return 0;
|
|
2729
2862
|
}
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
};
|
|
2733
|
-
}
|
|
2734
|
-
const Container$1 = React.forwardRef(({
|
|
2735
|
-
id,
|
|
2736
|
-
as: ContainerAs = 'div',
|
|
2737
|
-
children,
|
|
2738
|
-
styleConfig,
|
|
2739
|
-
onClick,
|
|
2740
|
-
onLayout,
|
|
2741
|
-
onMouseEnter,
|
|
2742
|
-
onMouseLeave,
|
|
2743
|
-
onTransitionEnd,
|
|
2744
|
-
onTouchStart,
|
|
2745
|
-
onTouchEnd,
|
|
2746
|
-
onTouchCancel,
|
|
2747
|
-
onTouchMove,
|
|
2748
|
-
pointerEvents,
|
|
2749
|
-
hitSlop: _hitSlop,
|
|
2750
|
-
hapticEnabled: _hapticEnabled,
|
|
2751
|
-
hapticVariant: _hapticVariant,
|
|
2752
|
-
hapticRepeat: _hapticRepeat
|
|
2753
|
-
}, forwardedRef) => {
|
|
2754
|
-
const localRef = React.useRef(null);
|
|
2755
|
-
const handleFocus = React.useCallback(() => {
|
|
2756
|
-
var _a;
|
|
2757
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
2758
|
-
}, []);
|
|
2759
|
-
const handleGetBoundingRect = React.useCallback(callback => {
|
|
2760
|
-
var _a;
|
|
2761
|
-
const rect = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
2762
|
-
if (rect) {
|
|
2763
|
-
callback === null || callback === void 0 ? void 0 : callback({
|
|
2764
|
-
x: rect.x,
|
|
2765
|
-
y: rect.y,
|
|
2766
|
-
width: rect.width,
|
|
2767
|
-
height: rect.height
|
|
2768
|
-
});
|
|
2769
|
-
}
|
|
2770
|
-
}, []);
|
|
2771
|
-
const handleAddEventListener = React.useCallback((type, listener, options) => {
|
|
2772
|
-
var _a;
|
|
2773
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener, options);
|
|
2774
|
-
}, []);
|
|
2775
|
-
const handleRemoveEventListener = React.useCallback((type, listener, options) => {
|
|
2776
|
-
var _a;
|
|
2777
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener, options);
|
|
2778
|
-
}, []);
|
|
2779
|
-
React.useImperativeHandle(forwardedRef, () => {
|
|
2780
|
-
var _a;
|
|
2781
|
-
return {
|
|
2782
|
-
focus: handleFocus,
|
|
2783
|
-
getBoundingRectWithCallback: handleGetBoundingRect,
|
|
2784
|
-
getElementRef: () => localRef,
|
|
2785
|
-
style: ((_a = localRef.current) === null || _a === void 0 ? void 0 : _a.style) || {},
|
|
2786
|
-
classList: {
|
|
2787
|
-
add: className => {
|
|
2788
|
-
var _a;
|
|
2789
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(className);
|
|
2790
|
-
}
|
|
2791
|
-
},
|
|
2792
|
-
measure: _callback => {
|
|
2793
|
-
var _a;
|
|
2794
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
2795
|
-
},
|
|
2796
|
-
addEventListener: handleAddEventListener,
|
|
2797
|
-
removeEventListener: handleRemoveEventListener
|
|
2798
|
-
};
|
|
2799
|
-
}, [handleFocus, handleGetBoundingRect, handleAddEventListener, handleRemoveEventListener]);
|
|
2800
|
-
const {
|
|
2801
|
-
root: rootStyles = []
|
|
2802
|
-
} = styleConfig || {};
|
|
2803
|
-
const pointerEventsStyle = React.useMemo(() => {
|
|
2804
|
-
if (pointerEvents == null) return null;
|
|
2805
|
-
return getPointerEventsStyles$1(pointerEvents);
|
|
2806
|
-
}, [pointerEvents]);
|
|
2807
|
-
const mergedRootStyles = ctDesignStyleManager.useWebMergeStyles([staticContainerStyles$1.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
|
|
2808
|
-
React.useLayoutEffect(() => {
|
|
2809
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2810
|
-
onLayout === null || onLayout === void 0 ? void 0 : onLayout({
|
|
2811
|
-
layout: {
|
|
2812
|
-
height: (_b = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
|
|
2813
|
-
width: (_d = (_c = localRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0,
|
|
2814
|
-
x: (_f = (_e = localRef.current) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect().x) !== null && _f !== void 0 ? _f : 0,
|
|
2815
|
-
y: (_h = (_g = localRef.current) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect().y) !== null && _h !== void 0 ? _h : 0
|
|
2816
|
-
}
|
|
2817
|
-
});
|
|
2818
|
-
}, [onLayout]);
|
|
2819
|
-
return jsxRuntimeExports.jsx(ContainerAs, {
|
|
2820
|
-
id: id,
|
|
2821
|
-
ref: localRef,
|
|
2822
|
-
className: mergedRootStyles,
|
|
2823
|
-
onClick: event => onClick === null || onClick === void 0 ? void 0 : onClick({
|
|
2824
|
-
stopPropagation: () => event.stopPropagation(),
|
|
2825
|
-
preventDefault: () => event.preventDefault(),
|
|
2826
|
-
nativeEvent: {
|
|
2827
|
-
locationX: event.clientX,
|
|
2828
|
-
locationY: event.clientY
|
|
2829
|
-
}
|
|
2830
|
-
}),
|
|
2831
|
-
onMouseEnter: onMouseEnter,
|
|
2832
|
-
onMouseLeave: onMouseLeave,
|
|
2833
|
-
onTransitionEnd: onTransitionEnd,
|
|
2834
|
-
onTouchStart: onTouchStart,
|
|
2835
|
-
onTouchEnd: onTouchEnd,
|
|
2836
|
-
onTouchCancel: onTouchCancel,
|
|
2837
|
-
onTouchMove: onTouchMove,
|
|
2838
|
-
children: children
|
|
2839
|
-
});
|
|
2840
|
-
});
|
|
2841
|
-
Container$1.displayName = 'Container';
|
|
2842
|
-
|
|
2843
|
-
const boxStaticStyles = ctDesignStyleManager.makeStyles(() => ({
|
|
2844
|
-
root: {
|
|
2845
|
-
display: 'flex'
|
|
2846
|
-
}
|
|
2847
|
-
}));
|
|
2848
|
-
const BOX_SIZE_SPACING_KEY = {
|
|
2849
|
-
xLarge: 10,
|
|
2850
|
-
big: 8,
|
|
2851
|
-
medium: 6,
|
|
2852
|
-
small: 4,
|
|
2853
|
-
tiny: 3,
|
|
2854
|
-
micro: 2,
|
|
2855
|
-
nano: 1,
|
|
2856
|
-
pico: 1,
|
|
2857
|
-
zero: 0
|
|
2858
|
-
};
|
|
2859
|
-
function getBoxGap(theme, boxSize) {
|
|
2860
|
-
var _a, _b;
|
|
2861
|
-
const spacingKey = (_a = BOX_SIZE_SPACING_KEY[boxSize]) !== null && _a !== void 0 ? _a : 0;
|
|
2862
|
-
return (_b = theme.spacing[spacingKey]) !== null && _b !== void 0 ? _b : 0;
|
|
2863
|
-
}
|
|
2864
|
-
const Box = React.forwardRef(({
|
|
2865
|
-
children,
|
|
2866
|
-
styleConfig,
|
|
2867
|
-
horizontal = false,
|
|
2868
|
-
boxSize,
|
|
2869
|
-
onClick
|
|
2870
|
-
}, forwardedRef) => {
|
|
2871
|
-
const {
|
|
2872
|
-
root = []
|
|
2873
|
-
} = styleConfig || {};
|
|
2874
|
-
const dynamicStyles = ctDesignStyleManager.useStyles(theme => ({
|
|
2875
|
-
root: {
|
|
2876
|
-
flexDirection: horizontal ? 'row' : 'column',
|
|
2877
|
-
gap: getBoxGap(theme, boxSize)
|
|
2878
|
-
}
|
|
2879
|
-
}), [horizontal, boxSize]);
|
|
2880
|
-
return jsxRuntimeExports.jsx(Container$1, {
|
|
2881
|
-
ref: forwardedRef,
|
|
2882
|
-
onClick: onClick,
|
|
2883
|
-
styleConfig: {
|
|
2884
|
-
root: [boxStaticStyles.root, dynamicStyles.root, ...root]
|
|
2885
|
-
},
|
|
2886
|
-
children: children
|
|
2887
|
-
});
|
|
2888
|
-
});
|
|
2889
|
-
Box.displayName = 'Box';
|
|
2890
|
-
|
|
2891
|
-
const staticContainerStyles = ctDesignStyleManager.makeStyles(() => {
|
|
2892
|
-
return {
|
|
2893
|
-
root: {
|
|
2894
|
-
display: 'flex',
|
|
2895
|
-
flexDirection: 'column',
|
|
2896
|
-
pointerEvents: 'auto'
|
|
2897
|
-
}
|
|
2898
|
-
};
|
|
2899
|
-
});
|
|
2900
|
-
function getPointerEventsStyles(pointerEvents) {
|
|
2901
|
-
if (pointerEvents === 'box-none') {
|
|
2902
|
-
return {
|
|
2903
|
-
pointerEvents: 'none',
|
|
2904
|
-
'& > *': {
|
|
2905
|
-
pointerEvents: 'auto'
|
|
2906
|
-
}
|
|
2907
|
-
};
|
|
2908
|
-
}
|
|
2909
|
-
if (pointerEvents === 'box-only') {
|
|
2910
|
-
return {
|
|
2911
|
-
pointerEvents: 'auto',
|
|
2912
|
-
'& > *': {
|
|
2913
|
-
pointerEvents: 'none'
|
|
2914
|
-
}
|
|
2915
|
-
};
|
|
2916
|
-
}
|
|
2917
|
-
if (pointerEvents === 'none') {
|
|
2918
|
-
return {
|
|
2919
|
-
pointerEvents: 'none'
|
|
2920
|
-
};
|
|
2921
|
-
}
|
|
2922
|
-
return {
|
|
2923
|
-
pointerEvents: 'auto'
|
|
2924
|
-
};
|
|
2925
|
-
}
|
|
2926
|
-
const Container = React.forwardRef(({
|
|
2927
|
-
id,
|
|
2928
|
-
as: ContainerAs = 'div',
|
|
2929
|
-
children,
|
|
2930
|
-
styleConfig,
|
|
2931
|
-
onClick,
|
|
2932
|
-
onLayout,
|
|
2933
|
-
onMouseEnter,
|
|
2934
|
-
onMouseLeave,
|
|
2935
|
-
onTransitionEnd,
|
|
2936
|
-
onTouchStart,
|
|
2937
|
-
onTouchEnd,
|
|
2938
|
-
onTouchCancel,
|
|
2939
|
-
onTouchMove,
|
|
2940
|
-
pointerEvents,
|
|
2941
|
-
hitSlop: _hitSlop,
|
|
2942
|
-
hapticEnabled: _hapticEnabled,
|
|
2943
|
-
hapticVariant: _hapticVariant,
|
|
2944
|
-
hapticRepeat: _hapticRepeat
|
|
2945
|
-
}, forwardedRef) => {
|
|
2946
|
-
const localRef = React.useRef(null);
|
|
2947
|
-
const handleFocus = React.useCallback(() => {
|
|
2948
|
-
var _a;
|
|
2949
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
2950
|
-
}, []);
|
|
2951
|
-
const handleGetBoundingRect = React.useCallback(callback => {
|
|
2952
|
-
var _a;
|
|
2953
|
-
const rect = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
2954
|
-
if (rect) {
|
|
2955
|
-
callback === null || callback === void 0 ? void 0 : callback({
|
|
2956
|
-
x: rect.x,
|
|
2957
|
-
y: rect.y,
|
|
2958
|
-
width: rect.width,
|
|
2959
|
-
height: rect.height
|
|
2960
|
-
});
|
|
2961
|
-
}
|
|
2962
|
-
}, []);
|
|
2963
|
-
const handleAddEventListener = React.useCallback((type, listener, options) => {
|
|
2964
|
-
var _a;
|
|
2965
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener, options);
|
|
2966
|
-
}, []);
|
|
2967
|
-
const handleRemoveEventListener = React.useCallback((type, listener, options) => {
|
|
2968
|
-
var _a;
|
|
2969
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener, options);
|
|
2970
|
-
}, []);
|
|
2971
|
-
React.useImperativeHandle(forwardedRef, () => {
|
|
2972
|
-
var _a;
|
|
2973
|
-
return {
|
|
2974
|
-
focus: handleFocus,
|
|
2975
|
-
getBoundingRectWithCallback: handleGetBoundingRect,
|
|
2976
|
-
getElementRef: () => localRef,
|
|
2977
|
-
style: ((_a = localRef.current) === null || _a === void 0 ? void 0 : _a.style) || {},
|
|
2978
|
-
classList: {
|
|
2979
|
-
add: className => {
|
|
2980
|
-
var _a;
|
|
2981
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(className);
|
|
2982
|
-
}
|
|
2983
|
-
},
|
|
2984
|
-
measure: _callback => {
|
|
2985
|
-
var _a;
|
|
2986
|
-
(_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
2987
|
-
},
|
|
2988
|
-
addEventListener: handleAddEventListener,
|
|
2989
|
-
removeEventListener: handleRemoveEventListener
|
|
2990
|
-
};
|
|
2991
|
-
}, [handleFocus, handleGetBoundingRect, handleAddEventListener, handleRemoveEventListener]);
|
|
2992
|
-
const {
|
|
2993
|
-
root: rootStyles = []
|
|
2994
|
-
} = styleConfig || {};
|
|
2995
|
-
const pointerEventsStyle = React.useMemo(() => {
|
|
2996
|
-
if (pointerEvents == null) return null;
|
|
2997
|
-
return getPointerEventsStyles(pointerEvents);
|
|
2998
|
-
}, [pointerEvents]);
|
|
2999
|
-
const mergedRootStyles = ctDesignStyleManager.useWebMergeStyles([staticContainerStyles.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
|
|
3000
|
-
React.useLayoutEffect(() => {
|
|
3001
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3002
|
-
onLayout === null || onLayout === void 0 ? void 0 : onLayout({
|
|
3003
|
-
layout: {
|
|
3004
|
-
height: (_b = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
|
|
3005
|
-
width: (_d = (_c = localRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0,
|
|
3006
|
-
x: (_f = (_e = localRef.current) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect().x) !== null && _f !== void 0 ? _f : 0,
|
|
3007
|
-
y: (_h = (_g = localRef.current) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect().y) !== null && _h !== void 0 ? _h : 0
|
|
3008
|
-
}
|
|
3009
|
-
});
|
|
3010
|
-
}, [onLayout]);
|
|
3011
|
-
return jsxRuntimeExports.jsx(ContainerAs, {
|
|
3012
|
-
id: id,
|
|
3013
|
-
ref: localRef,
|
|
3014
|
-
className: mergedRootStyles,
|
|
3015
|
-
onClick: event => onClick === null || onClick === void 0 ? void 0 : onClick({
|
|
3016
|
-
stopPropagation: () => event.stopPropagation(),
|
|
3017
|
-
preventDefault: () => event.preventDefault(),
|
|
3018
|
-
nativeEvent: {
|
|
3019
|
-
locationX: event.clientX,
|
|
3020
|
-
locationY: event.clientY
|
|
3021
|
-
}
|
|
3022
|
-
}),
|
|
3023
|
-
onMouseEnter: onMouseEnter,
|
|
3024
|
-
onMouseLeave: onMouseLeave,
|
|
3025
|
-
onTransitionEnd: onTransitionEnd,
|
|
3026
|
-
onTouchStart: onTouchStart,
|
|
3027
|
-
onTouchEnd: onTouchEnd,
|
|
3028
|
-
onTouchCancel: onTouchCancel,
|
|
3029
|
-
onTouchMove: onTouchMove,
|
|
3030
|
-
children: children
|
|
3031
|
-
});
|
|
3032
|
-
});
|
|
3033
|
-
Container.displayName = 'Container';
|
|
3034
|
-
|
|
3035
|
-
const duration = {
|
|
3036
|
-
shortest: 150,
|
|
3037
|
-
shorter: 200,
|
|
3038
|
-
short: 250,
|
|
3039
|
-
standard: 300,
|
|
3040
|
-
complex: 375,
|
|
3041
|
-
enteringScreen: 225,
|
|
3042
|
-
leavingScreen: 195
|
|
3043
|
-
};
|
|
3044
|
-
const easing = {
|
|
3045
|
-
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
3046
|
-
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
|
|
3047
|
-
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
3048
|
-
sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
|
|
3049
|
-
};
|
|
3050
|
-
function getAutoHeightDuration(height) {
|
|
3051
|
-
if (!height) {
|
|
3052
|
-
return 0;
|
|
3053
|
-
}
|
|
3054
|
-
const constant = height / 36;
|
|
3055
|
-
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
|
2863
|
+
const constant = height / 36;
|
|
2864
|
+
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
|
3056
2865
|
}
|
|
3057
2866
|
const create = (props = ['all'], options = {}) => {
|
|
3058
2867
|
const {
|
|
@@ -3123,6 +2932,10 @@
|
|
|
3123
2932
|
onBrand: colors.orange200,
|
|
3124
2933
|
pink500: colors.pink500,
|
|
3125
2934
|
pink400: colors.pink400,
|
|
2935
|
+
calloutSuccessTitle: colors.couponGreen,
|
|
2936
|
+
calloutDangerTitle: colors.red500,
|
|
2937
|
+
calloutInfoTitle: colors.link,
|
|
2938
|
+
calloutNeutralTitle: colors.neutral900Muted,
|
|
3126
2939
|
black000: colors.black000,
|
|
3127
2940
|
blue550: colors.blue550,
|
|
3128
2941
|
green400: colors.green400,
|
|
@@ -3158,6 +2971,16 @@
|
|
|
3158
2971
|
outlinedNeutralLabel: colors.neutral900,
|
|
3159
2972
|
outlinedNeutralBorder: colors.neutral900,
|
|
3160
2973
|
outlinedNeutralBg: colors.neutral100,
|
|
2974
|
+
containedSuccessLabel: colors.neutral100,
|
|
2975
|
+
containedSuccessBg: colors.success500,
|
|
2976
|
+
outlinedSuccessLabel: colors.success500,
|
|
2977
|
+
outlinedSuccessBorder: colors.success500,
|
|
2978
|
+
outlinedSuccessBg: colors.neutral100,
|
|
2979
|
+
containedDangerLabel: colors.neutral100,
|
|
2980
|
+
containedDangerBg: colors.red500,
|
|
2981
|
+
outlinedDangerLabel: colors.red500,
|
|
2982
|
+
outlinedDangerBorder: colors.red500,
|
|
2983
|
+
outlinedDangerBg: colors.neutral100,
|
|
3161
2984
|
hover: {
|
|
3162
2985
|
[colors.neutral100]: colors.neutral100,
|
|
3163
2986
|
[colors.neutral900]: colors.neutral900,
|
|
@@ -3214,6 +3037,10 @@
|
|
|
3214
3037
|
alertSoft: colors.alert100,
|
|
3215
3038
|
warning: colors.warning,
|
|
3216
3039
|
warningLightBg: colors.warningBg,
|
|
3040
|
+
calloutSuccessBg: colors.freshGreen100,
|
|
3041
|
+
calloutDangerBg: colors.red200,
|
|
3042
|
+
calloutInfoBg: colors.blue100,
|
|
3043
|
+
calloutNeutralBg: colors.neutral300,
|
|
3217
3044
|
neutral: colors.neutral100,
|
|
3218
3045
|
disabled: colors.neutral300,
|
|
3219
3046
|
disabledSecondaryLight: colors.neutral350,
|
|
@@ -3477,7 +3304,7 @@
|
|
|
3477
3304
|
}
|
|
3478
3305
|
})
|
|
3479
3306
|
});
|
|
3480
|
-
const hover$
|
|
3307
|
+
const hover$2 = key => {
|
|
3481
3308
|
const bg = {
|
|
3482
3309
|
[colors.neutral100]: colors.neutral100,
|
|
3483
3310
|
[colors.neutral900]: colors.neutral900,
|
|
@@ -3520,7 +3347,7 @@
|
|
|
3520
3347
|
containedPrimarySoftBg: colors.blueSecondary,
|
|
3521
3348
|
containedSecondaryLabel: colors.primaryNeutral900,
|
|
3522
3349
|
containedSecondaryBg: colors.yellowSecondary,
|
|
3523
|
-
hover: hover$
|
|
3350
|
+
hover: hover$2
|
|
3524
3351
|
}),
|
|
3525
3352
|
chip: Object.assign(Object.assign({}, BaseTheme.color.chip), {
|
|
3526
3353
|
selectedPrimaryLabel: colors.link2,
|
|
@@ -3557,7 +3384,7 @@
|
|
|
3557
3384
|
}
|
|
3558
3385
|
})
|
|
3559
3386
|
});
|
|
3560
|
-
const hover = key => {
|
|
3387
|
+
const hover$1 = key => {
|
|
3561
3388
|
const bg = {
|
|
3562
3389
|
[colors.neutral100]: colors.neutral100,
|
|
3563
3390
|
[colors.brand]: colors.bgPrimaryHover,
|
|
@@ -3598,7 +3425,7 @@
|
|
|
3598
3425
|
containedTertiaryLabel: colors.superGrey300,
|
|
3599
3426
|
containedDisabledLabel: colors.disabledText,
|
|
3600
3427
|
containedPrimaryLabel: colors.neutral100,
|
|
3601
|
-
hover: hover
|
|
3428
|
+
hover: hover$1
|
|
3602
3429
|
}),
|
|
3603
3430
|
chip: Object.assign(Object.assign({}, BaseTheme.color.chip), {
|
|
3604
3431
|
selectedPrimaryLabel: colors.superBlue500,
|
|
@@ -3628,6 +3455,39 @@
|
|
|
3628
3455
|
})
|
|
3629
3456
|
})
|
|
3630
3457
|
});
|
|
3458
|
+
const hover = key => {
|
|
3459
|
+
const bg = {
|
|
3460
|
+
[colors.neutral100]: colors.neutral100,
|
|
3461
|
+
[colors.neutral900]: colors.neutral900,
|
|
3462
|
+
[colors.blue500]: colors.blue900,
|
|
3463
|
+
[colors.disabledText]: colors.disabledText,
|
|
3464
|
+
[colors.neutral300]: colors.neutral300,
|
|
3465
|
+
[colors.link2]: colors.link2Hover
|
|
3466
|
+
};
|
|
3467
|
+
return bg[key];
|
|
3468
|
+
};
|
|
3469
|
+
Object.assign(Object.assign({}, B2CTheme), {
|
|
3470
|
+
color: Object.assign(Object.assign({}, B2CTheme.color), {
|
|
3471
|
+
text: Object.assign(Object.assign({}, B2CTheme.color.text), {
|
|
3472
|
+
secondary: colors.blue500,
|
|
3473
|
+
brand: colors.blue500
|
|
3474
|
+
}),
|
|
3475
|
+
button: Object.assign(Object.assign({}, B2CTheme.color.button), {
|
|
3476
|
+
outlinedSecondaryLabel: colors.blue500,
|
|
3477
|
+
outlinedSecondaryBorder: colors.blue500,
|
|
3478
|
+
containedSecondaryBg: colors.blue500,
|
|
3479
|
+
hover
|
|
3480
|
+
}),
|
|
3481
|
+
background: Object.assign(Object.assign({}, B2CTheme.color.background), {
|
|
3482
|
+
secondary: colors.blue500,
|
|
3483
|
+
brand: colors.blue500
|
|
3484
|
+
}),
|
|
3485
|
+
border: Object.assign(Object.assign({}, B2CTheme.color.border), {
|
|
3486
|
+
secondary: colors.blue500,
|
|
3487
|
+
brand: colors.blue500
|
|
3488
|
+
})
|
|
3489
|
+
})
|
|
3490
|
+
});
|
|
3631
3491
|
Object.assign(Object.assign({}, B2CTheme), {
|
|
3632
3492
|
typography: Object.assign(Object.assign({}, B2CTheme.typography), {
|
|
3633
3493
|
fontFamily: 'Manrope'
|
|
@@ -4184,6 +4044,54 @@
|
|
|
4184
4044
|
});
|
|
4185
4045
|
};
|
|
4186
4046
|
|
|
4047
|
+
const boxStaticStyles = ctDesignStyleManager.makeStyles(() => ({
|
|
4048
|
+
root: {
|
|
4049
|
+
display: 'flex'
|
|
4050
|
+
}
|
|
4051
|
+
}));
|
|
4052
|
+
const BOX_SIZE_SPACING_KEY = {
|
|
4053
|
+
xLarge: 10,
|
|
4054
|
+
big: 8,
|
|
4055
|
+
medium: 6,
|
|
4056
|
+
small: 4,
|
|
4057
|
+
tiny: 3,
|
|
4058
|
+
micro: 2,
|
|
4059
|
+
nano: 1,
|
|
4060
|
+
pico: 1,
|
|
4061
|
+
zero: 0
|
|
4062
|
+
};
|
|
4063
|
+
function getBoxGap(theme, boxSize) {
|
|
4064
|
+
var _a, _b;
|
|
4065
|
+
const spacingKey = (_a = BOX_SIZE_SPACING_KEY[boxSize]) !== null && _a !== void 0 ? _a : 0;
|
|
4066
|
+
return (_b = theme.spacing[spacingKey]) !== null && _b !== void 0 ? _b : 0;
|
|
4067
|
+
}
|
|
4068
|
+
const Box = React.forwardRef(({
|
|
4069
|
+
children,
|
|
4070
|
+
styleConfig,
|
|
4071
|
+
horizontal = false,
|
|
4072
|
+
boxSize,
|
|
4073
|
+
onClick
|
|
4074
|
+
}, forwardedRef) => {
|
|
4075
|
+
const {
|
|
4076
|
+
root = []
|
|
4077
|
+
} = styleConfig || {};
|
|
4078
|
+
const dynamicStyles = ctDesignStyleManager.useStyles(theme => ({
|
|
4079
|
+
root: {
|
|
4080
|
+
flexDirection: horizontal ? 'row' : 'column',
|
|
4081
|
+
gap: getBoxGap(theme, boxSize)
|
|
4082
|
+
}
|
|
4083
|
+
}), [horizontal, boxSize]);
|
|
4084
|
+
return jsxRuntimeExports.jsx(Container, {
|
|
4085
|
+
ref: forwardedRef,
|
|
4086
|
+
onClick: onClick,
|
|
4087
|
+
styleConfig: {
|
|
4088
|
+
root: [boxStaticStyles.root, dynamicStyles.root, ...root]
|
|
4089
|
+
},
|
|
4090
|
+
children: children
|
|
4091
|
+
});
|
|
4092
|
+
});
|
|
4093
|
+
Box.displayName = 'Box';
|
|
4094
|
+
|
|
4187
4095
|
var Pdf = function () {
|
|
4188
4096
|
return (jsxRuntimeExports.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntimeExports.jsx("rect", { width: "40", height: "40", rx: "4", fill: "white", fillOpacity: "0.1" }), jsxRuntimeExports.jsx("path", { d: "M23.3408 7.13599C23.937 7.19527 24.4974 7.45969 24.9248 7.88696L28.6963 11.6584C29.1849 12.1471 29.46 12.8102 29.46 13.5012V28.0051C29.4598 30.6951 27.2789 32.876 24.5889 32.8762H13.4121C10.722 32.8762 8.54117 30.6952 8.54102 28.0051V11.5413C8.54123 9.10146 10.5191 7.12329 12.959 7.12329H23.083L23.3408 7.13599ZM12.959 8.70923C11.395 8.70923 10.1272 9.97736 10.127 11.5413V28.0051C10.1271 29.8193 11.5979 31.2903 13.4121 31.2903H24.5889C26.403 31.2901 27.8739 29.8192 27.874 28.0051V16.2209C27.7957 16.2468 27.712 16.262 27.625 16.262H22.1875C20.7487 16.2618 19.5822 15.0953 19.582 13.6565V8.70923H12.959ZM19.417 24.0403C19.8547 24.0405 20.2099 24.3955 20.21 24.8333C20.21 25.2711 19.8548 25.626 19.417 25.6262H14.584C14.146 25.6262 13.791 25.2712 13.791 24.8333C13.7911 24.3953 14.1461 24.0403 14.584 24.0403H19.417ZM21.625 19.2073C22.0629 19.2073 22.418 19.5623 22.418 20.0002C22.4178 20.4381 22.0629 20.7932 21.625 20.7932H14.375C13.9372 20.7931 13.5822 20.438 13.582 20.0002C13.582 19.5624 13.9372 19.2074 14.375 19.2073H21.625ZM21.168 13.6565C21.1681 14.2194 21.6246 14.6759 22.1875 14.676H27.625C27.7119 14.676 27.7958 14.6893 27.874 14.7151V13.5012C27.874 13.2308 27.7664 12.9707 27.5752 12.7795L23.8037 9.00806C23.6366 8.84104 23.4167 8.73833 23.1836 8.71509L23.083 8.70923H21.168V13.6565Z", fill: "white" })] }));
|
|
4189
4097
|
};
|