@nutui/nutui 4.3.2 → 4.3.4

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 (227) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/nutui.es.js +2 -4
  3. package/dist/nutui.js +7000 -7518
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/{Interceptor-WYVtGbGC.js → Interceptor-DlY2h6Y7.js} +2 -2
  6. package/dist/packages/actionsheet/ActionSheet.js +3 -3
  7. package/dist/packages/address/Address.js +5 -5
  8. package/dist/packages/addresslist/AddressList.js +6 -6
  9. package/dist/packages/animate/Animate.js +1 -1
  10. package/dist/packages/audio/Audio.js +2 -2
  11. package/dist/packages/audiooperate/AudioOperate.js +3 -3
  12. package/dist/packages/avatar/Avatar.js +2 -2
  13. package/dist/packages/avatarcropper/AvatarCropper.js +5 -5
  14. package/dist/packages/avatargroup/AvatarGroup.js +3 -3
  15. package/dist/packages/backtop/Backtop.js +80 -90
  16. package/dist/packages/badge/Badge.js +2 -2
  17. package/dist/packages/barrage/Barrage.js +2 -2
  18. package/dist/packages/button/Button.js +1 -1
  19. package/dist/packages/calendar/Calendar.js +817 -6
  20. package/dist/packages/calendar/index.scss +0 -1
  21. package/dist/packages/calendarcard/CalendarCard.js +4 -4
  22. package/dist/packages/card/Card.js +4 -4
  23. package/dist/packages/cascader/Cascader.js +4 -4
  24. package/dist/packages/category/Category.js +4 -4
  25. package/dist/packages/categorypane/CategoryPane.js +5 -5
  26. package/dist/packages/cell/Cell.js +4 -4
  27. package/dist/packages/cellgroup/CellGroup.js +2 -2
  28. package/dist/packages/checkbox/Checkbox.js +4 -4
  29. package/dist/packages/checkboxgroup/CheckboxGroup.js +2 -2
  30. package/dist/packages/circleprogress/CircleProgress.js +91 -98
  31. package/dist/packages/col/Col.js +2 -2
  32. package/dist/packages/collapse/Collapse.js +2 -2
  33. package/dist/packages/collapseitem/CollapseItem.js +3 -3
  34. package/dist/packages/comment/Comment.js +6 -6
  35. package/dist/packages/{common-4inKawxR.js → common-Chr7cC9o.js} +2 -2
  36. package/dist/packages/{common-FZL3qC99.js → common-DRG0ue26.js} +1 -1
  37. package/dist/packages/configprovider/ConfigProvider.js +1 -1
  38. package/dist/packages/countdown/Countdown.js +4 -4
  39. package/dist/packages/countup/Countup.js +9 -9
  40. package/dist/packages/{date-djiVNSnJ.js → date-DHXcwF1m.js} +2 -2
  41. package/dist/packages/datepicker/DatePicker.js +3 -3
  42. package/dist/packages/dialog/Dialog.js +8 -8
  43. package/dist/packages/divider/Divider.js +1 -1
  44. package/dist/packages/drag/Drag.js +3 -3
  45. package/dist/packages/ecard/Ecard.js +5 -5
  46. package/dist/packages/elevator/Elevator.js +2 -2
  47. package/dist/packages/ellipsis/Ellipsis.js +4 -4
  48. package/dist/packages/empty/Empty.js +67 -52
  49. package/dist/packages/fixednav/FixedNav.js +3 -3
  50. package/dist/packages/form/Form.js +4 -4
  51. package/dist/packages/formitem/FormItem.js +4 -4
  52. package/dist/packages/grid/Grid.js +2 -2
  53. package/dist/packages/griditem/GridItem.js +5 -5
  54. package/dist/packages/image/Image.js +3 -3
  55. package/dist/packages/imagepreview/ImagePreview.js +8 -8
  56. package/dist/packages/{index-s3RgMhc7.js → index-CFigyH92.js} +1 -1
  57. package/dist/packages/{index--uVlasFu.js → index-Do4_KY74.js} +2 -2
  58. package/dist/packages/{index-BqB5dTeo.js → index-uHBD4dfS.js} +2 -2
  59. package/dist/packages/{index.vue_vue_type_script_lang-n0HbjvfF.js → index.vue_vue_type_script_lang-CTQUvlgN.js} +4 -4
  60. package/dist/packages/{index.vue_vue_type_script_lang-54PRh3YM.js → index.vue_vue_type_script_lang-CaSiRl9x.js} +2 -2
  61. package/dist/packages/indicator/Indicator.js +56 -50
  62. package/dist/packages/infiniteloading/InfiniteLoading.js +6 -6
  63. package/dist/packages/input/Input.js +10 -10
  64. package/dist/packages/inputnumber/InputNumber.js +85 -104
  65. package/dist/packages/invoice/Invoice.js +87 -138
  66. package/dist/packages/layout/Layout.js +2 -2
  67. package/dist/packages/list/List.js +3 -3
  68. package/dist/packages/locale/lang/en-US.js +1 -1
  69. package/dist/packages/locale/lang/id-ID.js +1 -1
  70. package/dist/packages/locale/lang/index.js +2 -2
  71. package/dist/packages/locale/lang/zh-CN.js +1 -1
  72. package/dist/packages/locale/lang/zh-TW.js +1 -1
  73. package/dist/packages/menu/Menu.js +5 -5
  74. package/dist/packages/menuitem/MenuItem.js +5 -5
  75. package/dist/packages/{mountComponent-uInXoTMp.js → mountComponent-DBQ88Fjz.js} +1 -1
  76. package/dist/packages/navbar/Navbar.js +103 -115
  77. package/dist/packages/noticebar/Noticebar.js +3 -3
  78. package/dist/packages/notify/Notify.js +3 -3
  79. package/dist/packages/numberkeyboard/NumberKeyboard.js +4 -4
  80. package/dist/packages/overlay/Overlay.js +3 -3
  81. package/dist/packages/pagination/Pagination.js +3 -3
  82. package/dist/packages/picker/Picker.js +7 -10
  83. package/dist/packages/popover/Popover.js +5 -5
  84. package/dist/packages/popup/Popup.js +2 -2
  85. package/dist/packages/price/Price.js +1 -1
  86. package/dist/packages/progress/Progress.js +96 -115
  87. package/dist/packages/pullrefresh/PullRefresh.js +7 -7
  88. package/dist/packages/radio/Radio.js +1 -1
  89. package/dist/packages/radiogroup/RadioGroup.js +1 -1
  90. package/dist/packages/range/Range.js +6 -6
  91. package/dist/packages/rate/Rate.js +102 -144
  92. package/dist/packages/row/Row.js +2 -2
  93. package/dist/packages/searchbar/Searchbar.js +5 -5
  94. package/dist/packages/shortpassword/ShortPassword.js +5 -5
  95. package/dist/packages/sidenavbar/SideNavbar.js +2 -2
  96. package/dist/packages/sidenavbaritem/SideNavbarItem.js +2 -2
  97. package/dist/packages/signature/Signature.js +3 -3
  98. package/dist/packages/skeleton/Skeleton.js +13 -13
  99. package/dist/packages/sku/Sku.js +6 -6
  100. package/dist/packages/space/Space.js +1 -1
  101. package/dist/packages/step/Step.js +3 -3
  102. package/dist/packages/steps/Steps.js +2 -2
  103. package/dist/packages/sticky/Sticky.js +4 -4
  104. package/dist/packages/subsidenavbar/SubSideNavbar.js +2 -2
  105. package/dist/packages/swipe/Swipe.js +98 -112
  106. package/dist/packages/swipegroup/SwipeGroup.js +42 -24
  107. package/dist/packages/swiper/Swiper.js +7 -7
  108. package/dist/packages/swiperitem/SwiperItem.js +3 -3
  109. package/dist/packages/switch/Switch.js +68 -86
  110. package/dist/packages/tabbar/Tabbar.js +78 -78
  111. package/dist/packages/tabbaritem/TabbarItem.js +89 -113
  112. package/dist/packages/table/Table.js +3 -3
  113. package/dist/packages/tabpane/TabPane.js +2 -2
  114. package/dist/packages/tabs/Tabs.js +9 -9
  115. package/dist/packages/tag/Tag.js +57 -66
  116. package/dist/packages/textarea/Textarea.js +113 -127
  117. package/dist/packages/timedetail/TimeDetail.js +2 -2
  118. package/dist/packages/timepannel/TimePannel.js +2 -2
  119. package/dist/packages/timeselect/TimeSelect.js +4 -4
  120. package/dist/packages/toast/Toast.js +6 -6
  121. package/dist/packages/tour/Tour.js +3 -3
  122. package/dist/packages/trendarrow/TrendArrow.js +51 -83
  123. package/dist/packages/uploader/Uploader.js +9 -9
  124. package/dist/packages/{useChildren-GU_NVfD8.js → useChildren-BZ4-J79J.js} +2 -2
  125. package/dist/packages/useParent-D6DiuxZZ.js +21 -0
  126. package/dist/packages/{util-4Jkyw4BJ.js → util-DnfK0Qan.js} +2 -2
  127. package/dist/packages/video/Video.js +16 -16
  128. package/dist/packages/watermark/Watermark.js +2 -2
  129. package/dist/smartips/web-types.json +2 -2
  130. package/dist/styles/base-jdb.css +1 -1
  131. package/dist/styles/base-jddkh.css +1 -1
  132. package/dist/styles/base-jdt.css +1 -1
  133. package/dist/styles/themes/default.scss +0 -1
  134. package/dist/styles/themes/jdb.scss +0 -1
  135. package/dist/styles/themes/jddkh.scss +0 -1
  136. package/dist/styles/themes/jdt.scss +0 -1
  137. package/dist/styles/variables-jdb.scss +0 -1
  138. package/dist/styles/variables-jddkh.scss +0 -1
  139. package/dist/styles/variables-jdt.scss +0 -1
  140. package/dist/styles/variables.scss +0 -1
  141. package/dist/types/__VUE/backtop/backtop.vue.d.ts +87 -0
  142. package/dist/types/__VUE/backtop/index.d.ts +5 -0
  143. package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -12
  144. package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +88 -0
  145. package/dist/types/__VUE/circleprogress/index.d.ts +6 -0
  146. package/dist/types/__VUE/empty/empty.vue.d.ts +62 -0
  147. package/dist/types/__VUE/empty/index.d.ts +6 -0
  148. package/dist/types/__VUE/indicator/index.d.ts +6 -0
  149. package/dist/types/__VUE/indicator/indicator.vue.d.ts +65 -0
  150. package/dist/types/__VUE/inputnumber/index.d.ts +5 -0
  151. package/dist/types/__VUE/inputnumber/input-number.vue.d.ts +112 -0
  152. package/dist/types/__VUE/invoice/index.d.ts +6 -0
  153. package/dist/types/__VUE/invoice/invoice.vue.d.ts +59 -0
  154. package/dist/types/__VUE/invoice/types.d.ts +12 -0
  155. package/dist/types/__VUE/navbar/index.d.ts +5 -0
  156. package/dist/types/__VUE/navbar/navbar.vue.d.ts +125 -0
  157. package/dist/types/__VUE/progress/index.d.ts +6 -0
  158. package/dist/types/__VUE/progress/progress.vue.d.ts +91 -0
  159. package/dist/types/__VUE/rate/index.d.ts +5 -0
  160. package/dist/types/__VUE/rate/rate.vue.d.ts +208 -0
  161. package/dist/types/__VUE/swipe/index.d.ts +6 -0
  162. package/dist/types/__VUE/swipe/swipe.vue.d.ts +79 -0
  163. package/dist/types/__VUE/swipe/types.d.ts +1 -0
  164. package/dist/types/__VUE/swipegroup/index.d.ts +5 -0
  165. package/dist/types/__VUE/swipegroup/swipe-group.vue.d.ts +47 -0
  166. package/dist/types/__VUE/switch/index.d.ts +5 -0
  167. package/dist/types/__VUE/switch/switch.vue.d.ts +109 -0
  168. package/dist/types/__VUE/tabbar/index.d.ts +5 -0
  169. package/dist/types/__VUE/tabbar/tabbar.vue.d.ts +83 -0
  170. package/dist/types/__VUE/tabbaritem/index.d.ts +5 -0
  171. package/dist/types/__VUE/tabbaritem/tabbar-item.vue.d.ts +65 -0
  172. package/dist/types/__VUE/tabs/index.vue.d.ts +12 -12
  173. package/dist/types/__VUE/tag/index.d.ts +6 -0
  174. package/dist/types/__VUE/tag/tag.vue.d.ts +90 -0
  175. package/dist/types/__VUE/tag/types.d.ts +1 -1
  176. package/dist/types/__VUE/textarea/index.d.ts +5 -0
  177. package/dist/types/__VUE/textarea/textarea.vue.d.ts +104 -0
  178. package/dist/types/__VUE/trendarrow/index.d.ts +5 -0
  179. package/dist/types/__VUE/trendarrow/trend-arrow.vue.d.ts +96 -0
  180. package/dist/types/index.d.ts +36 -20
  181. package/dist/types/utils/throttle.d.ts +1 -1
  182. package/dist/types/utils/useRelation/useParent.d.ts +1 -0
  183. package/package.json +1 -1
  184. package/dist/packages/calendaritem/CalendarItem.js +0 -819
  185. package/dist/packages/calendaritem/index.css +0 -0
  186. package/dist/packages/calendaritem/index.mjs +0 -2
  187. package/dist/packages/calendaritem/index.scss +0 -0
  188. package/dist/packages/calendaritem/style/css.mjs +0 -2
  189. package/dist/packages/calendaritem/style/index.mjs +0 -2
  190. package/dist/packages/useParent-KIxqkovs.js +0 -16
  191. package/dist/types/__VUE/backtop/index.vue.d.ts +0 -98
  192. package/dist/types/__VUE/circleprogress/index.vue.d.ts +0 -95
  193. package/dist/types/__VUE/empty/index.vue.d.ts +0 -53
  194. package/dist/types/__VUE/indicator/index.vue.d.ts +0 -69
  195. package/dist/types/__VUE/inputnumber/index.vue.d.ts +0 -117
  196. package/dist/types/__VUE/invoice/index.vue.d.ts +0 -53
  197. package/dist/types/__VUE/navbar/index.vue.d.ts +0 -129
  198. package/dist/types/__VUE/progress/index.vue.d.ts +0 -120
  199. package/dist/types/__VUE/rate/index.vue.d.ts +0 -240
  200. package/dist/types/__VUE/swipe/index.vue.d.ts +0 -70
  201. package/dist/types/__VUE/swipegroup/index.vue.d.ts +0 -26
  202. package/dist/types/__VUE/switch/index.vue.d.ts +0 -118
  203. package/dist/types/__VUE/tabbar/index.vue.d.ts +0 -85
  204. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +0 -60
  205. package/dist/types/__VUE/tag/index.vue.d.ts +0 -94
  206. package/dist/types/__VUE/textarea/index.vue.d.ts +0 -127
  207. package/dist/types/__VUE/trendarrow/index.vue.d.ts +0 -102
  208. /package/dist/packages/{_plugin-vue_export-helper-yVxbj29m.js → _plugin-vue_export-helper-1tPrXgE0.js} +0 -0
  209. /package/dist/packages/{component-TCzwHGVq.js → component-DQf3CENX.js} +0 -0
  210. /package/dist/packages/{index-cp6Ms_Qe.js → index-B1qsj2XR.js} +0 -0
  211. /package/dist/packages/{index-xDfQLRen.js → index-BvmDLUYP.js} +0 -0
  212. /package/dist/packages/{index-084nl_oE.js → index-I8tfW3Kf.js} +0 -0
  213. /package/dist/packages/{index-Ii9XdkPy.js → index-aiGQ-EiA.js} +0 -0
  214. /package/dist/packages/locale/lang/{baseLang-7uiEiO-2.js → baseLang-Bnfy6fTl.js} +0 -0
  215. /package/dist/packages/{pxCheck-OnXlN1NC.js → pxCheck-DN6FYV6q.js} +0 -0
  216. /package/dist/packages/{raf-MQjoO-Ag.js → raf-c01wDYCo.js} +0 -0
  217. /package/dist/packages/{renderIcon--EgZu5_5.js → renderIcon-BfOvhG7i.js} +0 -0
  218. /package/dist/packages/{types-RCVUm7Nb.js → types-1HzUV14W.js} +0 -0
  219. /package/dist/packages/{types-zeKkNDAq.js → types-48N1bMrT.js} +0 -0
  220. /package/dist/packages/{types-Ww4ErYJT.js → types-BKDaJvHp.js} +0 -0
  221. /package/dist/packages/{types-odSRziQJ.js → types-BODurTjN.js} +0 -0
  222. /package/dist/packages/{types-qOrhXtA_.js → types-BWhKcf4T.js} +0 -0
  223. /package/dist/packages/{types-4IflWeQO.js → types-BomhFk3T.js} +0 -0
  224. /package/dist/packages/{types-j71K23JP.js → types-CkPfROfI.js} +0 -0
  225. /package/dist/packages/{types-9wCQwtH3.js → types-DUkJysbi.js} +0 -0
  226. /package/dist/packages/{types-Cq2YypZn.js → types-MuhxzCWc.js} +0 -0
  227. /package/dist/packages/{with-install-p59gYYU_.js → with-install-Ch3FF0uS.js} +0 -0
@@ -17,33 +17,24 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { u as useTouch } from "../index-084nl_oE.js";
21
- import { ref, computed, inject, watch, reactive, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from "vue";
22
- import { c as createComponent } from "../component-TCzwHGVq.js";
23
- import { S as SWIPE_KEY } from "../types-qOrhXtA_.js";
24
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
25
- const { create } = createComponent("swipe");
26
- const _sfc_main = create({
20
+ import { defineComponent, ref, computed, inject, watch, reactive, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from "vue";
21
+ import { u as useTouch } from "../index-I8tfW3Kf.js";
22
+ import { S as SWIPE_KEY } from "../types-BWhKcf4T.js";
23
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutSwipe"
26
+ }), {
27
+ __name: "swipe",
27
28
  props: {
28
- name: {
29
- type: String,
30
- default: ""
31
- },
32
- touchMoveStopPropagation: {
33
- type: Boolean,
34
- default: false
35
- },
36
- touchMovePreventDefault: {
37
- type: Boolean,
38
- default: false
39
- },
40
- disabled: {
41
- type: Boolean,
42
- default: false
43
- }
29
+ name: { default: "" },
30
+ touchMoveStopPropagation: { type: Boolean, default: false },
31
+ touchMovePreventDefault: { type: Boolean, default: false },
32
+ disabled: { type: Boolean, default: false }
44
33
  },
45
34
  emits: ["open", "close", "click"],
46
- setup(props, { emit }) {
35
+ setup(__props, { expose: __expose, emit: __emit }) {
36
+ const props = __props;
37
+ const emit = __emit;
47
38
  const getRefWidth = (ref2) => {
48
39
  var _a;
49
40
  return ((_a = ref2.value) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
@@ -130,100 +121,95 @@ const _sfc_main = create({
130
121
  state.offset = offset;
131
122
  };
132
123
  const touch = useTouch();
133
- const touchMethods = {
134
- onTouchStart(event) {
135
- if (props.disabled)
136
- return;
137
- touch.start(event);
138
- },
139
- onTouchMove(event) {
140
- if (props.disabled)
141
- return;
142
- touch.move(event);
143
- if (touch.isHorizontal()) {
144
- lockClick.value = true;
145
- state.moving = true;
146
- setoffset(touch.deltaX.value);
147
- if (props.touchMovePreventDefault) {
148
- event.preventDefault();
149
- }
150
- if (props.touchMoveStopPropagation) {
151
- event.stopPropagation();
152
- }
124
+ const onTouchStart = (event) => {
125
+ if (props.disabled)
126
+ return;
127
+ touch.start(event);
128
+ };
129
+ const onTouchMove = (event) => {
130
+ if (props.disabled)
131
+ return;
132
+ touch.move(event);
133
+ if (touch.isHorizontal()) {
134
+ lockClick.value = true;
135
+ state.moving = true;
136
+ setoffset(touch.deltaX.value);
137
+ if (props.touchMovePreventDefault) {
138
+ event.preventDefault();
153
139
  }
154
- },
155
- onTouchEnd() {
156
- if (state.moving) {
157
- state.moving = false;
158
- oldPosition = position;
159
- switch (position) {
160
- case "left":
161
- if (Math.abs(state.offset) <= rightRefWidth.value / 2) {
162
- close();
163
- } else {
164
- state.offset = -rightRefWidth.value;
165
- open();
166
- }
167
- break;
168
- case "right":
169
- if (Math.abs(state.offset) <= leftRefWidth.value / 2) {
170
- close();
171
- } else {
172
- state.offset = leftRefWidth.value;
173
- open();
174
- }
175
- break;
176
- }
177
- setTimeout(() => {
178
- lockClick.value = false;
179
- }, 0);
140
+ if (props.touchMoveStopPropagation) {
141
+ event.stopPropagation();
180
142
  }
181
143
  }
182
144
  };
183
- return __spreadProps(__spreadValues({
184
- touchStyle
185
- }, touchMethods), {
186
- leftRef,
187
- rightRef,
145
+ const onTouchEnd = () => {
146
+ if (state.moving) {
147
+ state.moving = false;
148
+ oldPosition = position;
149
+ switch (position) {
150
+ case "left":
151
+ if (Math.abs(state.offset) <= rightRefWidth.value / 2) {
152
+ close();
153
+ } else {
154
+ state.offset = -rightRefWidth.value;
155
+ open();
156
+ }
157
+ break;
158
+ case "right":
159
+ if (Math.abs(state.offset) <= leftRefWidth.value / 2) {
160
+ close();
161
+ } else {
162
+ state.offset = leftRefWidth.value;
163
+ open();
164
+ }
165
+ break;
166
+ }
167
+ setTimeout(() => {
168
+ lockClick.value = false;
169
+ }, 0);
170
+ }
171
+ };
172
+ __expose({
188
173
  open,
189
- close,
190
- onClick,
191
- lockClick
174
+ close
192
175
  });
176
+ return (_ctx, _cache) => {
177
+ return openBlock(), createElementBlock("view", {
178
+ class: "nut-swipe",
179
+ style: normalizeStyle(touchStyle.value),
180
+ onTouchstart: onTouchStart,
181
+ onTouchmove: onTouchMove,
182
+ onTouchend: onTouchEnd,
183
+ onTouchcancel: onTouchEnd
184
+ }, [
185
+ createElementVNode("view", {
186
+ ref_key: "leftRef",
187
+ ref: leftRef,
188
+ class: "nut-swipe__left",
189
+ onClick: _cache[0] || (_cache[0] = ($event) => onClick($event, "left", true))
190
+ }, [
191
+ renderSlot(_ctx.$slots, "left")
192
+ ], 512),
193
+ createElementVNode("view", {
194
+ class: "nut-swipe__content",
195
+ onClick: _cache[1] || (_cache[1] = ($event) => onClick($event, "content", lockClick.value))
196
+ }, [
197
+ renderSlot(_ctx.$slots, "default")
198
+ ]),
199
+ createElementVNode("view", {
200
+ ref_key: "rightRef",
201
+ ref: rightRef,
202
+ class: "nut-swipe__right",
203
+ onClick: _cache[2] || (_cache[2] = ($event) => onClick($event, "right", true))
204
+ }, [
205
+ renderSlot(_ctx.$slots, "right")
206
+ ], 512)
207
+ ], 36);
208
+ };
193
209
  }
194
- });
195
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
196
- return openBlock(), createElementBlock("view", {
197
- class: "nut-swipe",
198
- style: normalizeStyle(_ctx.touchStyle),
199
- onTouchstart: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
200
- onTouchmove: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
201
- onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
202
- onTouchcancel: _cache[6] || (_cache[6] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
203
- }, [
204
- createElementVNode("view", {
205
- ref: "leftRef",
206
- class: "nut-swipe__left",
207
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.onClick($event, "left", true))
208
- }, [
209
- renderSlot(_ctx.$slots, "left")
210
- ], 512),
211
- createElementVNode("view", {
212
- class: "nut-swipe__content",
213
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.onClick($event, "content", _ctx.lockClick))
214
- }, [
215
- renderSlot(_ctx.$slots, "default")
216
- ]),
217
- createElementVNode("view", {
218
- ref: "rightRef",
219
- class: "nut-swipe__right",
220
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onClick($event, "right", true))
221
- }, [
222
- renderSlot(_ctx.$slots, "right")
223
- ], 512)
224
- ], 36);
225
- }
226
- const NutSwipe = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
210
+ }));
211
+ withInstall(_sfc_main);
227
212
  export {
228
- NutSwipe as default
213
+ _sfc_main as Swipe,
214
+ _sfc_main as default
229
215
  };
@@ -1,16 +1,34 @@
1
- import { ref, provide, openBlock, createElementBlock, renderSlot } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { S as SWIPE_KEY } from "../types-qOrhXtA_.js";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
- const { create } = createComponent("swipe-group");
6
- const _sfc_main = create({
7
- props: {
8
- lock: {
9
- type: Boolean,
10
- default: false
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
11
16
  }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, ref, provide, openBlock, createElementBlock, renderSlot } from "vue";
21
+ import { S as SWIPE_KEY } from "../types-BWhKcf4T.js";
22
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
23
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
24
+ name: "NutSwipeGroup"
25
+ }), {
26
+ __name: "swipe-group",
27
+ props: {
28
+ lock: { type: Boolean, default: false }
12
29
  },
13
- setup(props) {
30
+ setup(__props) {
31
+ const props = __props;
14
32
  const swipeGroupRef = ref(null);
15
33
  const name = ref("");
16
34
  const update = (n) => {
@@ -21,19 +39,19 @@ const _sfc_main = create({
21
39
  lock: props.lock,
22
40
  name
23
41
  });
24
- return { swipeGroupRef };
42
+ return (_ctx, _cache) => {
43
+ return openBlock(), createElementBlock("div", {
44
+ ref_key: "swipeGroupRef",
45
+ ref: swipeGroupRef,
46
+ class: "nut-swipe-group"
47
+ }, [
48
+ renderSlot(_ctx.$slots, "default")
49
+ ], 512);
50
+ };
25
51
  }
26
- });
27
- const _hoisted_1 = {
28
- ref: "swipeGroupRef",
29
- class: "nut-swipe-group"
30
- };
31
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
- return openBlock(), createElementBlock("div", _hoisted_1, [
33
- renderSlot(_ctx.$slots, "default")
34
- ], 512);
35
- }
36
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
52
+ }));
53
+ withInstall(_sfc_main);
37
54
  export {
38
- index as default
55
+ _sfc_main as SwipeGroup,
56
+ _sfc_main as default
39
57
  };
@@ -1,10 +1,10 @@
1
1
  import { ref, reactive, computed, provide, onDeactivated, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { e as clamp } from "../util-4Jkyw4BJ.js";
4
- import { u as useTouch } from "../index-084nl_oE.js";
5
- import { r as requestAniFrame } from "../raf-MQjoO-Ag.js";
6
- import { S as SWIPER_KEY } from "../types-9wCQwtH3.js";
7
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
2
+ import { c as createComponent } from "../component-DQf3CENX.js";
3
+ import { e as clamp } from "../util-DnfK0Qan.js";
4
+ import { u as useTouch } from "../index-I8tfW3Kf.js";
5
+ import { r as requestAniFrame } from "../raf-c01wDYCo.js";
6
+ import { S as SWIPER_KEY } from "../types-DUkJysbi.js";
7
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
8
8
  const { create, componentName } = createComponent("swiper");
9
9
  const _sfc_main = create({
10
10
  props: {
@@ -17,7 +17,7 @@ const _sfc_main = create({
17
17
  direction: {
18
18
  type: String,
19
19
  default: "horizontal"
20
- //horizontal and vertical
20
+ // horizontal and vertical
21
21
  },
22
22
  paginationVisible: {
23
23
  type: Boolean,
@@ -1,7 +1,7 @@
1
1
  import { getCurrentInstance, inject, reactive, computed, onUnmounted, openBlock, createElementBlock, normalizeStyle, renderSlot } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { S as SWIPER_KEY } from "../types-9wCQwtH3.js";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
2
+ import { c as createComponent } from "../component-DQf3CENX.js";
3
+ import { S as SWIPER_KEY } from "../types-DUkJysbi.js";
4
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
5
5
  function useExpose(apis) {
6
6
  const instance = getCurrentInstance();
7
7
  if (instance) {
@@ -1,63 +1,52 @@
1
- import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
3
21
  import { Loading1 } from "@nutui/icons-vue";
4
- import { u as useFormDisabled } from "../common-FZL3qC99.js";
5
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
6
- const { componentName, create } = createComponent("switch");
7
- const _sfc_main = create({
8
- components: { Loading1 },
22
+ import { u as useFormDisabled } from "../common-DRG0ue26.js";
23
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
+ const _hoisted_1 = { class: "nut-switch-button" };
25
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
26
+ name: "NutSwitch"
27
+ }), {
28
+ __name: "switch",
9
29
  props: {
10
- modelValue: {
11
- type: [String, Number, Boolean],
12
- default: false
13
- },
14
- disabled: {
15
- type: Boolean,
16
- default: false
17
- },
18
- /**
19
- * @deprecated Please use `disabled` prop instead.
20
- */
21
- disable: {
22
- type: Boolean,
23
- default: false
24
- },
25
- activeColor: {
26
- type: String,
27
- default: ""
28
- },
29
- inactiveColor: {
30
- type: String,
31
- default: ""
32
- },
33
- activeText: {
34
- type: String,
35
- default: ""
36
- },
37
- inactiveText: {
38
- type: String,
39
- default: ""
40
- },
41
- activeValue: {
42
- type: [String, Number, Boolean],
43
- default: true
44
- },
45
- inactiveValue: {
46
- type: [String, Number, Boolean],
47
- default: false
48
- },
49
- loading: {
50
- type: Boolean,
51
- default: false
52
- }
30
+ modelValue: { type: [String, Number, Boolean], default: false },
31
+ disabled: { type: Boolean, default: false },
32
+ activeColor: { default: "" },
33
+ inactiveColor: { default: "" },
34
+ activeText: { default: "" },
35
+ inactiveText: { default: "" },
36
+ activeValue: { type: [String, Number, Boolean], default: true },
37
+ inactiveValue: { type: [String, Number, Boolean], default: false },
38
+ loading: { type: Boolean, default: false },
39
+ disable: { type: Boolean, default: false }
53
40
  },
54
41
  emits: ["change", "update:modelValue", "update:loading"],
55
- setup(props, { emit }) {
42
+ setup(__props, { emit: __emit }) {
43
+ const props = __props;
44
+ const emit = __emit;
56
45
  const legacyDisabled = computed(() => props.disabled || props.disable);
57
46
  const disabled = useFormDisabled(legacyDisabled);
58
47
  const isActive = computed(() => props.modelValue === props.activeValue);
59
48
  const classes = computed(() => {
60
- const prefixCls = componentName;
49
+ const prefixCls = "nut-switch";
61
50
  return {
62
51
  [prefixCls]: true,
63
52
  [isActive.value ? "nut-switch-open" : "nut-switch-close"]: true,
@@ -89,41 +78,34 @@ const _sfc_main = create({
89
78
  }
90
79
  }
91
80
  );
92
- return {
93
- classes,
94
- style,
95
- isActive,
96
- onClick
81
+ return (_ctx, _cache) => {
82
+ return openBlock(), createElementBlock("view", {
83
+ class: normalizeClass(classes.value),
84
+ style: normalizeStyle(style.value),
85
+ onClick
86
+ }, [
87
+ createElementVNode("view", _hoisted_1, [
88
+ _ctx.loading ? renderSlot(_ctx.$slots, "icon", { key: 0 }, () => [
89
+ createVNode(unref(Loading1), {
90
+ name: "loading",
91
+ color: _ctx.activeColor
92
+ }, null, 8, ["color"])
93
+ ]) : createCommentVNode("", true),
94
+ _ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
95
+ withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
96
+ [vShow, isActive.value]
97
+ ]),
98
+ withDirectives(createElementVNode("view", { class: "nut-switch-label close" }, toDisplayString(_ctx.inactiveText), 513), [
99
+ [vShow, !isActive.value]
100
+ ])
101
+ ], 64)) : createCommentVNode("", true)
102
+ ])
103
+ ], 6);
97
104
  };
98
105
  }
99
- });
100
- const _hoisted_1 = { class: "nut-switch-button" };
101
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
102
- const _component_Loading1 = resolveComponent("Loading1");
103
- return openBlock(), createElementBlock("view", {
104
- class: normalizeClass(_ctx.classes),
105
- style: normalizeStyle(_ctx.style),
106
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
107
- }, [
108
- createElementVNode("view", _hoisted_1, [
109
- _ctx.loading ? renderSlot(_ctx.$slots, "icon", { key: 0 }, () => [
110
- createVNode(_component_Loading1, {
111
- name: "loading",
112
- color: _ctx.activeColor
113
- }, null, 8, ["color"])
114
- ]) : createCommentVNode("", true),
115
- _ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
116
- withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
117
- [vShow, _ctx.isActive]
118
- ]),
119
- withDirectives(createElementVNode("view", { class: "nut-switch-label close" }, toDisplayString(_ctx.inactiveText), 513), [
120
- [vShow, !_ctx.isActive]
121
- ])
122
- ], 64)) : createCommentVNode("", true)
123
- ])
124
- ], 6);
125
- }
126
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
106
+ }));
107
+ withInstall(_sfc_main);
127
108
  export {
128
- index as default
109
+ _sfc_main as Switch,
110
+ _sfc_main as default
129
111
  };