diginet-core-ui 1.3.94-beta.2 → 1.3.94-beta.4

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.
@@ -20,6 +20,7 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
20
20
  popoverProp,
21
21
  style
22
22
  }, reference) => {
23
+ if (!reference) reference = useRef(null);
23
24
  const isOptionFull = optionType === 'full';
24
25
  const ref = useRef(null);
25
26
  const [openState, setOpenState] = useState(false);
@@ -1,6 +1,7 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
3
  import { css, jsx } from '@emotion/core';
4
+ import OptionWrapper from "../others/option-wrapper";
4
5
  import PropTypes from 'prop-types';
5
6
  import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
6
7
  import { boxBorder, displayBlock, displayNone, order, overflowAuto, parseWidthHeight, positionRelative } from "../../styles/general";
@@ -11,7 +12,8 @@ const ModalBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
11
12
  children,
12
13
  className,
13
14
  id,
14
- style
15
+ style,
16
+ ...props
15
17
  }, reference) => {
16
18
  if (!reference) reference = useRef(null);
17
19
  const ref = useRef(null);
@@ -31,9 +33,10 @@ const ModalBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
31
33
  ref: ref,
32
34
  id: id,
33
35
  className: classNames('DGN-UI-Modal-Body', className),
34
- style: style
36
+ style: style,
37
+ ...props
35
38
  }, children);
36
- }, [children, className, id, style]);
39
+ }, [children, className, id, style, props]);
37
40
  }));
38
41
  const ModalBodyCSS = css`
39
42
  ${displayBlock};
@@ -59,4 +62,5 @@ ModalBody.propTypes = {
59
62
  /** Style inline of component. */
60
63
  style: PropTypes.object
61
64
  };
62
- export default ModalBody;
65
+ export { ModalBody };
66
+ export default OptionWrapper(ModalBody);
@@ -1,9 +1,10 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
3
  import { css, jsx } from '@emotion/core';
4
+ import OptionWrapper from "../others/option-wrapper";
4
5
  import PropTypes from 'prop-types';
5
6
  import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
6
- import { boxBorder, flexRow, itemsCenter, justifyEnd, order, parseWidth, positionRelative } from "../../styles/general";
7
+ import { boxBorder, displayFlex, flexRow, itemsCenter, justifyEnd, order, parseWidth, positionRelative } from "../../styles/general";
7
8
  import { classNames } from "../../utils";
8
9
  import { responsivePaddingCSS } from "./header";
9
10
  const ModalFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
@@ -38,6 +39,7 @@ const ModalFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
38
39
  }, [boxShadow, children, className, id, style]);
39
40
  }));
40
41
  const ModalFooterCSS = boxShadow => css`
42
+ ${displayFlex};
41
43
  ${flexRow};
42
44
  ${positionRelative};
43
45
  ${itemsCenter};
@@ -64,4 +66,5 @@ ModalFooter.propTypes = {
64
66
  /** Style inline of component. */
65
67
  style: PropTypes.object
66
68
  };
67
- export default ModalFooter;
69
+ export { ModalFooter };
70
+ export default OptionWrapper(ModalFooter);
@@ -2,6 +2,7 @@
2
2
  /** @jsx jsx */
3
3
  import { css, jsx } from '@emotion/core';
4
4
  import { ButtonIcon, Typography } from "./..";
5
+ import OptionWrapper from "../others/option-wrapper";
5
6
  import PropTypes from 'prop-types';
6
7
  import { forwardRef, memo, useContext, useImperativeHandle, useMemo, useRef } from 'react';
7
8
  import { bgColor, boxBorder, cursorMove, displayFlex, flexRow, itemsCenter, justifyBetween, mgl, order, parseWidth, parseWidthHeight, positionRelative, truncate } from "../../styles/general";
@@ -114,4 +115,5 @@ ModalHeader.propTypes = {
114
115
  /** The content of the component if not have prop `children`. */
115
116
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
116
117
  };
117
- export default ModalHeader;
118
+ export { ModalHeader };
119
+ export default OptionWrapper(ModalHeader);
@@ -1,11 +1,12 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
3
  import { css, jsx } from '@emotion/core';
4
+ import OptionWrapper from "../others/option-wrapper";
4
5
  import PropTypes from 'prop-types';
5
6
  import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
6
7
  import { createPortal } from 'react-dom';
7
8
  import { animations } from "../../styles/animation";
8
- import { bgColor, borderRadius4px, boxBorder, cursorMove, flexCol, flexRow, justifyCenter, left, parseMaxWidthHeight, parseMinWidth, parseWidthHeight, pdt, positionAbsolute, positionRelative, top } from "../../styles/general";
9
+ import { bgColor, borderRadius, boxBorder, cursorMove, displayFlex, flexCol, flexRow, justifyCenter, left, parseMaxWidthHeight, parseMinWidth, parseWidthHeight, pdt, positionAbsolute, positionRelative, top } from "../../styles/general";
9
10
  import { useTheme } from "../../theme";
10
11
  import { classNames, useDelayUnmount } from "../../utils";
11
12
  import ModalContext from "./context";
@@ -187,6 +188,7 @@ const Modal = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
187
188
  }, [alignment, autoFocus, children, className, darkTheme, dragAnyWhere, id, moveable, moveOutScreen, onClose, open, pressESCToClose, style, width, zIndex, openState, showModal]);
188
189
  }));
189
190
  const ModalContainerCSS = (zIndex, alignment, darkTheme) => css`
191
+ ${displayFlex};
190
192
  ${flexRow};
191
193
  ${positionAbsolute}
192
194
  ${justifyCenter};
@@ -200,15 +202,16 @@ const ModalContainerCSS = (zIndex, alignment, darkTheme) => css`
200
202
  `;
201
203
  const ModalBoxCSS = (width, moveable, dragAnyWhere) => css`
202
204
  ${paragraph1};
205
+ ${displayFlex};
203
206
  ${flexCol};
204
207
  ${positionRelative};
205
- ${borderRadius4px}
208
+ ${borderRadius(4)};
206
209
  ${boxBorder};
207
210
  ${parseWidthHeight(width, 'max-content')};
208
211
  ${parseMaxWidthHeight('90%', 'calc(100% - 12px)')};
209
212
  ${parseMinWidth(150)};
210
213
  ${moveable && dragAnyWhere && cursorMove};
211
- ${bgColor('system.white')};
214
+ ${bgColor('system/white')};
212
215
  margin: 0 auto;
213
216
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
214
217
  -webkit-box-orient: vertical;
@@ -267,4 +270,5 @@ Modal.propTypes = {
267
270
  /** The z-index of component. */
268
271
  zIndex: PropTypes.number
269
272
  };
270
- export default Modal;
273
+ export { Modal };
274
+ export default OptionWrapper(Modal);
@@ -6,27 +6,18 @@ import OptionWrapper from "../others/option-wrapper";
6
6
  import { getGlobal } from "../../global";
7
7
  import PropTypes from 'prop-types';
8
8
  import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
9
- import { itemsCenter, boxBorder, cursorPointer, flexRow, justifyCenter, noPadding, parseHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidthHeight, textCenter, whiteSpaceNoWrap } from "../../styles/general";
9
+ import { bgColor, borderTop, boxBorder, cursorPointer, displayFlex, flexRow, itemsCenter, justifyCenter, mg, mgb, mgl, noPadding, parseHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidthHeight, pd, textCenter, textColor, textLeft, whiteSpaceNoWrap } from "../../styles/general";
10
10
  import { useTheme } from "../../theme";
11
11
  import { classNames, refType as ref } from "../../utils";
12
12
  const {
13
13
  colors: {
14
14
  system: {
15
- active: systemActive,
16
- white: systemWhite
17
- },
18
- line: {
19
- system: lineSystem,
20
- category: lineCategory
21
- },
22
- text: {
23
- main: textMain
15
+ active: systemActive
24
16
  }
25
17
  },
26
18
  typography: {
27
19
  paragraph2
28
- },
29
- spacing
20
+ }
30
21
  } = useTheme();
31
22
  const getLastPage = (totalItems, itemsPerPage) => {
32
23
  let _lastPage = 0;
@@ -57,7 +48,7 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
57
48
  if (!reference) reference = useRef(null);
58
49
  const ref = useRef(null);
59
50
  const timer = useRef(null);
60
- const currentPageRef = useRef(null);
51
+ const currentPageRef = useRef(currentPage);
61
52
  const numberRef = useRef(null);
62
53
  const totalRef = useRef(null);
63
54
  const [totalItemsState, setTotalItemsState] = useState(totalItems);
@@ -67,7 +58,7 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
67
58
  const [disablePrevState, setDisablePrevState] = useState(true);
68
59
  const [disableNextState, setDisableNextState] = useState(!(totalItems > itemsPerPage));
69
60
  const [inputPageValue, setInputPageValue] = useState(currentPage);
70
- const _pagingInfoCSS = pagingInfoCSS(bgColor, typeShort);
61
+ const _PagingInfoCSS = PagingInfoCSS(bgColor, typeShort);
71
62
  const _onChangePage = async ({
72
63
  page,
73
64
  e,
@@ -296,7 +287,7 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
296
287
  const showPaging = checkShowPaging();
297
288
  return showPaging ? jsx("div", {
298
289
  ref: ref,
299
- css: _pagingInfoCSS,
290
+ css: _PagingInfoCSS,
300
291
  id: id,
301
292
  style: style,
302
293
  className: classNames('DGN-UI-PagingInfo', className)
@@ -363,9 +354,7 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
363
354
  totalRef.current = refs;
364
355
  setWithNumber(refs, null);
365
356
  },
366
- css: css`
367
- ${whiteSpaceNoWrap}
368
- `,
357
+ css: whiteSpaceNoWrap,
369
358
  type: 'p2'
370
359
  }, lastPage)), jsx(ButtonIcon, {
371
360
  circular: true,
@@ -412,7 +401,7 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
412
401
  }, typeShort ? jsx(Divider, {
413
402
  direction: 'vertical',
414
403
  height: 24,
415
- color: lineCategory
404
+ color: 'line/category'
416
405
  }) : getGlobal('lineNumber'), jsx(Dropdown, {
417
406
  allowSearch: false,
418
407
  viewType: 'underlined',
@@ -435,57 +424,59 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
435
424
  }, typeShort ? jsx(Divider, {
436
425
  direction: 'vertical',
437
426
  height: 24,
438
- color: lineCategory
427
+ color: 'line/category'
439
428
  }) : getGlobal('total') + ':', totalItemsState)) : null;
440
429
  }, [bgColor, className, hideWithPage, style, typeShort, currentPageState, disableNextState, disablePrevState, inputPageValue, itemsPerPageState, listPerPageState, totalItemsState]);
441
430
  }));
442
431
  const ViewNumberInput = css`
432
+ ${displayFlex};
443
433
  ${flexRow};
444
434
  ${itemsCenter};
445
435
  ${justifyCenter};
436
+ ${mg([0, 1])};
446
437
  transition: all 0.1s;
447
- margin: ${spacing([0, 1])};
448
438
  `;
449
- const pagingInfoCSS = (bgColor, typeShort) => css`
439
+ const PagingInfoCSS = (bgCl, typeShort) => css`
440
+ ${displayFlex};
450
441
  ${flexRow};
451
442
  ${itemsCenter};
452
443
  ${paragraph2};
453
444
  ${boxBorder};
454
445
  ${parseHeight(40)};
455
- border-top: solid 1px ${lineSystem};
456
- padding: ${spacing([1, 0])};
457
- background-color: ${bgColor};
458
- color: ${textMain};
446
+ ${borderTop(1, 'line/system')};
447
+ ${pd([1, 0])};
448
+ ${bgColor(bgCl)};
449
+ ${textColor('text/main')};
459
450
  .inputPage {
460
451
  ${textCenter};
461
- margin: ${spacing([0, 0.5])};
452
+ ${mg([0, 0.5])};
462
453
  .DGN-UI-InputBase {
463
454
  ${noPadding};
464
455
  input {
465
456
  ${paragraph2};
466
457
  ${textCenter};
467
- color: ${systemActive};
468
- text-align: left;
458
+ ${textColor('system/active')};
459
+ ${textLeft};
469
460
  }
470
461
  }
471
462
  }
472
463
  .txt-line-number {
464
+ ${displayFlex};
473
465
  ${whiteSpaceNoWrap};
474
466
  ${itemsCenter};
475
467
  opacity: 0;
476
- display: flex !important;
477
468
  transition: opacity 0.3s ease;
478
469
  }
479
470
  .DGN-UI-Divider {
480
- margin: ${spacing([0, 2])};
471
+ ${mg([0, 2])};
481
472
  }
482
473
  .DGN-UI-Dropdown {
483
- margin-left: ${`${spacing(typeShort ? [0] : [2])}`};
484
- margin-bottom: 0;
474
+ ${mgl([typeShort ? 0 : 2])};
475
+ ${mgb(0)};
485
476
  ${parseMinWidth(52)};
486
477
  .DGN-UI-Dropdown-Form {
487
478
  ${parseMinHeight(24)};
488
- padding: 0;
479
+ ${pd(0)};
489
480
  input,
490
481
  span {
491
482
  ${paragraph2};
@@ -493,7 +484,7 @@ const pagingInfoCSS = (bgColor, typeShort) => css`
493
484
  ${cursorPointer};
494
485
  }
495
486
  .DGN-UI-Dropdown-Icon {
496
- margin-left: ${spacing([1.5])};
487
+ ${mgl([1.5])};
497
488
  div,
498
489
  span,
499
490
  svg {
@@ -504,16 +495,17 @@ const pagingInfoCSS = (bgColor, typeShort) => css`
504
495
  }
505
496
  }
506
497
  .total-items {
507
- ${whiteSpaceNoWrap};
498
+ ${displayFlex};
508
499
  ${flexRow};
500
+ ${whiteSpaceNoWrap};
509
501
  ${itemsCenter};
510
- margin-left: ${`${spacing(typeShort ? [0] : [4])}`};
502
+ ${mgl([typeShort ? 0 : 4])};
511
503
  opacity: 0;
512
504
  transition: opacity 0.3s ease;
513
505
  }
514
506
  `;
515
507
  PagingInfo.defaultProps = {
516
- bgColor: systemWhite,
508
+ bgColor: 'system/white',
517
509
  className: '',
518
510
  currentPage: 0,
519
511
  hideWithPage: 'none',
@@ -572,8 +564,19 @@ PagingInfo.propTypes = {
572
564
  * * @param {per} - number
573
565
  * * setTotalItems(items): Set total items
574
566
  * * @param {items} - number
567
+ *
568
+ * * option(): Gets all UI component properties
569
+ * * Returns value - object
570
+ * * option(optionName): Gets the value of a single property
571
+ * * @param {optionName} - string
572
+ * * Returns value - any
573
+ * * option(optionName, optionValue): Updates the value of a single property
574
+ * * @param {optionName} - string
575
+ * * @param {optionValue} - any
576
+ * * option(options): Updates the values of several properties
577
+ * * @param {options} - object
575
578
  */
576
- reference: ref
579
+ ref: ref
577
580
  };
578
581
  export { PagingInfo };
579
582
  export default OptionWrapper(PagingInfo);
@@ -1,13 +1,14 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, useState, useRef, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
4
- import PropTypes from 'prop-types';
5
- import { jsx, css } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/core';
4
+ import { ButtonIcon } from "./..";
6
5
  import OptionWrapper from "../others/option-wrapper";
7
6
  import { getGlobal } from "../../global";
8
- import theme from "../../theme/settings";
9
- import { itemsCenter, boxBorder, flexRow, parseHeight } from "../../styles/general";
10
- import { ButtonIcon } from '..';
7
+ import PropTypes from 'prop-types';
8
+ import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
9
+ import { boxBorder, flexRow, itemsCenter, parseHeight } from "../../styles/general";
10
+ import { useTheme } from "../../theme";
11
+ import { refType as ref } from "../../utils";
11
12
  import { useElementSize } from "../../utils/useElementSize";
12
13
  const {
13
14
  colors: {
@@ -22,7 +23,7 @@ const {
22
23
  paragraph2
23
24
  },
24
25
  spacing
25
- } = theme;
26
+ } = useTheme();
26
27
  const getLastPage = (totalItems, itemsPerPage) => {
27
28
  let _lastPage = 0;
28
29
  if (totalItems && totalItems >= 0 && itemsPerPage && itemsPerPage > 0) {
@@ -49,7 +50,7 @@ const PagingSelector = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
49
50
  }, reference) => {
50
51
  const ref = useRef(null);
51
52
  const timer = useRef(null);
52
- const currentPageRef = useRef(null);
53
+ const currentPageRef = useRef(currentPage);
53
54
  const [totalItemsState, setTotalItemsState] = useState(totalItems);
54
55
  const [itemsPerPageState, setItemsPerPageState] = useState(itemsPerPage || 10);
55
56
  const [currentPageState, setCurrentPageState] = useState(currentPage);
@@ -377,9 +378,7 @@ PagingSelector.propTypes = {
377
378
  * * setTotalItems(items): Set total items
378
379
  * * @param {items} - number
379
380
  */
380
- reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
381
- current: PropTypes.instanceOf(Element)
382
- })])
381
+ ref: ref
383
382
  };
384
383
  export { PagingSelector };
385
384
  export default OptionWrapper(PagingSelector);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.94-beta.2",
3
+ "version": "1.3.94-beta.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",
@@ -68,6 +68,6 @@
68
68
  "react-dom": "^17.0.1",
69
69
  "rimraf": "^3.0.2",
70
70
  "run-script-os": "^1.1.6",
71
- "sass": "^1.37.0"
71
+ "sass": "1.58.3"
72
72
  }
73
73
  }
@@ -0,0 +1,13 @@
1
+ import { keyframes } from '@emotion/core';
2
+ const fadeIn = keyframes`
3
+ from {
4
+ opacity: 0;
5
+ }
6
+
7
+ to {
8
+ opacity: 1;
9
+ }
10
+ `;
11
+ export const animations = {
12
+ fadeIn
13
+ };
package/styles/colors.js CHANGED
@@ -301,7 +301,8 @@ color.fill = {
301
301
  tooltip: hexToRGBA(color.dark, 0.9),
302
302
  focus: color.blue16,
303
303
  focusshd: hexToRGBA(color.dark, 0.1),
304
- headerUI: color.dark13
304
+ headerUI: color.dark13,
305
+ 'header-datagrid': color.brand1
305
306
  };
306
307
  color.text = {
307
308
  main: color.dark,
package/styles/general.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { css } from '@emotion/core';
2
+ import { animations } from "./animations";
2
3
  import { getColor, parseCSSValue, parseToPixel } from "./utils";
3
4
  export const rootSpacing = 4;
4
5
  export let rootZIndex = 1500;
@@ -43,6 +44,13 @@ export const setZIndex = number => {
43
44
  };
44
45
 
45
46
  // Common CSS
47
+ const animation = ({
48
+ keyframes = animations.fadeIn,
49
+ duration = '0.5s',
50
+ timingFunction = 'ease'
51
+ }) => css`
52
+ animation: ${keyframes} ${duration} ${timingFunction};
53
+ `;
46
54
  const bgColor = cl => css`
47
55
  background-color: ${getColor(cl)};
48
56
  `;
@@ -53,10 +61,10 @@ const bgTransparent = css`
53
61
  background-color: transparent;
54
62
  `;
55
63
  const border = (withVl, colorVl) => css`
56
- border: ${parseToPixel(withVl)} solid ${getColor(colorVl || 'system.dark')};
64
+ border: ${parseToPixel(withVl)} solid ${getColor(colorVl || 'system/dark')};
57
65
  `;
58
66
  const borderBottom = (withVl, colorVl) => css`
59
- border-bottom: ${parseToPixel(withVl)} solid ${getColor(colorVl || 'system.dark')};
67
+ border-bottom: ${parseToPixel(withVl)} solid ${getColor(colorVl || 'system/dark')};
60
68
  `;
61
69
  const borderBottomColor = cl => css`
62
70
  border-bottom-color: ${getColor(cl)};
@@ -82,6 +90,12 @@ const borderRadius4px = css`
82
90
  const borderRadius50 = css`
83
91
  border-radius: 50%;
84
92
  `;
93
+ const borderTop = (withVl, colorVl) => css`
94
+ border-top: ${parseToPixel(withVl)} solid ${getColor(colorVl || 'system/dark')};
95
+ `;
96
+ const borderTopColor = cl => css`
97
+ border-top-color: ${getColor(cl)};
98
+ `;
85
99
  const bottom = vl => css`
86
100
  bottom: ${parseCSSValue(vl)};
87
101
  `;
@@ -464,4 +478,4 @@ const whiteSpacePreWrap = css`
464
478
  const z = vl => css`
465
479
  z-index: ${zIndex(vl)};
466
480
  `;
467
- export { bgColor, bgCurrent, bgTransparent, border, borderBottom, borderBottomColor, borderColor, borderDashed, borderNone, borderRadius, borderRadius100, borderRadius4px, borderRadius50, bottom, boxBorder, boxContent, breakAll, breakWord, cursorDefault, cursorInherit, cursorInitial, cursorMove, cursorNoDrop, cursorNotAllowed, cursorPointer, cursorText, displayBlock, displayFlex, displayInlineBlock, displayInlineFlex, displayNone, fill, flexCol, flexColReverse, flexNowrap, flexRow, flexRowReverse, flexShrink, flexShrink0, flexWrap, flexWrapReverse, floatLeft, floatNone, floatRight, gap, gapX, gapY, inset, insetX, insetY, invisible, italic, itemsCenter, itemsEnd, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifyStart, left, listNone, mg, mgb, mgl, mgr, mgt, mgx, mgy, noBorder, noBoxShadow, noMargin, noPadding, objectContain, objectCover, objectFill, objectNone, order, outlineNone, overflowAuto, overflowHidden, parseHeight, parseMaxHeight, parseMaxWidth, parseMaxWidthHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidth, parseWidthHeight, pd, pdb, pdl, pdr, pdt, pdx, pdy, pointerEventsAuto, pointerEventsInherit, pointerEventsInitial, pointerEventsNone, positionAbsolute, positionFixed, positionRelative, positionSticky, right, scale, scaleX, scaleY, selfCenter, selfEnd, selfStart, shadowNone, textCapitalize, textCenter, textColor, textCurrent, textEllipsis, textLeft, textLineThrough, textLowercase, textRight, textSentence, textUnderline, textUppercase, top, truncate, userSelectNone, visible, whiteSpaceBreakSpaces, whiteSpaceNoWrap, whiteSpacePreWrap, z };
481
+ export { animation, bgColor, bgCurrent, bgTransparent, border, borderBottom, borderBottomColor, borderColor, borderDashed, borderNone, borderRadius, borderRadius100, borderRadius4px, borderRadius50, borderTop, borderTopColor, bottom, boxBorder, boxContent, breakAll, breakWord, cursorDefault, cursorInherit, cursorInitial, cursorMove, cursorNoDrop, cursorNotAllowed, cursorPointer, cursorText, displayBlock, displayFlex, displayInlineBlock, displayInlineFlex, displayNone, fill, flexCol, flexColReverse, flexNowrap, flexRow, flexRowReverse, flexShrink, flexShrink0, flexWrap, flexWrapReverse, floatLeft, floatNone, floatRight, gap, gapX, gapY, inset, insetX, insetY, invisible, italic, itemsCenter, itemsEnd, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifyStart, left, listNone, mg, mgb, mgl, mgr, mgt, mgx, mgy, noBorder, noBoxShadow, noMargin, noPadding, objectContain, objectCover, objectFill, objectNone, order, outlineNone, overflowAuto, overflowHidden, parseHeight, parseMaxHeight, parseMaxWidth, parseMaxWidthHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidth, parseWidthHeight, pd, pdb, pdl, pdr, pdt, pdx, pdy, pointerEventsAuto, pointerEventsInherit, pointerEventsInitial, pointerEventsNone, positionAbsolute, positionFixed, positionRelative, positionSticky, right, scale, scaleX, scaleY, selfCenter, selfEnd, selfStart, shadowNone, textCapitalize, textCenter, textColor, textCurrent, textEllipsis, textLeft, textLineThrough, textLowercase, textRight, textSentence, textUnderline, textUppercase, top, truncate, userSelectNone, visible, whiteSpaceBreakSpaces, whiteSpaceNoWrap, whiteSpacePreWrap, z };
package/utils/index.js CHANGED
@@ -12,12 +12,14 @@ export { default as parseTextToHTML } from "./parseHTML";
12
12
  export { default as promisify } from "./promisify";
13
13
  export { default as randomString } from "./randomString";
14
14
  export { default as refType } from "./refType";
15
+ export { default as refMethodType } from "./refMethodType";
15
16
  export { default as removeUnicode } from "./remove-unicode";
16
17
  export { default as renderHTML } from "./renderHTML";
17
18
  export { default as renderIcon } from "./renderIcon";
18
19
  export { default as SbTemplate } from "./sb-template";
19
20
  export { default as updatePosition } from "./updatePosition";
20
21
  export { default as useDelayUnmount } from "./useDelayUnmount";
22
+ export { default as useElementSize } from "./useElementSize";
21
23
  export { default as useInput } from "./useInput";
22
24
  export { default as useIntersection } from "./intersectionObserver";
23
25
  export { default as useMediaQuery } from "./useMediaQuery";
@@ -0,0 +1,6 @@
1
+ const refMethodType = (props, propName, componentName) => {
2
+ if (propName in props) {
3
+ return new Error(`Invalid prop ${propName} passed to ${componentName}. Don't use this prop! This prop only used for showing ref methods on storybook!`);
4
+ }
5
+ };
6
+ export default refMethodType;
@@ -51,4 +51,5 @@ export const useElementSize = () => {
51
51
  handleSize();
52
52
  }, [ref === null || ref === void 0 ? void 0 : ref.offsetHeight, ref === null || ref === void 0 ? void 0 : ref.offsetWidth]);
53
53
  return [setRef, size];
54
- };
54
+ };
55
+ export default useElementSize;