@trafilea/afrodita-components 5.0.0-beta.43 → 5.0.0-beta.46
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/index.d.ts +3 -1
- package/build/index.esm.js +16 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +16 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -356,7 +356,7 @@ interface IconWrapperProps {
|
|
|
356
356
|
fill?: string;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
declare const Mail: ({ height, width }: IconWrapperProps) => JSX.Element;
|
|
359
|
+
declare const Mail: ({ height, width, }: Pick<IconWrapperProps, 'width' | 'height'>) => JSX.Element;
|
|
360
360
|
|
|
361
361
|
declare const Messaging_QuestionCircle: typeof QuestionCircle;
|
|
362
362
|
declare const Messaging_Messenger: typeof Messenger;
|
|
@@ -1634,6 +1634,8 @@ declare const RadioInput: ({ name, value, id, label, checked, disabled, onChange
|
|
|
1634
1634
|
declare type PortalProps = {
|
|
1635
1635
|
id: string;
|
|
1636
1636
|
className?: string;
|
|
1637
|
+
overflow?: boolean;
|
|
1638
|
+
style?: CSSProperties;
|
|
1637
1639
|
};
|
|
1638
1640
|
declare const Portal: FC<PortalProps>;
|
|
1639
1641
|
|
package/build/index.esm.js
CHANGED
|
@@ -4007,8 +4007,12 @@ function SimpleDropdown(_a) {
|
|
|
4007
4007
|
if (value == null) {
|
|
4008
4008
|
return;
|
|
4009
4009
|
}
|
|
4010
|
+
if (options.indexOf(value) < 0) {
|
|
4011
|
+
setSelectedValue(undefined);
|
|
4012
|
+
return;
|
|
4013
|
+
}
|
|
4010
4014
|
setSelectedValue(value);
|
|
4011
|
-
}, [value]);
|
|
4015
|
+
}, [value, options]);
|
|
4012
4016
|
var Button = label ? withLabel(BaseDropdown$1.Button, label) : BaseDropdown$1.Button;
|
|
4013
4017
|
return (jsxs$1(BaseDropdown$1, __assign$1({ value: selectedValue, onChange: onChangeHandler, disabled: disabled, wide: wide }, { children: [jsx$1(Button, __assign$1({ OpenIcon: Icon.Arrows.ChevronDown, CloseIcon: Icon.Arrows.ChevronUp, wide: wide, isSortOrFilter: sort, "data-testid": testId }, { children: selectedOptionLabel }), void 0), jsx$1(BaseDropdown$1.Options, { children: options.map(function (item) { return (jsx$1(BaseDropdown$1.Option, __assign$1({ value: item, disabled: false }, { children: item.label }), item.key)); }) }, void 0)] }), void 0));
|
|
4014
4018
|
}
|
|
@@ -12608,7 +12612,7 @@ var ProductGalleryMobile = function (_a) {
|
|
|
12608
12612
|
var templateObject_1$a;
|
|
12609
12613
|
|
|
12610
12614
|
var Portal = function (_a) {
|
|
12611
|
-
var id = _a.id, className = _a.className, children = _a.children;
|
|
12615
|
+
var id = _a.id, className = _a.className, children = _a.children, overflow = _a.overflow, style = _a.style;
|
|
12612
12616
|
var _b = useState(false), mounted = _b[0], setMounted = _b[1];
|
|
12613
12617
|
var container = useRef(null);
|
|
12614
12618
|
useEffect(function () {
|
|
@@ -12622,10 +12626,19 @@ var Portal = function (_a) {
|
|
|
12622
12626
|
throw new Error("Unable to find/create container (".concat(id, ")"));
|
|
12623
12627
|
}
|
|
12624
12628
|
element.dataset.testId = id;
|
|
12625
|
-
element.style.overflow = 'hidden';
|
|
12626
12629
|
setMounted(true);
|
|
12627
12630
|
container.current = element;
|
|
12628
12631
|
}, [id]);
|
|
12632
|
+
useEffect(function () {
|
|
12633
|
+
if (!mounted) {
|
|
12634
|
+
return;
|
|
12635
|
+
}
|
|
12636
|
+
container.current.style.overflow = overflow ? 'visible' : 'hidden';
|
|
12637
|
+
for (var key in style) {
|
|
12638
|
+
// @ts-ignore
|
|
12639
|
+
container.current.style[key] = style[key];
|
|
12640
|
+
}
|
|
12641
|
+
}, [style, overflow, mounted]);
|
|
12629
12642
|
useEffect(function () {
|
|
12630
12643
|
if (mounted) {
|
|
12631
12644
|
container.current.className = className !== null && className !== void 0 ? className : '';
|