@luminati-io/uikit 1.7.2 → 1.7.3
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/uikit.umd.js +482 -211
- package/dist/uikit.umd.js.map +1 -1
- package/dist/uikit.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/uikit.umd.js
CHANGED
|
@@ -5882,7 +5882,7 @@ var Badge = function Badge(props) {
|
|
|
5882
5882
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(BadgeWrapper, {
|
|
5883
5883
|
$shape: shape,
|
|
5884
5884
|
$color: bgColor,
|
|
5885
|
-
iconPlacement:
|
|
5885
|
+
flex_direction: iconPlacement == 'right' ? 'row-reverse' : 'row'
|
|
5886
5886
|
}, icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
|
5887
5887
|
name: icon,
|
|
5888
5888
|
size: "xxs",
|
|
@@ -5905,10 +5905,7 @@ Badge.propTypes = {
|
|
|
5905
5905
|
var BadgeWrapper = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Flex).attrs({
|
|
5906
5906
|
gap: _theme__WEBPACK_IMPORTED_MODULE_7__["default"].spacing["01"],
|
|
5907
5907
|
align_items: 'center',
|
|
5908
|
-
padding: "".concat(_theme__WEBPACK_IMPORTED_MODULE_7__["default"].spacing["02"])
|
|
5909
|
-
flex_direction: function flex_direction(props) {
|
|
5910
|
-
return props.iconPlacement == 'right' ? 'row-reverse' : 'row';
|
|
5911
|
-
}
|
|
5908
|
+
padding: "".concat(_theme__WEBPACK_IMPORTED_MODULE_7__["default"].spacing["02"])
|
|
5912
5909
|
}).withConfig({
|
|
5913
5910
|
displayName: "BadgeWrapper",
|
|
5914
5911
|
componentId: "sc-1fckq03-0"
|
|
@@ -6684,16 +6681,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6684
6681
|
/* harmony export */ });
|
|
6685
6682
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6686
6683
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6687
|
-
/* harmony import */ var
|
|
6684
|
+
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-popper */ "./node_modules/react-popper/lib/esm/usePopper.js");
|
|
6688
6685
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
6689
6686
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
6690
6687
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
|
|
6691
6688
|
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/hoc/util.js");
|
|
6689
|
+
/* harmony import */ var _with_portal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./with_portal */ "./src/hoc/with_portal.js");
|
|
6692
6690
|
// LICENSE_CODE ZON
|
|
6693
6691
|
|
|
6694
6692
|
|
|
6695
6693
|
/*jslint react:true*/
|
|
6696
|
-
var _excluded = ["popoverProps", "onOpenChange"]
|
|
6694
|
+
var _excluded = ["popoverProps", "onOpenChange"],
|
|
6695
|
+
_excluded2 = ["portalTarget"];
|
|
6697
6696
|
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); }
|
|
6698
6697
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6699
6698
|
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."); }
|
|
@@ -6708,12 +6707,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
6708
6707
|
|
|
6709
6708
|
|
|
6710
6709
|
|
|
6711
|
-
|
|
6710
|
+
|
|
6711
|
+
var withPopover = function withPopover(Comp, PopoverComp) {
|
|
6712
|
+
var popoverOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6712
6713
|
var WithPopover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
|
6713
|
-
var popoverProps = props.popoverProps,
|
|
6714
|
+
var _props$popoverProps = props.popoverProps,
|
|
6715
|
+
popoverProps = _props$popoverProps === void 0 ? {} : _props$popoverProps,
|
|
6714
6716
|
onOpenChange = props.onOpenChange,
|
|
6715
6717
|
compProps = _objectWithoutProperties(props, _excluded);
|
|
6716
|
-
var
|
|
6718
|
+
var portalTarget = popoverProps.portalTarget,
|
|
6719
|
+
restPopoverProps = _objectWithoutProperties(popoverProps, _excluded2);
|
|
6720
|
+
var placement = popoverOptions.placement,
|
|
6721
|
+
wrapperClassName = popoverOptions.wrapperClassName,
|
|
6722
|
+
wrapperStyle = popoverOptions.wrapperStyle;
|
|
6717
6723
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
6718
6724
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6719
6725
|
referenceElement = _useState2[0],
|
|
@@ -6737,7 +6743,7 @@ var withPopover = function withPopover(Comp, PopoverComp, popoverOptions) {
|
|
|
6737
6743
|
return !v;
|
|
6738
6744
|
});
|
|
6739
6745
|
}, []);
|
|
6740
|
-
var _usePopper = (0,
|
|
6746
|
+
var _usePopper = (0,react_popper__WEBPACK_IMPORTED_MODULE_5__.usePopper)(referenceElement, popperElement, {
|
|
6741
6747
|
placement: placement,
|
|
6742
6748
|
modifiers: [{
|
|
6743
6749
|
name: 'offset',
|
|
@@ -6763,29 +6769,44 @@ var withPopover = function withPopover(Comp, PopoverComp, popoverOptions) {
|
|
|
6763
6769
|
}, [popoverVisible, hidePopover]);
|
|
6764
6770
|
(0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useOutsideClick)([referenceElement, popperElement], hideAndStopEvt);
|
|
6765
6771
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RefCompContainer, {
|
|
6766
|
-
ref: setReferenceElement
|
|
6772
|
+
ref: setReferenceElement,
|
|
6773
|
+
className: wrapperClassName,
|
|
6774
|
+
style: wrapperStyle
|
|
6767
6775
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({
|
|
6768
6776
|
ref: ref
|
|
6769
6777
|
}, compProps, {
|
|
6770
6778
|
popover: popoverApi
|
|
6771
|
-
}))), popoverVisible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverContainer,
|
|
6779
|
+
}))), popoverVisible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverContainer, {
|
|
6772
6780
|
ref: setPopperElement,
|
|
6773
|
-
style: styles.popper
|
|
6774
|
-
|
|
6775
|
-
visible: popoverVisible
|
|
6776
|
-
|
|
6781
|
+
style: styles.popper,
|
|
6782
|
+
attributes: attributes.popper,
|
|
6783
|
+
visible: popoverVisible,
|
|
6784
|
+
portalTarget: portalTarget
|
|
6785
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverComp, _extends({}, restPopoverProps, {
|
|
6777
6786
|
popover: popoverApi
|
|
6778
6787
|
}))));
|
|
6779
6788
|
});
|
|
6780
6789
|
WithPopover.displayName = "WithPopover(".concat((0,_util__WEBPACK_IMPORTED_MODULE_3__.getDisplayName)(Comp), ")");
|
|
6781
6790
|
return WithPopover;
|
|
6782
6791
|
};
|
|
6792
|
+
var PopoverContainer = (0,_with_portal__WEBPACK_IMPORTED_MODULE_4__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function _PopoverContainer(props, ref) {
|
|
6793
|
+
var style = props.style,
|
|
6794
|
+
children = props.children,
|
|
6795
|
+
attributes = props.attributes,
|
|
6796
|
+
visible = props.visible;
|
|
6797
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledPopoverContainer, _extends({
|
|
6798
|
+
ref: ref,
|
|
6799
|
+
style: style
|
|
6800
|
+
}, attributes, {
|
|
6801
|
+
visible: visible
|
|
6802
|
+
}), children);
|
|
6803
|
+
}));
|
|
6783
6804
|
var RefCompContainer = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
|
6784
6805
|
displayName: "RefCompContainer",
|
|
6785
6806
|
componentId: "sc-1hvrlux-0"
|
|
6786
6807
|
})(["width:fit-content;"]);
|
|
6787
|
-
var
|
|
6788
|
-
displayName: "
|
|
6808
|
+
var StyledPopoverContainer = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(RefCompContainer).withConfig({
|
|
6809
|
+
displayName: "StyledPopoverContainer",
|
|
6789
6810
|
componentId: "sc-1hvrlux-1"
|
|
6790
6811
|
})(["z-index:1000;visibility:", ";"], function (props) {
|
|
6791
6812
|
return props.visible ? 'visible' : 'hidden';
|
|
@@ -6807,6 +6828,49 @@ var useStateWithCallback = function useStateWithCallback(initialValue, callback)
|
|
|
6807
6828
|
|
|
6808
6829
|
/***/ }),
|
|
6809
6830
|
|
|
6831
|
+
/***/ "./src/hoc/with_portal.js":
|
|
6832
|
+
/*!********************************!*\
|
|
6833
|
+
!*** ./src/hoc/with_portal.js ***!
|
|
6834
|
+
\********************************/
|
|
6835
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6836
|
+
|
|
6837
|
+
"use strict";
|
|
6838
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6839
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6840
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6841
|
+
/* harmony export */ });
|
|
6842
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6843
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6844
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom");
|
|
6845
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
6846
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./src/hoc/util.js");
|
|
6847
|
+
// LICENSE_CODE ZON
|
|
6848
|
+
|
|
6849
|
+
|
|
6850
|
+
/*jslint react:true*/
|
|
6851
|
+
var _excluded = ["portalTarget"];
|
|
6852
|
+
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); }
|
|
6853
|
+
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; }
|
|
6854
|
+
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; }
|
|
6855
|
+
|
|
6856
|
+
|
|
6857
|
+
|
|
6858
|
+
var withPortal = function withPortal(Comp) {
|
|
6859
|
+
var WithPortal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
|
6860
|
+
var portalTarget = props.portalTarget,
|
|
6861
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
6862
|
+
var comp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({
|
|
6863
|
+
ref: ref
|
|
6864
|
+
}, rest));
|
|
6865
|
+
return portalTarget ? /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_1___default().createPortal(comp, portalTarget) : comp;
|
|
6866
|
+
});
|
|
6867
|
+
WithPortal.displayName = "WithPortal(".concat((0,_util__WEBPACK_IMPORTED_MODULE_2__.getDisplayName)(Comp), ")");
|
|
6868
|
+
return WithPortal;
|
|
6869
|
+
};
|
|
6870
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (withPortal);
|
|
6871
|
+
|
|
6872
|
+
/***/ }),
|
|
6873
|
+
|
|
6810
6874
|
/***/ "./src/hooks/index.js":
|
|
6811
6875
|
/*!****************************!*\
|
|
6812
6876
|
!*** ./src/hooks/index.js ***!
|
|
@@ -7606,28 +7670,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7606
7670
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7607
7671
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7608
7672
|
/* harmony export */ });
|
|
7609
|
-
/* harmony import */ var
|
|
7610
|
-
/* harmony import */ var
|
|
7611
|
-
/* harmony import */ var
|
|
7612
|
-
/* harmony import */ var
|
|
7613
|
-
/* harmony import */ var
|
|
7614
|
-
/* harmony import */ var
|
|
7615
|
-
/* harmony import */ var
|
|
7616
|
-
/* harmony import */ var
|
|
7617
|
-
/* harmony import */ var
|
|
7618
|
-
/* harmony import */ var
|
|
7619
|
-
/* harmony import */ var
|
|
7620
|
-
/* harmony import */ var
|
|
7621
|
-
/* harmony import */ var
|
|
7622
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
|
7623
|
-
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
|
|
7673
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7674
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7675
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
|
7676
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
7677
|
+
/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-select */ "./node_modules/react-select/dist/react-select.esm.js");
|
|
7678
|
+
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
|
|
7679
|
+
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../menu */ "./src/menu/index.js");
|
|
7680
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
|
7681
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared */ "./src/input/shared.js");
|
|
7682
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
|
|
7683
|
+
/* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../translation */ "./src/translation.js");
|
|
7684
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
|
7685
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
|
|
7624
7686
|
// LICENSE_CODE ZON
|
|
7625
7687
|
|
|
7626
7688
|
|
|
7627
7689
|
/*jslint react:true*/
|
|
7628
7690
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
7629
|
-
|
|
7630
|
-
var _excluded = ["label", "labelIcon", "required", "size", "value", "defaultValue", "placeholder", "options", "onChange", "onFocus", "onBlur", "multiselect", "creatable", "clearable", "disabled", "invalid", "helperText", "classNamePrefix", "menuPortalTarget"];
|
|
7691
|
+
var _excluded = ["label", "labelIcon", "required", "size", "value", "defaultValue", "placeholder", "options", "onChange", "onFocus", "onBlur", "multiselect", "creatable", "clearable", "disabled", "invalid", "helperText", "classNamePrefix", "menuPortalTarget", "filterOption"];
|
|
7631
7692
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7632
7693
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7633
7694
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -7647,14 +7708,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
7647
7708
|
|
|
7648
7709
|
|
|
7649
7710
|
|
|
7650
|
-
var Item =
|
|
7651
|
-
var
|
|
7652
|
-
displayName: "_StyledItem",
|
|
7653
|
-
componentId: "sc-1clfzmr-0"
|
|
7654
|
-
})(["", ""], function (p) {
|
|
7655
|
-
return p.$_css;
|
|
7656
|
-
});
|
|
7657
|
-
var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
|
|
7711
|
+
var Item = _menu__WEBPACK_IMPORTED_MODULE_3__.Menu.Item;
|
|
7712
|
+
var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
|
7658
7713
|
var label = props.label,
|
|
7659
7714
|
labelIcon = props.labelIcon,
|
|
7660
7715
|
required = props.required,
|
|
@@ -7674,23 +7729,25 @@ var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
|
7674
7729
|
helperText = props.helperText,
|
|
7675
7730
|
classNamePrefix = props.classNamePrefix,
|
|
7676
7731
|
menuPortalTarget = props.menuPortalTarget,
|
|
7732
|
+
filterOption = props.filterOption,
|
|
7677
7733
|
rest = _objectWithoutProperties(props, _excluded);
|
|
7678
|
-
var labelId = (0,
|
|
7679
|
-
var t = (0,
|
|
7734
|
+
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_6__.useLabelId)(props.id);
|
|
7735
|
+
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_7__.useTranslation)();
|
|
7680
7736
|
var styles = useCustomStyles(size);
|
|
7681
|
-
var SelectComp = creatable ?
|
|
7682
|
-
return /*#__PURE__*/
|
|
7737
|
+
var SelectComp = creatable ? react_select__WEBPACK_IMPORTED_MODULE_10__["default"].Creatable : react_select__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
7738
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, _extends({
|
|
7683
7739
|
ref: ref,
|
|
7684
7740
|
"data-testid": "dropdown"
|
|
7685
7741
|
}, rest, {
|
|
7686
7742
|
flex_direction: "column",
|
|
7687
|
-
gap:
|
|
7688
|
-
}), /*#__PURE__*/
|
|
7743
|
+
gap: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"]
|
|
7744
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_5__.InputLabel, {
|
|
7689
7745
|
id: labelId,
|
|
7690
7746
|
label: label,
|
|
7691
7747
|
labelIcon: labelIcon,
|
|
7692
7748
|
required: required
|
|
7693
|
-
}), /*#__PURE__*/
|
|
7749
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectComp, {
|
|
7750
|
+
filterOption: filterOption,
|
|
7694
7751
|
"aria-labelledby": label ? labelId : undefined,
|
|
7695
7752
|
"aria-invalid": invalid,
|
|
7696
7753
|
value: value,
|
|
@@ -7714,31 +7771,36 @@ var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
|
7714
7771
|
Option: Option
|
|
7715
7772
|
},
|
|
7716
7773
|
classNamePrefix: classNamePrefix,
|
|
7717
|
-
menuPortalTarget: menuPortalTarget
|
|
7718
|
-
|
|
7774
|
+
menuPortalTarget: menuPortalTarget,
|
|
7775
|
+
isOptionDisabled: function isOptionDisabled(opt) {
|
|
7776
|
+
return opt.disabled;
|
|
7777
|
+
},
|
|
7778
|
+
closeMenuOnSelect: !multiselect
|
|
7779
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_5__.HelperText, {
|
|
7719
7780
|
invalid: invalid
|
|
7720
7781
|
}, helperText));
|
|
7721
7782
|
});
|
|
7722
7783
|
Dropdown.displayName = 'Dropdown';
|
|
7723
7784
|
Dropdown.propTypes = {
|
|
7724
|
-
value: (
|
|
7725
|
-
defaultValue: (
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7785
|
+
value: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any),
|
|
7786
|
+
defaultValue: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any),
|
|
7787
|
+
filterOption: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
|
7788
|
+
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
|
7789
|
+
onFocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
|
7790
|
+
onBlur: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
|
7791
|
+
placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
7792
|
+
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7793
|
+
required: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7794
|
+
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7795
|
+
label: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
|
7796
|
+
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
7797
|
+
helperText: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
|
7798
|
+
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
|
|
7799
|
+
options: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().any)).isRequired,
|
|
7800
|
+
multiselect: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7801
|
+
clearable: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7802
|
+
creatable: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
7803
|
+
classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
7742
7804
|
};
|
|
7743
7805
|
Dropdown.defaultProps = {
|
|
7744
7806
|
size: 'sm',
|
|
@@ -7749,17 +7811,17 @@ var DropdownIndicator = function DropdownIndicator(props) {
|
|
|
7749
7811
|
innerRef = props.innerRef,
|
|
7750
7812
|
innerProps = props.innerProps,
|
|
7751
7813
|
isDisabled = props.isDisabled;
|
|
7752
|
-
var ic =
|
|
7753
|
-
return /*#__PURE__*/
|
|
7814
|
+
var ic = _icons__WEBPACK_IMPORTED_MODULE_9__["default"][selectProps.menuIsOpen ? 'ChevronUp' : 'ChevronDown'];
|
|
7815
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
7754
7816
|
ref: innerRef,
|
|
7755
7817
|
width: "18px",
|
|
7756
7818
|
height: "18px",
|
|
7757
7819
|
viewBox: ic.viewBox,
|
|
7758
7820
|
style: {
|
|
7759
|
-
color:
|
|
7821
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_9,
|
|
7760
7822
|
cursor: isDisabled ? 'default' : 'pointer'
|
|
7761
7823
|
}
|
|
7762
|
-
}, innerProps), /*#__PURE__*/
|
|
7824
|
+
}, innerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
|
|
7763
7825
|
href: "#".concat(ic.id)
|
|
7764
7826
|
}));
|
|
7765
7827
|
};
|
|
@@ -7767,17 +7829,17 @@ DropdownIndicator.displayName = 'DropdownIndicator';
|
|
|
7767
7829
|
var ClearIndicator = function ClearIndicator(props) {
|
|
7768
7830
|
var innerRef = props.innerRef,
|
|
7769
7831
|
innerProps = props.innerProps;
|
|
7770
|
-
var ic =
|
|
7771
|
-
return /*#__PURE__*/
|
|
7832
|
+
var ic = _icons__WEBPACK_IMPORTED_MODULE_9__["default"].CloseSmall;
|
|
7833
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
7772
7834
|
ref: innerRef,
|
|
7773
7835
|
width: "18px",
|
|
7774
7836
|
height: "18px",
|
|
7775
7837
|
viewBox: ic.viewBox,
|
|
7776
7838
|
style: {
|
|
7777
|
-
color:
|
|
7839
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_9,
|
|
7778
7840
|
cursor: 'pointer'
|
|
7779
7841
|
}
|
|
7780
|
-
}, innerProps), /*#__PURE__*/
|
|
7842
|
+
}, innerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
|
|
7781
7843
|
href: "#".concat(ic.id)
|
|
7782
7844
|
}));
|
|
7783
7845
|
};
|
|
@@ -7786,13 +7848,12 @@ var Option = function Option(props) {
|
|
|
7786
7848
|
var data = props.data,
|
|
7787
7849
|
className = props.className,
|
|
7788
7850
|
cx = props.cx,
|
|
7789
|
-
getStyles = props.getStyles,
|
|
7790
7851
|
isDisabled = props.isDisabled,
|
|
7791
7852
|
isFocused = props.isFocused,
|
|
7792
7853
|
isSelected = props.isSelected,
|
|
7793
7854
|
innerRef = props.innerRef,
|
|
7794
7855
|
innerProps = props.innerProps;
|
|
7795
|
-
return /*#__PURE__*/
|
|
7856
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Item, _extends({
|
|
7796
7857
|
ref: innerRef,
|
|
7797
7858
|
className: cx({
|
|
7798
7859
|
option: true,
|
|
@@ -7802,13 +7863,14 @@ var Option = function Option(props) {
|
|
|
7802
7863
|
}, className)
|
|
7803
7864
|
}, innerProps, {
|
|
7804
7865
|
text: data.label,
|
|
7805
|
-
|
|
7806
|
-
|
|
7866
|
+
disabled: isDisabled,
|
|
7867
|
+
selected: isSelected,
|
|
7868
|
+
tag: "div"
|
|
7807
7869
|
}));
|
|
7808
7870
|
};
|
|
7809
7871
|
Option.displayName = 'Option';
|
|
7810
7872
|
var useCustomStyles = function useCustomStyles(size) {
|
|
7811
|
-
return (0,
|
|
7873
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
7812
7874
|
return {
|
|
7813
7875
|
control: function control(baseStyles, state) {
|
|
7814
7876
|
var height = {
|
|
@@ -7816,25 +7878,25 @@ var useCustomStyles = function useCustomStyles(size) {
|
|
|
7816
7878
|
md: 40,
|
|
7817
7879
|
lg: 48
|
|
7818
7880
|
};
|
|
7819
|
-
var borderColor =
|
|
7820
|
-
var color =
|
|
7821
|
-
var backgroundColor =
|
|
7881
|
+
var borderColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_7;
|
|
7882
|
+
var color = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_11_50;
|
|
7883
|
+
var backgroundColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.white;
|
|
7822
7884
|
var cursor = 'text';
|
|
7823
7885
|
if (state.isDisabled) {
|
|
7824
|
-
color =
|
|
7825
|
-
borderColor =
|
|
7826
|
-
backgroundColor =
|
|
7886
|
+
color = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_9;
|
|
7887
|
+
borderColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_6;
|
|
7888
|
+
backgroundColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_2;
|
|
7827
7889
|
cursor = 'default';
|
|
7828
|
-
} else if (state.selectProps['aria-invalid']) borderColor =
|
|
7890
|
+
} else if (state.selectProps['aria-invalid']) borderColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.red_11;else if (state.isFocused) borderColor = _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.blue_11;
|
|
7829
7891
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7830
|
-
minHeight: (0,
|
|
7831
|
-
padding: "".concat(
|
|
7892
|
+
minHeight: (0,_utils__WEBPACK_IMPORTED_MODULE_8__.toPixel)(height[size] || height.sm),
|
|
7893
|
+
padding: "".concat(_shared__WEBPACK_IMPORTED_MODULE_5__.inputVerticalPadding, "px ").concat(_shared__WEBPACK_IMPORTED_MODULE_5__.inputHorizontalPadding, "px"),
|
|
7832
7894
|
/* Label/sm */
|
|
7833
|
-
fontFamily:
|
|
7895
|
+
fontFamily: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_family.sans,
|
|
7834
7896
|
fontStyle: 'normal',
|
|
7835
|
-
fontWeight:
|
|
7836
|
-
fontSize:
|
|
7837
|
-
lineHeight:
|
|
7897
|
+
fontWeight: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_weight.regular,
|
|
7898
|
+
fontSize: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_size.sm,
|
|
7899
|
+
lineHeight: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].line_height.none,
|
|
7838
7900
|
color: color,
|
|
7839
7901
|
backgroundColor: backgroundColor,
|
|
7840
7902
|
borderColor: borderColor,
|
|
@@ -7849,38 +7911,68 @@ var useCustomStyles = function useCustomStyles(size) {
|
|
|
7849
7911
|
},
|
|
7850
7912
|
placeholder: function placeholder(baseStyles) {
|
|
7851
7913
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7852
|
-
color:
|
|
7914
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_11
|
|
7853
7915
|
});
|
|
7854
7916
|
},
|
|
7855
7917
|
indicatorsContainer: function indicatorsContainer(baseStyles) {
|
|
7856
7918
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7857
|
-
gap:
|
|
7919
|
+
gap: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["03"],
|
|
7858
7920
|
height: '24px'
|
|
7859
7921
|
});
|
|
7860
7922
|
},
|
|
7861
7923
|
menu: function menu(baseStyles) {
|
|
7862
7924
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7863
|
-
margin:
|
|
7864
|
-
padding:
|
|
7925
|
+
margin: "".concat(_theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["03"], " 0 0 0"),
|
|
7926
|
+
padding: "".concat(_theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"], " 0"),
|
|
7865
7927
|
boxSizing: 'border-box',
|
|
7866
7928
|
minWidth: '168px',
|
|
7867
7929
|
maxWidth: '540px',
|
|
7868
|
-
background:
|
|
7869
|
-
borderRadius:
|
|
7870
|
-
boxShadow:
|
|
7930
|
+
background: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.white,
|
|
7931
|
+
borderRadius: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"],
|
|
7932
|
+
boxShadow: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].box_shadow.md
|
|
7871
7933
|
});
|
|
7872
7934
|
},
|
|
7873
7935
|
menuList: function menuList(baseStyles) {
|
|
7874
7936
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7875
7937
|
display: 'flex',
|
|
7876
7938
|
flexDirection: 'column',
|
|
7877
|
-
gap:
|
|
7939
|
+
gap: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["01"]
|
|
7878
7940
|
});
|
|
7879
7941
|
},
|
|
7880
7942
|
menuPortal: function menuPortal(baseStyles) {
|
|
7881
7943
|
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7882
7944
|
zIndex: 99999
|
|
7883
7945
|
});
|
|
7946
|
+
},
|
|
7947
|
+
multiValue: function multiValue(baseStyles) {
|
|
7948
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7949
|
+
backgroundColor: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_3,
|
|
7950
|
+
borderRadius: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"]
|
|
7951
|
+
});
|
|
7952
|
+
},
|
|
7953
|
+
multiValueLabel: function multiValueLabel(baseStyles) {
|
|
7954
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7955
|
+
/* Label/sm */
|
|
7956
|
+
fontFamily: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_family.sans,
|
|
7957
|
+
fontStyle: 'normal',
|
|
7958
|
+
fontWeight: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_weight.regular,
|
|
7959
|
+
fontSize: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].font_size.sm,
|
|
7960
|
+
lineHeight: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].line_height.none,
|
|
7961
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_11_25,
|
|
7962
|
+
paddingLeft: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"],
|
|
7963
|
+
paddingRight: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["00"]
|
|
7964
|
+
});
|
|
7965
|
+
},
|
|
7966
|
+
multiValueRemove: function multiValueRemove(baseStyles) {
|
|
7967
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
|
7968
|
+
borderRadius: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["02"],
|
|
7969
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_11,
|
|
7970
|
+
cursor: 'pointer',
|
|
7971
|
+
':hover': {
|
|
7972
|
+
backgroundColor: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_3,
|
|
7973
|
+
color: _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_11_50
|
|
7974
|
+
}
|
|
7975
|
+
});
|
|
7884
7976
|
}
|
|
7885
7977
|
};
|
|
7886
7978
|
}, [size]);
|
|
@@ -8869,20 +8961,44 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8869
8961
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8870
8962
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8871
8963
|
/* harmony export */ });
|
|
8872
|
-
/* harmony import */ var
|
|
8873
|
-
/* harmony import */ var
|
|
8874
|
-
/* harmony import */ var
|
|
8875
|
-
/* harmony import */ var
|
|
8876
|
-
/* harmony import */ var
|
|
8964
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8965
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8966
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
8967
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
8968
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types");
|
|
8969
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
8970
|
+
/* harmony import */ var _box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./box */ "./src/layout/box.js");
|
|
8877
8971
|
// LICENSE_CODE ZON
|
|
8878
8972
|
|
|
8879
8973
|
|
|
8880
8974
|
/*jslint react:true*/
|
|
8975
|
+
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); }
|
|
8881
8976
|
|
|
8882
8977
|
|
|
8883
8978
|
|
|
8884
|
-
|
|
8885
|
-
|
|
8979
|
+
|
|
8980
|
+
var Flex = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function _Flex(props, ref) {
|
|
8981
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledFlex, _extends({
|
|
8982
|
+
ref: ref
|
|
8983
|
+
}, props));
|
|
8984
|
+
});
|
|
8985
|
+
Flex.defaultProps = {
|
|
8986
|
+
flex_direction: 'row'
|
|
8987
|
+
};
|
|
8988
|
+
Flex.propTypes = {
|
|
8989
|
+
inline: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
|
|
8990
|
+
align_items: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['stretch', 'flex-start', 'flex-end', 'center', 'baseline', 'start', 'end', 'self-start', 'self-end']),
|
|
8991
|
+
align_content: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['normal', 'stretch', 'flex-start', 'flex-end', 'center', 'start', 'end', 'space-between', 'space-around', 'space-evenly', 'baseline']),
|
|
8992
|
+
justify_items: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8993
|
+
justify_content: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']),
|
|
8994
|
+
flex_wrap: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['nowrap', 'wrap', 'wrap-reverse']),
|
|
8995
|
+
flex_direction: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['row', 'row-reverse', 'column', 'column-reverse']),
|
|
8996
|
+
gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8997
|
+
row_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8998
|
+
column_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
|
|
8999
|
+
};
|
|
9000
|
+
var StyledFlex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_box__WEBPACK_IMPORTED_MODULE_3__["default"]).withConfig({
|
|
9001
|
+
displayName: "StyledFlex",
|
|
8886
9002
|
componentId: "sc-2aqm31-0"
|
|
8887
9003
|
})(["display:", ";align-items:", ";align-content:", ";justify-items:", ";justify-content:", ";flex-wrap:", ";flex-direction:", ";gap:", ";row-gap:", ";column-gap:", ";"], function (props) {
|
|
8888
9004
|
return props.inline ? 'inline-flex' : 'flex';
|
|
@@ -8905,21 +9021,6 @@ var Flex = styled_components__WEBPACK_IMPORTED_MODULE_0___default()(_box__WEBPAC
|
|
|
8905
9021
|
}, function (props) {
|
|
8906
9022
|
return props.column_gap;
|
|
8907
9023
|
});
|
|
8908
|
-
Flex.defaultProps = {
|
|
8909
|
-
flex_direction: 'row'
|
|
8910
|
-
};
|
|
8911
|
-
Flex.propTypes = {
|
|
8912
|
-
inline: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
|
8913
|
-
align_items: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['flex-start', 'center']),
|
|
8914
|
-
align_content: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8915
|
-
justify_items: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8916
|
-
justify_content: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8917
|
-
flex_wrap: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8918
|
-
flex_direction: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['row', 'row-reverse', 'column', 'column-reverse']),
|
|
8919
|
-
gap: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8920
|
-
row_gap: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8921
|
-
column_gap: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
8922
|
-
};
|
|
8923
9024
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Flex);
|
|
8924
9025
|
|
|
8925
9026
|
/***/ }),
|
|
@@ -9084,12 +9185,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9084
9185
|
/* harmony export */ "Menu": () => (/* reexport safe */ _menu__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
9085
9186
|
/* harmony export */ });
|
|
9086
9187
|
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menu */ "./src/menu/menu.js");
|
|
9188
|
+
/* harmony import */ var _menu_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./menu_item */ "./src/menu/menu_item.js");
|
|
9087
9189
|
// LICENSE_CODE ZON
|
|
9088
9190
|
|
|
9089
9191
|
|
|
9090
9192
|
/*jslint react:true*/
|
|
9091
9193
|
|
|
9092
9194
|
|
|
9195
|
+
_menu__WEBPACK_IMPORTED_MODULE_0__["default"].Item = _menu_item__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
9196
|
+
|
|
9093
9197
|
|
|
9094
9198
|
/***/ }),
|
|
9095
9199
|
|
|
@@ -9106,22 +9210,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9106
9210
|
/* harmony export */ });
|
|
9107
9211
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9108
9212
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9109
|
-
/* harmony import */ var
|
|
9110
|
-
/* harmony import */ var
|
|
9111
|
-
/* harmony import */ var
|
|
9112
|
-
/* harmony import */ var
|
|
9113
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
|
9114
|
-
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
|
9115
|
-
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
|
|
9116
|
-
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
|
9213
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
|
9214
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
9215
|
+
/* harmony import */ var _menu_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./menu_item */ "./src/menu/menu_item.js");
|
|
9216
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
|
|
9117
9217
|
// LICENSE_CODE ZON
|
|
9118
9218
|
|
|
9119
9219
|
|
|
9120
9220
|
/*jslint react:true*/
|
|
9121
|
-
var _excluded = ["items", "size"]
|
|
9122
|
-
_excluded2 = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag"],
|
|
9123
|
-
_excluded3 = ["isLeft"],
|
|
9124
|
-
_excluded4 = ["text", "size", "children"];
|
|
9221
|
+
var _excluded = ["items", "size"];
|
|
9125
9222
|
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); }
|
|
9126
9223
|
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; }
|
|
9127
9224
|
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; }
|
|
@@ -9129,21 +9226,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
9129
9226
|
|
|
9130
9227
|
|
|
9131
9228
|
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
var Label = _typography__WEBPACK_IMPORTED_MODULE_4__["default"].Label;
|
|
9136
9229
|
var Menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
|
9137
9230
|
var items = props.items,
|
|
9138
9231
|
size = props.size,
|
|
9139
9232
|
rest = _objectWithoutProperties(props, _excluded);
|
|
9140
9233
|
if (!items || !items.length) return null;
|
|
9141
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuContainer, _extends({
|
|
9234
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.MenuContainer, _extends({
|
|
9142
9235
|
ref: ref
|
|
9143
9236
|
}, rest, {
|
|
9144
9237
|
role: "menu",
|
|
9145
9238
|
"data-testid": "menu"
|
|
9146
|
-
}), buildMenuItems(items, {
|
|
9239
|
+
}), (0,_menu_item__WEBPACK_IMPORTED_MODULE_2__.buildMenuItems)(items, {
|
|
9147
9240
|
size: size
|
|
9148
9241
|
}));
|
|
9149
9242
|
});
|
|
@@ -9152,15 +9245,60 @@ Menu.defaultProps = {
|
|
|
9152
9245
|
size: 'md'
|
|
9153
9246
|
};
|
|
9154
9247
|
Menu.propTypes = {
|
|
9155
|
-
size:
|
|
9156
|
-
items:
|
|
9248
|
+
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md']),
|
|
9249
|
+
items: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().any)).isRequired
|
|
9157
9250
|
};
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9251
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Menu);
|
|
9252
|
+
|
|
9253
|
+
/***/ }),
|
|
9254
|
+
|
|
9255
|
+
/***/ "./src/menu/menu_item.js":
|
|
9256
|
+
/*!*******************************!*\
|
|
9257
|
+
!*** ./src/menu/menu_item.js ***!
|
|
9258
|
+
\*******************************/
|
|
9259
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9260
|
+
|
|
9261
|
+
"use strict";
|
|
9262
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9263
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9264
|
+
/* harmony export */ "buildMenuItems": () => (/* binding */ buildMenuItems),
|
|
9265
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9266
|
+
/* harmony export */ });
|
|
9267
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9268
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9269
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
9270
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
9271
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types");
|
|
9272
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
|
9273
|
+
/* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
|
|
9274
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
|
9275
|
+
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
|
9276
|
+
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
|
|
9277
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
|
9278
|
+
/* harmony import */ var _menu_item_divider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./menu_item_divider */ "./src/menu/menu_item_divider.js");
|
|
9279
|
+
/* harmony import */ var _menu_item_group__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu_item_group */ "./src/menu/menu_item_group.js");
|
|
9280
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
|
|
9281
|
+
// LICENSE_CODE ZON
|
|
9282
|
+
|
|
9283
|
+
|
|
9284
|
+
/*jslint react:true*/
|
|
9285
|
+
var _excluded = ["type", "text", "secondaryText", "tertiaryText", "description", "size", "children", "variant", "tag", "disabled", "selected"],
|
|
9286
|
+
_excluded2 = ["isLeft"];
|
|
9287
|
+
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); }
|
|
9288
|
+
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; }
|
|
9289
|
+
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; }
|
|
9290
|
+
|
|
9291
|
+
|
|
9292
|
+
|
|
9293
|
+
|
|
9294
|
+
|
|
9295
|
+
|
|
9296
|
+
|
|
9297
|
+
|
|
9298
|
+
|
|
9299
|
+
|
|
9300
|
+
|
|
9301
|
+
var Label = _typography__WEBPACK_IMPORTED_MODULE_5__["default"].Label;
|
|
9164
9302
|
var MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
|
9165
9303
|
var type = props.type,
|
|
9166
9304
|
text = props.text,
|
|
@@ -9171,37 +9309,52 @@ var MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
|
|
|
9171
9309
|
children = props.children,
|
|
9172
9310
|
variant = props.variant,
|
|
9173
9311
|
tag = props.tag,
|
|
9174
|
-
|
|
9175
|
-
|
|
9312
|
+
disabled = props.disabled,
|
|
9313
|
+
selected = props.selected,
|
|
9314
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
9315
|
+
if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
9176
9316
|
ref: ref
|
|
9177
9317
|
});
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
}
|
|
9181
|
-
|
|
9182
|
-
|
|
9318
|
+
var subItems = Array.isArray(children) && children.length ? buildMenuItems(children, {
|
|
9319
|
+
size: size
|
|
9320
|
+
}) : undefined;
|
|
9321
|
+
if (type == 'group') {
|
|
9322
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu_item_group__WEBPACK_IMPORTED_MODULE_9__["default"], _extends({
|
|
9323
|
+
ref: ref
|
|
9324
|
+
}, props), subItems);
|
|
9325
|
+
}
|
|
9326
|
+
var _getIconProps = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.getIconProps)('MenuItem', props),
|
|
9183
9327
|
isLeft = _getIconProps.isLeft,
|
|
9184
|
-
iconProps = _objectWithoutProperties(_getIconProps,
|
|
9185
|
-
var iconColor = variant == 'negative' ? 'red_10' : 'gray_9';
|
|
9186
|
-
var labelColor = variant == 'negative' ? 'red_11' : 'gray_11_50';
|
|
9187
|
-
|
|
9328
|
+
iconProps = _objectWithoutProperties(_getIconProps, _excluded2);
|
|
9329
|
+
var iconColor = disabled ? 'gray_6' : variant == 'negative' ? 'red_10' : 'gray_9';
|
|
9330
|
+
var labelColor = disabled ? 'gray_9' : variant == 'negative' ? 'red_11' : 'gray_11_50';
|
|
9331
|
+
var Comp = subItems ? MenuItemPopover : MenuItemButton;
|
|
9332
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_10__.MenuItemContainer, {
|
|
9188
9333
|
ref: ref,
|
|
9189
9334
|
as: tag,
|
|
9190
9335
|
role: "menuitem"
|
|
9191
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
9336
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({}, rest, {
|
|
9337
|
+
"aria-disabled": !!disabled,
|
|
9192
9338
|
size: size,
|
|
9193
|
-
role: "button"
|
|
9194
|
-
|
|
9339
|
+
role: "button",
|
|
9340
|
+
popoverProps: {
|
|
9341
|
+
subItems: subItems
|
|
9342
|
+
}
|
|
9343
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemText, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_6__["default"], _extends({}, iconProps, {
|
|
9195
9344
|
color: iconColor
|
|
9196
9345
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Label, {
|
|
9197
9346
|
variant: "sm",
|
|
9198
9347
|
no_wrap: true,
|
|
9199
9348
|
color: labelColor
|
|
9200
|
-
}, text), !!
|
|
9349
|
+
}, text), !!subItems && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SecondaryIcon, {
|
|
9350
|
+
subMenu: true
|
|
9351
|
+
}), !subItems && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Label, {
|
|
9201
9352
|
variant: "sm",
|
|
9202
9353
|
no_wrap: true,
|
|
9203
9354
|
color: "gray_9"
|
|
9204
|
-
}, tertiaryText), !!secondaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SecondaryText, null, secondaryText),
|
|
9355
|
+
}, tertiaryText), !!secondaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SecondaryText, null, secondaryText), !secondaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SecondaryIcon, {
|
|
9356
|
+
selected: selected
|
|
9357
|
+
}))), !!description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Description, null, description)));
|
|
9205
9358
|
});
|
|
9206
9359
|
MenuItem.displayName = 'MenuItem';
|
|
9207
9360
|
MenuItem.defaultProps = {
|
|
@@ -9216,31 +9369,56 @@ MenuItem.propTypes = {
|
|
|
9216
9369
|
description: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
9217
9370
|
type: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['item', 'divider', 'group']),
|
|
9218
9371
|
size: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['sm', 'md']),
|
|
9219
|
-
icon: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(
|
|
9220
|
-
children: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(MenuItem),
|
|
9221
|
-
variant: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['default', 'negative'])
|
|
9372
|
+
icon: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_4__.iconNames),
|
|
9373
|
+
children: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape(MenuItem.propTypes)),
|
|
9374
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['default', 'negative']),
|
|
9375
|
+
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
|
|
9376
|
+
selected: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
|
|
9222
9377
|
};
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
return (
|
|
9233
|
-
|
|
9378
|
+
var MenuItemButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
|
9379
|
+
displayName: "MenuItemButton",
|
|
9380
|
+
componentId: "sc-vtiffr-0"
|
|
9381
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-decoration:none;background:0 none;border:0 none;padding:0 12px;box-sizing:border-box;width:100%;height:", ";gap:4px;cursor:", ";&:hover{background-color:", ";}&:hover,:visited,:focus{text-decoration:none;}&:active{background-color:", ";}"], function (props) {
|
|
9382
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.toPixel)(props.size == 'sm' ? 32 : 40);
|
|
9383
|
+
}, function (props) {
|
|
9384
|
+
return props['aria-disabled'] ? 'not-allowed' : 'pointer';
|
|
9385
|
+
}, _theme__WEBPACK_IMPORTED_MODULE_7__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_7__["default"].color.gray_4);
|
|
9386
|
+
var MenuItemPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_3__.withPopover)(function (props) {
|
|
9387
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemButton, _extends({}, props, {
|
|
9388
|
+
onClick: props.popover.toggle
|
|
9389
|
+
}));
|
|
9390
|
+
}, function (props) {
|
|
9391
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_10__.MenuContainer, {
|
|
9392
|
+
onClick: props.popover.hide
|
|
9393
|
+
}, props.subItems);
|
|
9394
|
+
}, {
|
|
9395
|
+
placement: 'right-start',
|
|
9396
|
+
wrapperStyle: {
|
|
9397
|
+
width: '100%'
|
|
9398
|
+
}
|
|
9399
|
+
});
|
|
9234
9400
|
var MenuItemText = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
|
9235
9401
|
displayName: "MenuItemText",
|
|
9236
|
-
componentId: "sc-
|
|
9237
|
-
})(["display:flex;align-items:center;justify-content:flex-start;width:100%;gap:8px;max-width:516px;
|
|
9238
|
-
var
|
|
9239
|
-
|
|
9402
|
+
componentId: "sc-vtiffr-1"
|
|
9403
|
+
})(["display:flex;align-items:center;justify-content:flex-start;width:100%;gap:8px;max-width:516px;"]);
|
|
9404
|
+
var SecondaryIcon = function SecondaryIcon(props) {
|
|
9405
|
+
var subMenu = props.subMenu,
|
|
9406
|
+
selected = props.selected;
|
|
9407
|
+
if (subMenu) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RightIcon, {
|
|
9408
|
+
name: "ChevronRight"
|
|
9409
|
+
});
|
|
9410
|
+
if (selected) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RightIcon, {
|
|
9411
|
+
name: "Check",
|
|
9412
|
+
color: "blue_11"
|
|
9413
|
+
});
|
|
9414
|
+
return null;
|
|
9415
|
+
};
|
|
9416
|
+
SecondaryIcon.displayName = 'SecondaryIcon';
|
|
9417
|
+
var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_icon__WEBPACK_IMPORTED_MODULE_6__["default"]).attrs({
|
|
9240
9418
|
size: 'xs'
|
|
9241
9419
|
}).withConfig({
|
|
9242
|
-
displayName: "
|
|
9243
|
-
componentId: "sc-
|
|
9420
|
+
displayName: "RightIcon",
|
|
9421
|
+
componentId: "sc-vtiffr-2"
|
|
9244
9422
|
})(["margin-left:auto;"]);
|
|
9245
9423
|
var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Label).attrs({
|
|
9246
9424
|
variant: 'sm',
|
|
@@ -9248,7 +9426,7 @@ var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Lab
|
|
|
9248
9426
|
no_wrap: true
|
|
9249
9427
|
}).withConfig({
|
|
9250
9428
|
displayName: "SecondaryText",
|
|
9251
|
-
componentId: "sc-
|
|
9429
|
+
componentId: "sc-vtiffr-3"
|
|
9252
9430
|
})(["margin-left:auto;"]);
|
|
9253
9431
|
var Description = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Label).attrs({
|
|
9254
9432
|
variant: 'xs',
|
|
@@ -9256,47 +9434,140 @@ var Description = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Label
|
|
|
9256
9434
|
no_wrap: true
|
|
9257
9435
|
}).withConfig({
|
|
9258
9436
|
displayName: "Description",
|
|
9259
|
-
componentId: "sc-
|
|
9260
|
-
})(["max-width:516px;text-overflow:ellipsis;overflow:
|
|
9437
|
+
componentId: "sc-vtiffr-4"
|
|
9438
|
+
})(["max-width:516px;text-overflow:ellipsis;overflow-x:clip;"]);
|
|
9439
|
+
var buildMenuItems = function buildMenuItems(items, itemProps) {
|
|
9440
|
+
return items.map(function (item) {
|
|
9441
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItem, _extends({
|
|
9442
|
+
key: item.key
|
|
9443
|
+
}, item, itemProps));
|
|
9444
|
+
});
|
|
9445
|
+
};
|
|
9446
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MenuItem);
|
|
9447
|
+
|
|
9448
|
+
/***/ }),
|
|
9449
|
+
|
|
9450
|
+
/***/ "./src/menu/menu_item_divider.js":
|
|
9451
|
+
/*!***************************************!*\
|
|
9452
|
+
!*** ./src/menu/menu_item_divider.js ***!
|
|
9453
|
+
\***************************************/
|
|
9454
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9455
|
+
|
|
9456
|
+
"use strict";
|
|
9457
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9458
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9459
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9460
|
+
/* harmony export */ });
|
|
9461
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9462
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9463
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
9464
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
9465
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
|
9466
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
|
|
9467
|
+
// LICENSE_CODE ZON
|
|
9468
|
+
|
|
9469
|
+
|
|
9470
|
+
/*jslint react:true*/
|
|
9471
|
+
|
|
9472
|
+
|
|
9473
|
+
|
|
9474
|
+
|
|
9261
9475
|
var MenuItemDivider = function MenuItemDivider() {
|
|
9262
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemContainer, {
|
|
9476
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.MenuItemContainer, {
|
|
9263
9477
|
role: "separator"
|
|
9264
9478
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledHr, null));
|
|
9265
9479
|
};
|
|
9266
9480
|
MenuItemDivider.displayName = 'MenuItemDivider';
|
|
9267
9481
|
var StyledHr = styled_components__WEBPACK_IMPORTED_MODULE_1___default().hr.withConfig({
|
|
9268
9482
|
displayName: "StyledHr",
|
|
9269
|
-
componentId: "sc-
|
|
9270
|
-
})(["margin:0;border-top:1px solid ", ";border-right:0 none;border-bottom:0 none;border-left:0 none;"],
|
|
9483
|
+
componentId: "sc-1urlki3-0"
|
|
9484
|
+
})(["margin:0;border-top:1px solid ", ";border-right:0 none;border-bottom:0 none;border-left:0 none;"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_4);
|
|
9485
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MenuItemDivider);
|
|
9486
|
+
|
|
9487
|
+
/***/ }),
|
|
9488
|
+
|
|
9489
|
+
/***/ "./src/menu/menu_item_group.js":
|
|
9490
|
+
/*!*************************************!*\
|
|
9491
|
+
!*** ./src/menu/menu_item_group.js ***!
|
|
9492
|
+
\*************************************/
|
|
9493
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9494
|
+
|
|
9495
|
+
"use strict";
|
|
9496
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9497
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9498
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9499
|
+
/* harmony export */ });
|
|
9500
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9501
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9502
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
9503
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
9504
|
+
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
|
9505
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
|
|
9506
|
+
// LICENSE_CODE ZON
|
|
9507
|
+
|
|
9508
|
+
|
|
9509
|
+
/*jslint react:true*/
|
|
9510
|
+
var _excluded = ["text", "children"];
|
|
9511
|
+
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; }
|
|
9512
|
+
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; }
|
|
9513
|
+
|
|
9514
|
+
|
|
9515
|
+
|
|
9516
|
+
|
|
9517
|
+
var Label = _typography__WEBPACK_IMPORTED_MODULE_2__["default"].Label;
|
|
9271
9518
|
var MenuItemGroup = function MenuItemGroup(props) {
|
|
9272
9519
|
var text = props.text,
|
|
9273
|
-
size = props.size,
|
|
9274
9520
|
children = props.children,
|
|
9275
|
-
rest = _objectWithoutProperties(props,
|
|
9276
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemContainer, rest, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemGroupText, {
|
|
9521
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
9522
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.MenuItemContainer, rest, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuItemGroupText, {
|
|
9277
9523
|
variant: "base",
|
|
9278
9524
|
no_wrap: true,
|
|
9279
9525
|
color: "gray_11"
|
|
9280
|
-
}, text), children &&
|
|
9526
|
+
}, text), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.MenuContainer, {
|
|
9281
9527
|
isGroup: true,
|
|
9282
9528
|
role: "group"
|
|
9283
|
-
},
|
|
9284
|
-
size: size
|
|
9285
|
-
})));
|
|
9529
|
+
}, children));
|
|
9286
9530
|
};
|
|
9287
9531
|
MenuItemGroup.displayName = 'MenuItemGroup';
|
|
9288
9532
|
var MenuItemGroupText = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(Label).withConfig({
|
|
9289
9533
|
displayName: "MenuItemGroupText",
|
|
9290
|
-
componentId: "sc-
|
|
9534
|
+
componentId: "sc-q9wnng-0"
|
|
9291
9535
|
})(["display:flex;align-items:center;justify-content:flex-start;padding:8px 12px 0;width:100%;height:28px;box-sizing:border-box;"]);
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9536
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MenuItemGroup);
|
|
9537
|
+
|
|
9538
|
+
/***/ }),
|
|
9539
|
+
|
|
9540
|
+
/***/ "./src/menu/shared.js":
|
|
9541
|
+
/*!****************************!*\
|
|
9542
|
+
!*** ./src/menu/shared.js ***!
|
|
9543
|
+
\****************************/
|
|
9544
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9545
|
+
|
|
9546
|
+
"use strict";
|
|
9547
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9548
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9549
|
+
/* harmony export */ "MenuContainer": () => (/* binding */ MenuContainer),
|
|
9550
|
+
/* harmony export */ "MenuItemContainer": () => (/* binding */ MenuItemContainer)
|
|
9551
|
+
/* harmony export */ });
|
|
9552
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "styled-components");
|
|
9553
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_0__);
|
|
9554
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
|
9555
|
+
// LICENSE_CODE ZON
|
|
9556
|
+
|
|
9557
|
+
|
|
9558
|
+
/*jslint react:true*/
|
|
9559
|
+
|
|
9560
|
+
|
|
9561
|
+
var MenuContainer = styled_components__WEBPACK_IMPORTED_MODULE_0___default().ul.withConfig({
|
|
9562
|
+
displayName: "MenuContainer",
|
|
9563
|
+
componentId: "sc-laozu6-0"
|
|
9564
|
+
})(["margin:0;padding:4px 0;box-sizing:border-box;min-width:168px;max-width:540px;background:white;border-radius:4px;display:flex;flex-direction:column;gap:2px;", ""], function (props) {
|
|
9565
|
+
return props.isGroup ? undefined : (0,styled_components__WEBPACK_IMPORTED_MODULE_0__.css)(["box-shadow:", ";"], _theme__WEBPACK_IMPORTED_MODULE_1__["default"].box_shadow.md);
|
|
9566
|
+
});
|
|
9567
|
+
var MenuItemContainer = styled_components__WEBPACK_IMPORTED_MODULE_0___default().li.withConfig({
|
|
9568
|
+
displayName: "MenuItemContainer",
|
|
9569
|
+
componentId: "sc-laozu6-1"
|
|
9570
|
+
})(["list-style:none;width:100%;"]);
|
|
9300
9571
|
|
|
9301
9572
|
/***/ }),
|
|
9302
9573
|
|