kui-complex 0.0.29 → 0.0.31

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/dist/index.d.ts CHANGED
@@ -290,6 +290,7 @@ declare const Tooltip: React.ForwardRefExoticComponent<{
290
290
  placement?: PopperPlacements | undefined;
291
291
  withArrow?: boolean | undefined;
292
292
  cursor?: "auto" | "pointer" | undefined;
293
+ spacing?: string | undefined;
293
294
  } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
294
295
 
295
296
  type ButtonSelectProps = InputSelectProps
package/dist/index.es.js CHANGED
@@ -865,7 +865,7 @@ var placementsPositions = {
865
865
  };
866
866
 
867
867
  var Popper = forwardRef(function (props, ref) {
868
- var placement = props.placement; props.withArrow; var open = props.open, children = props.children, contentRef = props.contentRef, other = __rest(props, ["placement", "withArrow", "open", "children", "contentRef"]);
868
+ var placement = props.placement; props.withArrow; var open = props.open, children = props.children, contentRef = props.contentRef, spacing = props.spacing, other = __rest(props, ["placement", "withArrow", "open", "children", "contentRef", "spacing"]);
869
869
  var popperRef = useRef(null);
870
870
  var _a = useState(null), coords = _a[0], setCoords = _a[1];
871
871
  var _b = useState(null), size = _b[0], setSize = _b[1];
@@ -906,9 +906,12 @@ var Popper = forwardRef(function (props, ref) {
906
906
  // TODO подумать как реализовать правильное расположение подсказки под contentRef в зависимости от placement
907
907
  // Автоматом менять положение (верх-низ) в зависимости от того помещается или нет
908
908
  // Распожить стрелочку к контенту посередине контента
909
- return ReactDOM.createPortal(jsxs$1(Fragment$1, { children: [jsx(Global, { styles: css(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n body {\n position: relative;\n }\n "], ["\n body {\n position: relative;\n }\n "]))) }), jsx(StyledPopperWrapper, __assign({ ref: forwardedRef, style: position, className: "KUI-Popper" }, { children: jsx(StyledPopper, __assign({ open: !!open }, other, { children: children })) }))] }), document.body);
909
+ return ReactDOM.createPortal(jsxs$1(Fragment$1, { children: [jsx(Global, { styles: css(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n body {\n position: relative;\n }\n "], ["\n body {\n position: relative;\n }\n "]))) }), jsx(StyledPopperWrapper, __assign({ ref: forwardedRef, style: position, className: "KUI-Popper", spacing: spacing }, { children: jsx(StyledPopper, __assign({ open: !!open }, other, { children: children })) }))] }), document.body);
910
910
  });
911
- var StyledPopperWrapper = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: absolute;\n max-width: 215px;\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n top: auto !important;\n left: 16px !important;\n width: calc(100vw - 32px);\n max-width: unset;\n }\n"], ["\n position: absolute;\n max-width: 215px;\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n top: auto !important;\n left: 16px !important;\n width: calc(100vw - 32px);\n max-width: unset;\n }\n"])), theme.breakpoints.xxs);
911
+ var StyledPopperWrapper = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: absolute;\n max-width: 215px;\n padding: ", ";\n z-index: 10;\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n top: auto !important;\n left: 16px !important;\n width: calc(100vw - 32px);\n max-width: unset;\n }\n"], ["\n position: absolute;\n max-width: 215px;\n padding: ", ";\n z-index: 10;\n @media (max-width: ", "px) {\n position: fixed;\n bottom: 24px;\n top: auto !important;\n left: 16px !important;\n width: calc(100vw - 32px);\n max-width: unset;\n }\n"])), function (_a) {
912
+ var spacing = _a.spacing;
913
+ return spacing || 0;
914
+ }, theme.breakpoints.xxs);
912
915
  var StyledPopper = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n padding: 16px;\n border-radius: 12px;\n background: white;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-out;\n opacity: ", ";\n"], ["\n padding: 16px;\n border-radius: 12px;\n background: white;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-out;\n opacity: ", ";\n"])), function (_a) {
913
916
  var open = _a.open;
914
917
  return (open ? 1 : 0);