diginet-core-ui 1.3.84-beta.1 → 1.3.85-beta.1

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.
Files changed (47) hide show
  1. package/components/accordion/css.js +10 -10
  2. package/components/accordion/details.js +2 -2
  3. package/components/alert/index.js +3 -3
  4. package/components/alert/notify.js +12 -12
  5. package/components/avatar/index.js +22 -22
  6. package/components/badge/index.js +24 -24
  7. package/components/button/icon.js +30 -30
  8. package/components/button/index.js +22 -22
  9. package/components/button/more.js +15 -15
  10. package/components/card/index.js +6 -6
  11. package/components/chip/index.js +7 -7
  12. package/components/form-control/attachment/index.js +34 -34
  13. package/components/form-control/calendar/function.js +118 -118
  14. package/components/form-control/checkbox/index.js +10 -10
  15. package/components/form-control/date-picker/index.js +2 -2
  16. package/components/form-control/date-range-picker/index.js +8 -8
  17. package/components/form-control/dropdown/index.js +298 -366
  18. package/components/form-control/dropdown-box/index.js +2 -2
  19. package/components/form-control/input-base/index.js +5 -5
  20. package/components/form-control/radio/index.js +9 -9
  21. package/components/form-control/toggle/index.js +6 -6
  22. package/components/grid/index.js +2 -2
  23. package/components/image/index.js +3 -3
  24. package/components/modal/body.js +2 -2
  25. package/components/modal/footer.js +3 -3
  26. package/components/modal/header.js +3 -3
  27. package/components/modal/modal.js +2 -2
  28. package/components/paging/page-info.js +29 -29
  29. package/components/paging/page-selector2.js +26 -26
  30. package/components/popover/footer.js +3 -3
  31. package/components/popover/header.js +3 -3
  32. package/components/popup/v2/index.js +18 -18
  33. package/components/rating/index.js +12 -12
  34. package/components/slider/slider-container.js +5 -5
  35. package/components/status/index.js +4 -4
  36. package/components/tab/tab-header.js +4 -4
  37. package/components/tab/tab-panel.js +4 -4
  38. package/components/tab/tab.js +9 -9
  39. package/components/tooltip/index.js +2 -2
  40. package/components/tree-view/css.js +4 -4
  41. package/components/tree-view/index.js +42 -42
  42. package/icons/effect.js +17 -17
  43. package/package.json +1 -1
  44. package/readme.md +5 -0
  45. package/styles/general.js +199 -35
  46. package/styles/utils.js +20 -10
  47. package/utils/sb-template.js +2 -2
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/core';
2
2
  import theme from "../../theme/settings";
3
- import { alignCenter, backgroundTransparent, borderBox, borderRadius4px, breakWord, cursorPointer, displayInlineBlock, flexRow, flexRowReverse, inlineFlex, justifyBetween, justifyCenter, justifyEnd, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from "../../styles/general";
3
+ import { itemsCenter, bgTransparent, boxBorder, borderRadius4px, breakWord, cursorPointer, displayInlineBlock, flexRow, flexRowReverse, displayInlineFlex, justifyBetween, justifyCenter, justifyEnd, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from "../../styles/general";
4
4
  const {
5
5
  colors: {
6
6
  system: {
@@ -24,9 +24,9 @@ export const SummaryRootCSS = background => css`
24
24
  ${flexRow};
25
25
  ${positionRelative};
26
26
  ${justifyBetween};
27
- ${alignCenter};
27
+ ${itemsCenter};
28
28
  ${cursorPointer};
29
- ${borderBox};
29
+ ${boxBorder};
30
30
  ${borderRadius4px};
31
31
  width: 100%;
32
32
  min-height: 56px;
@@ -39,14 +39,14 @@ export const SummaryRootCSS = background => css`
39
39
  &:active,
40
40
  &:focus,
41
41
  &:hover {
42
- ${backgroundTransparent};
42
+ ${bgTransparent};
43
43
  color: ${active};
44
44
  }
45
45
  }
46
46
  .Accordion-Icon-Root {
47
47
  ${flexRow};
48
48
  .Accordion-Icon.rotate-able {
49
- ${borderBox};
49
+ ${boxBorder};
50
50
  ${parseWidthHeight(24, 24)};
51
51
  &:not(.TreeView) {
52
52
  transform: rotateZ(0deg);
@@ -117,7 +117,7 @@ export const SummaryRootCSS = background => css`
117
117
  &.treeview-disabled {
118
118
  ${pointerEventsNone};
119
119
  &:hover {
120
- ${backgroundTransparent};
120
+ ${bgTransparent};
121
121
  }
122
122
  .TreeView-Item {
123
123
  color: ${systemDisabled};
@@ -133,8 +133,8 @@ export const SummaryRootCSS = background => css`
133
133
  ${positionRelative};
134
134
  ${breakWord};
135
135
  ${userSelectNone};
136
- ${borderBox}
137
- ${alignCenter};
136
+ ${boxBorder}
137
+ ${itemsCenter};
138
138
  color: ${active};
139
139
  width: 100%;
140
140
  min-height: 24px;
@@ -159,9 +159,9 @@ export const SummaryRootCSS = background => css`
159
159
  transition: transform 200ms linear;
160
160
  }
161
161
  .effect {
162
- ${inlineFlex};
162
+ ${displayInlineFlex};
163
163
  ${justifyCenter};
164
- ${alignCenter};
164
+ ${itemsCenter};
165
165
  ${cursorPointer};
166
166
  min-width: 24px;
167
167
  max-width: 34px;
@@ -3,7 +3,7 @@
3
3
  import { memo, forwardRef, useRef, useMemo, useImperativeHandle } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { jsx, css } from '@emotion/core';
6
- import { borderBox, displayBlock, overflowHidden, parseHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
6
+ import { boxBorder, displayBlock, overflowHidden, parseHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
7
7
  import { classNames } from "../../utils";
8
8
  import theme from "../../theme/settings";
9
9
  const {
@@ -54,7 +54,7 @@ const DetailsRootCSS = css`
54
54
  ${parseHeight(0)};
55
55
  transition: height 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
56
56
  .DGN-UI-Accordion-Details-Content {
57
- ${borderBox};
57
+ ${boxBorder};
58
58
  ${paragraph1};
59
59
  padding: ${spacing([0, 6, 4, 6])};
60
60
  color: ${main};
@@ -9,7 +9,7 @@ import Icon from "../../icons";
9
9
  import { hexToRGBA } from "../../styles/color-helper";
10
10
  import { animations } from "../../styles/animation";
11
11
  import { classNames, useDelayUnmount } from "../../utils";
12
- import { alignCenter, border, borderBox, borderRadius4px, breakWord, displayBlock, flexRow, justifyStart, positionRelative, userSelectNone } from "../../styles/general";
12
+ import { itemsCenter, border, boxBorder, borderRadius4px, breakWord, displayBlock, flexRow, justifyStart, positionRelative, userSelectNone } from "../../styles/general";
13
13
  import { useTheme, useColor as colors } from "../../theme";
14
14
  const {
15
15
  colors: {
@@ -167,7 +167,7 @@ const AlertContainerCSS = size => css`
167
167
  const AlertInfoCSS = (mainColor, opacityColor) => css`
168
168
  ${flexRow};
169
169
  ${positionRelative};
170
- ${borderBox};
170
+ ${boxBorder};
171
171
  ${borderRadius4px};
172
172
  ${breakWord};
173
173
  ${border(1, mainColor)};
@@ -193,7 +193,7 @@ const AlertTextCSS = clearAble => css`
193
193
  const AlertPrimaryCSS = (secondary, size) => css`
194
194
  ${flexRow};
195
195
  ${positionRelative};
196
- ${alignCenter};
196
+ ${itemsCenter};
197
197
  ${justifyStart};
198
198
  ${userSelectNone};
199
199
  ${secondary ? primaryTypoMap.get(size) : paragraph1};
@@ -7,7 +7,7 @@ import { jsx, css } from '@emotion/core';
7
7
  import Alert from "./";
8
8
  import theme from "../../theme/settings";
9
9
  import { classNames, refType as ref } from "../../utils";
10
- import { backgroundTransparent, pointerEventsNone, positionFixed } from "../../styles/general";
10
+ import { bgTransparent, pointerEventsNone, positionFixed } from "../../styles/general";
11
11
  const {
12
12
  zIndex: zIndexCORE
13
13
  } = theme;
@@ -90,7 +90,7 @@ const Notify = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
90
90
  const AlertCSS = css`
91
91
  ${positionFixed};
92
92
  ${pointerEventsNone};
93
- ${backgroundTransparent};
93
+ ${bgTransparent};
94
94
  z-index: ${zIndexCORE(2)};
95
95
  `;
96
96
  Notify.defaultProps = {
@@ -104,9 +104,9 @@ Notify.defaultProps = {
104
104
  Notify.propTypes = {
105
105
  /** Class for component. */
106
106
  className: PropTypes.string,
107
- /**
108
- * used to set position of Alert (is a string or an object)
109
- * string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
107
+ /**
108
+ * used to set position of Alert (is a string or an object)
109
+ * string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
110
110
  */
111
111
  position: PropTypes.oneOfType([PropTypes.oneOf(['center']), PropTypes.shape({
112
112
  horizontal: PropTypes.oneOf(['center', 'left', 'right']),
@@ -116,13 +116,13 @@ Notify.propTypes = {
116
116
  style: PropTypes.object,
117
117
  /** Any [props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) of Alert */
118
118
  props: PropTypes.any,
119
- /**
120
- * ref methods (ref.current.instance.*method*)
121
- *
122
- * * show(message, option): Show notify
123
- * * @param {message} - number
124
- * * @param {options} - object
125
- * * {[Props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) applied to the `Alert`.}
119
+ /**
120
+ * ref methods (ref.current.instance.*method*)
121
+ *
122
+ * * show(message, option): Show notify
123
+ * * @param {message} - number
124
+ * * @param {options} - object
125
+ * * {[Props](https://core.diginet.com.vn/ui/?path=/docs/alert--basic) applied to the `Alert`.}
126
126
  */
127
127
  reference: ref
128
128
  };
@@ -6,7 +6,7 @@ import { ButtonIcon, ModalSample, Popover, Popup, Typography } from "./..";
6
6
  import { getGlobal } from "../../global";
7
7
  import PropTypes from 'prop-types';
8
8
  import { forwardRef, Fragment, isValidElement, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
9
- import { alignCenter, borderNone, displayBlock, displayNone, flexCol, inlineFlex, overflowHidden, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from "../../styles/general";
9
+ import { itemsCenter, borderNone, displayBlock, displayNone, flexCol, displayInlineFlex, overflowHidden, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from "../../styles/general";
10
10
  import { useTheme } from "../../theme";
11
11
  import { classNames, isMobile, randomString } from "../../utils";
12
12
  import { useIntersection } from "../../utils/intersectionObserver";
@@ -323,9 +323,9 @@ const AvatarPreviewCSS = readOnly => css`
323
323
  cursor: ${readOnly ? 'initial' : 'pointer'};
324
324
  `;
325
325
  const AvatarContainerCSS = (AvatarPreviewCSSName, ActionIconCSSName) => css`
326
- ${inlineFlex};
326
+ ${displayInlineFlex};
327
327
  ${positionRelative};
328
- ${alignCenter};
328
+ ${itemsCenter};
329
329
  &.disabled {
330
330
  .css-${AvatarPreviewCSSName} {
331
331
  ${pointerEventsNone}
@@ -398,14 +398,14 @@ Avatar.propTypes = {
398
398
  className: PropTypes.string,
399
399
  /** If `true`, display remove avatar icon. */
400
400
  clearAble: PropTypes.bool,
401
- /**
402
- * data to display when hoverAble is true<br />
403
- * data is an object or function return a jsx element
401
+ /**
402
+ * data to display when hoverAble is true<br />
403
+ * data is an object or function return a jsx element
404
404
  */
405
405
  data: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.node]),
406
- /**
407
- * it is used to display the default if there is no src<br />
408
- * if undefined, will display icons available in the icons store
406
+ /**
407
+ * it is used to display the default if there is no src<br />
408
+ * if undefined, will display icons available in the icons store
409
409
  */
410
410
  defaultSrc: PropTypes.string,
411
411
  /** the direction to display more info */
@@ -442,19 +442,19 @@ Avatar.propTypes = {
442
442
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
443
443
  /** the error to show on wrong type */
444
444
  wrongTypeError: PropTypes.string,
445
- /**
446
- * ref methods
447
- *
448
- * * option(): Gets all UI component properties
449
- * * Returns value - object
450
- * * option(optionName): Gets the value of a single property
451
- * * @param {optionName} - string
452
- * * Returns value - any
453
- * * option(optionName, optionValue): Updates the value of a single property
454
- * * @param {optionName} - string
455
- * * @param {optionValue} - any
456
- * * option(options): Updates the values of several properties
457
- * * @param {options} - object
445
+ /**
446
+ * ref methods
447
+ *
448
+ * * option(): Gets all UI component properties
449
+ * * Returns value - object
450
+ * * option(optionName): Gets the value of a single property
451
+ * * @param {optionName} - string
452
+ * * Returns value - any
453
+ * * option(optionName, optionValue): Updates the value of a single property
454
+ * * @param {optionName} - string
455
+ * * @param {optionValue} - any
456
+ * * option(options): Updates the values of several properties
457
+ * * @param {options} - object
458
458
  */
459
459
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
460
460
  current: PropTypes.instanceOf(Element)
@@ -5,7 +5,7 @@ import { Icon } from "./..";
5
5
  import OptionWrapper from "../others/option-wrapper";
6
6
  import PropTypes from 'prop-types';
7
7
  import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
8
- import { alignCenter, borderBox, borderRadius4px, flexRow, flexWrap, inlineFlex, justifyCenter, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative } from "../../styles/general";
8
+ import { itemsCenter, boxBorder, borderRadius4px, flexRow, flexWrap, displayInlineFlex, justifyCenter, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative } from "../../styles/general";
9
9
  import { useColor as colors, useTheme } from "../../theme";
10
10
  import { classNames, refType as ref } from "../../utils";
11
11
  const {
@@ -137,10 +137,10 @@ const Badge = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
137
137
  const BadgeNumberCSS = (typographySize, children, name, dotSize, dotColor) => css`
138
138
  ${typographySize};
139
139
  ${flexRow};
140
- ${alignCenter};
140
+ ${itemsCenter};
141
141
  ${justifyCenter};
142
142
  ${flexWrap};
143
- ${borderBox};
143
+ ${boxBorder};
144
144
  ${pointerEventsNone};
145
145
  ${children || name ? positionAbsolute : positionRelative};
146
146
  color: ${systemWhite};
@@ -150,11 +150,11 @@ const BadgeNumberCSS = (typographySize, children, name, dotSize, dotColor) => cs
150
150
  padding: ${spacing([0, 1])};
151
151
  `;
152
152
  const BadgeRootCSS = (children, name, dotPos, BadgeNumberCSSName) => css`
153
- ${inlineFlex};
154
- ${alignCenter};
153
+ ${displayInlineFlex};
154
+ ${itemsCenter};
155
155
  ${justifyCenter};
156
156
  ${positionRelative};
157
- ${borderBox};
157
+ ${boxBorder};
158
158
  ${borderRadius4px};
159
159
  ${parseWidthHeight('max-content')};
160
160
  ${parseMinWidthHeight('max-content')};
@@ -201,28 +201,28 @@ Badge.propTypes = {
201
201
  name: PropTypes.string,
202
202
  /** Controls whether the badge is hidden when `content` is zero. */
203
203
  showZero: PropTypes.bool,
204
- /** Size of the components.
205
- *
206
- * * medium (dot 8px, typography p3)
207
- * * large (button 10px, typography p2)
208
- * * giant (button 12px, typography p1)
204
+ /** Size of the components.
205
+ *
206
+ * * medium (dot 8px, typography p3)
207
+ * * large (button 10px, typography p2)
208
+ * * giant (button 12px, typography p1)
209
209
  * */
210
210
  size: PropTypes.oneOf(['medium', 'large', 'giant']),
211
211
  /** Style inline of component. */
212
212
  style: PropTypes.object,
213
- /**
214
- * ref methods (ref.current.instance.*method*)
215
- *
216
- * * option(): Gets all UI component properties
217
- * * Returns value - object
218
- * * option(optionName): Gets the value of a single property
219
- * * @param {optionName} - string
220
- * * Returns value - any
221
- * * option(optionName, optionValue): Updates the value of a single property
222
- * * @param {optionName} - string
223
- * * @param {optionValue} - any
224
- * * option(options): Updates the values of several properties
225
- * * @param {options} - object
213
+ /**
214
+ * ref methods (ref.current.instance.*method*)
215
+ *
216
+ * * option(): Gets all UI component properties
217
+ * * Returns value - object
218
+ * * option(optionName): Gets the value of a single property
219
+ * * @param {optionName} - string
220
+ * * Returns value - any
221
+ * * option(optionName, optionValue): Updates the value of a single property
222
+ * * @param {optionName} - string
223
+ * * @param {optionValue} - any
224
+ * * option(options): Updates the values of several properties
225
+ * * @param {options} - object
226
226
  */
227
227
  reference: ref
228
228
  };
@@ -11,7 +11,7 @@ import Icon from "../../icons";
11
11
  import Ripple from "./ripple-effect";
12
12
  import { getClassNameFromColor, getRippleColor } from '.';
13
13
  import CircularProgress from "../progress/circular";
14
- import { alignCenter, backgroundTransparent, border, borderBox, borderNone, borderRadius4px, borderRadius50, cursorPointer, flexRow, inlineFlex, justifyCenter, outlineNone, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
14
+ import { itemsCenter, bgTransparent, border, boxBorder, borderNone, borderRadius4px, borderRadius50, cursorPointer, flexRow, displayInlineFlex, justifyCenter, outlineNone, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
15
15
  import { useColor as colors, useTheme } from "../../theme";
16
16
  const {
17
17
  colors: {
@@ -146,9 +146,9 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
146
146
  const ButtonIconCSS = iconSize => css`
147
147
  ${flexRow};
148
148
  ${positionRelative};
149
- ${borderBox};
149
+ ${boxBorder};
150
150
  ${justifyCenter};
151
- ${alignCenter};
151
+ ${itemsCenter};
152
152
  ${parseWidthHeight(iconSize)};
153
153
  ${parseMinWidthHeight(iconSize)};
154
154
  `;
@@ -176,12 +176,12 @@ const ButtonSizeCSS = (width, height, buttonSize, iconSize) => css`
176
176
  }
177
177
  `;
178
178
  const ButtonRootCSS = (circular, colorHover, color, name) => css`
179
- ${inlineFlex};
179
+ ${displayInlineFlex};
180
180
  ${positionRelative};
181
181
  ${justifyCenter};
182
- ${alignCenter};
182
+ ${itemsCenter};
183
183
  ${outlineNone};
184
- ${borderBox};
184
+ ${boxBorder};
185
185
  ${cursorPointer};
186
186
  ${userSelectNone};
187
187
  ${circular ? borderRadius50 : borderRadius4px};
@@ -191,7 +191,7 @@ const ButtonRootCSS = (circular, colorHover, color, name) => css`
191
191
  ${pointerEventsNone};
192
192
  }
193
193
  &.outlined {
194
- ${backgroundTransparent};
194
+ ${bgTransparent};
195
195
  ${border(1, color)}
196
196
  color: ${color};
197
197
  &.button-icon--loading {
@@ -243,7 +243,7 @@ const ButtonRootCSS = (circular, colorHover, color, name) => css`
243
243
  }
244
244
  &.text {
245
245
  ${borderNone};
246
- ${backgroundTransparent};
246
+ ${bgTransparent};
247
247
  color: ${color};
248
248
  &.button-icon--loading {
249
249
  background-color: ${hexToRGBA(color, alphaLoading)};
@@ -268,7 +268,7 @@ const ButtonRootCSS = (circular, colorHover, color, name) => css`
268
268
  }
269
269
  }
270
270
  &.ghost {
271
- ${backgroundTransparent};
271
+ ${bgTransparent};
272
272
  ${borderNone};
273
273
  color: ${color};
274
274
  &.loading,
@@ -320,14 +320,14 @@ ButtonIcon.propTypes = {
320
320
  onClick: PropTypes.func,
321
321
  /** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
322
322
  name: PropTypes.string,
323
- /**
324
- * The size of the component.
325
- *
326
- * * tiny (button 24px, icon 16px)
327
- * * small (button 32px, icon 20px)
328
- * * medium (button 40px, icon 24px)
329
- * * large (button 48px, icon 32px)
330
- * * giant (button 56px, icon 40px)
323
+ /**
324
+ * The size of the component.
325
+ *
326
+ * * tiny (button 24px, icon 16px)
327
+ * * small (button 32px, icon 20px)
328
+ * * medium (button 40px, icon 24px)
329
+ * * large (button 48px, icon 32px)
330
+ * * giant (button 56px, icon 40px)
331
331
  * */
332
332
  size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant', 'extraGiant']),
333
333
  /** Style inline of component. */
@@ -338,19 +338,19 @@ ButtonIcon.propTypes = {
338
338
  viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'ghost']),
339
339
  /** Width of the component. */
340
340
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
341
- /**
342
- * ref methods (ref.current.instance.*method*)
343
- *
344
- * * option(): Gets all UI component properties
345
- * * Returns value - object
346
- * * option(optionName): Gets the value of a single property
347
- * * @param {optionName} - string
348
- * * Returns value - any
349
- * * option(optionName, optionValue): Updates the value of a single property
350
- * * @param {optionName} - string
351
- * * @param {optionValue} - any
352
- * * option(options): Updates the values of several properties
353
- * * @param {options} - object
341
+ /**
342
+ * ref methods (ref.current.instance.*method*)
343
+ *
344
+ * * option(): Gets all UI component properties
345
+ * * Returns value - object
346
+ * * option(optionName): Gets the value of a single property
347
+ * * @param {optionName} - string
348
+ * * Returns value - any
349
+ * * option(optionName, optionValue): Updates the value of a single property
350
+ * * @param {optionName} - string
351
+ * * @param {optionValue} - any
352
+ * * option(options): Updates the values of several properties
353
+ * * @param {options} - object
354
354
  */
355
355
  reference: ref
356
356
  };
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
7
7
  import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
8
8
  import { detectColor, fade, hexToRGBA, hslToRgb, isColor, isColorName, rgbaToHexA, rgbToHex } from "../../styles/color-helper";
9
9
  import * as allColors from "../../styles/colors";
10
- import { alignCenter, backgroundTransparent, border, borderBox, borderNone, borderRadius4px, cursorPointer, flexRow, inlineFlex, justifyCenter, outlineNone, overflowHidden, parseHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
10
+ import { itemsCenter, bgTransparent, border, boxBorder, borderNone, borderRadius4px, cursorPointer, flexRow, displayInlineFlex, justifyCenter, outlineNone, overflowHidden, parseHeight, parseMinHeight, parseMinWidth, parseMinWidthHeight, parseWidthHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
11
11
  import { useColor as colors, useTheme } from "../../theme";
12
12
  import { classNames, refType as ref } from "../../utils";
13
13
  import Ripple from "./ripple-effect";
@@ -234,10 +234,10 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
234
234
  }));
235
235
  const ButtonIconCSS = (endIcon, label, startIcon, iconMarginSize, iconSize) => css`
236
236
  ${flexRow};
237
- ${alignCenter};
237
+ ${itemsCenter};
238
238
  ${justifyCenter};
239
239
  ${positionRelative};
240
- ${borderBox};
240
+ ${boxBorder};
241
241
  margin-right: ${endIcon || label ? iconMarginSize : 0};
242
242
  &.DGN-UI-Button-End-Icon,
243
243
  &.DGN-UI-Button-Custom-End-Icon {
@@ -285,12 +285,12 @@ const ButtonSizeCSS = (paddingSize, minHeightSize, minHeightSizeLink, outlinedPa
285
285
  }
286
286
  `;
287
287
  const ButtonRootCSS = color => css`
288
- ${inlineFlex};
289
- ${alignCenter};
288
+ ${displayInlineFlex};
289
+ ${itemsCenter};
290
290
  ${justifyCenter};
291
291
  ${positionRelative};
292
292
  ${borderRadius4px};
293
- ${borderBox};
293
+ ${boxBorder};
294
294
  ${uppercase};
295
295
  ${cursorPointer};
296
296
  ${overflowHidden};
@@ -303,7 +303,7 @@ const ButtonRootCSS = color => css`
303
303
  ${pointerEventsNone};
304
304
  }
305
305
  &.outlined {
306
- ${backgroundTransparent};
306
+ ${bgTransparent};
307
307
  ${border(1, color)};
308
308
  color: ${color};
309
309
  &.button--loading {
@@ -356,7 +356,7 @@ const ButtonRootCSS = color => css`
356
356
  }
357
357
  }
358
358
  &.text {
359
- ${backgroundTransparent};
359
+ ${bgTransparent};
360
360
  ${borderNone};
361
361
  color: ${color};
362
362
  &.button--loading {
@@ -382,7 +382,7 @@ const ButtonRootCSS = color => css`
382
382
  }
383
383
  }
384
384
  &.link {
385
- ${backgroundTransparent};
385
+ ${bgTransparent};
386
386
  ${borderNone};
387
387
  padding: 0;
388
388
  color: ${color};
@@ -438,19 +438,19 @@ Button.propTypes = {
438
438
  urlParams: PropTypes.object,
439
439
  /** The variant to use. */
440
440
  viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'link']),
441
- /**
442
- * ref methods (ref.current.instance.*method*)
443
- *
444
- * * option(): Gets all UI component properties
445
- * * Returns value - object
446
- * * option(optionName): Gets the value of a single property
447
- * * @param {optionName} - string
448
- * * Returns value - any
449
- * * option(optionName, optionValue): Updates the value of a single property
450
- * * @param {optionName} - string
451
- * * @param {optionValue} - any
452
- * * option(options): Updates the values of several properties
453
- * * @param {options} - object
441
+ /**
442
+ * ref methods (ref.current.instance.*method*)
443
+ *
444
+ * * option(): Gets all UI component properties
445
+ * * Returns value - object
446
+ * * option(optionName): Gets the value of a single property
447
+ * * @param {optionName} - string
448
+ * * Returns value - any
449
+ * * option(optionName, optionValue): Updates the value of a single property
450
+ * * @param {optionName} - string
451
+ * * @param {optionValue} - any
452
+ * * option(options): Updates the values of several properties
453
+ * * @param {options} - object
454
454
  */
455
455
  reference: ref
456
456
  };
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/core';
4
4
  import PropTypes from 'prop-types';
5
5
  import { forwardRef, isValidElement, memo, useImperativeHandle, useMemo, useRef, useState } from 'react';
6
6
  import { ButtonIcon, Icon, Popover, Typography } from "../";
7
- import { alignCenter, borderNone, cursorPointer, flexCol, flexRow, outlineNone, parseHeight } from "../../styles/general";
7
+ import { itemsCenter, borderNone, cursorPointer, flexCol, flexRow, outlineNone, parseHeight } from "../../styles/general";
8
8
  import { useTheme } from "../../theme";
9
9
  import { classNames, refType as ref } from "../../utils";
10
10
  import OptionWrapper from "../others/option-wrapper";
@@ -125,7 +125,7 @@ const PopoverCSS = isOptionFull => css`
125
125
  `;
126
126
  const OptionFullCSS = css`
127
127
  ${flexRow};
128
- ${alignCenter};
128
+ ${itemsCenter};
129
129
  ${cursorPointer};
130
130
  ${outlineNone};
131
131
  ${borderNone}
@@ -174,19 +174,19 @@ ButtonMore.propTypes = {
174
174
  popoverProp: PropTypes.object,
175
175
  /** Style inline of component. */
176
176
  style: PropTypes.object,
177
- /**
178
- * ref methods (ref.current.instance.*method*)
179
- *
180
- * * option(): Gets all UI component properties
181
- * * Returns value - object
182
- * * option(optionName): Gets the value of a single property
183
- * * @param {optionName} - string
184
- * * Returns value - any
185
- * * option(optionName, optionValue): Updates the value of a single property
186
- * * @param {optionName} - string
187
- * * @param {optionValue} - any
188
- * * option(options): Updates the values of several properties
189
- * * @param {options} - object
177
+ /**
178
+ * ref methods (ref.current.instance.*method*)
179
+ *
180
+ * * option(): Gets all UI component properties
181
+ * * Returns value - object
182
+ * * option(optionName): Gets the value of a single property
183
+ * * @param {optionName} - string
184
+ * * Returns value - any
185
+ * * option(optionName, optionValue): Updates the value of a single property
186
+ * * @param {optionName} - string
187
+ * * @param {optionValue} - any
188
+ * * option(options): Updates the values of several properties
189
+ * * @param {options} - object
190
190
  */
191
191
  reference: ref
192
192
  };
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import { jsx, css } from '@emotion/core';
6
6
  import OptionWrapper from "../others/option-wrapper";
7
7
  import theme from "../../theme/settings";
8
- import { borderBox, borderRadius4px, flexCol, flexRow, justifyEnd, overflowHidden, parseWidth, parseWidthHeight, positionAbsolute, positionRelative } from "../../styles/general";
8
+ import { boxBorder, borderRadius4px, flexCol, flexRow, justifyEnd, overflowHidden, parseWidth, parseWidthHeight, positionAbsolute, positionRelative } from "../../styles/general";
9
9
  import CardHeader from "./header";
10
10
  import { CardFooter } from "./footer";
11
11
  import { CardBody } from "./body";
@@ -80,7 +80,7 @@ const Card = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
80
80
  const CardCSS = (width, height, headerDivider, footerDivider, dividerColor, direction) => css`
81
81
  ${direction === 'vertical' ? flexCol : flexRow};
82
82
  ${positionRelative};
83
- ${borderBox};
83
+ ${boxBorder};
84
84
  ${borderRadius4px};
85
85
  ${overflowHidden}
86
86
  ${parseWidthHeight(width || spacing([64.5]), height || 'max-content')};
@@ -89,7 +89,7 @@ const CardCSS = (width, height, headerDivider, footerDivider, dividerColor, dire
89
89
  .DGN-UI-Card-Header {
90
90
  ${flexRow};
91
91
  ${positionRelative};
92
- ${borderBox};
92
+ ${boxBorder};
93
93
  order: 1;
94
94
  padding: ${spacing([4])};
95
95
  &:after {
@@ -105,7 +105,7 @@ const CardCSS = (width, height, headerDivider, footerDivider, dividerColor, dire
105
105
  .DGN-UI-Card-Body {
106
106
  ${flexCol};
107
107
  ${positionRelative};
108
- ${borderBox};
108
+ ${boxBorder};
109
109
  order: 2;
110
110
  padding: ${headerDivider ? spacing([4]) : spacing([0, 4, 4])};
111
111
  }
@@ -113,7 +113,7 @@ const CardCSS = (width, height, headerDivider, footerDivider, dividerColor, dire
113
113
  ${flexRow};
114
114
  ${justifyEnd};
115
115
  ${positionRelative};
116
- ${borderBox};
116
+ ${boxBorder};
117
117
  order: 3;
118
118
  padding: ${footerDivider ? spacing([4]) : spacing([0, 4, 4])};
119
119
  &:before {
@@ -129,7 +129,7 @@ const CardCSS = (width, height, headerDivider, footerDivider, dividerColor, dire
129
129
  .DGN-UI-Card-Extra {
130
130
  ${flexCol};
131
131
  ${positionRelative};
132
- ${borderBox};
132
+ ${boxBorder};
133
133
  }
134
134
  `;
135
135
  Card.defaultProps = {