@beppla/tapas-ui 1.0.70 → 1.0.71

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.
Files changed (263) hide show
  1. package/commonjs/Alert/Alert.js +67 -46
  2. package/commonjs/Alert/Alert.js.map +1 -2
  3. package/commonjs/AnimatedNavItem/AnimatedNavItem.js +0 -71
  4. package/commonjs/AnimatedNavItem/AnimatedNavItem.js.map +0 -1
  5. package/commonjs/AnimatedNavItem/index.js +9 -15
  6. package/commonjs/BarChart/BarChart.js.map +2 -1
  7. package/commonjs/Button/Button.js +78 -96
  8. package/commonjs/Button/Button.js.map +2 -1
  9. package/commonjs/Button/ButtonGroup.js.map +2 -1
  10. package/commonjs/Calendar/Calendar.base.js +190 -162
  11. package/commonjs/Calendar/Calendar.base.js.map +2 -1
  12. package/commonjs/Calendar/Calendar.js +102 -86
  13. package/commonjs/Calendar/Calendar.js.map +1 -2
  14. package/commonjs/Calendar/DaySelector.js +113 -115
  15. package/commonjs/Calendar/DaySelector.js.map +1 -2
  16. package/commonjs/Calendar/TimeSelector.js +223 -274
  17. package/commonjs/Calendar/WeekDaySelector.js.map +1 -2
  18. package/commonjs/Calendar/helper.js +68 -68
  19. package/commonjs/Calendar/helper.js.map +1 -2
  20. package/commonjs/Calendar/types.js +11 -11
  21. package/commonjs/Calendar/types.js.map +2 -1
  22. package/commonjs/Card/Card.js +158 -231
  23. package/commonjs/Card/Card.js.map +1 -1
  24. package/commonjs/CheckBox/CheckBoxItem.js +36 -86
  25. package/commonjs/CheckBox/CheckBoxItem.js.map +1 -1
  26. package/commonjs/CheckBox/GroupCheckBox.js +67 -80
  27. package/commonjs/CheckBox/GroupCheckBox.js.map +2 -1
  28. package/commonjs/DashboardCard/DashboardCard.js +94 -74
  29. package/commonjs/DashboardCard/DashboardCard.js.map +1 -1
  30. package/commonjs/DataCell/DataCell.js +235 -289
  31. package/commonjs/DataCell/DataCell.js.map +1 -2
  32. package/commonjs/DataCell/index.js.map +2 -1
  33. package/commonjs/DataTable/DataTable.js +144 -70
  34. package/commonjs/DataTable/DataTable.js.map +1 -2
  35. package/commonjs/DataTable/index.js.map +1 -2
  36. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js +244 -242
  37. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js.map +1 -1
  38. package/commonjs/DraggableFlatList/DraggableFlatList.js +1 -1
  39. package/commonjs/Dropdown/Dropdown.js +461 -493
  40. package/commonjs/Dropdown/Dropdown.js.map +1 -2
  41. package/commonjs/Dropdown/InputDropdown.js +114 -123
  42. package/commonjs/ExternalLink/ExternalLink.js +58 -50
  43. package/commonjs/ExternalLink/ExternalLink.js.map +1 -2
  44. package/commonjs/Gantt/helper.js.map +1 -2
  45. package/commonjs/Grid/Grid.base.js +401 -336
  46. package/commonjs/Grid/Grid.base.js.map +2 -1
  47. package/commonjs/Grid/VariableSizeGrid.js +113 -120
  48. package/commonjs/Grid/VariableSizeGrid.js.map +1 -2
  49. package/commonjs/Grid/helper.js +16 -11
  50. package/commonjs/Header/Header.js +177 -166
  51. package/commonjs/Header/Header.js.map +1 -2
  52. package/commonjs/HelloWave/HelloWave.js +53 -46
  53. package/commonjs/HelloWave/HelloWave.js.map +2 -1
  54. package/commonjs/Icons/TapasIcon.js +100 -99
  55. package/commonjs/Icons/TapasIcon.js.map +2 -1
  56. package/commonjs/Icons/TapasIconExpo.js +94 -101
  57. package/commonjs/Icons/smartFontLoader.js +222 -266
  58. package/commonjs/Icons/smartFontLoader.js.map +1 -2
  59. package/commonjs/Image/Image.js +106 -96
  60. package/commonjs/Image/Image.js.map +1 -2
  61. package/commonjs/Image/PreviewImg.js.map +2 -1
  62. package/commonjs/Layout/DrawerContext.js +35 -49
  63. package/commonjs/Layout/DrawerContext.js.map +2 -1
  64. package/commonjs/Layout/Layout.js.map +1 -2
  65. package/commonjs/Layout/ToastContext.js +46 -34
  66. package/commonjs/Layout/ToastContext.js.map +1 -2
  67. package/commonjs/Layout/index.js +38 -34
  68. package/commonjs/Layout/index.js.map +1 -2
  69. package/commonjs/LineChart/index.js +3 -4
  70. package/commonjs/ListItem/ListItem.js +108 -80
  71. package/commonjs/ListItem/ListItem.js.map +1 -2
  72. package/commonjs/MultiSelector/MultiSelector.js +225 -250
  73. package/commonjs/MultiSelector/MultiSelector.js.map +1 -2
  74. package/commonjs/Navigation/Navigation.js +117 -114
  75. package/commonjs/Navigation/Navigation.js.map +1 -2
  76. package/commonjs/Notification/Notification.js +66 -135
  77. package/commonjs/Notification/Notification.js.map +1 -1
  78. package/commonjs/Notification/index.js.map +1 -2
  79. package/commonjs/NumericInput/NumericInput.js +85 -71
  80. package/commonjs/NumericInput/NumericInput.js.map +1 -2
  81. package/commonjs/Overlay/Overlay.js +45 -24
  82. package/commonjs/Overlay/Overlay.js.map +1 -1
  83. package/commonjs/Popover/Popover.js +137 -112
  84. package/commonjs/Popover/Popover.js.map +2 -1
  85. package/commonjs/Progress/Progress.js +48 -54
  86. package/commonjs/Progress/Progress.js.map +2 -1
  87. package/commonjs/Quantity/Quantity.js +70 -0
  88. package/commonjs/Quantity/Quantity.js.map +1 -0
  89. package/commonjs/RadioButton/RadioButton.js +94 -46
  90. package/commonjs/RadioButton/RadioButton.js.map +1 -1
  91. package/commonjs/ReasonModal/index.js +14 -9
  92. package/commonjs/ReasonModal/index.js.map +2 -1
  93. package/commonjs/SheetTitle/SheetTitle.js +34 -31
  94. package/commonjs/SheetTitle/SheetTitle.js.map +1 -1
  95. package/commonjs/Shell/Shell.js +92 -84
  96. package/commonjs/Shell/Shell.js.map +1 -2
  97. package/commonjs/Shell/styles.js +3 -3
  98. package/commonjs/Shell/styles.js.map +2 -1
  99. package/commonjs/Shell/types.js.map +2 -1
  100. package/commonjs/StatisticCard/StatisticCard.js +47 -41
  101. package/commonjs/Status/Status.js +35 -31
  102. package/commonjs/Status/Status.js.map +2 -1
  103. package/commonjs/Steps/Steps.js +40 -41
  104. package/commonjs/Steps/Steps.js.map +1 -1
  105. package/commonjs/TabTitle/TabTitle.js +54 -48
  106. package/commonjs/TabTitle/index.js +1 -0
  107. package/commonjs/TabTitle/index.js.map +1 -0
  108. package/commonjs/Tag/Tag.js +88 -34
  109. package/commonjs/Tag/Tag.js.map +1 -1
  110. package/commonjs/Task/Task.js +112 -201
  111. package/commonjs/Task/Task.js.map +1 -2
  112. package/commonjs/Task/type.js +4 -4
  113. package/commonjs/Text/Text.js +96 -56
  114. package/commonjs/Text/Text.js.map +1 -1
  115. package/commonjs/Theme/ThemeProvider.js +16 -18
  116. package/commonjs/Timeline/Timeline.js +0 -23
  117. package/commonjs/Timeline/Timeline.js.map +0 -1
  118. package/commonjs/Toast/Toast.js +83 -62
  119. package/commonjs/Toast/Toast.js.map +1 -2
  120. package/commonjs/UserSwitcher/index.js +8 -14
  121. package/commonjs/UserSwitcher/index.js.map +1 -2
  122. package/commonjs/common.js +5 -4
  123. package/commonjs/common.js.map +2 -1
  124. package/commonjs/index.js +336 -426
  125. package/module/AnimatedNavItem/AnimatedNavItem.js +124 -159
  126. package/module/AnimatedNavItem/index.js +3 -7
  127. package/module/AnimatedNavItem/index.js.map +2 -1
  128. package/module/BarChart/index.js.map +1 -2
  129. package/module/Button/Button.js +71 -80
  130. package/module/Button/Button.js.map +2 -1
  131. package/module/Button/ButtonGroup.js +129 -120
  132. package/module/Button/ButtonGroup.js.map +2 -1
  133. package/module/Calendar/Calendar.base.js +226 -149
  134. package/module/Calendar/Calendar.base.js.map +2 -1
  135. package/module/Calendar/Calendar.js +76 -80
  136. package/module/Calendar/Calendar.js.map +1 -2
  137. package/module/Calendar/ConcreteTimeSelector.js.map +1 -2
  138. package/module/Calendar/CustomRange.js.map +2 -1
  139. package/module/Calendar/DaySelector.js +95 -118
  140. package/module/Calendar/TimeSelector.js.map +2 -1
  141. package/module/Calendar/WeekDaySelector.js.map +1 -2
  142. package/module/Calendar/helper.js +74 -74
  143. package/module/Calendar/helper.js.map +2 -1
  144. package/module/Calendar/local.js +7 -7
  145. package/module/Calendar/local.js.map +1 -2
  146. package/module/Calendar/types.js +13 -13
  147. package/module/CheckBox/CheckBox.js +93 -89
  148. package/module/CheckBox/CheckBox.js.map +1 -2
  149. package/module/CheckBox/CheckBoxItem.js +69 -84
  150. package/module/CheckBox/CheckBoxItem.js.map +1 -1
  151. package/module/CheckBox/GroupCheckBox.js +66 -76
  152. package/module/CheckBox/GroupCheckBox.js.map +1 -2
  153. package/module/CircularProgress/CircularProgress.js +22 -0
  154. package/module/CircularProgress/CircularProgress.js.map +1 -0
  155. package/module/Collapsible/Collapsible.js +54 -64
  156. package/module/Collapsible/Collapsible.js.map +1 -2
  157. package/module/DataCell/DataCell.js +311 -224
  158. package/module/DataCell/index.js +4 -3
  159. package/module/DataCell/index.js.map +1 -2
  160. package/module/DataTable/index.js +2 -4
  161. package/module/DataTable/index.js.map +2 -1
  162. package/module/DeviceSelectionModal/DeviceSelectionModal.js +178 -241
  163. package/module/DeviceSelectionModal/DeviceSelectionModal.js.map +1 -2
  164. package/module/DraggableFlatList/DraggableFlatList.js +0 -9
  165. package/module/DraggableFlatList/DraggableFlatList.js.map +0 -1
  166. package/module/Drawer/Drawer.js +167 -139
  167. package/module/Drawer/Drawer.js.map +2 -1
  168. package/module/Dropdown/CustomDropdown.js +56 -0
  169. package/module/Dropdown/CustomDropdown.js.map +1 -0
  170. package/module/Dropdown/InputDropdown.js +116 -134
  171. package/module/Dropdown/InputDropdown.js.map +1 -2
  172. package/module/ExternalLink/ExternalLink.js +150 -0
  173. package/module/ExternalLink/ExternalLink.js.map +1 -0
  174. package/module/Gantt/Accessories.js +183 -124
  175. package/module/Gantt/Gantt.js +139 -152
  176. package/module/Gantt/Gantt.js.map +1 -2
  177. package/module/Gantt/types.js +4 -8
  178. package/module/Gantt/types.js.map +2 -1
  179. package/module/Grid/FixedSizeGrid.js +86 -80
  180. package/module/Grid/FixedSizeGrid.js.map +2 -1
  181. package/module/Grid/Grid.base.js +401 -339
  182. package/module/Grid/Grid.base.js.map +2 -1
  183. package/module/Grid/StaticFixedSizeGrid.js +192 -255
  184. package/module/Grid/VariableSizeGrid.js +121 -118
  185. package/module/Grid/VariableSizeGrid.js.map +2 -1
  186. package/module/Grid/helper.js.map +1 -2
  187. package/module/Grid/timer.js +14 -16
  188. package/module/Grid/timer.js.map +2 -1
  189. package/module/Header/Header.js +167 -183
  190. package/module/Header/Header.js.map +1 -2
  191. package/module/IconText/IconText.js +63 -88
  192. package/module/IconText/IconText.js.map +1 -2
  193. package/module/Icons/TapasIcon.js +120 -96
  194. package/module/Icons/TapasIcon.js.map +2 -1
  195. package/module/Icons/TapasIconExpo.js +78 -98
  196. package/module/Icons/TapasIconExpo.js.map +1 -2
  197. package/module/Icons/fontLoader.js +213 -182
  198. package/module/Icons/index.js +9 -10
  199. package/module/Icons/smartFontLoader.js.map +1 -2
  200. package/module/Layout/Layout.js +100 -100
  201. package/module/Layout/ToastContext.js +27 -15
  202. package/module/Layout/ToastContext.js.map +2 -1
  203. package/module/Layout/index.js.map +1 -2
  204. package/module/LineChart/LineChart.js +121 -157
  205. package/module/LineChart/LineChart.js.map +2 -1
  206. package/module/MultiSelector/MultiSelector.js.map +1 -2
  207. package/module/Notification/Notification.js +101 -105
  208. package/module/Notification/Notification.js.map +1 -2
  209. package/module/Notification/index.js +2 -3
  210. package/module/Notification/index.js.map +2 -1
  211. package/module/NumericInput/NumericInput.js +0 -54
  212. package/module/Pagination/Pagination.js +72 -0
  213. package/module/Pagination/Pagination.js.map +1 -0
  214. package/module/PieChart/PieChart.js +76 -101
  215. package/module/PieChart/index.js.map +0 -1
  216. package/module/Popover/Popover.js +97 -125
  217. package/module/Popover/Popover.js.map +1 -1
  218. package/module/Progress/Progress.js +51 -57
  219. package/module/Progress/Progress.js.map +1 -2
  220. package/module/Quantity/Quantity.js +112 -129
  221. package/module/Quantity/Quantity.js.map +1 -2
  222. package/module/Quantity/index.js +3 -2
  223. package/module/Quantity/index.js.map +1 -2
  224. package/module/ReasonModal/ReasonModal.js.map +2 -1
  225. package/module/ReasonModal/index.js +5 -3
  226. package/module/ReasonModal/index.js.map +1 -2
  227. package/module/ScanButton/ScanButton.js +77 -53
  228. package/module/ScanButton/ScanButton.js.map +2 -1
  229. package/module/SearchInput/SearchInput.js +83 -93
  230. package/module/SearchInput/SearchInput.js.map +1 -2
  231. package/module/SheetTitle/SheetTitle.js +29 -39
  232. package/module/SheetTitle/SheetTitle.js.map +2 -1
  233. package/module/Shell/Shell.js +92 -79
  234. package/module/Shell/Shell.js.map +2 -1
  235. package/module/Shell/styles.js +8 -8
  236. package/module/Shell/styles.js.map +2 -1
  237. package/module/Shell/types.js +4 -2
  238. package/module/Shell/types.js.map +1 -2
  239. package/module/StatisticCard/StatisticCard.js +48 -79
  240. package/module/StatisticCard/StatisticCard.js.map +1 -2
  241. package/module/Status/Status.js.map +0 -1
  242. package/module/Steps/Steps.js +36 -41
  243. package/module/Steps/Steps.js.map +1 -2
  244. package/module/TabTitle/TabTitle.js.map +2 -1
  245. package/module/TableColumnHeader/TableColumnHeader.js +126 -153
  246. package/module/TableColumnHeader/index.js +8 -3
  247. package/module/TableColumnHeader/index.js.map +1 -2
  248. package/module/Tag/Tag.js +72 -87
  249. package/module/Tag/Tag.js.map +1 -2
  250. package/module/Task/Task.js +207 -113
  251. package/module/Task/Task.js.map +2 -1
  252. package/module/Task/type.js +8 -4
  253. package/module/Task/type.js.map +2 -1
  254. package/module/Text/Text.js +70 -80
  255. package/module/Text/Text.js.map +2 -1
  256. package/module/Theme/ThemeProvider.js.map +1 -2
  257. package/module/Toast/Toast.js +66 -77
  258. package/module/Toast/Toast.js.map +1 -2
  259. package/module/UserSwitcher/UserSwitcher.js +130 -171
  260. package/module/UserSwitcher/UserSwitcher.js.map +1 -2
  261. package/module/index.js +120 -131
  262. package/module/index.js.map +2 -1
  263. package/package.json +1 -1
@@ -1,131 +1,204 @@
1
1
  "use strict";
2
2
 
3
+ var __assign = void 0 && (void 0).__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = {
18
+ enumerable: true,
19
+ get: function () {
20
+ return m[k];
21
+ }
22
+ };
23
+ }
24
+ Object.defineProperty(o, k2, desc);
25
+ } : function (o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ });
29
+ var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) {
30
+ Object.defineProperty(o, "default", {
31
+ enumerable: true,
32
+ value: v
33
+ });
34
+ } : function (o, v) {
35
+ o["default"] = v;
36
+ });
37
+ var __importStar = void 0 && (void 0).__importStar || function () {
38
+ var ownKeys = function (o) {
39
+ ownKeys = Object.getOwnPropertyNames || function (o) {
40
+ var ar = [];
41
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
42
+ return ar;
43
+ };
44
+ return ownKeys(o);
45
+ };
46
+ return function (mod) {
47
+ if (mod && mod.__esModule) return mod;
48
+ var result = {};
49
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
50
+ __setModuleDefault(result, mod);
51
+ return result;
52
+ };
53
+ }();
54
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
55
+ var t = {};
56
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
57
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
59
+ }
60
+ return t;
61
+ };
62
+ var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
63
+ return mod && mod.__esModule ? mod : {
64
+ "default": mod
65
+ };
66
+ };
3
67
  Object.defineProperty(exports, "__esModule", {
4
68
  value: true
5
69
  });
6
- exports.setDropdownStateChangeListener = exports.default = exports.TapasDataCell = exports.DataCell = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _themed = require("@rneui/themed");
10
- var _TapasIcon = _interopRequireDefault(require("../Icons/TapasIcon"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
70
+ exports.setDropdownStateChangeListener = exports.TapasDataCell = exports.DataCell = void 0;
71
+ var react_1 = __importStar(require("react"));
72
+ var react_native_1 = require("react-native");
73
+ var themed_1 = require("@rneui/themed");
74
+ var TapasIcon_1 = __importDefault(require("../Icons/TapasIcon"));
15
75
  // import { TapasDropdown } from "../Dropdown/Dropdown";
16
-
17
76
  // 全局下拉菜单状态管理
18
- const globalDropdownState = {
77
+ var globalDropdownState = {
19
78
  activeColumn: null,
20
79
  activeRow: null,
21
- closeAll: () => {},
80
+ closeAll: function () {},
22
81
  onDropdownStateChange: undefined
23
82
  };
24
-
25
83
  // 注册和注销下拉菜单的函数
26
- const registerDropdown = (columnIndex, rowIndex, closeCallback) => {
84
+ var registerDropdown = function (columnIndex, rowIndex, closeCallback) {
85
+ var _a;
27
86
  globalDropdownState.activeColumn = columnIndex;
28
87
  globalDropdownState.activeRow = rowIndex;
29
88
  globalDropdownState.closeAll = closeCallback;
30
89
  // 通知状态变化
31
- globalDropdownState.onDropdownStateChange?.(columnIndex, rowIndex);
90
+ (_a = globalDropdownState.onDropdownStateChange) === null || _a === void 0 ? void 0 : _a.call(globalDropdownState, columnIndex, rowIndex);
32
91
  };
33
- const unregisterDropdown = () => {
92
+ var unregisterDropdown = function () {
93
+ var _a;
34
94
  globalDropdownState.activeColumn = null;
35
95
  globalDropdownState.activeRow = null;
36
- globalDropdownState.closeAll = () => {};
96
+ globalDropdownState.closeAll = function () {};
37
97
  // 通知状态变化
38
- globalDropdownState.onDropdownStateChange?.(null, null);
98
+ (_a = globalDropdownState.onDropdownStateChange) === null || _a === void 0 ? void 0 : _a.call(globalDropdownState, null, null);
39
99
  };
40
- const closeAllDropdowns = () => {
100
+ var closeAllDropdowns = function () {
41
101
  if (globalDropdownState.closeAll) {
42
102
  globalDropdownState.closeAll();
43
103
  }
44
104
  };
45
-
46
105
  // 设置下拉菜单状态变化监听器
47
- const setDropdownStateChangeListener = callback => {
106
+ var setDropdownStateChangeListener = function (callback) {
48
107
  globalDropdownState.onDropdownStateChange = callback;
49
108
  };
50
109
  exports.setDropdownStateChangeListener = setDropdownStateChangeListener;
51
- const TapasDataCell = ({
52
- value,
53
- dataType = "text",
54
- alignment = "left",
55
- columnIndex,
56
- rowIndex,
57
- fieldName,
58
- clickable = false,
59
- ellipsizeMode = "tail",
60
- numberOfLines = 1,
61
- textStyle,
62
- padding = {
63
- horizontal: 16,
64
- vertical: 8
65
- },
66
- statusConfig = {},
67
- actions = [],
68
- showActions = false,
69
- actionIcon = "more_vert",
70
- formatter,
71
- currencySymbol = "$",
72
- currencyPrecision = 2,
73
- dateFormat = "YYYY-MM-DD",
74
- booleanTrueText = "Yes",
75
- booleanFalseText = "No",
76
- emptyText = "-",
77
- onCellPress,
78
- onActionPress,
79
- attachMoreAction,
80
- onLongPress,
81
- disabled = false,
82
- minHeight = 40,
83
- isBlank = false,
84
- onDropdownStateChange,
85
- gridInfo,
86
- style,
87
- ...otherProps
88
- }) => {
89
- const styles = useStyles({
90
- alignment,
91
- padding,
92
- minHeight,
93
- disabled,
110
+ var TapasDataCell = function (_a) {
111
+ var value = _a.value,
112
+ _b = _a.dataType,
113
+ dataType = _b === void 0 ? "text" : _b,
114
+ _c = _a.alignment,
115
+ alignment = _c === void 0 ? "left" : _c,
116
+ columnIndex = _a.columnIndex,
117
+ rowIndex = _a.rowIndex,
118
+ fieldName = _a.fieldName,
119
+ _d = _a.clickable,
120
+ clickable = _d === void 0 ? false : _d,
121
+ _e = _a.ellipsizeMode,
122
+ ellipsizeMode = _e === void 0 ? "tail" : _e,
123
+ _f = _a.numberOfLines,
124
+ numberOfLines = _f === void 0 ? 1 : _f,
125
+ textStyle = _a.textStyle,
126
+ _g = _a.padding,
127
+ padding = _g === void 0 ? {
128
+ horizontal: 16,
129
+ vertical: 8
130
+ } : _g,
131
+ _h = _a.statusConfig,
132
+ statusConfig = _h === void 0 ? {} : _h,
133
+ _j = _a.actions,
134
+ actions = _j === void 0 ? [] : _j,
135
+ _k = _a.showActions,
136
+ showActions = _k === void 0 ? false : _k,
137
+ _l = _a.actionIcon,
138
+ actionIcon = _l === void 0 ? "more_vert" : _l,
139
+ formatter = _a.formatter,
140
+ _m = _a.currencySymbol,
141
+ currencySymbol = _m === void 0 ? "$" : _m,
142
+ _o = _a.currencyPrecision,
143
+ currencyPrecision = _o === void 0 ? 2 : _o,
144
+ _p = _a.dateFormat,
145
+ dateFormat = _p === void 0 ? "YYYY-MM-DD" : _p,
146
+ _q = _a.booleanTrueText,
147
+ booleanTrueText = _q === void 0 ? "Yes" : _q,
148
+ _r = _a.booleanFalseText,
149
+ booleanFalseText = _r === void 0 ? "No" : _r,
150
+ _s = _a.emptyText,
151
+ emptyText = _s === void 0 ? "-" : _s,
152
+ onCellPress = _a.onCellPress,
153
+ onActionPress = _a.onActionPress,
154
+ attachMoreAction = _a.attachMoreAction,
155
+ onLongPress = _a.onLongPress,
156
+ _t = _a.disabled,
157
+ disabled = _t === void 0 ? false : _t,
158
+ _u = _a.minHeight,
159
+ minHeight = _u === void 0 ? 40 : _u,
160
+ _v = _a.isBlank,
161
+ isBlank = _v === void 0 ? false : _v,
162
+ onDropdownStateChange = _a.onDropdownStateChange,
163
+ gridInfo = _a.gridInfo,
164
+ style = _a.style,
165
+ otherProps = __rest(_a, ["value", "dataType", "alignment", "columnIndex", "rowIndex", "fieldName", "clickable", "ellipsizeMode", "numberOfLines", "textStyle", "padding", "statusConfig", "actions", "showActions", "actionIcon", "formatter", "currencySymbol", "currencyPrecision", "dateFormat", "booleanTrueText", "booleanFalseText", "emptyText", "onCellPress", "onActionPress", "attachMoreAction", "onLongPress", "disabled", "minHeight", "isBlank", "onDropdownStateChange", "gridInfo", "style"]);
166
+ var styles = useStyles({
167
+ alignment: alignment,
168
+ padding: padding,
169
+ minHeight: minHeight,
170
+ disabled: disabled,
94
171
  clickable: clickable || !!onCellPress
95
172
  });
96
-
97
173
  // 格式化显示值
98
- const formattedValue = (0, _react.useMemo)(() => {
174
+ var formattedValue = (0, react_1.useMemo)(function () {
99
175
  if (isBlank || value === null || value === undefined) {
100
176
  return emptyText;
101
177
  }
102
-
103
178
  // 使用自定义格式化函数
104
179
  if (formatter) {
105
180
  return formatter(value, dataType);
106
181
  }
107
-
108
182
  // 内置格式化逻辑
109
183
  switch (dataType) {
110
184
  case "number":
111
185
  return typeof value === "number" ? value.toLocaleString() : String(value);
112
186
  case "currency":
113
187
  {
114
- const numValue = typeof value === "number" ? value : parseFloat(value);
188
+ var numValue = typeof value === "number" ? value : parseFloat(value);
115
189
  if (isNaN(numValue)) return emptyText;
116
- return `${currencySymbol}${numValue.toFixed(currencyPrecision)}`;
190
+ return "".concat(currencySymbol).concat(numValue.toFixed(currencyPrecision));
117
191
  }
118
192
  case "date":
119
193
  {
120
194
  if (!value) return emptyText;
121
- const date = new Date(value);
195
+ var date = new Date(value);
122
196
  if (isNaN(date.getTime())) return emptyText;
123
-
124
197
  // 简单的日期格式化
125
198
  if (dateFormat === "YYYY-MM-DD") {
126
199
  return date.toISOString().split('T')[0];
127
200
  } else if (dateFormat === "MM/DD/YYYY") {
128
- return `${(date.getMonth() + 1).toString().padStart(2, '0')}/${date.getDate().toString().padStart(2, '0')}/${date.getFullYear()}`;
201
+ return "".concat((date.getMonth() + 1).toString().padStart(2, '0'), "/").concat(date.getDate().toString().padStart(2, '0'), "/").concat(date.getFullYear());
129
202
  } else {
130
203
  return date.toLocaleDateString();
131
204
  }
@@ -140,13 +213,12 @@ const TapasDataCell = ({
140
213
  return String(value || emptyText);
141
214
  }
142
215
  }, [value, dataType, formatter, currencySymbol, currencyPrecision, dateFormat, booleanTrueText, booleanFalseText, emptyText, isBlank]);
143
-
144
216
  // 获取状态样式
145
- const getStatusStyle = (0, _react.useCallback)(() => {
217
+ var getStatusStyle = (0, react_1.useCallback)(function () {
146
218
  if (dataType !== "status" || !value || !statusConfig[value]) {
147
219
  return {};
148
220
  }
149
- const config = statusConfig[value];
221
+ var config = statusConfig[value];
150
222
  return {
151
223
  color: config.color,
152
224
  backgroundColor: config.backgroundColor,
@@ -158,69 +230,62 @@ const TapasDataCell = ({
158
230
  overflow: "hidden"
159
231
  };
160
232
  }, [dataType, value, statusConfig]);
161
-
162
233
  // 处理单元格点击
163
- const handleCellPress = (0, _react.useCallback)(() => {
234
+ var handleCellPress = (0, react_1.useCallback)(function () {
164
235
  if (disabled || isBlank) return;
165
- onCellPress?.(value, rowIndex, columnIndex, fieldName);
236
+ onCellPress === null || onCellPress === void 0 ? void 0 : onCellPress(value, rowIndex, columnIndex, fieldName);
166
237
  }, [disabled, isBlank, onCellPress, value, rowIndex, columnIndex, fieldName]);
167
-
168
238
  // 处理长按
169
- const handleLongPress = (0, _react.useCallback)(() => {
239
+ var handleLongPress = (0, react_1.useCallback)(function () {
170
240
  if (disabled || isBlank) return;
171
- onLongPress?.(value, rowIndex, columnIndex, fieldName);
241
+ onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(value, rowIndex, columnIndex, fieldName);
172
242
  }, [disabled, isBlank, onLongPress, value, rowIndex, columnIndex, fieldName]);
173
-
174
243
  // 处理操作按钮点击
175
- const handleActionPress = (0, _react.useCallback)(action => {
244
+ var handleActionPress = (0, react_1.useCallback)(function (action) {
176
245
  if (disabled || action.disabled) return;
177
- onActionPress?.(action, value, rowIndex, columnIndex);
246
+ onActionPress === null || onActionPress === void 0 ? void 0 : onActionPress(action, value, rowIndex, columnIndex);
178
247
  }, [disabled, onActionPress, value, rowIndex, columnIndex]);
179
-
180
248
  // 下拉菜单状态
181
- const [dropdownVisible, setDropdownVisible] = (0, _react.useState)(false);
182
- const [dropdownPosition, setDropdownPosition] = (0, _react.useState)({
183
- top: 32,
184
- right: 0
185
- });
186
-
249
+ var _w = (0, react_1.useState)(false),
250
+ dropdownVisible = _w[0],
251
+ setDropdownVisible = _w[1];
252
+ var _x = (0, react_1.useState)({
253
+ top: 32,
254
+ right: 0
255
+ }),
256
+ dropdownPosition = _x[0],
257
+ setDropdownPosition = _x[1];
187
258
  // 计算下拉菜单的最佳位置
188
- const calculateDropdownPosition = (0, _react.useCallback)(() => {
259
+ var calculateDropdownPosition = (0, react_1.useCallback)(function () {
189
260
  // 更准确地计算下拉菜单的实际高度
190
- const itemHeight = 32; // 每个选项的高度
191
- const borderWidth = 2; // 边框宽度
192
- const padding = 8; // 内边距
193
- const shadowHeight = 4; // 阴影高度
194
-
261
+ var itemHeight = 32; // 每个选项的高度
262
+ var borderWidth = 2; // 边框宽度
263
+ var padding = 8; // 内边距
264
+ var shadowHeight = 4; // 阴影高度
195
265
  // 考虑文本长度对高度的影响
196
- const maxTextLength = Math.max(...actions.map(action => action.label.length));
197
- const textHeightAdjustment = maxTextLength > 10 ? 4 : 0; // 长文本可能需要更多高度
198
-
266
+ var maxTextLength = Math.max.apply(Math, actions.map(function (action) {
267
+ return action.label.length;
268
+ }));
269
+ var textHeightAdjustment = maxTextLength > 10 ? 4 : 0; // 长文本可能需要更多高度
199
270
  // 计算下拉菜单的宽度(考虑文本长度)
200
271
  // const minWidth = 120; // 最小宽度
201
272
  // const textWidth = maxTextLength * 8; // 估算文本宽度
202
273
  // const _actualWidth = Math.max(minWidth, textWidth + 24); // 24px 为内边距和图标空间
203
-
204
- const actualHeight = actions.length * itemHeight + borderWidth + padding + shadowHeight + textHeightAdjustment;
205
- const buttonHeight = 32; // 按钮高度
206
- const cellHeight = gridInfo?.rowHeight || 56; // 使用传入的 rowHeight 或默认值
207
- const gridHeight = gridInfo?.gridHeight || 400; // 使用传入的 gridHeight 或默认值
208
-
274
+ var actualHeight = actions.length * itemHeight + borderWidth + padding + shadowHeight + textHeightAdjustment;
275
+ var buttonHeight = 32; // 按钮高度
276
+ var cellHeight = (gridInfo === null || gridInfo === void 0 ? void 0 : gridInfo.rowHeight) || 56; // 使用传入的 rowHeight 或默认值
277
+ var gridHeight = (gridInfo === null || gridInfo === void 0 ? void 0 : gridInfo.gridHeight) || 400; // 使用传入的 gridHeight 或默认值
209
278
  // 根据行索引估算当前单元格在 Grid 中的位置
210
- const currentRowIndex = rowIndex || 0;
211
-
279
+ var currentRowIndex = rowIndex || 0;
212
280
  // 计算当前单元格距离 Grid 底部的距离
213
- const currentCellBottom = (currentRowIndex + 1) * cellHeight;
214
- const spaceBelow = gridHeight - currentCellBottom;
215
-
281
+ var currentCellBottom = (currentRowIndex + 1) * cellHeight;
282
+ var spaceBelow = gridHeight - currentCellBottom;
216
283
  // 计算上方可用空间
217
- const currentCellTop = currentRowIndex * cellHeight;
218
- const spaceAbove = currentCellTop;
219
-
284
+ var currentCellTop = currentRowIndex * cellHeight;
285
+ var spaceAbove = currentCellTop;
220
286
  // 添加安全边距,确保下拉菜单不会紧贴边界
221
- const safetyMargin = 8;
222
- const requiredSpace = actualHeight + safetyMargin;
223
-
287
+ var safetyMargin = 8;
288
+ var requiredSpace = actualHeight + safetyMargin;
224
289
  // 智能选择显示位置
225
290
  if (requiredSpace > spaceBelow && requiredSpace <= spaceAbove) {
226
291
  // 下方空间不够,但上方空间足够,显示在上方
@@ -253,89 +318,79 @@ const TapasDataCell = ({
253
318
  };
254
319
  }
255
320
  }, [actions.length, rowIndex, gridInfo]);
256
-
257
321
  // 全局下拉菜单管理
258
- (0, _react.useEffect)(() => {
259
- const closeDropdown = () => {
322
+ (0, react_1.useEffect)(function () {
323
+ var closeDropdown = function () {
260
324
  setDropdownVisible(false);
261
325
  unregisterDropdown();
262
326
  };
263
-
264
327
  // 注册当前下拉菜单
265
328
  if (dropdownVisible) {
266
329
  registerDropdown(columnIndex || 0, rowIndex || 0, closeDropdown);
267
330
  } else {
268
331
  unregisterDropdown();
269
332
  }
270
-
271
333
  // 清理函数
272
- return () => {
334
+ return function () {
273
335
  unregisterDropdown();
274
336
  };
275
337
  }, [dropdownVisible, columnIndex, rowIndex]);
276
-
277
338
  // 通知父组件下拉菜单状态变化
278
- (0, _react.useEffect)(() => {
279
- onDropdownStateChange?.(dropdownVisible);
339
+ (0, react_1.useEffect)(function () {
340
+ onDropdownStateChange === null || onDropdownStateChange === void 0 ? void 0 : onDropdownStateChange(dropdownVisible);
280
341
  }, [dropdownVisible, onDropdownStateChange]);
281
-
282
342
  // 监听全局关闭事件
283
- (0, _react.useEffect)(() => {
343
+ (0, react_1.useEffect)(function () {
284
344
  // const _handleGlobalClose = () => {
285
345
  // if (globalDropdownState.activeColumn !== columnIndex ||
286
346
  // globalDropdownState.activeRow !== rowIndex) {
287
347
  // setDropdownVisible(false);
288
348
  // }
289
349
  // };
290
-
291
350
  // 这里可以添加全局事件监听器
292
351
  // 为了简化,我们在点击其他单元格时关闭当前下拉菜单
293
352
  }, [columnIndex, rowIndex]);
294
-
295
353
  // 渲染操作按钮
296
- const renderActions = () => {
354
+ var renderActions = function () {
297
355
  if (!showActions || actions.length === 0 || isBlank) {
298
356
  return null;
299
357
  }
300
-
301
358
  // 如果只有一个操作,直接显示图标按钮
302
359
  if (actions.length === 1) {
303
- const action = actions[0];
304
- if (!action) return null;
305
-
360
+ var action_1 = actions[0];
361
+ if (!action_1) return null;
306
362
  // 检查是否有文本内容,如果没有文本内容,按钮应该居中
307
- const hasTextContent = formattedValue && formattedValue.trim() !== '';
308
- const buttonStyle = hasTextContent ? [styles.actionButton, {
363
+ var hasTextContent = formattedValue && formattedValue.trim() !== '';
364
+ var buttonStyle = hasTextContent ? [styles.actionButton, {
309
365
  marginLeft: 8
310
366
  }] : styles.actionButton;
311
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
367
+ return react_1.default.createElement(react_native_1.Pressable, {
312
368
  style: buttonStyle,
313
- onPress: event => {
369
+ onPress: function (event) {
314
370
  // 阻止事件冒泡,避免触发外层的 attachCellPress
315
371
  event.stopPropagation();
316
372
  if (attachMoreAction) {
317
- attachMoreAction(action);
373
+ attachMoreAction(action_1);
318
374
  } else {
319
- handleActionPress(action);
375
+ handleActionPress(action_1);
320
376
  }
321
377
  },
322
- disabled: disabled || action.disabled
323
- }, /*#__PURE__*/_react.default.createElement(_TapasIcon.default, {
324
- name: action.icon || actionIcon,
378
+ disabled: disabled || action_1.disabled
379
+ }, react_1.default.createElement(TapasIcon_1.default, {
380
+ name: action_1.icon || actionIcon,
325
381
  size: 16,
326
382
  color: styles.actionIcon.color
327
383
  }));
328
384
  }
329
-
330
385
  // 多个操作显示下拉菜单
331
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
386
+ return react_1.default.createElement(react_native_1.View, {
332
387
  style: [styles.dropdownContainer, {
333
388
  // 只有当前激活的下拉菜单容器才有高 z-index
334
389
  zIndex: globalDropdownState.activeColumn === columnIndex && globalDropdownState.activeRow === rowIndex ? 2147483646 : 1
335
390
  }]
336
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
391
+ }, react_1.default.createElement(react_native_1.Pressable, {
337
392
  style: styles.actionButton,
338
- onPress: event => {
393
+ onPress: function (event) {
339
394
  // 阻止事件冒泡,避免触发外层的 attachCellPress
340
395
  event.stopPropagation();
341
396
  if (dropdownVisible) {
@@ -344,185 +399,76 @@ const TapasDataCell = ({
344
399
  } else {
345
400
  // 如果当前下拉菜单关闭,先关闭其他所有下拉菜单,然后打开当前菜单
346
401
  closeAllDropdowns();
347
-
348
402
  // 计算并设置下拉菜单位置
349
403
  setDropdownPosition(calculateDropdownPosition());
350
-
351
404
  // 延迟打开当前下拉菜单,确保其他菜单已关闭
352
- setTimeout(() => {
405
+ setTimeout(function () {
353
406
  setDropdownVisible(true);
354
407
  }, 0);
355
408
  }
356
409
  },
357
410
  disabled: disabled
358
- }, /*#__PURE__*/_react.default.createElement(_TapasIcon.default, {
411
+ }, react_1.default.createElement(TapasIcon_1.default, {
359
412
  name: actionIcon,
360
413
  size: 16,
361
414
  color: styles.actionIcon.color
362
- })), dropdownVisible && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
415
+ })), dropdownVisible && react_1.default.createElement(react_native_1.View, {
363
416
  style: [styles.dropdownMenu, {
364
417
  top: dropdownPosition.top,
365
418
  right: dropdownPosition.right
366
419
  }]
367
- }, actions.map((action, index) => /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
368
- key: action.id,
369
- style: [styles.dropdownItem, index === actions.length - 1 && styles.dropdownItemLast],
370
- onPress: event => {
371
- // 阻止事件冒泡,避免触发外层的 attachCellPress
372
- event.stopPropagation();
373
- if (attachMoreAction) {
374
- attachMoreAction(action);
375
- } else {
376
- handleActionPress(action);
377
- }
378
- setDropdownVisible(false);
379
- },
380
- disabled: disabled || action.disabled
381
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
382
- style: [styles.dropdownItemText, action.disabled && styles.dropdownItemDisabled]
383
- }, action.label)))));
420
+ }, actions.map(function (action, index) {
421
+ return react_1.default.createElement(react_native_1.Pressable, {
422
+ key: action.id,
423
+ style: [styles.dropdownItem, index === actions.length - 1 && styles.dropdownItemLast],
424
+ onPress: function (event) {
425
+ // 阻止事件冒泡,避免触发外层的 attachCellPress
426
+ event.stopPropagation();
427
+ if (attachMoreAction) {
428
+ attachMoreAction(action);
429
+ } else {
430
+ handleActionPress(action);
431
+ }
432
+ setDropdownVisible(false);
433
+ },
434
+ disabled: disabled || action.disabled
435
+ }, react_1.default.createElement(react_native_1.Text, {
436
+ style: [styles.dropdownItemText, action.disabled && styles.dropdownItemDisabled]
437
+ }, action.label));
438
+ })));
384
439
  };
385
-
386
440
  // 渲染内容
387
- const renderContent = () => {
441
+ var renderContent = function () {
388
442
  if (isBlank) {
389
443
  return null;
390
444
  }
391
- const statusStyle = getStatusStyle();
392
- const hasStatusStyle = Object.keys(statusStyle).length > 0;
393
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
445
+ var statusStyle = getStatusStyle();
446
+ var hasStatusStyle = Object.keys(statusStyle).length > 0;
447
+ return react_1.default.createElement(react_native_1.View, {
394
448
  style: styles.content
395
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
449
+ }, react_1.default.createElement(react_native_1.Text, {
396
450
  style: [styles.text, hasStatusStyle && statusStyle, textStyle],
397
451
  numberOfLines: numberOfLines,
398
452
  ellipsizeMode: ellipsizeMode
399
453
  }, formattedValue), renderActions());
400
454
  };
401
-
402
455
  // 如果可点击,使用 Pressable
403
456
  if (clickable || onCellPress || onLongPress) {
404
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({}, otherProps, {
457
+ return react_1.default.createElement(react_native_1.Pressable, __assign({}, otherProps, {
405
458
  style: [styles.container, style],
406
459
  onPress: handleCellPress,
407
460
  onLongPress: handleLongPress,
408
461
  disabled: disabled
409
462
  }), renderContent());
410
463
  }
411
-
412
464
  // 否则使用普通 View
413
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, otherProps, {
465
+ return react_1.default.createElement(react_native_1.View, __assign({}, otherProps, {
414
466
  style: [styles.container, style]
415
467
  }), renderContent());
416
468
  };
417
469
  exports.TapasDataCell = TapasDataCell;
418
- const useStyles = (0, _themed.makeStyles)((theme, props) => {
419
- const alignment = props?.alignment || "left";
420
- const paddingHorizontal = props?.padding?.horizontal || 16;
421
- const paddingVertical = props?.padding?.vertical || 8;
422
- const minHeight = props?.minHeight || 40;
423
- const disabled = props?.disabled || false;
424
- const clickable = props?.clickable || false;
425
- const justifyContent = alignment === "left" ? "flex-start" : alignment === "right" ? "flex-end" : "center";
426
- return {
427
- container: {
428
- minHeight,
429
- paddingHorizontal,
430
- paddingVertical,
431
- backgroundColor: disabled ? theme?.colors?.grey5 || "#f8f9fa" : "transparent",
432
- opacity: disabled ? 0.6 : 1,
433
- borderBottomWidth: 0,
434
- // 移除边框,让 Grid 处理边框
435
- borderBottomColor: "transparent",
436
- display: "flex",
437
- flexDirection: "row",
438
- alignItems: "center",
439
- justifyContent: "space-between",
440
- width: "100%",
441
- height: "100%",
442
- // 确保下拉菜单不被截断
443
- overflow: "visible"
444
- },
445
- content: {
446
- flex: 1,
447
- flexDirection: "row",
448
- alignItems: "center",
449
- justifyContent: "space-between",
450
- height: "100%",
451
- minHeight
452
- },
453
- text: {
454
- flex: 1,
455
- fontSize: theme?.fonts?.sizeM || 14,
456
- fontWeight: "400",
457
- color: theme?.colors?.colorTextPrimary || theme?.colors?.grey1 || "#333",
458
- textAlign: alignment,
459
- alignSelf: justifyContent === "flex-start" ? "flex-start" : justifyContent === "flex-end" ? "flex-end" : "center"
460
- },
461
- actionButton: {
462
- padding: 4,
463
- borderRadius: 4,
464
- backgroundColor: clickable ? "transparent" : theme?.colors?.grey5 || "#f8f9fa",
465
- display: "flex",
466
- alignItems: "center",
467
- justifyContent: "center",
468
- minWidth: 24,
469
- minHeight: 24
470
- },
471
- actionIcon: {
472
- color: theme?.colors?.grey2 || "#999"
473
- },
474
- dropdownContainer: {
475
- position: "relative",
476
- // 默认使用较低的 z-index,只有激活的下拉菜单容器才有高 z-index
477
- zIndex: 1,
478
- // 确保容器本身不会创建新的 stacking context
479
- isolation: "auto"
480
- },
481
- dropdownMenu: {
482
- position: "absolute",
483
- // 使用绝对定位
484
- backgroundColor: theme?.colors?.background || "#fff",
485
- borderRadius: 4,
486
- borderWidth: 1,
487
- borderColor: theme?.colors?.grey4 || "#e0e0e0",
488
- shadowColor: "#000",
489
- shadowOffset: {
490
- width: 0,
491
- height: 2
492
- },
493
- shadowOpacity: 0.25,
494
- shadowRadius: 3.84,
495
- elevation: 5,
496
- minWidth: 120,
497
- zIndex: 2147483647,
498
- // 更高的 z-index,确保显示在所有元素之上
499
- // 确保下拉菜单不被父容器的 overflow 隐藏
500
- overflow: "visible",
501
- // 确保下拉菜单在正确的层级上
502
- isolation: "isolate"
503
- },
504
- dropdownItem: {
505
- paddingHorizontal: 12,
506
- paddingVertical: 8,
507
- borderBottomWidth: 1,
508
- borderBottomColor: theme?.colors?.grey4 || "#e0e0e0"
509
- },
510
- dropdownItemLast: {
511
- borderBottomWidth: 0
512
- },
513
- dropdownItemText: {
514
- fontSize: 14,
515
- color: theme?.colors?.colorTextPrimary || theme?.colors?.grey1 || "#333"
516
- },
517
- dropdownItemDisabled: {
518
- color: theme?.colors?.grey3 || "#999",
519
- opacity: 0.6
520
- }
521
- };
522
- });
523
- var _default = exports.default = (0, _themed.withTheme)(TapasDataCell); // Export aliases for compatibility
524
- const DataCell = exports.DataCell = (0, _themed.withTheme)(TapasDataCell);
525
- //# sourceMappingURL=DataCell.js.map, _j, _k, _l, _m, _o, _p;
470
+ var useStyles = (0, themed_1.makeStyles)(function (theme, props) {
471
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
526
472
  var alignment = (props === null || props === void 0 ? void 0 : props.alignment) || "left";
527
473
  var paddingHorizontal = ((_a = props === null || props === void 0 ? void 0 : props.padding) === null || _a === void 0 ? void 0 : _a.horizontal) || 16;
528
474
  var paddingVertical = ((_b = props === null || props === void 0 ? void 0 : props.padding) === null || _b === void 0 ? void 0 : _b.vertical) || 8;