@digitalc/dxp-ui 0.0.6-alpha.4 → 0.0.6-alpha.8

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 (36) hide show
  1. package/es/components/BaseSpin/index.d.ts +8 -0
  2. package/es/components/BaseSpin/index.js +44 -0
  3. package/es/components/BaseSpin/index.less +32 -0
  4. package/es/components/Navigation/index.d.ts +1 -0
  5. package/es/components/Navigation/index.js +5 -1
  6. package/es/components/index.d.ts +1 -0
  7. package/es/components/index.js +2 -1
  8. package/es/utils/deviceType.js +4 -1
  9. package/es/utils/scaleTool.js +3 -2
  10. package/lib/components/BaseSpin/index.d.ts +8 -0
  11. package/lib/components/BaseSpin/index.js +70 -0
  12. package/lib/components/BaseSpin/index.less +32 -0
  13. package/lib/components/Navigation/index.d.ts +1 -0
  14. package/lib/components/Navigation/index.js +5 -3
  15. package/lib/components/index.d.ts +1 -0
  16. package/lib/components/index.js +2 -0
  17. package/lib/utils/deviceType.js +3 -1
  18. package/lib/utils/scaleTool.js +3 -2
  19. package/package.json +1 -1
  20. package/umd/dxp-ui.min.css +1 -1
  21. package/umd/dxp-ui.min.js +1 -1
  22. package/umd/static/Poppins-Bold.8001a01b.ttf +0 -0
  23. package/umd/static/Roboto-Bold.ff276312.ttf +0 -0
  24. package/umd/static/Roboto-Regular.a5023d7b.ttf +0 -0
  25. package/umd/static/Roboto-SemiBold.3452daa4.ttf +0 -0
  26. package/umd/static/SF-Pro-Text-Bold.89d66db4.otf +0 -0
  27. package/umd/static/SF-Pro-Text-Regular.e042d171.ttf +0 -0
  28. package/umd/static/SF-Pro-Text-Regular.f09e811b.otf +0 -0
  29. package/umd/static/SF-Pro-Text-Semibold.a5a4b4bc.otf +0 -0
  30. package/umd/static/SF-Pro-Text-SemiboldItalic.ed8f4a28.otf +0 -0
  31. package/umd/static/iconfont.176e7470.svg +1 -0
  32. package/umd/static/{iconfont.8f415830.eot → iconfont.47a0c957.ttf} +0 -0
  33. package/umd/static/{iconfont.147a6f90.ttf → iconfont.6f470e01.eot} +0 -0
  34. package/umd/static/iconfont.796b49bb.woff +0 -0
  35. package/umd/static/iconfont.32c6d76e.svg +0 -1
  36. package/umd/static/iconfont.f7cc0091.woff +0 -0
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const BaseSpin: (props: {
4
+ [x: string]: any;
5
+ children: any;
6
+ className: any;
7
+ }) => React.JSX.Element;
8
+ export default BaseSpin;
@@ -0,0 +1,44 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import "antd/es/spin/style";
3
+ import _Spin from "antd/es/spin";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
+ var _excluded = ["children", "className"];
6
+ import React from 'react';
7
+ import { getToken } from "../../utils/tokenHelper";
8
+ import "./index.less";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ var Loading = function Loading() {
11
+ return /*#__PURE__*/_jsx("div", {
12
+ className: "loadingWrap",
13
+ children: /*#__PURE__*/_jsx("div", {
14
+ className: "loadingContainer",
15
+ children: /*#__PURE__*/_jsxs("span", {
16
+ className: "ant-spin-dot ant-spin-dot-spin",
17
+ children: [/*#__PURE__*/_jsx("i", {
18
+ className: "ant-spin-dot-item"
19
+ }), /*#__PURE__*/_jsx("i", {
20
+ className: "ant-spin-dot-item"
21
+ }), /*#__PURE__*/_jsx("i", {
22
+ className: "ant-spin-dot-item"
23
+ }), /*#__PURE__*/_jsx("i", {
24
+ className: "ant-spin-dot-item"
25
+ })]
26
+ })
27
+ })
28
+ });
29
+ };
30
+ var BaseSpin = function BaseSpin(props) {
31
+ var children = props.children,
32
+ className = props.className,
33
+ otherProps = _objectWithoutProperties(props, _excluded);
34
+ return /*#__PURE__*/_jsx(_Spin, _objectSpread(_objectSpread({
35
+ style: {
36
+ color: getToken('colorButtonBackgroundPrimary')
37
+ },
38
+ wrapperClassName: "loading ".concat(className),
39
+ indicator: /*#__PURE__*/_jsx(Loading, {})
40
+ }, otherProps), {}, {
41
+ children: children
42
+ }));
43
+ };
44
+ export default BaseSpin;
@@ -0,0 +1,32 @@
1
+ .loadingWrap {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ left: 0;
6
+ top: 0;
7
+ position: fixed;
8
+ width: 100vw;
9
+ height: 100vh;
10
+ // background: rgba(255,255,255,0.5);
11
+ z-index: 1;
12
+
13
+ .loading {
14
+ // color: @primary-color;
15
+ font-size: 48px;
16
+ font-weight: 900;
17
+ }
18
+
19
+ .loadingContainer {
20
+ border-radius: 16px;
21
+ width: 100px;
22
+ height: 100px;
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ background: none;
27
+ img {
28
+ width: 60px;
29
+ height: 60px;
30
+ }
31
+ }
32
+ }
@@ -20,6 +20,7 @@ export interface INavigationProps {
20
20
  hidegoback?: boolean;
21
21
  rightLink?: RightLinkConfig;
22
22
  titleIconBadge?: TitleIconBadgeConfig;
23
+ titleStyle?: React.CSSProperties;
23
24
  title?: string;
24
25
  hideBorder?: boolean;
25
26
  className?: string;
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["hideBorder", "className", "rightIcons", "rightLink", "title", "goBack", "isInverse", "titleIconBadge", "imgBackground", "noRight", "leftIconName", "leftIconSize", "hidegoback"];
3
+ var _excluded = ["hideBorder", "className", "rightIcons", "rightLink", "title", "goBack", "isInverse", "titleIconBadge", "imgBackground", "noRight", "leftIconName", "leftIconSize", "hidegoback", "titleStyle"];
4
4
  import React from 'react';
5
5
  import { useDesignTokens } from "./designTokens";
6
6
  import { useStyleRegister } from '@ant-design/cssinjs';
@@ -29,6 +29,8 @@ var Navigation = function Navigation(_ref) {
29
29
  leftIconSize = _ref.leftIconSize,
30
30
  _ref$hidegoback = _ref.hidegoback,
31
31
  hidegoback = _ref$hidegoback === void 0 ? false : _ref$hidegoback,
32
+ _ref$titleStyle = _ref.titleStyle,
33
+ titleStyle = _ref$titleStyle === void 0 ? {} : _ref$titleStyle,
32
34
  restProps = _objectWithoutProperties(_ref, _excluded);
33
35
  var designTokens = useDesignTokens();
34
36
  var spacingTopNavigationPaddingHorizontal = designTokens.spacingTopNavigationPaddingHorizontal,
@@ -87,6 +89,7 @@ var Navigation = function Navigation(_ref) {
87
89
  },
88
90
  type: titleIconBadge.iconName
89
91
  }), /*#__PURE__*/_jsx(Text, {
92
+ style: titleStyle,
90
93
  inverse: isInverse,
91
94
  size: "NavigationBold",
92
95
  className: "".concat(cssClasses.PREFIX, "-title ").concat(isInverse ? 'inverse' : '', " "),
@@ -96,6 +99,7 @@ var Navigation = function Navigation(_ref) {
96
99
  children: +titleIconBadge.badge > 99 ? '99+' : titleIconBadge.badge
97
100
  })]
98
101
  }) : /*#__PURE__*/_jsx(Text, {
102
+ style: titleStyle,
99
103
  inverse: isInverse,
100
104
  size: "NavigationBold",
101
105
  className: "".concat(cssClasses.PREFIX, "-title ").concat(isInverse ? 'inverse' : '', " "),
@@ -67,3 +67,4 @@ export { default as AppStyleWrapper } from './AppStyleWrapper';
67
67
  export { default as Row } from './Row';
68
68
  export { default as Col } from './Col';
69
69
  export { default as GlobalTokenProvider } from './GlobalTokenProvider';
70
+ export { default as BaseSpin } from './BaseSpin';
@@ -41,4 +41,5 @@ export { default as Radio } from "./Radio";
41
41
  export { default as AppStyleWrapper } from "./AppStyleWrapper";
42
42
  export { default as Row } from "./Row";
43
43
  export { default as Col } from "./Col";
44
- export { default as GlobalTokenProvider } from "./GlobalTokenProvider";
44
+ export { default as GlobalTokenProvider } from "./GlobalTokenProvider";
45
+ export { default as BaseSpin } from "./BaseSpin";
@@ -14,7 +14,10 @@ export var checkIsMobile = function checkIsMobile() {
14
14
  }
15
15
 
16
16
  // Check for touch points (more reliable for modern devices)
17
- if (navigator.maxTouchPoints > 0) {
17
+ // 优先检测触摸屏 + 小屏幕(避免误判带触摸屏的台式机)
18
+ var hasTouch = navigator.maxTouchPoints > 0;
19
+ var isSmallScreen = window.matchMedia('(max-width: 768px)').matches;
20
+ if (hasTouch && isSmallScreen) {
18
21
  return true;
19
22
  }
20
23
 
@@ -1,3 +1,4 @@
1
+ import { checkIsMobile } from "./deviceType";
1
2
  var getViewportSize = function getViewportSize() {
2
3
  var _document$documentEle, _document$body, _document$documentEle2, _document$body2;
3
4
  if (typeof document === 'undefined') {
@@ -21,7 +22,7 @@ export var viewportSize = function viewportSize() {
21
22
  export var wScale = function wScale(size) {
22
23
  var _getViewportSize = getViewportSize(),
23
24
  width = _getViewportSize.width;
24
- if (width < 375 || width > 768) {
25
+ if (width < 375 || width > 768 || !checkIsMobile()) {
25
26
  return size || 0;
26
27
  }
27
28
  return parseFloat((width / DesignWidth * (size || 0)).toFixed(1));
@@ -30,7 +31,7 @@ export var hScale = function hScale(size) {
30
31
  var _getViewportSize2 = getViewportSize(),
31
32
  height = _getViewportSize2.height,
32
33
  width = _getViewportSize2.width;
33
- if (width < 375 || width > 768) {
34
+ if (width < 375 || width > 768 || !checkIsMobile()) {
34
35
  return size;
35
36
  }
36
37
  return parseFloat((height / DesignHeight * size).toFixed(1));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const BaseSpin: (props: {
4
+ [x: string]: any;
5
+ children: any;
6
+ className: any;
7
+ }) => React.JSX.Element;
8
+ export default BaseSpin;
@@ -0,0 +1,70 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+ var __export = (target, all) => {
34
+ for (var name in all)
35
+ __defProp(target, name, { get: all[name], enumerable: true });
36
+ };
37
+ var __copyProps = (to, from, except, desc) => {
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (let key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(to, key) && key !== except)
41
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
42
+ }
43
+ return to;
44
+ };
45
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
46
+ // If the importer is in node compatibility mode or this is not an ESM
47
+ // file that has been converted to a CommonJS file using a Babel-
48
+ // compatible transform (i.e. "__esModule" has not been set), then set
49
+ // "default" to the CommonJS "module.exports" for node compatibility.
50
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
51
+ mod
52
+ ));
53
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
54
+
55
+ // src/components/BaseSpin/index.tsx
56
+ var BaseSpin_exports = {};
57
+ __export(BaseSpin_exports, {
58
+ default: () => BaseSpin_default
59
+ });
60
+ module.exports = __toCommonJS(BaseSpin_exports);
61
+ var import_react = __toESM(require("react"));
62
+ var import_antd = require("antd");
63
+ var import_tokenHelper = require("../../utils/tokenHelper");
64
+ var import_index = require("./index.less");
65
+ var Loading = () => /* @__PURE__ */ import_react.default.createElement("div", { className: "loadingWrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "loadingContainer" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "ant-spin-dot ant-spin-dot-spin" }, /* @__PURE__ */ import_react.default.createElement("i", { className: "ant-spin-dot-item" }), /* @__PURE__ */ import_react.default.createElement("i", { className: "ant-spin-dot-item" }), /* @__PURE__ */ import_react.default.createElement("i", { className: "ant-spin-dot-item" }), /* @__PURE__ */ import_react.default.createElement("i", { className: "ant-spin-dot-item" }))));
66
+ var BaseSpin = (props) => {
67
+ const _a = props, { children, className } = _a, otherProps = __objRest(_a, ["children", "className"]);
68
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, __spreadValues({ style: { color: (0, import_tokenHelper.getToken)("colorButtonBackgroundPrimary") }, wrapperClassName: `loading ${className}`, indicator: /* @__PURE__ */ import_react.default.createElement(Loading, null) }, otherProps), children);
69
+ };
70
+ var BaseSpin_default = BaseSpin;
@@ -0,0 +1,32 @@
1
+ .loadingWrap {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ left: 0;
6
+ top: 0;
7
+ position: fixed;
8
+ width: 100vw;
9
+ height: 100vh;
10
+ // background: rgba(255,255,255,0.5);
11
+ z-index: 1;
12
+
13
+ .loading {
14
+ // color: @primary-color;
15
+ font-size: 48px;
16
+ font-weight: 900;
17
+ }
18
+
19
+ .loadingContainer {
20
+ border-radius: 16px;
21
+ width: 100px;
22
+ height: 100px;
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ background: none;
27
+ img {
28
+ width: 60px;
29
+ height: 60px;
30
+ }
31
+ }
32
+ }
@@ -20,6 +20,7 @@ export interface INavigationProps {
20
20
  hidegoback?: boolean;
21
21
  rightLink?: RightLinkConfig;
22
22
  titleIconBadge?: TitleIconBadgeConfig;
23
+ titleStyle?: React.CSSProperties;
23
24
  title?: string;
24
25
  hideBorder?: boolean;
25
26
  className?: string;
@@ -81,7 +81,8 @@ var Navigation = (_a) => {
81
81
  noRight = false,
82
82
  leftIconName,
83
83
  leftIconSize,
84
- hidegoback = false
84
+ hidegoback = false,
85
+ titleStyle = {}
85
86
  } = _b, restProps = __objRest(_b, [
86
87
  "hideBorder",
87
88
  "className",
@@ -95,7 +96,8 @@ var Navigation = (_a) => {
95
96
  "noRight",
96
97
  "leftIconName",
97
98
  "leftIconSize",
98
- "hidegoback"
99
+ "hidegoback",
100
+ "titleStyle"
99
101
  ]);
100
102
  var _a2;
101
103
  const designTokens = (0, import_designTokens.useDesignTokens)();
@@ -178,7 +180,7 @@ var Navigation = (_a) => {
178
180
  )
179
181
  }, restProps),
180
182
  !hidegoback && /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`, customIconSize: leftIconSize, inverse: isInverse, size: "medium", name: leftIconName || "icon-a-Backarrow-copy", onClick: onGoBack }),
181
- /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import_constants.cssClasses.PREFIX}-title-warp`, { hasIconBage: !(0, import_lodash.isEmpty)(titleIconBadge) }) }, !(0, import_lodash.isEmpty)(titleIconBadge) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-badge` }, /* @__PURE__ */ import_react.default.createElement(import__.Icon, { inverse: isInverse, size: 24, style: { marginRight: "4px" }, type: titleIconBadge.iconName }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, titleIconBadge.title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-badge` }, +titleIconBadge.badge > 99 ? "99+" : titleIconBadge.badge)) : /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, title)),
183
+ /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import_constants.cssClasses.PREFIX}-title-warp`, { hasIconBage: !(0, import_lodash.isEmpty)(titleIconBadge) }) }, !(0, import_lodash.isEmpty)(titleIconBadge) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-badge` }, /* @__PURE__ */ import_react.default.createElement(import__.Icon, { inverse: isInverse, size: 24, style: { marginRight: "4px" }, type: titleIconBadge.iconName }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { style: titleStyle, inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, titleIconBadge.title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-badge` }, +titleIconBadge.badge > 99 ? "99+" : titleIconBadge.badge)) : /* @__PURE__ */ import_react.default.createElement(import__.Text, { style: titleStyle, inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, title)),
182
184
  !noRight && /* @__PURE__ */ import_react.default.createElement(import__.IconButtonGroup, { className: `${import_constants.cssClasses.PREFIX}-rightWarp` }, (_a2 = rightIcons == null ? void 0 : rightIcons.slice(0, 3)) == null ? void 0 : _a2.map((i, index) => /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { inverse: isInverse, key: index, name: i.iconName, size: "medium", onClick: i.onIconClick })), !(0, import_lodash.isEmpty)(rightLink) && /* @__PURE__ */ import_react.default.createElement(import__.TextLink, { inverse: isInverse, className: `${import_constants.cssClasses.PREFIX}-right-link`, type: import__.TextLinkEnum.default, text: rightLink.linkText, onClick: rightLink.onLinkClick }))
183
185
  );
184
186
  };
@@ -67,3 +67,4 @@ export { default as AppStyleWrapper } from './AppStyleWrapper';
67
67
  export { default as Row } from './Row';
68
68
  export { default as Col } from './Col';
69
69
  export { default as GlobalTokenProvider } from './GlobalTokenProvider';
70
+ export { default as BaseSpin } from './BaseSpin';
@@ -37,6 +37,7 @@ __export(components_exports, {
37
37
  AmountTitleTypes: () => import_Amount.AmountTitleTypes,
38
38
  AppStyleWrapper: () => import_AppStyleWrapper.default,
39
39
  BackImageEnum: () => import_Image2.BackImageEnum,
40
+ BaseSpin: () => import_BaseSpin.default,
40
41
  Button: () => import_Button.default,
41
42
  Card: () => import_Card.default,
42
43
  Checkbox: () => import_Checkbox.default,
@@ -122,3 +123,4 @@ var import_AppStyleWrapper = __toESM(require("./AppStyleWrapper"));
122
123
  var import_Row = __toESM(require("./Row"));
123
124
  var import_Col = __toESM(require("./Col"));
124
125
  var import_GlobalTokenProvider = __toESM(require("./GlobalTokenProvider"));
126
+ var import_BaseSpin = __toESM(require("./BaseSpin"));
@@ -33,7 +33,9 @@ var checkIsMobile = () => {
33
33
  if (typeof window === "undefined") {
34
34
  return false;
35
35
  }
36
- if (navigator.maxTouchPoints > 0) {
36
+ const hasTouch = navigator.maxTouchPoints > 0;
37
+ const isSmallScreen = window.matchMedia("(max-width: 768px)").matches;
38
+ if (hasTouch && isSmallScreen) {
37
39
  return true;
38
40
  }
39
41
  const userAgent = navigator.userAgent || navigator.vendor || window.opera;
@@ -27,6 +27,7 @@ __export(scaleTool_exports, {
27
27
  wScale: () => wScale
28
28
  });
29
29
  module.exports = __toCommonJS(scaleTool_exports);
30
+ var import_deviceType = require("./deviceType");
30
31
  var getViewportSize = () => {
31
32
  var _a, _b, _c, _d;
32
33
  if (typeof document === "undefined") {
@@ -42,14 +43,14 @@ var DesignHeight = 812;
42
43
  var viewportSize = () => getViewportSize();
43
44
  var wScale = (size) => {
44
45
  const { width } = getViewportSize();
45
- if (width < 375 || width > 768) {
46
+ if (width < 375 || width > 768 || !(0, import_deviceType.checkIsMobile)()) {
46
47
  return size || 0;
47
48
  }
48
49
  return parseFloat((width / DesignWidth * (size || 0)).toFixed(1));
49
50
  };
50
51
  var hScale = (size) => {
51
52
  const { height, width } = getViewportSize();
52
- if (width < 375 || width > 768) {
53
+ if (width < 375 || width > 768 || !(0, import_deviceType.checkIsMobile)()) {
53
54
  return size;
54
55
  }
55
56
  return parseFloat((height / DesignHeight * size).toFixed(1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalc/dxp-ui",
3
- "version": "0.0.6-alpha.4",
3
+ "version": "0.0.6-alpha.8",
4
4
  "description": "A UI library of Digitalc Design React Component",
5
5
  "type": "module",
6
6
  "keywords": [