@gspa/ui 0.1.3 → 0.2.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 (280) hide show
  1. package/README.md +35 -0
  2. package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
  3. package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
  4. package/dist/DataTable.css +1 -0
  5. package/dist/DataTableToolBar.css +1 -0
  6. package/dist/FormField.vue_vue_type_script_setup_true_lang-DimMUyA-.js +205 -0
  7. package/dist/FormField.vue_vue_type_script_setup_true_lang-mEO-VA6R.cjs +1 -0
  8. package/dist/Header.css +1 -0
  9. package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
  10. package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
  11. package/dist/Loader.css +1 -0
  12. package/dist/ReminderConfig.css +1 -0
  13. package/dist/ReusableForm.css +1 -0
  14. package/dist/Sidebar.css +1 -0
  15. package/dist/Toast.css +1 -0
  16. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  18. package/dist/components/Accordion.cjs +1 -0
  19. package/dist/components/Accordion.js +192 -0
  20. package/dist/components/AccordionItem.cjs +1 -0
  21. package/dist/components/AccordionItem.js +109 -0
  22. package/dist/components/AddReminderModal.cjs +1 -0
  23. package/dist/components/AddReminderModal.js +107 -0
  24. package/dist/components/Alert.cjs +1 -0
  25. package/dist/components/Alert.js +227 -0
  26. package/dist/components/Avatar.cjs +1 -0
  27. package/dist/components/Avatar.js +86 -0
  28. package/dist/components/Badge.cjs +1 -0
  29. package/dist/components/Badge.js +109 -0
  30. package/dist/components/Breadcrumb.cjs +1 -0
  31. package/dist/components/Breadcrumb.js +72 -0
  32. package/dist/components/Button.cjs +1 -0
  33. package/dist/components/Button.js +4 -0
  34. package/dist/components/ButtonGroup.cjs +1 -0
  35. package/dist/components/ButtonGroup.js +46 -0
  36. package/dist/components/Calendar.cjs +1 -0
  37. package/dist/components/Calendar.js +341 -0
  38. package/dist/components/Card.cjs +1 -0
  39. package/dist/components/Card.js +316 -0
  40. package/dist/components/CardBody.cjs +1 -0
  41. package/dist/components/CardBody.js +34 -0
  42. package/dist/components/CardContent.cjs +1 -0
  43. package/dist/components/CardContent.js +17 -0
  44. package/dist/components/CardFooter.cjs +1 -0
  45. package/dist/components/CardFooter.js +34 -0
  46. package/dist/components/CardHeader.cjs +1 -0
  47. package/dist/components/CardHeader.js +91 -0
  48. package/dist/components/CardTitle.cjs +1 -0
  49. package/dist/components/CardTitle.js +17 -0
  50. package/dist/components/Checkbox.cjs +1 -0
  51. package/dist/components/Checkbox.js +185 -0
  52. package/dist/components/CircularProgress.cjs +1 -0
  53. package/dist/components/CircularProgress.js +141 -0
  54. package/dist/components/DataTable.cjs +1 -0
  55. package/dist/components/DataTable.js +863 -0
  56. package/dist/components/DataTableCell.cjs +1 -0
  57. package/dist/components/DataTableCell.js +95 -0
  58. package/dist/components/DataTableFilters.cjs +1 -0
  59. package/dist/components/DataTableFilters.js +519 -0
  60. package/dist/components/DataTableHeader.cjs +1 -0
  61. package/dist/components/DataTableHeader.js +116 -0
  62. package/dist/components/DataTablePagination.cjs +1 -0
  63. package/dist/components/DataTablePagination.js +290 -0
  64. package/dist/components/DataTableRow.cjs +1 -0
  65. package/dist/components/DataTableRow.js +199 -0
  66. package/dist/components/DataTableToolBar.cjs +1 -0
  67. package/dist/components/DataTableToolBar.js +477 -0
  68. package/dist/components/DatePicker.cjs +1 -0
  69. package/dist/components/DatePicker.js +401 -0
  70. package/dist/components/Divider.cjs +1 -0
  71. package/dist/components/Divider.js +103 -0
  72. package/dist/components/Dropdown.cjs +1 -0
  73. package/dist/components/Dropdown.js +104 -0
  74. package/dist/components/DropdownItem.cjs +1 -0
  75. package/dist/components/DropdownItem.js +60 -0
  76. package/dist/components/EventsCalendar.cjs +1 -0
  77. package/dist/components/EventsCalendar.js +863 -0
  78. package/dist/components/FileUpload.cjs +1 -0
  79. package/dist/components/FileUpload.js +195 -0
  80. package/dist/components/FilterDrawer.cjs +1 -0
  81. package/dist/components/FilterDrawer.js +412 -0
  82. package/dist/components/Footer.cjs +1 -0
  83. package/dist/components/Footer.js +157 -0
  84. package/dist/components/FormField.cjs +1 -0
  85. package/dist/components/FormField.js +4 -0
  86. package/dist/components/Graph.cjs +1 -0
  87. package/dist/components/Graph.js +164 -0
  88. package/dist/components/GraphFilters.cjs +1 -0
  89. package/dist/components/GraphFilters.js +305 -0
  90. package/dist/components/Header.cjs +1 -0
  91. package/dist/components/Header.js +674 -0
  92. package/dist/components/Icon.cjs +1 -0
  93. package/dist/components/Icon.js +58 -0
  94. package/dist/components/Image.cjs +1 -0
  95. package/dist/components/Image.js +112 -0
  96. package/dist/components/Input.cjs +1 -0
  97. package/dist/components/Input.js +4 -0
  98. package/dist/components/InputGroup.cjs +1 -0
  99. package/dist/components/InputGroup.js +45 -0
  100. package/dist/components/Label.cjs +1 -0
  101. package/dist/components/Label.js +46 -0
  102. package/dist/components/Link.cjs +1 -0
  103. package/dist/components/Link.js +119 -0
  104. package/dist/components/ListItem.cjs +1 -0
  105. package/dist/components/ListItem.js +89 -0
  106. package/dist/components/Loader.cjs +1 -0
  107. package/dist/components/Loader.js +154 -0
  108. package/dist/components/Logo.cjs +1 -0
  109. package/dist/components/Logo.js +67 -0
  110. package/dist/components/MenuItem.cjs +1 -0
  111. package/dist/components/MenuItem.js +66 -0
  112. package/dist/components/Modal.cjs +1 -0
  113. package/dist/components/Modal.js +110 -0
  114. package/dist/components/ModalBody.cjs +1 -0
  115. package/dist/components/ModalBody.js +33 -0
  116. package/dist/components/ModalFooter.cjs +1 -0
  117. package/dist/components/ModalFooter.js +33 -0
  118. package/dist/components/ModalHeader.cjs +1 -0
  119. package/dist/components/ModalHeader.js +24 -0
  120. package/dist/components/MultiSelect.cjs +1 -0
  121. package/dist/components/MultiSelect.js +211 -0
  122. package/dist/components/Notification.cjs +1 -0
  123. package/dist/components/Notification.js +121 -0
  124. package/dist/components/Option.cjs +1 -0
  125. package/dist/components/Option.js +44 -0
  126. package/dist/components/Progress.cjs +1 -0
  127. package/dist/components/Progress.js +77 -0
  128. package/dist/components/ProgressBar.cjs +1 -0
  129. package/dist/components/ProgressBar.js +101 -0
  130. package/dist/components/Radio.cjs +1 -0
  131. package/dist/components/Radio.js +81 -0
  132. package/dist/components/RailNav.cjs +1 -0
  133. package/dist/components/RailNav.js +124 -0
  134. package/dist/components/ReminderConfig.cjs +1 -0
  135. package/dist/components/ReminderConfig.js +375 -0
  136. package/dist/components/ReusableForm.cjs +1 -0
  137. package/dist/components/ReusableForm.js +686 -0
  138. package/dist/components/ReusableFormModal.cjs +1 -0
  139. package/dist/components/ReusableFormModal.js +112 -0
  140. package/dist/components/RightDrawer.cjs +1 -0
  141. package/dist/components/RightDrawer.js +143 -0
  142. package/dist/components/Search.cjs +1 -0
  143. package/dist/components/Search.js +252 -0
  144. package/dist/components/Select.cjs +1 -0
  145. package/dist/components/Select.js +243 -0
  146. package/dist/components/Sidebar.cjs +1 -0
  147. package/dist/components/Sidebar.js +372 -0
  148. package/dist/components/Slider.cjs +1 -0
  149. package/dist/components/Slider.js +42 -0
  150. package/dist/components/Spinner.cjs +1 -0
  151. package/dist/components/Spinner.js +87 -0
  152. package/dist/components/Stepper.cjs +1 -0
  153. package/dist/components/Stepper.js +12 -0
  154. package/dist/components/StepperItem.cjs +1 -0
  155. package/dist/components/StepperItem.js +33 -0
  156. package/dist/components/Switch.cjs +1 -0
  157. package/dist/components/Switch.js +112 -0
  158. package/dist/components/Tab.cjs +1 -0
  159. package/dist/components/Tab.js +134 -0
  160. package/dist/components/TabPanel.cjs +1 -0
  161. package/dist/components/TabPanel.js +49 -0
  162. package/dist/components/Text.cjs +1 -0
  163. package/dist/components/Text.js +84 -0
  164. package/dist/components/Textarea.cjs +1 -0
  165. package/dist/components/Textarea.js +102 -0
  166. package/dist/components/ThemeConfigurator.cjs +1 -0
  167. package/dist/components/ThemeConfigurator.js +73 -0
  168. package/dist/components/Timeline.cjs +1 -0
  169. package/dist/components/Timeline.js +24 -0
  170. package/dist/components/TimelineItem.cjs +1 -0
  171. package/dist/components/TimelineItem.js +63 -0
  172. package/dist/components/Toast.cjs +1 -0
  173. package/dist/components/Toast.js +231 -0
  174. package/dist/components/Tooltip.cjs +1 -0
  175. package/dist/components/Tooltip.js +124 -0
  176. package/dist/components/Typography.cjs +1 -0
  177. package/dist/components/Typography.js +267 -0
  178. package/dist/components/charts/BarChart.cjs +1 -0
  179. package/dist/components/charts/BarChart.js +323 -0
  180. package/dist/components/charts/LineChart.cjs +1 -0
  181. package/dist/components/charts/LineChart.js +322 -0
  182. package/dist/components/charts/PieChart.cjs +1 -0
  183. package/dist/components/charts/PieChart.js +311 -0
  184. package/dist/components/charts/StackedBarChart.cjs +1 -0
  185. package/dist/components/charts/StackedBarChart.js +348 -0
  186. package/dist/components/widgets/DashboardWidget.cjs +1 -0
  187. package/dist/components/widgets/DashboardWidget.js +309 -0
  188. package/dist/directives/tooltip.cjs +47 -0
  189. package/dist/directives/tooltip.js +115 -0
  190. package/dist/gspa-ui.css +1 -1
  191. package/dist/index.cjs +1 -0
  192. package/dist/index.esm.js +315 -19546
  193. package/dist/layouts/AuthLayout.cjs +1 -0
  194. package/dist/layouts/AuthLayout.js +188 -0
  195. package/dist/layouts/DashboardLayout.cjs +1 -0
  196. package/dist/layouts/DashboardLayout.js +244 -0
  197. package/dist/layouts/DefaultLayout.cjs +1 -0
  198. package/dist/layouts/DefaultLayout.js +94 -0
  199. package/dist/layouts/ErrorLayout.cjs +1 -0
  200. package/dist/layouts/ErrorLayout.js +452 -0
  201. package/dist/lib/auth.cjs +1 -0
  202. package/dist/lib/auth.js +4 -0
  203. package/dist/lib/form-field.cjs +1 -0
  204. package/dist/lib/form-field.js +4 -0
  205. package/dist/lib/icon.cjs +1 -0
  206. package/dist/lib/icon.js +4 -0
  207. package/dist/lib/theme.cjs +1 -0
  208. package/dist/lib/theme.js +145 -0
  209. package/dist/lib/toast.cjs +1 -0
  210. package/dist/lib/toast.js +81 -0
  211. package/dist/src/components/Alert.vue.d.ts.map +1 -1
  212. package/dist/src/components/Button.vue.d.ts +127 -29
  213. package/dist/src/components/Button.vue.d.ts.map +1 -1
  214. package/dist/src/components/Checkbox.vue.d.ts +2 -2
  215. package/dist/src/components/DataTable.vue.d.ts +1 -1
  216. package/dist/src/components/FormField.vue.d.ts +106 -38
  217. package/dist/src/components/FormField.vue.d.ts.map +1 -1
  218. package/dist/src/components/Icon.vue.d.ts.map +1 -1
  219. package/dist/src/components/Input.vue.d.ts +137 -33
  220. package/dist/src/components/Input.vue.d.ts.map +1 -1
  221. package/dist/src/components/ReusableForm.vue.d.ts +1 -1
  222. package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
  223. package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
  224. package/dist/src/components/Textarea.vue.d.ts +2 -2
  225. package/dist/src/index.d.ts +9 -4
  226. package/dist/src/index.d.ts.map +1 -1
  227. package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
  228. package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
  229. package/dist/src/lib/form-field.d.ts +2 -0
  230. package/dist/src/lib/form-field.d.ts.map +1 -0
  231. package/dist/src/lib/icon.d.ts +2 -0
  232. package/dist/src/lib/icon.d.ts.map +1 -0
  233. package/dist/src/lib/theme.d.ts +4 -0
  234. package/dist/src/lib/theme.d.ts.map +1 -1
  235. package/dist/src/types.d.ts +44 -0
  236. package/dist/src/types.d.ts.map +1 -0
  237. package/dist/styles/auth-layout.css +1 -0
  238. package/dist/styles/button.css +1 -0
  239. package/dist/styles/form-field.css +1 -0
  240. package/dist/styles/input.css +1 -0
  241. package/dist/styles/tokens.css +1 -0
  242. package/dist/tsconfig.tsbuildinfo +1 -1
  243. package/dist/utils/cn.cjs +1 -0
  244. package/dist/utils/cn.js +7 -0
  245. package/package.json +45 -8
  246. package/dist/index.js +0 -605
  247. package/dist/src/__tests__/Alert.spec.d.ts +0 -2
  248. package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
  249. package/dist/src/__tests__/App.spec.d.ts +0 -2
  250. package/dist/src/__tests__/App.spec.d.ts.map +0 -1
  251. package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
  252. package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
  253. package/dist/src/__tests__/Badge.spec.d.ts +0 -2
  254. package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
  255. package/dist/src/__tests__/Button.spec.d.ts +0 -2
  256. package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
  257. package/dist/src/__tests__/Card.spec.d.ts +0 -2
  258. package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
  259. package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
  260. package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
  261. package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
  262. package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
  263. package/dist/src/__tests__/Input.spec.d.ts +0 -2
  264. package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
  265. package/dist/src/__tests__/Modal.spec.d.ts +0 -2
  266. package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
  267. package/dist/src/__tests__/Radio.spec.d.ts +0 -2
  268. package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
  269. package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
  270. package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
  271. package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
  272. package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
  273. package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
  274. package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
  275. package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
  276. package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
  277. package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
  278. package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
  279. package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
  280. package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
@@ -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 e=Symbol("gspaFormFieldContext");exports.FORM_FIELD_CONTEXT_KEY=e;
@@ -0,0 +1,4 @@
1
+ const o = Symbol("gspaFormFieldContext");
2
+ export {
3
+ o as FORM_FIELD_CONTEXT_KEY
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("gspaIconAdapter");exports.ICON_ADAPTER_KEY=e;
@@ -0,0 +1,4 @@
1
+ const o = Symbol("gspaIconAdapter");
2
+ export {
3
+ o as ICON_ADAPTER_KEY
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _="ui-mode",E="ui-theme",R="academy",f=()=>typeof document<"u",x=e=>{f()&&document.documentElement.setAttribute("data-mode",e)},w=()=>f()?document.documentElement.getAttribute("data-mode"):null,H=(e,n,t)=>Math.min(t,Math.max(n,e)),d=(e,n="#173866")=>{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},h=e=>{const t=d(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)}},$=({r:e,g:n,b:t})=>{const r=o=>H(Math.round(o),0,255).toString(16).padStart(2,"0");return`#${r(e)}${r(n)}${r(t)}`},s=(e,n,t=.5)=>{const r=H(t,0,1),o=h(e),i=h(n);return $({r:o.r*(1-r)+i.r*r,g:o.g*(1-r)+i.g*r,b:o.b*(1-r)+i.b*r})},b=e=>{const{r:n,g:t,b:r}=h(e);return(.2126*n+.7152*t+.0722*r)/255>.62?"#111111":"#ffffff"},k=[{key:"academy",name:"Security Academy",light:{primary:"#173866",secondary:["#b98218","#14745d","#a96008"]},dark:{primary:"#e2b84e",secondary:["#8db0e1","#65c7a5","#efb45f"]}},{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"]}}],I=e=>{const n=String(e||R);return k.find(t=>t.key===n)||k[0]},S=(e={})=>{const n=w()||"light",t=I(e.preset||e.theme_preset),r=n==="dark"?t.dark:t.light,o=!!(e.preset||e.theme_preset),i=!!(e.use_custom||e.useCustom),u=o&&!i,c=d(u?r.primary:e.primary||e.primary_color||r.primary,"#173866"),T=u?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]],y=d(T?.[0],"#b98218"),m=d(T?.[1],"#14745d"),l=d(T?.[2],"#a96008"),a=n==="dark",g=a?"#ffffff":"#000000",p=a?"#07152a":"#ffffff",B=a?.72:.86,O=a?s(c,"#0a1b33",.94):"#ffffff",C=a?s(c,"#09192f",.94):"#edf2f8",K=a?s(c,"#122744",.94):"#e4ebf4";return{"--ui-primary":c,"--ui-primary-strong":s(c,g,.14),"--ui-primary-soft":s(c,p,B),"--ui-primary-contrast":b(c),"--ui-accent":y,"--ui-accent-strong":s(y,g,.14),"--ui-accent-soft":s(y,p,a?.72:.84),"--ui-accent-contrast":b(y),"--ui-success":m,"--ui-success-strong":s(m,g,.1),"--ui-success-soft":s(m,p,a?.72:.84),"--ui-success-contrast":b(m),"--ui-warning":l,"--ui-warning-strong":s(l,g,.1),"--ui-warning-soft":s(l,p,a?.72:.84),"--ui-warning-contrast":b(l),"--ui-ring":s(c,"#ffffff",.28),"--ui-text-inverse":"#ffffff","--ui-header-bg":O,"--ui-sidebar-bg":C,"--ui-submenu-bg":K}},M=()=>{if(!f())return null;const e=localStorage.getItem(E);if(!e)return null;try{return JSON.parse(e)}catch{return null}},A=()=>{if(!f())return;const e=document.documentElement;Object.keys(S({})).forEach(t=>e.style.removeProperty(t)),localStorage.removeItem(E)},P=(e,n={})=>{if(!f())return;const{persist:t=!0}=n;if(!e){A();return}const r=S(e),o=document.documentElement;Object.entries(r).forEach(([i,u])=>{o.style.setProperty(i,u)}),t&&localStorage.setItem(E,JSON.stringify(e))},j=e=>{if(e&&(x(e),f())){localStorage.setItem(_,e);const n=M();n&&P(n,{persist:!1})}},v=(e={})=>{if(!f())return;const{defaultMode:n="light"}=e,t=localStorage.getItem(_);x(t||n);const r=M();r&&P(r,{persist:!1})};exports.THEME_PRESETS=k;exports.buildThemeTokens=S;exports.clearTheme=A;exports.getMode=w;exports.getTheme=M;exports.getThemePreset=I;exports.initTheme=v;exports.setMode=j;exports.setTheme=P;
@@ -0,0 +1,145 @@
1
+ const S = "ui-mode", E = "ui-theme", O = "academy", f = () => typeof document < "u", x = (e) => {
2
+ f() && document.documentElement.setAttribute("data-mode", e);
3
+ }, C = () => f() ? document.documentElement.getAttribute("data-mode") : null, M = (e, n, t) => Math.min(t, Math.max(n, e)), d = (e, n = "#173866") => {
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
+ }, h = (e) => {
8
+ const t = d(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
+ }, K = ({ r: e, g: n, b: t }) => {
15
+ const r = (o) => M(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 = M(t, 0, 1), o = h(e), i = h(n);
19
+ return K({
20
+ r: o.r * (1 - r) + i.r * r,
21
+ g: o.g * (1 - r) + i.g * r,
22
+ b: o.b * (1 - r) + i.b * r
23
+ });
24
+ }, b = (e) => {
25
+ const { r: n, g: t, b: r } = h(e);
26
+ return (0.2126 * n + 0.7152 * t + 0.0722 * r) / 255 > 0.62 ? "#111111" : "#ffffff";
27
+ }, T = [
28
+ {
29
+ key: "academy",
30
+ name: "Security Academy",
31
+ light: { primary: "#173866", secondary: ["#b98218", "#14745d", "#a96008"] },
32
+ dark: { primary: "#e2b84e", secondary: ["#8db0e1", "#65c7a5", "#efb45f"] }
33
+ },
34
+ {
35
+ key: "ocean",
36
+ name: "Ocean Blue",
37
+ light: { primary: "#1d4ed8", secondary: ["#0ea5e9", "#22c55e", "#f59e0b"] },
38
+ dark: { primary: "#2ccad3", secondary: ["#39d9df", "#2fa6ff", "#1fc8b3"] }
39
+ },
40
+ {
41
+ key: "forest",
42
+ name: "Forest Green",
43
+ light: { primary: "#0f766e", secondary: ["#14b8a6", "#6366f1", "#f97316"] },
44
+ dark: { primary: "#22c7bc", secondary: ["#2fded1", "#2fa6ff", "#1ea8c2"] }
45
+ },
46
+ {
47
+ key: "violet",
48
+ name: "Royal Violet",
49
+ light: { primary: "#7c3aed", secondary: ["#a855f7", "#3b82f6", "#ef4444"] },
50
+ dark: { primary: "#3bc8f0", secondary: ["#59d6ff", "#29c5d8", "#1da1be"] }
51
+ },
52
+ {
53
+ key: "sunset",
54
+ name: "Sunset",
55
+ light: { primary: "#ea580c", secondary: ["#fb7185", "#f59e0b", "#8b5cf6"] },
56
+ dark: { primary: "#36cfd1", secondary: ["#58dcde", "#2fb7ff", "#21c4a1"] }
57
+ },
58
+ {
59
+ key: "graphite",
60
+ name: "Graphite",
61
+ light: { primary: "#334155", secondary: ["#64748b", "#0ea5e9", "#22c55e"] },
62
+ dark: { primary: "#2fb6d7", secondary: ["#5fd8ea", "#2da5e9", "#22c4b5"] }
63
+ }
64
+ ], $ = (e) => {
65
+ const n = String(e || O);
66
+ return T.find((t) => t.key === n) || T[0];
67
+ }, _ = (e = {}) => {
68
+ const n = C() || "light", t = $(e.preset || e.theme_preset), r = n === "dark" ? t.dark : t.light, o = !!(e.preset || e.theme_preset), i = !!(e.use_custom || e.useCustom), u = o && !i, c = d(u ? r.primary : e.primary || e.primary_color || r.primary, "#173866"), k = u ? r.secondary : Array.isArray(e.secondary) ? e.secondary : [
69
+ e.secondary_1 || r.secondary[0],
70
+ e.secondary_2 || r.secondary[1],
71
+ e.secondary_3 || r.secondary[2]
72
+ ], y = d(k?.[0], "#b98218"), m = d(k?.[1], "#14745d"), l = d(k?.[2], "#a96008"), a = n === "dark", g = a ? "#ffffff" : "#000000", p = a ? "#07152a" : "#ffffff", I = a ? 0.72 : 0.86, A = a ? s(c, "#0a1b33", 0.94) : "#ffffff", B = a ? s(c, "#09192f", 0.94) : "#edf2f8", H = a ? s(c, "#122744", 0.94) : "#e4ebf4";
73
+ return {
74
+ "--ui-primary": c,
75
+ "--ui-primary-strong": s(c, g, 0.14),
76
+ "--ui-primary-soft": s(c, p, I),
77
+ "--ui-primary-contrast": b(c),
78
+ "--ui-accent": y,
79
+ "--ui-accent-strong": s(y, g, 0.14),
80
+ "--ui-accent-soft": s(y, p, a ? 0.72 : 0.84),
81
+ "--ui-accent-contrast": b(y),
82
+ "--ui-success": m,
83
+ "--ui-success-strong": s(m, g, 0.1),
84
+ "--ui-success-soft": s(m, p, a ? 0.72 : 0.84),
85
+ "--ui-success-contrast": b(m),
86
+ "--ui-warning": l,
87
+ "--ui-warning-strong": s(l, g, 0.1),
88
+ "--ui-warning-soft": s(l, p, a ? 0.72 : 0.84),
89
+ "--ui-warning-contrast": b(l),
90
+ "--ui-ring": s(c, "#ffffff", 0.28),
91
+ "--ui-text-inverse": "#ffffff",
92
+ "--ui-header-bg": A,
93
+ "--ui-sidebar-bg": B,
94
+ "--ui-submenu-bg": H
95
+ };
96
+ }, P = () => {
97
+ if (!f()) return null;
98
+ const e = localStorage.getItem(E);
99
+ if (!e) return null;
100
+ try {
101
+ return JSON.parse(e);
102
+ } catch {
103
+ return null;
104
+ }
105
+ }, F = () => {
106
+ if (!f()) return;
107
+ const e = document.documentElement;
108
+ Object.keys(_({})).forEach((t) => e.style.removeProperty(t)), localStorage.removeItem(E);
109
+ }, w = (e, n = {}) => {
110
+ if (!f()) return;
111
+ const { persist: t = !0 } = n;
112
+ if (!e) {
113
+ F();
114
+ return;
115
+ }
116
+ const r = _(e), o = document.documentElement;
117
+ Object.entries(r).forEach(([i, u]) => {
118
+ o.style.setProperty(i, u);
119
+ }), t && localStorage.setItem(E, JSON.stringify(e));
120
+ }, R = (e) => {
121
+ if (e && (x(e), f())) {
122
+ localStorage.setItem(S, e);
123
+ const n = P();
124
+ n && w(n, { persist: !1 });
125
+ }
126
+ }, j = (e = {}) => {
127
+ if (!f()) return;
128
+ const {
129
+ defaultMode: n = "light"
130
+ } = e, t = localStorage.getItem(S);
131
+ x(t || n);
132
+ const r = P();
133
+ r && w(r, { persist: !1 });
134
+ };
135
+ export {
136
+ T as THEME_PRESETS,
137
+ _ as buildThemeTokens,
138
+ F as clearTheme,
139
+ C as getMode,
140
+ P as getTheme,
141
+ $ as getThemePreset,
142
+ j as initTheme,
143
+ R as setMode,
144
+ w as setTheme
145
+ };
@@ -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;