shineout 3.4.0 → 3.4.1-fix.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-fix.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-fix.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
@@ -32431,19 +32456,18 @@ function useInputAble(props) {
32431
32456
  var render = useRender(syncValue);
32432
32457
  var shouldUseState = delay || !control;
32433
32458
  var value = shouldUseState ? stateValue : valuePo;
32434
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
32435
- if (context.timer) {
32436
- clearTimeout(context.timer);
32437
- context.timer = null;
32438
- }
32459
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
32439
32460
  if (delay && control && props.value !== stateValue) {
32440
32461
  changeStateValue(props.value);
32462
+ } else if (context.timer) {
32463
+ clearTimeout(context.timer);
32464
+ context.timer = null;
32441
32465
  }
32442
32466
  }, [props.value, delay, control]);
32443
32467
  var forceDelayChange = use_persist_fn(function () {
32444
- if (context.timer && context.delayChange) {
32468
+ if (context.delayChange) context.delayChange();
32469
+ if (context.timer) {
32445
32470
  clearTimeout(context.timer);
32446
- context.delayChange();
32447
32471
  context.timer = null;
32448
32472
  context.delayChange = null;
32449
32473
  }
@@ -36643,6 +36667,7 @@ var result_Input = function Input(props) {
36643
36667
  placeholder: props.placeholder,
36644
36668
  autoComplete: 'off',
36645
36669
  value: value,
36670
+ readOnly: props.readOnly,
36646
36671
  maxLength: props.maxLength,
36647
36672
  disabled: props.disabled,
36648
36673
  onBlur: props.onBlur,
@@ -36736,12 +36761,13 @@ var Result = function Result(props) {
36736
36761
  className: className,
36737
36762
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
36738
36763
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
36739
- children: info.inputable ? /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
36764
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
36740
36765
  onRef: function onRef(el) {
36741
36766
  _onRef.current.inputRef = el;
36742
36767
  context.inputRefs[info.index] = el;
36743
36768
  },
36744
- disabled: dis,
36769
+ disabled: dis && info.inputable,
36770
+ readOnly: !info.inputable,
36745
36771
  open: !!open,
36746
36772
  inputRef: inputRef,
36747
36773
  value: info.target || info.value || '',
@@ -36768,10 +36794,7 @@ var Result = function Result(props) {
36768
36794
  (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, e);
36769
36795
  },
36770
36796
  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
- })
36797
+ }, info.index)
36775
36798
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
36776
36799
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextBg
36777
36800
  })]
@@ -59346,7 +59369,6 @@ var TabsHeader = function TabsHeader(props) {
59346
59369
  handleTransform = _useTransform.handleTransform,
59347
59370
  setTransform = _useTransform.setTransform;
59348
59371
  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
59372
  var headerWrapperClass = classnames_default()(headerStyle.headerWrapper, {});
59351
59373
  var buttonStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.button) || {};
59352
59374
  var calculateOffset = function calculateOffset(currentScrollOffsetStartValue, width, currentOffsetStartValue, currentOffsetEndOther, parentWidth) {
@@ -59419,12 +59441,13 @@ var TabsHeader = function TabsHeader(props) {
59419
59441
  });
59420
59442
  };
59421
59443
  var renderTab = function renderTab() {
59444
+ var headerClass = classnames_default()(headerStyle.header, shape === 'card' ? headerStyle.cardHr : '');
59422
59445
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59423
59446
  ref: headerRef,
59424
59447
  className: headerClass,
59425
59448
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
59426
59449
  ref: scrollRef,
59427
- className: classnames_default()(headerStyle.headerScroll, shape === 'card' ? headerStyle.cardHr : ''),
59450
+ className: headerStyle.headerScroll,
59428
59451
  onWheel: handleTransform,
59429
59452
  style: transformStyle,
59430
59453
  children: [shape === 'button' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button.Group, {
@@ -65054,7 +65077,7 @@ var upload_interface = __webpack_require__(8821);
65054
65077
 
65055
65078
 
65056
65079
  /* harmony default export */ var src_0 = ({
65057
- version: '3.4.0'
65080
+ version: '3.4.1-fix.1'
65058
65081
  });
65059
65082
  }();
65060
65083
  /******/ return __webpack_exports__;