indicator-ui 0.0.381 → 0.0.382
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/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55932,9 +55932,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55932
55932
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
|
|
55933
55933
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
55934
55934
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
55935
|
-
/* harmony import */ var
|
|
55936
|
-
/* harmony import */ var
|
|
55937
|
-
/* harmony import */ var
|
|
55935
|
+
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
55936
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
55937
|
+
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styles */ "./src/ui/Dropdown/styles/index.ts");
|
|
55938
55938
|
var _excluded = ["items", "title", "size", "onClick", "width", "isActive", "className", "styles"];
|
|
55939
55939
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
55940
55940
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -55983,12 +55983,22 @@ var _Dropdown = function _Dropdown(props, ref) {
|
|
|
55983
55983
|
return curItem;
|
|
55984
55984
|
}
|
|
55985
55985
|
};
|
|
55986
|
+
var getItemProps = function getItemProps(curItem) {
|
|
55987
|
+
if (_typeof(curItem) === 'object' && 'value' in curItem) {
|
|
55988
|
+
return curItem;
|
|
55989
|
+
} else {
|
|
55990
|
+
return {
|
|
55991
|
+
text: curItem
|
|
55992
|
+
};
|
|
55993
|
+
}
|
|
55994
|
+
};
|
|
55986
55995
|
var handleClick = function handleClick(curItem) {
|
|
55987
55996
|
var resValue = getValue(curItem);
|
|
55988
55997
|
onClick === null || onClick === void 0 || onClick(resValue);
|
|
55989
55998
|
};
|
|
55990
55999
|
var getItem = function getItem(curItem, idx) {
|
|
55991
56000
|
var value = getValue(curItem);
|
|
56001
|
+
var itemProps = getItemProps(curItem);
|
|
55992
56002
|
var active = isActive === null || isActive === void 0 ? void 0 : isActive(value);
|
|
55993
56003
|
if (_typeof(curItem) === 'object' && 'customComponent' in curItem) {
|
|
55994
56004
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(curItem.customComponent, {
|
|
@@ -55999,24 +56009,24 @@ var _Dropdown = function _Dropdown(props, ref) {
|
|
|
55999
56009
|
key: idx
|
|
56000
56010
|
});
|
|
56001
56011
|
}
|
|
56002
|
-
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(
|
|
56012
|
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_ui__WEBPACK_IMPORTED_MODULE_3__.DropdownItem, _objectSpread(_objectSpread({
|
|
56003
56013
|
width: 'fill',
|
|
56004
56014
|
size: size,
|
|
56005
56015
|
onClick: function onClick() {
|
|
56006
56016
|
return handleClick(curItem);
|
|
56007
56017
|
},
|
|
56008
56018
|
selected: active
|
|
56009
|
-
},
|
|
56019
|
+
}, itemProps), {}, {
|
|
56010
56020
|
key: idx
|
|
56011
56021
|
}));
|
|
56012
56022
|
};
|
|
56013
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
|
|
56014
|
-
className: (0,
|
|
56023
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_ui__WEBPACK_IMPORTED_MODULE_3__.ScrollProvider, _objectSpread(_objectSpread({
|
|
56024
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_4__.DropdownStyle.Dropdown, className),
|
|
56015
56025
|
style: getStyle()
|
|
56016
56026
|
}, anotherProps), {}, {
|
|
56017
56027
|
ref: ref,
|
|
56018
56028
|
children: [title !== undefined && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h6", {
|
|
56019
|
-
className:
|
|
56029
|
+
className: _styles__WEBPACK_IMPORTED_MODULE_4__.DropdownStyle.header,
|
|
56020
56030
|
children: title
|
|
56021
56031
|
}), items.map(getItem)]
|
|
56022
56032
|
}));
|