@sheinx/base 3.9.2-beta.6 → 3.9.2-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,KAAK;YAAW,UAAU;;CAqL/B,CAAC;AAIF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,KAAK;YAAW,UAAU;;CAuL/B,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -14,7 +14,7 @@ var _imageGroup = _interopRequireDefault(require("./image-group"));
14
14
  var _icons = _interopRequireDefault(require("../icons"));
15
15
  var _spin = _interopRequireDefault(require("../spin"));
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
- var _excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef", "renderHoverMask"];
17
+ var _excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef", "renderHoverMask", "inViewOnly"];
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -55,6 +55,7 @@ var Image = function Image(props) {
55
55
  onClick = props.onClick,
56
56
  componentRef = props.componentRef,
57
57
  renderHoverMask = props.renderHoverMask,
58
+ inViewOnly = props.inViewOnly,
58
59
  rest = _objectWithoutProperties(props, _excluded);
59
60
  var _useImage = (0, _hooks.useImage)(_objectSpread({
60
61
  container: (0, _config.getDefaultContainer)(),
@@ -64,7 +65,8 @@ var Image = function Image(props) {
64
65
  lazy: lazy,
65
66
  autoSSL: autoSSL,
66
67
  noImgDrag: noImgDrag,
67
- fit: fit
68
+ fit: fit,
69
+ inViewOnly: inViewOnly
68
70
  }, rest)),
69
71
  status = _useImage.status,
70
72
  getRootProps = _useImage.getRootProps,
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,QAAQ,UAAW,mBAAmB,aAAa,CAAC,4CAmQzD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,QAAQ,UAAW,mBAAmB,aAAa,CAAC,4CAoQzD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/cjs/menu/item.js CHANGED
@@ -107,7 +107,9 @@ var MenuItem = function MenuItem(props) {
107
107
  var content = function content(close) {
108
108
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
109
109
  ref: childrenRef,
110
- className: (0, _classnames.default)(shoudPop && (classes === null || classes === void 0 ? void 0 : classes.childrenShow), classes === null || classes === void 0 ? void 0 : classes.children, isUp && (classes === null || classes === void 0 ? void 0 : classes.childrenUp), hasExpandAbleChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHasExpand), shouldHideChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHidden))
110
+ className: (0, _classnames.default)(shoudPop && (classes === null || classes === void 0 ? void 0 : classes.childrenShow), classes === null || classes === void 0 ? void 0 : classes.children, isUp && (classes === null || classes === void 0 ? void 0 : classes.childrenUp), hasExpandAbleChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHasExpand),
111
+ // 有close函数的是popover弹出的菜单,不需要childrenHidden类名
112
+ shouldHideChildren && !close && (classes === null || classes === void 0 ? void 0 : classes.childrenHidden))
111
113
  // 子菜单点击弹出
112
114
  ,
113
115
  onClick: close,
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,QAAA,MAAM,IAAI,kHAyIT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,QAAA,MAAM,IAAI,kHA2IT,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/cjs/menu/menu.js CHANGED
@@ -105,7 +105,10 @@ var Menu = function Menu(props) {
105
105
  context.inTransition = false;
106
106
  render();
107
107
  }
108
- },
108
+ }
109
+ // todo: 其实可以把scrollRef指向到这里,后续验证相关功能后重构
110
+ // ref={scrollRef}
111
+ ,
109
112
  children: [renderHeader(), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
110
113
  className: classes === null || classes === void 0 ? void 0 : classes.scrollbox,
111
114
  ref: scrollRef,
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,KAAK;YAAW,UAAU;;CAqL/B,CAAC;AAIF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,KAAK;YAAW,UAAU;;CAuL/B,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef", "renderHoverMask"];
2
+ var _excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef", "renderHoverMask", "inViewOnly"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -47,6 +47,7 @@ var Image = function Image(props) {
47
47
  onClick = props.onClick,
48
48
  componentRef = props.componentRef,
49
49
  renderHoverMask = props.renderHoverMask,
50
+ inViewOnly = props.inViewOnly,
50
51
  rest = _objectWithoutProperties(props, _excluded);
51
52
  var _useImage = useImage(_objectSpread({
52
53
  container: getDefaultContainer(),
@@ -56,7 +57,8 @@ var Image = function Image(props) {
56
57
  lazy: lazy,
57
58
  autoSSL: autoSSL,
58
59
  noImgDrag: noImgDrag,
59
- fit: fit
60
+ fit: fit,
61
+ inViewOnly: inViewOnly
60
62
  }, rest)),
61
63
  status = _useImage.status,
62
64
  getRootProps = _useImage.getRootProps,
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,QAAQ,UAAW,mBAAmB,aAAa,CAAC,4CAmQzD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,QAAQ,UAAW,mBAAmB,aAAa,CAAC,4CAoQzD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/esm/menu/item.js CHANGED
@@ -101,7 +101,9 @@ var MenuItem = function MenuItem(props) {
101
101
  var content = function content(close) {
102
102
  return /*#__PURE__*/_jsx("ul", {
103
103
  ref: childrenRef,
104
- className: classNames(shoudPop && (classes === null || classes === void 0 ? void 0 : classes.childrenShow), classes === null || classes === void 0 ? void 0 : classes.children, isUp && (classes === null || classes === void 0 ? void 0 : classes.childrenUp), hasExpandAbleChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHasExpand), shouldHideChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHidden))
104
+ className: classNames(shoudPop && (classes === null || classes === void 0 ? void 0 : classes.childrenShow), classes === null || classes === void 0 ? void 0 : classes.children, isUp && (classes === null || classes === void 0 ? void 0 : classes.childrenUp), hasExpandAbleChildren && (classes === null || classes === void 0 ? void 0 : classes.childrenHasExpand),
105
+ // 有close函数的是popover弹出的菜单,不需要childrenHidden类名
106
+ shouldHideChildren && !close && (classes === null || classes === void 0 ? void 0 : classes.childrenHidden))
105
107
  // 子菜单点击弹出
106
108
  ,
107
109
  onClick: close,
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,QAAA,MAAM,IAAI,kHAyIT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,QAAA,MAAM,IAAI,kHA2IT,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/esm/menu/menu.js CHANGED
@@ -100,7 +100,10 @@ var Menu = function Menu(props) {
100
100
  context.inTransition = false;
101
101
  render();
102
102
  }
103
- },
103
+ }
104
+ // todo: 其实可以把scrollRef指向到这里,后续验证相关功能后重构
105
+ // ref={scrollRef}
106
+ ,
104
107
  children: [renderHeader(), /*#__PURE__*/_jsx("div", {
105
108
  className: classes === null || classes === void 0 ? void 0 : classes.scrollbox,
106
109
  ref: scrollRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.2-beta.6",
3
+ "version": "3.9.2-beta.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.9.2-beta.6",
13
+ "@sheinx/hooks": "3.9.2-beta.8",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"