shineout 3.4.0 → 3.4.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.
package/cjs/index.js CHANGED
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
492
492
  // 此文件由脚本自动生成,请勿直接修改。
493
493
  // This file was generated automatically by a script. Please do not modify it directly.
494
494
  var _default = exports.default = {
495
- version: '3.4.0'
495
+ version: '3.4.1'
496
496
  };
@@ -22,6 +22,7 @@ export type ReactComponentType = React.ComponentType<BaseTestProps>;
22
22
  export declare function baseTest(Component: ReactComponentType | JSX.Element, selector: string, styleV?: StyleProps, styleRender?: string, className?: string, data?: any): void;
23
23
  export declare function childrenTest(Component: React.ComponentType<BaseTestProps>, selector: string): void;
24
24
  export declare function inputValueTest(element: Element, value: string): void;
25
+ export declare function inputPlaceholderTest(element: Element, value: string): void;
25
26
  export declare function displayTest(Component: React.FC, displayName: string): void;
26
27
  export declare const delay: (time: number) => Promise<void>;
27
28
  type classNamesMapType = {
@@ -13,6 +13,7 @@ exports.componentsClassTest = componentsClassTest;
13
13
  exports.delay = exports.createClassName = void 0;
14
14
  exports.displayTest = displayTest;
15
15
  exports.hasAttributesTest = hasAttributesTest;
16
+ exports.inputPlaceholderTest = inputPlaceholderTest;
16
17
  exports.inputValueTest = inputValueTest;
17
18
  exports.snapshotTest = snapshotTest;
18
19
  exports.snapshotTestByClick = snapshotTestByClick;
@@ -136,6 +137,9 @@ function childrenTest(Component, selector) {
136
137
  function inputValueTest(element, value) {
137
138
  attributesTest(element, 'value', value);
138
139
  }
140
+ function inputPlaceholderTest(element, value) {
141
+ attributesTest(element, 'placeholder', value);
142
+ }
139
143
  function displayTest(Component, displayName) {
140
144
  test('should start with Shineout display', function () {
141
145
  expect(Component.displayName).toBe(displayName);
package/dist/shineout.js CHANGED
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
11991
11991
  };
11992
11992
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11993
11993
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11994
- /* harmony default export */ var version = ('3.4.0');
11994
+ /* harmony default export */ var version = ('3.4.1');
11995
11995
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11996
11996
 
11997
11997
 
@@ -26847,7 +26847,9 @@ var treeStyle = {
26847
26847
  },
26848
26848
  noline: {
26849
26849
  '& $iconWrapper': {
26850
- // left: 12,
26850
+ '& $icon': {
26851
+ transition: 'transform .2s cubic-bezier(.34,.69,.1,1)'
26852
+ }
26851
26853
  },
26852
26854
  '& $iconWrapper[data-expanded="false"][data-icon="false"]': {
26853
26855
  '& $icon': {
@@ -26869,16 +26871,38 @@ var treeStyle = {
26869
26871
  '&$leaf': {
26870
26872
  paddingLeft: 24
26871
26873
  }
26874
+ },
26875
+ '& > $root': {
26876
+ '& > $node': {
26877
+ paddingLeft: 24
26878
+ }
26872
26879
  }
26873
26880
  },
26874
26881
  root: {
26875
- '& > :first-child$node': {
26882
+ // '& > :first-child$node': {
26883
+ // '&::before': {
26884
+ // top: 18,
26885
+ // },
26886
+ // },
26887
+ // '& > :last-child$node': {
26888
+ // '&::before': {},
26889
+ // },
26890
+ '& > $node': {
26891
+ paddingLeft: 12,
26892
+ '& > $contentWrapper > $iconWrapper': {
26893
+ '&[dir=ltr]': {
26894
+ left: 0
26895
+ },
26896
+ '&[dir=rtl]': {
26897
+ right: 0
26898
+ }
26899
+ },
26876
26900
  '&::before': {
26877
- top: 18
26901
+ display: 'none'
26902
+ },
26903
+ '&::after': {
26904
+ display: 'none'
26878
26905
  }
26879
- },
26880
- '& > :last-child$node': {
26881
- '&::before': {}
26882
26906
  }
26883
26907
  },
26884
26908
  small: {},
@@ -26986,6 +27010,7 @@ var treeStyle = {
26986
27010
  borderRadius: '50%',
26987
27011
  color: src.treeItemFontColor,
26988
27012
  cursor: 'pointer',
27013
+ transition: 'background .2s ease',
26989
27014
  // transform: 'rotate(-90deg)',
26990
27015
  '&:hover': {
26991
27016
  background: src.treeItemHoverBackgroundColor
@@ -36643,6 +36668,7 @@ var result_Input = function Input(props) {
36643
36668
  placeholder: props.placeholder,
36644
36669
  autoComplete: 'off',
36645
36670
  value: value,
36671
+ readOnly: props.readOnly,
36646
36672
  maxLength: props.maxLength,
36647
36673
  disabled: props.disabled,
36648
36674
  onBlur: props.onBlur,
@@ -36736,12 +36762,13 @@ var Result = function Result(props) {
36736
36762
  className: className,
36737
36763
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
36738
36764
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
36739
- children: info.inputable ? /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
36765
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
36740
36766
  onRef: function onRef(el) {
36741
36767
  _onRef.current.inputRef = el;
36742
36768
  context.inputRefs[info.index] = el;
36743
36769
  },
36744
- disabled: dis,
36770
+ disabled: dis && info.inputable,
36771
+ readOnly: !info.inputable,
36745
36772
  open: !!open,
36746
36773
  inputRef: inputRef,
36747
36774
  value: info.target || info.value || '',
@@ -36768,10 +36795,7 @@ var Result = function Result(props) {
36768
36795
  (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, e);
36769
36796
  },
36770
36797
  onClick: onClickProps
36771
- }, info.index) : info.target || info.value || /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
36772
- className: styles === null || styles === void 0 ? void 0 : styles.placeholder,
36773
- children: info.place
36774
- })
36798
+ }, info.index)
36775
36799
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
36776
36800
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextBg
36777
36801
  })]
@@ -59346,7 +59370,6 @@ var TabsHeader = function TabsHeader(props) {
59346
59370
  handleTransform = _useTransform.handleTransform,
59347
59371
  setTransform = _useTransform.setTransform;
59348
59372
  var headerStyle = (jssStyle === null || jssStyle === void 0 || (_jssStyle$tabs = jssStyle.tabs) === null || _jssStyle$tabs === void 0 ? void 0 : _jssStyle$tabs.call(jssStyle)) || {};
59349
- var headerClass = classnames_default()(headerStyle.header, {});
59350
59373
  var headerWrapperClass = classnames_default()(headerStyle.headerWrapper, {});
59351
59374
  var buttonStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.button) || {};
59352
59375
  var calculateOffset = function calculateOffset(currentScrollOffsetStartValue, width, currentOffsetStartValue, currentOffsetEndOther, parentWidth) {
@@ -59419,12 +59442,13 @@ var TabsHeader = function TabsHeader(props) {
59419
59442
  });
59420
59443
  };
59421
59444
  var renderTab = function renderTab() {
59445
+ var headerClass = classnames_default()(headerStyle.header, shape === 'card' ? headerStyle.cardHr : '');
59422
59446
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59423
59447
  ref: headerRef,
59424
59448
  className: headerClass,
59425
59449
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
59426
59450
  ref: scrollRef,
59427
- className: classnames_default()(headerStyle.headerScroll, shape === 'card' ? headerStyle.cardHr : ''),
59451
+ className: headerStyle.headerScroll,
59428
59452
  onWheel: handleTransform,
59429
59453
  style: transformStyle,
59430
59454
  children: [shape === 'button' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button.Group, {
@@ -65054,7 +65078,7 @@ var upload_interface = __webpack_require__(8821);
65054
65078
 
65055
65079
 
65056
65080
  /* harmony default export */ var src_0 = ({
65057
- version: '3.4.0'
65081
+ version: '3.4.1'
65058
65082
  });
65059
65083
  }();
65060
65084
  /******/ return __webpack_exports__;