rappel-ui 1.0.31 → 1.0.33

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 (198) hide show
  1. package/README.md +7 -1
  2. package/cjs/components/button/src/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
  3. package/cjs/components/button/src/button.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/cjs/components/button/src/types.d.ts +1 -0
  5. package/cjs/components/neutral-color/src/neutral-color.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
  7. package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/cjs/components/primary-color/src/primary-color.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/cjs/components/secondary-color/src/secondary-color.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/cjs/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.js +1 -1
  11. package/cjs/components/svg-icon/src/types.d.ts +1 -1
  12. package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/cjs/components/tooltip/src/types.d.ts +4 -2
  14. package/cjs/components/tooltip/src/use-tooltip.d.ts +1 -1
  15. package/cjs/components/tooltip/src/use-tooltip.js +1 -1
  16. package/cjs/composables/use-namespace/index.d.ts +2 -0
  17. package/cjs/composables/use-namespace/index.js +1 -1
  18. package/cjs/index.d.ts +105 -420
  19. package/cjs/index.js +1 -1
  20. package/cjs/svg-icons/create-icon.d.ts +3 -12
  21. package/cjs/svg-icons/create-icon.js +1 -1
  22. package/cjs/svg-icons/src/arrow-backward.d.ts +3 -12
  23. package/cjs/svg-icons/src/arrow-backward.js +1 -1
  24. package/cjs/svg-icons/src/arrow-down.d.ts +3 -12
  25. package/cjs/svg-icons/src/arrow-down.js +1 -1
  26. package/cjs/svg-icons/src/arrow-downward.d.ts +3 -12
  27. package/cjs/svg-icons/src/arrow-downward.js +1 -1
  28. package/cjs/svg-icons/src/arrow-forward.d.ts +3 -12
  29. package/cjs/svg-icons/src/arrow-forward.js +1 -1
  30. package/cjs/svg-icons/src/arrow-left.d.ts +3 -12
  31. package/cjs/svg-icons/src/arrow-left.js +1 -1
  32. package/cjs/svg-icons/src/arrow-right.d.ts +3 -12
  33. package/cjs/svg-icons/src/arrow-right.js +1 -1
  34. package/cjs/svg-icons/src/arrow-up.d.ts +3 -12
  35. package/cjs/svg-icons/src/arrow-up.js +1 -1
  36. package/cjs/svg-icons/src/arrow-upward.d.ts +3 -12
  37. package/cjs/svg-icons/src/arrow-upward.js +1 -1
  38. package/cjs/svg-icons/src/check-circle.d.ts +3 -12
  39. package/cjs/svg-icons/src/check-circle.js +1 -1
  40. package/cjs/svg-icons/src/check-fill.d.ts +3 -12
  41. package/cjs/svg-icons/src/check.d.ts +3 -12
  42. package/cjs/svg-icons/src/check.js +1 -1
  43. package/cjs/svg-icons/src/close-circle.d.ts +3 -12
  44. package/cjs/svg-icons/src/close-circle.js +1 -1
  45. package/cjs/svg-icons/src/close-fill.d.ts +3 -12
  46. package/cjs/svg-icons/src/close-short.d.ts +3 -12
  47. package/cjs/svg-icons/src/close-short.js +1 -1
  48. package/cjs/svg-icons/src/close.d.ts +3 -12
  49. package/cjs/svg-icons/src/close.js +1 -1
  50. package/cjs/svg-icons/src/copy-closure.d.ts +3 -12
  51. package/cjs/svg-icons/src/copy-closure.js +1 -1
  52. package/cjs/svg-icons/src/copy.d.ts +3 -12
  53. package/cjs/svg-icons/src/copy.js +1 -1
  54. package/cjs/svg-icons/src/delete.d.ts +3 -12
  55. package/cjs/svg-icons/src/delete.js +1 -1
  56. package/cjs/svg-icons/src/exclam-fill.d.ts +3 -12
  57. package/cjs/svg-icons/src/exclam.d.ts +3 -12
  58. package/cjs/svg-icons/src/exclam.js +1 -1
  59. package/cjs/svg-icons/src/help.d.ts +3 -12
  60. package/cjs/svg-icons/src/help.js +1 -1
  61. package/cjs/svg-icons/src/info-circle.d.ts +3 -12
  62. package/cjs/svg-icons/src/info-circle.js +1 -1
  63. package/cjs/svg-icons/src/info-fill.d.ts +3 -12
  64. package/cjs/svg-icons/src/loading.d.ts +3 -12
  65. package/cjs/svg-icons/src/loading.js +1 -1
  66. package/cjs/svg-icons/src/more-dot-circle-horizontal.d.ts +3 -12
  67. package/cjs/svg-icons/src/more-dot-circle-horizontal.js +1 -1
  68. package/cjs/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +3 -12
  69. package/cjs/svg-icons/src/more-dot-circle-outline-horizontal.js +1 -1
  70. package/cjs/svg-icons/src/more-dot-circle-outline-vertical.d.ts +3 -12
  71. package/cjs/svg-icons/src/more-dot-circle-outline-vertical.js +1 -1
  72. package/cjs/svg-icons/src/more-dot-circle.d.ts +3 -12
  73. package/cjs/svg-icons/src/more-dot-circle.js +1 -1
  74. package/cjs/svg-icons/src/more-dot-square-horizontal.d.ts +3 -12
  75. package/cjs/svg-icons/src/more-dot-square-horizontal.js +1 -1
  76. package/cjs/svg-icons/src/more-dot-square.d.ts +3 -12
  77. package/cjs/svg-icons/src/more-dot-square.js +1 -1
  78. package/cjs/svg-icons/src/more-line.d.ts +3 -12
  79. package/cjs/svg-icons/src/more-line.js +1 -1
  80. package/cjs/svg-icons/src/search-bold.d.ts +3 -12
  81. package/cjs/svg-icons/src/search-bold.js +1 -1
  82. package/cjs/svg-icons/src/search.d.ts +3 -12
  83. package/cjs/svg-icons/src/search.js +1 -1
  84. package/cjs/svg-icons/src/star-fill.d.ts +3 -12
  85. package/cjs/svg-icons/src/star.d.ts +3 -12
  86. package/cjs/svg-icons/src/star.js +1 -1
  87. package/cjs/svg-icons/types.d.ts +1 -1
  88. package/cjs/utils/index.js +1 -1
  89. package/cjs/utils/util.d.ts +86 -69
  90. package/cjs/utils/util.js +1 -1
  91. package/dist/index.css +1 -1
  92. package/dist/index.umd.js +9 -9
  93. package/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs +23 -12
  94. package/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +49 -45
  95. package/es/components/button/src/types.d.ts +1 -0
  96. package/es/components/neutral-color/src/neutral-color.vue_vue_type_script_setup_true_lang.mjs +8 -8
  97. package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +4 -3
  98. package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +2 -1
  99. package/es/components/primary-color/src/primary-color.vue_vue_type_script_setup_true_lang.mjs +7 -7
  100. package/es/components/secondary-color/src/secondary-color.vue_vue_type_script_setup_true_lang.mjs +13 -13
  101. package/es/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.mjs +2 -2
  102. package/es/components/svg-icon/src/types.d.ts +1 -1
  103. package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +10 -4
  104. package/es/components/tooltip/src/types.d.ts +4 -2
  105. package/es/components/tooltip/src/use-tooltip.d.ts +1 -1
  106. package/es/components/tooltip/src/use-tooltip.mjs +34 -32
  107. package/es/composables/use-namespace/index.d.ts +2 -0
  108. package/es/composables/use-namespace/index.mjs +2 -0
  109. package/es/index.d.ts +105 -420
  110. package/es/index.mjs +71 -71
  111. package/es/svg-icons/create-icon.d.ts +3 -12
  112. package/es/svg-icons/create-icon.mjs +3 -7
  113. package/es/svg-icons/src/arrow-backward.d.ts +3 -12
  114. package/es/svg-icons/src/arrow-backward.mjs +3 -1
  115. package/es/svg-icons/src/arrow-down.d.ts +3 -12
  116. package/es/svg-icons/src/arrow-down.mjs +3 -1
  117. package/es/svg-icons/src/arrow-downward.d.ts +3 -12
  118. package/es/svg-icons/src/arrow-downward.mjs +3 -1
  119. package/es/svg-icons/src/arrow-forward.d.ts +3 -12
  120. package/es/svg-icons/src/arrow-forward.mjs +3 -1
  121. package/es/svg-icons/src/arrow-left.d.ts +3 -12
  122. package/es/svg-icons/src/arrow-left.mjs +3 -1
  123. package/es/svg-icons/src/arrow-right.d.ts +3 -12
  124. package/es/svg-icons/src/arrow-right.mjs +3 -1
  125. package/es/svg-icons/src/arrow-up.d.ts +3 -12
  126. package/es/svg-icons/src/arrow-up.mjs +3 -1
  127. package/es/svg-icons/src/arrow-upward.d.ts +3 -12
  128. package/es/svg-icons/src/arrow-upward.mjs +3 -1
  129. package/es/svg-icons/src/check-circle.d.ts +3 -12
  130. package/es/svg-icons/src/check-circle.mjs +3 -1
  131. package/es/svg-icons/src/check-fill.d.ts +3 -12
  132. package/es/svg-icons/src/check.d.ts +3 -12
  133. package/es/svg-icons/src/check.mjs +3 -1
  134. package/es/svg-icons/src/close-circle.d.ts +3 -12
  135. package/es/svg-icons/src/close-circle.mjs +3 -1
  136. package/es/svg-icons/src/close-fill.d.ts +3 -12
  137. package/es/svg-icons/src/close-short.d.ts +3 -12
  138. package/es/svg-icons/src/close-short.mjs +3 -1
  139. package/es/svg-icons/src/close.d.ts +3 -12
  140. package/es/svg-icons/src/close.mjs +3 -1
  141. package/es/svg-icons/src/copy-closure.d.ts +3 -12
  142. package/es/svg-icons/src/copy-closure.mjs +3 -1
  143. package/es/svg-icons/src/copy.d.ts +3 -12
  144. package/es/svg-icons/src/copy.mjs +3 -1
  145. package/es/svg-icons/src/delete.d.ts +3 -12
  146. package/es/svg-icons/src/delete.mjs +3 -1
  147. package/es/svg-icons/src/exclam-fill.d.ts +3 -12
  148. package/es/svg-icons/src/exclam.d.ts +3 -12
  149. package/es/svg-icons/src/exclam.mjs +3 -1
  150. package/es/svg-icons/src/help.d.ts +3 -12
  151. package/es/svg-icons/src/help.mjs +3 -1
  152. package/es/svg-icons/src/info-circle.d.ts +3 -12
  153. package/es/svg-icons/src/info-circle.mjs +3 -1
  154. package/es/svg-icons/src/info-fill.d.ts +3 -12
  155. package/es/svg-icons/src/loading.d.ts +3 -12
  156. package/es/svg-icons/src/loading.mjs +3 -1
  157. package/es/svg-icons/src/more-dot-circle-horizontal.d.ts +3 -12
  158. package/es/svg-icons/src/more-dot-circle-horizontal.mjs +3 -1
  159. package/es/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +3 -12
  160. package/es/svg-icons/src/more-dot-circle-outline-horizontal.mjs +3 -1
  161. package/es/svg-icons/src/more-dot-circle-outline-vertical.d.ts +3 -12
  162. package/es/svg-icons/src/more-dot-circle-outline-vertical.mjs +3 -1
  163. package/es/svg-icons/src/more-dot-circle.d.ts +3 -12
  164. package/es/svg-icons/src/more-dot-circle.mjs +3 -1
  165. package/es/svg-icons/src/more-dot-square-horizontal.d.ts +3 -12
  166. package/es/svg-icons/src/more-dot-square-horizontal.mjs +3 -1
  167. package/es/svg-icons/src/more-dot-square.d.ts +3 -12
  168. package/es/svg-icons/src/more-dot-square.mjs +3 -1
  169. package/es/svg-icons/src/more-line.d.ts +3 -12
  170. package/es/svg-icons/src/more-line.mjs +3 -1
  171. package/es/svg-icons/src/search-bold.d.ts +3 -12
  172. package/es/svg-icons/src/search-bold.mjs +3 -1
  173. package/es/svg-icons/src/search.d.ts +3 -12
  174. package/es/svg-icons/src/search.mjs +3 -1
  175. package/es/svg-icons/src/star-fill.d.ts +3 -12
  176. package/es/svg-icons/src/star.d.ts +3 -12
  177. package/es/svg-icons/src/star.mjs +3 -1
  178. package/es/svg-icons/types.d.ts +1 -1
  179. package/es/utils/index.mjs +2 -2
  180. package/es/utils/util.d.ts +86 -69
  181. package/es/utils/util.mjs +39 -34
  182. package/package.json +2 -2
  183. package/theme-chalk/base.css +1 -1
  184. package/theme-chalk/index.css +1 -1
  185. package/theme-chalk/re-button-group.css +1 -1
  186. package/theme-chalk/re-button.css +1 -1
  187. package/theme-chalk/re-popconfirm.css +1 -1
  188. package/theme-chalk/re-popover.css +1 -1
  189. package/theme-chalk/re-tooltip.css +1 -1
  190. package/theme-chalk/root-vars.css +1 -1
  191. package/theme-chalk/src/button-group.scss +32 -8
  192. package/theme-chalk/src/css-vars/_colors.scss +18 -2
  193. package/theme-chalk/src/function/index.scss +26 -22
  194. package/theme-chalk/src/message.scss +0 -1
  195. package/theme-chalk/src/mixins/_button.scss +1 -1
  196. package/theme-chalk/src/popconfirm.scss +16 -0
  197. package/theme-chalk/src/popover.scss +16 -0
  198. package/theme-chalk/src/tooltip.scss +16 -10
@@ -1,16 +1,16 @@
1
1
  import { _buttonGroupProps as e, buttonSizes as t, buttonTypes as n } from "./constants.mjs";
2
2
  import { useNamespace as r } from "../../../composables/use-namespace/index.mjs";
3
3
  import "../../../composables/index.mjs";
4
- import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, unref as g, useTemplateRef as _ } from "vue";
5
- import { computedAsync as v } from "@vueuse/core";
6
- import { Loading as y, getAsyncIcon as b } from "@rappel-ui/svg-icons";
4
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, inject as u, normalizeClass as d, openBlock as f, renderSlot as p, resolveDynamicComponent as m, unref as h, useTemplateRef as g } from "vue";
5
+ import { computedAsync as _ } from "@vueuse/core";
6
+ import { Loading as v, getAsyncIcon as y } from "@rappel-ui/svg-icons";
7
7
  //#region packages/components/button/src/button.vue?vue&type=script&setup=true&lang.ts
8
- var x = [
8
+ var b = [
9
9
  "type",
10
10
  "disabled",
11
11
  "autofocus",
12
12
  "aria-disabled"
13
- ], S = l({
13
+ ], x = l({
14
14
  name: "ReButton",
15
15
  __name: "button",
16
16
  props: {
@@ -41,7 +41,7 @@ var x = [
41
41
  type: Boolean,
42
42
  default: () => void 0
43
43
  },
44
- loadingIcon: { default: () => y },
44
+ loadingIcon: { default: () => v },
45
45
  text: {
46
46
  type: Boolean,
47
47
  default: () => void 0
@@ -67,73 +67,77 @@ var x = [
67
67
  nativeType: { default: "button" }
68
68
  },
69
69
  emits: ["click"],
70
- setup(l, { expose: y, emit: S }) {
71
- let C = S, { n: w, nm: T, ns: E, is: D } = r("button"), O = u(e, null), k = a(() => {
70
+ setup(l, { expose: v, emit: x }) {
71
+ let S = x, { n: C, nm: w, ns: T, is: E, has: D } = r("button"), O = u(e, null), k = a(() => {
72
72
  var e;
73
73
  return l.type || (O == null || (e = O.type) == null ? void 0 : e.value) || "";
74
74
  }), A = a(() => {
75
75
  var e;
76
76
  return l.size || (O == null || (e = O.size) == null ? void 0 : e.value) || "";
77
- }), j = a(() => [
78
- w(),
79
- k.value && n.includes(k.value) ? T(k.value) : "",
80
- A.value && t.includes(A.value) ? T(A.value) : "",
81
- D("text", l.text),
82
- D("text-padding", l.text && l.padding),
83
- D("text-bg", l.text && l.bg),
84
- D("link", l.link),
85
- D("plain", l.plain),
86
- D("round", l.round),
87
- D("circle", l.circle),
88
- D("dashed", l.dashed),
89
- D("loading", l.loading),
90
- D("disabled", l.disabled)
91
- ]), M = v(async () => await b(l.loadingIcon)), N = v(async () => await b(l.icon));
92
- function P(e) {
77
+ }), j = a(() => {
78
+ var e;
79
+ return (O == null || (e = O.gap) == null ? void 0 : e.value) || "";
80
+ }), M = a(() => [
81
+ C(),
82
+ k.value && n.includes(k.value) ? w(k.value) : "",
83
+ A.value && t.includes(A.value) ? w(A.value) : "",
84
+ E("text", l.text),
85
+ E("text-padding", l.text && l.padding),
86
+ E("text-bg", l.text && l.bg),
87
+ E("link", l.link),
88
+ E("plain", l.plain),
89
+ E("round", l.round),
90
+ E("circle", l.circle),
91
+ E("dashed", l.dashed),
92
+ E("loading", l.loading),
93
+ E("disabled", l.disabled),
94
+ D("group-gap", !!j.value)
95
+ ]), N = _(async () => await y(l.loadingIcon)), P = _(async () => await y(l.icon));
96
+ function F(e) {
93
97
  if (l.disabled || l.loading) {
94
98
  e.stopPropagation();
95
99
  return;
96
100
  }
97
- C("click", e);
101
+ S("click", e);
98
102
  }
99
- let F = _("ref");
100
- return y({ ref: F }), (e, t) => {
103
+ let I = g("ref");
104
+ return v({ ref: I }), (e, t) => {
101
105
  var n;
102
- return p(), c("button", d(e.$attrs, {
106
+ return f(), c("button", {
103
107
  ref_key: "ref",
104
- ref: F,
105
- class: j.value,
108
+ ref: I,
109
+ class: d(M.value),
106
110
  type: l.nativeType,
107
111
  disabled: l.disabled || l.loading,
108
112
  autofocus: l.autofocus,
109
113
  "aria-disabled": l.disabled,
110
- onClick: P
111
- }), [
112
- m(e.$slots, "loading", {}, () => [l.loading ? (p(), c(i, { key: 0 }, [typeof g(M) == "string" ? (p(), c("i", {
114
+ onClick: F
115
+ }, [
116
+ p(e.$slots, "loading", {}, () => [l.loading ? (f(), c(i, { key: 0 }, [typeof h(N) == "string" ? (f(), c("i", {
113
117
  key: 0,
114
- class: f([g(E)("loading"), g(M)]),
118
+ class: d([h(T)("loading"), h(N)]),
115
119
  "aria-hidden": "true"
116
- }, null, 2)) : (p(), o(h(g(M)), {
120
+ }, null, 2)) : (f(), o(m(h(N)), {
117
121
  key: 1,
118
- class: f([g(E)("loading")]),
122
+ class: d([h(T)("loading")]),
119
123
  "aria-hidden": "true"
120
124
  }, null, 8, ["class"]))], 64)) : s("", !0)]),
121
- m(e.$slots, "icon", {}, () => [l.icon ? (p(), c(i, { key: 0 }, [typeof g(N) == "string" ? (p(), c("i", {
125
+ p(e.$slots, "icon", {}, () => [l.icon ? (f(), c(i, { key: 0 }, [typeof h(P) == "string" ? (f(), c("i", {
122
126
  key: 0,
123
- class: f([g(E)("icon"), g(N)]),
127
+ class: d([h(T)("icon"), h(P)]),
124
128
  "aria-hidden": "true"
125
- }, null, 2)) : (p(), o(h(g(N)), {
129
+ }, null, 2)) : (f(), o(m(h(P)), {
126
130
  key: 1,
127
- class: f([g(E)("icon")]),
131
+ class: d([h(T)("icon")]),
128
132
  "aria-hidden": "true"
129
133
  }, null, 8, ["class"]))], 64)) : s("", !0)]),
130
- (n = e.$slots) != null && n.default ? (p(), c("span", {
134
+ (n = e.$slots) != null && n.default ? (f(), c("span", {
131
135
  key: 0,
132
- class: f([g(E)("content")])
133
- }, [m(e.$slots, "default")], 2)) : s("", !0)
134
- ], 16, x);
136
+ class: d([h(T)("content")])
137
+ }, [p(e.$slots, "default")], 2)) : s("", !0)
138
+ ], 10, b);
135
139
  };
136
140
  }
137
141
  });
138
142
  //#endregion
139
- export { S as default };
143
+ export { x as default };
@@ -24,6 +24,7 @@ export interface ButtonProps {
24
24
  export interface ButtonGroupProps {
25
25
  size?: ButtonProps['size'];
26
26
  type?: ButtonProps['type'];
27
+ gap?: string | number;
27
28
  direction?: 'horizontal' | 'vertical';
28
29
  }
29
30
  export interface ButtonEmits {
@@ -30,7 +30,7 @@ var y = c({
30
30
  color: s == null ? void 0 : s.toString().toUpperCase(),
31
31
  text: u,
32
32
  extraclass: l === "transparent" ? x.value ? b("grids is-dark") : b("grids") : void 0,
33
- bordercolor: l === "blank" ? n(Object.values(t("re-color-primary-base"))[0], .4, x.value) : void 0
33
+ bordercolor: l === "blank" ? n(Object.values(t("re-color-primary-base"))[0], Object.values(t("re-color-theme-bgcolor"))[0], .4) : void 0
34
34
  };
35
35
  }
36
36
  return a[o.replace(`--${r}-`, "")] = c, a;
@@ -44,7 +44,7 @@ var y = c({
44
44
  ]) => {
45
45
  let r = S(e, t);
46
46
  return n.reduce((e, t) => (e.push(r[t]), e), []);
47
- }, w = m([]), T = (e) => {
47
+ }, w = m([]), T = () => {
48
48
  l(() => {
49
49
  w.value = [
50
50
  { shades: C("re-color-text", "text") },
@@ -76,17 +76,17 @@ var y = c({
76
76
  .3,
77
77
  .2,
78
78
  .1
79
- ].map((r) => ({
80
- color: n(Object.values(t("re-color-primary-base"))[0], r, e),
81
- text: `Primary Alpha ${r * 100}% Fill`
79
+ ].map((e) => ({
80
+ color: n(Object.values(t("re-color-primary-base"))[0], Object.values(t("re-color-theme-bgcolor"))[0], e),
81
+ text: `Primary Alpha ${e * 100}% Fill`
82
82
  })) }
83
83
  ];
84
84
  });
85
85
  };
86
- return v(x, (e) => {
87
- T(e);
86
+ return v(x, () => {
87
+ T();
88
88
  }), f(() => {
89
- T(x.value);
89
+ T();
90
90
  }), (e, t) => (p(), o("div", { class: u([_(y)("neutral")]) }, [(p(!0), o(a, null, h(w.value, (e) => (p(), o("div", {
91
91
  key: e.shades[0].color,
92
92
  class: u([_(b)("group")])
@@ -39,6 +39,7 @@ var D = ["innerHTML"], O = d({
39
39
  type: Boolean,
40
40
  default: () => void 0
41
41
  },
42
+ clickToToggle: { type: Boolean },
42
43
  showDelay: { default: 0 },
43
44
  hideDelay: { default: 200 },
44
45
  showArrow: {
@@ -91,7 +92,7 @@ var D = ["innerHTML"], O = d({
91
92
  type: Boolean,
92
93
  default: !0
93
94
  },
94
- cssDuration: { default: 0 },
95
+ cssDuration: { default: 450 },
95
96
  arrowSize: { default: 8 },
96
97
  arrowOffset: { default: 4 },
97
98
  arrowOptions: { default: () => void 0 },
@@ -207,14 +208,14 @@ var D = ["innerHTML"], O = d({
207
208
  class: m([b(A)("icon")]),
208
209
  "aria-hidden": "true"
209
210
  }, 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)]),
210
- g(e.$slots, "content", { content: d.content }, () => [d.isHtml ? (h(), s("div", {
211
+ g(e.$slots, "content", { content: d.content }, () => [d.content ? (h(), s(r, { key: 0 }, [d.isHtml ? (h(), s("div", {
211
212
  key: 0,
212
213
  class: m([b(A)("content")]),
213
214
  innerHTML: d.content
214
215
  }, null, 10, D)) : (h(), s("div", {
215
216
  key: 1,
216
217
  class: m([b(A)("content")])
217
- }, y(d.content), 3))]),
218
+ }, y(d.content), 3))], 64)) : o("", !0)]),
218
219
  g(e.$slots, "footer", {
219
220
  cancel: K,
220
221
  cancelSize: d.cancelSize,
@@ -26,6 +26,7 @@ var b = ["innerHTML"], x = s({
26
26
  type: Boolean,
27
27
  default: () => void 0
28
28
  },
29
+ clickToToggle: { type: Boolean },
29
30
  showDelay: { default: 0 },
30
31
  hideDelay: { default: 200 },
31
32
  showArrow: {
@@ -78,7 +79,7 @@ var b = ["innerHTML"], x = s({
78
79
  type: Boolean,
79
80
  default: !0
80
81
  },
81
- cssDuration: { default: 0 },
82
+ cssDuration: { default: 450 },
82
83
  arrowSize: { default: 8 },
83
84
  arrowOffset: { default: 4 },
84
85
  arrowOptions: { default: () => void 0 },
@@ -10,19 +10,19 @@ var v = ["innerHTML"], y = s({
10
10
  __name: "primary-color",
11
11
  props: { codeHtml: { default: "" } },
12
12
  setup(s) {
13
- let { nm: y, ns: b } = n("colors"), { isDark: x } = r(), S = p([]), C = (n) => {
14
- let r = Object.values(t("--re-color-primary-base"))[0];
13
+ let { nm: y, ns: b } = n("colors"), { isDark: x } = r(), S = p([]), C = () => {
14
+ let n = Object.values(t("--re-color-primary-base"))[0], r = Object.values(t("--re-color-theme-bgcolor"))[0], i = Object.values(t("--re-color-theme-reverse-bgcolor"))[0];
15
15
  S.value = [{
16
- base: r,
17
- shades: e(r, n)
16
+ base: n,
17
+ shades: e(n, r, x.value ? r : i)
18
18
  }];
19
19
  };
20
- return _(x, (e) => {
20
+ return _(x, () => {
21
21
  c(() => {
22
- C(e);
22
+ C();
23
23
  });
24
24
  }), d(() => {
25
- C(x.value);
25
+ C();
26
26
  }), (e, t) => (f(!0), a(i, null, m(S.value, (e) => (f(), a("div", {
27
27
  key: e.base,
28
28
  class: l([g(y)("primary")])
@@ -15,41 +15,41 @@ var y = ["innerHTML"], b = c({
15
15
  infoCodeHtml: { default: "" }
16
16
  },
17
17
  setup(c) {
18
- let { nm: b, ns: x } = n("colors"), { isDark: S } = r(), C = m([]), w = (n) => {
19
- let r = Object.values(t("re-color-success-base"))[0], i = Object.values(t("re-color-warning-base"))[0], o = Object.values(t("re-color-danger-base"))[0], s = Object.values(t("re-color-info-base"))[0];
18
+ let { nm: b, ns: x } = n("colors"), { isDark: S } = r(), C = m([]), w = () => {
19
+ let n = Object.values(t("re-color-success-base"))[0], r = Object.values(t("re-color-warning-base"))[0], i = Object.values(t("re-color-danger-base"))[0], o = Object.values(t("re-color-info-base"))[0], s = Object.values(t("--re-color-theme-bgcolor"))[0], l = Object.values(t("--re-color-theme-reverse-bgcolor"))[0];
20
20
  C.value = [
21
21
  {
22
- base: r,
22
+ base: n,
23
23
  text: "Success",
24
- shades: e(r, n),
24
+ shades: e(n, s, S.value ? s : l),
25
25
  codeHtml: a(() => c.successCodeHtml)
26
26
  },
27
27
  {
28
- base: i,
28
+ base: r,
29
29
  text: "Warning ",
30
- shades: e(i, n),
30
+ shades: e(r, s, S.value ? s : l),
31
31
  codeHtml: a(() => c.warningCodeHtml)
32
32
  },
33
33
  {
34
- base: o,
34
+ base: i,
35
35
  text: "Danger/Error",
36
- shades: e(o, n),
36
+ shades: e(i, s, S.value ? s : l),
37
37
  codeHtml: a(() => c.dangerCodeHtml)
38
38
  },
39
39
  {
40
- base: s,
40
+ base: o,
41
41
  text: "Info",
42
- shades: e(s, n),
42
+ shades: e(o, s, S.value ? s : l),
43
43
  codeHtml: a(() => c.infoCodeHtml)
44
44
  }
45
45
  ];
46
46
  };
47
- return v(S, (e) => {
47
+ return v(S, () => {
48
48
  l(() => {
49
- w(e);
49
+ w();
50
50
  });
51
51
  }), f(() => {
52
- w(S.value);
52
+ w();
53
53
  }), (e, t) => (p(), o("div", { class: u([_(b)("secondary")]) }, [(p(!0), o(i, null, h(C.value, (e) => (p(), o("div", {
54
54
  key: e.base,
55
55
  class: u([_(x)("panel")])
@@ -22,7 +22,7 @@ var l = [
22
22
  size: { default: 16 },
23
23
  fill: { default: () => void 0 },
24
24
  fillRule: { default: () => void 0 },
25
- color: { default: "currentColor" },
25
+ stroke: { default: () => void 0 },
26
26
  spin: {
27
27
  type: Boolean,
28
28
  default: !1
@@ -39,7 +39,7 @@ var l = [
39
39
  "stroke-linecap": "round",
40
40
  "stroke-linejoin": "round",
41
41
  "stroke-width": "2",
42
- stroke: a.fill ? void 0 : a.color,
42
+ stroke: a.stroke,
43
43
  xmlns: "http://www.w3.org/2000/svg",
44
44
  "aria-hidden": "true"
45
45
  }, [i("path", {
@@ -4,6 +4,6 @@ export interface SvgIconProps {
4
4
  size?: string | number;
5
5
  fill?: string;
6
6
  fillRule?: 'inherit' | 'nonzero' | 'evenodd';
7
- color?: string;
7
+ stroke?: string;
8
8
  spin?: boolean;
9
9
  }
@@ -32,6 +32,10 @@ var D = ["innerHTML"], O = ["data-placement"], k = u({
32
32
  type: Boolean,
33
33
  default: () => void 0
34
34
  },
35
+ clickToToggle: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
35
39
  showDelay: { default: 0 },
36
40
  hideDelay: { default: 200 },
37
41
  showArrow: {
@@ -84,7 +88,7 @@ var D = ["innerHTML"], O = ["data-placement"], k = u({
84
88
  type: Boolean,
85
89
  default: !0
86
90
  },
87
- cssDuration: { default: 0 },
91
+ cssDuration: { default: 450 },
88
92
  arrowSize: { default: 8 },
89
93
  arrowOffset: { default: 4 },
90
94
  arrowOptions: { default: () => void 0 },
@@ -172,8 +176,9 @@ var D = ["innerHTML"], O = ["data-placement"], k = u({
172
176
  trigger: u.trigger,
173
177
  floatingRef: u.persistent ? W : void 0,
174
178
  open: J,
175
- showDelay: u.showDelay,
176
- hideDelay: u.hideDelay,
179
+ clickToToggle: u.clickToToggle,
180
+ showDelay: parseFloat(u.showDelay),
181
+ hideDelay: parseFloat(u.hideDelay),
177
182
  disabled: o(() => u.disabled)
178
183
  }), { scope: Z } = _e(), be = () => {
179
184
  ge(), Z == null || Z.stop();
@@ -182,7 +187,8 @@ var D = ["innerHTML"], O = ["data-placement"], k = u({
182
187
  height: e(u.height),
183
188
  maxWidth: e(u.maxWidth),
184
189
  maxHeight: e(u.maxHeight),
185
- zIndex: $.value
190
+ zIndex: $.value,
191
+ transition: `opacity ${u.cssDuration}ms ease, visibility ${u.cssDuration}ms ease`
186
192
  }]), $ = _(0), { zIndex: Se } = n(), { stop: Ce } = le(J, (e) => {
187
193
  e && ($.value = u.zIndex || Se.value);
188
194
  });
@@ -14,8 +14,9 @@ export interface TooltipProps {
14
14
  maxHeight?: number | string;
15
15
  trigger?: Trigger;
16
16
  disabled?: boolean;
17
- showDelay?: number;
18
- hideDelay?: number;
17
+ clickToToggle?: boolean;
18
+ showDelay?: number | string;
19
+ hideDelay?: number | string;
19
20
  showArrow?: boolean;
20
21
  floatingClass?: MaybeClass;
21
22
  floatingStyle?: StyleValue;
@@ -57,6 +58,7 @@ export interface TriggerOptions {
57
58
  trigger: string;
58
59
  floatingRef?: ShallowRef<HTMLElement | null>;
59
60
  open: ShallowRef<boolean>;
61
+ clickToToggle?: boolean;
60
62
  showDelay?: number;
61
63
  hideDelay?: number;
62
64
  disabled?: ShallowRef<boolean | undefined> | ComputedRef<boolean | undefined>;
@@ -1,6 +1,6 @@
1
1
  import { EffectScope } from 'vue';
2
2
  import { TriggerOptions } from './types';
3
- export declare function useTooltip({ triggerRef, isExternal, externalActiveRef, externalRef, trigger, floatingRef, open, showDelay, hideDelay, disabled }: TriggerOptions): {
3
+ export declare function useTooltip({ triggerRef, isExternal, externalActiveRef, externalRef, trigger, floatingRef, open, clickToToggle, showDelay, hideDelay, disabled }: TriggerOptions): {
4
4
  start: () => void;
5
5
  stop: () => void;
6
6
  setup: () => {
@@ -1,96 +1,98 @@
1
1
  import { effectScope as e, unref as t, watch as n } from "vue";
2
2
  import { onClickOutside as r, useDebounceFn as i, useElementHover as a, useEventListener as o } from "@vueuse/core";
3
3
  //#region packages/components/tooltip/src/use-tooltip.ts
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 }) {
5
- let _ = [], v = i(() => {
4
+ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u, trigger: d, floatingRef: f, open: p, clickToToggle: m, showDelay: h = 0, hideDelay: g = 0, disabled: _ }) {
5
+ let v = [], y = i(() => {
6
6
  p.value = !0;
7
- }, c ? 0 : m), y = i((e) => {
7
+ }, c ? 0 : h), b = i((e) => {
8
8
  p.value = !1, typeof e == "function" && e();
9
- }, c ? 0 : h), b = () => {
9
+ }, c ? 0 : g), x = () => {
10
10
  if (s.value) switch (d) {
11
11
  case "click": {
12
- let e = o(s, "click", v), t = a(f, {
12
+ let e = o(s, "click", () => {
13
+ m && p.value ? b() : y();
14
+ }), t = a(f, {
13
15
  delayEnter: 0,
14
16
  delayLeave: 0,
15
17
  triggerOnRemoval: !0
16
18
  }), n = r(s, () => {
17
- !t.value && y();
19
+ !t.value && b();
18
20
  });
19
- _.push(e, n);
21
+ v.push(e, n);
20
22
  break;
21
23
  }
22
24
  case "hover": {
23
25
  let e = {
24
- delayEnter: m,
25
- delayLeave: h,
26
+ delayEnter: h,
27
+ delayLeave: g,
26
28
  triggerOnRemoval: !0
27
29
  }, t = a(s, e), r = a(f, e);
28
30
  c && p.value && (t.value = !0);
29
31
  let { stop: i } = n(() => [t.value, r.value], ([e, t]) => {
30
32
  p.value = e || t;
31
33
  });
32
- _.push(i);
34
+ v.push(i);
33
35
  break;
34
36
  }
35
37
  case "focus": {
36
- let e = o(s, "focus", v), t = a(f, {
38
+ let e = o(s, "focus", y), t = a(f, {
37
39
  delayEnter: 0,
38
40
  delayLeave: 0,
39
41
  triggerOnRemoval: !0
40
- }), n = o(s, "blur", () => !t.value && y()), i = r(s, () => !t.value && y());
41
- _.push(e, n, i);
42
+ }), n = o(s, "blur", () => !t.value && b()), i = r(s, () => !t.value && b());
43
+ v.push(e, n, i);
42
44
  break;
43
45
  }
44
46
  case "contextmenu": {
45
47
  let e = o(s, "contextmenu", (e) => {
46
- e.preventDefault(), v();
48
+ e.preventDefault(), y();
47
49
  }), t = a(f, {
48
50
  delayEnter: 0,
49
51
  delayLeave: 0,
50
52
  triggerOnRemoval: !0
51
- }), n = r(s, () => !t.value && y());
52
- _.push(e, n);
53
+ }), n = r(s, () => !t.value && b());
54
+ v.push(e, n);
53
55
  break;
54
56
  }
55
57
  }
56
- }, x = () => {
57
- _.forEach((e) => e());
58
58
  }, S = () => {
59
- p.value = !1, x();
59
+ v.forEach((e) => e());
60
+ }, C = () => {
61
+ p.value = !1, S();
60
62
  };
61
63
  return c && n(() => u == null ? void 0 : u.value, (e) => {
62
64
  if (!(["click", "contextmenu"].includes(d) && l.value === e)) {
63
65
  if (!l.value || !p.value) {
64
- l.value = e, v();
66
+ l.value = e, y();
65
67
  return;
66
68
  }
67
- y(() => {
68
- l.value = e, v();
69
+ b(() => {
70
+ l.value = e, y();
69
71
  });
70
72
  }
71
73
  }), {
72
- start: b,
73
- stop: S,
74
+ start: x,
75
+ stop: C,
74
76
  setup: () => {
75
77
  let r = e();
76
78
  return r.run(() => {
77
79
  if (p.value) {
78
- x();
80
+ S();
79
81
  return;
80
82
  }
81
- if (t(g)) {
82
- S();
83
+ if (t(_)) {
84
+ C();
83
85
  return;
84
86
  }
85
- b(), n(() => t(g), (e) => {
86
- e ? S() : b();
87
+ x(), n(() => t(_), (e) => {
88
+ e ? C() : x();
87
89
  }), n(s, (e) => {
88
- e && (x(), b());
90
+ e && (S(), x());
89
91
  });
90
92
  }), { scope: r };
91
93
  },
92
- delayHide: y,
93
- delayShow: v
94
+ delayHide: b,
95
+ delayShow: y
94
96
  };
95
97
  }
96
98
  //#endregion
@@ -2,6 +2,8 @@ export declare function useNamespace(compName: string): {
2
2
  libName: string;
3
3
  prefix: string;
4
4
  statePrefix: string;
5
+ hasPrefix: string;
6
+ has: (feature: string, bool?: boolean | undefined) => string;
5
7
  n: (name?: string) => string;
6
8
  ng: (groupName: string) => string;
7
9
  nm: (modifier: string) => string;
@@ -8,6 +8,8 @@ function e(e) {
8
8
  libName: "rappel-ui",
9
9
  prefix: "re",
10
10
  statePrefix: "is",
11
+ hasPrefix: "has",
12
+ has: (e, t = void 0) => t ? `has-${e}` : "",
11
13
  n: (e = "") => t(e),
12
14
  ng: (e) => t("", e),
13
15
  nm: (e) => t("", "", e),