@opensite/ui 2.2.3 → 2.2.5
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/about-culture-tabs.cjs +83 -17
- package/dist/about-culture-tabs.js +83 -17
- package/dist/components.cjs +83 -17
- package/dist/components.js +83 -17
- package/dist/contact-callback.cjs +38 -552
- package/dist/contact-callback.d.cts +6 -74
- package/dist/contact-callback.d.ts +6 -74
- package/dist/contact-callback.js +36 -535
- package/dist/contact-careers.cjs +19 -555
- package/dist/contact-careers.d.cts +6 -62
- package/dist/contact-careers.d.ts +6 -62
- package/dist/contact-careers.js +18 -539
- package/dist/contact-catering.cjs +19 -531
- package/dist/contact-catering.d.cts +6 -61
- package/dist/contact-catering.d.ts +6 -61
- package/dist/contact-catering.js +18 -515
- package/dist/contact-consultation.cjs +87 -543
- package/dist/contact-consultation.d.cts +6 -61
- package/dist/contact-consultation.d.ts +6 -61
- package/dist/contact-consultation.js +88 -544
- package/dist/contact-demo.cjs +20 -563
- package/dist/contact-demo.d.cts +10 -50
- package/dist/contact-demo.d.ts +10 -50
- package/dist/contact-demo.js +19 -547
- package/dist/contact-emergency.cjs +1 -1
- package/dist/contact-emergency.js +1 -1
- package/dist/contact-event.cjs +19 -562
- package/dist/contact-event.d.cts +10 -50
- package/dist/contact-event.d.ts +10 -50
- package/dist/contact-event.js +19 -547
- package/dist/contact-feedback.cjs +19 -562
- package/dist/contact-feedback.d.cts +10 -50
- package/dist/contact-feedback.d.ts +10 -50
- package/dist/contact-feedback.js +19 -547
- package/dist/contact-fitness.cjs +19 -562
- package/dist/contact-fitness.d.cts +10 -50
- package/dist/contact-fitness.d.ts +10 -50
- package/dist/contact-fitness.js +19 -547
- package/dist/contact-guest.cjs +19 -562
- package/dist/contact-guest.d.cts +10 -50
- package/dist/contact-guest.d.ts +10 -50
- package/dist/contact-guest.js +19 -547
- package/dist/contact-insurance.cjs +19 -562
- package/dist/contact-insurance.d.cts +10 -50
- package/dist/contact-insurance.d.ts +10 -50
- package/dist/contact-insurance.js +19 -547
- package/dist/contact-interview.cjs +19 -562
- package/dist/contact-interview.d.cts +11 -51
- package/dist/contact-interview.d.ts +11 -51
- package/dist/contact-interview.js +19 -547
- package/dist/contact-locations.cjs +19 -562
- package/dist/contact-locations.d.cts +11 -51
- package/dist/contact-locations.d.ts +11 -51
- package/dist/contact-locations.js +19 -547
- package/dist/contact-maintenance.cjs +19 -562
- package/dist/contact-maintenance.d.cts +10 -50
- package/dist/contact-maintenance.d.ts +10 -50
- package/dist/contact-maintenance.js +19 -547
- package/dist/contact-map.cjs +19 -562
- package/dist/contact-map.d.cts +11 -51
- package/dist/contact-map.d.ts +11 -51
- package/dist/contact-map.js +19 -547
- package/dist/contact-minimal.cjs +19 -562
- package/dist/contact-minimal.d.cts +10 -50
- package/dist/contact-minimal.d.ts +10 -50
- package/dist/contact-minimal.js +19 -547
- package/dist/contact-moving.cjs +19 -562
- package/dist/contact-moving.d.cts +11 -51
- package/dist/contact-moving.d.ts +11 -51
- package/dist/contact-moving.js +19 -547
- package/dist/contact-multistep.cjs +19 -562
- package/dist/contact-multistep.d.cts +11 -51
- package/dist/contact-multistep.d.ts +11 -51
- package/dist/contact-multistep.js +19 -547
- package/dist/contact-partnership.cjs +22 -565
- package/dist/contact-partnership.d.cts +10 -50
- package/dist/contact-partnership.d.ts +10 -50
- package/dist/contact-partnership.js +22 -550
- package/dist/contact-photography.cjs +19 -562
- package/dist/contact-photography.d.cts +7 -50
- package/dist/contact-photography.d.ts +7 -50
- package/dist/contact-photography.js +18 -546
- package/dist/contact-press.cjs +19 -562
- package/dist/contact-press.d.cts +10 -50
- package/dist/contact-press.d.ts +10 -50
- package/dist/contact-press.js +19 -547
- package/dist/contact-quote.cjs +19 -562
- package/dist/contact-quote.d.cts +11 -51
- package/dist/contact-quote.d.ts +11 -51
- package/dist/contact-quote.js +19 -547
- package/dist/contact-referral.cjs +19 -562
- package/dist/contact-referral.d.cts +10 -50
- package/dist/contact-referral.d.ts +10 -50
- package/dist/contact-referral.js +19 -547
- package/dist/contact-report.cjs +19 -562
- package/dist/contact-report.d.cts +10 -50
- package/dist/contact-report.d.ts +10 -50
- package/dist/contact-report.js +19 -547
- package/dist/contact-reservation.cjs +19 -562
- package/dist/contact-reservation.d.cts +10 -50
- package/dist/contact-reservation.d.ts +10 -50
- package/dist/contact-reservation.js +19 -547
- package/dist/contact-retreat.cjs +88 -567
- package/dist/contact-retreat.d.cts +11 -51
- package/dist/contact-retreat.d.ts +11 -51
- package/dist/contact-retreat.js +90 -569
- package/dist/contact-rsvp.cjs +19 -562
- package/dist/contact-rsvp.d.cts +11 -51
- package/dist/contact-rsvp.d.ts +11 -51
- package/dist/contact-rsvp.js +19 -547
- package/dist/contact-sales.cjs +19 -562
- package/dist/contact-sales.d.cts +10 -50
- package/dist/contact-sales.d.ts +10 -50
- package/dist/contact-sales.js +19 -547
- package/dist/contact-schedule.cjs +19 -562
- package/dist/contact-schedule.d.cts +11 -51
- package/dist/contact-schedule.d.ts +11 -51
- package/dist/contact-schedule.js +19 -547
- package/dist/contact-sponsorship.cjs +19 -562
- package/dist/contact-sponsorship.d.cts +11 -51
- package/dist/contact-sponsorship.d.ts +11 -51
- package/dist/contact-sponsorship.js +19 -547
- package/dist/contact-support.cjs +19 -562
- package/dist/contact-support.d.cts +11 -51
- package/dist/contact-support.d.ts +11 -51
- package/dist/contact-support.js +19 -547
- package/dist/contact-tenant.cjs +19 -562
- package/dist/contact-tenant.d.cts +11 -51
- package/dist/contact-tenant.d.ts +11 -51
- package/dist/contact-tenant.js +19 -547
- package/dist/contact-volunteer.cjs +19 -562
- package/dist/contact-volunteer.d.cts +11 -51
- package/dist/contact-volunteer.d.ts +11 -51
- package/dist/contact-volunteer.js +19 -547
- package/dist/contact-warranty.cjs +19 -562
- package/dist/contact-warranty.d.cts +10 -50
- package/dist/contact-warranty.d.ts +10 -50
- package/dist/contact-warranty.js +19 -547
- package/dist/contact-wedding.cjs +19 -562
- package/dist/contact-wedding.d.cts +10 -50
- package/dist/contact-wedding.d.ts +10 -50
- package/dist/contact-wedding.js +19 -547
- package/dist/hero-presentation-platform-video.cjs +76 -27
- package/dist/hero-presentation-platform-video.js +76 -27
- package/dist/index.cjs +83 -17
- package/dist/index.js +83 -17
- package/dist/registry.cjs +768 -4196
- package/dist/registry.js +769 -4197
- package/package.json +12 -2
package/dist/contact-careers.cjs
CHANGED
|
@@ -1,456 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var forms = require('@page-speed/forms');
|
|
4
|
+
var integration = require('@page-speed/forms/integration');
|
|
6
5
|
var clsx = require('clsx');
|
|
7
6
|
var tailwindMerge = require('tailwind-merge');
|
|
8
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
9
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
var
|
|
8
|
+
var React = require('react');
|
|
11
9
|
|
|
12
|
-
function
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
11
|
|
|
30
|
-
var
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
31
13
|
|
|
32
14
|
// components/blocks/contact/contact-careers.tsx
|
|
33
15
|
function cn(...inputs) {
|
|
34
16
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
35
17
|
}
|
|
36
|
-
function normalizePhoneNumber(input) {
|
|
37
|
-
const trimmed = input.trim();
|
|
38
|
-
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
39
|
-
return trimmed;
|
|
40
|
-
}
|
|
41
|
-
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
42
|
-
if (match) {
|
|
43
|
-
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
44
|
-
const extension = match[3];
|
|
45
|
-
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
46
|
-
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
47
|
-
return `tel:${withExtension}`;
|
|
48
|
-
}
|
|
49
|
-
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
50
|
-
return `tel:${cleaned}`;
|
|
51
|
-
}
|
|
52
|
-
function normalizeEmail(input) {
|
|
53
|
-
const trimmed = input.trim();
|
|
54
|
-
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
55
|
-
return trimmed;
|
|
56
|
-
}
|
|
57
|
-
return `mailto:${trimmed}`;
|
|
58
|
-
}
|
|
59
|
-
function isEmail(input) {
|
|
60
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
61
|
-
return emailRegex.test(input.trim());
|
|
62
|
-
}
|
|
63
|
-
function isPhoneNumber(input) {
|
|
64
|
-
const trimmed = input.trim();
|
|
65
|
-
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
69
|
-
return phoneRegex.test(trimmed);
|
|
70
|
-
}
|
|
71
|
-
function isInternalUrl(href) {
|
|
72
|
-
if (typeof window === "undefined") {
|
|
73
|
-
return href.startsWith("/") && !href.startsWith("//");
|
|
74
|
-
}
|
|
75
|
-
const trimmed = href.trim();
|
|
76
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
try {
|
|
80
|
-
const url = new URL(trimmed, window.location.href);
|
|
81
|
-
const currentOrigin = window.location.origin;
|
|
82
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
83
|
-
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
84
|
-
} catch {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function toRelativePath(href) {
|
|
89
|
-
if (typeof window === "undefined") {
|
|
90
|
-
return href;
|
|
91
|
-
}
|
|
92
|
-
const trimmed = href.trim();
|
|
93
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
94
|
-
return trimmed;
|
|
95
|
-
}
|
|
96
|
-
try {
|
|
97
|
-
const url = new URL(trimmed, window.location.href);
|
|
98
|
-
const currentOrigin = window.location.origin;
|
|
99
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
100
|
-
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
101
|
-
return url.pathname + url.search + url.hash;
|
|
102
|
-
}
|
|
103
|
-
} catch {
|
|
104
|
-
}
|
|
105
|
-
return trimmed;
|
|
106
|
-
}
|
|
107
|
-
function useNavigation({
|
|
108
|
-
href,
|
|
109
|
-
onClick
|
|
110
|
-
} = {}) {
|
|
111
|
-
const linkType = React__namespace.useMemo(() => {
|
|
112
|
-
if (!href || href.trim() === "") {
|
|
113
|
-
return onClick ? "none" : "none";
|
|
114
|
-
}
|
|
115
|
-
const trimmed = href.trim();
|
|
116
|
-
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
117
|
-
return "mailto";
|
|
118
|
-
}
|
|
119
|
-
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
120
|
-
return "tel";
|
|
121
|
-
}
|
|
122
|
-
if (isInternalUrl(trimmed)) {
|
|
123
|
-
return "internal";
|
|
124
|
-
}
|
|
125
|
-
try {
|
|
126
|
-
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
127
|
-
return "external";
|
|
128
|
-
} catch {
|
|
129
|
-
return "internal";
|
|
130
|
-
}
|
|
131
|
-
}, [href, onClick]);
|
|
132
|
-
const normalizedHref = React__namespace.useMemo(() => {
|
|
133
|
-
if (!href || href.trim() === "") {
|
|
134
|
-
return void 0;
|
|
135
|
-
}
|
|
136
|
-
const trimmed = href.trim();
|
|
137
|
-
switch (linkType) {
|
|
138
|
-
case "tel":
|
|
139
|
-
return normalizePhoneNumber(trimmed);
|
|
140
|
-
case "mailto":
|
|
141
|
-
return normalizeEmail(trimmed);
|
|
142
|
-
case "internal":
|
|
143
|
-
return toRelativePath(trimmed);
|
|
144
|
-
case "external":
|
|
145
|
-
return trimmed;
|
|
146
|
-
default:
|
|
147
|
-
return trimmed;
|
|
148
|
-
}
|
|
149
|
-
}, [href, linkType]);
|
|
150
|
-
const target = React__namespace.useMemo(() => {
|
|
151
|
-
switch (linkType) {
|
|
152
|
-
case "external":
|
|
153
|
-
return "_blank";
|
|
154
|
-
case "internal":
|
|
155
|
-
return "_self";
|
|
156
|
-
case "mailto":
|
|
157
|
-
case "tel":
|
|
158
|
-
return void 0;
|
|
159
|
-
default:
|
|
160
|
-
return void 0;
|
|
161
|
-
}
|
|
162
|
-
}, [linkType]);
|
|
163
|
-
const rel = React__namespace.useMemo(() => {
|
|
164
|
-
if (linkType === "external") {
|
|
165
|
-
return "noopener noreferrer";
|
|
166
|
-
}
|
|
167
|
-
return void 0;
|
|
168
|
-
}, [linkType]);
|
|
169
|
-
const isExternal = linkType === "external";
|
|
170
|
-
const isInternal = linkType === "internal";
|
|
171
|
-
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
172
|
-
const handleClick = React__namespace.useCallback(
|
|
173
|
-
(event) => {
|
|
174
|
-
if (onClick) {
|
|
175
|
-
try {
|
|
176
|
-
onClick(event);
|
|
177
|
-
} catch (error) {
|
|
178
|
-
console.error("Error in user onClick handler:", error);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (event.defaultPrevented) {
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
185
|
-
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
186
|
-
if (typeof window !== "undefined") {
|
|
187
|
-
const handler = window.__opensiteNavigationHandler;
|
|
188
|
-
if (typeof handler === "function") {
|
|
189
|
-
try {
|
|
190
|
-
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
191
|
-
if (handled !== false) {
|
|
192
|
-
event.preventDefault();
|
|
193
|
-
}
|
|
194
|
-
} catch (error) {
|
|
195
|
-
console.error("Error in navigation handler:", error);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
[onClick, shouldUseRouter, normalizedHref]
|
|
202
|
-
);
|
|
203
|
-
return {
|
|
204
|
-
linkType,
|
|
205
|
-
normalizedHref,
|
|
206
|
-
target,
|
|
207
|
-
rel,
|
|
208
|
-
isExternal,
|
|
209
|
-
isInternal,
|
|
210
|
-
shouldUseRouter,
|
|
211
|
-
handleClick
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
var baseStyles = [
|
|
215
|
-
// Layout
|
|
216
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
217
|
-
// Typography - using CSS variables with sensible defaults
|
|
218
|
-
"font-[var(--button-font-family,inherit)]",
|
|
219
|
-
"font-[var(--button-font-weight,500)]",
|
|
220
|
-
"tracking-[var(--button-letter-spacing,0)]",
|
|
221
|
-
"leading-[var(--button-line-height,1.25)]",
|
|
222
|
-
"[text-transform:var(--button-text-transform,none)]",
|
|
223
|
-
"text-sm",
|
|
224
|
-
// Border radius
|
|
225
|
-
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
226
|
-
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
227
|
-
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
228
|
-
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
229
|
-
"[box-shadow:var(--button-shadow,none)]",
|
|
230
|
-
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
231
|
-
// Disabled state
|
|
232
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
233
|
-
// SVG handling
|
|
234
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
235
|
-
// Focus styles
|
|
236
|
-
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
237
|
-
// Invalid state
|
|
238
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
239
|
-
].join(" ");
|
|
240
|
-
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
241
|
-
variants: {
|
|
242
|
-
variant: {
|
|
243
|
-
// Default (Primary) variant - full customization
|
|
244
|
-
default: [
|
|
245
|
-
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
246
|
-
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
247
|
-
"border-[length:var(--button-default-border-width,0px)]",
|
|
248
|
-
"border-[color:var(--button-default-border,transparent)]",
|
|
249
|
-
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
250
|
-
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
251
|
-
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
252
|
-
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
253
|
-
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
254
|
-
].join(" "),
|
|
255
|
-
// Destructive variant - full customization
|
|
256
|
-
destructive: [
|
|
257
|
-
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
258
|
-
"text-[var(--button-destructive-fg,white)]",
|
|
259
|
-
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
260
|
-
"border-[color:var(--button-destructive-border,transparent)]",
|
|
261
|
-
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
262
|
-
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
263
|
-
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
264
|
-
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
265
|
-
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
266
|
-
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
267
|
-
"dark:bg-destructive/60"
|
|
268
|
-
].join(" "),
|
|
269
|
-
// Outline variant - full customization with proper border handling
|
|
270
|
-
outline: [
|
|
271
|
-
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
272
|
-
"text-[var(--button-outline-fg,inherit)]",
|
|
273
|
-
"border-[length:var(--button-outline-border-width,1px)]",
|
|
274
|
-
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
275
|
-
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
276
|
-
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
277
|
-
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
278
|
-
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
279
|
-
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
280
|
-
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
281
|
-
].join(" "),
|
|
282
|
-
// Secondary variant - full customization
|
|
283
|
-
secondary: [
|
|
284
|
-
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
285
|
-
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
286
|
-
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
287
|
-
"border-[color:var(--button-secondary-border,transparent)]",
|
|
288
|
-
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
289
|
-
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
290
|
-
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
291
|
-
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
292
|
-
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
293
|
-
].join(" "),
|
|
294
|
-
// Ghost variant - full customization
|
|
295
|
-
ghost: [
|
|
296
|
-
"bg-[var(--button-ghost-bg,transparent)]",
|
|
297
|
-
"text-[var(--button-ghost-fg,inherit)]",
|
|
298
|
-
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
299
|
-
"border-[color:var(--button-ghost-border,transparent)]",
|
|
300
|
-
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
301
|
-
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
302
|
-
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
303
|
-
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
304
|
-
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
305
|
-
"dark:hover:bg-accent/50"
|
|
306
|
-
].join(" "),
|
|
307
|
-
// Link variant - full customization
|
|
308
|
-
link: [
|
|
309
|
-
"bg-[var(--button-link-bg,transparent)]",
|
|
310
|
-
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
311
|
-
"border-[length:var(--button-link-border-width,0px)]",
|
|
312
|
-
"border-[color:var(--button-link-border,transparent)]",
|
|
313
|
-
"[box-shadow:var(--button-link-shadow,none)]",
|
|
314
|
-
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
315
|
-
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
316
|
-
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
317
|
-
"underline-offset-4 hover:underline"
|
|
318
|
-
].join(" ")
|
|
319
|
-
},
|
|
320
|
-
size: {
|
|
321
|
-
default: [
|
|
322
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
323
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
324
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
325
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
326
|
-
].join(" "),
|
|
327
|
-
sm: [
|
|
328
|
-
"h-[var(--button-height-sm,2rem)]",
|
|
329
|
-
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
330
|
-
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
331
|
-
"gap-1.5",
|
|
332
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
333
|
-
].join(" "),
|
|
334
|
-
md: [
|
|
335
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
336
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
337
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
338
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
339
|
-
].join(" "),
|
|
340
|
-
lg: [
|
|
341
|
-
"h-[var(--button-height-lg,2.5rem)]",
|
|
342
|
-
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
343
|
-
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
344
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
345
|
-
].join(" "),
|
|
346
|
-
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
347
|
-
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
348
|
-
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
defaultVariants: {
|
|
352
|
-
variant: "default",
|
|
353
|
-
size: "default"
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
var Pressable = React__namespace.forwardRef(
|
|
357
|
-
({
|
|
358
|
-
children,
|
|
359
|
-
className,
|
|
360
|
-
href,
|
|
361
|
-
onClick,
|
|
362
|
-
variant,
|
|
363
|
-
size,
|
|
364
|
-
asButton = false,
|
|
365
|
-
fallbackComponentType = "span",
|
|
366
|
-
componentType,
|
|
367
|
-
"aria-label": ariaLabel,
|
|
368
|
-
"aria-describedby": ariaDescribedby,
|
|
369
|
-
id,
|
|
370
|
-
...props
|
|
371
|
-
}, ref) => {
|
|
372
|
-
const navigation = useNavigation({ href, onClick });
|
|
373
|
-
const {
|
|
374
|
-
normalizedHref,
|
|
375
|
-
target,
|
|
376
|
-
rel,
|
|
377
|
-
linkType,
|
|
378
|
-
isInternal,
|
|
379
|
-
handleClick
|
|
380
|
-
} = navigation;
|
|
381
|
-
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
382
|
-
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
383
|
-
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
384
|
-
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
385
|
-
const shouldApplyButtonStyles = asButton || variant || size;
|
|
386
|
-
const combinedClassName = cn(
|
|
387
|
-
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
388
|
-
className
|
|
389
|
-
);
|
|
390
|
-
const dataProps = Object.fromEntries(
|
|
391
|
-
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
392
|
-
);
|
|
393
|
-
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
394
|
-
"data-slot": "button",
|
|
395
|
-
"data-variant": variant ?? "default",
|
|
396
|
-
"data-size": size ?? "default"
|
|
397
|
-
} : {};
|
|
398
|
-
const commonProps = {
|
|
399
|
-
className: combinedClassName,
|
|
400
|
-
onClick: handleClick,
|
|
401
|
-
"aria-label": ariaLabel,
|
|
402
|
-
"aria-describedby": ariaDescribedby,
|
|
403
|
-
id,
|
|
404
|
-
...dataProps,
|
|
405
|
-
...buttonDataAttributes
|
|
406
|
-
};
|
|
407
|
-
if (finalComponentType === "a" && shouldRenderLink) {
|
|
408
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
409
|
-
"a",
|
|
410
|
-
{
|
|
411
|
-
ref,
|
|
412
|
-
href: normalizedHref,
|
|
413
|
-
target,
|
|
414
|
-
rel,
|
|
415
|
-
...commonProps,
|
|
416
|
-
...props,
|
|
417
|
-
children
|
|
418
|
-
}
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
if (finalComponentType === "button") {
|
|
422
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
423
|
-
"button",
|
|
424
|
-
{
|
|
425
|
-
ref,
|
|
426
|
-
type: props.type || "button",
|
|
427
|
-
...commonProps,
|
|
428
|
-
...props,
|
|
429
|
-
children
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
if (finalComponentType === "div") {
|
|
434
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
435
|
-
"div",
|
|
436
|
-
{
|
|
437
|
-
ref,
|
|
438
|
-
...commonProps,
|
|
439
|
-
children
|
|
440
|
-
}
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
444
|
-
"span",
|
|
445
|
-
{
|
|
446
|
-
ref,
|
|
447
|
-
...commonProps,
|
|
448
|
-
children
|
|
449
|
-
}
|
|
450
|
-
);
|
|
451
|
-
}
|
|
452
|
-
);
|
|
453
|
-
Pressable.displayName = "Pressable";
|
|
454
18
|
function Card({ className, ...props }) {
|
|
455
19
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
456
20
|
"div",
|
|
@@ -483,7 +47,7 @@ var maxWidthStyles = {
|
|
|
483
47
|
"4xl": "max-w-[1536px]",
|
|
484
48
|
full: "max-w-full"
|
|
485
49
|
};
|
|
486
|
-
var Container =
|
|
50
|
+
var Container = React__default.default.forwardRef(
|
|
487
51
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
488
52
|
const Component = as;
|
|
489
53
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -788,7 +352,7 @@ var spacingStyles = {
|
|
|
788
352
|
};
|
|
789
353
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
790
354
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
791
|
-
var Section =
|
|
355
|
+
var Section = React__default.default.forwardRef(
|
|
792
356
|
({
|
|
793
357
|
id,
|
|
794
358
|
title,
|
|
@@ -849,6 +413,12 @@ var Section = React__namespace.default.forwardRef(
|
|
|
849
413
|
}
|
|
850
414
|
);
|
|
851
415
|
Section.displayName = "Section";
|
|
416
|
+
var DEFAULT_STYLE_RULES = {
|
|
417
|
+
formContainer: "",
|
|
418
|
+
fieldsContainer: "",
|
|
419
|
+
fieldClassName: "",
|
|
420
|
+
formClassName: "space-y-6"
|
|
421
|
+
};
|
|
852
422
|
var DEFAULT_FORM_FIELDS = [
|
|
853
423
|
{
|
|
854
424
|
name: "position",
|
|
@@ -951,12 +521,6 @@ var DEFAULT_FORM_FIELDS = [
|
|
|
951
521
|
function ContactCareers({
|
|
952
522
|
heading,
|
|
953
523
|
description,
|
|
954
|
-
buttonText = "Submit Application",
|
|
955
|
-
buttonIcon,
|
|
956
|
-
actions,
|
|
957
|
-
actionsSlot,
|
|
958
|
-
formFields,
|
|
959
|
-
successMessage = "Thank you for your application! We'll review it and get back to you soon.",
|
|
960
524
|
className,
|
|
961
525
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
962
526
|
headerClassName,
|
|
@@ -964,69 +528,12 @@ function ContactCareers({
|
|
|
964
528
|
descriptionClassName,
|
|
965
529
|
cardClassName,
|
|
966
530
|
cardContentClassName,
|
|
967
|
-
submitClassName,
|
|
968
|
-
formClassName,
|
|
969
|
-
successMessageClassName,
|
|
970
|
-
errorMessageClassName,
|
|
971
531
|
background,
|
|
972
532
|
spacing = "py-8 md:py-32",
|
|
973
533
|
pattern,
|
|
974
534
|
patternOpacity,
|
|
975
|
-
|
|
976
|
-
onSubmit,
|
|
977
|
-
onSuccess,
|
|
978
|
-
onError
|
|
535
|
+
formEngineSetup
|
|
979
536
|
}) {
|
|
980
|
-
const fields = React.useMemo(() => formFields || DEFAULT_FORM_FIELDS, [formFields]);
|
|
981
|
-
const {
|
|
982
|
-
uploadTokens,
|
|
983
|
-
uploadProgress,
|
|
984
|
-
isUploading,
|
|
985
|
-
uploadFiles,
|
|
986
|
-
removeFile,
|
|
987
|
-
resetUpload
|
|
988
|
-
} = integration.useFileUpload({ onError });
|
|
989
|
-
const { form, submissionError, formMethod, resetSubmissionState } = integration.useContactForm({
|
|
990
|
-
formFields: fields,
|
|
991
|
-
formConfig,
|
|
992
|
-
onSubmit,
|
|
993
|
-
onSuccess: (data) => {
|
|
994
|
-
resetUpload();
|
|
995
|
-
onSuccess?.(data);
|
|
996
|
-
},
|
|
997
|
-
onError,
|
|
998
|
-
uploadTokens
|
|
999
|
-
});
|
|
1000
|
-
const actionsContent = React.useMemo(() => {
|
|
1001
|
-
if (actionsSlot) return actionsSlot;
|
|
1002
|
-
if (actions && actions.length > 0) {
|
|
1003
|
-
return actions.map((action, index) => {
|
|
1004
|
-
const {
|
|
1005
|
-
label,
|
|
1006
|
-
icon,
|
|
1007
|
-
iconAfter,
|
|
1008
|
-
children,
|
|
1009
|
-
className: actionClassName,
|
|
1010
|
-
...pressableProps
|
|
1011
|
-
} = action;
|
|
1012
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1013
|
-
Pressable,
|
|
1014
|
-
{
|
|
1015
|
-
asButton: true,
|
|
1016
|
-
className: actionClassName,
|
|
1017
|
-
...pressableProps,
|
|
1018
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1019
|
-
icon,
|
|
1020
|
-
label,
|
|
1021
|
-
iconAfter
|
|
1022
|
-
] })
|
|
1023
|
-
},
|
|
1024
|
-
index
|
|
1025
|
-
);
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
return null;
|
|
1029
|
-
}, [actionsSlot, actions]);
|
|
1030
537
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1031
538
|
Section,
|
|
1032
539
|
{
|
|
@@ -1059,57 +566,14 @@ function ContactCareers({
|
|
|
1059
566
|
}
|
|
1060
567
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description }))
|
|
1061
568
|
] }),
|
|
1062
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { className: cardClassName, children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: cn("p-0", cardContentClassName), children: /* @__PURE__ */ jsxRuntime.
|
|
1063
|
-
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsx(Card, { className: cardClassName, children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: cn("p-0", cardContentClassName), children: formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
570
|
+
integration.FormEngine,
|
|
1064
571
|
{
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
submissionError,
|
|
1069
|
-
successMessage,
|
|
1070
|
-
successMessageClassName,
|
|
1071
|
-
errorMessageClassName,
|
|
1072
|
-
submissionConfig: formConfig?.submissionConfig,
|
|
1073
|
-
onNewSubmission: () => {
|
|
1074
|
-
resetUpload();
|
|
1075
|
-
resetSubmissionState();
|
|
1076
|
-
},
|
|
1077
|
-
className: cn("p-6 space-y-6", formClassName),
|
|
1078
|
-
children: [
|
|
1079
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-6", children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1080
|
-
"div",
|
|
1081
|
-
{
|
|
1082
|
-
className: integration.getColumnSpanClass(field.columnSpan),
|
|
1083
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
|
-
integration.DynamicFormField,
|
|
1085
|
-
{
|
|
1086
|
-
field,
|
|
1087
|
-
uploadProgress,
|
|
1088
|
-
onFileUpload: uploadFiles,
|
|
1089
|
-
onFileRemove: removeFile,
|
|
1090
|
-
isUploading
|
|
1091
|
-
}
|
|
1092
|
-
)
|
|
1093
|
-
},
|
|
1094
|
-
field.name
|
|
1095
|
-
)) }),
|
|
1096
|
-
actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1097
|
-
Pressable,
|
|
1098
|
-
{
|
|
1099
|
-
componentType: "button",
|
|
1100
|
-
type: "submit",
|
|
1101
|
-
className: cn("w-full", submitClassName),
|
|
1102
|
-
asButton: true,
|
|
1103
|
-
disabled: form.isSubmitting,
|
|
1104
|
-
children: [
|
|
1105
|
-
buttonIcon,
|
|
1106
|
-
buttonText
|
|
1107
|
-
]
|
|
1108
|
-
}
|
|
1109
|
-
)
|
|
1110
|
-
]
|
|
572
|
+
formEngineSetup,
|
|
573
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
574
|
+
defaultStyleRules: DEFAULT_STYLE_RULES
|
|
1111
575
|
}
|
|
1112
|
-
) }) })
|
|
576
|
+
) : null }) })
|
|
1113
577
|
] })
|
|
1114
578
|
}
|
|
1115
579
|
);
|