@nutui/nutui-react 2.6.16 → 2.6.17

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 (42) hide show
  1. package/CHANGELOG.md +28 -14
  2. package/README.md +2 -2
  3. package/dist/esm/Cell/style/style.css +1 -1
  4. package/dist/esm/Cell.js +3 -3
  5. package/dist/esm/Form/style/style.css +1 -1
  6. package/dist/esm/ImagePreview.js +22 -13
  7. package/dist/esm/Uploader.js +5 -3
  8. package/dist/esm/formitem2.js +3 -3
  9. package/dist/locales/base.js +1 -1
  10. package/dist/locales/en-US.js +1 -1
  11. package/dist/locales/id-ID.js +1 -1
  12. package/dist/locales/tr-TR.js +1 -1
  13. package/dist/locales/zh-CN.js +1 -1
  14. package/dist/locales/zh-TW.js +1 -1
  15. package/dist/locales/zh-UG.js +1 -1
  16. package/dist/nutui.react.es.js +29 -24
  17. package/dist/nutui.react.umd.js +29 -24
  18. package/dist/packages/cell/cell.scss +20 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/packages/avatargroup/context.d.ts +0 -1
  21. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  22. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  23. package/dist/types/packages/cell/cell.d.ts +5 -0
  24. package/dist/types/packages/cell/cell.taro.d.ts +1 -0
  25. package/dist/types/packages/cellgroup/context.d.ts +0 -1
  26. package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
  27. package/dist/types/packages/collapse/context.d.ts +0 -1
  28. package/dist/types/packages/form/context.d.ts +0 -1
  29. package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
  30. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
  31. package/dist/types/packages/popover/types.d.ts +0 -1
  32. package/dist/types/packages/radiogroup/context.d.ts +1 -1
  33. package/dist/types/packages/row/UserContext.d.ts +0 -1
  34. package/dist/types/packages/sidenavbar/context.d.ts +0 -1
  35. package/dist/types/packages/steps/context.d.ts +0 -1
  36. package/dist/types/packages/swiper/context.d.ts +0 -1
  37. package/dist/types/packages/uploader/uploader.d.ts +1 -1
  38. package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
  39. package/dist/types/packages/virtuallist/utils.d.ts +2 -2
  40. package/dist/types/utils/index.d.ts +0 -1
  41. package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
  42. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,20 +1,34 @@
1
- # v2.6.16
2
- `2024-08-03`
1
+ # v2.6.17
2
+ `2024-08-30`
3
+
4
+
5
+ * 🏡 chore(form): form demo (#2528)
6
+ * 📖 docs(readme): fix pnpm run dev weapp jd dir (#2514)
7
+ * :sparkles: feat(cell): add clickable prop to support click style feedback (#2527)
8
+ * :sparkles: feat(image-preview): 增加索引字段,用于预览内容排序 (#2519)
9
+ * :bug: fix(tabs.taro.tsx): 解决在不需要滚动的时候,切换tab产生tab位置错乱的问题 (#2554)
10
+ * :bug: fix(uploader): beforeUpload should trigger every time before uploading (#2553)
11
+ * :bug: fix(PullToRefresh): 修复PullToRefresh组件disabled属性在taro中无效的问题 (#2538)
12
+ * :bug: fix(uploader): ios 下无法回显的问题修复 (#2550)
13
+ * :bug: fix(uploader): sizeType prop didnot work when weapp || jd (#2526)
3
14
 
4
15
 
5
- * 📖 docs(card): correct doc (#2504) @Alex-huxiyang
6
- * :sparkles: feat(menu): menu-item 组件增加标题icon自定义方式 (#2488) @zhangming
7
- * :sparkles: feat(form): Form.Item 增加 align 属性 (#2492) @zhangming
8
- * :bug: fix(inputNumber): correct onChange, onOverlimit event triggering timing when async & sync (#2509) @Alex-huxiyang
9
- * :bug: fix(uploader): xhrBeforeUpload判断错误 (#2507) @Alex-huxiyang
10
- * :bug: fix(swiper): correct onChange ts type (#2493) @Alex-huxiyang
11
- * 🪵 refactor(numberkeyboard): optimize code & correct defaultProps (#2508) @Alex-huxiyang
12
- * 🏡 chore(cell): unify ts type & docs (#2496) @Alex-huxiyang
13
- * 🏡 chore(deps): update vitest monorepo to v2 (major) (#2439) @renovate[bot]
14
- * 🏡 chore(deps): update dependency glob to v11 (#2438) @renovate[bot]
15
- * 🏡 chore(deps): update dependency inquirer to v10 (#2420) @renovate[bot]
16
- * 🏡 chore(deps): update dependency marked to v13 (#2358) @renovate[bot]
16
+ # v2.6.16
17
+
18
+ `2024-08-03`
17
19
 
20
+ - 📖 docs(card): correct doc (#2504) @Alex-huxiyang
21
+ - :sparkles: feat(menu): menu-item 组件增加标题icon自定义方式 (#2488) @zhangming
22
+ - :sparkles: feat(form): Form.Item 增加 align 属性 (#2492) @zhangming
23
+ - :bug: fix(inputNumber): correct onChange, onOverlimit event triggering timing when async & sync (#2509) @Alex-huxiyang
24
+ - :bug: fix(uploader): xhrBeforeUpload判断错误 (#2507) @Alex-huxiyang
25
+ - :bug: fix(swiper): correct onChange ts type (#2493) @Alex-huxiyang
26
+ - 🪵 refactor(numberkeyboard): optimize code & correct defaultProps (#2508) @Alex-huxiyang
27
+ - 🏡 chore(cell): unify ts type & docs (#2496) @Alex-huxiyang
28
+ - 🏡 chore(deps): update vitest monorepo to v2 (major) (#2439) @renovate[bot]
29
+ - 🏡 chore(deps): update dependency glob to v11 (#2438) @renovate[bot]
30
+ - 🏡 chore(deps): update dependency inquirer to v10 (#2420) @renovate[bot]
31
+ - 🏡 chore(deps): update dependency marked to v13 (#2358) @renovate[bot]
18
32
 
19
33
  # v2.6.15
20
34
 
package/README.md CHANGED
@@ -84,11 +84,11 @@ cd nutui-react
84
84
  pnpm install
85
85
 
86
86
  # Start development
87
- # dir:src/sites/mobile-taro/dist/weapp
87
+ # dir:packages/nutui-taro-demo/dist/weapp
88
88
  pnpm run dev:taro:weapp
89
89
 
90
90
  # OR run as jd mini-program
91
- # dir:src/sites/mobile-taro/dist/jd
91
+ # dir:packages/nutui-taro-demo/dist/jd
92
92
  pnpm run dev:taro:jd
93
93
  ```
94
94
 
@@ -1 +1 @@
1
- .nut-cell-group{display:block}.nut-cell-group-title{display:inherit;padding:var(--nutui-cell-group-title-padding, 0 10px);color:var(--nutui-cell-group-title-color, var(--nutui-gray-7, #1a1a1a));font-size:var(--nutui-cell-group-title-font-size, var(--nutui-font-size-3, 14px));line-height:var(--nutui-cell-group-title-line-height, 20px);margin-top:30px;margin-bottom:10px}.nut-cell-group-description{display:inherit;padding:var(--nutui-cell-group-description-padding, 0 10px);color:var(--nutui-cell-group-description-color, var(--nutui-gray-6, #595959));font-size:var(--nutui-cell-group-description-font-size, var(--nutui-font-size-2, 12px));line-height:var(--nutui-cell-group-description-line-height, 16px);margin-top:10px;margin-bottom:10px}.nut-cell-group-wrap{display:inherit;border-radius:var(--nutui-cell-border-radius, 6px);overflow:hidden;background-color:var(--nutui-cell-group-background-color, var(--nutui-gray-1, #ffffff));margin:var(--nutui-cell-group-wrap-margin, 10px 0)}.nut-cell-group-wrap .nut-cell{margin:0;box-shadow:none;border-radius:0}.nut-cell-group-wrap-divider .nut-cell-divider{position:absolute;box-sizing:border-box;pointer-events:none;right:var(--nutui-cell-divider-right, 16px);bottom:0;left:var(--nutui-cell-divider-left, 16px);transform:scaleY(.5);border-top:var(--nutui-cell-divider-border-bottom, 2px solid var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-cell-group-wrap-divider .nut-cell:last-child .nut-cell-divider{border-top:0!important}[dir=rtl] .nut-cell-group-wrap-divider .nut-cell-divider,.nut-rtl .nut-cell-group-wrap-divider .nut-cell-divider{left:var(--nutui-cell-divider-right, 16px);right:var(--nutui-cell-divider-left, 16px)}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nutui-cell-line-height, 20px);padding:var(--nutui-cell-padding, 13px 16px);background-color:var(--nutui-cell-background-color, var(--nutui-gray-1, #ffffff));border-radius:var(--nutui-cell-border-radius, 6px);box-shadow:var(--nutui-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nutui-cell-title-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-title-color, var(--nutui-gray-7, #1a1a1a));margin:10px 0;box-sizing:border-box}.nut-cell-left{display:flex;flex-direction:column;flex:1}.nut-cell-description{font-size:var(--nutui-cell-description-font-size, var(--nutui-font-size-2, 12px));color:var(--nutui-cell-description-color, var(--nutui-gray-6, #595959))}.nut-cell-extra{display:inline-flex;justify-content:flex-end;align-items:center;flex:1;min-width:0;word-break:break-all;font-size:var(--nutui-cell-extra-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-extra-color, var(--nutui-gray-6, #595959))}
1
+ .nut-cell-group{display:block}.nut-cell-group-title{display:inherit;padding:var(--nutui-cell-group-title-padding, 0 10px);color:var(--nutui-cell-group-title-color, var(--nutui-gray-7, #1a1a1a));font-size:var(--nutui-cell-group-title-font-size, var(--nutui-font-size-3, 14px));line-height:var(--nutui-cell-group-title-line-height, 20px);margin-top:30px;margin-bottom:10px}.nut-cell-group-description{display:inherit;padding:var(--nutui-cell-group-description-padding, 0 10px);color:var(--nutui-cell-group-description-color, var(--nutui-gray-6, #595959));font-size:var(--nutui-cell-group-description-font-size, var(--nutui-font-size-2, 12px));line-height:var(--nutui-cell-group-description-line-height, 16px);margin-top:10px;margin-bottom:10px}.nut-cell-group-wrap{display:inherit;border-radius:var(--nutui-cell-border-radius, 6px);overflow:hidden;background-color:var(--nutui-cell-group-background-color, var(--nutui-gray-1, #ffffff));margin:var(--nutui-cell-group-wrap-margin, 10px 0)}.nut-cell-group-wrap .nut-cell{margin:0;box-shadow:none;border-radius:0}.nut-cell-group-wrap-divider .nut-cell-divider{position:absolute;box-sizing:border-box;pointer-events:none;right:var(--nutui-cell-divider-right, 16px);bottom:0;left:var(--nutui-cell-divider-left, 16px);transform:scaleY(.5);border-top:var(--nutui-cell-divider-border-bottom, 2px solid var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-cell-group-wrap-divider .nut-cell:last-child .nut-cell-divider{border-top:0!important}[dir=rtl] .nut-cell-group-wrap-divider .nut-cell-divider,.nut-rtl .nut-cell-group-wrap-divider .nut-cell-divider{left:var(--nutui-cell-divider-right, 16px);right:var(--nutui-cell-divider-left, 16px)}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nutui-cell-line-height, 20px);padding:var(--nutui-cell-padding, 13px 16px);background-color:var(--nutui-cell-background-color, var(--nutui-gray-1, #ffffff));border-radius:var(--nutui-cell-border-radius, 6px);box-shadow:var(--nutui-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nutui-cell-title-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-title-color, var(--nutui-gray-7, #1a1a1a));margin:10px 0;box-sizing:border-box}.nut-cell-left{display:flex;flex-direction:column;flex:1}.nut-cell-description{font-size:var(--nutui-cell-description-font-size, var(--nutui-font-size-2, 12px));color:var(--nutui-cell-description-color, var(--nutui-gray-6, #595959))}.nut-cell-extra{display:inline-flex;justify-content:flex-end;align-items:center;flex:1;min-width:0;word-break:break-all;font-size:var(--nutui-cell-extra-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-extra-color, var(--nutui-gray-6, #595959))}.nut-cell:active:before{opacity:.1}.nut-cell-clickable{cursor:pointer}.nut-cell-clickable:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nutui-gray-7, #1a1a1a);border:inherit;border-color:var(--nutui-gray-7, #1a1a1a);border-radius:inherit;transform:translate(-50%,-50%);opacity:0;content:" "}
package/dist/esm/Cell.js CHANGED
@@ -4,12 +4,12 @@ import classNames from "classnames";
4
4
  import { C as ComponentDefaults } from "./typings.js";
5
5
  import CellGroup__default from "./CellGroup.js";
6
6
  import { C as CellGroupContext } from "./context.js";
7
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { title: null, description: null, extra: null, radius: "6px", align: "flex-start", onClick: (event) => {
7
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { title: null, description: null, extra: null, radius: "6px", align: "flex-start", clickable: false, onClick: (event) => {
8
8
  } });
9
9
  const classPrefix = "nut-cell";
10
10
  const Cell = (props) => {
11
11
  const ctx = useContext(CellGroupContext);
12
- const _a = Object.assign(Object.assign({}, defaultProps), props), { children, onClick, title, description, extra, radius, align, className, style } = _a, rest = __rest(_a, ["children", "onClick", "title", "description", "extra", "radius", "align", "className", "style"]);
12
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { children, clickable, onClick, title, description, extra, radius, align, className, style } = _a, rest = __rest(_a, ["children", "clickable", "onClick", "title", "description", "extra", "radius", "align", "className", "style"]);
13
13
  const handleClick = (event) => {
14
14
  onClick(event);
15
15
  };
@@ -19,7 +19,7 @@ const Cell = (props) => {
19
19
  };
20
20
  return React__default.createElement(
21
21
  "div",
22
- Object.assign({ className: classNames(classPrefix, className), onClick: (event) => handleClick(event), style: baseStyle }, rest),
22
+ Object.assign({ className: `${classNames(classPrefix, className, clickable ? `${classPrefix}-clickable` : "")}`, onClick: (event) => handleClick(event), style: baseStyle }, rest),
23
23
  children || React__default.createElement(
24
24
  React__default.Fragment,
25
25
  null,
@@ -1 +1 @@
1
- .nut-cell-group{display:block}.nut-cell-group-title{display:inherit;padding:var(--nutui-cell-group-title-padding, 0 10px);color:var(--nutui-cell-group-title-color, var(--nutui-gray-7, #1a1a1a));font-size:var(--nutui-cell-group-title-font-size, var(--nutui-font-size-3, 14px));line-height:var(--nutui-cell-group-title-line-height, 20px);margin-top:30px;margin-bottom:10px}.nut-cell-group-description{display:inherit;padding:var(--nutui-cell-group-description-padding, 0 10px);color:var(--nutui-cell-group-description-color, var(--nutui-gray-6, #595959));font-size:var(--nutui-cell-group-description-font-size, var(--nutui-font-size-2, 12px));line-height:var(--nutui-cell-group-description-line-height, 16px);margin-top:10px;margin-bottom:10px}.nut-cell-group-wrap{display:inherit;border-radius:var(--nutui-cell-border-radius, 6px);overflow:hidden;background-color:var(--nutui-cell-group-background-color, var(--nutui-gray-1, #ffffff));margin:var(--nutui-cell-group-wrap-margin, 10px 0)}.nut-cell-group-wrap .nut-cell{margin:0;box-shadow:none;border-radius:0}.nut-cell-group-wrap-divider .nut-cell-divider{position:absolute;box-sizing:border-box;pointer-events:none;right:var(--nutui-cell-divider-right, 16px);bottom:0;left:var(--nutui-cell-divider-left, 16px);transform:scaleY(.5);border-top:var(--nutui-cell-divider-border-bottom, 2px solid var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-cell-group-wrap-divider .nut-cell:last-child .nut-cell-divider{border-top:0!important}[dir=rtl] .nut-cell-group-wrap-divider .nut-cell-divider,.nut-rtl .nut-cell-group-wrap-divider .nut-cell-divider{left:var(--nutui-cell-divider-right, 16px);right:var(--nutui-cell-divider-left, 16px)}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nutui-cell-line-height, 20px);padding:var(--nutui-cell-padding, 13px 16px);background-color:var(--nutui-cell-background-color, var(--nutui-gray-1, #ffffff));border-radius:var(--nutui-cell-border-radius, 6px);box-shadow:var(--nutui-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nutui-cell-title-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-title-color, var(--nutui-gray-7, #1a1a1a));margin:10px 0;box-sizing:border-box}.nut-cell-left{display:flex;flex-direction:column;flex:1}.nut-cell-description{font-size:var(--nutui-cell-description-font-size, var(--nutui-font-size-2, 12px));color:var(--nutui-cell-description-color, var(--nutui-gray-6, #595959))}.nut-cell-extra{display:inline-flex;justify-content:flex-end;align-items:center;flex:1;min-width:0;word-break:break-all;font-size:var(--nutui-cell-extra-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-extra-color, var(--nutui-gray-6, #595959))}.nut-form-item{display:flex}.nut-form-item.error.line:before{border-bottom:1px solid var(--nutui-form-item-error-line-color, var(--nutui-color-primary, #fa2c19));transform:scaleX(1);transition:transform .2s cubic-bezier(0,0,.2,1) 0ms}.nut-form-item-label{font-size:var(--nutui-form-item-label-font-size, var(--nutui-font-size-3, 14px));font-weight:400;width:var(--nutui-form-item-label-width, 90px);margin-right:var(--nutui-form-item-label-margin-right, 10px);flex:none!important;display:inline-block!important;word-wrap:break-word;text-align:var(--nutui-form-item-label-text-align, left)}.nut-form-item-label .required:before{content:"*";color:var(--nutui-form-item-required-color, var(--nutui-color-primary, #fa2c19));margin-right:var(--nutui-form-item-required-margin-right, 4px)}.nut-form-item-body{flex:1;display:flex!important;flex-direction:column}.nut-form-item-body-slots{text-align:var(--nutui-form-item-body-slots-text-align, left)}.nut-form-item-body-slots .nut-input{padding:0;border:0}.nut-form-item-body-slots .nut-input-text{font-size:var(--nutui-form-item-body-font-size, var(--nutui-font-size-3, 14px));text-align:var(--nutui-form-item-body-input-text-align, left);color:var(--nutui-gray-7, #1a1a1a);width:100%;outline:0 none;border:0;text-decoration:none;background:transparent}.nut-form-item-body-slots .nut-range-container{min-height:24px}.nut-form-item-body-slots .nut-textarea{padding:0!important}.nut-form-item-body-slots .nut-textarea .nut-textarea-textarea{font:inherit;text-align:var(--nutui-form-item-body-input-text-align, left)}.nut-form-item-body-tips{text-align:var(--nutui-form-item-tip-text-align, left);font-size:var(--nutui-form-item-tip-font-size, var(--nutui-font-size-1, 10px));color:var(--nutui-form-item-error-message-color, var(--nutui-color-primary, #fa2c19))}[dir=rtl] .nut-form-item-label,.nut-rtl .nut-form-item-label{text-align:right;margin-right:0;margin-left:var(--nutui-form-item-label-margin-right, 10px)}[dir=rtl] .nut-form-item-label .required:before,.nut-rtl .nut-form-item-label .required:before{margin-right:0;margin-left:var(--nutui-form-item-required-margin-right, 4px)}[dir=rtl] .nut-form-item-body-slots,.nut-rtl .nut-form-item-body-slots{text-align:right}[dir=rtl] .nut-form-item-body-slots .nut-icon-ArrowRight,[dir=rtl] .nut-form-item-body-slots .nut-icon-ArrowLeft,.nut-rtl .nut-form-item-body-slots .nut-icon-ArrowRight,.nut-rtl .nut-form-item-body-slots .nut-icon-ArrowLeft{transform:rotateY(180deg)}[dir=rtl] .nut-form-item-body-slots .nut-input-text,.nut-rtl .nut-form-item-body-slots .nut-input-text,[dir=rtl] .nut-form-item-body-slots .nut-textarea-textarea,.nut-rtl .nut-form-item-body-slots .nut-textarea-textarea,[dir=rtl] .nut-form-item-tips,.nut-rtl .nut-form-item-tips{text-align:right}.form-layout-right .nut-form-item-label{text-align:right;padding-right:24px;white-space:nowrap}.form-layout-left .nut-form-item-label{position:relative;text-align:left;padding-left:12px;white-space:nowrap}.form-layout-left .nut-form-item-label .required{display:block;line-height:1.5;position:absolute;left:.1em}.form-layout-top .nut-form-item{flex-direction:column;align-items:flex-start;white-space:nowrap}.form-layout-top .nut-form-item-label{padding-bottom:4px;display:block;padding-right:24px}.form-layout-top .nut-form-item-body{margin-left:0;width:100%}[dir=rtl] .form-layout-right .nut-form-item-label,.nut-rtl .form-layout-right .nut-form-item-label{text-align:left;padding-right:0;padding-left:24px}[dir=rtl] .form-layout-left .nut-form-item-label,.nut-rtl .form-layout-left .nut-form-item-label{text-align:right;padding-left:0;padding-right:12px}[dir=rtl] .form-layout-left .nut-form-item-label .required,.nut-rtl .form-layout-left .nut-form-item-label .required{left:auto;right:.1em}[dir=rtl] .form-layout-top .nut-form-item-label,.nut-rtl .form-layout-top .nut-form-item-label{padding-right:0;padding-left:24px}[dir=rtl] .form-layout-top .nut-form-item-body,.nut-rtl .form-layout-top .nut-form-item-body{margin-left:0;margin-right:0}
1
+ .nut-cell-group{display:block}.nut-cell-group-title{display:inherit;padding:var(--nutui-cell-group-title-padding, 0 10px);color:var(--nutui-cell-group-title-color, var(--nutui-gray-7, #1a1a1a));font-size:var(--nutui-cell-group-title-font-size, var(--nutui-font-size-3, 14px));line-height:var(--nutui-cell-group-title-line-height, 20px);margin-top:30px;margin-bottom:10px}.nut-cell-group-description{display:inherit;padding:var(--nutui-cell-group-description-padding, 0 10px);color:var(--nutui-cell-group-description-color, var(--nutui-gray-6, #595959));font-size:var(--nutui-cell-group-description-font-size, var(--nutui-font-size-2, 12px));line-height:var(--nutui-cell-group-description-line-height, 16px);margin-top:10px;margin-bottom:10px}.nut-cell-group-wrap{display:inherit;border-radius:var(--nutui-cell-border-radius, 6px);overflow:hidden;background-color:var(--nutui-cell-group-background-color, var(--nutui-gray-1, #ffffff));margin:var(--nutui-cell-group-wrap-margin, 10px 0)}.nut-cell-group-wrap .nut-cell{margin:0;box-shadow:none;border-radius:0}.nut-cell-group-wrap-divider .nut-cell-divider{position:absolute;box-sizing:border-box;pointer-events:none;right:var(--nutui-cell-divider-right, 16px);bottom:0;left:var(--nutui-cell-divider-left, 16px);transform:scaleY(.5);border-top:var(--nutui-cell-divider-border-bottom, 2px solid var(--nutui-black-3, rgba(0, 0, 0, .06)))}.nut-cell-group-wrap-divider .nut-cell:last-child .nut-cell-divider{border-top:0!important}[dir=rtl] .nut-cell-group-wrap-divider .nut-cell-divider,.nut-rtl .nut-cell-group-wrap-divider .nut-cell-divider{left:var(--nutui-cell-divider-right, 16px);right:var(--nutui-cell-divider-left, 16px)}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nutui-cell-line-height, 20px);padding:var(--nutui-cell-padding, 13px 16px);background-color:var(--nutui-cell-background-color, var(--nutui-gray-1, #ffffff));border-radius:var(--nutui-cell-border-radius, 6px);box-shadow:var(--nutui-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nutui-cell-title-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-title-color, var(--nutui-gray-7, #1a1a1a));margin:10px 0;box-sizing:border-box}.nut-cell-left{display:flex;flex-direction:column;flex:1}.nut-cell-description{font-size:var(--nutui-cell-description-font-size, var(--nutui-font-size-2, 12px));color:var(--nutui-cell-description-color, var(--nutui-gray-6, #595959))}.nut-cell-extra{display:inline-flex;justify-content:flex-end;align-items:center;flex:1;min-width:0;word-break:break-all;font-size:var(--nutui-cell-extra-font-size, var(--nutui-font-size-3, 14px));color:var(--nutui-cell-extra-color, var(--nutui-gray-6, #595959))}.nut-cell:active:before{opacity:.1}.nut-cell-clickable{cursor:pointer}.nut-cell-clickable:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nutui-gray-7, #1a1a1a);border:inherit;border-color:var(--nutui-gray-7, #1a1a1a);border-radius:inherit;transform:translate(-50%,-50%);opacity:0;content:" "}.nut-form-item{display:flex}.nut-form-item.error.line:before{border-bottom:1px solid var(--nutui-form-item-error-line-color, var(--nutui-color-primary, #fa2c19));transform:scaleX(1);transition:transform .2s cubic-bezier(0,0,.2,1) 0ms}.nut-form-item-label{font-size:var(--nutui-form-item-label-font-size, var(--nutui-font-size-3, 14px));font-weight:400;width:var(--nutui-form-item-label-width, 90px);margin-right:var(--nutui-form-item-label-margin-right, 10px);flex:none!important;display:inline-block!important;word-wrap:break-word;text-align:var(--nutui-form-item-label-text-align, left)}.nut-form-item-label .required:before{content:"*";color:var(--nutui-form-item-required-color, var(--nutui-color-primary, #fa2c19));margin-right:var(--nutui-form-item-required-margin-right, 4px)}.nut-form-item-body{flex:1;display:flex!important;flex-direction:column}.nut-form-item-body-slots{text-align:var(--nutui-form-item-body-slots-text-align, left)}.nut-form-item-body-slots .nut-input{padding:0;border:0}.nut-form-item-body-slots .nut-input-text{font-size:var(--nutui-form-item-body-font-size, var(--nutui-font-size-3, 14px));text-align:var(--nutui-form-item-body-input-text-align, left);color:var(--nutui-gray-7, #1a1a1a);width:100%;outline:0 none;border:0;text-decoration:none;background:transparent}.nut-form-item-body-slots .nut-range-container{min-height:24px}.nut-form-item-body-slots .nut-textarea{padding:0!important}.nut-form-item-body-slots .nut-textarea .nut-textarea-textarea{font:inherit;text-align:var(--nutui-form-item-body-input-text-align, left)}.nut-form-item-body-tips{text-align:var(--nutui-form-item-tip-text-align, left);font-size:var(--nutui-form-item-tip-font-size, var(--nutui-font-size-1, 10px));color:var(--nutui-form-item-error-message-color, var(--nutui-color-primary, #fa2c19))}[dir=rtl] .nut-form-item-label,.nut-rtl .nut-form-item-label{text-align:right;margin-right:0;margin-left:var(--nutui-form-item-label-margin-right, 10px)}[dir=rtl] .nut-form-item-label .required:before,.nut-rtl .nut-form-item-label .required:before{margin-right:0;margin-left:var(--nutui-form-item-required-margin-right, 4px)}[dir=rtl] .nut-form-item-body-slots,.nut-rtl .nut-form-item-body-slots{text-align:right}[dir=rtl] .nut-form-item-body-slots .nut-icon-ArrowRight,[dir=rtl] .nut-form-item-body-slots .nut-icon-ArrowLeft,.nut-rtl .nut-form-item-body-slots .nut-icon-ArrowRight,.nut-rtl .nut-form-item-body-slots .nut-icon-ArrowLeft{transform:rotateY(180deg)}[dir=rtl] .nut-form-item-body-slots .nut-input-text,.nut-rtl .nut-form-item-body-slots .nut-input-text,[dir=rtl] .nut-form-item-body-slots .nut-textarea-textarea,.nut-rtl .nut-form-item-body-slots .nut-textarea-textarea,[dir=rtl] .nut-form-item-tips,.nut-rtl .nut-form-item-tips{text-align:right}.form-layout-right .nut-form-item-label{text-align:right;padding-right:24px;white-space:nowrap}.form-layout-left .nut-form-item-label{position:relative;text-align:left;padding-left:12px;white-space:nowrap}.form-layout-left .nut-form-item-label .required{display:block;line-height:1.5;position:absolute;left:.1em}.form-layout-top .nut-form-item{flex-direction:column;align-items:flex-start;white-space:nowrap}.form-layout-top .nut-form-item-label{padding-bottom:4px;display:block;padding-right:24px}.form-layout-top .nut-form-item-body{margin-left:0;width:100%}[dir=rtl] .form-layout-right .nut-form-item-label,.nut-rtl .form-layout-right .nut-form-item-label{text-align:left;padding-right:0;padding-left:24px}[dir=rtl] .form-layout-left .nut-form-item-label,.nut-rtl .form-layout-left .nut-form-item-label{text-align:right;padding-left:0;padding-right:12px}[dir=rtl] .form-layout-left .nut-form-item-label .required,.nut-rtl .form-layout-left .nut-form-item-label .required{left:auto;right:.1em}[dir=rtl] .form-layout-top .nut-form-item-label,.nut-rtl .form-layout-top .nut-form-item-label{padding-right:0;padding-left:24px}[dir=rtl] .form-layout-top .nut-form-item-body,.nut-rtl .form-layout-top .nut-form-item-body{margin-left:0;margin-right:0}
@@ -143,19 +143,28 @@ const ImagePreview = (props) => {
143
143
  { visible: showPop, className: `${classPrefix}-pop`, style: { width: "100%" }, onClick: onCloseInner },
144
144
  React__default.createElement("div", { className: classNames(classPrefix, className), style, ref, onTouchStart }, showPop ? React__default.createElement(Swiper__default, { autoPlay: !!duration, duration, className: `${classPrefix}-swiper`, loop: true, style: {
145
145
  "--nutui-indicator-color": indicatorColor
146
- }, direction: "horizontal", onChange: (page) => slideChangeEnd(page), defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1), indicator }, (videos && videos.length > 0 ? videos.map((item, index) => {
147
- return React__default.createElement(
148
- SwiperItem__default,
149
- { key: index },
150
- React__default.createElement(Video__default, { source: item.source, options: item.options, onClick: closeOnImg })
151
- );
152
- }) : []).concat(images && images.length > 0 ? images.map((item, index) => {
153
- return React__default.createElement(
154
- SwiperItem__default,
155
- { key: index },
156
- React__default.createElement(Image__default, { src: item.src, draggable: false, onClick: closeOnImg })
157
- );
158
- }) : [])) : null),
146
+ }, direction: "horizontal", onChange: (page) => slideChangeEnd(page), defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1), indicator }, (videos !== null && videos !== void 0 ? videos : []).map((item) => ({ type: "video", data: item })).concat((images !== null && images !== void 0 ? images : []).map((item) => ({ type: "image", data: item }))).sort((a, b) => {
147
+ var _a, _b, _c, _d;
148
+ return ((_b = (_a = a.data) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = b.data) === null || _c === void 0 ? void 0 : _c.index) !== null && _d !== void 0 ? _d : 0);
149
+ }).map((item, index) => {
150
+ if (item.type === "video") {
151
+ const { source, options } = item.data;
152
+ return React__default.createElement(
153
+ SwiperItem__default,
154
+ { key: index },
155
+ React__default.createElement(Video__default, { source, options, onClick: closeOnImg })
156
+ );
157
+ }
158
+ if (item.type === "image") {
159
+ const { src } = item.data;
160
+ return React__default.createElement(
161
+ SwiperItem__default,
162
+ { key: index },
163
+ React__default.createElement(Image__default, { src, draggable: false, onClick: closeOnImg })
164
+ );
165
+ }
166
+ return null;
167
+ })) : null),
159
168
  pagination ? React__default.createElement(
160
169
  "div",
161
170
  { className: `${classPrefix}-index` },
@@ -8,6 +8,7 @@ import { C as ComponentDefaults } from "./typings.js";
8
8
  import Button__default from "./Button.js";
9
9
  import { u as usePropsValue } from "./use-props-value.js";
10
10
  import Progress__default from "./Progress.js";
11
+ import Image__default from "./Image.js";
11
12
  class UploadOptions {
12
13
  constructor() {
13
14
  this.url = "";
@@ -110,7 +111,7 @@ const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemCli
110
111
  renderIcon(item),
111
112
  React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)
112
113
  ),
113
- ((_a = item.type) === null || _a === void 0 ? void 0 : _a.includes("image")) ? React__default.createElement(React__default.Fragment, null, item.url && React__default.createElement("img", { className: "nut-uploader-preview-img-c", style: { objectFit: "fill" }, src: item.url, alt: "", onClick: () => handleItemClick(item, index) })) : React__default.createElement(React__default.Fragment, null, previewUrl ? React__default.createElement("img", { className: "nut-uploader-preview-img-c", src: previewUrl, alt: "", onClick: () => handleItemClick(item, index) }) : React__default.createElement(
114
+ ((_a = item.type) === null || _a === void 0 ? void 0 : _a.includes("image")) ? React__default.createElement(React__default.Fragment, null, item.url && React__default.createElement(Image__default, { className: "nut-uploader-preview-img-c", style: { objectFit: "fill" }, src: item.url, alt: "", onClick: () => handleItemClick(item, index) })) : React__default.createElement(React__default.Fragment, null, previewUrl ? React__default.createElement(Image__default, { className: "nut-uploader-preview-img-c", src: previewUrl, alt: "", onClick: () => handleItemClick(item, index) }) : React__default.createElement(
114
115
  "div",
115
116
  { className: "nut-uploader-preview-img-file" },
116
117
  React__default.createElement(
@@ -340,14 +341,15 @@ const InternalUploader = (props, ref) => {
340
341
  });
341
342
  };
342
343
  const fileChange = (event) => {
343
- if (disabled) {
344
+ if (disabled)
344
345
  return;
345
- }
346
346
  const $el = event.target;
347
347
  const { files } = $el;
348
348
  if (beforeUpload) {
349
349
  beforeUpload(new Array().slice.call(files)).then((f) => {
350
350
  const _files = filterFiles(new Array().slice.call(f));
351
+ if (!_files.length)
352
+ $el.value = "";
351
353
  readFile(_files);
352
354
  });
353
355
  } else {
@@ -107,12 +107,12 @@ class FormStore {
107
107
  return errs;
108
108
  });
109
109
  this.submit = () => __awaiter(this, void 0, void 0, function* () {
110
- var _b, _c, _d, _e;
110
+ var _a, _b, _c, _d;
111
111
  const errors = yield this.validateFields();
112
112
  if (errors.length === 0) {
113
- (_c = (_b = this.callbacks).onFinish) === null || _c === void 0 ? void 0 : _c.call(_b, this.store);
113
+ (_b = (_a = this.callbacks).onFinish) === null || _b === void 0 ? void 0 : _b.call(_a, this.store);
114
114
  } else if (errors.length > 0) {
115
- (_e = (_d = this.callbacks).onFinishFailed) === null || _e === void 0 ? void 0 : _e.call(_d, this.store, errors);
115
+ (_d = (_c = this.callbacks).onFinishFailed) === null || _d === void 0 ? void 0 : _d.call(_c, this.store, errors);
116
116
  }
117
117
  });
118
118
  this.resetFields = () => {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:50:31 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:49 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:49:59 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:24 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -653,6 +653,7 @@ const defaultProps$1s = {
653
653
  extra: null,
654
654
  radius: "6px",
655
655
  align: "flex-start",
656
+ clickable: false,
656
657
  onClick: (event) => {
657
658
  }
658
659
  };
@@ -661,6 +662,7 @@ const Cell = (props) => {
661
662
  const ctx2 = useContext(CellGroupContext);
662
663
  const {
663
664
  children,
665
+ clickable,
664
666
  onClick,
665
667
  title,
666
668
  description,
@@ -688,7 +690,7 @@ const Cell = (props) => {
688
690
  return /* @__PURE__ */ React__default.createElement(
689
691
  "div",
690
692
  {
691
- className: classNames(classPrefix$q, className),
693
+ className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
692
694
  onClick: (event) => handleClick2(event),
693
695
  style: baseStyle,
694
696
  ...rest
@@ -2048,7 +2050,7 @@ function _objectWithoutPropertiesLoose$3(r, e2) {
2048
2050
  if (null == r) return {};
2049
2051
  var t2 = {};
2050
2052
  for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
2051
- if (e2.indexOf(n2) >= 0) continue;
2053
+ if (e2.includes(n2)) continue;
2052
2054
  t2[n2] = r[n2];
2053
2055
  }
2054
2056
  return t2;
@@ -16585,7 +16587,7 @@ const Preview = ({
16585
16587
  }
16586
16588
  ),
16587
16589
  previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement(
16588
- "img",
16590
+ Image$1,
16589
16591
  {
16590
16592
  className: "nut-uploader-preview-img-c",
16591
16593
  style: { objectFit: "fill" },
@@ -16594,7 +16596,7 @@ const Preview = ({
16594
16596
  onClick: () => handleItemClick(item, index)
16595
16597
  }
16596
16598
  )) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, previewUrl ? /* @__PURE__ */ React__default.createElement(
16597
- "img",
16599
+ Image$1,
16598
16600
  {
16599
16601
  className: "nut-uploader-preview-img-c",
16600
16602
  src: previewUrl,
@@ -16900,15 +16902,14 @@ const InternalUploader = (props, ref) => {
16900
16902
  });
16901
16903
  };
16902
16904
  const fileChange = (event) => {
16903
- if (disabled) {
16904
- return;
16905
- }
16905
+ if (disabled) return;
16906
16906
  const $el = event.target;
16907
16907
  const { files } = $el;
16908
16908
  if (beforeUpload) {
16909
16909
  beforeUpload(new Array().slice.call(files)).then(
16910
16910
  (f) => {
16911
16911
  const _files = filterFiles(new Array().slice.call(f));
16912
+ if (!_files.length) $el.value = "";
16912
16913
  readFile(_files);
16913
16914
  }
16914
16915
  );
@@ -21201,27 +21202,31 @@ const ImagePreview = (props) => {
21201
21202
  defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
21202
21203
  indicator
21203
21204
  },
21204
- (videos && videos.length > 0 ? videos.map((item, index) => {
21205
- return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(
21206
- Video,
21207
- {
21208
- source: item.source,
21209
- options: item.options,
21210
- onClick: closeOnImg
21211
- }
21212
- ));
21213
- }) : []).concat(
21214
- images && images.length > 0 ? images.map((item, index) => {
21205
+ (videos ?? []).map(
21206
+ (item) => ({ type: "video", data: item })
21207
+ ).concat(
21208
+ (images ?? []).map((item) => ({ type: "image", data: item }))
21209
+ ).sort((a2, b) => {
21210
+ var _a, _b;
21211
+ return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
21212
+ }).map((item, index) => {
21213
+ if (item.type === "video") {
21214
+ const { source, options: options2 } = item.data;
21215
21215
  return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(
21216
- Image$1,
21216
+ Video,
21217
21217
  {
21218
- src: item.src,
21219
- draggable: false,
21218
+ source,
21219
+ options: options2,
21220
21220
  onClick: closeOnImg
21221
21221
  }
21222
21222
  ));
21223
- }) : []
21224
- )
21223
+ }
21224
+ if (item.type === "image") {
21225
+ const { src } = item.data;
21226
+ return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React__default.createElement(Image$1, { src, draggable: false, onClick: closeOnImg }));
21227
+ }
21228
+ return null;
21229
+ })
21225
21230
  ) : null
21226
21231
  ),
21227
21232
  pagination ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
3
3
  })(this, function(exports2, React, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:49:59 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react v2.6.17 Fri Aug 30 2024 14:11:24 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -671,6 +671,7 @@
671
671
  extra: null,
672
672
  radius: "6px",
673
673
  align: "flex-start",
674
+ clickable: false,
674
675
  onClick: (event) => {
675
676
  }
676
677
  };
@@ -679,6 +680,7 @@
679
680
  const ctx2 = React.useContext(CellGroupContext);
680
681
  const {
681
682
  children,
683
+ clickable,
682
684
  onClick,
683
685
  title,
684
686
  description,
@@ -706,7 +708,7 @@
706
708
  return /* @__PURE__ */ React.createElement(
707
709
  "div",
708
710
  {
709
- className: classNames(classPrefix$q, className),
711
+ className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
710
712
  onClick: (event) => handleClick2(event),
711
713
  style: baseStyle,
712
714
  ...rest
@@ -2066,7 +2068,7 @@
2066
2068
  if (null == r) return {};
2067
2069
  var t2 = {};
2068
2070
  for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
2069
- if (e2.indexOf(n2) >= 0) continue;
2071
+ if (e2.includes(n2)) continue;
2070
2072
  t2[n2] = r[n2];
2071
2073
  }
2072
2074
  return t2;
@@ -16603,7 +16605,7 @@
16603
16605
  }
16604
16606
  ),
16605
16607
  previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React.createElement(React.Fragment, null, item.url && /* @__PURE__ */ React.createElement(
16606
- "img",
16608
+ Image$1,
16607
16609
  {
16608
16610
  className: "nut-uploader-preview-img-c",
16609
16611
  style: { objectFit: "fill" },
@@ -16612,7 +16614,7 @@
16612
16614
  onClick: () => handleItemClick(item, index)
16613
16615
  }
16614
16616
  )) : /* @__PURE__ */ React.createElement(React.Fragment, null, previewUrl ? /* @__PURE__ */ React.createElement(
16615
- "img",
16617
+ Image$1,
16616
16618
  {
16617
16619
  className: "nut-uploader-preview-img-c",
16618
16620
  src: previewUrl,
@@ -16918,15 +16920,14 @@
16918
16920
  });
16919
16921
  };
16920
16922
  const fileChange = (event) => {
16921
- if (disabled) {
16922
- return;
16923
- }
16923
+ if (disabled) return;
16924
16924
  const $el = event.target;
16925
16925
  const { files } = $el;
16926
16926
  if (beforeUpload) {
16927
16927
  beforeUpload(new Array().slice.call(files)).then(
16928
16928
  (f) => {
16929
16929
  const _files = filterFiles(new Array().slice.call(f));
16930
+ if (!_files.length) $el.value = "";
16930
16931
  readFile(_files);
16931
16932
  }
16932
16933
  );
@@ -21219,27 +21220,31 @@
21219
21220
  defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
21220
21221
  indicator
21221
21222
  },
21222
- (videos && videos.length > 0 ? videos.map((item, index) => {
21223
- return /* @__PURE__ */ React.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React.createElement(
21224
- Video,
21225
- {
21226
- source: item.source,
21227
- options: item.options,
21228
- onClick: closeOnImg
21229
- }
21230
- ));
21231
- }) : []).concat(
21232
- images && images.length > 0 ? images.map((item, index) => {
21223
+ (videos ?? []).map(
21224
+ (item) => ({ type: "video", data: item })
21225
+ ).concat(
21226
+ (images ?? []).map((item) => ({ type: "image", data: item }))
21227
+ ).sort((a2, b) => {
21228
+ var _a, _b;
21229
+ return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
21230
+ }).map((item, index) => {
21231
+ if (item.type === "video") {
21232
+ const { source, options: options2 } = item.data;
21233
21233
  return /* @__PURE__ */ React.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React.createElement(
21234
- Image$1,
21234
+ Video,
21235
21235
  {
21236
- src: item.src,
21237
- draggable: false,
21236
+ source,
21237
+ options: options2,
21238
21238
  onClick: closeOnImg
21239
21239
  }
21240
21240
  ));
21241
- }) : []
21242
- )
21241
+ }
21242
+ if (item.type === "image") {
21243
+ const { src } = item.data;
21244
+ return /* @__PURE__ */ React.createElement(SwiperItem, { key: index }, /* @__PURE__ */ React.createElement(Image$1, { src, draggable: false, onClick: closeOnImg }));
21245
+ }
21246
+ return null;
21247
+ })
21243
21248
  ) : null
21244
21249
  ),
21245
21250
  pagination ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,
@@ -34,4 +34,24 @@
34
34
  font-size: $cell-extra-font-size;
35
35
  color: $cell-extra-color;
36
36
  }
37
+ &:active::before {
38
+ opacity: 0.1;
39
+ }
40
+ &-clickable {
41
+ cursor: pointer;
42
+ &::before {
43
+ position: absolute;
44
+ top: 50%;
45
+ left: 50%;
46
+ width: 100%;
47
+ height: 100%;
48
+ background-color: $black;
49
+ border: inherit;
50
+ border-color: $black;
51
+ border-radius: inherit;
52
+ transform: translate(-50%, -50%);
53
+ opacity: 0;
54
+ content: ' ';
55
+ }
56
+ }
37
57
  }