@digitalc/dxp-ui 0.0.6-alpha.1 → 0.0.6-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/iconFont/demo_index.html +535 -6
- package/es/assets/iconFont/iconfont.css +98 -6
- package/es/assets/iconFont/iconfont.eot +0 -0
- package/es/assets/iconFont/iconfont.js +10 -10
- package/es/assets/iconFont/iconfont.json +161 -0
- package/es/assets/iconFont/iconfont.svg +46 -0
- package/es/assets/iconFont/iconfont.ttf +0 -0
- package/es/assets/iconFont/iconfont.woff +0 -0
- package/es/assets/iconFont/iconfont.woff2 +0 -0
- package/es/components/BaseSpin/index.d.ts +8 -0
- package/es/components/BaseSpin/index.js +44 -0
- package/es/components/BaseSpin/index.less +32 -0
- package/es/components/Button/designTokens.d.ts +4 -0
- package/es/components/Button/designTokens.js +5 -1
- package/es/components/Card/designTokens.d.ts +0 -1
- package/es/components/Card/designTokens.js +1 -2
- package/es/components/Card/index.d.ts +0 -5
- package/es/components/Card/index.js +4 -6
- package/es/components/Drawer/index.d.ts +5 -1
- package/es/components/Drawer/index.js +11 -5
- package/es/components/Drawer/style/index.less +1 -0
- package/es/components/IconButton/index.js +1 -1
- package/es/components/Modal/index.js +1 -1
- package/es/components/Modal/style/index.less +0 -1
- package/es/components/Navigation/index.d.ts +1 -0
- package/es/components/Navigation/index.js +6 -2
- package/es/components/Notification/style/index.less +1 -1
- package/es/components/Selector/ESelector.js +2 -2
- package/es/components/Selector/style/index.less +6 -9
- package/es/components/SelectorItem/index.d.ts +1 -0
- package/es/components/SelectorItem/index.js +3 -1
- package/es/components/SelectorItem/style/index.less +6 -9
- package/es/components/Stepper/index.js +2 -1
- package/es/components/Tabs/index.js +2 -1
- package/es/components/Text/index.js +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +2 -1
- package/es/tokens/DXPGlobal.js +2 -2
- package/es/utils/deviceType.js +4 -1
- package/es/utils/scaleTool.js +3 -2
- package/lib/assets/iconFont/demo_index.html +535 -6
- package/lib/assets/iconFont/iconfont.css +98 -6
- package/lib/assets/iconFont/iconfont.eot +0 -0
- package/lib/assets/iconFont/iconfont.js +9 -9
- package/lib/assets/iconFont/iconfont.json +161 -0
- package/lib/assets/iconFont/iconfont.svg +46 -0
- package/lib/assets/iconFont/iconfont.ttf +0 -0
- package/lib/assets/iconFont/iconfont.woff +0 -0
- package/lib/assets/iconFont/iconfont.woff2 +0 -0
- package/lib/components/BaseSpin/index.d.ts +8 -0
- package/lib/components/BaseSpin/index.js +70 -0
- package/lib/components/BaseSpin/index.less +32 -0
- package/lib/components/Button/designTokens.d.ts +4 -0
- package/lib/components/Button/designTokens.js +5 -1
- package/lib/components/Card/designTokens.d.ts +0 -1
- package/lib/components/Card/designTokens.js +1 -2
- package/lib/components/Card/index.d.ts +0 -5
- package/lib/components/Card/index.js +3 -6
- package/lib/components/Drawer/index.d.ts +5 -1
- package/lib/components/Drawer/index.js +29 -7
- package/lib/components/Drawer/style/index.less +1 -0
- package/lib/components/IconButton/index.js +2 -0
- package/lib/components/Modal/index.js +1 -1
- package/lib/components/Modal/style/index.less +0 -1
- package/lib/components/Navigation/index.d.ts +1 -0
- package/lib/components/Navigation/index.js +6 -4
- package/lib/components/Notification/style/index.less +1 -1
- package/lib/components/Selector/ESelector.js +3 -3
- package/lib/components/Selector/style/index.less +6 -9
- package/lib/components/SelectorItem/index.d.ts +1 -0
- package/lib/components/SelectorItem/index.js +4 -2
- package/lib/components/SelectorItem/style/index.less +6 -9
- package/lib/components/Stepper/index.js +2 -1
- package/lib/components/Tabs/index.js +5 -4
- package/lib/components/Text/index.js +14 -14
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/tokens/DXPGlobal.js +1 -1
- package/lib/utils/deviceType.js +3 -1
- package/lib/utils/scaleTool.js +3 -2
- package/package.json +1 -1
|
@@ -67,7 +67,8 @@ var BottomDrawer = ({
|
|
|
67
67
|
visible,
|
|
68
68
|
onClose,
|
|
69
69
|
children,
|
|
70
|
-
|
|
70
|
+
width = "400px",
|
|
71
|
+
height = "auto",
|
|
71
72
|
title,
|
|
72
73
|
drawerType = DrawerTypeEnum.DrawerTypeDefault,
|
|
73
74
|
bottomBtnText,
|
|
@@ -78,7 +79,9 @@ var BottomDrawer = ({
|
|
|
78
79
|
imageSrc,
|
|
79
80
|
onLinkClick,
|
|
80
81
|
onBottomBtnClick,
|
|
81
|
-
btnDisabled
|
|
82
|
+
btnDisabled,
|
|
83
|
+
extra,
|
|
84
|
+
placement = "bottom"
|
|
82
85
|
}) => {
|
|
83
86
|
const originalBodyOverflow = (0, import_react.useRef)("");
|
|
84
87
|
const [isMounted, setIsMounted] = (0, import_react.useState)(false);
|
|
@@ -141,9 +144,6 @@ var BottomDrawer = ({
|
|
|
141
144
|
}
|
|
142
145
|
.${prefix}-content {
|
|
143
146
|
background: ${colorDrawerBackgroundStandard};
|
|
144
|
-
border-top-left-radius: ${borderTopLeftRadius}px;
|
|
145
|
-
border-top-right-radius:${borderTopRightRadius}px;
|
|
146
|
-
height:${height}px;
|
|
147
147
|
}
|
|
148
148
|
.${prefix}-inner {
|
|
149
149
|
padding-left: ${spacingDrawerPaddingHorizontal}px;
|
|
@@ -172,6 +172,28 @@ var BottomDrawer = ({
|
|
|
172
172
|
padding-left: ${spacingDrawerPaddingHorizontal}px;
|
|
173
173
|
padding-right: ${spacingDrawerPaddingHorizontal}px;
|
|
174
174
|
}
|
|
175
|
+
.${prefix}-bottom {
|
|
176
|
+
.${prefix}-content {
|
|
177
|
+
border-top-left-radius: ${borderTopLeftRadius}px;
|
|
178
|
+
border-top-right-radius: ${borderTopRightRadius}px;
|
|
179
|
+
height: ${height};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
.${prefix}-right {
|
|
183
|
+
.${prefix}-content {
|
|
184
|
+
border-radius: 0;
|
|
185
|
+
height: 100%;
|
|
186
|
+
width: ${width};
|
|
187
|
+
right: 0;
|
|
188
|
+
left: auto;
|
|
189
|
+
top: 0;
|
|
190
|
+
bottom: auto;
|
|
191
|
+
max-height: 100%;
|
|
192
|
+
}
|
|
193
|
+
.dxp-stickyFooter {
|
|
194
|
+
position: absolute;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
175
197
|
`);
|
|
176
198
|
return hashId;
|
|
177
199
|
};
|
|
@@ -194,7 +216,7 @@ var BottomDrawer = ({
|
|
|
194
216
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
195
217
|
"div",
|
|
196
218
|
{
|
|
197
|
-
className: `${prefix}-mask ${visible ? "visible" : ""} ${className || ""}`,
|
|
219
|
+
className: `${prefix}-mask ${visible ? "visible" : ""} ${className || ""} ${prefix}-${placement}`,
|
|
198
220
|
onClick: onClose
|
|
199
221
|
},
|
|
200
222
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -203,7 +225,7 @@ var BottomDrawer = ({
|
|
|
203
225
|
className: `${prefix}-content ${visible ? "active" : ""}`,
|
|
204
226
|
onClick: (e) => e.stopPropagation()
|
|
205
227
|
},
|
|
206
|
-
drawerType !== DrawerTypeEnum.DrawerTypeHandler && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-close-warp` }, TitleCom, showClose && /* @__PURE__ */ import_react.default.createElement(import__.Icon, { className: `${prefix}-icon-close`, type: "icon-Close", onClick: onClose })),
|
|
228
|
+
drawerType !== DrawerTypeEnum.DrawerTypeHandler && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-close-warp` }, extra, TitleCom, showClose && /* @__PURE__ */ import_react.default.createElement(import__.Icon, { className: `${prefix}-icon-close`, type: "icon-Close", onClick: onClose })),
|
|
207
229
|
/* @__PURE__ */ import_react.default.createElement(
|
|
208
230
|
"div",
|
|
209
231
|
{
|
|
@@ -144,12 +144,14 @@ var IconButton = (props) => {
|
|
|
144
144
|
width: ${designTokens.sizingIconButtonMedium}px;
|
|
145
145
|
height: ${designTokens.sizingIconButtonMedium}px;
|
|
146
146
|
padding: ${designTokens.spacingIconButtonPaddingHorizontal}px ${designTokens.spacingIconButtonPaddingVertical}px;
|
|
147
|
+
box-sizing: content-box;
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
.${prefixCls}-small {
|
|
150
151
|
width: ${designTokens.sizingIconButtonSmall}px;
|
|
151
152
|
height: ${designTokens.sizingIconButtonSmall}px;
|
|
152
153
|
padding: ${designTokens.spacingIconButtonPaddingHorizontalSm}px ${designTokens.spacingIconButtonPaddingVerticalSm}px;
|
|
154
|
+
box-sizing: content-box;
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
.${prefixCls}-container:hover {
|
|
@@ -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)();
|
|
@@ -177,8 +179,8 @@ var Navigation = (_a) => {
|
|
|
177
179
|
className
|
|
178
180
|
)
|
|
179
181
|
}, restProps),
|
|
180
|
-
!hidegoback && /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`,
|
|
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
|
+
!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 }),
|
|
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
|
};
|
|
@@ -113,8 +113,8 @@ var ESelector = (props) => {
|
|
|
113
113
|
path: [`${prefix}-warp`]
|
|
114
114
|
}, () => `
|
|
115
115
|
.${prefix}-warp {
|
|
116
|
-
div + div {
|
|
117
|
-
margin-top
|
|
116
|
+
> div + div {
|
|
117
|
+
margin-top: ${gap || 16}px;
|
|
118
118
|
}
|
|
119
119
|
.itemSelect {
|
|
120
120
|
.filterOptions {
|
|
@@ -167,7 +167,7 @@ var ESelector = (props) => {
|
|
|
167
167
|
),
|
|
168
168
|
onClick: () => !(disabled || item.disabled) && handleChangeSelectValue(item[idKey], item)
|
|
169
169
|
},
|
|
170
|
-
/* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size:
|
|
170
|
+
/* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 14, color: "#fff" }),
|
|
171
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]
|
|
172
172
|
)
|
|
173
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:
|
|
52
|
-
bottom:
|
|
49
|
+
right: 2px;
|
|
50
|
+
bottom: 0;
|
|
53
51
|
z-index: 2;
|
|
54
|
-
transform: scale(0.5, 0.5);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
&:before {
|
|
@@ -61,12 +58,12 @@
|
|
|
61
58
|
&:after {
|
|
62
59
|
position: absolute;
|
|
63
60
|
content: '';
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
61
|
+
width: 48px;
|
|
62
|
+
height: 48px;
|
|
66
63
|
overflow: hidden;
|
|
67
64
|
border-radius: 10000px;
|
|
68
|
-
bottom: -
|
|
69
|
-
right: -
|
|
65
|
+
bottom: -24px;
|
|
66
|
+
right: -24px;
|
|
70
67
|
border-radius: 10000px;
|
|
71
68
|
z-index: 1;
|
|
72
69
|
}
|
|
@@ -48,6 +48,7 @@ var SelectorItem = (props) => {
|
|
|
48
48
|
showActiveIcon = false,
|
|
49
49
|
children,
|
|
50
50
|
prefix = `${import_constants.cssClasses.PREFIX}-selectorItem`,
|
|
51
|
+
style,
|
|
51
52
|
onChange
|
|
52
53
|
} = props;
|
|
53
54
|
const designTokens = (0, import_designTokens.useDesignTokens)();
|
|
@@ -112,9 +113,10 @@ var SelectorItem = (props) => {
|
|
|
112
113
|
if (!disabled && onChange) {
|
|
113
114
|
onChange();
|
|
114
115
|
}
|
|
115
|
-
}
|
|
116
|
+
},
|
|
117
|
+
style
|
|
116
118
|
},
|
|
117
|
-
/* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size:
|
|
119
|
+
/* @__PURE__ */ import_react.default.createElement(import_Icon.default, { className: "select-tick", type: "icon-Tick", size: 14, color: "#fff" }),
|
|
118
120
|
children
|
|
119
121
|
);
|
|
120
122
|
};
|
|
@@ -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:
|
|
31
|
-
bottom:
|
|
28
|
+
right: 2px;
|
|
29
|
+
bottom: 0;
|
|
32
30
|
z-index: 2;
|
|
33
|
-
transform: scale(0.5, 0.5);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
&:before {
|
|
@@ -40,12 +37,12 @@
|
|
|
40
37
|
&:after {
|
|
41
38
|
position: absolute;
|
|
42
39
|
content: '';
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
40
|
+
width: 48px;
|
|
41
|
+
height: 48px;
|
|
45
42
|
overflow: hidden;
|
|
46
43
|
border-radius: 10000px;
|
|
47
|
-
bottom: -
|
|
48
|
-
right: -
|
|
44
|
+
bottom: -24px;
|
|
45
|
+
right: -24px;
|
|
49
46
|
border-radius: 10000px;
|
|
50
47
|
z-index: 1;
|
|
51
48
|
}
|
|
@@ -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:
|
|
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]);
|
|
@@ -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
|
-
.${
|
|
112
|
+
.${per}-card.${prefixCls}-fill>.${per}-nav .${per}-tab {
|
|
112
113
|
border-radius: 32px;
|
|
113
114
|
height:40px;
|
|
114
115
|
}
|
|
115
|
-
.${
|
|
116
|
+
.${per}-card.${prefixCls}-fill .${per}-nav-list {
|
|
116
117
|
background: ${designFillTokens.colorFillAlter};
|
|
117
118
|
border-radius: 32px;
|
|
118
119
|
}
|
|
119
|
-
.${
|
|
120
|
+
.${per}-tab-active .${prefixCls}-item-title {
|
|
120
121
|
font-family:${fontFamilySecondaryBold}-Bold;
|
|
121
122
|
}
|
|
122
|
-
.${prefixCls}-fill .${
|
|
123
|
+
.${prefixCls}-fill .${per}-tab-active .${prefixCls}-item-title {
|
|
123
124
|
font-family:${fontFamilySecondaryBold}-Bold;
|
|
124
125
|
font-size: ${fontSizeMobileContentC14};
|
|
125
126
|
}
|
|
@@ -156,8 +156,8 @@ var Text = (props) => {
|
|
|
156
156
|
.${prefixCls}-mobile {
|
|
157
157
|
&.${prefixCls}-size-NavigationBold {
|
|
158
158
|
font-size: ${fontSizeMobileNavigation};
|
|
159
|
-
line-height: 1.
|
|
160
|
-
font-family: ${
|
|
159
|
+
line-height: 1.5;
|
|
160
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
161
161
|
font-weight: bold;
|
|
162
162
|
}
|
|
163
163
|
&.${prefixCls}-size-TitleT41Bold {
|
|
@@ -199,37 +199,37 @@ var Text = (props) => {
|
|
|
199
199
|
&.${prefixCls}-size-TitleT15Bold {
|
|
200
200
|
font-size: ${fontSizeMobileTitleT15};
|
|
201
201
|
line-height: ${lineHeightT15M};
|
|
202
|
-
font-family: ${
|
|
202
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
203
203
|
font-weight: bold;
|
|
204
204
|
}
|
|
205
205
|
&.${prefixCls}-size-TitleT14Bold {
|
|
206
206
|
font-size: ${fontSizeMobileTitleT14};
|
|
207
207
|
line-height: 1.5;
|
|
208
|
-
font-family: ${
|
|
208
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
209
209
|
font-weight: bold;
|
|
210
210
|
}
|
|
211
211
|
&.${prefixCls}-size-TitleT13Bold {
|
|
212
212
|
font-size: ${fontSizeMobileTitleT13};
|
|
213
213
|
line-height: 1.5;
|
|
214
|
-
font-family: ${
|
|
214
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
215
215
|
font-weight: bold;
|
|
216
216
|
}
|
|
217
217
|
&.${prefixCls}-size-TitleT12Bold {
|
|
218
218
|
font-size: ${fontSizeMobileTitleT12};
|
|
219
219
|
line-height: 1.5;
|
|
220
|
-
font-family: ${
|
|
220
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
221
221
|
font-weight: bold;
|
|
222
222
|
}
|
|
223
223
|
&.${prefixCls}-size-ContentC23Bold {
|
|
224
224
|
font-size: ${fontSizeMobileContentC23};
|
|
225
225
|
line-height: 1.25;
|
|
226
|
-
font-family: ${
|
|
226
|
+
font-family: ${fontFamilyPrimaryBold}-${fontFamilyMap.fontFamilyPrimaryBold};
|
|
227
227
|
font-weight: bold;
|
|
228
228
|
}
|
|
229
229
|
&.${prefixCls}-size-ContentC21Bold {
|
|
230
230
|
font-size: ${fontSizeMobileContentC21};
|
|
231
231
|
line-height: ${lineHeightC21M};
|
|
232
|
-
font-family: ${
|
|
232
|
+
font-family: ${fontFamilyPrimaryBold}-${fontFamilyMap.fontFamilyPrimaryBold};
|
|
233
233
|
font-weight: bold;
|
|
234
234
|
}
|
|
235
235
|
&.${prefixCls}-size-ContentC16Bold {
|
|
@@ -386,37 +386,37 @@ var Text = (props) => {
|
|
|
386
386
|
&.${prefixCls}-size-TitleT15Bold {
|
|
387
387
|
font-size: ${fontSizeDesktopTitleT15};
|
|
388
388
|
line-height: ${lineHeightT15};
|
|
389
|
-
font-family: ${
|
|
389
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
390
390
|
font-weight: bold;
|
|
391
391
|
}
|
|
392
392
|
&.${prefixCls}-size-TitleT14Bold {
|
|
393
393
|
font-size: ${fontSizeDesktopTitleT14};
|
|
394
394
|
line-height: 1.5;
|
|
395
|
-
font-family: ${
|
|
395
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
396
396
|
font-weight: bold;
|
|
397
397
|
}
|
|
398
398
|
&.${prefixCls}-size-TitleT13Bold {
|
|
399
399
|
font-size: ${fontSizeDesktopTitleT13};
|
|
400
400
|
line-height: 1.5;
|
|
401
|
-
font-family: ${
|
|
401
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
402
402
|
font-weight: bold;
|
|
403
403
|
}
|
|
404
404
|
&.${prefixCls}-size-TitleT12Bold {
|
|
405
405
|
font-size: ${fontSizeDesktopTitleT12};
|
|
406
406
|
line-height: 1.5;
|
|
407
|
-
font-family: ${
|
|
407
|
+
font-family: ${fontFamilySecondaryBold}-${fontFamilyMap.fontFamilySecondaryBold};
|
|
408
408
|
font-weight: bold;
|
|
409
409
|
}
|
|
410
410
|
&.${prefixCls}-size-ContentC23Bold {
|
|
411
411
|
font-size: ${fontSizeDesktopContentC23};
|
|
412
412
|
line-height: 1.25;
|
|
413
|
-
font-family: ${
|
|
413
|
+
font-family: ${fontFamilyPrimaryBold}-${fontFamilyMap.fontFamilyPrimaryBold};
|
|
414
414
|
font-weight: bold;
|
|
415
415
|
}
|
|
416
416
|
&.${prefixCls}-size-ContentC21Bold {
|
|
417
417
|
font-size: ${fontSizeDesktopContentC21};
|
|
418
418
|
line-height: ${lineHeightC21};
|
|
419
|
-
font-family: ${
|
|
419
|
+
font-family: ${fontFamilyPrimaryBold}-${fontFamilyMap.fontFamilyPrimaryBold};
|
|
420
420
|
font-weight: bold;
|
|
421
421
|
}
|
|
422
422
|
&.${prefixCls}-size-ContentC16Bold {
|
|
@@ -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';
|
package/lib/components/index.js
CHANGED
|
@@ -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"));
|
package/lib/tokens/DXPGlobal.js
CHANGED
|
@@ -33,5 +33,5 @@ __export(DXPGlobal_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(DXPGlobal_exports);
|
|
35
35
|
var import_token = __toESM(require("../assets/token.json"));
|
|
36
|
-
var dxpToken = import_token.default.
|
|
36
|
+
var dxpToken = import_token.default.eSales;
|
|
37
37
|
var DXPGlobal_default = dxpToken;
|
package/lib/utils/deviceType.js
CHANGED
|
@@ -33,7 +33,9 @@ var checkIsMobile = () => {
|
|
|
33
33
|
if (typeof window === "undefined") {
|
|
34
34
|
return false;
|
|
35
35
|
}
|
|
36
|
-
|
|
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;
|
package/lib/utils/scaleTool.js
CHANGED
|
@@ -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));
|