@trionesdev/antd-taro-react 0.0.2-beta.8 → 0.0.2-beta.9

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.
@@ -21,6 +21,9 @@ export type PopupProps = {
21
21
  safeArea?: boolean;
22
22
  zIndex?: number;
23
23
  styles?: {
24
+ overlay?: React.CSSProperties;
25
+ container?: React.CSSProperties;
26
+ header?: React.CSSProperties;
24
27
  title?: React.CSSProperties;
25
28
  body?: React.CSSProperties;
26
29
  };
@@ -40,7 +40,8 @@ export var Popup = function Popup(_ref) {
40
40
  _ref$safeArea = _ref.safeArea,
41
41
  safeArea = _ref$safeArea === void 0 ? true : _ref$safeArea,
42
42
  zIndex = _ref.zIndex,
43
- children = _ref.children;
43
+ children = _ref.children,
44
+ styles = _ref.styles;
44
45
  var _useState = useState(open || false),
45
46
  _useState2 = _slicedToArray(_useState, 2),
46
47
  internalOpen = _useState2[0],
@@ -61,17 +62,26 @@ export var Popup = function Popup(_ref) {
61
62
  className: classNames("".concat(cls, "-close"), "".concat(cls, "-close-").concat(closeIconPosition)),
62
63
  onClick: handleClose
63
64
  }, closeIcon || /*#__PURE__*/React.createElement(CloseOutline, null)), title && /*#__PURE__*/React.createElement("div", {
64
- className: "".concat(cls, "-title")
65
- }, title), children);
65
+ className: "".concat(cls, "-header"),
66
+ style: styles === null || styles === void 0 ? void 0 : styles.header
67
+ }, /*#__PURE__*/React.createElement("div", {
68
+ className: "".concat(cls, "-title"),
69
+ style: styles === null || styles === void 0 ? void 0 : styles.title
70
+ }, title)), /*#__PURE__*/React.createElement("div", {
71
+ className: "".concat(cls, "-body"),
72
+ style: styles === null || styles === void 0 ? void 0 : styles.body
73
+ }, children));
66
74
  return /*#__PURE__*/React.createElement(Overlay, {
67
75
  open: internalOpen,
68
76
  onClose: handleClose,
69
77
  closeOnOverlayClick: overlayClosable,
70
78
  zIndex: zIndex,
71
- className: classNames("".concat(cls, "-root"), "".concat(cls, "-").concat(position)),
79
+ className: classNames("".concat(cls, "-overlay"), "".concat(cls, "-").concat(position)),
72
80
  afterClose: afterClose,
73
- afterOpenChange: afterOpenChange
81
+ afterOpenChange: afterOpenChange,
82
+ style: styles === null || styles === void 0 ? void 0 : styles.overlay
74
83
  }, /*#__PURE__*/React.createElement(View, {
75
- className: classNames(cls, _defineProperty({}, "".concat(cls, "-round"), round))
84
+ className: classNames("".concat(cls, "-container"), _defineProperty({}, "".concat(cls, "-round"), round)),
85
+ style: styles === null || styles === void 0 ? void 0 : styles.container
76
86
  }, ['top', 'bottom', 'left', 'right'].includes(position) ? /*#__PURE__*/React.createElement(SafeArea, null, popupInner) : popupInner));
77
87
  };
@@ -3,18 +3,21 @@
3
3
  $trionesPopupCls: 'triones-antm-popup';
4
4
 
5
5
  .#{$trionesPopupCls} {
6
- &-root {
6
+ &-overlay {
7
7
  display: flex;
8
8
 
9
9
  .#{$trionesPopupCls} {
10
- position: relative;
11
- background-color: white;
12
-
13
- &-title {
14
- text-align: center;
10
+ &-container{
11
+ position: relative;
12
+ background-color: white;
13
+ }
14
+ &header{
15
15
  padding-block: variable.$trionesPaddingContentVertical;
16
16
  padding-inline: variable.$trionesPaddingContentHorizontal;
17
17
  }
18
+ &-title {
19
+ text-align: center;
20
+ }
18
21
 
19
22
  &-close {
20
23
  position: absolute;
@@ -38,9 +41,11 @@ $trionesPopupCls: 'triones-antm-popup';
38
41
  justify-content: flex-start;
39
42
 
40
43
  .#{$trionesPopupCls} {
41
- width: 100%;
42
- min-height: 20%;
43
- max-height: 90%;
44
+ &-container{
45
+ width: 100%;
46
+ min-height: 20%;
47
+ max-height: 90%;
48
+ }
44
49
 
45
50
  &-round {
46
51
  border-bottom-left-radius: variable.$trionesBorderRadius;
@@ -55,9 +60,11 @@ $trionesPopupCls: 'triones-antm-popup';
55
60
  justify-content: flex-end;
56
61
 
57
62
  .#{$trionesPopupCls} {
58
- width: 100%;
59
- min-height: 20%;
60
- max-height: 90%;
63
+ &-container{
64
+ width: 100%;
65
+ min-height: 20%;
66
+ max-height: 90%;
67
+ }
61
68
 
62
69
  &-round {
63
70
  border-top-left-radius: variable.$trionesBorderRadius;
@@ -71,9 +78,11 @@ $trionesPopupCls: 'triones-antm-popup';
71
78
  justify-content: flex-start;
72
79
 
73
80
  .#{$trionesPopupCls} {
74
- height: 100%;
75
- min-width: 20%;
76
- max-width: 90%;
81
+ &-container{
82
+ height: 100%;
83
+ min-width: 20%;
84
+ max-width: 90%;
85
+ }
77
86
 
78
87
  &-round {
79
88
  border-top-right-radius: variable.$trionesBorderRadius;
@@ -88,9 +97,11 @@ $trionesPopupCls: 'triones-antm-popup';
88
97
  justify-content: flex-end;
89
98
 
90
99
  .#{$trionesPopupCls} {
91
- height: 100%;
92
- min-width: 20%;
93
- max-width: 90%;
100
+ &-container{
101
+ height: 100%;
102
+ min-width: 20%;
103
+ max-width: 90%;
104
+ }
94
105
 
95
106
  &-round {
96
107
  border-top-left-radius: variable.$trionesBorderRadius;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trionesdev/antd-taro-react",
3
- "version": "0.0.2-beta.8",
3
+ "version": "0.0.2-beta.9",
4
4
  "description": "antd taro react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -56,17 +56,15 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@tarojs/components": "^4.1.8",
59
- "@trionesdev/antd-mobile-base-react": "^0.0.2-beta.8",
59
+ "@trionesdev/antd-mobile-base-react": "^0.0.2-beta.9",
60
60
  "crypto-js": "^4.2.0",
61
61
  "dayjs": "^1.11.19",
62
62
  "rc-field-form": "^2.7.0",
63
- "rc-util": "^5.44.3",
64
- "react": "^18.0.0",
65
- "runes2": "^1.1.4"
63
+ "react": "^18.0.0"
66
64
  },
67
65
  "optionalDependencies": {
68
66
  "@trionesdev/antd-mobile-base-react": "workspace:*",
69
- "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.8"
67
+ "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.9"
70
68
  },
71
- "gitHead": "f88406f6bb2af29bd4f8f470adb1d029f7787242"
69
+ "gitHead": "c062f3bd8651ea933f9385279c05a1ab0245b2b8"
72
70
  }