@webilio-xyz/webilio-vue 1.0.43 → 1.1.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 (121) hide show
  1. package/dist/ButtonComponent-DOEH129x.js +12 -0
  2. package/dist/CardTitleComponent-yoZlgZ_5.js +14 -0
  3. package/dist/ColumnDefinition-DMr-A-Xx.js +38 -0
  4. package/dist/Component.js +622 -0
  5. package/dist/Input.js +956 -0
  6. package/dist/LabelComponent-CfsH2P2a.js +1176 -0
  7. package/dist/Layout.js +188 -0
  8. package/dist/Modal.js +228 -0
  9. package/dist/Models.js +10 -0
  10. package/dist/Table.js +573 -0
  11. package/dist/_baseEach-BeZ5ghU7.js +128 -0
  12. package/dist/_baseIteratee-r_6HOn93.js +547 -0
  13. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  14. package/dist/debounce-C1ND-yYU.js +82 -0
  15. package/dist/forEach-DN2We3cJ.js +17 -0
  16. package/dist/index.js +16 -0
  17. package/dist/isObject-BD_iszZg.js +36 -0
  18. package/dist/style.css +1 -0
  19. package/dist/toString-CykDHNcE.js +29 -0
  20. package/package.json +30 -7
  21. package/.github/workflows/npm-publish.yml +0 -24
  22. package/docker-compose.yml +0 -16
  23. package/docs/favicon.ico +0 -0
  24. package/docs/index.html +0 -87
  25. package/eslint.config.js +0 -12
  26. package/jsconfig.json +0 -9
  27. package/postcss.config.js +0 -6
  28. package/src/Assets/Logo_webilio.png +0 -0
  29. package/src/Components/Component/AlertComponent.vue +0 -39
  30. package/src/Components/Component/AvatarComponent.vue +0 -60
  31. package/src/Components/Component/BreadcrumbsComponent.vue +0 -92
  32. package/src/Components/Component/ButtonComponent.vue +0 -8
  33. package/src/Components/Component/DropzoneComponent.vue +0 -172
  34. package/src/Components/Component/FoldableComponent.vue +0 -60
  35. package/src/Components/Component/InfiniteScrollComponent.vue +0 -41
  36. package/src/Components/Component/NotesCommentComponent.vue +0 -129
  37. package/src/Components/Component/NotesInputComponent.vue +0 -57
  38. package/src/Components/Component/StepsComponent.vue +0 -71
  39. package/src/Components/Component/TagComponent.vue +0 -38
  40. package/src/Components/Component/index.js +0 -39
  41. package/src/Components/Input/CheckboxComponent.vue +0 -32
  42. package/src/Components/Input/DateComponent.vue +0 -126
  43. package/src/Components/Input/ErrorComponent.vue +0 -17
  44. package/src/Components/Input/InputComponent.vue +0 -165
  45. package/src/Components/Input/InputGroupComponent.vue +0 -127
  46. package/src/Components/Input/LabelComponent.vue +0 -16
  47. package/src/Components/Input/SelectComponent.vue +0 -163
  48. package/src/Components/Input/TextInputComponent.vue +0 -37
  49. package/src/Components/Input/TextareaComponent.vue +0 -30
  50. package/src/Components/Input/ToggleComponent.vue +0 -82
  51. package/src/Components/Input/index.js +0 -42
  52. package/src/Components/Layout/CardComponent.vue +0 -7
  53. package/src/Components/Layout/CardTitleComponent.vue +0 -9
  54. package/src/Components/Layout/ContainerComponent.vue +0 -11
  55. package/src/Components/Layout/MenuItemComponent.vue +0 -203
  56. package/src/Components/Layout/MenuItemsComponent.vue +0 -72
  57. package/src/Components/Layout/SidebarComponent.vue +0 -26
  58. package/src/Components/Layout/SidebarOptionComponent.vue +0 -16
  59. package/src/Components/Layout/index.js +0 -15
  60. package/src/Components/Modal/ConfirmModalComponent.vue +0 -63
  61. package/src/Components/Modal/ModalComponent.vue +0 -157
  62. package/src/Components/Modal/index.js +0 -12
  63. package/src/Components/Table/InertiaTableComponent.vue +0 -192
  64. package/src/Components/Table/TableCellComponent.vue +0 -63
  65. package/src/Components/Table/TableComponent.vue +0 -98
  66. package/src/Components/Table/TableHeaderComponent.vue +0 -88
  67. package/src/Components/Table/TablePaginationComponent.vue +0 -191
  68. package/src/Components/Table/TableRowComponent.vue +0 -30
  69. package/src/Components/Table/index.js +0 -23
  70. package/src/Components/index.js +0 -15
  71. package/src/Demo/Components/AvatarComponentDemo.js +0 -34
  72. package/src/Demo/Components/BreadcrumbsComponentDemo.js +0 -28
  73. package/src/Demo/Components/ButtonComponentDemo.js +0 -22
  74. package/src/Demo/Components/DropzoneComponentDemo.js +0 -49
  75. package/src/Demo/Components/FoldableComponentDemo.js +0 -19
  76. package/src/Demo/Components/NotesCommentComponentDemo.js +0 -83
  77. package/src/Demo/Components/NotesInputComponentDemo.js +0 -25
  78. package/src/Demo/Components/StepsComponentDemo.js +0 -29
  79. package/src/Demo/Components/TagComponentDemo.js +0 -29
  80. package/src/Demo/Components/index.js +0 -27
  81. package/src/Demo/Input/CheckboxComponentDemo.js +0 -15
  82. package/src/Demo/Input/DateComponentDemo.js +0 -28
  83. package/src/Demo/Input/ErrorComponentDemo.js +0 -15
  84. package/src/Demo/Input/InputComponentDemo.js +0 -20
  85. package/src/Demo/Input/InputGroupComponentDemo.js +0 -20
  86. package/src/Demo/Input/LabelComponentDemo.js +0 -10
  87. package/src/Demo/Input/SelectComponentDemo.js +0 -26
  88. package/src/Demo/Input/TextInputComponentDemo.js +0 -30
  89. package/src/Demo/Input/TextareaComponentDemo.js +0 -15
  90. package/src/Demo/Input/ToggleComponentDemo.js +0 -15
  91. package/src/Demo/Input/index.js +0 -25
  92. package/src/Demo/Layout/CardComponentDemo.js +0 -15
  93. package/src/Demo/Layout/CardTitleComponentDemo.js +0 -15
  94. package/src/Demo/Layout/MenuItemComponentDemo.js +0 -27
  95. package/src/Demo/Layout/SidebarComponentDemo.js +0 -91
  96. package/src/Demo/Layout/index.js +0 -11
  97. package/src/Demo/Modal/ConfirmModalComponentDemo.js +0 -22
  98. package/src/Demo/Modal/ModalComponentDemo.js +0 -45
  99. package/src/Demo/Modal/index.js +0 -9
  100. package/src/Demo/Table/InertiaTableComponentDemo.js +0 -20
  101. package/src/Demo/Table/TableCellComponentDemo.js +0 -23
  102. package/src/Demo/Table/TableComponentDemo.js +0 -40
  103. package/src/Demo/Table/TableHeaderComponentDemo.js +0 -21
  104. package/src/Demo/Table/TablePaginationComponentDemo.js +0 -16
  105. package/src/Demo/Table/TableRowComponentDemo.js +0 -29
  106. package/src/Demo/Table/index.js +0 -16
  107. package/src/Demo/index.js +0 -12
  108. package/src/Doxen/DoxenDate.vue +0 -52
  109. package/src/Doxen/DoxenSidebar.vue +0 -68
  110. package/src/Doxen/VueDoxen.vue +0 -33
  111. package/src/Models/ColumnDefinition.js +0 -73
  112. package/src/Models/Columns.ts +0 -18
  113. package/src/Models/index.js +0 -11
  114. package/src/app.vue +0 -43
  115. package/src/favicon.ico +0 -0
  116. package/src/index.css +0 -132
  117. package/src/index.html +0 -26
  118. package/src/router/index.js +0 -31
  119. package/tailwind.config.js +0 -56
  120. package/vite.config.js +0 -24
  121. package/wv +0 -27
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as e, renderSlot as n } from "vue";
2
+ import { _ as r } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const c = {}, s = { class: "btn px-4 py-2" };
4
+ function _(t, p) {
5
+ return o(), e("button", s, [
6
+ n(t.$slots, "default")
7
+ ]);
8
+ }
9
+ const l = /* @__PURE__ */ r(c, [["render", _]]);
10
+ export {
11
+ l as B
12
+ };
@@ -0,0 +1,14 @@
1
+ import { openBlock as t, createElementBlock as o, createElementVNode as n, renderSlot as r } from "vue";
2
+ import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const s = {}, l = { class: "flex items-center" }, i = { class: "inline-block text-2xl sm:text-xl font-extrabold tracking-tight" };
4
+ function a(e, _) {
5
+ return t(), o("div", l, [
6
+ n("h1", i, [
7
+ r(e.$slots, "default")
8
+ ])
9
+ ]);
10
+ }
11
+ const f = /* @__PURE__ */ c(s, [["render", a]]);
12
+ export {
13
+ f as C
14
+ };
@@ -0,0 +1,38 @@
1
+ var d = Object.defineProperty;
2
+ var C = (e, t, s) => t in e ? d(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var i = (e, t, s) => C(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { f as b } from "./forEach-DN2We3cJ.js";
5
+ class x {
6
+ constructor(t = []) {
7
+ this.columns = [], b(t, (s) => {
8
+ this.addColumn(s);
9
+ });
10
+ }
11
+ addColumn(t) {
12
+ var s;
13
+ t.order || (t.order = (s = this.columns) == null ? void 0 : s.length), this.columns.push(t);
14
+ }
15
+ }
16
+ class k {
17
+ constructor({ name: t, key: s, formatter: o, type: n, sortable: a, filterable: l, visible: r, order: h, render: f, size: p, className: u, thClassName: y, tdClassName: m, trClassName: c } = {}) {
18
+ i(this, "name", "");
19
+ i(this, "key", "");
20
+ i(this, "formatter", null);
21
+ i(this, "render", null);
22
+ i(this, "type", "text");
23
+ i(this, "sortable", !1);
24
+ i(this, "filterable", !1);
25
+ i(this, "visible", !0);
26
+ i(this, "order", 0);
27
+ i(this, "size", "auto");
28
+ i(this, "className", "");
29
+ i(this, "thClassName", "");
30
+ i(this, "tdClassName", "");
31
+ i(this, "trClassName", "");
32
+ t && (this.name = t), s && (this.key = s), o && typeof o == "function" && (this.formatter = o), typeof n == "string" && (this.type = n), typeof a == "boolean" && (this.sortable = a), typeof l == "boolean" && (this.filterable = l), typeof r == "boolean" && (this.visible = r), typeof h == "number" && (this.order = h), f && typeof f == "function" && (this.render = f), typeof p < "u" && (this.size = p.toString()), typeof u == "string" && (this.className = u), typeof y == "string" && (this.thClassName = y), typeof m == "string" && (this.tdClassName = m), typeof c == "string" && (this.trClassName = c);
33
+ }
34
+ }
35
+ export {
36
+ k as C,
37
+ x as a
38
+ };
@@ -0,0 +1,622 @@
1
+ import { ref as y, openBlock as l, createElementBlock as a, createElementVNode as t, toDisplayString as m, createCommentVNode as v, computed as b, normalizeClass as k, normalizeStyle as w, Fragment as B, renderList as A, onMounted as O, createVNode as C, withModifiers as L, withCtx as j, createTextVNode as J, createBlock as $, unref as S, renderSlot as D, onBeforeUnmount as V, resolveComponent as H } from "vue";
2
+ import { B as M } from "./ButtonComponent-DOEH129x.js";
3
+ import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import "laravel-vue-i18n";
5
+ import "@vuepic/vue-datepicker";
6
+ import { u as Z, _ as G, E as K } from "./LabelComponent-CfsH2P2a.js";
7
+ import { AkCloudUpload as W, AkChevronRightSmall as X, AkChevronDownSmall as Q, AkSend as Y } from "@kalimahapps/vue-icons";
8
+ import { d as ee } from "./debounce-C1ND-yYU.js";
9
+ import { a as te } from "./isObject-BD_iszZg.js";
10
+ var oe = "Expected a function";
11
+ function re(o, e, r) {
12
+ var n = !0, s = !0;
13
+ if (typeof o != "function")
14
+ throw new TypeError(oe);
15
+ return te(r) && (n = "leading" in r ? !!r.leading : n, s = "trailing" in r ? !!r.trailing : s), ee(o, e, {
16
+ leading: n,
17
+ maxWait: e,
18
+ trailing: s
19
+ });
20
+ }
21
+ const ne = {
22
+ key: 0,
23
+ class: "bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative",
24
+ role: "alert"
25
+ }, le = { class: "font-bold" }, se = {
26
+ key: 0,
27
+ class: "block sm:inline mx-2"
28
+ }, ae = { class: "absolute top-0 bottom-0 right-0 px-4 py-3" }, ie = /* @__PURE__ */ t("title", null, " Close ", -1), ce = /* @__PURE__ */ t("path", { d: "M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z" }, null, -1), ue = [
29
+ ie,
30
+ ce
31
+ ], de = {
32
+ __name: "AlertComponent",
33
+ props: {
34
+ alertMessage: {
35
+ type: String,
36
+ default: "Alert"
37
+ },
38
+ message: {
39
+ type: String,
40
+ default: null
41
+ },
42
+ closable: {
43
+ type: Boolean,
44
+ default: !0
45
+ }
46
+ },
47
+ setup(o) {
48
+ const e = y(!1);
49
+ return (r, n) => e.value ? v("", !0) : (l(), a("div", ne, [
50
+ t("strong", le, m(o.alertMessage), 1),
51
+ o.message ? (l(), a("span", se, m(o.message), 1)) : v("", !0),
52
+ t("span", ae, [
53
+ o.closable ? (l(), a("svg", {
54
+ key: 0,
55
+ onClick: n[0] || (n[0] = (s) => e.value = !0),
56
+ class: "fill-current h-6 w-6 text-red-500",
57
+ role: "button",
58
+ xmlns: "http://www.w3.org/2000/svg",
59
+ viewBox: "0 0 20 20"
60
+ }, ue)) : v("", !0)
61
+ ])
62
+ ]));
63
+ }
64
+ }, pe = ["title"], T = {
65
+ __name: "AvatarComponent",
66
+ props: {
67
+ name: {
68
+ type: String,
69
+ required: !0
70
+ },
71
+ size: {
72
+ type: Number,
73
+ default: 10
74
+ },
75
+ initials: {
76
+ type: String,
77
+ default: ""
78
+ },
79
+ backgroundColor: {
80
+ type: String,
81
+ default: "#e0e0e0"
82
+ },
83
+ textColor: {
84
+ type: String,
85
+ default: "#000000"
86
+ }
87
+ },
88
+ setup(o) {
89
+ const e = o, r = b(() => {
90
+ var s, i;
91
+ if (e.initials)
92
+ return e.initials;
93
+ {
94
+ if (!e.name)
95
+ return "";
96
+ const c = e.name.split(" ");
97
+ return ((s = c[0]) == null ? void 0 : s.charAt(0)) + ((i = c[1]) == null ? void 0 : i.charAt(0));
98
+ }
99
+ }), n = () => ({
100
+ width: e.size + "px",
101
+ height: e.size + "px",
102
+ backgroundColor: e.backgroundColor,
103
+ color: e.textColor,
104
+ fontSize: e.size / 2 + "px"
105
+ });
106
+ return (s, i) => (l(), a("abbr", {
107
+ title: o.name,
108
+ class: k(["no-underline rounded-full bg-gray-200 flex justify-center items-center text-gray-500 p-2", s.computedSizeClass]),
109
+ style: w(n())
110
+ }, m(r.value), 15, pe));
111
+ }
112
+ }, me = {
113
+ class: "breadcrumb flex space-x-2",
114
+ itemscope: "",
115
+ itemtype: "http://schema.org/BreadcrumbList"
116
+ }, fe = ["href"], _e = { itemprop: "name" }, ve = {
117
+ key: 1,
118
+ itemprop: "name",
119
+ class: "inline-block relative px-4 py-2 text-gray-500"
120
+ }, ge = ["content"], he = {
121
+ __name: "BreadcrumbsComponent",
122
+ props: {
123
+ items: {
124
+ type: Array,
125
+ required: !0
126
+ },
127
+ activeItemColor: {
128
+ type: String,
129
+ default: "#0000ff"
130
+ },
131
+ hoverItemColor: {
132
+ type: String,
133
+ default: "lightsalmon"
134
+ }
135
+ },
136
+ setup(o) {
137
+ const e = o, r = (n) => ({
138
+ "--active-bg-color": n.active ? e.activeItemColor : "transparent",
139
+ "--hover-bg-color": n.active ? e.activeItemColor : e.hoverItemColor
140
+ });
141
+ return (n, s) => (l(), a("nav", null, [
142
+ t("ol", me, [
143
+ (l(!0), a(B, null, A(e.items, (i, c) => (l(), a("li", {
144
+ key: c,
145
+ class: "breadcrumb-item relative",
146
+ itemprop: "itemListElement",
147
+ itemscope: "",
148
+ itemtype: "http://schema.org/ListItem",
149
+ style: w(r(i))
150
+ }, [
151
+ c < e.items.length - 1 ? (l(), a("a", {
152
+ key: 0,
153
+ href: i.href,
154
+ itemprop: "item",
155
+ class: k(["inline-block relative px-4 py-2 text-gray-500 no-underline", o.hoverItemColor])
156
+ }, [
157
+ t("span", _e, m(i.name), 1)
158
+ ], 10, fe)) : (l(), a("span", ve, m(i.name), 1)),
159
+ t("meta", {
160
+ itemprop: "position",
161
+ content: c + 1
162
+ }, null, 8, ge)
163
+ ], 4))), 128))
164
+ ])
165
+ ]));
166
+ }
167
+ }, ye = /* @__PURE__ */ R(he, [["__scopeId", "data-v-01d278b9"]]), Ce = { class: "w-full space-y-4" }, xe = { class: "flex items-center w-full" }, be = { class: "ml-2 text-gray-500" }, ke = ["id", "name", "accept", "disabled", "multiple"], $e = {
168
+ key: 0,
169
+ class: "flex flex-col space-y-2 w-full"
170
+ }, Se = { class: "flex items-center" }, we = { class: "flex flex-col" }, ze = { class: "font-semibold text-gray-800" }, Ie = { class: "text-sm text-gray-500" }, Be = {
171
+ __name: "DropzoneComponent",
172
+ props: {
173
+ label: {
174
+ type: String,
175
+ default: () => "Choose the File"
176
+ },
177
+ name: String,
178
+ accept: String,
179
+ disabled: {
180
+ type: Boolean,
181
+ default: !1
182
+ },
183
+ error: {
184
+ type: String,
185
+ default: () => ""
186
+ },
187
+ required: {
188
+ type: Boolean,
189
+ default: !1
190
+ },
191
+ maxSizeInMegaBytes: {
192
+ type: Number,
193
+ default: 10
194
+ // in MB
195
+ },
196
+ multiple: {
197
+ type: Boolean,
198
+ default: !1
199
+ }
200
+ },
201
+ emits: ["file-selected", "file-removed"],
202
+ setup(o, { emit: e }) {
203
+ const r = e, n = o, s = y([]), i = y(null), c = y(null), p = y(null), f = (u) => u ? u.type : "", x = (u) => u ? u.size > 1024 * 1024 ? (u.size / 1024 / 1024).toFixed(2) + " MB" : (u.size / 1024).toFixed(2) + " KB" : "";
204
+ O(() => {
205
+ c.value = Z("input_group_");
206
+ });
207
+ const z = (u) => {
208
+ const g = n.accept.split(",").map((q) => q.trim()), _ = u.name.split(".").pop().toLowerCase(), h = n.maxSizeInMegaBytes * 1024 * 1024;
209
+ return g.includes(`.${_}`) ? u.size > h ? (p.value = `File size exceeds the maximum limit of ${n.maxSizeInMegaBytes} MB.`, !1) : (p.value = null, !0) : (p.value = `Invalid file type. Accepted types are: ${n.accept}`, !1);
210
+ }, d = (u) => {
211
+ const _ = Array.from(u.target.files).filter(z);
212
+ s.value = n.multiple ? [...s.value, ..._] : _, _.forEach((h) => r("file-selected", h)), E();
213
+ }, F = (u) => {
214
+ const _ = Array.from(u.dataTransfer.files).filter(z);
215
+ s.value = n.multiple ? [...s.value, ..._] : _, _.forEach((h) => r("file-selected", h)), E();
216
+ }, I = () => {
217
+ i.value.click();
218
+ }, U = (u) => {
219
+ const g = s.value.splice(u, 1)[0];
220
+ r("file-removed", g), E();
221
+ }, E = () => {
222
+ i.value.value = null;
223
+ }, N = b(() => n.error || p.value);
224
+ return (u, g) => (l(), a("div", Ce, [
225
+ C(G, {
226
+ for: c.value,
227
+ value: o.label,
228
+ required: o.required,
229
+ class: "w-full"
230
+ }, null, 8, ["for", "value", "required"]),
231
+ t("div", {
232
+ class: "flex flex-col items-start justify-start w-full border-2 border-dashed border-gray-300 p-2 cursor-pointer hover:border-gray-400 space-y-4",
233
+ onDrop: L(F, ["prevent"]),
234
+ onDragover: g[0] || (g[0] = L(() => {
235
+ }, ["prevent"]))
236
+ }, [
237
+ t("div", xe, [
238
+ C(M, {
239
+ class: "bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600",
240
+ onClick: I
241
+ }, {
242
+ default: j(() => [
243
+ J(m(u.$t("Browse")), 1)
244
+ ]),
245
+ _: 1
246
+ }),
247
+ t("span", be, m(u.$t("or drop your file here")), 1)
248
+ ]),
249
+ t("input", {
250
+ id: c.value,
251
+ ref_key: "fileInput",
252
+ ref: i,
253
+ name: o.name,
254
+ accept: o.accept,
255
+ disabled: o.disabled,
256
+ multiple: o.multiple,
257
+ type: "file",
258
+ class: "hidden",
259
+ onChange: d
260
+ }, null, 40, ke),
261
+ N.value ? (l(), $(S(K), {
262
+ key: 0,
263
+ class: "mt-2",
264
+ message: N.value
265
+ }, null, 8, ["message"])) : v("", !0)
266
+ ], 32),
267
+ s.value.length ? (l(), a("div", $e, [
268
+ (l(!0), a(B, null, A(s.value, (_, h) => (l(), a("div", {
269
+ key: h,
270
+ class: "flex items-center justify-between w-full"
271
+ }, [
272
+ t("div", Se, [
273
+ C(S(W), { class: "bg-danger text-white rounded-full w-6 h-6 p-1 m-1" }),
274
+ t("div", we, [
275
+ t("span", ze, m(_.name), 1),
276
+ t("span", Ie, m(f(_)) + " · " + m(x(_)), 1)
277
+ ])
278
+ ]),
279
+ C(M, {
280
+ type: "primary",
281
+ class: "bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600",
282
+ onClick: (q) => U(h)
283
+ }, {
284
+ default: j(() => [
285
+ J(m(u.$t("Remove")), 1)
286
+ ]),
287
+ _: 2
288
+ }, 1032, ["onClick"])
289
+ ]))), 128))
290
+ ])) : v("", !0)
291
+ ]));
292
+ }
293
+ }, Ae = { class: "flex items-center space-x-2 w-full" }, Fe = { class: "flex-grow" }, Ee = { class: "border-t-2 pt-4" }, De = { class: "p-4 border-primary border-l-4" }, Me = {
294
+ __name: "FoldableComponent",
295
+ props: {},
296
+ emits: ["open", "close"],
297
+ setup(o, { emit: e }) {
298
+ const r = e, n = () => {
299
+ i.value = !1, r("close");
300
+ }, s = () => {
301
+ i.value = !0, r("open");
302
+ }, i = y(!1);
303
+ return (c, p) => (l(), a("div", null, [
304
+ t("div", Ae, [
305
+ t("div", null, [
306
+ i.value ? (l(), $(S(Q), {
307
+ key: 1,
308
+ class: "text-2xl cursor-pointer",
309
+ onClick: n
310
+ })) : (l(), $(S(X), {
311
+ key: 0,
312
+ class: "text-2xl cursor-pointer",
313
+ onClick: s
314
+ }))
315
+ ]),
316
+ t("div", Fe, [
317
+ D(c.$slots, "header")
318
+ ])
319
+ ]),
320
+ t("div", {
321
+ class: k([{ "h-0": !i.value }, "overflow-y-hidden duration-600 transition-all relative border-gray-500"])
322
+ }, [
323
+ t("div", Ee, [
324
+ t("div", De, [
325
+ D(c.$slots, "content")
326
+ ])
327
+ ])
328
+ ], 2)
329
+ ]));
330
+ }
331
+ }, Re = {
332
+ __name: "InfiniteScrollComponent",
333
+ emits: ["scroll"],
334
+ setup(o, { emit: e }) {
335
+ const r = y(null), n = e, s = re(() => {
336
+ n("scroll");
337
+ }, 500), i = () => {
338
+ const c = r.value.scrollTop + r.value.clientHeight - window.innerHeight, p = document.documentElement.scrollTop;
339
+ c <= p && s();
340
+ };
341
+ return O(() => {
342
+ window.addEventListener("scroll", i);
343
+ }), V(() => {
344
+ window.removeEventListener("scroll", i);
345
+ }), (c, p) => (l(), a("div", {
346
+ ref_key: "infiniteScroller",
347
+ ref: r
348
+ }, [
349
+ D(c.$slots, "default")
350
+ ], 512));
351
+ }
352
+ }, Te = { class: "flex w-full" }, Ne = { class: "flex-1 border rounded-l-2xl ml-1 p-2" }, qe = ["placeholder"], Le = { class: "border rounded-r-2xl flex items-center p-2 leading-loose cursor-pointer" }, je = {
353
+ __name: "NotesInputComponent",
354
+ props: {
355
+ avatar: {
356
+ type: Object,
357
+ default: () => ({
358
+ name: "John Doe",
359
+ size: 40,
360
+ initials: "JD",
361
+ backgroundColor: "#ffcc00",
362
+ textColor: "#ffffff"
363
+ })
364
+ },
365
+ inputPlaceholder: {
366
+ type: String,
367
+ default: "Écrire un commentaire"
368
+ }
369
+ },
370
+ setup(o) {
371
+ const e = o;
372
+ return (r, n) => (l(), a("div", Te, [
373
+ t("div", null, [
374
+ C(T, {
375
+ name: e.avatar.name,
376
+ size: e.avatar.size,
377
+ initials: e.avatar.initials,
378
+ backgroundColor: e.avatar.backgroundColor,
379
+ textColor: e.avatar.textColor
380
+ }, null, 8, ["name", "size", "initials", "backgroundColor", "textColor"])
381
+ ]),
382
+ t("div", Ne, [
383
+ t("input", {
384
+ class: "w-full h-full leading-loose no-focus-border",
385
+ type: "text",
386
+ placeholder: e.inputPlaceholder
387
+ }, null, 8, qe)
388
+ ]),
389
+ t("div", Le, [
390
+ C(S(Y), { class: "icon-size" })
391
+ ])
392
+ ]));
393
+ }
394
+ }, P = /* @__PURE__ */ R(je, [["__scopeId", "data-v-6911550c"]]), Je = {
395
+ key: 0,
396
+ class: "grid grid-cols-1 gap-2 px-2"
397
+ }, Oe = { class: "pr-2" }, Pe = { class: "flex-1" }, Ue = { class: "border rounded-2xl p-3 bg-accent-50" }, Ve = { class: "mt-2" }, He = { class: "flex" }, Ze = { class: "ml-4 mt-1 text-secondary w-full" }, Ge = ["onClick"], Ke = {
398
+ key: 1,
399
+ class: "text-center bg-accent-50 py-6 text-accent-400 rounded font-bold"
400
+ }, We = {
401
+ __name: "NotesCommentComponent",
402
+ props: {
403
+ user: {
404
+ type: Object,
405
+ default: () => ({
406
+ name: "John Doe",
407
+ size: 40,
408
+ initials: "JD",
409
+ backgroundColor: "#ffcc00",
410
+ textColor: "#ffffff"
411
+ })
412
+ },
413
+ comments: {
414
+ type: Array,
415
+ default: () => [
416
+ {
417
+ id: 1,
418
+ parent_id: null,
419
+ content: "Comment content",
420
+ created_at: "2021-09-01T00:00:00Z",
421
+ user: {
422
+ name: "Jane Doe",
423
+ size: 50,
424
+ initials: "JD",
425
+ backgroundColor: "#ffcc00",
426
+ textColor: "#ffffff"
427
+ },
428
+ children: [
429
+ {
430
+ id: 2,
431
+ parent_id: 1,
432
+ content: "Comment content",
433
+ created_at: "2021-09-01T00:00:00Z",
434
+ user: {
435
+ name: "John Smith",
436
+ size: 40,
437
+ initials: "JS",
438
+ backgroundColor: "#00ccff",
439
+ textColor: "#000000"
440
+ },
441
+ children: []
442
+ }
443
+ ]
444
+ }
445
+ ]
446
+ },
447
+ createdAtTextColor: {
448
+ type: String,
449
+ default: "rgba(125,211,252, 1)"
450
+ }
451
+ },
452
+ setup(o) {
453
+ const e = o, r = y(null), n = b(() => e.comments), s = (f) => f.parent_id === null && r.value !== f.id, i = (f) => r.value === f.id, c = (f) => {
454
+ r.value = r.value === f.id ? null : f.id;
455
+ }, p = (f, x) => {
456
+ f.parent_id = x.id, emit("send", f), c(x);
457
+ };
458
+ return (f, x) => {
459
+ const z = H("NotesCommentComponent", !0);
460
+ return n.value.length ? (l(), a("div", Je, [
461
+ (l(!0), a(B, null, A(n.value, (d, F) => (l(), a("div", {
462
+ key: F,
463
+ class: "flex"
464
+ }, [
465
+ t("div", Oe, [
466
+ C(T, {
467
+ name: d.user.name,
468
+ size: d.user.size,
469
+ initials: d.user.initials,
470
+ backgroundColor: d.user.backgroundColor,
471
+ textColor: d.user.textColor
472
+ }, null, 8, ["name", "size", "initials", "backgroundColor", "textColor"])
473
+ ]),
474
+ t("div", Pe, [
475
+ t("div", Ue, [
476
+ t("div", null, m(d.content), 1),
477
+ d.created_at ? (l(), a("div", {
478
+ key: 0,
479
+ class: "text-right text-xs",
480
+ style: w({ color: e.createdAtTextColor })
481
+ }, m(new Date(d.created_at).toLocaleString()), 5)) : v("", !0)
482
+ ]),
483
+ t("div", Ve, [
484
+ d.children && d.children.length ? (l(), $(z, {
485
+ key: 0,
486
+ comments: d.children,
487
+ user: d.user
488
+ }, null, 8, ["comments", "user"])) : v("", !0)
489
+ ]),
490
+ t("div", He, [
491
+ t("div", Ze, [
492
+ s(d) ? (l(), a("span", {
493
+ key: 0,
494
+ class: "cursor-pointer hover:underline",
495
+ onClick: (I) => c(d)
496
+ }, "Répondre", 8, Ge)) : v("", !0),
497
+ i(d) ? (l(), $(P, {
498
+ key: 1,
499
+ onSend: (I) => p(I, d)
500
+ }, null, 8, ["onSend"])) : v("", !0)
501
+ ])
502
+ ])
503
+ ])
504
+ ]))), 128))
505
+ ])) : (l(), a("div", Ke, " Aucun commentaires pour l'instant "));
506
+ };
507
+ }
508
+ }, Xe = /* @__PURE__ */ R(We, [["__scopeId", "data-v-a7244478"]]), Qe = { class: "w-full" }, Ye = { class: "relative flex items-center justify-between w-full" }, et = { class: "mt-2 text-sm text-gray-500" }, tt = {
509
+ class: "absolute left-0 w-full h-1 bg-gray-300 -z-10 transform -translate-y-1/2",
510
+ style: { top: "32%" }
511
+ }, ot = {
512
+ __name: "StepsComponent",
513
+ props: {
514
+ steps: {
515
+ type: Array,
516
+ required: !0
517
+ },
518
+ currentStep: {
519
+ type: Number,
520
+ default: 0
521
+ },
522
+ progressBarColor: {
523
+ type: String,
524
+ default: "bg-blue-500"
525
+ },
526
+ circleBorderColor: {
527
+ type: String,
528
+ default: "border-blue-500"
529
+ }
530
+ },
531
+ setup(o) {
532
+ const e = o, r = b(() => Math.min(Math.max(e.currentStep, 0), e.steps.length)), n = b(() => {
533
+ const s = e.steps.length - 1;
534
+ if (s === 0) return 0;
535
+ const i = r.value / s * 100;
536
+ return Math.min(i, 100);
537
+ });
538
+ return (s, i) => (l(), a("div", Qe, [
539
+ t("div", Ye, [
540
+ (l(!0), a(B, null, A(e.steps, (c, p) => (l(), a("div", {
541
+ key: p,
542
+ class: "flex flex-col items-center"
543
+ }, [
544
+ t("div", {
545
+ class: k([
546
+ "flex items-center justify-center h-12 w-12 text-gray-500 text-xl font-medium rounded-full bg-white border-4 transition-colors duration-500 ease-in-out",
547
+ {
548
+ [o.circleBorderColor]: p < r.value,
549
+ "text-blue-500": p < r.value,
550
+ "border-gray-300": p >= r.value
551
+ }
552
+ ])
553
+ }, m(p + 1), 3),
554
+ t("span", et, m(c), 1)
555
+ ]))), 128)),
556
+ t("div", tt, [
557
+ t("div", {
558
+ class: k(["h-full transition-all duration-500 ease-in-out", o.progressBarColor]),
559
+ style: w({ width: n.value + "%" })
560
+ }, null, 6)
561
+ ])
562
+ ])
563
+ ]));
564
+ }
565
+ }, rt = {
566
+ __name: "TagComponent",
567
+ props: {
568
+ backgroundColor: {
569
+ type: String,
570
+ default: "#e0e0e0"
571
+ },
572
+ textColor: {
573
+ type: String,
574
+ default: "#000000"
575
+ },
576
+ text: {
577
+ type: String,
578
+ required: !0
579
+ },
580
+ borderRadius: {
581
+ type: String,
582
+ default: "4px"
583
+ }
584
+ },
585
+ setup(o) {
586
+ const e = o;
587
+ return (r, n) => (l(), a("div", {
588
+ style: w({
589
+ backgroundColor: e.backgroundColor,
590
+ color: e.textColor,
591
+ borderRadius: e.borderRadius
592
+ }),
593
+ class: "px-4 py-2 inline-block"
594
+ }, m(e.text), 5));
595
+ }
596
+ }, mt = {
597
+ AlertComponent: de,
598
+ ButtonComponent: M,
599
+ AvatarComponent: T,
600
+ BreadcrumbsComponent: ye,
601
+ DropzoneComponent: Be,
602
+ FoldableComponent: Me,
603
+ InfiniteScrollComponent: Re,
604
+ NotesCommentComponent: Xe,
605
+ NotesInputComponent: P,
606
+ StepsComponent: ot,
607
+ TagComponent: rt
608
+ };
609
+ export {
610
+ de as AlertComponent,
611
+ T as AvatarComponent,
612
+ ye as BreadcrumbsComponent,
613
+ M as ButtonComponent,
614
+ Be as DropzoneComponent,
615
+ Me as FoldableComponent,
616
+ Re as InfiniteScrollComponent,
617
+ Xe as NotesCommentComponent,
618
+ P as NotesInputComponent,
619
+ ot as StepsComponent,
620
+ rt as TagComponent,
621
+ mt as default
622
+ };