@nutui/nutui-react-taro 1.5.11-beta.0 → 1.5.11-beta.2

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.
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  /*!
8
- * @nutui/nutui-react-taro v1.5.11-beta.0 Wed Jul 05 2023 10:55:52 GMT+0800 (中国标准时间)
8
+ * @nutui/nutui-react-taro v1.5.11 Thu Jul 06 2023 16:47:25 GMT+0800 (China Standard Time)
9
9
  * (c) 2023 @jdf2e.
10
10
  * Released under the MIT License.
11
11
  */
@@ -15,10 +15,15 @@ import Taro, { redirectTo, navigateTo, getEnv, usePageScroll, getSystemInfoSync,
15
15
  import { View, ScrollView, PickerView, PickerViewColumn, Image as Image$2 } from "@tarojs/components";
16
16
  import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
17
17
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
18
- function getDefaultExportFromCjs(x) {
19
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
20
- }
21
- var classname = { exports: {} };
18
+ var classnameExports = {};
19
+ var classname = {
20
+ get exports() {
21
+ return classnameExports;
22
+ },
23
+ set exports(v) {
24
+ classnameExports = v;
25
+ }
26
+ };
22
27
  var classname_production_min = {};
23
28
  var hasRequiredClassname_production_min;
24
29
  function requireClassname_production_min() {
@@ -122,12 +127,13 @@ function requireClassname_development() {
122
127
  classname_development.withNaming = withNaming;
123
128
  return classname_development;
124
129
  }
125
- if (process.env.NODE_ENV === "production") {
126
- classname.exports = requireClassname_production_min();
127
- } else {
128
- classname.exports = requireClassname_development();
129
- }
130
- var classnameExports = classname.exports;
130
+ (function(module) {
131
+ if (process.env.NODE_ENV === "production") {
132
+ module.exports = requireClassname_production_min();
133
+ } else {
134
+ module.exports = requireClassname_development();
135
+ }
136
+ })(classname);
131
137
  const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
132
138
  const defaultProps$1v = {
133
139
  name: "",
@@ -743,7 +749,6 @@ function words(string, pattern, guard) {
743
749
  return string.match(pattern) || [];
744
750
  }
745
751
  var lodash_kebabcase = kebabCase;
746
- const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
747
752
  const zhCN = {
748
753
  save: "保存",
749
754
  confirm: "确认",
@@ -891,7 +896,7 @@ const useConfig$1 = () => {
891
896
  function convertThemeVarsToCSSVars(themeVars) {
892
897
  const cssVars = {};
893
898
  Object.keys(themeVars).forEach((key) => {
894
- cssVars[`--${kebabCase$1(key)}`] = themeVars[key];
899
+ cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
895
900
  });
896
901
  return cssVars;
897
902
  }
@@ -1008,7 +1013,15 @@ const Image$1 = (props) => {
1008
1013
  };
1009
1014
  Image$1.defaultProps = defaultProps$1q;
1010
1015
  Image$1.displayName = "NutImage";
1011
- var classnames = { exports: {} };
1016
+ var classnamesExports = {};
1017
+ var classnames = {
1018
+ get exports() {
1019
+ return classnamesExports;
1020
+ },
1021
+ set exports(v) {
1022
+ classnamesExports = v;
1023
+ }
1024
+ };
1012
1025
  /*!
1013
1026
  Copyright (c) 2018 Jed Watson.
1014
1027
  Licensed under the MIT License (MIT), see
@@ -1055,8 +1068,7 @@ var classnames = { exports: {} };
1055
1068
  }
1056
1069
  })();
1057
1070
  })(classnames);
1058
- var classnamesExports = classnames.exports;
1059
- const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
1071
+ const classNames = classnamesExports;
1060
1072
  const defaultOverlayProps = {
1061
1073
  zIndex: 2e3,
1062
1074
  duration: 0.3,
@@ -1182,8 +1194,24 @@ function _inheritsLoose(subClass, superClass) {
1182
1194
  subClass.prototype.constructor = subClass;
1183
1195
  _setPrototypeOf(subClass, superClass);
1184
1196
  }
1185
- var propTypes = { exports: {} };
1186
- var reactIs = { exports: {} };
1197
+ var propTypesExports = {};
1198
+ var propTypes = {
1199
+ get exports() {
1200
+ return propTypesExports;
1201
+ },
1202
+ set exports(v) {
1203
+ propTypesExports = v;
1204
+ }
1205
+ };
1206
+ var reactIsExports = {};
1207
+ var reactIs = {
1208
+ get exports() {
1209
+ return reactIsExports;
1210
+ },
1211
+ set exports(v) {
1212
+ reactIsExports = v;
1213
+ }
1214
+ };
1187
1215
  var reactIs_production_min = {};
1188
1216
  /** @license React v16.13.1
1189
1217
  * react-is.production.min.js
@@ -1454,14 +1482,16 @@ function requireReactIs_development() {
1454
1482
  var hasRequiredReactIs;
1455
1483
  function requireReactIs() {
1456
1484
  if (hasRequiredReactIs)
1457
- return reactIs.exports;
1485
+ return reactIsExports;
1458
1486
  hasRequiredReactIs = 1;
1459
- if (process.env.NODE_ENV === "production") {
1460
- reactIs.exports = requireReactIs_production_min();
1461
- } else {
1462
- reactIs.exports = requireReactIs_development();
1463
- }
1464
- return reactIs.exports;
1487
+ (function(module) {
1488
+ if (process.env.NODE_ENV === "production") {
1489
+ module.exports = requireReactIs_production_min();
1490
+ } else {
1491
+ module.exports = requireReactIs_development();
1492
+ }
1493
+ })(reactIs);
1494
+ return reactIsExports;
1465
1495
  }
1466
1496
  /*
1467
1497
  object-assign
@@ -2128,8 +2158,6 @@ if (process.env.NODE_ENV !== "production") {
2128
2158
  } else {
2129
2159
  propTypes.exports = requireFactoryWithThrowingShims()();
2130
2160
  }
2131
- var propTypesExports = propTypes.exports;
2132
- const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
2133
2161
  function hasClass(element, className) {
2134
2162
  if (element.classList)
2135
2163
  return !!className && element.classList.contains(className);
@@ -2159,22 +2187,22 @@ function removeClass$1(element, className) {
2159
2187
  const config$1 = {
2160
2188
  disabled: false
2161
2189
  };
2162
- var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
2163
- enter: PropTypes.number,
2164
- exit: PropTypes.number,
2165
- appear: PropTypes.number
2190
+ var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
2191
+ enter: propTypesExports.number,
2192
+ exit: propTypesExports.number,
2193
+ appear: propTypesExports.number
2166
2194
  }).isRequired]) : null;
2167
- var classNamesShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
2168
- enter: PropTypes.string,
2169
- exit: PropTypes.string,
2170
- active: PropTypes.string
2171
- }), PropTypes.shape({
2172
- enter: PropTypes.string,
2173
- enterDone: PropTypes.string,
2174
- enterActive: PropTypes.string,
2175
- exit: PropTypes.string,
2176
- exitDone: PropTypes.string,
2177
- exitActive: PropTypes.string
2195
+ var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
2196
+ enter: propTypesExports.string,
2197
+ exit: propTypesExports.string,
2198
+ active: propTypesExports.string
2199
+ }), propTypesExports.shape({
2200
+ enter: propTypesExports.string,
2201
+ enterDone: propTypesExports.string,
2202
+ enterActive: propTypesExports.string,
2203
+ exit: propTypesExports.string,
2204
+ exitDone: propTypesExports.string,
2205
+ exitActive: propTypesExports.string
2178
2206
  })]) : null;
2179
2207
  const TransitionGroupContext = React__default.createContext(null);
2180
2208
  var forceReflow = function forceReflow2(node) {
@@ -2424,10 +2452,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2424
2452
  * (see
2425
2453
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
2426
2454
  */
2427
- nodeRef: PropTypes.shape({
2428
- current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location, propFullName, secret) {
2455
+ nodeRef: propTypesExports.shape({
2456
+ current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
2429
2457
  var value = propValue[key];
2430
- return PropTypes.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2458
+ return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
2431
2459
  }
2432
2460
  }),
2433
2461
  /**
@@ -2444,23 +2472,23 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2444
2472
  * </Transition>
2445
2473
  * ```
2446
2474
  */
2447
- children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
2475
+ children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
2448
2476
  /**
2449
2477
  * Show the component; triggers the enter or exit states
2450
2478
  */
2451
- in: PropTypes.bool,
2479
+ in: propTypesExports.bool,
2452
2480
  /**
2453
2481
  * By default the child component is mounted immediately along with
2454
2482
  * the parent `Transition` component. If you want to "lazy mount" the component on the
2455
2483
  * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
2456
2484
  * mounted, even on "exited", unless you also specify `unmountOnExit`.
2457
2485
  */
2458
- mountOnEnter: PropTypes.bool,
2486
+ mountOnEnter: propTypesExports.bool,
2459
2487
  /**
2460
2488
  * By default the child component stays mounted after it reaches the `'exited'` state.
2461
2489
  * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
2462
2490
  */
2463
- unmountOnExit: PropTypes.bool,
2491
+ unmountOnExit: propTypesExports.bool,
2464
2492
  /**
2465
2493
  * By default the child component does not perform the enter transition when
2466
2494
  * it first mounts, regardless of the value of `in`. If you want this
@@ -2472,15 +2500,15 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2472
2500
  * > additional `.appear-*` classes, that way you can choose to style it
2473
2501
  * > differently.
2474
2502
  */
2475
- appear: PropTypes.bool,
2503
+ appear: propTypesExports.bool,
2476
2504
  /**
2477
2505
  * Enable or disable enter transitions.
2478
2506
  */
2479
- enter: PropTypes.bool,
2507
+ enter: propTypesExports.bool,
2480
2508
  /**
2481
2509
  * Enable or disable exit transitions.
2482
2510
  */
2483
- exit: PropTypes.bool,
2511
+ exit: propTypesExports.bool,
2484
2512
  /**
2485
2513
  * The duration of the transition, in milliseconds.
2486
2514
  * Required unless `addEndListener` is provided.
@@ -2530,7 +2558,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2530
2558
  * }}
2531
2559
  * ```
2532
2560
  */
2533
- addEndListener: PropTypes.func,
2561
+ addEndListener: propTypesExports.func,
2534
2562
  /**
2535
2563
  * Callback fired before the "entering" status is applied. An extra parameter
2536
2564
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2539,7 +2567,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2539
2567
  *
2540
2568
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2541
2569
  */
2542
- onEnter: PropTypes.func,
2570
+ onEnter: propTypesExports.func,
2543
2571
  /**
2544
2572
  * Callback fired after the "entering" status is applied. An extra parameter
2545
2573
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2548,7 +2576,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2548
2576
  *
2549
2577
  * @type Function(node: HtmlElement, isAppearing: bool)
2550
2578
  */
2551
- onEntering: PropTypes.func,
2579
+ onEntering: propTypesExports.func,
2552
2580
  /**
2553
2581
  * Callback fired after the "entered" status is applied. An extra parameter
2554
2582
  * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
@@ -2557,7 +2585,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2557
2585
  *
2558
2586
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
2559
2587
  */
2560
- onEntered: PropTypes.func,
2588
+ onEntered: propTypesExports.func,
2561
2589
  /**
2562
2590
  * Callback fired before the "exiting" status is applied.
2563
2591
  *
@@ -2565,7 +2593,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2565
2593
  *
2566
2594
  * @type Function(node: HtmlElement) -> void
2567
2595
  */
2568
- onExit: PropTypes.func,
2596
+ onExit: propTypesExports.func,
2569
2597
  /**
2570
2598
  * Callback fired after the "exiting" status is applied.
2571
2599
  *
@@ -2573,7 +2601,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2573
2601
  *
2574
2602
  * @type Function(node: HtmlElement) -> void
2575
2603
  */
2576
- onExiting: PropTypes.func,
2604
+ onExiting: propTypesExports.func,
2577
2605
  /**
2578
2606
  * Callback fired after the "exited" status is applied.
2579
2607
  *
@@ -2581,7 +2609,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
2581
2609
  *
2582
2610
  * @type Function(node: HtmlElement) -> void
2583
2611
  */
2584
- onExited: PropTypes.func
2612
+ onExited: propTypesExports.func
2585
2613
  } : {};
2586
2614
  function noop$2() {
2587
2615
  }
@@ -2820,7 +2848,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2820
2848
  *
2821
2849
  * @type Function(node: HtmlElement, isAppearing: bool)
2822
2850
  */
2823
- onEnter: PropTypes.func,
2851
+ onEnter: propTypesExports.func,
2824
2852
  /**
2825
2853
  * A `<Transition>` callback fired immediately after the 'enter-active' or
2826
2854
  * 'appear-active' class is applied.
@@ -2829,7 +2857,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2829
2857
  *
2830
2858
  * @type Function(node: HtmlElement, isAppearing: bool)
2831
2859
  */
2832
- onEntering: PropTypes.func,
2860
+ onEntering: propTypesExports.func,
2833
2861
  /**
2834
2862
  * A `<Transition>` callback fired immediately after the 'enter' or
2835
2863
  * 'appear' classes are **removed** and the `done` class is added to the DOM node.
@@ -2838,7 +2866,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2838
2866
  *
2839
2867
  * @type Function(node: HtmlElement, isAppearing: bool)
2840
2868
  */
2841
- onEntered: PropTypes.func,
2869
+ onEntered: propTypesExports.func,
2842
2870
  /**
2843
2871
  * A `<Transition>` callback fired immediately after the 'exit' class is
2844
2872
  * applied.
@@ -2847,7 +2875,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2847
2875
  *
2848
2876
  * @type Function(node: HtmlElement)
2849
2877
  */
2850
- onExit: PropTypes.func,
2878
+ onExit: propTypesExports.func,
2851
2879
  /**
2852
2880
  * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
2853
2881
  *
@@ -2855,7 +2883,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2855
2883
  *
2856
2884
  * @type Function(node: HtmlElement)
2857
2885
  */
2858
- onExiting: PropTypes.func,
2886
+ onExiting: propTypesExports.func,
2859
2887
  /**
2860
2888
  * A `<Transition>` callback fired immediately after the 'exit' classes
2861
2889
  * are **removed** and the `exit-done` class is added to the DOM node.
@@ -2864,7 +2892,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
2864
2892
  *
2865
2893
  * @type Function(node: HtmlElement)
2866
2894
  */
2867
- onExited: PropTypes.func
2895
+ onExited: propTypesExports.func
2868
2896
  }) : {};
2869
2897
  const CSSTransition$1 = CSSTransition;
2870
2898
  const defaultProps$1p = {
@@ -4103,6 +4131,19 @@ const MenuItem = forwardRef((props, ref) => {
4103
4131
  useEffect(() => {
4104
4132
  getParentOffset();
4105
4133
  }, [_showPopup]);
4134
+ const windowHeight = useMemo(() => getSystemInfoSync().windowHeight, []);
4135
+ const updateItemOffset = useCallback(() => {
4136
+ const p = parent.parent().current;
4137
+ p.getBoundingClientRect().then((rect) => {
4138
+ if (rect) {
4139
+ setPosition({
4140
+ height: rect.height,
4141
+ top: rect.top
4142
+ });
4143
+ }
4144
+ });
4145
+ }, [direction, windowHeight]);
4146
+ usePageScroll(updateItemOffset);
4106
4147
  useImperativeHandle(ref, () => ({
4107
4148
  toggle: parent.toggleItemShow
4108
4149
  }));
@@ -4143,114 +4184,103 @@ const MenuItem = forwardRef((props, ref) => {
4143
4184
  return { display: "none" };
4144
4185
  };
4145
4186
  const getPosition = () => {
4146
- return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
4147
- position: "absolute",
4148
- bottom: "100%",
4149
- top: "auto",
4150
- height: `${window.innerHeight}px`
4187
+ return direction === "down" ? { top: `${position.top + position.height}px` } : {
4188
+ bottom: `${getSystemInfoSync().windowHeight - position.top}px`,
4189
+ top: "0",
4190
+ height: "initial"
4151
4191
  };
4152
4192
  };
4153
4193
  const placeholderStyle = () => {
4154
4194
  if (direction === "down") {
4155
4195
  return {
4156
4196
  height: `${position.top + position.height}px`,
4157
- top: "auto",
4158
- bottom: "-100%",
4159
- ...isShow()
4197
+ ...isShow(),
4198
+ ...style
4160
4199
  };
4161
4200
  }
4162
4201
  return {
4163
4202
  height: `${getSystemInfoSync().windowHeight - position.top}px`,
4164
- bottom: `auto`,
4165
- top: "0",
4166
- ...isShow()
4203
+ top: "auto",
4204
+ ...isShow(),
4205
+ ...style
4167
4206
  };
4168
4207
  };
4169
- return /* @__PURE__ */ React__default.createElement(
4170
- "div",
4208
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
4209
+ View,
4171
4210
  {
4172
- className: "nut-menu-item-container",
4173
- style: { position: "absolute", left: 0, right: 0 }
4174
- },
4175
- /* @__PURE__ */ React__default.createElement(
4176
- "div",
4177
- {
4178
- className: `placeholder-element ${classNames({
4179
- up: direction === "up"
4180
- })}`,
4181
- style: placeholderStyle(),
4182
- onClick: () => parent.toggleItemShow(orderKey)
4211
+ className: `placeholder-element ${classNames({
4212
+ up: direction === "up"
4213
+ })}`,
4214
+ style: placeholderStyle(),
4215
+ onClick: () => parent.toggleItemShow(orderKey)
4216
+ }
4217
+ ), /* @__PURE__ */ React__default.createElement(
4218
+ Overlay,
4219
+ {
4220
+ overlayClass: "nut-menu__overlay",
4221
+ style: getPosition(),
4222
+ lockScroll: parent.lockScroll,
4223
+ visible: _showPopup,
4224
+ closeOnClickOverlay: parent.closeOnClickOverlay,
4225
+ onClick: () => {
4226
+ parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
4183
4227
  }
4184
- ),
4185
- /* @__PURE__ */ React__default.createElement(
4186
- Overlay,
4187
- {
4188
- overlayClass: "nut-menu__overlay",
4189
- style: getPosition(),
4190
- lockScroll: parent.lockScroll,
4191
- visible: _showPopup,
4192
- closeOnClickOverlay: parent.closeOnClickOverlay,
4193
- onClick: () => {
4194
- parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
4195
- }
4228
+ }
4229
+ ), /* @__PURE__ */ React__default.createElement(
4230
+ View,
4231
+ {
4232
+ className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
4233
+ style: {
4234
+ // ...getPosition(),
4235
+ ...isShow()
4196
4236
  }
4197
- ),
4237
+ },
4198
4238
  /* @__PURE__ */ React__default.createElement(
4199
- "div",
4239
+ CSSTransition$1,
4200
4240
  {
4201
- className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
4202
- style: {
4203
- // ...getPosition(),
4204
- ...isShow()
4205
- }
4241
+ in: _showPopup,
4242
+ timeout: 100,
4243
+ classNames: direction === "down" ? "menu-item" : "menu-item-up"
4206
4244
  },
4207
- /* @__PURE__ */ React__default.createElement(
4208
- CSSTransition$1,
4209
- {
4210
- in: _showPopup,
4211
- timeout: 100,
4212
- classNames: direction === "down" ? "menu-item" : "menu-item-up"
4213
- },
4214
- /* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-item__content" }, options == null ? void 0 : options.map((item, index) => {
4215
- return /* @__PURE__ */ React__default.createElement(
4216
- "div",
4245
+ /* @__PURE__ */ React__default.createElement(View, { className: "nut-menu-item__content" }, options == null ? void 0 : options.map((item, index) => {
4246
+ return /* @__PURE__ */ React__default.createElement(
4247
+ View,
4248
+ {
4249
+ className: `nut-menu-item__option ${classNames({
4250
+ active: item.value === _value
4251
+ })}`,
4252
+ key: item.text,
4253
+ style: {
4254
+ flexBasis: `${100 / columns}%`
4255
+ },
4256
+ onClick: () => {
4257
+ handleClick(item);
4258
+ }
4259
+ },
4260
+ item.value === _value ? /* @__PURE__ */ React__default.createElement(
4261
+ Icon$1,
4262
+ {
4263
+ classPrefix: iconClassPrefix,
4264
+ fontClassName: iconFontClassName,
4265
+ className: getIconCName(item.value, value),
4266
+ name: optionsIcon,
4267
+ color: activeColor
4268
+ }
4269
+ ) : null,
4270
+ /* @__PURE__ */ React__default.createElement(
4271
+ View,
4217
4272
  {
4218
- className: `nut-menu-item__option ${classNames({
4219
- active: item.value === _value
4220
- })}`,
4221
- key: item.text,
4273
+ className: getIconCName(item.value, value),
4222
4274
  style: {
4223
- flexBasis: `${100 / columns}%`
4224
- },
4225
- onClick: () => {
4226
- handleClick(item);
4275
+ color: `${item.value === _value ? activeColor : ""}`
4227
4276
  }
4228
4277
  },
4229
- item.value === _value ? /* @__PURE__ */ React__default.createElement(
4230
- Icon$1,
4231
- {
4232
- classPrefix: iconClassPrefix,
4233
- fontClassName: iconFontClassName,
4234
- className: getIconCName(item.value, value),
4235
- name: optionsIcon,
4236
- color: activeColor
4237
- }
4238
- ) : null,
4239
- /* @__PURE__ */ React__default.createElement(
4240
- "div",
4241
- {
4242
- className: getIconCName(item.value, value),
4243
- style: {
4244
- color: `${item.value === _value ? activeColor : ""}`
4245
- }
4246
- },
4247
- item.text
4248
- )
4249
- );
4250
- }), children)
4251
- )
4278
+ item.text
4279
+ )
4280
+ );
4281
+ }), children)
4252
4282
  )
4253
- );
4283
+ ));
4254
4284
  });
4255
4285
  MenuItem.defaultProps = defaultProps$1d;
4256
4286
  MenuItem.displayName = "NutMenuItem";