@zextras/carbonio-design-system 0.4.0-devel.1663244218709 → 0.4.0-devel.1663245826569

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.
@@ -734,6 +734,7 @@ export declare interface DropdownItem {
734
734
  disabled?: boolean;
735
735
  items?: Array<DropdownItem>;
736
736
  keepOpen?: boolean;
737
+ tooltipLabel?: string | undefined;
737
738
  }
738
739
 
739
740
  export declare interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'contextMenu'> {
@@ -21493,9 +21493,17 @@ function ListItemContent(_ref2) {
21493
21493
  disabled,
21494
21494
  itemIconSize,
21495
21495
  itemTextSize,
21496
- itemPaddingBetween
21496
+ itemPaddingBetween,
21497
+ tooltipLabel
21497
21498
  } = _ref2;
21498
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, icon && /*#__PURE__*/React__default["default"].createElement(Padding, {
21499
+ return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
21500
+ disabled: !disabled || !tooltipLabel,
21501
+ label: tooltipLabel,
21502
+ placement: "bottom-end"
21503
+ }, /*#__PURE__*/React__default["default"].createElement(Container, {
21504
+ orientation: "horizontal",
21505
+ mainAlignment: "flex-start"
21506
+ }, icon && /*#__PURE__*/React__default["default"].createElement(Padding, {
21499
21507
  right: itemPaddingBetween
21500
21508
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
21501
21509
  icon: icon,
@@ -21509,7 +21517,7 @@ function ListItemContent(_ref2) {
21509
21517
  weight: selected ? 'bold' : 'regular',
21510
21518
  color: disabled ? 'secondary.regular' : 'text',
21511
21519
  disabled: disabled
21512
- }, label));
21520
+ }, label)));
21513
21521
  }
21514
21522
 
21515
21523
  function PopperListItem(_ref3) {
@@ -21525,6 +21533,7 @@ function PopperListItem(_ref3) {
21525
21533
  itemTextSize,
21526
21534
  keepOpen,
21527
21535
  itemPaddingBetween,
21536
+ tooltipLabel,
21528
21537
  ...rest
21529
21538
  } = _ref3;
21530
21539
  const itemRef = React.useRef(null);
@@ -21564,7 +21573,8 @@ function PopperListItem(_ref3) {
21564
21573
  disabled: disabled,
21565
21574
  itemIconSize: itemIconSize,
21566
21575
  itemTextSize: itemTextSize,
21567
- itemPaddingBetween: itemPaddingBetween
21576
+ itemPaddingBetween: itemPaddingBetween,
21577
+ tooltipLabel: tooltipLabel
21568
21578
  }));
21569
21579
  }
21570
21580
 
@@ -21584,6 +21594,7 @@ function NestListItem(_ref4) {
21584
21594
  itemPaddingBetween,
21585
21595
  keepOpen,
21586
21596
  dropdownListRef,
21597
+ tooltipLabel,
21587
21598
  ...rest
21588
21599
  } = _ref4;
21589
21600
  const itemRef = React.useRef(null);
@@ -21626,7 +21637,8 @@ function NestListItem(_ref4) {
21626
21637
  disabled: disabled,
21627
21638
  itemIconSize: itemIconSize,
21628
21639
  itemTextSize: itemTextSize,
21629
- itemPaddingBetween: itemPaddingBetween
21640
+ itemPaddingBetween: itemPaddingBetween,
21641
+ tooltipLabel: tooltipLabel
21630
21642
  }), /*#__PURE__*/React__default["default"].createElement(Icon, {
21631
21643
  size: itemIconSize,
21632
21644
  icon: "ChevronRight",
@@ -33358,7 +33370,12 @@ const OptionalFooterContainer = styled__default["default"](Container).withConfig
33358
33370
  const ButtonContainer = styled__default["default"](Container).withConfig({
33359
33371
  displayName: "Modal__ButtonContainer",
33360
33372
  componentId: "sc-1lygj44-3"
33361
- })(["min-width:1px;flex-basis:auto;flex-grow:1;"]);
33373
+ })(["min-width:1px;flex-basis:auto;flex-grow:1;", ""], _ref3 => {
33374
+ let {
33375
+ $pushLeftFirstChild
33376
+ } = _ref3;
33377
+ return $pushLeftFirstChild && styled.css(["> *{&:first-child{margin-right:auto;}}"]);
33378
+ });
33362
33379
  const DismissButton = styled__default["default"](Button$1).withConfig({
33363
33380
  displayName: "Modal__DismissButton",
33364
33381
  componentId: "sc-1lygj44-4"
@@ -33368,7 +33385,7 @@ const ConfirmButton = styled__default["default"](Button$1).withConfig({
33368
33385
  componentId: "sc-1lygj44-5"
33369
33386
  })(["flex-basis:auto;min-width:100px;flex-shrink:1;"]);
33370
33387
 
33371
- const ModalFooter = _ref3 => {
33388
+ const ModalFooter = _ref4 => {
33372
33389
  let {
33373
33390
  type,
33374
33391
  centered,
@@ -33382,7 +33399,7 @@ const ModalFooter = _ref3 => {
33382
33399
  copyLabel,
33383
33400
  optionalFooter,
33384
33401
  onCopyClipboard
33385
- } = _ref3;
33402
+ } = _ref4;
33386
33403
  const secondaryButton = React.useMemo(() => {
33387
33404
  let button;
33388
33405
 
@@ -33407,25 +33424,26 @@ const ModalFooter = _ref3 => {
33407
33424
 
33408
33425
  return button;
33409
33426
  }, [type, onCopyClipboard, copyLabel, onSecondaryAction, secondaryActionLabel, dismissLabel, onClose]);
33410
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, optionalFooter && /*#__PURE__*/React__default["default"].createElement(OptionalFooterContainer, {
33411
- padding: centered ? {
33427
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, optionalFooter && centered && /*#__PURE__*/React__default["default"].createElement(OptionalFooterContainer, {
33428
+ padding: {
33412
33429
  bottom: 'large'
33413
- } : {
33414
- right: 'large'
33415
33430
  },
33416
33431
  orientation: "horizontal",
33417
33432
  mainAlignment: "flex-start"
33418
33433
  }, optionalFooter), /*#__PURE__*/React__default["default"].createElement(ButtonContainer, {
33419
33434
  orientation: "horizontal",
33420
- mainAlignment: centered ? 'center' : 'flex-end'
33421
- }, secondaryButton, (onConfirm || onClose) && /*#__PURE__*/React__default["default"].createElement(ConfirmButton, {
33435
+ mainAlignment: centered ? 'center' : 'flex-end',
33436
+ $pushLeftFirstChild: optionalFooter != null && !centered
33437
+ }, !centered && optionalFooter, !centered && /*#__PURE__*/React__default["default"].createElement(Padding, {
33438
+ right: "large"
33439
+ }), secondaryButton, (onConfirm || onClose) && /*#__PURE__*/React__default["default"].createElement(ConfirmButton, {
33422
33440
  color: confirmColor,
33423
33441
  onClick: onConfirm || onClose,
33424
33442
  label: confirmLabel
33425
33443
  })));
33426
33444
  };
33427
33445
 
33428
- const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn(_ref4, ref) {
33446
+ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn(_ref5, ref) {
33429
33447
  let {
33430
33448
  background = 'gray6',
33431
33449
  type = 'default',
@@ -33450,7 +33468,7 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn
33450
33468
  disablePortal = false,
33451
33469
  zIndex = 999,
33452
33470
  ...rest
33453
- } = _ref4;
33471
+ } = _ref5;
33454
33472
  const [delayedOpen, setDelayedOpen] = React.useState(false);
33455
33473
  const {
33456
33474
  windowObj
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-design-system",
3
- "version": "0.4.0-devel.1663244218709",
3
+ "version": "0.4.0-devel.1663245826569",
4
4
  "description": "An awesome UI for Zextras Projects.",
5
5
  "main": "dist/zapp-ui.bundle.js",
6
6
  "types": "dist/zapp-ui.bundle.d.ts",