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.
@@ -2,18 +2,17 @@ import { toPx as e } from "../../../utils/util.mjs";
2
2
  import "../../../utils/index.mjs";
3
3
  import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
4
4
  import "../../../composables/index.mjs";
5
- import { autoUpdate as n, flip as r, inline as i, offset as a } from "../../../node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs";
6
- import { arrow as o, useFloating as s } from "../../../node_modules/.pnpm/@floating-ui_vue@2.0.1_vue@3.5.42_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs";
7
- import { useEmits as ee } from "./use-emit.mjs";
8
- import c from "./content.mjs";
9
- import { useTooltip as l } from "./use-tooltip.mjs";
10
- import { filterNodeTypes as u, staticSideMap as d } from "./constants.mjs";
11
- import { Fragment as f, computed as p, createBlock as m, createElementBlock as h, createVNode as g, defineComponent as _, h as v, mergeModels as y, normalizeClass as b, normalizeStyle as te, onUnmounted as ne, openBlock as x, ref as S, renderSlot as C, resolveDynamicComponent as w, toDisplayString as T, unref as E, useModel as D, useSlots as O, useTemplateRef as k, withCtx as A } from "vue";
5
+ import { useEmits as n } from "./use-emit.mjs";
6
+ import r from "./content.mjs";
7
+ import { useTooltip as i } from "./use-tooltip.mjs";
8
+ import { filterNodeTypes as a, staticSideMap as o } from "./constants.mjs";
9
+ import { Fragment as s, computed as c, createBlock as l, createElementBlock as u, createVNode as d, defineComponent as f, h as p, mergeModels as m, normalizeClass as h, normalizeStyle as g, onUnmounted as _, openBlock as v, ref as y, renderSlot as ee, resolveDynamicComponent as te, toDisplayString as ne, unref as b, useModel as x, useSlots as S, useTemplateRef as C, withCtx as w } from "vue";
10
+ import { arrow as T, autoUpdate as E, flip as D, inline as O, offset as k, useFloating as A } from "@floating-ui/vue";
12
11
  //#region packages/components/tooltip/src/tooltip.vue?vue&type=script&setup=true&lang.ts
13
- var j = ["innerHTML"], M = _({
12
+ var j = ["innerHTML"], M = f({
14
13
  name: "ReTooltip",
15
14
  __name: "tooltip",
16
- props: y({
15
+ props: m({
17
16
  visible: { type: Boolean },
18
17
  content: { default: "" },
19
18
  isHtml: {
@@ -109,7 +108,7 @@ var j = ["innerHTML"], M = _({
109
108
  },
110
109
  visibleModifiers: {}
111
110
  }),
112
- emits: y([
111
+ emits: m([
113
112
  "beforeShow",
114
113
  "show",
115
114
  "beforeHide",
@@ -123,75 +122,75 @@ var j = ["innerHTML"], M = _({
123
122
  "leaveCancelled",
124
123
  "afterLeave"
125
124
  ], ["update:visible"]),
126
- setup(_, { expose: y, emit: M }) {
127
- let { beforeShow: N, beforeHide: P, show: F, hide: I, beforeEnter: L, enter: R, afterEnter: z, beforeLeave: B, leave: re, afterLeave: V, enterCancelled: H, leaveCancelled: U } = ee(M), { ns: W } = t("tooltip"), G = O(), K = p(() => {
125
+ setup(f, { expose: m, emit: M }) {
126
+ let { beforeShow: N, beforeHide: P, show: F, hide: I, beforeEnter: L, enter: R, afterEnter: z, beforeLeave: re, leave: B, afterLeave: V, enterCancelled: H, leaveCancelled: U } = n(M), { ns: W } = t("tooltip"), G = S(), K = c(() => {
128
127
  var e, t;
129
- let n = G == null || (e = G.default) == null || (e = e.call(G)) == null ? void 0 : e.filter((e) => e && !u.includes(e.type.toString()))[0];
130
- return (n == null || (t = n.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? v("span", {}, n) : n;
131
- }), q = k("triggerRef"), J = k("floatingRef"), Y = S(), X = p(() => _.isVirtual ? _.virtualRef : _.isExternal ? Y.value : K.value ? q.value : null), Z = D(_, "visible"), { floatingStyles: ie, middlewareData: ae, placement: Q, update: oe } = s(X, p(() => {
128
+ let n = G == null || (e = G.default) == null || (e = e.call(G)) == null ? void 0 : e.filter((e) => e && !a.includes(e.type.toString()))[0];
129
+ return (n == null || (t = n.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? p("span", {}, n) : n;
130
+ }), q = C("triggerRef"), J = C("floatingRef"), Y = y(), X = c(() => f.isVirtual ? f.virtualRef : f.isExternal ? Y.value : K.value ? q.value : null), Z = x(f, "visible"), { floatingStyles: ie, middlewareData: ae, placement: Q, update: oe } = A(X, c(() => {
132
131
  var e;
133
132
  return (e = J.value) == null ? void 0 : e.floatingRef;
134
133
  }), {
135
134
  open: Z,
136
- placement: _.placement,
135
+ placement: f.placement,
137
136
  strategy: "absolute",
138
137
  middleware: [
139
- i(_.inlineOptions),
140
- a(_.offset),
141
- r({
142
- padding: _.flipOffset,
143
- boundary: _.boundary,
144
- elementContext: _.elementContext,
145
- altBoundary: _.altBoundary,
146
- rootBoundary: _.rootBoundary,
147
- ..._.flipOptions
138
+ O(f.inlineOptions),
139
+ k(f.offset),
140
+ D({
141
+ padding: f.flipOffset,
142
+ boundary: f.boundary,
143
+ elementContext: f.elementContext,
144
+ altBoundary: f.altBoundary,
145
+ rootBoundary: f.rootBoundary,
146
+ ...f.flipOptions
148
147
  }),
149
- o({
150
- element: p(() => {
148
+ T({
149
+ element: c(() => {
151
150
  var e;
152
151
  return (e = J.value) == null ? void 0 : e.arrowRef;
153
152
  }),
154
- padding: _.arrowOffset,
155
- ..._.arrowOptions
153
+ padding: f.arrowOffset,
154
+ ...f.arrowOptions
156
155
  })
157
156
  ],
158
- whileElementsMounted: (e, t, r) => n(e, t, r, {
157
+ whileElementsMounted: (e, t, n) => E(e, t, n, {
159
158
  animationFrame: !0,
160
159
  ancestorScroll: !0,
161
160
  ancestorResize: !0,
162
161
  elementResize: !0,
163
162
  layoutShift: !0
164
163
  })
165
- }), se = p(() => [ie.value, _.floatingStyle]), ce = p(() => {
166
- let t = d[Q.value.split("-")[0]], n = ae.value.arrow;
164
+ }), se = c(() => [ie.value, f.floatingStyle]), ce = c(() => {
165
+ let t = o[Q.value.split("-")[0]], n = ae.value.arrow;
167
166
  return {
168
167
  position: "absolute",
169
168
  left: (n == null ? void 0 : n.x) == null ? "" : `${n.x}px`,
170
169
  top: (n == null ? void 0 : n.y) == null ? "" : `${n.y}px`,
171
- [t]: `-${_.arrowSize / 2}px`,
172
- width: e(_.arrowSize),
173
- height: e(_.arrowSize)
170
+ [t]: `-${f.arrowSize / 2}px`,
171
+ width: e(f.arrowSize),
172
+ height: e(f.arrowSize)
174
173
  };
175
- }), { stop: le, setup: ue, delayShow: de, delayHide: fe } = l({
176
- triggerRef: p(() => _.isVirtual ? null : _.isExternal ? _.externalRef : K.value ? q.value : null),
177
- isExternal: _.isExternal,
174
+ }), { stop: le, setup: ue, delayShow: de, delayHide: fe } = i({
175
+ triggerRef: c(() => f.isVirtual ? null : f.isExternal ? f.externalRef : K.value ? q.value : null),
176
+ isExternal: f.isExternal,
178
177
  externalActiveRef: Y,
179
- externalRef: p(() => _.externalRef),
180
- trigger: _.trigger,
181
- floatingRef: p(() => {
178
+ externalRef: c(() => f.externalRef),
179
+ trigger: f.trigger,
180
+ floatingRef: c(() => {
182
181
  var e;
183
- return _.persistent ? (e = J.value) == null ? void 0 : e.floatingRef : void 0;
182
+ return f.persistent ? (e = J.value) == null ? void 0 : e.floatingRef : void 0;
184
183
  }),
185
184
  open: Z,
186
- showDelay: _.showDelay,
187
- hideDelay: _.hideDelay,
188
- disabled: p(() => _.disabled)
185
+ showDelay: f.showDelay,
186
+ hideDelay: f.hideDelay,
187
+ disabled: c(() => f.disabled)
189
188
  }), { scope: $ } = ue(), pe = () => {
190
189
  le(), $ == null || $.stop();
191
190
  };
192
- return ne(() => {
191
+ return _(() => {
193
192
  pe();
194
- }), y({
193
+ }), m({
195
194
  update: oe,
196
195
  hide: () => {
197
196
  Z.value = !1;
@@ -202,60 +201,60 @@ var j = ["innerHTML"], M = _({
202
201
  },
203
202
  delayShow: de,
204
203
  triggerRef: X.value,
205
- floatingRef: p(() => {
204
+ floatingRef: c(() => {
206
205
  var e;
207
206
  return (e = J.value) == null ? void 0 : e.floatingRef;
208
207
  }).value,
209
- arrowRef: p(() => {
208
+ arrowRef: c(() => {
210
209
  var e;
211
210
  return (e = J.value) == null ? void 0 : e.arrowRef;
212
211
  }).value
213
- }), (e, t) => (x(), h(f, null, [(x(), m(w(K.value), {
212
+ }), (e, t) => (v(), u(s, null, [(v(), l(te(K.value), {
214
213
  ref_key: "triggerRef",
215
214
  ref: q,
216
- class: b([E(W)("trigger")])
217
- }, null, 8, ["class"])), g(c, {
215
+ class: h([b(W)("trigger")])
216
+ }, null, 8, ["class"])), d(r, {
218
217
  ref_key: "floatingRef",
219
218
  ref: J,
220
219
  modelValue: Z.value,
221
220
  "onUpdate:modelValue": t[0] || (t[0] = (e) => Z.value = e),
222
- placement: E(Q),
223
- "show-arrow": _.showArrow,
224
- width: _.width,
225
- height: _.height,
226
- "max-width": _.maxWidth,
227
- "max-height": _.maxHeight,
228
- "floating-class": _.floatingClass,
229
- style: te(se.value),
230
- theme: _.theme,
231
- "reverse-theme": _.reverseTheme,
221
+ placement: b(Q),
222
+ "show-arrow": f.showArrow,
223
+ width: f.width,
224
+ height: f.height,
225
+ "max-width": f.maxWidth,
226
+ "max-height": f.maxHeight,
227
+ "floating-class": f.floatingClass,
228
+ style: g(se.value),
229
+ theme: f.theme,
230
+ "reverse-theme": f.reverseTheme,
232
231
  "arrow-style": ce.value,
233
- teleported: _.teleported,
234
- "append-to": _.appendTo,
235
- transition: _.transition,
236
- "css-duration": _.cssDuration,
237
- "css-transition": _.cssTransition,
238
- onBeforeShow: E(N),
239
- onShow: E(F),
240
- onBeforeHide: E(P),
241
- onHide: E(I),
242
- onBeforeEnter: E(L),
243
- onEnter: E(R),
244
- onAfterEnter: E(z),
245
- onBeforeLeave: E(B),
246
- onLeave: E(re),
247
- onAfterLeave: E(V),
248
- onEnterCancelled: E(H),
249
- onLeaveCancelled: E(U)
232
+ teleported: f.teleported,
233
+ "append-to": f.appendTo,
234
+ transition: f.transition,
235
+ "css-duration": f.cssDuration,
236
+ "css-transition": f.cssTransition,
237
+ onBeforeShow: b(N),
238
+ onShow: b(F),
239
+ onBeforeHide: b(P),
240
+ onHide: b(I),
241
+ onBeforeEnter: b(L),
242
+ onEnter: b(R),
243
+ onAfterEnter: b(z),
244
+ onBeforeLeave: b(re),
245
+ onLeave: b(B),
246
+ onAfterLeave: b(V),
247
+ onEnterCancelled: b(H),
248
+ onLeaveCancelled: b(U)
250
249
  }, {
251
- default: A(() => [C(e.$slots, "content", {}, () => [_.isHtml ? (x(), h("span", {
250
+ default: w(() => [ee(e.$slots, "content", {}, () => [f.isHtml ? (v(), u("span", {
252
251
  key: 0,
253
- class: b([E(W)("content")]),
254
- innerHTML: _.content
255
- }, null, 10, j)) : (x(), h("span", {
252
+ class: h([b(W)("content")]),
253
+ innerHTML: f.content
254
+ }, null, 10, j)) : (v(), u("span", {
256
255
  key: 1,
257
- class: b([E(W)("content")])
258
- }, T(_.content), 3))])]),
256
+ class: h([b(W)("content")])
257
+ }, ne(f.content), 3))])]),
259
258
  _: 3
260
259
  }, 8, "modelValue.placement.show-arrow.width.height.max-width.max-height.floating-class.style.theme.reverse-theme.arrow-style.teleported.append-to.transition.css-duration.css-transition.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."))], 64));
261
260
  }
@@ -1,23 +1,22 @@
1
- import { useDebounceFn as e } from "../../../node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.mjs";
2
- import { onClickOutside as t, useElementHover as n, useEventListener as r } from "../../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
3
- import { effectScope as i, unref as a, watch as o } from "vue";
1
+ import { effectScope as e, unref as t, watch as n } from "vue";
2
+ import { onClickOutside as r, useDebounceFn as i, useElementHover as a, useEventListener as o } from "@vueuse/core";
4
3
  //#region packages/components/tooltip/src/use-tooltip.ts
5
4
  function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u, trigger: d, floatingRef: f, open: p, showDelay: m = 0, hideDelay: h = 0, disabled: g }) {
6
- let _ = [], v = e(() => {
5
+ let _ = [], v = i(() => {
7
6
  p.value = !0;
8
- }, c ? 0 : m), y = e((e) => {
7
+ }, c ? 0 : m), y = i((e) => {
9
8
  p.value = !1, typeof e == "function" && e();
10
9
  }, c ? 0 : h), b = () => {
11
10
  if (s.value) switch (d) {
12
11
  case "click": {
13
- let e = r(s, "click", v), i = n(f, {
12
+ let e = o(s, "click", v), t = a(f, {
14
13
  delayEnter: 0,
15
14
  delayLeave: 0,
16
15
  triggerOnRemoval: !0
17
- }), a = t(s, () => {
18
- !i.value && y();
16
+ }), n = r(s, () => {
17
+ !t.value && y();
19
18
  });
20
- _.push(e, a);
19
+ _.push(e, n);
21
20
  break;
22
21
  }
23
22
  case "hover": {
@@ -25,32 +24,32 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
25
24
  delayEnter: m,
26
25
  delayLeave: h,
27
26
  triggerOnRemoval: !0
28
- }, t = n(s, e), r = n(f, e);
27
+ }, t = a(s, e), r = a(f, e);
29
28
  c && p.value && (t.value = !0);
30
- let { stop: i } = o(() => [t.value, r.value], ([e, t]) => {
29
+ let { stop: i } = n(() => [t.value, r.value], ([e, t]) => {
31
30
  p.value = e || t;
32
31
  });
33
32
  _.push(i);
34
33
  break;
35
34
  }
36
35
  case "focus": {
37
- let e = r(s, "focus", v), i = n(f, {
36
+ let e = o(s, "focus", v), t = a(f, {
38
37
  delayEnter: 0,
39
38
  delayLeave: 0,
40
39
  triggerOnRemoval: !0
41
- }), a = r(s, "blur", () => !i.value && y()), o = t(s, () => !i.value && y());
42
- _.push(e, a, o);
40
+ }), n = o(s, "blur", () => !t.value && y()), i = r(s, () => !t.value && y());
41
+ _.push(e, n, i);
43
42
  break;
44
43
  }
45
44
  case "contextmenu": {
46
- let e = r(s, "contextmenu", (e) => {
45
+ let e = o(s, "contextmenu", (e) => {
47
46
  e.preventDefault(), v();
48
- }), i = n(f, {
47
+ }), t = a(f, {
49
48
  delayEnter: 0,
50
49
  delayLeave: 0,
51
50
  triggerOnRemoval: !0
52
- }), a = t(s, () => !i.value && y());
53
- _.push(e, a);
51
+ }), n = r(s, () => !t.value && y());
52
+ _.push(e, n);
54
53
  break;
55
54
  }
56
55
  }
@@ -59,7 +58,7 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
59
58
  }, S = () => {
60
59
  p.value = !1, x();
61
60
  };
62
- return c && o(() => u == null ? void 0 : u.value, (e) => {
61
+ return c && n(() => u == null ? void 0 : u.value, (e) => {
63
62
  if (!(["click", "contextmenu"].includes(d) && l.value === e)) {
64
63
  if (!l.value || !p.value) {
65
64
  l.value = e, v();
@@ -73,22 +72,22 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
73
72
  start: b,
74
73
  stop: S,
75
74
  setup: () => {
76
- let e = i();
77
- return e.run(() => {
75
+ let r = e();
76
+ return r.run(() => {
78
77
  if (p.value) {
79
78
  x();
80
79
  return;
81
80
  }
82
- if (a(g)) {
81
+ if (t(g)) {
83
82
  S();
84
83
  return;
85
84
  }
86
- b(), o(() => a(g), (e) => {
85
+ b(), n(() => t(g), (e) => {
87
86
  e ? S() : b();
88
- }), o(s, (e) => {
87
+ }), n(s, (e) => {
89
88
  e && (x(), b());
90
89
  });
91
- }), { scope: e };
90
+ }), { scope: r };
92
91
  },
93
92
  delayHide: y,
94
93
  delayShow: v
@@ -1,21 +1,20 @@
1
- import { useToggle as e } from "../../node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.mjs";
2
- import { useDark 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";
3
- import { useNamespace as n } from "../use-namespace/index.mjs";
1
+ import { useNamespace as e } from "../use-namespace/index.mjs";
4
2
  import "../index.mjs";
5
- import { computed as r } from "vue";
3
+ import { computed as t } from "vue";
4
+ import { useDark as n, useToggle as r } from "@vueuse/core";
6
5
  //#region packages/composables/use-theme/index.ts
7
- var { libName: i } = n(""), a = t({
6
+ var { libName: i } = e(""), a = n({
8
7
  storageKey: `${i}-color-scheme`,
9
8
  selector: "html",
10
9
  attribute: "class",
11
10
  valueDark: "dark",
12
11
  valueLight: "light"
13
12
  });
14
- function o(t = "light", n = !1) {
15
- let i = e(a);
13
+ function o(e = "light", n = !1) {
14
+ let i = r(a);
16
15
  return {
17
16
  isDark: a,
18
- currentTheme: r(() => n ? t === "dark" ? "light" : "dark" : t),
17
+ currentTheme: t(() => n ? e === "dark" ? "light" : "dark" : e),
19
18
  toggle: i
20
19
  };
21
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rappel-ui",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "A Vue3 Component Library",
5
5
  "keywords": [
6
6
  "vue",
@@ -66,10 +66,32 @@
66
66
  "./es/**/*.css",
67
67
  "./cjs/**/*.css",
68
68
  "**/style/*.js",
69
+ "**/style/*.mjs",
69
70
  "./dist/**/*.css",
70
71
  "./theme-chalk/**/*.css",
71
72
  "./theme-chalk/src/**/*.scss"
72
73
  ],
74
+ "peerDependencies": {
75
+ "vue": "^3.2.0"
76
+ },
77
+ "dependencies": {
78
+ "@rappel-ui/components": "^1.0.10",
79
+ "@rappel-ui/composables": "^1.0.5",
80
+ "@rappel-ui/constants": "^1.0.5",
81
+ "@rappel-ui/directives": "^1.0.5",
82
+ "@rappel-ui/svg-icons": "^1.0.12",
83
+ "@rappel-ui/theme-chalk": "^1.0.7",
84
+ "@rappel-ui/types": "^1.0.2",
85
+ "@rappel-ui/utils": "^1.0.5",
86
+ "@vueuse/core": "^14.4.0",
87
+ "dayjs": "^1.11.18",
88
+ "@floating-ui/vue": "^2.0.1"
89
+ },
90
+ "devDependencies": {
91
+ "@types/node": "^22.18.13",
92
+ "vue": "^3.5.26",
93
+ "vue-router": "^4.6.3"
94
+ },
73
95
  "scripts": {
74
96
  "clean": "rimraf dist"
75
97
  }