@oneb/ui-vue 0.3.31 → 0.4.0

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 (235) hide show
  1. package/dist/ChevronLeftIcon-7505e081.cjs +1 -0
  2. package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
  3. package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
  4. package/dist/ChevronRightIcon-b0585768.js +20 -0
  5. package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
  6. package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
  7. package/dist/InformationCircleIcon-2f6097a0.js +20 -0
  8. package/dist/InformationCircleIcon-d6b67d5d.cjs +1 -0
  9. package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
  10. package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
  11. package/dist/{NoSymbolIcon-e58a9aee.js → NoSymbolIcon-b3470a26.js} +8 -25
  12. package/dist/{NoSymbolIcon-5d326416.cjs → NoSymbolIcon-e84375bb.cjs} +1 -1
  13. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
  14. package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
  15. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
  16. package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
  17. package/dist/OneHelpMenu-6ec63535.cjs +1 -0
  18. package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
  19. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
  20. package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
  21. package/dist/OneModal-02a9a173.js +189 -0
  22. package/dist/OneModal-0e92c039.cjs +1 -0
  23. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
  24. package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
  25. package/dist/SpinnerIcon-01be39fe.cjs +1 -0
  26. package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
  27. package/dist/button/index.cjs +1 -1
  28. package/dist/button/index.d.ts +1 -1
  29. package/dist/button/index.js +3 -4
  30. package/dist/checkbox/checkbox.d.ts +5 -0
  31. package/dist/checkbox/index.cjs +1 -1
  32. package/dist/checkbox/index.js +40 -34
  33. package/dist/chips/OneChips.vue.d.ts +2 -0
  34. package/dist/chips/chips.d.ts +25 -0
  35. package/dist/chips/index.cjs +1 -0
  36. package/dist/chips/index.d.ts +3 -0
  37. package/dist/chips/index.js +62 -0
  38. package/dist/clipboard-494e1513.cjs +1 -0
  39. package/dist/clipboard-733b79a1.js +22 -0
  40. package/dist/common/OneDetailsList.vue.d.ts +2 -0
  41. package/dist/common/OneDetailsRow.vue.d.ts +2 -0
  42. package/dist/common/index.cjs +1 -1
  43. package/dist/common/index.d.ts +2 -0
  44. package/dist/common/index.js +68 -16
  45. package/dist/composables/index.cjs +1 -0
  46. package/dist/composables/index.d.ts +18 -0
  47. package/dist/composables/index.js +91 -0
  48. package/dist/composables/useAsyncMethod.d.ts +17 -0
  49. package/dist/composables/useAsyncSelect.d.ts +26 -0
  50. package/dist/composables/useConfirm.d.ts +27 -0
  51. package/dist/composables/useCursorList.d.ts +42 -0
  52. package/dist/composables/useDebouncedRef.d.ts +6 -0
  53. package/dist/composables/useFileUpload.d.ts +21 -0
  54. package/dist/composables/useFormSubmit.d.ts +23 -0
  55. package/dist/composables/useIsMobile.d.ts +8 -0
  56. package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
  57. package/dist/confirm/confirm.d.ts +10 -0
  58. package/dist/confirm/index.cjs +1 -0
  59. package/dist/confirm/index.d.ts +5 -0
  60. package/dist/confirm/index.js +59 -0
  61. package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
  62. package/dist/cursorList/index.cjs +1 -0
  63. package/dist/cursorList/index.d.ts +3 -0
  64. package/dist/cursorList/index.js +78 -0
  65. package/dist/dataTable/index.cjs +1 -1
  66. package/dist/dataTable/index.js +256 -301
  67. package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
  68. package/dist/dateTime/dateTime.d.ts +43 -0
  69. package/dist/dateTime/index.cjs +1 -0
  70. package/dist/dateTime/index.d.ts +3 -0
  71. package/dist/dateTime/index.js +66 -0
  72. package/dist/dropdown/index.cjs +1 -1
  73. package/dist/dropdown/index.js +302 -376
  74. package/dist/dropdown-5cb64ab7.cjs +1 -0
  75. package/dist/dropdown-c81fb945.js +101 -0
  76. package/dist/entityPicker/index.cjs +1 -1
  77. package/dist/entityPicker/index.js +57 -57
  78. package/dist/entityPicker/useEntityModal.d.ts +7 -3
  79. package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
  80. package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
  81. package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
  82. package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
  83. package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
  84. package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
  85. package/dist/errorsPage/errorsType.d.ts +5 -0
  86. package/dist/errorsPage/index.cjs +1 -1
  87. package/dist/errorsPage/index.d.ts +8 -0
  88. package/dist/errorsPage/index.js +557 -28
  89. package/dist/errorsPage/useCrashState.d.ts +10 -0
  90. package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
  91. package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
  92. package/dist/fileUpload/fileUpload.d.ts +17 -0
  93. package/dist/fileUpload/index.cjs +1 -0
  94. package/dist/fileUpload/index.d.ts +6 -0
  95. package/dist/fileUpload/index.js +228 -0
  96. package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
  97. package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
  98. package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
  99. package/dist/filterBuilder/filterBuilder.d.ts +17 -0
  100. package/dist/filterBuilder/index.cjs +1 -0
  101. package/dist/filterBuilder/index.d.ts +5 -0
  102. package/dist/filterBuilder/index.js +257 -0
  103. package/dist/form/form.d.ts +1 -1
  104. package/dist/form/index.cjs +1 -1
  105. package/dist/form/index.js +66 -574
  106. package/dist/i18n/index.cjs +1 -1
  107. package/dist/i18n/index.js +99 -15
  108. package/dist/index.cjs +1 -1
  109. package/dist/index.d.ts +18 -0
  110. package/dist/index.js +243 -104
  111. package/dist/indicators/OneStatCard.vue.d.ts +2 -0
  112. package/dist/indicators/index.cjs +1 -1
  113. package/dist/indicators/index.d.ts +1 -0
  114. package/dist/indicators/index.js +66 -29
  115. package/dist/infobox/index.cjs +1 -1
  116. package/dist/infobox/index.js +4 -3
  117. package/dist/label/index.cjs +1 -1
  118. package/dist/label/index.js +5 -5
  119. package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
  120. package/dist/layout/OneBackButton.vue.d.ts +2 -0
  121. package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
  122. package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
  123. package/dist/layout/OneGridLayout.vue.d.ts +2 -0
  124. package/dist/layout/index.cjs +1 -1
  125. package/dist/layout/index.d.ts +6 -1
  126. package/dist/layout/index.js +1057 -765
  127. package/dist/layout/layout.d.ts +11 -0
  128. package/dist/modal/OneModalHost.vue.d.ts +2 -0
  129. package/dist/modal/index.cjs +1 -1
  130. package/dist/modal/index.d.ts +3 -0
  131. package/dist/modal/index.js +84 -27
  132. package/dist/modal/modal.d.ts +9 -0
  133. package/dist/modal/useModalStack.d.ts +20 -0
  134. package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
  135. package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
  136. package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
  137. package/dist/notifications/index.cjs +1 -0
  138. package/dist/notifications/index.d.ts +7 -0
  139. package/dist/notifications/index.js +477 -0
  140. package/dist/notifications/notifications.d.ts +53 -0
  141. package/dist/notifications/useNotifyfeed.d.ts +32 -0
  142. package/dist/periodPicker/index.cjs +1 -1
  143. package/dist/periodPicker/index.js +126 -139
  144. package/dist/popover/OnePopover.vue.d.ts +2 -0
  145. package/dist/popover/index.cjs +1 -0
  146. package/dist/popover/index.d.ts +3 -0
  147. package/dist/popover/index.js +102 -0
  148. package/dist/popover/popover.d.ts +31 -0
  149. package/dist/progress/OneProgress.vue.d.ts +2 -0
  150. package/dist/progress/index.cjs +1 -0
  151. package/dist/progress/index.d.ts +3 -0
  152. package/dist/progress/index.js +74 -0
  153. package/dist/progress/progress.d.ts +32 -0
  154. package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
  155. package/dist/searchInput/index.cjs +1 -0
  156. package/dist/searchInput/index.d.ts +3 -0
  157. package/dist/searchInput/index.js +103 -0
  158. package/dist/searchInput/searchInput.d.ts +39 -0
  159. package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
  160. package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
  161. package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
  162. package/dist/settings/index.cjs +1 -0
  163. package/dist/settings/index.d.ts +4 -0
  164. package/dist/settings/index.js +116 -0
  165. package/dist/spinner/OneSpinner.vue.d.ts +2 -0
  166. package/dist/spinner/index.cjs +1 -0
  167. package/dist/spinner/index.d.ts +3 -0
  168. package/dist/spinner/index.js +30 -0
  169. package/dist/spinner/spinner.d.ts +10 -0
  170. package/dist/stageBadge/OneStageBadge.vue.d.ts +2 -0
  171. package/dist/stageBadge/index.cjs +1 -0
  172. package/dist/stageBadge/index.d.ts +3 -0
  173. package/dist/stageBadge/index.js +126 -0
  174. package/dist/stageBadge/stageBadge.d.ts +64 -0
  175. package/dist/stepper/OneStepper.vue.d.ts +2 -0
  176. package/dist/stepper/index.cjs +1 -0
  177. package/dist/stepper/index.d.ts +3 -0
  178. package/dist/stepper/index.js +53 -0
  179. package/dist/stepper/stepper.d.ts +24 -0
  180. package/dist/style.css +1 -1
  181. package/dist/switch/index.cjs +1 -1
  182. package/dist/switch/index.js +3 -4
  183. package/dist/tabs/OneTab.vue.d.ts +2 -0
  184. package/dist/tabs/OneTabs.vue.d.ts +2 -0
  185. package/dist/tabs/index.cjs +1 -0
  186. package/dist/tabs/index.d.ts +4 -0
  187. package/dist/tabs/index.js +64 -0
  188. package/dist/tabs/tabs.d.ts +7 -0
  189. package/dist/toast/OneMascotToast.vue.d.ts +2 -0
  190. package/dist/toast/RabbitIcon.vue.d.ts +2 -0
  191. package/dist/toast/index.cjs +1 -1
  192. package/dist/toast/index.d.ts +4 -0
  193. package/dist/toast/index.js +139 -73
  194. package/dist/toast/useMascotToast.d.ts +12 -0
  195. package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
  196. package/dist/tooltip/index.cjs +2 -2
  197. package/dist/tooltip/index.d.ts +1 -0
  198. package/dist/tooltip/index.js +33 -30
  199. package/dist/useConfirm-6344b49d.cjs +1 -0
  200. package/dist/useConfirm-74e99a5c.js +23 -0
  201. package/dist/useCursorList-5c1b57aa.js +62 -0
  202. package/dist/useCursorList-e1cb41e7.cjs +1 -0
  203. package/dist/useElementWidth-b36a7ce9.js +40 -0
  204. package/dist/useElementWidth-b3e53f48.cjs +1 -0
  205. package/dist/useFileUpload-228dbc07.js +24 -0
  206. package/dist/useFileUpload-f47622bb.cjs +1 -0
  207. package/dist/useIsMobile-7b1f08cf.cjs +1 -0
  208. package/dist/useIsMobile-98fc0cf9.js +7 -0
  209. package/dist/useMediaQuery-1d87df02.cjs +1 -0
  210. package/dist/useMediaQuery-77a19b18.js +37 -0
  211. package/dist/useModal-6a5d870b.js +30 -0
  212. package/dist/useModal-aa6f4a57.cjs +1 -0
  213. package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
  214. package/dist/userList/OneUserList.vue.d.ts +2 -0
  215. package/dist/userList/OneUserListItem.vue.d.ts +2 -0
  216. package/dist/userList/index.cjs +1 -0
  217. package/dist/userList/index.d.ts +4 -0
  218. package/dist/userList/index.js +559 -0
  219. package/dist/utils/clipboard.d.ts +6 -0
  220. package/dist/utils/format.d.ts +17 -0
  221. package/dist/utils/index.cjs +1 -0
  222. package/dist/utils/index.d.ts +4 -0
  223. package/dist/utils/index.js +125 -0
  224. package/dist/utils/string.d.ts +25 -0
  225. package/dist/utils/versionChecker.d.ts +26 -0
  226. package/package.json +221 -23
  227. package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
  228. package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
  229. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  230. package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  231. package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
  232. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
  233. package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
  234. package/dist/useModal-0c73777f.cjs +0 -1
  235. package/dist/useModal-7fe9444b.js +0 -194
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),r=require("vue-markdown-render"),t={class:"markdown-view prose-sm"},o=e.defineComponent({__name:"OneMarkdown",props:{text:String},setup(n){return(c,s)=>(e.openBlock(),e.createElementBlock("div",t,[e.createVNode(e.unref(r),{source:n.text||""},null,8,["source"])]))}});exports._sfc_main=o;
@@ -0,0 +1,18 @@
1
+ import { defineComponent as o, openBlock as r, createElementBlock as t, createVNode as n, unref as c } from "vue";
2
+ import s from "vue-markdown-render";
3
+ const a = { class: "markdown-view prose-sm" }, u = /* @__PURE__ */ o({
4
+ __name: "OneMarkdown",
5
+ props: {
6
+ text: String
7
+ },
8
+ setup(e) {
9
+ return (m, p) => (r(), t("div", a, [
10
+ n(c(s), {
11
+ source: e.text || ""
12
+ }, null, 8, ["source"])
13
+ ]));
14
+ }
15
+ });
16
+ export {
17
+ u as _
18
+ };
@@ -0,0 +1,189 @@
1
+ import { defineComponent as z, computed as d, watch as B, nextTick as _, ref as b, openBlock as p, createElementBlock as x, normalizeClass as a, createElementVNode as s, normalizeStyle as $, toDisplayString as h, renderSlot as i, createTextVNode as T, createCommentVNode as v } from "vue";
2
+ import { u as W } from "./useIsMobile-98fc0cf9.js";
3
+ import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
4
+ const q = {
5
+ useModal: {
6
+ required: !0,
7
+ type: Object
8
+ },
9
+ title: {
10
+ required: !1,
11
+ type: String
12
+ },
13
+ subtitle: {
14
+ required: !1,
15
+ type: String,
16
+ default: ""
17
+ },
18
+ size: {
19
+ type: String,
20
+ default: "medium"
21
+ },
22
+ onClose: {
23
+ type: Function
24
+ },
25
+ classModal: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ /**
30
+ * Bottom-sheet mode: true — always, 'mobile' — only below the md breakpoint
31
+ * (ported from the finance/vizor local modal forks). classModal is the
32
+ * legacy always-on alias.
33
+ */
34
+ sheet: {
35
+ type: [Boolean, String],
36
+ default: !1
37
+ },
38
+ titleCenter: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ classTitle: {
43
+ type: String,
44
+ default: ""
45
+ },
46
+ canClose: {
47
+ type: Function,
48
+ default: () => !0
49
+ },
50
+ customWidth: {
51
+ type: String,
52
+ default: ""
53
+ }
54
+ }, D = {
55
+ "3xs": ["max-w-xs"],
56
+ xs: ["max-w-sm"],
57
+ sm: ["max-w-md"],
58
+ small: ["max-w-lg"],
59
+ md: ["max-w-xl"],
60
+ medium: ["max-w-xl"],
61
+ large: ["max-w-2xl"],
62
+ xl: ["max-w-3xl"],
63
+ "2xl": ["max-w-4xl"],
64
+ "3xl": ["max-w-4xl"],
65
+ "4xl": ["max-w-5xl"],
66
+ "5xl": ["max-w-5xl"],
67
+ "7xl": ["max-w-7xl"]
68
+ }, L = (c = "medium") => {
69
+ const r = [];
70
+ return r.push(...D[c] ?? []), r;
71
+ }, N = { class: "relative bg-white rounded-lg shadow h-full" }, V = /* @__PURE__ */ z({
72
+ __name: "OneModal",
73
+ props: q,
74
+ emits: ["isOpen", "closed"],
75
+ setup(c, { expose: r, emit: y }) {
76
+ const t = c, m = y, w = d(() => {
77
+ var l, n;
78
+ const e = t.useModal;
79
+ return ((l = e == null ? void 0 : e.isOpened) == null ? void 0 : l.value) ?? ((n = e == null ? void 0 : e.isOpen) == null ? void 0 : n.value) ?? !1;
80
+ }), C = W(), g = d(
81
+ () => t.classModal || t.sheet === !0 || t.sheet === "mobile" && C.value
82
+ );
83
+ B(w, (e) => {
84
+ e && _(() => {
85
+ var l;
86
+ return (l = o.value) == null ? void 0 : l.focus();
87
+ });
88
+ });
89
+ const M = d(() => L(t.size)), k = d(() => t.customWidth ? { width: t.customWidth } : {}), o = b(null), f = b(!1);
90
+ function O(e) {
91
+ f.value = !1, o.value && !o.value.contains(e.target) && (f.value = !0);
92
+ }
93
+ function S(e) {
94
+ f.value && o.value && !o.value.contains(e.target) && u();
95
+ }
96
+ const u = () => {
97
+ var l, n;
98
+ if (t.canClose && !t.canClose())
99
+ return;
100
+ const e = t.useModal;
101
+ (l = e == null ? void 0 : e.close) == null || l.call(e), (n = t.onClose) == null || n.call(t), m("closed"), m("isOpen");
102
+ };
103
+ return r({
104
+ open: () => {
105
+ var l;
106
+ const e = t.useModal;
107
+ (l = e == null ? void 0 : e.open) == null || l.call(e), m("isOpen");
108
+ },
109
+ close: u
110
+ }), (e, l) => w.value ? (p(), x("div", {
111
+ key: 0,
112
+ tabindex: "-1",
113
+ onMousedown: O,
114
+ onMouseup: S,
115
+ class: a(["modal backdrop !m-0", { "modal-mobile": g.value }])
116
+ }, [
117
+ s("div", {
118
+ class: a([
119
+ "relative w-full max-h-full",
120
+ M.value,
121
+ { "fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal": g.value }
122
+ ]),
123
+ style: $(k.value),
124
+ ref_key: "modalContent",
125
+ ref: o,
126
+ role: "dialog",
127
+ "aria-modal": "true",
128
+ tabindex: "-1"
129
+ }, [
130
+ s("div", N, [
131
+ e.title ? (p(), x("div", {
132
+ key: 0,
133
+ class: a([
134
+ e.titleCenter ? "grid grid-cols-4" : "flex items-start justify-between",
135
+ "p-3 border-b rounded-t",
136
+ e.classTitle
137
+ ])
138
+ }, [
139
+ s("div", {
140
+ class: a(["flex flex-col min-w-0", e.titleCenter ? "col-span-2 col-start-2 items-center" : ""])
141
+ }, [
142
+ s("h3", {
143
+ class: a(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full", e.titleCenter ? "text-center" : ""])
144
+ }, h(e.title), 3),
145
+ e.$slots.subtitle || e.subtitle ? (p(), x("div", {
146
+ key: 0,
147
+ class: a(["text-sm text-gray-500 mt-0.5 max-w-full", e.titleCenter ? "text-center" : ""])
148
+ }, [
149
+ i(e.$slots, "subtitle", {}, () => [
150
+ T(h(e.subtitle), 1)
151
+ ], !0)
152
+ ], 2)) : v("", !0)
153
+ ], 2),
154
+ s("button", {
155
+ type: "button",
156
+ class: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",
157
+ onClick: u
158
+ }, [...l[0] || (l[0] = [
159
+ s("svg", {
160
+ xmlns: "http://www.w3.org/2000/svg",
161
+ fill: "none",
162
+ viewBox: "0 0 24 24",
163
+ "stroke-width": "1.8",
164
+ stroke: "currentColor",
165
+ "aria-hidden": "true",
166
+ class: "w-5 h-5"
167
+ }, [
168
+ s("path", {
169
+ "stroke-linecap": "round",
170
+ "stroke-linejoin": "round",
171
+ d: "M6 18L18 6M6 6l12 12"
172
+ })
173
+ ], -1)
174
+ ])])
175
+ ], 2)) : v("", !0),
176
+ i(e.$slots, "header", {}, void 0, !0),
177
+ i(e.$slots, "body", {}, void 0, !0),
178
+ i(e.$slots, "default", {}, void 0, !0),
179
+ i(e.$slots, "footer", { close: u }, void 0, !0)
180
+ ])
181
+ ], 6)
182
+ ], 34)) : v("", !0);
183
+ }
184
+ });
185
+ const P = /* @__PURE__ */ j(V, [["__scopeId", "data-v-9864fbb1"]]);
186
+ export {
187
+ P as O,
188
+ q as m
189
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),h=require("./useIsMobile-7b1f08cf.cjs"),y=require("./_plugin-vue_export-helper-f246444f.cjs"),p={useModal:{required:!0,type:Object},title:{required:!1,type:String},subtitle:{required:!1,type:String,default:""},size:{type:String,default:"medium"},onClose:{type:Function},classModal:{type:Boolean,default:!1},sheet:{type:[Boolean,String],default:!1},titleCenter:{type:Boolean,default:!1},classTitle:{type:String,default:""},canClose:{type:Function,default:()=>!0},customWidth:{type:String,default:""}},C={"3xs":["max-w-xs"],xs:["max-w-sm"],sm:["max-w-md"],small:["max-w-lg"],md:["max-w-xl"],medium:["max-w-xl"],large:["max-w-2xl"],xl:["max-w-3xl"],"2xl":["max-w-4xl"],"3xl":["max-w-4xl"],"4xl":["max-w-5xl"],"5xl":["max-w-5xl"],"7xl":["max-w-7xl"]},M=(i="medium")=>{const a=[];return a.push(...C[i]??[]),a},k={class:"relative bg-white rounded-lg shadow h-full"},S=t.defineComponent({__name:"OneModal",props:p,emits:["isOpen","closed"],setup(i,{expose:a,emit:f}){const l=i,u=f,c=t.computed(()=>{var s,n;const e=l.useModal;return((s=e==null?void 0:e.isOpened)==null?void 0:s.value)??((n=e==null?void 0:e.isOpen)==null?void 0:n.value)??!1}),x=h.useIsMobile(),m=t.computed(()=>l.classModal||l.sheet===!0||l.sheet==="mobile"&&x.value);t.watch(c,e=>{e&&t.nextTick(()=>{var s;return(s=o.value)==null?void 0:s.focus()})});const v=t.computed(()=>M(l.size)),w=t.computed(()=>l.customWidth?{width:l.customWidth}:{}),o=t.ref(null),d=t.ref(!1);function g(e){d.value=!1,o.value&&!o.value.contains(e.target)&&(d.value=!0)}function b(e){d.value&&o.value&&!o.value.contains(e.target)&&r()}const r=()=>{var s,n;if(l.canClose&&!l.canClose())return;const e=l.useModal;(s=e==null?void 0:e.close)==null||s.call(e),(n=l.onClose)==null||n.call(l),u("closed"),u("isOpen")};return a({open:()=>{var s;const e=l.useModal;(s=e==null?void 0:e.open)==null||s.call(e),u("isOpen")},close:r}),(e,s)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:"-1",onMousedown:g,onMouseup:b,class:t.normalizeClass(["modal backdrop !m-0",{"modal-mobile":m.value}])},[t.createElementVNode("div",{class:t.normalizeClass(["relative w-full max-h-full",v.value,{"fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal":m.value}]),style:t.normalizeStyle(w.value),ref_key:"modalContent",ref:o,role:"dialog","aria-modal":"true",tabindex:"-1"},[t.createElementVNode("div",k,[e.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([e.titleCenter?"grid grid-cols-4":"flex items-start justify-between","p-3 border-b rounded-t",e.classTitle])},[t.createElementVNode("div",{class:t.normalizeClass(["flex flex-col min-w-0",e.titleCenter?"col-span-2 col-start-2 items-center":""])},[t.createElementVNode("h3",{class:t.normalizeClass(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full",e.titleCenter?"text-center":""])},t.toDisplayString(e.title),3),e.$slots.subtitle||e.subtitle?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["text-sm text-gray-500 mt-0.5 max-w-full",e.titleCenter?"text-center":""])},[t.renderSlot(e.$slots,"subtitle",{},()=>[t.createTextVNode(t.toDisplayString(e.subtitle),1)],!0)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("button",{type:"button",class:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",onClick:r},[...s[0]||(s[0]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true",class:"w-5 h-5"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])],2)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"header",{},void 0,!0),t.renderSlot(e.$slots,"body",{},void 0,!0),t.renderSlot(e.$slots,"default",{},void 0,!0),t.renderSlot(e.$slots,"footer",{close:r},void 0,!0)])],6)],34)):t.createCommentVNode("",!0)}});const V=y._export_sfc(S,[["__scopeId","data-v-9864fbb1"]]);exports.OneModal=V;exports.modalProps=p;
@@ -0,0 +1,25 @@
1
+ import { defineComponent as e, openBlock as i, createElementBlock as n, renderSlot as p } from "vue";
2
+ const l = ["tooltip", "position"], a = /* @__PURE__ */ e({
3
+ __name: "OneTooltip",
4
+ props: {
5
+ tooltipText: {
6
+ type: String,
7
+ default: "Tooltip text"
8
+ },
9
+ position: {
10
+ default: "top",
11
+ type: String
12
+ }
13
+ },
14
+ setup(t) {
15
+ return (o, r) => (i(), n("div", {
16
+ tooltip: t.tooltipText,
17
+ position: t.position
18
+ }, [
19
+ p(o.$slots, "default")
20
+ ], 8, l));
21
+ }
22
+ });
23
+ export {
24
+ a as _
25
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),i=["tooltip","position"],n=t.defineComponent({__name:"OneTooltip",props:{tooltipText:{type:String,default:"Tooltip text"},position:{default:"top",type:String}},setup(o){return(e,p)=>(t.openBlock(),t.createElementBlock("div",{tooltip:o.tooltipText,position:o.position},[t.renderSlot(e.$slots,"default")],8,i))}});exports._sfc_main=n;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),t=require("./_plugin-vue_export-helper-f246444f.cjs");const o={},i={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}};function r(c,n){return e.openBlock(),e.createElementBlock("svg",i,[...n[0]||(n[0]=[e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1)])])}const s=t._export_sfc(o,[["render",r]]);exports.SpinnerIcon=s;
@@ -1,14 +1,13 @@
1
1
  import { openBlock as n, createElementBlock as o, createElementVNode as t } from "vue";
2
- import "./SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
3
- import { _ as r } from "./_plugin-vue_export-helper-dad06003.js";
4
- const i = {}, s = {
2
+ import { _ as s } from "./_plugin-vue_export-helper-dad06003.js";
3
+ const i = {}, r = {
5
4
  class: "spinner",
6
5
  xmlns: "http://www.w3.org/2000/svg",
7
6
  viewBox: "0 0 24 24",
8
7
  style: { animation: "one-sp-ico-rot 2.7s linear infinite" }
9
8
  };
10
9
  function c(l, e) {
11
- return n(), o("svg", s, [...e[0] || (e[0] = [
10
+ return n(), o("svg", r, [...e[0] || (e[0] = [
12
11
  t("circle", {
13
12
  style: { "stroke-linecap": "round", animation: "one-sp-ico-dash 1.7s ease-in-out infinite" },
14
13
  class: "opacity-75",
@@ -21,7 +20,7 @@ function c(l, e) {
21
20
  }, null, -1)
22
21
  ])]);
23
22
  }
24
- const f = /* @__PURE__ */ r(i, [["render", c]]);
23
+ const p = /* @__PURE__ */ s(i, [["render", c]]);
25
24
  export {
26
- f as S
25
+ p as S
27
26
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../SpinnerIcon-ccb6f3fc.cjs");require("../SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const y={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},labelClass:{type:String,default:""},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object,String]}},v=["relative inline-flex","border","items-center justify-center","font-semibold whitespace-nowrap","disabled:opacity-30 disabled:cursor-default","focus:outline-none focus:ring-2","transition-colors duration-200"],h={xs:["h-6 px-2.5 text-xs"],sm:["px-2 py-1 text-sm"],md:["h-[40px] px-4 text-sm"],lg:["h-[52px] px-5 text-base"]},f={primary:["rounded-10 border-transparent bg-primary-base disabled:bg-[#979CA9] text-sm text-white hover:bg-primary-hover active:bg-primary-active focus:ring-primary-glow"],secondary:["rounded-10 border-primary-stroke bg-white text-secondary-base text-sm hover:bg-light-body-active active:bg-light-body focus:ring-primary-glow"],info:["rounded-10 border-transparent bg-info-base disabled:bg-[#979CA9] text-white text-sm hover:bg-info-hover active:bg-info-active focus:ring-info-glow"],success:["rounded-10 border-transparent bg-success-base disabled:bg-[#979CA9] text-white text-sm hover:bg-success-hover active:bg-success-active focus:ring-success-glow"],warning:["rounded-10 border-transparent bg-warning-base disabled:bg-[#979CA9] text-white text-sm hover:bg-warning-hover active:bg-warning-active focus:ring-warning-glow"],danger:["rounded-10 border-transparent bg-danger-base disabled:bg-[#979CA9] text-white text-sm hover:bg-danger-hover active:bg-danger-active focus:ring-danger-glow"],tertiary:["rounded-10 border-transparent bg-secondary-body text-primary-base text-sm hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],touch:["rounded-full border-transparent text-secondary-base hover:bg-light-body-active active:bg-light-body p-2 text-sm focus:ring-primary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-secondary-base"],mini:["rounded-full border-transparent bg-[#FAFAFA] h-8 px-2 gap-2 text-xs hover:text-success-base focus:ring-primary-glow"],edit:["rounded-md border-transparent bg-tertiary-base text-primary-base text-2xs h-6 px-1.5 hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],send:["rounded-full border-transparent bg-primary-base text-white hover:bg-primary-hover active:bg-primary-active p-[9px] focus:ring-primary-glow"]},x=(a="primary",l="md")=>{const r=[];return r.push(...v),r.push(...f[a]??[]),a!=="touch"&&a!=="mini"&&a!=="edit"&&a!=="send"&&r.push(...h[l]??[]),l==="xs"?r.map(c=>c.replace("rounded-10","rounded-md").replace("font-semibold","font-medium")):r},C=["disabled","title","type"],w=e.defineComponent({__name:"OneButton",props:y,emits:["click"],setup(a,{emit:l}){const r=e.useSlots(),c=l,t=a,d=()=>{c("click")},n=e.computed(()=>t.icon),i=e.computed(()=>t.iconAfter),p=e.computed(()=>{const s=x(t.variant,t.size);return t.variant==="edit"?s.push("gap-1.5"):s.push("gap-[10px]"),t.variant==="touch"&&t.active&&s.push("bg-primary-body-active"),s}),b=e.computed(()=>t.disabled||t.isLoading),g=e.computed(()=>(t.label&&t.label.length>0||!!r.default)&&t.variant!=="touch"&&t.variant!=="send"),m=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return t.labelClass!=null&&s.push(t.labelClass),s}),o=e.computed(()=>{const s=[];return t.variant==="edit"?s.push("w-3.5 h-3.5"):t.variant==="send"?s.push("w-5 h-5"):t.size==="xs"?s.push("w-3.5 h-3.5"):t.size==="sm"?s.push("w-3 h-3"):t.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof t.iconClass=="string"?s.push(t.iconClass):t.iconClass instanceof Array&&s.push(...t.iconClass),s});return(s,k)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(p.value),disabled:b.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(d,["stop"])},[n.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:0,class:e.normalizeClass(o.value)},null,8,["class"])):typeof n.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(o.value)},e.toDisplayString(n.value),3)):n.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{key:2,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(m.value)},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])],2)):e.createCommentVNode("",!0),i.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:4,class:e.normalizeClass(o.value)},null,8,["class"])):typeof i.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(o.value)},e.toDisplayString(i.value),3)):i.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:6,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,C))}});exports.OneButton=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../SpinnerIcon-01be39fe.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const y={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},labelClass:{type:String,default:""},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object,String]}},v=["relative inline-flex","border","items-center justify-center","font-semibold whitespace-nowrap","disabled:opacity-30 disabled:cursor-default","focus:outline-none focus:ring-2","transition-colors duration-200"],h={xs:["h-6 px-2.5 text-xs"],sm:["px-2 py-1 text-sm"],md:["h-[40px] px-4 text-sm"],lg:["h-[52px] px-5 text-base"]},f={primary:["rounded-10 border-transparent bg-primary-base disabled:bg-[#979CA9] text-sm text-white hover:bg-primary-hover active:bg-primary-active focus:ring-primary-glow"],secondary:["rounded-10 border-primary-stroke bg-white text-secondary-base text-sm hover:bg-light-body-active active:bg-light-body focus:ring-primary-glow"],info:["rounded-10 border-transparent bg-info-base disabled:bg-[#979CA9] text-white text-sm hover:bg-info-hover active:bg-info-active focus:ring-info-glow"],success:["rounded-10 border-transparent bg-success-base disabled:bg-[#979CA9] text-white text-sm hover:bg-success-hover active:bg-success-active focus:ring-success-glow"],warning:["rounded-10 border-transparent bg-warning-base disabled:bg-[#979CA9] text-white text-sm hover:bg-warning-hover active:bg-warning-active focus:ring-warning-glow"],danger:["rounded-10 border-transparent bg-danger-base disabled:bg-[#979CA9] text-white text-sm hover:bg-danger-hover active:bg-danger-active focus:ring-danger-glow"],tertiary:["rounded-10 border-transparent bg-secondary-body text-primary-base text-sm hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],touch:["rounded-full border-transparent text-secondary-base hover:bg-light-body-active active:bg-light-body p-2 text-sm focus:ring-primary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-secondary-base"],mini:["rounded-full border-transparent bg-[#FAFAFA] h-8 px-2 gap-2 text-xs hover:text-success-base focus:ring-primary-glow"],edit:["rounded-md border-transparent bg-tertiary-base text-primary-base text-2xs h-6 px-1.5 hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],send:["rounded-full border-transparent bg-primary-base text-white hover:bg-primary-hover active:bg-primary-active p-[9px] focus:ring-primary-glow"]},x=(a="primary",l="md")=>{const r=[];return r.push(...v),r.push(...f[a]??[]),a!=="touch"&&a!=="mini"&&a!=="edit"&&a!=="send"&&r.push(...h[l]??[]),l==="xs"?r.map(c=>c.replace("rounded-10","rounded-md").replace("font-semibold","font-medium")):r},C=["disabled","title","type"],w=e.defineComponent({__name:"OneButton",props:y,emits:["click"],setup(a,{emit:l}){const r=e.useSlots(),c=l,t=a,d=()=>{c("click")},n=e.computed(()=>t.icon),i=e.computed(()=>t.iconAfter),p=e.computed(()=>{const s=x(t.variant,t.size);return t.variant==="edit"?s.push("gap-1.5"):s.push("gap-[10px]"),t.variant==="touch"&&t.active&&s.push("bg-primary-body-active"),s}),b=e.computed(()=>t.disabled||t.isLoading),g=e.computed(()=>(t.label&&t.label.length>0||!!r.default)&&t.variant!=="touch"&&t.variant!=="send"),m=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return t.labelClass!=null&&s.push(t.labelClass),s}),o=e.computed(()=>{const s=[];return t.variant==="edit"?s.push("w-3.5 h-3.5"):t.variant==="send"?s.push("w-5 h-5"):t.size==="xs"?s.push("w-3.5 h-3.5"):t.size==="sm"?s.push("w-3 h-3"):t.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof t.iconClass=="string"?s.push(t.iconClass):t.iconClass instanceof Array&&s.push(...t.iconClass),s});return(s,k)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(p.value),disabled:b.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(d,["stop"])},[n.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:0,class:e.normalizeClass(o.value)},null,8,["class"])):typeof n.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(o.value)},e.toDisplayString(n.value),3)):n.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{key:2,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(m.value)},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])],2)):e.createCommentVNode("",!0),i.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:4,class:e.normalizeClass(o.value)},null,8,["class"])):typeof i.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(o.value)},e.toDisplayString(i.value),3)):i.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:6,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,C))}});exports.OneButton=w;
@@ -1,2 +1,2 @@
1
1
  export { default as OneButton } from './OneButton.vue';
2
- export type { ButtonProps } from './button';
2
+ export type { ButtonProps, ButtonVariantType, ButtonSizeType, ButtonIconType } from './button';
@@ -1,6 +1,5 @@
1
1
  import { defineComponent as k, useSlots as B, computed as o, openBlock as s, createElementBlock as u, normalizeClass as a, withModifiers as S, createBlock as p, toDisplayString as g, resolveDynamicComponent as v, createCommentVNode as m, renderSlot as A, createTextVNode as L } from "vue";
2
- import { S as y } from "../SpinnerIcon-74648c98.js";
3
- import "../SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
2
+ import { S as y } from "../SpinnerIcon-516264ba.js";
4
3
  import "../_plugin-vue_export-helper-dad06003.js";
5
4
  const z = {
6
5
  variant: {
@@ -96,7 +95,7 @@ const z = {
96
95
  return n.push(...F), n.push(...O[r] ?? []), r !== "touch" && r !== "mini" && r !== "edit" && r !== "send" && n.push(...I[d] ?? []), d === "xs" ? n.map(
97
96
  (b) => b.replace("rounded-10", "rounded-md").replace("font-semibold", "font-medium")
98
97
  ) : n;
99
- }, D = ["disabled", "title", "type"], P = /* @__PURE__ */ k({
98
+ }, D = ["disabled", "title", "type"], M = /* @__PURE__ */ k({
100
99
  __name: "OneButton",
101
100
  props: z,
102
101
  emits: ["click"],
@@ -154,5 +153,5 @@ const z = {
154
153
  }
155
154
  });
156
155
  export {
157
- P as OneButton
156
+ M as OneButton
158
157
  };
@@ -12,6 +12,11 @@ export declare const checkboxProps: {
12
12
  type: PropType<CheckboxTextPositionType>;
13
13
  default: string;
14
14
  };
15
+ modelValue: {
16
+ type: PropType<boolean>;
17
+ default: any;
18
+ };
19
+ /** @deprecated use v-model (modelValue) instead */
15
20
  isChecked: {
16
21
  type: PropType<boolean>;
17
22
  default: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../SpinnerIcon-ccb6f3fc.cjs"),f=require("../_plugin-vue_export-helper-f246444f.cjs");require("../SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");const m={color:{type:String,default:"blue"},textPosition:{type:String,default:"left"},isChecked:{type:Boolean,default:!0},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},textClass:{type:[String,Array]}},k={key:0,class:"mr-2 text-gray-600 text-sm font-medium"},h={key:1,class:"checkmark-tick absolute inset-0 w-full h-full",viewBox:"0 0 24 24",fill:"none",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},b={key:1,class:"ml-2 text-gray-600 text-sm font-medium"},g=e.defineComponent({__name:"OneCheckbox",props:m,emits:["change"],setup(r,{emit:s}){const t=r,o=e.ref(t.isChecked),a=s,c=e.computed(()=>{if(o.value)switch(t.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#fefefe"}),i=e.computed(()=>t.disabled),u=l=>{const n=l.target;o.value=n.checked,a("change",o.value)};return(l,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass([[i.value?"disabled opacity-50 pointer-events-none":""],"checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=d=>o.value=d),onChange:u,class:"hidden"},null,544),[[e.vModelCheckbox,o.value]]),t.textPosition==="left"?(e.openBlock(),e.createElementBlock("span",k,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"checkmark h-5 w-5 flex-shrink-0 border border-gray-300 rounded transition-all duration-300 relative hover:border-2 hover:border-gray-500",style:e.normalizeStyle({backgroundColor:c.value})},[e.createElementVNode("div",null,[l.isLoading?(e.openBlock(),e.createBlock(p.SpinnerIcon,{key:0,class:"absolute w-3 h-3 text-black left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):!l.isLoading&&o.value?(e.openBlock(),e.createElementBlock("svg",h,[...n[1]||(n[1]=[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):e.createCommentVNode("",!0)])],4),t.textPosition==="right"?(e.openBlock(),e.createElementBlock("span",b,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0)],2))}});const x=f._export_sfc(g,[["__scopeId","data-v-0c95be43"]]);exports.OneCheckbox=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../SpinnerIcon-01be39fe.cjs"),m=require("../_plugin-vue_export-helper-f246444f.cjs"),k={color:{type:String,default:"blue"},textPosition:{type:String,default:"left"},modelValue:{type:Boolean,default:void 0},isChecked:{type:Boolean,default:!0},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},textClass:{type:[String,Array]}},f=["checked"],h={key:0,class:"mr-2 text-gray-600 text-sm font-medium"},y={key:1,class:"checkmark-tick absolute inset-0 w-full h-full",viewBox:"0 0 24 24",fill:"none",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},g={key:1,class:"ml-2 text-gray-600 text-sm font-medium"},x=e.defineComponent({__name:"OneCheckbox",props:k,emits:["change","update:modelValue"],setup(c,{emit:s}){const t=c,r=s,a=e.computed(()=>t.modelValue??t.isChecked),o=e.ref(a.value);e.watch(a,n=>{o.value=n});const i=e.computed(()=>{if(o.value)switch(t.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#fefefe"}),d=e.computed(()=>t.disabled),u=n=>{const l=n.target;o.value=l.checked,r("update:modelValue",l.checked),r("change",l.checked)};return(n,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass([[d.value?"disabled opacity-50 pointer-events-none":""],"checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])},[e.createElementVNode("input",{type:"checkbox",checked:o.value,onChange:u,class:"hidden"},null,40,f),t.textPosition==="left"?(e.openBlock(),e.createElementBlock("span",h,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"checkmark h-5 w-5 flex-shrink-0 border border-gray-300 rounded transition-all duration-300 relative hover:border-2 hover:border-gray-500",style:e.normalizeStyle({backgroundColor:i.value})},[e.createElementVNode("div",null,[n.isLoading?(e.openBlock(),e.createBlock(p.SpinnerIcon,{key:0,class:"absolute w-3 h-3 text-black left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):!n.isLoading&&o.value?(e.openBlock(),e.createElementBlock("svg",y,[...l[0]||(l[0]=[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):e.createCommentVNode("",!0)])],4),t.textPosition==="right"?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0)],2))}});const b=m._export_sfc(x,[["__scopeId","data-v-754a6250"]]);exports.OneCheckbox=b;
@@ -1,8 +1,7 @@
1
- import { defineComponent as x, ref as b, computed as i, openBlock as n, createElementBlock as r, normalizeClass as y, withDirectives as g, createElementVNode as s, vModelCheckbox as v, toDisplayString as c, createCommentVNode as a, normalizeStyle as _, createBlock as C } from "vue";
2
- import { S as w } from "../SpinnerIcon-74648c98.js";
3
- import { _ as O } from "../_plugin-vue_export-helper-dad06003.js";
4
- import "../SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
5
- const S = {
1
+ import { defineComponent as x, computed as s, ref as y, watch as g, openBlock as n, createElementBlock as a, normalizeClass as b, createElementVNode as r, toDisplayString as u, createCommentVNode as c, normalizeStyle as _, createBlock as v } from "vue";
2
+ import { S as C } from "../SpinnerIcon-516264ba.js";
3
+ import { _ as w } from "../_plugin-vue_export-helper-dad06003.js";
4
+ const O = {
6
5
  color: {
7
6
  type: String,
8
7
  default: "blue"
@@ -15,6 +14,11 @@ const S = {
15
14
  type: String,
16
15
  default: "left"
17
16
  },
17
+ modelValue: {
18
+ type: Boolean,
19
+ default: void 0
20
+ },
21
+ /** @deprecated use v-model (modelValue) instead */
18
22
  isChecked: {
19
23
  type: Boolean,
20
24
  default: !0
@@ -49,10 +53,10 @@ const S = {
49
53
  // iconClass: {
50
54
  // type: [String, Array] as PropType<string|string[]>
51
55
  // },
52
- }, B = {
56
+ }, S = ["checked"], B = {
53
57
  key: 0,
54
58
  class: "mr-2 text-gray-600 text-sm font-medium"
55
- }, P = {
59
+ }, V = {
56
60
  key: 1,
57
61
  class: "checkmark-tick absolute inset-0 w-full h-full",
58
62
  viewBox: "0 0 24 24",
@@ -61,15 +65,19 @@ const S = {
61
65
  "stroke-width": "3",
62
66
  "stroke-linecap": "round",
63
67
  "stroke-linejoin": "round"
64
- }, D = {
68
+ }, P = {
65
69
  key: 1,
66
70
  class: "ml-2 text-gray-600 text-sm font-medium"
67
71
  }, L = /* @__PURE__ */ x({
68
72
  __name: "OneCheckbox",
69
- props: S,
70
- emits: ["change"],
71
- setup(d, { emit: u }) {
72
- const e = d, t = b(e.isChecked), f = u, p = i(() => {
73
+ props: O,
74
+ emits: ["change", "update:modelValue"],
75
+ setup(f, { emit: p }) {
76
+ const e = f, i = p, d = s(() => e.modelValue ?? e.isChecked), t = y(d.value);
77
+ g(d, (o) => {
78
+ t.value = o;
79
+ });
80
+ const h = s(() => {
73
81
  if (t.value)
74
82
  switch (e.color) {
75
83
  case "green":
@@ -85,40 +93,38 @@ const S = {
85
93
  }
86
94
  else
87
95
  return "#fefefe";
88
- }), m = i(() => e.disabled), h = (l) => {
89
- const o = l.target;
90
- t.value = o.checked, f("change", t.value);
96
+ }), m = s(() => e.disabled), k = (o) => {
97
+ const l = o.target;
98
+ t.value = l.checked, i("update:modelValue", l.checked), i("change", l.checked);
91
99
  };
92
- return (l, o) => (n(), r("label", {
93
- class: y([[m.value ? "disabled opacity-50 pointer-events-none" : ""], "checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])
100
+ return (o, l) => (n(), a("label", {
101
+ class: b([[m.value ? "disabled opacity-50 pointer-events-none" : ""], "checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])
94
102
  }, [
95
- g(s("input", {
103
+ r("input", {
96
104
  type: "checkbox",
97
- "onUpdate:modelValue": o[0] || (o[0] = (k) => t.value = k),
98
- onChange: h,
105
+ checked: t.value,
106
+ onChange: k,
99
107
  class: "hidden"
100
- }, null, 544), [
101
- [v, t.value]
102
- ]),
103
- e.textPosition === "left" ? (n(), r("span", B, c(t.value ? e.textOn : e.textOff), 1)) : a("", !0),
104
- s("span", {
108
+ }, null, 40, S),
109
+ e.textPosition === "left" ? (n(), a("span", B, u(t.value ? e.textOn : e.textOff), 1)) : c("", !0),
110
+ r("span", {
105
111
  class: "checkmark h-5 w-5 flex-shrink-0 border border-gray-300 rounded transition-all duration-300 relative hover:border-2 hover:border-gray-500",
106
- style: _({ backgroundColor: p.value })
112
+ style: _({ backgroundColor: h.value })
107
113
  }, [
108
- s("div", null, [
109
- l.isLoading ? (n(), C(w, {
114
+ r("div", null, [
115
+ o.isLoading ? (n(), v(C, {
110
116
  key: 0,
111
117
  class: "absolute w-3 h-3 text-black left-1/2 top-1/2 -ml-1.5 -mt-1.5"
112
- })) : !l.isLoading && t.value ? (n(), r("svg", P, [...o[1] || (o[1] = [
113
- s("polyline", { points: "20 6 9 17 4 12" }, null, -1)
114
- ])])) : a("", !0)
118
+ })) : !o.isLoading && t.value ? (n(), a("svg", V, [...l[0] || (l[0] = [
119
+ r("polyline", { points: "20 6 9 17 4 12" }, null, -1)
120
+ ])])) : c("", !0)
115
121
  ])
116
122
  ], 4),
117
- e.textPosition === "right" ? (n(), r("span", D, c(t.value ? e.textOn : e.textOff), 1)) : a("", !0)
123
+ e.textPosition === "right" ? (n(), a("span", P, u(t.value ? e.textOn : e.textOff), 1)) : c("", !0)
118
124
  ], 2));
119
125
  }
120
126
  });
121
- const I = /* @__PURE__ */ O(L, [["__scopeId", "data-v-0c95be43"]]);
127
+ const E = /* @__PURE__ */ w(L, [["__scopeId", "data-v-754a6250"]]);
122
128
  export {
123
- I as OneCheckbox
129
+ E as OneCheckbox
124
130
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ export declare const chipsProps: {
3
+ modelValue: {
4
+ type: PropType<Record<string, unknown>[]>;
5
+ required: true;
6
+ };
7
+ labelKey: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ valueKey: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ /** Heading rendered before the chips. */
16
+ label: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ removable: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ };
25
+ export type ChipsProps = ExtractPropTypes<typeof chipsProps>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n={modelValue:{type:Array,required:!0},labelKey:{type:String,default:"name"},valueKey:{type:String,default:"id"},label:{type:String,default:""},removable:{type:Boolean,default:!0}},m={class:"flex items-center flex-wrap gap-1"},p={key:0,class:"font-medium mr-2"},u=["data-test","onClick"],c=e.defineComponent({__name:"OneChips",props:n,emits:["update:modelValue","remove"],setup(s,{emit:i}){const o=s,r=i,d=t=>{r("remove",t),r("update:modelValue",o.modelValue.filter(a=>String(a[o.valueKey])!==String(t[o.valueKey])))};return(t,a)=>(e.openBlock(),e.createElementBlock("div",m,[t.label?(e.openBlock(),e.createElementBlock("span",p,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,l=>(e.openBlock(),e.createElementBlock("div",{key:String(l[t.valueKey]),class:"flex"},[e.createElementVNode("span",{class:e.normalizeClass(["bg-primary-base text-white text-sm px-2 py-1 rounded-l-md flex items-center",{"rounded-r-md":!t.removable}])},e.toDisplayString(l[t.labelKey]),3),t.removable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"text-xs text-white hover:text-red-300 px-2 bg-primary-base rounded-r-md","data-test":`chip-remove-${l[t.valueKey]}`,onClick:e.withModifiers(y=>d(l),["prevent","stop"])}," ✕ ",8,u)):e.createCommentVNode("",!0)]))),128)),e.renderSlot(t.$slots,"default")]))}});exports.OneChips=c;exports.chipsProps=n;
@@ -0,0 +1,3 @@
1
+ export { default as OneChips } from './OneChips.vue';
2
+ export { chipsProps } from './chips';
3
+ export type { ChipsProps } from './chips';
@@ -0,0 +1,62 @@
1
+ import { defineComponent as u, openBlock as t, createElementBlock as r, toDisplayString as s, createCommentVNode as d, Fragment as y, renderList as c, createElementVNode as v, normalizeClass as f, withModifiers as b, renderSlot as h } from "vue";
2
+ const g = {
3
+ modelValue: {
4
+ type: Array,
5
+ required: !0
6
+ },
7
+ labelKey: {
8
+ type: String,
9
+ default: "name"
10
+ },
11
+ valueKey: {
12
+ type: String,
13
+ default: "id"
14
+ },
15
+ /** Heading rendered before the chips. */
16
+ label: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ removable: {
21
+ type: Boolean,
22
+ default: !0
23
+ }
24
+ }, S = { class: "flex items-center flex-wrap gap-1" }, k = {
25
+ key: 0,
26
+ class: "font-medium mr-2"
27
+ }, C = ["data-test", "onClick"], x = /* @__PURE__ */ u({
28
+ __name: "OneChips",
29
+ props: g,
30
+ emits: ["update:modelValue", "remove"],
31
+ setup(i, { emit: m }) {
32
+ const a = i, o = m, p = (e) => {
33
+ o("remove", e), o(
34
+ "update:modelValue",
35
+ a.modelValue.filter((n) => String(n[a.valueKey]) !== String(e[a.valueKey]))
36
+ );
37
+ };
38
+ return (e, n) => (t(), r("div", S, [
39
+ e.label ? (t(), r("span", k, s(e.label), 1)) : d("", !0),
40
+ (t(!0), r(y, null, c(e.modelValue, (l) => (t(), r("div", {
41
+ key: String(l[e.valueKey]),
42
+ class: "flex"
43
+ }, [
44
+ v("span", {
45
+ class: f(["bg-primary-base text-white text-sm px-2 py-1 rounded-l-md flex items-center", { "rounded-r-md": !e.removable }])
46
+ }, s(l[e.labelKey]), 3),
47
+ e.removable ? (t(), r("button", {
48
+ key: 0,
49
+ type: "button",
50
+ class: "text-xs text-white hover:text-red-300 px-2 bg-primary-base rounded-r-md",
51
+ "data-test": `chip-remove-${l[e.valueKey]}`,
52
+ onClick: b((K) => p(l), ["prevent", "stop"])
53
+ }, " ✕ ", 8, C)) : d("", !0)
54
+ ]))), 128)),
55
+ h(e.$slots, "default")
56
+ ]));
57
+ }
58
+ });
59
+ export {
60
+ x as OneChips,
61
+ g as chipsProps
62
+ };
@@ -0,0 +1 @@
1
+ "use strict";async function a(t){var o;if(typeof navigator<"u"&&((o=navigator.clipboard)!=null&&o.writeText))try{return await navigator.clipboard.writeText(t),!0}catch{}if(typeof document>"u")return!1;const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(e)}}exports.copyToClipboard=a;
@@ -0,0 +1,22 @@
1
+ async function o(t) {
2
+ var a;
3
+ if (typeof navigator < "u" && ((a = navigator.clipboard) != null && a.writeText))
4
+ try {
5
+ return await navigator.clipboard.writeText(t), !0;
6
+ } catch {
7
+ }
8
+ if (typeof document > "u")
9
+ return !1;
10
+ const e = document.createElement("textarea");
11
+ e.value = t, e.setAttribute("readonly", ""), e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e), e.select();
12
+ try {
13
+ return document.execCommand("copy");
14
+ } catch {
15
+ return !1;
16
+ } finally {
17
+ document.body.removeChild(e);
18
+ }
19
+ }
20
+ export {
21
+ o as c
22
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;