docthub-core-components 3.0.0 → 3.2.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.
- package/dist/components/overrides/ui/auto-complete.js +466 -0
- package/dist/components/overrides/ui/autocomplete-checkbox.js +491 -0
- package/dist/components/overrides/ui/chips/doct-chip.js +157 -0
- package/dist/components/overrides/ui/circular-progress.js +32 -0
- package/dist/components/overrides/ui/composed/address-form-section.js +67 -0
- package/dist/components/overrides/ui/composed/contact-form-section.js +56 -0
- package/dist/components/overrides/ui/composed/search-filter-section.js +132 -0
- package/dist/components/overrides/ui/composed/user-registration-section.js +77 -0
- package/dist/components/overrides/ui/currencyInput/currency-input.js +69 -0
- package/dist/components/overrides/ui/doct-animation-loader.js +13 -0
- package/dist/components/overrides/ui/expandable-card.js +115 -0
- package/dist/components/overrides/ui/footer/doct-footer.js +35 -0
- package/dist/components/overrides/ui/footer/footer-desktop.js +92 -0
- package/dist/components/overrides/ui/footer/footer-mobile.js +123 -0
- package/dist/components/overrides/ui/footer/footer-routes.js +87 -0
- package/dist/components/overrides/ui/footer/footer-shared.js +137 -0
- package/dist/components/overrides/ui/footer/presets.js +269 -0
- package/dist/components/overrides/ui/inputs/labeled-input.js +92 -0
- package/dist/components/overrides/ui/inputs/otp-input.js +101 -0
- package/dist/components/overrides/ui/inputs/password-input.js +77 -0
- package/dist/components/overrides/ui/inputs/phone-input.js +336 -0
- package/dist/components/overrides/ui/navigation-menu/doct-navigation-menu.js +22 -0
- package/dist/components/overrides/ui/navigation-menu/individual-nav-routes.js +46 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-desktop.js +109 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-mobile.js +231 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu.js +44 -0
- package/dist/components/overrides/ui/navigation-menu/nav-env.js +64 -0
- package/dist/components/overrides/ui/navigation-menu/navigation-menu-adapter.js +55 -0
- package/dist/components/overrides/ui/navigation-menu/navigation-menu-internal.js +36 -0
- package/dist/components/overrides/ui/navigation-menu/organization-nav-routes.js +34 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-desktop.js +109 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-mobile.js +231 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu.js +44 -0
- package/dist/components/overrides/ui/navigation-menu/presets.js +238 -0
- package/dist/components/overrides/ui/navigation-menu/types.js +6 -0
- package/dist/components/overrides/ui/pickers/date-picker-field.js +361 -0
- package/dist/components/overrides/ui/pickers/date-range-picker-field.js +288 -0
- package/dist/components/overrides/ui/pickers/day-picker-bounds.js +38 -0
- package/dist/components/overrides/ui/pickers/select-field.js +158 -0
- package/dist/components/overrides/ui/search/auto-complete.js +64 -0
- package/dist/components/overrides/ui/search/search-input.js +65 -0
- package/dist/components/overrides/ui/showcase/component-section.js +45 -0
- package/dist/components/ui/alert.js +94 -0
- package/dist/components/ui/avatar.js +69 -0
- package/dist/components/ui/badge.js +37 -0
- package/dist/components/ui/breadcrumb.js +117 -0
- package/dist/components/ui/button.js +223 -0
- package/dist/components/ui/calendar.js +100 -0
- package/dist/components/ui/checkbox.js +57 -0
- package/dist/components/ui/collapsible.js +25 -0
- package/dist/components/ui/command.js +132 -0
- package/dist/components/ui/dialog.js +230 -0
- package/dist/components/ui/drawer.js +119 -0
- package/dist/components/ui/dropdown-menu.js +216 -0
- package/dist/components/ui/input.js +48 -0
- package/dist/components/ui/label.js +22 -0
- package/dist/components/ui/popover.js +181 -0
- package/dist/components/ui/progress.js +91 -0
- package/dist/components/ui/radio-group.js +49 -0
- package/dist/components/ui/select.js +169 -0
- package/dist/components/ui/skeleton.js +91 -0
- package/dist/components/ui/spinner.js +32 -0
- package/dist/components/ui/tabs.js +68 -0
- package/dist/components/ui/textarea.js +73 -0
- package/dist/components/ui/timeline.js +177 -0
- package/dist/components/ui/toast.js +82 -0
- package/dist/components/ui/tooltip.js +91 -0
- package/dist/components/ui/typography.js +213 -0
- package/dist/hooks/use-exclusive-dropdown.js +53 -0
- package/dist/hooks/use-mobile.js +19 -0
- package/dist/hooks/useAutocompleteCheckbox.js +204 -0
- package/dist/index.js +187 -0
- package/dist/lib/dropdown-manager.js +17 -0
- package/dist/lib/get-floating-dropdown-position.js +32 -0
- package/dist/lib/get-scroll-parents.js +20 -0
- package/dist/lib/slot.js +40 -0
- package/dist/lib/utils.js +9 -0
- package/dist/src/components/overrides/ui/autocomplete-checkbox.d.ts +16 -1
- package/dist/style.css +1 -1
- package/dist/util/getInputClasses.js +19 -0
- package/package.json +5 -5
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { getFooterRoutes as r } from "./footer-routes.js";
|
|
4
|
+
const i = {
|
|
5
|
+
linkedin: "https://www.linkedin.com/company/docthub2017/",
|
|
6
|
+
facebook: "https://www.facebook.com/docthub/",
|
|
7
|
+
instagram: "https://www.instagram.com/docthub/",
|
|
8
|
+
x: "https://twitter.com/docthub",
|
|
9
|
+
youtube: "https://www.youtube.com/c/Docthub1/videos",
|
|
10
|
+
googlePlay: "https://play.google.com/store/search?q=docthub&c=apps&hl=en",
|
|
11
|
+
appStore: "https://apps.apple.com/in/app/docthub-healthcare-career-app/id1625281489"
|
|
12
|
+
}, t = [{
|
|
13
|
+
id: "linkedin",
|
|
14
|
+
href: i.linkedin,
|
|
15
|
+
ariaLabel: "Docthub on LinkedIn",
|
|
16
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/linkedin.svg", alt: "", "aria-hidden": "true", className: "h-[18px] w-[18px]", loading: "lazy" })
|
|
17
|
+
}, {
|
|
18
|
+
id: "facebook",
|
|
19
|
+
href: i.facebook,
|
|
20
|
+
ariaLabel: "Docthub on Facebook",
|
|
21
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/facebook.svg", alt: "", "aria-hidden": "true", className: "h-[18px] w-[18px]", loading: "lazy" })
|
|
22
|
+
}, {
|
|
23
|
+
id: "instagram",
|
|
24
|
+
href: i.instagram,
|
|
25
|
+
ariaLabel: "Docthub on Instagram",
|
|
26
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/instagram-icon.svg", alt: "", "aria-hidden": "true", className: "h-[18px] w-[18px]", loading: "lazy" })
|
|
27
|
+
}, {
|
|
28
|
+
id: "x",
|
|
29
|
+
href: i.x,
|
|
30
|
+
ariaLabel: "Docthub on X",
|
|
31
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/x-twitter.svg", alt: "", "aria-hidden": "true", className: "h-[18px] w-[18px]", loading: "lazy" })
|
|
32
|
+
}, {
|
|
33
|
+
id: "youtube",
|
|
34
|
+
href: i.youtube,
|
|
35
|
+
ariaLabel: "Docthub on YouTube",
|
|
36
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/youtube.svg", alt: "", "aria-hidden": "true", className: "h-[18px] w-[18px]", loading: "lazy" })
|
|
37
|
+
}], d = {
|
|
38
|
+
logo: /* @__PURE__ */ o("img", { src: "/footer/docthub-trademark-logo.svg", alt: "Docthub", className: "h-[18px] w-auto", loading: "lazy" }),
|
|
39
|
+
logoAlt: "Docthub",
|
|
40
|
+
tagline: "Empowering Healthcare Fraternity",
|
|
41
|
+
socialLinks: t,
|
|
42
|
+
appLinks: [{
|
|
43
|
+
id: "google-play",
|
|
44
|
+
label: "Google Play",
|
|
45
|
+
href: i.googlePlay,
|
|
46
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/play-store.svg", alt: "", "aria-hidden": "true", className: "h-5 w-5", loading: "lazy" })
|
|
47
|
+
}, {
|
|
48
|
+
id: "app-store",
|
|
49
|
+
label: "App Store",
|
|
50
|
+
href: i.appStore,
|
|
51
|
+
icon: /* @__PURE__ */ o("img", { src: "/footer/apple.svg", alt: "", "aria-hidden": "true", className: "h-5 w-5", loading: "lazy" })
|
|
52
|
+
}]
|
|
53
|
+
};
|
|
54
|
+
function a() {
|
|
55
|
+
const e = r();
|
|
56
|
+
return [{
|
|
57
|
+
id: "explore",
|
|
58
|
+
sections: [{
|
|
59
|
+
id: "explore",
|
|
60
|
+
title: "Explore",
|
|
61
|
+
sectionVariant: "default",
|
|
62
|
+
links: [{
|
|
63
|
+
id: "jobs",
|
|
64
|
+
label: "Jobs",
|
|
65
|
+
href: e.jobs
|
|
66
|
+
}, {
|
|
67
|
+
id: "courses",
|
|
68
|
+
label: "Courses",
|
|
69
|
+
href: e.courses
|
|
70
|
+
}, {
|
|
71
|
+
id: "events",
|
|
72
|
+
label: "Events",
|
|
73
|
+
href: e.events
|
|
74
|
+
}]
|
|
75
|
+
}]
|
|
76
|
+
}, {
|
|
77
|
+
id: "professional-tools",
|
|
78
|
+
sections: [{
|
|
79
|
+
id: "professional-tools",
|
|
80
|
+
title: "Professional Tools",
|
|
81
|
+
sectionVariant: "default",
|
|
82
|
+
links: [{
|
|
83
|
+
id: "logbook",
|
|
84
|
+
label: "Logbook",
|
|
85
|
+
href: e.logbook
|
|
86
|
+
}, {
|
|
87
|
+
id: "resume-builder",
|
|
88
|
+
label: "Resume Builder",
|
|
89
|
+
href: e["resume-builder"]
|
|
90
|
+
}, {
|
|
91
|
+
id: "exhibitor",
|
|
92
|
+
label: "Exhibitor",
|
|
93
|
+
href: e.exhibitor
|
|
94
|
+
}]
|
|
95
|
+
}]
|
|
96
|
+
}, {
|
|
97
|
+
id: "knowledge-hub",
|
|
98
|
+
sections: [{
|
|
99
|
+
id: "knowledge-hub",
|
|
100
|
+
title: "Knowledge Hub",
|
|
101
|
+
sectionVariant: "default",
|
|
102
|
+
links: [
|
|
103
|
+
// Hidden until dedicated page is ready:
|
|
104
|
+
// { id: "library", label: "Library", href: routes.libraryPlaceholder },
|
|
105
|
+
{
|
|
106
|
+
id: "news",
|
|
107
|
+
label: "News",
|
|
108
|
+
href: e.healthcareNews
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "course-pages",
|
|
112
|
+
label: "Course Pages",
|
|
113
|
+
href: e.coursePages
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "job-role-pages",
|
|
117
|
+
label: "Job Role Pages",
|
|
118
|
+
href: e.jobRolePages
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}]
|
|
122
|
+
}, {
|
|
123
|
+
id: "for-organizations",
|
|
124
|
+
sections: [{
|
|
125
|
+
id: "for-organizations",
|
|
126
|
+
title: "For Organizations",
|
|
127
|
+
sectionVariant: "default",
|
|
128
|
+
links: [{
|
|
129
|
+
id: "recruiter-solution",
|
|
130
|
+
label: "Recruiter Solution",
|
|
131
|
+
href: e.recruiterSolution
|
|
132
|
+
}, {
|
|
133
|
+
id: "institute-solution",
|
|
134
|
+
label: "Institute Solution",
|
|
135
|
+
href: e.instituteSolution
|
|
136
|
+
}, {
|
|
137
|
+
id: "event-organizer-solution",
|
|
138
|
+
label: "Event Organizer Solution",
|
|
139
|
+
href: e.eventOrganizerSolution
|
|
140
|
+
}, {
|
|
141
|
+
id: "membership-management",
|
|
142
|
+
label: "Membership Management",
|
|
143
|
+
href: e.membershipManagement
|
|
144
|
+
}, {
|
|
145
|
+
id: "qr-check-in-app",
|
|
146
|
+
label: "QR Check-In App",
|
|
147
|
+
href: e.qrCheckInApp
|
|
148
|
+
}, {
|
|
149
|
+
id: "explore-enterprise",
|
|
150
|
+
label: "Explore Docthub Enterprise",
|
|
151
|
+
href: e.enterpriseSolutions
|
|
152
|
+
}]
|
|
153
|
+
}, {
|
|
154
|
+
id: "enterprise-access",
|
|
155
|
+
title: "Enterprise Access",
|
|
156
|
+
sectionVariant: "compact",
|
|
157
|
+
links: [
|
|
158
|
+
{
|
|
159
|
+
id: "enterprise-login",
|
|
160
|
+
label: "Enterprise Login",
|
|
161
|
+
href: e.enterpriseLogin
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: "create-enterprise-account",
|
|
165
|
+
label: "Create Enterprise / Business Account",
|
|
166
|
+
href: e.enterpriseRegister
|
|
167
|
+
}
|
|
168
|
+
// Hidden for now:
|
|
169
|
+
// { id: "contact-support", label: "Contact Support", href: routes.contactSupportPlaceholder },
|
|
170
|
+
]
|
|
171
|
+
}]
|
|
172
|
+
}, {
|
|
173
|
+
id: "company",
|
|
174
|
+
sections: [{
|
|
175
|
+
id: "company",
|
|
176
|
+
title: "Company",
|
|
177
|
+
sectionVariant: "default",
|
|
178
|
+
links: [{
|
|
179
|
+
id: "about-docthub",
|
|
180
|
+
label: "About Docthub",
|
|
181
|
+
href: e.aboutUs
|
|
182
|
+
}, {
|
|
183
|
+
id: "media-release",
|
|
184
|
+
label: "Media Release",
|
|
185
|
+
href: e.mediaReleases
|
|
186
|
+
}, {
|
|
187
|
+
id: "blogs",
|
|
188
|
+
label: "Blogs",
|
|
189
|
+
href: e.blogs
|
|
190
|
+
}, {
|
|
191
|
+
id: "contact-us",
|
|
192
|
+
label: "Contact Us",
|
|
193
|
+
href: e.contactUs
|
|
194
|
+
}, {
|
|
195
|
+
id: "docthub-home",
|
|
196
|
+
label: "Docthub Home",
|
|
197
|
+
href: e.docthubHome
|
|
198
|
+
}]
|
|
199
|
+
}, {
|
|
200
|
+
id: "additional-links",
|
|
201
|
+
title: "Additional Links",
|
|
202
|
+
sectionVariant: "compact",
|
|
203
|
+
links: [{
|
|
204
|
+
id: "healthcare-career-app",
|
|
205
|
+
label: "Healthcare Career App",
|
|
206
|
+
href: e.healthcareCareerApp
|
|
207
|
+
}, {
|
|
208
|
+
id: "drop-your-resume",
|
|
209
|
+
label: "Drop Your Resume",
|
|
210
|
+
href: e.jobsDropYourResume
|
|
211
|
+
}, {
|
|
212
|
+
id: "course-after-12th",
|
|
213
|
+
label: "Course After 12th",
|
|
214
|
+
href: e.courseAfter12thPlaceholder
|
|
215
|
+
}]
|
|
216
|
+
}]
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
a();
|
|
220
|
+
function l() {
|
|
221
|
+
const e = r();
|
|
222
|
+
return [{
|
|
223
|
+
id: "terms-of-use",
|
|
224
|
+
label: "Terms of Use",
|
|
225
|
+
href: e.termsConditions
|
|
226
|
+
}, {
|
|
227
|
+
id: "privacy-policy",
|
|
228
|
+
label: "Privacy Policy",
|
|
229
|
+
href: e.privacyPolicy
|
|
230
|
+
}, {
|
|
231
|
+
id: "cookies-policy",
|
|
232
|
+
label: "Cookies Policy",
|
|
233
|
+
href: e.cookiesPolicy
|
|
234
|
+
}, {
|
|
235
|
+
id: "payment-policy",
|
|
236
|
+
label: "Payment Policy",
|
|
237
|
+
href: e.paymentPolicy
|
|
238
|
+
}, {
|
|
239
|
+
id: "disclaimer",
|
|
240
|
+
label: "Disclaimer",
|
|
241
|
+
href: e.disclaimerPolicy
|
|
242
|
+
}];
|
|
243
|
+
}
|
|
244
|
+
l();
|
|
245
|
+
function s() {
|
|
246
|
+
const e = r();
|
|
247
|
+
return [{
|
|
248
|
+
id: "enterprise-terms",
|
|
249
|
+
label: "Enterprise Terms",
|
|
250
|
+
href: e.enterpriseTermsConditions
|
|
251
|
+
}, {
|
|
252
|
+
id: "enterprise-privacy-policy",
|
|
253
|
+
label: "Enterprise Privacy Policy",
|
|
254
|
+
href: e.enterprisePrivacyPolicy
|
|
255
|
+
}, {
|
|
256
|
+
id: "enterprise-payment-policy",
|
|
257
|
+
label: "Enterprise Payment Policy",
|
|
258
|
+
href: e.enterprisePaymentPolicy
|
|
259
|
+
}];
|
|
260
|
+
}
|
|
261
|
+
s();
|
|
262
|
+
const h = "©2026 Docthub. All rights reserved.";
|
|
263
|
+
export {
|
|
264
|
+
d as consumerFooterBrand,
|
|
265
|
+
h as consumerFooterCopyrightText,
|
|
266
|
+
a as getConsumerFooterColumns,
|
|
267
|
+
s as getConsumerFooterEnterprisePolicies,
|
|
268
|
+
l as getConsumerFooterPlatformPolicies
|
|
269
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as E, jsxs as G } from "react/jsx-runtime";
|
|
3
|
+
import { c as ae } from "react-compiler-runtime";
|
|
4
|
+
import { useState as de, useId as oe, useEffect as ne } from "react";
|
|
5
|
+
import { Input as ce } from "../../../ui/input.js";
|
|
6
|
+
import { Label as ue } from "../../../ui/label.js";
|
|
7
|
+
import { cn as se } from "../../../../lib/utils.js";
|
|
8
|
+
const xe = (H) => {
|
|
9
|
+
const e = ae(85);
|
|
10
|
+
let S, m, h, l, s, r, v, d, i, q, o, n, g, P, c, u, a, T, D, t;
|
|
11
|
+
e[0] !== H ? ({
|
|
12
|
+
label: d,
|
|
13
|
+
placeholder: g,
|
|
14
|
+
helperText: r,
|
|
15
|
+
error: l,
|
|
16
|
+
required: c,
|
|
17
|
+
type: D,
|
|
18
|
+
leftIcon: i,
|
|
19
|
+
rightIcon: a,
|
|
20
|
+
className: m,
|
|
21
|
+
inputClassName: v,
|
|
22
|
+
onChange: o,
|
|
23
|
+
onValueChange: n,
|
|
24
|
+
showCharCount: T,
|
|
25
|
+
maxLength: q,
|
|
26
|
+
characterLimit: S,
|
|
27
|
+
value: t,
|
|
28
|
+
disabled: h,
|
|
29
|
+
readOnly: P,
|
|
30
|
+
fridged: s,
|
|
31
|
+
...u
|
|
32
|
+
} = H, e[0] = H, e[1] = S, e[2] = m, e[3] = h, e[4] = l, e[5] = s, e[6] = r, e[7] = v, e[8] = d, e[9] = i, e[10] = q, e[11] = o, e[12] = n, e[13] = g, e[14] = P, e[15] = c, e[16] = u, e[17] = a, e[18] = T, e[19] = D, e[20] = t) : (S = e[1], m = e[2], h = e[3], l = e[4], s = e[5], r = e[6], v = e[7], d = e[8], i = e[9], q = e[10], o = e[11], n = e[12], g = e[13], P = e[14], c = e[15], u = e[16], a = e[17], T = e[18], D = e[19], t = e[20]);
|
|
33
|
+
const J = D === void 0 ? "text" : D, [K, ie] = de(typeof t == "string" ? t.length : String(t ?? "").length), x = oe(), b = oe(), A = P || s, f = S || q, Q = u["aria-describedby"];
|
|
34
|
+
let F;
|
|
35
|
+
e[21] !== l || e[22] !== b || e[23] !== r || e[24] !== Q ? (F = [Q, r || l ? b : void 0].filter(Boolean).join(" ") || void 0, e[21] = l, e[22] = b, e[23] = r, e[24] = Q, e[25] = F) : F = e[25];
|
|
36
|
+
const U = F;
|
|
37
|
+
let M, R;
|
|
38
|
+
e[26] !== s ? (M = () => {
|
|
39
|
+
s && process.env.NODE_ENV !== "production" && console.warn('[LabeledInput] The "fridged" prop is deprecated and will be removed in v3.0. Please use "readOnly" instead.');
|
|
40
|
+
}, R = [s], e[26] = s, e[27] = M, e[28] = R) : (M = e[27], R = e[28]), ne(M, R);
|
|
41
|
+
let _;
|
|
42
|
+
e[29] !== o || e[30] !== n ? (_ = (re) => {
|
|
43
|
+
o == null || o(re), n == null || n(re.target.value), ie(re.target.value.length);
|
|
44
|
+
}, e[29] = o, e[30] = n, e[31] = _) : _ = e[31];
|
|
45
|
+
const V = _;
|
|
46
|
+
let $, k;
|
|
47
|
+
e[32] !== t ? ($ = () => {
|
|
48
|
+
t !== void 0 && ie(typeof t == "string" ? t.length : String(t).length);
|
|
49
|
+
}, k = [t], e[32] = t, e[33] = $, e[34] = k) : ($ = e[33], k = e[34]), ne($, k);
|
|
50
|
+
const p = T && typeof f == "number";
|
|
51
|
+
let y;
|
|
52
|
+
e[35] !== m ? (y = se("space-y-1", m), e[35] = m, e[36] = y) : y = e[36];
|
|
53
|
+
let N;
|
|
54
|
+
e[37] !== x || e[38] !== d || e[39] !== c ? (N = d && /* @__PURE__ */ G(ue, { htmlFor: x, className: "text-sm font-medium text-foreground", children: [
|
|
55
|
+
d,
|
|
56
|
+
c && /* @__PURE__ */ E("span", { className: "text-destructive ml-1", "aria-hidden": "true", children: "*" })
|
|
57
|
+
] }), e[37] = x, e[38] = d, e[39] = c, e[40] = N) : N = e[40];
|
|
58
|
+
let I;
|
|
59
|
+
e[41] !== i ? (I = i && /* @__PURE__ */ E("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none", children: i }), e[41] = i, e[42] = I) : I = e[42];
|
|
60
|
+
let C;
|
|
61
|
+
e[43] !== a || e[44] !== p ? (C = a && !p && /* @__PURE__ */ E("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none", children: a }), e[43] = a, e[44] = p, e[45] = C) : C = e[45];
|
|
62
|
+
const W = i && "pl-10", X = a && "pr-10", Y = p && "pr-16", Z = l && "border-destructive", ee = A && "cursor-not-allowed bg-muted text-muted-foreground opacity-70";
|
|
63
|
+
let L;
|
|
64
|
+
e[46] !== v || e[47] !== W || e[48] !== X || e[49] !== Y || e[50] !== Z || e[51] !== ee ? (L = se(W, X, Y, Z, ee, v), e[46] = v, e[47] = W, e[48] = X, e[49] = Y, e[50] = Z, e[51] = ee, e[52] = L) : L = e[52];
|
|
65
|
+
const te = !!l || void 0, le = c || void 0;
|
|
66
|
+
let w;
|
|
67
|
+
e[53] !== U || e[54] !== h || e[55] !== f || e[56] !== V || e[57] !== x || e[58] !== A || e[59] !== g || e[60] !== u || e[61] !== L || e[62] !== te || e[63] !== le || e[64] !== J || e[65] !== t ? (w = /* @__PURE__ */ E(ce, { id: x, type: J, placeholder: g, disabled: h, readOnly: A, value: t, maxLength: f, onChange: V, className: L, "aria-invalid": te, "aria-required": le, "aria-describedby": U, ...u }), e[53] = U, e[54] = h, e[55] = f, e[56] = V, e[57] = x, e[58] = A, e[59] = g, e[60] = u, e[61] = L, e[62] = te, e[63] = le, e[64] = J, e[65] = t, e[66] = w) : w = e[66];
|
|
68
|
+
let O;
|
|
69
|
+
e[67] !== K || e[68] !== f || e[69] !== p ? (O = p && /* @__PURE__ */ G("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-xs text-muted-foreground pointer-events-none", "aria-live": "polite", "aria-atomic": "true", children: [
|
|
70
|
+
K,
|
|
71
|
+
" / ",
|
|
72
|
+
f
|
|
73
|
+
] }), e[67] = K, e[68] = f, e[69] = p, e[70] = O) : O = e[70];
|
|
74
|
+
let j;
|
|
75
|
+
e[71] !== I || e[72] !== C || e[73] !== w || e[74] !== O ? (j = /* @__PURE__ */ G("div", { className: "relative", children: [
|
|
76
|
+
I,
|
|
77
|
+
C,
|
|
78
|
+
w,
|
|
79
|
+
O
|
|
80
|
+
] }), e[71] = I, e[72] = C, e[73] = w, e[74] = O, e[75] = j) : j = e[75];
|
|
81
|
+
let B;
|
|
82
|
+
e[76] !== l || e[77] !== b || e[78] !== r ? (B = (r || l) && /* @__PURE__ */ E("p", { id: b, className: se("text-xs", l ? "text-destructive" : "text-muted-foreground"), role: l ? "alert" : void 0, children: l || r }), e[76] = l, e[77] = b, e[78] = r, e[79] = B) : B = e[79];
|
|
83
|
+
let z;
|
|
84
|
+
return e[80] !== j || e[81] !== B || e[82] !== y || e[83] !== N ? (z = /* @__PURE__ */ G("div", { className: y, children: [
|
|
85
|
+
N,
|
|
86
|
+
j,
|
|
87
|
+
B
|
|
88
|
+
] }), e[80] = j, e[81] = B, e[82] = y, e[83] = N, e[84] = z) : z = e[84], z;
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
xe as LabeledInput
|
|
92
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as F, jsxs as Z } from "react/jsx-runtime";
|
|
3
|
+
import { c as x } from "react-compiler-runtime";
|
|
4
|
+
import { useRef as _, useId as G, useLayoutEffect as tt } from "react";
|
|
5
|
+
import { Input as et } from "../../../ui/input.js";
|
|
6
|
+
import { Label as rt } from "../../../ui/label.js";
|
|
7
|
+
import { cn as Y } from "../../../../lib/utils.js";
|
|
8
|
+
const ft = (k) => {
|
|
9
|
+
const t = x(46), {
|
|
10
|
+
length: H,
|
|
11
|
+
label: i,
|
|
12
|
+
value: d,
|
|
13
|
+
onChange: j,
|
|
14
|
+
onComplete: g,
|
|
15
|
+
className: C,
|
|
16
|
+
error: c,
|
|
17
|
+
inputClassName: J,
|
|
18
|
+
autoFocus: Q,
|
|
19
|
+
autoSubmit: U,
|
|
20
|
+
secure: V
|
|
21
|
+
} = k, o = H === void 0 ? 6 : H, K = J === void 0 ? "h-10 w-10" : J, q = Q === void 0 ? !1 : Q, L = U === void 0 ? !1 : U, E = V === void 0 ? !1 : V;
|
|
22
|
+
let M;
|
|
23
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (M = [], t[0] = M) : M = t[0];
|
|
24
|
+
const a = _(M), h = G(), v = G(), S = G();
|
|
25
|
+
let O;
|
|
26
|
+
if (t[1] !== o || t[2] !== S) {
|
|
27
|
+
let n;
|
|
28
|
+
t[4] !== S ? (n = (W, z) => `${S}-digit-${z + 1}`, t[4] = S, t[5] = n) : n = t[5], O = Array.from({
|
|
29
|
+
length: o
|
|
30
|
+
}, n), t[1] = o, t[2] = S, t[3] = O;
|
|
31
|
+
} else
|
|
32
|
+
O = t[3];
|
|
33
|
+
const T = O;
|
|
34
|
+
let A, P;
|
|
35
|
+
t[6] !== q ? (A = () => {
|
|
36
|
+
var n;
|
|
37
|
+
q && ((n = a.current[0]) == null || n.focus({
|
|
38
|
+
preventScroll: !0
|
|
39
|
+
}));
|
|
40
|
+
}, P = [q], t[6] = q, t[7] = A, t[8] = P) : (A = t[7], P = t[8]), tt(A, P);
|
|
41
|
+
let b, y, D, I, u, f;
|
|
42
|
+
if (t[9] !== L || t[10] !== C || t[11] !== c || t[12] !== v || t[13] !== K || t[14] !== i || t[15] !== h || t[16] !== o || t[17] !== j || t[18] !== g || t[19] !== T || t[20] !== E || t[21] !== d) {
|
|
43
|
+
const n = (e, s) => {
|
|
44
|
+
var l;
|
|
45
|
+
const m = s.replace(/\D/g, "").slice(0, 1);
|
|
46
|
+
if (s.length > 1 && m.length <= 1)
|
|
47
|
+
return;
|
|
48
|
+
const r = [...d];
|
|
49
|
+
r[e] = m, j(r), s && e < o - 1 && ((l = a.current[e + 1]) == null || l.focus()), r.every(st) && (g && g(r.join("")), L && queueMicrotask(() => {
|
|
50
|
+
var $;
|
|
51
|
+
const B = ($ = a.current[e]) == null ? void 0 : $.closest("form");
|
|
52
|
+
B && B.requestSubmit();
|
|
53
|
+
}));
|
|
54
|
+
}, W = (e, s) => {
|
|
55
|
+
var $;
|
|
56
|
+
s.preventDefault();
|
|
57
|
+
const r = (s.clipboardData.getData("text") || "").replace(/\D/g, "").slice(0, o - e).split("");
|
|
58
|
+
if (r.length === 0)
|
|
59
|
+
return;
|
|
60
|
+
const l = [...d];
|
|
61
|
+
for (let p = 0; p < r.length && e + p < o; p++)
|
|
62
|
+
l[e + p] = r[p];
|
|
63
|
+
j(l);
|
|
64
|
+
const B = Math.min(e + r.length, o - 1);
|
|
65
|
+
($ = a.current[B]) == null || $.focus(), l.every(ot) && (g && g(l.join("")), L && queueMicrotask(() => {
|
|
66
|
+
var X;
|
|
67
|
+
const p = (X = a.current[e]) == null ? void 0 : X.closest("form");
|
|
68
|
+
p && p.requestSubmit();
|
|
69
|
+
}));
|
|
70
|
+
}, z = (e, s) => {
|
|
71
|
+
var m, r, l;
|
|
72
|
+
s.key === "Backspace" && !d[e] && e > 0 ? (m = a.current[e - 1]) == null || m.focus() : s.key === "ArrowLeft" && e > 0 ? (s.preventDefault(), (r = a.current[e - 1]) == null || r.focus()) : s.key === "ArrowRight" && e < o - 1 && (s.preventDefault(), (l = a.current[e + 1]) == null || l.focus());
|
|
73
|
+
};
|
|
74
|
+
t[28] !== C ? (u = Y("space-y-2", C), t[28] = C, t[29] = u) : u = t[29], t[30] !== i || t[31] !== h ? (f = i && /* @__PURE__ */ F(rt, { id: h, className: "text-sm font-medium text-gray-700", children: i }), t[30] = i, t[31] = h, t[32] = f) : f = t[32], b = "flex gap-2 border-0 p-0 m-0", y = i ? h : void 0, D = c ? v : void 0, I = T.map((e, s) => {
|
|
75
|
+
const m = d[s] ?? "";
|
|
76
|
+
return /* @__PURE__ */ F(et, { ref: (r) => {
|
|
77
|
+
a.current[s] = r;
|
|
78
|
+
}, type: E ? "password" : "text", inputMode: "numeric", maxLength: 1, value: m, onChange: (r) => n(s, r.target.value), onKeyDown: (r) => z(s, r), onPaste: (r) => W(s, r), className: Y("text-center p-0 text-lg font-semibold", c && "border-destructive", K), "aria-label": `${i || "OTP"} digit ${s + 1} of ${o}`, "aria-invalid": c ? "true" : "false" }, e);
|
|
79
|
+
}), t[9] = L, t[10] = C, t[11] = c, t[12] = v, t[13] = K, t[14] = i, t[15] = h, t[16] = o, t[17] = j, t[18] = g, t[19] = T, t[20] = E, t[21] = d, t[22] = b, t[23] = y, t[24] = D, t[25] = I, t[26] = u, t[27] = f;
|
|
80
|
+
} else
|
|
81
|
+
b = t[22], y = t[23], D = t[24], I = t[25], u = t[26], f = t[27];
|
|
82
|
+
let w;
|
|
83
|
+
t[33] !== b || t[34] !== y || t[35] !== D || t[36] !== I ? (w = /* @__PURE__ */ F("fieldset", { className: b, "aria-labelledby": y, "aria-describedby": D, children: I }), t[33] = b, t[34] = y, t[35] = D, t[36] = I, t[37] = w) : w = t[37];
|
|
84
|
+
let N;
|
|
85
|
+
t[38] !== c || t[39] !== v ? (N = c && /* @__PURE__ */ F("p", { id: v, className: "text-xs text-destructive mt-1", role: "alert", children: c }), t[38] = c, t[39] = v, t[40] = N) : N = t[40];
|
|
86
|
+
let R;
|
|
87
|
+
return t[41] !== u || t[42] !== f || t[43] !== w || t[44] !== N ? (R = /* @__PURE__ */ Z("div", { className: u, children: [
|
|
88
|
+
f,
|
|
89
|
+
w,
|
|
90
|
+
N
|
|
91
|
+
] }), t[41] = u, t[42] = f, t[43] = w, t[44] = N, t[45] = R) : R = t[45], R;
|
|
92
|
+
};
|
|
93
|
+
function st(k) {
|
|
94
|
+
return k !== "";
|
|
95
|
+
}
|
|
96
|
+
function ot(k) {
|
|
97
|
+
return k !== "";
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
ft as OtpInput
|
|
101
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as K, jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { c as W } from "react-compiler-runtime";
|
|
4
|
+
import { EyeOff as X, Eye as Y } from "lucide-react";
|
|
5
|
+
import { useId as M } from "react";
|
|
6
|
+
import { Input as Z } from "../../../ui/input.js";
|
|
7
|
+
import { Label as _ } from "../../../ui/label.js";
|
|
8
|
+
import { cn as S } from "../../../../lib/utils.js";
|
|
9
|
+
function ae(H) {
|
|
10
|
+
const e = W(67);
|
|
11
|
+
let u, t, o, n, i, a, d, c, m, l, q, E, k, h;
|
|
12
|
+
e[0] !== H ? ({
|
|
13
|
+
label: n,
|
|
14
|
+
placeholder: q,
|
|
15
|
+
helperText: o,
|
|
16
|
+
error: t,
|
|
17
|
+
required: m,
|
|
18
|
+
className: u,
|
|
19
|
+
showPassword: E,
|
|
20
|
+
onShowPasswordChange: d,
|
|
21
|
+
value: h,
|
|
22
|
+
onChange: i,
|
|
23
|
+
onChangeEvent: a,
|
|
24
|
+
onValueChange: c,
|
|
25
|
+
autoComplete: k,
|
|
26
|
+
...l
|
|
27
|
+
} = H, e[0] = H, e[1] = u, e[2] = t, e[3] = o, e[4] = n, e[5] = i, e[6] = a, e[7] = d, e[8] = c, e[9] = m, e[10] = l, e[11] = q, e[12] = E, e[13] = k, e[14] = h) : (u = e[1], t = e[2], o = e[3], n = e[4], i = e[5], a = e[6], d = e[7], c = e[8], m = e[9], l = e[10], q = e[11], E = e[12], k = e[13], h = e[14]);
|
|
28
|
+
const L = q === void 0 ? "Enter password" : q, s = E === void 0 ? !1 : E, O = k === void 0 ? "current-password" : k, P = M(), U = M(), p = M(), r = (l == null ? void 0 : l.id) ?? U;
|
|
29
|
+
let B;
|
|
30
|
+
e[15] !== i || e[16] !== a || e[17] !== c ? (B = (Q) => {
|
|
31
|
+
const R = Q.target.value;
|
|
32
|
+
i == null || i(R), a == null || a(Q), c == null || c(R);
|
|
33
|
+
}, e[15] = i, e[16] = a, e[17] = c, e[18] = B) : B = e[18];
|
|
34
|
+
const T = B;
|
|
35
|
+
let C;
|
|
36
|
+
e[19] !== d || e[20] !== s ? (C = () => {
|
|
37
|
+
d == null || d(!s);
|
|
38
|
+
}, e[19] = d, e[20] = s, e[21] = C) : C = e[21];
|
|
39
|
+
const V = C;
|
|
40
|
+
let x;
|
|
41
|
+
e[22] !== u ? (x = S("space-y-1", u), e[22] = u, e[23] = x) : x = e[23];
|
|
42
|
+
let g;
|
|
43
|
+
e[24] !== n || e[25] !== m || e[26] !== r ? (g = n && /* @__PURE__ */ K(_, { htmlFor: r, className: "text-sm font-medium text-gray-700", children: [
|
|
44
|
+
n,
|
|
45
|
+
m && /* @__PURE__ */ f("span", { className: "text-red-500 ml-1", "aria-hidden": "true", children: "*" })
|
|
46
|
+
] }), e[24] = n, e[25] = m, e[26] = r, e[27] = g) : g = e[27];
|
|
47
|
+
const $ = s ? "text" : "password", z = t && "border-destructive";
|
|
48
|
+
let y;
|
|
49
|
+
e[28] !== z ? (y = S("pr-10", z), e[28] = z, e[29] = y) : y = e[29];
|
|
50
|
+
const A = !!t || void 0, D = m || void 0, G = o || t ? p : l["aria-describedby"];
|
|
51
|
+
let v;
|
|
52
|
+
e[30] !== O || e[31] !== T || e[32] !== L || e[33] !== r || e[34] !== l || e[35] !== y || e[36] !== A || e[37] !== D || e[38] !== G || e[39] !== $ || e[40] !== h ? (v = /* @__PURE__ */ f(Z, { id: r, type: $, placeholder: L, autoComplete: O, className: y, value: h, onChange: T, "aria-invalid": A, "aria-required": D, "aria-describedby": G, ...l }), e[30] = O, e[31] = T, e[32] = L, e[33] = r, e[34] = l, e[35] = y, e[36] = A, e[37] = D, e[38] = G, e[39] = $, e[40] = h, e[41] = v) : v = e[41];
|
|
53
|
+
const J = s ? "Hide password" : "Show password";
|
|
54
|
+
let b;
|
|
55
|
+
e[42] !== s ? (b = s ? /* @__PURE__ */ f(X, { className: "h-4 w-4 text-gray-400 hover:text-gray-500" }) : /* @__PURE__ */ f(Y, { className: "h-4 w-4 text-gray-400 hover:text-gray-500" }), e[42] = s, e[43] = b) : b = e[43];
|
|
56
|
+
let w;
|
|
57
|
+
e[44] !== r || e[45] !== s || e[46] !== J || e[47] !== b || e[48] !== P || e[49] !== V ? (w = /* @__PURE__ */ f("button", { id: P, type: "button", onClick: V, className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring rounded p-1", "aria-label": J, "aria-pressed": s, "aria-controls": r, children: b }), e[44] = r, e[45] = s, e[46] = J, e[47] = b, e[48] = P, e[49] = V, e[50] = w) : w = e[50];
|
|
58
|
+
let N;
|
|
59
|
+
e[51] !== v || e[52] !== w ? (N = /* @__PURE__ */ K("div", { className: "relative", children: [
|
|
60
|
+
v,
|
|
61
|
+
w
|
|
62
|
+
] }), e[51] = v, e[52] = w, e[53] = N) : N = e[53];
|
|
63
|
+
let I;
|
|
64
|
+
e[54] !== t || e[55] !== p ? (I = t && /* @__PURE__ */ f("p", { id: p, className: "text-xs text-red-500", role: "alert", children: t }), e[54] = t, e[55] = p, e[56] = I) : I = e[56];
|
|
65
|
+
let j;
|
|
66
|
+
e[57] !== t || e[58] !== p || e[59] !== o ? (j = o && !t && /* @__PURE__ */ f("p", { id: p, className: "text-xs text-gray-500", children: o }), e[57] = t, e[58] = p, e[59] = o, e[60] = j) : j = e[60];
|
|
67
|
+
let F;
|
|
68
|
+
return e[61] !== N || e[62] !== I || e[63] !== j || e[64] !== x || e[65] !== g ? (F = /* @__PURE__ */ K("div", { className: x, children: [
|
|
69
|
+
g,
|
|
70
|
+
N,
|
|
71
|
+
I,
|
|
72
|
+
j
|
|
73
|
+
] }), e[61] = N, e[62] = I, e[63] = j, e[64] = x, e[65] = g, e[66] = F) : F = e[66], F;
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
ae as PasswordInput
|
|
77
|
+
};
|