@next-degree/pickle-shared-js 0.6.50 → 0.7.52
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/company_service_latest-DFxfjA2x.d.cts +4369 -0
- package/dist/company_service_latest-DFxfjA2x.d.ts +4369 -0
- package/dist/company_service_sanity--Aw-Y3Us.d.cts +7611 -0
- package/dist/company_service_sanity-B5FBDl-4.d.ts +7611 -0
- package/dist/components/buttons/BackButton.cjs +5 -1
- package/dist/components/buttons/BackButton.cjs.map +1 -1
- package/dist/components/buttons/BackButton.js +5 -1
- package/dist/components/buttons/BackButton.js.map +1 -1
- package/dist/components/company/CompanyTake.cjs +4 -2
- package/dist/components/company/CompanyTake.cjs.map +1 -1
- package/dist/components/company/CompanyTake.js +4 -2
- package/dist/components/company/CompanyTake.js.map +1 -1
- package/dist/components/jobPost/JobDescription.cjs +5 -3
- package/dist/components/jobPost/JobDescription.cjs.map +1 -1
- package/dist/components/jobPost/JobDescription.js +5 -3
- package/dist/components/jobPost/JobDescription.js.map +1 -1
- package/dist/components/jobPost/JobHeader.cjs +43 -37
- package/dist/components/jobPost/JobHeader.cjs.map +1 -1
- package/dist/components/jobPost/JobHeader.js +42 -36
- package/dist/components/jobPost/JobHeader.js.map +1 -1
- package/dist/components/jobPost/JobPost.cjs +92 -86
- package/dist/components/jobPost/JobPost.cjs.map +1 -1
- package/dist/components/jobPost/JobPost.d.cts +1 -1
- package/dist/components/jobPost/JobPost.d.ts +1 -1
- package/dist/components/jobPost/JobPost.js +92 -86
- package/dist/components/jobPost/JobPost.js.map +1 -1
- package/dist/components/primitives/avatar.cjs.map +1 -1
- package/dist/components/primitives/avatar.js.map +1 -1
- package/dist/components/primitives/command.cjs +6 -4
- package/dist/components/primitives/command.cjs.map +1 -1
- package/dist/components/primitives/command.d.cts +7 -7
- package/dist/components/primitives/command.d.ts +7 -7
- package/dist/components/primitives/command.js +6 -4
- package/dist/components/primitives/command.js.map +1 -1
- package/dist/components/primitives/dialog.cjs +4 -4
- package/dist/components/primitives/dialog.cjs.map +1 -1
- package/dist/components/primitives/dialog.js +6 -4
- package/dist/components/primitives/dialog.js.map +1 -1
- package/dist/components/primitives/input-otp.cjs +2 -2
- package/dist/components/primitives/input-otp.cjs.map +1 -1
- package/dist/components/primitives/input-otp.d.cts +2 -2
- package/dist/components/primitives/input-otp.d.ts +2 -2
- package/dist/components/primitives/input-otp.js +2 -2
- package/dist/components/primitives/input-otp.js.map +1 -1
- package/dist/components/primitives/popover.cjs +1 -1
- package/dist/components/primitives/popover.cjs.map +1 -1
- package/dist/components/primitives/popover.d.cts +1 -1
- package/dist/components/primitives/popover.d.ts +1 -1
- package/dist/components/primitives/popover.js +1 -1
- package/dist/components/primitives/popover.js.map +1 -1
- package/dist/components/primitives/separator.cjs.map +1 -1
- package/dist/components/primitives/separator.js.map +1 -1
- package/dist/components/primitives/tooltip.cjs.map +1 -1
- package/dist/components/primitives/tooltip.js.map +1 -1
- package/dist/components/ui/Avatar.cjs +2 -2
- package/dist/components/ui/Avatar.cjs.map +1 -1
- package/dist/components/ui/Avatar.js +4 -2
- package/dist/components/ui/Avatar.js.map +1 -1
- package/dist/components/ui/Badge.cjs.map +1 -1
- package/dist/components/ui/Badge.js.map +1 -1
- package/dist/components/ui/Button.cjs +3 -3
- package/dist/components/ui/Button.cjs.map +1 -1
- package/dist/components/ui/Button.d.cts +33 -0
- package/dist/components/ui/Button.d.ts +33 -0
- package/dist/components/ui/Button.js +5 -3
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Checkbox.cjs.map +1 -1
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/Combobox.cjs +111 -103
- package/dist/components/ui/Combobox.cjs.map +1 -1
- package/dist/components/ui/Combobox.d.cts +1 -1
- package/dist/components/ui/Combobox.d.ts +1 -1
- package/dist/components/ui/Combobox.js +108 -100
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/Counter.cjs +3 -1
- package/dist/components/ui/Counter.cjs.map +1 -1
- package/dist/components/ui/Counter.js +3 -1
- package/dist/components/ui/Counter.js.map +1 -1
- package/dist/components/ui/DatePicker.cjs +318 -0
- package/dist/components/ui/DatePicker.cjs.map +1 -0
- package/dist/components/ui/DatePicker.d.cts +16 -0
- package/dist/components/ui/DatePicker.d.ts +16 -0
- package/dist/components/ui/DatePicker.js +284 -0
- package/dist/components/ui/DatePicker.js.map +1 -0
- package/dist/components/ui/ErrorMessage.cjs.map +1 -1
- package/dist/components/ui/ErrorMessage.js.map +1 -1
- package/dist/components/ui/Icon.cjs.map +1 -1
- package/dist/components/ui/Icon.js.map +1 -1
- package/dist/components/ui/Input.cjs +3 -1
- package/dist/components/ui/Input.cjs.map +1 -1
- package/dist/components/ui/Input.d.cts +29 -0
- package/dist/components/ui/Input.d.ts +29 -0
- package/dist/components/ui/Input.js +3 -1
- package/dist/components/ui/Input.js.map +1 -1
- package/dist/components/ui/InputOtp.cjs +62 -58
- package/dist/components/ui/InputOtp.cjs.map +1 -1
- package/dist/components/ui/InputOtp.js +62 -58
- package/dist/components/ui/InputOtp.js.map +1 -1
- package/dist/components/ui/Label.cjs +5 -3
- package/dist/components/ui/Label.cjs.map +1 -1
- package/dist/components/ui/Label.js +7 -3
- package/dist/components/ui/Label.js.map +1 -1
- package/dist/components/ui/ListItem.cjs +7 -7
- package/dist/components/ui/ListItem.cjs.map +1 -1
- package/dist/components/ui/ListItem.js +10 -8
- package/dist/components/ui/ListItem.js.map +1 -1
- package/dist/components/ui/MapComponent.cjs.map +1 -1
- package/dist/components/ui/MapComponent.js +1 -1
- package/dist/components/ui/MapComponent.js.map +1 -1
- package/dist/components/ui/PlacesQueryInput.cjs +21 -13
- package/dist/components/ui/PlacesQueryInput.cjs.map +1 -1
- package/dist/components/ui/PlacesQueryInput.js +23 -13
- package/dist/components/ui/PlacesQueryInput.js.map +1 -1
- package/dist/components/ui/ReadMore.cjs +5 -3
- package/dist/components/ui/ReadMore.cjs.map +1 -1
- package/dist/components/ui/ReadMore.js +5 -3
- package/dist/components/ui/ReadMore.js.map +1 -1
- package/dist/components/ui/Select.cjs +63 -59
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.js +61 -57
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/components/ui/StepTabs.cjs.map +1 -1
- package/dist/components/ui/StepTabs.d.cts +1 -1
- package/dist/components/ui/StepTabs.d.ts +1 -1
- package/dist/components/ui/StepTabs.js.map +1 -1
- package/dist/components/ui/buttonShadcn.cjs +94 -0
- package/dist/components/ui/buttonShadcn.cjs.map +1 -0
- package/dist/components/ui/buttonShadcn.d.cts +14 -0
- package/dist/components/ui/buttonShadcn.d.ts +14 -0
- package/dist/components/ui/buttonShadcn.js +58 -0
- package/dist/components/ui/buttonShadcn.js.map +1 -0
- package/dist/components/ui/calendar.cjs +152 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.d.cts +11 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.js +118 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/{displayText-BCQw5Qq-.d.cts → displayText-6TMMBOmQ.d.cts} +2 -2
- package/dist/{displayText-Bqmpx1Va.d.ts → displayText-BCC_oy5I.d.ts} +2 -2
- package/dist/hooks/useDisplayText.cjs.map +1 -1
- package/dist/hooks/useDisplayText.d.cts +3 -3
- package/dist/hooks/useDisplayText.d.ts +3 -3
- package/dist/hooks/useDisplayText.js.map +1 -1
- package/dist/index.cjs +1090 -880
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +1078 -869
- package/dist/index.js.map +1 -1
- package/dist/job_posting_service_latest-B5tqLSgo.d.cts +4247 -0
- package/dist/job_posting_service_latest-B5tqLSgo.d.ts +4247 -0
- package/dist/job_posting_service_sanity-CeX9tlpb.d.ts +8093 -0
- package/dist/job_posting_service_sanity-D5Znr6Ba.d.cts +8093 -0
- package/dist/lib/google.cjs.map +1 -1
- package/dist/lib/google.js.map +1 -1
- package/dist/lib/locations.cjs.map +1 -1
- package/dist/lib/locations.d.cts +2 -2
- package/dist/lib/locations.d.ts +2 -2
- package/dist/lib/locations.js.map +1 -1
- package/dist/lib/mappings.cjs.map +1 -1
- package/dist/lib/mappings.d.cts +3 -3
- package/dist/lib/mappings.d.ts +3 -3
- package/dist/lib/mappings.js.map +1 -1
- package/dist/lib/salaryRange.cjs.map +1 -1
- package/dist/lib/salaryRange.d.cts +1 -1
- package/dist/lib/salaryRange.d.ts +1 -1
- package/dist/lib/salaryRange.js.map +1 -1
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/services/displayText.cjs.map +1 -1
- package/dist/services/displayText.d.cts +3 -3
- package/dist/services/displayText.d.ts +3 -3
- package/dist/services/displayText.js.map +1 -1
- package/dist/shared_pickle_output_latest-Bwfg5B4p.d.cts +350 -0
- package/dist/shared_pickle_output_latest-Bwfg5B4p.d.ts +350 -0
- package/dist/styles/globals.css +275 -0
- package/dist/styles/globals.css.map +1 -1
- package/dist/types/data/company_service_latest.cjs.map +1 -1
- package/dist/types/data/company_service_latest.d.cts +1 -1
- package/dist/types/data/company_service_latest.d.ts +1 -1
- package/dist/types/data/company_service_latest.js.map +1 -1
- package/dist/types/data/job_posting_service_latest.cjs +3 -1
- package/dist/types/data/job_posting_service_latest.cjs.map +1 -1
- package/dist/types/data/job_posting_service_latest.d.cts +1 -1
- package/dist/types/data/job_posting_service_latest.d.ts +1 -1
- package/dist/types/data/job_posting_service_latest.js +3 -1
- package/dist/types/data/job_posting_service_latest.js.map +1 -1
- package/dist/types/data/shared_pickle_output_latest.cjs.map +1 -1
- package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
- package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
- package/dist/types/data/shared_pickle_output_latest.js.map +1 -1
- package/dist/types/index.cjs +505 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +10 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +479 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/latest/company_service_latest.cjs +251 -0
- package/dist/types/latest/company_service_latest.cjs.map +1 -0
- package/dist/types/latest/company_service_latest.d.cts +2 -0
- package/dist/types/latest/company_service_latest.d.ts +2 -0
- package/dist/types/latest/company_service_latest.js +210 -0
- package/dist/types/latest/company_service_latest.js.map +1 -0
- package/dist/types/latest/custom/company_service_sanity.cjs +325 -0
- package/dist/types/latest/custom/company_service_sanity.cjs.map +1 -0
- package/dist/types/latest/custom/company_service_sanity.d.cts +4 -0
- package/dist/types/latest/custom/company_service_sanity.d.ts +4 -0
- package/dist/types/latest/custom/company_service_sanity.js +288 -0
- package/dist/types/latest/custom/company_service_sanity.js.map +1 -0
- package/dist/types/latest/custom/custom_sanity_models.cjs +43 -0
- package/dist/types/latest/custom/custom_sanity_models.cjs.map +1 -0
- package/dist/types/latest/custom/custom_sanity_models.d.cts +30 -0
- package/dist/types/latest/custom/custom_sanity_models.d.ts +30 -0
- package/dist/types/latest/custom/custom_sanity_models.js +17 -0
- package/dist/types/latest/custom/custom_sanity_models.js.map +1 -0
- package/dist/types/latest/custom/job_posting_service_sanity.cjs +376 -0
- package/dist/types/latest/custom/job_posting_service_sanity.cjs.map +1 -0
- package/dist/types/latest/custom/job_posting_service_sanity.d.cts +5 -0
- package/dist/types/latest/custom/job_posting_service_sanity.d.ts +5 -0
- package/dist/types/latest/custom/job_posting_service_sanity.js +331 -0
- package/dist/types/latest/custom/job_posting_service_sanity.js.map +1 -0
- package/dist/types/latest/job_posting_service_latest.cjs +293 -0
- package/dist/types/latest/job_posting_service_latest.cjs.map +1 -0
- package/dist/types/latest/job_posting_service_latest.d.cts +2 -0
- package/dist/types/latest/job_posting_service_latest.d.ts +2 -0
- package/dist/types/latest/job_posting_service_latest.js +257 -0
- package/dist/types/latest/job_posting_service_latest.js.map +1 -0
- package/dist/types/latest/shared_pickle_output_latest.cjs +109 -0
- package/dist/types/latest/shared_pickle_output_latest.cjs.map +1 -0
- package/dist/types/latest/shared_pickle_output_latest.d.cts +2 -0
- package/dist/types/latest/shared_pickle_output_latest.d.ts +2 -0
- package/dist/types/latest/shared_pickle_output_latest.js +75 -0
- package/dist/types/latest/shared_pickle_output_latest.js.map +1 -0
- package/package.json +27 -9
- package/dist/{company_service_latest-B7KhyYDc.d.cts → company_service_latest-BUKbZgpZ.d.cts} +306 -306
- package/dist/{company_service_latest-B7KhyYDc.d.ts → company_service_latest-BUKbZgpZ.d.ts} +306 -306
- package/dist/{job_posting_service_latest-C2z66hFK.d.cts → job_posting_service_latest-2KcpupDl.d.cts} +271 -271
- package/dist/{job_posting_service_latest-C2z66hFK.d.ts → job_posting_service_latest-2KcpupDl.d.ts} +271 -271
- package/dist/{shared_pickle_output_latest-_L9GxVle.d.cts → shared_pickle_output_latest-D2n-PRlx.d.cts} +20 -20
- package/dist/{shared_pickle_output_latest-_L9GxVle.d.ts → shared_pickle_output_latest-D2n-PRlx.d.ts} +20 -20
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
CompanyService: () => company_service_latest_exports,
|
|
43
43
|
CompanyTake: () => CompanyTake,
|
|
44
44
|
Counter: () => Counter,
|
|
45
|
+
DatePicker: () => DatePicker,
|
|
45
46
|
Icon: () => Icon,
|
|
46
47
|
Input: () => Input_default,
|
|
47
48
|
InputOtp: () => InputOtp,
|
|
@@ -65,9 +66,9 @@ __export(index_exports, {
|
|
|
65
66
|
});
|
|
66
67
|
module.exports = __toCommonJS(index_exports);
|
|
67
68
|
|
|
68
|
-
// src/components/ui/
|
|
69
|
-
var
|
|
70
|
-
var
|
|
69
|
+
// src/components/ui/Checkbox.tsx
|
|
70
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
71
|
+
var import_lucide_react = require("lucide-react");
|
|
71
72
|
var import_react = require("react");
|
|
72
73
|
|
|
73
74
|
// src/lib/utils.ts
|
|
@@ -77,265 +78,9 @@ function cn(...inputs) {
|
|
|
77
78
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
// src/components/ui/ErrorMessage.tsx
|
|
81
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
82
|
-
function ErrorMessage({ message, className, ...props }) {
|
|
83
|
-
if (!message) return null;
|
|
84
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
|
|
85
|
-
}
|
|
86
|
-
var ErrorMessage_default = ErrorMessage;
|
|
87
|
-
|
|
88
|
-
// src/components/primitives/tooltip.tsx
|
|
89
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
90
|
-
var React = __toESM(require("react"), 1);
|
|
91
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
92
|
-
var TooltipProvider = TooltipPrimitive.Provider;
|
|
93
|
-
var Tooltip = TooltipPrimitive.Root;
|
|
94
|
-
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
95
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
96
|
-
TooltipPrimitive.Content,
|
|
97
|
-
{
|
|
98
|
-
ref,
|
|
99
|
-
sideOffset,
|
|
100
|
-
className: cn(
|
|
101
|
-
"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
102
|
-
className
|
|
103
|
-
),
|
|
104
|
-
...props
|
|
105
|
-
}
|
|
106
|
-
));
|
|
107
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
108
|
-
|
|
109
|
-
// src/components/ui/Label.tsx
|
|
110
|
-
var import_lucide_react = require("lucide-react");
|
|
111
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
112
|
-
function Label({ text, required, description, className, ...props }) {
|
|
113
|
-
if (!text) return null;
|
|
114
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
116
|
-
"label",
|
|
117
|
-
{
|
|
118
|
-
className: cn(
|
|
119
|
-
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
120
|
-
className
|
|
121
|
-
),
|
|
122
|
-
...props,
|
|
123
|
-
children: [
|
|
124
|
-
text,
|
|
125
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-600", children: "\xA0*" })
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
),
|
|
129
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
132
|
-
] }) })
|
|
133
|
-
] });
|
|
134
|
-
}
|
|
135
|
-
var Label_default = Label;
|
|
136
|
-
|
|
137
|
-
// src/components/ui/Chip.tsx
|
|
138
|
-
var import_cva = require("cva");
|
|
139
|
-
var import_tailwind_merge2 = require("tailwind-merge");
|
|
140
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
141
|
-
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
|
|
142
|
-
var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
143
|
-
variants: {
|
|
144
|
-
variant: {
|
|
145
|
-
neutral: ["text-grey-80", "border-grey-10"],
|
|
146
|
-
primary: ["text-purple-100", "border-purple-20"],
|
|
147
|
-
danger: ["text-pumpkin-100", "border-pumpkin-20"],
|
|
148
|
-
onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
|
|
149
|
-
onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
|
|
150
|
-
},
|
|
151
|
-
size: {
|
|
152
|
-
small: ["text-sm", "leading-5", "px-2", "py-1", "gap-1.5"],
|
|
153
|
-
medium: ["text-base", "leading-6", "px-3", "py-2", "gap-2"]
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
defaultVariants: {
|
|
157
|
-
variant: "neutral",
|
|
158
|
-
size: "medium"
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
var Chip_default = Chip;
|
|
162
|
-
|
|
163
|
-
// src/components/primitives/separator.tsx
|
|
164
|
-
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
165
|
-
var React2 = __toESM(require("react"), 1);
|
|
166
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
167
|
-
var Separator = React2.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
168
|
-
SeparatorPrimitive.Root,
|
|
169
|
-
{
|
|
170
|
-
ref,
|
|
171
|
-
decorative,
|
|
172
|
-
orientation,
|
|
173
|
-
className: cn(
|
|
174
|
-
"shrink-0 bg-grey-10",
|
|
175
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
176
|
-
className
|
|
177
|
-
),
|
|
178
|
-
...props
|
|
179
|
-
}
|
|
180
|
-
));
|
|
181
|
-
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
182
|
-
|
|
183
|
-
// src/components/ui/Select.tsx
|
|
184
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
185
|
-
var Select = (0, import_react.forwardRef)(
|
|
186
|
-
({ label, options, placeholder, multiselect, description, classNames, error, id, ...props }, ref) => {
|
|
187
|
-
const { value, defaultValue, dir, className, onChange, ...rest } = props;
|
|
188
|
-
const [selected, setSelected] = (0, import_react.useState)([]);
|
|
189
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
190
|
-
const containerRef = (0, import_react.useRef)(null);
|
|
191
|
-
(0, import_react.useEffect)(() => {
|
|
192
|
-
if (!value) return setSelected([]);
|
|
193
|
-
setSelected(Array.isArray(value) ? value : [value]);
|
|
194
|
-
}, [value]);
|
|
195
|
-
const toggleOpen = () => setOpen((prev) => !prev);
|
|
196
|
-
const closeOnEscape = (event) => event.key === "Escape" && setOpen(false);
|
|
197
|
-
const handleOnOpenChange = (isOpen) => (!multiselect || isOpen) && setOpen(isOpen);
|
|
198
|
-
const setValueOnEnter = (event, value2) => event.key === "Enter" && handleChange(value2);
|
|
199
|
-
const getLabel = () => selected.map((o) => options?.find((option) => option.value === o)?.title).join(", ");
|
|
200
|
-
const chipLabels = selected?.map((s) => options?.find(({ value: value2 }) => value2 === s)).filter(Boolean);
|
|
201
|
-
function handleChange(newValue) {
|
|
202
|
-
if (newValue === "" && !multiselect) return;
|
|
203
|
-
let newSelected = [];
|
|
204
|
-
setSelected((prev) => {
|
|
205
|
-
newSelected = prev.includes(newValue) ? prev.filter((item) => item !== newValue) : [...prev, newValue];
|
|
206
|
-
return multiselect ? newSelected : [newValue];
|
|
207
|
-
});
|
|
208
|
-
onChange?.(multiselect ? newSelected : newValue);
|
|
209
|
-
}
|
|
210
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
211
|
-
"div",
|
|
212
|
-
{
|
|
213
|
-
className: cn("flex w-full flex-col gap-1", className),
|
|
214
|
-
ref: containerRef,
|
|
215
|
-
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element`,
|
|
216
|
-
children: [
|
|
217
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
218
|
-
Label_default,
|
|
219
|
-
{
|
|
220
|
-
text: label,
|
|
221
|
-
htmlFor: props.name,
|
|
222
|
-
required: props.required,
|
|
223
|
-
description,
|
|
224
|
-
className: classNames?.label
|
|
225
|
-
}
|
|
226
|
-
),
|
|
227
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
228
|
-
SelectPrimitive.Root,
|
|
229
|
-
{
|
|
230
|
-
open,
|
|
231
|
-
value: selected.join(","),
|
|
232
|
-
onOpenChange: handleOnOpenChange,
|
|
233
|
-
onValueChange: multiselect ? void 0 : handleChange,
|
|
234
|
-
defaultValue: typeof defaultValue === "string" ? defaultValue : void 0,
|
|
235
|
-
dir: dir === "rtl" ? "rtl" : "ltr",
|
|
236
|
-
...rest,
|
|
237
|
-
children: [
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
239
|
-
SelectPrimitive.Trigger,
|
|
240
|
-
{
|
|
241
|
-
ref,
|
|
242
|
-
className: cn(
|
|
243
|
-
"group flex h-11 w-full flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
|
|
244
|
-
classNames?.trigger
|
|
245
|
-
),
|
|
246
|
-
children: [
|
|
247
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
248
|
-
SelectPrimitive.Value,
|
|
249
|
-
{
|
|
250
|
-
placeholder: placeholder ?? "Select an option",
|
|
251
|
-
"aria-label": getLabel(),
|
|
252
|
-
children: getLabel()
|
|
253
|
-
}
|
|
254
|
-
) }),
|
|
255
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
256
|
-
import_lucide_react2.ChevronDownIcon,
|
|
257
|
-
{
|
|
258
|
-
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
259
|
-
size: "16"
|
|
260
|
-
}
|
|
261
|
-
)
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
),
|
|
265
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
266
|
-
SelectPrimitive.Content,
|
|
267
|
-
{
|
|
268
|
-
hideWhenDetached: true,
|
|
269
|
-
className: "z-10 max-h-[var(--radix-select-content-available-height)] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md bg-white py-2 shadow-lg",
|
|
270
|
-
position: "popper",
|
|
271
|
-
sideOffset: 4,
|
|
272
|
-
onPointerDownOutside: toggleOpen,
|
|
273
|
-
onKeyDown: closeOnEscape,
|
|
274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SelectPrimitive.Viewport, { children: [
|
|
275
|
-
multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
276
|
-
SelectPrimitive.Group,
|
|
277
|
-
{
|
|
278
|
-
className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
|
|
279
|
-
"data-testid": "selected-labels",
|
|
280
|
-
children: chipLabels?.map(
|
|
281
|
-
(chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
|
|
282
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: chip.title }),
|
|
283
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
284
|
-
import_lucide_react2.X,
|
|
285
|
-
{
|
|
286
|
-
size: 18,
|
|
287
|
-
"data-testid": `chip-remove-${chip.value}`,
|
|
288
|
-
className: "cursor-pointer",
|
|
289
|
-
onClick: () => handleChange(chip.value)
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
] }, chip.title)
|
|
293
|
-
)
|
|
294
|
-
}
|
|
295
|
-
),
|
|
296
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
|
|
297
|
-
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
298
|
-
SelectPrimitive.Item,
|
|
299
|
-
{
|
|
300
|
-
value: value2,
|
|
301
|
-
className: "group relative cursor-pointer px-4 py-2 text-left text-sm hover:bg-purple-50 focus:bg-purple-50 focus:outline-none data-[state=checked]:bg-purple-50 data-[state=checked]:pr-10 data-[state=checked]:text-purple-100",
|
|
302
|
-
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
303
|
-
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
304
|
-
onClick: () => handleChange(value2),
|
|
305
|
-
children: [
|
|
306
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemText, { children: title }),
|
|
307
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
308
|
-
import_lucide_react2.CheckIcon,
|
|
309
|
-
{
|
|
310
|
-
className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
311
|
-
size: 16
|
|
312
|
-
}
|
|
313
|
-
)
|
|
314
|
-
]
|
|
315
|
-
},
|
|
316
|
-
id2
|
|
317
|
-
))
|
|
318
|
-
] })
|
|
319
|
-
}
|
|
320
|
-
) })
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
),
|
|
324
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorMessage_default, { message: error })
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
Select.displayName = "Select";
|
|
331
|
-
var Select_default = Select;
|
|
332
|
-
|
|
333
81
|
// src/components/ui/Checkbox.tsx
|
|
334
|
-
var
|
|
335
|
-
var
|
|
336
|
-
var import_react2 = require("react");
|
|
337
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
338
|
-
var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
82
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
83
|
+
var CheckboxToggle = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
339
84
|
CheckboxPrimitive.Root,
|
|
340
85
|
{
|
|
341
86
|
ref,
|
|
@@ -365,95 +110,131 @@ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref
|
|
|
365
110
|
className
|
|
366
111
|
),
|
|
367
112
|
...props,
|
|
368
|
-
children: /* @__PURE__ */ (0,
|
|
369
|
-
/* @__PURE__ */ (0,
|
|
370
|
-
/* @__PURE__ */ (0,
|
|
113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
|
|
371
116
|
] })
|
|
372
117
|
}
|
|
373
118
|
));
|
|
374
119
|
CheckboxToggle.displayName = CheckboxPrimitive.Root.displayName;
|
|
375
|
-
var Checkbox = (0,
|
|
120
|
+
var Checkbox = (0, import_react.forwardRef)(
|
|
376
121
|
({ classNames, children, ...props }, ref) => {
|
|
377
122
|
const { disabled } = props;
|
|
378
123
|
const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
|
|
379
124
|
const labelClassName = disabled ? "text-grey-40 pointer-events-none" : "";
|
|
380
|
-
return /* @__PURE__ */ (0,
|
|
381
|
-
/* @__PURE__ */ (0,
|
|
382
|
-
/* @__PURE__ */ (0,
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxToggle, { id, disabled, ref, ...props }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
|
|
383
128
|
] });
|
|
384
129
|
}
|
|
385
130
|
);
|
|
386
131
|
Checkbox.displayName = "Checkbox";
|
|
387
132
|
var Checkbox_default = Checkbox;
|
|
388
133
|
|
|
389
|
-
// src/components/ui/
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconComponent, { size: 14 });
|
|
407
|
-
}
|
|
408
|
-
return null;
|
|
409
|
-
};
|
|
410
|
-
const optionIcon = icon ? getIconIfValid(icon) : void 0;
|
|
411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
412
|
-
"li",
|
|
413
|
-
{
|
|
414
|
-
className: cn(
|
|
415
|
-
"group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",
|
|
416
|
-
className
|
|
417
|
-
),
|
|
418
|
-
...props,
|
|
419
|
-
"data-state": isSelected ? "checked" : "unchecked",
|
|
420
|
-
children: [
|
|
421
|
-
optionIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "mr-2", children: optionIcon }),
|
|
422
|
-
hasCheckbox && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Checkbox_default, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
|
|
423
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
424
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: title }),
|
|
425
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-grey-80", children: description })
|
|
426
|
-
] }),
|
|
427
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
428
|
-
import_lucide_react4.CheckIcon,
|
|
429
|
-
{
|
|
430
|
-
className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
|
|
431
|
-
size: 16
|
|
432
|
-
}
|
|
433
|
-
)
|
|
434
|
-
]
|
|
134
|
+
// src/components/ui/Chip.tsx
|
|
135
|
+
var import_cva = require("cva");
|
|
136
|
+
var import_tailwind_merge2 = require("tailwind-merge");
|
|
137
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
138
|
+
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
|
|
139
|
+
var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
140
|
+
variants: {
|
|
141
|
+
variant: {
|
|
142
|
+
neutral: ["text-grey-80", "border-grey-10"],
|
|
143
|
+
primary: ["text-purple-100", "border-purple-20"],
|
|
144
|
+
danger: ["text-pumpkin-100", "border-pumpkin-20"],
|
|
145
|
+
onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
|
|
146
|
+
onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
|
|
147
|
+
},
|
|
148
|
+
size: {
|
|
149
|
+
small: ["text-sm", "leading-5", "px-2", "py-1", "gap-1.5"],
|
|
150
|
+
medium: ["text-base", "leading-6", "px-3", "py-2", "gap-2"]
|
|
435
151
|
}
|
|
436
|
-
|
|
152
|
+
},
|
|
153
|
+
defaultVariants: {
|
|
154
|
+
variant: "neutral",
|
|
155
|
+
size: "medium"
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
var Chip_default = Chip;
|
|
159
|
+
|
|
160
|
+
// src/components/ui/Input.tsx
|
|
161
|
+
var import_cva2 = require("cva");
|
|
162
|
+
var import_lucide_react3 = require("lucide-react");
|
|
163
|
+
var import_react2 = require("react");
|
|
164
|
+
|
|
165
|
+
// src/components/ui/ErrorMessage.tsx
|
|
166
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
167
|
+
function ErrorMessage({ message, className, ...props }) {
|
|
168
|
+
if (!message) return null;
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
|
|
170
|
+
}
|
|
171
|
+
var ErrorMessage_default = ErrorMessage;
|
|
172
|
+
|
|
173
|
+
// src/components/ui/Label.tsx
|
|
174
|
+
var import_lucide_react2 = require("lucide-react");
|
|
175
|
+
|
|
176
|
+
// src/components/primitives/tooltip.tsx
|
|
177
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
178
|
+
var React = __toESM(require("react"), 1);
|
|
179
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
180
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
181
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
182
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
183
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
184
|
+
TooltipPrimitive.Content,
|
|
185
|
+
{
|
|
186
|
+
ref,
|
|
187
|
+
sideOffset,
|
|
188
|
+
className: cn(
|
|
189
|
+
"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
190
|
+
className
|
|
191
|
+
),
|
|
192
|
+
...props
|
|
193
|
+
}
|
|
194
|
+
));
|
|
195
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
196
|
+
|
|
197
|
+
// src/components/ui/Label.tsx
|
|
198
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
199
|
+
function Label({ text, required, description, className, ...props }) {
|
|
200
|
+
if (!text) return null;
|
|
201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
203
|
+
"label",
|
|
204
|
+
{
|
|
205
|
+
className: cn(
|
|
206
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
207
|
+
className
|
|
208
|
+
),
|
|
209
|
+
...props,
|
|
210
|
+
children: [
|
|
211
|
+
text,
|
|
212
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-red-600", children: "\xA0*" })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Tooltip, { children: [
|
|
217
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.InfoIcon, { className: "h-4 w-4" }) }),
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
219
|
+
] }) })
|
|
220
|
+
] });
|
|
437
221
|
}
|
|
438
|
-
var
|
|
222
|
+
var Label_default = Label;
|
|
439
223
|
|
|
440
224
|
// src/components/ui/Input.tsx
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
var import_react3 = require("react");
|
|
444
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
445
|
-
var Input = (0, import_react3.forwardRef)(
|
|
225
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
226
|
+
var Input = (0, import_react2.forwardRef)(
|
|
446
227
|
({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
447
228
|
const handleClear = () => {
|
|
448
229
|
onChange?.({ target: { value: "" } });
|
|
449
230
|
onClear?.();
|
|
450
231
|
};
|
|
451
|
-
const IconComponent = icon &&
|
|
232
|
+
const IconComponent = icon && import_lucide_react3.icons[icon];
|
|
452
233
|
const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
|
|
453
234
|
const hasIcon = !!icon;
|
|
454
235
|
const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
|
|
455
|
-
return /* @__PURE__ */ (0,
|
|
456
|
-
label && /* @__PURE__ */ (0,
|
|
236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
|
|
237
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
457
238
|
Label_default,
|
|
458
239
|
{
|
|
459
240
|
text: label,
|
|
@@ -463,14 +244,14 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
463
244
|
className: classNames?.label
|
|
464
245
|
}
|
|
465
246
|
),
|
|
466
|
-
/* @__PURE__ */ (0,
|
|
467
|
-
IconComponent && /* @__PURE__ */ (0,
|
|
247
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative flex flex-row items-center", children: [
|
|
248
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
468
249
|
IconComponent,
|
|
469
250
|
{
|
|
470
251
|
className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
|
|
471
252
|
}
|
|
472
253
|
),
|
|
473
|
-
/* @__PURE__ */ (0,
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
474
255
|
"input",
|
|
475
256
|
{
|
|
476
257
|
className: cn(inputVariants({ theme, hasIcon })),
|
|
@@ -482,8 +263,8 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
482
263
|
...props
|
|
483
264
|
}
|
|
484
265
|
),
|
|
485
|
-
hasIcon && value && /* @__PURE__ */ (0,
|
|
486
|
-
|
|
266
|
+
hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
267
|
+
import_lucide_react3.X,
|
|
487
268
|
{
|
|
488
269
|
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
489
270
|
onClick: handleClear,
|
|
@@ -491,7 +272,7 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
491
272
|
}
|
|
492
273
|
)
|
|
493
274
|
] }),
|
|
494
|
-
/* @__PURE__ */ (0,
|
|
275
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorMessage_default, { message: error })
|
|
495
276
|
] });
|
|
496
277
|
}
|
|
497
278
|
);
|
|
@@ -546,9 +327,60 @@ var inputVariants = (0, import_cva2.cva)(
|
|
|
546
327
|
);
|
|
547
328
|
var Input_default = Input;
|
|
548
329
|
|
|
330
|
+
// src/components/ui/ListItem.tsx
|
|
331
|
+
var import_lucide_react4 = require("lucide-react");
|
|
332
|
+
var import_lucide_react5 = require("lucide-react");
|
|
333
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
334
|
+
function ListItem({
|
|
335
|
+
icon,
|
|
336
|
+
hasCheckbox,
|
|
337
|
+
isSelected,
|
|
338
|
+
className,
|
|
339
|
+
title,
|
|
340
|
+
value,
|
|
341
|
+
description,
|
|
342
|
+
...props
|
|
343
|
+
}) {
|
|
344
|
+
const getIconIfValid = (icon2) => {
|
|
345
|
+
if (icon2 in import_lucide_react5.icons) {
|
|
346
|
+
const IconComponent = import_lucide_react5.icons[icon2];
|
|
347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconComponent, { size: 14 });
|
|
348
|
+
}
|
|
349
|
+
return null;
|
|
350
|
+
};
|
|
351
|
+
const optionIcon = icon ? getIconIfValid(icon) : void 0;
|
|
352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
353
|
+
"li",
|
|
354
|
+
{
|
|
355
|
+
className: cn(
|
|
356
|
+
"group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",
|
|
357
|
+
className
|
|
358
|
+
),
|
|
359
|
+
...props,
|
|
360
|
+
"data-state": isSelected ? "checked" : "unchecked",
|
|
361
|
+
children: [
|
|
362
|
+
optionIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "mr-2", children: optionIcon }),
|
|
363
|
+
hasCheckbox && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Checkbox_default, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: title }),
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs text-grey-80", children: description })
|
|
367
|
+
] }),
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
369
|
+
import_lucide_react4.CheckIcon,
|
|
370
|
+
{
|
|
371
|
+
className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
|
|
372
|
+
size: 16
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
var ListItem_default = ListItem;
|
|
380
|
+
|
|
549
381
|
// src/components/ui/MapComponent.tsx
|
|
550
382
|
var import_react_google_maps = require("@vis.gl/react-google-maps");
|
|
551
|
-
var
|
|
383
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
552
384
|
function MapComponent({
|
|
553
385
|
apiKey,
|
|
554
386
|
mapId,
|
|
@@ -558,7 +390,7 @@ function MapComponent({
|
|
|
558
390
|
}) {
|
|
559
391
|
const defaultPosition = { lat: 40.715021, lng: -74.00459 };
|
|
560
392
|
const defaultZoom = 11;
|
|
561
|
-
return /* @__PURE__ */ (0,
|
|
393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_google_maps.APIProvider, { apiKey, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("h-screen max-w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
562
394
|
import_react_google_maps.Map,
|
|
563
395
|
{
|
|
564
396
|
defaultZoom: position ? zoom : defaultZoom,
|
|
@@ -567,24 +399,28 @@ function MapComponent({
|
|
|
567
399
|
keyboardShortcuts: false,
|
|
568
400
|
disableDefaultUI: true,
|
|
569
401
|
zoomControl: true,
|
|
570
|
-
children: position && /* @__PURE__ */ (0,
|
|
402
|
+
children: position && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_google_maps.AdvancedMarker, { position, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_google_maps.Pin, { background: "#0B5441", borderColor: "#EBFDF1", glyphColor: "#D4F500" }) })
|
|
571
403
|
}
|
|
572
404
|
) }) });
|
|
573
405
|
}
|
|
574
406
|
var MapComponent_default = MapComponent;
|
|
575
407
|
|
|
408
|
+
// src/components/ui/PlacesQueryInput.tsx
|
|
409
|
+
var import_lucide_react8 = require("lucide-react");
|
|
410
|
+
var import_react3 = require("react");
|
|
411
|
+
|
|
576
412
|
// src/components/primitives/command.tsx
|
|
577
413
|
var import_cmdk = require("cmdk");
|
|
578
|
-
var
|
|
579
|
-
var
|
|
414
|
+
var import_lucide_react7 = require("lucide-react");
|
|
415
|
+
var React3 = __toESM(require("react"), 1);
|
|
580
416
|
|
|
581
417
|
// src/components/primitives/dialog.tsx
|
|
582
418
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
419
|
+
var import_lucide_react6 = require("lucide-react");
|
|
420
|
+
var React2 = __toESM(require("react"), 1);
|
|
421
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
586
422
|
var DialogPortal = DialogPrimitive.Portal;
|
|
587
|
-
var DialogOverlay =
|
|
423
|
+
var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
588
424
|
DialogPrimitive.Overlay,
|
|
589
425
|
{
|
|
590
426
|
ref,
|
|
@@ -596,31 +432,31 @@ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
596
432
|
}
|
|
597
433
|
));
|
|
598
434
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
599
|
-
var DialogContent =
|
|
600
|
-
/* @__PURE__ */ (0,
|
|
601
|
-
/* @__PURE__ */ (0,
|
|
435
|
+
var DialogContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DialogPortal, { children: [
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogOverlay, {}),
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
602
438
|
DialogPrimitive.Content,
|
|
603
439
|
{
|
|
604
440
|
ref,
|
|
605
441
|
className: cn(
|
|
606
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]
|
|
442
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950 sm:rounded-lg",
|
|
607
443
|
className
|
|
608
444
|
),
|
|
609
445
|
...props,
|
|
610
446
|
children: [
|
|
611
447
|
children,
|
|
612
|
-
/* @__PURE__ */ (0,
|
|
613
|
-
/* @__PURE__ */ (0,
|
|
614
|
-
/* @__PURE__ */ (0,
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400", children: [
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
|
|
450
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Close" })
|
|
615
451
|
] })
|
|
616
452
|
]
|
|
617
453
|
}
|
|
618
454
|
)
|
|
619
455
|
] }));
|
|
620
456
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
621
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
457
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
622
458
|
DialogHeader.displayName = "DialogHeader";
|
|
623
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
459
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
624
460
|
"div",
|
|
625
461
|
{
|
|
626
462
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -628,7 +464,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
628
464
|
}
|
|
629
465
|
);
|
|
630
466
|
DialogFooter.displayName = "DialogFooter";
|
|
631
|
-
var DialogTitle =
|
|
467
|
+
var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
632
468
|
DialogPrimitive.Title,
|
|
633
469
|
{
|
|
634
470
|
ref,
|
|
@@ -637,7 +473,7 @@ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
637
473
|
}
|
|
638
474
|
));
|
|
639
475
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
640
|
-
var DialogDescription =
|
|
476
|
+
var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
641
477
|
DialogPrimitive.Description,
|
|
642
478
|
{
|
|
643
479
|
ref,
|
|
@@ -648,8 +484,8 @@ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
648
484
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
649
485
|
|
|
650
486
|
// src/components/primitives/command.tsx
|
|
651
|
-
var
|
|
652
|
-
var Command =
|
|
487
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
488
|
+
var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
653
489
|
import_cmdk.Command,
|
|
654
490
|
{
|
|
655
491
|
ref,
|
|
@@ -661,9 +497,9 @@ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
661
497
|
}
|
|
662
498
|
));
|
|
663
499
|
Command.displayName = import_cmdk.Command.displayName;
|
|
664
|
-
var CommandInput =
|
|
665
|
-
/* @__PURE__ */ (0,
|
|
666
|
-
/* @__PURE__ */ (0,
|
|
500
|
+
var CommandInput = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
667
503
|
import_cmdk.Command.Input,
|
|
668
504
|
{
|
|
669
505
|
ref,
|
|
@@ -676,7 +512,7 @@ var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
676
512
|
)
|
|
677
513
|
] }));
|
|
678
514
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
679
|
-
var CommandList =
|
|
515
|
+
var CommandList = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
680
516
|
import_cmdk.Command.List,
|
|
681
517
|
{
|
|
682
518
|
ref,
|
|
@@ -685,9 +521,9 @@ var CommandList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
685
521
|
}
|
|
686
522
|
));
|
|
687
523
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
688
|
-
var CommandEmpty =
|
|
524
|
+
var CommandEmpty = React3.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
689
525
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
690
|
-
var CommandGroup =
|
|
526
|
+
var CommandGroup = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
691
527
|
import_cmdk.Command.Group,
|
|
692
528
|
{
|
|
693
529
|
ref,
|
|
@@ -699,7 +535,7 @@ var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
699
535
|
}
|
|
700
536
|
));
|
|
701
537
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
702
|
-
var CommandSeparator =
|
|
538
|
+
var CommandSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
703
539
|
import_cmdk.Command.Separator,
|
|
704
540
|
{
|
|
705
541
|
ref,
|
|
@@ -708,7 +544,7 @@ var CommandSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
708
544
|
}
|
|
709
545
|
));
|
|
710
546
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
711
|
-
var CommandItem =
|
|
547
|
+
var CommandItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
712
548
|
import_cmdk.Command.Item,
|
|
713
549
|
{
|
|
714
550
|
ref,
|
|
@@ -721,7 +557,7 @@ var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
721
557
|
));
|
|
722
558
|
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
723
559
|
var CommandShortcut = ({ className, ...props }) => {
|
|
724
|
-
return /* @__PURE__ */ (0,
|
|
560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
725
561
|
"span",
|
|
726
562
|
{
|
|
727
563
|
className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
|
|
@@ -782,33 +618,37 @@ var geocode = async (address, key) => {
|
|
|
782
618
|
};
|
|
783
619
|
|
|
784
620
|
// src/components/ui/PlacesQueryInput.tsx
|
|
785
|
-
var
|
|
786
|
-
var import_react4 = require("react");
|
|
787
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
621
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
788
622
|
function PlacesQueryInput({
|
|
789
623
|
apiKey,
|
|
790
624
|
selected,
|
|
791
625
|
onSelect,
|
|
792
626
|
className
|
|
793
627
|
}) {
|
|
794
|
-
const [predictions, setPredictions] = (0,
|
|
795
|
-
const [input, setInput] = (0,
|
|
796
|
-
const [isLoadingPredictions, setIsLoadingPredictions] = (0,
|
|
797
|
-
const [shouldOpenUpward, setShouldOpenUpward] = (0,
|
|
798
|
-
const timeoutRef = (0,
|
|
799
|
-
const inputRef = (0,
|
|
800
|
-
const debouncedAutocomplete = (0,
|
|
628
|
+
const [predictions, setPredictions] = (0, import_react3.useState)(null);
|
|
629
|
+
const [input, setInput] = (0, import_react3.useState)(selected?.description ?? "");
|
|
630
|
+
const [isLoadingPredictions, setIsLoadingPredictions] = (0, import_react3.useState)(false);
|
|
631
|
+
const [shouldOpenUpward, setShouldOpenUpward] = (0, import_react3.useState)(false);
|
|
632
|
+
const timeoutRef = (0, import_react3.useRef)(null);
|
|
633
|
+
const inputRef = (0, import_react3.useRef)(null);
|
|
634
|
+
const debouncedAutocomplete = (0, import_react3.useCallback)((value) => {
|
|
801
635
|
if (timeoutRef.current) {
|
|
802
636
|
clearTimeout(timeoutRef.current);
|
|
803
637
|
}
|
|
804
638
|
timeoutRef.current = setTimeout(async () => {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
639
|
+
try {
|
|
640
|
+
if (value.length > 2) {
|
|
641
|
+
setIsLoadingPredictions(true);
|
|
642
|
+
const fetchedPredictions = await autocomplete(value, apiKey);
|
|
643
|
+
setIsLoadingPredictions(false);
|
|
644
|
+
setPredictions(fetchedPredictions ?? []);
|
|
645
|
+
} else {
|
|
646
|
+
setPredictions(null);
|
|
647
|
+
}
|
|
648
|
+
} catch (error) {
|
|
649
|
+
setIsLoadingPredictions(false);
|
|
650
|
+
setPredictions([]);
|
|
651
|
+
console.error("Autocomplete error:", error);
|
|
812
652
|
}
|
|
813
653
|
}, 300);
|
|
814
654
|
}, []);
|
|
@@ -827,7 +667,7 @@ function PlacesQueryInput({
|
|
|
827
667
|
setInput("");
|
|
828
668
|
};
|
|
829
669
|
const handleBlur = () => setTimeout(() => setPredictions(null), 200);
|
|
830
|
-
(0,
|
|
670
|
+
(0, import_react3.useEffect)(() => {
|
|
831
671
|
const checkDropdownPosition = () => {
|
|
832
672
|
if (inputRef.current) {
|
|
833
673
|
const rect = inputRef.current.getBoundingClientRect();
|
|
@@ -839,9 +679,9 @@ function PlacesQueryInput({
|
|
|
839
679
|
window.addEventListener("resize", checkDropdownPosition);
|
|
840
680
|
return () => window.removeEventListener("resize", checkDropdownPosition);
|
|
841
681
|
}, []);
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
844
|
-
/* @__PURE__ */ (0,
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("relative w-full", className), ref: inputRef, onBlur: handleBlur, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Command, { children: [
|
|
683
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative w-full", children: [
|
|
684
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
845
685
|
CommandInput,
|
|
846
686
|
{
|
|
847
687
|
placeholder: "Type an address to search...",
|
|
@@ -850,18 +690,18 @@ function PlacesQueryInput({
|
|
|
850
690
|
className: "truncate pr-8"
|
|
851
691
|
}
|
|
852
692
|
),
|
|
853
|
-
isLoadingPredictions && /* @__PURE__ */ (0,
|
|
854
|
-
input && /* @__PURE__ */ (0,
|
|
693
|
+
isLoadingPredictions && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react8.LoaderCircle, { className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100" }),
|
|
694
|
+
input && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
855
695
|
"button",
|
|
856
696
|
{
|
|
857
697
|
type: "button",
|
|
858
698
|
className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
859
699
|
onClick: handleClear,
|
|
860
|
-
children: /* @__PURE__ */ (0,
|
|
700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react8.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
861
701
|
}
|
|
862
702
|
)
|
|
863
703
|
] }),
|
|
864
|
-
predictions && /* @__PURE__ */ (0,
|
|
704
|
+
predictions && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
865
705
|
CommandList,
|
|
866
706
|
{
|
|
867
707
|
className: cn(
|
|
@@ -869,8 +709,8 @@ function PlacesQueryInput({
|
|
|
869
709
|
shouldOpenUpward ? "bottom-full" : "top-full"
|
|
870
710
|
),
|
|
871
711
|
children: [
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CommandEmpty, { children: "No results" }),
|
|
713
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CommandGroup, { children: predictions.map((prediction) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
874
714
|
CommandItem,
|
|
875
715
|
{
|
|
876
716
|
onSelect: () => handleSelect(prediction),
|
|
@@ -884,17 +724,279 @@ function PlacesQueryInput({
|
|
|
884
724
|
)
|
|
885
725
|
] }) });
|
|
886
726
|
}
|
|
887
|
-
var PlacesQueryInput_default = PlacesQueryInput;
|
|
727
|
+
var PlacesQueryInput_default = PlacesQueryInput;
|
|
728
|
+
|
|
729
|
+
// src/components/ui/Select.tsx
|
|
730
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
731
|
+
var import_lucide_react9 = require("lucide-react");
|
|
732
|
+
var import_react4 = require("react");
|
|
733
|
+
|
|
734
|
+
// src/components/primitives/separator.tsx
|
|
735
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
736
|
+
var React4 = __toESM(require("react"), 1);
|
|
737
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
738
|
+
var Separator = React4.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
739
|
+
SeparatorPrimitive.Root,
|
|
740
|
+
{
|
|
741
|
+
ref,
|
|
742
|
+
decorative,
|
|
743
|
+
orientation,
|
|
744
|
+
className: cn(
|
|
745
|
+
"shrink-0 bg-grey-10",
|
|
746
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
747
|
+
className
|
|
748
|
+
),
|
|
749
|
+
...props
|
|
750
|
+
}
|
|
751
|
+
));
|
|
752
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
753
|
+
|
|
754
|
+
// src/components/ui/Select.tsx
|
|
755
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
756
|
+
var Select = (0, import_react4.forwardRef)(
|
|
757
|
+
({ label, options, placeholder, multiselect, description, classNames, error, id, ...props }, ref) => {
|
|
758
|
+
const { value, defaultValue, dir, className, onChange, ...rest } = props;
|
|
759
|
+
const [selected, setSelected] = (0, import_react4.useState)([]);
|
|
760
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
761
|
+
const containerRef = (0, import_react4.useRef)(null);
|
|
762
|
+
(0, import_react4.useEffect)(() => {
|
|
763
|
+
if (!value) return setSelected([]);
|
|
764
|
+
setSelected(Array.isArray(value) ? value : [value]);
|
|
765
|
+
}, [value]);
|
|
766
|
+
const toggleOpen = () => setOpen((prev) => !prev);
|
|
767
|
+
const closeOnEscape = (event) => event.key === "Escape" && setOpen(false);
|
|
768
|
+
const handleOnOpenChange = (isOpen) => (!multiselect || isOpen) && setOpen(isOpen);
|
|
769
|
+
const setValueOnEnter = (event, value2) => event.key === "Enter" && handleChange(value2);
|
|
770
|
+
const getLabel = () => selected.map((o) => options?.find((option) => option.value === o)?.title).join(", ");
|
|
771
|
+
const chipLabels = selected?.map((s) => options?.find(({ value: value2 }) => value2 === s)).filter(Boolean);
|
|
772
|
+
function handleChange(newValue) {
|
|
773
|
+
if (newValue === "" && !multiselect) return;
|
|
774
|
+
let newSelected = [];
|
|
775
|
+
setSelected((prev) => {
|
|
776
|
+
newSelected = prev.includes(newValue) ? prev.filter((item) => item !== newValue) : [...prev, newValue];
|
|
777
|
+
return multiselect ? newSelected : [newValue];
|
|
778
|
+
});
|
|
779
|
+
onChange?.(multiselect ? newSelected : newValue);
|
|
780
|
+
}
|
|
781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
782
|
+
"div",
|
|
783
|
+
{
|
|
784
|
+
className: cn("flex w-full flex-col gap-1", className),
|
|
785
|
+
ref: containerRef,
|
|
786
|
+
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element`,
|
|
787
|
+
children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
789
|
+
Label_default,
|
|
790
|
+
{
|
|
791
|
+
text: label,
|
|
792
|
+
htmlFor: props.name,
|
|
793
|
+
required: props.required,
|
|
794
|
+
description,
|
|
795
|
+
className: classNames?.label
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
799
|
+
SelectPrimitive.Root,
|
|
800
|
+
{
|
|
801
|
+
open,
|
|
802
|
+
value: selected.join(","),
|
|
803
|
+
onOpenChange: handleOnOpenChange,
|
|
804
|
+
onValueChange: multiselect ? void 0 : handleChange,
|
|
805
|
+
defaultValue: typeof defaultValue === "string" ? defaultValue : void 0,
|
|
806
|
+
dir: dir === "rtl" ? "rtl" : "ltr",
|
|
807
|
+
...rest,
|
|
808
|
+
children: [
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
810
|
+
SelectPrimitive.Trigger,
|
|
811
|
+
{
|
|
812
|
+
ref,
|
|
813
|
+
className: cn(
|
|
814
|
+
"group flex h-11 w-full flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
|
|
815
|
+
classNames?.trigger
|
|
816
|
+
),
|
|
817
|
+
children: [
|
|
818
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
819
|
+
SelectPrimitive.Value,
|
|
820
|
+
{
|
|
821
|
+
placeholder: placeholder ?? "Select an option",
|
|
822
|
+
"aria-label": getLabel(),
|
|
823
|
+
children: getLabel()
|
|
824
|
+
}
|
|
825
|
+
) }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
827
|
+
import_lucide_react9.ChevronDownIcon,
|
|
828
|
+
{
|
|
829
|
+
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
830
|
+
size: "16"
|
|
831
|
+
}
|
|
832
|
+
)
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
),
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
837
|
+
SelectPrimitive.Content,
|
|
838
|
+
{
|
|
839
|
+
hideWhenDetached: true,
|
|
840
|
+
className: "z-10 max-h-[var(--radix-select-content-available-height)] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md bg-white py-2 shadow-lg",
|
|
841
|
+
position: "popper",
|
|
842
|
+
sideOffset: 4,
|
|
843
|
+
onPointerDownOutside: toggleOpen,
|
|
844
|
+
onKeyDown: closeOnEscape,
|
|
845
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(SelectPrimitive.Viewport, { children: [
|
|
846
|
+
multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
847
|
+
SelectPrimitive.Group,
|
|
848
|
+
{
|
|
849
|
+
className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
|
|
850
|
+
"data-testid": "selected-labels",
|
|
851
|
+
children: chipLabels?.map(
|
|
852
|
+
(chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: chip.title }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
855
|
+
import_lucide_react9.X,
|
|
856
|
+
{
|
|
857
|
+
size: 18,
|
|
858
|
+
"data-testid": `chip-remove-${chip.value}`,
|
|
859
|
+
className: "cursor-pointer",
|
|
860
|
+
onClick: () => handleChange(chip.value)
|
|
861
|
+
}
|
|
862
|
+
)
|
|
863
|
+
] }, chip.title)
|
|
864
|
+
)
|
|
865
|
+
}
|
|
866
|
+
),
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
|
|
868
|
+
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
869
|
+
SelectPrimitive.Item,
|
|
870
|
+
{
|
|
871
|
+
value: value2,
|
|
872
|
+
className: "group relative cursor-pointer px-4 py-2 text-left text-sm hover:bg-purple-50 focus:bg-purple-50 focus:outline-none data-[state=checked]:bg-purple-50 data-[state=checked]:pr-10 data-[state=checked]:text-purple-100",
|
|
873
|
+
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
874
|
+
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
875
|
+
onClick: () => handleChange(value2),
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectPrimitive.ItemText, { children: title }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
879
|
+
import_lucide_react9.CheckIcon,
|
|
880
|
+
{
|
|
881
|
+
className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
882
|
+
size: 16
|
|
883
|
+
}
|
|
884
|
+
)
|
|
885
|
+
]
|
|
886
|
+
},
|
|
887
|
+
id2
|
|
888
|
+
))
|
|
889
|
+
] })
|
|
890
|
+
}
|
|
891
|
+
) })
|
|
892
|
+
]
|
|
893
|
+
}
|
|
894
|
+
),
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMessage_default, { message: error })
|
|
896
|
+
]
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
);
|
|
901
|
+
Select.displayName = "Select";
|
|
902
|
+
var Select_default = Select;
|
|
903
|
+
|
|
904
|
+
// src/components/ui/Avatar.tsx
|
|
905
|
+
var import_cva3 = require("cva");
|
|
906
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
907
|
+
|
|
908
|
+
// src/components/primitives/avatar.tsx
|
|
909
|
+
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
910
|
+
var React5 = __toESM(require("react"), 1);
|
|
911
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
912
|
+
var AvatarBase = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
913
|
+
AvatarPrimitive.Root,
|
|
914
|
+
{
|
|
915
|
+
ref,
|
|
916
|
+
className: cn("relative flex shrink-0 overflow-hidden rounded-full", className),
|
|
917
|
+
...props
|
|
918
|
+
}
|
|
919
|
+
));
|
|
920
|
+
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
921
|
+
var AvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
922
|
+
AvatarPrimitive.Image,
|
|
923
|
+
{
|
|
924
|
+
ref,
|
|
925
|
+
className: cn("aspect-square h-full w-full", className),
|
|
926
|
+
"data-testid": "job-card-avatar",
|
|
927
|
+
...props
|
|
928
|
+
}
|
|
929
|
+
));
|
|
930
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
931
|
+
var AvatarFallback = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
932
|
+
AvatarPrimitive.Fallback,
|
|
933
|
+
{
|
|
934
|
+
ref,
|
|
935
|
+
className: cn(
|
|
936
|
+
"flex h-full w-full items-center justify-center rounded-full bg-pumpkin-100 py-2 text-sm font-bold capitalize leading-normal text-white md:text-lg",
|
|
937
|
+
className
|
|
938
|
+
),
|
|
939
|
+
...props
|
|
940
|
+
}
|
|
941
|
+
));
|
|
942
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
943
|
+
|
|
944
|
+
// src/components/ui/Avatar.tsx
|
|
945
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
946
|
+
function Avatar({ size, src, href, name, ...linkProps }) {
|
|
947
|
+
const fallbackShort = name?.slice(0, 2);
|
|
948
|
+
const fallbackWords = name?.split(" ").map((n) => n[0]).join("").slice(0, 2);
|
|
949
|
+
const fallback = fallbackWords && fallbackWords.length > 1 ? fallbackWords : fallbackShort;
|
|
950
|
+
const renderAvatar = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AvatarBase, { className: avatarVariants({ size }), children: [
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarImage, { src, alt: name }),
|
|
952
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { children: fallback?.toUpperCase() })
|
|
953
|
+
] });
|
|
954
|
+
if (href) {
|
|
955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_link.default, { href, ...linkProps, children: renderAvatar() });
|
|
956
|
+
}
|
|
957
|
+
return renderAvatar();
|
|
958
|
+
}
|
|
959
|
+
var avatarVariants = (0, import_cva3.cva)("ring ring-white ring-2", {
|
|
960
|
+
variants: {
|
|
961
|
+
size: {
|
|
962
|
+
large: "h-16 w-16",
|
|
963
|
+
medium: "h-10 w-10",
|
|
964
|
+
small: "h-8 w-8"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
defaultVariants: {
|
|
968
|
+
size: "medium"
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
// src/components/ui/Badge.tsx
|
|
973
|
+
var import_cva4 = require("cva");
|
|
974
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
975
|
+
var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
976
|
+
variants: {
|
|
977
|
+
variant: {
|
|
978
|
+
green: "bg-green-90 text-white",
|
|
979
|
+
pickle: "bg-pickle-100 text-black",
|
|
980
|
+
purple: "bg-purple-100 text-white"
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
defaultVariants: {
|
|
984
|
+
variant: "green"
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
function Badge({ className, variant, ...props }) {
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
989
|
+
}
|
|
888
990
|
|
|
889
991
|
// src/components/ui/Button.tsx
|
|
890
992
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
891
|
-
var
|
|
993
|
+
var import_cva5 = require("cva");
|
|
892
994
|
var import_react5 = require("react");
|
|
893
|
-
var
|
|
995
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
894
996
|
var Button = (0, import_react5.forwardRef)(
|
|
895
997
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
896
998
|
const Component = asChild ? import_react_slot.Slot : "button";
|
|
897
|
-
return /* @__PURE__ */ (0,
|
|
999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
898
1000
|
Component,
|
|
899
1001
|
{
|
|
900
1002
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -905,7 +1007,7 @@ var Button = (0, import_react5.forwardRef)(
|
|
|
905
1007
|
}
|
|
906
1008
|
);
|
|
907
1009
|
Button.displayName = "Button";
|
|
908
|
-
var buttonVariants = (0,
|
|
1010
|
+
var buttonVariants = (0, import_cva5.cva)(
|
|
909
1011
|
[
|
|
910
1012
|
"flex",
|
|
911
1013
|
"items-center",
|
|
@@ -996,17 +1098,17 @@ var buttonVariants = (0, import_cva3.cva)(
|
|
|
996
1098
|
);
|
|
997
1099
|
|
|
998
1100
|
// src/components/ui/Combobox.tsx
|
|
999
|
-
var
|
|
1101
|
+
var import_cva6 = require("cva");
|
|
1000
1102
|
var import_lucide_react10 = require("lucide-react");
|
|
1001
|
-
var
|
|
1103
|
+
var import_react6 = require("react");
|
|
1002
1104
|
|
|
1003
1105
|
// src/components/primitives/popover.tsx
|
|
1004
|
-
var React6 = __toESM(require("react"), 1);
|
|
1005
1106
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1006
|
-
var
|
|
1107
|
+
var React7 = __toESM(require("react"), 1);
|
|
1108
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1007
1109
|
var Popover = PopoverPrimitive.Root;
|
|
1008
1110
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1009
|
-
var PopoverContent =
|
|
1111
|
+
var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1010
1112
|
PopoverPrimitive.Content,
|
|
1011
1113
|
{
|
|
1012
1114
|
ref,
|
|
@@ -1021,27 +1123,8 @@ var PopoverContent = React6.forwardRef(({ className, align = "center", sideOffse
|
|
|
1021
1123
|
) }));
|
|
1022
1124
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1023
1125
|
|
|
1024
|
-
// src/components/ui/Badge.tsx
|
|
1025
|
-
var import_cva4 = require("cva");
|
|
1026
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1027
|
-
var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
1028
|
-
variants: {
|
|
1029
|
-
variant: {
|
|
1030
|
-
green: "bg-green-90 text-white",
|
|
1031
|
-
pickle: "bg-pickle-100 text-black",
|
|
1032
|
-
purple: "bg-purple-100 text-white"
|
|
1033
|
-
}
|
|
1034
|
-
},
|
|
1035
|
-
defaultVariants: {
|
|
1036
|
-
variant: "green"
|
|
1037
|
-
}
|
|
1038
|
-
});
|
|
1039
|
-
function Badge({ className, variant, ...props }) {
|
|
1040
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
1126
|
// src/components/ui/Combobox.tsx
|
|
1044
|
-
var
|
|
1127
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1045
1128
|
var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
1046
1129
|
const {
|
|
1047
1130
|
id,
|
|
@@ -1092,14 +1175,18 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1092
1175
|
};
|
|
1093
1176
|
const handleClear = () => {
|
|
1094
1177
|
setSelected([]);
|
|
1095
|
-
|
|
1178
|
+
if (multiselect) {
|
|
1179
|
+
handleChange?.([]);
|
|
1180
|
+
} else {
|
|
1181
|
+
handleChange?.("");
|
|
1182
|
+
}
|
|
1096
1183
|
};
|
|
1097
1184
|
const handleDisplayValue = () => {
|
|
1098
1185
|
const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
|
|
1099
1186
|
return isDefault ? defaultLabel : label;
|
|
1100
1187
|
};
|
|
1101
|
-
return /* @__PURE__ */ (0,
|
|
1102
|
-
isDefault && /* @__PURE__ */ (0,
|
|
1188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
1189
|
+
isDefault && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1103
1190
|
Label_default,
|
|
1104
1191
|
{
|
|
1105
1192
|
text: label,
|
|
@@ -1109,15 +1196,15 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1109
1196
|
className: classNames?.label
|
|
1110
1197
|
}
|
|
1111
1198
|
),
|
|
1112
|
-
/* @__PURE__ */ (0,
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1114
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative flex", children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1115
1202
|
PopoverTrigger,
|
|
1116
1203
|
{
|
|
1117
1204
|
asChild: true,
|
|
1118
1205
|
disabled: options.length === 0,
|
|
1119
1206
|
"data-testid": `${id ?? name}-combobox-trigger`,
|
|
1120
|
-
children: /* @__PURE__ */ (0,
|
|
1207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1121
1208
|
"div",
|
|
1122
1209
|
{
|
|
1123
1210
|
ref,
|
|
@@ -1128,9 +1215,9 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1128
1215
|
),
|
|
1129
1216
|
"aria-expanded": open,
|
|
1130
1217
|
children: [
|
|
1131
|
-
isDefault && IconComponent && /* @__PURE__ */ (0,
|
|
1132
|
-
isChip && !isEmpty && /* @__PURE__ */ (0,
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1218
|
+
isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1219
|
+
isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { variant: "purple", children: selected.length }),
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1134
1221
|
"span",
|
|
1135
1222
|
{
|
|
1136
1223
|
className: cn(
|
|
@@ -1140,7 +1227,7 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1140
1227
|
children: handleDisplayValue()
|
|
1141
1228
|
}
|
|
1142
1229
|
),
|
|
1143
|
-
showChevron && /* @__PURE__ */ (0,
|
|
1230
|
+
showChevron && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1144
1231
|
import_lucide_react10.ChevronDownIcon,
|
|
1145
1232
|
{
|
|
1146
1233
|
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
@@ -1152,7 +1239,7 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1152
1239
|
)
|
|
1153
1240
|
}
|
|
1154
1241
|
),
|
|
1155
|
-
/* @__PURE__ */ (0,
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1156
1243
|
PopoverContent,
|
|
1157
1244
|
{
|
|
1158
1245
|
className: cn(
|
|
@@ -1163,16 +1250,16 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1163
1250
|
collisionPadding: 8,
|
|
1164
1251
|
sideOffset: 4,
|
|
1165
1252
|
align: "start",
|
|
1166
|
-
children: /* @__PURE__ */ (0,
|
|
1167
|
-
!hideSearchBox && /* @__PURE__ */ (0,
|
|
1168
|
-
/* @__PURE__ */ (0,
|
|
1169
|
-
/* @__PURE__ */ (0,
|
|
1170
|
-
/* @__PURE__ */ (0,
|
|
1253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Command, { children: [
|
|
1254
|
+
!hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandInput, { placeholder: "Search..." }),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandList, { children: [
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandEmpty, { children: "No results" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1171
1258
|
CommandItem,
|
|
1172
1259
|
{
|
|
1173
1260
|
value: option.title,
|
|
1174
1261
|
onSelect: () => handleSelect(option.value),
|
|
1175
|
-
children: /* @__PURE__ */ (0,
|
|
1262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1176
1263
|
ListItem_default,
|
|
1177
1264
|
{
|
|
1178
1265
|
className: cn(classNames?.items, "truncate py-1"),
|
|
@@ -1185,26 +1272,26 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1185
1272
|
id2
|
|
1186
1273
|
)) })
|
|
1187
1274
|
] }),
|
|
1188
|
-
!!footer && /* @__PURE__ */ (0,
|
|
1275
|
+
!!footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Separator, {}),
|
|
1189
1276
|
footer && footer({ close })
|
|
1190
1277
|
] })
|
|
1191
1278
|
}
|
|
1192
1279
|
)
|
|
1193
1280
|
] }),
|
|
1194
|
-
isDefault && !isEmpty && /* @__PURE__ */ (0,
|
|
1281
|
+
isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1195
1282
|
"button",
|
|
1196
1283
|
{
|
|
1197
1284
|
type: "button",
|
|
1198
1285
|
className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1199
1286
|
onClick: handleClear,
|
|
1200
|
-
children: /* @__PURE__ */ (0,
|
|
1287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
1201
1288
|
}
|
|
1202
1289
|
)
|
|
1203
1290
|
] })
|
|
1204
1291
|
] });
|
|
1205
1292
|
});
|
|
1206
1293
|
Combobox.displayName = "Combobox";
|
|
1207
|
-
var triggerVariants = (0,
|
|
1294
|
+
var triggerVariants = (0, import_cva6.cva)(
|
|
1208
1295
|
"group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",
|
|
1209
1296
|
{
|
|
1210
1297
|
variants: {
|
|
@@ -1231,10 +1318,10 @@ var triggerVariants = (0, import_cva5.cva)(
|
|
|
1231
1318
|
);
|
|
1232
1319
|
|
|
1233
1320
|
// src/components/ui/Counter.tsx
|
|
1234
|
-
var
|
|
1321
|
+
var import_cva7 = require("cva");
|
|
1235
1322
|
var import_lucide_react11 = require("lucide-react");
|
|
1236
1323
|
var import_react7 = require("react");
|
|
1237
|
-
var
|
|
1324
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1238
1325
|
var Counter = (0, import_react7.forwardRef)(
|
|
1239
1326
|
({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
|
|
1240
1327
|
const [count, setCount] = (0, import_react7.useState)(0);
|
|
@@ -1269,13 +1356,13 @@ var Counter = (0, import_react7.forwardRef)(
|
|
|
1269
1356
|
onChange?.(newValue);
|
|
1270
1357
|
setCount(newValue);
|
|
1271
1358
|
};
|
|
1272
|
-
return /* @__PURE__ */ (0,
|
|
1359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1273
1360
|
"div",
|
|
1274
1361
|
{
|
|
1275
1362
|
className: cn("flex w-auto flex-col gap-1", classNames?.root),
|
|
1276
1363
|
"data-testid": `counter-wrapper-${props.id}`,
|
|
1277
1364
|
children: [
|
|
1278
|
-
label && /* @__PURE__ */ (0,
|
|
1365
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1279
1366
|
Label_default,
|
|
1280
1367
|
{
|
|
1281
1368
|
text: label,
|
|
@@ -1285,255 +1372,104 @@ var Counter = (0, import_react7.forwardRef)(
|
|
|
1285
1372
|
className: classNames?.label
|
|
1286
1373
|
}
|
|
1287
1374
|
),
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative flex w-[122px] flex-row items-center", children: [
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1290
1377
|
"button",
|
|
1291
1378
|
{
|
|
1292
1379
|
type: "button",
|
|
1293
1380
|
className: "absolute inset-y-0 left-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1294
1381
|
onClick: decrement,
|
|
1295
|
-
children: /* @__PURE__ */ (0,
|
|
1382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Minus, { className: "h-4 w-4 text-green-100" })
|
|
1296
1383
|
}
|
|
1297
1384
|
),
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1299
1386
|
"input",
|
|
1300
1387
|
{
|
|
1301
1388
|
className: cn(counterVariants({ theme }), classNames?.input),
|
|
1302
1389
|
ref,
|
|
1303
1390
|
value: count,
|
|
1304
1391
|
onChange: handleChange,
|
|
1305
|
-
"data-testid": `counter-element-${props.id}`,
|
|
1306
|
-
...props
|
|
1307
|
-
}
|
|
1308
|
-
),
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1310
|
-
"button",
|
|
1311
|
-
{
|
|
1312
|
-
type: "button",
|
|
1313
|
-
className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1314
|
-
onClick: increment,
|
|
1315
|
-
children: /* @__PURE__ */ (0,
|
|
1316
|
-
}
|
|
1317
|
-
)
|
|
1318
|
-
] }),
|
|
1319
|
-
/* @__PURE__ */ (0,
|
|
1320
|
-
]
|
|
1321
|
-
}
|
|
1322
|
-
);
|
|
1323
|
-
}
|
|
1324
|
-
);
|
|
1325
|
-
Counter.displayName = "Counter";
|
|
1326
|
-
var counterVariants = (0, import_cva6.cva)(
|
|
1327
|
-
[
|
|
1328
|
-
"border-input",
|
|
1329
|
-
"placeholder:text-muted-foreground",
|
|
1330
|
-
"focus-visible:ring-ring",
|
|
1331
|
-
"inline-flex",
|
|
1332
|
-
"w-[122px]",
|
|
1333
|
-
"h-11",
|
|
1334
|
-
"items-center",
|
|
1335
|
-
"justify-start",
|
|
1336
|
-
"gap-3",
|
|
1337
|
-
"rounded-lg",
|
|
1338
|
-
"bg-transparent",
|
|
1339
|
-
"px-3",
|
|
1340
|
-
"pt-0.5",
|
|
1341
|
-
"text-sm",
|
|
1342
|
-
"text-center",
|
|
1343
|
-
"shadow-sm",
|
|
1344
|
-
"ring-grey-50",
|
|
1345
|
-
"transition-colors",
|
|
1346
|
-
"focus-visible:outline-none",
|
|
1347
|
-
"focus-visible:ring-1",
|
|
1348
|
-
"disabled:cursor-not-allowed",
|
|
1349
|
-
"disabled:opacity-50",
|
|
1350
|
-
"appearance-none",
|
|
1351
|
-
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
1352
|
-
"[&::-webkit-search-decoration]:appearance-none",
|
|
1353
|
-
"[&::-webkit-search-results-button]:appearance-none",
|
|
1354
|
-
"[&::-webkit-search-results-decoration]:appearance-none",
|
|
1355
|
-
"[&::-ms-clear]:display-none",
|
|
1356
|
-
"[&::-ms-reveal]:display-none"
|
|
1357
|
-
],
|
|
1358
|
-
{
|
|
1359
|
-
variants: {
|
|
1360
|
-
theme: {
|
|
1361
|
-
light: "text-grey-80 border",
|
|
1362
|
-
dark: "text-white"
|
|
1363
|
-
},
|
|
1364
|
-
hasIcon: {
|
|
1365
|
-
false: "pl-3",
|
|
1366
|
-
true: "pl-8"
|
|
1367
|
-
}
|
|
1368
|
-
},
|
|
1369
|
-
defaultVariants: {
|
|
1370
|
-
theme: "light",
|
|
1371
|
-
hasIcon: false
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
);
|
|
1375
|
-
|
|
1376
|
-
// src/components/ui/InputOtp.tsx
|
|
1377
|
-
var import_react8 = require("react");
|
|
1378
|
-
|
|
1379
|
-
// src/components/primitives/input-otp.tsx
|
|
1380
|
-
var React7 = __toESM(require("react"), 1);
|
|
1381
|
-
var import_input_otp = require("input-otp");
|
|
1382
|
-
var import_lucide_react12 = require("lucide-react");
|
|
1383
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1384
|
-
var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1385
|
-
import_input_otp.OTPInput,
|
|
1386
|
-
{
|
|
1387
|
-
ref,
|
|
1388
|
-
containerClassName: cn(
|
|
1389
|
-
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
1390
|
-
containerClassName
|
|
1391
|
-
),
|
|
1392
|
-
className: cn("disabled:cursor-not-allowed", className),
|
|
1393
|
-
...props
|
|
1394
|
-
}
|
|
1395
|
-
));
|
|
1396
|
-
InputOTP.displayName = "InputOTP";
|
|
1397
|
-
var InputOTPGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1398
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1399
|
-
var InputOTPSlot = React7.forwardRef(({ index, error, className, ...props }, ref) => {
|
|
1400
|
-
const inputOTPContext = React7.useContext(import_input_otp.OTPInputContext);
|
|
1401
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1403
|
-
"div",
|
|
1404
|
-
{
|
|
1405
|
-
ref,
|
|
1406
|
-
className: cn(
|
|
1407
|
-
"relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800",
|
|
1408
|
-
isActive && "z-10 ring-2 ring-purple-100 ring-offset-white dark:ring-purple-20 dark:ring-offset-purple-100",
|
|
1409
|
-
error && "border-red-500 dark:border-red-400",
|
|
1410
|
-
className
|
|
1411
|
-
),
|
|
1412
|
-
...props,
|
|
1413
|
-
children: [
|
|
1414
|
-
char,
|
|
1415
|
-
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50" }) })
|
|
1416
|
-
]
|
|
1417
|
-
}
|
|
1418
|
-
);
|
|
1419
|
-
});
|
|
1420
|
-
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1421
|
-
var InputOTPSeparator = React7.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react12.Dot, {}) }));
|
|
1422
|
-
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1423
|
-
|
|
1424
|
-
// src/components/ui/InputOtp.tsx
|
|
1425
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1426
|
-
var InputOtp = (0, import_react8.forwardRef)(
|
|
1427
|
-
({ digits, label, description, error, ...props }, ref) => {
|
|
1428
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1429
|
-
"div",
|
|
1430
|
-
{
|
|
1431
|
-
className: "group flex w-full flex-col gap-1",
|
|
1432
|
-
"data-testid": `input-otp-wrapper-${props.id}`,
|
|
1433
|
-
children: [
|
|
1434
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1435
|
-
Label_default,
|
|
1436
|
-
{
|
|
1437
|
-
text: label,
|
|
1438
|
-
htmlFor: props.name,
|
|
1439
|
-
required: props.required,
|
|
1440
|
-
description
|
|
1441
|
-
}
|
|
1442
|
-
),
|
|
1443
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative flex flex-row items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1444
|
-
InputOTP,
|
|
1445
|
-
{
|
|
1446
|
-
ref,
|
|
1447
|
-
maxLength: digits,
|
|
1448
|
-
"data-testid": `input-otp-element-${props.id}`,
|
|
1449
|
-
...props,
|
|
1450
|
-
children: [...Array(digits)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InputOTPGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InputOTPSlot, { index, error: Boolean(error) }) }, index))
|
|
1451
|
-
}
|
|
1452
|
-
) }),
|
|
1453
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorMessage_default, { message: error })
|
|
1454
|
-
]
|
|
1455
|
-
}
|
|
1456
|
-
);
|
|
1457
|
-
}
|
|
1458
|
-
);
|
|
1459
|
-
InputOtp.displayName = "Input";
|
|
1460
|
-
|
|
1461
|
-
// src/components/primitives/avatar.tsx
|
|
1462
|
-
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
1463
|
-
var React8 = __toESM(require("react"), 1);
|
|
1464
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1465
|
-
var AvatarBase = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1466
|
-
AvatarPrimitive.Root,
|
|
1467
|
-
{
|
|
1468
|
-
ref,
|
|
1469
|
-
className: cn("relative flex shrink-0 overflow-hidden rounded-full", className),
|
|
1470
|
-
...props
|
|
1471
|
-
}
|
|
1472
|
-
));
|
|
1473
|
-
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
1474
|
-
var AvatarImage = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1475
|
-
AvatarPrimitive.Image,
|
|
1476
|
-
{
|
|
1477
|
-
ref,
|
|
1478
|
-
className: cn("aspect-square h-full w-full", className),
|
|
1479
|
-
"data-testid": "job-card-avatar",
|
|
1480
|
-
...props
|
|
1392
|
+
"data-testid": `counter-element-${props.id}`,
|
|
1393
|
+
...props
|
|
1394
|
+
}
|
|
1395
|
+
),
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1397
|
+
"button",
|
|
1398
|
+
{
|
|
1399
|
+
type: "button",
|
|
1400
|
+
className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1401
|
+
onClick: increment,
|
|
1402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Plus, { className: "h-4 w-4 text-green-100" })
|
|
1403
|
+
}
|
|
1404
|
+
)
|
|
1405
|
+
] }),
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorMessage_default, { message: error })
|
|
1407
|
+
]
|
|
1408
|
+
}
|
|
1409
|
+
);
|
|
1481
1410
|
}
|
|
1482
|
-
)
|
|
1483
|
-
|
|
1484
|
-
var
|
|
1485
|
-
|
|
1411
|
+
);
|
|
1412
|
+
Counter.displayName = "Counter";
|
|
1413
|
+
var counterVariants = (0, import_cva7.cva)(
|
|
1414
|
+
[
|
|
1415
|
+
"border-input",
|
|
1416
|
+
"placeholder:text-muted-foreground",
|
|
1417
|
+
"focus-visible:ring-ring",
|
|
1418
|
+
"inline-flex",
|
|
1419
|
+
"w-[122px]",
|
|
1420
|
+
"h-11",
|
|
1421
|
+
"items-center",
|
|
1422
|
+
"justify-start",
|
|
1423
|
+
"gap-3",
|
|
1424
|
+
"rounded-lg",
|
|
1425
|
+
"bg-transparent",
|
|
1426
|
+
"px-3",
|
|
1427
|
+
"pt-0.5",
|
|
1428
|
+
"text-sm",
|
|
1429
|
+
"text-center",
|
|
1430
|
+
"shadow-sm",
|
|
1431
|
+
"ring-grey-50",
|
|
1432
|
+
"transition-colors",
|
|
1433
|
+
"focus-visible:outline-none",
|
|
1434
|
+
"focus-visible:ring-1",
|
|
1435
|
+
"disabled:cursor-not-allowed",
|
|
1436
|
+
"disabled:opacity-50",
|
|
1437
|
+
"appearance-none",
|
|
1438
|
+
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
1439
|
+
"[&::-webkit-search-decoration]:appearance-none",
|
|
1440
|
+
"[&::-webkit-search-results-button]:appearance-none",
|
|
1441
|
+
"[&::-webkit-search-results-decoration]:appearance-none",
|
|
1442
|
+
"[&::-ms-clear]:display-none",
|
|
1443
|
+
"[&::-ms-reveal]:display-none"
|
|
1444
|
+
],
|
|
1486
1445
|
{
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1501
|
-
function Avatar({ size, src, href, name, ...linkProps }) {
|
|
1502
|
-
const fallbackShort = name?.slice(0, 2);
|
|
1503
|
-
const fallbackWords = name?.split(" ").map((n) => n[0]).join("").slice(0, 2);
|
|
1504
|
-
const fallback = fallbackWords && fallbackWords.length > 1 ? fallbackWords : fallbackShort;
|
|
1505
|
-
const renderAvatar = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(AvatarBase, { className: avatarVariants({ size }), children: [
|
|
1506
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AvatarImage, { src, alt: name }),
|
|
1507
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AvatarFallback, { children: fallback?.toUpperCase() })
|
|
1508
|
-
] });
|
|
1509
|
-
if (href) {
|
|
1510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_link.default, { href, ...linkProps, children: renderAvatar() });
|
|
1511
|
-
}
|
|
1512
|
-
return renderAvatar();
|
|
1513
|
-
}
|
|
1514
|
-
var avatarVariants = (0, import_cva7.cva)("ring ring-white ring-2", {
|
|
1515
|
-
variants: {
|
|
1516
|
-
size: {
|
|
1517
|
-
large: "h-16 w-16",
|
|
1518
|
-
medium: "h-10 w-10",
|
|
1519
|
-
small: "h-8 w-8"
|
|
1446
|
+
variants: {
|
|
1447
|
+
theme: {
|
|
1448
|
+
light: "text-grey-80 border",
|
|
1449
|
+
dark: "text-white"
|
|
1450
|
+
},
|
|
1451
|
+
hasIcon: {
|
|
1452
|
+
false: "pl-3",
|
|
1453
|
+
true: "pl-8"
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
defaultVariants: {
|
|
1457
|
+
theme: "light",
|
|
1458
|
+
hasIcon: false
|
|
1520
1459
|
}
|
|
1521
|
-
},
|
|
1522
|
-
defaultVariants: {
|
|
1523
|
-
size: "medium"
|
|
1524
1460
|
}
|
|
1525
|
-
|
|
1461
|
+
);
|
|
1526
1462
|
|
|
1527
1463
|
// src/components/ui/Icon.tsx
|
|
1528
1464
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1529
1465
|
var import_cva8 = require("cva");
|
|
1530
|
-
var
|
|
1466
|
+
var import_react8 = require("react");
|
|
1531
1467
|
var import_tailwind_merge3 = require("tailwind-merge");
|
|
1532
|
-
var
|
|
1533
|
-
var Icon = (0,
|
|
1468
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1469
|
+
var Icon = (0, import_react8.forwardRef)(
|
|
1534
1470
|
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
1535
1471
|
const Component = readonly ? import_react_slot2.Slot : "button";
|
|
1536
|
-
return /* @__PURE__ */ (0,
|
|
1472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1537
1473
|
Component,
|
|
1538
1474
|
{
|
|
1539
1475
|
className: cn(
|
|
@@ -1601,6 +1537,91 @@ var iconVariants = (0, import_cva8.cva)(
|
|
|
1601
1537
|
}
|
|
1602
1538
|
);
|
|
1603
1539
|
|
|
1540
|
+
// src/components/ui/InputOtp.tsx
|
|
1541
|
+
var import_react9 = require("react");
|
|
1542
|
+
|
|
1543
|
+
// src/components/primitives/input-otp.tsx
|
|
1544
|
+
var import_input_otp = require("input-otp");
|
|
1545
|
+
var import_lucide_react12 = require("lucide-react");
|
|
1546
|
+
var React8 = __toESM(require("react"), 1);
|
|
1547
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1548
|
+
var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1549
|
+
import_input_otp.OTPInput,
|
|
1550
|
+
{
|
|
1551
|
+
ref,
|
|
1552
|
+
containerClassName: cn(
|
|
1553
|
+
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
1554
|
+
containerClassName
|
|
1555
|
+
),
|
|
1556
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
1557
|
+
...props
|
|
1558
|
+
}
|
|
1559
|
+
));
|
|
1560
|
+
InputOTP.displayName = "InputOTP";
|
|
1561
|
+
var InputOTPGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1562
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1563
|
+
var InputOTPSlot = React8.forwardRef(({ index, error, className, ...props }, ref) => {
|
|
1564
|
+
const inputOTPContext = React8.useContext(import_input_otp.OTPInputContext);
|
|
1565
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1567
|
+
"div",
|
|
1568
|
+
{
|
|
1569
|
+
ref,
|
|
1570
|
+
className: cn(
|
|
1571
|
+
"relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800",
|
|
1572
|
+
isActive && "z-10 ring-2 ring-purple-100 ring-offset-white dark:ring-purple-20 dark:ring-offset-purple-100",
|
|
1573
|
+
error && "border-red-500 dark:border-red-400",
|
|
1574
|
+
className
|
|
1575
|
+
),
|
|
1576
|
+
...props,
|
|
1577
|
+
children: [
|
|
1578
|
+
char,
|
|
1579
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50" }) })
|
|
1580
|
+
]
|
|
1581
|
+
}
|
|
1582
|
+
);
|
|
1583
|
+
});
|
|
1584
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1585
|
+
var InputOTPSeparator = React8.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Dot, {}) }));
|
|
1586
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1587
|
+
|
|
1588
|
+
// src/components/ui/InputOtp.tsx
|
|
1589
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1590
|
+
var InputOtp = (0, import_react9.forwardRef)(
|
|
1591
|
+
({ digits, label, description, error, ...props }, ref) => {
|
|
1592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1593
|
+
"div",
|
|
1594
|
+
{
|
|
1595
|
+
className: "group flex w-full flex-col gap-1",
|
|
1596
|
+
"data-testid": `input-otp-wrapper-${props.id}`,
|
|
1597
|
+
children: [
|
|
1598
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1599
|
+
Label_default,
|
|
1600
|
+
{
|
|
1601
|
+
text: label,
|
|
1602
|
+
htmlFor: props.name,
|
|
1603
|
+
required: props.required,
|
|
1604
|
+
description
|
|
1605
|
+
}
|
|
1606
|
+
),
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "relative flex flex-row items-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1608
|
+
InputOTP,
|
|
1609
|
+
{
|
|
1610
|
+
ref,
|
|
1611
|
+
maxLength: digits,
|
|
1612
|
+
"data-testid": `input-otp-element-${props.id}`,
|
|
1613
|
+
...props,
|
|
1614
|
+
children: [...Array(digits)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InputOTPGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InputOTPSlot, { index, error: Boolean(error) }) }, index))
|
|
1615
|
+
}
|
|
1616
|
+
) }),
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ErrorMessage_default, { message: error })
|
|
1618
|
+
]
|
|
1619
|
+
}
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1622
|
+
);
|
|
1623
|
+
InputOtp.displayName = "Input";
|
|
1624
|
+
|
|
1604
1625
|
// src/components/ui/LinkButton.tsx
|
|
1605
1626
|
var import_link2 = __toESM(require("next/link"), 1);
|
|
1606
1627
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
@@ -1670,18 +1691,204 @@ function ReadMore({ text, ...props }) {
|
|
|
1670
1691
|
] });
|
|
1671
1692
|
}
|
|
1672
1693
|
|
|
1694
|
+
// src/components/ui/DatePicker.tsx
|
|
1695
|
+
var import_cva9 = require("cva");
|
|
1696
|
+
var import_react11 = require("react");
|
|
1697
|
+
var import_date_fns = require("date-fns");
|
|
1698
|
+
|
|
1699
|
+
// src/components/ui/calendar.tsx
|
|
1700
|
+
var import_lucide_react13 = require("lucide-react");
|
|
1701
|
+
var import_react_day_picker = require("react-day-picker");
|
|
1702
|
+
|
|
1703
|
+
// src/components/ui/buttonShadcn.tsx
|
|
1704
|
+
var React9 = __toESM(require("react"), 1);
|
|
1705
|
+
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1706
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
1707
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1708
|
+
var buttonVariants2 = (0, import_class_variance_authority.cva)(
|
|
1709
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus-visible:ring-neutral-300",
|
|
1710
|
+
{
|
|
1711
|
+
variants: {
|
|
1712
|
+
variant: {
|
|
1713
|
+
default: "bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
|
|
1714
|
+
destructive: "bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",
|
|
1715
|
+
outline: "border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
1716
|
+
secondary: "bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
|
1717
|
+
ghost: "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
1718
|
+
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"
|
|
1719
|
+
},
|
|
1720
|
+
size: {
|
|
1721
|
+
default: "h-9 px-4 py-2",
|
|
1722
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
1723
|
+
lg: "h-10 rounded-md px-8",
|
|
1724
|
+
icon: "h-9 w-9"
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
defaultVariants: {
|
|
1728
|
+
variant: "default",
|
|
1729
|
+
size: "default"
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
);
|
|
1733
|
+
var Button2 = React9.forwardRef(
|
|
1734
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
1735
|
+
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
1736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1737
|
+
Comp,
|
|
1738
|
+
{
|
|
1739
|
+
className: cn(buttonVariants2({ variant, size, className })),
|
|
1740
|
+
ref,
|
|
1741
|
+
...props
|
|
1742
|
+
}
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
);
|
|
1746
|
+
Button2.displayName = "Button";
|
|
1747
|
+
|
|
1748
|
+
// src/components/ui/calendar.tsx
|
|
1749
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1750
|
+
function Calendar({
|
|
1751
|
+
className,
|
|
1752
|
+
classNames,
|
|
1753
|
+
showOutsideDays = true,
|
|
1754
|
+
...props
|
|
1755
|
+
}) {
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1757
|
+
import_react_day_picker.DayPicker,
|
|
1758
|
+
{
|
|
1759
|
+
showOutsideDays,
|
|
1760
|
+
className: cn("p-3", className),
|
|
1761
|
+
classNames: {
|
|
1762
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
1763
|
+
month: "space-y-4",
|
|
1764
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
1765
|
+
caption_label: "text-sm font-medium",
|
|
1766
|
+
nav: "space-x-1 flex items-center",
|
|
1767
|
+
nav_button: cn(
|
|
1768
|
+
buttonVariants2({ variant: "outline" }),
|
|
1769
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
1770
|
+
),
|
|
1771
|
+
nav_button_previous: "absolute left-1",
|
|
1772
|
+
nav_button_next: "absolute right-1",
|
|
1773
|
+
table: "w-full border-collapse space-y-1",
|
|
1774
|
+
head_row: "flex",
|
|
1775
|
+
head_cell: "text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400",
|
|
1776
|
+
row: "flex w-full mt-2",
|
|
1777
|
+
cell: cn(
|
|
1778
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-outside)]:bg-neutral-100/50 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800 dark:[&:has([aria-selected].day-outside)]:bg-neutral-800/50",
|
|
1779
|
+
props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
|
|
1780
|
+
),
|
|
1781
|
+
day: cn(
|
|
1782
|
+
buttonVariants2({ variant: "ghost" }),
|
|
1783
|
+
"h-8 w-8 p-0 font-normal aria-selected:opacity-100"
|
|
1784
|
+
),
|
|
1785
|
+
day_range_start: "day-range-start",
|
|
1786
|
+
day_range_end: "day-range-end",
|
|
1787
|
+
day_selected: "bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900",
|
|
1788
|
+
day_today: "bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50",
|
|
1789
|
+
day_outside: "day-outside text-neutral-500 aria-selected:bg-neutral-100/50 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:bg-neutral-800/50 dark:aria-selected:text-neutral-400",
|
|
1790
|
+
day_disabled: "text-neutral-500 opacity-50 dark:text-neutral-400",
|
|
1791
|
+
day_range_middle: "aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50",
|
|
1792
|
+
day_hidden: "invisible",
|
|
1793
|
+
...classNames
|
|
1794
|
+
},
|
|
1795
|
+
components: {
|
|
1796
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react13.ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
1797
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react13.ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
1798
|
+
},
|
|
1799
|
+
...props
|
|
1800
|
+
}
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
Calendar.displayName = "Calendar";
|
|
1804
|
+
|
|
1805
|
+
// src/components/ui/DatePicker.tsx
|
|
1806
|
+
var import_lucide_react14 = require("lucide-react");
|
|
1807
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1808
|
+
var DatePicker = (0, import_react11.forwardRef)(({ label, description, required, classNames, value, onChange, error }, ref) => {
|
|
1809
|
+
const [date, setDate] = (0, import_react11.useState)(null);
|
|
1810
|
+
(0, import_react11.useEffect)(() => {
|
|
1811
|
+
setDate(value ?? null);
|
|
1812
|
+
}, [value]);
|
|
1813
|
+
const handleDateSelect = (dateSelected) => {
|
|
1814
|
+
if (!dateSelected) return;
|
|
1815
|
+
onChange?.(dateSelected);
|
|
1816
|
+
setDate(dateSelected);
|
|
1817
|
+
};
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-auto flex-col gap-1"), children: [
|
|
1819
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1820
|
+
Label_default,
|
|
1821
|
+
{
|
|
1822
|
+
text: label,
|
|
1823
|
+
required,
|
|
1824
|
+
description,
|
|
1825
|
+
className: classNames?.label
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Popover, { children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn(datePickerStyle()), children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react14.Calendar, { size: 16 }),
|
|
1831
|
+
date ? (0, import_date_fns.format)(date, "MM/dd/yyyy") : "Select a date"
|
|
1832
|
+
] }) }),
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverContent, { ref, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1834
|
+
Calendar,
|
|
1835
|
+
{
|
|
1836
|
+
mode: "single",
|
|
1837
|
+
selected: date || void 0,
|
|
1838
|
+
onSelect: handleDateSelect,
|
|
1839
|
+
captionLayout: "dropdown",
|
|
1840
|
+
showOutsideDays: true
|
|
1841
|
+
}
|
|
1842
|
+
) })
|
|
1843
|
+
] }),
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorMessage_default, { message: error })
|
|
1845
|
+
] });
|
|
1846
|
+
});
|
|
1847
|
+
var datePickerStyle = (0, import_cva9.cva)(
|
|
1848
|
+
[
|
|
1849
|
+
"placeholder:text-muted-foreground",
|
|
1850
|
+
"focus-visible:ring-ring",
|
|
1851
|
+
"inline-flex",
|
|
1852
|
+
"w-full",
|
|
1853
|
+
"h-11",
|
|
1854
|
+
"items-center",
|
|
1855
|
+
"justify-start",
|
|
1856
|
+
"gap-3",
|
|
1857
|
+
"rounded-lg",
|
|
1858
|
+
"bg-transparent",
|
|
1859
|
+
"px-3",
|
|
1860
|
+
"pt-0.5",
|
|
1861
|
+
"text-sm",
|
|
1862
|
+
"shadow-sm",
|
|
1863
|
+
"ring-grey-50",
|
|
1864
|
+
"transition-colors",
|
|
1865
|
+
"focus-visible:outline-none",
|
|
1866
|
+
"focus-visible:ring-1",
|
|
1867
|
+
"disabled:cursor-not-allowed",
|
|
1868
|
+
"disabled:opacity-50",
|
|
1869
|
+
"appearance-none",
|
|
1870
|
+
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
1871
|
+
"[&::-webkit-search-decoration]:appearance-none",
|
|
1872
|
+
"[&::-webkit-search-results-button]:appearance-none",
|
|
1873
|
+
"[&::-webkit-search-results-decoration]:appearance-none",
|
|
1874
|
+
"[&::-ms-clear]:display-none",
|
|
1875
|
+
"[&::-ms-reveal]:display-none",
|
|
1876
|
+
"text-grey-80 border"
|
|
1877
|
+
]
|
|
1878
|
+
);
|
|
1879
|
+
|
|
1673
1880
|
// src/components/company/CompanyBenefits.tsx
|
|
1674
|
-
var
|
|
1881
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1675
1882
|
function CompanyBenefits({ benefits }) {
|
|
1676
1883
|
if (!benefits) return null;
|
|
1677
|
-
return /* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-2", "data-testid": "company-benefits", children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg", children: "Company benefits" }),
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
|
|
1680
1887
|
] });
|
|
1681
1888
|
}
|
|
1682
1889
|
|
|
1683
1890
|
// src/components/company/CompanyInformation.tsx
|
|
1684
|
-
var
|
|
1891
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1685
1892
|
function CompanyInformation({
|
|
1686
1893
|
name,
|
|
1687
1894
|
how,
|
|
@@ -1689,8 +1896,8 @@ function CompanyInformation({
|
|
|
1689
1896
|
wow,
|
|
1690
1897
|
website
|
|
1691
1898
|
}) {
|
|
1692
|
-
return /* @__PURE__ */ (0,
|
|
1693
|
-
/* @__PURE__ */ (0,
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1694
1901
|
"h2",
|
|
1695
1902
|
{
|
|
1696
1903
|
"data-testid": "company-name",
|
|
@@ -1701,22 +1908,22 @@ function CompanyInformation({
|
|
|
1701
1908
|
]
|
|
1702
1909
|
}
|
|
1703
1910
|
),
|
|
1704
|
-
how && /* @__PURE__ */ (0,
|
|
1705
|
-
mission && /* @__PURE__ */ (0,
|
|
1706
|
-
/* @__PURE__ */ (0,
|
|
1707
|
-
/* @__PURE__ */ (0,
|
|
1708
|
-
/* @__PURE__ */ (0,
|
|
1911
|
+
how && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { "data-testid": "company-information", className: "text-base text-grey-80", children: how }),
|
|
1912
|
+
mission && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2", children: [
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F680}" }),
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { className: "text-base text-grey-80", children: [
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pr-1 font-bold", children: "Mission" }),
|
|
1709
1916
|
mission
|
|
1710
1917
|
] })
|
|
1711
1918
|
] }),
|
|
1712
|
-
wow && /* @__PURE__ */ (0,
|
|
1713
|
-
/* @__PURE__ */ (0,
|
|
1714
|
-
/* @__PURE__ */ (0,
|
|
1715
|
-
/* @__PURE__ */ (0,
|
|
1919
|
+
wow && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2", children: [
|
|
1920
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F31F}" }),
|
|
1921
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { className: "text-base text-grey-80", children: [
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
|
|
1716
1923
|
wow
|
|
1717
1924
|
] })
|
|
1718
1925
|
] }),
|
|
1719
|
-
website && /* @__PURE__ */ (0,
|
|
1926
|
+
website && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1720
1927
|
LinkButton,
|
|
1721
1928
|
{
|
|
1722
1929
|
"data-testid": "company-website-link",
|
|
@@ -1730,22 +1937,22 @@ function CompanyInformation({
|
|
|
1730
1937
|
}
|
|
1731
1938
|
|
|
1732
1939
|
// src/components/company/CompanyTake.tsx
|
|
1733
|
-
var
|
|
1940
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1734
1941
|
function CompanyTake({ content, avatarSrc }) {
|
|
1735
1942
|
if (!content) return null;
|
|
1736
|
-
return /* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1737
1944
|
"div",
|
|
1738
1945
|
{
|
|
1739
1946
|
"data-testid": "company-take",
|
|
1740
1947
|
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6",
|
|
1741
1948
|
children: [
|
|
1742
|
-
/* @__PURE__ */ (0,
|
|
1743
|
-
/* @__PURE__ */ (0,
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1746
|
-
/* @__PURE__ */ (0,
|
|
1747
|
-
/* @__PURE__ */ (0,
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-lg font-bold text-white sm:text-xl", children: "The Real Dill \u2618\uFE0F" }),
|
|
1950
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mt-2 flex items-center justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm font-normal text-grey-10", children: content }) }),
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-8 flex w-full items-center gap-3", children: [
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Avatar, { name: "Jon Lee", src: avatarSrc }),
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col flex-wrap items-start", children: [
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
|
|
1749
1956
|
] })
|
|
1750
1957
|
] })
|
|
1751
1958
|
]
|
|
@@ -1754,60 +1961,64 @@ function CompanyTake({ content, avatarSrc }) {
|
|
|
1754
1961
|
}
|
|
1755
1962
|
|
|
1756
1963
|
// src/components/jobPost/JobDescription.tsx
|
|
1757
|
-
var
|
|
1964
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1758
1965
|
function JobDescription({ description }) {
|
|
1759
1966
|
if (!description) return null;
|
|
1760
|
-
return /* @__PURE__ */ (0,
|
|
1761
|
-
/* @__PURE__ */ (0,
|
|
1762
|
-
/* @__PURE__ */ (0,
|
|
1967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-xl font-bold", children: "Job Description" }),
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ReadMore, { text: description })
|
|
1763
1970
|
] });
|
|
1764
1971
|
}
|
|
1765
1972
|
|
|
1766
1973
|
// src/components/jobPost/JobHeader.tsx
|
|
1767
|
-
var
|
|
1974
|
+
var import_lucide_react17 = require("lucide-react");
|
|
1768
1975
|
var import_image = __toESM(require("next/image"), 1);
|
|
1769
1976
|
|
|
1770
1977
|
// src/components/buttons/BackButton.tsx
|
|
1771
|
-
var
|
|
1978
|
+
var import_lucide_react15 = require("lucide-react");
|
|
1772
1979
|
var import_navigation2 = require("next/navigation");
|
|
1773
1980
|
|
|
1774
1981
|
// src/hooks/useWindowHistory.ts
|
|
1775
|
-
var
|
|
1982
|
+
var import_react13 = require("react");
|
|
1776
1983
|
|
|
1777
1984
|
// src/contexts/WindowHistoryProvider.tsx
|
|
1778
1985
|
var import_navigation = require("next/navigation");
|
|
1779
|
-
var
|
|
1780
|
-
var
|
|
1781
|
-
var WindowHistoryContext = (0,
|
|
1986
|
+
var import_react12 = require("react");
|
|
1987
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1988
|
+
var WindowHistoryContext = (0, import_react12.createContext)({});
|
|
1782
1989
|
function WindowHistoryProvider({ children }) {
|
|
1783
|
-
const [history, setHistory] = (0,
|
|
1990
|
+
const [history, setHistory] = (0, import_react12.useState)([]);
|
|
1784
1991
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
1785
|
-
(0,
|
|
1992
|
+
(0, import_react12.useEffect)(() => {
|
|
1786
1993
|
setHistory(
|
|
1787
1994
|
(prev) => prev.at(-1) === window.location.href ? prev : [...prev, window.location.href]
|
|
1788
1995
|
);
|
|
1789
1996
|
}, [searchParams]);
|
|
1790
|
-
const contextValue = (0,
|
|
1791
|
-
return /* @__PURE__ */ (0,
|
|
1997
|
+
const contextValue = (0, import_react12.useMemo)(() => ({ history }), [history]);
|
|
1998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(WindowHistoryContext.Provider, { value: contextValue, children });
|
|
1792
1999
|
}
|
|
1793
2000
|
|
|
1794
2001
|
// src/hooks/useWindowHistory.ts
|
|
1795
2002
|
function useWindowHistory() {
|
|
1796
|
-
const windowHistoryContext = (0,
|
|
2003
|
+
const windowHistoryContext = (0, import_react13.useContext)(WindowHistoryContext);
|
|
1797
2004
|
return windowHistoryContext;
|
|
1798
2005
|
}
|
|
1799
2006
|
|
|
1800
2007
|
// src/components/buttons/BackButton.tsx
|
|
1801
|
-
var
|
|
2008
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1802
2009
|
function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
1803
2010
|
const { history } = useWindowHistory();
|
|
1804
2011
|
const router = (0, import_navigation2.useRouter)();
|
|
1805
2012
|
const isAcceptedRoute = (r) => !!acceptedRoutes?.find((route) => new RegExp("^" + route + "$", "i").test(r));
|
|
1806
2013
|
const goBack = () => {
|
|
1807
2014
|
const previous = history[history.length - 2];
|
|
1808
|
-
history.length > 1 && isAcceptedRoute(previous)
|
|
2015
|
+
if (history.length > 1 && isAcceptedRoute(previous)) {
|
|
2016
|
+
router.back();
|
|
2017
|
+
} else {
|
|
2018
|
+
router.push(fallbackHref ?? "/");
|
|
2019
|
+
}
|
|
1809
2020
|
};
|
|
1810
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1811
2022
|
Icon,
|
|
1812
2023
|
{
|
|
1813
2024
|
"aria-label": "back button",
|
|
@@ -1816,38 +2027,38 @@ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
|
1816
2027
|
onClick: goBack,
|
|
1817
2028
|
className,
|
|
1818
2029
|
...props,
|
|
1819
|
-
children: /* @__PURE__ */ (0,
|
|
2030
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react15.X, {})
|
|
1820
2031
|
}
|
|
1821
2032
|
);
|
|
1822
2033
|
}
|
|
1823
2034
|
|
|
1824
2035
|
// src/lib/icons.ts
|
|
1825
|
-
var
|
|
2036
|
+
var import_lucide_react16 = require("lucide-react");
|
|
1826
2037
|
var iconMap = {
|
|
1827
|
-
house:
|
|
1828
|
-
layers:
|
|
1829
|
-
users:
|
|
1830
|
-
settings:
|
|
1831
|
-
building:
|
|
1832
|
-
bell:
|
|
1833
|
-
wallet:
|
|
1834
|
-
contact:
|
|
1835
|
-
banknote:
|
|
1836
|
-
"message-square-dot":
|
|
1837
|
-
"life-buoy":
|
|
1838
|
-
"building-2":
|
|
1839
|
-
"gallery-vertical-end":
|
|
1840
|
-
"square-kanban":
|
|
1841
|
-
"briefcase-business":
|
|
1842
|
-
"circle-user":
|
|
1843
|
-
"key-round":
|
|
1844
|
-
"clock-2":
|
|
1845
|
-
"circle-user-round":
|
|
1846
|
-
"map-pin":
|
|
2038
|
+
house: import_lucide_react16.Home,
|
|
2039
|
+
layers: import_lucide_react16.Layers,
|
|
2040
|
+
users: import_lucide_react16.Users,
|
|
2041
|
+
settings: import_lucide_react16.Settings,
|
|
2042
|
+
building: import_lucide_react16.Building,
|
|
2043
|
+
bell: import_lucide_react16.Bell,
|
|
2044
|
+
wallet: import_lucide_react16.Wallet,
|
|
2045
|
+
contact: import_lucide_react16.Contact,
|
|
2046
|
+
banknote: import_lucide_react16.Banknote,
|
|
2047
|
+
"message-square-dot": import_lucide_react16.MessageSquareDot,
|
|
2048
|
+
"life-buoy": import_lucide_react16.LifeBuoy,
|
|
2049
|
+
"building-2": import_lucide_react16.Building2,
|
|
2050
|
+
"gallery-vertical-end": import_lucide_react16.GalleryVerticalEnd,
|
|
2051
|
+
"square-kanban": import_lucide_react16.SquareKanban,
|
|
2052
|
+
"briefcase-business": import_lucide_react16.BriefcaseBusiness,
|
|
2053
|
+
"circle-user": import_lucide_react16.CircleUser,
|
|
2054
|
+
"key-round": import_lucide_react16.KeyRound,
|
|
2055
|
+
"clock-2": import_lucide_react16.Clock2,
|
|
2056
|
+
"circle-user-round": import_lucide_react16.CircleUserRound,
|
|
2057
|
+
"map-pin": import_lucide_react16.MapPin
|
|
1847
2058
|
};
|
|
1848
2059
|
|
|
1849
2060
|
// src/components/jobPost/JobHeader.tsx
|
|
1850
|
-
var
|
|
2061
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1851
2062
|
function JobHeader({
|
|
1852
2063
|
title,
|
|
1853
2064
|
subtitles,
|
|
@@ -1863,9 +2074,9 @@ function JobHeader({
|
|
|
1863
2074
|
}) {
|
|
1864
2075
|
const renderIcon = (icon) => {
|
|
1865
2076
|
const Icon2 = iconMap[icon];
|
|
1866
|
-
return /* @__PURE__ */ (0,
|
|
2077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { size: 18 });
|
|
1867
2078
|
};
|
|
1868
|
-
return /* @__PURE__ */ (0,
|
|
2079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1869
2080
|
"div",
|
|
1870
2081
|
{
|
|
1871
2082
|
"data-testid": "job-header-root",
|
|
@@ -1874,8 +2085,8 @@ function JobHeader({
|
|
|
1874
2085
|
!standalone && "rounded-3xl"
|
|
1875
2086
|
),
|
|
1876
2087
|
children: [
|
|
1877
|
-
!standalone && /* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
2088
|
+
!standalone && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative flex min-h-16 w-full items-center rounded-t-3xl bg-transparent md:min-h-24 md:flex-row lg:min-h-32", children: [
|
|
2089
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1879
2090
|
import_image.default,
|
|
1880
2091
|
{
|
|
1881
2092
|
className: "h-full w-full rounded-t-3xl object-cover",
|
|
@@ -1884,7 +2095,7 @@ function JobHeader({
|
|
|
1884
2095
|
fill: true
|
|
1885
2096
|
}
|
|
1886
2097
|
),
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1888
2099
|
BackButton,
|
|
1889
2100
|
{
|
|
1890
2101
|
acceptedRoutes: backAcceptedRoutes,
|
|
@@ -1893,12 +2104,12 @@ function JobHeader({
|
|
|
1893
2104
|
"data-testid": "job-header-back-button"
|
|
1894
2105
|
}
|
|
1895
2106
|
),
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1897
2108
|
"div",
|
|
1898
2109
|
{
|
|
1899
2110
|
className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
|
|
1900
2111
|
"data-testid": "job-header-avatar",
|
|
1901
|
-
children: /* @__PURE__ */ (0,
|
|
2112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1902
2113
|
Avatar,
|
|
1903
2114
|
{
|
|
1904
2115
|
size: "large",
|
|
@@ -1912,9 +2123,9 @@ function JobHeader({
|
|
|
1912
2123
|
}
|
|
1913
2124
|
)
|
|
1914
2125
|
] }),
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1917
|
-
standalone && /* @__PURE__ */ (0,
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col md:flex-row", children: [
|
|
2128
|
+
standalone && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1918
2129
|
Avatar,
|
|
1919
2130
|
{
|
|
1920
2131
|
size: "large",
|
|
@@ -1925,26 +2136,26 @@ function JobHeader({
|
|
|
1925
2136
|
rel: "noopener noreferrer"
|
|
1926
2137
|
}
|
|
1927
2138
|
) }),
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg", children: subtitles?.map((subtitle, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1929
2140
|
"div",
|
|
1930
2141
|
{
|
|
1931
2142
|
"data-testid": `job-header-subtitle-${i}`,
|
|
1932
2143
|
className: "flex items-center",
|
|
1933
2144
|
children: [
|
|
1934
2145
|
subtitle,
|
|
1935
|
-
i < subtitles.length - 1 && /* @__PURE__ */ (0,
|
|
2146
|
+
i < subtitles.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.Dot, { className: "mx-1 shrink-0", size: 10 })
|
|
1936
2147
|
]
|
|
1937
2148
|
},
|
|
1938
2149
|
subtitle
|
|
1939
2150
|
)) })
|
|
1940
2151
|
] }),
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
2152
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1942
2153
|
"div",
|
|
1943
2154
|
{
|
|
1944
2155
|
"data-testid": "job-header-content",
|
|
1945
2156
|
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
|
|
1946
2157
|
children: [
|
|
1947
|
-
/* @__PURE__ */ (0,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1948
2159
|
"h2",
|
|
1949
2160
|
{
|
|
1950
2161
|
"data-testid": "job-header-title",
|
|
@@ -1952,7 +2163,7 @@ function JobHeader({
|
|
|
1952
2163
|
children: title
|
|
1953
2164
|
}
|
|
1954
2165
|
),
|
|
1955
|
-
!!actions && /* @__PURE__ */ (0,
|
|
2166
|
+
!!actions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1956
2167
|
"div",
|
|
1957
2168
|
{
|
|
1958
2169
|
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
@@ -1963,12 +2174,12 @@ function JobHeader({
|
|
|
1963
2174
|
]
|
|
1964
2175
|
}
|
|
1965
2176
|
),
|
|
1966
|
-
/* @__PURE__ */ (0,
|
|
2177
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1967
2178
|
"div",
|
|
1968
2179
|
{
|
|
1969
2180
|
"data-testid": "job-header-tags",
|
|
1970
2181
|
className: "flex flex-row flex-wrap items-center justify-start gap-2",
|
|
1971
|
-
children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ (0,
|
|
2182
|
+
children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1972
2183
|
Chip_default,
|
|
1973
2184
|
{
|
|
1974
2185
|
size: "small",
|
|
@@ -1977,7 +2188,7 @@ function JobHeader({
|
|
|
1977
2188
|
"data-testid": `job-header-tag-${name}`,
|
|
1978
2189
|
children: [
|
|
1979
2190
|
renderIcon(icon),
|
|
1980
|
-
/* @__PURE__ */ (0,
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: label })
|
|
1981
2192
|
]
|
|
1982
2193
|
},
|
|
1983
2194
|
name
|
|
@@ -1993,104 +2204,8 @@ function JobHeader({
|
|
|
1993
2204
|
// src/components/jobPost/JobPost.tsx
|
|
1994
2205
|
var DateFns = __toESM(require("date-fns"), 1);
|
|
1995
2206
|
|
|
1996
|
-
// src/types/data/shared_pickle_output_latest.ts
|
|
1997
|
-
var shared_pickle_output_latest_exports = {};
|
|
1998
|
-
__export(shared_pickle_output_latest_exports, {
|
|
1999
|
-
CurrencyEnum: () => CurrencyEnum,
|
|
2000
|
-
DetailLevelEnum: () => DetailLevelEnum,
|
|
2001
|
-
TypeEnum: () => TypeEnum,
|
|
2002
|
-
UnitTextEnum: () => UnitTextEnum,
|
|
2003
|
-
imageAssetSchema: () => imageAssetSchema,
|
|
2004
|
-
imageSchema: () => imageSchema,
|
|
2005
|
-
monetaryAmountSchema: () => monetaryAmountSchema,
|
|
2006
|
-
placeSchema: () => placeSchema,
|
|
2007
|
-
postalAddressSchema: () => postalAddressSchema,
|
|
2008
|
-
quantitativeValueSchema: () => quantitativeValueSchema
|
|
2009
|
-
});
|
|
2010
|
-
var import_zod = require("zod");
|
|
2011
|
-
var TypeEnum = import_zod.z.enum(["IMAGE"]);
|
|
2012
|
-
var DetailLevelEnum = import_zod.z.enum(["COUNTRY", "GEO", "LOCALITY", "POSTAL_CODE", "REGION"]);
|
|
2013
|
-
var UnitTextEnum = import_zod.z.enum(["DAY", "HOUR", "MONTH", "PER_ACTIVITY", "WEEK", "YEAR"]);
|
|
2014
|
-
var CurrencyEnum = import_zod.z.enum(["EUR", "GBP", "USD"]);
|
|
2015
|
-
var postalAddressSchema = import_zod.z.object({
|
|
2016
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2017
|
-
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2018
|
-
addressCountry: import_zod.z.string().describe("The physical country as defined in ISO 3166 Alpha-2"),
|
|
2019
|
-
addressRegion: import_zod.z.optional(import_zod.z.string()).describe("The region in which the locality is, and which is in the country."),
|
|
2020
|
-
addressLocality: import_zod.z.optional(import_zod.z.string()).describe("The locality in which the street address is, and which is in the region. In the US this would be city."),
|
|
2021
|
-
streetAddress: import_zod.z.optional(import_zod.z.string()).describe("The street name of the address within the locality."),
|
|
2022
|
-
streetNumber: import_zod.z.optional(import_zod.z.string()).describe("The house of building number within the street."),
|
|
2023
|
-
postalCode: import_zod.z.optional(import_zod.z.string()).describe("The postal code"),
|
|
2024
|
-
description: import_zod.z.optional(import_zod.z.string()).describe("A descriptive string containing the full address.")
|
|
2025
|
-
});
|
|
2026
|
-
var placeSchema = import_zod.z.object({
|
|
2027
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2028
|
-
detailLevel: import_zod.z.optional(DetailLevelEnum),
|
|
2029
|
-
latitude: import_zod.z.optional(import_zod.z.number()).describe("The latitude of a location."),
|
|
2030
|
-
longitude: import_zod.z.optional(import_zod.z.number()).describe("The longitude of a location."),
|
|
2031
|
-
address: import_zod.z.optional(postalAddressSchema).describe("The physical place of the location")
|
|
2032
|
-
});
|
|
2033
|
-
var quantitativeValueSchema = import_zod.z.object({
|
|
2034
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2035
|
-
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2036
|
-
value: import_zod.z.optional(import_zod.z.number()).describe("The single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Typically used for a single salary."),
|
|
2037
|
-
minValue: import_zod.z.optional(import_zod.z.number()).describe("The single minium value in a range for a quantitative_value, requires a maximum value."),
|
|
2038
|
-
maxValue: import_zod.z.optional(import_zod.z.number()).describe("The maximum value in a range for a quantitative_value, requires a minimum value."),
|
|
2039
|
-
unitText: UnitTextEnum
|
|
2040
|
-
});
|
|
2041
|
-
var monetaryAmountSchema = import_zod.z.object({
|
|
2042
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2043
|
-
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2044
|
-
singleValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Deprecated - use value.value instead."),
|
|
2045
|
-
minValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized single minium value in a range for a quantitative_value. Deprecated use value.minValue"),
|
|
2046
|
-
maxValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized maximum value in a range for a quantitative_value. Deprecated use value.maxValue"),
|
|
2047
|
-
value: import_zod.z.optional(quantitativeValueSchema).describe("The quantitative_value for a given salary"),
|
|
2048
|
-
currency: import_zod.z.optional(CurrencyEnum)
|
|
2049
|
-
});
|
|
2050
|
-
var imageAssetSchema = import_zod.z.object({
|
|
2051
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2052
|
-
altText: import_zod.z.optional(import_zod.z.string()).describe("The alt text for the image"),
|
|
2053
|
-
assetId: import_zod.z.optional(import_zod.z.string()).describe("The asset ID for the image"),
|
|
2054
|
-
description: import_zod.z.optional(import_zod.z.string()).describe("The description for the image"),
|
|
2055
|
-
extension: import_zod.z.optional(import_zod.z.string()).describe("The extension for the image"),
|
|
2056
|
-
label: import_zod.z.optional(import_zod.z.string()).describe("The label for the image"),
|
|
2057
|
-
mimeType: import_zod.z.optional(import_zod.z.string()).describe("The mime type for the image"),
|
|
2058
|
-
originalFilename: import_zod.z.optional(import_zod.z.string()).describe("The original filename for the image"),
|
|
2059
|
-
path: import_zod.z.optional(import_zod.z.string()).describe("The path for the image"),
|
|
2060
|
-
sha1Hash: import_zod.z.optional(import_zod.z.string()).describe("The SHA1 hash for the image"),
|
|
2061
|
-
size: import_zod.z.optional(import_zod.z.number()).describe("The size for the image"),
|
|
2062
|
-
title: import_zod.z.optional(import_zod.z.string()).describe("The title for the image"),
|
|
2063
|
-
uploadId: import_zod.z.optional(import_zod.z.string()).describe("The upload ID for the image"),
|
|
2064
|
-
url: import_zod.z.optional(import_zod.z.string()).describe("The URL for the image")
|
|
2065
|
-
});
|
|
2066
|
-
var imageSchema = import_zod.z.object({
|
|
2067
|
-
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2068
|
-
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2069
|
-
asset: import_zod.z.optional(imageAssetSchema).describe("The asset for the image")
|
|
2070
|
-
});
|
|
2071
|
-
|
|
2072
|
-
// src/lib/salaryRange.ts
|
|
2073
|
-
function salaryRange(salary) {
|
|
2074
|
-
if (!salary) return null;
|
|
2075
|
-
const min = salary.minValue;
|
|
2076
|
-
const max = salary.maxValue;
|
|
2077
|
-
const single = salary.singleValue;
|
|
2078
|
-
const signs = {
|
|
2079
|
-
[CurrencyEnum.Values.USD]: "$",
|
|
2080
|
-
[CurrencyEnum.Values.GBP]: "\xA3",
|
|
2081
|
-
[CurrencyEnum.Values.EUR]: "\u20AC"
|
|
2082
|
-
};
|
|
2083
|
-
const sign = signs[salary.currency ?? CurrencyEnum.Values.USD];
|
|
2084
|
-
if (min == null && max == null && single == null) return null;
|
|
2085
|
-
if (single != null) return sign + single.toLocaleString();
|
|
2086
|
-
if (min === max) return sign + min?.toLocaleString();
|
|
2087
|
-
if (min != null && max != null)
|
|
2088
|
-
return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString();
|
|
2089
|
-
return null;
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
2207
|
// src/hooks/useDisplayText.ts
|
|
2093
|
-
var
|
|
2208
|
+
var import_react14 = require("react");
|
|
2094
2209
|
|
|
2095
2210
|
// src/lib/mappings.ts
|
|
2096
2211
|
var employmentTypeDisplayText = {
|
|
@@ -2534,9 +2649,9 @@ var DisplayTextService = class {
|
|
|
2534
2649
|
|
|
2535
2650
|
// src/hooks/useDisplayText.ts
|
|
2536
2651
|
var useDisplayText = (scope, value) => {
|
|
2537
|
-
const [displayText, setDisplayText] = (0,
|
|
2538
|
-
const displayService = (0,
|
|
2539
|
-
(0,
|
|
2652
|
+
const [displayText, setDisplayText] = (0, import_react14.useState)("");
|
|
2653
|
+
const displayService = (0, import_react14.useMemo)(() => new DisplayTextService(), []);
|
|
2654
|
+
(0, import_react14.useEffect)(() => {
|
|
2540
2655
|
if (!displayService || !value) {
|
|
2541
2656
|
setDisplayText("");
|
|
2542
2657
|
return;
|
|
@@ -2578,8 +2693,104 @@ function formattedJobLocation(job) {
|
|
|
2578
2693
|
return [address, remote].filter(Boolean).join(" | ");
|
|
2579
2694
|
}
|
|
2580
2695
|
|
|
2696
|
+
// src/types/data/shared_pickle_output_latest.ts
|
|
2697
|
+
var shared_pickle_output_latest_exports = {};
|
|
2698
|
+
__export(shared_pickle_output_latest_exports, {
|
|
2699
|
+
CurrencyEnum: () => CurrencyEnum,
|
|
2700
|
+
DetailLevelEnum: () => DetailLevelEnum,
|
|
2701
|
+
TypeEnum: () => TypeEnum,
|
|
2702
|
+
UnitTextEnum: () => UnitTextEnum,
|
|
2703
|
+
imageAssetSchema: () => imageAssetSchema,
|
|
2704
|
+
imageSchema: () => imageSchema,
|
|
2705
|
+
monetaryAmountSchema: () => monetaryAmountSchema,
|
|
2706
|
+
placeSchema: () => placeSchema,
|
|
2707
|
+
postalAddressSchema: () => postalAddressSchema,
|
|
2708
|
+
quantitativeValueSchema: () => quantitativeValueSchema
|
|
2709
|
+
});
|
|
2710
|
+
var import_zod = require("zod");
|
|
2711
|
+
var TypeEnum = import_zod.z.enum(["IMAGE"]);
|
|
2712
|
+
var DetailLevelEnum = import_zod.z.enum(["COUNTRY", "GEO", "LOCALITY", "POSTAL_CODE", "REGION"]);
|
|
2713
|
+
var UnitTextEnum = import_zod.z.enum(["DAY", "HOUR", "MONTH", "PER_ACTIVITY", "WEEK", "YEAR"]);
|
|
2714
|
+
var CurrencyEnum = import_zod.z.enum(["EUR", "GBP", "USD"]);
|
|
2715
|
+
var postalAddressSchema = import_zod.z.object({
|
|
2716
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2717
|
+
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2718
|
+
addressCountry: import_zod.z.string().describe("The physical country as defined in ISO 3166 Alpha-2"),
|
|
2719
|
+
addressRegion: import_zod.z.optional(import_zod.z.string()).describe("The region in which the locality is, and which is in the country."),
|
|
2720
|
+
addressLocality: import_zod.z.optional(import_zod.z.string()).describe("The locality in which the street address is, and which is in the region. In the US this would be city."),
|
|
2721
|
+
streetAddress: import_zod.z.optional(import_zod.z.string()).describe("The street name of the address within the locality."),
|
|
2722
|
+
streetNumber: import_zod.z.optional(import_zod.z.string()).describe("The house of building number within the street."),
|
|
2723
|
+
postalCode: import_zod.z.optional(import_zod.z.string()).describe("The postal code"),
|
|
2724
|
+
description: import_zod.z.optional(import_zod.z.string()).describe("A descriptive string containing the full address.")
|
|
2725
|
+
});
|
|
2726
|
+
var placeSchema = import_zod.z.object({
|
|
2727
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2728
|
+
detailLevel: import_zod.z.optional(DetailLevelEnum),
|
|
2729
|
+
latitude: import_zod.z.optional(import_zod.z.number()).describe("The latitude of a location."),
|
|
2730
|
+
longitude: import_zod.z.optional(import_zod.z.number()).describe("The longitude of a location."),
|
|
2731
|
+
address: import_zod.z.optional(postalAddressSchema).describe("The physical place of the location")
|
|
2732
|
+
});
|
|
2733
|
+
var quantitativeValueSchema = import_zod.z.object({
|
|
2734
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2735
|
+
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2736
|
+
value: import_zod.z.optional(import_zod.z.number()).describe("The single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Typically used for a single salary."),
|
|
2737
|
+
minValue: import_zod.z.optional(import_zod.z.number()).describe("The single minium value in a range for a quantitative_value, requires a maximum value."),
|
|
2738
|
+
maxValue: import_zod.z.optional(import_zod.z.number()).describe("The maximum value in a range for a quantitative_value, requires a minimum value."),
|
|
2739
|
+
unitText: UnitTextEnum
|
|
2740
|
+
});
|
|
2741
|
+
var monetaryAmountSchema = import_zod.z.object({
|
|
2742
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2743
|
+
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2744
|
+
singleValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Deprecated - use value.value instead."),
|
|
2745
|
+
minValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized single minium value in a range for a quantitative_value. Deprecated use value.minValue"),
|
|
2746
|
+
maxValue: import_zod.z.optional(import_zod.z.number()).describe("The annualized maximum value in a range for a quantitative_value. Deprecated use value.maxValue"),
|
|
2747
|
+
value: import_zod.z.optional(quantitativeValueSchema).describe("The quantitative_value for a given salary"),
|
|
2748
|
+
currency: import_zod.z.optional(CurrencyEnum)
|
|
2749
|
+
});
|
|
2750
|
+
var imageAssetSchema = import_zod.z.object({
|
|
2751
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2752
|
+
altText: import_zod.z.optional(import_zod.z.string()).describe("The alt text for the image"),
|
|
2753
|
+
assetId: import_zod.z.optional(import_zod.z.string()).describe("The asset ID for the image"),
|
|
2754
|
+
description: import_zod.z.optional(import_zod.z.string()).describe("The description for the image"),
|
|
2755
|
+
extension: import_zod.z.optional(import_zod.z.string()).describe("The extension for the image"),
|
|
2756
|
+
label: import_zod.z.optional(import_zod.z.string()).describe("The label for the image"),
|
|
2757
|
+
mimeType: import_zod.z.optional(import_zod.z.string()).describe("The mime type for the image"),
|
|
2758
|
+
originalFilename: import_zod.z.optional(import_zod.z.string()).describe("The original filename for the image"),
|
|
2759
|
+
path: import_zod.z.optional(import_zod.z.string()).describe("The path for the image"),
|
|
2760
|
+
sha1Hash: import_zod.z.optional(import_zod.z.string()).describe("The SHA1 hash for the image"),
|
|
2761
|
+
size: import_zod.z.optional(import_zod.z.number()).describe("The size for the image"),
|
|
2762
|
+
title: import_zod.z.optional(import_zod.z.string()).describe("The title for the image"),
|
|
2763
|
+
uploadId: import_zod.z.optional(import_zod.z.string()).describe("The upload ID for the image"),
|
|
2764
|
+
url: import_zod.z.optional(import_zod.z.string()).describe("The URL for the image")
|
|
2765
|
+
});
|
|
2766
|
+
var imageSchema = import_zod.z.object({
|
|
2767
|
+
version: import_zod.z.literal("1.0.0").default("1.0.0"),
|
|
2768
|
+
type: import_zod.z.string().describe("Document type used for schema"),
|
|
2769
|
+
asset: import_zod.z.optional(imageAssetSchema).describe("The asset for the image")
|
|
2770
|
+
});
|
|
2771
|
+
|
|
2772
|
+
// src/lib/salaryRange.ts
|
|
2773
|
+
function salaryRange(salary) {
|
|
2774
|
+
if (!salary) return null;
|
|
2775
|
+
const min = salary.minValue;
|
|
2776
|
+
const max = salary.maxValue;
|
|
2777
|
+
const single = salary.singleValue;
|
|
2778
|
+
const signs = {
|
|
2779
|
+
[CurrencyEnum.Values.USD]: "$",
|
|
2780
|
+
[CurrencyEnum.Values.GBP]: "\xA3",
|
|
2781
|
+
[CurrencyEnum.Values.EUR]: "\u20AC"
|
|
2782
|
+
};
|
|
2783
|
+
const sign = signs[salary.currency ?? CurrencyEnum.Values.USD];
|
|
2784
|
+
if (min == null && max == null && single == null) return null;
|
|
2785
|
+
if (single != null) return sign + single.toLocaleString();
|
|
2786
|
+
if (min === max) return sign + min?.toLocaleString();
|
|
2787
|
+
if (min != null && max != null)
|
|
2788
|
+
return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString();
|
|
2789
|
+
return null;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2581
2792
|
// src/components/jobPost/JobPost.tsx
|
|
2582
|
-
var
|
|
2793
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2583
2794
|
function JobPost({
|
|
2584
2795
|
job,
|
|
2585
2796
|
bannerSrc,
|
|
@@ -2623,7 +2834,7 @@ function JobPost({
|
|
|
2623
2834
|
label: formattedLocation
|
|
2624
2835
|
}
|
|
2625
2836
|
].filter((t) => !!t);
|
|
2626
|
-
return /* @__PURE__ */ (0,
|
|
2837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2627
2838
|
"div",
|
|
2628
2839
|
{
|
|
2629
2840
|
className: cn(
|
|
@@ -2631,7 +2842,7 @@ function JobPost({
|
|
|
2631
2842
|
!standalone && "border-1 rounded-3xl border-grey-5"
|
|
2632
2843
|
),
|
|
2633
2844
|
children: [
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
2845
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2635
2846
|
JobHeader,
|
|
2636
2847
|
{
|
|
2637
2848
|
title: job.title,
|
|
@@ -2645,16 +2856,16 @@ function JobPost({
|
|
|
2645
2856
|
tags
|
|
2646
2857
|
}
|
|
2647
2858
|
),
|
|
2648
|
-
/* @__PURE__ */ (0,
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col gap-8 px-6", children: [
|
|
2860
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(JobDescription, { description: job.description }),
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2651
2862
|
CompanyTake,
|
|
2652
2863
|
{
|
|
2653
2864
|
avatarSrc,
|
|
2654
2865
|
content: job.hiringOrganization?.companyNdg?.companyNdgTake
|
|
2655
2866
|
}
|
|
2656
2867
|
),
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2868
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2658
2869
|
CompanyInformation,
|
|
2659
2870
|
{
|
|
2660
2871
|
name: job.hiringOrganization?.companyName ?? "",
|
|
@@ -2664,7 +2875,7 @@ function JobPost({
|
|
|
2664
2875
|
website: job.hiringOrganization?.companyWebsite
|
|
2665
2876
|
}
|
|
2666
2877
|
),
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2878
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2668
2879
|
CompanyBenefits,
|
|
2669
2880
|
{
|
|
2670
2881
|
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
|
|
@@ -2676,24 +2887,6 @@ function JobPost({
|
|
|
2676
2887
|
);
|
|
2677
2888
|
}
|
|
2678
2889
|
|
|
2679
|
-
// src/types/data/job_posting_service_latest.ts
|
|
2680
|
-
var job_posting_service_latest_exports = {};
|
|
2681
|
-
__export(job_posting_service_latest_exports, {
|
|
2682
|
-
BestFitEnum: () => BestFitEnum,
|
|
2683
|
-
ClinicalLicenseEnum: () => ClinicalLicenseEnum,
|
|
2684
|
-
ClinicalSettingEnum: () => ClinicalSettingEnum,
|
|
2685
|
-
ClinicalSpecialtyEnum: () => ClinicalSpecialtyEnum,
|
|
2686
|
-
EmploymentLevelEnum: () => EmploymentLevelEnum,
|
|
2687
|
-
EmploymentTypeEnum: () => EmploymentTypeEnum,
|
|
2688
|
-
JobFunctionEnum: () => JobFunctionEnum,
|
|
2689
|
-
JobLocationTypeEnum: () => JobLocationTypeEnum,
|
|
2690
|
-
PublishStatusEnum: () => PublishStatusEnum2,
|
|
2691
|
-
ShiftEnum: () => ShiftEnum,
|
|
2692
|
-
TypeEnum: () => TypeEnum3,
|
|
2693
|
-
jobPostSchema: () => jobPostSchema
|
|
2694
|
-
});
|
|
2695
|
-
var import_zod3 = require("zod");
|
|
2696
|
-
|
|
2697
2890
|
// src/types/data/company_service_latest.ts
|
|
2698
2891
|
var company_service_latest_exports = {};
|
|
2699
2892
|
__export(company_service_latest_exports, {
|
|
@@ -2841,6 +3034,22 @@ var officeSchema = import_zod2.z.object({
|
|
|
2841
3034
|
});
|
|
2842
3035
|
|
|
2843
3036
|
// src/types/data/job_posting_service_latest.ts
|
|
3037
|
+
var job_posting_service_latest_exports = {};
|
|
3038
|
+
__export(job_posting_service_latest_exports, {
|
|
3039
|
+
BestFitEnum: () => BestFitEnum,
|
|
3040
|
+
ClinicalLicenseEnum: () => ClinicalLicenseEnum,
|
|
3041
|
+
ClinicalSettingEnum: () => ClinicalSettingEnum,
|
|
3042
|
+
ClinicalSpecialtyEnum: () => ClinicalSpecialtyEnum,
|
|
3043
|
+
EmploymentLevelEnum: () => EmploymentLevelEnum,
|
|
3044
|
+
EmploymentTypeEnum: () => EmploymentTypeEnum,
|
|
3045
|
+
JobFunctionEnum: () => JobFunctionEnum,
|
|
3046
|
+
JobLocationTypeEnum: () => JobLocationTypeEnum,
|
|
3047
|
+
PublishStatusEnum: () => PublishStatusEnum2,
|
|
3048
|
+
ShiftEnum: () => ShiftEnum,
|
|
3049
|
+
TypeEnum: () => TypeEnum3,
|
|
3050
|
+
jobPostSchema: () => jobPostSchema
|
|
3051
|
+
});
|
|
3052
|
+
var import_zod3 = require("zod");
|
|
2844
3053
|
var TypeEnum3 = import_zod3.z.enum(["JOB_POST"]);
|
|
2845
3054
|
var JobLocationTypeEnum = import_zod3.z.enum(["FLOAT", "HYBRID", "ONSITE", "REMOTE"]);
|
|
2846
3055
|
var EmploymentTypeEnum = import_zod3.z.enum(["CONTRACT", "FULL_TIME", "INTERNSHIP", "OTHER", "PART_TIME", "PER_DIEM", "TEMPORARY"]);
|
|
@@ -2902,6 +3111,7 @@ var jobPostSchema = import_zod3.z.object({
|
|
|
2902
3111
|
CompanyService,
|
|
2903
3112
|
CompanyTake,
|
|
2904
3113
|
Counter,
|
|
3114
|
+
DatePicker,
|
|
2905
3115
|
Icon,
|
|
2906
3116
|
Input,
|
|
2907
3117
|
InputOtp,
|