@nutui/nutui 4.0.11 → 4.0.12

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 (158) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.js +2 -2
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/ActionSheet.js +111 -78
  5. package/dist/packages/_es/Address.js +375 -250
  6. package/dist/packages/_es/AddressList.js +354 -269
  7. package/dist/packages/_es/Animate.js +58 -41
  8. package/dist/packages/_es/Audio.js +197 -128
  9. package/dist/packages/_es/AudioOperate.js +71 -60
  10. package/dist/packages/_es/Avatar.js +89 -66
  11. package/dist/packages/_es/AvatarGroup.js +31 -23
  12. package/dist/packages/_es/Backtop.js +99 -59
  13. package/dist/packages/_es/Badge.js +47 -36
  14. package/dist/packages/_es/Barrage.js +147 -68
  15. package/dist/packages/_es/Button.js +66 -47
  16. package/dist/packages/_es/Calendar.js +157 -135
  17. package/dist/packages/_es/CalendarItem.js +6 -6
  18. package/dist/packages/_es/Card.js +56 -42
  19. package/dist/packages/_es/Cascader.js +474 -315
  20. package/dist/packages/_es/Category.js +39 -29
  21. package/dist/packages/_es/CategoryPane.js +83 -57
  22. package/dist/packages/_es/Cell.js +71 -56
  23. package/dist/packages/_es/CellGroup.js +27 -19
  24. package/dist/packages/_es/Checkbox.js +156 -109
  25. package/dist/packages/_es/CheckboxGroup.js +59 -38
  26. package/dist/packages/_es/CircleProgress.js +96 -67
  27. package/dist/packages/_es/Col.js +31 -23
  28. package/dist/packages/_es/Collapse.js +58 -33
  29. package/dist/packages/_es/CollapseItem.js +108 -78
  30. package/dist/packages/_es/Comment.js +279 -207
  31. package/dist/packages/_es/ConfigProvider.js +55 -37
  32. package/dist/packages/_es/Countdown.js +212 -100
  33. package/dist/packages/_es/Countup.js +445 -232
  34. package/dist/packages/_es/DatePicker.js +265 -162
  35. package/dist/packages/_es/Dialog.js +213 -161
  36. package/dist/packages/_es/Divider.js +57 -42
  37. package/dist/packages/_es/Drag.js +153 -70
  38. package/dist/packages/_es/Ecard.js +104 -64
  39. package/dist/packages/_es/Elevator.js +219 -143
  40. package/dist/packages/_es/Ellipsis.js +178 -95
  41. package/dist/packages/_es/Empty.js +39 -23
  42. package/dist/packages/_es/FixedNav.js +116 -93
  43. package/dist/packages/_es/Form.js +178 -107
  44. package/dist/packages/_es/FormItem.js +61 -48
  45. package/dist/packages/_es/Grid.js +6 -5
  46. package/dist/packages/_es/GridItem.js +84 -58
  47. package/dist/packages/_es/Image.js +130 -90
  48. package/dist/packages/_es/ImagePreview.js +412 -256
  49. package/dist/packages/_es/Indicator.js +34 -30
  50. package/dist/packages/_es/InfiniteLoading.js +136 -83
  51. package/dist/packages/_es/Input.js +264 -160
  52. package/dist/packages/_es/InputNumber.js +117 -81
  53. package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
  54. package/dist/packages/_es/Invoice.js +130 -104
  55. package/dist/packages/_es/Layout.js +4 -3
  56. package/dist/packages/_es/List.js +215 -117
  57. package/dist/packages/_es/Menu.js +150 -95
  58. package/dist/packages/_es/MenuItem.js +154 -109
  59. package/dist/packages/_es/Navbar.js +119 -103
  60. package/dist/packages/_es/Noticebar.js +312 -197
  61. package/dist/packages/_es/Notify.js +166 -110
  62. package/dist/packages/_es/NumberKeyboard.js +202 -127
  63. package/dist/packages/_es/Overlay.js +80 -52
  64. package/dist/packages/_es/Pagination.js +100 -70
  65. package/dist/packages/_es/Picker.js +437 -275
  66. package/dist/packages/_es/Popover.js +225 -122
  67. package/dist/packages/_es/Popup.js +4 -4
  68. package/dist/packages/_es/Price.js +82 -44
  69. package/dist/packages/_es/Progress.js +79 -63
  70. package/dist/packages/_es/PullRefresh.js +173 -95
  71. package/dist/packages/_es/Radio.js +4 -4
  72. package/dist/packages/_es/RadioGroup.js +3 -3
  73. package/dist/packages/_es/Range.js +347 -204
  74. package/dist/packages/_es/Rate.js +141 -92
  75. package/dist/packages/_es/Row.js +27 -21
  76. package/dist/packages/_es/Searchbar.js +174 -123
  77. package/dist/packages/_es/ShortPassword.js +93 -69
  78. package/dist/packages/_es/SideNavbar.js +80 -49
  79. package/dist/packages/_es/SideNavbarItem.js +32 -22
  80. package/dist/packages/_es/Signature.js +146 -83
  81. package/dist/packages/_es/Skeleton.js +130 -110
  82. package/dist/packages/_es/Sku.js +343 -250
  83. package/dist/packages/_es/Step.js +86 -59
  84. package/dist/packages/_es/Steps.js +31 -26
  85. package/dist/packages/_es/Sticky.js +4 -4
  86. package/dist/packages/_es/SubSideNavbar.js +74 -52
  87. package/dist/packages/_es/Swipe.js +155 -83
  88. package/dist/packages/_es/Swiper.js +311 -174
  89. package/dist/packages/_es/SwiperItem.js +44 -28
  90. package/dist/packages/_es/Switch.js +68 -55
  91. package/dist/packages/_es/TabPane.js +41 -30
  92. package/dist/packages/_es/Tabbar.js +52 -41
  93. package/dist/packages/_es/TabbarItem.js +82 -61
  94. package/dist/packages/_es/Table.js +165 -109
  95. package/dist/packages/_es/Tabs.js +388 -240
  96. package/dist/packages/_es/Tag.js +61 -44
  97. package/dist/packages/_es/Textarea.js +124 -80
  98. package/dist/packages/_es/TimeDetail.js +76 -49
  99. package/dist/packages/_es/TimePannel.js +48 -34
  100. package/dist/packages/_es/TimeSelect.js +68 -47
  101. package/dist/packages/_es/Toast.js +218 -144
  102. package/dist/packages/_es/Tour.js +192 -138
  103. package/dist/packages/_es/TrendArrow.js +77 -57
  104. package/dist/packages/_es/Uploader.js +359 -234
  105. package/dist/packages/_es/Video.js +316 -191
  106. package/dist/packages/_es/Watermark.js +117 -84
  107. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
  108. package/dist/packages/_es/common-b9a5e726.js +145 -0
  109. package/dist/packages/_es/component-81a4c1d0.js +145 -0
  110. package/dist/packages/_es/index-29892cda.js +33 -0
  111. package/dist/packages/_es/index-43c34ac6.js +30 -0
  112. package/dist/packages/_es/index-54d03fc1.js +8 -0
  113. package/dist/packages/_es/index-79c5dc33.js +10 -0
  114. package/dist/packages/_es/index-7a7385e4.js +67 -0
  115. package/dist/packages/_es/index-87422be8.js +942 -0
  116. package/dist/packages/_es/index-da0a7662.js +259 -0
  117. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
  120. package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
  121. package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
  122. package/dist/packages/_es/raf-729dad54.js +25 -0
  123. package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
  124. package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
  125. package/dist/packages/locale/lang/en-US.js +39 -36
  126. package/dist/packages/locale/lang/id-ID.js +39 -36
  127. package/dist/packages/locale/lang/index.js +44 -22
  128. package/dist/packages/locale/lang/zh-CN.js +38 -35
  129. package/dist/packages/locale/lang/zh-TW.js +38 -35
  130. package/dist/resolver/index.js +26 -1
  131. package/dist/resolver/index.mjs +17 -14
  132. package/dist/smartips/web-types.json +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/styles/themes/default.scss +48 -48
  135. package/dist/styles/themes/jdb.scss +48 -48
  136. package/dist/styles/themes/jddkh.scss +48 -48
  137. package/dist/styles/themes/jdt.scss +48 -48
  138. package/dist/types/index.d.ts +1 -1
  139. package/package.json +3 -4
  140. package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
  141. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
  142. package/dist/packages/_es/common-d218746f.js +0 -116
  143. package/dist/packages/_es/component-234624bc.js +0 -89
  144. package/dist/packages/_es/index-14dfadc4.js +0 -561
  145. package/dist/packages/_es/index-192a3ef6.js +0 -29
  146. package/dist/packages/_es/index-360c5092.js +0 -210
  147. package/dist/packages/_es/index-496e6e05.js +0 -24
  148. package/dist/packages/_es/index-50eed3d9.js +0 -7
  149. package/dist/packages/_es/index-53ec2d4d.js +0 -34
  150. package/dist/packages/_es/index-fadb0974.js +0 -8
  151. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
  152. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
  153. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
  154. package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
  155. package/dist/packages/_es/pxCheck-38173291.js +0 -4
  156. package/dist/packages/_es/raf-a74f1a06.js +0 -16
  157. package/dist/packages/_es/renderIcon-47498b32.js +0 -5
  158. package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
@@ -1,210 +0,0 @@
1
- var A = Object.defineProperty, E = Object.defineProperties;
2
- var D = Object.getOwnPropertyDescriptors;
3
- var f = Object.getOwnPropertySymbols;
4
- var T = Object.prototype.hasOwnProperty, V = Object.prototype.propertyIsEnumerable;
5
- var v = (e, l, o) => l in e ? A(e, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[l] = o, i = (e, l) => {
6
- for (var o in l || (l = {}))
7
- T.call(l, o) && v(e, o, l[o]);
8
- if (f)
9
- for (var o of f(l))
10
- V.call(l, o) && v(e, o, l[o]);
11
- return e;
12
- }, C = (e, l) => E(e, D(l));
13
- import { c as j } from "./component-234624bc.js";
14
- import { reactive as L, computed as u, watch as R, watchEffect as q, toRefs as F, resolveComponent as k, openBlock as d, createBlock as m, Teleport as G, mergeProps as H, createCommentVNode as p, createVNode as b, Transition as J, withCtx as K, withDirectives as M, createElementVNode as Q, normalizeClass as S, normalizeStyle as U, renderSlot as I, createElementBlock as W, vShow as X } from "vue";
15
- import O from "./Overlay.js";
16
- import { Close as Y } from "@nutui/icons-vue";
17
- import { _ as Z } from "./_plugin-vue_export-helper-dad06003.js";
18
- const x = {
19
- visible: {
20
- type: Boolean,
21
- default: !1
22
- },
23
- zIndex: {
24
- type: [Number, String],
25
- default: 2e3
26
- },
27
- duration: {
28
- type: [Number, String],
29
- default: 0.3
30
- },
31
- lockScroll: {
32
- type: Boolean,
33
- default: !0
34
- },
35
- closeOnClickOverlay: {
36
- type: Boolean,
37
- default: !0
38
- },
39
- position: {
40
- type: String,
41
- default: "center"
42
- },
43
- transition: {
44
- type: String,
45
- default: ""
46
- },
47
- style: {
48
- type: Object,
49
- default: {}
50
- },
51
- popClass: {
52
- type: String,
53
- default: ""
54
- },
55
- closeable: {
56
- type: Boolean,
57
- default: !1
58
- },
59
- closeIconPosition: {
60
- type: String,
61
- default: "top-right"
62
- },
63
- closeIcon: {
64
- type: String,
65
- default: "close"
66
- },
67
- destroyOnClose: {
68
- type: Boolean,
69
- default: !0
70
- },
71
- teleport: {
72
- type: [String, Element],
73
- default: "body"
74
- },
75
- overlay: {
76
- type: Boolean,
77
- default: !0
78
- },
79
- round: {
80
- type: Boolean,
81
- default: !1
82
- },
83
- teleportDisable: {
84
- type: Boolean,
85
- default: !1
86
- },
87
- safeAreaInsetBottom: {
88
- type: Boolean,
89
- default: !1
90
- },
91
- overlayClass: {
92
- type: String,
93
- default: ""
94
- },
95
- overlayStyle: {
96
- type: Object,
97
- default: {}
98
- }
99
- }, B = 2e3;
100
- let z = B;
101
- const _ = (e, l) => ({
102
- components: l,
103
- props: i({}, x),
104
- emits: ["click-pop", "click-close-icon", "open", "close", "opend", "closed", "click-overlay", "update:visible"],
105
- setup(o, { emit: t }) {
106
- const s = L({
107
- zIndex: o.zIndex,
108
- showSlot: !0,
109
- closed: o.closeable
110
- }), y = u(() => ({
111
- [e]: !0,
112
- round: o.round,
113
- [`nut-popup--${o.position}`]: !0,
114
- [`nut-popup--${o.position}--safebottom`]: o.position === "bottom" && o.safeAreaInsetBottom,
115
- [o.popClass]: !0
116
- })), r = u(() => i({
117
- zIndex: s.zIndex,
118
- transitionDuration: `${o.duration}s`
119
- }, o.style)), c = u(() => o.transition ? o.transition : `nut-popup-slide-${o.position}`), a = () => {
120
- o.zIndex !== B && (z = Number(o.zIndex)), t("update:visible", !0), s.zIndex = ++z, o.destroyOnClose && (s.showSlot = !0), t("open");
121
- }, g = () => {
122
- t("update:visible", !1), t("close"), o.destroyOnClose && setTimeout(() => {
123
- s.showSlot = !1;
124
- }, +o.duration * 1e3);
125
- }, w = (n) => {
126
- t("click-pop", n);
127
- }, $ = (n) => {
128
- n.stopPropagation(), t("click-close-icon", n), t("update:visible", !1);
129
- }, h = (n) => {
130
- t("click-overlay", n), o.closeOnClickOverlay && t("update:visible", !1);
131
- }, N = (n) => {
132
- t("opend", n);
133
- }, P = (n) => {
134
- t("closed", n);
135
- };
136
- return R(
137
- () => o.visible,
138
- (n) => {
139
- o.visible ? a() : g();
140
- }
141
- ), q(() => {
142
- s.closed = o.closeable;
143
- }), C(i({}, F(s)), {
144
- popStyle: r,
145
- transitionName: c,
146
- classes: y,
147
- onClick: w,
148
- onClickCloseIcon: $,
149
- onClickOverlay: h,
150
- onOpened: N,
151
- onClosed: P
152
- });
153
- }
154
- }), { componentName: ee, create: oe } = j("popup"), le = oe(
155
- _(ee, {
156
- [O.name]: O,
157
- Close: Y
158
- })
159
- );
160
- function te(e, l, o, t, s, y) {
161
- const r = k("nut-overlay"), c = k("Close");
162
- return d(), m(G, {
163
- to: e.teleport,
164
- disabled: !e.teleportDisable
165
- }, [
166
- e.overlay ? (d(), m(r, H({
167
- key: 0,
168
- visible: e.visible,
169
- "close-on-click-overlay": e.closeOnClickOverlay,
170
- "z-index": e.zIndex,
171
- "lock-scroll": e.lockScroll,
172
- duration: e.duration,
173
- "overlay-class": e.overlayClass,
174
- "overlay-style": e.overlayStyle,
175
- onClick: e.onClickOverlay
176
- }, e.$attrs), null, 16, ["visible", "close-on-click-overlay", "z-index", "lock-scroll", "duration", "overlay-class", "overlay-style", "onClick"])) : p("", !0),
177
- b(J, {
178
- name: e.transitionName,
179
- onAfterEnter: e.onOpened,
180
- onAfterLeave: e.onClosed
181
- }, {
182
- default: K(() => [
183
- M(Q("view", {
184
- class: S(e.classes),
185
- style: U(e.popStyle),
186
- onClick: l[1] || (l[1] = (...a) => e.onClick && e.onClick(...a))
187
- }, [
188
- e.showSlot ? I(e.$slots, "default", { key: 0 }) : p("", !0),
189
- e.closed ? (d(), W("view", {
190
- key: 1,
191
- onClick: l[0] || (l[0] = (...a) => e.onClickCloseIcon && e.onClickCloseIcon(...a)),
192
- class: S(["nut-popup__close-icon", "nut-popup__close-icon--" + e.closeIconPosition])
193
- }, [
194
- I(e.$slots, "close-icon", {}, () => [
195
- b(c, { height: "12px" })
196
- ])
197
- ], 2)) : p("", !0)
198
- ], 6), [
199
- [X, e.visible]
200
- ])
201
- ]),
202
- _: 3
203
- }, 8, ["name", "onAfterEnter", "onAfterLeave"])
204
- ], 8, ["to", "disabled"]);
205
- }
206
- const ue = /* @__PURE__ */ Z(le, [["render", te]]);
207
- export {
208
- ue as P,
209
- x as p
210
- };
@@ -1,24 +0,0 @@
1
- import { ref as l, onMounted as u } from "vue";
2
- const a = /scroll|auto|overlay/i, n = window;
3
- function c(t) {
4
- return t.tagName !== "HTML" && t.tagName !== "BODY" && t.nodeType === 1;
5
- }
6
- function i(t, o = n) {
7
- let e = t;
8
- for (; e && e !== o && c(e); ) {
9
- const { overflowY: r } = window.getComputedStyle(e);
10
- if (a.test(r))
11
- return e;
12
- e = e.parentNode;
13
- }
14
- return o;
15
- }
16
- function E(t, o = n) {
17
- const e = l();
18
- return u(() => {
19
- t.value && (e.value = i(t.value, o));
20
- }), e;
21
- }
22
- export {
23
- E as u
24
- };
@@ -1,7 +0,0 @@
1
- import { getCurrentInstance as r } from "vue";
2
- function e() {
3
- return r().proxy.$router || null;
4
- }
5
- export {
6
- e as u
7
- };
@@ -1,34 +0,0 @@
1
- import { ref as t } from "vue";
2
- const h = 10;
3
- function m(e, a) {
4
- return e > a && e > h ? "horizontal" : a > e && a > h ? "vertical" : "";
5
- }
6
- function b() {
7
- const e = t(0), a = t(0), r = t(0), i = t(0), l = t(0), u = t(0), c = t(0), n = t(0), o = t(""), X = () => o.value === "vertical", Y = () => o.value === "horizontal", f = () => {
8
- l.value = 0, u.value = 0, c.value = 0, n.value = 0, o.value = "";
9
- };
10
- return {
11
- move: (s) => {
12
- const v = s.touches[0];
13
- l.value = v.clientX - e.value, u.value = v.clientY - a.value, r.value = v.clientX, i.value = v.clientY, c.value = Math.abs(l.value), n.value = Math.abs(u.value), o.value || (o.value = m(c.value, n.value));
14
- },
15
- start: (s) => {
16
- f(), e.value = s.touches[0].clientX, a.value = s.touches[0].clientY;
17
- },
18
- reset: f,
19
- startX: e,
20
- startY: a,
21
- moveX: r,
22
- moveY: i,
23
- deltaX: l,
24
- deltaY: u,
25
- offsetX: c,
26
- offsetY: n,
27
- direction: o,
28
- isVertical: X,
29
- isHorizontal: Y
30
- };
31
- }
32
- export {
33
- b as u
34
- };
@@ -1,8 +0,0 @@
1
- import { getCurrentInstance as e } from "vue";
2
- function o(t) {
3
- const n = e();
4
- n && Object.assign(n.proxy, t);
5
- }
6
- export {
7
- o as u
8
- };
@@ -1,43 +0,0 @@
1
- import { provide as i, readonly as u, computed as d, watch as l, h as c } from "vue";
2
- import { c as m } from "./component-234624bc.js";
3
- const { componentName: n, create: p } = m("radio-group"), V = p({
4
- props: {
5
- modelValue: {
6
- type: [Number, String, Boolean],
7
- default: ""
8
- },
9
- direction: {
10
- type: String,
11
- default: "vertical"
12
- //horizontal
13
- },
14
- textPosition: {
15
- type: String,
16
- default: "right"
17
- }
18
- },
19
- emits: ["change", "update:modelValue"],
20
- setup(t, { emit: o, slots: a }) {
21
- const r = (e) => o("update:modelValue", e);
22
- return i("parent", {
23
- label: u(d(() => t.modelValue)),
24
- position: t.textPosition,
25
- updateValue: r
26
- }), l(
27
- () => t.modelValue,
28
- (e) => o("change", e)
29
- ), () => {
30
- var e;
31
- return c(
32
- "view",
33
- {
34
- class: `${n} ${n}--${t.direction}`
35
- },
36
- (e = a.default) == null ? void 0 : e.call(a)
37
- );
38
- };
39
- }
40
- });
41
- export {
42
- V as _
43
- };
@@ -1,77 +0,0 @@
1
- import { inject as C, computed as o, h as r } from "vue";
2
- import { c as p } from "./component-234624bc.js";
3
- import { CheckNormal as h, CheckChecked as _ } from "@nutui/icons-vue";
4
- import { p as N } from "./pxCheck-38173291.js";
5
- const { componentName: t, create: S } = p("radio"), I = S({
6
- components: {
7
- CheckNormal: h,
8
- CheckChecked: _
9
- },
10
- props: {
11
- disabled: {
12
- type: Boolean,
13
- default: !1
14
- },
15
- shape: {
16
- type: String,
17
- default: "round"
18
- // button
19
- },
20
- label: {
21
- type: [String, Number, Boolean],
22
- default: ""
23
- },
24
- iconSize: {
25
- type: [String, Number],
26
- default: ""
27
- }
28
- },
29
- setup(n, { emit: g, slots: e }) {
30
- let i = C("parent", null);
31
- const c = o(() => i.label.value === n.label), f = o(() => n.disabled ? "nut-radio__icon--disable" : c.value ? "nut-radio__icon" : "nut-radio__icon--unchecked"), k = o(() => i.position), l = () => {
32
- const { iconSize: a } = n, b = {
33
- CheckNormal: e.icon ? e.icon : h,
34
- Checked: e.checkedIcon ? e.checkedIcon : _
35
- }, s = c.value ? b.Checked : b.CheckNormal, m = N(a);
36
- return r(s, {
37
- width: m,
38
- height: m,
39
- class: f.value
40
- });
41
- }, d = () => {
42
- var a;
43
- return r(
44
- "view",
45
- {
46
- class: `${t}__label ${n.disabled ? `${t}__label--disabled` : ""}`
47
- },
48
- (a = e.default) == null ? void 0 : a.call(e)
49
- );
50
- }, v = () => {
51
- var a;
52
- return r(
53
- "view",
54
- {
55
- class: `${t}__button ${c.value && `${t}__button--active`} ${n.disabled ? `${t}__button--disabled` : ""}`
56
- },
57
- (a = e.default) == null ? void 0 : a.call(e)
58
- );
59
- }, $ = () => {
60
- c.value || n.disabled || i.updateValue(n.label);
61
- };
62
- let u = k.value === "left";
63
- return () => r(
64
- "view",
65
- {
66
- class: `${t} ${t}--${n.shape} ${u ? `${t}--reverse` : ""}`,
67
- onClick: $
68
- },
69
- [
70
- n.shape == "button" ? v() : u ? [d(), l()] : [l(), d()]
71
- ]
72
- );
73
- }
74
- });
75
- export {
76
- I as _
77
- };
@@ -1,110 +0,0 @@
1
- import { ref as R, reactive as E, computed as u, watch as H, onMounted as N, onUnmounted as T, h as x, unref as k } from "vue";
2
- import { c as z } from "./component-234624bc.js";
3
- import { u as h } from "./index-192a3ef6.js";
4
- const { componentName: g, create: I } = z("sticky"), M = I({
5
- props: {
6
- position: {
7
- type: String,
8
- default: "top"
9
- },
10
- top: {
11
- type: [Number, String],
12
- default: 0
13
- },
14
- bottom: {
15
- type: [Number, String],
16
- default: 0
17
- },
18
- container: {
19
- type: Object
20
- },
21
- zIndex: {
22
- type: [Number, String],
23
- default: 2e3
24
- }
25
- },
26
- emits: ["change", "scroll"],
27
- setup(s, { emit: m, slots: a }) {
28
- const d = R(), e = E({
29
- width: 0,
30
- height: 0,
31
- fixed: !1,
32
- transform: 0
33
- }), w = u(() => {
34
- const { fixed: t, width: i, height: c } = e;
35
- if (t)
36
- return {
37
- width: `${i}px`,
38
- height: `${c}px`
39
- };
40
- }), v = u(() => {
41
- if (!e.fixed)
42
- return;
43
- const t = {
44
- width: `${e.width}px`,
45
- height: `${e.height}px`,
46
- [s.position]: `${r.value}px`,
47
- zIndex: +s.zIndex
48
- };
49
- return e.transform && (t.transform = `translate3d(0, ${e.transform}px, 0)`), t;
50
- }), r = u(() => s.position === "top" ? s.top : s.bottom), y = (t) => {
51
- const i = k(t);
52
- if (!i)
53
- return !1;
54
- const c = window.getComputedStyle(i), o = c.display === "none", n = i.offsetParent === null && c.position !== "fixed";
55
- return o || n;
56
- }, b = () => !(!d.value || y(d)), S = (t) => Math.max(0, "scrollTop" in t ? t.scrollTop : t.pageYOffset), $ = () => {
57
- var t;
58
- return x(
59
- "view",
60
- {
61
- style: v.value,
62
- class: e.fixed ? `${g} nut-sticky--fixed` : g
63
- },
64
- (t = a.default) == null ? void 0 : t.call(a)
65
- );
66
- }, l = () => {
67
- if (!b())
68
- return;
69
- const { container: t, position: i } = s, c = S(window), o = h(d);
70
- if ((o.width || o.height) && (e.width = o.width, e.height = o.height), i === "top")
71
- if (t) {
72
- const n = h(t), f = n.bottom - +r.value - e.height;
73
- e.fixed = +r.value > o.top && n.bottom > 0, e.transform = f < 0 ? f : 0;
74
- } else
75
- e.fixed = r.value > o.top;
76
- else if (i === "bottom") {
77
- const n = document.documentElement.clientHeight;
78
- if (t) {
79
- const f = h(t), p = n - f.top - +r.value - e.height;
80
- e.fixed = n - +r.value < o.bottom && n > f.top, e.transform = p < 0 ? -p : 0;
81
- } else
82
- e.fixed = n - +r.value < o.bottom;
83
- }
84
- m("scroll", {
85
- top: c,
86
- fixed: e.fixed
87
- });
88
- };
89
- return H(
90
- () => e.fixed,
91
- (t) => {
92
- m("change", t);
93
- }
94
- ), N(() => {
95
- window.addEventListener("scroll", l), l();
96
- }), T(() => {
97
- window.removeEventListener("scroll", l);
98
- }), () => x(
99
- "view",
100
- {
101
- style: w.value,
102
- ref: d
103
- },
104
- [$()]
105
- );
106
- }
107
- });
108
- export {
109
- M as _
110
- };
@@ -1,23 +0,0 @@
1
- import { createApp as d } from "vue";
2
- import { j as l, k as u } from "./component-234624bc.js";
3
- const C = (n, e) => {
4
- let t = document.body;
5
- const o = n.teleport || "body";
6
- o != "body" && (l(o) ? t = document.querySelector(o) : t = n.teleport);
7
- const r = document.createElement("view"), c = e.name ? e.name + "-" : "", m = n.id || (/* @__PURE__ */ new Date()).getTime();
8
- r.id = c + m;
9
- let a = {};
10
- u(e.wrapper) ? a = e.wrapper(t, r) : a = e.wrapper;
11
- const s = d(a, n), i = e.components;
12
- return i && i.forEach((p) => {
13
- s.use(p);
14
- }), t.appendChild(r), {
15
- instance: s.mount(r),
16
- unmount: () => {
17
- s.unmount(), t.removeChild(r);
18
- }
19
- };
20
- };
21
- export {
22
- C
23
- };
@@ -1,4 +0,0 @@
1
- const p = (r) => isNaN(Number(r)) ? String(r) : `${r}px`;
2
- export {
3
- p
4
- };
@@ -1,16 +0,0 @@
1
- const n = window, t = typeof window != "undefined";
2
- function i() {
3
- return typeof n != "undefined" ? n.requestAnimationFrame || n.webkitRequestAnimationFrame || function(e) {
4
- n.setTimeout(e, 1e3 / 60);
5
- } : function(e) {
6
- setTimeout(e, 1e3 / 60);
7
- };
8
- }
9
- function o(e) {
10
- t ? cancelAnimationFrame(e) : clearTimeout(e);
11
- }
12
- const r = i();
13
- export {
14
- o as c,
15
- r
16
- };
@@ -1,5 +0,0 @@
1
- import { h as t } from "vue";
2
- const o = (r, e) => r ? t(r, e) : "";
3
- export {
4
- o as r
5
- };
@@ -1,5 +0,0 @@
1
- class s {
2
- }
3
- export {
4
- s as B
5
- };