@digitalc/dxp-ui 0.0.6-alpha.2 → 0.0.6
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 +6 -535
- package/es/assets/iconFont/iconfont.css +6 -98
- package/es/assets/iconFont/iconfont.eot +0 -0
- package/es/assets/iconFont/iconfont.js +10 -10
- package/es/assets/iconFont/iconfont.json +0 -161
- package/es/assets/iconFont/iconfont.svg +0 -46
- 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/Amount/index.js +1 -0
- package/es/components/Button/designTokens.d.ts +0 -6
- package/es/components/Button/designTokens.js +1 -6
- package/es/components/Card/index.d.ts +1 -1
- package/es/components/Card/index.js +8 -3
- package/es/components/Card/style/index.less +1 -1
- package/es/components/Checkbox/style/index.less +5 -0
- package/es/components/Drawer/index.d.ts +0 -1
- package/es/components/Drawer/index.js +2 -3
- package/es/components/Drawer/style/index.less +0 -1
- package/es/components/Form/index.js +1 -1
- package/es/components/IconButton/index.js +1 -1
- package/es/components/Input/index.js +2 -2
- package/es/components/Input/style/index.less +3 -0
- package/es/components/Input/style/variables.less +4 -0
- package/es/components/Modal/index.js +1 -1
- package/es/components/Navigation/index.js +1 -1
- package/es/components/Selector/ESelector.js +2 -2
- package/es/components/Selector/style/index.less +11 -8
- package/es/components/SelectorItem/index.js +1 -1
- package/es/components/SelectorItem/style/index.less +11 -8
- package/es/components/Stepper/index.js +1 -2
- package/es/components/StickyFooter/index.js +10 -3
- package/es/components/Tabs/index.js +2 -3
- package/es/components/Tabs/style/index.less +5 -5
- package/es/components/index.d.ts +0 -3
- package/es/components/index.js +0 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/utils/deviceType.d.ts +0 -15
- package/es/utils/deviceType.js +0 -46
- package/lib/assets/iconFont/demo_index.html +6 -535
- package/lib/assets/iconFont/iconfont.css +6 -98
- package/lib/assets/iconFont/iconfont.eot +0 -0
- package/lib/assets/iconFont/iconfont.js +9 -9
- package/lib/assets/iconFont/iconfont.json +0 -161
- package/lib/assets/iconFont/iconfont.svg +0 -46
- 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/Amount/index.js +1 -0
- package/lib/components/Button/designTokens.d.ts +0 -6
- package/lib/components/Button/designTokens.js +0 -6
- package/lib/components/Card/index.d.ts +1 -1
- package/lib/components/Card/index.js +2 -2
- package/lib/components/Card/style/index.less +1 -1
- package/lib/components/Checkbox/style/index.less +5 -0
- package/lib/components/Drawer/index.d.ts +0 -1
- package/lib/components/Drawer/index.js +2 -3
- package/lib/components/Drawer/style/index.less +0 -1
- package/lib/components/Form/index.js +1 -1
- package/lib/components/IconButton/index.js +0 -2
- package/lib/components/Input/index.js +4 -1
- package/lib/components/Input/style/index.less +3 -0
- package/lib/components/Input/style/variables.less +4 -0
- package/lib/components/Modal/index.js +1 -2
- package/lib/components/Navigation/index.js +1 -1
- package/lib/components/Selector/ESelector.js +2 -4
- package/lib/components/Selector/style/index.less +11 -8
- package/lib/components/SelectorItem/index.js +1 -1
- package/lib/components/SelectorItem/style/index.less +11 -8
- package/lib/components/Stepper/index.js +1 -2
- package/lib/components/StickyFooter/index.js +2 -2
- package/lib/components/Tabs/index.js +5 -6
- package/lib/components/Tabs/style/index.less +5 -5
- package/lib/components/index.d.ts +0 -3
- package/lib/components/index.js +0 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/utils/deviceType.d.ts +0 -15
- package/lib/utils/deviceType.js +0 -25
- package/package.json +2 -2
- package/es/components/AppStyleWrapper/index.d.ts +0 -6
- package/es/components/AppStyleWrapper/index.js +0 -13
- package/es/components/Col/index.d.ts +0 -7
- package/es/components/Col/index.js +0 -21
- package/es/components/Row/index.d.ts +0 -7
- package/es/components/Row/index.js +0 -68
- package/lib/components/AppStyleWrapper/index.d.ts +0 -6
- package/lib/components/AppStyleWrapper/index.js +0 -48
- package/lib/components/Col/index.d.ts +0 -7
- package/lib/components/Col/index.js +0 -74
- package/lib/components/Row/index.d.ts +0 -7
- package/lib/components/Row/index.js +0 -114
|
@@ -23,11 +23,14 @@
|
|
|
23
23
|
&.active {
|
|
24
24
|
&.showActiveIcon {
|
|
25
25
|
.select-tick {
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 16px;
|
|
26
28
|
display: block;
|
|
27
29
|
position: absolute;
|
|
28
|
-
right:
|
|
29
|
-
bottom:
|
|
30
|
-
z-index:
|
|
30
|
+
right: 8px;
|
|
31
|
+
bottom: 4px;
|
|
32
|
+
z-index: 100;
|
|
33
|
+
transform: scale(0.5, 0.5);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
&:before {
|
|
@@ -37,14 +40,14 @@
|
|
|
37
40
|
&:after {
|
|
38
41
|
position: absolute;
|
|
39
42
|
content: '';
|
|
40
|
-
width:
|
|
41
|
-
height:
|
|
43
|
+
width: 64px;
|
|
44
|
+
height: 64px;
|
|
42
45
|
overflow: hidden;
|
|
43
46
|
border-radius: 10000px;
|
|
44
|
-
bottom: -
|
|
45
|
-
right: -
|
|
47
|
+
bottom: -32px;
|
|
48
|
+
right: -32px;
|
|
46
49
|
border-radius: 10000px;
|
|
47
|
-
z-index:
|
|
50
|
+
z-index: 99;
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
}
|
|
@@ -84,9 +84,8 @@ var Stepper = function Stepper(_ref) {
|
|
|
84
84
|
var _useMemo = useMemo(function () {
|
|
85
85
|
var _items$current, _items;
|
|
86
86
|
var hasNextStep = items && current !== undefined && current < items.length - 1;
|
|
87
|
-
var curStep = items && current !== undefined;
|
|
88
87
|
return {
|
|
89
|
-
title:
|
|
88
|
+
title: hasNextStep ? ((_items$current = items[current]) === null || _items$current === void 0 ? void 0 : _items$current.title) || '' : '',
|
|
90
89
|
nextStep: hasNextStep ? ((_items = items[current + 1]) === null || _items === void 0 ? void 0 : _items.title) || '' : ''
|
|
91
90
|
};
|
|
92
91
|
}, [items, current]),
|
|
@@ -86,8 +86,8 @@ var StickyFooter = function StickyFooter(props) {
|
|
|
86
86
|
disabled: btnDisabled,
|
|
87
87
|
children: buttonText
|
|
88
88
|
})
|
|
89
|
-
}), type === 'priceVariant' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
90
|
-
children: [
|
|
89
|
+
}), type === 'priceVariant' && !hideAmount && /*#__PURE__*/_jsxs(_Fragment, {
|
|
90
|
+
children: [/*#__PURE__*/_jsx(Amount, {
|
|
91
91
|
titleType: titleType,
|
|
92
92
|
priceStrikethrough: priceStrikethrough,
|
|
93
93
|
priceColor: colorPrice || priceColor,
|
|
@@ -101,7 +101,7 @@ var StickyFooter = function StickyFooter(props) {
|
|
|
101
101
|
onDropDownClick: onDropDownClick,
|
|
102
102
|
iconType: iconType,
|
|
103
103
|
children: price
|
|
104
|
-
}), !hideBtn && /*#__PURE__*/_jsxs(_Space, {
|
|
104
|
+
}), autoBreakPoint === DESKTOP && !hideBtn && /*#__PURE__*/_jsxs(_Space, {
|
|
105
105
|
size: "middle",
|
|
106
106
|
children: [showCancel, showPrevious, showBackPage, /*#__PURE__*/_jsx(Button, {
|
|
107
107
|
iconPosition: iconPosition,
|
|
@@ -112,6 +112,13 @@ var StickyFooter = function StickyFooter(props) {
|
|
|
112
112
|
onClick: onBtnClick,
|
|
113
113
|
children: buttonText
|
|
114
114
|
})]
|
|
115
|
+
}), autoBreakPoint === MOBILE && /*#__PURE__*/_jsx(Button, {
|
|
116
|
+
icon: btnIcon,
|
|
117
|
+
disabled: btnDisabled,
|
|
118
|
+
loading: btnLoading,
|
|
119
|
+
type: "primary",
|
|
120
|
+
onClick: onBtnClick,
|
|
121
|
+
children: buttonText
|
|
115
122
|
})]
|
|
116
123
|
})]
|
|
117
124
|
}), children]
|
|
@@ -22,7 +22,7 @@ var Tabs = function Tabs(props) {
|
|
|
22
22
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
23
23
|
defaultActiveKey = props.defaultActiveKey,
|
|
24
24
|
_props$prefixCls = props.prefixCls,
|
|
25
|
-
prefixCls = _props$prefixCls === void 0 ? "".concat(BASE_CLASS_PREFIX) : _props$prefixCls,
|
|
25
|
+
prefixCls = _props$prefixCls === void 0 ? "".concat(BASE_CLASS_PREFIX, "-tabs") : _props$prefixCls,
|
|
26
26
|
_props$className = props.className,
|
|
27
27
|
className = _props$className === void 0 ? '' : _props$className,
|
|
28
28
|
_props$isEqualTabs = props.isEqualTabs,
|
|
@@ -47,14 +47,13 @@ var Tabs = function Tabs(props) {
|
|
|
47
47
|
var iconColor = inverse ? otherDesignToken.colorTabsIconInactiveInverse : otherDesignToken.colorTabsIconInactive; // 选中的subTitle颜色
|
|
48
48
|
var iconActiveColor = inverse ? otherDesignToken.colorTabsIconActiveInverse : otherDesignToken.colorTabsIconActive; // 选中的subTitle颜色
|
|
49
49
|
|
|
50
|
-
var per = "".concat(BASE_CLASS_PREFIX, "-tabs");
|
|
51
50
|
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
52
51
|
var hashId = useStyleRegister({
|
|
53
52
|
theme: theme,
|
|
54
53
|
token: {},
|
|
55
54
|
path: ["".concat(prefixCls)]
|
|
56
55
|
}, function () {
|
|
57
|
-
return "\n .".concat(
|
|
56
|
+
return "\n .".concat(prefixCls, "-card.").concat(prefixCls, "-fill>.").concat(prefixCls, "-nav .").concat(prefixCls, "-tab {\n border-radius: 32px;\n height:40px;\n }\n .").concat(prefixCls, "-card.").concat(prefixCls, "-fill .").concat(prefixCls, "-nav-list {\n background: ").concat(designFillTokens.colorFillAlter, ";\n border-radius: 32px;\n }\n .").concat(prefixCls, "-tab-active .").concat(prefixCls, "-item-title {\n font-family:").concat(fontFamilySecondaryBold, "-Bold;\n }\n .").concat(prefixCls, "-fill .").concat(prefixCls, "-tab-active .").concat(prefixCls, "-item-title {\n font-family:").concat(fontFamilySecondaryBold, "-Bold;\n font-size: ").concat(fontSizeMobileContentC14, ";\n }\n ");
|
|
58
57
|
});
|
|
59
58
|
return hashId;
|
|
60
59
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
@components: tabs;
|
|
4
4
|
|
|
5
|
-
.@{prefix}-equal-tabs {
|
|
5
|
+
.@{prefix}-@{components}-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}-item {
|
|
24
|
+
.@{prefix}-@{components}-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}-tab-btn {
|
|
31
|
+
.@{prefix}-@{components}-tab-btn {
|
|
32
32
|
text-align: center;
|
|
33
33
|
|
|
34
|
-
.@{prefix}-tab-icon {
|
|
34
|
+
.@{prefix}-@{components}-tab-icon {
|
|
35
35
|
margin: 0 !important;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.@{prefix}-fill>.@{prefix}-nav .@{prefix}-tab-focus {
|
|
39
|
+
.@{prefix}-@{components}-fill>.@{prefix}-@{components}-nav .@{prefix}-@{components}-tab-focus {
|
|
40
40
|
outline: none;
|
|
41
41
|
}
|
package/es/components/index.d.ts
CHANGED
|
@@ -63,7 +63,4 @@ 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';
|
|
69
66
|
export { default as GlobalTokenProvider } from './GlobalTokenProvider';
|
package/es/components/index.js
CHANGED
|
@@ -38,7 +38,4 @@ export { AlignTypes } from "./ListItem";
|
|
|
38
38
|
export { default as Selector } from "./Selector";
|
|
39
39
|
export { default as Checkbox } from "./Checkbox";
|
|
40
40
|
export { default as Radio } from "./Radio";
|
|
41
|
-
export { default as AppStyleWrapper } from "./AppStyleWrapper";
|
|
42
|
-
export { default as Row } from "./Row";
|
|
43
|
-
export { default as Col } from "./Col";
|
|
44
41
|
export { default as GlobalTokenProvider } from "./GlobalTokenProvider";
|
package/es/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
|
|
4
|
+
export { useBreakPoint, useIsMobile, checkIsMobile } from './utils/deviceType';
|
|
5
5
|
export * from './utils/themeContext';
|
package/es/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export * from "./components";
|
|
|
5
5
|
|
|
6
6
|
// 导出工具函数
|
|
7
7
|
export { default as tokenManager } from "./utils/tokenManager";
|
|
8
|
-
export { useBreakPoint, useIsMobile, checkIsMobile
|
|
8
|
+
export { useBreakPoint, useIsMobile, checkIsMobile } from "./utils/deviceType";
|
|
9
9
|
|
|
10
10
|
// 这个是多主题的配置目前没用;选择了直接由消费者注入 token 的方式改变样式更灵活
|
|
11
11
|
export * from "./utils/themeContext";
|
package/es/utils/deviceType.d.ts
CHANGED
|
@@ -12,18 +12,3 @@ 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;
|
package/es/utils/deviceType.js
CHANGED
|
@@ -62,50 +62,4 @@ export var useBreakPoint = function useBreakPoint() {
|
|
|
62
62
|
setBreakpoint(autoBreakPoint);
|
|
63
63
|
}, []);
|
|
64
64
|
return breakpoint;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 获取 WebView 的版本号
|
|
69
|
-
* @returns {number|null} 返回 WebView 的版本号(整数),如果无法解析则返回 null
|
|
70
|
-
*/
|
|
71
|
-
export var getWebViewVersion = function getWebViewVersion() {
|
|
72
|
-
try {
|
|
73
|
-
var _navigator;
|
|
74
|
-
var userAgent = ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.userAgent) || ''; // 确保 navigator 和 userAgent 存在
|
|
75
|
-
|
|
76
|
-
// 匹配 Chrome/XX 或 WebView/XX(Android WebView 格式)
|
|
77
|
-
var versionMatch = userAgent.match(/(Chrome|WebView)\/(\d+)/);
|
|
78
|
-
|
|
79
|
-
// 如果匹配成功,返回版本号;否则返回 null
|
|
80
|
-
return versionMatch ? parseInt(versionMatch[2], 10) : null;
|
|
81
|
-
} catch (error) {
|
|
82
|
-
console.error('Error while parsing WebView version:', error);
|
|
83
|
-
return null; // 捕获异常并返回 null
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* 检测是否支持某个特性(例如 CSS 属性或 JavaScript API)
|
|
88
|
-
* @returns {boolean} 如果支持返回 true,否则返回 false
|
|
89
|
-
*/
|
|
90
|
-
export var isGapSupported = function isGapSupported() {
|
|
91
|
-
// 示例:检测是否支持 CSS 的 gap 属性
|
|
92
|
-
var testElement = document.createElement('div');
|
|
93
|
-
testElement.style.gap = '1px'; // 尝试设置 gap 属性
|
|
94
|
-
|
|
95
|
-
// 如果浏览器支持 gap 属性,则 style.gap 不会为空
|
|
96
|
-
return testElement.style.gap !== '';
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 检测 WebView 版本是否低于 90
|
|
101
|
-
* @returns {boolean} 如果版本低于 90 或无法检测到版本,则返回 true;否则返回 false
|
|
102
|
-
*/
|
|
103
|
-
export var isWebViewBelow90 = function isWebViewBelow90() {
|
|
104
|
-
var version = getWebViewVersion();
|
|
105
|
-
// 如果版本号有效且小于 90,返回 true
|
|
106
|
-
if (version !== null) {
|
|
107
|
-
return version < 90;
|
|
108
|
-
}
|
|
109
|
-
// 如果无法获取版本号,降级到特性检测
|
|
110
|
-
return !isGapSupported();
|
|
111
65
|
};
|