@luminati-io/uikit 3.0.3 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -26174,7 +26174,7 @@ Menu.defaultProps = {
26174
26174
  size: 'md'
26175
26175
  };
26176
26176
  Menu.propTypes = {
26177
- size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md']),
26177
+ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg']),
26178
26178
  items: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().any)).isRequired
26179
26179
  };
26180
26180
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Menu);
@@ -26285,11 +26285,11 @@ var MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forward
26285
26285
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(MenuItemLeft, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({}, iconProps, {
26286
26286
  color: iconColor
26287
26287
  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(MenuItemRight, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(MenuItemText, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(PrimaryText, {
26288
- no_wrap: true,
26288
+ $size: size,
26289
26289
  color: labelColor
26290
26290
  }, text), !isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_8__.Label, {
26291
26291
  variant: "sm",
26292
- no_wrap: true,
26292
+ whiteSpace: "nowrap",
26293
26293
  color: "gray_9"
26294
26294
  }, tertiaryText), !!secondaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(SecondaryText, null, secondaryText))), !!description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Description, null, description))), isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(SecondaryIcon, {
26295
26295
  subMenu: true
@@ -26309,7 +26309,7 @@ MenuItem.propTypes = {
26309
26309
  tertiaryText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
26310
26310
  description: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
26311
26311
  type: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['item', 'divider', 'group']),
26312
- size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md']),
26312
+ size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
26313
26313
  icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_9__.iconNames),
26314
26314
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape(MenuItem.propTypes)),
26315
26315
  variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['default', 'negative']),
@@ -26333,11 +26333,16 @@ var MenuItemComp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().for
26333
26333
  }, rest), children);
26334
26334
  });
26335
26335
  MenuItemComp.displayName = 'MenuItemComp';
26336
+ var sizes = {
26337
+ sm: 32,
26338
+ md: 40,
26339
+ lg: 56
26340
+ };
26336
26341
  var MenuItemButton = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
26337
26342
  displayName: "MenuItemButton",
26338
26343
  componentId: "sc-vtiffr-0"
26339
26344
  })(["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) {
26340
- return (0,_utils__WEBPACK_IMPORTED_MODULE_9__.toPixel)(props.size == 'sm' ? 32 : 40);
26345
+ return (0,_utils__WEBPACK_IMPORTED_MODULE_9__.toPixel)(sizes[props.size] || sizes.md);
26341
26346
  }, function (props) {
26342
26347
  return props['aria-disabled'] ? 'not-allowed' : 'pointer';
26343
26348
  }, _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.gray_4);
@@ -26388,9 +26393,11 @@ var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_icon__
26388
26393
  displayName: "RightIcon",
26389
26394
  componentId: "sc-vtiffr-4"
26390
26395
  })(["margin-left:auto;"]);
26391
- var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_typography__WEBPACK_IMPORTED_MODULE_8__.Label).attrs({
26392
- variant: 'sm',
26393
- no_wrap: true
26396
+ var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_typography__WEBPACK_IMPORTED_MODULE_8__.Label).attrs(function (props) {
26397
+ return {
26398
+ variant: props.$size == 'lg' ? 'lg' : 'sm',
26399
+ whiteSpace: 'nowrap'
26400
+ };
26394
26401
  }).withConfig({
26395
26402
  displayName: "PrimaryText",
26396
26403
  componentId: "sc-vtiffr-5"
@@ -26398,7 +26405,7 @@ var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_typo
26398
26405
  var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_typography__WEBPACK_IMPORTED_MODULE_8__.Label).attrs({
26399
26406
  variant: 'sm',
26400
26407
  color: 'gray_9',
26401
- no_wrap: true
26408
+ whiteSpace: 'nowrap'
26402
26409
  }).withConfig({
26403
26410
  displayName: "SecondaryText",
26404
26411
  componentId: "sc-vtiffr-6"
@@ -26406,7 +26413,7 @@ var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_ty
26406
26413
  var Description = styled_components__WEBPACK_IMPORTED_MODULE_3___default()(_typography__WEBPACK_IMPORTED_MODULE_8__.Label).attrs({
26407
26414
  variant: 'xs',
26408
26415
  color: 'gray_9',
26409
- no_wrap: true
26416
+ whiteSpace: 'nowrap'
26410
26417
  }).withConfig({
26411
26418
  displayName: "Description",
26412
26419
  componentId: "sc-vtiffr-7"
@@ -30313,7 +30320,8 @@ Header.defaultProps = {
30313
30320
  variant: 'xl'
30314
30321
  };
30315
30322
  Header.propTypes = {
30316
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xl', '2xl'])
30323
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xl', '2xl']),
30324
+ whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_3__.whiteSpaces)
30317
30325
  };
30318
30326
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Header);
30319
30327
 
@@ -30369,7 +30377,8 @@ Hyperlink.defaultProps = {
30369
30377
  variant: 'lg'
30370
30378
  };
30371
30379
  Hyperlink.propTypes = {
30372
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'lg'])
30380
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'lg']),
30381
+ whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_3__.whiteSpaces)
30373
30382
  };
30374
30383
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Hyperlink);
30375
30384
 
@@ -30522,7 +30531,8 @@ Paragraph.defaultProps = {
30522
30531
  variant: 'lg_snug'
30523
30532
  };
30524
30533
  Paragraph.propTypes = {
30525
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xxs', 'xs', 'sm', 'lg_snug', 'lg_loose'])
30534
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xxs', 'xs', 'sm', 'lg_snug', 'lg_loose']),
30535
+ whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_3__.whiteSpaces)
30526
30536
  };
30527
30537
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Paragraph);
30528
30538
 
@@ -30543,8 +30553,8 @@ __webpack_require__.r(__webpack_exports__);
30543
30553
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
30544
30554
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
30545
30555
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
30546
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./typography */ "./src/typography/typography.js");
30547
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
30556
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
30557
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./typography */ "./src/typography/typography.js");
30548
30558
  // LICENSE_CODE ZON
30549
30559
 
30550
30560
 
@@ -30562,7 +30572,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
30562
30572
 
30563
30573
  var Style = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
30564
30574
  var children = props.children;
30565
- var typographyProps = _objectSpread(_objectSpread({}, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getTypographyProps)(props)), {}, {
30575
+ var typographyProps = _objectSpread(_objectSpread({}, (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getTypographyProps)(props)), {}, {
30566
30576
  font_size: {
30567
30577
  italic_sm: 'sm',
30568
30578
  code: 'sm',
@@ -30579,7 +30589,7 @@ var Style = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef
30579
30589
  italic: ['italic_lg', 'italic_sm', 'italic_xs'].includes(props.variant),
30580
30590
  uppercase: props.variant == 'capitals'
30581
30591
  });
30582
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_2__["default"], _extends({
30592
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({
30583
30593
  ref: ref
30584
30594
  }, typographyProps), children);
30585
30595
  });
@@ -30588,7 +30598,8 @@ Style.defaultProps = {
30588
30598
  variant: 'italic_lg'
30589
30599
  };
30590
30600
  Style.propTypes = {
30591
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code', 'capitals'])
30601
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code', 'capitals']),
30602
+ whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_2__.whiteSpaces)
30592
30603
  };
30593
30604
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Style);
30594
30605
 
@@ -30614,7 +30625,7 @@ __webpack_require__.r(__webpack_exports__);
30614
30625
 
30615
30626
 
30616
30627
  /*jslint react:true*/
30617
- var _excluded = ["children", "font_family", "font_weight", "font_size", "line_height", "letter_spacing", "color", "italic", "uppercase", "no_wrap", "underline"];
30628
+ var _excluded = ["children", "font_family", "font_weight", "font_size", "line_height", "letter_spacing", "color", "italic", "uppercase", "no_wrap", "underline", "whiteSpace"];
30618
30629
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30619
30630
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30620
30631
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -30633,6 +30644,7 @@ var Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
30633
30644
  uppercase = props.uppercase,
30634
30645
  no_wrap = props.no_wrap,
30635
30646
  underline = props.underline,
30647
+ whiteSpace = props.whiteSpace,
30636
30648
  rest = _objectWithoutProperties(props, _excluded);
30637
30649
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledTypography, _extends({
30638
30650
  ref: ref,
@@ -30645,7 +30657,8 @@ var Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwa
30645
30657
  $italic: italic,
30646
30658
  $uppercase: uppercase,
30647
30659
  $noWrap: no_wrap,
30648
- $underline: underline
30660
+ $underline: underline,
30661
+ $whiteSpace: whiteSpace
30649
30662
  }, rest), children);
30650
30663
  });
30651
30664
  Typography.displayName = 'Typography';
@@ -30661,6 +30674,7 @@ var StyledTypography = styled_components__WEBPACK_IMPORTED_MODULE_1___default().
30661
30674
  }, function (props) {
30662
30675
  return props.$uppercase ? 'letter-spacing: 0.02em;' : null;
30663
30676
  }, function (props) {
30677
+ if (props.$whiteSpace && _utils__WEBPACK_IMPORTED_MODULE_2__.whiteSpaces.includes(props.$whiteSpace)) return "white-space: ".concat(props.$whiteSpace);
30664
30678
  return props.$noWrap ? 'white-space: nowrap;' : null;
30665
30679
  }, function (props) {
30666
30680
  return props.underline ? 'text-decoration: underline;' : null;
@@ -30691,7 +30705,8 @@ __webpack_require__.r(__webpack_exports__);
30691
30705
  /* harmony export */ toIconSize: () => (/* binding */ toIconSize),
30692
30706
  /* harmony export */ toPixel: () => (/* binding */ toPixel),
30693
30707
  /* harmony export */ toSize: () => (/* binding */ toSize),
30694
- /* harmony export */ tooltipPlacements: () => (/* binding */ tooltipPlacements)
30708
+ /* harmony export */ tooltipPlacements: () => (/* binding */ tooltipPlacements),
30709
+ /* harmony export */ whiteSpaces: () => (/* binding */ whiteSpaces)
30695
30710
  /* harmony export */ });
30696
30711
  /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
30697
30712
  /* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pickBy */ "./node_modules/lodash/pickBy.js");
@@ -30715,6 +30730,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
30715
30730
 
30716
30731
  var colorNames = Object.keys(_theme__WEBPACK_IMPORTED_MODULE_3__["default"].color);
30717
30732
  var iconNames = Object.keys(_icons__WEBPACK_IMPORTED_MODULE_0__["default"]);
30733
+ var whiteSpaces = ['normal', 'nowrap', 'pre', 'pre-wrap', 'pre-line', 'break-spaces'];
30718
30734
  var toPixel = function toPixel(value) {
30719
30735
  return "".concat(value, "px");
30720
30736
  };
@@ -30744,7 +30760,8 @@ var getTypographyProps = function getTypographyProps(props) {
30744
30760
  italic = props.italic,
30745
30761
  color = props.color,
30746
30762
  no_wrap = props.no_wrap,
30747
- underline = props.underline;
30763
+ underline = props.underline,
30764
+ whiteSpace = props.whiteSpace;
30748
30765
  return _objectSpread({
30749
30766
  as: as,
30750
30767
  font_family: font_family,
@@ -30755,7 +30772,8 @@ var getTypographyProps = function getTypographyProps(props) {
30755
30772
  italic: italic,
30756
30773
  color: color,
30757
30774
  no_wrap: no_wrap,
30758
- underline: underline
30775
+ underline: underline,
30776
+ whiteSpace: whiteSpace
30759
30777
  }, getCommonProps(props));
30760
30778
  };
30761
30779
  function fromTheme(propName, defaultValue) {