@gspa/ui 0.1.1 → 0.1.4

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 (205) hide show
  1. package/README.md +18 -0
  2. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  3. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  4. package/dist/components/Accordion.cjs +1 -0
  5. package/dist/components/Accordion.js +192 -0
  6. package/dist/components/AccordionItem.cjs +1 -0
  7. package/dist/components/AccordionItem.js +109 -0
  8. package/dist/components/AddReminderModal.cjs +1 -0
  9. package/dist/components/AddReminderModal.js +107 -0
  10. package/dist/components/Alert.cjs +1 -0
  11. package/dist/components/Alert.js +222 -0
  12. package/dist/components/Avatar.cjs +1 -0
  13. package/dist/components/Avatar.js +86 -0
  14. package/dist/components/Badge.cjs +1 -0
  15. package/dist/components/Badge.js +109 -0
  16. package/dist/components/Breadcrumb.cjs +1 -0
  17. package/dist/components/Breadcrumb.js +72 -0
  18. package/dist/components/Button.cjs +1 -0
  19. package/dist/components/Button.js +190 -0
  20. package/dist/components/ButtonGroup.cjs +1 -0
  21. package/dist/components/ButtonGroup.js +46 -0
  22. package/dist/components/Calendar.cjs +1 -0
  23. package/dist/components/Calendar.js +341 -0
  24. package/dist/components/Card.cjs +1 -0
  25. package/dist/components/Card.js +316 -0
  26. package/dist/components/CardBody.cjs +1 -0
  27. package/dist/components/CardBody.js +34 -0
  28. package/dist/components/CardContent.cjs +1 -0
  29. package/dist/components/CardContent.js +17 -0
  30. package/dist/components/CardFooter.cjs +1 -0
  31. package/dist/components/CardFooter.js +34 -0
  32. package/dist/components/CardHeader.cjs +1 -0
  33. package/dist/components/CardHeader.js +91 -0
  34. package/dist/components/CardTitle.cjs +1 -0
  35. package/dist/components/CardTitle.js +17 -0
  36. package/dist/components/Checkbox.cjs +1 -0
  37. package/dist/components/Checkbox.js +185 -0
  38. package/dist/components/CircularProgress.cjs +1 -0
  39. package/dist/components/CircularProgress.js +141 -0
  40. package/dist/components/DataTable.cjs +1 -0
  41. package/dist/components/DataTable.js +863 -0
  42. package/dist/components/DataTableCell.cjs +1 -0
  43. package/dist/components/DataTableCell.js +95 -0
  44. package/dist/components/DataTableFilters.cjs +1 -0
  45. package/dist/components/DataTableFilters.js +519 -0
  46. package/dist/components/DataTableHeader.cjs +1 -0
  47. package/dist/components/DataTableHeader.js +116 -0
  48. package/dist/components/DataTablePagination.cjs +1 -0
  49. package/dist/components/DataTablePagination.js +290 -0
  50. package/dist/components/DataTableRow.cjs +1 -0
  51. package/dist/components/DataTableRow.js +199 -0
  52. package/dist/components/DataTableToolBar.cjs +1 -0
  53. package/dist/components/DataTableToolBar.js +477 -0
  54. package/dist/components/DatePicker.cjs +1 -0
  55. package/dist/components/DatePicker.js +401 -0
  56. package/dist/components/Divider.cjs +1 -0
  57. package/dist/components/Divider.js +103 -0
  58. package/dist/components/Dropdown.cjs +1 -0
  59. package/dist/components/Dropdown.js +104 -0
  60. package/dist/components/DropdownItem.cjs +1 -0
  61. package/dist/components/DropdownItem.js +60 -0
  62. package/dist/components/EventsCalendar.cjs +1 -0
  63. package/dist/components/EventsCalendar.js +863 -0
  64. package/dist/components/FileUpload.cjs +1 -0
  65. package/dist/components/FileUpload.js +195 -0
  66. package/dist/components/FilterDrawer.cjs +1 -0
  67. package/dist/components/FilterDrawer.js +412 -0
  68. package/dist/components/Footer.cjs +1 -0
  69. package/dist/components/Footer.js +157 -0
  70. package/dist/components/FormField.cjs +1 -0
  71. package/dist/components/FormField.js +190 -0
  72. package/dist/components/Graph.cjs +1 -0
  73. package/dist/components/Graph.js +164 -0
  74. package/dist/components/GraphFilters.cjs +1 -0
  75. package/dist/components/GraphFilters.js +305 -0
  76. package/dist/components/Header.cjs +1 -0
  77. package/dist/components/Header.js +674 -0
  78. package/dist/components/Icon.cjs +1 -0
  79. package/dist/components/Icon.js +51 -0
  80. package/dist/components/Image.cjs +1 -0
  81. package/dist/components/Image.js +112 -0
  82. package/dist/components/Input.cjs +1 -0
  83. package/dist/components/Input.js +166 -0
  84. package/dist/components/InputGroup.cjs +1 -0
  85. package/dist/components/InputGroup.js +45 -0
  86. package/dist/components/Label.cjs +1 -0
  87. package/dist/components/Label.js +46 -0
  88. package/dist/components/Link.cjs +1 -0
  89. package/dist/components/Link.js +119 -0
  90. package/dist/components/ListItem.cjs +1 -0
  91. package/dist/components/ListItem.js +89 -0
  92. package/dist/components/Loader.cjs +1 -0
  93. package/dist/components/Loader.js +154 -0
  94. package/dist/components/Logo.cjs +1 -0
  95. package/dist/components/Logo.js +67 -0
  96. package/dist/components/MenuItem.cjs +1 -0
  97. package/dist/components/MenuItem.js +66 -0
  98. package/dist/components/Modal.cjs +1 -0
  99. package/dist/components/Modal.js +110 -0
  100. package/dist/components/ModalBody.cjs +1 -0
  101. package/dist/components/ModalBody.js +33 -0
  102. package/dist/components/ModalFooter.cjs +1 -0
  103. package/dist/components/ModalFooter.js +33 -0
  104. package/dist/components/ModalHeader.cjs +1 -0
  105. package/dist/components/ModalHeader.js +24 -0
  106. package/dist/components/MultiSelect.cjs +1 -0
  107. package/dist/components/MultiSelect.js +211 -0
  108. package/dist/components/Notification.cjs +1 -0
  109. package/dist/components/Notification.js +121 -0
  110. package/dist/components/Option.cjs +1 -0
  111. package/dist/components/Option.js +44 -0
  112. package/dist/components/Progress.cjs +1 -0
  113. package/dist/components/Progress.js +77 -0
  114. package/dist/components/ProgressBar.cjs +1 -0
  115. package/dist/components/ProgressBar.js +101 -0
  116. package/dist/components/Radio.cjs +1 -0
  117. package/dist/components/Radio.js +81 -0
  118. package/dist/components/RailNav.cjs +1 -0
  119. package/dist/components/RailNav.js +124 -0
  120. package/dist/components/ReminderConfig.cjs +1 -0
  121. package/dist/components/ReminderConfig.js +375 -0
  122. package/dist/components/ReusableForm.cjs +1 -0
  123. package/dist/components/ReusableForm.js +657 -0
  124. package/dist/components/ReusableFormModal.cjs +1 -0
  125. package/dist/components/ReusableFormModal.js +112 -0
  126. package/dist/components/RightDrawer.cjs +1 -0
  127. package/dist/components/RightDrawer.js +143 -0
  128. package/dist/components/Search.cjs +1 -0
  129. package/dist/components/Search.js +252 -0
  130. package/dist/components/Select.cjs +1 -0
  131. package/dist/components/Select.js +243 -0
  132. package/dist/components/Sidebar.cjs +1 -0
  133. package/dist/components/Sidebar.js +372 -0
  134. package/dist/components/Slider.cjs +1 -0
  135. package/dist/components/Slider.js +42 -0
  136. package/dist/components/Spinner.cjs +1 -0
  137. package/dist/components/Spinner.js +87 -0
  138. package/dist/components/Stepper.cjs +1 -0
  139. package/dist/components/Stepper.js +12 -0
  140. package/dist/components/StepperItem.cjs +1 -0
  141. package/dist/components/StepperItem.js +33 -0
  142. package/dist/components/Switch.cjs +1 -0
  143. package/dist/components/Switch.js +112 -0
  144. package/dist/components/Tab.cjs +1 -0
  145. package/dist/components/Tab.js +134 -0
  146. package/dist/components/TabPanel.cjs +1 -0
  147. package/dist/components/TabPanel.js +49 -0
  148. package/dist/components/Text.cjs +1 -0
  149. package/dist/components/Text.js +84 -0
  150. package/dist/components/Textarea.cjs +1 -0
  151. package/dist/components/Textarea.js +102 -0
  152. package/dist/components/ThemeConfigurator.cjs +1 -0
  153. package/dist/components/ThemeConfigurator.js +50 -0
  154. package/dist/components/Timeline.cjs +1 -0
  155. package/dist/components/Timeline.js +24 -0
  156. package/dist/components/TimelineItem.cjs +1 -0
  157. package/dist/components/TimelineItem.js +63 -0
  158. package/dist/components/Toast.cjs +1 -0
  159. package/dist/components/Toast.js +231 -0
  160. package/dist/components/Tooltip.cjs +1 -0
  161. package/dist/components/Tooltip.js +124 -0
  162. package/dist/components/Typography.cjs +1 -0
  163. package/dist/components/Typography.js +267 -0
  164. package/dist/components/charts/BarChart.cjs +1 -0
  165. package/dist/components/charts/BarChart.js +323 -0
  166. package/dist/components/charts/LineChart.cjs +1 -0
  167. package/dist/components/charts/LineChart.js +322 -0
  168. package/dist/components/charts/PieChart.cjs +1 -0
  169. package/dist/components/charts/PieChart.js +311 -0
  170. package/dist/components/charts/StackedBarChart.cjs +1 -0
  171. package/dist/components/charts/StackedBarChart.js +348 -0
  172. package/dist/components/widgets/DashboardWidget.cjs +1 -0
  173. package/dist/components/widgets/DashboardWidget.js +309 -0
  174. package/dist/directives/tooltip.cjs +47 -0
  175. package/dist/directives/tooltip.js +115 -0
  176. package/dist/index.cjs +1 -0
  177. package/dist/index.esm.js +310 -19533
  178. package/dist/layouts/AuthLayout.cjs +1 -0
  179. package/dist/layouts/AuthLayout.js +190 -0
  180. package/dist/layouts/DashboardLayout.cjs +1 -0
  181. package/dist/layouts/DashboardLayout.js +244 -0
  182. package/dist/layouts/DefaultLayout.cjs +1 -0
  183. package/dist/layouts/DefaultLayout.js +94 -0
  184. package/dist/layouts/ErrorLayout.cjs +1 -0
  185. package/dist/layouts/ErrorLayout.js +452 -0
  186. package/dist/lib/auth.cjs +1 -0
  187. package/dist/lib/auth.js +4 -0
  188. package/dist/lib/theme.cjs +1 -0
  189. package/dist/lib/theme.js +135 -0
  190. package/dist/lib/toast.cjs +1 -0
  191. package/dist/lib/toast.js +81 -0
  192. package/dist/src/__tests__/AuthLayout.spec.d.ts +2 -0
  193. package/dist/src/__tests__/AuthLayout.spec.d.ts.map +1 -0
  194. package/dist/src/layouts/AuthLayout.vue.d.ts +10 -6
  195. package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
  196. package/dist/tsconfig.tsbuildinfo +1 -1
  197. package/dist/utils/cn.cjs +1 -0
  198. package/dist/utils/cn.js +7 -0
  199. package/package.json +43 -11
  200. package/dist/applogo.png +0 -0
  201. package/dist/favicon.ico +0 -0
  202. package/dist/index.js +0 -605
  203. package/dist/logo.png +0 -0
  204. package/dist/stlbacklogo.jpeg +0 -0
  205. package/dist/stlbacklogo.png +0 -0
@@ -0,0 +1,452 @@
1
+ import { createElementBlock as n, openBlock as s, normalizeClass as a, createCommentVNode as c, createElementVNode as t, renderSlot as f, toDisplayString as d, normalizeStyle as W, createTextVNode as m, Fragment as Y, renderList as q, getCurrentInstance as F, inject as J, ref as h, onMounted as K, onUnmounted as Q, computed as l } from "vue";
2
+ import { _ as X } from "../_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const Z = {
4
+ name: "ErrorLayout",
5
+ props: {
6
+ errorType: {
7
+ type: [String, Number],
8
+ default: "404"
9
+ },
10
+ errorCode: {
11
+ type: [String, Number],
12
+ default: null
13
+ },
14
+ errorTitle: {
15
+ type: String,
16
+ default: null
17
+ },
18
+ errorMessage: {
19
+ type: String,
20
+ default: null
21
+ },
22
+ brandName: {
23
+ type: String,
24
+ default: "Software Technologies"
25
+ },
26
+ showLogo: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ showBackground: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ showDefaultIllustration: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ showDefaultActions: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ showHomeButton: {
43
+ type: Boolean,
44
+ default: !0
45
+ },
46
+ showBackButton: {
47
+ type: Boolean,
48
+ default: !0
49
+ },
50
+ showRetryButton: {
51
+ type: Boolean,
52
+ default: !1
53
+ },
54
+ showSupportButton: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ showAdditionalInfo: {
59
+ type: Boolean,
60
+ default: !1
61
+ },
62
+ homeUrl: {
63
+ type: String,
64
+ default: "/"
65
+ },
66
+ homeButtonText: {
67
+ type: String,
68
+ default: "Go Home"
69
+ },
70
+ backButtonText: {
71
+ type: String,
72
+ default: "Go Back"
73
+ },
74
+ retryButtonText: {
75
+ type: String,
76
+ default: "Try Again"
77
+ },
78
+ helpText: {
79
+ type: String,
80
+ default: null
81
+ },
82
+ supportUrl: {
83
+ type: String,
84
+ default: null
85
+ }
86
+ },
87
+ emits: ["retry", "back", "contact-support"],
88
+ setup(o, { emit: r }) {
89
+ const i = F(), e = J("$router", null) || i?.appContext.app.config.globalProperties?.$router, x = h(!1), w = h(!1), u = h(navigator.onLine), b = h(`err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`), p = h(!1), C = () => {
90
+ u.value = navigator.onLine;
91
+ };
92
+ K(() => {
93
+ window.addEventListener("online", C), window.addEventListener("offline", C);
94
+ }), Q(() => {
95
+ window.removeEventListener("online", C), window.removeEventListener("offline", C);
96
+ });
97
+ const k = l(() => {
98
+ const g = {
99
+ 404: {
100
+ title: "Page Not Found",
101
+ message: "Sorry, we couldn't find the page you're looking for.",
102
+ icon: "🔍",
103
+ color: "#64748b",
104
+ homeButtonIcon: "🏠",
105
+ additionalInfo: {
106
+ title: "What can you do?",
107
+ items: [
108
+ { icon: "✓", iconColor: "green-500", text: "Check the URL for typos" },
109
+ { icon: "✓", iconColor: "green-500", text: "Go back to the previous page" },
110
+ { icon: "✓", iconColor: "green-500", text: "Visit our homepage" }
111
+ ]
112
+ }
113
+ },
114
+ 403: {
115
+ title: "Unauthorized Access",
116
+ message: "You are not authorized to view this page.",
117
+ icon: "🚫",
118
+ color: "#ef4444",
119
+ homeButtonIcon: "🔐",
120
+ additionalInfo: {
121
+ title: "Why am I seeing this?",
122
+ items: [
123
+ { icon: "⚠️", iconColor: "yellow-500", text: "You may need to log in to access this page" },
124
+ { icon: "⚠️", iconColor: "yellow-500", text: "Your account might not have the required permissions" },
125
+ { icon: "⚠️", iconColor: "yellow-500", text: "Contact support if you believe this is an error" }
126
+ ]
127
+ }
128
+ },
129
+ 401: {
130
+ title: "Authentication Required",
131
+ message: "You need to log in to access this resource.",
132
+ icon: "🔐",
133
+ color: "#f59e0b",
134
+ homeButtonIcon: "🔐",
135
+ additionalInfo: {
136
+ title: "How to proceed?",
137
+ items: [
138
+ { icon: "✓", iconColor: "blue-500", text: "Log in with your credentials" },
139
+ { icon: "✓", iconColor: "blue-500", text: "Create an account if you don't have one" },
140
+ { icon: "✓", iconColor: "blue-500", text: "Reset your password if you forgot it" }
141
+ ]
142
+ }
143
+ },
144
+ 500: {
145
+ title: "Internal Server Error",
146
+ message: "Something went wrong on our end. Please try again later.",
147
+ icon: "🔧",
148
+ color: "#ef4444",
149
+ homeButtonIcon: "🏠",
150
+ additionalInfo: {
151
+ title: "What happened?",
152
+ items: [
153
+ { icon: "⚠️", iconColor: "red-500", text: "Our servers are experiencing issues" },
154
+ { icon: "⚠️", iconColor: "red-500", text: "The problem is temporary" },
155
+ { icon: "⚠️", iconColor: "red-500", text: "Try refreshing the page or come back later" }
156
+ ]
157
+ }
158
+ },
159
+ 503: {
160
+ title: "Service Unavailable",
161
+ message: "The service is temporarily unavailable. Please try again later.",
162
+ icon: "🔧",
163
+ color: "#f59e0b",
164
+ homeButtonIcon: "🏠",
165
+ additionalInfo: {
166
+ title: "Service Status",
167
+ items: [
168
+ { icon: "⚠️", iconColor: "amber-500", text: "We're performing scheduled maintenance" },
169
+ { icon: "⚠️", iconColor: "amber-500", text: "Normal service will resume shortly" },
170
+ { icon: "⚠️", iconColor: "amber-500", text: "Check our status page for updates" }
171
+ ]
172
+ }
173
+ },
174
+ network: {
175
+ title: "Network Error",
176
+ message: "Unable to connect to the server. Please check your internet connection.",
177
+ icon: "📶",
178
+ color: "#ef4444",
179
+ homeButtonIcon: "🏠",
180
+ additionalInfo: {
181
+ title: "Connection Issues",
182
+ items: [
183
+ { icon: "⚠️", iconColor: "red-500", text: "Check your internet connection" },
184
+ { icon: "⚠️", iconColor: "red-500", text: "Try refreshing the page" },
185
+ { icon: "⚠️", iconColor: "red-500", text: "Contact your network administrator" }
186
+ ]
187
+ }
188
+ }
189
+ };
190
+ return g[o.errorType] || g[404];
191
+ }), y = l(() => k.value), B = l(() => o.errorTitle || y.value.title), I = l(() => o.errorMessage || y.value.message), S = l(() => y.value.homeButtonIcon || "🏠"), T = l(() => o.showAdditionalInfo ? y.value.additionalInfo : null), v = () => {
192
+ e ? e.push(o.homeUrl) : window.location.href = o.homeUrl;
193
+ }, L = () => {
194
+ e && window.history.length > 1 ? e.back() : window.history.length > 1 ? window.history.back() : v(), r("back");
195
+ }, _ = async () => {
196
+ x.value = !0;
197
+ try {
198
+ await new Promise((g) => setTimeout(g, 1e3)), window.location.reload();
199
+ } catch (g) {
200
+ console.error("Retry failed:", g);
201
+ } finally {
202
+ x.value = !1;
203
+ }
204
+ r("retry");
205
+ }, j = l(() => [
206
+ "min-h-screen relative flex items-center justify-center",
207
+ "px-4 sm:px-6 lg:px-8"
208
+ ]), R = l(() => [
209
+ "absolute inset-0 -z-10"
210
+ ]), E = l(() => [
211
+ "w-full max-w-2xl mx-auto text-center"
212
+ ]), N = l(() => [
213
+ "mb-8"
214
+ ]), U = l(() => [
215
+ "space-y-8"
216
+ ]), D = l(() => [
217
+ "flex justify-center mb-6"
218
+ ]), A = l(() => [
219
+ "w-32 h-32 flex items-center justify-center"
220
+ ]), H = l(() => [
221
+ "space-y-4"
222
+ ]), P = l(() => [
223
+ "text-6xl font-bold ui-text mb-4"
224
+ ]), z = l(() => [
225
+ "text-3xl font-bold ui-text"
226
+ ]), O = l(() => [
227
+ "text-lg ui-text max-w-lg mx-auto"
228
+ ]), G = l(() => [
229
+ "mt-8"
230
+ ]), M = l(() => [
231
+ "mt-8"
232
+ ]), V = l(() => [
233
+ "mt-6"
234
+ ]);
235
+ return {
236
+ // State
237
+ isRetrying: x,
238
+ reportSent: w,
239
+ isOnline: u,
240
+ errorId: b,
241
+ isDev: p,
242
+ // Computed
243
+ errorConfig: y,
244
+ title: B,
245
+ message: I,
246
+ homeButtonIcon: S,
247
+ additionalInfoConfig: T,
248
+ // Methods
249
+ goHome: v,
250
+ goBack: L,
251
+ retry: _,
252
+ // Classes
253
+ layoutClasses: j,
254
+ backgroundClasses: R,
255
+ contentClasses: E,
256
+ headerClasses: N,
257
+ errorContentClasses: U,
258
+ illustrationClasses: D,
259
+ iconContainerClasses: A,
260
+ detailsClasses: H,
261
+ codeClasses: P,
262
+ titleClasses: z,
263
+ messageClasses: O,
264
+ actionsClasses: G,
265
+ additionalInfoClasses: M,
266
+ helpClasses: V
267
+ };
268
+ }
269
+ }, $ = { class: "flex justify-center" }, ee = { class: "flex items-center gap-3" }, te = { class: "text-2xl font-bold ui-text" }, oe = {
270
+ key: 1,
271
+ class: "ui-danger-soft border border-(--ui-danger-soft) rounded-lg p-4 mx-auto max-w-md mb-6"
272
+ }, ne = { class: "flex flex-col sm:flex-row gap-4 justify-center" }, se = ["disabled"], re = {
273
+ key: 0,
274
+ class: "animate-spin"
275
+ }, ie = { key: 1 }, le = ["disabled"], ae = { key: 0 }, ce = { key: 1 }, de = {
276
+ key: 0,
277
+ class: "mt-8 max-w-md mx-auto"
278
+ }, ue = { class: "rounded-lg shadow-sm p-6" }, fe = { class: "text-lg font-semibold ui-text mb-4" }, me = { class: "space-y-3" }, ge = { class: "text-sm ui-text" }, ye = ["href"], he = {
279
+ key: 5,
280
+ class: "text-xs ui-text font-mono mt-4"
281
+ };
282
+ function xe(o, r, i, e, x, w) {
283
+ return s(), n("div", {
284
+ class: a(e.layoutClasses)
285
+ }, [
286
+ i.showBackground ? (s(), n("div", {
287
+ key: 0,
288
+ class: a(e.backgroundClasses)
289
+ }, [
290
+ f(o.$slots, "background", {}, () => [
291
+ r[4] || (r[4] = t("div", { class: "absolute inset-0 bg-linear-to-br from-(--ui-surface) to-(--ui-surface)" }, null, -1))
292
+ ])
293
+ ], 2)) : c("", !0),
294
+ t("div", {
295
+ class: a(e.contentClasses)
296
+ }, [
297
+ o.$slots.header || i.showLogo ? (s(), n("div", {
298
+ key: 0,
299
+ class: a(e.headerClasses)
300
+ }, [
301
+ f(o.$slots, "header", {}, () => [
302
+ t("div", $, [
303
+ f(o.$slots, "logo", {}, () => [
304
+ t("div", ee, [
305
+ r[5] || (r[5] = t("div", { class: "w-10 h-10 ui-primary-bg rounded-xl flex items-center justify-center" }, [
306
+ t("span", { class: "ui-text font-bold text-lg" }, "STL")
307
+ ], -1)),
308
+ t("span", te, d(i.brandName), 1)
309
+ ])
310
+ ])
311
+ ])
312
+ ])
313
+ ], 2)) : c("", !0),
314
+ t("div", {
315
+ class: a(e.errorContentClasses)
316
+ }, [
317
+ o.$slots.illustration || i.showDefaultIllustration ? (s(), n("div", {
318
+ key: 0,
319
+ class: a(e.illustrationClasses)
320
+ }, [
321
+ f(o.$slots, "illustration", {}, () => [
322
+ t("div", {
323
+ class: a(e.iconContainerClasses)
324
+ }, [
325
+ t("div", {
326
+ class: "text-8xl",
327
+ style: W({ color: e.errorConfig.color })
328
+ }, d(e.errorConfig.icon), 5)
329
+ ], 2)
330
+ ])
331
+ ], 2)) : c("", !0),
332
+ t("div", {
333
+ class: a(e.detailsClasses)
334
+ }, [
335
+ i.errorCode ? (s(), n("div", {
336
+ key: 0,
337
+ class: a(e.codeClasses)
338
+ }, d(i.errorCode), 3)) : c("", !0),
339
+ t("h1", {
340
+ class: a(e.titleClasses)
341
+ }, [
342
+ f(o.$slots, "title", {}, () => [
343
+ m(d(e.title), 1)
344
+ ])
345
+ ], 2),
346
+ t("p", {
347
+ class: a(e.messageClasses)
348
+ }, [
349
+ f(o.$slots, "message", {}, () => [
350
+ m(d(e.message), 1)
351
+ ])
352
+ ], 2)
353
+ ], 2),
354
+ e.isOnline ? c("", !0) : (s(), n("div", oe, [...r[6] || (r[6] = [
355
+ t("div", { class: "flex items-center justify-center gap-2 ui-danger" }, [
356
+ t("span", { class: "w-3 h-3 ui-danger-bg rounded-full animate-pulse" }),
357
+ t("span", { class: "font-medium" }, "No Internet Connection")
358
+ ], -1)
359
+ ])])),
360
+ o.$slots.actions || i.showDefaultActions ? (s(), n("div", {
361
+ key: 2,
362
+ class: a(e.actionsClasses)
363
+ }, [
364
+ f(o.$slots, "actions", {}, () => [
365
+ t("div", ne, [
366
+ i.showHomeButton ? (s(), n("button", {
367
+ key: 0,
368
+ class: "ui-primary-bg ui-text px-6 py-3 rounded-lg font-medium hover:bg-(--ui-primary-strong) transition-colors flex items-center justify-center gap-2",
369
+ onClick: r[0] || (r[0] = (...u) => e.goHome && e.goHome(...u))
370
+ }, [
371
+ t("span", null, d(e.homeButtonIcon), 1),
372
+ m(" " + d(i.homeButtonText), 1)
373
+ ])) : c("", !0),
374
+ i.showBackButton ? (s(), n("button", {
375
+ key: 1,
376
+ class: "border ui-border-strong ui-text px-6 py-3 rounded-lg font-medium hover:bg-(--ui-surface) transition-colors flex items-center justify-center gap-2",
377
+ onClick: r[1] || (r[1] = (...u) => e.goBack && e.goBack(...u))
378
+ }, [
379
+ r[7] || (r[7] = t("span", null, "←", -1)),
380
+ m(" " + d(i.backButtonText), 1)
381
+ ])) : c("", !0),
382
+ i.showRetryButton ? (s(), n("button", {
383
+ key: 2,
384
+ disabled: e.isRetrying || !e.isOnline,
385
+ class: "border ui-border-strong ui-text px-6 py-3 rounded-lg font-medium hover:bg-(--ui-surface) transition-colors flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",
386
+ onClick: r[2] || (r[2] = (...u) => e.retry && e.retry(...u))
387
+ }, [
388
+ e.isRetrying ? (s(), n("span", re, "↻")) : (s(), n("span", ie, "🔄")),
389
+ m(" " + d(e.isRetrying ? "Retrying..." : i.retryButtonText), 1)
390
+ ], 8, se)) : c("", !0),
391
+ i.showSupportButton ? (s(), n("button", {
392
+ key: 3,
393
+ disabled: e.reportSent,
394
+ class: "ui-bg ui-text px-6 py-3 rounded-lg font-medium hover:bg-(--ui-bg) transition-colors flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",
395
+ onClick: r[3] || (r[3] = (u) => o.$emit("contact-support"))
396
+ }, [
397
+ e.reportSent ? (s(), n("span", ae, "✓")) : (s(), n("span", ce, "📝")),
398
+ m(" " + d(e.reportSent ? "Report Sent" : "Contact Support"), 1)
399
+ ], 8, le)) : c("", !0)
400
+ ])
401
+ ])
402
+ ], 2)) : c("", !0),
403
+ o.$slots["additional-info"] || i.showAdditionalInfo ? (s(), n("div", {
404
+ key: 3,
405
+ class: a(e.additionalInfoClasses)
406
+ }, [
407
+ f(o.$slots, "additional-info", {}, () => [
408
+ e.additionalInfoConfig ? (s(), n("div", de, [
409
+ t("div", ue, [
410
+ t("h3", fe, d(e.additionalInfoConfig.title), 1),
411
+ t("ul", me, [
412
+ (s(!0), n(Y, null, q(e.additionalInfoConfig.items, (u, b) => (s(), n("li", {
413
+ key: b,
414
+ class: "flex items-start gap-3 text-sm ui-text"
415
+ }, [
416
+ t("span", {
417
+ class: a(`w-4 h-4 text-${u.iconColor || "slate-400"} shrink-0 mt-0.5`)
418
+ }, d(u.icon), 3),
419
+ t("span", null, d(u.text), 1)
420
+ ]))), 128))
421
+ ])
422
+ ])
423
+ ])) : c("", !0)
424
+ ])
425
+ ], 2)) : c("", !0),
426
+ o.$slots.help || i.helpText ? (s(), n("div", {
427
+ key: 4,
428
+ class: a(e.helpClasses)
429
+ }, [
430
+ f(o.$slots, "help", {}, () => [
431
+ t("p", ge, [
432
+ m(d(i.helpText) + " ", 1),
433
+ i.supportUrl ? (s(), n("a", {
434
+ key: 0,
435
+ href: i.supportUrl,
436
+ class: "ui-primary hover:text-(--ui-primary) underline ml-1"
437
+ }, [...r[8] || (r[8] = [
438
+ t("span", { class: "inline-block w-4 h-4 mr-1" }, "❓", -1),
439
+ m(" Get Help ", -1)
440
+ ])], 8, ye)) : c("", !0)
441
+ ])
442
+ ])
443
+ ], 2)) : c("", !0),
444
+ e.isDev ? (s(), n("div", he, " Error ID: " + d(e.errorId), 1)) : c("", !0)
445
+ ], 2)
446
+ ], 2)
447
+ ], 2);
448
+ }
449
+ const we = /* @__PURE__ */ X(Z, [["render", xe]]);
450
+ export {
451
+ we as default
452
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="kabzAuthResolver";exports.AUTH_RESOLVER_KEY=e;
@@ -0,0 +1,4 @@
1
+ const e = "kabzAuthResolver";
2
+ export {
3
+ e as AUTH_RESOLVER_KEY
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S="ui-mode",T="ui-theme",O="ocean",f=()=>typeof document<"u",M=e=>{f()&&document.documentElement.setAttribute("data-mode",e)},P=()=>f()?document.documentElement.getAttribute("data-mode"):null,_=(e,n,t)=>Math.min(t,Math.max(n,e)),i=(e,n="#0070f3")=>{if(!e)return n;let t=String(e).trim().replace("#","");return t.length===3&&(t=t.split("").map(r=>r+r).join("")),/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:n},p=e=>{const t=i(e).slice(1);return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},A=({r:e,g:n,b:t})=>{const r=o=>_(Math.round(o),0,255).toString(16).padStart(2,"0");return`#${r(e)}${r(n)}${r(t)}`},s=(e,n,t=.5)=>{const r=_(t,0,1),o=p(e),a=p(n);return A({r:o.r*(1-r)+a.r*r,g:o.g*(1-r)+a.g*r,b:o.b*(1-r)+a.b*r})},C=e=>{const{r:n,g:t,b:r}=p(e);return(.2126*n+.7152*t+.0722*r)/255>.62?"#111111":"#ffffff"},b=[{key:"ocean",name:"Ocean Blue",light:{primary:"#1d4ed8",secondary:["#0ea5e9","#22c55e","#f59e0b"]},dark:{primary:"#2ccad3",secondary:["#39d9df","#2fa6ff","#1fc8b3"]}},{key:"forest",name:"Forest Green",light:{primary:"#0f766e",secondary:["#14b8a6","#6366f1","#f97316"]},dark:{primary:"#22c7bc",secondary:["#2fded1","#2fa6ff","#1ea8c2"]}},{key:"violet",name:"Royal Violet",light:{primary:"#7c3aed",secondary:["#a855f7","#3b82f6","#ef4444"]},dark:{primary:"#3bc8f0",secondary:["#59d6ff","#29c5d8","#1da1be"]}},{key:"sunset",name:"Sunset",light:{primary:"#ea580c",secondary:["#fb7185","#f59e0b","#8b5cf6"]},dark:{primary:"#36cfd1",secondary:["#58dcde","#2fb7ff","#21c4a1"]}},{key:"graphite",name:"Graphite",light:{primary:"#334155",secondary:["#64748b","#0ea5e9","#22c55e"]},dark:{primary:"#2fb6d7",secondary:["#5fd8ea","#2da5e9","#22c4b5"]}}],x=e=>{const n=String(e||O);return b.find(t=>t.key===n)||b[0]},h=(e={})=>{const n=P()||"light",t=x(e.preset||e.theme_preset),r=n==="dark"?t.dark:t.light,o=!!(e.preset||e.theme_preset),a=!!(e.use_custom||e.useCustom),d=o&&!a,c=i(d?r.primary:e.primary||e.primary_color||r.primary,"#0070f3"),u=d?r.secondary:Array.isArray(e.secondary)?e.secondary:[e.secondary_1||r.secondary[0],e.secondary_2||r.secondary[1],e.secondary_3||r.secondary[2]],l=i(u?.[0],"#14b8a6"),y=i(u?.[1],"#f97316"),m=i(u?.[2],"#8b5cf6"),g=n==="dark",I=g?s(c,"#042438",.92):"#ffffff",w=g?s(c,"#031f31",.9):"#ffffff",B=g?s(c,"#03283e",.9):"#ffffff";return{"--ui-primary":c,"--ui-primary-strong":s(c,"#000000",.14),"--ui-primary-soft":s(c,"#ffffff",.86),"--ui-accent":l,"--ui-accent-strong":s(l,"#000000",.14),"--ui-accent-soft":s(l,"#ffffff",.84),"--ui-success":y,"--ui-success-strong":s(y,"#000000",.1),"--ui-success-soft":s(y,"#ffffff",.84),"--ui-warning":m,"--ui-warning-strong":s(m,"#000000",.1),"--ui-warning-soft":s(m,"#ffffff",.84),"--ui-ring":s(c,"#ffffff",.28),"--ui-text-inverse":C(c),"--ui-header-bg":I,"--ui-sidebar-bg":w,"--ui-submenu-bg":B}},E=()=>{if(!f())return null;const e=localStorage.getItem(T);if(!e)return null;try{return JSON.parse(e)}catch{return null}},H=()=>{if(!f())return;const e=document.documentElement;Object.keys(h({})).forEach(t=>e.style.removeProperty(t)),localStorage.removeItem(T)},k=(e,n={})=>{if(!f())return;const{persist:t=!0}=n;if(!e){H();return}const r=h(e),o=document.documentElement;Object.entries(r).forEach(([a,d])=>{o.style.setProperty(a,d)}),t&&localStorage.setItem(T,JSON.stringify(e))},K=e=>{if(e&&(M(e),f())){localStorage.setItem(S,e);const n=E();n&&k(n,{persist:!1})}},R=(e={})=>{if(!f())return;const{defaultMode:n="light"}=e,t=localStorage.getItem(S);M(t||n);const r=E();r&&k(r,{persist:!1})};exports.THEME_PRESETS=b;exports.buildThemeTokens=h;exports.clearTheme=H;exports.getMode=P;exports.getTheme=E;exports.getThemePreset=x;exports.initTheme=R;exports.setMode=K;exports.setTheme=k;
@@ -0,0 +1,135 @@
1
+ const h = "ui-mode", b = "ui-theme", w = "ocean", f = () => typeof document < "u", E = (e) => {
2
+ f() && document.documentElement.setAttribute("data-mode", e);
3
+ }, B = () => f() ? document.documentElement.getAttribute("data-mode") : null, T = (e, n, t) => Math.min(t, Math.max(n, e)), i = (e, n = "#0070f3") => {
4
+ if (!e) return n;
5
+ let t = String(e).trim().replace("#", "");
6
+ return t.length === 3 && (t = t.split("").map((r) => r + r).join("")), /^[0-9a-fA-F]{6}$/.test(t) ? `#${t.toLowerCase()}` : n;
7
+ }, p = (e) => {
8
+ const t = i(e).slice(1);
9
+ return {
10
+ r: parseInt(t.slice(0, 2), 16),
11
+ g: parseInt(t.slice(2, 4), 16),
12
+ b: parseInt(t.slice(4, 6), 16)
13
+ };
14
+ }, H = ({ r: e, g: n, b: t }) => {
15
+ const r = (o) => T(Math.round(o), 0, 255).toString(16).padStart(2, "0");
16
+ return `#${r(e)}${r(n)}${r(t)}`;
17
+ }, s = (e, n, t = 0.5) => {
18
+ const r = T(t, 0, 1), o = p(e), a = p(n);
19
+ return H({
20
+ r: o.r * (1 - r) + a.r * r,
21
+ g: o.g * (1 - r) + a.g * r,
22
+ b: o.b * (1 - r) + a.b * r
23
+ });
24
+ }, A = (e) => {
25
+ const { r: n, g: t, b: r } = p(e);
26
+ return (0.2126 * n + 0.7152 * t + 0.0722 * r) / 255 > 0.62 ? "#111111" : "#ffffff";
27
+ }, k = [
28
+ {
29
+ key: "ocean",
30
+ name: "Ocean Blue",
31
+ light: { primary: "#1d4ed8", secondary: ["#0ea5e9", "#22c55e", "#f59e0b"] },
32
+ dark: { primary: "#2ccad3", secondary: ["#39d9df", "#2fa6ff", "#1fc8b3"] }
33
+ },
34
+ {
35
+ key: "forest",
36
+ name: "Forest Green",
37
+ light: { primary: "#0f766e", secondary: ["#14b8a6", "#6366f1", "#f97316"] },
38
+ dark: { primary: "#22c7bc", secondary: ["#2fded1", "#2fa6ff", "#1ea8c2"] }
39
+ },
40
+ {
41
+ key: "violet",
42
+ name: "Royal Violet",
43
+ light: { primary: "#7c3aed", secondary: ["#a855f7", "#3b82f6", "#ef4444"] },
44
+ dark: { primary: "#3bc8f0", secondary: ["#59d6ff", "#29c5d8", "#1da1be"] }
45
+ },
46
+ {
47
+ key: "sunset",
48
+ name: "Sunset",
49
+ light: { primary: "#ea580c", secondary: ["#fb7185", "#f59e0b", "#8b5cf6"] },
50
+ dark: { primary: "#36cfd1", secondary: ["#58dcde", "#2fb7ff", "#21c4a1"] }
51
+ },
52
+ {
53
+ key: "graphite",
54
+ name: "Graphite",
55
+ light: { primary: "#334155", secondary: ["#64748b", "#0ea5e9", "#22c55e"] },
56
+ dark: { primary: "#2fb6d7", secondary: ["#5fd8ea", "#2da5e9", "#22c4b5"] }
57
+ }
58
+ ], O = (e) => {
59
+ const n = String(e || w);
60
+ return k.find((t) => t.key === n) || k[0];
61
+ }, S = (e = {}) => {
62
+ const n = B() || "light", t = O(e.preset || e.theme_preset), r = n === "dark" ? t.dark : t.light, o = !!(e.preset || e.theme_preset), a = !!(e.use_custom || e.useCustom), d = o && !a, c = i(d ? r.primary : e.primary || e.primary_color || r.primary, "#0070f3"), u = d ? r.secondary : Array.isArray(e.secondary) ? e.secondary : [
63
+ e.secondary_1 || r.secondary[0],
64
+ e.secondary_2 || r.secondary[1],
65
+ e.secondary_3 || r.secondary[2]
66
+ ], y = i(u?.[0], "#14b8a6"), l = i(u?.[1], "#f97316"), m = i(u?.[2], "#8b5cf6"), g = n === "dark", _ = g ? s(c, "#042438", 0.92) : "#ffffff", P = g ? s(c, "#031f31", 0.9) : "#ffffff", I = g ? s(c, "#03283e", 0.9) : "#ffffff";
67
+ return {
68
+ "--ui-primary": c,
69
+ "--ui-primary-strong": s(c, "#000000", 0.14),
70
+ "--ui-primary-soft": s(c, "#ffffff", 0.86),
71
+ "--ui-accent": y,
72
+ "--ui-accent-strong": s(y, "#000000", 0.14),
73
+ "--ui-accent-soft": s(y, "#ffffff", 0.84),
74
+ "--ui-success": l,
75
+ "--ui-success-strong": s(l, "#000000", 0.1),
76
+ "--ui-success-soft": s(l, "#ffffff", 0.84),
77
+ "--ui-warning": m,
78
+ "--ui-warning-strong": s(m, "#000000", 0.1),
79
+ "--ui-warning-soft": s(m, "#ffffff", 0.84),
80
+ "--ui-ring": s(c, "#ffffff", 0.28),
81
+ "--ui-text-inverse": A(c),
82
+ "--ui-header-bg": _,
83
+ "--ui-sidebar-bg": P,
84
+ "--ui-submenu-bg": I
85
+ };
86
+ }, x = () => {
87
+ if (!f()) return null;
88
+ const e = localStorage.getItem(b);
89
+ if (!e) return null;
90
+ try {
91
+ return JSON.parse(e);
92
+ } catch {
93
+ return null;
94
+ }
95
+ }, C = () => {
96
+ if (!f()) return;
97
+ const e = document.documentElement;
98
+ Object.keys(S({})).forEach((t) => e.style.removeProperty(t)), localStorage.removeItem(b);
99
+ }, M = (e, n = {}) => {
100
+ if (!f()) return;
101
+ const { persist: t = !0 } = n;
102
+ if (!e) {
103
+ C();
104
+ return;
105
+ }
106
+ const r = S(e), o = document.documentElement;
107
+ Object.entries(r).forEach(([a, d]) => {
108
+ o.style.setProperty(a, d);
109
+ }), t && localStorage.setItem(b, JSON.stringify(e));
110
+ }, K = (e) => {
111
+ if (e && (E(e), f())) {
112
+ localStorage.setItem(h, e);
113
+ const n = x();
114
+ n && M(n, { persist: !1 });
115
+ }
116
+ }, $ = (e = {}) => {
117
+ if (!f()) return;
118
+ const {
119
+ defaultMode: n = "light"
120
+ } = e, t = localStorage.getItem(h);
121
+ E(t || n);
122
+ const r = x();
123
+ r && M(r, { persist: !1 });
124
+ };
125
+ export {
126
+ k as THEME_PRESETS,
127
+ S as buildThemeTokens,
128
+ C as clearTheme,
129
+ B as getMode,
130
+ x as getTheme,
131
+ O as getThemePreset,
132
+ $ as initTheme,
133
+ K as setMode,
134
+ M as setTheme
135
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),i=l.ref([]);let m=0;const v={duration:3e3,position:"top-center",dismissible:!0,closeButton:!1},p=()=>`toast-${++m}-${Date.now()}`,e=(s,t={})=>{const n=p(),o={id:n,message:s,...v,...t,createdAt:Date.now()};return i.value.push(l.markRaw(o)),o.duration&&o.duration>0&&setTimeout(()=>{r(n)},o.duration),n},r=s=>{const t=i.value.findIndex(n=>n.id===s);t>-1&&i.value.splice(t,1)},g=()=>{i.value=[]},w=Object.assign((s,t)=>e(s,{...t}),{success:(s,t)=>e(s,{...t,variant:"success"}),error:(s,t)=>e(s,{...t,variant:"error"}),warning:(s,t)=>e(s,{...t,variant:"warning"}),info:(s,t)=>e(s,{...t,variant:"info"}),promise:(s,t={})=>{const{loading:n="Loading...",success:o="Success",error:c="Error",...u}=t,f=e(n,{...u,variant:"loading",duration:0,dismissible:!1});return s.then(a=>{r(f);const d=typeof o=="function"?o(a):o;return e(d,{...u,variant:"success"}),a}).catch(a=>{r(f);const d=typeof c=="function"?c(a):c;throw e(d,{...u,variant:"error"}),a})},dismiss:r,dismissAll:g,custom:(s,t={})=>e("",{...t,component:l.markRaw(s)})}),b=()=>({toasts:i,dismiss:r,dismissAll:g});exports.toast=w;exports.useToaster=b;
@@ -0,0 +1,81 @@
1
+ import { ref as m, markRaw as f } from "vue";
2
+ const i = m([]);
3
+ let p = 0;
4
+ const v = {
5
+ duration: 3e3,
6
+ position: "top-center",
7
+ dismissible: !0,
8
+ closeButton: !1
9
+ }, w = () => `toast-${++p}-${Date.now()}`, e = (t, s = {}) => {
10
+ const o = w(), n = {
11
+ id: o,
12
+ message: t,
13
+ ...v,
14
+ ...s,
15
+ createdAt: Date.now()
16
+ };
17
+ return i.value.push(f(n)), n.duration && n.duration > 0 && setTimeout(() => {
18
+ r(o);
19
+ }, n.duration), o;
20
+ }, r = (t) => {
21
+ const s = i.value.findIndex((o) => o.id === t);
22
+ s > -1 && i.value.splice(s, 1);
23
+ }, g = () => {
24
+ i.value = [];
25
+ }, b = Object.assign(
26
+ // Default toast function
27
+ (t, s) => e(t, { ...s }),
28
+ // Toast type methods
29
+ {
30
+ success: (t, s) => e(t, { ...s, variant: "success" }),
31
+ error: (t, s) => e(t, { ...s, variant: "error" }),
32
+ warning: (t, s) => e(t, { ...s, variant: "warning" }),
33
+ info: (t, s) => e(t, { ...s, variant: "info" }),
34
+ // Promise toast for async operations
35
+ promise: (t, s = {}) => {
36
+ const {
37
+ loading: o = "Loading...",
38
+ success: n = "Success",
39
+ error: c = "Error",
40
+ ...u
41
+ } = s, l = e(o, {
42
+ ...u,
43
+ variant: "loading",
44
+ duration: 0,
45
+ // Don't auto dismiss
46
+ dismissible: !1
47
+ });
48
+ return t.then((a) => {
49
+ r(l);
50
+ const d = typeof n == "function" ? n(a) : n;
51
+ return e(d, {
52
+ ...u,
53
+ variant: "success"
54
+ }), a;
55
+ }).catch((a) => {
56
+ r(l);
57
+ const d = typeof c == "function" ? c(a) : c;
58
+ throw e(d, {
59
+ ...u,
60
+ variant: "error"
61
+ }), a;
62
+ });
63
+ },
64
+ // Utility methods
65
+ dismiss: r,
66
+ dismissAll: g,
67
+ // Custom toast with component
68
+ custom: (t, s = {}) => e("", {
69
+ ...s,
70
+ component: f(t)
71
+ })
72
+ }
73
+ ), x = () => ({
74
+ toasts: i,
75
+ dismiss: r,
76
+ dismissAll: g
77
+ });
78
+ export {
79
+ b as toast,
80
+ x as useToaster
81
+ };