@tachybase/components 0.23.17 → 0.23.20

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 (40) hide show
  1. package/lib/__builtins__/portal.js +12 -18
  2. package/lib/__builtins__/sort.js +6 -15
  3. package/lib/array-base/index.js +31 -26
  4. package/lib/array-cards/index.js +48 -38
  5. package/lib/array-collapse/index.js +69 -60
  6. package/lib/array-items/index.js +29 -26
  7. package/lib/array-table/index.js +74 -65
  8. package/lib/array-tabs/index.js +7 -16
  9. package/lib/cascader/index.js +2 -12
  10. package/lib/code-mirror/index.js +4 -3
  11. package/lib/editable/index.js +20 -8
  12. package/lib/form/index.js +4 -3
  13. package/lib/form-button-group/index.d.ts +2 -2
  14. package/lib/form-button-group/index.js +24 -23
  15. package/lib/form-collapse/index.js +8 -7
  16. package/lib/form-dialog/index.js +8 -7
  17. package/lib/form-drawer/index.js +5 -4
  18. package/lib/form-grid/index.js +8 -7
  19. package/lib/form-item/hooks/useFormItemLayout.d.ts +1 -1
  20. package/lib/form-item/hooks/useFormItemLayout.js +2 -12
  21. package/lib/form-item/index.js +82 -61
  22. package/lib/form-layout/index.d.ts +1 -1
  23. package/lib/form-layout/index.js +4 -3
  24. package/lib/form-step/index.js +12 -8
  25. package/lib/form-tab/index.js +10 -9
  26. package/lib/input/index.js +2 -12
  27. package/lib/lightbox/react-image-lightbox.d.ts +2 -2
  28. package/lib/lightbox/react-image-lightbox.js +135 -125
  29. package/lib/password/PasswordStrength.js +3 -12
  30. package/lib/password/index.js +32 -37
  31. package/lib/preview-text/index.js +32 -19
  32. package/lib/reset/index.js +5 -15
  33. package/lib/select/index.js +2 -12
  34. package/lib/select-table/hooks/useTitleAddon.d.ts +1 -2
  35. package/lib/select-table/hooks/useTitleAddon.js +4 -14
  36. package/lib/select-table/index.js +71 -66
  37. package/lib/submit/index.js +5 -15
  38. package/lib/tree-select/index.js +2 -12
  39. package/lib/upload/index.js +10 -3
  40. package/package.json +2 -2
@@ -32,7 +32,8 @@ __export(form_tab_exports, {
32
32
  default: () => form_tab_default
33
33
  });
34
34
  module.exports = __toCommonJS(form_tab_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_react = require("react");
36
37
  var import_schema = require("@tachybase/schema");
37
38
  var import_antd = require("antd");
38
39
  var import_classnames = __toESM(require("classnames"));
@@ -90,9 +91,9 @@ const FeedbackBadge = (0, import_schema.observer)((props) => {
90
91
  address: `${field.address.concat(props.name)}.*`
91
92
  });
92
93
  if (errors.length) {
93
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Badge, { size: "small", className: "errors-badge", count: errors.length }, props.tab);
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Badge, { size: "small", className: "errors-badge", count: errors.length, children: props.tab });
94
95
  }
95
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, props.tab);
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.tab });
96
97
  });
97
98
  const createFormTab = /* @__PURE__ */ __name((defaultActiveKey) => {
98
99
  const formTab = (0, import_schema.model)({
@@ -111,11 +112,11 @@ const FormTab = (0, import_schema.observer)(({ formTab, ...props }) => {
111
112
  }, []);
112
113
  const prefixCls = (0, import_builtins.usePrefixCls)("formily-tab", props);
113
114
  const activeKey = props.activeKey || (_formTab == null ? void 0 : _formTab.activeKey);
114
- return /* @__PURE__ */ import_react.default.createElement(
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
115
116
  import_antd.Tabs,
116
117
  {
117
118
  ...props,
118
- tabBarExtraContent: /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, tabExtraContent.map(({ schema, name }, key) => /* @__PURE__ */ import_react.default.createElement(import_schema.RecursionField, { key, schema, name }))),
119
+ tabBarExtraContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: tabExtraContent.map(({ schema, name }, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_schema.RecursionField, { schema, name }, key)) }),
119
120
  className: (0, import_classnames.default)(prefixCls, props.className),
120
121
  activeKey,
121
122
  onChange: (key) => {
@@ -126,19 +127,19 @@ const FormTab = (0, import_schema.observer)(({ formTab, ...props }) => {
126
127
  items: tabs.map(({ props: props2, schema, name }, key) => {
127
128
  return {
128
129
  key,
129
- label: /* @__PURE__ */ import_react.default.createElement(FeedbackBadge, { name, tab: props2.tab }),
130
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FeedbackBadge, { name, tab: props2.tab }),
130
131
  ...props2,
131
- children: /* @__PURE__ */ import_react.default.createElement(import_schema.RecursionField, { schema, name })
132
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_schema.RecursionField, { schema, name })
132
133
  };
133
134
  })
134
135
  }
135
136
  );
136
137
  });
137
138
  const TabPane = /* @__PURE__ */ __name(({ children }) => {
138
- return /* @__PURE__ */ import_react.default.createElement(import_react.Fragment, null, children);
139
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children });
139
140
  }, "TabPane");
140
141
  const TabExtraContent = /* @__PURE__ */ __name(({ children }) => {
141
- return /* @__PURE__ */ import_react.default.createElement(import_react.Fragment, null, children);
142
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children });
142
143
  }, "TabExtraContent");
143
144
  FormTab.TabPane = TabPane;
144
145
  FormTab.TabExtraContent = TabExtraContent;
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
  var input_exports = {};
29
19
  __export(input_exports, {
@@ -31,7 +21,7 @@ __export(input_exports, {
31
21
  default: () => input_default
32
22
  });
33
23
  module.exports = __toCommonJS(input_exports);
34
- var import_react = __toESM(require("react"));
24
+ var import_jsx_runtime = require("react/jsx-runtime");
35
25
  var import_schema = require("@tachybase/schema");
36
26
  var import_icons = require("@ant-design/icons");
37
27
  var import_antd = require("antd");
@@ -41,7 +31,7 @@ const InternalInput = (0, import_schema.connect)(
41
31
  (0, import_schema.mapProps)((props, field) => {
42
32
  return {
43
33
  ...props,
44
- suffix: /* @__PURE__ */ import_react.default.createElement("span", null, (field == null ? void 0 : field["loading"]) || (field == null ? void 0 : field["validating"]) ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null) : props.suffix)
34
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: (field == null ? void 0 : field["loading"]) || (field == null ? void 0 : field["validating"]) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}) : props.suffix })
45
35
  };
46
36
  }),
47
37
  (0, import_schema.mapReadPretty)(import_preview_text.PreviewText.Input)
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import { Component } from 'react';
2
2
  import './style.css';
3
3
  import { IReactImageLightboxProps, IReactImageLightboxState } from './interface';
4
4
  declare class ReactImageLightbox extends Component<IReactImageLightboxProps, IReactImageLightboxState> {
@@ -192,6 +192,6 @@ declare class ReactImageLightbox extends Component<IReactImageLightboxProps, IRe
192
192
  requestMove(direction: any, event: any): void;
193
193
  requestMoveNext(event?: any): void;
194
194
  requestMovePrev(event?: any): void;
195
- render(): React.JSX.Element;
195
+ render(): import("react/jsx-runtime").JSX.Element;
196
196
  }
197
197
  export default ReactImageLightbox;
@@ -33,6 +33,7 @@ __export(react_image_lightbox_exports, {
33
33
  default: () => react_image_lightbox_default
34
34
  });
35
35
  module.exports = __toCommonJS(react_image_lightbox_exports);
36
+ var import_jsx_runtime = require("react/jsx-runtime");
36
37
  var import_react = __toESM(require("react"));
37
38
  var import_prop_types = __toESM(require("prop-types"));
38
39
  var import_react_modal = __toESM(require("react-modal"));
@@ -1057,7 +1058,7 @@ const _ReactImageLightbox = class _ReactImageLightbox extends import_react.Compo
1057
1058
  imageStyle.cursor = "move";
1058
1059
  }
1059
1060
  images.push(
1060
- /* @__PURE__ */ import_react.default.createElement(
1061
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1061
1062
  "div",
1062
1063
  {
1063
1064
  className: `${imageClass} ril__image`,
@@ -1068,17 +1069,17 @@ const _ReactImageLightbox = class _ReactImageLightbox extends import_react.Compo
1068
1069
  display: "flex",
1069
1070
  justifyContent: "center",
1070
1071
  alignItems: "center"
1071
- }
1072
- },
1073
- checkedComponent({
1074
- key: `${fieldType + keyEndings[srcType]}`,
1075
- onDoubleClick: this.handleImageDoubleClick,
1076
- onWheel: this.handleImageMouseWheel,
1077
- onDragStart: /* @__PURE__ */ __name((e) => e.preventDefault(), "onDragStart"),
1078
- file: this.props[srcType],
1079
- bestImageInfo,
1080
- mimetype: fieldType
1081
- })
1072
+ },
1073
+ children: checkedComponent({
1074
+ key: `${fieldType + keyEndings[srcType]}`,
1075
+ onDoubleClick: this.handleImageDoubleClick,
1076
+ onWheel: this.handleImageMouseWheel,
1077
+ onDragStart: /* @__PURE__ */ __name((e) => e.preventDefault(), "onDragStart"),
1078
+ file: this.props[srcType],
1079
+ bestImageInfo,
1080
+ mimetype: fieldType
1081
+ })
1082
+ }
1082
1083
  )
1083
1084
  );
1084
1085
  }, "addImage");
@@ -1116,7 +1117,7 @@ const _ReactImageLightbox = class _ReactImageLightbox extends import_react.Compo
1116
1117
  // Allow style overrides via props
1117
1118
  }
1118
1119
  };
1119
- return /* @__PURE__ */ import_react.default.createElement(
1120
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1120
1121
  import_react_modal.default,
1121
1122
  {
1122
1123
  isOpen: true,
@@ -1130,122 +1131,131 @@ const _ReactImageLightbox = class _ReactImageLightbox extends import_react.Compo
1130
1131
  style: modalStyle,
1131
1132
  contentLabel: (0, import_util.translate)("Lightbox"),
1132
1133
  appElement: typeof global.window !== "undefined" ? global.window.document.body : void 0,
1133
- ...reactModalProps
1134
- },
1135
- /* @__PURE__ */ import_react.default.createElement(
1136
- "div",
1137
- {
1138
- className: `ril-outer ril__outer ril__outerAnimating ${this.props.wrapperClassName} ${isClosing ? "ril-closing ril__outerClosing" : ""}`,
1139
- style: {
1140
- transition: `opacity ${animationDuration}ms`,
1141
- animationDuration: `${animationDuration}ms`,
1142
- animationDirection: isClosing ? "normal" : "reverse"
1143
- },
1144
- ref: this.outerEl,
1145
- onWheel: this.handleOuterMousewheel,
1146
- onMouseMove: this.handleMouseMove,
1147
- onMouseDown: this.handleMouseDown,
1148
- onTouchStart: this.handleTouchStart,
1149
- onTouchMove: this.handleTouchMove,
1150
- tabIndex: "-1",
1151
- onKeyDown: this.handleKeyInput,
1152
- onKeyUp: this.handleKeyInput
1153
- },
1154
- /* @__PURE__ */ import_react.default.createElement(
1134
+ ...reactModalProps,
1135
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1155
1136
  "div",
1156
1137
  {
1157
- className: "ril-inner ril__inner",
1158
- onClick: clickOutsideToClose ? this.closeIfClickInner : void 0
1159
- },
1160
- images
1161
- ),
1162
- prevSrc && /* @__PURE__ */ import_react.default.createElement(
1163
- "button",
1164
- {
1165
- type: "button",
1166
- className: "ril-prev-button ril__navButtons ril__navButtonPrev",
1167
- key: "prev",
1168
- "aria-label": this.props.prevLabel,
1169
- title: this.props.prevLabel,
1170
- onClick: !this.isAnimating() ? this.requestMovePrev : void 0
1171
- }
1172
- ),
1173
- nextSrc && /* @__PURE__ */ import_react.default.createElement(
1174
- "button",
1175
- {
1176
- type: "button",
1177
- className: "ril-next-button ril__navButtons ril__navButtonNext",
1178
- key: "next",
1179
- "aria-label": this.props.nextLabel,
1180
- title: this.props.nextLabel,
1181
- onClick: !this.isAnimating() ? this.requestMoveNext : void 0
1138
+ className: `ril-outer ril__outer ril__outerAnimating ${this.props.wrapperClassName} ${isClosing ? "ril-closing ril__outerClosing" : ""}`,
1139
+ style: {
1140
+ transition: `opacity ${animationDuration}ms`,
1141
+ animationDuration: `${animationDuration}ms`,
1142
+ animationDirection: isClosing ? "normal" : "reverse"
1143
+ },
1144
+ ref: this.outerEl,
1145
+ onWheel: this.handleOuterMousewheel,
1146
+ onMouseMove: this.handleMouseMove,
1147
+ onMouseDown: this.handleMouseDown,
1148
+ onTouchStart: this.handleTouchStart,
1149
+ onTouchMove: this.handleTouchMove,
1150
+ tabIndex: "-1",
1151
+ onKeyDown: this.handleKeyInput,
1152
+ onKeyUp: this.handleKeyInput,
1153
+ children: [
1154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1155
+ "div",
1156
+ {
1157
+ className: "ril-inner ril__inner",
1158
+ onClick: clickOutsideToClose ? this.closeIfClickInner : void 0,
1159
+ children: images
1160
+ }
1161
+ ),
1162
+ prevSrc && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1163
+ "button",
1164
+ {
1165
+ type: "button",
1166
+ className: "ril-prev-button ril__navButtons ril__navButtonPrev",
1167
+ "aria-label": this.props.prevLabel,
1168
+ title: this.props.prevLabel,
1169
+ onClick: !this.isAnimating() ? this.requestMovePrev : void 0
1170
+ },
1171
+ "prev"
1172
+ ),
1173
+ nextSrc && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1174
+ "button",
1175
+ {
1176
+ type: "button",
1177
+ className: "ril-next-button ril__navButtons ril__navButtonNext",
1178
+ "aria-label": this.props.nextLabel,
1179
+ title: this.props.nextLabel,
1180
+ onClick: !this.isAnimating() ? this.requestMoveNext : void 0
1181
+ },
1182
+ "next"
1183
+ ),
1184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1185
+ "div",
1186
+ {
1187
+ className: "ril-toolbar ril__toolbar",
1188
+ children: [
1189
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "ril-toolbar-left ril__toolbarSide ril__toolbarLeftSide", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "ril-toolbar__item ril__toolbarItem", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ril-toolbar__item__child ril__toolbarItemChild", children: imageTitle }) }) }),
1190
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { className: "ril-toolbar-right ril__toolbarSide ril__toolbarRightSide", children: [
1191
+ toolbarButtons && toolbarButtons.map((button, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "ril-toolbar__item ril__toolbarItem", children: button }, `button_${i + 1}`)),
1192
+ enableZoom && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "ril-toolbar__item ril__toolbarItem", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1193
+ "button",
1194
+ {
1195
+ type: "button",
1196
+ "aria-label": this.props.zoomInLabel,
1197
+ title: this.props.zoomInLabel,
1198
+ className: [
1199
+ "ril-zoom-in",
1200
+ "ril__toolbarItemChild",
1201
+ "ril__builtinButton",
1202
+ "ril__zoomInButton",
1203
+ ...zoomLevel === import_constant.MAX_ZOOM_LEVEL ? ["ril__builtinButtonDisabled"] : []
1204
+ ].join(" "),
1205
+ ref: this.zoomInBtn,
1206
+ disabled: this.isAnimating() || zoomLevel === import_constant.MAX_ZOOM_LEVEL,
1207
+ onClick: !this.isAnimating() && zoomLevel !== import_constant.MAX_ZOOM_LEVEL ? this.handleZoomInButtonClick : void 0
1208
+ },
1209
+ "zoom-in"
1210
+ ) }),
1211
+ enableZoom && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "ril-toolbar__item ril__toolbarItem", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1212
+ "button",
1213
+ {
1214
+ type: "button",
1215
+ "aria-label": this.props.zoomOutLabel,
1216
+ title: this.props.zoomOutLabel,
1217
+ className: [
1218
+ "ril-zoom-out",
1219
+ "ril__toolbarItemChild",
1220
+ "ril__builtinButton",
1221
+ "ril__zoomOutButton",
1222
+ ...zoomLevel === import_constant.MIN_ZOOM_LEVEL ? ["ril__builtinButtonDisabled"] : []
1223
+ ].join(" "),
1224
+ ref: this.zoomOutBtn,
1225
+ disabled: this.isAnimating() || zoomLevel === import_constant.MIN_ZOOM_LEVEL,
1226
+ onClick: !this.isAnimating() && zoomLevel !== import_constant.MIN_ZOOM_LEVEL ? this.handleZoomOutButtonClick : void 0
1227
+ },
1228
+ "zoom-out"
1229
+ ) }),
1230
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "ril-toolbar__item ril__toolbarItem", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1231
+ "button",
1232
+ {
1233
+ type: "button",
1234
+ "aria-label": this.props.closeLabel,
1235
+ title: this.props.closeLabel,
1236
+ className: "ril-close ril-toolbar__item__child ril__toolbarItemChild ril__builtinButton ril__closeButton",
1237
+ onClick: !this.isAnimating() ? this.requestClose : void 0
1238
+ },
1239
+ "close"
1240
+ ) })
1241
+ ] })
1242
+ ]
1243
+ }
1244
+ ),
1245
+ this.props.imageCaption && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1246
+ "div",
1247
+ {
1248
+ onWheel: this.handleCaptionMousewheel,
1249
+ onMouseDown: (event) => event.stopPropagation(),
1250
+ className: "ril-caption ril__caption",
1251
+ ref: this.caption,
1252
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ril-caption-content ril__captionContent", children: this.props.imageCaption })
1253
+ }
1254
+ )
1255
+ ]
1182
1256
  }
1183
- ),
1184
- /* @__PURE__ */ import_react.default.createElement(
1185
- "div",
1186
- {
1187
- className: "ril-toolbar ril__toolbar"
1188
- },
1189
- /* @__PURE__ */ import_react.default.createElement("ul", { className: "ril-toolbar-left ril__toolbarSide ril__toolbarLeftSide" }, /* @__PURE__ */ import_react.default.createElement("li", { className: "ril-toolbar__item ril__toolbarItem" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "ril-toolbar__item__child ril__toolbarItemChild" }, imageTitle))),
1190
- /* @__PURE__ */ import_react.default.createElement("ul", { className: "ril-toolbar-right ril__toolbarSide ril__toolbarRightSide" }, toolbarButtons && toolbarButtons.map((button, i) => /* @__PURE__ */ import_react.default.createElement("li", { key: `button_${i + 1}`, className: "ril-toolbar__item ril__toolbarItem" }, button)), enableZoom && /* @__PURE__ */ import_react.default.createElement("li", { className: "ril-toolbar__item ril__toolbarItem" }, /* @__PURE__ */ import_react.default.createElement(
1191
- "button",
1192
- {
1193
- type: "button",
1194
- key: "zoom-in",
1195
- "aria-label": this.props.zoomInLabel,
1196
- title: this.props.zoomInLabel,
1197
- className: [
1198
- "ril-zoom-in",
1199
- "ril__toolbarItemChild",
1200
- "ril__builtinButton",
1201
- "ril__zoomInButton",
1202
- ...zoomLevel === import_constant.MAX_ZOOM_LEVEL ? ["ril__builtinButtonDisabled"] : []
1203
- ].join(" "),
1204
- ref: this.zoomInBtn,
1205
- disabled: this.isAnimating() || zoomLevel === import_constant.MAX_ZOOM_LEVEL,
1206
- onClick: !this.isAnimating() && zoomLevel !== import_constant.MAX_ZOOM_LEVEL ? this.handleZoomInButtonClick : void 0
1207
- }
1208
- )), enableZoom && /* @__PURE__ */ import_react.default.createElement("li", { className: "ril-toolbar__item ril__toolbarItem" }, /* @__PURE__ */ import_react.default.createElement(
1209
- "button",
1210
- {
1211
- type: "button",
1212
- key: "zoom-out",
1213
- "aria-label": this.props.zoomOutLabel,
1214
- title: this.props.zoomOutLabel,
1215
- className: [
1216
- "ril-zoom-out",
1217
- "ril__toolbarItemChild",
1218
- "ril__builtinButton",
1219
- "ril__zoomOutButton",
1220
- ...zoomLevel === import_constant.MIN_ZOOM_LEVEL ? ["ril__builtinButtonDisabled"] : []
1221
- ].join(" "),
1222
- ref: this.zoomOutBtn,
1223
- disabled: this.isAnimating() || zoomLevel === import_constant.MIN_ZOOM_LEVEL,
1224
- onClick: !this.isAnimating() && zoomLevel !== import_constant.MIN_ZOOM_LEVEL ? this.handleZoomOutButtonClick : void 0
1225
- }
1226
- )), /* @__PURE__ */ import_react.default.createElement("li", { className: "ril-toolbar__item ril__toolbarItem" }, /* @__PURE__ */ import_react.default.createElement(
1227
- "button",
1228
- {
1229
- type: "button",
1230
- key: "close",
1231
- "aria-label": this.props.closeLabel,
1232
- title: this.props.closeLabel,
1233
- className: "ril-close ril-toolbar__item__child ril__toolbarItemChild ril__builtinButton ril__closeButton",
1234
- onClick: !this.isAnimating() ? this.requestClose : void 0
1235
- }
1236
- )))
1237
- ),
1238
- this.props.imageCaption && /* @__PURE__ */ import_react.default.createElement(
1239
- "div",
1240
- {
1241
- onWheel: this.handleCaptionMousewheel,
1242
- onMouseDown: (event) => event.stopPropagation(),
1243
- className: "ril-caption ril__caption",
1244
- ref: this.caption
1245
- },
1246
- /* @__PURE__ */ import_react.default.createElement("div", { className: "ril-caption-content ril__captionContent" }, this.props.imageCaption)
1247
1257
  )
1248
- )
1258
+ }
1249
1259
  );
1250
1260
  }
1251
1261
  };
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
6
  var __export = (target, all) => {
@@ -17,21 +15,14 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var PasswordStrength_exports = {};
30
20
  __export(PasswordStrength_exports, {
31
21
  PasswordStrength: () => PasswordStrength
32
22
  });
33
23
  module.exports = __toCommonJS(PasswordStrength_exports);
34
- var import_react = __toESM(require("react"));
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_react = require("react");
35
26
  var import_schema = require("@tachybase/schema");
36
27
  const isNum = /* @__PURE__ */ __name(function(c) {
37
28
  return c >= 48 && c <= 57;
@@ -179,7 +170,7 @@ const PasswordStrength = /* @__PURE__ */ __name((props) => {
179
170
  if ((0, import_schema.isFn)(props.children)) {
180
171
  return props.children(getStrength(String(props.value)));
181
172
  } else {
182
- return /* @__PURE__ */ import_react.default.createElement(import_react.Fragment, null, props.children);
173
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: props.children });
183
174
  }
184
175
  }, "PasswordStrength");
185
176
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
  var password_exports = {};
29
19
  __export(password_exports, {
@@ -31,7 +21,7 @@ __export(password_exports, {
31
21
  default: () => password_default
32
22
  });
33
23
  module.exports = __toCommonJS(password_exports);
34
- var import_react = __toESM(require("react"));
24
+ var import_jsx_runtime = require("react/jsx-runtime");
35
25
  var import_schema = require("@tachybase/schema");
36
26
  var import_antd = require("antd");
37
27
  var import_preview_text = require("../preview-text");
@@ -47,36 +37,41 @@ const Password = (0, import_schema.connect)((props) => {
47
37
  width: 1,
48
38
  transform: "translate(-50%, 0)"
49
39
  };
50
- return /* @__PURE__ */ import_react.default.createElement("span", { className }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { ...others, value }), checkStrength && /* @__PURE__ */ import_react.default.createElement(import_PasswordStrength.PasswordStrength, { value: String(value) }, (score) => {
51
- return /* @__PURE__ */ import_react.default.createElement(
52
- "div",
53
- {
54
- style: {
55
- background: "#e0e0e0",
56
- marginBottom: 3,
57
- position: "relative"
58
- }
59
- },
60
- /* @__PURE__ */ import_react.default.createElement("div", { style: { ...blockStyle, left: "20%" } }),
61
- /* @__PURE__ */ import_react.default.createElement("div", { style: { ...blockStyle, left: "40%" } }),
62
- /* @__PURE__ */ import_react.default.createElement("div", { style: { ...blockStyle, left: "60%" } }),
63
- /* @__PURE__ */ import_react.default.createElement("div", { style: { ...blockStyle, left: "80%" } }),
64
- /* @__PURE__ */ import_react.default.createElement(
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className, children: [
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Password, { ...others, value }),
42
+ checkStrength && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PasswordStrength.PasswordStrength, { value: String(value), children: (score) => {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
65
44
  "div",
66
45
  {
67
46
  style: {
68
- position: "relative",
69
- backgroundImage: "-webkit-linear-gradient(left, #ff5500, #ff9300)",
70
- transition: "all 0.35s ease-in-out",
71
- height: 8,
72
- width: "100%",
73
- marginTop: 5,
74
- clipPath: `polygon(0 0,${score}% 0,${score}% 100%,0 100%)`
75
- }
47
+ background: "#e0e0e0",
48
+ marginBottom: 3,
49
+ position: "relative"
50
+ },
51
+ children: [
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...blockStyle, left: "20%" } }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...blockStyle, left: "40%" } }),
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...blockStyle, left: "60%" } }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...blockStyle, left: "80%" } }),
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ "div",
58
+ {
59
+ style: {
60
+ position: "relative",
61
+ backgroundImage: "-webkit-linear-gradient(left, #ff5500, #ff9300)",
62
+ transition: "all 0.35s ease-in-out",
63
+ height: 8,
64
+ width: "100%",
65
+ marginTop: 5,
66
+ clipPath: `polygon(0 0,${score}% 0,${score}% 100%,0 100%)`
67
+ }
68
+ }
69
+ )
70
+ ]
76
71
  }
77
- )
78
- );
79
- }));
72
+ );
73
+ } })
74
+ ] });
80
75
  }, (0, import_schema.mapReadPretty)(import_preview_text.PreviewText.Input));
81
76
  var password_default = Password;
82
77
  // Annotate the CommonJS export names for ESM import in node: