@sheinx/base 3.8.6-beta.6 → 3.9.0-beta.1

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":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAixBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAsxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -556,15 +556,16 @@ var Cascader = function Cascader(props0) {
556
556
  });
557
557
  };
558
558
  var renderEmpty = function renderEmpty() {
559
+ var $empty = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
560
+ className: styles === null || styles === void 0 ? void 0 : styles.empty,
561
+ children: emptyText || (0, _config.getLocale)(locale, 'noData')
562
+ });
559
563
  if (renderOptionList) {
560
- return renderOptionList(null, {
564
+ return renderOptionList($empty, {
561
565
  loading: !!loading
562
566
  });
563
567
  }
564
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
565
- className: styles === null || styles === void 0 ? void 0 : styles.empty,
566
- children: emptyText || (0, _config.getLocale)(locale, 'noData')
567
- });
568
+ return $empty;
568
569
  };
569
570
  var renderNormalList = function renderNormalList() {
570
571
  if (!open && isFirstRender.current) {
@@ -584,7 +585,7 @@ var Cascader = function Cascader(props0) {
584
585
  } : {
585
586
  maxHeight: height
586
587
  };
587
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
588
+ var $filterList = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
588
589
  className: (0, _classnames.default)(styles.listContent, styles.filterList),
589
590
  style: listStyle,
590
591
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterList.default, {
@@ -608,6 +609,12 @@ var Cascader = function Cascader(props0) {
608
609
  onPathChange: handlePathChange
609
610
  })
610
611
  });
612
+ if (renderOptionList) {
613
+ return renderOptionList($filterList, {
614
+ loading: !!loading
615
+ });
616
+ }
617
+ return $filterList;
611
618
  };
612
619
  var renderLoading = function renderLoading() {
613
620
  if (loading !== true) {
@@ -1 +1 @@
1
- {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAixBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAsxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -549,15 +549,16 @@ var Cascader = function Cascader(props0) {
549
549
  });
550
550
  };
551
551
  var renderEmpty = function renderEmpty() {
552
+ var $empty = /*#__PURE__*/_jsx("div", {
553
+ className: styles === null || styles === void 0 ? void 0 : styles.empty,
554
+ children: emptyText || getLocale(locale, 'noData')
555
+ });
552
556
  if (renderOptionList) {
553
- return renderOptionList(null, {
557
+ return renderOptionList($empty, {
554
558
  loading: !!loading
555
559
  });
556
560
  }
557
- return /*#__PURE__*/_jsx("div", {
558
- className: styles === null || styles === void 0 ? void 0 : styles.empty,
559
- children: emptyText || getLocale(locale, 'noData')
560
- });
561
+ return $empty;
561
562
  };
562
563
  var renderNormalList = function renderNormalList() {
563
564
  if (!open && isFirstRender.current) {
@@ -577,7 +578,7 @@ var Cascader = function Cascader(props0) {
577
578
  } : {
578
579
  maxHeight: height
579
580
  };
580
- return /*#__PURE__*/_jsx("div", {
581
+ var $filterList = /*#__PURE__*/_jsx("div", {
581
582
  className: classNames(styles.listContent, styles.filterList),
582
583
  style: listStyle,
583
584
  children: /*#__PURE__*/_jsx(CascaderFilterList, {
@@ -601,6 +602,12 @@ var Cascader = function Cascader(props0) {
601
602
  onPathChange: handlePathChange
602
603
  })
603
604
  });
605
+ if (renderOptionList) {
606
+ return renderOptionList($filterList, {
607
+ loading: !!loading
608
+ });
609
+ }
610
+ return $filterList;
604
611
  };
605
612
  var renderLoading = function renderLoading() {
606
613
  if (loading !== true) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.8.6-beta.6",
3
+ "version": "3.9.0-beta.1",
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.8.6-beta.6",
13
+ "@sheinx/hooks": "3.9.0-beta.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"