@sheinx/base 3.5.8-beta.13 → 3.5.8-beta.15

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.
@@ -43,6 +43,7 @@ var Breadcrumb = function Breadcrumb(props) {
43
43
  if (d.url) _props.href = d.url;
44
44
  item = /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", _objectSpread(_objectSpread({}, _props), {}, {
45
45
  className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
46
+ role: "button",
46
47
  children: [d.icon, d.icon && d.title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
47
48
  children: "\xA0"
48
49
  }), d.title]
@@ -1 +1 @@
1
- {"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["descriptions.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAGlF,QAAA,MAAM,YAAY,UAAW,iBAAiB,gBA+H7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["descriptions.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAGlF,QAAA,MAAM,YAAY,UAAW,iBAAiB,gBAkI7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -48,6 +48,7 @@ var Descriptions = function Descriptions(props) {
48
48
  renderItem = _useDescriptions.renderItem;
49
49
  var jssStyle = (jssStyleProps === null || jssStyleProps === void 0 || (_jssStyleProps$descri = jssStyleProps.descriptions) === null || _jssStyleProps$descri === void 0 ? void 0 : _jssStyleProps$descri.call(jssStyleProps)) || {};
50
50
  var Header = function Header() {
51
+ if (!title && !extra) return null;
51
52
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
52
53
  className: jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.header,
53
54
  children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdownIn.d.ts","sourceRoot":"","sources":["dropdownIn.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA8B,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AASlF,QAAA,MAAM,QAAQ,UAAW,mBAAmB,gBA0O3C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"dropdownIn.d.ts","sourceRoot":"","sources":["dropdownIn.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA8B,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AASlF,QAAA,MAAM,QAAQ,UAAW,mBAAmB,gBA2O3C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -202,6 +202,7 @@ var Dropdown = function Dropdown(props) {
202
202
  className: (0, _classnames.default)(dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.list, hasChildren && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listHasChildren), columns !== undefined && columns > 1 && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.boxList), size === 'small' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listSmall), size === 'large' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listLarge)),
203
203
  style: {
204
204
  width: width,
205
+ minWidth: 90,
205
206
  gridTemplateColumns: columns ? "repeat(".concat(columns, ", 1fr)") : undefined
206
207
  },
207
208
  type: 'fade',
package/cjs/tabs/tabs.js CHANGED
@@ -147,7 +147,7 @@ var Tabs = function Tabs(props) {
147
147
  var nextCollapse = !collapse;
148
148
  setCollapse(nextCollapse);
149
149
  };
150
- (0, _react.useEffect)(function () {
150
+ (0, _react.useLayoutEffect)(function () {
151
151
  if (!panelRef.current) return;
152
152
  if (collapsible) {
153
153
  if (collapse) {
@@ -38,6 +38,7 @@ var Breadcrumb = function Breadcrumb(props) {
38
38
  if (d.url) _props.href = d.url;
39
39
  item = /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({}, _props), {}, {
40
40
  className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
41
+ role: "button",
41
42
  children: [d.icon, d.icon && d.title && /*#__PURE__*/_jsx(_Fragment, {
42
43
  children: "\xA0"
43
44
  }), d.title]
@@ -1 +1 @@
1
- {"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["descriptions.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAGlF,QAAA,MAAM,YAAY,UAAW,iBAAiB,gBA+H7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["descriptions.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAGlF,QAAA,MAAM,YAAY,UAAW,iBAAiB,gBAkI7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -40,6 +40,7 @@ var Descriptions = function Descriptions(props) {
40
40
  renderItem = _useDescriptions.renderItem;
41
41
  var jssStyle = (jssStyleProps === null || jssStyleProps === void 0 || (_jssStyleProps$descri = jssStyleProps.descriptions) === null || _jssStyleProps$descri === void 0 ? void 0 : _jssStyleProps$descri.call(jssStyleProps)) || {};
42
42
  var Header = function Header() {
43
+ if (!title && !extra) return null;
43
44
  return /*#__PURE__*/_jsxs("div", {
44
45
  className: jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.header,
45
46
  children: [title && /*#__PURE__*/_jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdownIn.d.ts","sourceRoot":"","sources":["dropdownIn.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA8B,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AASlF,QAAA,MAAM,QAAQ,UAAW,mBAAmB,gBA0O3C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"dropdownIn.d.ts","sourceRoot":"","sources":["dropdownIn.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA8B,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AASlF,QAAA,MAAM,QAAQ,UAAW,mBAAmB,gBA2O3C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -196,6 +196,7 @@ var Dropdown = function Dropdown(props) {
196
196
  className: classNames(dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.list, hasChildren && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listHasChildren), columns !== undefined && columns > 1 && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.boxList), size === 'small' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listSmall), size === 'large' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listLarge)),
197
197
  style: {
198
198
  width: width,
199
+ minWidth: 90,
199
200
  gridTemplateColumns: columns ? "repeat(".concat(columns, ", 1fr)") : undefined
200
201
  },
201
202
  type: 'fade',
package/esm/tabs/tabs.js CHANGED
@@ -13,7 +13,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
15
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
- import React, { Children, cloneElement, useEffect, useRef, useState } from 'react';
16
+ import React, { Children, cloneElement, useLayoutEffect, useRef, useState } from 'react';
17
17
  import classNames from 'classnames';
18
18
  import { useTabs, util } from '@sheinx/hooks';
19
19
  import TabsPanel from "./tabs-panel";
@@ -140,7 +140,7 @@ var Tabs = function Tabs(props) {
140
140
  var nextCollapse = !collapse;
141
141
  setCollapse(nextCollapse);
142
142
  };
143
- useEffect(function () {
143
+ useLayoutEffect(function () {
144
144
  if (!panelRef.current) return;
145
145
  if (collapsible) {
146
146
  if (collapse) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.8-beta.13",
3
+ "version": "3.5.8-beta.15",
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.5.8-beta.13",
13
+ "@sheinx/hooks": "3.5.8-beta.15",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"