widenarrow-ui 1.0.54 → 1.0.55
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/lib/index.esm.js +25 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +25 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DropDown/DropDown.tsx +26 -4
package/lib/index.esm.js
CHANGED
|
@@ -2415,6 +2415,30 @@ var DropDown = function (_a) {
|
|
|
2415
2415
|
}
|
|
2416
2416
|
// eslint-disable-next-line
|
|
2417
2417
|
}, [isOpen, children]);
|
|
2418
|
+
// Get the origin of the animation based on the placement of the DropDown
|
|
2419
|
+
var getAnimationOrigin = function (attributes) {
|
|
2420
|
+
var placement = path(['popper', 'data-popper-placement'], attributes);
|
|
2421
|
+
switch (placement) {
|
|
2422
|
+
case 'top':
|
|
2423
|
+
case 'top-start':
|
|
2424
|
+
case 'top-end':
|
|
2425
|
+
return 'top';
|
|
2426
|
+
case 'bottom':
|
|
2427
|
+
case 'bottom-start':
|
|
2428
|
+
case 'bottom-end':
|
|
2429
|
+
return 'bottom';
|
|
2430
|
+
case 'right':
|
|
2431
|
+
case 'right-start':
|
|
2432
|
+
case 'right-end':
|
|
2433
|
+
return 'right';
|
|
2434
|
+
case 'left':
|
|
2435
|
+
case 'left-start':
|
|
2436
|
+
case 'left-end':
|
|
2437
|
+
return 'left';
|
|
2438
|
+
default:
|
|
2439
|
+
return '';
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2418
2442
|
var getChildrenListMarkup = function () {
|
|
2419
2443
|
var _a;
|
|
2420
2444
|
if (loading) {
|
|
@@ -2440,7 +2464,7 @@ var DropDown = function (_a) {
|
|
|
2440
2464
|
arrow_isDark: dark,
|
|
2441
2465
|
arrow_topIsDark: title
|
|
2442
2466
|
}), style: styles.arrow })), jsxs("div", { className: s$g('childrenContainer', (_d = {},
|
|
2443
|
-
_d["childrenContainer_".concat(
|
|
2467
|
+
_d["childrenContainer_".concat(getAnimationOrigin(attributes))] = getAnimationOrigin(attributes),
|
|
2444
2468
|
_d)), children: [title && (jsx("header", { className: s$g('headingContainer'), children: jsx(Heading, { className: s$g('heading'), type: 'h6', marginBottom: '0', color: ColorTypes.WHITE, textAlign: 'left', children: title }) })), jsx("div", { className: s$g('children', {
|
|
2445
2469
|
children_isDark: dark,
|
|
2446
2470
|
children_noFooter: !footerComponent && title,
|