shineout 3.5.4-beta.7 → 3.5.4-beta.9

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
@@ -500,5 +500,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
500
500
  // 此文件由脚本自动生成,请勿直接修改。
501
501
  // This file was generated automatically by a script. Please do not modify it directly.
502
502
  var _default = exports.default = {
503
- version: '3.5.4-beta.7'
503
+ version: '3.5.4-beta.9'
504
504
  };
package/dist/shineout.js CHANGED
@@ -12030,7 +12030,7 @@ var handleStyle = function handleStyle(style) {
12030
12030
  };
12031
12031
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12032
12032
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12033
- /* harmony default export */ var version = ('3.5.4-beta.7');
12033
+ /* harmony default export */ var version = ('3.5.4-beta.9');
12034
12034
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12035
12035
 
12036
12036
 
@@ -21544,12 +21544,50 @@ var normalize_token = {
21544
21544
  };
21545
21545
  var lineHeightComputed = '20px';
21546
21546
  var lineHeightComputed2 = '10px';
21547
- var normalize_css = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
21547
+ var normalizeStyle = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
21548
+ function appendNormalizeStyle(styleString, id) {
21549
+ var style = document.createElement('style');
21550
+ style.id = id;
21551
+ style.innerHTML = styleString;
21552
+ document.head.appendChild(style);
21553
+ }
21554
+ var uniqueStyleId = 'shineout-next-normalize__' + Math.random().toString(36).substring(2, 15);
21548
21555
  if (typeof window !== 'undefined') {
21549
- var normalize_link = document.createElement('style');
21550
- normalize_link.innerHTML = normalize_css;
21551
- document.head.appendChild(normalize_link);
21556
+ appendNormalizeStyle(normalizeStyle, uniqueStyleId);
21552
21557
  }
21558
+ var scopeNormalizeStyle = function scopeNormalizeStyle() {
21559
+ var csScopePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#app';
21560
+ var styleElement = document.getElementById(uniqueStyleId);
21561
+ // 移除styleElement
21562
+
21563
+ var styleSheet = styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet;
21564
+ var cssRules = styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.cssRules;
21565
+ // 遍历cssRules,给每一个selectorText添加前缀
21566
+ if (cssRules) {
21567
+ for (var i = 0; i < cssRules.length; i++) {
21568
+ var rule = cssRules[i];
21569
+ if (rule instanceof CSSStyleRule) {
21570
+ // 如果选择器包含了body或html,则替换,不是加前缀
21571
+ if (rule.selectorText.includes('body')) {
21572
+ rule.selectorText = rule.selectorText.replace('body', csScopePrefix);
21573
+ } else if (rule.selectorText.includes('html')) {
21574
+ rule.selectorText = rule.selectorText.replace('html', csScopePrefix);
21575
+ } else {
21576
+ var selectors = rule.selectorText.split(',');
21577
+ var newSelectors = selectors.map(function (selector) {
21578
+ return "".concat(csScopePrefix, " ").concat(selector);
21579
+ });
21580
+ rule.selectorText = newSelectors.join(',');
21581
+ }
21582
+ }
21583
+ }
21584
+ }
21585
+ var scopedStyleString = cssRules ? Array.from(cssRules).map(function (rule) {
21586
+ return rule.cssText;
21587
+ }).join('') : '';
21588
+ document.head.removeChild(styleElement);
21589
+ appendNormalizeStyle(scopedStyleString, uniqueStyleId);
21590
+ };
21553
21591
  token_setter({
21554
21592
  onlyExtra: true,
21555
21593
  tokenName: 'shineout-extra',
@@ -38138,6 +38176,7 @@ var Result = function Result(props) {
38138
38176
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
38139
38177
  onRef: function onRef(el) {
38140
38178
  _onRef.current.inputRef = el;
38179
+ _onRef.current.inputRefs[info.index] = el;
38141
38180
  context.inputRefs[info.index] = el;
38142
38181
  },
38143
38182
  disabled: dis && info.inputable,
@@ -42674,9 +42713,9 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
42674
42713
  if (inputArr.length && inputArr.some(function (i) {
42675
42714
  return i;
42676
42715
  })) {
42677
- var inputValue = inputArr.map(function (item, index) {
42678
- if (item) return item;
42679
- return stateDate[index];
42716
+ var inputValue = stateDate.map(function (item, index) {
42717
+ if (inputArr[index]) return inputArr[index];
42718
+ return item;
42680
42719
  });
42681
42720
  var isDis = isDisabledInputDate(inputValue);
42682
42721
  if (!isDis) {
@@ -44414,6 +44453,7 @@ var Quick = function Quick(props) {
44414
44453
  var jssStyle = props.jssStyle,
44415
44454
  quickSelect = props.quickSelect,
44416
44455
  format = props.format,
44456
+ onClearInputArr = props.onClearInputArr,
44417
44457
  options = props.options,
44418
44458
  children = props.children,
44419
44459
  type = props.type,
@@ -44437,6 +44477,7 @@ var Quick = function Quick(props) {
44437
44477
  });
44438
44478
  props.setDateArr(dateArr);
44439
44479
  props.setCurrentArr(dateArr, 'quick', item);
44480
+ onClearInputArr();
44440
44481
  if (immediate && closePop) {
44441
44482
  closePop();
44442
44483
  }
@@ -44843,6 +44884,7 @@ var Picker = function Picker(props) {
44843
44884
  jssStyle: jssStyle,
44844
44885
  dateArr: dateArr,
44845
44886
  type: type,
44887
+ onClearInputArr: props.onClearInputArr,
44846
44888
  setDateArr: props.setDateArr,
44847
44889
  setCurrentArr: props.setCurrentArr,
44848
44890
  format: props.format,
@@ -44929,7 +44971,8 @@ var DatePicker = function DatePicker(props0) {
44929
44971
  oldDateArr = _React$useState8[0],
44930
44972
  setOldDateArr = _React$useState8[1];
44931
44973
  var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
44932
- inputRef: null
44974
+ inputRef: null,
44975
+ inputRefs: []
44933
44976
  });
44934
44977
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
44935
44978
  var isRTL = direction === 'rtl';
@@ -45044,13 +45087,14 @@ var DatePicker = function DatePicker(props0) {
45044
45087
  (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
45045
45088
  });
45046
45089
  var handleClose = function handleClose(isFromConfirm) {
45047
- var _inputRef$current$inp;
45048
45090
  setIsCloseFromConfirm(isFromConfirm || false);
45049
45091
  closePop();
45050
45092
  if (isFromConfirm) {
45051
45093
  func.finishEdit();
45052
45094
  }
45053
- (_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
45095
+ inputRef.current.inputRefs.forEach(function (el) {
45096
+ el === null || el === void 0 || el.blur();
45097
+ });
45054
45098
  };
45055
45099
  var handleResultClick = usePersistFn(function () {
45056
45100
  if (disabledStatus === 'all') return;
@@ -67100,7 +67144,7 @@ var upload_interface = __webpack_require__(8821);
67100
67144
 
67101
67145
 
67102
67146
  /* harmony default export */ var src_0 = ({
67103
- version: '3.5.4-beta.7'
67147
+ version: '3.5.4-beta.9'
67104
67148
  });
67105
67149
  }();
67106
67150
  /******/ return __webpack_exports__;