diginet-core-ui 1.3.87-beta.5 → 1.3.87-beta.6
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/components/popover/index.js +3 -3
- package/package.json +1 -1
- package/styles/general.js +4 -1
- package/styles/utils.js +15 -15
|
@@ -5,7 +5,7 @@ import OptionWrapper from "../others/option-wrapper";
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import React, { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
|
-
import { bgColor, borderRadius4px, displayFlex, displayNone, flexCol, inset, justifyBetween, overflowAuto, parseMaxWidthHeight, parseMinWidthHeight, parseWidthHeight,
|
|
8
|
+
import { bgColor, borderRadius4px, displayFlex, displayNone, flexCol, inset, justifyBetween, overflowAuto, parseMaxWidthHeight, parseMinWidthHeight, parseWidthHeight, pointerEventsInitial, pointerEventsNone, positionAbsolute, positionFixed, positionRelative } from "../../styles/general";
|
|
9
9
|
import { useTheme } from "../../theme";
|
|
10
10
|
import { classNames, isMobile, refType as ref } from "../../utils";
|
|
11
11
|
const {
|
|
@@ -507,7 +507,7 @@ const Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
507
507
|
}));
|
|
508
508
|
const PortalPopoverCSS = (zIndex, fullScreen) => css`
|
|
509
509
|
${positionFixed};
|
|
510
|
-
${fullScreen ?
|
|
510
|
+
${fullScreen ? pointerEventsInitial : pointerEventsNone};
|
|
511
511
|
${inset(0)};
|
|
512
512
|
z-index: ${zIndex};
|
|
513
513
|
`;
|
|
@@ -519,7 +519,7 @@ const PopoverContainerCSS = (bgCl, width, height) => css`
|
|
|
519
519
|
${overflowAuto};
|
|
520
520
|
${borderRadius4px};
|
|
521
521
|
${paragraph1};
|
|
522
|
-
${
|
|
522
|
+
${pointerEventsInitial};
|
|
523
523
|
${parseWidthHeight(width, height)};
|
|
524
524
|
${parseMinWidthHeight(spacing([4]))};
|
|
525
525
|
${parseMaxWidthHeight(`calc(100% - ${spacing([8])})`)};
|
package/package.json
CHANGED
package/styles/general.js
CHANGED
|
@@ -324,6 +324,9 @@ const pointerEventsAuto = css`
|
|
|
324
324
|
const pointerEventsInherit = css`
|
|
325
325
|
pointer-events: inherit;
|
|
326
326
|
`;
|
|
327
|
+
const pointerEventsInitial = css`
|
|
328
|
+
pointer-events: initial;
|
|
329
|
+
`;
|
|
327
330
|
const pointerEventsNone = css`
|
|
328
331
|
pointer-events: none;
|
|
329
332
|
`;
|
|
@@ -401,4 +404,4 @@ const whiteSpacePreWrap = css`
|
|
|
401
404
|
const z = vl => css`
|
|
402
405
|
z-index: ${zIndex(vl)};
|
|
403
406
|
`;
|
|
404
|
-
export { bgColor, bgCurrent, bgTransparent, border, borderNone, borderRadius, borderRadius100, borderRadius4px, borderRadius50, boxBorder, boxContent, breakAll, breakWord, cursorDefault, cursorInherit, cursorMove, cursorNoDrop, cursorNotAllowed, cursorPointer, cursorText, displayBlock, displayFlex, displayInlineBlock, displayInlineFlex, displayNone, flexCol, flexColReverse, shadowNone, flexNowrap, flexRow, flexRowReverse, flexShrink, flexShrink0, flexWrap, flexWrapReverse, floatLeft, floatNone, floatRight, gap, gapX, gapY, inset, insetX, insetY, italic, itemsCenter, itemsEnd, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifyStart, mg, mgb, mgl, mgr, mgt, mgx, mgy, noBorder, noBoxShadow, noMargin, noPadding, objectContain, objectCover, objectFill, objectNone, order, outlineNone, overflowAuto, overflowHidden, pd, pdb, pdl, pdr, pdt, pdx, pdy, parseHeight, parseMaxHeight, parseMaxWidth, parseMaxWidthHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidth, parseWidthHeight, pointerEventsAuto, pointerEventsInherit, pointerEventsNone, positionAbsolute, positionFixed, positionRelative, positionSticky, selfCenter, selfEnd, selfStart, textCapitalize, textCenter, textColor, textCurrent, textEllipsis, textLeft, textLineThrough, textLowercase, textRight, textunderline, textUppercase, truncate, userSelectNone, whiteSpaceBreakSpaces, whiteSpaceNoWrap, whiteSpacePreWrap, z };
|
|
407
|
+
export { bgColor, bgCurrent, bgTransparent, border, borderNone, borderRadius, borderRadius100, borderRadius4px, borderRadius50, boxBorder, boxContent, breakAll, breakWord, cursorDefault, cursorInherit, cursorMove, cursorNoDrop, cursorNotAllowed, cursorPointer, cursorText, displayBlock, displayFlex, displayInlineBlock, displayInlineFlex, displayNone, flexCol, flexColReverse, shadowNone, flexNowrap, flexRow, flexRowReverse, flexShrink, flexShrink0, flexWrap, flexWrapReverse, floatLeft, floatNone, floatRight, gap, gapX, gapY, inset, insetX, insetY, italic, itemsCenter, itemsEnd, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifyStart, mg, mgb, mgl, mgr, mgt, mgx, mgy, noBorder, noBoxShadow, noMargin, noPadding, objectContain, objectCover, objectFill, objectNone, order, outlineNone, overflowAuto, overflowHidden, pd, pdb, pdl, pdr, pdt, pdx, pdy, parseHeight, parseMaxHeight, parseMaxWidth, parseMaxWidthHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidth, parseWidthHeight, pointerEventsAuto, pointerEventsInherit, pointerEventsInitial, pointerEventsNone, positionAbsolute, positionFixed, positionRelative, positionSticky, selfCenter, selfEnd, selfStart, textCapitalize, textCenter, textColor, textCurrent, textEllipsis, textLeft, textLineThrough, textLowercase, textRight, textunderline, textUppercase, truncate, userSelectNone, whiteSpaceBreakSpaces, whiteSpaceNoWrap, whiteSpacePreWrap, z };
|
package/styles/utils.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { color as colors } from "./colors";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Parse css value
|
|
5
|
-
*
|
|
6
|
-
* @param {string | number} vl
|
|
7
|
-
* @returns {string | number}
|
|
3
|
+
/**
|
|
4
|
+
* Parse css value
|
|
5
|
+
*
|
|
6
|
+
* @param {string | number} vl
|
|
7
|
+
* @returns {string | number}
|
|
8
8
|
*/
|
|
9
9
|
export const parseCSSValue = vl => {
|
|
10
10
|
return isNaN(vl) ? vl : vl + 'px';
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Parse to pixel
|
|
15
|
-
*
|
|
16
|
-
* @param {number} vl
|
|
17
|
-
* @returns {string}
|
|
13
|
+
/**
|
|
14
|
+
* Parse to pixel
|
|
15
|
+
*
|
|
16
|
+
* @param {number} vl
|
|
17
|
+
* @returns {string}
|
|
18
18
|
*/
|
|
19
19
|
export const parseToPixel = vl => {
|
|
20
20
|
if (!vl) return '1px';
|
|
21
21
|
return typeof vl === 'string' ? vl : `${vl}px`;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Get color from CORE colors
|
|
26
|
-
*
|
|
27
|
-
* @param {string} cl
|
|
28
|
-
* @returns {string}
|
|
24
|
+
/**
|
|
25
|
+
* Get color from CORE colors
|
|
26
|
+
*
|
|
27
|
+
* @param {string} cl
|
|
28
|
+
* @returns {string}
|
|
29
29
|
*/
|
|
30
30
|
export const getColor = cl => {
|
|
31
31
|
// example param cl: primary, info, system.rest, text.main, red, #333333,...
|