@nutui/nutui 3.1.21 → 3.1.22-beta.5

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 (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -100
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,144 +1,42 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createVNode, createBlock, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { p as pxCheck } from "./pxCheck.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { c as e } from "./component.js";
7
+ import { ref as o, computed as a, resolveComponent as t, openBlock as l, createElementBlock as n, normalizeClass as c, Fragment as i, renderList as r, normalizeStyle as s, createVNode as u, createBlock as f, createCommentVNode as m } from "vue";
8
+ import { p as d } from "./pxCheck.js";
9
+ import { u as p } from "./index4.js";
10
+ import { _ as h } from "./plugin-vue_export-helper.js";
10
11
  import "../locale/lang";
11
- const { componentName, create } = createComponent("rate");
12
- const _sfc_main = create({
13
- props: {
14
- count: {
15
- type: [String, Number],
16
- default: 5
17
- },
18
- modelValue: {
19
- type: [String, Number],
20
- default: 0
21
- },
22
- iconSize: {
23
- type: [String, Number],
24
- default: 18
25
- },
26
- activeColor: {
27
- type: String,
28
- default: ""
29
- },
30
- voidColor: {
31
- type: String,
32
- default: ""
33
- },
34
- uncheckedIcon: {
35
- type: String,
36
- default: "star-n"
37
- },
38
- checkedIcon: {
39
- type: String,
40
- default: "star-fill-n"
41
- },
42
- readonly: {
43
- type: Boolean,
44
- default: false
45
- },
46
- disabled: {
47
- type: Boolean,
48
- default: false
49
- },
50
- allowHalf: {
51
- type: Boolean,
52
- default: false
53
- },
54
- spacing: {
55
- type: [String, Number],
56
- default: 14
57
- },
58
- classPrefix: {
59
- type: String,
60
- default: "nut-icon"
61
- },
62
- fontClassName: {
63
- type: String,
64
- default: "nutui-iconfont"
65
- }
66
- },
67
- emits: ["update:modelValue", "change"],
68
- setup(props, { emit }) {
69
- const classes = computed(() => {
70
- const prefixCls = componentName;
71
- return {
72
- [prefixCls]: true
73
- };
74
- });
75
- const onClick = (e, index2) => {
76
- e.preventDefault();
77
- e.stopPropagation();
78
- if (props.disabled || props.readonly)
79
- return;
80
- let value = 0;
81
- if (index2 === 1 && props.modelValue === index2)
82
- ;
83
- else {
84
- value = index2;
85
- if (props.allowHalf) {
86
- if ((e == null ? void 0 : e.target).className.includes("__icon--half")) {
87
- value -= 0.5;
88
- }
12
+ const { componentName: C } = e("rate"), k = ((e2 = true) => ({ props: { count: { type: [String, Number], default: 5 }, modelValue: { type: [String, Number], default: 0 }, iconSize: { type: [String, Number], default: 18 }, activeColor: { type: String, default: "" }, voidColor: { type: String, default: "" }, uncheckedIcon: { type: String, default: "star-n" }, checkedIcon: { type: String, default: "star-fill-n" }, readonly: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, allowHalf: { type: Boolean, default: false }, touchable: { type: Boolean, default: true }, spacing: { type: [String, Number], default: 14 }, classPrefix: { type: String, default: "nut-icon" }, fontClassName: { type: String, default: "nutui-iconfont" } }, emits: ["update:modelValue", "change"], setup(t2, { emit: l2 }) {
13
+ const n2 = o([]), c2 = a(() => ({ [C]: true })), i2 = (e3) => {
14
+ l2("update:modelValue", e3), l2("change", e3);
15
+ }, r2 = p(), s2 = { onTouchStart(e3) {
16
+ t2.touchable && r2.start(e3);
17
+ }, onTouchMove(o2) {
18
+ t2.touchable && e2 && (r2.move(o2), r2.isHorizontal() && n2.value && (o2.preventDefault(), i2(((e3, o3, a2) => {
19
+ let t3 = 0;
20
+ for (let l3 = o3.value.length - 1; l3 >= 0; l3--) {
21
+ const n3 = o3.value[l3];
22
+ if (e3 > n3.offsetLeft) {
23
+ t3 = a2 ? l3 + (e3 > n3.offsetLeft + n3.clientWidth / 2 ? 1 : 0.5) : l3 + 1;
24
+ break;
89
25
  }
90
26
  }
91
- emit("update:modelValue", value);
92
- emit("change", value);
93
- };
94
- return {
95
- classes,
96
- onClick,
97
- pxCheck
98
- };
99
- }
100
- });
101
- const _hoisted_1 = ["onClick"];
102
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
- const _component_nut_icon = resolveComponent("nut-icon");
104
- return openBlock(), createElementBlock("view", {
105
- class: normalizeClass(_ctx.classes)
106
- }, [
107
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (n) => {
108
- return openBlock(), createElementBlock("view", {
109
- class: "nut-rate-item",
110
- key: n,
111
- onClick: ($event) => _ctx.onClick($event, n),
112
- style: normalizeStyle({ marginRight: _ctx.pxCheck(_ctx.spacing) })
113
- }, [
114
- createVNode(_component_nut_icon, {
115
- size: _ctx.iconSize,
116
- class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
117
- "font-class-name": _ctx.fontClassName,
118
- "class-prefix": _ctx.classPrefix,
119
- color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
120
- name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
121
- }, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]),
122
- _ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
123
- key: 0,
124
- class: "nut-rate-item__icon nut-rate-item__icon--half",
125
- "font-class-name": _ctx.fontClassName,
126
- "class-prefix": _ctx.classPrefix,
127
- color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
128
- size: _ctx.iconSize,
129
- name: _ctx.checkedIcon
130
- }, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
131
- key: 1,
132
- class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
133
- "font-class-name": _ctx.fontClassName,
134
- "class-prefix": _ctx.classPrefix,
135
- color: _ctx.voidColor,
136
- size: _ctx.iconSize,
137
- name: _ctx.uncheckedIcon
138
- }, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
139
- ], 12, _hoisted_1);
140
- }), 128))
141
- ], 2);
142
- }
143
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
144
- export { index as default };
27
+ return t3;
28
+ })(r2.moveX.value, n2, t2.allowHalf))));
29
+ } }, u2 = Math.random().toString(36).slice(-8);
30
+ return { classes: c2, ...s2, onClick: (e3, o2) => {
31
+ if (t2.disabled || t2.readonly)
32
+ return;
33
+ let a2 = 0;
34
+ o2 === 1 && t2.modelValue === o2 || (a2 = o2, t2.allowHalf && e3 == 2 && (a2 -= 0.5)), i2(a2);
35
+ }, pxCheck: d, rateRefs: n2, refRandomId: u2 };
36
+ } }))(), v = ["id"];
37
+ const { create: g } = e("rate");
38
+ var y = h(g(k), [["render", function(e2, o2, a2, d2, p2, h2) {
39
+ const C2 = t("nut-icon");
40
+ return l(), n("view", { class: c(e2.classes), onTouchstart: o2[0] || (o2[0] = (...o3) => e2.onTouchStart && e2.onTouchStart(...o3)), onTouchmove: o2[1] || (o2[1] = (...o3) => e2.onTouchMove && e2.onTouchMove(...o3)) }, [(l(true), n(i, null, r(Number(e2.count), (o3) => (l(), n("view", { class: "nut-rate-item", key: o3, ref: "rateRefs", id: "rateRefs-" + e2.refRandomId + o3, style: s({ marginRight: e2.pxCheck(e2.spacing) }) }, [u(C2, { size: e2.iconSize, class: c(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": e2.disabled || o3 > e2.modelValue }]), onClick: (a3) => e2.onClick(1, o3), color: o3 <= e2.modelValue ? e2.activeColor : e2.voidColor, "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, name: o3 <= e2.modelValue ? e2.checkedIcon : e2.uncheckedIcon }, null, 8, ["size", "onClick", "class", "color", "font-class-name", "class-prefix", "name"]), e2.allowHalf && Number(e2.modelValue) + 1 > o3 ? (l(), f(C2, { key: 0, class: "nut-rate-item__icon nut-rate-item__icon--half", onClick: (a3) => e2.onClick(2, o3), "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, color: o3 <= Number(e2.modelValue) + 1 ? e2.activeColor : e2.voidColor, size: e2.iconSize, name: e2.checkedIcon }, null, 8, ["onClick", "font-class-name", "class-prefix", "color", "size", "name"])) : e2.allowHalf && Number(e2.modelValue) + 1 < o3 ? (l(), f(C2, { key: 1, class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half", onClick: (a3) => e2.onClick(2, o3), "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, color: e2.voidColor, size: e2.iconSize, name: e2.uncheckedIcon }, null, 8, ["onClick", "font-class-name", "class-prefix", "color", "size", "name"])) : m("", true)], 12, v))), 128))], 34);
41
+ }]]);
42
+ export { y as default };
@@ -1,69 +1,27 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { provide as t, openBlock as e, createElementBlock as r, normalizeClass as n, renderSlot as l } from "vue";
7
+ import { c as a } from "./component.js";
8
+ import { _ as o } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("row");
11
- const _sfc_main = create({
12
- props: {
13
- type: {
14
- type: String,
15
- default: ""
16
- },
17
- gutter: {
18
- type: [String, Number],
19
- default: ""
20
- },
21
- justify: {
22
- type: String,
23
- default: "start"
24
- },
25
- align: {
26
- type: String,
27
- default: "flex-start"
28
- },
29
- flexWrap: {
30
- type: String,
31
- default: "nowrap"
32
- }
33
- },
34
- emits: ["click"],
35
- setup(props, { emit }) {
36
- const prefixCls = componentName;
37
- provide("gutter", props.gutter);
38
- const getClass = (prefix, type) => {
39
- return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
40
- };
41
- const getClasses = () => {
42
- return `
43
- ${getClass("", props.type)}
44
- ${getClass("justify", props.justify)}
45
- ${getClass("align", props.align)}
46
- ${getClass("flex", props.flexWrap)}
47
- ${prefixCls}
48
- `;
49
- };
50
- const handleClick = (evt) => {
51
- evt.stopPropagation();
52
- emit("click", evt);
53
- };
54
- return {
55
- getClasses,
56
- handleClick
57
- };
58
- }
59
- });
60
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
61
- return openBlock(), createElementBlock("view", {
62
- class: normalizeClass(_ctx.getClasses()),
63
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
64
- }, [
65
- renderSlot(_ctx.$slots, "default")
66
- ], 2);
67
- }
68
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
69
- export { index as default };
10
+ const { componentName: i, create: s } = a("row");
11
+ var p = o(s({ props: { type: { type: String, default: "" }, gutter: { type: [String, Number], default: "" }, justify: { type: String, default: "start" }, align: { type: String, default: "flex-start" }, flexWrap: { type: String, default: "nowrap" } }, emits: ["click"], setup(e2, { emit: r2 }) {
12
+ const n2 = i;
13
+ t("gutter", e2.gutter);
14
+ const l2 = (t2, e3) => t2 ? e3 ? `nut-row-${t2}-${e3}` : "" : `nut-row-${e3}`;
15
+ return { getClasses: () => `
16
+ ${l2("", e2.type)}
17
+ ${l2("justify", e2.justify)}
18
+ ${l2("align", e2.align)}
19
+ ${l2("flex", e2.flexWrap)}
20
+ ${n2}
21
+ `, handleClick: (t2) => {
22
+ t2.stopPropagation(), r2("click", t2);
23
+ } };
24
+ } }), [["render", function(t2, a2, o2, i2, s2, p2) {
25
+ return e(), r("view", { class: n(t2.getClasses()), onClick: a2[0] || (a2[0] = (...e2) => t2.handleClick && t2.handleClick(...e2)) }, [l(t2.$slots, "default")], 2);
26
+ }]]);
27
+ export { p as default };
@@ -1,262 +1,42 @@
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
1
  /*!
21
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
25
- import { reactive, computed, ref, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createVNode, vShow } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { reactive as e, computed as a, ref as l, onMounted as t, toRefs as r, resolveComponent as n, openBlock as c, createElementBlock as u, normalizeStyle as i, toDisplayString as o, createCommentVNode as s, renderSlot as h, createElementVNode as p, withModifiers as d, withDirectives as g, createVNode as b, vShow as m } from "vue";
7
+ import { c as f } from "./component.js";
8
+ import { _ as y } from "./plugin-vue_export-helper.js";
28
9
  import "../locale/lang";
29
- const { create, translate } = createComponent("searchbar");
30
- const _sfc_main = create({
31
- props: {
32
- modelValue: {
33
- type: [String, Number],
34
- default: ""
35
- },
36
- inputType: {
37
- type: String,
38
- default: "textarea"
39
- },
40
- label: {
41
- type: String,
42
- default: ""
43
- },
44
- maxLength: {
45
- type: [String, Number],
46
- default: "9999"
47
- },
48
- placeholder: {
49
- type: String,
50
- default: ""
51
- },
52
- clearable: {
53
- type: Boolean,
54
- default: true
55
- },
56
- background: {
57
- type: String,
58
- default: ""
59
- },
60
- inputBackground: {
61
- type: String,
62
- default: ""
63
- },
64
- autofocus: {
65
- type: Boolean,
66
- default: false
67
- },
68
- disabled: {
69
- type: Boolean,
70
- default: false
71
- },
72
- readonly: {
73
- type: Boolean,
74
- default: false
75
- },
76
- inputAlign: {
77
- type: String,
78
- default: "left"
79
- }
80
- },
81
- emits: [
82
- "change",
83
- "update:modelValue",
84
- "blur",
85
- "focus",
86
- "clear",
87
- "search",
88
- "click-input",
89
- "click-left-icon",
90
- "click-right-icon"
91
- ],
92
- setup(props, { emit }) {
93
- const state = reactive({
94
- active: false
95
- });
96
- const searchbarStyle = computed(() => {
97
- return {
98
- background: props.background
99
- };
100
- });
101
- const inputSearchbarStyle = computed(() => {
102
- return {
103
- background: props.inputBackground
104
- };
105
- });
106
- const valueChange = (event) => {
107
- const input = event.target;
108
- let val = input.value;
109
- if (props.maxLength && val.length > Number(props.maxLength)) {
110
- val = val.slice(0, Number(props.maxLength));
111
- }
112
- emit("update:modelValue", val, event);
113
- emit("change", val, event);
114
- };
115
- const valueFocus = (event) => {
116
- const input = event.target;
117
- let value = input.value;
118
- state.active = true;
119
- emit("focus", value, event);
120
- };
121
- const valueBlur = (event) => {
122
- setTimeout(() => {
123
- state.active = false;
124
- }, 0);
125
- const input = event.target;
126
- let value = input.value;
127
- if (props.maxLength && value.length > Number(props.maxLength)) {
128
- value = value.slice(0, Number(props.maxLength));
129
- }
130
- emit("blur", value, event);
131
- };
132
- const handleClear = (event) => {
133
- emit("update:modelValue", "", event);
134
- emit("change", "", event);
135
- emit("clear", "");
136
- };
137
- const handleSubmit = () => {
138
- emit("search", props.modelValue);
139
- };
140
- const clickInput = (event) => {
141
- emit("click-input", event);
142
- };
143
- const leftIconClick = (event) => {
144
- emit("click-left-icon", props.modelValue, event);
145
- };
146
- const rightIconClick = (event) => {
147
- emit("click-right-icon", props.modelValue, event);
148
- };
149
- const styleSearchbar = computed(() => {
150
- return {
151
- "text-align": props.inputAlign
152
- };
153
- });
154
- const inputsearch = ref(null);
155
- onMounted(() => {
156
- if (props.autofocus) {
157
- inputsearch.value.focus();
158
- }
159
- });
160
- return __spreadProps(__spreadValues({
161
- inputsearch
162
- }, toRefs(state)), {
163
- valueChange,
164
- valueFocus,
165
- valueBlur,
166
- handleClear,
167
- handleSubmit,
168
- searchbarStyle,
169
- inputSearchbarStyle,
170
- translate,
171
- clickInput,
172
- leftIconClick,
173
- rightIconClick,
174
- styleSearchbar
175
- });
176
- }
177
- });
178
- const _hoisted_1 = {
179
- key: 0,
180
- class: "nut-searchbar__search-label"
181
- };
182
- const _hoisted_2 = {
183
- key: 1,
184
- class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
185
- };
186
- const _hoisted_3 = { class: "nut-searchbar__input-inner" };
187
- const _hoisted_4 = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"];
188
- const _hoisted_5 = {
189
- key: 2,
190
- class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
191
- };
192
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
193
- const _component_nut_icon = resolveComponent("nut-icon");
194
- return openBlock(), createElementBlock("view", {
195
- class: "nut-searchbar",
196
- style: normalizeStyle(_ctx.searchbarStyle)
197
- }, [
198
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
199
- _ctx.$slots.leftout ? (openBlock(), createElementBlock("view", _hoisted_2, [
200
- renderSlot(_ctx.$slots, "leftout")
201
- ])) : createCommentVNode("", true),
202
- createElementVNode("view", {
203
- class: "nut-searchbar__search-input",
204
- style: normalizeStyle(_ctx.inputSearchbarStyle)
205
- }, [
206
- _ctx.$slots.leftin ? (openBlock(), createElementBlock("view", {
207
- key: 0,
208
- class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon",
209
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.leftIconClick && _ctx.leftIconClick(...args))
210
- }, [
211
- renderSlot(_ctx.$slots, "leftin")
212
- ])) : createCommentVNode("", true),
213
- createElementVNode("view", _hoisted_3, [
214
- createElementVNode("form", {
215
- action: "#",
216
- onSubmit: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
217
- }, [
218
- createElementVNode("input", {
219
- ref: "inputsearch",
220
- class: "nut-searchbar__input-bar",
221
- type: _ctx.inputType,
222
- maxlength: _ctx.maxLength,
223
- placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
224
- value: _ctx.modelValue,
225
- disabled: _ctx.disabled,
226
- readonly: _ctx.readonly,
227
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.clickInput && _ctx.clickInput(...args)),
228
- onInput: _cache[2] || (_cache[2] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
229
- onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
230
- onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args)),
231
- style: normalizeStyle(_ctx.styleSearchbar)
232
- }, null, 44, _hoisted_4)
233
- ], 32),
234
- _ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
235
- key: 0,
236
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.handleClear && _ctx.handleClear(...args)),
237
- class: "nut-searchbar__input-clear"
238
- }, [
239
- createVNode(_component_nut_icon, {
240
- name: "circle-close",
241
- size: "12",
242
- color: "#555"
243
- })
244
- ], 512)), [
245
- [vShow, _ctx.modelValue.length > 0]
246
- ]) : createCommentVNode("", true)
247
- ]),
248
- _ctx.$slots.rightin ? (openBlock(), createElementBlock("view", {
249
- key: 1,
250
- class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon",
251
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.rightIconClick && _ctx.rightIconClick(...args))
252
- }, [
253
- renderSlot(_ctx.$slots, "rightin")
254
- ])) : createCommentVNode("", true)
255
- ], 4),
256
- _ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_5, [
257
- renderSlot(_ctx.$slots, "rightout")
258
- ])) : createCommentVNode("", true)
259
- ], 4);
260
- }
261
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
262
- export { index as default };
10
+ const { create: k, translate: v } = f("searchbar"), _ = k({ props: { modelValue: { type: [String, Number], default: "" }, inputType: { type: String, default: "textarea" }, label: { type: String, default: "" }, maxLength: { type: [String, Number], default: "9999" }, placeholder: { type: String, default: "" }, clearable: { type: Boolean, default: true }, background: { type: String, default: "" }, inputBackground: { type: String, default: "" }, autofocus: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, readonly: { type: Boolean, default: false }, inputAlign: { type: String, default: "left" } }, emits: ["change", "update:modelValue", "blur", "focus", "clear", "search", "click-input", "click-left-icon", "click-right-icon"], setup(n2, { emit: c2 }) {
11
+ const u2 = e({ active: false }), i2 = a(() => ({ background: n2.background })), o2 = a(() => ({ background: n2.inputBackground })), s2 = a(() => ({ "text-align": n2.inputAlign })), h2 = l(null);
12
+ return t(() => {
13
+ n2.autofocus && h2.value.focus();
14
+ }), { inputsearch: h2, ...r(u2), valueChange: (e2) => {
15
+ let a2 = e2.target.value;
16
+ n2.maxLength && a2.length > Number(n2.maxLength) && (a2 = a2.slice(0, Number(n2.maxLength))), c2("update:modelValue", a2, e2), c2("change", a2, e2);
17
+ }, valueFocus: (e2) => {
18
+ let a2 = e2.target.value;
19
+ u2.active = true, c2("focus", a2, e2);
20
+ }, valueBlur: (e2) => {
21
+ setTimeout(() => {
22
+ u2.active = false;
23
+ }, 0);
24
+ let a2 = e2.target.value;
25
+ n2.maxLength && a2.length > Number(n2.maxLength) && (a2 = a2.slice(0, Number(n2.maxLength))), c2("blur", a2, e2);
26
+ }, handleClear: (e2) => {
27
+ c2("update:modelValue", "", e2), c2("change", "", e2), c2("clear", "");
28
+ }, handleSubmit: () => {
29
+ c2("search", n2.modelValue);
30
+ }, searchbarStyle: i2, inputSearchbarStyle: o2, translate: v, clickInput: (e2) => {
31
+ c2("click-input", e2);
32
+ }, leftIconClick: (e2) => {
33
+ c2("click-left-icon", n2.modelValue, e2);
34
+ }, rightIconClick: (e2) => {
35
+ c2("click-right-icon", n2.modelValue, e2);
36
+ }, styleSearchbar: s2 };
37
+ } }), S = { key: 0, class: "nut-searchbar__search-label" }, C = { key: 1, class: "nut-searchbar__search-icon nut-searchbar__left-search-icon" }, x = { class: "nut-searchbar__input-inner" }, B = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"], I = { key: 2, class: "nut-searchbar__search-icon nut-searchbar__right-search-icon" };
38
+ var V = y(_, [["render", function(e2, a2, l2, t2, r2, f2) {
39
+ const y2 = n("nut-icon");
40
+ return c(), u("view", { class: "nut-searchbar", style: i(e2.searchbarStyle) }, [e2.label ? (c(), u("span", S, o(e2.label), 1)) : s("", true), e2.$slots.leftout ? (c(), u("view", C, [h(e2.$slots, "leftout")])) : s("", true), p("view", { class: "nut-searchbar__search-input", style: i(e2.inputSearchbarStyle) }, [e2.$slots.leftin ? (c(), u("view", { key: 0, class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon", onClick: a2[0] || (a2[0] = (...a3) => e2.leftIconClick && e2.leftIconClick(...a3)) }, [h(e2.$slots, "leftin")])) : s("", true), p("view", x, [p("form", { action: "#", onSubmit: a2[5] || (a2[5] = d((...a3) => e2.handleSubmit && e2.handleSubmit(...a3), ["prevent"])) }, [p("input", { ref: "inputsearch", class: "nut-searchbar__input-bar", type: e2.inputType, maxlength: e2.maxLength, placeholder: e2.placeholder || e2.translate("placeholder"), value: e2.modelValue, disabled: e2.disabled, readonly: e2.readonly, onClick: a2[1] || (a2[1] = (...a3) => e2.clickInput && e2.clickInput(...a3)), onInput: a2[2] || (a2[2] = (...a3) => e2.valueChange && e2.valueChange(...a3)), onFocus: a2[3] || (a2[3] = (...a3) => e2.valueFocus && e2.valueFocus(...a3)), onBlur: a2[4] || (a2[4] = (...a3) => e2.valueBlur && e2.valueBlur(...a3)), style: i(e2.styleSearchbar) }, null, 44, B)], 32), e2.clearable ? g((c(), u("view", { key: 0, onClick: a2[6] || (a2[6] = (...a3) => e2.handleClear && e2.handleClear(...a3)), class: "nut-searchbar__input-clear" }, [b(y2, { name: "circle-close", size: "12", color: "#555" })], 512)), [[m, e2.modelValue.length > 0]]) : s("", true)]), e2.$slots.rightin ? (c(), u("view", { key: 1, class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon", onClick: a2[7] || (a2[7] = (...a3) => e2.rightIconClick && e2.rightIconClick(...a3)) }, [h(e2.$slots, "rightin")])) : s("", true)], 4), e2.$slots.rightout ? (c(), u("view", I, [h(e2.$slots, "rightout")])) : s("", true)], 4);
41
+ }]]);
42
+ export { V as default };