@next-degree/pickle-shared-js 0.12.6 → 0.13.0
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_sanity-2J1ZuUnu.d.cts → company_service_sanity-BzaIPM-N.d.ts} +2297 -2297
- package/dist/{company_service_sanity-KaAGfnNV.d.ts → company_service_sanity-Zy8TiORb.d.cts} +2297 -2297
- package/dist/components/buttons/BackButton.cjs +5 -8
- package/dist/components/buttons/BackButton.cjs.map +1 -1
- package/dist/components/buttons/BackButton.d.cts +2 -2
- package/dist/components/buttons/BackButton.d.ts +2 -2
- package/dist/components/buttons/BackButton.js +5 -8
- package/dist/components/buttons/BackButton.js.map +1 -1
- package/dist/components/company/CompanyBenefits.cjs +1 -5
- package/dist/components/company/CompanyBenefits.cjs.map +1 -1
- package/dist/components/company/CompanyBenefits.d.cts +2 -2
- package/dist/components/company/CompanyBenefits.d.ts +2 -2
- package/dist/components/company/CompanyBenefits.js +1 -5
- package/dist/components/company/CompanyBenefits.js.map +1 -1
- package/dist/components/company/CompanyInformation.cjs +23 -44
- package/dist/components/company/CompanyInformation.cjs.map +1 -1
- package/dist/components/company/CompanyInformation.d.cts +2 -2
- package/dist/components/company/CompanyInformation.d.ts +2 -2
- package/dist/components/company/CompanyInformation.js +23 -44
- package/dist/components/company/CompanyInformation.js.map +1 -1
- package/dist/components/company/CompanyTake.cjs +12 -26
- package/dist/components/company/CompanyTake.cjs.map +1 -1
- package/dist/components/company/CompanyTake.d.cts +2 -2
- package/dist/components/company/CompanyTake.d.ts +2 -2
- package/dist/components/company/CompanyTake.js +12 -26
- package/dist/components/company/CompanyTake.js.map +1 -1
- package/dist/components/jobCard/JobLocation.cjs +23 -34
- package/dist/components/jobCard/JobLocation.cjs.map +1 -1
- package/dist/components/jobCard/JobLocation.d.cts +3 -3
- package/dist/components/jobCard/JobLocation.d.ts +3 -3
- package/dist/components/jobCard/JobLocation.js +23 -34
- package/dist/components/jobCard/JobLocation.js.map +1 -1
- package/dist/components/jobPost/JobDescription.cjs +164 -30
- package/dist/components/jobPost/JobDescription.cjs.map +1 -1
- package/dist/components/jobPost/JobDescription.d.cts +2 -2
- package/dist/components/jobPost/JobDescription.d.ts +2 -2
- package/dist/components/jobPost/JobDescription.js +164 -30
- package/dist/components/jobPost/JobDescription.js.map +1 -1
- package/dist/components/jobPost/JobHeader.cjs +110 -138
- package/dist/components/jobPost/JobHeader.cjs.map +1 -1
- package/dist/components/jobPost/JobHeader.d.cts +2 -2
- package/dist/components/jobPost/JobHeader.d.ts +2 -2
- package/dist/components/jobPost/JobHeader.js +110 -138
- package/dist/components/jobPost/JobHeader.js.map +1 -1
- package/dist/components/jobPost/JobPost.cjs +382 -318
- package/dist/components/jobPost/JobPost.cjs.map +1 -1
- package/dist/components/jobPost/JobPost.d.cts +3 -3
- package/dist/components/jobPost/JobPost.d.ts +3 -3
- package/dist/components/jobPost/JobPost.js +344 -280
- package/dist/components/jobPost/JobPost.js.map +1 -1
- package/dist/components/primitives/avatar.cjs +3 -4
- package/dist/components/primitives/avatar.cjs.map +1 -1
- package/dist/components/primitives/avatar.js +3 -4
- package/dist/components/primitives/avatar.js.map +1 -1
- package/dist/components/primitives/command.cjs +37 -50
- package/dist/components/primitives/command.cjs.map +1 -1
- package/dist/components/primitives/command.d.cts +5 -6
- package/dist/components/primitives/command.d.ts +5 -6
- package/dist/components/primitives/command.js +37 -50
- package/dist/components/primitives/command.js.map +1 -1
- package/dist/components/primitives/dialog.cjs +18 -27
- package/dist/components/primitives/dialog.cjs.map +1 -1
- package/dist/components/primitives/dialog.d.cts +2 -3
- package/dist/components/primitives/dialog.d.ts +2 -3
- package/dist/components/primitives/dialog.js +18 -27
- package/dist/components/primitives/dialog.js.map +1 -1
- package/dist/components/primitives/input-otp.cjs +8 -11
- 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 +8 -11
- package/dist/components/primitives/input-otp.js.map +1 -1
- package/dist/components/primitives/popover.cjs +2 -3
- package/dist/components/primitives/popover.cjs.map +1 -1
- package/dist/components/primitives/popover.js +2 -3
- package/dist/components/primitives/popover.js.map +1 -1
- package/dist/components/primitives/radio-group.cjs +12 -16
- package/dist/components/primitives/radio-group.cjs.map +1 -1
- package/dist/components/primitives/radio-group.js +12 -16
- package/dist/components/primitives/radio-group.js.map +1 -1
- package/dist/components/primitives/separator.cjs +1 -2
- package/dist/components/primitives/separator.cjs.map +1 -1
- package/dist/components/primitives/separator.js +1 -2
- package/dist/components/primitives/separator.js.map +1 -1
- package/dist/components/primitives/tooltip.cjs +1 -2
- package/dist/components/primitives/tooltip.cjs.map +1 -1
- package/dist/components/primitives/tooltip.js +1 -2
- package/dist/components/primitives/tooltip.js.map +1 -1
- package/dist/components/ui/Avatar.cjs +6 -11
- package/dist/components/ui/Avatar.cjs.map +1 -1
- package/dist/components/ui/Avatar.d.cts +3 -3
- package/dist/components/ui/Avatar.d.ts +3 -3
- package/dist/components/ui/Avatar.js +6 -11
- package/dist/components/ui/Avatar.js.map +1 -1
- package/dist/components/ui/Badge.cjs +12 -2
- package/dist/components/ui/Badge.cjs.map +1 -1
- package/dist/components/ui/Badge.d.cts +1 -2
- package/dist/components/ui/Badge.d.ts +1 -2
- package/dist/components/ui/Badge.js +2 -2
- package/dist/components/ui/Badge.js.map +1 -1
- package/dist/components/ui/Button.cjs +163 -8
- package/dist/components/ui/Button.cjs.map +1 -1
- package/dist/components/ui/Button.d.cts +4 -8
- package/dist/components/ui/Button.d.ts +4 -8
- package/dist/components/ui/Button.js +153 -8
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Checkbox.cjs +18 -28
- package/dist/components/ui/Checkbox.cjs.map +1 -1
- package/dist/components/ui/Checkbox.js +18 -28
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/Chip.cjs +12 -2
- package/dist/components/ui/Chip.cjs.map +1 -1
- package/dist/components/ui/Chip.d.cts +2 -3
- package/dist/components/ui/Chip.d.ts +2 -3
- package/dist/components/ui/Chip.js +2 -2
- package/dist/components/ui/Chip.js.map +1 -1
- package/dist/components/ui/Combobox.cjs +171 -233
- package/dist/components/ui/Combobox.cjs.map +1 -1
- package/dist/components/ui/Combobox.js +171 -233
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/Counter.cjs +56 -74
- package/dist/components/ui/Counter.cjs.map +1 -1
- package/dist/components/ui/Counter.js +56 -74
- package/dist/components/ui/Counter.js.map +1 -1
- package/dist/components/ui/DatePicker.cjs +44 -68
- package/dist/components/ui/DatePicker.cjs.map +1 -1
- package/dist/components/ui/DatePicker.js +44 -68
- package/dist/components/ui/DatePicker.js.map +1 -1
- package/dist/components/ui/DismissibleBanner.cjs +13 -16
- package/dist/components/ui/DismissibleBanner.cjs.map +1 -1
- package/dist/components/ui/DismissibleBanner.d.cts +2 -2
- package/dist/components/ui/DismissibleBanner.d.ts +2 -2
- package/dist/components/ui/DismissibleBanner.js +13 -16
- package/dist/components/ui/DismissibleBanner.js.map +1 -1
- package/dist/components/ui/ErrorMessage.cjs +1 -2
- package/dist/components/ui/ErrorMessage.cjs.map +1 -1
- package/dist/components/ui/ErrorMessage.d.cts +2 -2
- package/dist/components/ui/ErrorMessage.d.ts +2 -2
- package/dist/components/ui/ErrorMessage.js +1 -2
- package/dist/components/ui/ErrorMessage.js.map +1 -1
- package/dist/components/ui/Icon.cjs +1 -2
- package/dist/components/ui/Icon.cjs.map +1 -1
- package/dist/components/ui/Icon.js +1 -2
- package/dist/components/ui/Icon.js.map +1 -1
- package/dist/components/ui/Input.cjs +48 -68
- package/dist/components/ui/Input.cjs.map +1 -1
- package/dist/components/ui/Input.js +48 -68
- package/dist/components/ui/Input.js.map +1 -1
- package/dist/components/ui/InputOtp.cjs +56 -73
- package/dist/components/ui/InputOtp.cjs.map +1 -1
- package/dist/components/ui/InputOtp.js +56 -73
- package/dist/components/ui/InputOtp.js.map +1 -1
- package/dist/components/ui/Label.cjs +14 -24
- package/dist/components/ui/Label.cjs.map +1 -1
- package/dist/components/ui/Label.d.cts +2 -2
- package/dist/components/ui/Label.d.ts +2 -2
- package/dist/components/ui/Label.js +14 -24
- package/dist/components/ui/Label.js.map +1 -1
- package/dist/components/ui/LinkButton.cjs +5 -5
- package/dist/components/ui/LinkButton.cjs.map +1 -1
- package/dist/components/ui/LinkButton.d.cts +1 -2
- package/dist/components/ui/LinkButton.d.ts +1 -2
- package/dist/components/ui/LinkButton.js +5 -5
- package/dist/components/ui/LinkButton.js.map +1 -1
- package/dist/components/ui/ListItem.cjs +32 -48
- package/dist/components/ui/ListItem.cjs.map +1 -1
- package/dist/components/ui/ListItem.d.cts +2 -2
- package/dist/components/ui/ListItem.d.ts +2 -2
- package/dist/components/ui/ListItem.js +32 -48
- package/dist/components/ui/ListItem.js.map +1 -1
- package/dist/components/ui/Map/ClusterMarker.cjs +80 -0
- package/dist/components/ui/Map/ClusterMarker.cjs.map +1 -0
- package/dist/components/ui/Map/ClusterMarker.d.cts +6 -0
- package/dist/components/ui/Map/ClusterMarker.d.ts +6 -0
- package/dist/components/ui/Map/ClusterMarker.js +56 -0
- package/dist/components/ui/Map/ClusterMarker.js.map +1 -0
- package/dist/components/ui/Map/FocusCircle.cjs +86 -0
- package/dist/components/ui/Map/FocusCircle.cjs.map +1 -0
- package/dist/components/ui/Map/FocusCircle.d.cts +5 -0
- package/dist/components/ui/Map/FocusCircle.d.ts +5 -0
- package/dist/components/ui/Map/FocusCircle.js +62 -0
- package/dist/components/ui/Map/FocusCircle.js.map +1 -0
- package/dist/components/ui/Map/IndividualMarker.cjs +60 -0
- package/dist/components/ui/Map/IndividualMarker.cjs.map +1 -0
- package/dist/components/ui/Map/IndividualMarker.d.cts +6 -0
- package/dist/components/ui/Map/IndividualMarker.d.ts +6 -0
- package/dist/components/ui/Map/IndividualMarker.js +36 -0
- package/dist/components/ui/Map/IndividualMarker.js.map +1 -0
- package/dist/components/ui/Map/MapComponent.cjs +401 -0
- package/dist/components/ui/Map/MapComponent.cjs.map +1 -0
- package/dist/components/ui/Map/MapComponent.d.cts +6 -0
- package/dist/components/ui/Map/MapComponent.d.ts +6 -0
- package/dist/components/ui/Map/MapComponent.js +367 -0
- package/dist/components/ui/Map/MapComponent.js.map +1 -0
- package/dist/components/ui/Map/MapContent.cjs +279 -0
- package/dist/components/ui/Map/MapContent.cjs.map +1 -0
- package/dist/components/ui/Map/MapContent.d.cts +6 -0
- package/dist/components/ui/Map/MapContent.d.ts +6 -0
- package/dist/components/ui/Map/MapContent.js +255 -0
- package/dist/components/ui/Map/MapContent.js.map +1 -0
- package/dist/components/ui/Map/clustering.cjs +105 -0
- package/dist/components/ui/Map/clustering.cjs.map +1 -0
- package/dist/components/ui/Map/clustering.d.cts +17 -0
- package/dist/components/ui/Map/clustering.d.ts +17 -0
- package/dist/components/ui/Map/clustering.js +77 -0
- package/dist/components/ui/Map/clustering.js.map +1 -0
- package/dist/components/ui/Map/constants.cjs +65 -0
- package/dist/components/ui/Map/constants.cjs.map +1 -0
- package/dist/components/ui/Map/constants.d.cts +28 -0
- package/dist/components/ui/Map/constants.d.ts +28 -0
- package/dist/components/ui/Map/constants.js +34 -0
- package/dist/components/ui/Map/constants.js.map +1 -0
- package/dist/components/ui/Map/hooks.cjs +96 -0
- package/dist/components/ui/Map/hooks.cjs.map +1 -0
- package/dist/components/ui/Map/hooks.d.cts +17 -0
- package/dist/components/ui/Map/hooks.d.ts +17 -0
- package/dist/components/ui/Map/hooks.js +59 -0
- package/dist/components/ui/Map/hooks.js.map +1 -0
- package/dist/components/ui/Map/index.cjs +402 -0
- package/dist/components/ui/Map/index.cjs.map +1 -0
- package/dist/components/ui/Map/index.d.cts +3 -0
- package/dist/components/ui/Map/index.d.ts +3 -0
- package/dist/components/ui/Map/index.js +365 -0
- package/dist/components/ui/Map/index.js.map +1 -0
- package/dist/components/ui/Map/types.cjs +19 -0
- package/dist/components/ui/Map/types.cjs.map +1 -0
- package/dist/components/ui/Map/types.d.cts +82 -0
- package/dist/components/ui/Map/types.d.ts +82 -0
- package/dist/components/ui/Map/types.js +1 -0
- package/dist/components/ui/Map/types.js.map +1 -0
- package/dist/components/ui/Map/utils.cjs +80 -0
- package/dist/components/ui/Map/utils.cjs.map +1 -0
- package/dist/components/ui/Map/utils.d.cts +9 -0
- package/dist/components/ui/Map/utils.d.ts +9 -0
- package/dist/components/ui/Map/utils.js +49 -0
- package/dist/components/ui/Map/utils.js.map +1 -0
- package/dist/components/ui/PlacesQueryInput.cjs +71 -94
- package/dist/components/ui/PlacesQueryInput.cjs.map +1 -1
- package/dist/components/ui/PlacesQueryInput.d.cts +2 -2
- package/dist/components/ui/PlacesQueryInput.d.ts +2 -2
- package/dist/components/ui/PlacesQueryInput.js +71 -94
- package/dist/components/ui/PlacesQueryInput.js.map +1 -1
- package/dist/components/ui/Radio.cjs +49 -69
- package/dist/components/ui/Radio.cjs.map +1 -1
- package/dist/components/ui/Radio.js +49 -69
- package/dist/components/ui/Radio.js.map +1 -1
- package/dist/components/ui/ReadMore.cjs +163 -25
- package/dist/components/ui/ReadMore.cjs.map +1 -1
- package/dist/components/ui/ReadMore.d.cts +2 -2
- package/dist/components/ui/ReadMore.d.ts +2 -2
- package/dist/components/ui/ReadMore.js +163 -25
- package/dist/components/ui/ReadMore.js.map +1 -1
- package/dist/components/ui/Select.cjs +139 -160
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.cts +10 -2
- package/dist/components/ui/Select.d.ts +10 -2
- package/dist/components/ui/Select.js +133 -154
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/components/ui/StepTabs.cjs +24 -27
- package/dist/components/ui/StepTabs.cjs.map +1 -1
- package/dist/components/ui/StepTabs.d.cts +3 -3
- package/dist/components/ui/StepTabs.d.ts +3 -3
- package/dist/components/ui/StepTabs.js +24 -27
- package/dist/components/ui/StepTabs.js.map +1 -1
- package/dist/components/ui/Switch.cjs +13 -21
- package/dist/components/ui/Switch.cjs.map +1 -1
- package/dist/components/ui/Switch.js +13 -21
- package/dist/components/ui/Switch.js.map +1 -1
- package/dist/components/ui/buttonShadcn.cjs +1 -2
- package/dist/components/ui/buttonShadcn.cjs.map +1 -1
- package/dist/components/ui/buttonShadcn.js +1 -2
- package/dist/components/ui/buttonShadcn.js.map +1 -1
- package/dist/components/ui/calendar.cjs +5 -6
- package/dist/components/ui/calendar.cjs.map +1 -1
- package/dist/components/ui/calendar.d.cts +1 -2
- package/dist/components/ui/calendar.d.ts +1 -2
- package/dist/components/ui/calendar.js +5 -6
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/contexts/WindowHistoryProvider.cjs +1 -2
- package/dist/contexts/WindowHistoryProvider.cjs.map +1 -1
- package/dist/contexts/WindowHistoryProvider.d.cts +1 -2
- package/dist/contexts/WindowHistoryProvider.d.ts +1 -2
- package/dist/contexts/WindowHistoryProvider.js +1 -2
- package/dist/contexts/WindowHistoryProvider.js.map +1 -1
- package/dist/{displayText-DahwdHdi.d.ts → displayText-DIxMXVLl.d.ts} +2 -2
- package/dist/{displayText-DW0qiJqh.d.cts → displayText-DRyxjHTZ.d.cts} +2 -2
- package/dist/hooks/useDisplayText.d.cts +3 -3
- package/dist/hooks/useDisplayText.d.ts +3 -3
- package/dist/hooks/useWindowHistory.cjs +0 -1
- package/dist/hooks/useWindowHistory.cjs.map +1 -1
- package/dist/hooks/useWindowHistory.d.cts +0 -1
- package/dist/hooks/useWindowHistory.d.ts +0 -1
- package/dist/hooks/useWindowHistory.js +0 -1
- package/dist/hooks/useWindowHistory.js.map +1 -1
- package/dist/index.cjs +1344 -1099
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +1294 -1049
- package/dist/index.js.map +1 -1
- package/dist/{job_posting_service_latest-C_TEBzCf.d.cts → job_posting_service_latest-7q4A7RpW.d.cts} +1171 -1171
- package/dist/{job_posting_service_latest-C_TEBzCf.d.ts → job_posting_service_latest-7q4A7RpW.d.ts} +1171 -1171
- package/dist/{job_posting_service_latest-DdgK8Nnz.d.cts → job_posting_service_latest-BrZndMS6.d.cts} +1171 -1171
- package/dist/{job_posting_service_latest-DdgK8Nnz.d.ts → job_posting_service_latest-BrZndMS6.d.ts} +1171 -1171
- package/dist/{job_posting_service_sanity-BNq-Am9N.d.cts → job_posting_service_sanity-B5NZ-7tI.d.cts} +2126 -2126
- package/dist/{job_posting_service_sanity-BKo9TBDT.d.ts → job_posting_service_sanity-LlRkfIpt.d.ts} +2126 -2126
- package/dist/lib/locations.d.cts +3 -3
- package/dist/lib/locations.d.ts +3 -3
- package/dist/lib/mappings.d.cts +3 -3
- package/dist/lib/mappings.d.ts +3 -3
- package/dist/lib/salaryRange.d.cts +1 -1
- package/dist/lib/salaryRange.d.ts +1 -1
- package/dist/services/displayText.d.cts +3 -3
- package/dist/services/displayText.d.ts +3 -3
- package/dist/styles/globals.css +173 -6
- package/dist/styles/globals.css.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/job_posting_service_latest.d.cts +1 -1
- package/dist/types/data/job_posting_service_latest.d.ts +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/index.d.cts +6 -6
- package/dist/types/index.d.ts +6 -6
- package/dist/types/latest/company_service_latest.d.cts +1 -1
- package/dist/types/latest/company_service_latest.d.ts +1 -1
- package/dist/types/latest/custom/company_service_sanity.d.cts +3 -3
- package/dist/types/latest/custom/company_service_sanity.d.ts +3 -3
- package/dist/types/latest/custom/job_posting_service_sanity.d.cts +3 -3
- package/dist/types/latest/custom/job_posting_service_sanity.d.ts +3 -3
- package/dist/types/latest/job_posting_service_latest.d.cts +1 -1
- package/dist/types/latest/job_posting_service_latest.d.ts +1 -1
- package/dist/types/latest/shared_pickle_output_latest.d.cts +1 -1
- package/dist/types/latest/shared_pickle_output_latest.d.ts +1 -1
- package/package.json +4 -3
- package/dist/components/ui/MapComponent.cjs +0 -61
- package/dist/components/ui/MapComponent.cjs.map +0 -1
- package/dist/components/ui/MapComponent.d.cts +0 -15
- package/dist/components/ui/MapComponent.d.ts +0 -15
- package/dist/components/ui/MapComponent.js +0 -41
- package/dist/components/ui/MapComponent.js.map +0 -1
- package/dist/{company_service_latest-CITz7F53.d.cts → company_service_latest-BwbaqchJ.d.cts} +1220 -1220
- package/dist/{company_service_latest-CITz7F53.d.ts → company_service_latest-BwbaqchJ.d.ts} +1220 -1220
- package/dist/{company_service_latest-C7Moeufo.d.cts → company_service_latest-FHqG4LjA.d.cts} +1220 -1220
- package/dist/{company_service_latest-C7Moeufo.d.ts → company_service_latest-FHqG4LjA.d.ts} +1220 -1220
- package/dist/{shared_pickle_output_latest-CXBCG04N.d.cts → shared_pickle_output_latest-CKHNY1lx.d.cts} +42 -42
- package/dist/{shared_pickle_output_latest-CXBCG04N.d.ts → shared_pickle_output_latest-CKHNY1lx.d.ts} +42 -42
- package/dist/{shared_pickle_output_latest-CtvHTPeX.d.cts → shared_pickle_output_latest-DIPgxUul.d.cts} +42 -42
- package/dist/{shared_pickle_output_latest-CtvHTPeX.d.ts → shared_pickle_output_latest-DIPgxUul.d.ts} +42 -42
package/dist/index.cjs
CHANGED
|
@@ -55,7 +55,7 @@ __export(index_exports, {
|
|
|
55
55
|
Label: () => Label_default,
|
|
56
56
|
LinkButton: () => LinkButton,
|
|
57
57
|
ListItem: () => ListItem_default,
|
|
58
|
-
MapComponent: () =>
|
|
58
|
+
MapComponent: () => MapComponent,
|
|
59
59
|
PlacesQueryInput: () => PlacesQueryInput_default,
|
|
60
60
|
Radio: () => Radio,
|
|
61
61
|
ReadMore: () => ReadMore,
|
|
@@ -74,9 +74,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
74
74
|
|
|
75
75
|
// src/components/ui/Chip.tsx
|
|
76
76
|
var import_cva = require("cva");
|
|
77
|
+
var import_react = __toESM(require("react"), 1);
|
|
77
78
|
var import_tailwind_merge = require("tailwind-merge");
|
|
78
|
-
var
|
|
79
|
-
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_tailwind_merge.twMerge)(chipVariants({ variant, size, className })), ...props });
|
|
79
|
+
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_tailwind_merge.twMerge)(chipVariants({ variant, size, className })), ...props });
|
|
80
80
|
var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
81
81
|
variants: {
|
|
82
82
|
variant: {
|
|
@@ -102,7 +102,7 @@ var Chip_default = Chip;
|
|
|
102
102
|
// src/components/ui/Input.tsx
|
|
103
103
|
var import_cva2 = require("cva");
|
|
104
104
|
var import_lucide_react2 = require("lucide-react");
|
|
105
|
-
var
|
|
105
|
+
var import_react2 = require("react");
|
|
106
106
|
|
|
107
107
|
// src/lib/utils.ts
|
|
108
108
|
var import_clsx = require("clsx");
|
|
@@ -112,10 +112,9 @@ function cn(...inputs) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// src/components/ui/ErrorMessage.tsx
|
|
115
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
116
115
|
function ErrorMessage({ message, className, ...props }) {
|
|
117
116
|
if (!message) return null;
|
|
118
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
119
118
|
}
|
|
120
119
|
var ErrorMessage_default = ErrorMessage;
|
|
121
120
|
|
|
@@ -124,12 +123,11 @@ var import_lucide_react = require("lucide-react");
|
|
|
124
123
|
|
|
125
124
|
// src/components/primitives/tooltip.tsx
|
|
126
125
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
127
|
-
var
|
|
128
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
126
|
+
var React3 = __toESM(require("react"), 1);
|
|
129
127
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
130
128
|
var Tooltip = TooltipPrimitive.Root;
|
|
131
129
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
132
|
-
var TooltipContent =
|
|
130
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
133
131
|
TooltipPrimitive.Content,
|
|
134
132
|
{
|
|
135
133
|
ref,
|
|
@@ -144,35 +142,25 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
144
142
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
145
143
|
|
|
146
144
|
// src/components/ui/Label.tsx
|
|
147
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
148
145
|
function Label({ text, required, description, className, ...props }) {
|
|
149
146
|
if (!text) return null;
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Tooltip, { children: [
|
|
166
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
|
|
167
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
168
|
-
] }) })
|
|
169
|
-
] });
|
|
147
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
148
|
+
"label",
|
|
149
|
+
{
|
|
150
|
+
className: cn(
|
|
151
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
152
|
+
className
|
|
153
|
+
),
|
|
154
|
+
...props
|
|
155
|
+
},
|
|
156
|
+
text,
|
|
157
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
158
|
+
), !!description && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(import_lucide_react.InfoIcon, { className: "h-4 w-4" })), /* @__PURE__ */ React.createElement(TooltipContent, { className: "max-w-48" }, description))));
|
|
170
159
|
}
|
|
171
160
|
var Label_default = Label;
|
|
172
161
|
|
|
173
162
|
// src/components/ui/Input.tsx
|
|
174
|
-
var
|
|
175
|
-
var Input = (0, import_react.forwardRef)(
|
|
163
|
+
var Input = (0, import_react2.forwardRef)(
|
|
176
164
|
({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
177
165
|
const handleClear = () => {
|
|
178
166
|
onChange?.({ target: { value: "" } });
|
|
@@ -182,47 +170,39 @@ var Input = (0, import_react.forwardRef)(
|
|
|
182
170
|
const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
|
|
183
171
|
const hasIcon = !!icon;
|
|
184
172
|
const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
),
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
219
|
-
onClick: handleClear,
|
|
220
|
-
"data-testid": "clear-button"
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
] }),
|
|
224
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ErrorMessage_default, { message: error })
|
|
225
|
-
] });
|
|
173
|
+
return /* @__PURE__ */ React.createElement("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}` }, label && /* @__PURE__ */ React.createElement(
|
|
174
|
+
Label_default,
|
|
175
|
+
{
|
|
176
|
+
text: label,
|
|
177
|
+
htmlFor: props.name,
|
|
178
|
+
required: props.required,
|
|
179
|
+
description,
|
|
180
|
+
className: classNames?.label
|
|
181
|
+
}
|
|
182
|
+
), /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, IconComponent && /* @__PURE__ */ React.createElement(
|
|
183
|
+
IconComponent,
|
|
184
|
+
{
|
|
185
|
+
className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
|
|
186
|
+
}
|
|
187
|
+
), /* @__PURE__ */ React.createElement(
|
|
188
|
+
"input",
|
|
189
|
+
{
|
|
190
|
+
className: cn(inputVariants({ theme, hasIcon })),
|
|
191
|
+
ref,
|
|
192
|
+
placeholder,
|
|
193
|
+
value,
|
|
194
|
+
onChange,
|
|
195
|
+
"data-testid": `input-element-${props.id}`,
|
|
196
|
+
...props
|
|
197
|
+
}
|
|
198
|
+
), hasIcon && value && /* @__PURE__ */ React.createElement(
|
|
199
|
+
import_lucide_react2.X,
|
|
200
|
+
{
|
|
201
|
+
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
202
|
+
onClick: handleClear,
|
|
203
|
+
"data-testid": "clear-button"
|
|
204
|
+
}
|
|
205
|
+
)), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
226
206
|
}
|
|
227
207
|
);
|
|
228
208
|
Input.displayName = "Input";
|
|
@@ -283,9 +263,8 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
283
263
|
// src/components/ui/Checkbox.tsx
|
|
284
264
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
285
265
|
var import_lucide_react3 = require("lucide-react");
|
|
286
|
-
var
|
|
287
|
-
var
|
|
288
|
-
var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
266
|
+
var import_react3 = require("react");
|
|
267
|
+
var CheckboxToggle = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
289
268
|
CheckboxPrimitive.Root,
|
|
290
269
|
{
|
|
291
270
|
ref,
|
|
@@ -314,41 +293,32 @@ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref
|
|
|
314
293
|
props.disabled && "bg-grey-20 data-[state=checked]:bg-grey-20 data-[state=checked]:text-foreground",
|
|
315
294
|
className
|
|
316
295
|
),
|
|
317
|
-
...props
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
|
|
321
|
-
] })
|
|
322
|
-
}
|
|
296
|
+
...props
|
|
297
|
+
},
|
|
298
|
+
/* @__PURE__ */ React.createElement(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current" }, /* @__PURE__ */ React.createElement(import_lucide_react3.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }), /* @__PURE__ */ React.createElement(import_lucide_react3.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" }))
|
|
323
299
|
));
|
|
324
300
|
CheckboxToggle.displayName = CheckboxPrimitive.Root.displayName;
|
|
325
|
-
var Checkbox = (0,
|
|
301
|
+
var Checkbox = (0, import_react3.forwardRef)(
|
|
326
302
|
({ error, classNames, children, ...props }, ref) => {
|
|
327
303
|
const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
|
|
328
|
-
return /* @__PURE__ */
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
)
|
|
345
|
-
] });
|
|
304
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex space-x-2", classNames?.wrapper) }, /* @__PURE__ */ React.createElement(CheckboxToggle, { id, ref, ...props }), /* @__PURE__ */ React.createElement(
|
|
305
|
+
"label",
|
|
306
|
+
{
|
|
307
|
+
htmlFor: id,
|
|
308
|
+
className: cn(
|
|
309
|
+
"text-sm",
|
|
310
|
+
props.disabled && "pointer-events-none text-grey-40",
|
|
311
|
+
classNames?.label
|
|
312
|
+
)
|
|
313
|
+
},
|
|
314
|
+
children,
|
|
315
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
316
|
+
));
|
|
346
317
|
}
|
|
347
318
|
);
|
|
348
319
|
Checkbox.displayName = "Checkbox";
|
|
349
320
|
|
|
350
321
|
// src/components/ui/ListItem.tsx
|
|
351
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
352
322
|
function ListItem({
|
|
353
323
|
icon,
|
|
354
324
|
hasCheckbox,
|
|
@@ -362,12 +332,12 @@ function ListItem({
|
|
|
362
332
|
const getIconIfValid = (icon2) => {
|
|
363
333
|
if (icon2 in import_lucide_react5.icons) {
|
|
364
334
|
const IconComponent = import_lucide_react5.icons[icon2];
|
|
365
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ React.createElement(IconComponent, { size: 14 });
|
|
366
336
|
}
|
|
367
337
|
return null;
|
|
368
338
|
};
|
|
369
339
|
const optionIcon = icon ? getIconIfValid(icon) : void 0;
|
|
370
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ React.createElement(
|
|
371
341
|
"li",
|
|
372
342
|
{
|
|
373
343
|
className: cn(
|
|
@@ -375,70 +345,392 @@ function ListItem({
|
|
|
375
345
|
className
|
|
376
346
|
),
|
|
377
347
|
...props,
|
|
378
|
-
"data-state": isSelected ? "checked" : "unchecked"
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
size: 16
|
|
391
|
-
}
|
|
392
|
-
)
|
|
393
|
-
]
|
|
394
|
-
}
|
|
348
|
+
"data-state": isSelected ? "checked" : "unchecked"
|
|
349
|
+
},
|
|
350
|
+
optionIcon && /* @__PURE__ */ React.createElement("span", { className: "mr-2" }, optionIcon),
|
|
351
|
+
hasCheckbox && /* @__PURE__ */ React.createElement(Checkbox, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
|
|
352
|
+
/* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, title), /* @__PURE__ */ React.createElement("p", { className: "text-xs text-grey-80" }, description)),
|
|
353
|
+
/* @__PURE__ */ React.createElement(
|
|
354
|
+
import_lucide_react4.CheckIcon,
|
|
355
|
+
{
|
|
356
|
+
className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
|
|
357
|
+
size: 16
|
|
358
|
+
}
|
|
359
|
+
)
|
|
395
360
|
);
|
|
396
361
|
}
|
|
397
362
|
var ListItem_default = ListItem;
|
|
398
363
|
|
|
399
|
-
// src/components/ui/MapComponent.tsx
|
|
364
|
+
// src/components/ui/Map/MapComponent.tsx
|
|
365
|
+
var import_react_google_maps4 = require("@vis.gl/react-google-maps");
|
|
366
|
+
|
|
367
|
+
// src/components/ui/Map/constants.ts
|
|
368
|
+
var DEFAULT_POSITION = { lat: 40.715021, lng: -74.00459 };
|
|
369
|
+
var DEFAULT_ZOOM = 10;
|
|
370
|
+
var CLUSTER_DISTANCE_THRESHOLD = 1e-3;
|
|
371
|
+
var PIN_COLORS = {
|
|
372
|
+
background: "#0B5441",
|
|
373
|
+
borderColor: "#EBFDF1",
|
|
374
|
+
glyphColor: "#D4F500"
|
|
375
|
+
};
|
|
376
|
+
var FOCUS_CIRCLE_STYLES = {
|
|
377
|
+
strokeColor: "#0B5441",
|
|
378
|
+
strokeOpacity: 0.8,
|
|
379
|
+
strokeWeight: 2,
|
|
380
|
+
fillColor: "#0B5441",
|
|
381
|
+
fillOpacity: 0.1,
|
|
382
|
+
clickable: false,
|
|
383
|
+
zIndex: 1
|
|
384
|
+
};
|
|
385
|
+
var CLUSTERING_CONFIG = {
|
|
386
|
+
radius: 60,
|
|
387
|
+
maxZoom: 16,
|
|
388
|
+
minPoints: 2
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// src/components/ui/Map/hooks.ts
|
|
392
|
+
var import_react4 = require("react");
|
|
393
|
+
var import_use_supercluster = __toESM(require("use-supercluster"), 1);
|
|
394
|
+
|
|
395
|
+
// src/components/ui/Map/utils.ts
|
|
396
|
+
function getCenterForCoordinates(coords) {
|
|
397
|
+
if (coords.length === 0) return DEFAULT_POSITION;
|
|
398
|
+
const avgLat = coords.reduce((sum, coord) => sum + coord.lat, 0) / coords.length;
|
|
399
|
+
const avgLng = coords.reduce((sum, coord) => sum + coord.lng, 0) / coords.length;
|
|
400
|
+
return { lat: avgLat, lng: avgLng };
|
|
401
|
+
}
|
|
402
|
+
function getZoomForCoordinates(coords, defaultZoom) {
|
|
403
|
+
if (coords.length <= 1) return defaultZoom;
|
|
404
|
+
const lats = coords.map((coord) => coord.lat);
|
|
405
|
+
const lngs = coords.map((coord) => coord.lng);
|
|
406
|
+
const latDiff = Math.max(...lats) - Math.min(...lats);
|
|
407
|
+
const lngDiff = Math.max(...lngs) - Math.min(...lngs);
|
|
408
|
+
const maxDiff = Math.max(latDiff, lngDiff);
|
|
409
|
+
if (maxDiff > 0.1) return 8;
|
|
410
|
+
if (maxDiff > 0.05) return 10;
|
|
411
|
+
if (maxDiff > 0.01) return 12;
|
|
412
|
+
return 14;
|
|
413
|
+
}
|
|
414
|
+
function filterClusterCoordinates(coordinates, clusterLat, clusterLng) {
|
|
415
|
+
return coordinates.filter((coord) => {
|
|
416
|
+
const latDiff = Math.abs(coord.lat - clusterLat);
|
|
417
|
+
const lngDiff = Math.abs(coord.lng - clusterLng);
|
|
418
|
+
const distance = Math.sqrt(latDiff * latDiff + lngDiff * lngDiff);
|
|
419
|
+
return distance < CLUSTER_DISTANCE_THRESHOLD;
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// src/components/ui/Map/clustering.ts
|
|
424
|
+
function convertCoordinatesToGeoJSON(coordinates) {
|
|
425
|
+
return coordinates.map((coord, index) => ({
|
|
426
|
+
type: "Feature",
|
|
427
|
+
properties: {
|
|
428
|
+
cluster: false,
|
|
429
|
+
pointId: index,
|
|
430
|
+
data: coord.data
|
|
431
|
+
},
|
|
432
|
+
geometry: {
|
|
433
|
+
type: "Point",
|
|
434
|
+
coordinates: [coord.lng, coord.lat]
|
|
435
|
+
}
|
|
436
|
+
}));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// src/components/ui/Map/hooks.ts
|
|
440
|
+
function useMapBounds(_coordinates) {
|
|
441
|
+
const [bounds, setBounds] = (0, import_react4.useState)([
|
|
442
|
+
[-180, -85],
|
|
443
|
+
[180, 85]
|
|
444
|
+
]);
|
|
445
|
+
return { bounds, setBounds };
|
|
446
|
+
}
|
|
447
|
+
function useZoomLevel(initialZoom) {
|
|
448
|
+
const [zoomLevel, setZoomLevel] = (0, import_react4.useState)(initialZoom);
|
|
449
|
+
return { zoomLevel, setZoomLevel };
|
|
450
|
+
}
|
|
451
|
+
function useClusters(coordinates, bounds, zoomLevel) {
|
|
452
|
+
const points = (0, import_react4.useMemo)(() => {
|
|
453
|
+
if (!coordinates) return [];
|
|
454
|
+
return convertCoordinatesToGeoJSON(coordinates);
|
|
455
|
+
}, [coordinates]);
|
|
456
|
+
const { clusters, supercluster } = (0, import_use_supercluster.default)({
|
|
457
|
+
points,
|
|
458
|
+
bounds: [-180, -85, 180, 85],
|
|
459
|
+
// Use global bounds for consistency
|
|
460
|
+
zoom: zoomLevel || 10,
|
|
461
|
+
options: CLUSTERING_CONFIG
|
|
462
|
+
});
|
|
463
|
+
return { clusters, supercluster };
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// src/components/ui/Map/MapContent.tsx
|
|
467
|
+
var import_react_google_maps3 = require("@vis.gl/react-google-maps");
|
|
468
|
+
var import_react6 = require("react");
|
|
469
|
+
|
|
470
|
+
// src/components/ui/Map/ClusterMarker.tsx
|
|
400
471
|
var import_react_google_maps = require("@vis.gl/react-google-maps");
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
472
|
+
function ClusterMarker({
|
|
473
|
+
cluster,
|
|
474
|
+
coordinates,
|
|
475
|
+
onPinClick,
|
|
476
|
+
onPinHover,
|
|
477
|
+
zoomToLevel,
|
|
478
|
+
supercluster
|
|
479
|
+
}) {
|
|
480
|
+
const [lng, lat] = cluster.geometry.coordinates;
|
|
481
|
+
const { point_count: pointCount } = cluster.properties;
|
|
482
|
+
const handleClick = () => {
|
|
483
|
+
const clusterCoordinates = filterClusterCoordinates(coordinates, lat, lng);
|
|
484
|
+
onPinClick?.(clusterCoordinates);
|
|
485
|
+
const expansionZoom = supercluster.getClusterExpansionZoom(cluster.id);
|
|
486
|
+
zoomToLevel(expansionZoom);
|
|
487
|
+
};
|
|
488
|
+
const handleMouseEnter = () => {
|
|
489
|
+
const clusterCoordinates = filterClusterCoordinates(coordinates, lat, lng);
|
|
490
|
+
onPinHover?.(clusterCoordinates);
|
|
491
|
+
};
|
|
492
|
+
const handleMouseLeave = () => onPinHover?.(null);
|
|
493
|
+
return /* @__PURE__ */ React.createElement(
|
|
494
|
+
import_react_google_maps.AdvancedMarker,
|
|
495
|
+
{
|
|
496
|
+
key: `cluster-${cluster.id}`,
|
|
497
|
+
position: { lat, lng },
|
|
498
|
+
onClick: handleClick,
|
|
499
|
+
onMouseEnter: handleMouseEnter,
|
|
500
|
+
onMouseLeave: handleMouseLeave
|
|
501
|
+
},
|
|
502
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex items-center justify-center", id: "CLUSTER_MARKER" }, /* @__PURE__ */ React.createElement("div", { className: "flex h-8 w-8 items-center justify-center rounded-full border-2 border-white bg-red-500 text-sm font-bold text-white shadow-lg" }, pointCount || "?"))
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// src/components/ui/Map/FocusCircle.tsx
|
|
507
|
+
var import_react5 = require("react");
|
|
508
|
+
function FocusCircle({
|
|
509
|
+
focusPoint,
|
|
510
|
+
radiusMiles,
|
|
511
|
+
map,
|
|
512
|
+
mapsLibrary
|
|
513
|
+
}) {
|
|
514
|
+
const circleRef = (0, import_react5.useRef)(null);
|
|
515
|
+
const circleProps = (0, import_react5.useMemo)(() => {
|
|
516
|
+
if (!focusPoint || !radiusMiles) return null;
|
|
517
|
+
return {
|
|
518
|
+
center: focusPoint,
|
|
519
|
+
radius: radiusMiles * 1609.34
|
|
520
|
+
};
|
|
521
|
+
}, [focusPoint, radiusMiles]);
|
|
522
|
+
(0, import_react5.useEffect)(() => {
|
|
523
|
+
if (!map || !mapsLibrary || !circleProps) {
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (!circleRef.current) {
|
|
527
|
+
const circle = new google.maps.Circle({
|
|
528
|
+
center: circleProps.center,
|
|
529
|
+
radius: circleProps.radius,
|
|
530
|
+
...FOCUS_CIRCLE_STYLES,
|
|
531
|
+
map
|
|
532
|
+
});
|
|
533
|
+
circleRef.current = circle;
|
|
534
|
+
} else {
|
|
535
|
+
circleRef.current.setCenter(circleProps.center);
|
|
536
|
+
circleRef.current.setRadius(circleProps.radius);
|
|
537
|
+
}
|
|
538
|
+
}, [map, mapsLibrary, circleProps]);
|
|
539
|
+
(0, import_react5.useEffect)(() => {
|
|
540
|
+
return () => {
|
|
541
|
+
if (circleRef.current) {
|
|
542
|
+
circleRef.current.setMap(null);
|
|
543
|
+
circleRef.current = null;
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
}, []);
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// src/components/ui/Map/IndividualMarker.tsx
|
|
551
|
+
var import_react_google_maps2 = require("@vis.gl/react-google-maps");
|
|
552
|
+
function IndividualMarker({
|
|
553
|
+
coordinate,
|
|
554
|
+
onPinClick,
|
|
555
|
+
onPinHover
|
|
556
|
+
}) {
|
|
557
|
+
const handleMouseEnter = () => onPinHover?.(coordinate);
|
|
558
|
+
const handleMouseLeave = () => onPinHover?.(null);
|
|
559
|
+
const handleClick = () => onPinClick?.(coordinate);
|
|
560
|
+
return /* @__PURE__ */ React.createElement(
|
|
561
|
+
import_react_google_maps2.AdvancedMarker,
|
|
562
|
+
{
|
|
563
|
+
position: { lat: coordinate.lat, lng: coordinate.lng },
|
|
564
|
+
onMouseEnter: handleMouseEnter,
|
|
565
|
+
onMouseLeave: handleMouseLeave,
|
|
566
|
+
onClick: handleClick
|
|
567
|
+
},
|
|
568
|
+
/* @__PURE__ */ React.createElement(import_react_google_maps2.Pin, { ...PIN_COLORS })
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// src/components/ui/Map/MapContent.tsx
|
|
573
|
+
function MapContent({
|
|
404
574
|
mapId,
|
|
575
|
+
mapCenter,
|
|
576
|
+
mapZoom,
|
|
405
577
|
position,
|
|
578
|
+
coordinates,
|
|
579
|
+
clusters,
|
|
580
|
+
supercluster,
|
|
581
|
+
onPinHover,
|
|
582
|
+
onPinClick,
|
|
583
|
+
focusPoint,
|
|
584
|
+
radiusMiles,
|
|
406
585
|
className,
|
|
407
|
-
|
|
586
|
+
setBounds,
|
|
587
|
+
setZoomLevel
|
|
408
588
|
}) {
|
|
409
|
-
const
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
|
|
589
|
+
const map = (0, import_react_google_maps3.useMap)();
|
|
590
|
+
const mapsLibrary = (0, import_react_google_maps3.useMapsLibrary)("maps");
|
|
591
|
+
const zoomToLevel = (0, import_react6.useCallback)(
|
|
592
|
+
(newZoom) => {
|
|
593
|
+
if (map) {
|
|
594
|
+
map.setZoom(newZoom);
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
[map]
|
|
598
|
+
);
|
|
599
|
+
const handleBoundsChanged = (e) => {
|
|
600
|
+
if (e.detail.bounds) {
|
|
601
|
+
const bounds = e.detail.bounds;
|
|
602
|
+
setBounds([
|
|
603
|
+
[bounds.south, bounds.west],
|
|
604
|
+
[bounds.north, bounds.east]
|
|
605
|
+
]);
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
const handleZoomChanged = (e) => {
|
|
609
|
+
if (e.detail.zoom) {
|
|
610
|
+
setZoomLevel(e.detail.zoom);
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
const handleCameraChanged = (e) => {
|
|
614
|
+
if (e.detail.zoom) {
|
|
615
|
+
setZoomLevel(e.detail.zoom);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("relative h-screen max-w-full", className) }, /* @__PURE__ */ React.createElement(
|
|
619
|
+
import_react_google_maps3.Map,
|
|
413
620
|
{
|
|
414
|
-
defaultZoom:
|
|
415
|
-
|
|
621
|
+
defaultZoom: mapZoom,
|
|
622
|
+
defaultCenter: mapCenter,
|
|
416
623
|
mapId,
|
|
417
|
-
keyboardShortcuts:
|
|
624
|
+
keyboardShortcuts: true,
|
|
418
625
|
disableDefaultUI: true,
|
|
419
626
|
zoomControl: true,
|
|
420
|
-
|
|
627
|
+
onBoundsChanged: handleBoundsChanged,
|
|
628
|
+
onZoomChanged: handleZoomChanged,
|
|
629
|
+
onCameraChanged: handleCameraChanged
|
|
630
|
+
},
|
|
631
|
+
position && !coordinates && /* @__PURE__ */ React.createElement(import_react_google_maps3.AdvancedMarker, { position }, /* @__PURE__ */ React.createElement(import_react_google_maps3.Pin, { ...PIN_COLORS })),
|
|
632
|
+
coordinates && clusters.map((cluster) => {
|
|
633
|
+
const { cluster: isCluster } = cluster.properties;
|
|
634
|
+
if (isCluster) {
|
|
635
|
+
return /* @__PURE__ */ React.createElement(
|
|
636
|
+
ClusterMarker,
|
|
637
|
+
{
|
|
638
|
+
key: `cluster-${cluster.id}`,
|
|
639
|
+
cluster,
|
|
640
|
+
coordinates,
|
|
641
|
+
onPinClick,
|
|
642
|
+
onPinHover,
|
|
643
|
+
zoomToLevel,
|
|
644
|
+
supercluster
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
const originalPoint = coordinates[cluster.properties.pointId];
|
|
649
|
+
return /* @__PURE__ */ React.createElement(
|
|
650
|
+
IndividualMarker,
|
|
651
|
+
{
|
|
652
|
+
key: `marker-${cluster.properties.pointId}`,
|
|
653
|
+
coordinate: originalPoint,
|
|
654
|
+
onPinClick,
|
|
655
|
+
onPinHover
|
|
656
|
+
}
|
|
657
|
+
);
|
|
658
|
+
}),
|
|
659
|
+
coordinates && clusters.length === 0 && coordinates.map((coord, index) => /* @__PURE__ */ React.createElement(
|
|
660
|
+
IndividualMarker,
|
|
661
|
+
{
|
|
662
|
+
key: `fallback-${index}`,
|
|
663
|
+
coordinate: coord,
|
|
664
|
+
onPinClick,
|
|
665
|
+
onPinHover
|
|
666
|
+
}
|
|
667
|
+
)),
|
|
668
|
+
focusPoint && radiusMiles && /* @__PURE__ */ React.createElement(
|
|
669
|
+
FocusCircle,
|
|
670
|
+
{
|
|
671
|
+
focusPoint,
|
|
672
|
+
radiusMiles,
|
|
673
|
+
map,
|
|
674
|
+
mapsLibrary
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
));
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// src/components/ui/Map/MapComponent.tsx
|
|
681
|
+
function MapComponent({
|
|
682
|
+
apiKey,
|
|
683
|
+
mapId,
|
|
684
|
+
position,
|
|
685
|
+
coordinates,
|
|
686
|
+
onPinHover,
|
|
687
|
+
onPinClick,
|
|
688
|
+
focusPoint,
|
|
689
|
+
radiusMiles,
|
|
690
|
+
className,
|
|
691
|
+
zoom = 10
|
|
692
|
+
}) {
|
|
693
|
+
const { bounds, setBounds } = useMapBounds(coordinates);
|
|
694
|
+
const { zoomLevel, setZoomLevel } = useZoomLevel(zoom || DEFAULT_ZOOM);
|
|
695
|
+
const { clusters, supercluster } = useClusters(coordinates, bounds, zoomLevel);
|
|
696
|
+
const mapCenter = coordinates && coordinates.length > 0 ? getCenterForCoordinates(coordinates) : position || DEFAULT_POSITION;
|
|
697
|
+
const mapZoom = coordinates && coordinates.length > 1 ? getZoomForCoordinates(coordinates, zoom) : position ? zoom : DEFAULT_ZOOM;
|
|
698
|
+
return /* @__PURE__ */ React.createElement(import_react_google_maps4.APIProvider, { apiKey }, /* @__PURE__ */ React.createElement(
|
|
699
|
+
MapContent,
|
|
700
|
+
{
|
|
701
|
+
mapId,
|
|
702
|
+
mapCenter,
|
|
703
|
+
mapZoom,
|
|
704
|
+
position,
|
|
705
|
+
coordinates,
|
|
706
|
+
clusters,
|
|
707
|
+
supercluster,
|
|
708
|
+
onPinHover,
|
|
709
|
+
onPinClick,
|
|
710
|
+
focusPoint,
|
|
711
|
+
radiusMiles,
|
|
712
|
+
className,
|
|
713
|
+
setBounds,
|
|
714
|
+
setZoomLevel
|
|
421
715
|
}
|
|
422
|
-
)
|
|
716
|
+
));
|
|
423
717
|
}
|
|
424
|
-
var MapComponent_default = MapComponent;
|
|
425
718
|
|
|
426
719
|
// src/components/ui/PlacesQueryInput.tsx
|
|
427
720
|
var import_lucide_react8 = require("lucide-react");
|
|
428
|
-
var
|
|
721
|
+
var import_react7 = require("react");
|
|
429
722
|
|
|
430
723
|
// src/components/primitives/command.tsx
|
|
431
724
|
var import_cmdk = require("cmdk");
|
|
432
725
|
var import_lucide_react7 = require("lucide-react");
|
|
433
|
-
var
|
|
726
|
+
var React5 = __toESM(require("react"), 1);
|
|
434
727
|
|
|
435
728
|
// src/components/primitives/dialog.tsx
|
|
436
729
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
437
730
|
var import_lucide_react6 = require("lucide-react");
|
|
438
|
-
var
|
|
439
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
731
|
+
var React4 = __toESM(require("react"), 1);
|
|
440
732
|
var DialogPortal = DialogPrimitive.Portal;
|
|
441
|
-
var DialogOverlay =
|
|
733
|
+
var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
442
734
|
DialogPrimitive.Overlay,
|
|
443
735
|
{
|
|
444
736
|
ref,
|
|
@@ -450,31 +742,23 @@ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
450
742
|
}
|
|
451
743
|
));
|
|
452
744
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
453
|
-
var DialogContent =
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
className
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
/* @__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: [
|
|
467
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
|
|
468
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Close" })
|
|
469
|
-
] })
|
|
470
|
-
]
|
|
471
|
-
}
|
|
472
|
-
)
|
|
473
|
-
] }));
|
|
745
|
+
var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React4.createElement(DialogPortal, null, /* @__PURE__ */ React4.createElement(DialogOverlay, null), /* @__PURE__ */ React4.createElement(
|
|
746
|
+
DialogPrimitive.Content,
|
|
747
|
+
{
|
|
748
|
+
ref,
|
|
749
|
+
className: cn(
|
|
750
|
+
"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",
|
|
751
|
+
className
|
|
752
|
+
),
|
|
753
|
+
...props
|
|
754
|
+
},
|
|
755
|
+
children,
|
|
756
|
+
/* @__PURE__ */ React4.createElement(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" }, /* @__PURE__ */ React4.createElement(import_lucide_react6.X, { className: "h-4 w-4" }), /* @__PURE__ */ React4.createElement("span", { className: "sr-only" }, "Close"))
|
|
757
|
+
)));
|
|
474
758
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
475
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
759
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ React4.createElement("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
476
760
|
DialogHeader.displayName = "DialogHeader";
|
|
477
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
761
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ React4.createElement(
|
|
478
762
|
"div",
|
|
479
763
|
{
|
|
480
764
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -482,7 +766,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
482
766
|
}
|
|
483
767
|
);
|
|
484
768
|
DialogFooter.displayName = "DialogFooter";
|
|
485
|
-
var DialogTitle =
|
|
769
|
+
var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
486
770
|
DialogPrimitive.Title,
|
|
487
771
|
{
|
|
488
772
|
ref,
|
|
@@ -491,7 +775,7 @@ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
491
775
|
}
|
|
492
776
|
));
|
|
493
777
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
494
|
-
var DialogDescription =
|
|
778
|
+
var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
495
779
|
DialogPrimitive.Description,
|
|
496
780
|
{
|
|
497
781
|
ref,
|
|
@@ -502,8 +786,7 @@ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
502
786
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
503
787
|
|
|
504
788
|
// src/components/primitives/command.tsx
|
|
505
|
-
var
|
|
506
|
-
var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
789
|
+
var Command = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
507
790
|
import_cmdk.Command,
|
|
508
791
|
{
|
|
509
792
|
ref,
|
|
@@ -515,22 +798,19 @@ var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
515
798
|
}
|
|
516
799
|
));
|
|
517
800
|
Command.displayName = import_cmdk.Command.displayName;
|
|
518
|
-
var CommandInput =
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
className
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}
|
|
530
|
-
)
|
|
531
|
-
] }));
|
|
801
|
+
var CommandInput = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "" }, /* @__PURE__ */ React5.createElement(import_lucide_react7.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React5.createElement(
|
|
802
|
+
import_cmdk.Command.Input,
|
|
803
|
+
{
|
|
804
|
+
ref,
|
|
805
|
+
className: cn(
|
|
806
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
807
|
+
className
|
|
808
|
+
),
|
|
809
|
+
...props
|
|
810
|
+
}
|
|
811
|
+
)));
|
|
532
812
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
533
|
-
var CommandList =
|
|
813
|
+
var CommandList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
534
814
|
import_cmdk.Command.List,
|
|
535
815
|
{
|
|
536
816
|
ref,
|
|
@@ -539,9 +819,9 @@ var CommandList = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
539
819
|
}
|
|
540
820
|
));
|
|
541
821
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
542
|
-
var CommandEmpty =
|
|
822
|
+
var CommandEmpty = React5.forwardRef((props, ref) => /* @__PURE__ */ React5.createElement(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
543
823
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
544
|
-
var CommandGroup =
|
|
824
|
+
var CommandGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
545
825
|
import_cmdk.Command.Group,
|
|
546
826
|
{
|
|
547
827
|
ref,
|
|
@@ -553,7 +833,7 @@ var CommandGroup = React3.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
553
833
|
}
|
|
554
834
|
));
|
|
555
835
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
556
|
-
var CommandSeparator =
|
|
836
|
+
var CommandSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
557
837
|
import_cmdk.Command.Separator,
|
|
558
838
|
{
|
|
559
839
|
ref,
|
|
@@ -562,7 +842,7 @@ var CommandSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
562
842
|
}
|
|
563
843
|
));
|
|
564
844
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
565
|
-
var CommandItem =
|
|
845
|
+
var CommandItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
566
846
|
import_cmdk.Command.Item,
|
|
567
847
|
{
|
|
568
848
|
ref,
|
|
@@ -575,7 +855,7 @@ var CommandItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
575
855
|
));
|
|
576
856
|
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
577
857
|
var CommandShortcut = ({ className, ...props }) => {
|
|
578
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ React5.createElement(
|
|
579
859
|
"span",
|
|
580
860
|
{
|
|
581
861
|
className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
|
|
@@ -636,20 +916,19 @@ var geocode = async (address, key) => {
|
|
|
636
916
|
};
|
|
637
917
|
|
|
638
918
|
// src/components/ui/PlacesQueryInput.tsx
|
|
639
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
640
919
|
function PlacesQueryInput({
|
|
641
920
|
apiKey,
|
|
642
921
|
selected,
|
|
643
922
|
onSelect,
|
|
644
923
|
className
|
|
645
924
|
}) {
|
|
646
|
-
const [predictions, setPredictions] = (0,
|
|
647
|
-
const [input, setInput] = (0,
|
|
648
|
-
const [isLoadingPredictions, setIsLoadingPredictions] = (0,
|
|
649
|
-
const [shouldOpenUpward, setShouldOpenUpward] = (0,
|
|
650
|
-
const timeoutRef = (0,
|
|
651
|
-
const inputRef = (0,
|
|
652
|
-
const debouncedAutocomplete = (0,
|
|
925
|
+
const [predictions, setPredictions] = (0, import_react7.useState)(null);
|
|
926
|
+
const [input, setInput] = (0, import_react7.useState)(selected?.description ?? "");
|
|
927
|
+
const [isLoadingPredictions, setIsLoadingPredictions] = (0, import_react7.useState)(false);
|
|
928
|
+
const [shouldOpenUpward, setShouldOpenUpward] = (0, import_react7.useState)(false);
|
|
929
|
+
const timeoutRef = (0, import_react7.useRef)(null);
|
|
930
|
+
const inputRef = (0, import_react7.useRef)(null);
|
|
931
|
+
const debouncedAutocomplete = (0, import_react7.useCallback)((value) => {
|
|
653
932
|
if (timeoutRef.current) {
|
|
654
933
|
clearTimeout(timeoutRef.current);
|
|
655
934
|
}
|
|
@@ -685,7 +964,7 @@ function PlacesQueryInput({
|
|
|
685
964
|
setInput("");
|
|
686
965
|
};
|
|
687
966
|
const handleBlur = () => setTimeout(() => setPredictions(null), 200);
|
|
688
|
-
(0,
|
|
967
|
+
(0, import_react7.useEffect)(() => {
|
|
689
968
|
const checkDropdownPosition = () => {
|
|
690
969
|
if (inputRef.current) {
|
|
691
970
|
const rect = inputRef.current.getBoundingClientRect();
|
|
@@ -697,63 +976,53 @@ function PlacesQueryInput({
|
|
|
697
976
|
window.addEventListener("resize", checkDropdownPosition);
|
|
698
977
|
return () => window.removeEventListener("resize", checkDropdownPosition);
|
|
699
978
|
}, []);
|
|
700
|
-
return /* @__PURE__ */
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
979
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("relative w-full", className), ref: inputRef, onBlur: handleBlur }, /* @__PURE__ */ React.createElement(Command, null, /* @__PURE__ */ React.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React.createElement(
|
|
980
|
+
CommandInput,
|
|
981
|
+
{
|
|
982
|
+
placeholder: "Type an address to search...",
|
|
983
|
+
value: input,
|
|
984
|
+
onValueChange: handleInputChange,
|
|
985
|
+
className: "truncate pr-8"
|
|
986
|
+
}
|
|
987
|
+
), isLoadingPredictions && /* @__PURE__ */ React.createElement(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" }), input && /* @__PURE__ */ React.createElement(
|
|
988
|
+
"button",
|
|
989
|
+
{
|
|
990
|
+
type: "button",
|
|
991
|
+
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",
|
|
992
|
+
onClick: handleClear
|
|
993
|
+
},
|
|
994
|
+
/* @__PURE__ */ React.createElement(import_lucide_react8.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
995
|
+
)), predictions && /* @__PURE__ */ React.createElement(
|
|
996
|
+
CommandList,
|
|
997
|
+
{
|
|
998
|
+
className: cn(
|
|
999
|
+
"absolute z-50 w-full rounded-md border bg-white shadow-lg",
|
|
1000
|
+
shouldOpenUpward ? "bottom-full" : "top-full"
|
|
720
1001
|
)
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
1002
|
+
},
|
|
1003
|
+
/* @__PURE__ */ React.createElement(CommandEmpty, null, "No results"),
|
|
1004
|
+
/* @__PURE__ */ React.createElement(CommandGroup, null, predictions.map((prediction) => /* @__PURE__ */ React.createElement(
|
|
1005
|
+
CommandItem,
|
|
724
1006
|
{
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
CommandItem,
|
|
733
|
-
{
|
|
734
|
-
onSelect: () => handleSelect(prediction),
|
|
735
|
-
className: "truncate",
|
|
736
|
-
children: prediction.description
|
|
737
|
-
},
|
|
738
|
-
prediction.place_id
|
|
739
|
-
)) })
|
|
740
|
-
]
|
|
741
|
-
}
|
|
742
|
-
)
|
|
743
|
-
] }) });
|
|
1007
|
+
key: prediction.place_id,
|
|
1008
|
+
onSelect: () => handleSelect(prediction),
|
|
1009
|
+
className: "truncate"
|
|
1010
|
+
},
|
|
1011
|
+
prediction.description
|
|
1012
|
+
)))
|
|
1013
|
+
)));
|
|
744
1014
|
}
|
|
745
1015
|
var PlacesQueryInput_default = PlacesQueryInput;
|
|
746
1016
|
|
|
747
1017
|
// src/components/ui/Select.tsx
|
|
748
1018
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
749
1019
|
var import_lucide_react9 = require("lucide-react");
|
|
750
|
-
var
|
|
1020
|
+
var import_react8 = require("react");
|
|
751
1021
|
|
|
752
1022
|
// src/components/primitives/separator.tsx
|
|
753
1023
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
754
|
-
var
|
|
755
|
-
var
|
|
756
|
-
var Separator = React4.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1024
|
+
var React6 = __toESM(require("react"), 1);
|
|
1025
|
+
var Separator = React6.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
|
757
1026
|
SeparatorPrimitive.Root,
|
|
758
1027
|
{
|
|
759
1028
|
ref,
|
|
@@ -770,8 +1039,7 @@ var Separator = React4.forwardRef(({ className, orientation = "horizontal", deco
|
|
|
770
1039
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
771
1040
|
|
|
772
1041
|
// src/components/ui/Select.tsx
|
|
773
|
-
var
|
|
774
|
-
var Select = (0, import_react4.forwardRef)(
|
|
1042
|
+
var Select = (0, import_react8.forwardRef)(
|
|
775
1043
|
({
|
|
776
1044
|
label,
|
|
777
1045
|
options,
|
|
@@ -779,16 +1047,17 @@ var Select = (0, import_react4.forwardRef)(
|
|
|
779
1047
|
multiselect,
|
|
780
1048
|
description,
|
|
781
1049
|
classNames,
|
|
1050
|
+
dropdownAlign = "start",
|
|
782
1051
|
error,
|
|
783
1052
|
id,
|
|
784
1053
|
children: footer,
|
|
785
1054
|
...props
|
|
786
1055
|
}, ref) => {
|
|
787
1056
|
const { value, defaultValue, dir, className, onChange, ...rest } = props;
|
|
788
|
-
const [selected, setSelected] = (0,
|
|
789
|
-
const [open, setOpen] = (0,
|
|
790
|
-
const containerRef = (0,
|
|
791
|
-
(0,
|
|
1057
|
+
const [selected, setSelected] = (0, import_react8.useState)([]);
|
|
1058
|
+
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
1059
|
+
const containerRef = (0, import_react8.useRef)(null);
|
|
1060
|
+
(0, import_react8.useEffect)(() => {
|
|
792
1061
|
if (!value) return setSelected([]);
|
|
793
1062
|
setSelected(Array.isArray(value) ? value : [value]);
|
|
794
1063
|
}, [value]);
|
|
@@ -807,136 +1076,127 @@ var Select = (0, import_react4.forwardRef)(
|
|
|
807
1076
|
});
|
|
808
1077
|
onChange?.(multiselect ? newSelected : newValue);
|
|
809
1078
|
}
|
|
810
|
-
return /* @__PURE__ */
|
|
1079
|
+
return /* @__PURE__ */ React.createElement(
|
|
811
1080
|
"div",
|
|
812
1081
|
{
|
|
813
1082
|
className: cn("flex w-full flex-col gap-1", className),
|
|
814
1083
|
ref: containerRef,
|
|
815
|
-
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
1084
|
+
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element`
|
|
1085
|
+
},
|
|
1086
|
+
/* @__PURE__ */ React.createElement(
|
|
1087
|
+
Label_default,
|
|
1088
|
+
{
|
|
1089
|
+
text: label,
|
|
1090
|
+
htmlFor: props.name,
|
|
1091
|
+
required: props.required,
|
|
1092
|
+
description,
|
|
1093
|
+
className: classNames?.label
|
|
1094
|
+
}
|
|
1095
|
+
),
|
|
1096
|
+
/* @__PURE__ */ React.createElement(
|
|
1097
|
+
SelectPrimitive.Root,
|
|
1098
|
+
{
|
|
1099
|
+
open,
|
|
1100
|
+
value: selected.join(","),
|
|
1101
|
+
onOpenChange: handleOnOpenChange,
|
|
1102
|
+
onValueChange: multiselect ? void 0 : handleChange,
|
|
1103
|
+
defaultValue: typeof defaultValue === "string" ? defaultValue : void 0,
|
|
1104
|
+
dir: dir === "rtl" ? "rtl" : "ltr",
|
|
1105
|
+
...rest
|
|
1106
|
+
},
|
|
1107
|
+
/* @__PURE__ */ React.createElement(
|
|
1108
|
+
SelectPrimitive.Trigger,
|
|
1109
|
+
{
|
|
1110
|
+
ref,
|
|
1111
|
+
className: cn(
|
|
1112
|
+
"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",
|
|
1113
|
+
classNames?.trigger
|
|
1114
|
+
)
|
|
1115
|
+
},
|
|
1116
|
+
/* @__PURE__ */ React.createElement("span", { className: "truncate" }, /* @__PURE__ */ React.createElement(
|
|
1117
|
+
SelectPrimitive.Value,
|
|
1118
|
+
{
|
|
1119
|
+
placeholder: placeholder ?? "Select an option",
|
|
1120
|
+
"aria-label": getLabel()
|
|
1121
|
+
},
|
|
1122
|
+
getLabel()
|
|
1123
|
+
)),
|
|
1124
|
+
/* @__PURE__ */ React.createElement(
|
|
1125
|
+
import_lucide_react9.ChevronDownIcon,
|
|
819
1126
|
{
|
|
820
|
-
text:
|
|
821
|
-
|
|
822
|
-
required: props.required,
|
|
823
|
-
description,
|
|
824
|
-
className: classNames?.label
|
|
1127
|
+
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
1128
|
+
size: "16"
|
|
825
1129
|
}
|
|
826
|
-
)
|
|
827
|
-
|
|
828
|
-
|
|
1130
|
+
)
|
|
1131
|
+
),
|
|
1132
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.Portal, { container: containerRef.current }, /* @__PURE__ */ React.createElement(
|
|
1133
|
+
SelectPrimitive.Content,
|
|
1134
|
+
{
|
|
1135
|
+
hideWhenDetached: true,
|
|
1136
|
+
className: cn(
|
|
1137
|
+
"z-10 max-h-[var(--radix-select-content-available-height)] overflow-hidden rounded-md bg-white py-2 shadow-lg",
|
|
1138
|
+
"w-[var(--radix-select-trigger-width)] min-w-[var(--radix-select-trigger-width)]",
|
|
1139
|
+
classNames?.content
|
|
1140
|
+
),
|
|
1141
|
+
position: "popper",
|
|
1142
|
+
align: dropdownAlign,
|
|
1143
|
+
sideOffset: 4,
|
|
1144
|
+
onPointerDownOutside: toggleOpen,
|
|
1145
|
+
onKeyDown: closeOnEscape
|
|
1146
|
+
},
|
|
1147
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.Viewport, null, multiselect && !!chipLabels?.length && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
1148
|
+
SelectPrimitive.Group,
|
|
829
1149
|
{
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
1150
|
+
className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
|
|
1151
|
+
"data-testid": "selected-labels"
|
|
1152
|
+
},
|
|
1153
|
+
chipLabels?.map(
|
|
1154
|
+
(chip) => chip && /* @__PURE__ */ React.createElement(Chip_default, { key: chip.title, size: "small", variant: "primary" }, /* @__PURE__ */ React.createElement("span", null, chip.title), /* @__PURE__ */ React.createElement(
|
|
1155
|
+
import_lucide_react9.X,
|
|
1156
|
+
{
|
|
1157
|
+
size: 18,
|
|
1158
|
+
"data-testid": `chip-remove-${chip.value}`,
|
|
1159
|
+
className: "cursor-pointer",
|
|
1160
|
+
onClick: () => handleChange(chip.value)
|
|
1161
|
+
}
|
|
1162
|
+
))
|
|
1163
|
+
)
|
|
1164
|
+
), /* @__PURE__ */ React.createElement(Separator, null)), options?.map(({ id: id2, title, value: value2, description: description2 }) => /* @__PURE__ */ React.createElement(
|
|
1165
|
+
SelectPrimitive.Item,
|
|
1166
|
+
{
|
|
1167
|
+
key: id2,
|
|
1168
|
+
value: value2,
|
|
1169
|
+
className: cn(
|
|
1170
|
+
"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",
|
|
1171
|
+
classNames?.item
|
|
1172
|
+
),
|
|
1173
|
+
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
1174
|
+
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
1175
|
+
onClick: () => handleChange(value2)
|
|
1176
|
+
},
|
|
1177
|
+
/* @__PURE__ */ React.createElement(
|
|
1178
|
+
import_lucide_react9.CheckIcon,
|
|
1179
|
+
{
|
|
1180
|
+
className: cn(
|
|
1181
|
+
"absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
1182
|
+
classNames?.checkmark
|
|
864
1183
|
),
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
children: chipLabels?.map(
|
|
882
|
-
(chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
|
|
883
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: chip.title }),
|
|
884
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
885
|
-
import_lucide_react9.X,
|
|
886
|
-
{
|
|
887
|
-
size: 18,
|
|
888
|
-
"data-testid": `chip-remove-${chip.value}`,
|
|
889
|
-
className: "cursor-pointer",
|
|
890
|
-
onClick: () => handleChange(chip.value)
|
|
891
|
-
}
|
|
892
|
-
)
|
|
893
|
-
] }, chip.title)
|
|
894
|
-
)
|
|
895
|
-
}
|
|
896
|
-
),
|
|
897
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {})
|
|
898
|
-
] }),
|
|
899
|
-
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
900
|
-
SelectPrimitive.Item,
|
|
901
|
-
{
|
|
902
|
-
value: value2,
|
|
903
|
-
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",
|
|
904
|
-
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
905
|
-
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
906
|
-
onClick: () => handleChange(value2),
|
|
907
|
-
children: [
|
|
908
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectPrimitive.ItemText, { children: title }),
|
|
909
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
910
|
-
import_lucide_react9.CheckIcon,
|
|
911
|
-
{
|
|
912
|
-
className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
913
|
-
size: 16
|
|
914
|
-
}
|
|
915
|
-
)
|
|
916
|
-
]
|
|
917
|
-
},
|
|
918
|
-
id2
|
|
919
|
-
)),
|
|
920
|
-
!!footer && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
921
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Separator, {}),
|
|
922
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
923
|
-
SelectPrimitive.Group,
|
|
924
|
-
{
|
|
925
|
-
className: "mt-2 flex flex-row flex-wrap gap-1 px-2",
|
|
926
|
-
"data-testid": "selected-labels",
|
|
927
|
-
children: footer
|
|
928
|
-
}
|
|
929
|
-
)
|
|
930
|
-
] })
|
|
931
|
-
] })
|
|
932
|
-
}
|
|
933
|
-
) })
|
|
934
|
-
]
|
|
935
|
-
}
|
|
936
|
-
),
|
|
937
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMessage_default, { message: error })
|
|
938
|
-
]
|
|
939
|
-
}
|
|
1184
|
+
size: 16
|
|
1185
|
+
}
|
|
1186
|
+
),
|
|
1187
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.ItemText, null, title),
|
|
1188
|
+
description2 && /* @__PURE__ */ React.createElement("span", { className: "block text-sm text-grey-70" }, description2)
|
|
1189
|
+
)), !!footer && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Separator, null), /* @__PURE__ */ React.createElement(
|
|
1190
|
+
SelectPrimitive.Group,
|
|
1191
|
+
{
|
|
1192
|
+
className: "mt-2 flex flex-row flex-wrap gap-1 px-2",
|
|
1193
|
+
"data-testid": "selected-labels"
|
|
1194
|
+
},
|
|
1195
|
+
footer
|
|
1196
|
+
)))
|
|
1197
|
+
))
|
|
1198
|
+
),
|
|
1199
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
940
1200
|
);
|
|
941
1201
|
}
|
|
942
1202
|
);
|
|
@@ -949,9 +1209,8 @@ var import_link = __toESM(require("next/link"), 1);
|
|
|
949
1209
|
|
|
950
1210
|
// src/components/primitives/avatar.tsx
|
|
951
1211
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
952
|
-
var
|
|
953
|
-
var
|
|
954
|
-
var AvatarBase = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1212
|
+
var React7 = __toESM(require("react"), 1);
|
|
1213
|
+
var AvatarBase = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
955
1214
|
AvatarPrimitive.Root,
|
|
956
1215
|
{
|
|
957
1216
|
ref,
|
|
@@ -960,7 +1219,7 @@ var AvatarBase = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
960
1219
|
}
|
|
961
1220
|
));
|
|
962
1221
|
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
963
|
-
var AvatarImage =
|
|
1222
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
964
1223
|
AvatarPrimitive.Image,
|
|
965
1224
|
{
|
|
966
1225
|
ref,
|
|
@@ -970,7 +1229,7 @@ var AvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
970
1229
|
}
|
|
971
1230
|
));
|
|
972
1231
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
973
|
-
var AvatarFallback =
|
|
1232
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
974
1233
|
AvatarPrimitive.Fallback,
|
|
975
1234
|
{
|
|
976
1235
|
ref,
|
|
@@ -984,17 +1243,13 @@ var AvatarFallback = React5.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
984
1243
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
985
1244
|
|
|
986
1245
|
// src/components/ui/Avatar.tsx
|
|
987
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
988
1246
|
function Avatar({ size, src, href, name, ...linkProps }) {
|
|
989
1247
|
const fallbackShort = name?.slice(0, 2);
|
|
990
1248
|
const fallbackWords = name?.split(" ").map((n) => n[0]).join("").slice(0, 2);
|
|
991
1249
|
const fallback = fallbackWords && fallbackWords.length > 1 ? fallbackWords : fallbackShort;
|
|
992
|
-
const renderAvatar = () => /* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarImage, { src, alt: name }),
|
|
994
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { children: fallback?.toUpperCase() })
|
|
995
|
-
] });
|
|
1250
|
+
const renderAvatar = () => /* @__PURE__ */ React.createElement(AvatarBase, { className: avatarVariants({ size }) }, /* @__PURE__ */ React.createElement(AvatarImage, { src, alt: name }), /* @__PURE__ */ React.createElement(AvatarFallback, null, fallback?.toUpperCase()));
|
|
996
1251
|
if (href) {
|
|
997
|
-
return /* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ React.createElement(import_link.default, { href, ...linkProps }, renderAvatar());
|
|
998
1253
|
}
|
|
999
1254
|
return renderAvatar();
|
|
1000
1255
|
}
|
|
@@ -1013,7 +1268,7 @@ var avatarVariants = (0, import_cva3.cva)("ring ring-white ring-2", {
|
|
|
1013
1268
|
|
|
1014
1269
|
// src/components/ui/Badge.tsx
|
|
1015
1270
|
var import_cva4 = require("cva");
|
|
1016
|
-
var
|
|
1271
|
+
var React8 = __toESM(require("react"), 1);
|
|
1017
1272
|
var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
1018
1273
|
variants: {
|
|
1019
1274
|
variant: {
|
|
@@ -1027,31 +1282,42 @@ var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-
|
|
|
1027
1282
|
}
|
|
1028
1283
|
});
|
|
1029
1284
|
function Badge({ className, variant, ...props }) {
|
|
1030
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ React8.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
1031
1286
|
}
|
|
1032
1287
|
|
|
1033
1288
|
// src/components/ui/Button.tsx
|
|
1034
1289
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
1035
1290
|
var import_cva5 = require("cva");
|
|
1036
|
-
var
|
|
1037
|
-
var
|
|
1038
|
-
var Button = (0,
|
|
1039
|
-
({
|
|
1291
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1292
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1293
|
+
var Button = (0, import_react9.forwardRef)(
|
|
1294
|
+
({
|
|
1295
|
+
className,
|
|
1296
|
+
variant,
|
|
1297
|
+
size,
|
|
1298
|
+
asChild = false,
|
|
1299
|
+
type = "button",
|
|
1300
|
+
children,
|
|
1301
|
+
isLoading = false,
|
|
1302
|
+
...props
|
|
1303
|
+
}, ref) => {
|
|
1040
1304
|
const Component = asChild ? import_react_slot.Slot : "button";
|
|
1041
|
-
return /* @__PURE__ */
|
|
1305
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1042
1306
|
Component,
|
|
1043
1307
|
{
|
|
1044
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
1308
|
+
className: cn(buttonVariants({ variant, size, className, isLoading, asChild })),
|
|
1045
1309
|
type,
|
|
1046
1310
|
ref,
|
|
1047
1311
|
...props
|
|
1048
|
-
}
|
|
1312
|
+
},
|
|
1313
|
+
asChild ? children : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, children, isLoading && /* @__PURE__ */ import_react9.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center bg-white/30 backdrop-blur-[0.5px]" }, /* @__PURE__ */ import_react9.default.createElement(import_lucide_react10.Loader2, { className: "h-5 w-5 animate-spin text-gray-800" })))
|
|
1049
1314
|
);
|
|
1050
1315
|
}
|
|
1051
1316
|
);
|
|
1052
1317
|
Button.displayName = "Button";
|
|
1053
1318
|
var buttonVariants = (0, import_cva5.cva)(
|
|
1054
1319
|
[
|
|
1320
|
+
"relative",
|
|
1055
1321
|
"flex",
|
|
1056
1322
|
"items-center",
|
|
1057
1323
|
"justify-center",
|
|
@@ -1061,7 +1327,8 @@ var buttonVariants = (0, import_cva5.cva)(
|
|
|
1061
1327
|
"outline-2",
|
|
1062
1328
|
"outline-offset-2",
|
|
1063
1329
|
"outline-dashed",
|
|
1064
|
-
"outline-transparent"
|
|
1330
|
+
"outline-transparent",
|
|
1331
|
+
"overflow-hidden"
|
|
1065
1332
|
],
|
|
1066
1333
|
{
|
|
1067
1334
|
variants: {
|
|
@@ -1108,19 +1375,92 @@ var buttonVariants = (0, import_cva5.cva)(
|
|
|
1108
1375
|
"focus:text-black",
|
|
1109
1376
|
"focus:outline-purple-100",
|
|
1110
1377
|
"active:text-purple-80"
|
|
1378
|
+
],
|
|
1379
|
+
"outline-primary": [
|
|
1380
|
+
"bg-transparent",
|
|
1381
|
+
"border-2",
|
|
1382
|
+
"border-pickle-100",
|
|
1383
|
+
"text-pickle-100",
|
|
1384
|
+
"hover:bg-pickle-100",
|
|
1385
|
+
"hover:text-black",
|
|
1386
|
+
"active:bg-pickle-80",
|
|
1387
|
+
"active:text-black",
|
|
1388
|
+
"focus:outline-purple-100",
|
|
1389
|
+
"disabled:text-grey-40",
|
|
1390
|
+
"disabled:border-grey-40",
|
|
1391
|
+
"disabled:hover:bg-transparent",
|
|
1392
|
+
"disabled:hover:text-grey-40"
|
|
1393
|
+
],
|
|
1394
|
+
"outline-secondary": [
|
|
1395
|
+
"bg-transparent",
|
|
1396
|
+
"border-2",
|
|
1397
|
+
"border-green-80",
|
|
1398
|
+
"text-green-80",
|
|
1399
|
+
"hover:bg-green-80",
|
|
1400
|
+
"hover:text-white",
|
|
1401
|
+
"active:bg-green-90",
|
|
1402
|
+
"active:text-white",
|
|
1403
|
+
"focus:outline-pickle-100",
|
|
1404
|
+
"disabled:text-grey-40",
|
|
1405
|
+
"disabled:border-grey-40",
|
|
1406
|
+
"disabled:hover:bg-transparent",
|
|
1407
|
+
"disabled:hover:text-grey-40"
|
|
1408
|
+
],
|
|
1409
|
+
"icon-outline": [
|
|
1410
|
+
"bg-transparent",
|
|
1411
|
+
"text-black",
|
|
1412
|
+
"hover:bg-grey-5",
|
|
1413
|
+
"active:bg-grey-10",
|
|
1414
|
+
"focus:outline-purple-100",
|
|
1415
|
+
"disabled:text-grey-40",
|
|
1416
|
+
"disabled:hover:bg-transparent",
|
|
1417
|
+
"disabled:hover:text-grey-40"
|
|
1418
|
+
],
|
|
1419
|
+
"icon-primary": [
|
|
1420
|
+
"bg-pickle-100",
|
|
1421
|
+
"text-black",
|
|
1422
|
+
"hover:bg-pickle-80",
|
|
1423
|
+
"active:bg-pickle-60",
|
|
1424
|
+
"focus:outline-purple-100",
|
|
1425
|
+
"disabled:text-grey-40",
|
|
1426
|
+
"disabled:bg-grey-10"
|
|
1427
|
+
],
|
|
1428
|
+
"icon-secondary": [
|
|
1429
|
+
"bg-green-80",
|
|
1430
|
+
"text-white",
|
|
1431
|
+
"hover:bg-green-90",
|
|
1432
|
+
"active:bg-green-100",
|
|
1433
|
+
"focus:outline-pickle-100",
|
|
1434
|
+
"disabled:text-grey-40",
|
|
1435
|
+
"disabled:bg-grey-10"
|
|
1111
1436
|
]
|
|
1112
1437
|
},
|
|
1113
1438
|
size: {
|
|
1439
|
+
"extra-small": ["h-8", "text-xs", "px-3", "py-1"],
|
|
1114
1440
|
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
1115
1441
|
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
1116
1442
|
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
1443
|
+
},
|
|
1444
|
+
isLoading: {
|
|
1445
|
+
true: ["cursor-not-allowed", "pointer-events-none"]
|
|
1446
|
+
},
|
|
1447
|
+
asChild: {
|
|
1448
|
+
true: [],
|
|
1449
|
+
false: ["cursor-pointer", "pointer-events-auto"]
|
|
1117
1450
|
}
|
|
1118
1451
|
},
|
|
1119
1452
|
defaultVariants: {
|
|
1120
1453
|
variant: "neutral",
|
|
1121
|
-
size: "medium"
|
|
1454
|
+
size: "medium",
|
|
1455
|
+
isLoading: false,
|
|
1456
|
+
asChild: false
|
|
1122
1457
|
},
|
|
1123
1458
|
compoundVariants: [
|
|
1459
|
+
{
|
|
1460
|
+
variant: "link",
|
|
1461
|
+
size: "extra-small",
|
|
1462
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
1463
|
+
},
|
|
1124
1464
|
{
|
|
1125
1465
|
variant: "link",
|
|
1126
1466
|
size: "small",
|
|
@@ -1135,6 +1475,66 @@ var buttonVariants = (0, import_cva5.cva)(
|
|
|
1135
1475
|
variant: "link",
|
|
1136
1476
|
size: "large",
|
|
1137
1477
|
class: ["h-6", "text-base", "p-0"]
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
variant: "icon-outline",
|
|
1481
|
+
size: "extra-small",
|
|
1482
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
variant: "icon-outline",
|
|
1486
|
+
size: "small",
|
|
1487
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
variant: "icon-outline",
|
|
1491
|
+
size: "medium",
|
|
1492
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
variant: "icon-outline",
|
|
1496
|
+
size: "large",
|
|
1497
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
variant: "icon-primary",
|
|
1501
|
+
size: "extra-small",
|
|
1502
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
variant: "icon-primary",
|
|
1506
|
+
size: "small",
|
|
1507
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
variant: "icon-primary",
|
|
1511
|
+
size: "medium",
|
|
1512
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
variant: "icon-primary",
|
|
1516
|
+
size: "large",
|
|
1517
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
variant: "icon-secondary",
|
|
1521
|
+
size: "extra-small",
|
|
1522
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
variant: "icon-secondary",
|
|
1526
|
+
size: "small",
|
|
1527
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
variant: "icon-secondary",
|
|
1531
|
+
size: "medium",
|
|
1532
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
variant: "icon-secondary",
|
|
1536
|
+
size: "large",
|
|
1537
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1138
1538
|
}
|
|
1139
1539
|
]
|
|
1140
1540
|
}
|
|
@@ -1142,16 +1542,15 @@ var buttonVariants = (0, import_cva5.cva)(
|
|
|
1142
1542
|
|
|
1143
1543
|
// src/components/ui/Combobox.tsx
|
|
1144
1544
|
var import_cva6 = require("cva");
|
|
1145
|
-
var
|
|
1146
|
-
var
|
|
1545
|
+
var import_lucide_react11 = require("lucide-react");
|
|
1546
|
+
var import_react10 = require("react");
|
|
1147
1547
|
|
|
1148
1548
|
// src/components/primitives/popover.tsx
|
|
1149
1549
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1150
|
-
var
|
|
1151
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1550
|
+
var React10 = __toESM(require("react"), 1);
|
|
1152
1551
|
var Popover = PopoverPrimitive.Root;
|
|
1153
1552
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1154
|
-
var PopoverContent =
|
|
1553
|
+
var PopoverContent = React10.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React10.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
1155
1554
|
PopoverPrimitive.Content,
|
|
1156
1555
|
{
|
|
1157
1556
|
ref,
|
|
@@ -1163,12 +1562,11 @@ var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffse
|
|
|
1163
1562
|
),
|
|
1164
1563
|
...props
|
|
1165
1564
|
}
|
|
1166
|
-
)
|
|
1565
|
+
)));
|
|
1167
1566
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1168
1567
|
|
|
1169
1568
|
// src/components/ui/Combobox.tsx
|
|
1170
|
-
var
|
|
1171
|
-
var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
1569
|
+
var Combobox = (0, import_react10.forwardRef)((props, ref) => {
|
|
1172
1570
|
const {
|
|
1173
1571
|
id,
|
|
1174
1572
|
name,
|
|
@@ -1188,17 +1586,17 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1188
1586
|
onChange: handleChange,
|
|
1189
1587
|
children: footer
|
|
1190
1588
|
} = props;
|
|
1191
|
-
const [selected, setSelected] = (0,
|
|
1192
|
-
const [open, setOpen] = (0,
|
|
1193
|
-
const isUserUpdate = (0,
|
|
1194
|
-
const IconComponent = icon &&
|
|
1589
|
+
const [selected, setSelected] = (0, import_react10.useState)([]);
|
|
1590
|
+
const [open, setOpen] = (0, import_react10.useState)(false);
|
|
1591
|
+
const isUserUpdate = (0, import_react10.useRef)(false);
|
|
1592
|
+
const IconComponent = icon && import_lucide_react11.icons[icon];
|
|
1195
1593
|
const hideSearchBox = options?.length <= 5;
|
|
1196
1594
|
const isDefault = variant === "default";
|
|
1197
1595
|
const isChip = variant === "chip";
|
|
1198
1596
|
const isEmpty = selected.length === 0;
|
|
1199
1597
|
const showChevron = isDefault ? isEmpty : true;
|
|
1200
1598
|
const close = () => setOpen(false);
|
|
1201
|
-
(0,
|
|
1599
|
+
(0, import_react10.useEffect)(() => {
|
|
1202
1600
|
if (!isUserUpdate.current) {
|
|
1203
1601
|
const valueArray = multiselect ? value ?? [] : value ? [value] : [];
|
|
1204
1602
|
setSelected(
|
|
@@ -1206,7 +1604,7 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1206
1604
|
);
|
|
1207
1605
|
}
|
|
1208
1606
|
}, [value, options, multiselect]);
|
|
1209
|
-
(0,
|
|
1607
|
+
(0, import_react10.useEffect)(() => {
|
|
1210
1608
|
if (isUserUpdate.current) {
|
|
1211
1609
|
if (multiselect) {
|
|
1212
1610
|
handleChange?.(selected.map((o) => o.value));
|
|
@@ -1238,111 +1636,91 @@ var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1238
1636
|
const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
|
|
1239
1637
|
return isDefault ? defaultLabel : label;
|
|
1240
1638
|
};
|
|
1241
|
-
return /* @__PURE__ */
|
|
1242
|
-
|
|
1243
|
-
|
|
1639
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col gap-1", className) }, isDefault && /* @__PURE__ */ React.createElement(
|
|
1640
|
+
Label_default,
|
|
1641
|
+
{
|
|
1642
|
+
text: label,
|
|
1643
|
+
htmlFor: name,
|
|
1644
|
+
required,
|
|
1645
|
+
description,
|
|
1646
|
+
className: classNames?.label
|
|
1647
|
+
}
|
|
1648
|
+
), /* @__PURE__ */ React.createElement("div", { className: "relative flex" }, /* @__PURE__ */ React.createElement(Popover, { open, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(
|
|
1649
|
+
PopoverTrigger,
|
|
1650
|
+
{
|
|
1651
|
+
asChild: true,
|
|
1652
|
+
disabled: options.length === 0,
|
|
1653
|
+
"data-testid": `${id ?? name}-combobox-trigger`
|
|
1654
|
+
},
|
|
1655
|
+
/* @__PURE__ */ React.createElement(
|
|
1656
|
+
"div",
|
|
1244
1657
|
{
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}
|
|
1251
|
-
),
|
|
1252
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative flex", children: [
|
|
1253
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
1254
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1255
|
-
PopoverTrigger,
|
|
1256
|
-
{
|
|
1257
|
-
asChild: true,
|
|
1258
|
-
disabled: options.length === 0,
|
|
1259
|
-
"data-testid": `${id ?? name}-combobox-trigger`,
|
|
1260
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1261
|
-
"div",
|
|
1262
|
-
{
|
|
1263
|
-
ref,
|
|
1264
|
-
className: cn(
|
|
1265
|
-
triggerVariants({ variant, size }),
|
|
1266
|
-
isDefault && !isEmpty && "pr-10",
|
|
1267
|
-
classNames?.trigger
|
|
1268
|
-
),
|
|
1269
|
-
"aria-expanded": open,
|
|
1270
|
-
children: [
|
|
1271
|
-
isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1272
|
-
isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { variant: "purple", children: selected.length }),
|
|
1273
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1274
|
-
"span",
|
|
1275
|
-
{
|
|
1276
|
-
className: cn(
|
|
1277
|
-
"w-full truncate leading-normal",
|
|
1278
|
-
isDefault && isEmpty && "text-grey-40"
|
|
1279
|
-
),
|
|
1280
|
-
children: handleDisplayValue()
|
|
1281
|
-
}
|
|
1282
|
-
),
|
|
1283
|
-
showChevron && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1284
|
-
import_lucide_react10.ChevronDownIcon,
|
|
1285
|
-
{
|
|
1286
|
-
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
1287
|
-
size: "16"
|
|
1288
|
-
}
|
|
1289
|
-
)
|
|
1290
|
-
]
|
|
1291
|
-
}
|
|
1292
|
-
)
|
|
1293
|
-
}
|
|
1658
|
+
ref,
|
|
1659
|
+
className: cn(
|
|
1660
|
+
triggerVariants({ variant, size }),
|
|
1661
|
+
isDefault && !isEmpty && "pr-10",
|
|
1662
|
+
classNames?.trigger
|
|
1294
1663
|
),
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
classNames?.content
|
|
1302
|
-
),
|
|
1303
|
-
collisionPadding: 8,
|
|
1304
|
-
sideOffset: 4,
|
|
1305
|
-
align: "start",
|
|
1306
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Command, { children: [
|
|
1307
|
-
!hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandInput, { placeholder: "Search..." }),
|
|
1308
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandList, { children: [
|
|
1309
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandEmpty, { children: "No results" }),
|
|
1310
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1311
|
-
CommandItem,
|
|
1312
|
-
{
|
|
1313
|
-
value: option.title,
|
|
1314
|
-
onSelect: () => handleSelect(option.value),
|
|
1315
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1316
|
-
ListItem_default,
|
|
1317
|
-
{
|
|
1318
|
-
className: cn(classNames?.items, "truncate py-1"),
|
|
1319
|
-
isSelected: selected.some((s) => s.value === option.value),
|
|
1320
|
-
hasCheckbox: multiselect,
|
|
1321
|
-
...option
|
|
1322
|
-
}
|
|
1323
|
-
)
|
|
1324
|
-
},
|
|
1325
|
-
id2
|
|
1326
|
-
)) })
|
|
1327
|
-
] }),
|
|
1328
|
-
!!footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Separator, {}),
|
|
1329
|
-
footer && footer({ close })
|
|
1330
|
-
] })
|
|
1331
|
-
}
|
|
1332
|
-
)
|
|
1333
|
-
] }),
|
|
1334
|
-
isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1335
|
-
"button",
|
|
1664
|
+
"aria-expanded": open
|
|
1665
|
+
},
|
|
1666
|
+
isDefault && IconComponent && /* @__PURE__ */ React.createElement(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1667
|
+
isChip && !isEmpty && /* @__PURE__ */ React.createElement(Badge, { variant: "purple" }, selected.length),
|
|
1668
|
+
/* @__PURE__ */ React.createElement(
|
|
1669
|
+
"span",
|
|
1336
1670
|
{
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1671
|
+
className: cn(
|
|
1672
|
+
"w-full truncate leading-normal",
|
|
1673
|
+
isDefault && isEmpty && "text-grey-40"
|
|
1674
|
+
)
|
|
1675
|
+
},
|
|
1676
|
+
handleDisplayValue()
|
|
1677
|
+
),
|
|
1678
|
+
showChevron && /* @__PURE__ */ React.createElement(
|
|
1679
|
+
import_lucide_react11.ChevronDownIcon,
|
|
1680
|
+
{
|
|
1681
|
+
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
1682
|
+
size: "16"
|
|
1683
|
+
}
|
|
1684
|
+
)
|
|
1685
|
+
)
|
|
1686
|
+
), /* @__PURE__ */ React.createElement(
|
|
1687
|
+
PopoverContent,
|
|
1688
|
+
{
|
|
1689
|
+
className: cn(
|
|
1690
|
+
"flex w-full max-w-xs flex-col overflow-hidden p-0",
|
|
1691
|
+
"max-h-[--radix-popover-content-available-height]",
|
|
1692
|
+
classNames?.content
|
|
1693
|
+
),
|
|
1694
|
+
collisionPadding: 8,
|
|
1695
|
+
sideOffset: 4,
|
|
1696
|
+
align: "start"
|
|
1697
|
+
},
|
|
1698
|
+
/* @__PURE__ */ React.createElement(Command, null, !hideSearchBox && /* @__PURE__ */ React.createElement(CommandInput, { placeholder: "Search..." }), /* @__PURE__ */ React.createElement(CommandList, null, /* @__PURE__ */ React.createElement(CommandEmpty, null, "No results"), /* @__PURE__ */ React.createElement(CommandGroup, null, options.map(({ id: id2, ...option }) => /* @__PURE__ */ React.createElement(
|
|
1699
|
+
CommandItem,
|
|
1700
|
+
{
|
|
1701
|
+
key: id2,
|
|
1702
|
+
value: option.title,
|
|
1703
|
+
onSelect: () => handleSelect(option.value)
|
|
1704
|
+
},
|
|
1705
|
+
/* @__PURE__ */ React.createElement(
|
|
1706
|
+
ListItem_default,
|
|
1707
|
+
{
|
|
1708
|
+
className: cn(classNames?.items, "truncate py-1"),
|
|
1709
|
+
isSelected: selected.some((s) => s.value === option.value),
|
|
1710
|
+
hasCheckbox: multiselect,
|
|
1711
|
+
...option
|
|
1341
1712
|
}
|
|
1342
1713
|
)
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1714
|
+
)))), !!footer && /* @__PURE__ */ React.createElement(Separator, null), footer && footer({ close }))
|
|
1715
|
+
)), isDefault && !isEmpty && /* @__PURE__ */ React.createElement(
|
|
1716
|
+
"button",
|
|
1717
|
+
{
|
|
1718
|
+
type: "button",
|
|
1719
|
+
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",
|
|
1720
|
+
onClick: handleClear
|
|
1721
|
+
},
|
|
1722
|
+
/* @__PURE__ */ React.createElement(import_lucide_react11.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
1723
|
+
)), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1346
1724
|
});
|
|
1347
1725
|
Combobox.displayName = "Combobox";
|
|
1348
1726
|
var triggerVariants = (0, import_cva6.cva)(
|
|
@@ -1373,62 +1751,50 @@ var triggerVariants = (0, import_cva6.cva)(
|
|
|
1373
1751
|
|
|
1374
1752
|
// src/components/ui/Switch.tsx
|
|
1375
1753
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
|
|
1376
|
-
var
|
|
1377
|
-
var
|
|
1378
|
-
var Switch = (0, import_react7.forwardRef)(
|
|
1754
|
+
var import_react11 = require("react");
|
|
1755
|
+
var Switch = (0, import_react11.forwardRef)(
|
|
1379
1756
|
({ label, error, className, ...props }, ref) => {
|
|
1380
|
-
return /* @__PURE__ */
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
),
|
|
1393
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "pl-4 text-sm leading-none text-inherit", htmlFor: props.name, children: [
|
|
1394
|
-
label,
|
|
1395
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
1396
|
-
] })
|
|
1397
|
-
] });
|
|
1757
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex items-center", props.disabled && "opacity-50") }, /* @__PURE__ */ React.createElement(
|
|
1758
|
+
SwitchPrimitive.Root,
|
|
1759
|
+
{
|
|
1760
|
+
className: cn(
|
|
1761
|
+
"relative h-[25px] w-[42px] cursor-default rounded-full bg-grey-20 shadow-md outline-none focus:outline-purple-100 data-[state=checked]:bg-green-90",
|
|
1762
|
+
className
|
|
1763
|
+
),
|
|
1764
|
+
ref,
|
|
1765
|
+
...props
|
|
1766
|
+
},
|
|
1767
|
+
/* @__PURE__ */ React.createElement(SwitchPrimitive.Thumb, { className: "block h-[21px] w-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]" })
|
|
1768
|
+
), label && /* @__PURE__ */ React.createElement("label", { className: "pl-4 text-sm leading-none text-inherit", htmlFor: props.name }, label, /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error, className: "mt-1" })));
|
|
1398
1769
|
}
|
|
1399
1770
|
);
|
|
1400
1771
|
Switch.displayName = "Switch";
|
|
1401
1772
|
|
|
1402
1773
|
// src/components/ui/Radio.tsx
|
|
1403
|
-
var
|
|
1774
|
+
var import_react13 = require("react");
|
|
1404
1775
|
|
|
1405
1776
|
// src/components/primitives/radio-group.tsx
|
|
1406
1777
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
1407
|
-
var
|
|
1408
|
-
var
|
|
1409
|
-
var RadioGroup = (0, import_react8.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadioGroupPrimitive.Root, { className, ...props, ref }));
|
|
1778
|
+
var import_react12 = require("react");
|
|
1779
|
+
var RadioGroup = (0, import_react12.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(RadioGroupPrimitive.Root, { className, ...props, ref }));
|
|
1410
1780
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1411
|
-
var RadioGroupItem = (0,
|
|
1412
|
-
return /* @__PURE__ */
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
),
|
|
1424
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40", children })
|
|
1425
|
-
] });
|
|
1781
|
+
var RadioGroupItem = (0, import_react12.forwardRef)(({ className, children, ...props }, ref) => {
|
|
1782
|
+
return /* @__PURE__ */ React.createElement("div", { className: "group flex flex-row items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
1783
|
+
RadioGroupPrimitive.Item,
|
|
1784
|
+
{
|
|
1785
|
+
ref,
|
|
1786
|
+
className: cn(
|
|
1787
|
+
"peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
|
|
1788
|
+
className
|
|
1789
|
+
),
|
|
1790
|
+
...props
|
|
1791
|
+
}
|
|
1792
|
+
), /* @__PURE__ */ React.createElement("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40" }, children));
|
|
1426
1793
|
});
|
|
1427
1794
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1428
1795
|
|
|
1429
1796
|
// src/components/ui/Radio.tsx
|
|
1430
|
-
var
|
|
1431
|
-
var Radio = (0, import_react9.forwardRef)(
|
|
1797
|
+
var Radio = (0, import_react13.forwardRef)(
|
|
1432
1798
|
({
|
|
1433
1799
|
label,
|
|
1434
1800
|
error,
|
|
@@ -1439,46 +1805,41 @@ var Radio = (0, import_react9.forwardRef)(
|
|
|
1439
1805
|
orientation,
|
|
1440
1806
|
...props
|
|
1441
1807
|
}, ref) => {
|
|
1442
|
-
return /* @__PURE__ */
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1808
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col gap-1", classNames?.root) }, /* @__PURE__ */ React.createElement(Label_default, { text: label, description, required: props.required }), /* @__PURE__ */ React.createElement(
|
|
1809
|
+
RadioGroup,
|
|
1810
|
+
{
|
|
1811
|
+
ref,
|
|
1812
|
+
className: cn(
|
|
1813
|
+
"flex text-sm",
|
|
1814
|
+
orientation === "vertical" ? "flex-col gap-2" : "flex-row gap-4",
|
|
1815
|
+
classNames?.group
|
|
1816
|
+
),
|
|
1817
|
+
onValueChange: handleValueChange,
|
|
1818
|
+
...props
|
|
1819
|
+
},
|
|
1820
|
+
options?.map(({ id, title, value }) => /* @__PURE__ */ React.createElement(
|
|
1821
|
+
RadioGroupItem,
|
|
1446
1822
|
{
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
children: options?.map(({ id, title, value }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1456
|
-
RadioGroupItem,
|
|
1457
|
-
{
|
|
1458
|
-
value,
|
|
1459
|
-
id: `radio-group-item-${title}`,
|
|
1460
|
-
className: classNames?.item,
|
|
1461
|
-
children: title
|
|
1462
|
-
},
|
|
1463
|
-
id
|
|
1464
|
-
))
|
|
1465
|
-
}
|
|
1466
|
-
),
|
|
1467
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage_default, { message: error })
|
|
1468
|
-
] });
|
|
1823
|
+
key: id,
|
|
1824
|
+
value,
|
|
1825
|
+
id: `radio-group-item-${title}`,
|
|
1826
|
+
className: classNames?.item
|
|
1827
|
+
},
|
|
1828
|
+
title
|
|
1829
|
+
))
|
|
1830
|
+
), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1469
1831
|
}
|
|
1470
1832
|
);
|
|
1471
1833
|
Radio.displayName = "Radio";
|
|
1472
1834
|
|
|
1473
1835
|
// src/components/ui/Counter.tsx
|
|
1474
1836
|
var import_cva7 = require("cva");
|
|
1475
|
-
var
|
|
1476
|
-
var
|
|
1477
|
-
var
|
|
1478
|
-
var Counter = (0, import_react10.forwardRef)(
|
|
1837
|
+
var import_lucide_react12 = require("lucide-react");
|
|
1838
|
+
var import_react14 = require("react");
|
|
1839
|
+
var Counter = (0, import_react14.forwardRef)(
|
|
1479
1840
|
({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
|
|
1480
|
-
const [count, setCount] = (0,
|
|
1481
|
-
(0,
|
|
1841
|
+
const [count, setCount] = (0, import_react14.useState)(0);
|
|
1842
|
+
(0, import_react14.useEffect)(() => {
|
|
1482
1843
|
setCount(value ?? 0);
|
|
1483
1844
|
}, [value]);
|
|
1484
1845
|
const handleChange = (e) => {
|
|
@@ -1509,56 +1870,50 @@ var Counter = (0, import_react10.forwardRef)(
|
|
|
1509
1870
|
onChange?.(newValue);
|
|
1510
1871
|
setCount(newValue);
|
|
1511
1872
|
};
|
|
1512
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ React.createElement(
|
|
1513
1874
|
"div",
|
|
1514
1875
|
{
|
|
1515
1876
|
className: cn("flex w-auto flex-col gap-1", classNames?.root),
|
|
1516
|
-
"data-testid": `counter-wrapper-${props.id}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
}
|
|
1557
|
-
)
|
|
1558
|
-
] }),
|
|
1559
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ErrorMessage_default, { message: error })
|
|
1560
|
-
]
|
|
1561
|
-
}
|
|
1877
|
+
"data-testid": `counter-wrapper-${props.id}`
|
|
1878
|
+
},
|
|
1879
|
+
label && /* @__PURE__ */ React.createElement(
|
|
1880
|
+
Label_default,
|
|
1881
|
+
{
|
|
1882
|
+
text: label,
|
|
1883
|
+
htmlFor: props.name,
|
|
1884
|
+
required: props.required,
|
|
1885
|
+
description,
|
|
1886
|
+
className: classNames?.label
|
|
1887
|
+
}
|
|
1888
|
+
),
|
|
1889
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex w-[122px] flex-row items-center" }, /* @__PURE__ */ React.createElement(
|
|
1890
|
+
"button",
|
|
1891
|
+
{
|
|
1892
|
+
type: "button",
|
|
1893
|
+
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",
|
|
1894
|
+
onClick: decrement
|
|
1895
|
+
},
|
|
1896
|
+
/* @__PURE__ */ React.createElement(import_lucide_react12.Minus, { className: "h-4 w-4 text-green-100" })
|
|
1897
|
+
), /* @__PURE__ */ React.createElement(
|
|
1898
|
+
"input",
|
|
1899
|
+
{
|
|
1900
|
+
className: cn(counterVariants({ theme }), classNames?.input),
|
|
1901
|
+
ref,
|
|
1902
|
+
value: count,
|
|
1903
|
+
onChange: handleChange,
|
|
1904
|
+
"data-testid": `counter-element-${props.id}`,
|
|
1905
|
+
...props
|
|
1906
|
+
}
|
|
1907
|
+
), /* @__PURE__ */ React.createElement(
|
|
1908
|
+
"button",
|
|
1909
|
+
{
|
|
1910
|
+
type: "button",
|
|
1911
|
+
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",
|
|
1912
|
+
onClick: increment
|
|
1913
|
+
},
|
|
1914
|
+
/* @__PURE__ */ React.createElement(import_lucide_react12.Plus, { className: "h-4 w-4 text-green-100" })
|
|
1915
|
+
)),
|
|
1916
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
1562
1917
|
);
|
|
1563
1918
|
}
|
|
1564
1919
|
);
|
|
@@ -1616,13 +1971,12 @@ var counterVariants = (0, import_cva7.cva)(
|
|
|
1616
1971
|
// src/components/ui/Icon.tsx
|
|
1617
1972
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1618
1973
|
var import_cva8 = require("cva");
|
|
1619
|
-
var
|
|
1974
|
+
var import_react15 = require("react");
|
|
1620
1975
|
var import_tailwind_merge3 = require("tailwind-merge");
|
|
1621
|
-
var
|
|
1622
|
-
var Icon = (0, import_react11.forwardRef)(
|
|
1976
|
+
var Icon = (0, import_react15.forwardRef)(
|
|
1623
1977
|
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
1624
1978
|
const Component = readonly ? import_react_slot2.Slot : "button";
|
|
1625
|
-
return /* @__PURE__ */
|
|
1979
|
+
return /* @__PURE__ */ React.createElement(
|
|
1626
1980
|
Component,
|
|
1627
1981
|
{
|
|
1628
1982
|
className: cn(
|
|
@@ -1691,14 +2045,13 @@ var iconVariants = (0, import_cva8.cva)(
|
|
|
1691
2045
|
);
|
|
1692
2046
|
|
|
1693
2047
|
// src/components/ui/InputOtp.tsx
|
|
1694
|
-
var
|
|
2048
|
+
var import_react16 = require("react");
|
|
1695
2049
|
|
|
1696
2050
|
// src/components/primitives/input-otp.tsx
|
|
1697
2051
|
var import_input_otp = require("input-otp");
|
|
1698
|
-
var
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
1701
|
-
var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2052
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2053
|
+
var React11 = __toESM(require("react"), 1);
|
|
2054
|
+
var InputOTP = React11.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
1702
2055
|
import_input_otp.OTPInput,
|
|
1703
2056
|
{
|
|
1704
2057
|
ref,
|
|
@@ -1711,12 +2064,12 @@ var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1711
2064
|
}
|
|
1712
2065
|
));
|
|
1713
2066
|
InputOTP.displayName = "InputOTP";
|
|
1714
|
-
var InputOTPGroup =
|
|
2067
|
+
var InputOTPGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1715
2068
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1716
|
-
var InputOTPSlot =
|
|
1717
|
-
const inputOTPContext =
|
|
2069
|
+
var InputOTPSlot = React11.forwardRef(({ index, error, className, ...props }, ref) => {
|
|
2070
|
+
const inputOTPContext = React11.useContext(import_input_otp.OTPInputContext);
|
|
1718
2071
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1719
|
-
return /* @__PURE__ */
|
|
2072
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1720
2073
|
"div",
|
|
1721
2074
|
{
|
|
1722
2075
|
ref,
|
|
@@ -1726,57 +2079,52 @@ var InputOTPSlot = React8.forwardRef(({ index, error, className, ...props }, ref
|
|
|
1726
2079
|
error && "border-red-500 dark:border-red-400",
|
|
1727
2080
|
className
|
|
1728
2081
|
),
|
|
1729
|
-
...props
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
]
|
|
1734
|
-
}
|
|
2082
|
+
...props
|
|
2083
|
+
},
|
|
2084
|
+
char,
|
|
2085
|
+
hasFakeCaret && /* @__PURE__ */ React11.createElement("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React11.createElement("div", { className: "h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50" }))
|
|
1735
2086
|
);
|
|
1736
2087
|
});
|
|
1737
2088
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1738
|
-
var InputOTPSeparator =
|
|
2089
|
+
var InputOTPSeparator = React11.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React11.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React11.createElement(import_lucide_react13.Dot, null)));
|
|
1739
2090
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1740
2091
|
|
|
1741
2092
|
// src/components/ui/InputOtp.tsx
|
|
1742
|
-
var
|
|
1743
|
-
var InputOtp = (0, import_react12.forwardRef)(
|
|
2093
|
+
var InputOtp = (0, import_react16.forwardRef)(
|
|
1744
2094
|
({ digits, label, description, error, ...props }, ref) => {
|
|
1745
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ React.createElement(
|
|
1746
2096
|
"div",
|
|
1747
2097
|
{
|
|
1748
2098
|
className: "group flex w-full flex-col gap-1",
|
|
1749
|
-
"data-testid": `input-otp-wrapper-${props.id}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
]
|
|
1779
|
-
}
|
|
2099
|
+
"data-testid": `input-otp-wrapper-${props.id}`
|
|
2100
|
+
},
|
|
2101
|
+
label && /* @__PURE__ */ React.createElement(
|
|
2102
|
+
Label_default,
|
|
2103
|
+
{
|
|
2104
|
+
text: label,
|
|
2105
|
+
htmlFor: props.name,
|
|
2106
|
+
required: props.required,
|
|
2107
|
+
description
|
|
2108
|
+
}
|
|
2109
|
+
),
|
|
2110
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, /* @__PURE__ */ React.createElement(
|
|
2111
|
+
InputOTP,
|
|
2112
|
+
{
|
|
2113
|
+
ref,
|
|
2114
|
+
maxLength: digits,
|
|
2115
|
+
"data-testid": `input-otp-element-${props.id}`,
|
|
2116
|
+
...props
|
|
2117
|
+
},
|
|
2118
|
+
[...Array(digits)].map((_, index) => /* @__PURE__ */ React.createElement(InputOTPGroup, { key: index }, /* @__PURE__ */ React.createElement(
|
|
2119
|
+
InputOTPSlot,
|
|
2120
|
+
{
|
|
2121
|
+
"data-testid": `input-otp-slot-${index}`,
|
|
2122
|
+
index,
|
|
2123
|
+
error: Boolean(error)
|
|
2124
|
+
}
|
|
2125
|
+
)))
|
|
2126
|
+
)),
|
|
2127
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
1780
2128
|
);
|
|
1781
2129
|
}
|
|
1782
2130
|
);
|
|
@@ -1784,7 +2132,7 @@ InputOtp.displayName = "Input";
|
|
|
1784
2132
|
|
|
1785
2133
|
// src/components/ui/LinkButton.tsx
|
|
1786
2134
|
var import_link2 = __toESM(require("next/link"), 1);
|
|
1787
|
-
var
|
|
2135
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
1788
2136
|
var LinkButton = ({
|
|
1789
2137
|
disabled = false,
|
|
1790
2138
|
useAnchor = false,
|
|
@@ -1793,27 +2141,26 @@ var LinkButton = ({
|
|
|
1793
2141
|
...props
|
|
1794
2142
|
}) => {
|
|
1795
2143
|
const Component = useAnchor ? "a" : import_link2.default;
|
|
1796
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1797
2145
|
Component,
|
|
1798
2146
|
{
|
|
1799
2147
|
href,
|
|
1800
2148
|
className: `inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? "pointer-events-none text-grey-40" : ""} `,
|
|
1801
2149
|
...disabled && { "aria-disabled": true, tabIndex: -1 },
|
|
1802
|
-
...props
|
|
1803
|
-
|
|
1804
|
-
|
|
2150
|
+
...props
|
|
2151
|
+
},
|
|
2152
|
+
children
|
|
1805
2153
|
);
|
|
1806
2154
|
};
|
|
1807
2155
|
|
|
1808
2156
|
// src/components/ui/ReadMore.tsx
|
|
1809
|
-
var
|
|
2157
|
+
var import_react18 = require("react");
|
|
1810
2158
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
1811
|
-
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1812
2159
|
function ReadMore({ text, ...props }) {
|
|
1813
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
1814
|
-
const [maxWords, setMaxWords] = (0,
|
|
2160
|
+
const [isExpanded, setIsExpanded] = (0, import_react18.useState)(false);
|
|
2161
|
+
const [maxWords, setMaxWords] = (0, import_react18.useState)(160);
|
|
1815
2162
|
const isOverMaxWords = text.split(" ").length > maxWords;
|
|
1816
|
-
(0,
|
|
2163
|
+
(0, import_react18.useEffect)(() => {
|
|
1817
2164
|
const updateMaxWords = () => {
|
|
1818
2165
|
const windowWidth = window.innerWidth;
|
|
1819
2166
|
if (windowWidth <= 768) {
|
|
@@ -1835,39 +2182,33 @@ function ReadMore({ text, ...props }) {
|
|
|
1835
2182
|
}
|
|
1836
2183
|
const toggleText = () => setIsExpanded(!isExpanded);
|
|
1837
2184
|
const snippet = createReadMoreText(text, maxWords, isExpanded);
|
|
1838
|
-
return /* @__PURE__ */ (
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
"Read ",
|
|
1849
|
-
isExpanded ? "less" : "more"
|
|
1850
|
-
] })
|
|
1851
|
-
}
|
|
1852
|
-
)
|
|
1853
|
-
] });
|
|
2185
|
+
return /* @__PURE__ */ React.createElement("div", { ...props }, /* @__PURE__ */ React.createElement("div", { "data-testid": "read-more-text", className: "prose lg:prose-lg" }, /* @__PURE__ */ React.createElement(import_react_markdown.default, null, snippet)), isOverMaxWords && /* @__PURE__ */ React.createElement(
|
|
2186
|
+
Button,
|
|
2187
|
+
{
|
|
2188
|
+
type: "button",
|
|
2189
|
+
className: "mt-2 flex items-center justify-center",
|
|
2190
|
+
variant: "link",
|
|
2191
|
+
onClick: toggleText
|
|
2192
|
+
},
|
|
2193
|
+
/* @__PURE__ */ React.createElement("p", { className: "text-sm font-bold underline underline-offset-2" }, "Read ", isExpanded ? "less" : "more")
|
|
2194
|
+
));
|
|
1854
2195
|
}
|
|
1855
2196
|
|
|
1856
2197
|
// src/components/ui/DatePicker.tsx
|
|
1857
2198
|
var import_cva9 = require("cva");
|
|
1858
2199
|
var import_date_fns = require("date-fns");
|
|
1859
|
-
var
|
|
1860
|
-
var
|
|
2200
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2201
|
+
var import_react19 = require("react");
|
|
1861
2202
|
|
|
1862
2203
|
// src/components/ui/calendar.tsx
|
|
1863
|
-
var
|
|
2204
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2205
|
+
var React14 = __toESM(require("react"), 1);
|
|
1864
2206
|
var import_react_day_picker = require("react-day-picker");
|
|
1865
2207
|
|
|
1866
2208
|
// src/components/ui/buttonShadcn.tsx
|
|
1867
2209
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1868
2210
|
var import_class_variance_authority = require("class-variance-authority");
|
|
1869
|
-
var
|
|
1870
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2211
|
+
var React13 = __toESM(require("react"), 1);
|
|
1871
2212
|
var buttonVariants2 = (0, import_class_variance_authority.cva)(
|
|
1872
2213
|
"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",
|
|
1873
2214
|
{
|
|
@@ -1893,18 +2234,17 @@ var buttonVariants2 = (0, import_class_variance_authority.cva)(
|
|
|
1893
2234
|
}
|
|
1894
2235
|
}
|
|
1895
2236
|
);
|
|
1896
|
-
var Button2 =
|
|
2237
|
+
var Button2 = React13.forwardRef(
|
|
1897
2238
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
1898
2239
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
1899
|
-
return /* @__PURE__ */
|
|
2240
|
+
return /* @__PURE__ */ React13.createElement(Comp, { className: cn(buttonVariants2({ variant, size, className })), ref, ...props });
|
|
1900
2241
|
}
|
|
1901
2242
|
);
|
|
1902
2243
|
Button2.displayName = "Button";
|
|
1903
2244
|
|
|
1904
2245
|
// src/components/ui/calendar.tsx
|
|
1905
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1906
2246
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
1907
|
-
return /* @__PURE__ */
|
|
2247
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1908
2248
|
import_react_day_picker.DayPicker,
|
|
1909
2249
|
{
|
|
1910
2250
|
showOutsideDays,
|
|
@@ -1944,8 +2284,8 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
1944
2284
|
...classNames
|
|
1945
2285
|
},
|
|
1946
2286
|
components: {
|
|
1947
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
1948
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
2287
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ React14.createElement(import_lucide_react14.ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
2288
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ React14.createElement(import_lucide_react14.ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
1949
2289
|
},
|
|
1950
2290
|
...props
|
|
1951
2291
|
}
|
|
@@ -1954,11 +2294,10 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
1954
2294
|
Calendar.displayName = "Calendar";
|
|
1955
2295
|
|
|
1956
2296
|
// src/components/ui/DatePicker.tsx
|
|
1957
|
-
var
|
|
1958
|
-
var DatePicker = (0, import_react14.forwardRef)(
|
|
2297
|
+
var DatePicker = (0, import_react19.forwardRef)(
|
|
1959
2298
|
({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {
|
|
1960
|
-
const [date, setDate] = (0,
|
|
1961
|
-
(0,
|
|
2299
|
+
const [date, setDate] = (0, import_react19.useState)(null);
|
|
2300
|
+
(0, import_react19.useEffect)(() => {
|
|
1962
2301
|
setDate(value ?? null);
|
|
1963
2302
|
}, [value]);
|
|
1964
2303
|
const handleDateSelect = (dateSelected) => {
|
|
@@ -1966,35 +2305,25 @@ var DatePicker = (0, import_react14.forwardRef)(
|
|
|
1966
2305
|
onChange?.(dateSelected);
|
|
1967
2306
|
setDate(dateSelected);
|
|
1968
2307
|
};
|
|
1969
|
-
return /* @__PURE__ */
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
selected: date || void 0,
|
|
1989
|
-
onSelect: handleDateSelect,
|
|
1990
|
-
captionLayout: "dropdown",
|
|
1991
|
-
showOutsideDays: true,
|
|
1992
|
-
className: classNames?.calendar
|
|
1993
|
-
}
|
|
1994
|
-
) })
|
|
1995
|
-
] }),
|
|
1996
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorMessage_default, { message: error })
|
|
1997
|
-
] });
|
|
2308
|
+
return /* @__PURE__ */ React.createElement("div", { id, className: cn("flex w-auto flex-col gap-1") }, label && /* @__PURE__ */ React.createElement(
|
|
2309
|
+
Label_default,
|
|
2310
|
+
{
|
|
2311
|
+
text: label,
|
|
2312
|
+
required,
|
|
2313
|
+
description,
|
|
2314
|
+
className: classNames?.label
|
|
2315
|
+
}
|
|
2316
|
+
), /* @__PURE__ */ React.createElement(Popover, null, /* @__PURE__ */ React.createElement(PopoverTrigger, { "data-testid": testId }, /* @__PURE__ */ React.createElement("div", { className: cn(datePickerStyle(), classNames?.input) }, /* @__PURE__ */ React.createElement(import_lucide_react15.Calendar, { size: 16 }), date ? (0, import_date_fns.format)(date, "MM/dd/yyyy") : "Select a date")), /* @__PURE__ */ React.createElement(PopoverContent, { ref }, /* @__PURE__ */ React.createElement(
|
|
2317
|
+
Calendar,
|
|
2318
|
+
{
|
|
2319
|
+
mode: "single",
|
|
2320
|
+
selected: date || void 0,
|
|
2321
|
+
onSelect: handleDateSelect,
|
|
2322
|
+
captionLayout: "dropdown",
|
|
2323
|
+
showOutsideDays: true,
|
|
2324
|
+
className: classNames?.calendar
|
|
2325
|
+
}
|
|
2326
|
+
))), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1998
2327
|
}
|
|
1999
2328
|
);
|
|
2000
2329
|
var datePickerStyle = (0, import_cva9.cva)([
|
|
@@ -2032,7 +2361,6 @@ var datePickerStyle = (0, import_cva9.cva)([
|
|
|
2032
2361
|
// src/components/ui/StepTabs.tsx
|
|
2033
2362
|
var Tabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
2034
2363
|
var import_cva10 = require("cva");
|
|
2035
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2036
2364
|
var tabParentVariants = (0, import_cva10.cva)("flex flex-col", {
|
|
2037
2365
|
variants: {
|
|
2038
2366
|
variant: {
|
|
@@ -2083,45 +2411,42 @@ function StepTabs({
|
|
|
2083
2411
|
variant,
|
|
2084
2412
|
...props
|
|
2085
2413
|
}) {
|
|
2086
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ React.createElement(
|
|
2087
2415
|
Tabs.Root,
|
|
2088
2416
|
{
|
|
2089
2417
|
value: currentStep,
|
|
2090
2418
|
onValueChange: setCurrentStep,
|
|
2091
2419
|
defaultValue: defaultValue ?? "0",
|
|
2092
2420
|
className: cn(tabParentVariants({ variant }), className),
|
|
2093
|
-
...props
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
]
|
|
2117
|
-
}
|
|
2421
|
+
...props
|
|
2422
|
+
},
|
|
2423
|
+
/* @__PURE__ */ React.createElement(Tabs.List, { className: cn(headerVariants({ variant })) }, list.length > 1 && list.map((item, index) => /* @__PURE__ */ React.createElement(
|
|
2424
|
+
Tabs.Trigger,
|
|
2425
|
+
{
|
|
2426
|
+
key: `${item}-${index}`,
|
|
2427
|
+
className: cn(singleTabVariants({ variant }), classNameTab),
|
|
2428
|
+
value: index.toString()
|
|
2429
|
+
},
|
|
2430
|
+
item
|
|
2431
|
+
))),
|
|
2432
|
+
children && children.map((child, index) => /* @__PURE__ */ React.createElement(
|
|
2433
|
+
Tabs.Content,
|
|
2434
|
+
{
|
|
2435
|
+
key: index,
|
|
2436
|
+
className: cn(
|
|
2437
|
+
"grow rounded-b-md bg-white p-5 outline-none",
|
|
2438
|
+
variant === "minimal" && "border-t"
|
|
2439
|
+
),
|
|
2440
|
+
value: index.toString()
|
|
2441
|
+
},
|
|
2442
|
+
child
|
|
2443
|
+
))
|
|
2118
2444
|
);
|
|
2119
2445
|
}
|
|
2120
2446
|
|
|
2121
2447
|
// src/components/ui/DismissibleBanner.tsx
|
|
2122
|
-
var
|
|
2123
|
-
var
|
|
2124
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2448
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2449
|
+
var import_react20 = require("react");
|
|
2125
2450
|
function DismissibleBanner({
|
|
2126
2451
|
children,
|
|
2127
2452
|
cookieId,
|
|
@@ -2130,8 +2455,8 @@ function DismissibleBanner({
|
|
|
2130
2455
|
buttonClassNames
|
|
2131
2456
|
}) {
|
|
2132
2457
|
const safeId = encodeURIComponent(cookieId);
|
|
2133
|
-
const [isVisible, setIsVisible] = (0,
|
|
2134
|
-
(0,
|
|
2458
|
+
const [isVisible, setIsVisible] = (0, import_react20.useState)(false);
|
|
2459
|
+
(0, import_react20.useEffect)(() => {
|
|
2135
2460
|
const cookies = document.cookie.split(";");
|
|
2136
2461
|
const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`));
|
|
2137
2462
|
if (!isDismissed) {
|
|
@@ -2143,26 +2468,24 @@ function DismissibleBanner({
|
|
|
2143
2468
|
setIsVisible(false);
|
|
2144
2469
|
};
|
|
2145
2470
|
if (!isVisible) return null;
|
|
2146
|
-
return /* @__PURE__ */
|
|
2471
|
+
return /* @__PURE__ */ React.createElement(
|
|
2147
2472
|
"nav",
|
|
2148
2473
|
{
|
|
2149
2474
|
className: cn(
|
|
2150
2475
|
"align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3",
|
|
2151
2476
|
className
|
|
2152
|
-
)
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
]
|
|
2165
|
-
}
|
|
2477
|
+
)
|
|
2478
|
+
},
|
|
2479
|
+
/* @__PURE__ */ React.createElement("div", { className: cn("w-full text-center text-sm text-green-100", textClassNames) }, children),
|
|
2480
|
+
/* @__PURE__ */ React.createElement(
|
|
2481
|
+
"button",
|
|
2482
|
+
{
|
|
2483
|
+
className: cn("text-green-100", buttonClassNames),
|
|
2484
|
+
"aria-label": "Close banner",
|
|
2485
|
+
onClick: handleDismiss
|
|
2486
|
+
},
|
|
2487
|
+
/* @__PURE__ */ React.createElement(import_lucide_react16.X, { size: 28 })
|
|
2488
|
+
)
|
|
2166
2489
|
);
|
|
2167
2490
|
}
|
|
2168
2491
|
|
|
@@ -2596,17 +2919,12 @@ function salaryRange(salary, showUnitText = true) {
|
|
|
2596
2919
|
}
|
|
2597
2920
|
|
|
2598
2921
|
// src/components/company/CompanyBenefits.tsx
|
|
2599
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2600
2922
|
function CompanyBenefits({ benefits }) {
|
|
2601
2923
|
if (!benefits) return null;
|
|
2602
|
-
return /* @__PURE__ */
|
|
2603
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.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" }),
|
|
2604
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
|
|
2605
|
-
] });
|
|
2924
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2", "data-testid": "company-benefits" }, /* @__PURE__ */ React.createElement("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg" }, "Company benefits"), /* @__PURE__ */ React.createElement("ul", { className: "flex flex-col gap-3" }, benefits.map((benefit, i) => /* @__PURE__ */ React.createElement("li", { key: `${benefit}-${i}`, className: "text-base text-grey-80" }, benefit))));
|
|
2606
2925
|
}
|
|
2607
2926
|
|
|
2608
2927
|
// src/components/company/CompanyInformation.tsx
|
|
2609
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2610
2928
|
function CompanyInformation({
|
|
2611
2929
|
name,
|
|
2612
2930
|
how,
|
|
@@ -2614,116 +2932,81 @@ function CompanyInformation({
|
|
|
2614
2932
|
wow,
|
|
2615
2933
|
website
|
|
2616
2934
|
}) {
|
|
2617
|
-
return /* @__PURE__ */
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
] })
|
|
2636
|
-
] }),
|
|
2637
|
-
wow && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex gap-2", children: [
|
|
2638
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "\u{1F31F}" }),
|
|
2639
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-base text-grey-80", children: [
|
|
2640
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
|
|
2641
|
-
wow
|
|
2642
|
-
] })
|
|
2643
|
-
] }),
|
|
2644
|
-
website && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2645
|
-
LinkButton,
|
|
2646
|
-
{
|
|
2647
|
-
"data-testid": "company-website-link",
|
|
2648
|
-
href: website,
|
|
2649
|
-
target: "_blank",
|
|
2650
|
-
rel: "noopener noreferrer",
|
|
2651
|
-
children: "Website"
|
|
2652
|
-
}
|
|
2653
|
-
) })
|
|
2654
|
-
] });
|
|
2935
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React.createElement(
|
|
2936
|
+
"h2",
|
|
2937
|
+
{
|
|
2938
|
+
"data-testid": "company-name",
|
|
2939
|
+
className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg"
|
|
2940
|
+
},
|
|
2941
|
+
"About ",
|
|
2942
|
+
name
|
|
2943
|
+
), how && /* @__PURE__ */ React.createElement("p", { "data-testid": "company-information", className: "text-base text-grey-80" }, how), mission && /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement("span", null, "\u{1F680}"), /* @__PURE__ */ React.createElement("p", { className: "text-base text-grey-80" }, /* @__PURE__ */ React.createElement("span", { className: "pr-1 font-bold" }, "Mission"), mission)), wow && /* @__PURE__ */ React.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React.createElement("span", null, "\u{1F31F}"), /* @__PURE__ */ React.createElement("p", { className: "text-base text-grey-80" }, /* @__PURE__ */ React.createElement("span", { className: "pr-1 font-bold" }, "Wow Factor"), wow)), website && /* @__PURE__ */ React.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React.createElement(
|
|
2944
|
+
LinkButton,
|
|
2945
|
+
{
|
|
2946
|
+
"data-testid": "company-website-link",
|
|
2947
|
+
href: website,
|
|
2948
|
+
target: "_blank",
|
|
2949
|
+
rel: "noopener noreferrer"
|
|
2950
|
+
},
|
|
2951
|
+
"Website"
|
|
2952
|
+
)));
|
|
2655
2953
|
}
|
|
2656
2954
|
|
|
2657
2955
|
// src/components/company/CompanyTake.tsx
|
|
2658
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2659
2956
|
function CompanyTake({ content, avatarSrc }) {
|
|
2660
2957
|
if (!content) return null;
|
|
2661
|
-
return /* @__PURE__ */
|
|
2958
|
+
return /* @__PURE__ */ React.createElement(
|
|
2662
2959
|
"div",
|
|
2663
2960
|
{
|
|
2664
2961
|
"data-testid": "company-take",
|
|
2665
|
-
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6"
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Avatar, { name: "Jon Lee", src: avatarSrc }),
|
|
2671
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col flex-wrap items-start", children: [
|
|
2672
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
|
|
2673
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
|
|
2674
|
-
] })
|
|
2675
|
-
] })
|
|
2676
|
-
]
|
|
2677
|
-
}
|
|
2962
|
+
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6"
|
|
2963
|
+
},
|
|
2964
|
+
/* @__PURE__ */ React.createElement("p", { className: "text-lg font-bold text-white sm:text-xl" }, "The Real Dill \u2618\uFE0F"),
|
|
2965
|
+
/* @__PURE__ */ React.createElement("div", { className: "mt-2 flex items-center justify-start" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-normal text-grey-10" }, content)),
|
|
2966
|
+
/* @__PURE__ */ React.createElement("div", { className: "mt-8 flex w-full items-center gap-3" }, /* @__PURE__ */ React.createElement(Avatar, { name: "Jon Lee", src: avatarSrc }), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col flex-wrap items-start" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-bold text-white" }, "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA"), /* @__PURE__ */ React.createElement("p", { className: "text-xs font-normal text-grey-30" }, "Pickle co-founder")))
|
|
2678
2967
|
);
|
|
2679
2968
|
}
|
|
2680
2969
|
|
|
2681
2970
|
// src/components/jobPost/JobDescription.tsx
|
|
2682
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2683
2971
|
function JobDescription({ description }) {
|
|
2684
2972
|
if (!description) return null;
|
|
2685
|
-
return /* @__PURE__ */
|
|
2686
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-xl font-bold", children: "Job Description" }),
|
|
2687
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ReadMore, { text: description })
|
|
2688
|
-
] });
|
|
2973
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-col gap-2" }, /* @__PURE__ */ React.createElement("h3", { className: "text-xl font-bold" }, "Job Description"), /* @__PURE__ */ React.createElement(ReadMore, { text: description }));
|
|
2689
2974
|
}
|
|
2690
2975
|
|
|
2691
2976
|
// src/components/jobPost/JobHeader.tsx
|
|
2692
|
-
var
|
|
2977
|
+
var import_lucide_react19 = require("lucide-react");
|
|
2693
2978
|
var import_image = __toESM(require("next/image"), 1);
|
|
2694
2979
|
|
|
2695
2980
|
// src/components/buttons/BackButton.tsx
|
|
2696
|
-
var
|
|
2981
|
+
var import_lucide_react17 = require("lucide-react");
|
|
2697
2982
|
var import_navigation2 = require("next/navigation");
|
|
2698
2983
|
|
|
2699
2984
|
// src/hooks/useWindowHistory.ts
|
|
2700
|
-
var
|
|
2985
|
+
var import_react22 = require("react");
|
|
2701
2986
|
|
|
2702
2987
|
// src/contexts/WindowHistoryProvider.tsx
|
|
2703
2988
|
var import_navigation = require("next/navigation");
|
|
2704
|
-
var
|
|
2705
|
-
var
|
|
2706
|
-
var WindowHistoryContext = (0, import_react16.createContext)({});
|
|
2989
|
+
var import_react21 = require("react");
|
|
2990
|
+
var WindowHistoryContext = (0, import_react21.createContext)({});
|
|
2707
2991
|
function WindowHistoryProvider({ children }) {
|
|
2708
|
-
const [history, setHistory] = (0,
|
|
2992
|
+
const [history, setHistory] = (0, import_react21.useState)([]);
|
|
2709
2993
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
2710
|
-
(0,
|
|
2994
|
+
(0, import_react21.useEffect)(() => {
|
|
2711
2995
|
setHistory(
|
|
2712
2996
|
(prev) => prev.at(-1) === window.location.href ? prev : [...prev, window.location.href]
|
|
2713
2997
|
);
|
|
2714
2998
|
}, [searchParams]);
|
|
2715
|
-
const contextValue = (0,
|
|
2716
|
-
return /* @__PURE__ */
|
|
2999
|
+
const contextValue = (0, import_react21.useMemo)(() => ({ history }), [history]);
|
|
3000
|
+
return /* @__PURE__ */ React.createElement(WindowHistoryContext.Provider, { value: contextValue }, children);
|
|
2717
3001
|
}
|
|
2718
3002
|
|
|
2719
3003
|
// src/hooks/useWindowHistory.ts
|
|
2720
3004
|
function useWindowHistory() {
|
|
2721
|
-
const windowHistoryContext = (0,
|
|
3005
|
+
const windowHistoryContext = (0, import_react22.useContext)(WindowHistoryContext);
|
|
2722
3006
|
return windowHistoryContext;
|
|
2723
3007
|
}
|
|
2724
3008
|
|
|
2725
3009
|
// src/components/buttons/BackButton.tsx
|
|
2726
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2727
3010
|
function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
2728
3011
|
const { history } = useWindowHistory();
|
|
2729
3012
|
const router = (0, import_navigation2.useRouter)();
|
|
@@ -2736,7 +3019,7 @@ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
|
2736
3019
|
router.push(fallbackHref ?? "/");
|
|
2737
3020
|
}
|
|
2738
3021
|
};
|
|
2739
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ React.createElement(
|
|
2740
3023
|
Icon,
|
|
2741
3024
|
{
|
|
2742
3025
|
"aria-label": "back button",
|
|
@@ -2744,39 +3027,38 @@ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
|
2744
3027
|
size: "small",
|
|
2745
3028
|
onClick: goBack,
|
|
2746
3029
|
className,
|
|
2747
|
-
...props
|
|
2748
|
-
|
|
2749
|
-
|
|
3030
|
+
...props
|
|
3031
|
+
},
|
|
3032
|
+
/* @__PURE__ */ React.createElement(import_lucide_react17.X, null)
|
|
2750
3033
|
);
|
|
2751
3034
|
}
|
|
2752
3035
|
|
|
2753
3036
|
// src/lib/icons.ts
|
|
2754
|
-
var
|
|
3037
|
+
var import_lucide_react18 = require("lucide-react");
|
|
2755
3038
|
var iconMap = {
|
|
2756
|
-
house:
|
|
2757
|
-
layers:
|
|
2758
|
-
users:
|
|
2759
|
-
settings:
|
|
2760
|
-
building:
|
|
2761
|
-
bell:
|
|
2762
|
-
wallet:
|
|
2763
|
-
contact:
|
|
2764
|
-
banknote:
|
|
2765
|
-
"message-square-dot":
|
|
2766
|
-
"life-buoy":
|
|
2767
|
-
"building-2":
|
|
2768
|
-
"gallery-vertical-end":
|
|
2769
|
-
"square-kanban":
|
|
2770
|
-
"briefcase-business":
|
|
2771
|
-
"circle-user":
|
|
2772
|
-
"key-round":
|
|
2773
|
-
"clock-2":
|
|
2774
|
-
"circle-user-round":
|
|
2775
|
-
"map-pin":
|
|
3039
|
+
house: import_lucide_react18.Home,
|
|
3040
|
+
layers: import_lucide_react18.Layers,
|
|
3041
|
+
users: import_lucide_react18.Users,
|
|
3042
|
+
settings: import_lucide_react18.Settings,
|
|
3043
|
+
building: import_lucide_react18.Building,
|
|
3044
|
+
bell: import_lucide_react18.Bell,
|
|
3045
|
+
wallet: import_lucide_react18.Wallet,
|
|
3046
|
+
contact: import_lucide_react18.Contact,
|
|
3047
|
+
banknote: import_lucide_react18.Banknote,
|
|
3048
|
+
"message-square-dot": import_lucide_react18.MessageSquareDot,
|
|
3049
|
+
"life-buoy": import_lucide_react18.LifeBuoy,
|
|
3050
|
+
"building-2": import_lucide_react18.Building2,
|
|
3051
|
+
"gallery-vertical-end": import_lucide_react18.GalleryVerticalEnd,
|
|
3052
|
+
"square-kanban": import_lucide_react18.SquareKanban,
|
|
3053
|
+
"briefcase-business": import_lucide_react18.BriefcaseBusiness,
|
|
3054
|
+
"circle-user": import_lucide_react18.CircleUser,
|
|
3055
|
+
"key-round": import_lucide_react18.KeyRound,
|
|
3056
|
+
"clock-2": import_lucide_react18.Clock2,
|
|
3057
|
+
"circle-user-round": import_lucide_react18.CircleUserRound,
|
|
3058
|
+
"map-pin": import_lucide_react18.MapPin
|
|
2776
3059
|
};
|
|
2777
3060
|
|
|
2778
3061
|
// src/components/jobPost/JobHeader.tsx
|
|
2779
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2780
3062
|
function JobHeader({
|
|
2781
3063
|
title,
|
|
2782
3064
|
subtitles,
|
|
@@ -2792,130 +3074,111 @@ function JobHeader({
|
|
|
2792
3074
|
}) {
|
|
2793
3075
|
const renderIcon = (icon) => {
|
|
2794
3076
|
const Icon2 = iconMap[icon];
|
|
2795
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ React.createElement(Icon2, { size: 18 });
|
|
2796
3078
|
};
|
|
2797
|
-
return /* @__PURE__ */
|
|
3079
|
+
return /* @__PURE__ */ React.createElement(
|
|
2798
3080
|
"div",
|
|
2799
3081
|
{
|
|
2800
3082
|
"data-testid": "job-header-root",
|
|
2801
3083
|
className: cn(
|
|
2802
3084
|
"-mt-8 flex w-full flex-col items-center justify-between gap-6 md:-mt-0",
|
|
2803
3085
|
!standalone && "rounded-3xl"
|
|
3086
|
+
)
|
|
3087
|
+
},
|
|
3088
|
+
!standalone && /* @__PURE__ */ React.createElement("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" }, /* @__PURE__ */ React.createElement(
|
|
3089
|
+
import_image.default,
|
|
3090
|
+
{
|
|
3091
|
+
className: "h-full w-full rounded-t-3xl object-cover",
|
|
3092
|
+
src: bannerSrc,
|
|
3093
|
+
alt: "job banner",
|
|
3094
|
+
fill: true
|
|
3095
|
+
}
|
|
3096
|
+
), /* @__PURE__ */ React.createElement(
|
|
3097
|
+
BackButton,
|
|
3098
|
+
{
|
|
3099
|
+
acceptedRoutes: backAcceptedRoutes,
|
|
3100
|
+
fallbackHref: backFallbackHref,
|
|
3101
|
+
className: "absolute right-2 top-2 flex items-center justify-center text-white sm:hidden",
|
|
3102
|
+
"data-testid": "job-header-back-button"
|
|
3103
|
+
}
|
|
3104
|
+
), /* @__PURE__ */ React.createElement(
|
|
3105
|
+
"div",
|
|
3106
|
+
{
|
|
3107
|
+
className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
|
|
3108
|
+
"data-testid": "job-header-avatar"
|
|
3109
|
+
},
|
|
3110
|
+
/* @__PURE__ */ React.createElement(
|
|
3111
|
+
Avatar,
|
|
3112
|
+
{
|
|
3113
|
+
size: "large",
|
|
3114
|
+
target: "_blank",
|
|
3115
|
+
href: avatarHref,
|
|
3116
|
+
name: avatarName,
|
|
3117
|
+
src: avatarSrc,
|
|
3118
|
+
rel: "noopener noreferrer"
|
|
3119
|
+
}
|
|
3120
|
+
)
|
|
3121
|
+
)),
|
|
3122
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col md:flex-row" }, standalone && /* @__PURE__ */ React.createElement("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar" }, /* @__PURE__ */ React.createElement(
|
|
3123
|
+
Avatar,
|
|
3124
|
+
{
|
|
3125
|
+
size: "large",
|
|
3126
|
+
target: "_blank",
|
|
3127
|
+
href: avatarHref,
|
|
3128
|
+
name: avatarName,
|
|
3129
|
+
src: avatarSrc,
|
|
3130
|
+
rel: "noopener noreferrer"
|
|
3131
|
+
}
|
|
3132
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg" }, subtitles?.map((subtitle, i) => /* @__PURE__ */ React.createElement(
|
|
3133
|
+
"div",
|
|
3134
|
+
{
|
|
3135
|
+
key: subtitle,
|
|
3136
|
+
"data-testid": `job-header-subtitle-${i}`,
|
|
3137
|
+
className: "flex items-center"
|
|
3138
|
+
},
|
|
3139
|
+
subtitle,
|
|
3140
|
+
i < subtitles.length - 1 && /* @__PURE__ */ React.createElement(import_lucide_react19.Dot, { className: "mx-1 shrink-0", size: 10 })
|
|
3141
|
+
)))), /* @__PURE__ */ React.createElement(
|
|
3142
|
+
"div",
|
|
3143
|
+
{
|
|
3144
|
+
"data-testid": "job-header-content",
|
|
3145
|
+
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1"
|
|
3146
|
+
},
|
|
3147
|
+
/* @__PURE__ */ React.createElement(
|
|
3148
|
+
"h2",
|
|
3149
|
+
{
|
|
3150
|
+
"data-testid": "job-header-title",
|
|
3151
|
+
className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg"
|
|
3152
|
+
},
|
|
3153
|
+
title
|
|
2804
3154
|
),
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
{
|
|
2833
|
-
size: "large",
|
|
2834
|
-
target: "_blank",
|
|
2835
|
-
href: avatarHref,
|
|
2836
|
-
name: avatarName,
|
|
2837
|
-
src: avatarSrc,
|
|
2838
|
-
rel: "noopener noreferrer"
|
|
2839
|
-
}
|
|
2840
|
-
)
|
|
2841
|
-
}
|
|
2842
|
-
)
|
|
2843
|
-
] }),
|
|
2844
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
|
|
2845
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex flex-col md:flex-row", children: [
|
|
2846
|
-
standalone && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2847
|
-
Avatar,
|
|
2848
|
-
{
|
|
2849
|
-
size: "large",
|
|
2850
|
-
target: "_blank",
|
|
2851
|
-
href: avatarHref,
|
|
2852
|
-
name: avatarName,
|
|
2853
|
-
src: avatarSrc,
|
|
2854
|
-
rel: "noopener noreferrer"
|
|
2855
|
-
}
|
|
2856
|
-
) }),
|
|
2857
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.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_runtime40.jsxs)(
|
|
2858
|
-
"div",
|
|
2859
|
-
{
|
|
2860
|
-
"data-testid": `job-header-subtitle-${i}`,
|
|
2861
|
-
className: "flex items-center",
|
|
2862
|
-
children: [
|
|
2863
|
-
subtitle,
|
|
2864
|
-
i < subtitles.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react18.Dot, { className: "mx-1 shrink-0", size: 10 })
|
|
2865
|
-
]
|
|
2866
|
-
},
|
|
2867
|
-
subtitle
|
|
2868
|
-
)) })
|
|
2869
|
-
] }),
|
|
2870
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2871
|
-
"div",
|
|
2872
|
-
{
|
|
2873
|
-
"data-testid": "job-header-content",
|
|
2874
|
-
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
|
|
2875
|
-
children: [
|
|
2876
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2877
|
-
"h2",
|
|
2878
|
-
{
|
|
2879
|
-
"data-testid": "job-header-title",
|
|
2880
|
-
className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg",
|
|
2881
|
-
children: title
|
|
2882
|
-
}
|
|
2883
|
-
),
|
|
2884
|
-
!!actions && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2885
|
-
"div",
|
|
2886
|
-
{
|
|
2887
|
-
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
2888
|
-
"data-testid": "job-header-actions",
|
|
2889
|
-
children: actions
|
|
2890
|
-
}
|
|
2891
|
-
)
|
|
2892
|
-
]
|
|
2893
|
-
}
|
|
2894
|
-
),
|
|
2895
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2896
|
-
"div",
|
|
2897
|
-
{
|
|
2898
|
-
"data-testid": "job-header-tags",
|
|
2899
|
-
className: "flex flex-row flex-wrap items-center justify-start gap-2",
|
|
2900
|
-
children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2901
|
-
Chip_default,
|
|
2902
|
-
{
|
|
2903
|
-
size: "small",
|
|
2904
|
-
variant: "neutral",
|
|
2905
|
-
"aria-label": name,
|
|
2906
|
-
"data-testid": `job-header-tag-${name}`,
|
|
2907
|
-
children: [
|
|
2908
|
-
renderIcon(icon),
|
|
2909
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: label })
|
|
2910
|
-
]
|
|
2911
|
-
},
|
|
2912
|
-
`${name}-${label}`
|
|
2913
|
-
))
|
|
2914
|
-
}
|
|
2915
|
-
)
|
|
2916
|
-
] })
|
|
2917
|
-
]
|
|
2918
|
-
}
|
|
3155
|
+
!!actions && /* @__PURE__ */ React.createElement(
|
|
3156
|
+
"div",
|
|
3157
|
+
{
|
|
3158
|
+
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
3159
|
+
"data-testid": "job-header-actions"
|
|
3160
|
+
},
|
|
3161
|
+
actions
|
|
3162
|
+
)
|
|
3163
|
+
), /* @__PURE__ */ React.createElement(
|
|
3164
|
+
"div",
|
|
3165
|
+
{
|
|
3166
|
+
"data-testid": "job-header-tags",
|
|
3167
|
+
className: "flex flex-row flex-wrap items-center justify-start gap-2"
|
|
3168
|
+
},
|
|
3169
|
+
tags?.map(({ name, label, icon }) => /* @__PURE__ */ React.createElement(
|
|
3170
|
+
Chip_default,
|
|
3171
|
+
{
|
|
3172
|
+
key: `${name}-${label}`,
|
|
3173
|
+
size: "small",
|
|
3174
|
+
variant: "neutral",
|
|
3175
|
+
"aria-label": name,
|
|
3176
|
+
"data-testid": `job-header-tag-${name}`
|
|
3177
|
+
},
|
|
3178
|
+
renderIcon(icon),
|
|
3179
|
+
/* @__PURE__ */ React.createElement("span", null, label)
|
|
3180
|
+
))
|
|
3181
|
+
))
|
|
2919
3182
|
);
|
|
2920
3183
|
}
|
|
2921
3184
|
|
|
@@ -2923,7 +3186,7 @@ function JobHeader({
|
|
|
2923
3186
|
var DateFns = __toESM(require("date-fns"), 1);
|
|
2924
3187
|
|
|
2925
3188
|
// src/hooks/useDisplayText.ts
|
|
2926
|
-
var
|
|
3189
|
+
var import_react23 = require("react");
|
|
2927
3190
|
|
|
2928
3191
|
// src/lib/mappings.ts
|
|
2929
3192
|
var employmentTypeDisplayText = {
|
|
@@ -3367,9 +3630,9 @@ var DisplayTextService = class {
|
|
|
3367
3630
|
|
|
3368
3631
|
// src/hooks/useDisplayText.ts
|
|
3369
3632
|
var useDisplayText = (scope, value) => {
|
|
3370
|
-
const [displayText, setDisplayText] = (0,
|
|
3371
|
-
const displayService = (0,
|
|
3372
|
-
(0,
|
|
3633
|
+
const [displayText, setDisplayText] = (0, import_react23.useState)("");
|
|
3634
|
+
const displayService = (0, import_react23.useMemo)(() => new DisplayTextService(), []);
|
|
3635
|
+
(0, import_react23.useEffect)(() => {
|
|
3373
3636
|
if (!displayService || !value) {
|
|
3374
3637
|
setDisplayText("");
|
|
3375
3638
|
return;
|
|
@@ -3430,7 +3693,6 @@ function getAddressList(jobPost) {
|
|
|
3430
3693
|
}
|
|
3431
3694
|
|
|
3432
3695
|
// src/components/jobPost/JobPost.tsx
|
|
3433
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3434
3696
|
function JobPost({
|
|
3435
3697
|
job,
|
|
3436
3698
|
bannerSrc,
|
|
@@ -3476,97 +3738,80 @@ function JobPost({
|
|
|
3476
3738
|
label
|
|
3477
3739
|
}))
|
|
3478
3740
|
].filter((t) => !!t);
|
|
3479
|
-
return /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ React.createElement(
|
|
3480
3742
|
"div",
|
|
3481
3743
|
{
|
|
3482
3744
|
className: cn(
|
|
3483
3745
|
"flex flex-col gap-10 pb-4",
|
|
3484
3746
|
!standalone && "border-1 rounded-3xl border-grey-5"
|
|
3485
|
-
)
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
{
|
|
3525
|
-
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
|
|
3526
|
-
}
|
|
3527
|
-
)
|
|
3528
|
-
] })
|
|
3529
|
-
]
|
|
3530
|
-
}
|
|
3747
|
+
)
|
|
3748
|
+
},
|
|
3749
|
+
/* @__PURE__ */ React.createElement(
|
|
3750
|
+
JobHeader,
|
|
3751
|
+
{
|
|
3752
|
+
title: job.title,
|
|
3753
|
+
bannerSrc,
|
|
3754
|
+
avatarName: job.hiringOrganization?.companyName,
|
|
3755
|
+
avatarSrc: job.hiringOrganization?.logo?.asset?.url,
|
|
3756
|
+
subtitles: [job.hiringOrganization?.companyName ?? "", `Posted ${formattedDate}`],
|
|
3757
|
+
actions,
|
|
3758
|
+
standalone,
|
|
3759
|
+
avatarHref,
|
|
3760
|
+
backFallbackHref: fallbackHref,
|
|
3761
|
+
backAcceptedRoutes,
|
|
3762
|
+
tags
|
|
3763
|
+
}
|
|
3764
|
+
),
|
|
3765
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-8 px-6" }, /* @__PURE__ */ React.createElement(JobDescription, { description: job.description }), /* @__PURE__ */ React.createElement(
|
|
3766
|
+
CompanyTake,
|
|
3767
|
+
{
|
|
3768
|
+
avatarSrc,
|
|
3769
|
+
content: job.hiringOrganization?.companyNDG?.companyNDGTake
|
|
3770
|
+
}
|
|
3771
|
+
), /* @__PURE__ */ React.createElement(
|
|
3772
|
+
CompanyInformation,
|
|
3773
|
+
{
|
|
3774
|
+
name: job.hiringOrganization?.companyName ?? "",
|
|
3775
|
+
how: job.hiringOrganization?.companyPhilosophy?.companyHow,
|
|
3776
|
+
mission: job.hiringOrganization?.companyPhilosophy?.companyMission,
|
|
3777
|
+
wow: job.hiringOrganization?.companyNDG?.companyWow,
|
|
3778
|
+
website: job.hiringOrganization?.companyWebsite
|
|
3779
|
+
}
|
|
3780
|
+
), /* @__PURE__ */ React.createElement(
|
|
3781
|
+
CompanyBenefits,
|
|
3782
|
+
{
|
|
3783
|
+
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
|
|
3784
|
+
}
|
|
3785
|
+
))
|
|
3531
3786
|
);
|
|
3532
3787
|
}
|
|
3533
3788
|
|
|
3534
3789
|
// src/components/jobCard/JobLocation.tsx
|
|
3535
|
-
var
|
|
3536
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3790
|
+
var import_lucide_react20 = require("lucide-react");
|
|
3537
3791
|
function JobLocation({ jobPost }) {
|
|
3538
3792
|
const locations = getAddressList(jobPost);
|
|
3539
3793
|
if (!locations || locations.length === 0) return null;
|
|
3540
3794
|
const primaryOffice = locations[0];
|
|
3541
3795
|
const extendedLocations = locations.slice(1).map((address) => address);
|
|
3542
|
-
return /* @__PURE__ */
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
TooltipContent,
|
|
3562
|
-
{
|
|
3563
|
-
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3564
|
-
"data-testid": "job-location-tooltip-content",
|
|
3565
|
-
children: extendedLocations.map((location) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-nowrap text-sm", children: location }, location))
|
|
3566
|
-
}
|
|
3567
|
-
)
|
|
3568
|
-
] }) })
|
|
3569
|
-
] });
|
|
3796
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2", "data-testid": "job-location-element" }, /* @__PURE__ */ React.createElement(import_lucide_react20.MapPin, { size: 16 }), /* @__PURE__ */ React.createElement("span", { className: "text-sm font-thin" }, primaryOffice), extendedLocations.length > 0 && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, null, /* @__PURE__ */ React.createElement(
|
|
3797
|
+
Chip_default,
|
|
3798
|
+
{
|
|
3799
|
+
className: "font-bold",
|
|
3800
|
+
size: "small",
|
|
3801
|
+
variant: "jobLocation",
|
|
3802
|
+
"data-testid": "job-location-tooltip"
|
|
3803
|
+
},
|
|
3804
|
+
"+ ",
|
|
3805
|
+
extendedLocations.length,
|
|
3806
|
+
" more"
|
|
3807
|
+
)), /* @__PURE__ */ React.createElement(
|
|
3808
|
+
TooltipContent,
|
|
3809
|
+
{
|
|
3810
|
+
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3811
|
+
"data-testid": "job-location-tooltip-content"
|
|
3812
|
+
},
|
|
3813
|
+
extendedLocations.map((location) => /* @__PURE__ */ React.createElement("div", { key: location, className: "text-nowrap text-sm" }, location))
|
|
3814
|
+
))));
|
|
3570
3815
|
}
|
|
3571
3816
|
|
|
3572
3817
|
// src/types/data/company_service_latest.ts
|