@gspa/ui 0.1.3 → 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 (196) 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 +311 -19548
  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/tsconfig.tsbuildinfo +1 -1
  193. package/dist/utils/cn.cjs +1 -0
  194. package/dist/utils/cn.js +7 -0
  195. package/package.json +37 -7
  196. package/dist/index.js +0 -605
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../components/Typography.cjs"),i=require("../components/Divider.cjs"),u=require("../_plugin-vue_export-helper-BHFhmbuH.cjs"),m={class:"relative min-h-screen overflow-hidden"},g={class:"relative z-10 mx-auto flex min-h-screen w-full max-w-[1400px] items-center px-4 py-4 sm:px-8 sm:py-6 lg:px-14"},p={class:"hidden w-full max-w-4xl pr-10 lg:block"},y={class:"ml-auto w-full max-w-[460px]"},x={class:"overflow-hidden rounded-sm ui-surface"},h={class:"px-1 sm:pt-2"},f={class:"flex items-start justify-between gap-2"},k=["src","alt"],v=["src","alt"],N={key:0},b={class:"px-5 py-4 sm:px-6 sm:py-2"},V={class:"space-y-4"},S={key:0,class:"px-5 pb-4 sm:px-6 sm:pb-5"},w={key:0,class:"text-right"},B={key:1,class:"px-6 pb-6 sm:px-8 sm:pb-8"},E={__name:"AuthLayout",props:{title:{type:String,default:"Login to your account:"},subtitle:{type:String,default:null},logoUrl:{type:String,default:null},secondaryLogoUrl:{type:String,default:null},secondaryLogoAlt:{type:String,default:"Secondary logo"},quote:{type:String,default:"MANAGEMENT IS DOING THINGS RIGHT, BUT LEADERSHIP IS DOING RIGHT THINGS"},backgroundImage:{type:String,default:null},backgroundOpacity:{type:Number,default:1},appName:{type:String,default:"Application"},appVersion:{type:String,default:"0.0.1"},copyright:{type:String,default:null},showFooter:{type:Boolean,default:!0}},setup(t){const a=t,r=e.computed(()=>new Date().getFullYear()),s=e.computed(()=>{const o=Number.isFinite(a.backgroundOpacity)?Math.min(1,Math.max(0,a.backgroundOpacity)):1;return{backgroundImage:a.backgroundImage?`url(${JSON.stringify(a.backgroundImage)})`:void 0,opacity:o}}),c=e.computed(()=>{const o=String(a.appVersion??"").trim();return o?o.toLowerCase().startsWith("v")?o:`v${o}`:"v0.0.0"});return e.onMounted(()=>{document.documentElement.classList.add("auth-page"),document.body.classList.add("auth-page")}),e.onBeforeUnmount(()=>{document.documentElement.classList.remove("auth-page"),document.body.classList.remove("auth-page")}),(o,n)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",{class:"absolute inset-0 bg-cover bg-center",style:e.normalizeStyle(s.value)},null,4),n[0]||(n[0]=e.createElementVNode("div",{class:"absolute inset-0"},null,-1)),e.createElementVNode("div",g,[e.createElementVNode("section",p,[t.quote?(e.openBlock(),e.createBlock(l.default,{key:0,variant:"body-xl",class:"max-w-3xl text-2xl leading-[1.4] font-light tracking-wide text-white/90 xl:text-[38px]"},{default:e.withCtx(()=>[e.createTextVNode(' "'+e.toDisplayString(t.quote)+'" ',1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("section",y,[e.createElementVNode("div",x,[e.createElementVNode("div",h,[e.createElementVNode("div",f,[t.logoUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.logoUrl,alt:`${t.appName} logo`,class:"h-16 w-auto max-w-[220px] object-contain sm:h-36"},null,8,k)):e.createCommentVNode("",!0),t.secondaryLogoUrl?(e.openBlock(),e.createElementBlock("img",{key:1,src:t.secondaryLogoUrl,alt:t.secondaryLogoAlt,class:"h-8 w-auto object-contain sm:h-32"},null,8,v)):e.createCommentVNode("",!0)]),o.$slots["card-header"]||t.title?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(o.$slots,"card-header",{},()=>[e.createVNode(l.default,{variant:"text-xl",align:"center",class:"font-normal leading-tight text-[#1f2328] text-center"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.subtitle?(e.openBlock(),e.createBlock(l.default,{key:0,variant:"body-sm",class:"mt-1 text-xs leading-normal text-[#5f6a74]"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.subtitle),1)]),_:1})):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)]),e.createVNode(i.default,{size:"sm",class:"my-0 bg-[#c7ccd2]"}),e.createElementVNode("div",b,[e.createElementVNode("div",V,[e.createVNode(d)])]),o.$slots.links||t.showFooter?(e.openBlock(),e.createElementBlock("div",S,[o.$slots.links?(e.openBlock(),e.createElementBlock("div",w,[e.renderSlot(o.$slots,"links",{},void 0,!0)])):e.createCommentVNode("",!0),t.showFooter?(e.openBlock(),e.createBlock(l.default,{key:1,variant:"body-md",class:"mt-2 text-right text-xs font-light leading-none text-[#5f6a74] sm:text-[14px]"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),o.$slots["card-footer"]?(e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(o.$slots,"card-footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),t.showFooter&&t.copyright?(e.openBlock(),e.createBlock(l.default,{key:0,variant:"body-md",class:"mt-3 text-center text-sm font-light leading-none text-white sm:text-[16px]"},{default:e.withCtx(()=>[e.createTextVNode(" © "+e.toDisplayString(t.copyright)+" "+e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])}}},C=u._export_sfc(E,[["__scopeId","data-v-909fd474"]]);exports.default=C;
@@ -0,0 +1,190 @@
1
+ import { computed as m, onMounted as b, onBeforeUnmount as k, resolveComponent as w, createElementBlock as n, openBlock as o, createElementVNode as s, normalizeStyle as S, createBlock as u, createCommentVNode as a, withCtx as r, createTextVNode as c, toDisplayString as l, createVNode as g, renderSlot as y } from "vue";
2
+ import d from "../components/Typography.js";
3
+ import N from "../components/Divider.js";
4
+ import { _ as I } from "../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const L = { class: "relative min-h-screen overflow-hidden" }, $ = { class: "relative z-10 mx-auto flex min-h-screen w-full max-w-[1400px] items-center px-4 py-4 sm:px-8 sm:py-6 lg:px-14" }, _ = { class: "hidden w-full max-w-4xl pr-10 lg:block" }, A = { class: "ml-auto w-full max-w-[460px]" }, E = { class: "overflow-hidden rounded-sm ui-surface" }, U = { class: "px-1 sm:pt-2" }, G = { class: "flex items-start justify-between gap-2" }, T = ["src", "alt"], V = ["src", "alt"], B = { key: 0 }, F = { class: "px-5 py-4 sm:px-6 sm:py-2" }, O = { class: "space-y-4" }, D = {
6
+ key: 0,
7
+ class: "px-5 pb-4 sm:px-6 sm:pb-5"
8
+ }, H = {
9
+ key: 0,
10
+ class: "text-right"
11
+ }, M = {
12
+ key: 1,
13
+ class: "px-6 pb-6 sm:px-8 sm:pb-8"
14
+ }, C = {
15
+ __name: "AuthLayout",
16
+ props: {
17
+ title: {
18
+ type: String,
19
+ default: "Login to your account:"
20
+ },
21
+ subtitle: {
22
+ type: String,
23
+ default: null
24
+ },
25
+ logoUrl: {
26
+ type: String,
27
+ default: null
28
+ },
29
+ secondaryLogoUrl: {
30
+ type: String,
31
+ default: null
32
+ },
33
+ secondaryLogoAlt: {
34
+ type: String,
35
+ default: "Secondary logo"
36
+ },
37
+ quote: {
38
+ type: String,
39
+ default: "MANAGEMENT IS DOING THINGS RIGHT, BUT LEADERSHIP IS DOING RIGHT THINGS"
40
+ },
41
+ backgroundImage: {
42
+ type: String,
43
+ default: null
44
+ },
45
+ backgroundOpacity: {
46
+ type: Number,
47
+ default: 1
48
+ },
49
+ appName: {
50
+ type: String,
51
+ default: "Application"
52
+ },
53
+ appVersion: {
54
+ type: String,
55
+ default: "0.0.1"
56
+ },
57
+ copyright: {
58
+ type: String,
59
+ default: null
60
+ },
61
+ showFooter: {
62
+ type: Boolean,
63
+ default: !0
64
+ }
65
+ },
66
+ setup(t) {
67
+ const i = t, h = m(() => (/* @__PURE__ */ new Date()).getFullYear()), x = m(() => {
68
+ const e = Number.isFinite(i.backgroundOpacity) ? Math.min(1, Math.max(0, i.backgroundOpacity)) : 1;
69
+ return {
70
+ backgroundImage: i.backgroundImage ? `url(${JSON.stringify(i.backgroundImage)})` : void 0,
71
+ opacity: e
72
+ };
73
+ }), p = m(() => {
74
+ const e = String(i.appVersion ?? "").trim();
75
+ return e ? e.toLowerCase().startsWith("v") ? e : `v${e}` : "v0.0.0";
76
+ });
77
+ return b(() => {
78
+ document.documentElement.classList.add("auth-page"), document.body.classList.add("auth-page");
79
+ }), k(() => {
80
+ document.documentElement.classList.remove("auth-page"), document.body.classList.remove("auth-page");
81
+ }), (e, f) => {
82
+ const v = w("router-view");
83
+ return o(), n("div", L, [
84
+ s("div", {
85
+ class: "absolute inset-0 bg-cover bg-center",
86
+ style: S(x.value)
87
+ }, null, 4),
88
+ f[0] || (f[0] = s("div", { class: "absolute inset-0" }, null, -1)),
89
+ s("div", $, [
90
+ s("section", _, [
91
+ t.quote ? (o(), u(d, {
92
+ key: 0,
93
+ variant: "body-xl",
94
+ class: "max-w-3xl text-2xl leading-[1.4] font-light tracking-wide text-white/90 xl:text-[38px]"
95
+ }, {
96
+ default: r(() => [
97
+ c(' "' + l(t.quote) + '" ', 1)
98
+ ]),
99
+ _: 1
100
+ })) : a("", !0)
101
+ ]),
102
+ s("section", A, [
103
+ s("div", E, [
104
+ s("div", U, [
105
+ s("div", G, [
106
+ t.logoUrl ? (o(), n("img", {
107
+ key: 0,
108
+ src: t.logoUrl,
109
+ alt: `${t.appName} logo`,
110
+ class: "h-16 w-auto max-w-[220px] object-contain sm:h-36"
111
+ }, null, 8, T)) : a("", !0),
112
+ t.secondaryLogoUrl ? (o(), n("img", {
113
+ key: 1,
114
+ src: t.secondaryLogoUrl,
115
+ alt: t.secondaryLogoAlt,
116
+ class: "h-8 w-auto object-contain sm:h-32"
117
+ }, null, 8, V)) : a("", !0)
118
+ ]),
119
+ e.$slots["card-header"] || t.title ? (o(), n("div", B, [
120
+ y(e.$slots, "card-header", {}, () => [
121
+ g(d, {
122
+ variant: "text-xl",
123
+ align: "center",
124
+ class: "font-normal leading-tight text-[#1f2328] text-center"
125
+ }, {
126
+ default: r(() => [
127
+ c(l(t.title), 1)
128
+ ]),
129
+ _: 1
130
+ }),
131
+ t.subtitle ? (o(), u(d, {
132
+ key: 0,
133
+ variant: "body-sm",
134
+ class: "mt-1 text-xs leading-normal text-[#5f6a74]"
135
+ }, {
136
+ default: r(() => [
137
+ c(l(t.subtitle), 1)
138
+ ]),
139
+ _: 1
140
+ })) : a("", !0)
141
+ ], !0)
142
+ ])) : a("", !0)
143
+ ]),
144
+ g(N, {
145
+ size: "sm",
146
+ class: "my-0 bg-[#c7ccd2]"
147
+ }),
148
+ s("div", F, [
149
+ s("div", O, [
150
+ g(v)
151
+ ])
152
+ ]),
153
+ e.$slots.links || t.showFooter ? (o(), n("div", D, [
154
+ e.$slots.links ? (o(), n("div", H, [
155
+ y(e.$slots, "links", {}, void 0, !0)
156
+ ])) : a("", !0),
157
+ t.showFooter ? (o(), u(d, {
158
+ key: 1,
159
+ variant: "body-md",
160
+ class: "mt-2 text-right text-xs font-light leading-none text-[#5f6a74] sm:text-[14px]"
161
+ }, {
162
+ default: r(() => [
163
+ c(l(p.value), 1)
164
+ ]),
165
+ _: 1
166
+ })) : a("", !0)
167
+ ])) : a("", !0),
168
+ e.$slots["card-footer"] ? (o(), n("div", M, [
169
+ y(e.$slots, "card-footer", {}, void 0, !0)
170
+ ])) : a("", !0)
171
+ ]),
172
+ t.showFooter && t.copyright ? (o(), u(d, {
173
+ key: 0,
174
+ variant: "body-md",
175
+ class: "mt-3 text-center text-sm font-light leading-none text-white sm:text-[16px]"
176
+ }, {
177
+ default: r(() => [
178
+ c(" © " + l(t.copyright) + " " + l(h.value), 1)
179
+ ]),
180
+ _: 1
181
+ })) : a("", !0)
182
+ ])
183
+ ])
184
+ ]);
185
+ };
186
+ }
187
+ }, Y = /* @__PURE__ */ I(C, [["__scopeId", "data-v-909fd474"]]);
188
+ export {
189
+ Y as default
190
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),S=require("vue-router"),F=require("../components/Sidebar.cjs"),J=require("../components/Header.cjs"),W=require("../lib/theme.cjs"),Y={class:"min-h-screen ui-surface-muted"},$={class:"p-6"},G={class:"mb-4 text-sm ui-text-muted"},K={__name:"DashboardLayout",props:{user:{type:Object,default:()=>({name:"John Doe",email:"john@example.com",role:"Administrator"})},initialSection:{type:String,default:"Dashboard"},initialPage:{type:String,default:"Overview"}},emits:["navigate","search","profile-action","logout","company-change","company-theme-save"],setup(y,{expose:M,emit:L}){const w=S.useRouter(),b=S.useRoute(),o=y,h=a.ref(null),l=a.ref(o.initialSection),c=a.ref(o.initialPage),u=a.ref(b.path),s=a.ref(!1),i=a.ref([]),p=a.ref(null),d=a.ref(null),A=[{company_id:101,company_name:"Acme Holdings Ltd",company_role:"Primary",theme:{primary:"#1d4ed8",secondary:["#0ea5e9","#22c55e","#f59e0b"]}},{company_id:102,company_name:"Bluewave Logistics",company_role:"Subsidiary",theme:{primary:"#0f766e",secondary:["#14b8a6","#6366f1","#f97316"]}},{company_id:103,company_name:"Northwind Services",company_role:"Partner",theme:{primary:"#7c3aed",secondary:["#a855f7","#3b82f6","#ef4444"]}}],r=L,D=[{name:"profile",label:"Profile",route:"profile",icon:"user"},{name:"settings",label:"Settings",route:"settings",icon:"cog"}],P=[{type:"section",label:"Dashboard"},{type:"link",name:"dashboard",label:"Dashboard",route:"/dashboard",icon:"home"},{type:"link",name:"analytics",label:"Analytics",route:"/analytics",icon:"user",badge:"2"},{type:"section",label:"Management"},{type:"link",name:"users",label:"User Management",icon:"users",subItems:[{name:"all-users",label:"All Users",route:"/users",icon:"user"},{name:"roles",label:"Roles & Permissions",route:"/users/roles",icon:"shield"},{name:"activity",label:"User Activity",route:"/users/activity",icon:"activity"}]},{type:"link",name:"roles",label:"Roles & Permissions",route:"/roles",icon:"cogs"}],f=a.computed(()=>130),m=a.computed(()=>Array.isArray(o.user?.companies)&&o.user.companies.length>0?o.user.companies:i.value.length>0?i.value:A),g=a.computed(()=>d.value||o.user?.currentCompany||o.user?.company||p.value||m.value[0]||null),N=({companies:e=[],currentCompany:t=null}={})=>{i.value=Array.isArray(e)?e:[],p.value=t||i.value[0]||null,d.value=p.value},R=({companyId:e,theme:t})=>{!e||!t||(i.value=m.value.map(n=>(n?.company_id||n?.companyId||n?.id)!==e?n:{...n,theme:t}),r("company-theme-save",{company_id:e,theme:t}))};a.provide("dashboardLayout",{currentSection:l,currentPage:c,setCompanySwitcherDemoData:N,updateCompanyThemeInDemoData:R});const k=e=>!e||typeof e!="object"?null:e.theme||e.company_theme||null,_=e=>!e||typeof e!="object"?"":e.logo||e.company_logo||"",T=a.computed(()=>o.user?.companyLogo||o.user?.company_logo||o.user?.brandLogo||""),U=a.computed(()=>_(g.value)||_(m.value[0])||""),x=a.computed(()=>o.user?.logoUrl||o.user?.appLogo||"/applogo.png"),V=a.computed(()=>{const e="eBoard",t=String(u.value||"").replace(/^\/+|\/+$/g,"");if(!t)return e;const n=t.split("/").filter(Boolean).map(C=>C.replace(/[-_]+/g," ").replace(/\b\w/g,z=>z.toUpperCase()));return[e,...n].join(" / ")}),B=()=>{s.value=!s.value},O=e=>{s.value=e},v=e=>{e.route&&w.push(e.route),r("navigate",e)},j=e=>{const n={"/dashboard":{section:"Dashboard",page:"Overview"},"/analytics":{section:"Dashboard",page:"Analytics"},"/users":{section:"Management",page:"Users"},"/roles":{section:"Management",page:"Roles & Permissions"},"/management":{section:"Management",page:"Settings"},"/management/system-settings":{section:"Management",page:"System Settings"},"/management/user-management":{section:"Management",page:"User Management"},"/management/permissions":{section:"Management",page:"Permissions"},"/management/audit-logs":{section:"Management",page:"Audit Logs"},"/management/backup":{section:"Management",page:"Backup & Restore"}}[e]||{section:"Dashboard",page:"Overview"};l.value=n.section,c.value=n.page},E=e=>{r("search",e)},q=e=>{r("profile-action",e)},I=()=>{r("logout")},H=e=>{d.value=e,r("company-change",e)};return a.watch(g,e=>{W.setTheme(k(e),{persist:!1})},{immediate:!0}),a.watch(()=>b.path,e=>{u.value=e,j(e)},{immediate:!0}),M({navigate:v,updateCurrentPage:(e,t)=>{l.value=e,c.value=t}}),(e,t)=>{const n=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",Y,[a.createVNode(F.default,{ref_key:"sidebarRef",ref:h,"sidebar-width":f.value,header:{title:"Risk & Compliance"},"navigation-items":P,"mobile-open":s.value,"current-path":u.value,onNavigate:v,"onUpdate:mobileOpen":O},null,8,["sidebar-width","mobile-open","current-path"]),a.createVNode(J.default,{"sidebar-width":f.value,"current-section":l.value,"current-page":c.value,"current-route":u.value,user:y.user,notifications:[],"profile-menu-items":D,"mobile-open":s.value,"current-company":g.value,"company-logo":T.value,"current-company-logo":U.value,companies:m.value,"logo-url":x.value,"show-search":!1,"settings-route":"/management/system-settings",onSearch:E,onProfileAction:q,onLogout:I,onNavigate:v,onToggleMobileSidebar:B,onCompanyChange:H},null,8,["sidebar-width","current-section","current-page","current-route","user","mobile-open","current-company","company-logo","current-company-logo","companies","logo-url"]),a.createElementVNode("main",{class:"transition-all duration-300 ease-in-out pt-14 min-h-screen",style:a.normalizeStyle({marginLeft:h.value?.contentMarginLeft+"px"})},[a.createElementVNode("div",$,[a.createElementVNode("p",G,[t[0]||(t[0]=a.createElementVNode("span",{class:"font-semibold ui-text"},"You are here:",-1)),a.createTextVNode(" "+a.toDisplayString(V.value),1)]),a.createVNode(n)])],4)])}}};exports.default=K;
@@ -0,0 +1,244 @@
1
+ import { ref as t, computed as r, provide as W, watch as L, resolveComponent as Y, createElementBlock as $, openBlock as q, createVNode as b, createElementVNode as g, normalizeStyle as G, createTextVNode as K, toDisplayString as Q } from "vue";
2
+ import { useRouter as X, useRoute as Z } from "vue-router";
3
+ import ee from "../components/Sidebar.js";
4
+ import ae from "../components/Header.js";
5
+ import { setTheme as oe } from "../lib/theme.js";
6
+ const ne = { class: "min-h-screen ui-surface-muted" }, te = { class: "p-6" }, re = { class: "mb-4 text-sm ui-text-muted" }, ge = {
7
+ __name: "DashboardLayout",
8
+ props: {
9
+ user: {
10
+ type: Object,
11
+ default: () => ({
12
+ name: "John Doe",
13
+ email: "john@example.com",
14
+ role: "Administrator"
15
+ })
16
+ },
17
+ initialSection: {
18
+ type: String,
19
+ default: "Dashboard"
20
+ },
21
+ initialPage: {
22
+ type: String,
23
+ default: "Overview"
24
+ }
25
+ },
26
+ emits: [
27
+ "navigate",
28
+ "search",
29
+ "profile-action",
30
+ "logout",
31
+ "company-change",
32
+ "company-theme-save"
33
+ ],
34
+ setup(f, { expose: w, emit: A }) {
35
+ const P = X(), _ = Z(), o = f, C = t(null), c = t(o.initialSection), u = t(o.initialPage), m = t(_.path), i = t(!1), l = t([]), d = t(null), v = t(null), k = [
36
+ {
37
+ company_id: 101,
38
+ company_name: "Acme Holdings Ltd",
39
+ company_role: "Primary",
40
+ theme: {
41
+ primary: "#1d4ed8",
42
+ secondary: ["#0ea5e9", "#22c55e", "#f59e0b"]
43
+ }
44
+ },
45
+ {
46
+ company_id: 102,
47
+ company_name: "Bluewave Logistics",
48
+ company_role: "Subsidiary",
49
+ theme: {
50
+ primary: "#0f766e",
51
+ secondary: ["#14b8a6", "#6366f1", "#f97316"]
52
+ }
53
+ },
54
+ {
55
+ company_id: 103,
56
+ company_name: "Northwind Services",
57
+ company_role: "Partner",
58
+ theme: {
59
+ primary: "#7c3aed",
60
+ secondary: ["#a855f7", "#3b82f6", "#ef4444"]
61
+ }
62
+ }
63
+ ], s = A, R = [
64
+ {
65
+ name: "profile",
66
+ label: "Profile",
67
+ route: "profile",
68
+ icon: "user"
69
+ },
70
+ {
71
+ name: "settings",
72
+ label: "Settings",
73
+ route: "settings",
74
+ icon: "cog"
75
+ }
76
+ ], x = [
77
+ {
78
+ type: "section",
79
+ label: "Dashboard"
80
+ },
81
+ {
82
+ type: "link",
83
+ name: "dashboard",
84
+ label: "Dashboard",
85
+ route: "/dashboard",
86
+ icon: "home"
87
+ },
88
+ {
89
+ type: "link",
90
+ name: "analytics",
91
+ label: "Analytics",
92
+ route: "/analytics",
93
+ icon: "user",
94
+ badge: "2"
95
+ },
96
+ {
97
+ type: "section",
98
+ label: "Management"
99
+ },
100
+ {
101
+ type: "link",
102
+ name: "users",
103
+ label: "User Management",
104
+ icon: "users",
105
+ subItems: [
106
+ {
107
+ name: "all-users",
108
+ label: "All Users",
109
+ route: "/users",
110
+ icon: "user"
111
+ },
112
+ {
113
+ name: "roles",
114
+ label: "Roles & Permissions",
115
+ route: "/users/roles",
116
+ icon: "shield"
117
+ },
118
+ {
119
+ name: "activity",
120
+ label: "User Activity",
121
+ route: "/users/activity",
122
+ icon: "activity"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ type: "link",
128
+ name: "roles",
129
+ label: "Roles & Permissions",
130
+ route: "/roles",
131
+ icon: "cogs"
132
+ }
133
+ ], S = r(() => 130), p = r(() => Array.isArray(o.user?.companies) && o.user.companies.length > 0 ? o.user.companies : l.value.length > 0 ? l.value : k), y = r(() => v.value || o.user?.currentCompany || o.user?.company || d.value || p.value[0] || null);
134
+ W("dashboardLayout", {
135
+ currentSection: c,
136
+ currentPage: u,
137
+ setCompanySwitcherDemoData: ({ companies: e = [], currentCompany: a = null } = {}) => {
138
+ l.value = Array.isArray(e) ? e : [], d.value = a || l.value[0] || null, v.value = d.value;
139
+ },
140
+ updateCompanyThemeInDemoData: ({ companyId: e, theme: a }) => {
141
+ !e || !a || (l.value = p.value.map((n) => (n?.company_id || n?.companyId || n?.id) !== e ? n : { ...n, theme: a }), s("company-theme-save", { company_id: e, theme: a }));
142
+ }
143
+ });
144
+ const T = (e) => !e || typeof e != "object" ? null : e.theme || e.company_theme || null, M = (e) => !e || typeof e != "object" ? "" : e.logo || e.company_logo || "", U = r(() => o.user?.companyLogo || o.user?.company_logo || o.user?.brandLogo || ""), B = r(() => M(y.value) || M(p.value[0]) || ""), N = r(() => o.user?.logoUrl || o.user?.appLogo || "/applogo.png"), O = r(() => {
145
+ const e = "eBoard", a = String(m.value || "").replace(/^\/+|\/+$/g, "");
146
+ if (!a) return e;
147
+ const n = a.split("/").filter(Boolean).map(
148
+ (D) => D.replace(/[-_]+/g, " ").replace(/\b\w/g, (J) => J.toUpperCase())
149
+ );
150
+ return [e, ...n].join(" / ");
151
+ }), j = () => {
152
+ i.value = !i.value;
153
+ }, I = (e) => {
154
+ i.value = e;
155
+ }, h = (e) => {
156
+ e.route && P.push(e.route), s("navigate", e);
157
+ }, E = (e) => {
158
+ const n = {
159
+ "/dashboard": { section: "Dashboard", page: "Overview" },
160
+ "/analytics": { section: "Dashboard", page: "Analytics" },
161
+ "/users": { section: "Management", page: "Users" },
162
+ "/roles": { section: "Management", page: "Roles & Permissions" },
163
+ "/management": { section: "Management", page: "Settings" },
164
+ "/management/system-settings": { section: "Management", page: "System Settings" },
165
+ "/management/user-management": { section: "Management", page: "User Management" },
166
+ "/management/permissions": { section: "Management", page: "Permissions" },
167
+ "/management/audit-logs": { section: "Management", page: "Audit Logs" },
168
+ "/management/backup": { section: "Management", page: "Backup & Restore" }
169
+ }[e] || { section: "Dashboard", page: "Overview" };
170
+ c.value = n.section, u.value = n.page;
171
+ }, V = (e) => {
172
+ s("search", e);
173
+ }, H = (e) => {
174
+ s("profile-action", e);
175
+ }, z = () => {
176
+ s("logout");
177
+ }, F = (e) => {
178
+ v.value = e, s("company-change", e);
179
+ };
180
+ return L(y, (e) => {
181
+ oe(T(e), { persist: !1 });
182
+ }, { immediate: !0 }), L(() => _.path, (e) => {
183
+ m.value = e, E(e);
184
+ }, { immediate: !0 }), w({
185
+ navigate: h,
186
+ updateCurrentPage: (e, a) => {
187
+ c.value = e, u.value = a;
188
+ }
189
+ }), (e, a) => {
190
+ const n = Y("router-view");
191
+ return q(), $("div", ne, [
192
+ b(ee, {
193
+ ref_key: "sidebarRef",
194
+ ref: C,
195
+ "sidebar-width": S.value,
196
+ header: { title: "Risk & Compliance" },
197
+ "navigation-items": x,
198
+ "mobile-open": i.value,
199
+ "current-path": m.value,
200
+ onNavigate: h,
201
+ "onUpdate:mobileOpen": I
202
+ }, null, 8, ["sidebar-width", "mobile-open", "current-path"]),
203
+ b(ae, {
204
+ "sidebar-width": S.value,
205
+ "current-section": c.value,
206
+ "current-page": u.value,
207
+ "current-route": m.value,
208
+ user: f.user,
209
+ notifications: [],
210
+ "profile-menu-items": R,
211
+ "mobile-open": i.value,
212
+ "current-company": y.value,
213
+ "company-logo": U.value,
214
+ "current-company-logo": B.value,
215
+ companies: p.value,
216
+ "logo-url": N.value,
217
+ "show-search": !1,
218
+ "settings-route": "/management/system-settings",
219
+ onSearch: V,
220
+ onProfileAction: H,
221
+ onLogout: z,
222
+ onNavigate: h,
223
+ onToggleMobileSidebar: j,
224
+ onCompanyChange: F
225
+ }, null, 8, ["sidebar-width", "current-section", "current-page", "current-route", "user", "mobile-open", "current-company", "company-logo", "current-company-logo", "companies", "logo-url"]),
226
+ g("main", {
227
+ class: "transition-all duration-300 ease-in-out pt-14 min-h-screen",
228
+ style: G({ marginLeft: C.value?.contentMarginLeft + "px" })
229
+ }, [
230
+ g("div", te, [
231
+ g("p", re, [
232
+ a[0] || (a[0] = g("span", { class: "font-semibold ui-text" }, "You are here:", -1)),
233
+ K(" " + Q(O.value), 1)
234
+ ]),
235
+ b(n)
236
+ ])
237
+ ], 4)
238
+ ]);
239
+ };
240
+ }
241
+ };
242
+ export {
243
+ ge as default
244
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m={class:"min-h-screen ui-surface-muted"},u={class:"flex-1"},p={key:0,class:"ui-surface border-b ui-border-strong"},b={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4"},v={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},x={__name:"DefaultLayout",props:{navigationItems:{type:Array,default:()=>[{label:"Home",href:"/",active:!0},{label:"About",href:"/about"},{label:"Services",href:"/services"},{label:"Contact",href:"/contact"}]},breadcrumbItems:{type:Array,default:()=>[]},showBreadcrumb:{type:Boolean,default:!1}},setup(n){return(t,o)=>{const r=e.resolveComponent("Logo"),s=e.resolveComponent("MainNavigation"),a=e.resolveComponent("Button"),l=e.resolveComponent("Header"),d=e.resolveComponent("Breadcrumb"),i=e.resolveComponent("Text"),c=e.resolveComponent("Footer");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(l,null,{logo:e.withCtx(()=>[e.renderSlot(t.$slots,"logo",{},()=>[e.createVNode(r)])]),navigation:e.withCtx(()=>[e.renderSlot(t.$slots,"navigation",{},()=>[e.createVNode(s,{items:n.navigationItems},null,8,["items"])])]),actions:e.withCtx(()=>[e.renderSlot(t.$slots,"header-actions",{},()=>[e.createVNode(a,{variant:"ghost",size:"sm"},{default:e.withCtx(()=>[...o[0]||(o[0]=[e.createTextVNode(" Sign In ",-1)])]),_:1}),e.createVNode(a,{size:"sm"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode(" Get Started ",-1)])]),_:1})])]),_:3}),e.createElementVNode("main",u,[n.showBreadcrumb?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",b,[e.renderSlot(t.$slots,"breadcrumb",{},()=>[e.createVNode(d,{items:n.breadcrumbItems},null,8,["items"])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.renderSlot(t.$slots,"default")])]),e.createVNode(c,null,{brand:e.withCtx(()=>[e.renderSlot(t.$slots,"footer-brand",{},()=>[e.createVNode(r,{class:"mb-4"}),e.createVNode(i,{class:"ui-text max-w-md"},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode(" Your application description goes here. ",-1)])]),_:1})])]),_:3})])}}};exports.default=x;
@@ -0,0 +1,94 @@
1
+ import { resolveComponent as t, createElementBlock as d, openBlock as u, createVNode as e, createElementVNode as l, withCtx as o, renderSlot as n, createTextVNode as i, createCommentVNode as v } from "vue";
2
+ const x = { class: "min-h-screen ui-surface-muted" }, h = { class: "flex-1" }, y = {
3
+ key: 0,
4
+ class: "ui-surface border-b ui-border-strong"
5
+ }, B = { class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4" }, w = { class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8" }, $ = {
6
+ __name: "DefaultLayout",
7
+ props: {
8
+ navigationItems: {
9
+ type: Array,
10
+ default: () => [
11
+ { label: "Home", href: "/", active: !0 },
12
+ { label: "About", href: "/about" },
13
+ { label: "Services", href: "/services" },
14
+ { label: "Contact", href: "/contact" }
15
+ ]
16
+ },
17
+ breadcrumbItems: {
18
+ type: Array,
19
+ default: () => []
20
+ },
21
+ showBreadcrumb: {
22
+ type: Boolean,
23
+ default: !1
24
+ }
25
+ },
26
+ setup(r) {
27
+ return (s, a) => {
28
+ const m = t("Logo"), p = t("MainNavigation"), c = t("Button"), b = t("Header"), f = t("Breadcrumb"), _ = t("Text"), g = t("Footer");
29
+ return u(), d("div", x, [
30
+ e(b, null, {
31
+ logo: o(() => [
32
+ n(s.$slots, "logo", {}, () => [
33
+ e(m)
34
+ ])
35
+ ]),
36
+ navigation: o(() => [
37
+ n(s.$slots, "navigation", {}, () => [
38
+ e(p, { items: r.navigationItems }, null, 8, ["items"])
39
+ ])
40
+ ]),
41
+ actions: o(() => [
42
+ n(s.$slots, "header-actions", {}, () => [
43
+ e(c, {
44
+ variant: "ghost",
45
+ size: "sm"
46
+ }, {
47
+ default: o(() => [...a[0] || (a[0] = [
48
+ i(" Sign In ", -1)
49
+ ])]),
50
+ _: 1
51
+ }),
52
+ e(c, { size: "sm" }, {
53
+ default: o(() => [...a[1] || (a[1] = [
54
+ i(" Get Started ", -1)
55
+ ])]),
56
+ _: 1
57
+ })
58
+ ])
59
+ ]),
60
+ _: 3
61
+ }),
62
+ l("main", h, [
63
+ r.showBreadcrumb ? (u(), d("div", y, [
64
+ l("div", B, [
65
+ n(s.$slots, "breadcrumb", {}, () => [
66
+ e(f, { items: r.breadcrumbItems }, null, 8, ["items"])
67
+ ])
68
+ ])
69
+ ])) : v("", !0),
70
+ l("div", w, [
71
+ n(s.$slots, "default")
72
+ ])
73
+ ]),
74
+ e(g, null, {
75
+ brand: o(() => [
76
+ n(s.$slots, "footer-brand", {}, () => [
77
+ e(m, { class: "mb-4" }),
78
+ e(_, { class: "ui-text max-w-md" }, {
79
+ default: o(() => [...a[2] || (a[2] = [
80
+ i(" Your application description goes here. ", -1)
81
+ ])]),
82
+ _: 1
83
+ })
84
+ ])
85
+ ]),
86
+ _: 3
87
+ })
88
+ ]);
89
+ };
90
+ }
91
+ };
92
+ export {
93
+ $ as default
94
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),j=require("../_plugin-vue_export-helper-BHFhmbuH.cjs"),R={name:"ErrorLayout",props:{errorType:{type:[String,Number],default:"404"},errorCode:{type:[String,Number],default:null},errorTitle:{type:String,default:null},errorMessage:{type:String,default:null},brandName:{type:String,default:"Software Technologies"},showLogo:{type:Boolean,default:!0},showBackground:{type:Boolean,default:!0},showDefaultIllustration:{type:Boolean,default:!0},showDefaultActions:{type:Boolean,default:!0},showHomeButton:{type:Boolean,default:!0},showBackButton:{type:Boolean,default:!0},showRetryButton:{type:Boolean,default:!1},showSupportButton:{type:Boolean,default:!1},showAdditionalInfo:{type:Boolean,default:!1},homeUrl:{type:String,default:"/"},homeButtonText:{type:String,default:"Go Home"},backButtonText:{type:String,default:"Go Back"},retryButtonText:{type:String,default:"Try Again"},helpText:{type:String,default:null},supportUrl:{type:String,default:null}},emits:["retry","back","contact-support"],setup(o,{emit:n}){const r=e.getCurrentInstance(),t=e.inject("$router",null)||r?.appContext.app.config.globalProperties?.$router,i=e.ref(!1),u=e.ref(!1),l=e.ref(navigator.onLine),d=e.ref(`err_${Date.now()}_${Math.random().toString(36).substr(2,9)}`),f=e.ref(!1),c=()=>{l.value=navigator.onLine};e.onMounted(()=>{window.addEventListener("online",c),window.addEventListener("offline",c)}),e.onUnmounted(()=>{window.removeEventListener("online",c),window.removeEventListener("offline",c)});const g=e.computed(()=>{const s={404:{title:"Page Not Found",message:"Sorry, we couldn't find the page you're looking for.",icon:"🔍",color:"#64748b",homeButtonIcon:"🏠",additionalInfo:{title:"What can you do?",items:[{icon:"✓",iconColor:"green-500",text:"Check the URL for typos"},{icon:"✓",iconColor:"green-500",text:"Go back to the previous page"},{icon:"✓",iconColor:"green-500",text:"Visit our homepage"}]}},403:{title:"Unauthorized Access",message:"You are not authorized to view this page.",icon:"🚫",color:"#ef4444",homeButtonIcon:"🔐",additionalInfo:{title:"Why am I seeing this?",items:[{icon:"⚠️",iconColor:"yellow-500",text:"You may need to log in to access this page"},{icon:"⚠️",iconColor:"yellow-500",text:"Your account might not have the required permissions"},{icon:"⚠️",iconColor:"yellow-500",text:"Contact support if you believe this is an error"}]}},401:{title:"Authentication Required",message:"You need to log in to access this resource.",icon:"🔐",color:"#f59e0b",homeButtonIcon:"🔐",additionalInfo:{title:"How to proceed?",items:[{icon:"✓",iconColor:"blue-500",text:"Log in with your credentials"},{icon:"✓",iconColor:"blue-500",text:"Create an account if you don't have one"},{icon:"✓",iconColor:"blue-500",text:"Reset your password if you forgot it"}]}},500:{title:"Internal Server Error",message:"Something went wrong on our end. Please try again later.",icon:"🔧",color:"#ef4444",homeButtonIcon:"🏠",additionalInfo:{title:"What happened?",items:[{icon:"⚠️",iconColor:"red-500",text:"Our servers are experiencing issues"},{icon:"⚠️",iconColor:"red-500",text:"The problem is temporary"},{icon:"⚠️",iconColor:"red-500",text:"Try refreshing the page or come back later"}]}},503:{title:"Service Unavailable",message:"The service is temporarily unavailable. Please try again later.",icon:"🔧",color:"#f59e0b",homeButtonIcon:"🏠",additionalInfo:{title:"Service Status",items:[{icon:"⚠️",iconColor:"amber-500",text:"We're performing scheduled maintenance"},{icon:"⚠️",iconColor:"amber-500",text:"Normal service will resume shortly"},{icon:"⚠️",iconColor:"amber-500",text:"Check our status page for updates"}]}},network:{title:"Network Error",message:"Unable to connect to the server. Please check your internet connection.",icon:"📶",color:"#ef4444",homeButtonIcon:"🏠",additionalInfo:{title:"Connection Issues",items:[{icon:"⚠️",iconColor:"red-500",text:"Check your internet connection"},{icon:"⚠️",iconColor:"red-500",text:"Try refreshing the page"},{icon:"⚠️",iconColor:"red-500",text:"Contact your network administrator"}]}}};return s[o.errorType]||s[404]}),a=e.computed(()=>g.value),y=e.computed(()=>o.errorTitle||a.value.title),p=e.computed(()=>o.errorMessage||a.value.message),h=e.computed(()=>a.value.homeButtonIcon||"🏠"),C=e.computed(()=>o.showAdditionalInfo?a.value.additionalInfo:null),m=()=>{t?t.push(o.homeUrl):window.location.href=o.homeUrl},k=()=>{t&&window.history.length>1?t.back():window.history.length>1?window.history.back():m(),n("back")},x=async()=>{i.value=!0;try{await new Promise(s=>setTimeout(s,1e3)),window.location.reload()}catch(s){console.error("Retry failed:",s)}finally{i.value=!1}n("retry")},B=e.computed(()=>["min-h-screen relative flex items-center justify-center","px-4 sm:px-6 lg:px-8"]),b=e.computed(()=>["absolute inset-0 -z-10"]),w=e.computed(()=>["w-full max-w-2xl mx-auto text-center"]),v=e.computed(()=>["mb-8"]),E=e.computed(()=>["space-y-8"]),N=e.computed(()=>["flex justify-center mb-6"]),S=e.computed(()=>["w-32 h-32 flex items-center justify-center"]),V=e.computed(()=>["space-y-4"]),I=e.computed(()=>["text-6xl font-bold ui-text mb-4"]),T=e.computed(()=>["text-3xl font-bold ui-text"]),D=e.computed(()=>["text-lg ui-text max-w-lg mx-auto"]),z=e.computed(()=>["mt-8"]),_=e.computed(()=>["mt-8"]),L=e.computed(()=>["mt-6"]);return{isRetrying:i,reportSent:u,isOnline:l,errorId:d,isDev:f,errorConfig:a,title:y,message:p,homeButtonIcon:h,additionalInfoConfig:C,goHome:m,goBack:k,retry:x,layoutClasses:B,backgroundClasses:b,contentClasses:w,headerClasses:v,errorContentClasses:E,illustrationClasses:N,iconContainerClasses:S,detailsClasses:V,codeClasses:I,titleClasses:T,messageClasses:D,actionsClasses:z,additionalInfoClasses:_,helpClasses:L}}},U={class:"flex justify-center"},H={class:"flex items-center gap-3"},A={class:"text-2xl font-bold ui-text"},P={key:1,class:"ui-danger-soft border border-(--ui-danger-soft) rounded-lg p-4 mx-auto max-w-md mb-6"},M={class:"flex flex-col sm:flex-row gap-4 justify-center"},O=["disabled"],q={key:0,class:"animate-spin"},G={key:1},W=["disabled"],Y={key:0},F={key:1},J={key:0,class:"mt-8 max-w-md mx-auto"},K={class:"rounded-lg shadow-sm p-6"},Q={class:"text-lg font-semibold ui-text mb-4"},X={class:"space-y-3"},Z={class:"text-sm ui-text"},$=["href"],ee={key:5,class:"text-xs ui-text font-mono mt-4"};function te(o,n,r,t,i,u){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.layoutClasses)},[r.showBackground?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.backgroundClasses)},[e.renderSlot(o.$slots,"background",{},()=>[n[4]||(n[4]=e.createElementVNode("div",{class:"absolute inset-0 bg-linear-to-br from-(--ui-surface) to-(--ui-surface)"},null,-1))])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(t.contentClasses)},[o.$slots.header||r.showLogo?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.headerClasses)},[e.renderSlot(o.$slots,"header",{},()=>[e.createElementVNode("div",U,[e.renderSlot(o.$slots,"logo",{},()=>[e.createElementVNode("div",H,[n[5]||(n[5]=e.createElementVNode("div",{class:"w-10 h-10 ui-primary-bg rounded-xl flex items-center justify-center"},[e.createElementVNode("span",{class:"ui-text font-bold text-lg"},"STL")],-1)),e.createElementVNode("span",A,e.toDisplayString(r.brandName),1)])])])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(t.errorContentClasses)},[o.$slots.illustration||r.showDefaultIllustration?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.illustrationClasses)},[e.renderSlot(o.$slots,"illustration",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(t.iconContainerClasses)},[e.createElementVNode("div",{class:"text-8xl",style:e.normalizeStyle({color:t.errorConfig.color})},e.toDisplayString(t.errorConfig.icon),5)],2)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(t.detailsClasses)},[r.errorCode?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.codeClasses)},e.toDisplayString(r.errorCode),3)):e.createCommentVNode("",!0),e.createElementVNode("h1",{class:e.normalizeClass(t.titleClasses)},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),e.createElementVNode("p",{class:e.normalizeClass(t.messageClasses)},[e.renderSlot(o.$slots,"message",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2)],2),t.isOnline?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",P,[...n[6]||(n[6]=[e.createElementVNode("div",{class:"flex items-center justify-center gap-2 ui-danger"},[e.createElementVNode("span",{class:"w-3 h-3 ui-danger-bg rounded-full animate-pulse"}),e.createElementVNode("span",{class:"font-medium"},"No Internet Connection")],-1)])])),o.$slots.actions||r.showDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(t.actionsClasses)},[e.renderSlot(o.$slots,"actions",{},()=>[e.createElementVNode("div",M,[r.showHomeButton?(e.openBlock(),e.createElementBlock("button",{key:0,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",onClick:n[0]||(n[0]=(...l)=>t.goHome&&t.goHome(...l))},[e.createElementVNode("span",null,e.toDisplayString(t.homeButtonIcon),1),e.createTextVNode(" "+e.toDisplayString(r.homeButtonText),1)])):e.createCommentVNode("",!0),r.showBackButton?(e.openBlock(),e.createElementBlock("button",{key:1,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",onClick:n[1]||(n[1]=(...l)=>t.goBack&&t.goBack(...l))},[n[7]||(n[7]=e.createElementVNode("span",null,"←",-1)),e.createTextVNode(" "+e.toDisplayString(r.backButtonText),1)])):e.createCommentVNode("",!0),r.showRetryButton?(e.openBlock(),e.createElementBlock("button",{key:2,disabled:t.isRetrying||!t.isOnline,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",onClick:n[2]||(n[2]=(...l)=>t.retry&&t.retry(...l))},[t.isRetrying?(e.openBlock(),e.createElementBlock("span",q,"↻")):(e.openBlock(),e.createElementBlock("span",G,"🔄")),e.createTextVNode(" "+e.toDisplayString(t.isRetrying?"Retrying...":r.retryButtonText),1)],8,O)):e.createCommentVNode("",!0),r.showSupportButton?(e.openBlock(),e.createElementBlock("button",{key:3,disabled:t.reportSent,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",onClick:n[3]||(n[3]=l=>o.$emit("contact-support"))},[t.reportSent?(e.openBlock(),e.createElementBlock("span",Y,"✓")):(e.openBlock(),e.createElementBlock("span",F,"📝")),e.createTextVNode(" "+e.toDisplayString(t.reportSent?"Report Sent":"Contact Support"),1)],8,W)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),o.$slots["additional-info"]||r.showAdditionalInfo?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(t.additionalInfoClasses)},[e.renderSlot(o.$slots,"additional-info",{},()=>[t.additionalInfoConfig?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("h3",Q,e.toDisplayString(t.additionalInfoConfig.title),1),e.createElementVNode("ul",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.additionalInfoConfig.items,(l,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:"flex items-start gap-3 text-sm ui-text"},[e.createElementVNode("span",{class:e.normalizeClass(`w-4 h-4 text-${l.iconColor||"slate-400"} shrink-0 mt-0.5`)},e.toDisplayString(l.icon),3),e.createElementVNode("span",null,e.toDisplayString(l.text),1)]))),128))])])])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),o.$slots.help||r.helpText?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(t.helpClasses)},[e.renderSlot(o.$slots,"help",{},()=>[e.createElementVNode("p",Z,[e.createTextVNode(e.toDisplayString(r.helpText)+" ",1),r.supportUrl?(e.openBlock(),e.createElementBlock("a",{key:0,href:r.supportUrl,class:"ui-primary hover:text-(--ui-primary) underline ml-1"},[...n[8]||(n[8]=[e.createElementVNode("span",{class:"inline-block w-4 h-4 mr-1"},"❓",-1),e.createTextVNode(" Get Help ",-1)])],8,$)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),t.isDev?(e.openBlock(),e.createElementBlock("div",ee," Error ID: "+e.toDisplayString(t.errorId),1)):e.createCommentVNode("",!0)],2)],2)],2)}const oe=j._export_sfc(R,[["render",te]]);exports.default=oe;