rappel-ui 1.0.20 → 1.0.22

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.
@@ -1,15 +1,14 @@
1
- import { useElementSize as e, useMutationObserver as t } from "../../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
2
- import { ArrowDownward as n } from "../../../svg-icons/dist/es/src/arrow-downward.mjs";
3
- import { ArrowUpward as r } from "../../../svg-icons/dist/es/src/arrow-upward.mjs";
4
- import { useNamespace as i } from "../../../composables/use-namespace/index.mjs";
1
+ import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
5
2
  import "../../../composables/index.mjs";
6
- import { ReButton as a } from "../../button/index.mjs";
7
- import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m, mergeModels as h, normalizeClass as g, normalizeStyle as _, onMounted as v, onUnmounted as y, openBlock as b, renderSlot as x, unref as S, useModel as C, useTemplateRef as w, watch as T, watchEffect as E, withCtx as D, withModifiers as O } from "vue";
3
+ import { ReButton as t } from "../../button/index.mjs";
4
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, mergeModels as d, normalizeClass as f, normalizeStyle as p, onMounted as m, onUnmounted as h, openBlock as g, renderSlot as _, unref as v, useModel as y, useTemplateRef as b, watch as x, watchEffect as S, withCtx as C, withModifiers as w } from "vue";
5
+ import { useElementSize as T, useMutationObserver as E } from "@vueuse/core";
6
+ import { ArrowDownward as D, ArrowUpward as O } from "@rappel-ui/svg-icons";
8
7
  //#region packages/components/filter-panel/src/filter-panel.vue?vue&type=script&setup=true&lang.ts
9
- var k = p({
8
+ var k = l({
10
9
  name: "ReFilterPanel",
11
10
  __name: "filter-panel",
12
- props: h({
11
+ props: d({
13
12
  selector: { default: "> *" },
14
13
  maxHeight: { default: 0 },
15
14
  itemMinw: { default: 240 },
@@ -30,46 +29,46 @@ var k = p({
30
29
  },
31
30
  isExpandModifiers: {}
32
31
  }),
33
- emits: h(["reset", "search"], ["update:isExpand"]),
34
- setup(p, { expose: h, emit: k }) {
35
- let { n: A, ns: j } = i("filter-panel"), M = w("main"), { height: N } = e(M), P = o(() => p.maxHeight || N.value), F = k, I = w("wrapper"), L = w("inner"), R = C(p, "isExpand"), z = o(() => V.value > P.value), B = () => {
32
+ emits: d(["reset", "search"], ["update:isExpand"]),
33
+ setup(l, { expose: d, emit: k }) {
34
+ let { n: A, ns: j } = e("filter-panel"), M = b("main"), { height: N } = T(M), P = n(() => l.maxHeight || N.value), F = k, I = b("wrapper"), L = b("inner"), R = y(l, "isExpand"), z = n(() => V.value > P.value), B = () => {
36
35
  R.value = !R.value;
37
- }, { height: V, width: H } = e(L, {
36
+ }, { height: V, width: H } = T(L, {
38
37
  width: 0,
39
38
  height: P.value
40
- }), { width: U } = e(I, {
39
+ }), { width: U } = T(I, {
41
40
  width: 0,
42
41
  height: P.value
43
42
  }), W = () => {
44
43
  if (!L.value) return;
45
- let e = L.value.querySelectorAll(`.${j("inner")} ${p.selector}:not(${p.exclude})`), t = Math.floor(H.value / p.itemMinw);
44
+ let e = L.value.querySelectorAll(`.${j("inner")} ${l.selector}:not(${l.exclude})`), t = Math.floor(H.value / l.itemMinw);
46
45
  e.forEach((e) => {
47
46
  e.style.width = `${100 / t}%`;
48
47
  });
49
- }, G = m();
48
+ }, G = u();
50
49
  G.run(() => {
51
- E(() => {
50
+ S(() => {
52
51
  H.value && U.value && W();
53
- }), T(() => V.value, (e) => {
52
+ }), x(() => V.value, (e) => {
54
53
  e > P.value && (R.value = !1);
55
54
  });
56
55
  });
57
56
  let K = () => {
58
- let { stop: e } = t(L, () => {
57
+ let { stop: e } = E(L, () => {
59
58
  W();
60
59
  }, Object.assign({
61
60
  childList: !0,
62
61
  subtree: !0,
63
62
  attributes: !0,
64
63
  characterData: !0
65
- }, p.observerOptions || {}));
64
+ }, l.observerOptions || {}));
66
65
  return { stop: e };
67
66
  }, q;
68
- return p.enableObserver && (q = K().stop), y(() => {
67
+ return l.enableObserver && (q = K().stop), h(() => {
69
68
  G.stop(), q == null || q();
70
- }), v(() => {
69
+ }), m(() => {
71
70
  W();
72
- }), h({
71
+ }), d({
73
72
  toggle: B,
74
73
  update: W,
75
74
  isExpand: R,
@@ -77,52 +76,52 @@ var k = p({
77
76
  innerW: H,
78
77
  wrapperW: U,
79
78
  maxH: P
80
- }), (e, t) => (b(), l("div", {
79
+ }), (e, n) => (g(), a("div", {
81
80
  ref_key: "wrapper",
82
81
  ref: I,
83
- class: g([S(A)()]),
84
- style: _({ "max-height": `${R.value ? S(V) : P.value}px` })
85
- }, [u("div", {
82
+ class: f([v(A)()]),
83
+ style: p({ "max-height": `${R.value ? v(V) : P.value}px` })
84
+ }, [o("div", {
86
85
  ref_key: "inner",
87
86
  ref: L,
88
- class: g([S(j)("inner")])
89
- }, [x(e.$slots, "default")], 2), u("div", { class: g([S(j)("operator")]) }, [u("div", {
87
+ class: f([v(j)("inner")])
88
+ }, [_(e.$slots, "default")], 2), o("div", { class: f([v(j)("operator")]) }, [o("div", {
90
89
  ref_key: "main",
91
90
  ref: M,
92
- class: g([S(j)("main")])
93
- }, [x(e.$slots, "main", {}, () => [
94
- x(e.$slots, "expand", {
91
+ class: f([v(j)("main")])
92
+ }, [_(e.$slots, "main", {}, () => [
93
+ _(e.$slots, "expand", {
95
94
  showExpand: z.value,
96
95
  isExpand: R.value
97
- }, () => [z.value ? (b(), s(S(a), {
96
+ }, () => [z.value ? (g(), r(v(t), {
98
97
  key: 0,
99
98
  type: "primary",
100
99
  title: R.value ? "收起" : "展开",
101
100
  text: "",
102
- onClick: O(B, ["stop"])
101
+ onClick: w(B, ["stop"])
103
102
  }, {
104
- default: D(() => [x(e.$slots, "expand-icon", {}, () => [R.value ? (b(), s(S(r), { key: 0 })) : (b(), s(S(n), { key: 1 }))])]),
103
+ default: C(() => [_(e.$slots, "expand-icon", {}, () => [R.value ? (g(), r(v(O), { key: 0 })) : (g(), r(v(D), { key: 1 }))])]),
105
104
  _: 3
106
- }, 8, ["title"])) : c("", !0)]),
107
- x(e.$slots, "reset", {}, () => [f(S(a), {
108
- disabled: p.loading,
109
- onClick: t[0] || (t[0] = O((e) => F("reset"), ["stop"]))
105
+ }, 8, ["title"])) : i("", !0)]),
106
+ _(e.$slots, "reset", {}, () => [c(v(t), {
107
+ disabled: l.loading,
108
+ onClick: n[0] || (n[0] = w((e) => F("reset"), ["stop"]))
110
109
  }, {
111
- default: D(() => [...t[2] || (t[2] = [d("重置", -1)])]),
110
+ default: C(() => [...n[2] || (n[2] = [s("重置", -1)])]),
112
111
  _: 1
113
112
  }, 8, ["disabled"])]),
114
- x(e.$slots, "search", {}, () => [f(S(a), {
113
+ _(e.$slots, "search", {}, () => [c(v(t), {
115
114
  type: "primary",
116
- disabled: p.loading,
117
- onClick: t[1] || (t[1] = O((e) => F("search"), ["stop"]))
115
+ disabled: l.loading,
116
+ onClick: n[1] || (n[1] = w((e) => F("search"), ["stop"]))
118
117
  }, {
119
- default: D(() => [...t[3] || (t[3] = [d(" 查询 ", -1)])]),
118
+ default: C(() => [...n[3] || (n[3] = [s(" 查询 ", -1)])]),
120
119
  _: 1
121
120
  }, 8, ["disabled"])])
122
- ])], 2), e.$slots.extra ? (b(), l("div", {
121
+ ])], 2), e.$slots.extra ? (g(), a("div", {
123
122
  key: 0,
124
- class: g([S(j)("extra")])
125
- }, [x(e.$slots, "extra")], 2)) : c("", !0)], 2)], 6));
123
+ class: f([v(j)("extra")])
124
+ }, [_(e.$slots, "extra")], 2)) : i("", !0)], 2)], 6));
126
125
  }
127
126
  });
128
127
  //#endregion
@@ -1,15 +1,15 @@
1
- import { computedAsync as e } from "../../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
2
- import { getAsyncIcon as t } from "../../../svg-icons/dist/es/index.mjs";
3
- import { useNamespace as n } from "../../../composables/use-namespace/index.mjs";
1
+ import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
4
2
  import "../../../composables/index.mjs";
5
- import { useEmits as r } from "../../tooltip/src/use-emit.mjs";
6
- import { filterNodeTypes as i } from "../../tooltip/src/constants.mjs";
7
- import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, h as m, mergeModels as h, normalizeClass as g, openBlock as _, renderSlot as v, resolveComponent as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, useModel as C, useSlots as w, useTemplateRef as T, withCtx as E } from "vue";
3
+ import { useEmits as t } from "../../tooltip/src/use-emit.mjs";
4
+ import { filterNodeTypes as n } from "../../tooltip/src/constants.mjs";
5
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, mergeModels as p, normalizeClass as m, openBlock as h, renderSlot as g, resolveComponent as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useModel as x, useSlots as S, useTemplateRef as C, withCtx as w } from "vue";
6
+ import { computedAsync as T } from "@vueuse/core";
7
+ import { getAsyncIcon as E } from "@rappel-ui/svg-icons";
8
8
  //#region packages/components/popconfirm/src/popconfirm.vue?vue&type=script&setup=true&lang.ts
9
- var D = ["innerHTML"], O = p({
9
+ var D = ["innerHTML"], O = d({
10
10
  name: "RePopconfirm",
11
11
  __name: "popconfirm",
12
- props: h({
12
+ props: p({
13
13
  icon: { default: "help" },
14
14
  showIcon: {
15
15
  type: Boolean,
@@ -114,7 +114,7 @@ var D = ["innerHTML"], O = p({
114
114
  visible: { type: Boolean },
115
115
  visibleModifiers: {}
116
116
  }),
117
- emits: h([
117
+ emits: p([
118
118
  "confirm",
119
119
  "cancel",
120
120
  "beforeShow",
@@ -130,141 +130,141 @@ var D = ["innerHTML"], O = p({
130
130
  "leaveCancelled",
131
131
  "afterLeave"
132
132
  ], ["update:visible"]),
133
- setup(p, { expose: h, emit: O }) {
134
- let { n: k, ns: A } = n("popconfirm"), j = O, { beforeShow: M, beforeHide: N, show: P, hide: F, beforeEnter: I, enter: L, afterEnter: R, beforeLeave: z, leave: B, afterLeave: V, enterCancelled: H, leaveCancelled: U } = r(j), W = C(p, "visible"), G = o(() => [k(), p.floatingClass]), K = w(), q = o(() => {
133
+ setup(d, { expose: p, emit: O }) {
134
+ let { n: k, ns: A } = e("popconfirm"), j = O, { beforeShow: M, beforeHide: N, show: P, hide: F, beforeEnter: I, enter: L, afterEnter: R, beforeLeave: z, leave: B, afterLeave: V, enterCancelled: H, leaveCancelled: U } = t(j), W = x(d, "visible"), G = i(() => [k(), d.floatingClass]), K = S(), q = i(() => {
135
135
  var e, t;
136
- let n = K == null || (e = K.default) == null || (e = e.call(K)) == null ? void 0 : e.filter((e) => e && !i.includes(e.type.toString()))[0];
137
- return (n == null || (t = n.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? m("span", {}, n) : n;
138
- }), J = e(async () => await t(p.icon)), Y = T("tooltipRef"), X = (e) => {
136
+ let r = K == null || (e = K.default) == null || (e = e.call(K)) == null ? void 0 : e.filter((e) => e && !n.includes(e.type.toString()))[0];
137
+ return (r == null || (t = r.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? f("span", {}, r) : r;
138
+ }), J = T(async () => await E(d.icon)), Y = C("tooltipRef"), X = (e) => {
139
139
  var t;
140
140
  j("cancel", e), (t = Y.value) == null || t.delayHide();
141
141
  }, Z = (e) => {
142
142
  var t;
143
143
  j("confirm", e), (t = Y.value) == null || t.delayHide();
144
144
  };
145
- return h({
145
+ return p({
146
146
  tooltipRef: Y,
147
147
  cancel: X,
148
148
  confirm: Z
149
149
  }), (e, t) => {
150
- let n = y("re-button"), r = y("re-tooltip");
151
- return _(), s(r, {
150
+ let n = _("re-button"), i = _("re-tooltip");
151
+ return h(), a(i, {
152
152
  ref_key: "tooltipRef",
153
153
  ref: Y,
154
154
  visible: W.value,
155
155
  "onUpdate:visible": t[0] || (t[0] = (e) => W.value = e),
156
- width: p.width,
157
- height: p.height,
158
- "max-width": p.maxWidth,
159
- "max-height": p.maxHeight,
156
+ width: d.width,
157
+ height: d.height,
158
+ "max-width": d.maxWidth,
159
+ "max-height": d.maxHeight,
160
160
  "floating-class": G.value,
161
- "floating-style": p.floatingStyle,
162
- disabled: p.disabled,
163
- theme: p.theme,
164
- placement: p.placement,
165
- trigger: p.trigger,
166
- "reverse-theme": p.reverseTheme,
167
- "show-delay": p.showDelay,
168
- "hide-delay": p.hideDelay,
169
- transition: p.transition,
170
- "css-duration": p.cssDuration,
171
- "css-transition": p.cssTransition,
172
- "show-arrow": p.showArrow,
173
- offset: p.offset,
174
- teleported: p.teleported,
175
- "append-to": p.appendTo,
176
- persistent: p.persistent,
177
- boundary: p.boundary,
178
- "element-context": p.elementContext,
179
- "alt-boundary": p.altBoundary,
180
- "root-boundary": p.rootBoundary,
181
- "arrow-size": p.arrowSize,
182
- "arrow-offset": p.arrowOffset,
183
- "flip-offset": p.flipOffset,
184
- "arrow-options": p.arrowOptions,
185
- "flip-options": p.flipOptions,
186
- "inline-options": p.inlineOptions,
187
- "is-external": p.isExternal,
188
- "external-ref": p.externalRef,
189
- "is-virtual": p.isVirtual,
190
- "virtual-ref": p.virtualRef,
191
- onBeforeShow: S(M),
192
- onShow: S(P),
193
- onBeforeHide: S(N),
194
- onHide: S(F),
195
- onBeforeEnter: S(I),
196
- onEnter: S(L),
197
- onAfterEnter: S(R),
198
- onBeforeLeave: S(z),
199
- onLeave: S(B),
200
- onAfterLeave: S(V),
201
- onEnterCancelled: S(H),
202
- onLeaveCancelled: S(U)
161
+ "floating-style": d.floatingStyle,
162
+ disabled: d.disabled,
163
+ theme: d.theme,
164
+ placement: d.placement,
165
+ trigger: d.trigger,
166
+ "reverse-theme": d.reverseTheme,
167
+ "show-delay": d.showDelay,
168
+ "hide-delay": d.hideDelay,
169
+ transition: d.transition,
170
+ "css-duration": d.cssDuration,
171
+ "css-transition": d.cssTransition,
172
+ "show-arrow": d.showArrow,
173
+ offset: d.offset,
174
+ teleported: d.teleported,
175
+ "append-to": d.appendTo,
176
+ persistent: d.persistent,
177
+ boundary: d.boundary,
178
+ "element-context": d.elementContext,
179
+ "alt-boundary": d.altBoundary,
180
+ "root-boundary": d.rootBoundary,
181
+ "arrow-size": d.arrowSize,
182
+ "arrow-offset": d.arrowOffset,
183
+ "flip-offset": d.flipOffset,
184
+ "arrow-options": d.arrowOptions,
185
+ "flip-options": d.flipOptions,
186
+ "inline-options": d.inlineOptions,
187
+ "is-external": d.isExternal,
188
+ "external-ref": d.externalRef,
189
+ "is-virtual": d.isVirtual,
190
+ "virtual-ref": d.virtualRef,
191
+ onBeforeShow: b(M),
192
+ onShow: b(P),
193
+ onBeforeHide: b(N),
194
+ onHide: b(F),
195
+ onBeforeEnter: b(I),
196
+ onEnter: b(L),
197
+ onAfterEnter: b(R),
198
+ onBeforeLeave: b(z),
199
+ onLeave: b(B),
200
+ onAfterLeave: b(V),
201
+ onEnterCancelled: b(H),
202
+ onLeaveCancelled: b(U)
203
203
  }, {
204
- content: E(() => [
205
- v(e.$slots, "header", {
206
- icon: S(J),
207
- title: p.title
208
- }, () => [u("div", { class: g([S(A)("header")]) }, [v(e.$slots, "icon", { icon: S(J) }, () => [p.showIcon ? (_(), l(a, { key: 0 }, [typeof S(J) == "string" ? (_(), l("i", {
204
+ content: w(() => [
205
+ g(e.$slots, "header", {
206
+ icon: b(J),
207
+ title: d.title
208
+ }, () => [c("div", { class: m([b(A)("header")]) }, [g(e.$slots, "icon", { icon: b(J) }, () => [d.showIcon ? (h(), s(r, { key: 0 }, [typeof b(J) == "string" ? (h(), s("i", {
209
209
  key: 0,
210
- class: g([S(A)("icon"), S(J)]),
210
+ class: m([b(A)("icon"), b(J)]),
211
211
  "aria-hidden": "true"
212
- }, null, 2)) : (_(), s(b(S(J)), {
212
+ }, null, 2)) : (h(), a(v(b(J)), {
213
213
  key: 1,
214
- class: g([S(A)("icon")]),
214
+ class: m([b(A)("icon")]),
215
215
  "aria-hidden": "true"
216
- }, null, 8, ["class"]))], 64)) : c("", !0)]), v(e.$slots, "title", { title: p.title }, () => [u("div", { class: g([S(A)("title")]) }, x(p.title), 3)])], 2)]),
217
- v(e.$slots, "content", { content: p.content }, () => [p.isHtml ? (_(), l("div", {
216
+ }, null, 8, ["class"]))], 64)) : o("", !0)]), g(e.$slots, "title", { title: d.title }, () => [c("div", { class: m([b(A)("title")]) }, y(d.title), 3)])], 2)]),
217
+ g(e.$slots, "content", { content: d.content }, () => [d.isHtml ? (h(), s("div", {
218
218
  key: 0,
219
- class: g([S(A)("content")]),
220
- innerHTML: p.content
221
- }, null, 10, D)) : (_(), l("div", {
219
+ class: m([b(A)("content")]),
220
+ innerHTML: d.content
221
+ }, null, 10, D)) : (h(), s("div", {
222
222
  key: 1,
223
- class: g([S(A)("content")])
224
- }, x(p.content), 3))]),
225
- v(e.$slots, "footer", {
223
+ class: m([b(A)("content")])
224
+ }, y(d.content), 3))]),
225
+ g(e.$slots, "footer", {
226
226
  cancel: X,
227
- cancelSize: p.cancelSize,
228
- cancelType: p.cancelType,
229
- cancelText: p.cancelText,
227
+ cancelSize: d.cancelSize,
228
+ cancelType: d.cancelType,
229
+ cancelText: d.cancelText,
230
230
  confirm: Z,
231
- confirmSize: p.confirmSize,
232
- confirmType: p.confirmType,
233
- confirmText: p.confirmText
234
- }, () => [u("div", { class: g([S(A)("footer")]) }, [
235
- v(e.$slots, "cancel", {
231
+ confirmSize: d.confirmSize,
232
+ confirmType: d.confirmType,
233
+ confirmText: d.confirmText
234
+ }, () => [c("div", { class: m([b(A)("footer")]) }, [
235
+ g(e.$slots, "cancel", {
236
236
  cancel: X,
237
- cancelSize: p.cancelSize,
238
- cancelType: p.cancelType,
239
- cancelText: p.cancelText
240
- }, () => [f(n, {
241
- size: p.cancelSize,
242
- type: p.cancelType,
237
+ cancelSize: d.cancelSize,
238
+ cancelType: d.cancelType,
239
+ cancelText: d.cancelText
240
+ }, () => [u(n, {
241
+ size: d.cancelSize,
242
+ type: d.cancelType,
243
243
  onClick: X
244
244
  }, {
245
- default: E(() => [d(x(p.cancelText), 1)]),
245
+ default: w(() => [l(y(d.cancelText), 1)]),
246
246
  _: 1
247
247
  }, 8, ["size", "type"])]),
248
- v(e.$slots, "extra", {
248
+ g(e.$slots, "extra", {
249
249
  cancel: X,
250
250
  confirm: Z
251
251
  }),
252
- v(e.$slots, "confirm", {
252
+ g(e.$slots, "confirm", {
253
253
  confirm: Z,
254
- confirmSize: p.confirmSize,
255
- confirmType: p.confirmType,
256
- confirmText: p.confirmText
257
- }, () => [f(n, {
258
- size: p.confirmSize,
259
- type: p.confirmType,
254
+ confirmSize: d.confirmSize,
255
+ confirmType: d.confirmType,
256
+ confirmText: d.confirmText
257
+ }, () => [u(n, {
258
+ size: d.confirmSize,
259
+ type: d.confirmType,
260
260
  onClick: Z
261
261
  }, {
262
- default: E(() => [d(x(p.confirmText), 1)]),
262
+ default: w(() => [l(y(d.confirmText), 1)]),
263
263
  _: 1
264
264
  }, 8, ["size", "type"])])
265
265
  ], 2)])
266
266
  ]),
267
- default: E(() => [(_(), s(b(q.value)))]),
267
+ default: w(() => [(h(), a(v(q.value)))]),
268
268
  _: 3
269
269
  }, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
270
270
  };