golden-logic-ui 1.2.21 → 1.2.23

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 (68) hide show
  1. package/dist/ConfirmationModal-i3ekouBw.js +75 -0
  2. package/dist/DatatableAction-D-Qdjj2W.js +113 -0
  3. package/dist/DatatableCommand-BoU5cYJg.js +18 -0
  4. package/dist/DatatableConvertCronToHuman-Coiaa-wa.js +82 -0
  5. package/dist/DatatableDate-DtEktp_Z.js +20 -0
  6. package/dist/DatatableDateTime-PEXV-bY7.js +22 -0
  7. package/dist/DatatableDeleteAction-BQ6MyhV6.js +104 -0
  8. package/dist/DatatableDeleteEditAction-Cx324OUt.js +125 -0
  9. package/dist/DatatableFileDownload-BxP2_lpQ.js +87 -0
  10. package/dist/DatatableFiles-BROH3vBH.js +80 -0
  11. package/dist/DatatableHtml-ChZzeapg.js +17 -0
  12. package/dist/DatatableList-BSVI22pu.js +35 -0
  13. package/dist/DatatableListNested-BWEqWRCc.js +37 -0
  14. package/dist/DatatablePicture-DaWD4uIX.js +26 -0
  15. package/dist/DatatablePictures-xxeghKp3.js +39 -0
  16. package/dist/DatatableStatus-Dx60sa7s.js +31 -0
  17. package/dist/DatatableStatusGeneral-UOub65UY.js +59 -0
  18. package/dist/DatatableStatusServer-Dcq11U5_.js +37 -0
  19. package/dist/DatatableStatusSpecficColor-BYUuGgEb.js +64 -0
  20. package/dist/DatatableStatusTextLabelGeneral-J4MytOnh.js +83 -0
  21. package/dist/DeleteConfirmationModal-CQ07_qiL.js +96 -0
  22. package/dist/DynamicConfirmation-rEhA3jCe.js +115 -0
  23. package/dist/FilesUpload-JKyOru3A.js +300 -0
  24. package/dist/GLButton-ByIDh6vq.js +118 -0
  25. package/dist/GLDataTable-Bixwkdr4.js +278 -0
  26. package/dist/GLDataTableServerSide-Ra5AqDGB.js +16336 -0
  27. package/dist/GLTextarea-j7XXWI7A.js +110 -0
  28. package/dist/GlAccordion-BIAfvctc.js +91 -0
  29. package/dist/GlAccordionsWrapper-DsdunDzi.js +31 -0
  30. package/dist/GlCard-BVXmTv6q.js +37 -0
  31. package/dist/GlCodeCopy-C068yRcM.js +86 -0
  32. package/dist/GlCodeMirror-Ow8TJYSN.js +161 -0
  33. package/dist/GlCodeMirrorTranslate-CFmoM7d6.js +2068 -0
  34. package/dist/GlDataTableComponent-CSsMcDcX.js +366 -0
  35. package/dist/GlDataTableServerSideGroupBy-cG4BhXOA.js +260 -0
  36. package/dist/GlDateRangePicker-BWAEfZTB.js +124 -0
  37. package/dist/GlDropdown-B_zVkmxO.js +414 -0
  38. package/dist/GlLanguageSelector-DmWuIxzK.js +68 -0
  39. package/dist/GlModal-AMtSRssu.js +123 -0
  40. package/dist/GlModalShow-BzbcLu51.js +120 -0
  41. package/dist/GlModalWithoutOverflow-vR50Ulka.js +127 -0
  42. package/dist/GlMultiItemSlide-CxsiUcTr.js +409 -0
  43. package/dist/GlMultiItemSlideDynamic-BhdHrj3L.js +434 -0
  44. package/dist/GlMultiSelectDropdown-OaAC5ouZ.js +383 -0
  45. package/dist/GlTab-CUbU0yit.js +22 -0
  46. package/dist/GlTabShow-BBU3VU7O.js +21 -0
  47. package/dist/GlTabsWrapper-Dw7NAgDw.js +54 -0
  48. package/dist/GlTextCopy-CGgnIqPh.js +93 -0
  49. package/dist/GlTextInput-CoL8oZSw.js +126 -0
  50. package/dist/GlTextInputFile-BE2maeRQ.js +95 -0
  51. package/dist/GlTextInputWithText-C6fzOoYl.js +116 -0
  52. package/dist/GlTextTranslate-C3DzCK6k.js +125 -0
  53. package/dist/GlTextareaTranslate-DyU86Wf_.js +126 -0
  54. package/dist/GlTinymce-CjsbThKo.js +118 -0
  55. package/dist/GlTinymceTranslate-vp6hYqDK.js +188 -0
  56. package/dist/GlToastList-eeZ0hUJQ.js +126 -0
  57. package/dist/GlToggleBox-Dym29cx5.js +120 -0
  58. package/dist/GlToggleBoxTrueFalse-CjvcXXTw.js +112 -0
  59. package/dist/StatusConnectingConnectedDisconnected-CK5YzyQH.js +63 -0
  60. package/dist/StatusRunningSuccessFailed-CxK20462.js +41 -0
  61. package/dist/TailwindPagination-Dz89aS_l.js +276 -0
  62. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  63. package/dist/golden-logic-ui.css +1 -1
  64. package/dist/golden-logic-ui.js +217 -94352
  65. package/dist/golden-logic-ui.umd.cjs +94 -94
  66. package/dist/index-B4V16SEr.js +15668 -0
  67. package/dist/plugin-D6yBFU6i.js +53226 -0
  68. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ import { ref as g, onMounted as k, onBeforeUnmount as x, watch as v, computed as w, createElementBlock as d, openBlock as m, Fragment as p, createCommentVNode as y, normalizeClass as s, createElementVNode as a, toDisplayString as i, withDirectives as V, vModelText as C, nextTick as S } from "vue";
2
+ import { t as B } from "./plugin-D6yBFU6i.js";
3
+ const T = { class: "font-bold ptext-lg dark:text-white" }, E = ["id"], M = ["for"], N = ["name", "id", "type"], q = { class: "gl-span-form-error" }, D = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, z = {
4
+ __name: "GlTinymce",
5
+ props: {
6
+ is_required: { type: Boolean, default: !1 },
7
+ show: { type: Boolean, default: !1 },
8
+ error_message: { type: String, default: "" },
9
+ model_value: { type: [String, Number], default: null },
10
+ modelValue: { type: [String, Number], default: "" },
11
+ type: { type: String, default: "text" },
12
+ field_name: { type: String, default: "" },
13
+ label_name: { type: String, default: "" },
14
+ description: { type: String, default: "" }
15
+ },
16
+ emits: ["update:modelValue", "keydown"],
17
+ setup(e, { expose: b, emit: h }) {
18
+ const o = e, u = h, f = g(null);
19
+ let l = null;
20
+ g(!1), k(async () => {
21
+ await S(), l && (l.destroy(), l = null), B.init({
22
+ selector: "#" + o.field_name,
23
+ height: 300,
24
+ plugins: [
25
+ "advlist",
26
+ "autolink",
27
+ "lists",
28
+ "link",
29
+ "image",
30
+ "charmap",
31
+ "preview",
32
+ "anchor",
33
+ "searchreplace",
34
+ "visualblocks",
35
+ "code",
36
+ "fullscreen",
37
+ "insertdatetime",
38
+ "media",
39
+ "table",
40
+ "help",
41
+ "wordcount"
42
+ ],
43
+ toolbar: "undo redo | blocks | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
44
+ skin: !1,
45
+ // disable import of skins
46
+ content_css: !1,
47
+ // disable import of css
48
+ images_upload_url: "/uploadImages",
49
+ setup(t) {
50
+ l = t, t.on("Change", () => {
51
+ u("update:modelValue", t.getContent());
52
+ }), t.on("init", () => {
53
+ t.setContent(o.modelValue);
54
+ });
55
+ }
56
+ });
57
+ }), x(() => {
58
+ l && (l.destroy(), l = null);
59
+ }), v(() => o.modelValue, (t) => {
60
+ l && l.getContent() !== t && l.setContent(t);
61
+ });
62
+ const c = w({
63
+ get() {
64
+ return o.modelValue;
65
+ },
66
+ set(t) {
67
+ u("update:modelValue", t);
68
+ }
69
+ });
70
+ return b({ focus: () => f.value.focus() }), (t, n) => (m(), d(p, null, [
71
+ e.show ? (m(), d("div", {
72
+ key: 0,
73
+ class: s(e.field_name)
74
+ }, [
75
+ a("h3", T, i(e.label_name), 1),
76
+ a("p", {
77
+ id: e.field_name,
78
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
79
+ }, i(e.model_value), 9, E),
80
+ n[2] || (n[2] = a("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
81
+ ], 2)) : y("", !0),
82
+ e.show ? y("", !0) : (m(), d("div", {
83
+ key: 1,
84
+ class: s(["mb-4", e.field_name])
85
+ }, [
86
+ a("label", {
87
+ class: s({
88
+ "gl-label-form": e.error_message == "",
89
+ "gl-label-form-invalid": e.error_message !== "",
90
+ required: e.is_required
91
+ }),
92
+ for: e.field_name
93
+ }, i(e.label_name), 11, M),
94
+ V(a("textarea", {
95
+ name: e.field_name,
96
+ id: e.field_name,
97
+ class: s(["tiny", {
98
+ "gl-textarea-form mt-4": e.error_message == "",
99
+ "gl-textarea-form-invalid mt-4": e.error_message !== ""
100
+ }]),
101
+ type: e.type,
102
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => c.value = r),
103
+ onKeydown: n[1] || (n[1] = (r) => t.$emit("keydown", r)),
104
+ ref_key: "input",
105
+ ref: f,
106
+ rows: "4"
107
+ }, null, 42, N), [
108
+ [C, c.value]
109
+ ]),
110
+ a("span", q, i(e.error_message), 1),
111
+ a("small", D, i(e.description), 1)
112
+ ], 2))
113
+ ], 64));
114
+ }
115
+ };
116
+ export {
117
+ z as default
118
+ };
@@ -0,0 +1,188 @@
1
+ import { ref as f, onMounted as p, onBeforeUnmount as w, watch as S, computed as C, createElementBlock as g, openBlock as c, Fragment as _, createCommentVNode as v, normalizeClass as m, createElementVNode as i, withDirectives as V, toDisplayString as o, vModelText as k, nextTick as j } from "vue";
2
+ import { t as B } from "./plugin-D6yBFU6i.js";
3
+ const N = { class: "font-bold ptext-lg dark:text-white" }, q = ["name", "id"], E = ["id"], I = ["for"], M = ["name", "id"], O = ["name", "id", "type"], U = { class: "gl-span-form-error" }, D = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, G = {
4
+ __name: "GlTinymceTranslate",
5
+ props: {
6
+ is_required: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ show: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ error_message: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ model_value: {
19
+ type: [String, Number],
20
+ default: null
21
+ },
22
+ modelValue: {
23
+ type: [String, Number],
24
+ default: ""
25
+ },
26
+ model_value_translate: {
27
+ type: [String, Object],
28
+ default: null
29
+ },
30
+ modelValueTranslate: {
31
+ type: [String, Object],
32
+ default: ""
33
+ },
34
+ type: {
35
+ type: String,
36
+ default: "text"
37
+ },
38
+ field_name: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ label_name: {
43
+ type: String,
44
+ default: ""
45
+ },
46
+ get_field_translations: {
47
+ type: String,
48
+ default: ""
49
+ },
50
+ description: {
51
+ type: String,
52
+ default: ""
53
+ },
54
+ translatable: {
55
+ type: Object,
56
+ default: null
57
+ }
58
+ },
59
+ emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
60
+ setup(e, { expose: h, emit: x }) {
61
+ const l = e, u = x, r = f(null), d = f(null);
62
+ let a = null;
63
+ f(!1);
64
+ const y = async () => {
65
+ await j(), a && (a.destroy(), a = null), B.init({
66
+ selector: "#" + l.field_name,
67
+ height: 300,
68
+ plugins: [
69
+ "advlist",
70
+ "autolink",
71
+ "lists",
72
+ "link",
73
+ "image",
74
+ "charmap",
75
+ "preview",
76
+ "anchor",
77
+ "searchreplace",
78
+ "visualblocks",
79
+ "code",
80
+ "fullscreen",
81
+ "insertdatetime",
82
+ "media",
83
+ "table",
84
+ "wordcount"
85
+ ],
86
+ toolbar: "undo redo | blocks | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
87
+ skin: !1,
88
+ // disable import of skins
89
+ content_css: !1,
90
+ // disable import of css
91
+ images_upload_url: "/uploadImages",
92
+ setup(t) {
93
+ a = t, t.on("Change", () => {
94
+ u("update:modelValue", t.getContent());
95
+ }), t.on("init", () => {
96
+ t.setContent(l.modelValue);
97
+ });
98
+ }
99
+ }), r.value.classList.add("gl-multilanguage");
100
+ }, T = () => {
101
+ d.value && u("update:modelValueTranslate", d.value.value);
102
+ };
103
+ p(y), w(() => {
104
+ a && (a.destroy(), a = null);
105
+ }), p(() => {
106
+ y(), l.modelValue && (u("update:modelValue", l.modelValue), r.value.value = l.modelValue), l.modelValueTranslate && (u("update:modelValueTranslate", l.modelValueTranslate), d.value.value = l.modelValueTranslate);
107
+ }), S(() => l.modelValue, (t) => {
108
+ a && a.getContent() !== t && a.setContent(t);
109
+ });
110
+ const b = C({
111
+ get() {
112
+ return l.modelValue;
113
+ },
114
+ set(t) {
115
+ u("update:modelValue", t);
116
+ }
117
+ });
118
+ return h({ focus: () => r.value.focus() }), (t, n) => (c(), g(_, null, [
119
+ e.show ? (c(), g("div", {
120
+ key: 0,
121
+ class: m(e.field_name)
122
+ }, [
123
+ i("h3", N, o(e.label_name), 1),
124
+ V(i("input", {
125
+ type: "hidden",
126
+ "data-i18n": "true",
127
+ name: e.field_name + "_i18n",
128
+ id: e.field_name + "_i18n",
129
+ ref_key: "input_translate",
130
+ ref: d,
131
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => t.inputTranslateValue = s)
132
+ }, null, 8, q), [
133
+ [k, t.inputTranslateValue]
134
+ ]),
135
+ i("p", {
136
+ id: e.field_name,
137
+ class: "mb-4 text-base text-gray-900 input_tr_show dark:text-white"
138
+ }, o(e.model_value), 9, E),
139
+ n[3] || (n[3] = i("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
140
+ ], 2)) : v("", !0),
141
+ e.show ? v("", !0) : (c(), g("div", {
142
+ key: 1,
143
+ class: m(["mb-4", e.field_name])
144
+ }, [
145
+ i("label", {
146
+ class: m({
147
+ "gl-label-translation-form": e.error_message == "",
148
+ "gl-label-translation-form-invalid": e.error_message !== "",
149
+ required: e.is_required
150
+ }),
151
+ for: e.field_name
152
+ }, o(e.label_name), 11, I),
153
+ n[4] || (n[4] = i("span", { class: "language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300" }, null, -1)),
154
+ i("input", {
155
+ class: "mb-4",
156
+ type: "hidden",
157
+ "data-i18n": "true",
158
+ name: e.field_name + "_i18n",
159
+ id: e.field_name + "_i18n",
160
+ onChange: T,
161
+ ref_key: "input_translate",
162
+ ref: d
163
+ }, null, 40, M),
164
+ V(i("textarea", {
165
+ name: e.field_name,
166
+ id: e.field_name,
167
+ class: m(["mt-4 tiny form-input-translation", {
168
+ " gl-textarea-form": e.error_message == "",
169
+ " gl-textarea-form-invalid": e.error_message !== ""
170
+ }]),
171
+ type: e.type,
172
+ "onUpdate:modelValue": n[1] || (n[1] = (s) => b.value = s),
173
+ onKeydown: n[2] || (n[2] = (s) => t.$emit("keydown", s)),
174
+ ref_key: "input",
175
+ ref: r,
176
+ rows: "4"
177
+ }, " ", 42, O), [
178
+ [k, b.value]
179
+ ]),
180
+ i("span", U, o(e.error_message), 1),
181
+ i("small", D, o(e.description), 1)
182
+ ], 2))
183
+ ], 64));
184
+ }
185
+ };
186
+ export {
187
+ G as default
188
+ };
@@ -0,0 +1,126 @@
1
+ import { onMounted as m, createElementBlock as n, openBlock as s, createCommentVNode as i, createElementVNode as e, toDisplayString as p, createBlock as g, TransitionGroup as v, withCtx as y, Fragment as w, renderList as x, unref as f } from "vue";
2
+ import { GlToast as u } from "./golden-logic-ui.js";
3
+ const h = {
4
+ class: "flex items-center p-4 text-gray-500 bg-white rounded-lg shadow-sm dark:bg-gray-800 dark:text-gray-400",
5
+ role: "alert"
6
+ }, k = {
7
+ key: 0,
8
+ class: "inline-flex items-center justify-center shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"
9
+ }, b = {
10
+ key: 1,
11
+ class: "inline-flex items-center justify-center shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"
12
+ }, _ = {
13
+ key: 2,
14
+ class: "inline-flex items-center justify-center shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"
15
+ }, L = { class: "ml-3 text-sm font-normal" }, C = {
16
+ __name: "ToastListItem",
17
+ props: {
18
+ message: String,
19
+ duration: {
20
+ type: Number,
21
+ default: 2e3
22
+ },
23
+ type: {
24
+ type: String,
25
+ default: "success"
26
+ }
27
+ },
28
+ emits: ["remove"],
29
+ setup(d, { emit: o }) {
30
+ const r = d;
31
+ m(() => {
32
+ setTimeout(() => l("remove"), r.duration);
33
+ });
34
+ const l = o;
35
+ return (a, t) => (s(), n("div", h, [
36
+ r.type === "success" ? (s(), n("div", k, t[1] || (t[1] = [
37
+ e("svg", {
38
+ class: "w-5 h-5",
39
+ "aria-hidden": "true",
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ fill: "currentColor",
42
+ viewBox: "0 0 20 20"
43
+ }, [
44
+ e("path", { d: "M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z" })
45
+ ], -1),
46
+ e("span", { class: "sr-only" }, "Check icon", -1)
47
+ ]))) : i("", !0),
48
+ r.type === "error" ? (s(), n("div", b, t[2] || (t[2] = [
49
+ e("svg", {
50
+ class: "w-5 h-5",
51
+ "aria-hidden": "true",
52
+ xmlns: "http://www.w3.org/2000/svg",
53
+ fill: "currentColor",
54
+ viewBox: "0 0 20 20"
55
+ }, [
56
+ e("path", { d: "M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z" })
57
+ ], -1),
58
+ e("span", { class: "sr-only" }, "Error icon", -1)
59
+ ]))) : i("", !0),
60
+ r.type === "warning" ? (s(), n("div", _, t[3] || (t[3] = [
61
+ e("svg", {
62
+ class: "w-5 h-5",
63
+ "aria-hidden": "true",
64
+ xmlns: "http://www.w3.org/2000/svg",
65
+ fill: "currentColor",
66
+ viewBox: "0 0 20 20"
67
+ }, [
68
+ e("path", { d: "M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z" })
69
+ ], -1),
70
+ e("span", { class: "sr-only" }, "Warning icon", -1)
71
+ ]))) : i("", !0),
72
+ e("div", L, p(r.message), 1),
73
+ e("button", {
74
+ onClick: t[0] || (t[0] = (c) => l("remove")),
75
+ type: "button",
76
+ class: "-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",
77
+ "data-dismiss-target": "#toast-default",
78
+ "aria-label": "Close"
79
+ }, t[4] || (t[4] = [
80
+ e("span", { class: "sr-only" }, "Close", -1),
81
+ e("svg", {
82
+ "aria-hidden": "true",
83
+ class: "w-5 h-5",
84
+ fill: "currentColor",
85
+ viewBox: "0 0 20 20",
86
+ xmlns: "http://www.w3.org/2000/svg"
87
+ }, [
88
+ e("path", {
89
+ "fill-rule": "evenodd",
90
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
91
+ "clip-rule": "evenodd"
92
+ })
93
+ ], -1)
94
+ ]))
95
+ ]));
96
+ }
97
+ }, M = {
98
+ __name: "GlToastList",
99
+ setup(d) {
100
+ function o(r) {
101
+ u.methods.remove(r);
102
+ }
103
+ return (r, l) => (s(), g(v, {
104
+ tag: "div",
105
+ "enter-from-class": "translate-x-full opacity-0",
106
+ "enter-active-class": "duration-500",
107
+ "leave-active-class": "duration-500",
108
+ "leave-to-class": "translate-x-full opacity-0",
109
+ class: "fixed z-1060 w-full max-w-xs space-y-4 top-4 right-4"
110
+ }, {
111
+ default: y(() => [
112
+ (s(!0), n(w, null, x(f(u).state.items, (a, t) => (s(), g(C, {
113
+ key: a.key,
114
+ message: a.message,
115
+ type: a.type,
116
+ duration: a.duration,
117
+ onRemove: (c) => o(t)
118
+ }, null, 8, ["message", "type", "duration", "onRemove"]))), 128))
119
+ ]),
120
+ _: 1
121
+ }));
122
+ }
123
+ };
124
+ export {
125
+ M as default
126
+ };
@@ -0,0 +1,120 @@
1
+ import { ref as p, computed as y, createElementBlock as a, openBlock as n, Fragment as h, createCommentVNode as d, normalizeClass as u, createElementVNode as r, createTextVNode as f, toDisplayString as l, withDirectives as k, vModelCheckbox as x } from "vue";
2
+ const v = { class: "flex justify-between p-2 -mb-px border border-gray-300 no-underlin" }, w = { class: "relative inline-flex items-center cursor-pointer" }, V = ["name", "id", "checked"], _ = {
3
+ key: 0,
4
+ class: "flex justify-between items-center"
5
+ }, S = { class: "gl-label-form" }, B = { class: "flex justify-between p-2 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-primaryDark" }, N = { class: "relative inline-flex items-center cursor-pointer" }, j = ["name", "id"], C = { class: "gl-span-form-error" }, D = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, E = {
6
+ __name: "GlToggleBox",
7
+ props: {
8
+ is_required: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ show: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ error_message: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ model_value: {
21
+ type: String,
22
+ required: !0
23
+ },
24
+ modelValue: {
25
+ type: [String, Number],
26
+ default: ""
27
+ },
28
+ type: {
29
+ type: String,
30
+ default: "text"
31
+ },
32
+ field_name: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ label_name: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ has_label_up: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ description: {
45
+ type: String,
46
+ default: ""
47
+ }
48
+ },
49
+ emits: ["update:modelValue"],
50
+ setup(e, { emit: c }) {
51
+ const b = e, m = c, o = p(null), s = y({
52
+ get() {
53
+ return b.modelValue;
54
+ },
55
+ set(i) {
56
+ m("update:modelValue", i);
57
+ }
58
+ });
59
+ return (i, t) => (n(), a(h, null, [
60
+ e.show ? (n(), a("div", {
61
+ key: 0,
62
+ class: u(e.field_name)
63
+ }, [
64
+ r("div", null, [
65
+ r("li", v, [
66
+ f(l(e.label_name) + " ", 1),
67
+ r("label", w, [
68
+ r("input", {
69
+ type: "checkbox",
70
+ class: "sr-only peer",
71
+ name: e.field_name,
72
+ id: e.field_name,
73
+ checked: e.modelValue,
74
+ "true-value": 1,
75
+ "false-value": 0,
76
+ ref_key: "input",
77
+ ref: o,
78
+ disabled: ""
79
+ }, null, 8, V),
80
+ t[1] || (t[1] = r("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1))
81
+ ])
82
+ ])
83
+ ]),
84
+ t[2] || (t[2] = r("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
85
+ ], 2)) : d("", !0),
86
+ e.show ? d("", !0) : (n(), a("div", {
87
+ key: 1,
88
+ class: u(e.field_name)
89
+ }, [
90
+ e.has_label_up ? (n(), a("div", _, [
91
+ r("label", S, l(e.label_name), 1)
92
+ ])) : d("", !0),
93
+ r("li", B, [
94
+ f(l(e.label_name) + " ", 1),
95
+ r("label", N, [
96
+ k(r("input", {
97
+ type: "checkbox",
98
+ class: "sr-only peer",
99
+ name: e.field_name,
100
+ id: e.field_name,
101
+ "true-value": 1,
102
+ "false-value": 0,
103
+ ref_key: "input",
104
+ ref: o,
105
+ "onUpdate:modelValue": t[0] || (t[0] = (g) => s.value = g)
106
+ }, null, 8, j), [
107
+ [x, s.value]
108
+ ]),
109
+ t[3] || (t[3] = r("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1))
110
+ ])
111
+ ]),
112
+ r("span", C, l(e.error_message), 1),
113
+ r("small", D, l(e.description), 1)
114
+ ], 2))
115
+ ], 64));
116
+ }
117
+ };
118
+ export {
119
+ E as default
120
+ };
@@ -0,0 +1,112 @@
1
+ import { ref as p, computed as y, createElementBlock as a, openBlock as n, Fragment as h, createCommentVNode as o, normalizeClass as u, createElementVNode as r, createTextVNode as f, toDisplayString as l, withDirectives as k, vModelCheckbox as x } from "vue";
2
+ const w = { class: "flex justify-between p-2 -mb-px border border-gray-300 no-underlin" }, v = { class: "relative inline-flex items-center cursor-pointer" }, V = ["name", "id", "checked"], _ = {
3
+ key: 0,
4
+ class: "flex justify-between items-center"
5
+ }, B = { class: "gl-label-form" }, S = { class: "flex justify-between p-2 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-primaryDark" }, j = { class: "relative inline-flex items-center cursor-pointer" }, C = ["name", "id"], D = { class: "gl-span-form-error" }, N = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, E = {
6
+ __name: "GlToggleBoxTrueFalse",
7
+ props: {
8
+ is_required: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ show: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ error_message: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ modelValue: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ type: {
25
+ type: String,
26
+ default: "text"
27
+ },
28
+ field_name: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ label_name: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ has_label_up: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ description: {
41
+ type: String,
42
+ default: ""
43
+ }
44
+ },
45
+ emits: ["update:modelValue"],
46
+ setup(e, { emit: c }) {
47
+ const b = e, m = c, d = p(null), s = y({
48
+ get() {
49
+ return b.modelValue;
50
+ },
51
+ set(i) {
52
+ m("update:modelValue", i);
53
+ }
54
+ });
55
+ return (i, t) => (n(), a(h, null, [
56
+ e.show ? (n(), a("div", {
57
+ key: 0,
58
+ class: u(e.field_name)
59
+ }, [
60
+ r("div", null, [
61
+ r("li", w, [
62
+ f(l(e.label_name) + " ", 1),
63
+ r("label", v, [
64
+ r("input", {
65
+ type: "checkbox",
66
+ class: "sr-only peer",
67
+ name: e.field_name,
68
+ id: e.field_name,
69
+ checked: e.modelValue,
70
+ ref_key: "input",
71
+ ref: d,
72
+ disabled: ""
73
+ }, null, 8, V),
74
+ t[1] || (t[1] = r("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1))
75
+ ])
76
+ ])
77
+ ]),
78
+ t[2] || (t[2] = r("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
79
+ ], 2)) : o("", !0),
80
+ e.show ? o("", !0) : (n(), a("div", {
81
+ key: 1,
82
+ class: u(e.field_name)
83
+ }, [
84
+ e.has_label_up ? (n(), a("div", _, [
85
+ r("label", B, l(e.label_name), 1)
86
+ ])) : o("", !0),
87
+ r("li", S, [
88
+ f(l(e.label_name) + " ", 1),
89
+ r("label", j, [
90
+ k(r("input", {
91
+ type: "checkbox",
92
+ class: "sr-only peer",
93
+ name: e.field_name,
94
+ id: e.field_name,
95
+ ref_key: "input",
96
+ ref: d,
97
+ "onUpdate:modelValue": t[0] || (t[0] = (g) => s.value = g)
98
+ }, null, 8, C), [
99
+ [x, s.value]
100
+ ]),
101
+ t[3] || (t[3] = r("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1))
102
+ ])
103
+ ]),
104
+ r("span", D, l(e.error_message), 1),
105
+ r("small", N, l(e.description), 1)
106
+ ], 2))
107
+ ], 64));
108
+ }
109
+ };
110
+ export {
111
+ E as default
112
+ };