@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3

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 +4019 -19251
  2. package/dist/nutui.umd.js +4012 -19344
  3. package/dist/packages/_es/ActionSheet.js +26 -157
  4. package/dist/packages/_es/Address.js +119 -542
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Audio.js +62 -264
  7. package/dist/packages/_es/AudioOperate.js +18 -107
  8. package/dist/packages/_es/Avatar.js +42 -165
  9. package/dist/packages/_es/AvatarGroup.js +14 -73
  10. package/dist/packages/_es/BackTop.js +43 -156
  11. package/dist/packages/_es/Badge.js +14 -86
  12. package/dist/packages/_es/Barrage.js +41 -120
  13. package/dist/packages/_es/Button.js +23 -128
  14. package/dist/packages/_es/Calendar.js +24 -237
  15. package/dist/packages/_es/CalendarItem.js +1 -1
  16. package/dist/packages/_es/Card.js +10 -107
  17. package/dist/packages/_es/Cascader.js +156 -500
  18. package/dist/packages/_es/Category.js +15 -58
  19. package/dist/packages/_es/CategoryPane.js +11 -111
  20. package/dist/packages/_es/Cell.js +21 -100
  21. package/dist/packages/_es/CellGroup.js +9 -44
  22. package/dist/packages/_es/Checkbox.js +31 -113
  23. package/dist/packages/_es/CheckboxGroup.js +29 -58
  24. package/dist/packages/_es/CircleProgress.js +28 -151
  25. package/dist/packages/_es/Col.js +14 -56
  26. package/dist/packages/_es/Collapse.js +24 -85
  27. package/dist/packages/_es/CollapseItem.js +70 -261
  28. package/dist/packages/_es/Comment.js +64 -434
  29. package/dist/packages/_es/CountDown.js +61 -242
  30. package/dist/packages/_es/CountUp.js +149 -546
  31. package/dist/packages/_es/DatePicker.js +107 -322
  32. package/dist/packages/_es/Dialog.js +69 -261
  33. package/dist/packages/_es/Divider.js +18 -68
  34. package/dist/packages/_es/Drag.js +56 -197
  35. package/dist/packages/_es/Ecard.js +24 -159
  36. package/dist/packages/_es/Elevator.js +63 -198
  37. package/dist/packages/_es/Empty.js +12 -71
  38. package/dist/packages/_es/FixedNav.js +15 -122
  39. package/dist/packages/_es/Form.js +64 -151
  40. package/dist/packages/_es/FormItem.js +15 -110
  41. package/dist/packages/_es/Grid.js +5 -6
  42. package/dist/packages/_es/GridItem.js +33 -144
  43. package/dist/packages/_es/Icon.js +15 -40
  44. package/dist/packages/_es/ImagePreview.js +74 -298
  45. package/dist/packages/_es/Indicator.js +15 -62
  46. package/dist/packages/_es/InfiniteLoading.js +66 -258
  47. package/dist/packages/_es/Input.js +51 -413
  48. package/dist/packages/_es/InputNumber.js +41 -160
  49. package/dist/packages/_es/Layout.js +4 -5
  50. package/dist/packages/_es/List.js +23 -110
  51. package/dist/packages/_es/Menu.js +30 -118
  52. package/dist/packages/_es/MenuItem.js +34 -162
  53. package/dist/packages/_es/Navbar.js +30 -192
  54. package/dist/packages/_es/NoticeBar.js +83 -387
  55. package/dist/packages/_es/Notify.js +81 -236
  56. package/dist/packages/_es/NumberKeyboard.js +41 -272
  57. package/dist/packages/_es/OldPicker.js +140 -464
  58. package/dist/packages/_es/OverLay.js +32 -105
  59. package/dist/packages/_es/Pagination.js +39 -157
  60. package/dist/packages/_es/Picker.js +138 -459
  61. package/dist/packages/_es/Popover.js +327 -965
  62. package/dist/packages/_es/Popup.js +64 -303
  63. package/dist/packages/_es/Price.js +16 -118
  64. package/dist/packages/_es/Progress.js +14 -146
  65. package/dist/packages/_es/PullRefresh.js +92 -346
  66. package/dist/packages/_es/Radio.js +22 -90
  67. package/dist/packages/_es/RadioGroup.js +8 -37
  68. package/dist/packages/_es/Range.js +92 -417
  69. package/dist/packages/_es/Rate.js +16 -139
  70. package/dist/packages/_es/Row.js +22 -64
  71. package/dist/packages/_es/SearchBar.js +46 -247
  72. package/dist/packages/_es/ShortPassword.js +35 -225
  73. package/dist/packages/_es/SideNavBar.js +33 -89
  74. package/dist/packages/_es/SideNavBarItem.js +11 -46
  75. package/dist/packages/_es/Signature.js +46 -165
  76. package/dist/packages/_es/Skeleton.js +20 -136
  77. package/dist/packages/_es/Sku.js +93 -499
  78. package/dist/packages/_es/Step.js +25 -119
  79. package/dist/packages/_es/Steps.js +18 -53
  80. package/dist/packages/_es/Sticky.js +53 -138
  81. package/dist/packages/_es/SubSideNavBar.js +26 -90
  82. package/dist/packages/_es/Swipe.js +46 -183
  83. package/dist/packages/_es/Swiper.js +121 -433
  84. package/dist/packages/_es/SwiperItem.js +22 -53
  85. package/dist/packages/_es/Switch.js +21 -116
  86. package/dist/packages/_es/TabPane.js +12 -39
  87. package/dist/packages/_es/Tabbar.js +17 -72
  88. package/dist/packages/_es/TabbarItem.js +29 -151
  89. package/dist/packages/_es/Table.js +27 -186
  90. package/dist/packages/_es/Tabs.js +51 -209
  91. package/dist/packages/_es/Tag.js +20 -97
  92. package/dist/packages/_es/TextArea.js +42 -160
  93. package/dist/packages/_es/TimeDetail.js +23 -84
  94. package/dist/packages/_es/TimePannel.js +19 -52
  95. package/dist/packages/_es/TimeSelect.js +15 -103
  96. package/dist/packages/_es/Toast.js +80 -319
  97. package/dist/packages/_es/Uploader.js +112 -460
  98. package/dist/packages/_es/Video.js +83 -340
  99. package/dist/packages/_es/common.js +38 -128
  100. package/dist/packages/_es/component.js +35 -76
  101. package/dist/packages/_es/index.js +5 -6
  102. package/dist/packages/_es/index2.js +9 -30
  103. package/dist/packages/_es/index3.js +6 -8
  104. package/dist/packages/_es/index4.js +13 -58
  105. package/dist/packages/_es/index5.js +120 -675
  106. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  107. package/dist/packages/_es/pxCheck.js +3 -5
  108. package/dist/packages/_es/raf.js +8 -15
  109. package/dist/packages/button/index.scss +2 -1
  110. package/dist/packages/cell/index.scss +11 -0
  111. package/dist/packages/checkbox/index.scss +6 -0
  112. package/dist/packages/dialog/index.scss +1 -0
  113. package/dist/packages/elevator/index.scss +21 -0
  114. package/dist/packages/input/index.scss +13 -1
  115. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  118. package/dist/packages/locale/lang/en-US.js +5 -97
  119. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  120. package/dist/packages/locale/lang/id-ID.js +5 -97
  121. package/dist/packages/locale/lang/index.js +16 -38
  122. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  123. package/dist/packages/locale/lang/zh-CN.js +5 -97
  124. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  125. package/dist/packages/locale/lang/zh-TW.js +5 -97
  126. package/dist/packages/radio/index.scss +1 -0
  127. package/dist/packages/switch/index.scss +3 -3
  128. package/dist/packages/tabpane/index.scss +1 -0
  129. package/dist/smartips/attributes.json +62 -10
  130. package/dist/smartips/tags.json +17 -4
  131. package/dist/style.css +1 -1
  132. package/dist/styles/themes/default.scss +49 -49
  133. package/dist/styles/themes/jdb.scss +49 -49
  134. package/dist/styles/themes/jdt.scss +49 -49
  135. package/dist/styles/variables-jdb.scss +10 -1
  136. package/dist/styles/variables-jdt.scss +10 -1
  137. package/dist/styles/variables.scss +10 -1
  138. package/dist/types/__VUE/address/index.vue.d.ts +5 -5
  139. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  140. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  141. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  142. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
  147. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  148. package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
  149. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  150. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  151. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  152. package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
  153. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  155. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  156. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  157. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  158. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  159. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  162. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
  172. package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
  173. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  175. package/dist/types/index.d.ts +1 -1
  176. package/package.json +2 -1
@@ -5,275 +5,84 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
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]);
8
+ var __spreadValues = (a2, b2) => {
9
+ for (var prop in b2 || (b2 = {}))
10
+ if (__hasOwnProp.call(b2, prop))
11
+ __defNormalProp(a2, prop, b2[prop]);
12
12
  if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
13
+ for (var prop of __getOwnPropSymbols(b2)) {
14
+ if (__propIsEnum.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
20
  /*!
21
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { inject, reactive, computed, getCurrentInstance, ref, watch, onMounted, nextTick, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, renderSlot, normalizeStyle } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { inject as e, reactive as o, computed as t, getCurrentInstance as n, ref as l, watch as s, onMounted as i, nextTick as a, toRefs as p, resolveComponent as c, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as m, createBlock as f, createCommentVNode as g, renderSlot as y, normalizeStyle as x } from "vue";
26
+ import { c as v } from "./component.js";
27
+ import { _ as h } from "./plugin-vue_export-helper.js";
28
28
  import "../locale/lang";
29
- const { create, componentName } = createComponent("collapse-item");
30
- const _sfc_main = create({
31
- props: {
32
- title: {
33
- type: String,
34
- default: ""
35
- },
36
- subTitle: {
37
- type: String,
38
- default: ""
39
- },
40
- disabled: {
41
- type: Boolean,
42
- default: false
43
- },
44
- name: {
45
- type: [Number, String],
46
- default: -1,
47
- required: true
48
- },
49
- collapseRef: {
50
- type: Object
29
+ const { create: w, componentName: I } = v("collapse-item"), T = w({ props: { title: { type: String, default: "" }, subTitle: { type: String, default: "" }, disabled: { type: Boolean, default: false }, name: { type: [Number, String], default: -1, required: true }, collapseRef: { type: Object } }, setup(c2, r2) {
30
+ const d2 = e("collapseParent"), u2 = o(d2), m2 = t(() => ({ [I]: true, [`${I}-icon`]: u2.props.icon }));
31
+ var f2;
32
+ (f2 = n()).proxy && u2.children.push(f2.proxy);
33
+ const g2 = o({ icon: u2.props.icon, iconSize: u2.props.iconSize, iconColor: u2.props.iconColor, openExpanded: false, iconStyle: { transform: "rotate(0deg)", marginTop: u2.props.iconHeght ? "-" + u2.props.iconHeght / 2 + "px" : "-10px" } }), y2 = o({ titleIcon: u2.props.titleIcon, titleIconSize: u2.props.titleIconSize, titleIconColor: u2.props.titleIconColor, titleIconPosition: u2.props.titleIconPosition }), x2 = l(null), v2 = l(null), h2 = () => {
34
+ const e2 = x2.value, o2 = v2.value;
35
+ if (!e2 || !o2)
36
+ return;
37
+ const t2 = o2.offsetHeight || "auto";
38
+ if (t2) {
39
+ const o3 = `${t2}px`;
40
+ e2.style.willChange = "height", e2.style.height = g2.openExpanded ? o3 : 0, u2.props.icon && !g2.openExpanded ? g2.iconStyle.transform = "rotate(0deg)" : g2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)";
51
41
  }
52
- },
53
- setup(props, ctx) {
54
- const collapse = inject("collapseParent");
55
- const parent = reactive(collapse);
56
- const classes = computed(() => {
57
- const prefixCls = componentName;
58
- return {
59
- [prefixCls]: true,
60
- [`${prefixCls}-icon`]: parent.props.icon
61
- };
62
- });
63
- const relation = (child) => {
64
- if (child.proxy) {
65
- parent.children.push(child.proxy);
66
- }
67
- };
68
- relation(getCurrentInstance());
69
- const proxyData = reactive({
70
- icon: parent.props.icon,
71
- iconSize: parent.props.iconSize,
72
- iconColor: parent.props.iconColor,
73
- openExpanded: false,
74
- iconStyle: {
75
- transform: "rotate(0deg)",
76
- marginTop: parent.props.iconHeght ? "-" + parent.props.iconHeght / 2 + "px" : "-10px"
77
- }
78
- });
79
- const titleIconStyle = reactive({
80
- titleIcon: parent.props.titleIcon,
81
- titleIconSize: parent.props.titleIconSize,
82
- titleIconColor: parent.props.titleIconColor,
83
- titleIconPosition: parent.props.titleIconPosition
84
- });
85
- const wrapperRef = ref(null);
86
- const contentRef = ref(null);
87
- const onTransitionEnd = () => {
88
- const wrapperRefEle = document.getElementsByClassName("collapse-wrapper")[0];
89
- if (wrapperRefEle) {
90
- wrapperRefEle.style.willChange = "auto";
91
- }
92
- };
93
- const animation = () => {
94
- const wrapperRefEle = wrapperRef.value;
95
- const contentRefEle = contentRef.value;
96
- if (!wrapperRefEle || !contentRefEle) {
97
- return;
98
- }
99
- const offsetHeight = contentRefEle.offsetHeight || "auto";
100
- if (offsetHeight) {
101
- const contentHeight = `${offsetHeight}px`;
102
- wrapperRefEle.style.willChange = "height";
103
- wrapperRefEle.style.height = !proxyData.openExpanded ? 0 : contentHeight;
104
- if (parent.props.icon && !proxyData.openExpanded) {
105
- proxyData.iconStyle["transform"] = "rotate(0deg)";
106
- } else {
107
- proxyData.iconStyle["transform"] = "rotate(" + parent.props.rotate + "deg)";
108
- }
109
- }
110
- if (!proxyData.openExpanded) {
111
- onTransitionEnd();
112
- }
113
- };
114
- const open = () => {
115
- proxyData.openExpanded = !proxyData.openExpanded;
116
- animation();
117
- };
118
- const defaultOpen = () => {
119
- open();
120
- if (parent.props.icon) {
121
- proxyData["iconStyle"]["transform"] = "rotate(" + parent.props.rotate + "deg)";
122
- }
123
- };
124
- const currentName = computed(() => props.name);
125
- const toggleOpen = () => {
126
- if (parent.props.accordion) {
127
- parent.children.forEach((item, index2) => {
128
- if (currentName.value == item.name) {
129
- item.changeOpen(!item.openExpanded);
130
- } else {
131
- item.changeOpen(false);
132
- item.animation();
133
- }
134
- });
135
- nextTick(() => {
136
- parent.changeVal(currentName.value);
137
- animation();
138
- });
139
- } else {
140
- parent.changeValAry(props.name);
141
- open();
142
- }
143
- };
144
- const changeOpen = (bol) => {
145
- proxyData.openExpanded = bol;
146
- };
147
- const expanded = computed(() => {
148
- if (parent) {
149
- return parent.isExpanded(props.name);
42
+ g2.openExpanded || (() => {
43
+ const e3 = document.getElementsByClassName("collapse-wrapper")[0];
44
+ e3 && (e3.style.willChange = "auto");
45
+ })();
46
+ }, w2 = () => {
47
+ g2.openExpanded = !g2.openExpanded, h2();
48
+ }, T2 = () => {
49
+ w2(), u2.props.icon && (g2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)");
50
+ }, b2 = t(() => c2.name), E2 = t(() => u2 ? u2.isExpanded(c2.name) : null);
51
+ s(E2, (e2, o2) => {
52
+ e2 && (g2.openExpanded = true);
53
+ }), s(() => {
54
+ var _a, _b;
55
+ return (_b = (_a = r2 == null ? void 0 : r2.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
56
+ }, () => {
57
+ setTimeout(() => {
58
+ h2();
59
+ }, 300);
60
+ }), i(() => {
61
+ const { name: e2 } = c2, o2 = u2 && u2.props.active;
62
+ a(() => {
63
+ if (typeof o2 == "number" || typeof o2 == "string")
64
+ e2 == o2 && T2();
65
+ else if (Object.values(o2) instanceof Array) {
66
+ Object.values(o2).filter((o3) => o3 == e2).length > 0 && T2();
150
67
  }
151
- return null;
152
68
  });
153
- watch(expanded, (value, oldValue) => {
154
- if (value) {
155
- proxyData.openExpanded = true;
156
- }
157
- });
158
- watch(() => {
159
- var _a, _b;
160
- return (_b = (_a = ctx == null ? void 0 : ctx.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
161
- }, () => {
162
- setTimeout(() => {
163
- animation();
164
- }, 300);
165
- });
166
- onMounted(() => {
167
- const { name } = props;
168
- const active = parent && parent.props.active;
169
- nextTick(() => {
170
- if (typeof active == "number" || typeof active == "string") {
171
- if (name == active) {
172
- defaultOpen();
173
- }
174
- } else if (Object.values(active) instanceof Array) {
175
- const f = Object.values(active).filter((item) => item == name);
176
- if (f.length > 0) {
177
- defaultOpen();
178
- }
179
- }
180
- });
181
- });
182
- const emptyContent = computed(() => {
183
- let ele = contentRef.value;
184
- let _class = "";
185
- if (!(ele == null ? void 0 : ele.innerText)) {
186
- _class = "empty";
187
- }
188
- return _class;
189
- });
190
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
191
- classes,
192
- emptyContent
193
- }, toRefs(proxyData)), toRefs(parent.props)), toRefs(titleIconStyle)), {
194
- wrapperRef,
195
- contentRef,
196
- open,
197
- toggleOpen,
198
- changeOpen,
199
- animation
200
- });
201
- }
202
- });
203
- const _hoisted_1 = { class: "collapse-title" };
204
- const _hoisted_2 = { class: "collapse-title-value" };
205
- const _hoisted_3 = ["innerHTML"];
206
- const _hoisted_4 = {
207
- key: 0,
208
- class: "subTitle"
209
- };
210
- const _hoisted_5 = ["innerHTML"];
211
- const _hoisted_6 = {
212
- key: 0,
213
- class: "collapse-extraWrapper"
214
- };
215
- const _hoisted_7 = { class: "collapse-extraRender" };
216
- const _hoisted_8 = {
217
- class: "collapse-wrapper",
218
- ref: "wrapperRef"
219
- };
220
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
221
- const _component_nut_icon = resolveComponent("nut-icon");
222
- return openBlock(), createElementBlock("view", {
223
- class: normalizeClass(_ctx.classes)
224
- }, [
225
- createElementVNode("view", {
226
- class: normalizeClass(["collapse-item", { "item-expanded": _ctx.openExpanded }, { "nut-collapse-item-disabled": _ctx.disabled }]),
227
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleOpen && _ctx.toggleOpen(...args))
228
- }, [
229
- createElementVNode("view", _hoisted_1, [
230
- createElementVNode("view", null, [
231
- createElementVNode("view", _hoisted_2, [
232
- _ctx.titleIcon ? (openBlock(), createBlock(_component_nut_icon, {
233
- key: 0,
234
- name: _ctx.titleIcon,
235
- size: _ctx.titleIconSize,
236
- color: _ctx.titleIconColor,
237
- class: normalizeClass([_ctx.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"])
238
- }, null, 8, ["name", "size", "color", "class"])) : createCommentVNode("", true),
239
- _ctx.$slots.mTitle ? renderSlot(_ctx.$slots, "mTitle", { key: 1 }) : (openBlock(), createElementBlock("view", {
240
- key: 2,
241
- innerHTML: _ctx.title,
242
- class: "collapse-icon-title"
243
- }, null, 8, _hoisted_3))
244
- ])
245
- ])
246
- ]),
247
- _ctx.$slots.sTitle ? (openBlock(), createElementBlock("view", _hoisted_4, [
248
- renderSlot(_ctx.$slots, "sTitle")
249
- ])) : (openBlock(), createElementBlock("view", {
250
- key: 1,
251
- innerHTML: _ctx.subTitle,
252
- class: "subTitle"
253
- }, null, 8, _hoisted_5)),
254
- _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
255
- key: 2,
256
- name: _ctx.icon,
257
- size: _ctx.iconSize,
258
- color: _ctx.iconColor,
259
- class: normalizeClass(["collapse-icon", { "col-expanded": _ctx.openExpanded }, { "collapse-icon-disabled": _ctx.disabled }]),
260
- style: normalizeStyle(_ctx.iconStyle)
261
- }, null, 8, ["name", "size", "color", "class", "style"])) : createCommentVNode("", true)
262
- ], 2),
263
- _ctx.$slots.extraRender ? (openBlock(), createElementBlock("view", _hoisted_6, [
264
- createElementVNode("div", _hoisted_7, [
265
- renderSlot(_ctx.$slots, "extraRender")
266
- ])
267
- ])) : createCommentVNode("", true),
268
- createElementVNode("view", _hoisted_8, [
269
- createElementVNode("view", {
270
- class: normalizeClass(["collapse-content", _ctx.emptyContent]),
271
- ref: "contentRef"
272
- }, [
273
- renderSlot(_ctx.$slots, "default")
274
- ], 2)
275
- ], 512)
276
- ], 2);
277
- }
278
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
279
- export { index as default };
69
+ });
70
+ return __spreadProps(__spreadValues(__spreadValues(__spreadValues({ classes: m2, emptyContent: t(() => {
71
+ var _a;
72
+ let e2 = "";
73
+ return ((_a = v2.value) == null ? void 0 : _a.innerText) || (e2 = "empty"), e2;
74
+ }) }, p(g2)), p(u2.props)), p(y2)), { wrapperRef: x2, contentRef: v2, open: w2, toggleOpen: () => {
75
+ u2.props.accordion ? (u2.children.forEach((e2, o2) => {
76
+ b2.value == e2.name ? e2.changeOpen(!e2.openExpanded) : (e2.changeOpen(false), e2.animation());
77
+ }), a(() => {
78
+ u2.changeVal(b2.value), h2();
79
+ })) : (u2.changeValAry(c2.name), w2());
80
+ }, changeOpen: (e2) => {
81
+ g2.openExpanded = e2;
82
+ }, animation: h2 });
83
+ } }), b = { class: "collapse-title" }, E = { class: "collapse-title-value" }, S = ["innerHTML"], C = { key: 0, class: "subTitle" }, z = ["innerHTML"], O = { key: 0, class: "collapse-extraWrapper" }, R = { class: "collapse-extraRender" }, $ = { class: "collapse-wrapper", ref: "wrapperRef" };
84
+ var k = h(T, [["render", function(e2, o2, t2, n2, l2, s2) {
85
+ const i2 = c("nut-icon");
86
+ return r(), d("view", { class: u(e2.classes) }, [m("view", { class: u(["collapse-item", { "item-expanded": e2.openExpanded }, { "nut-collapse-item-disabled": e2.disabled }]), onClick: o2[0] || (o2[0] = (...o3) => e2.toggleOpen && e2.toggleOpen(...o3)) }, [m("view", b, [m("view", null, [m("view", E, [e2.titleIcon ? (r(), f(i2, { key: 0, name: e2.titleIcon, size: e2.titleIconSize, color: e2.titleIconColor, class: u([e2.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"]) }, null, 8, ["name", "size", "color", "class"])) : g("", true), e2.$slots.mTitle ? y(e2.$slots, "mTitle", { key: 1 }) : (r(), d("view", { key: 2, innerHTML: e2.title, class: "collapse-icon-title" }, null, 8, S))])])]), e2.$slots.sTitle ? (r(), d("view", C, [y(e2.$slots, "sTitle")])) : (r(), d("view", { key: 1, innerHTML: e2.subTitle, class: "subTitle" }, null, 8, z)), e2.icon ? (r(), f(i2, { key: 2, name: e2.icon, size: e2.iconSize, color: e2.iconColor, class: u(["collapse-icon", { "col-expanded": e2.openExpanded }, { "collapse-icon-disabled": e2.disabled }]), style: x(e2.iconStyle) }, null, 8, ["name", "size", "color", "class", "style"])) : g("", true)], 2), e2.$slots.extraRender ? (r(), d("view", O, [m("div", R, [y(e2.$slots, "extraRender")])])) : g("", true), m("view", $, [m("view", { class: u(["collapse-content", e2.emptyContent]), ref: "contentRef" }, [y(e2.$slots, "default")], 2)], 512)], 2);
87
+ }]]);
88
+ export { k as default };