@nutui/nutui 3.1.22 → 3.1.23-beta.0

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 (176) hide show
  1. package/dist/nutui.es.js +20418 -4214
  2. package/dist/nutui.umd.js +20524 -4216
  3. package/dist/packages/_es/ActionSheet.js +149 -17
  4. package/dist/packages/_es/Address.js +535 -110
  5. package/dist/packages/_es/AddressList.js +615 -113
  6. package/dist/packages/_es/Animate.js +59 -17
  7. package/dist/packages/_es/Audio.js +257 -53
  8. package/dist/packages/_es/AudioOperate.js +100 -13
  9. package/dist/packages/_es/Avatar.js +162 -38
  10. package/dist/packages/_es/AvatarGroup.js +73 -14
  11. package/dist/packages/_es/BackTop.js +156 -43
  12. package/dist/packages/_es/Badge.js +86 -14
  13. package/dist/packages/_es/Barrage.js +120 -41
  14. package/dist/packages/_es/Button.js +128 -23
  15. package/dist/packages/_es/Calendar.js +246 -30
  16. package/dist/packages/_es/CalendarItem.js +1 -1
  17. package/dist/packages/_es/Card.js +107 -10
  18. package/dist/packages/_es/Cascader.js +496 -147
  19. package/dist/packages/_es/Category.js +58 -15
  20. package/dist/packages/_es/CategoryPane.js +111 -11
  21. package/dist/packages/_es/Cell.js +108 -21
  22. package/dist/packages/_es/CellGroup.js +44 -9
  23. package/dist/packages/_es/Checkbox.js +134 -29
  24. package/dist/packages/_es/CheckboxGroup.js +79 -29
  25. package/dist/packages/_es/CircleProgress.js +150 -28
  26. package/dist/packages/_es/Col.js +56 -14
  27. package/dist/packages/_es/Collapse.js +109 -32
  28. package/dist/packages/_es/CollapseItem.js +253 -59
  29. package/dist/packages/_es/Comment.js +434 -64
  30. package/dist/packages/_es/ConfigProvider.js +20 -8
  31. package/dist/packages/_es/CountDown.js +238 -56
  32. package/dist/packages/_es/CountUp.js +539 -140
  33. package/dist/packages/_es/DatePicker.js +315 -98
  34. package/dist/packages/_es/Dialog.js +289 -60
  35. package/dist/packages/_es/Divider.js +65 -13
  36. package/dist/packages/_es/Drag.js +197 -56
  37. package/dist/packages/_es/Ecard.js +159 -24
  38. package/dist/packages/_es/Elevator.js +255 -58
  39. package/dist/packages/_es/Ellipsis.js +200 -58
  40. package/dist/packages/_es/Empty.js +71 -12
  41. package/dist/packages/_es/FixedNav.js +122 -15
  42. package/dist/packages/_es/Form.js +151 -64
  43. package/dist/packages/_es/FormItem.js +114 -15
  44. package/dist/packages/_es/Grid.js +6 -5
  45. package/dist/packages/_es/GridItem.js +144 -33
  46. package/dist/packages/_es/Icon.js +40 -15
  47. package/dist/packages/_es/Image.js +137 -26
  48. package/dist/packages/_es/ImagePreview.js +547 -76
  49. package/dist/packages/_es/Indicator.js +62 -15
  50. package/dist/packages/_es/InfiniteLoading.js +249 -57
  51. package/dist/packages/_es/Input.js +433 -51
  52. package/dist/packages/_es/InputNumber.js +160 -41
  53. package/dist/packages/_es/Layout.js +5 -4
  54. package/dist/packages/_es/List.js +106 -18
  55. package/dist/packages/_es/Menu.js +168 -44
  56. package/dist/packages/_es/MenuItem.js +173 -37
  57. package/dist/packages/_es/Navbar.js +192 -30
  58. package/dist/packages/_es/NoticeBar.js +380 -74
  59. package/dist/packages/_es/Notify.js +227 -72
  60. package/dist/packages/_es/NumberKeyboard.js +272 -41
  61. package/dist/packages/_es/OldPicker.js +457 -130
  62. package/dist/packages/_es/OverLay.js +98 -24
  63. package/dist/packages/_es/Pagination.js +157 -39
  64. package/dist/packages/_es/Picker.js +460 -129
  65. package/dist/packages/_es/Popover.js +957 -318
  66. package/dist/packages/_es/Popup.js +299 -55
  67. package/dist/packages/_es/Price.js +118 -16
  68. package/dist/packages/_es/Progress.js +146 -14
  69. package/dist/packages/_es/PullRefresh.js +339 -84
  70. package/dist/packages/_es/Radio.js +90 -22
  71. package/dist/packages/_es/RadioGroup.js +37 -8
  72. package/dist/packages/_es/Range.js +408 -83
  73. package/dist/packages/_es/Rate.js +192 -36
  74. package/dist/packages/_es/Row.js +64 -22
  75. package/dist/packages/_es/SearchBar.js +238 -37
  76. package/dist/packages/_es/ShortPassword.js +225 -35
  77. package/dist/packages/_es/SideNavBar.js +81 -24
  78. package/dist/packages/_es/SideNavBarItem.js +46 -11
  79. package/dist/packages/_es/Signature.js +160 -41
  80. package/dist/packages/_es/Skeleton.js +136 -20
  81. package/dist/packages/_es/Sku.js +491 -84
  82. package/dist/packages/_es/Step.js +115 -20
  83. package/dist/packages/_es/Steps.js +53 -18
  84. package/dist/packages/_es/Sticky.js +138 -53
  85. package/dist/packages/_es/SubSideNavBar.js +82 -17
  86. package/dist/packages/_es/Swipe.js +178 -41
  87. package/dist/packages/_es/Swiper.js +433 -121
  88. package/dist/packages/_es/SwiperItem.js +53 -22
  89. package/dist/packages/_es/Switch.js +116 -21
  90. package/dist/packages/_es/TabPane.js +39 -12
  91. package/dist/packages/_es/Tabbar.js +72 -17
  92. package/dist/packages/_es/TabbarItem.js +151 -29
  93. package/dist/packages/_es/Table.js +178 -18
  94. package/dist/packages/_es/Tabs.js +202 -43
  95. package/dist/packages/_es/Tag.js +97 -20
  96. package/dist/packages/_es/TextArea.js +160 -42
  97. package/dist/packages/_es/TimeDetail.js +79 -18
  98. package/dist/packages/_es/TimePannel.js +48 -14
  99. package/dist/packages/_es/TimeSelect.js +112 -15
  100. package/dist/packages/_es/Toast.js +310 -71
  101. package/dist/packages/_es/Uploader.js +455 -104
  102. package/dist/packages/_es/Video.js +332 -74
  103. package/dist/packages/_es/common.js +128 -38
  104. package/dist/packages/_es/component.js +76 -35
  105. package/dist/packages/_es/index.js +6 -5
  106. package/dist/packages/_es/index2.js +30 -9
  107. package/dist/packages/_es/index3.js +8 -6
  108. package/dist/packages/_es/index4.js +64 -13
  109. package/dist/packages/_es/index5.js +780 -164
  110. package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
  111. package/dist/packages/_es/pxCheck.js +5 -3
  112. package/dist/packages/_es/raf.js +15 -8
  113. package/dist/packages/imagepreview/index.scss +6 -1
  114. package/dist/packages/locale/lang/baseLang.js +3 -3
  115. package/dist/packages/locale/lang/en-US.js +105 -5
  116. package/dist/packages/locale/lang/id-ID.js +105 -5
  117. package/dist/packages/locale/lang/index.js +38 -16
  118. package/dist/packages/locale/lang/zh-CN.js +105 -5
  119. package/dist/packages/locale/lang/zh-TW.js +105 -5
  120. package/dist/smartips/attributes.json +8 -0
  121. package/dist/smartips/tags.json +3 -1
  122. package/dist/smartips/web-types.json +19 -1
  123. package/dist/style.css +1 -1
  124. package/dist/style.es.js +1 -1
  125. package/dist/styles/themes/default.scss +41 -41
  126. package/dist/styles/themes/jdb.scss +41 -41
  127. package/dist/styles/themes/jdt.scss +41 -41
  128. package/dist/types/__VUE/actionsheet/index.vue.d.ts +5 -5
  129. package/dist/types/__VUE/address/index.vue.d.ts +7 -7
  130. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  131. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  132. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  133. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/button/index.vue.d.ts +8 -8
  135. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  136. package/dist/types/__VUE/cascader/index.vue.d.ts +4 -4
  137. package/dist/types/__VUE/cell/index.vue.d.ts +6 -6
  138. package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
  139. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  140. package/dist/types/__VUE/comment/index.vue.d.ts +2 -2
  141. package/dist/types/__VUE/datepicker/index.vue.d.ts +4 -4
  142. package/dist/types/__VUE/dialog/index.vue.d.ts +4 -4
  143. package/dist/types/__VUE/fixednav/index.vue.d.ts +4 -4
  144. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  145. package/dist/types/__VUE/image/index.vue.d.ts +4 -4
  146. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
  147. package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
  148. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  149. package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
  150. package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
  151. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
  152. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  153. package/dist/types/__VUE/notify/index.vue.d.ts +2 -2
  154. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
  155. package/dist/types/__VUE/oldpicker/index.vue.d.ts +5 -5
  156. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  157. package/dist/types/__VUE/picker/index.vue.d.ts +6 -6
  158. package/dist/types/__VUE/popover/index.vue.d.ts +8 -8
  159. package/dist/types/__VUE/popup/index.vue.d.ts +6 -6
  160. package/dist/types/__VUE/radio/index.vue.d.ts +4 -4
  161. package/dist/types/__VUE/range/index.vue.d.ts +4 -4
  162. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
  163. package/dist/types/__VUE/skeleton/index.vue.d.ts +4 -4
  164. package/dist/types/__VUE/sku/index.vue.d.ts +5 -5
  165. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/sticky/index.vue.d.ts +4 -4
  167. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/tag/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/timeselect/index.vue.d.ts +2 -2
  173. package/dist/types/__VUE/toast/index.vue.d.ts +4 -4
  174. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  175. package/dist/types/index.d.ts +1 -1
  176. package/package.json +1 -2
@@ -1,25 +1,157 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { c as e } from "./component.js";
7
- import { useSlots as t, computed as o, resolveComponent as i, openBlock as l, createElementBlock as s, normalizeClass as a, createVNode as n, withCtx as c, createElementVNode as p, toDisplayString as r, createCommentVNode as u, renderSlot as m, Fragment as d, renderList as g, normalizeStyle as h, createBlock as v } from "vue";
8
- import { popupProps as y } from "./Popup.js";
9
- import { _ as f } from "./plugin-vue_export-helper.js";
6
+ import { c as createComponent } from "./component.js";
7
+ import { useSlots, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createBlock } from "vue";
8
+ import { popupProps } from "./Popup.js";
9
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
11
  import "./OverLay.js";
12
12
  import "./Icon.js";
13
13
  import "./pxCheck.js";
14
- const { componentName: b, create: T } = e("actionsheet"), k = T({ props: { ...y, cancelTxt: { type: String, default: "" }, optionTag: { type: String, default: "name" }, optionSubTag: { type: String, default: "subname" }, chooseTagValue: { type: String, default: "" }, title: { type: String, default: "" }, color: { type: String, default: "#ee0a24" }, description: { type: String, default: "" }, menuItems: { type: Array, default: () => [] }, isWrapTeleport: { type: Boolean, default: true } }, emits: ["cancel", "close", "choose", "update:visible"], setup: (e2, { emit: i2 }) => ({ slotDefault: !!t().default, isHighlight: (t2) => e2.chooseTagValue && e2.chooseTagValue === t2[e2.optionTag] ? e2.color : "", cancelActionSheet: () => {
15
- i2("cancel"), i2("update:visible", false);
16
- }, chooseItem: (e3, t2) => {
17
- e3.disable || e3.loading || (i2("choose", e3, t2), i2("update:visible", false));
18
- }, close: (e3) => {
19
- i2("close", e3), i2("update:visible", false);
20
- }, classes: o(() => ({ [b]: true })) }) }), S = { class: "nut-actionsheet-panel" }, w = { key: 0, class: "nut-actionsheet-title" }, j = { key: 1 }, x = { key: 0, class: "nut-actionsheet-item desc" }, C = { key: 1, class: "nut-actionsheet-menu" }, I = ["onClick"], A = { key: 1 }, W = { class: "subdesc" };
21
- var O = f(k, [["render", function(e2, t2, o2, y2, f2, b2) {
22
- const T2 = i("nut-icon"), k2 = i("nut-popup");
23
- return l(), s("view", { class: a(e2.classes) }, [n(k2, { "pop-class": "popclass", visible: e2.visible, isWrapTeleport: e2.isWrapTeleport, position: "bottom", round: "", onClickOverlay: e2.close }, { default: c(() => [p("view", S, [e2.title ? (l(), s("view", w, r(e2.title), 1)) : u("", true), m(e2.$slots, "default"), e2.slotDefault ? u("", true) : (l(), s("view", j, [e2.description ? (l(), s("view", x, r(e2.description), 1)) : u("", true), e2.menuItems.length ? (l(), s("view", C, [(l(true), s(d, null, g(e2.menuItems, (t3, o3) => (l(), s("view", { class: a(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": t3.disable, "nut-actionsheet-item-loading": t3.loading }]), style: h({ color: e2.isHighlight(t3) || t3.color }), key: o3, onClick: (i2) => e2.chooseItem(t3, o3) }, [t3.loading ? (l(), v(T2, { key: 0, name: "loading" })) : (l(), s("view", A, r(t3[e2.optionTag]), 1)), p("view", W, r(t3[e2.optionSubTag]), 1)], 14, I))), 128))])) : u("", true), e2.cancelTxt ? (l(), s("view", { key: 2, class: "nut-actionsheet-cancel", onClick: t2[0] || (t2[0] = (...t3) => e2.cancelActionSheet && e2.cancelActionSheet(...t3)) }, r(e2.cancelTxt), 1)) : u("", true)]))])]), _: 3 }, 8, ["visible", "isWrapTeleport", "onClickOverlay"])], 2);
24
- }]]);
25
- export { O as default };
14
+ const { componentName, create } = createComponent("actionsheet");
15
+ const _sfc_main = create({
16
+ props: {
17
+ ...popupProps,
18
+ cancelTxt: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ optionTag: {
23
+ type: String,
24
+ default: "name"
25
+ },
26
+ optionSubTag: {
27
+ type: String,
28
+ default: "subname"
29
+ },
30
+ chooseTagValue: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ title: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ color: {
39
+ type: String,
40
+ default: "#ee0a24"
41
+ },
42
+ description: {
43
+ type: String,
44
+ default: ""
45
+ },
46
+ menuItems: {
47
+ type: Array,
48
+ default: () => []
49
+ },
50
+ isWrapTeleport: {
51
+ type: Boolean,
52
+ default: true
53
+ }
54
+ },
55
+ emits: ["cancel", "close", "choose", "update:visible"],
56
+ setup(props, { emit }) {
57
+ const slotDefault = !!useSlots().default;
58
+ const classes = computed(() => {
59
+ const prefixCls = componentName;
60
+ return {
61
+ [prefixCls]: true
62
+ };
63
+ });
64
+ const isHighlight = (item) => {
65
+ return props.chooseTagValue && props.chooseTagValue === item[props.optionTag] ? props.color : "";
66
+ };
67
+ const cancelActionSheet = () => {
68
+ emit("cancel");
69
+ emit("update:visible", false);
70
+ };
71
+ const chooseItem = (item, index2) => {
72
+ if (!item.disable && !item.loading) {
73
+ emit("choose", item, index2);
74
+ emit("update:visible", false);
75
+ }
76
+ };
77
+ const close = (e) => {
78
+ emit("close", e);
79
+ emit("update:visible", false);
80
+ };
81
+ return {
82
+ slotDefault,
83
+ isHighlight,
84
+ cancelActionSheet,
85
+ chooseItem,
86
+ close,
87
+ classes
88
+ };
89
+ }
90
+ });
91
+ const _hoisted_1 = { class: "nut-actionsheet-panel" };
92
+ const _hoisted_2 = {
93
+ key: 0,
94
+ class: "nut-actionsheet-title"
95
+ };
96
+ const _hoisted_3 = { key: 1 };
97
+ const _hoisted_4 = {
98
+ key: 0,
99
+ class: "nut-actionsheet-item desc"
100
+ };
101
+ const _hoisted_5 = {
102
+ key: 1,
103
+ class: "nut-actionsheet-menu"
104
+ };
105
+ const _hoisted_6 = ["onClick"];
106
+ const _hoisted_7 = { key: 1 };
107
+ const _hoisted_8 = { class: "subdesc" };
108
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
109
+ const _component_nut_icon = resolveComponent("nut-icon");
110
+ const _component_nut_popup = resolveComponent("nut-popup");
111
+ return openBlock(), createElementBlock("view", {
112
+ class: normalizeClass(_ctx.classes)
113
+ }, [
114
+ createVNode(_component_nut_popup, {
115
+ "pop-class": "popclass",
116
+ visible: _ctx.visible,
117
+ isWrapTeleport: _ctx.isWrapTeleport,
118
+ position: "bottom",
119
+ round: "",
120
+ onClickOverlay: _ctx.close
121
+ }, {
122
+ default: withCtx(() => [
123
+ createElementVNode("view", _hoisted_1, [
124
+ _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
125
+ renderSlot(_ctx.$slots, "default"),
126
+ !_ctx.slotDefault ? (openBlock(), createElementBlock("view", _hoisted_3, [
127
+ _ctx.description ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
128
+ _ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_5, [
129
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index2) => {
130
+ return openBlock(), createElementBlock("view", {
131
+ class: normalizeClass(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": item.disable, "nut-actionsheet-item-loading": item.loading }]),
132
+ style: normalizeStyle({ color: _ctx.isHighlight(item) || item.color }),
133
+ key: index2,
134
+ onClick: ($event) => _ctx.chooseItem(item, index2)
135
+ }, [
136
+ item.loading ? (openBlock(), createBlock(_component_nut_icon, {
137
+ key: 0,
138
+ name: "loading"
139
+ })) : (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(item[_ctx.optionTag]), 1)),
140
+ createElementVNode("view", _hoisted_8, toDisplayString(item[_ctx.optionSubTag]), 1)
141
+ ], 14, _hoisted_6);
142
+ }), 128))
143
+ ])) : createCommentVNode("", true),
144
+ _ctx.cancelTxt ? (openBlock(), createElementBlock("view", {
145
+ key: 2,
146
+ class: "nut-actionsheet-cancel",
147
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.cancelActionSheet && _ctx.cancelActionSheet(...args))
148
+ }, toDisplayString(_ctx.cancelTxt), 1)) : createCommentVNode("", true)
149
+ ])) : createCommentVNode("", true)
150
+ ])
151
+ ]),
152
+ _: 3
153
+ }, 8, ["visible", "isWrapTeleport", "onClickOverlay"])
154
+ ], 2);
155
+ }
156
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
157
+ export { index as default };