@luminati-io/uikit 6.3.2 → 6.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -42245,7 +42245,7 @@ __webpack_require__.r(__webpack_exports__);
42245
42245
  /* harmony export */ DatePicker: () => (/* binding */ DatePicker),
42246
42246
  /* harmony export */ StyledDayPicker: () => (/* binding */ StyledDayPicker)
42247
42247
  /* harmony export */ });
42248
- /* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns/format */ "./node_modules/date-fns/format.mjs");
42248
+ /* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! date-fns/format */ "./node_modules/date-fns/format.mjs");
42249
42249
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
42250
42250
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
42251
42251
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
@@ -42253,17 +42253,26 @@ __webpack_require__.r(__webpack_exports__);
42253
42253
  /* harmony import */ var react_day_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-day-picker */ "./node_modules/react-day-picker/dist/index.esm.js");
42254
42254
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "styled-components");
42255
42255
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
42256
- /* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
42257
- /* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../translation */ "./src/translation.js");
42258
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
42259
- /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shared */ "./src/input/shared.js");
42256
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
42257
+ /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../popover */ "./src/popover/index.js");
42258
+ /* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../translation */ "./src/translation.js");
42259
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
42260
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
42261
+ /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./shared */ "./src/input/shared.js");
42260
42262
  // LICENSE_CODE ZON
42261
42263
 
42262
42264
 
42263
42265
  /*jslint react:true*/
42264
- var _excluded = ["onChange", "disabledDays", "isRange", "defaultMonth", "month", "onMonthChange", "renderPopover", "format", "size", "value"],
42265
- _excluded2 = ["mode", "selected", "onChange", "renderPopover", "popover"];
42266
+ var _excluded = ["onChange", "disabledDays", "isRange", "defaultMonth", "month", "onMonthChange", "renderPopover", "format", "size", "value", "popoverPlacement"],
42267
+ _excluded2 = ["popoverPlacement", "popoverProps", "size", "placeholder", "onOpenChange"],
42268
+ _excluded3 = ["mode", "selected", "onChange", "renderPopover", "hidePopover"];
42266
42269
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
42270
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
42271
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
42272
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
42273
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
42274
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
42275
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
42267
42276
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
42268
42277
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
42269
42278
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -42281,6 +42290,8 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
42281
42290
 
42282
42291
 
42283
42292
 
42293
+
42294
+
42284
42295
  var DatePicker = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref, ref) {
42285
42296
  var onChange = _ref.onChange,
42286
42297
  disabledDays = _ref.disabledDays,
@@ -42295,6 +42306,8 @@ var DatePicker = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwa
42295
42306
  _ref$size = _ref.size,
42296
42307
  size = _ref$size === void 0 ? 'md' : _ref$size,
42297
42308
  _value = _ref.value,
42309
+ _ref$popoverPlacement = _ref.popoverPlacement,
42310
+ popoverPlacement = _ref$popoverPlacement === void 0 ? 'bottomLeft' : _ref$popoverPlacement,
42298
42311
  rest = _objectWithoutProperties(_ref, _excluded);
42299
42312
  var value = usePickerValue({
42300
42313
  isRange: isRange,
@@ -42313,11 +42326,18 @@ var DatePicker = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwa
42313
42326
  renderPopover: renderPopover
42314
42327
  };
42315
42328
  }, [value, disabledDays, onChange, isRange, defaultMonth, month, onMonthChange, renderPopover]);
42316
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Picker, _extends({
42329
+ var leftInnerContent = (0,_util__WEBPACK_IMPORTED_MODULE_8__.firstDefined)(rest.leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
42330
+ name: "Calendar",
42331
+ color: "icon",
42332
+ size: size == 'lg' ? 'sm' : 'xs'
42333
+ }));
42334
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PickerField, _extends({
42317
42335
  ref: ref
42318
42336
  }, rest, {
42337
+ leftInnerContent: leftInnerContent,
42319
42338
  format: fmt,
42320
42339
  value: value,
42340
+ popoverPlacement: popoverPlacement,
42321
42341
  popoverProps: popoverProps,
42322
42342
  size: size,
42323
42343
  isRange: isRange
@@ -42333,7 +42353,7 @@ DatePicker.propTypes = {
42333
42353
  placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
42334
42354
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
42335
42355
  required: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
42336
- necessityIndicator: _constants__WEBPACK_IMPORTED_MODULE_6__.PT_NECESSITY_INDICATOR,
42356
+ necessityIndicator: _constants__WEBPACK_IMPORTED_MODULE_7__.PT_NECESSITY_INDICATOR,
42337
42357
  invalid: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
42338
42358
  leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
42339
42359
  leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
@@ -42349,50 +42369,65 @@ DatePicker.propTypes = {
42349
42369
  onOpenChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
42350
42370
  defaultMonth: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
42351
42371
  month: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
42352
- onMonthChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
42372
+ onMonthChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
42373
+ popoverPlacement: _constants__WEBPACK_IMPORTED_MODULE_7__.PT_TOOLTIP_PLACEMENT
42353
42374
  };
42354
- var PickerField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
42355
- var popover = props.popover,
42356
- size = props.size,
42357
- placeholder = props.placeholder;
42358
- var innerWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
42359
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
42360
- var innerWrapper = innerWrapperRef.current;
42361
- if (!innerWrapper) return;
42362
- var cb = function cb() {
42363
- return popover.show();
42364
- };
42365
- innerWrapper.addEventListener('click', cb);
42366
- return function () {
42367
- return innerWrapper.removeEventListener('click', cb);
42368
- };
42369
- }, [innerWrapperRef.current]);
42370
- var inputProps = _objectSpread(_objectSpread({}, props.inputProps), {}, {
42375
+ var PickerField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref2, ref) {
42376
+ var popoverPlacement = _ref2.popoverPlacement,
42377
+ popoverProps = _ref2.popoverProps,
42378
+ size = _ref2.size,
42379
+ placeholder = _ref2.placeholder,
42380
+ onOpenChange = _ref2.onOpenChange,
42381
+ rest = _objectWithoutProperties(_ref2, _excluded2);
42382
+ var inputProps = _objectSpread(_objectSpread({}, rest.inputProps), {}, {
42371
42383
  type: 'text',
42372
42384
  readOnly: true
42373
42385
  });
42374
- var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_7__.useHeightCalculationCallback)(size);
42375
- var t = (0,_translation__WEBPACK_IMPORTED_MODULE_5__.useTranslate)();
42376
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_7__.FieldWrapper, _extends({}, props, {
42386
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
42387
+ _useState2 = _slicedToArray(_useState, 2),
42388
+ visible = _useState2[0],
42389
+ setVisible = _useState2[1];
42390
+ var onVisibleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (value) {
42391
+ setVisible(value);
42392
+ onOpenChange === null || onOpenChange === void 0 || onOpenChange(value);
42393
+ }, [onOpenChange]);
42394
+ var fieldRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
42395
+ var hidePopover = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
42396
+ var _fieldRef$current;
42397
+ (_fieldRef$current = fieldRef.current) === null || _fieldRef$current === void 0 || _fieldRef$current.blur();
42398
+ }, []);
42399
+ var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_9__.useHeightCalculationCallback)(size);
42400
+ var t = (0,_translation__WEBPACK_IMPORTED_MODULE_6__.useTranslate)();
42401
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_popover__WEBPACK_IMPORTED_MODULE_5__.Popover, {
42402
+ trigger: "focus",
42403
+ placement: popoverPlacement,
42404
+ zIndex: _constants__WEBPACK_IMPORTED_MODULE_7__.Z_INDEX.datepicker,
42405
+ popover: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PickerPopover, _extends({
42406
+ hidePopover: hidePopover
42407
+ }, popoverProps)),
42408
+ visible: visible,
42409
+ onVisibleChange: onVisibleChange
42410
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_9__.FieldWrapper, _extends({}, rest, {
42377
42411
  ref: ref,
42378
- innerWrapper: innerWrapperRef,
42412
+ fieldRef: (0,_util__WEBPACK_IMPORTED_MODULE_8__.mergeRefs)(rest.fieldRef, fieldRef),
42413
+ size: size,
42379
42414
  heightCalculationCallback: heightCalculationCallback,
42380
42415
  autoresize: false,
42381
42416
  verticalAlign: "center",
42382
- Field: _shared__WEBPACK_IMPORTED_MODULE_7__.Field,
42383
- value: getDateText(props),
42417
+ Field: _shared__WEBPACK_IMPORTED_MODULE_9__.Field,
42418
+ value: getDateText(rest),
42384
42419
  placeholder: t(placeholder),
42385
42420
  inputProps: inputProps
42386
- }));
42421
+ })));
42387
42422
  });
42388
42423
  PickerField.displayName = 'PickerField';
42389
- var PickerPopover = function PickerPopover(props) {
42390
- var mode = props.mode,
42391
- selected = props.selected,
42392
- onChange = props.onChange,
42393
- renderPopover = props.renderPopover,
42394
- popover = props.popover,
42395
- rest = _objectWithoutProperties(props, _excluded2);
42424
+ var PickerPopover = function PickerPopover(_ref3) {
42425
+ var mode = _ref3.mode,
42426
+ selected = _ref3.selected,
42427
+ onChange = _ref3.onChange,
42428
+ renderPopover = _ref3.renderPopover,
42429
+ hidePopover = _ref3.hidePopover,
42430
+ rest = _objectWithoutProperties(_ref3, _excluded3);
42396
42431
  var handleDayClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (day, activeModifiers) {
42397
42432
  if (activeModifiers.disabled) return;
42398
42433
  var val = day;
@@ -42412,8 +42447,8 @@ var PickerPopover = function PickerPopover(props) {
42412
42447
  }
42413
42448
  onChange(val);
42414
42449
  }, [mode, selected]);
42415
- var render = typeof renderPopover == 'function' ? renderPopover : function (_ref2) {
42416
- var picker = _ref2.picker;
42450
+ var render = typeof renderPopover == 'function' ? renderPopover : function (_ref4) {
42451
+ var picker = _ref4.picker;
42417
42452
  return picker;
42418
42453
  };
42419
42454
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(DayPickerWrapper, {
@@ -42427,27 +42462,22 @@ var PickerPopover = function PickerPopover(props) {
42427
42462
  mode: mode,
42428
42463
  selected: selected
42429
42464
  })),
42430
- popover: popover
42465
+ hidePopover: hidePopover,
42466
+ // XXX legacy api
42467
+ popover: {
42468
+ hide: hidePopover,
42469
+ show: function show() {},
42470
+ toggle: function toggle() {}
42471
+ }
42431
42472
  }));
42432
42473
  };
42433
- PickerPopover.displayName = 'PickerPopover';
42434
- var Picker = (0,_hoc__WEBPACK_IMPORTED_MODULE_4__.withPopover)(PickerField, PickerPopover, {
42435
- placement: 'bottom',
42436
- zIndex: _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.datepicker
42437
- });
42438
42474
  var borderRadius = '4px';
42439
42475
  var DayPickerWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
42440
42476
  displayName: "DayPickerWrapper",
42441
42477
  componentId: "sc-1gurvxq-0"
42442
- })(["margin:0;padding:", " 0;box-sizing:border-box;background:", ";border-radius:4px;box-shadow:", ";"], function (_ref3) {
42443
- var spacing = _ref3.theme.spacing;
42478
+ })(["margin:0;padding:", " 0;box-sizing:border-box;border-radius:4px;"], function (_ref5) {
42479
+ var spacing = _ref5.theme.spacing;
42444
42480
  return spacing['02'];
42445
- }, function (_ref4) {
42446
- var color = _ref4.theme.color;
42447
- return color.bg_elevated;
42448
- }, function (_ref5) {
42449
- var shadow = _ref5.theme.shadow;
42450
- return shadow.medium;
42451
42481
  });
42452
42482
  var StyledDayPicker = function StyledDayPicker(props) {
42453
42483
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(DayPickerStyles, _extends({}, props, {
@@ -42625,9 +42655,9 @@ var getDateText = function getDateText(props) {
42625
42655
  if (isRange) {
42626
42656
  var from = value.from,
42627
42657
  to = value.to;
42628
- return (from ? (0,date_fns_format__WEBPACK_IMPORTED_MODULE_8__["default"])(from, fmt) : placeholder || '') + ' - ' + (to ? (0,date_fns_format__WEBPACK_IMPORTED_MODULE_8__["default"])(to, fmt) : placeholder || '');
42658
+ return (from ? (0,date_fns_format__WEBPACK_IMPORTED_MODULE_10__["default"])(from, fmt) : placeholder || '') + ' - ' + (to ? (0,date_fns_format__WEBPACK_IMPORTED_MODULE_10__["default"])(to, fmt) : placeholder || '');
42629
42659
  }
42630
- return (0,date_fns_format__WEBPACK_IMPORTED_MODULE_8__["default"])(value, fmt);
42660
+ return (0,date_fns_format__WEBPACK_IMPORTED_MODULE_10__["default"])(value, fmt);
42631
42661
  };
42632
42662
  var getDefaultMonth = function getDefaultMonth(value) {
42633
42663
  if (value instanceof Date) return value;
@@ -47592,17 +47622,16 @@ __webpack_require__.r(__webpack_exports__);
47592
47622
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
47593
47623
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
47594
47624
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
47595
- /* harmony import */ var rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/lib/pickAttrs */ "./node_modules/rc-util/lib/pickAttrs.js");
47596
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
47597
- /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
47598
- /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
47599
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
47600
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
47601
- /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu */ "./src/menu/menu.js");
47602
- /* harmony import */ var _menu_item_divider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./menu_item_divider */ "./src/menu/menu_item_divider.js");
47603
- /* harmony import */ var _menu_item_group__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./menu_item_group */ "./src/menu/menu_item_group.js");
47604
- /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
47605
- /* harmony import */ var _menu_item_popup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./menu_item_popup */ "./src/menu/menu_item_popup.js");
47625
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
47626
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
47627
+ /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
47628
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
47629
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
47630
+ /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./menu */ "./src/menu/menu.js");
47631
+ /* harmony import */ var _menu_item_divider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu_item_divider */ "./src/menu/menu_item_divider.js");
47632
+ /* harmony import */ var _menu_item_group__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./menu_item_group */ "./src/menu/menu_item_group.js");
47633
+ /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
47634
+ /* harmony import */ var _menu_item_popup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./menu_item_popup */ "./src/menu/menu_item_popup.js");
47606
47635
  // LICENSE_CODE ZON
47607
47636
 
47608
47637
 
@@ -47616,7 +47645,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
47616
47645
 
47617
47646
 
47618
47647
 
47619
-
47648
+ // import pickAttrs from 'rc-util/lib/pickAttrs';
47620
47649
 
47621
47650
 
47622
47651
 
@@ -47648,7 +47677,7 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
47648
47677
  icon = _ref.icon,
47649
47678
  iconPlacement = _ref.iconPlacement,
47650
47679
  rest = _objectWithoutProperties(_ref, _excluded);
47651
- if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_10__["default"], {
47680
+ if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_9__["default"], {
47652
47681
  ref: ref
47653
47682
  });
47654
47683
  var subItems = buildSubItems(children, {
@@ -47656,13 +47685,13 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
47656
47685
  });
47657
47686
  var isSubMenu = subMenu || subItems;
47658
47687
  if (type == 'group') {
47659
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_group__WEBPACK_IMPORTED_MODULE_11__.MenuItemGroup, _extends({
47688
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_group__WEBPACK_IMPORTED_MODULE_10__.MenuItemGroup, _extends({
47660
47689
  ref: ref,
47661
47690
  text: text,
47662
47691
  isFirstItem: isFirstItem
47663
47692
  }, rest), subItems);
47664
47693
  }
47665
- var _getIconProps = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getIconProps)('MenuItem', {
47694
+ var _getIconProps = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getIconProps)('MenuItem', {
47666
47695
  size: size,
47667
47696
  icon: icon,
47668
47697
  iconPlacement: iconPlacement
@@ -47671,23 +47700,23 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
47671
47700
  iconProps = _objectWithoutProperties(_getIconProps, _excluded2);
47672
47701
  var iconColor = disabled ? 'icon_disabled' : variant == 'negative' ? 'icon_error' : 'icon';
47673
47702
  var labelColor = disabled ? 'text_disabled' : variant == 'negative' ? 'text_error' : 'text';
47674
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_12__.MenuItemContainer, {
47703
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_11__.MenuItemContainer, {
47675
47704
  ref: ref,
47676
47705
  as: tag,
47677
47706
  role: "menuitem"
47678
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_6__.Tooltip2, {
47707
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__.Tooltip2, {
47679
47708
  tooltip: tooltip
47680
47709
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemComp, _extends({}, rest, {
47681
47710
  "aria-disabled": disabled ? true : undefined,
47682
47711
  size: size,
47683
47712
  role: "button",
47684
47713
  subItems: subItems
47685
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemLeft, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_5__.Icon, _extends({}, iconProps, {
47714
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemLeft, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, _extends({}, iconProps, {
47686
47715
  color: iconColor
47687
47716
  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemRight, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemText, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PrimaryText, {
47688
47717
  $size: size,
47689
47718
  color: labelColor
47690
- }, text), !isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_7__.Label, {
47719
+ }, text), !isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Label, {
47691
47720
  variant: "sm",
47692
47721
  whiteSpace: "nowrap",
47693
47722
  color: "text_tertiary"
@@ -47705,7 +47734,7 @@ MenuItem.propTypes = {
47705
47734
  description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
47706
47735
  type: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['item', 'divider', 'group']),
47707
47736
  size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg']),
47708
- icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_8__.iconNames),
47737
+ icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_7__.iconNames),
47709
47738
  // XXX alexanderse: PT.arrayOf(PT.shape(MenuItem.propTypes)) cause parse err
47710
47739
  children: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)),
47711
47740
  variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'negative']),
@@ -47715,7 +47744,7 @@ MenuItem.propTypes = {
47715
47744
  tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
47716
47745
  popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
47717
47746
  popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
47718
- popupTrigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_constants__WEBPACK_IMPORTED_MODULE_4__.PT_TRIGGER, prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(_constants__WEBPACK_IMPORTED_MODULE_4__.PT_TRIGGER)]),
47747
+ popupTrigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_constants__WEBPACK_IMPORTED_MODULE_3__.PT_TRIGGER, prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(_constants__WEBPACK_IMPORTED_MODULE_3__.PT_TRIGGER)]),
47719
47748
  popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
47720
47749
  };
47721
47750
  var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref2, ref) {
@@ -47727,9 +47756,9 @@ var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef
47727
47756
  rest = _objectWithoutProperties(_ref2, _excluded3);
47728
47757
  var button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemButton, _extends({
47729
47758
  ref: ref
47730
- }, (0,rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__["default"])(rest)), rest.children);
47759
+ }, rest));
47731
47760
  if (subItems) {
47732
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_popup__WEBPACK_IMPORTED_MODULE_13__.MenuItemPopup, {
47761
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_popup__WEBPACK_IMPORTED_MODULE_12__.MenuItemPopup, {
47733
47762
  subItems: subItems,
47734
47763
  popupPlacement: popupPlacement,
47735
47764
  popupTrigger: popupTrigger,
@@ -47749,7 +47778,7 @@ var MenuItemButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default().di
47749
47778
  displayName: "MenuItemButton",
47750
47779
  componentId: "sc-vtiffr-0"
47751
47780
  })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;text-decoration:none;background:0 none;border:0 none;padding:0 12px;box-sizing:border-box;width:100%;min-width:168px;max-width:540px;height:", ";gap:4px;cursor:", ";&:hover{background-color:", ";}&:hover,:visited,:focus{text-decoration:none;}&:active{background-color:", ";}"], function (props) {
47752
- return (0,_utils__WEBPACK_IMPORTED_MODULE_8__.toPixel)(sizes[props.size] || sizes.md);
47781
+ return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.toPixel)(sizes[props.size] || sizes.md);
47753
47782
  }, function (props) {
47754
47783
  return props['aria-disabled'] ? 'not-allowed' : 'pointer';
47755
47784
  }, function (_ref3) {
@@ -47784,13 +47813,13 @@ var SecondaryIcon = function SecondaryIcon(_ref5) {
47784
47813
  });
47785
47814
  return null;
47786
47815
  };
47787
- var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_icon__WEBPACK_IMPORTED_MODULE_5__.Icon).attrs({
47816
+ var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon).attrs({
47788
47817
  size: 'xs'
47789
47818
  }).withConfig({
47790
47819
  displayName: "RightIcon",
47791
47820
  componentId: "sc-vtiffr-4"
47792
47821
  })(["margin-left:auto;"]);
47793
- var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs(function (props) {
47822
+ var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_6__.Label).attrs(function (props) {
47794
47823
  return {
47795
47824
  variant: props.$size == 'lg' ? 'lg' : 'sm',
47796
47825
  whiteSpace: 'nowrap'
@@ -47799,7 +47828,7 @@ var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typo
47799
47828
  displayName: "PrimaryText",
47800
47829
  componentId: "sc-vtiffr-5"
47801
47830
  })(["overflow-x:clip;text-overflow:ellipsis;"]);
47802
- var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs({
47831
+ var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_6__.Label).attrs({
47803
47832
  variant: 'sm',
47804
47833
  color: 'text_secondary',
47805
47834
  whiteSpace: 'nowrap'
@@ -47807,7 +47836,7 @@ var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_ty
47807
47836
  displayName: "SecondaryText",
47808
47837
  componentId: "sc-vtiffr-6"
47809
47838
  })(["margin-left:auto;"]);
47810
- var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs({
47839
+ var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_6__.Label).attrs({
47811
47840
  variant: 'xs',
47812
47841
  color: 'text_tertiary',
47813
47842
  whiteSpace: 'nowrap'
@@ -47817,7 +47846,7 @@ var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typo
47817
47846
  })(["width:100%;overflow-x:clip;text-overflow:ellipsis;"]);
47818
47847
  var buildSubItems = function buildSubItems(children, itemProps) {
47819
47848
  return Array.isArray(children) && children.length > 0 ? children.map(function (item, ind) {
47820
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_9__.Menu.Item, _extends({
47849
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_8__.Menu.Item, _extends({
47821
47850
  key: item.key
47822
47851
  }, item, itemProps, {
47823
47852
  isFirstItem: ind == 0
@@ -49586,11 +49615,11 @@ var theme = function theme(cb) {
49586
49615
  };
49587
49616
  };
49588
49617
  var PopoverStyle = (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.createGlobalStyle)([".", "{position:absolute;display:block;visibility:visible;width:fit-content;border-radius:4px;border:1px solid ", ";background:", ";box-shadow:", ";&-hidden{display:none;}&-mask{position:fixed;inset:0;pointer-events:none;&-hidden{display:none;}}&-motion{&-enter,&-appear{opacity:0;animation-duration:0.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(0.08,0.82,0.17,1);animation-play-state:paused;}&-leave{animation-duration:0.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(0.6,0.04,0.98,0.34);animation-play-state:paused;}&-enter&-enter-active,&-appear&-appear-active{animation-name:rcPopoverZoomIn;animation-play-state:running;}&-leave&-leave-active{animation-name:rcPopoverZoomOut;animation-play-state:running;}}@keyframes rcPopoverZoomIn{0%{opacity:0;transform:scale(0,0);}100%{opacity:1;transform:scale(1,1);}}@keyframes rcPopoverZoomOut{0%{opacity:1;transform:scale(1,1);}100%{opacity:0;transform:scale(0,0);}}}"], prefixCls, theme(function (t) {
49589
- return t.color.border_secondary;
49618
+ return t.color.popover_border;
49590
49619
  }), theme(function (t) {
49591
- return t.color.bg_elevated;
49620
+ return t.color.bg;
49592
49621
  }), theme(function (t) {
49593
- return t.shadow.medium;
49622
+ return t.color.popover_shadow;
49594
49623
  }));
49595
49624
 
49596
49625
  /***/ }),
@@ -54966,7 +54995,9 @@ var componentLight = {
54966
54995
  tooltip_bg_white: color.white,
54967
54996
  tooltip_text_black: color.white,
54968
54997
  tooltip_text_white: semanticLight.text_secondary,
54969
- tooltip_border_white: semanticLight.border
54998
+ tooltip_border_white: semanticLight.border,
54999
+ popover_border: semanticLight.border_secondary,
55000
+ popover_shadow: shadow.medium
54970
55001
  };
54971
55002
  var lightTheme = _objectSpread(_objectSpread({}, baseTheme), {}, {
54972
55003
  color: _objectSpread(_objectSpread(_objectSpread({}, color), semanticLight), componentLight)
@@ -55104,7 +55135,9 @@ var componentDark = _objectSpread(_objectSpread({}, componentLight), {}, {
55104
55135
  tooltip_bg_white: color.white,
55105
55136
  tooltip_text_black: color.white,
55106
55137
  tooltip_text_white: color.gray_11_50,
55107
- tooltip_border_white: semanticDark.border
55138
+ tooltip_border_white: semanticDark.border,
55139
+ popover_border: semanticDark.border,
55140
+ popover_shadow: '0px 6px 12px -3px rgba(1, 4, 9, 0.40), ' + '0px 6px 16px 0px rgba(1, 4, 9, 0.40);'
55108
55141
  });
55109
55142
  var darkTheme = _objectSpread(_objectSpread({}, baseTheme), {}, {
55110
55143
  color: _objectSpread(_objectSpread(_objectSpread({}, color), semanticDark), componentDark)