shineout 3.8.0-beta.11 → 3.8.0-beta.13

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/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.8.0-beta.11');
12237
+ /* harmony default export */ var version = ('3.8.0-beta.13');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -15910,6 +15910,9 @@ var breadcrumbStyle = {
15910
15910
  }
15911
15911
  }
15912
15912
  },
15913
+ wrapperPopover: {
15914
+ flexWrap: 'wrap'
15915
+ },
15913
15916
  content: {
15914
15917
  '&&': {
15915
15918
  display: 'flex',
@@ -15919,10 +15922,23 @@ var breadcrumbStyle = {
15919
15922
  color: src.breadcrumbDefaultLinkActiveColor
15920
15923
  }
15921
15924
  },
15925
+ contentMaxWidth: {
15926
+ maxWidth: '150px',
15927
+ overflow: 'hidden',
15928
+ textOverflow: 'ellipsis',
15929
+ whiteSpace: 'nowrap',
15930
+ '&&': {
15931
+ display: 'block'
15932
+ }
15933
+ },
15922
15934
  ellipsis: {
15923
15935
  color: src.breadcrumbLinkColor,
15924
15936
  position: 'relative',
15925
- top: '-3px'
15937
+ top: '-0.25em',
15938
+ cursor: 'pointer',
15939
+ '&:hover': {
15940
+ color: src.breadcrumbLinkHoverColor
15941
+ }
15926
15942
  },
15927
15943
  itemWrapper: {
15928
15944
  // padding: `0 ${token.breadcrumbListItemWrapperPaddingX}`,
@@ -22434,6 +22450,26 @@ var tooltipAnimation = {
22434
22450
  transform: "var(--soui-popup-transform) scale(1)"
22435
22451
  }
22436
22452
  },
22453
+ '@keyframes moveRightTop': {
22454
+ '0%': {
22455
+ transformOrigin: 'left top',
22456
+ transform: "var(--soui-popup-transform) scale(0.5)"
22457
+ },
22458
+ '100%': {
22459
+ transformOrigin: 'left top',
22460
+ transform: "var(--soui-popup-transform) scale(1)"
22461
+ }
22462
+ },
22463
+ '@keyframes moveRightBottom': {
22464
+ '0%': {
22465
+ transformOrigin: 'left bottom',
22466
+ transform: "var(--soui-popup-transform) scale(0.5)"
22467
+ },
22468
+ '100%': {
22469
+ transformOrigin: 'left bottom',
22470
+ transform: "var(--soui-popup-transform) scale(1)"
22471
+ }
22472
+ },
22437
22473
  '@keyframes moveLeft': {
22438
22474
  '0%': {
22439
22475
  transformOrigin: 'right center',
@@ -22444,6 +22480,26 @@ var tooltipAnimation = {
22444
22480
  transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22445
22481
  }
22446
22482
  },
22483
+ '@keyframes moveLeftTop': {
22484
+ '0%': {
22485
+ transformOrigin: 'right top',
22486
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22487
+ },
22488
+ '100%': {
22489
+ transformOrigin: 'right top',
22490
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22491
+ }
22492
+ },
22493
+ '@keyframes moveLeftBottom': {
22494
+ '0%': {
22495
+ transformOrigin: 'right bottom',
22496
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22497
+ },
22498
+ '100%': {
22499
+ transformOrigin: 'right bottom',
22500
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22501
+ }
22502
+ },
22447
22503
  '@keyframes moveTop': {
22448
22504
  '0%': {
22449
22505
  transformOrigin: 'center bottom',
@@ -22454,6 +22510,26 @@ var tooltipAnimation = {
22454
22510
  transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22455
22511
  }
22456
22512
  },
22513
+ '@keyframes moveTopLeft': {
22514
+ '0%': {
22515
+ transformOrigin: 'left bottom',
22516
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22517
+ },
22518
+ '100%': {
22519
+ transformOrigin: 'left bottom',
22520
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22521
+ }
22522
+ },
22523
+ '@keyframes moveTopRight': {
22524
+ '0%': {
22525
+ transformOrigin: 'right bottom',
22526
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22527
+ },
22528
+ '100%': {
22529
+ transformOrigin: 'right bottom',
22530
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22531
+ }
22532
+ },
22457
22533
  '@keyframes moveBottom': {
22458
22534
  '0%': {
22459
22535
  transformOrigin: 'center top',
@@ -22463,6 +22539,26 @@ var tooltipAnimation = {
22463
22539
  transformOrigin: 'center top',
22464
22540
  transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22465
22541
  }
22542
+ },
22543
+ '@keyframes moveBottomLeft': {
22544
+ '0%': {
22545
+ transformOrigin: 'left top',
22546
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22547
+ },
22548
+ '100%': {
22549
+ transformOrigin: 'left top',
22550
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22551
+ }
22552
+ },
22553
+ '@keyframes moveBottomRight': {
22554
+ '0%': {
22555
+ transformOrigin: 'right top',
22556
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
22557
+ },
22558
+ '100%': {
22559
+ transformOrigin: 'right top',
22560
+ transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
22561
+ }
22466
22562
  }
22467
22563
  };
22468
22564
  var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
@@ -22490,6 +22586,16 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
22490
22586
  },
22491
22587
  '&[data-soui-position^="bottom"] $arrow': {
22492
22588
  transform: 'translate(0, calc(-100% + 1px)) rotate(0deg)'
22589
+ },
22590
+ '& $arrow:before': {
22591
+ clipPath: 'none',
22592
+ borderTop: "1px solid ".concat(src.tooltipLightBorderColor),
22593
+ borderLeft: "1px solid ".concat(src.tooltipLightBorderColor),
22594
+ borderRight: 'transparent',
22595
+ borderBottom: 'transparent',
22596
+ width: 8.4,
22597
+ height: 8.4,
22598
+ transform: 'translate(50%, 27.5%) rotate(45deg)'
22493
22599
  }
22494
22600
  },
22495
22601
  '&[data-soui-type^="primary"]': {
@@ -22869,14 +22975,38 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
22869
22975
  '&[data-soui-position^="bottom"]': {
22870
22976
  animation: '$fadeIn 200ms ease, $moveBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
22871
22977
  },
22978
+ '&[data-soui-position^="bottom-left"]': {
22979
+ animation: '$fadeIn 200ms ease, $moveBottomLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
22980
+ },
22981
+ '&[data-soui-position^="bottom-right"]': {
22982
+ animation: '$fadeIn 200ms ease, $moveBottomRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
22983
+ },
22872
22984
  '&[data-soui-position^="top"]': {
22873
22985
  animation: '$fadeIn 200ms ease, $moveTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
22874
22986
  },
22987
+ '&[data-soui-position^="top-left"]': {
22988
+ animation: '$fadeIn 200ms ease, $moveTopLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
22989
+ },
22990
+ '&[data-soui-position^="top-right"]': {
22991
+ animation: '$fadeIn 200ms ease, $moveTopRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
22992
+ },
22875
22993
  '&[data-soui-position^="left"]': {
22876
22994
  animation: '$fadeIn 200ms ease, $moveLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
22877
22995
  },
22996
+ '&[data-soui-position^="left-top"]': {
22997
+ animation: '$fadeIn 200ms ease, $moveLeftTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
22998
+ },
22999
+ '&[data-soui-position^="left-bottom"]': {
23000
+ animation: '$fadeIn 200ms ease, $moveLeftBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
23001
+ },
22878
23002
  '&[data-soui-position^="right"]': {
22879
23003
  animation: '$fadeIn 200ms ease, $moveRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
23004
+ },
23005
+ '&[data-soui-position^="right-top"]': {
23006
+ animation: '$fadeIn 200ms ease, $moveRightTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
23007
+ },
23008
+ '&[data-soui-position^="right-bottom"]': {
23009
+ animation: '$fadeIn 200ms ease, $moveRightBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
22880
23010
  }
22881
23011
  },
22882
23012
  arrow: {},
@@ -27940,6 +28070,7 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
27940
28070
  color: src.textareaPlaceholderColor
27941
28071
  },
27942
28072
  width: '100%',
28073
+ height: '100%',
27943
28074
  background: 'transparent',
27944
28075
  border: '0',
27945
28076
  margin: '0',
@@ -32370,7 +32501,7 @@ var AvatarGroup = function AvatarGroup(props) {
32370
32501
  children: childrenHidden
32371
32502
  })
32372
32503
  }))]
32373
- }));
32504
+ }, "more-avatar"));
32374
32505
  }
32375
32506
  return /*#__PURE__*/(0,jsx_runtime.jsx)(AvatarProvider, {
32376
32507
  shape: shape,
@@ -32969,6 +33100,225 @@ var List = function List(props) {
32969
33100
  }));
32970
33101
  };
32971
33102
  /* harmony default export */ var breadcrumb_list = (List);
33103
+ ;// CONCATENATED MODULE: ../base/src/tooltip/tooltip.tsx
33104
+
33105
+
33106
+
33107
+
33108
+
33109
+
33110
+
33111
+
33112
+
33113
+
33114
+ var tooltip_devUseWarning = devUseWarning;
33115
+ var defaultDelay = 0;
33116
+ var Tooltip = function Tooltip(props) {
33117
+ var _jssStyle$tooltip, _config$tooltip;
33118
+ var _props$trigger = props.trigger,
33119
+ trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
33120
+ priorityDirection = props.priorityDirection,
33121
+ children = props.children,
33122
+ tip = props.tip,
33123
+ disabledChild = props.disabledChild,
33124
+ jssStyle = props.jssStyle,
33125
+ className = props.className,
33126
+ style = props.style,
33127
+ zIndex = props.zIndex,
33128
+ _props$showArrow = props.showArrow,
33129
+ showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
33130
+ persistentProp = props.persistent,
33131
+ _props$type = props.type,
33132
+ type = _props$type === void 0 ? 'default' : _props$type,
33133
+ _props$position = props.position,
33134
+ popsitionProps = _props$position === void 0 ? 'auto' : _props$position,
33135
+ _props$popupGap = props.popupGap,
33136
+ popupGap = _props$popupGap === void 0 ? 0 : _props$popupGap;
33137
+ var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
33138
+ var config = useConfig();
33139
+ var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
33140
+ var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
33141
+ var delay = props.delay || props.mouseEnterDelay || defaultDelay;
33142
+ var _usePopup = use_popup({
33143
+ position: popsitionProps,
33144
+ trigger: trigger,
33145
+ autoMode: 'popover',
33146
+ priorityDirection: priorityDirection,
33147
+ mouseEnterDelay: delay,
33148
+ targetEvents: disabledChild ? {} : childrenProps
33149
+ }),
33150
+ open = _usePopup.open,
33151
+ position = _usePopup.position,
33152
+ getTargetProps = _usePopup.getTargetProps,
33153
+ targetRef = _usePopup.targetRef,
33154
+ popupRef = _usePopup.popupRef,
33155
+ closePop = _usePopup.closePop;
33156
+ var events = getTargetProps();
33157
+ var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
33158
+ _React$useState2 = slicedToArray_default()(_React$useState, 2),
33159
+ updateKey = _React$useState2[0],
33160
+ setUpdateKey = _React$useState2[1];
33161
+ var handleUpdateKey = usePersistFn(function () {
33162
+ setUpdateKey(function (prev) {
33163
+ return (prev + 1) % 2;
33164
+ });
33165
+ });
33166
+ var bindEvents = function bindEvents() {
33167
+ var _window;
33168
+ var targetEl = targetRef.current;
33169
+ if (!targetEl) return;
33170
+ if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
33171
+ if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
33172
+ if (events.onClick) targetEl.addEventListener('click', events.onClick);
33173
+ (_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
33174
+ };
33175
+ var unbindEvents = function unbindEvents() {
33176
+ var _window2;
33177
+ var targetEl = targetRef.current;
33178
+ if (!targetEl) return;
33179
+ var events = getTargetProps();
33180
+ if (events.onMouseEnter) targetEl.removeEventListener('mouseenter', events.onMouseEnter);
33181
+ if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
33182
+ if (events.onClick) targetEl.removeEventListener('click', events.onClick);
33183
+ targetEl.removeEventListener('click', closePop);
33184
+ (_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
33185
+ };
33186
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
33187
+ if (!persistent) return;
33188
+ bindEvents();
33189
+ return function () {
33190
+ unbindEvents();
33191
+ };
33192
+ }, [persistent]);
33193
+ if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
33194
+ tooltip_devUseWarning.error('Tooltip children expect a single ReactElement.');
33195
+ return null;
33196
+ }
33197
+ if (!tip) return children;
33198
+ var inner = disabledChild ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
33199
+ className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.target,
33200
+ style: {
33201
+ cursor: 'not-allowed'
33202
+ },
33203
+ children: /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
33204
+ style: objectSpread2_default()(objectSpread2_default()({}, childrenProps.style), {}, {
33205
+ pointerEvents: 'none'
33206
+ })
33207
+ })
33208
+ }) : children;
33209
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
33210
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
33211
+ ref: function ref(el) {
33212
+ if (!el) return;
33213
+ var targetEl = el.nextElementSibling;
33214
+ if (!targetEl) return;
33215
+ if (targetRef.current === targetEl) return;
33216
+ targetRef.current = targetEl;
33217
+ }
33218
+ }, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, events), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
33219
+ focus: open,
33220
+ parentElRef: targetRef,
33221
+ popupElRef: popupRef,
33222
+ absolute: true,
33223
+ position: position,
33224
+ fixedWidth: false,
33225
+ popupGap: popupGap,
33226
+ zIndex: zIndex,
33227
+ adjust: popsitionProps === 'auto',
33228
+ updateKey: updateKey,
33229
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
33230
+ className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
33231
+ style: {
33232
+ pointerEvents: persistent ? 'initial' : undefined
33233
+ }
33234
+ }, getDataAttribute({
33235
+ type: type,
33236
+ position: position
33237
+ })), {}, {
33238
+ ref: popupRef,
33239
+ onMouseLeave: events.onMouseLeave,
33240
+ dir: config.direction,
33241
+ children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
33242
+ className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
33243
+ }, getDataAttribute({
33244
+ role: 'arrow'
33245
+ }))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
33246
+ style: style,
33247
+ className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
33248
+ children: tip
33249
+ })]
33250
+ }))
33251
+ })]
33252
+ });
33253
+ };
33254
+ /* harmony default export */ var src_tooltip_tooltip = (Tooltip);
33255
+ ;// CONCATENATED MODULE: ../base/src/breadcrumb/breadcrumb-item.tsx
33256
+
33257
+
33258
+
33259
+
33260
+
33261
+
33262
+
33263
+
33264
+ var BreadcrumbItem = function BreadcrumbItem(_ref) {
33265
+ var _jssStyle$breadcrumb;
33266
+ var dataItem = _ref.dataItem,
33267
+ renderItem = _ref.renderItem,
33268
+ jssStyle = _ref.jssStyle,
33269
+ max = _ref.max;
33270
+ var contentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
33271
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
33272
+ _useState2 = slicedToArray_default()(_useState, 2),
33273
+ isOverflow = _useState2[0],
33274
+ setIsOverflow = _useState2[1];
33275
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
33276
+ if (contentRef.current && max !== undefined) {
33277
+ setIsOverflow(contentRef.current.offsetWidth > 150);
33278
+ }
33279
+ }, [max, dataItem]);
33280
+ var breadcrumbClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$breadcrumb = jssStyle.breadcrumb) === null || _jssStyle$breadcrumb === void 0 ? void 0 : _jssStyle$breadcrumb.call(jssStyle);
33281
+ var contentClass = classnames_default()(breadcrumbClasses.content, isOverflow && (breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.contentMaxWidth));
33282
+ var d = dataItem;
33283
+ var item = d.title;
33284
+ if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(item)) {
33285
+ if (d.onClick || d.url) {
33286
+ var props = {
33287
+ onClick: d.onClick
33288
+ };
33289
+ if (d.url) props.href = d.url;
33290
+ item = /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({}, props), {}, {
33291
+ className: contentClass,
33292
+ role: "button",
33293
+ ref: contentRef,
33294
+ children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
33295
+ children: "\xA0"
33296
+ }), d.title]
33297
+ }));
33298
+ } else {
33299
+ item = /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
33300
+ className: contentClass,
33301
+ ref: contentRef,
33302
+ children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
33303
+ children: "\xA0"
33304
+ }), d.title]
33305
+ });
33306
+ }
33307
+ }
33308
+ if (renderItem) {
33309
+ return renderItem(dataItem);
33310
+ }
33311
+ if (isOverflow && d.title && max !== undefined) {
33312
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tooltip_tooltip, {
33313
+ jssStyle: jssStyle,
33314
+ type: "light",
33315
+ tip: d.title,
33316
+ children: item
33317
+ });
33318
+ }
33319
+ return item;
33320
+ };
33321
+ /* harmony default export */ var breadcrumb_item = (BreadcrumbItem);
32972
33322
  ;// CONCATENATED MODULE: ../base/src/breadcrumb/breadcrumb.tsx
32973
33323
 
32974
33324
 
@@ -32979,6 +33329,7 @@ var List = function List(props) {
32979
33329
 
32980
33330
 
32981
33331
 
33332
+
32982
33333
  var breadcrumb_getKey = getKey;
32983
33334
  var Breadcrumb = function Breadcrumb(props) {
32984
33335
  var _props$jssStyle, _props$jssStyle$bread;
@@ -32989,32 +33340,14 @@ var Breadcrumb = function Breadcrumb(props) {
32989
33340
  _props$maxHeight = props.maxHeight,
32990
33341
  maxHeight = _props$maxHeight === void 0 ? '50vh' : _props$maxHeight;
32991
33342
  var breadcrumbClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$bread = _props$jssStyle.breadcrumb) === null || _props$jssStyle$bread === void 0 ? void 0 : _props$jssStyle$bread.call(_props$jssStyle);
33343
+ var maxCount = props.max ? Math.max(2, props.max) : undefined;
32992
33344
  var renderItem = function renderItem(dataItem) {
32993
- var d = dataItem;
32994
- var item = d.title;
32995
- if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(item)) {
32996
- if (d.onClick || d.url) {
32997
- var _props = {
32998
- onClick: d.onClick
32999
- };
33000
- if (d.url) _props.href = d.url;
33001
- item = /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({}, _props), {}, {
33002
- className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
33003
- role: "button",
33004
- children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
33005
- children: "\xA0"
33006
- }), d.title]
33007
- }));
33008
- } else {
33009
- item = /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
33010
- className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
33011
- children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
33012
- children: "\xA0"
33013
- }), d.title]
33014
- });
33015
- }
33016
- }
33017
- return props.renderItem ? props.renderItem(dataItem) : item;
33345
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_item, {
33346
+ dataItem: dataItem,
33347
+ renderItem: props.renderItem,
33348
+ jssStyle: props.jssStyle,
33349
+ max: maxCount
33350
+ });
33018
33351
  };
33019
33352
  var renderArray = function renderArray(data) {
33020
33353
  return /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_list, {
@@ -33026,14 +33359,27 @@ var Breadcrumb = function Breadcrumb(props) {
33026
33359
  };
33027
33360
  var className = classnames_default()(breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.rootClass, breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.wrapper, props.className);
33028
33361
  var getRenderData = function getRenderData() {
33029
- if (!props.max) return data;
33030
- if (data.length <= props.max) return data;
33362
+ if (!maxCount) return data;
33363
+ if (data.length <= maxCount) return data;
33031
33364
  var first = data[0];
33032
- var reset = data.slice(data.length - props.max + 1);
33365
+ var sliceIndex = data.length - maxCount + 1;
33366
+ var reset = data.slice(sliceIndex);
33367
+ var moreData = data.slice(1, sliceIndex);
33368
+ var moreClassName = classnames_default()(props.className, breadcrumbClasses.wrapperPopover);
33033
33369
  var more = {
33034
- title: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
33370
+ title: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
33035
33371
  className: classnames_default()(breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content, breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.ellipsis),
33036
- children: "..."
33372
+ children: ["...", /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
33373
+ jssStyle: props.jssStyle,
33374
+ useTextStyle: true,
33375
+ offset: [8, 0],
33376
+ popupGap: -4,
33377
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(Breadcrumb, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
33378
+ className: moreClassName,
33379
+ data: moreData,
33380
+ max: undefined
33381
+ }))
33382
+ })]
33037
33383
  })
33038
33384
  };
33039
33385
  return [first, more].concat(toConsumableArray_default()(reset));
@@ -33043,10 +33389,15 @@ var Breadcrumb = function Breadcrumb(props) {
33043
33389
  style: props.style,
33044
33390
  children: data && getRenderData().map(function (d, index) {
33045
33391
  var itemFirst = Array.isArray(d) ? d[0] : d;
33046
- var isLastItem = index === (props.max !== undefined ? props.max : data.length - 1);
33392
+ var isLastItem = index === (maxCount !== undefined ? maxCount : data.length - 1);
33047
33393
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
33048
33394
  className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.item,
33049
- children: [Array.isArray(d) ? renderArray(d) : renderItem(d), !isLastItem && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
33395
+ children: [Array.isArray(d) ? renderArray(d) : /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_item, {
33396
+ dataItem: d,
33397
+ renderItem: renderItem,
33398
+ jssStyle: props.jssStyle,
33399
+ max: maxCount
33400
+ }), !isLastItem && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
33050
33401
  className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.separator,
33051
33402
  children: separator
33052
33403
  })]
@@ -33063,7 +33414,8 @@ var Breadcrumb = function Breadcrumb(props) {
33063
33414
 
33064
33415
  var breadcrumb_jssStyle = {
33065
33416
  breadcrumb: useBreadcrumbStyle,
33066
- popover: usePopoverStyle
33417
+ popover: usePopoverStyle,
33418
+ tooltip: useTooltipStyle
33067
33419
  };
33068
33420
  /* harmony default export */ var src_breadcrumb_breadcrumb_0 = (function (props) {
33069
33421
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_breadcrumb_breadcrumb, objectSpread2_default()({
@@ -39793,6 +40145,7 @@ var VirtualList = function VirtualList(props) {
39793
40145
  className = props.className,
39794
40146
  lineHeight = props.lineHeight,
39795
40147
  height = props.height,
40148
+ keepScrollTop = props.keepScrollTop,
39796
40149
  keepScrollHeight = props.keepScrollHeight,
39797
40150
  renderItem = props.renderItem,
39798
40151
  customRenderItem = props.customRenderItem,
@@ -39989,6 +40342,7 @@ var VirtualList = function VirtualList(props) {
39989
40342
  }, [startIndex]);
39990
40343
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
39991
40344
  if (keepScrollHeight) return;
40345
+ if (keepScrollTop) return;
39992
40346
  // 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
39993
40347
  setTop(0);
39994
40348
  setStartIndex(0);
@@ -40033,6 +40387,7 @@ var VirtualList = function VirtualList(props) {
40033
40387
 
40034
40388
 
40035
40389
 
40390
+
40036
40391
  function getHighlightText(_ref) {
40037
40392
  var nodeList = _ref.nodeList,
40038
40393
  searchWords = _ref.searchWords,
@@ -40041,22 +40396,31 @@ function getHighlightText(_ref) {
40041
40396
  if (!enable || !searchWords) {
40042
40397
  return nodeList;
40043
40398
  }
40044
- var transformNode = function transformNode(node) {
40045
- var _node$props;
40046
- if (node && typeof ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.children) === 'string') {
40047
- return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(node, undefined, /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
40048
- textToHighlight: node.props.children,
40399
+
40400
+ // 递归转换节点
40401
+ var transformNode = function transformNode(node, index) {
40402
+ // 如果是合法的 React 元素
40403
+ if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(node) && node.props && node.props.children) {
40404
+ // 对 children 递归调用 getHighlightText 进行转换
40405
+ var transformedChildren = getHighlightText({
40406
+ nodeList: node.props.children,
40049
40407
  searchWords: searchWords,
40050
- highlightClassName: highlightClassName
40051
- }));
40408
+ highlightClassName: highlightClassName,
40409
+ enable: enable
40410
+ });
40411
+ return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(node, objectSpread2_default()(objectSpread2_default()({}, node.props), {}, {
40412
+ key: index
40413
+ }), transformedChildren);
40052
40414
  }
40053
- if (node && typeof node === 'string') {
40415
+ // 如果节点为字符串,则直接高亮替换
40416
+ if (typeof node === 'string') {
40054
40417
  return /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
40055
40418
  textToHighlight: node,
40056
40419
  searchWords: searchWords,
40057
40420
  highlightClassName: highlightClassName
40058
40421
  });
40059
40422
  }
40423
+ // 其他情况直接返回原节点
40060
40424
  return node;
40061
40425
  };
40062
40426
  return isArray(nodeList) ? nodeList.map(transformNode) : transformNode(nodeList);
@@ -40072,8 +40436,7 @@ function HighlightText(_ref2) {
40072
40436
  searchWords = searchWords.slice(0, 500);
40073
40437
  }
40074
40438
 
40075
- // 注意这里的括号,这里使用了带capture group功能的正则,来split字符串
40076
- // 从而在strArr中可以保留匹配文本
40439
+ // capture group 的正则用于 split 保留匹配文本
40077
40440
  var re = new RegExp("(".concat(escapeRegExp(searchWords), ")"), 'i');
40078
40441
  var strArr = textToHighlight.split(re);
40079
40442
  return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
@@ -42882,7 +43245,8 @@ function useFormControl(props) {
42882
43245
  defaultValue = props.defaultValue,
42883
43246
  rules = props.rules,
42884
43247
  onError = props.onError,
42885
- getValidateProps = props.getValidateProps;
43248
+ getValidateProps = props.getValidateProps,
43249
+ clearToUndefined = props.clearToUndefined;
42886
43250
  var _useFieldSetConsumer = useFieldSetConsumer({
42887
43251
  name: props.name,
42888
43252
  bind: props.bind
@@ -42940,7 +43304,11 @@ function useFormControl(props) {
42940
43304
  var nextValue = [];
42941
43305
  name.forEach(function (n, index) {
42942
43306
  if (_value[index] === undefined && dv[index] !== undefined) {
42943
- nextValue[index] = dv[index];
43307
+ if (clearToUndefined) {
43308
+ nextValue[index] = undefined;
43309
+ } else {
43310
+ nextValue[index] = dv[index];
43311
+ }
42944
43312
  } else {
42945
43313
  nextValue[index] = _value[index];
42946
43314
  }
@@ -42954,7 +43322,11 @@ function useFormControl(props) {
42954
43322
  }
42955
43323
  if (!shallowEqual(_value2, latestInfo.valueState)) {
42956
43324
  if (_value2 === undefined && defaultValue !== undefined) {
42957
- setValueState(defaultValue);
43325
+ if (clearToUndefined) {
43326
+ setValueState(undefined);
43327
+ } else {
43328
+ setValueState(defaultValue);
43329
+ }
42958
43330
  } else {
42959
43331
  setValueState(_value2);
42960
43332
  }
@@ -43113,7 +43485,8 @@ var FormField = function FormField(props) {
43113
43485
  rules: props.rules,
43114
43486
  onError: props.onError,
43115
43487
  bind: props.bind,
43116
- getValidateProps: getValidateProps
43488
+ getValidateProps: getValidateProps,
43489
+ clearToUndefined: props.clearToUndefined
43117
43490
  });
43118
43491
  var handleChange = usePersistFn(function (value) {
43119
43492
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -50719,6 +51092,10 @@ var useForm = function useForm(props) {
50719
51092
  Object.keys(context.defaultValues).forEach(function (df) {
50720
51093
  var latestDefaultValue = getValue(df);
50721
51094
  if (latestDefaultValue === undefined) {
51095
+ // todo: Form组件传了clearToUndefined时,加入这部分判断?
51096
+ // if(context.value.hasOwnProperty(df) && clearToUndefined){
51097
+ // return;
51098
+ // }
50722
51099
  setValue(defineProperty_default()({}, df, context.defaultValues[df]), {
50723
51100
  validate: false
50724
51101
  });
@@ -51246,158 +51623,6 @@ var UseFormItem = function UseFormItem() {
51246
51623
  };
51247
51624
  };
51248
51625
  /* harmony default export */ var use_form_item = (UseFormItem);
51249
- ;// CONCATENATED MODULE: ../base/src/tooltip/tooltip.tsx
51250
-
51251
-
51252
-
51253
-
51254
-
51255
-
51256
-
51257
-
51258
-
51259
-
51260
- var tooltip_devUseWarning = devUseWarning;
51261
- var defaultDelay = 0;
51262
- var Tooltip = function Tooltip(props) {
51263
- var _jssStyle$tooltip, _config$tooltip;
51264
- var _props$trigger = props.trigger,
51265
- trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
51266
- priorityDirection = props.priorityDirection,
51267
- children = props.children,
51268
- tip = props.tip,
51269
- disabledChild = props.disabledChild,
51270
- jssStyle = props.jssStyle,
51271
- className = props.className,
51272
- style = props.style,
51273
- zIndex = props.zIndex,
51274
- _props$showArrow = props.showArrow,
51275
- showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
51276
- persistentProp = props.persistent,
51277
- _props$type = props.type,
51278
- type = _props$type === void 0 ? 'default' : _props$type,
51279
- _props$position = props.position,
51280
- popsitionProps = _props$position === void 0 ? 'auto' : _props$position,
51281
- _props$popupGap = props.popupGap,
51282
- popupGap = _props$popupGap === void 0 ? 0 : _props$popupGap;
51283
- var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
51284
- var config = useConfig();
51285
- var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
51286
- var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
51287
- var delay = props.delay || props.mouseEnterDelay || defaultDelay;
51288
- var _usePopup = use_popup({
51289
- position: popsitionProps,
51290
- trigger: trigger,
51291
- autoMode: 'popover',
51292
- priorityDirection: priorityDirection,
51293
- mouseEnterDelay: delay,
51294
- targetEvents: disabledChild ? {} : childrenProps
51295
- }),
51296
- open = _usePopup.open,
51297
- position = _usePopup.position,
51298
- getTargetProps = _usePopup.getTargetProps,
51299
- targetRef = _usePopup.targetRef,
51300
- popupRef = _usePopup.popupRef,
51301
- closePop = _usePopup.closePop;
51302
- var events = getTargetProps();
51303
- var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
51304
- _React$useState2 = slicedToArray_default()(_React$useState, 2),
51305
- updateKey = _React$useState2[0],
51306
- setUpdateKey = _React$useState2[1];
51307
- var handleUpdateKey = usePersistFn(function () {
51308
- setUpdateKey(function (prev) {
51309
- return (prev + 1) % 2;
51310
- });
51311
- });
51312
- var bindEvents = function bindEvents() {
51313
- var _window;
51314
- var targetEl = targetRef.current;
51315
- if (!targetEl) return;
51316
- if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
51317
- if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
51318
- if (events.onClick) targetEl.addEventListener('click', events.onClick);
51319
- (_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
51320
- };
51321
- var unbindEvents = function unbindEvents() {
51322
- var _window2;
51323
- var targetEl = targetRef.current;
51324
- if (!targetEl) return;
51325
- var events = getTargetProps();
51326
- if (events.onMouseEnter) targetEl.removeEventListener('mouseenter', events.onMouseEnter);
51327
- if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
51328
- if (events.onClick) targetEl.removeEventListener('click', events.onClick);
51329
- targetEl.removeEventListener('click', closePop);
51330
- (_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
51331
- };
51332
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
51333
- if (!persistent) return;
51334
- bindEvents();
51335
- return function () {
51336
- unbindEvents();
51337
- };
51338
- }, [persistent]);
51339
- if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
51340
- tooltip_devUseWarning.error('Tooltip children expect a single ReactElement.');
51341
- return null;
51342
- }
51343
- if (!tip) return children;
51344
- var inner = disabledChild ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
51345
- className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.target,
51346
- style: {
51347
- cursor: 'not-allowed'
51348
- },
51349
- children: /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
51350
- style: objectSpread2_default()(objectSpread2_default()({}, childrenProps.style), {}, {
51351
- pointerEvents: 'none'
51352
- })
51353
- })
51354
- }) : children;
51355
- return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
51356
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
51357
- ref: function ref(el) {
51358
- if (!el) return;
51359
- var targetEl = el.nextElementSibling;
51360
- if (!targetEl) return;
51361
- if (targetRef.current === targetEl) return;
51362
- targetRef.current = targetEl;
51363
- }
51364
- }, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, events), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
51365
- focus: open,
51366
- parentElRef: targetRef,
51367
- popupElRef: popupRef,
51368
- absolute: true,
51369
- position: position,
51370
- fixedWidth: false,
51371
- popupGap: popupGap,
51372
- zIndex: zIndex,
51373
- adjust: popsitionProps === 'auto',
51374
- updateKey: updateKey,
51375
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
51376
- className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
51377
- style: {
51378
- pointerEvents: persistent ? 'initial' : undefined
51379
- }
51380
- }, getDataAttribute({
51381
- type: type,
51382
- position: position
51383
- })), {}, {
51384
- ref: popupRef,
51385
- onMouseLeave: events.onMouseLeave,
51386
- dir: config.direction,
51387
- children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
51388
- className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
51389
- }, getDataAttribute({
51390
- role: 'arrow'
51391
- }))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
51392
- style: style,
51393
- className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
51394
- children: tip
51395
- })]
51396
- }))
51397
- })]
51398
- });
51399
- };
51400
- /* harmony default export */ var src_tooltip_tooltip = (Tooltip);
51401
51626
  ;// CONCATENATED MODULE: ../base/src/form/form-item.tsx
51402
51627
 
51403
51628
 
@@ -54254,6 +54479,7 @@ var list_List = function List(props) {
54254
54479
  lineHeightProp = props.lineHeight,
54255
54480
  threshold = props.threshold,
54256
54481
  controlType = props.controlType,
54482
+ keepScrollTop = props.keepScrollTop,
54257
54483
  hideCreateOption = props.hideCreateOption,
54258
54484
  optionListRef = props.optionListRef,
54259
54485
  isAnimationFinish = props.isAnimationFinish,
@@ -54429,6 +54655,7 @@ var list_List = function List(props) {
54429
54655
  dynamicVirtual: dynamicVirtual,
54430
54656
  tagClassName: styles.virtualList,
54431
54657
  height: height,
54658
+ keepScrollTop: keepScrollTop,
54432
54659
  onScroll: handleVirtualScroll,
54433
54660
  lineHeight: lineHeight,
54434
54661
  rowsInView: itemsInView,
@@ -56880,6 +57107,7 @@ function Select(props0) {
56880
57107
  renderItem: renderItem,
56881
57108
  controlType: controlType,
56882
57109
  onLoadMore: onLoadMore,
57110
+ keepScrollTop: !!filterText ? false : true,
56883
57111
  isAnimationFinish: isAnimationFinish,
56884
57112
  threshold: threshold,
56885
57113
  onControlTypeChange: setControlType,
@@ -71780,7 +72008,7 @@ var upload_interface = __webpack_require__(8821);
71780
72008
 
71781
72009
 
71782
72010
  /* harmony default export */ var src_0 = ({
71783
- version: '3.8.0-beta.11'
72011
+ version: '3.8.0-beta.13'
71784
72012
  });
71785
72013
  }();
71786
72014
  /******/ return __webpack_exports__;