@appcorp/shadcn 1.2.0 → 2.0.1

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 (231) hide show
  1. package/components/app-sidebar.js +1 -41
  2. package/components/audio.js +1 -21
  3. package/components/dashboard.js +1 -67
  4. package/components/drawer-generic.js +1 -47
  5. package/components/enhanced-checkbox.js +1 -86
  6. package/components/enhanced-combobox.js +1 -315
  7. package/components/enhanced-drawer-footer.js +1 -39
  8. package/components/enhanced-drawer-header.js +1 -15
  9. package/components/enhanced-dropzone-impl.d.ts +32 -0
  10. package/components/enhanced-dropzone-impl.js +1 -0
  11. package/components/enhanced-dropzone.d.ts +2 -63
  12. package/components/enhanced-dropzone.js +1 -296
  13. package/components/enhanced-input.js +1 -87
  14. package/components/enhanced-label.js +1 -68
  15. package/components/enhanced-radio.js +1 -23
  16. package/components/enhanced-select.js +1 -81
  17. package/components/enhanced-slider.js +1 -80
  18. package/components/enhanced-switch.js +1 -89
  19. package/components/enhanced-table-footer-action.js +1 -110
  20. package/components/enhanced-table-footer-page.js +1 -132
  21. package/components/enhanced-table-footer-pagination.js +1 -118
  22. package/components/enhanced-table-header-action.js +1 -40
  23. package/components/enhanced-table-header-search.js +1 -18
  24. package/components/enhanced-table.js +1 -329
  25. package/components/enhanced-textarea.js +1 -87
  26. package/components/field.d.ts +1 -1
  27. package/components/field.js +1 -153
  28. package/components/image-resize-dialog.js +1 -180
  29. package/components/nav-main.js +1 -86
  30. package/components/nav-projects.js +1 -50
  31. package/components/nav-user.js +1 -62
  32. package/components/show-toast.js +1 -11
  33. package/components/sidebar.d.ts +1 -1
  34. package/components/sidebar.js +1 -326
  35. package/components/team-switcher.js +1 -53
  36. package/components/theme-provider.js +1 -160
  37. package/components/timeline.js +1 -21
  38. package/components/tooltip.js +1 -85
  39. package/components/ui/accordion.js +1 -87
  40. package/components/ui/alert-dialog.js +1 -120
  41. package/components/ui/alert.d.ts +1 -1
  42. package/components/ui/alert.js +1 -90
  43. package/components/ui/area-chart-v1-impl.d.ts +19 -0
  44. package/components/ui/area-chart-v1-impl.js +1 -0
  45. package/components/ui/area-chart-v1.d.ts +2 -19
  46. package/components/ui/area-chart-v1.js +1 -114
  47. package/components/ui/aspect-ratio.js +1 -40
  48. package/components/ui/avatar.js +1 -80
  49. package/components/ui/badge.d.ts +2 -2
  50. package/components/ui/badge.js +1 -80
  51. package/components/ui/breadcrumb.js +1 -107
  52. package/components/ui/button.d.ts +2 -2
  53. package/components/ui/button.js +1 -92
  54. package/components/ui/calendar-impl.d.ts +8 -0
  55. package/components/ui/calendar-impl.js +1 -0
  56. package/components/ui/calendar.d.ts +2 -8
  57. package/components/ui/calendar.js +1 -109
  58. package/components/ui/card.js +1 -96
  59. package/components/ui/carousel-impl.d.ts +18 -0
  60. package/components/ui/carousel-impl.js +1 -0
  61. package/components/ui/carousel.d.ts +6 -18
  62. package/components/ui/carousel.js +1 -171
  63. package/components/ui/chart-impl.d.ts +62 -0
  64. package/components/ui/chart-impl.js +7 -0
  65. package/components/ui/chart.d.ts +7 -62
  66. package/components/ui/chart.js +1 -220
  67. package/components/ui/checkbox.js +1 -71
  68. package/components/ui/collapsible.js +1 -44
  69. package/components/ui/combobox.js +1 -88
  70. package/components/ui/command-impl.d.ts +80 -0
  71. package/components/ui/command-impl.js +1 -0
  72. package/components/ui/command.d.ts +9 -80
  73. package/components/ui/command.js +1 -118
  74. package/components/ui/context-menu.js +1 -141
  75. package/components/ui/dialog.js +1 -113
  76. package/components/ui/drawer-impl.d.ts +22 -0
  77. package/components/ui/drawer-impl.js +1 -0
  78. package/components/ui/drawer.d.ts +10 -22
  79. package/components/ui/drawer.js +1 -112
  80. package/components/ui/dropdown-menu.js +1 -143
  81. package/components/ui/form.d.ts +4 -2
  82. package/components/ui/form.js +1 -132
  83. package/components/ui/hover-card.js +1 -72
  84. package/components/ui/input-otp-impl.d.ts +34 -0
  85. package/components/ui/input-otp-impl.js +1 -0
  86. package/components/ui/input-otp.d.ts +4 -34
  87. package/components/ui/input-otp.js +1 -93
  88. package/components/ui/input.js +1 -66
  89. package/components/ui/label.d.ts +1 -1
  90. package/components/ui/label.js +1 -70
  91. package/components/ui/language-selector.js +1 -63
  92. package/components/ui/menubar.js +1 -165
  93. package/components/ui/navigation-menu.d.ts +1 -1
  94. package/components/ui/navigation-menu.js +1 -114
  95. package/components/ui/pagination.js +1 -113
  96. package/components/ui/popover.js +1 -75
  97. package/components/ui/progress.js +1 -69
  98. package/components/ui/radio-group.js +1 -77
  99. package/components/ui/resizable-impl.d.ts +24 -0
  100. package/components/ui/resizable-impl.js +1 -0
  101. package/components/ui/resizable.d.ts +3 -24
  102. package/components/ui/resizable.js +1 -79
  103. package/components/ui/scroll-area.js +1 -80
  104. package/components/ui/select.js +1 -127
  105. package/components/ui/separator.js +1 -68
  106. package/components/ui/sheet.d.ts +1 -1
  107. package/components/ui/sheet.js +1 -127
  108. package/components/ui/skeleton.js +1 -34
  109. package/components/ui/slider.js +1 -79
  110. package/components/ui/sonner.js +1 -45
  111. package/components/ui/switch.js +1 -69
  112. package/components/ui/table.js +1 -109
  113. package/components/ui/tabs.js +1 -82
  114. package/components/ui/textarea.js +1 -66
  115. package/components/ui/theme-switcher.js +1 -152
  116. package/components/ui/toggle.d.ts +2 -2
  117. package/components/ui/toggle.js +1 -87
  118. package/data/admin-dashboard.js +1 -304
  119. package/hooks/use-enhanced-combobox.js +1 -150
  120. package/hooks/use-mobile.js +1 -51
  121. package/hooks/use-outside-click.js +1 -23
  122. package/lib/themes.js +1 -150
  123. package/lib/toast-utils.js +1 -212
  124. package/lib/utils.js +1 -12
  125. package/package.json +9 -90
  126. package/utils/transform-breadcrumbs.js +1 -11
  127. package/utils/transform-navitems.js +1 -33
  128. package/components/aceternity-ui/apple-cards-carousel.d.ts +0 -35
  129. package/components/aceternity-ui/apple-cards-carousel.js +0 -263
  130. package/components/shadcn-example/ai-chat/chat-interface.d.ts +0 -11
  131. package/components/shadcn-example/ai-chat/chat-interface.js +0 -70
  132. package/components/shadcn-example/ai-chat/index.d.ts +0 -38
  133. package/components/shadcn-example/ai-chat/index.js +0 -66
  134. package/components/shadcn-example/ai-chat/sidebar.d.ts +0 -15
  135. package/components/shadcn-example/ai-chat/sidebar.js +0 -68
  136. package/components/shadcn-example/ai-chat/welcome-section.d.ts +0 -12
  137. package/components/shadcn-example/ai-chat/welcome-section.js +0 -26
  138. package/components/shadcn-example/authentication/index.d.ts +0 -24
  139. package/components/shadcn-example/authentication/index.js +0 -59
  140. package/components/shadcn-example/authentication/user-auth-form.d.ts +0 -11
  141. package/components/shadcn-example/authentication/user-auth-form.js +0 -54
  142. package/components/shadcn-example/blog-detail-page/comment-section.d.ts +0 -15
  143. package/components/shadcn-example/blog-detail-page/comment-section.js +0 -83
  144. package/components/shadcn-example/blog-detail-page/content.d.ts +0 -7
  145. package/components/shadcn-example/blog-detail-page/content.js +0 -15
  146. package/components/shadcn-example/blog-detail-page/header.d.ts +0 -11
  147. package/components/shadcn-example/blog-detail-page/header.js +0 -36
  148. package/components/shadcn-example/blog-detail-page/index.d.ts +0 -25
  149. package/components/shadcn-example/blog-detail-page/index.js +0 -74
  150. package/components/shadcn-example/blog-page/blog-post-card.d.ts +0 -13
  151. package/components/shadcn-example/blog-page/blog-post-card.js +0 -30
  152. package/components/shadcn-example/blog-page/featured-post-sidebar-item.d.ts +0 -10
  153. package/components/shadcn-example/blog-page/featured-post-sidebar-item.js +0 -19
  154. package/components/shadcn-example/blog-page/index.d.ts +0 -20
  155. package/components/shadcn-example/blog-page/index.js +0 -36
  156. package/components/shadcn-example/coming-soon/countdown.d.ts +0 -2
  157. package/components/shadcn-example/coming-soon/countdown.js +0 -82
  158. package/components/shadcn-example/coming-soon/index.d.ts +0 -10
  159. package/components/shadcn-example/coming-soon/index.js +0 -41
  160. package/components/shadcn-io/color-picker/index.d.ts +0 -43
  161. package/components/shadcn-io/color-picker/index.js +0 -304
  162. package/components/shadcn-io/copy-button/index.d.ts +0 -16
  163. package/components/shadcn-io/copy-button/index.js +0 -121
  164. package/components/shadcn-io/dropzone/index.d.ts +0 -19
  165. package/components/shadcn-io/dropzone/index.js +0 -131
  166. package/components/shadcn-io/gantt/index.d.ts +0 -145
  167. package/components/shadcn-io/gantt/index.js +0 -766
  168. package/components/shadcn-io/table/index.d.ts +0 -60
  169. package/components/shadcn-io/table/index.js +0 -138
  170. package/templates/appcorp-v1/footer/bottom-bar.d.ts +0 -6
  171. package/templates/appcorp-v1/footer/bottom-bar.js +0 -25
  172. package/templates/appcorp-v1/footer/cta.d.ts +0 -6
  173. package/templates/appcorp-v1/footer/cta.js +0 -21
  174. package/templates/appcorp-v1/footer/footer-grid.d.ts +0 -14
  175. package/templates/appcorp-v1/footer/footer-grid.js +0 -52
  176. package/templates/appcorp-v1/footer/index.d.ts +0 -3
  177. package/templates/appcorp-v1/footer/index.js +0 -28
  178. package/templates/appcorp-v1/footer/newsletter.d.ts +0 -11
  179. package/templates/appcorp-v1/footer/newsletter.js +0 -28
  180. package/templates/appcorp-v1/footer/stats.d.ts +0 -6
  181. package/templates/appcorp-v1/footer/stats.js +0 -15
  182. package/templates/appcorp-v1/header/announcement-bar.d.ts +0 -3
  183. package/templates/appcorp-v1/header/announcement-bar.js +0 -15
  184. package/templates/appcorp-v1/header/dropdown-panel.d.ts +0 -8
  185. package/templates/appcorp-v1/header/dropdown-panel.js +0 -72
  186. package/templates/appcorp-v1/header/index.d.ts +0 -12
  187. package/templates/appcorp-v1/header/index.js +0 -16
  188. package/templates/appcorp-v1/header/mobile-menu.d.ts +0 -14
  189. package/templates/appcorp-v1/header/mobile-menu.js +0 -101
  190. package/templates/appcorp-v1/header/navigation-bar.d.ts +0 -3
  191. package/templates/appcorp-v1/header/navigation-bar.js +0 -117
  192. package/templates/appcorp-v1/header/social-button.d.ts +0 -7
  193. package/templates/appcorp-v1/header/social-button.js +0 -48
  194. package/templates/appcorp-v1/home.d.ts +0 -3
  195. package/templates/appcorp-v1/home.js +0 -27
  196. package/templates/data/appcorp-v1.d.ts +0 -93
  197. package/templates/data/appcorp-v1.js +0 -348
  198. package/templates/data/edupilotpro-v1.d.ts +0 -33
  199. package/templates/data/edupilotpro-v1.js +0 -116
  200. package/templates/data/school-v1.d.ts +0 -328
  201. package/templates/data/school-v1.js +0 -1563
  202. package/templates/edupilotpro-v1/feature-card.d.ts +0 -13
  203. package/templates/edupilotpro-v1/feature-card.js +0 -28
  204. package/templates/edupilotpro-v1/mockups/dashboard-mockup.d.ts +0 -3
  205. package/templates/edupilotpro-v1/mockups/dashboard-mockup.js +0 -55
  206. package/templates/school-v1/footer.d.ts +0 -3
  207. package/templates/school-v1/footer.js +0 -75
  208. package/templates/school-v1/index.d.ts +0 -18
  209. package/templates/school-v1/index.js +0 -60
  210. package/templates/school-v1/navigation.d.ts +0 -3
  211. package/templates/school-v1/navigation.js +0 -123
  212. package/templates/school-v1/sections/about.d.ts +0 -3
  213. package/templates/school-v1/sections/about.js +0 -49
  214. package/templates/school-v1/sections/admissions.d.ts +0 -3
  215. package/templates/school-v1/sections/admissions.js +0 -77
  216. package/templates/school-v1/sections/contact.d.ts +0 -3
  217. package/templates/school-v1/sections/contact.js +0 -67
  218. package/templates/school-v1/sections/faqs.d.ts +0 -3
  219. package/templates/school-v1/sections/faqs.js +0 -50
  220. package/templates/school-v1/sections/hero.d.ts +0 -3
  221. package/templates/school-v1/sections/hero.js +0 -132
  222. package/templates/school-v1/sections/management.d.ts +0 -3
  223. package/templates/school-v1/sections/management.js +0 -34
  224. package/templates/school-v1/sections/policies.d.ts +0 -3
  225. package/templates/school-v1/sections/policies.js +0 -127
  226. package/templates/school-v1/sections/programs.d.ts +0 -3
  227. package/templates/school-v1/sections/programs.js +0 -107
  228. package/templates/school-v1/sections/testimonials.d.ts +0 -3
  229. package/templates/school-v1/sections/testimonials.js +0 -46
  230. package/templates/school-v1/sections/why-choose-us.d.ts +0 -3
  231. package/templates/school-v1/sections/why-choose-us.js +0 -57
@@ -1,304 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adminDashboardData = void 0;
4
- var lucide_react_1 = require("lucide-react");
5
- exports.adminDashboardData = {
6
- apps: [
7
- {
8
- name: "Analytics",
9
- url: "#",
10
- icon: lucide_react_1.PieChart,
11
- enabled: true,
12
- order: 1,
13
- },
14
- {
15
- name: "Terminal",
16
- url: "#",
17
- icon: lucide_react_1.SquareTerminal,
18
- enabled: true,
19
- order: 2,
20
- },
21
- ],
22
- offerUrl: "/offer",
23
- username: "Muntazim",
24
- email: "admin@company.com",
25
- avatar: "https://www.w3schools.com/w3images/avatar6.png",
26
- showLanguageSelector: true,
27
- handleSignOut: function () { return console.log("Sign out"); },
28
- clearBrowserCache: function () { return console.log("Clear browser cache"); },
29
- profiles: [
30
- {
31
- name: "Subhan",
32
- avatar: "https://www.w3schools.com/w3images/avatar6.png",
33
- age: "3 Yrs",
34
- enabled: true,
35
- order: 1,
36
- },
37
- {
38
- name: "Mustajab",
39
- avatar: "https://www.w3schools.com/w3images/avatar6.png",
40
- age: "4 Yrs",
41
- enabled: false,
42
- order: 2,
43
- },
44
- ],
45
- navItems: [
46
- {
47
- title: "Dashboard",
48
- url: "/dashboard",
49
- icon: lucide_react_1.SquareTerminal,
50
- isActive: false,
51
- enabled: true,
52
- order: 1,
53
- subItems: [],
54
- },
55
- {
56
- title: "Flashcard Category",
57
- url: "#",
58
- icon: lucide_react_1.Bot,
59
- isActive: true,
60
- enabled: true,
61
- order: 2,
62
- subItems: [
63
- {
64
- title: "Manage",
65
- url: "",
66
- isActive: true,
67
- enabled: true,
68
- order: 1,
69
- },
70
- {
71
- title: "Toddler / Early childhood",
72
- url: "#",
73
- isActive: false,
74
- enabled: true,
75
- order: 2,
76
- },
77
- {
78
- title: "Preschool / Pre-kindergarten",
79
- url: "#",
80
- isActive: false,
81
- enabled: true,
82
- order: 3,
83
- },
84
- {
85
- title: "Kindergarten",
86
- url: "#",
87
- isActive: false,
88
- enabled: true,
89
- order: 4,
90
- },
91
- {
92
- title: "Grade / Standard 1",
93
- url: "#",
94
- isActive: false,
95
- enabled: true,
96
- order: 5,
97
- },
98
- {
99
- title: "Grade / Standard 2",
100
- url: "#",
101
- isActive: false,
102
- enabled: true,
103
- order: 6,
104
- },
105
- {
106
- title: "Grade / Standard 3",
107
- url: "#",
108
- isActive: false,
109
- enabled: true,
110
- order: 7,
111
- },
112
- {
113
- title: "Grade / Standard 4",
114
- url: "#",
115
- isActive: false,
116
- enabled: true,
117
- order: 8,
118
- },
119
- {
120
- title: "Grade / Standard 5",
121
- url: "#",
122
- isActive: false,
123
- enabled: true,
124
- order: 9,
125
- },
126
- ],
127
- },
128
- {
129
- title: "Flashcard",
130
- url: "#",
131
- icon: lucide_react_1.Bot,
132
- isActive: false,
133
- enabled: true,
134
- order: 3,
135
- subItems: [
136
- {
137
- title: "Toddler / Early childhood",
138
- url: "#",
139
- isActive: false,
140
- enabled: true,
141
- order: 1,
142
- },
143
- {
144
- title: "Preschool / Pre-kindergarten",
145
- url: "#",
146
- isActive: false,
147
- enabled: true,
148
- order: 2,
149
- },
150
- {
151
- title: "Kindergarten",
152
- url: "#",
153
- isActive: false,
154
- enabled: true,
155
- order: 3,
156
- },
157
- {
158
- title: "Grade / Standard 1",
159
- url: "#",
160
- isActive: false,
161
- enabled: true,
162
- order: 4,
163
- },
164
- {
165
- title: "Grade / Standard 2",
166
- url: "#",
167
- isActive: false,
168
- enabled: true,
169
- order: 5,
170
- },
171
- {
172
- title: "Grade / Standard 3",
173
- url: "#",
174
- isActive: false,
175
- enabled: true,
176
- order: 6,
177
- },
178
- {
179
- title: "Grade / Standard 4",
180
- url: "#",
181
- isActive: false,
182
- enabled: true,
183
- order: 7,
184
- },
185
- {
186
- title: "Grade / Standard 5",
187
- url: "#",
188
- isActive: false,
189
- enabled: true,
190
- order: 8,
191
- },
192
- ],
193
- },
194
- {
195
- title: "Quizzes",
196
- url: "#",
197
- icon: lucide_react_1.BookOpen,
198
- isActive: false,
199
- enabled: true,
200
- order: 4,
201
- subItems: [
202
- {
203
- title: "Introduction",
204
- url: "#",
205
- isActive: false,
206
- enabled: true,
207
- order: 1,
208
- },
209
- {
210
- title: "Get Started",
211
- url: "#",
212
- isActive: false,
213
- enabled: true,
214
- order: 2,
215
- },
216
- {
217
- title: "Tutorials",
218
- url: "#",
219
- isActive: false,
220
- enabled: true,
221
- order: 3,
222
- },
223
- {
224
- title: "Changelog",
225
- url: "#",
226
- isActive: false,
227
- enabled: true,
228
- order: 4,
229
- },
230
- ],
231
- },
232
- {
233
- title: "Settings",
234
- url: "#",
235
- icon: lucide_react_1.Settings2,
236
- isActive: false,
237
- enabled: true,
238
- order: 5,
239
- subItems: [
240
- {
241
- title: "General",
242
- url: "#",
243
- isActive: false,
244
- enabled: true,
245
- order: 1,
246
- },
247
- {
248
- title: "Kids",
249
- url: "#",
250
- isActive: false,
251
- enabled: true,
252
- order: 2,
253
- },
254
- ],
255
- },
256
- ],
257
- footerNavItems: [
258
- {
259
- title: "Upgrade to Pro",
260
- url: "#",
261
- icon: lucide_react_1.Sparkles,
262
- isActive: false,
263
- enabled: true,
264
- order: 1,
265
- subItems: [],
266
- },
267
- {
268
- title: "Divider",
269
- url: "#",
270
- icon: lucide_react_1.Sparkles,
271
- isActive: false,
272
- enabled: true,
273
- order: 2,
274
- subItems: [],
275
- },
276
- {
277
- title: "Account",
278
- url: "#",
279
- icon: lucide_react_1.BadgeCheck,
280
- isActive: false,
281
- enabled: true,
282
- order: 3,
283
- subItems: [],
284
- },
285
- {
286
- title: "Billing",
287
- url: "#",
288
- icon: lucide_react_1.CreditCard,
289
- isActive: false,
290
- enabled: true,
291
- order: 4,
292
- subItems: [],
293
- },
294
- {
295
- title: "Notifications",
296
- url: "#",
297
- icon: lucide_react_1.Bell,
298
- isActive: false,
299
- enabled: true,
300
- order: 5,
301
- subItems: [],
302
- },
303
- ],
304
- };
1
+ "use strict";import{BadgeCheck as a,Bell as l,BookOpen as i,Bot as e,CreditCard as d,PieChart as s,Settings2 as o,Sparkles as r,SquareTerminal as t}from"lucide-react";export const adminDashboardData={apps:[{name:"Analytics",url:"#",icon:s,enabled:!0,order:1},{name:"Terminal",url:"#",icon:t,enabled:!0,order:2}],offerUrl:"/offer",username:"Muntazim",email:"admin@company.com",avatar:"https://www.w3schools.com/w3images/avatar6.png",showLanguageSelector:!0,handleSignOut:()=>console.log("Sign out"),clearBrowserCache:()=>console.log("Clear browser cache"),profiles:[{name:"Subhan",avatar:"https://www.w3schools.com/w3images/avatar6.png",age:"3 Yrs",enabled:!0,order:1},{name:"Mustajab",avatar:"https://www.w3schools.com/w3images/avatar6.png",age:"4 Yrs",enabled:!1,order:2}],navItems:[{title:"Dashboard",url:"/dashboard",icon:t,isActive:!1,enabled:!0,order:1,subItems:[]},{title:"Flashcard Category",url:"#",icon:e,isActive:!0,enabled:!0,order:2,subItems:[{title:"Manage",url:"",isActive:!0,enabled:!0,order:1},{title:"Toddler / Early childhood",url:"#",isActive:!1,enabled:!0,order:2},{title:"Preschool / Pre-kindergarten",url:"#",isActive:!1,enabled:!0,order:3},{title:"Kindergarten",url:"#",isActive:!1,enabled:!0,order:4},{title:"Grade / Standard 1",url:"#",isActive:!1,enabled:!0,order:5},{title:"Grade / Standard 2",url:"#",isActive:!1,enabled:!0,order:6},{title:"Grade / Standard 3",url:"#",isActive:!1,enabled:!0,order:7},{title:"Grade / Standard 4",url:"#",isActive:!1,enabled:!0,order:8},{title:"Grade / Standard 5",url:"#",isActive:!1,enabled:!0,order:9}]},{title:"Flashcard",url:"#",icon:e,isActive:!1,enabled:!0,order:3,subItems:[{title:"Toddler / Early childhood",url:"#",isActive:!1,enabled:!0,order:1},{title:"Preschool / Pre-kindergarten",url:"#",isActive:!1,enabled:!0,order:2},{title:"Kindergarten",url:"#",isActive:!1,enabled:!0,order:3},{title:"Grade / Standard 1",url:"#",isActive:!1,enabled:!0,order:4},{title:"Grade / Standard 2",url:"#",isActive:!1,enabled:!0,order:5},{title:"Grade / Standard 3",url:"#",isActive:!1,enabled:!0,order:6},{title:"Grade / Standard 4",url:"#",isActive:!1,enabled:!0,order:7},{title:"Grade / Standard 5",url:"#",isActive:!1,enabled:!0,order:8}]},{title:"Quizzes",url:"#",icon:i,isActive:!1,enabled:!0,order:4,subItems:[{title:"Introduction",url:"#",isActive:!1,enabled:!0,order:1},{title:"Get Started",url:"#",isActive:!1,enabled:!0,order:2},{title:"Tutorials",url:"#",isActive:!1,enabled:!0,order:3},{title:"Changelog",url:"#",isActive:!1,enabled:!0,order:4}]},{title:"Settings",url:"#",icon:o,isActive:!1,enabled:!0,order:5,subItems:[{title:"General",url:"#",isActive:!1,enabled:!0,order:1},{title:"Kids",url:"#",isActive:!1,enabled:!0,order:2}]}],footerNavItems:[{title:"Upgrade to Pro",url:"#",icon:r,isActive:!1,enabled:!0,order:1,subItems:[]},{title:"Divider",url:"#",icon:r,isActive:!1,enabled:!0,order:2,subItems:[]},{title:"Account",url:"#",icon:a,isActive:!1,enabled:!0,order:3,subItems:[]},{title:"Billing",url:"#",icon:d,isActive:!1,enabled:!0,order:4,subItems:[]},{title:"Notifications",url:"#",icon:l,isActive:!1,enabled:!0,order:5,subItems:[]}]};
@@ -1,150 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- var __generator = (this && this.__generator) || function (thisArg, body) {
45
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
47
- function verb(n) { return function (v) { return step([n, v]); }; }
48
- function step(op) {
49
- if (f) throw new TypeError("Generator is already executing.");
50
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
51
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
52
- if (y = 0, t) op = [op[0] & 2, t.value];
53
- switch (op[0]) {
54
- case 0: case 1: t = op; break;
55
- case 4: _.label++; return { value: op[1], done: false };
56
- case 5: _.label++; y = op[1]; op = [0]; continue;
57
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
58
- default:
59
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
60
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
61
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
62
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
63
- if (t[2]) _.ops.pop();
64
- _.trys.pop(); continue;
65
- }
66
- op = body.call(thisArg, _);
67
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
68
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
69
- }
70
- };
71
- Object.defineProperty(exports, "__esModule", { value: true });
72
- exports.useEnhancedCombobox = void 0;
73
- var react_1 = __importStar(require("react"));
74
- var fetch_data_1 = require("@react-pakistan/util-functions/general/fetch-data");
75
- var api_methods_1 = require("@react-pakistan/util-functions/constants/api-methods");
76
- var use_debounce_1 = require("@react-pakistan/util-functions/hooks/use-debounce");
77
- var enhanced_combobox_1 = require("../components/enhanced-combobox");
78
- var useEnhancedCombobox = function (_a) {
79
- var emptyText = _a.emptyText, error = _a.error, formatSearchResult = _a.formatSearchResult, id = _a.id, info = _a.info, label = _a.label, onValueChange = _a.onValueChange, options = _a.options, placeholder = _a.placeholder, required = _a.required, searchEndpoint = _a.searchEndpoint, searchPlaceholder = _a.searchPlaceholder, value = _a.value;
80
- var _b = (0, react_1.useState)(""), searchQuery = _b[0], setSearchQuery = _b[1];
81
- var _c = (0, react_1.useState)([]), searchOptions = _c[0], setSearchOptions = _c[1];
82
- var _d = (0, react_1.useState)(false), loading = _d[0], setLoading = _d[1];
83
- var debouncedSearchQuery = (0, use_debounce_1.useDebounce)(searchQuery, 800);
84
- (0, react_1.useEffect)(function () {
85
- if (!debouncedSearchQuery) {
86
- setSearchOptions([]);
87
- setLoading(false);
88
- return;
89
- }
90
- setLoading(true);
91
- (function () { return __awaiter(void 0, void 0, void 0, function () {
92
- var data, formatter, error_1;
93
- return __generator(this, function (_a) {
94
- switch (_a.label) {
95
- case 0:
96
- _a.trys.push([0, 2, 3, 4]);
97
- return [4 /*yield*/, (0, fetch_data_1.fetchData)({
98
- url: searchEndpoint,
99
- method: api_methods_1.API_METHODS.GET,
100
- params: { searchQuery: debouncedSearchQuery },
101
- })];
102
- case 1:
103
- data = (_a.sent()).data;
104
- formatter = formatSearchResult ||
105
- (function (item) {
106
- var _a, _b;
107
- return ({
108
- label: String((_a = item.label) !== null && _a !== void 0 ? _a : ""),
109
- value: String((_b = item.value) !== null && _b !== void 0 ? _b : ""),
110
- });
111
- });
112
- setSearchOptions((data.items || []).map(formatter));
113
- return [3 /*break*/, 4];
114
- case 2:
115
- error_1 = _a.sent();
116
- console.error("Failed to fetch expense categories:", error_1);
117
- setSearchOptions([]);
118
- return [3 /*break*/, 4];
119
- case 3:
120
- setLoading(false);
121
- return [7 /*endfinally*/];
122
- case 4: return [2 /*return*/];
123
- }
124
- });
125
- }); })();
126
- }, [debouncedSearchQuery, searchEndpoint]);
127
- var mappedOptions = (0, react_1.useMemo)(function () {
128
- return searchOptions.length > 0 ? searchOptions : options;
129
- }, [searchOptions, options]);
130
- var handleSearchChange = (0, react_1.useCallback)(function (query) {
131
- setSearchQuery(query);
132
- }, []);
133
- var enhancedComboboxElement = (0, react_1.useMemo)(function () { return (react_1.default.createElement(enhanced_combobox_1.EnhancedCombobox, { emptyText: emptyText, error: error, id: id, info: info, label: label, loading: loading, onSearchChange: handleSearchChange, onValueChange: onValueChange, options: mappedOptions, placeholder: placeholder, required: required, searchPlaceholder: searchPlaceholder, value: value })); }, [
134
- emptyText,
135
- error,
136
- handleSearchChange,
137
- id,
138
- info,
139
- label,
140
- loading,
141
- mappedOptions,
142
- onValueChange,
143
- placeholder,
144
- required,
145
- searchPlaceholder,
146
- value,
147
- ]);
148
- return { enhancedComboboxElement: enhancedComboboxElement };
149
- };
150
- exports.useEnhancedCombobox = useEnhancedCombobox;
1
+ "use strict";import M,{useCallback as V,useEffect as O,useMemo as Q,useState as r}from"react";import{EnhancedCombobox as k}from"../components/enhanced-combobox";const A={GET:"GET"};function F(e,t){const[c,n]=r(e);return O(()=>{const a=setTimeout(()=>n(e),t);return()=>clearTimeout(a)},[e,t]),c}export const useEnhancedCombobox=({emptyText:e,error:t,formatSearchResult:c,id:n,info:a,label:d,onValueChange:b,options:f,placeholder:p,required:g,searchEndpoint:E,searchPlaceholder:S,value:C})=>{const[v,G]=r(""),[s,u]=r([]),[x,l]=r(!1),i=F(v,800);O(()=>{if(!i){u([]),l(!1);return}l(!0),(async()=>{try{const{fetchData:o}=await import("@react-pakistan/util-functions/general/fetch-data"),{data:_}=await o({url:E,method:A.GET,params:{searchQuery:i}}),w=c||(D=>{var m,h;return{label:String((m=D.label)!==null&&m!==void 0?m:""),value:String((h=D.value)!==null&&h!==void 0?h:"")}});u((_.items||[]).map(w))}catch(o){console.error("Failed to fetch expense categories:",o),u([])}finally{l(!1)}})()},[i,E]);const y=Q(()=>s.length>0?s:f,[s,f]),T=V(o=>{G(o)},[]);return{enhancedComboboxElement:Q(()=>M.createElement(k,{emptyText:e,error:t,id:n,info:a,label:d,loading:x,onSearchChange:T,onValueChange:b,options:y,placeholder:p,required:g,searchPlaceholder:S,value:C}),[e,t,T,n,a,d,x,y,b,p,g,S,C])}};
@@ -1,51 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.useIsMobile = useIsMobile;
37
- var React = __importStar(require("react"));
38
- var MOBILE_BREAKPOINT = 768;
39
- function useIsMobile() {
40
- var _a = React.useState(undefined), isMobile = _a[0], setIsMobile = _a[1];
41
- React.useEffect(function () {
42
- var mql = window.matchMedia("(max-width: ".concat(MOBILE_BREAKPOINT - 1, "px)"));
43
- var onChange = function () {
44
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
45
- };
46
- mql.addEventListener("change", onChange);
47
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
48
- return function () { return mql.removeEventListener("change", onChange); };
49
- }, []);
50
- return !!isMobile;
51
- }
1
+ "use strict";import*as o from"react";const e=768;export function useIsMobile(){const[s,n]=o.useState(void 0);return o.useEffect(()=>{const t=window.matchMedia(`(max-width: ${e-1}px)`),i=()=>{n(window.innerWidth<e)};return t.addEventListener("change",i),n(window.innerWidth<e),()=>t.removeEventListener("change",i)},[]),!!s}
@@ -1,23 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOutsideClick = void 0;
4
- var react_1 = require("react");
5
- var useOutsideClick = function (ref, callback) {
6
- (0, react_1.useEffect)(function () {
7
- var listener = function (event) {
8
- var target = event.target;
9
- // DO NOTHING if the element being clicked is the target element or their children
10
- if (!ref.current || (target && ref.current.contains(target))) {
11
- return;
12
- }
13
- callback(event);
14
- };
15
- document.addEventListener("mousedown", listener);
16
- document.addEventListener("touchstart", listener);
17
- return function () {
18
- document.removeEventListener("mousedown", listener);
19
- document.removeEventListener("touchstart", listener);
20
- };
21
- }, [ref, callback]);
22
- };
23
- exports.useOutsideClick = useOutsideClick;
1
+ "use strict";import{useEffect as s}from"react";export const useOutsideClick=(e,n)=>{s(()=>{const t=r=>{const o=r.target;!e.current||o&&e.current.contains(o)||n(r)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,n])};