@digitalc/dxp-ui 0.0.6-0 → 0.0.6-alpha.2

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 (93) hide show
  1. package/es/assets/iconFont/demo_index.html +535 -6
  2. package/es/assets/iconFont/iconfont.css +98 -6
  3. package/es/assets/iconFont/iconfont.eot +0 -0
  4. package/es/assets/iconFont/iconfont.js +10 -10
  5. package/es/assets/iconFont/iconfont.json +161 -0
  6. package/es/assets/iconFont/iconfont.svg +46 -0
  7. package/es/assets/iconFont/iconfont.ttf +0 -0
  8. package/es/assets/iconFont/iconfont.woff +0 -0
  9. package/es/assets/iconFont/iconfont.woff2 +0 -0
  10. package/es/components/Amount/index.js +0 -1
  11. package/es/components/AppStyleWrapper/index.d.ts +6 -0
  12. package/es/components/AppStyleWrapper/index.js +13 -0
  13. package/es/components/Button/designTokens.d.ts +6 -0
  14. package/es/components/Button/designTokens.js +6 -1
  15. package/es/components/Card/index.d.ts +1 -1
  16. package/es/components/Card/index.js +3 -8
  17. package/es/components/Card/style/index.less +1 -1
  18. package/es/components/Checkbox/style/index.less +0 -5
  19. package/es/components/Col/index.d.ts +7 -0
  20. package/es/components/Col/index.js +21 -0
  21. package/es/components/Drawer/index.d.ts +1 -0
  22. package/es/components/Drawer/index.js +3 -2
  23. package/es/components/Drawer/style/index.less +1 -0
  24. package/es/components/Form/index.js +1 -1
  25. package/es/components/IconButton/index.js +1 -1
  26. package/es/components/Input/index.js +2 -2
  27. package/es/components/Input/style/index.less +0 -3
  28. package/es/components/Input/style/variables.less +0 -4
  29. package/es/components/Modal/index.js +1 -1
  30. package/es/components/Navigation/index.js +1 -1
  31. package/es/components/Row/index.d.ts +7 -0
  32. package/es/components/Row/index.js +68 -0
  33. package/es/components/Selector/ESelector.js +2 -2
  34. package/es/components/Selector/style/index.less +8 -11
  35. package/es/components/SelectorItem/index.js +1 -1
  36. package/es/components/SelectorItem/style/index.less +8 -11
  37. package/es/components/Stepper/index.js +2 -1
  38. package/es/components/StickyFooter/index.js +3 -10
  39. package/es/components/Tabs/index.js +3 -2
  40. package/es/components/Tabs/style/index.less +5 -5
  41. package/es/components/index.d.ts +3 -0
  42. package/es/components/index.js +3 -0
  43. package/es/index.d.ts +1 -1
  44. package/es/index.js +1 -1
  45. package/es/utils/deviceType.d.ts +15 -0
  46. package/es/utils/deviceType.js +46 -0
  47. package/lib/assets/iconFont/demo_index.html +535 -6
  48. package/lib/assets/iconFont/iconfont.css +98 -6
  49. package/lib/assets/iconFont/iconfont.eot +0 -0
  50. package/lib/assets/iconFont/iconfont.js +9 -9
  51. package/lib/assets/iconFont/iconfont.json +161 -0
  52. package/lib/assets/iconFont/iconfont.svg +46 -0
  53. package/lib/assets/iconFont/iconfont.ttf +0 -0
  54. package/lib/assets/iconFont/iconfont.woff +0 -0
  55. package/lib/assets/iconFont/iconfont.woff2 +0 -0
  56. package/lib/components/Amount/index.js +0 -1
  57. package/lib/components/AppStyleWrapper/index.d.ts +6 -0
  58. package/lib/components/AppStyleWrapper/index.js +48 -0
  59. package/lib/components/Button/designTokens.d.ts +6 -0
  60. package/lib/components/Button/designTokens.js +6 -0
  61. package/lib/components/Card/index.d.ts +1 -1
  62. package/lib/components/Card/index.js +2 -2
  63. package/lib/components/Card/style/index.less +1 -1
  64. package/lib/components/Checkbox/style/index.less +0 -5
  65. package/lib/components/Col/index.d.ts +7 -0
  66. package/lib/components/Col/index.js +74 -0
  67. package/lib/components/Drawer/index.d.ts +1 -0
  68. package/lib/components/Drawer/index.js +3 -2
  69. package/lib/components/Drawer/style/index.less +1 -0
  70. package/lib/components/Form/index.js +1 -1
  71. package/lib/components/IconButton/index.js +2 -0
  72. package/lib/components/Input/index.js +1 -4
  73. package/lib/components/Input/style/index.less +0 -3
  74. package/lib/components/Input/style/variables.less +0 -4
  75. package/lib/components/Modal/index.js +2 -1
  76. package/lib/components/Navigation/index.js +1 -1
  77. package/lib/components/Row/index.d.ts +7 -0
  78. package/lib/components/Row/index.js +114 -0
  79. package/lib/components/Selector/ESelector.js +4 -2
  80. package/lib/components/Selector/style/index.less +8 -11
  81. package/lib/components/SelectorItem/index.js +1 -1
  82. package/lib/components/SelectorItem/style/index.less +8 -11
  83. package/lib/components/Stepper/index.js +2 -1
  84. package/lib/components/StickyFooter/index.js +2 -2
  85. package/lib/components/Tabs/index.js +6 -5
  86. package/lib/components/Tabs/style/index.less +5 -5
  87. package/lib/components/index.d.ts +3 -0
  88. package/lib/components/index.js +6 -0
  89. package/lib/index.d.ts +1 -1
  90. package/lib/index.js +1 -0
  91. package/lib/utils/deviceType.d.ts +15 -0
  92. package/lib/utils/deviceType.js +25 -0
  93. package/package.json +2 -2
@@ -84,16 +84,13 @@ var Input = (props) => {
84
84
  const designTokens = (0, import_designTokens.useDesignTokens)();
85
85
  const styleToken = (0, import_designTokens.useStyleToken)();
86
86
  const { controlHeight } = designTokens;
87
- const prefix = `${import_constants.cssClasses.PREFIX}-inputOutside`;
87
+ const prefix = `${import_constants.cssClasses.PREFIX}`;
88
88
  const useCustomButtonStyle = () => {
89
89
  const hashId = (0, import_cssinjs.useStyleRegister)({
90
90
  theme: import_theme.theme,
91
91
  token: {},
92
92
  path: [`${prefix}`]
93
93
  }, () => `
94
- .${prefix}-input {
95
- height: ${controlHeight}px;
96
- }
97
94
  .${prefix}-input-affix-wrapper {
98
95
  height: ${controlHeight}px !important;
99
96
  padding-block: 0 !important;
@@ -1,4 +1 @@
1
1
  @import './variables.less';
2
-
3
- // 基础按钮样式
4
- @components: inputOutside;
@@ -1,5 +1 @@
1
-
2
1
  @import '../../../style/variables.less';
3
-
4
- // Primary Button
5
- @btn-primary-bg-default: var(--base-color-primary);
@@ -138,7 +138,8 @@ var Modal = (props) => {
138
138
  token: {},
139
139
  path: [`${prefix}`]
140
140
  }, () => `
141
- .${prefix}-sticky-headers .${prefix}-header {
141
+ .${prefix}-sticky-headers .${prefix}-title {
142
+ padding-right: 1rem;
142
143
  }
143
144
  .${prefix}-sticky-header.${prefix}-sticky-footer .${prefix}-body {
144
145
  overflow-y: auto;
@@ -177,7 +177,7 @@ var Navigation = (_a) => {
177
177
  className
178
178
  )
179
179
  }, restProps),
180
- !hidegoback && /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`, customeIconSize: leftIconSize, inverse: isInverse, size: "medium", name: leftIconName || "icon-a-Backarrow-copy", onClick: onGoBack }),
180
+ !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
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)),
182
182
  !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
183
  );
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { RowProps as AntdRowProps } from 'antd';
3
+ interface RowProps extends AntdRowProps {
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const Row: React.FC<RowProps>;
7
+ export default Row;
@@ -0,0 +1,114 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ var __export = (target, all) => {
37
+ for (var name in all)
38
+ __defProp(target, name, { get: all[name], enumerable: true });
39
+ };
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") {
42
+ for (let key of __getOwnPropNames(from))
43
+ if (!__hasOwnProp.call(to, key) && key !== except)
44
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
45
+ }
46
+ return to;
47
+ };
48
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
49
+ // If the importer is in node compatibility mode or this is not an ESM
50
+ // file that has been converted to a CommonJS file using a Babel-
51
+ // compatible transform (i.e. "__esModule" has not been set), then set
52
+ // "default" to the CommonJS "module.exports" for node compatibility.
53
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
54
+ mod
55
+ ));
56
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57
+
58
+ // src/components/Row/index.tsx
59
+ var Row_exports = {};
60
+ __export(Row_exports, {
61
+ default: () => Row_default
62
+ });
63
+ module.exports = __toCommonJS(Row_exports);
64
+ var import_react = __toESM(require("react"));
65
+ var import_antd = require("antd");
66
+ var import_utils = require("../../utils");
67
+ var import_constants = require("../../constants");
68
+ var Row = (_a) => {
69
+ var _b = _a, { gutter, children } = _b, props = __objRest(_b, ["gutter", "children"]);
70
+ const [horizontalGutter, verticalGutter] = (() => {
71
+ if (!gutter)
72
+ return [0, 0];
73
+ if (typeof gutter === "number")
74
+ return [gutter, 0];
75
+ if (Array.isArray(gutter))
76
+ return [gutter[0] || 0, gutter[1] || 0];
77
+ return [0, 0];
78
+ })();
79
+ const wrappedChildren = import_react.default.Children.map(children, (child) => {
80
+ if (!import_react.default.isValidElement(child))
81
+ return child;
82
+ return /* @__PURE__ */ import_react.default.createElement(
83
+ import_antd.Col,
84
+ __spreadProps(__spreadValues({}, child.props), {
85
+ style: __spreadValues({
86
+ paddingLeft: horizontalGutter / 2,
87
+ paddingRight: horizontalGutter / 2,
88
+ paddingBottom: verticalGutter
89
+ }, child.props.style)
90
+ })
91
+ );
92
+ });
93
+ const prefix = `${import_constants.cssClasses.PREFIX}`;
94
+ console.log("isWebViewBelow90()", (0, import_utils.isWebViewBelow90)());
95
+ if ((0, import_utils.isWebViewBelow90)()) {
96
+ return /* @__PURE__ */ import_react.default.createElement(
97
+ import_antd.ConfigProvider,
98
+ {
99
+ wave: { disabled: true },
100
+ prefixCls: prefix
101
+ },
102
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Row, __spreadValues({ gutter }, props), wrappedChildren)
103
+ );
104
+ }
105
+ return /* @__PURE__ */ import_react.default.createElement(
106
+ import_antd.ConfigProvider,
107
+ {
108
+ wave: { disabled: true },
109
+ prefixCls: prefix
110
+ },
111
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Row, __spreadValues({ gutter }, props), children)
112
+ );
113
+ };
114
+ var Row_default = Row;
@@ -113,7 +113,9 @@ var ESelector = (props) => {
113
113
  path: [`${prefix}-warp`]
114
114
  }, () => `
115
115
  .${prefix}-warp {
116
- gap: ${gap || 16}px;
116
+ > div + div {
117
+ margin-top: ${gap || 16}px;
118
+ }
117
119
  .itemSelect {
118
120
  .filterOptions {
119
121
  background: ${colorSelectorBackground};
@@ -165,7 +167,7 @@ var ESelector = (props) => {
165
167
  ),
166
168
  onClick: () => !(disabled || item.disabled) && handleChangeSelectValue(item[idKey], item)
167
169
  },
168
- /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 32, color: "#fff" }),
170
+ /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 14, color: "#fff" }),
169
171
  hasImg ? /* @__PURE__ */ import_react.default.createElement("div", { className: "imgStyle" }, item.image && /* @__PURE__ */ import_react.default.createElement("img", { alt: "", src: item.image }), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 78 } }, item[labelKey])) : item[labelKey]
170
172
  )
171
173
  )));
@@ -44,14 +44,11 @@
44
44
  &.active {
45
45
  &.showActiveIcon {
46
46
  .select-tick {
47
- width: 16px;
48
- height: 16px;
49
47
  display: block;
50
48
  position: absolute;
51
- right: 8px;
52
- bottom: 4px;
53
- z-index: 100;
54
- transform: scale(0.5, 0.5);
49
+ right: 2px;
50
+ bottom: 0;
51
+ z-index: 2;
55
52
  }
56
53
 
57
54
  &:before {
@@ -61,14 +58,14 @@
61
58
  &:after {
62
59
  position: absolute;
63
60
  content: '';
64
- width: 64px;
65
- height: 64px;
61
+ width: 48px;
62
+ height: 48px;
66
63
  overflow: hidden;
67
64
  border-radius: 10000px;
68
- bottom: -32px;
69
- right: -32px;
65
+ bottom: -24px;
66
+ right: -24px;
70
67
  border-radius: 10000px;
71
- z-index: 99;
68
+ z-index: 1;
72
69
  }
73
70
  }
74
71
  }
@@ -114,7 +114,7 @@ var SelectorItem = (props) => {
114
114
  }
115
115
  }
116
116
  },
117
- /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 32, color: "#fff" }),
117
+ /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 14, color: "#fff" }),
118
118
  children
119
119
  );
120
120
  };
@@ -23,14 +23,11 @@
23
23
  &.active {
24
24
  &.showActiveIcon {
25
25
  .select-tick {
26
- width: 16px;
27
- height: 16px;
28
26
  display: block;
29
27
  position: absolute;
30
- right: 8px;
31
- bottom: 4px;
32
- z-index: 100;
33
- transform: scale(0.5, 0.5);
28
+ right: 2px;
29
+ bottom: 0;
30
+ z-index: 2;
34
31
  }
35
32
 
36
33
  &:before {
@@ -40,14 +37,14 @@
40
37
  &:after {
41
38
  position: absolute;
42
39
  content: '';
43
- width: 64px;
44
- height: 64px;
40
+ width: 48px;
41
+ height: 48px;
45
42
  overflow: hidden;
46
43
  border-radius: 10000px;
47
- bottom: -32px;
48
- right: -32px;
44
+ bottom: -24px;
45
+ right: -24px;
49
46
  border-radius: 10000px;
50
- z-index: 99;
47
+ z-index: 1;
51
48
  }
52
49
  }
53
50
  }
@@ -125,8 +125,9 @@ var Stepper = (_a) => {
125
125
  const { title, nextStep } = (0, import_react.useMemo)(() => {
126
126
  var _a2, _b2;
127
127
  const hasNextStep = items && current !== void 0 && current < items.length - 1;
128
+ const curStep = items && current !== void 0;
128
129
  return {
129
- title: hasNextStep ? ((_a2 = items[current]) == null ? void 0 : _a2.title) || "" : "",
130
+ title: curStep ? ((_a2 = items[current]) == null ? void 0 : _a2.title) || "" : "",
130
131
  nextStep: hasNextStep ? ((_b2 = items[current + 1]) == null ? void 0 : _b2.title) || "" : ""
131
132
  };
132
133
  }, [items, current]);
@@ -169,7 +169,7 @@ var StickyFooter = (props) => {
169
169
  onClick: props.onClick
170
170
  }),
171
171
  extraContent && extraContent,
172
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-wrap` }, type === "default" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import__.Button, { icon: btnIcon, type: "primary", block: true, onClick: onBtnClick, disabled: btnDisabled }, buttonText)), type === "priceVariant" && !hideAmount && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
172
+ /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-wrap` }, type === "default" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import__.Button, { icon: btnIcon, type: "primary", block: true, onClick: onBtnClick, disabled: btnDisabled }, buttonText)), type === "priceVariant" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, hideAmount ? /* @__PURE__ */ import_react.default.createElement("div", null) : /* @__PURE__ */ import_react.default.createElement(
173
173
  import__.Amount,
174
174
  {
175
175
  titleType,
@@ -186,7 +186,7 @@ var StickyFooter = (props) => {
186
186
  iconType
187
187
  },
188
188
  price
189
- ), autoBreakPoint === DESKTOP && !hideBtn && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "middle" }, showCancel, showPrevious, showBackPage, /* @__PURE__ */ import_react.default.createElement(import__.Button, { iconPosition, icon: btnIcon, disabled: btnDisabled, loading: btnLoading, type: "primary", onClick: onBtnClick }, buttonText)), autoBreakPoint === MOBILE && /* @__PURE__ */ import_react.default.createElement(import__.Button, { icon: btnIcon, disabled: btnDisabled, loading: btnLoading, type: "primary", onClick: onBtnClick }, buttonText))),
189
+ ), !hideBtn && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "middle" }, showCancel, showPrevious, showBackPage, /* @__PURE__ */ import_react.default.createElement(import__.Button, { iconPosition, icon: btnIcon, disabled: btnDisabled, loading: btnLoading, type: "primary", onClick: onBtnClick }, buttonText)))),
190
190
  children
191
191
  );
192
192
  };
@@ -75,7 +75,7 @@ var Tabs = (props) => {
75
75
  items = [],
76
76
  type = "default",
77
77
  defaultActiveKey,
78
- prefixCls = `${import_constants.BASE_CLASS_PREFIX}-tabs`,
78
+ prefixCls = `${import_constants.BASE_CLASS_PREFIX}`,
79
79
  className = "",
80
80
  isEqualTabs = false,
81
81
  indicator,
@@ -102,24 +102,25 @@ var Tabs = (props) => {
102
102
  const subTitleActiveColor = inverse ? otherDesignToken.colorTabsTextSubtitleInverse : otherDesignToken.colorTabsTextSubtitle;
103
103
  const iconColor = inverse ? otherDesignToken.colorTabsIconInactiveInverse : otherDesignToken.colorTabsIconInactive;
104
104
  const iconActiveColor = inverse ? otherDesignToken.colorTabsIconActiveInverse : otherDesignToken.colorTabsIconActive;
105
+ const per = `${import_constants.BASE_CLASS_PREFIX}-tabs`;
105
106
  const useCustomButtonStyle = () => {
106
107
  const hashId = (0, import_cssinjs.useStyleRegister)({
107
108
  theme: import_theme.theme,
108
109
  token: {},
109
110
  path: [`${prefixCls}`]
110
111
  }, () => `
111
- .${prefixCls}-card.${prefixCls}-fill>.${prefixCls}-nav .${prefixCls}-tab {
112
+ .${per}-card.${prefixCls}-fill>.${per}-nav .${per}-tab {
112
113
  border-radius: 32px;
113
114
  height:40px;
114
115
  }
115
- .${prefixCls}-card.${prefixCls}-fill .${prefixCls}-nav-list {
116
+ .${per}-card.${prefixCls}-fill .${per}-nav-list {
116
117
  background: ${designFillTokens.colorFillAlter};
117
118
  border-radius: 32px;
118
119
  }
119
- .${prefixCls}-tab-active .${prefixCls}-item-title {
120
+ .${per}-tab-active .${prefixCls}-item-title {
120
121
  font-family:${fontFamilySecondaryBold}-Bold;
121
122
  }
122
- .${prefixCls}-fill .${prefixCls}-tab-active .${prefixCls}-item-title {
123
+ .${prefixCls}-fill .${per}-tab-active .${prefixCls}-item-title {
123
124
  font-family:${fontFamilySecondaryBold}-Bold;
124
125
  font-size: ${fontSizeMobileContentC14};
125
126
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  @components: tabs;
4
4
 
5
- .@{prefix}-@{components}-equal-tabs {
5
+ .@{prefix}-equal-tabs {
6
6
  .@{prefix}-tabs-nav-list {
7
7
  display: grid !important;
8
8
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
@@ -21,21 +21,21 @@
21
21
  }
22
22
  }
23
23
 
24
- .@{prefix}-@{components}-item {
24
+ .@{prefix}-item {
25
25
  display: flex;
26
26
  align-items: center;
27
27
  flex-direction: column;
28
28
  box-sizing: border-box;
29
29
  }
30
30
 
31
- .@{prefix}-@{components}-tab-btn {
31
+ .@{prefix}-tab-btn {
32
32
  text-align: center;
33
33
 
34
- .@{prefix}-@{components}-tab-icon {
34
+ .@{prefix}-tab-icon {
35
35
  margin: 0 !important;
36
36
  }
37
37
  }
38
38
 
39
- .@{prefix}-@{components}-fill>.@{prefix}-@{components}-nav .@{prefix}-@{components}-tab-focus {
39
+ .@{prefix}-fill>.@{prefix}-nav .@{prefix}-tab-focus {
40
40
  outline: none;
41
41
  }
@@ -63,4 +63,7 @@ export { AlignTypes } from './ListItem';
63
63
  export { default as Selector } from './Selector';
64
64
  export { default as Checkbox } from './Checkbox';
65
65
  export { default as Radio } from './Radio';
66
+ export { default as AppStyleWrapper } from './AppStyleWrapper';
67
+ export { default as Row } from './Row';
68
+ export { default as Col } from './Col';
66
69
  export { default as GlobalTokenProvider } from './GlobalTokenProvider';
@@ -35,11 +35,13 @@ __export(components_exports, {
35
35
  AlignTypes: () => import_ListItem3.AlignTypes,
36
36
  Amount: () => import_Amount.default,
37
37
  AmountTitleTypes: () => import_Amount.AmountTitleTypes,
38
+ AppStyleWrapper: () => import_AppStyleWrapper.default,
38
39
  BackImageEnum: () => import_Image2.BackImageEnum,
39
40
  Button: () => import_Button.default,
40
41
  Card: () => import_Card.default,
41
42
  Checkbox: () => import_Checkbox.default,
42
43
  Chip: () => import_Chip.default,
44
+ Col: () => import_Col.default,
43
45
  Divider: () => import_Divider.default,
44
46
  Drawer: () => import_Drawer.default,
45
47
  DrawerTypeEnum: () => import_Drawer2.DrawerTypeEnum,
@@ -56,6 +58,7 @@ __export(components_exports, {
56
58
  Navigation: () => import_Navigation.default,
57
59
  Notification: () => import_Notification.default,
58
60
  Radio: () => import_Radio.default,
61
+ Row: () => import_Row.default,
59
62
  Search: () => import_Search.default,
60
63
  Select: () => import_Select.default,
61
64
  Selector: () => import_Selector.default,
@@ -115,4 +118,7 @@ var import_ListItem3 = require("./ListItem");
115
118
  var import_Selector = __toESM(require("./Selector"));
116
119
  var import_Checkbox = __toESM(require("./Checkbox"));
117
120
  var import_Radio = __toESM(require("./Radio"));
121
+ var import_AppStyleWrapper = __toESM(require("./AppStyleWrapper"));
122
+ var import_Row = __toESM(require("./Row"));
123
+ var import_Col = __toESM(require("./Col"));
118
124
  var import_GlobalTokenProvider = __toESM(require("./GlobalTokenProvider"));
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import './style/themes/index.css';
2
2
  export * from './components';
3
3
  export { default as tokenManager } from './utils/tokenManager';
4
- export { useBreakPoint, useIsMobile, checkIsMobile } from './utils/deviceType';
4
+ export { useBreakPoint, useIsMobile, checkIsMobile, isWebViewBelow90 } from './utils/deviceType';
5
5
  export * from './utils/themeContext';
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  checkIsMobile: () => import_deviceType.checkIsMobile,
34
+ isWebViewBelow90: () => import_deviceType.isWebViewBelow90,
34
35
  tokenManager: () => import_tokenManager.default,
35
36
  useBreakPoint: () => import_deviceType.useBreakPoint,
36
37
  useIsMobile: () => import_deviceType.useIsMobile
@@ -12,3 +12,18 @@ export declare const checkIsMobile: () => boolean;
12
12
  */
13
13
  export declare const useIsMobile: () => boolean;
14
14
  export declare const useBreakPoint: () => "desktop" | "mobile" | null;
15
+ /**
16
+ * 获取 WebView 的版本号
17
+ * @returns {number|null} 返回 WebView 的版本号(整数),如果无法解析则返回 null
18
+ */
19
+ export declare const getWebViewVersion: () => number | null;
20
+ /**
21
+ * 检测是否支持某个特性(例如 CSS 属性或 JavaScript API)
22
+ * @returns {boolean} 如果支持返回 true,否则返回 false
23
+ */
24
+ export declare const isGapSupported: () => boolean;
25
+ /**
26
+ * 检测 WebView 版本是否低于 90
27
+ * @returns {boolean} 如果版本低于 90 或无法检测到版本,则返回 true;否则返回 false
28
+ */
29
+ export declare const isWebViewBelow90: () => boolean;
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var deviceType_exports = {};
21
21
  __export(deviceType_exports, {
22
22
  checkIsMobile: () => checkIsMobile,
23
+ getWebViewVersion: () => getWebViewVersion,
24
+ isGapSupported: () => isGapSupported,
25
+ isWebViewBelow90: () => isWebViewBelow90,
23
26
  useBreakPoint: () => useBreakPoint,
24
27
  useIsMobile: () => useIsMobile
25
28
  });
@@ -54,3 +57,25 @@ var useBreakPoint = () => {
54
57
  }, []);
55
58
  return breakpoint;
56
59
  };
60
+ var getWebViewVersion = () => {
61
+ try {
62
+ const userAgent = (navigator == null ? void 0 : navigator.userAgent) || "";
63
+ const versionMatch = userAgent.match(/(Chrome|WebView)\/(\d+)/);
64
+ return versionMatch ? parseInt(versionMatch[2], 10) : null;
65
+ } catch (error) {
66
+ console.error("Error while parsing WebView version:", error);
67
+ return null;
68
+ }
69
+ };
70
+ var isGapSupported = () => {
71
+ const testElement = document.createElement("div");
72
+ testElement.style.gap = "1px";
73
+ return testElement.style.gap !== "";
74
+ };
75
+ var isWebViewBelow90 = () => {
76
+ const version = getWebViewVersion();
77
+ if (version !== null) {
78
+ return version < 90;
79
+ }
80
+ return !isGapSupported();
81
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalc/dxp-ui",
3
- "version": "0.0.6-0",
3
+ "version": "0.0.6-alpha.2",
4
4
  "description": "A UI library of Digitalc Design React Component",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -132,4 +132,4 @@
132
132
  "publishConfig": {
133
133
  "access": "public"
134
134
  }
135
- }
135
+ }