@zextras/carbonio-design-system 0.4.0-devel.1663244158706 → 0.4.0-devel.1663244218709
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/zapp-ui.bundle.js +148 -129
- package/package.json +1 -1
package/dist/zapp-ui.bundle.js
CHANGED
|
@@ -21398,6 +21398,81 @@ const Chip = /*#__PURE__*/React__default["default"].forwardRef(function ChipFn(_
|
|
|
21398
21398
|
}, actionItems))));
|
|
21399
21399
|
});
|
|
21400
21400
|
|
|
21401
|
+
var baseEach = _baseEach;
|
|
21402
|
+
|
|
21403
|
+
/**
|
|
21404
|
+
* The base implementation of `_.some` without support for iteratee shorthands.
|
|
21405
|
+
*
|
|
21406
|
+
* @private
|
|
21407
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
21408
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
21409
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
21410
|
+
* else `false`.
|
|
21411
|
+
*/
|
|
21412
|
+
function baseSome$1(collection, predicate) {
|
|
21413
|
+
var result;
|
|
21414
|
+
|
|
21415
|
+
baseEach(collection, function(value, index, collection) {
|
|
21416
|
+
result = predicate(value, index, collection);
|
|
21417
|
+
return !result;
|
|
21418
|
+
});
|
|
21419
|
+
return !!result;
|
|
21420
|
+
}
|
|
21421
|
+
|
|
21422
|
+
var _baseSome = baseSome$1;
|
|
21423
|
+
|
|
21424
|
+
var arraySome = _arraySome,
|
|
21425
|
+
baseIteratee = _baseIteratee,
|
|
21426
|
+
baseSome = _baseSome,
|
|
21427
|
+
isArray = isArray_1,
|
|
21428
|
+
isIterateeCall = _isIterateeCall;
|
|
21429
|
+
|
|
21430
|
+
/**
|
|
21431
|
+
* Checks if `predicate` returns truthy for **any** element of `collection`.
|
|
21432
|
+
* Iteration is stopped once `predicate` returns truthy. The predicate is
|
|
21433
|
+
* invoked with three arguments: (value, index|key, collection).
|
|
21434
|
+
*
|
|
21435
|
+
* @static
|
|
21436
|
+
* @memberOf _
|
|
21437
|
+
* @since 0.1.0
|
|
21438
|
+
* @category Collection
|
|
21439
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
21440
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
21441
|
+
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
21442
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
21443
|
+
* else `false`.
|
|
21444
|
+
* @example
|
|
21445
|
+
*
|
|
21446
|
+
* _.some([null, 0, 'yes', false], Boolean);
|
|
21447
|
+
* // => true
|
|
21448
|
+
*
|
|
21449
|
+
* var users = [
|
|
21450
|
+
* { 'user': 'barney', 'active': true },
|
|
21451
|
+
* { 'user': 'fred', 'active': false }
|
|
21452
|
+
* ];
|
|
21453
|
+
*
|
|
21454
|
+
* // The `_.matches` iteratee shorthand.
|
|
21455
|
+
* _.some(users, { 'user': 'barney', 'active': false });
|
|
21456
|
+
* // => false
|
|
21457
|
+
*
|
|
21458
|
+
* // The `_.matchesProperty` iteratee shorthand.
|
|
21459
|
+
* _.some(users, ['active', false]);
|
|
21460
|
+
* // => true
|
|
21461
|
+
*
|
|
21462
|
+
* // The `_.property` iteratee shorthand.
|
|
21463
|
+
* _.some(users, 'active');
|
|
21464
|
+
* // => true
|
|
21465
|
+
*/
|
|
21466
|
+
function some(collection, predicate, guard) {
|
|
21467
|
+
var func = isArray(collection) ? arraySome : baseSome;
|
|
21468
|
+
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
21469
|
+
predicate = undefined;
|
|
21470
|
+
}
|
|
21471
|
+
return func(collection, baseIteratee(predicate));
|
|
21472
|
+
}
|
|
21473
|
+
|
|
21474
|
+
var some_1 = some;
|
|
21475
|
+
|
|
21401
21476
|
const ContainerEl$3 = styled__default["default"](Container).withConfig({
|
|
21402
21477
|
displayName: "Dropdown__ContainerEl",
|
|
21403
21478
|
componentId: "sc-1jmq2vf-0"
|
|
@@ -21508,6 +21583,7 @@ function NestListItem(_ref4) {
|
|
|
21508
21583
|
itemTextSize,
|
|
21509
21584
|
itemPaddingBetween,
|
|
21510
21585
|
keepOpen,
|
|
21586
|
+
dropdownListRef,
|
|
21511
21587
|
...rest
|
|
21512
21588
|
} = _ref4;
|
|
21513
21589
|
const itemRef = React.useRef(null);
|
|
@@ -21538,10 +21614,11 @@ function NestListItem(_ref4) {
|
|
|
21538
21614
|
selectedBackgroundColor: selectedBackgroundColor,
|
|
21539
21615
|
itemIconSize: itemIconSize,
|
|
21540
21616
|
itemTextSize: itemTextSize,
|
|
21541
|
-
itemPaddingBetween: itemPaddingBetween
|
|
21617
|
+
itemPaddingBetween: itemPaddingBetween,
|
|
21618
|
+
dropdownListRef: dropdownListRef
|
|
21542
21619
|
}, /*#__PURE__*/React__default["default"].createElement(Container, {
|
|
21543
21620
|
orientation: "horizontal",
|
|
21544
|
-
mainAlignment: "
|
|
21621
|
+
mainAlignment: "flex-start"
|
|
21545
21622
|
}, customComponent || /*#__PURE__*/React__default["default"].createElement(ListItemContent, {
|
|
21546
21623
|
icon: icon,
|
|
21547
21624
|
label: label,
|
|
@@ -21554,7 +21631,8 @@ function NestListItem(_ref4) {
|
|
|
21554
21631
|
size: itemIconSize,
|
|
21555
21632
|
icon: "ChevronRight",
|
|
21556
21633
|
style: {
|
|
21557
|
-
|
|
21634
|
+
marginRight: 0,
|
|
21635
|
+
marginLeft: 'auto'
|
|
21558
21636
|
}
|
|
21559
21637
|
}))));
|
|
21560
21638
|
}
|
|
@@ -21655,6 +21733,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function Drop
|
|
|
21655
21733
|
const [position, setPosition] = React.useState(null);
|
|
21656
21734
|
const [currentHover, setCurrentHover] = React.useState(null);
|
|
21657
21735
|
const openPopperTimoutRef = React.useRef();
|
|
21736
|
+
const nestedDropdownsRef = React.useRef([]);
|
|
21658
21737
|
React.useEffect( // clear timers on unmount
|
|
21659
21738
|
() => () => {
|
|
21660
21739
|
openPopperTimoutRef.current && clearTimeout(openPopperTimoutRef.current);
|
|
@@ -21669,6 +21748,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function Drop
|
|
|
21669
21748
|
const closePopper = React.useCallback(e => {
|
|
21670
21749
|
e && e.stopPropagation();
|
|
21671
21750
|
setOpen(forceOpen);
|
|
21751
|
+
setCurrentHover(null);
|
|
21672
21752
|
!disableRestoreFocus && innerTriggerRef.current && innerTriggerRef.current.focus();
|
|
21673
21753
|
onClose && onClose();
|
|
21674
21754
|
}, [disableRestoreFocus, forceOpen, innerTriggerRef, onClose]);
|
|
@@ -21712,7 +21792,12 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function Drop
|
|
|
21712
21792
|
const clickOutsidePopper = React.useCallback(e => {
|
|
21713
21793
|
var _innerTriggerRef$curr, _e$composedPath;
|
|
21714
21794
|
|
|
21715
|
-
|
|
21795
|
+
const clickedOnDropdown = dropdownRef.current && (e.target === dropdownRef.current || dropdownRef.current.contains(e.target));
|
|
21796
|
+
const clickedOnTrigger = innerTriggerRef.current && (e.target === innerTriggerRef.current || ((_innerTriggerRef$curr = innerTriggerRef.current) === null || _innerTriggerRef$curr === void 0 ? void 0 : _innerTriggerRef$curr.contains(e.target)));
|
|
21797
|
+
|
|
21798
|
+
const clickedOnNestedItem = nestedDropdownsRef.current && some_1(nestedDropdownsRef.current, nestedItemRef => nestedItemRef.current && nestedItemRef.current.contains(e.target));
|
|
21799
|
+
|
|
21800
|
+
if (!clickedOnDropdown && !clickedOnTrigger && !clickedOnNestedItem && // check if the attribute is in the event path
|
|
21716
21801
|
!find_1(((_e$composedPath = e.composedPath) === null || _e$composedPath === void 0 ? void 0 : _e$composedPath.call(e)) ?? [], el => el.hasAttribute && el.hasAttribute('data-keep-open'))) {
|
|
21717
21802
|
closePopper();
|
|
21718
21803
|
}
|
|
@@ -21819,56 +21904,65 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function Drop
|
|
|
21819
21904
|
const listItemMouseEnterHandler = React.useCallback(id => () => {
|
|
21820
21905
|
setCurrentHover(id);
|
|
21821
21906
|
}, []);
|
|
21822
|
-
const popperListItems = React.useMemo(() =>
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21844
|
-
|
|
21845
|
-
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21871
|
-
|
|
21907
|
+
const popperListItems = React.useMemo(() => {
|
|
21908
|
+
nestedDropdownsRef.current = [];
|
|
21909
|
+
|
|
21910
|
+
if (items) {
|
|
21911
|
+
return items.map((_ref15, index) => {
|
|
21912
|
+
let {
|
|
21913
|
+
id,
|
|
21914
|
+
icon,
|
|
21915
|
+
label,
|
|
21916
|
+
click,
|
|
21917
|
+
selected,
|
|
21918
|
+
customComponent,
|
|
21919
|
+
items: subItems,
|
|
21920
|
+
disabled: itemDisabled,
|
|
21921
|
+
type,
|
|
21922
|
+
keepOpen,
|
|
21923
|
+
...itemProps
|
|
21924
|
+
} = _ref15;
|
|
21925
|
+
const nestedRef = /*#__PURE__*/React__default["default"].createRef();
|
|
21926
|
+
nestedDropdownsRef.current.push(nestedRef);
|
|
21927
|
+
return type === 'divider' && /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
21928
|
+
key: id ?? `divider-${index}`
|
|
21929
|
+
}) || subItems && /*#__PURE__*/React__default["default"].createElement(NestListItem, _extends({
|
|
21930
|
+
icon: icon,
|
|
21931
|
+
label: label,
|
|
21932
|
+
click: listItemClickHandler(click, keepOpen),
|
|
21933
|
+
keepOpen: keepOpen,
|
|
21934
|
+
selected: selected,
|
|
21935
|
+
open: currentHover === id,
|
|
21936
|
+
key: id,
|
|
21937
|
+
customComponent: customComponent,
|
|
21938
|
+
disabled: itemDisabled,
|
|
21939
|
+
items: subItems,
|
|
21940
|
+
onMouseEnter: listItemMouseEnterHandler(id),
|
|
21941
|
+
selectedBackgroundColor: selectedBackgroundColor,
|
|
21942
|
+
itemIconSize: itemIconSize,
|
|
21943
|
+
itemTextSize: itemTextSize,
|
|
21944
|
+
itemPaddingBetween: itemPaddingBetween,
|
|
21945
|
+
dropdownListRef: nestedRef
|
|
21946
|
+
}, itemProps)) || /*#__PURE__*/React__default["default"].createElement(PopperListItem, _extends({
|
|
21947
|
+
icon: icon,
|
|
21948
|
+
label: label,
|
|
21949
|
+
click: listItemClickHandler(click, keepOpen),
|
|
21950
|
+
keepOpen: keepOpen,
|
|
21951
|
+
selected: selected,
|
|
21952
|
+
key: id,
|
|
21953
|
+
customComponent: customComponent,
|
|
21954
|
+
disabled: itemDisabled,
|
|
21955
|
+
onMouseEnter: listItemMouseEnterHandler(id),
|
|
21956
|
+
selectedBackgroundColor: selectedBackgroundColor,
|
|
21957
|
+
itemIconSize: itemIconSize,
|
|
21958
|
+
itemTextSize: itemTextSize,
|
|
21959
|
+
itemPaddingBetween: itemPaddingBetween
|
|
21960
|
+
}, itemProps));
|
|
21961
|
+
});
|
|
21962
|
+
}
|
|
21963
|
+
|
|
21964
|
+
return null;
|
|
21965
|
+
}, [items, listItemClickHandler, currentHover, listItemMouseEnterHandler, selectedBackgroundColor, itemIconSize, itemTextSize, itemPaddingBetween]);
|
|
21872
21966
|
const popperListPreventDefaultHandler = React.useCallback(event => {
|
|
21873
21967
|
preventDefault && event.preventDefault();
|
|
21874
21968
|
}, [preventDefault]);
|
|
@@ -23418,81 +23512,6 @@ const SearchInput = /*#__PURE__*/React__default["default"].forwardRef(function S
|
|
|
23418
23512
|
})));
|
|
23419
23513
|
});
|
|
23420
23514
|
|
|
23421
|
-
var baseEach = _baseEach;
|
|
23422
|
-
|
|
23423
|
-
/**
|
|
23424
|
-
* The base implementation of `_.some` without support for iteratee shorthands.
|
|
23425
|
-
*
|
|
23426
|
-
* @private
|
|
23427
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
23428
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
23429
|
-
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
23430
|
-
* else `false`.
|
|
23431
|
-
*/
|
|
23432
|
-
function baseSome$1(collection, predicate) {
|
|
23433
|
-
var result;
|
|
23434
|
-
|
|
23435
|
-
baseEach(collection, function(value, index, collection) {
|
|
23436
|
-
result = predicate(value, index, collection);
|
|
23437
|
-
return !result;
|
|
23438
|
-
});
|
|
23439
|
-
return !!result;
|
|
23440
|
-
}
|
|
23441
|
-
|
|
23442
|
-
var _baseSome = baseSome$1;
|
|
23443
|
-
|
|
23444
|
-
var arraySome = _arraySome,
|
|
23445
|
-
baseIteratee = _baseIteratee,
|
|
23446
|
-
baseSome = _baseSome,
|
|
23447
|
-
isArray = isArray_1,
|
|
23448
|
-
isIterateeCall = _isIterateeCall;
|
|
23449
|
-
|
|
23450
|
-
/**
|
|
23451
|
-
* Checks if `predicate` returns truthy for **any** element of `collection`.
|
|
23452
|
-
* Iteration is stopped once `predicate` returns truthy. The predicate is
|
|
23453
|
-
* invoked with three arguments: (value, index|key, collection).
|
|
23454
|
-
*
|
|
23455
|
-
* @static
|
|
23456
|
-
* @memberOf _
|
|
23457
|
-
* @since 0.1.0
|
|
23458
|
-
* @category Collection
|
|
23459
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
23460
|
-
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
23461
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
23462
|
-
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
23463
|
-
* else `false`.
|
|
23464
|
-
* @example
|
|
23465
|
-
*
|
|
23466
|
-
* _.some([null, 0, 'yes', false], Boolean);
|
|
23467
|
-
* // => true
|
|
23468
|
-
*
|
|
23469
|
-
* var users = [
|
|
23470
|
-
* { 'user': 'barney', 'active': true },
|
|
23471
|
-
* { 'user': 'fred', 'active': false }
|
|
23472
|
-
* ];
|
|
23473
|
-
*
|
|
23474
|
-
* // The `_.matches` iteratee shorthand.
|
|
23475
|
-
* _.some(users, { 'user': 'barney', 'active': false });
|
|
23476
|
-
* // => false
|
|
23477
|
-
*
|
|
23478
|
-
* // The `_.matchesProperty` iteratee shorthand.
|
|
23479
|
-
* _.some(users, ['active', false]);
|
|
23480
|
-
* // => true
|
|
23481
|
-
*
|
|
23482
|
-
* // The `_.property` iteratee shorthand.
|
|
23483
|
-
* _.some(users, 'active');
|
|
23484
|
-
* // => true
|
|
23485
|
-
*/
|
|
23486
|
-
function some(collection, predicate, guard) {
|
|
23487
|
-
var func = isArray(collection) ? arraySome : baseSome;
|
|
23488
|
-
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
23489
|
-
predicate = undefined;
|
|
23490
|
-
}
|
|
23491
|
-
return func(collection, baseIteratee(predicate));
|
|
23492
|
-
}
|
|
23493
|
-
|
|
23494
|
-
var some_1 = some;
|
|
23495
|
-
|
|
23496
23515
|
const Label = styled__default["default"](Text).withConfig({
|
|
23497
23516
|
displayName: "Select__Label",
|
|
23498
23517
|
componentId: "sc-1l1iaf2-0"
|
package/package.json
CHANGED