@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.js
CHANGED
|
@@ -6,9 +6,9 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/components/ui/Chip.tsx
|
|
8
8
|
import { cva } from "cva";
|
|
9
|
+
import React2 from "react";
|
|
9
10
|
import { twMerge } from "tailwind-merge";
|
|
10
|
-
|
|
11
|
-
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ jsx("div", { className: twMerge(chipVariants({ variant, size, className })), ...props });
|
|
11
|
+
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ React2.createElement("div", { className: twMerge(chipVariants({ variant, size, className })), ...props });
|
|
12
12
|
var chipVariants = cva(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
13
13
|
variants: {
|
|
14
14
|
variant: {
|
|
@@ -44,10 +44,9 @@ function cn(...inputs) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// src/components/ui/ErrorMessage.tsx
|
|
47
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
48
47
|
function ErrorMessage({ message, className, ...props }) {
|
|
49
48
|
if (!message) return null;
|
|
50
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
51
50
|
}
|
|
52
51
|
var ErrorMessage_default = ErrorMessage;
|
|
53
52
|
|
|
@@ -56,12 +55,11 @@ import { InfoIcon } from "lucide-react";
|
|
|
56
55
|
|
|
57
56
|
// src/components/primitives/tooltip.tsx
|
|
58
57
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
59
|
-
import * as
|
|
60
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
58
|
+
import * as React3 from "react";
|
|
61
59
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
62
60
|
var Tooltip = TooltipPrimitive.Root;
|
|
63
61
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
64
|
-
var TooltipContent =
|
|
62
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
65
63
|
TooltipPrimitive.Content,
|
|
66
64
|
{
|
|
67
65
|
ref,
|
|
@@ -76,34 +74,24 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
76
74
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
77
75
|
|
|
78
76
|
// src/components/ui/Label.tsx
|
|
79
|
-
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
80
77
|
function Label({ text, required, description, className, ...props }) {
|
|
81
78
|
if (!text) return null;
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
!!description && /* @__PURE__ */ jsx4(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
98
|
-
/* @__PURE__ */ jsx4(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx4(InfoIcon, { className: "h-4 w-4" }) }),
|
|
99
|
-
/* @__PURE__ */ jsx4(TooltipContent, { className: "max-w-48", children: description })
|
|
100
|
-
] }) })
|
|
101
|
-
] });
|
|
79
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
80
|
+
"label",
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
84
|
+
className
|
|
85
|
+
),
|
|
86
|
+
...props
|
|
87
|
+
},
|
|
88
|
+
text,
|
|
89
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
90
|
+
), !!description && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(InfoIcon, { className: "h-4 w-4" })), /* @__PURE__ */ React.createElement(TooltipContent, { className: "max-w-48" }, description))));
|
|
102
91
|
}
|
|
103
92
|
var Label_default = Label;
|
|
104
93
|
|
|
105
94
|
// src/components/ui/Input.tsx
|
|
106
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
107
95
|
var Input = forwardRef2(
|
|
108
96
|
({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
109
97
|
const handleClear = () => {
|
|
@@ -114,47 +102,39 @@ var Input = forwardRef2(
|
|
|
114
102
|
const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
|
|
115
103
|
const hasIcon = !!icon;
|
|
116
104
|
const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
151
|
-
onClick: handleClear,
|
|
152
|
-
"data-testid": "clear-button"
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
] }),
|
|
156
|
-
/* @__PURE__ */ jsx5(ErrorMessage_default, { message: error })
|
|
157
|
-
] });
|
|
105
|
+
return /* @__PURE__ */ React.createElement("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}` }, label && /* @__PURE__ */ React.createElement(
|
|
106
|
+
Label_default,
|
|
107
|
+
{
|
|
108
|
+
text: label,
|
|
109
|
+
htmlFor: props.name,
|
|
110
|
+
required: props.required,
|
|
111
|
+
description,
|
|
112
|
+
className: classNames?.label
|
|
113
|
+
}
|
|
114
|
+
), /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, IconComponent && /* @__PURE__ */ React.createElement(
|
|
115
|
+
IconComponent,
|
|
116
|
+
{
|
|
117
|
+
className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
|
|
118
|
+
}
|
|
119
|
+
), /* @__PURE__ */ React.createElement(
|
|
120
|
+
"input",
|
|
121
|
+
{
|
|
122
|
+
className: cn(inputVariants({ theme, hasIcon })),
|
|
123
|
+
ref,
|
|
124
|
+
placeholder,
|
|
125
|
+
value,
|
|
126
|
+
onChange,
|
|
127
|
+
"data-testid": `input-element-${props.id}`,
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
), hasIcon && value && /* @__PURE__ */ React.createElement(
|
|
131
|
+
X,
|
|
132
|
+
{
|
|
133
|
+
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
134
|
+
onClick: handleClear,
|
|
135
|
+
"data-testid": "clear-button"
|
|
136
|
+
}
|
|
137
|
+
)), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
158
138
|
}
|
|
159
139
|
);
|
|
160
140
|
Input.displayName = "Input";
|
|
@@ -218,8 +198,7 @@ import { Check, Minus } from "lucide-react";
|
|
|
218
198
|
import {
|
|
219
199
|
forwardRef as forwardRef3
|
|
220
200
|
} from "react";
|
|
221
|
-
|
|
222
|
-
var CheckboxToggle = forwardRef3(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
201
|
+
var CheckboxToggle = forwardRef3(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
223
202
|
CheckboxPrimitive.Root,
|
|
224
203
|
{
|
|
225
204
|
ref,
|
|
@@ -248,41 +227,32 @@ var CheckboxToggle = forwardRef3(({ className, ...props }, ref) => /* @__PURE__
|
|
|
248
227
|
props.disabled && "bg-grey-20 data-[state=checked]:bg-grey-20 data-[state=checked]:text-foreground",
|
|
249
228
|
className
|
|
250
229
|
),
|
|
251
|
-
...props
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
/* @__PURE__ */ jsx6(Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
|
|
255
|
-
] })
|
|
256
|
-
}
|
|
230
|
+
...props
|
|
231
|
+
},
|
|
232
|
+
/* @__PURE__ */ React.createElement(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current" }, /* @__PURE__ */ React.createElement(Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }), /* @__PURE__ */ React.createElement(Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" }))
|
|
257
233
|
));
|
|
258
234
|
CheckboxToggle.displayName = CheckboxPrimitive.Root.displayName;
|
|
259
235
|
var Checkbox = forwardRef3(
|
|
260
236
|
({ error, classNames, children, ...props }, ref) => {
|
|
261
237
|
const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/* @__PURE__ */ jsx6(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
276
|
-
]
|
|
277
|
-
}
|
|
278
|
-
)
|
|
279
|
-
] });
|
|
238
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex space-x-2", classNames?.wrapper) }, /* @__PURE__ */ React.createElement(CheckboxToggle, { id, ref, ...props }), /* @__PURE__ */ React.createElement(
|
|
239
|
+
"label",
|
|
240
|
+
{
|
|
241
|
+
htmlFor: id,
|
|
242
|
+
className: cn(
|
|
243
|
+
"text-sm",
|
|
244
|
+
props.disabled && "pointer-events-none text-grey-40",
|
|
245
|
+
classNames?.label
|
|
246
|
+
)
|
|
247
|
+
},
|
|
248
|
+
children,
|
|
249
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
250
|
+
));
|
|
280
251
|
}
|
|
281
252
|
);
|
|
282
253
|
Checkbox.displayName = "Checkbox";
|
|
283
254
|
|
|
284
255
|
// src/components/ui/ListItem.tsx
|
|
285
|
-
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
286
256
|
function ListItem({
|
|
287
257
|
icon,
|
|
288
258
|
hasCheckbox,
|
|
@@ -296,12 +266,12 @@ function ListItem({
|
|
|
296
266
|
const getIconIfValid = (icon2) => {
|
|
297
267
|
if (icon2 in icons2) {
|
|
298
268
|
const IconComponent = icons2[icon2];
|
|
299
|
-
return /* @__PURE__ */
|
|
269
|
+
return /* @__PURE__ */ React.createElement(IconComponent, { size: 14 });
|
|
300
270
|
}
|
|
301
271
|
return null;
|
|
302
272
|
};
|
|
303
273
|
const optionIcon = icon ? getIconIfValid(icon) : void 0;
|
|
304
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ React.createElement(
|
|
305
275
|
"li",
|
|
306
276
|
{
|
|
307
277
|
className: cn(
|
|
@@ -309,70 +279,392 @@ function ListItem({
|
|
|
309
279
|
className
|
|
310
280
|
),
|
|
311
281
|
...props,
|
|
312
|
-
"data-state": isSelected ? "checked" : "unchecked"
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
size: 16
|
|
325
|
-
}
|
|
326
|
-
)
|
|
327
|
-
]
|
|
328
|
-
}
|
|
282
|
+
"data-state": isSelected ? "checked" : "unchecked"
|
|
283
|
+
},
|
|
284
|
+
optionIcon && /* @__PURE__ */ React.createElement("span", { className: "mr-2" }, optionIcon),
|
|
285
|
+
hasCheckbox && /* @__PURE__ */ React.createElement(Checkbox, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
|
|
286
|
+
/* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, title), /* @__PURE__ */ React.createElement("p", { className: "text-xs text-grey-80" }, description)),
|
|
287
|
+
/* @__PURE__ */ React.createElement(
|
|
288
|
+
CheckIcon,
|
|
289
|
+
{
|
|
290
|
+
className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
|
|
291
|
+
size: 16
|
|
292
|
+
}
|
|
293
|
+
)
|
|
329
294
|
);
|
|
330
295
|
}
|
|
331
296
|
var ListItem_default = ListItem;
|
|
332
297
|
|
|
333
|
-
// src/components/ui/MapComponent.tsx
|
|
334
|
-
import {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
298
|
+
// src/components/ui/Map/MapComponent.tsx
|
|
299
|
+
import { APIProvider } from "@vis.gl/react-google-maps";
|
|
300
|
+
|
|
301
|
+
// src/components/ui/Map/constants.ts
|
|
302
|
+
var DEFAULT_POSITION = { lat: 40.715021, lng: -74.00459 };
|
|
303
|
+
var DEFAULT_ZOOM = 10;
|
|
304
|
+
var CLUSTER_DISTANCE_THRESHOLD = 1e-3;
|
|
305
|
+
var PIN_COLORS = {
|
|
306
|
+
background: "#0B5441",
|
|
307
|
+
borderColor: "#EBFDF1",
|
|
308
|
+
glyphColor: "#D4F500"
|
|
309
|
+
};
|
|
310
|
+
var FOCUS_CIRCLE_STYLES = {
|
|
311
|
+
strokeColor: "#0B5441",
|
|
312
|
+
strokeOpacity: 0.8,
|
|
313
|
+
strokeWeight: 2,
|
|
314
|
+
fillColor: "#0B5441",
|
|
315
|
+
fillOpacity: 0.1,
|
|
316
|
+
clickable: false,
|
|
317
|
+
zIndex: 1
|
|
318
|
+
};
|
|
319
|
+
var CLUSTERING_CONFIG = {
|
|
320
|
+
radius: 60,
|
|
321
|
+
maxZoom: 16,
|
|
322
|
+
minPoints: 2
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
// src/components/ui/Map/hooks.ts
|
|
326
|
+
import { useMemo, useState } from "react";
|
|
327
|
+
import useSupercluster from "use-supercluster";
|
|
328
|
+
|
|
329
|
+
// src/components/ui/Map/utils.ts
|
|
330
|
+
function getCenterForCoordinates(coords) {
|
|
331
|
+
if (coords.length === 0) return DEFAULT_POSITION;
|
|
332
|
+
const avgLat = coords.reduce((sum, coord) => sum + coord.lat, 0) / coords.length;
|
|
333
|
+
const avgLng = coords.reduce((sum, coord) => sum + coord.lng, 0) / coords.length;
|
|
334
|
+
return { lat: avgLat, lng: avgLng };
|
|
335
|
+
}
|
|
336
|
+
function getZoomForCoordinates(coords, defaultZoom) {
|
|
337
|
+
if (coords.length <= 1) return defaultZoom;
|
|
338
|
+
const lats = coords.map((coord) => coord.lat);
|
|
339
|
+
const lngs = coords.map((coord) => coord.lng);
|
|
340
|
+
const latDiff = Math.max(...lats) - Math.min(...lats);
|
|
341
|
+
const lngDiff = Math.max(...lngs) - Math.min(...lngs);
|
|
342
|
+
const maxDiff = Math.max(latDiff, lngDiff);
|
|
343
|
+
if (maxDiff > 0.1) return 8;
|
|
344
|
+
if (maxDiff > 0.05) return 10;
|
|
345
|
+
if (maxDiff > 0.01) return 12;
|
|
346
|
+
return 14;
|
|
347
|
+
}
|
|
348
|
+
function filterClusterCoordinates(coordinates, clusterLat, clusterLng) {
|
|
349
|
+
return coordinates.filter((coord) => {
|
|
350
|
+
const latDiff = Math.abs(coord.lat - clusterLat);
|
|
351
|
+
const lngDiff = Math.abs(coord.lng - clusterLng);
|
|
352
|
+
const distance = Math.sqrt(latDiff * latDiff + lngDiff * lngDiff);
|
|
353
|
+
return distance < CLUSTER_DISTANCE_THRESHOLD;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// src/components/ui/Map/clustering.ts
|
|
358
|
+
function convertCoordinatesToGeoJSON(coordinates) {
|
|
359
|
+
return coordinates.map((coord, index) => ({
|
|
360
|
+
type: "Feature",
|
|
361
|
+
properties: {
|
|
362
|
+
cluster: false,
|
|
363
|
+
pointId: index,
|
|
364
|
+
data: coord.data
|
|
365
|
+
},
|
|
366
|
+
geometry: {
|
|
367
|
+
type: "Point",
|
|
368
|
+
coordinates: [coord.lng, coord.lat]
|
|
369
|
+
}
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// src/components/ui/Map/hooks.ts
|
|
374
|
+
function useMapBounds(_coordinates) {
|
|
375
|
+
const [bounds, setBounds] = useState([
|
|
376
|
+
[-180, -85],
|
|
377
|
+
[180, 85]
|
|
378
|
+
]);
|
|
379
|
+
return { bounds, setBounds };
|
|
380
|
+
}
|
|
381
|
+
function useZoomLevel(initialZoom) {
|
|
382
|
+
const [zoomLevel, setZoomLevel] = useState(initialZoom);
|
|
383
|
+
return { zoomLevel, setZoomLevel };
|
|
384
|
+
}
|
|
385
|
+
function useClusters(coordinates, bounds, zoomLevel) {
|
|
386
|
+
const points = useMemo(() => {
|
|
387
|
+
if (!coordinates) return [];
|
|
388
|
+
return convertCoordinatesToGeoJSON(coordinates);
|
|
389
|
+
}, [coordinates]);
|
|
390
|
+
const { clusters, supercluster } = useSupercluster({
|
|
391
|
+
points,
|
|
392
|
+
bounds: [-180, -85, 180, 85],
|
|
393
|
+
// Use global bounds for consistency
|
|
394
|
+
zoom: zoomLevel || 10,
|
|
395
|
+
options: CLUSTERING_CONFIG
|
|
396
|
+
});
|
|
397
|
+
return { clusters, supercluster };
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// src/components/ui/Map/MapContent.tsx
|
|
401
|
+
import { AdvancedMarker as AdvancedMarker3, Map, Pin as Pin2, useMap, useMapsLibrary } from "@vis.gl/react-google-maps";
|
|
402
|
+
import { useCallback } from "react";
|
|
403
|
+
|
|
404
|
+
// src/components/ui/Map/ClusterMarker.tsx
|
|
405
|
+
import { AdvancedMarker } from "@vis.gl/react-google-maps";
|
|
406
|
+
function ClusterMarker({
|
|
407
|
+
cluster,
|
|
408
|
+
coordinates,
|
|
409
|
+
onPinClick,
|
|
410
|
+
onPinHover,
|
|
411
|
+
zoomToLevel,
|
|
412
|
+
supercluster
|
|
413
|
+
}) {
|
|
414
|
+
const [lng, lat] = cluster.geometry.coordinates;
|
|
415
|
+
const { point_count: pointCount } = cluster.properties;
|
|
416
|
+
const handleClick = () => {
|
|
417
|
+
const clusterCoordinates = filterClusterCoordinates(coordinates, lat, lng);
|
|
418
|
+
onPinClick?.(clusterCoordinates);
|
|
419
|
+
const expansionZoom = supercluster.getClusterExpansionZoom(cluster.id);
|
|
420
|
+
zoomToLevel(expansionZoom);
|
|
421
|
+
};
|
|
422
|
+
const handleMouseEnter = () => {
|
|
423
|
+
const clusterCoordinates = filterClusterCoordinates(coordinates, lat, lng);
|
|
424
|
+
onPinHover?.(clusterCoordinates);
|
|
425
|
+
};
|
|
426
|
+
const handleMouseLeave = () => onPinHover?.(null);
|
|
427
|
+
return /* @__PURE__ */ React.createElement(
|
|
428
|
+
AdvancedMarker,
|
|
429
|
+
{
|
|
430
|
+
key: `cluster-${cluster.id}`,
|
|
431
|
+
position: { lat, lng },
|
|
432
|
+
onClick: handleClick,
|
|
433
|
+
onMouseEnter: handleMouseEnter,
|
|
434
|
+
onMouseLeave: handleMouseLeave
|
|
435
|
+
},
|
|
436
|
+
/* @__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 || "?"))
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// src/components/ui/Map/FocusCircle.tsx
|
|
441
|
+
import { useEffect, useMemo as useMemo2, useRef } from "react";
|
|
442
|
+
function FocusCircle({
|
|
443
|
+
focusPoint,
|
|
444
|
+
radiusMiles,
|
|
445
|
+
map,
|
|
446
|
+
mapsLibrary
|
|
447
|
+
}) {
|
|
448
|
+
const circleRef = useRef(null);
|
|
449
|
+
const circleProps = useMemo2(() => {
|
|
450
|
+
if (!focusPoint || !radiusMiles) return null;
|
|
451
|
+
return {
|
|
452
|
+
center: focusPoint,
|
|
453
|
+
radius: radiusMiles * 1609.34
|
|
454
|
+
};
|
|
455
|
+
}, [focusPoint, radiusMiles]);
|
|
456
|
+
useEffect(() => {
|
|
457
|
+
if (!map || !mapsLibrary || !circleProps) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (!circleRef.current) {
|
|
461
|
+
const circle = new google.maps.Circle({
|
|
462
|
+
center: circleProps.center,
|
|
463
|
+
radius: circleProps.radius,
|
|
464
|
+
...FOCUS_CIRCLE_STYLES,
|
|
465
|
+
map
|
|
466
|
+
});
|
|
467
|
+
circleRef.current = circle;
|
|
468
|
+
} else {
|
|
469
|
+
circleRef.current.setCenter(circleProps.center);
|
|
470
|
+
circleRef.current.setRadius(circleProps.radius);
|
|
471
|
+
}
|
|
472
|
+
}, [map, mapsLibrary, circleProps]);
|
|
473
|
+
useEffect(() => {
|
|
474
|
+
return () => {
|
|
475
|
+
if (circleRef.current) {
|
|
476
|
+
circleRef.current.setMap(null);
|
|
477
|
+
circleRef.current = null;
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
}, []);
|
|
481
|
+
return null;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// src/components/ui/Map/IndividualMarker.tsx
|
|
485
|
+
import { AdvancedMarker as AdvancedMarker2, Pin } from "@vis.gl/react-google-maps";
|
|
486
|
+
function IndividualMarker({
|
|
487
|
+
coordinate,
|
|
488
|
+
onPinClick,
|
|
489
|
+
onPinHover
|
|
490
|
+
}) {
|
|
491
|
+
const handleMouseEnter = () => onPinHover?.(coordinate);
|
|
492
|
+
const handleMouseLeave = () => onPinHover?.(null);
|
|
493
|
+
const handleClick = () => onPinClick?.(coordinate);
|
|
494
|
+
return /* @__PURE__ */ React.createElement(
|
|
495
|
+
AdvancedMarker2,
|
|
496
|
+
{
|
|
497
|
+
position: { lat: coordinate.lat, lng: coordinate.lng },
|
|
498
|
+
onMouseEnter: handleMouseEnter,
|
|
499
|
+
onMouseLeave: handleMouseLeave,
|
|
500
|
+
onClick: handleClick
|
|
501
|
+
},
|
|
502
|
+
/* @__PURE__ */ React.createElement(Pin, { ...PIN_COLORS })
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// src/components/ui/Map/MapContent.tsx
|
|
507
|
+
function MapContent({
|
|
338
508
|
mapId,
|
|
509
|
+
mapCenter,
|
|
510
|
+
mapZoom,
|
|
339
511
|
position,
|
|
512
|
+
coordinates,
|
|
513
|
+
clusters,
|
|
514
|
+
supercluster,
|
|
515
|
+
onPinHover,
|
|
516
|
+
onPinClick,
|
|
517
|
+
focusPoint,
|
|
518
|
+
radiusMiles,
|
|
340
519
|
className,
|
|
341
|
-
|
|
520
|
+
setBounds,
|
|
521
|
+
setZoomLevel
|
|
342
522
|
}) {
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
|
|
523
|
+
const map = useMap();
|
|
524
|
+
const mapsLibrary = useMapsLibrary("maps");
|
|
525
|
+
const zoomToLevel = useCallback(
|
|
526
|
+
(newZoom) => {
|
|
527
|
+
if (map) {
|
|
528
|
+
map.setZoom(newZoom);
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
[map]
|
|
532
|
+
);
|
|
533
|
+
const handleBoundsChanged = (e) => {
|
|
534
|
+
if (e.detail.bounds) {
|
|
535
|
+
const bounds = e.detail.bounds;
|
|
536
|
+
setBounds([
|
|
537
|
+
[bounds.south, bounds.west],
|
|
538
|
+
[bounds.north, bounds.east]
|
|
539
|
+
]);
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
const handleZoomChanged = (e) => {
|
|
543
|
+
if (e.detail.zoom) {
|
|
544
|
+
setZoomLevel(e.detail.zoom);
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
const handleCameraChanged = (e) => {
|
|
548
|
+
if (e.detail.zoom) {
|
|
549
|
+
setZoomLevel(e.detail.zoom);
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("relative h-screen max-w-full", className) }, /* @__PURE__ */ React.createElement(
|
|
346
553
|
Map,
|
|
347
554
|
{
|
|
348
|
-
defaultZoom:
|
|
349
|
-
|
|
555
|
+
defaultZoom: mapZoom,
|
|
556
|
+
defaultCenter: mapCenter,
|
|
350
557
|
mapId,
|
|
351
|
-
keyboardShortcuts:
|
|
558
|
+
keyboardShortcuts: true,
|
|
352
559
|
disableDefaultUI: true,
|
|
353
560
|
zoomControl: true,
|
|
354
|
-
|
|
561
|
+
onBoundsChanged: handleBoundsChanged,
|
|
562
|
+
onZoomChanged: handleZoomChanged,
|
|
563
|
+
onCameraChanged: handleCameraChanged
|
|
564
|
+
},
|
|
565
|
+
position && !coordinates && /* @__PURE__ */ React.createElement(AdvancedMarker3, { position }, /* @__PURE__ */ React.createElement(Pin2, { ...PIN_COLORS })),
|
|
566
|
+
coordinates && clusters.map((cluster) => {
|
|
567
|
+
const { cluster: isCluster } = cluster.properties;
|
|
568
|
+
if (isCluster) {
|
|
569
|
+
return /* @__PURE__ */ React.createElement(
|
|
570
|
+
ClusterMarker,
|
|
571
|
+
{
|
|
572
|
+
key: `cluster-${cluster.id}`,
|
|
573
|
+
cluster,
|
|
574
|
+
coordinates,
|
|
575
|
+
onPinClick,
|
|
576
|
+
onPinHover,
|
|
577
|
+
zoomToLevel,
|
|
578
|
+
supercluster
|
|
579
|
+
}
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
const originalPoint = coordinates[cluster.properties.pointId];
|
|
583
|
+
return /* @__PURE__ */ React.createElement(
|
|
584
|
+
IndividualMarker,
|
|
585
|
+
{
|
|
586
|
+
key: `marker-${cluster.properties.pointId}`,
|
|
587
|
+
coordinate: originalPoint,
|
|
588
|
+
onPinClick,
|
|
589
|
+
onPinHover
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
}),
|
|
593
|
+
coordinates && clusters.length === 0 && coordinates.map((coord, index) => /* @__PURE__ */ React.createElement(
|
|
594
|
+
IndividualMarker,
|
|
595
|
+
{
|
|
596
|
+
key: `fallback-${index}`,
|
|
597
|
+
coordinate: coord,
|
|
598
|
+
onPinClick,
|
|
599
|
+
onPinHover
|
|
600
|
+
}
|
|
601
|
+
)),
|
|
602
|
+
focusPoint && radiusMiles && /* @__PURE__ */ React.createElement(
|
|
603
|
+
FocusCircle,
|
|
604
|
+
{
|
|
605
|
+
focusPoint,
|
|
606
|
+
radiusMiles,
|
|
607
|
+
map,
|
|
608
|
+
mapsLibrary
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
));
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// src/components/ui/Map/MapComponent.tsx
|
|
615
|
+
function MapComponent({
|
|
616
|
+
apiKey,
|
|
617
|
+
mapId,
|
|
618
|
+
position,
|
|
619
|
+
coordinates,
|
|
620
|
+
onPinHover,
|
|
621
|
+
onPinClick,
|
|
622
|
+
focusPoint,
|
|
623
|
+
radiusMiles,
|
|
624
|
+
className,
|
|
625
|
+
zoom = 10
|
|
626
|
+
}) {
|
|
627
|
+
const { bounds, setBounds } = useMapBounds(coordinates);
|
|
628
|
+
const { zoomLevel, setZoomLevel } = useZoomLevel(zoom || DEFAULT_ZOOM);
|
|
629
|
+
const { clusters, supercluster } = useClusters(coordinates, bounds, zoomLevel);
|
|
630
|
+
const mapCenter = coordinates && coordinates.length > 0 ? getCenterForCoordinates(coordinates) : position || DEFAULT_POSITION;
|
|
631
|
+
const mapZoom = coordinates && coordinates.length > 1 ? getZoomForCoordinates(coordinates, zoom) : position ? zoom : DEFAULT_ZOOM;
|
|
632
|
+
return /* @__PURE__ */ React.createElement(APIProvider, { apiKey }, /* @__PURE__ */ React.createElement(
|
|
633
|
+
MapContent,
|
|
634
|
+
{
|
|
635
|
+
mapId,
|
|
636
|
+
mapCenter,
|
|
637
|
+
mapZoom,
|
|
638
|
+
position,
|
|
639
|
+
coordinates,
|
|
640
|
+
clusters,
|
|
641
|
+
supercluster,
|
|
642
|
+
onPinHover,
|
|
643
|
+
onPinClick,
|
|
644
|
+
focusPoint,
|
|
645
|
+
radiusMiles,
|
|
646
|
+
className,
|
|
647
|
+
setBounds,
|
|
648
|
+
setZoomLevel
|
|
355
649
|
}
|
|
356
|
-
)
|
|
650
|
+
));
|
|
357
651
|
}
|
|
358
|
-
var MapComponent_default = MapComponent;
|
|
359
652
|
|
|
360
653
|
// src/components/ui/PlacesQueryInput.tsx
|
|
361
654
|
import { CircleX, LoaderCircle } from "lucide-react";
|
|
362
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
655
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
363
656
|
|
|
364
657
|
// src/components/primitives/command.tsx
|
|
365
658
|
import { Command as CommandPrimitive } from "cmdk";
|
|
366
659
|
import { Search } from "lucide-react";
|
|
367
|
-
import * as
|
|
660
|
+
import * as React5 from "react";
|
|
368
661
|
|
|
369
662
|
// src/components/primitives/dialog.tsx
|
|
370
663
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
371
664
|
import { X as X2 } from "lucide-react";
|
|
372
|
-
import * as
|
|
373
|
-
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
665
|
+
import * as React4 from "react";
|
|
374
666
|
var DialogPortal = DialogPrimitive.Portal;
|
|
375
|
-
var DialogOverlay =
|
|
667
|
+
var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
376
668
|
DialogPrimitive.Overlay,
|
|
377
669
|
{
|
|
378
670
|
ref,
|
|
@@ -384,31 +676,23 @@ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
384
676
|
}
|
|
385
677
|
));
|
|
386
678
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
387
|
-
var DialogContent =
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
className
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
/* @__PURE__ */ jsxs5(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: [
|
|
401
|
-
/* @__PURE__ */ jsx9(X2, { className: "h-4 w-4" }),
|
|
402
|
-
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: "Close" })
|
|
403
|
-
] })
|
|
404
|
-
]
|
|
405
|
-
}
|
|
406
|
-
)
|
|
407
|
-
] }));
|
|
679
|
+
var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React4.createElement(DialogPortal, null, /* @__PURE__ */ React4.createElement(DialogOverlay, null), /* @__PURE__ */ React4.createElement(
|
|
680
|
+
DialogPrimitive.Content,
|
|
681
|
+
{
|
|
682
|
+
ref,
|
|
683
|
+
className: cn(
|
|
684
|
+
"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",
|
|
685
|
+
className
|
|
686
|
+
),
|
|
687
|
+
...props
|
|
688
|
+
},
|
|
689
|
+
children,
|
|
690
|
+
/* @__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(X2, { className: "h-4 w-4" }), /* @__PURE__ */ React4.createElement("span", { className: "sr-only" }, "Close"))
|
|
691
|
+
)));
|
|
408
692
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
409
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
693
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ React4.createElement("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
410
694
|
DialogHeader.displayName = "DialogHeader";
|
|
411
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
695
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ React4.createElement(
|
|
412
696
|
"div",
|
|
413
697
|
{
|
|
414
698
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -416,7 +700,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx9(
|
|
|
416
700
|
}
|
|
417
701
|
);
|
|
418
702
|
DialogFooter.displayName = "DialogFooter";
|
|
419
|
-
var DialogTitle =
|
|
703
|
+
var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
420
704
|
DialogPrimitive.Title,
|
|
421
705
|
{
|
|
422
706
|
ref,
|
|
@@ -425,7 +709,7 @@ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
425
709
|
}
|
|
426
710
|
));
|
|
427
711
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
428
|
-
var DialogDescription =
|
|
712
|
+
var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
429
713
|
DialogPrimitive.Description,
|
|
430
714
|
{
|
|
431
715
|
ref,
|
|
@@ -436,8 +720,7 @@ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
436
720
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
437
721
|
|
|
438
722
|
// src/components/primitives/command.tsx
|
|
439
|
-
|
|
440
|
-
var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
723
|
+
var Command = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
441
724
|
CommandPrimitive,
|
|
442
725
|
{
|
|
443
726
|
ref,
|
|
@@ -449,22 +732,19 @@ var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
449
732
|
}
|
|
450
733
|
));
|
|
451
734
|
Command.displayName = CommandPrimitive.displayName;
|
|
452
|
-
var CommandInput =
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
className
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
)
|
|
465
|
-
] }));
|
|
735
|
+
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(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React5.createElement(
|
|
736
|
+
CommandPrimitive.Input,
|
|
737
|
+
{
|
|
738
|
+
ref,
|
|
739
|
+
className: cn(
|
|
740
|
+
"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",
|
|
741
|
+
className
|
|
742
|
+
),
|
|
743
|
+
...props
|
|
744
|
+
}
|
|
745
|
+
)));
|
|
466
746
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
467
|
-
var CommandList =
|
|
747
|
+
var CommandList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
468
748
|
CommandPrimitive.List,
|
|
469
749
|
{
|
|
470
750
|
ref,
|
|
@@ -473,9 +753,9 @@ var CommandList = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
473
753
|
}
|
|
474
754
|
));
|
|
475
755
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
476
|
-
var CommandEmpty =
|
|
756
|
+
var CommandEmpty = React5.forwardRef((props, ref) => /* @__PURE__ */ React5.createElement(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
477
757
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
478
|
-
var CommandGroup =
|
|
758
|
+
var CommandGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
479
759
|
CommandPrimitive.Group,
|
|
480
760
|
{
|
|
481
761
|
ref,
|
|
@@ -487,7 +767,7 @@ var CommandGroup = React3.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
487
767
|
}
|
|
488
768
|
));
|
|
489
769
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
490
|
-
var CommandSeparator =
|
|
770
|
+
var CommandSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
491
771
|
CommandPrimitive.Separator,
|
|
492
772
|
{
|
|
493
773
|
ref,
|
|
@@ -496,7 +776,7 @@ var CommandSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
496
776
|
}
|
|
497
777
|
));
|
|
498
778
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
499
|
-
var CommandItem =
|
|
779
|
+
var CommandItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
500
780
|
CommandPrimitive.Item,
|
|
501
781
|
{
|
|
502
782
|
ref,
|
|
@@ -509,7 +789,7 @@ var CommandItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
509
789
|
));
|
|
510
790
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
511
791
|
var CommandShortcut = ({ className, ...props }) => {
|
|
512
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ React5.createElement(
|
|
513
793
|
"span",
|
|
514
794
|
{
|
|
515
795
|
className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
|
|
@@ -570,20 +850,19 @@ var geocode = async (address, key) => {
|
|
|
570
850
|
};
|
|
571
851
|
|
|
572
852
|
// src/components/ui/PlacesQueryInput.tsx
|
|
573
|
-
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
574
853
|
function PlacesQueryInput({
|
|
575
854
|
apiKey,
|
|
576
855
|
selected,
|
|
577
856
|
onSelect,
|
|
578
857
|
className
|
|
579
858
|
}) {
|
|
580
|
-
const [predictions, setPredictions] =
|
|
581
|
-
const [input, setInput] =
|
|
582
|
-
const [isLoadingPredictions, setIsLoadingPredictions] =
|
|
583
|
-
const [shouldOpenUpward, setShouldOpenUpward] =
|
|
584
|
-
const timeoutRef =
|
|
585
|
-
const inputRef =
|
|
586
|
-
const debouncedAutocomplete =
|
|
859
|
+
const [predictions, setPredictions] = useState2(null);
|
|
860
|
+
const [input, setInput] = useState2(selected?.description ?? "");
|
|
861
|
+
const [isLoadingPredictions, setIsLoadingPredictions] = useState2(false);
|
|
862
|
+
const [shouldOpenUpward, setShouldOpenUpward] = useState2(false);
|
|
863
|
+
const timeoutRef = useRef2(null);
|
|
864
|
+
const inputRef = useRef2(null);
|
|
865
|
+
const debouncedAutocomplete = useCallback2((value) => {
|
|
587
866
|
if (timeoutRef.current) {
|
|
588
867
|
clearTimeout(timeoutRef.current);
|
|
589
868
|
}
|
|
@@ -619,7 +898,7 @@ function PlacesQueryInput({
|
|
|
619
898
|
setInput("");
|
|
620
899
|
};
|
|
621
900
|
const handleBlur = () => setTimeout(() => setPredictions(null), 200);
|
|
622
|
-
|
|
901
|
+
useEffect2(() => {
|
|
623
902
|
const checkDropdownPosition = () => {
|
|
624
903
|
if (inputRef.current) {
|
|
625
904
|
const rect = inputRef.current.getBoundingClientRect();
|
|
@@ -631,50 +910,41 @@ function PlacesQueryInput({
|
|
|
631
910
|
window.addEventListener("resize", checkDropdownPosition);
|
|
632
911
|
return () => window.removeEventListener("resize", checkDropdownPosition);
|
|
633
912
|
}, []);
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
913
|
+
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(
|
|
914
|
+
CommandInput,
|
|
915
|
+
{
|
|
916
|
+
placeholder: "Type an address to search...",
|
|
917
|
+
value: input,
|
|
918
|
+
onValueChange: handleInputChange,
|
|
919
|
+
className: "truncate pr-8"
|
|
920
|
+
}
|
|
921
|
+
), isLoadingPredictions && /* @__PURE__ */ React.createElement(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(
|
|
922
|
+
"button",
|
|
923
|
+
{
|
|
924
|
+
type: "button",
|
|
925
|
+
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",
|
|
926
|
+
onClick: handleClear
|
|
927
|
+
},
|
|
928
|
+
/* @__PURE__ */ React.createElement(CircleX, { className: "h-4 w-4 text-green-100" })
|
|
929
|
+
)), predictions && /* @__PURE__ */ React.createElement(
|
|
930
|
+
CommandList,
|
|
931
|
+
{
|
|
932
|
+
className: cn(
|
|
933
|
+
"absolute z-50 w-full rounded-md border bg-white shadow-lg",
|
|
934
|
+
shouldOpenUpward ? "bottom-full" : "top-full"
|
|
654
935
|
)
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
936
|
+
},
|
|
937
|
+
/* @__PURE__ */ React.createElement(CommandEmpty, null, "No results"),
|
|
938
|
+
/* @__PURE__ */ React.createElement(CommandGroup, null, predictions.map((prediction) => /* @__PURE__ */ React.createElement(
|
|
939
|
+
CommandItem,
|
|
658
940
|
{
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
CommandItem,
|
|
667
|
-
{
|
|
668
|
-
onSelect: () => handleSelect(prediction),
|
|
669
|
-
className: "truncate",
|
|
670
|
-
children: prediction.description
|
|
671
|
-
},
|
|
672
|
-
prediction.place_id
|
|
673
|
-
)) })
|
|
674
|
-
]
|
|
675
|
-
}
|
|
676
|
-
)
|
|
677
|
-
] }) });
|
|
941
|
+
key: prediction.place_id,
|
|
942
|
+
onSelect: () => handleSelect(prediction),
|
|
943
|
+
className: "truncate"
|
|
944
|
+
},
|
|
945
|
+
prediction.description
|
|
946
|
+
)))
|
|
947
|
+
)));
|
|
678
948
|
}
|
|
679
949
|
var PlacesQueryInput_default = PlacesQueryInput;
|
|
680
950
|
|
|
@@ -683,16 +953,15 @@ import * as SelectPrimitive from "@radix-ui/react-select";
|
|
|
683
953
|
import { CheckIcon as CheckIcon2, ChevronDownIcon, X as X3 } from "lucide-react";
|
|
684
954
|
import {
|
|
685
955
|
forwardRef as forwardRef7,
|
|
686
|
-
useEffect as
|
|
687
|
-
useRef as
|
|
688
|
-
useState as
|
|
956
|
+
useEffect as useEffect3,
|
|
957
|
+
useRef as useRef3,
|
|
958
|
+
useState as useState3
|
|
689
959
|
} from "react";
|
|
690
960
|
|
|
691
961
|
// src/components/primitives/separator.tsx
|
|
692
962
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
693
|
-
import * as
|
|
694
|
-
|
|
695
|
-
var Separator = React4.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
963
|
+
import * as React6 from "react";
|
|
964
|
+
var Separator = React6.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
|
696
965
|
SeparatorPrimitive.Root,
|
|
697
966
|
{
|
|
698
967
|
ref,
|
|
@@ -709,7 +978,6 @@ var Separator = React4.forwardRef(({ className, orientation = "horizontal", deco
|
|
|
709
978
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
710
979
|
|
|
711
980
|
// src/components/ui/Select.tsx
|
|
712
|
-
import { Fragment, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
713
981
|
var Select = forwardRef7(
|
|
714
982
|
({
|
|
715
983
|
label,
|
|
@@ -718,16 +986,17 @@ var Select = forwardRef7(
|
|
|
718
986
|
multiselect,
|
|
719
987
|
description,
|
|
720
988
|
classNames,
|
|
989
|
+
dropdownAlign = "start",
|
|
721
990
|
error,
|
|
722
991
|
id,
|
|
723
992
|
children: footer,
|
|
724
993
|
...props
|
|
725
994
|
}, ref) => {
|
|
726
995
|
const { value, defaultValue, dir, className, onChange, ...rest } = props;
|
|
727
|
-
const [selected, setSelected] =
|
|
728
|
-
const [open, setOpen] =
|
|
729
|
-
const containerRef =
|
|
730
|
-
|
|
996
|
+
const [selected, setSelected] = useState3([]);
|
|
997
|
+
const [open, setOpen] = useState3(false);
|
|
998
|
+
const containerRef = useRef3(null);
|
|
999
|
+
useEffect3(() => {
|
|
731
1000
|
if (!value) return setSelected([]);
|
|
732
1001
|
setSelected(Array.isArray(value) ? value : [value]);
|
|
733
1002
|
}, [value]);
|
|
@@ -746,136 +1015,127 @@ var Select = forwardRef7(
|
|
|
746
1015
|
});
|
|
747
1016
|
onChange?.(multiselect ? newSelected : newValue);
|
|
748
1017
|
}
|
|
749
|
-
return /* @__PURE__ */
|
|
1018
|
+
return /* @__PURE__ */ React.createElement(
|
|
750
1019
|
"div",
|
|
751
1020
|
{
|
|
752
1021
|
className: cn("flex w-full flex-col gap-1", className),
|
|
753
1022
|
ref: containerRef,
|
|
754
|
-
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1023
|
+
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element`
|
|
1024
|
+
},
|
|
1025
|
+
/* @__PURE__ */ React.createElement(
|
|
1026
|
+
Label_default,
|
|
1027
|
+
{
|
|
1028
|
+
text: label,
|
|
1029
|
+
htmlFor: props.name,
|
|
1030
|
+
required: props.required,
|
|
1031
|
+
description,
|
|
1032
|
+
className: classNames?.label
|
|
1033
|
+
}
|
|
1034
|
+
),
|
|
1035
|
+
/* @__PURE__ */ React.createElement(
|
|
1036
|
+
SelectPrimitive.Root,
|
|
1037
|
+
{
|
|
1038
|
+
open,
|
|
1039
|
+
value: selected.join(","),
|
|
1040
|
+
onOpenChange: handleOnOpenChange,
|
|
1041
|
+
onValueChange: multiselect ? void 0 : handleChange,
|
|
1042
|
+
defaultValue: typeof defaultValue === "string" ? defaultValue : void 0,
|
|
1043
|
+
dir: dir === "rtl" ? "rtl" : "ltr",
|
|
1044
|
+
...rest
|
|
1045
|
+
},
|
|
1046
|
+
/* @__PURE__ */ React.createElement(
|
|
1047
|
+
SelectPrimitive.Trigger,
|
|
1048
|
+
{
|
|
1049
|
+
ref,
|
|
1050
|
+
className: cn(
|
|
1051
|
+
"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",
|
|
1052
|
+
classNames?.trigger
|
|
1053
|
+
)
|
|
1054
|
+
},
|
|
1055
|
+
/* @__PURE__ */ React.createElement("span", { className: "truncate" }, /* @__PURE__ */ React.createElement(
|
|
1056
|
+
SelectPrimitive.Value,
|
|
1057
|
+
{
|
|
1058
|
+
placeholder: placeholder ?? "Select an option",
|
|
1059
|
+
"aria-label": getLabel()
|
|
1060
|
+
},
|
|
1061
|
+
getLabel()
|
|
1062
|
+
)),
|
|
1063
|
+
/* @__PURE__ */ React.createElement(
|
|
1064
|
+
ChevronDownIcon,
|
|
758
1065
|
{
|
|
759
|
-
text:
|
|
760
|
-
|
|
761
|
-
required: props.required,
|
|
762
|
-
description,
|
|
763
|
-
className: classNames?.label
|
|
1066
|
+
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
1067
|
+
size: "16"
|
|
764
1068
|
}
|
|
765
|
-
)
|
|
766
|
-
|
|
767
|
-
|
|
1069
|
+
)
|
|
1070
|
+
),
|
|
1071
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.Portal, { container: containerRef.current }, /* @__PURE__ */ React.createElement(
|
|
1072
|
+
SelectPrimitive.Content,
|
|
1073
|
+
{
|
|
1074
|
+
hideWhenDetached: true,
|
|
1075
|
+
className: cn(
|
|
1076
|
+
"z-10 max-h-[var(--radix-select-content-available-height)] overflow-hidden rounded-md bg-white py-2 shadow-lg",
|
|
1077
|
+
"w-[var(--radix-select-trigger-width)] min-w-[var(--radix-select-trigger-width)]",
|
|
1078
|
+
classNames?.content
|
|
1079
|
+
),
|
|
1080
|
+
position: "popper",
|
|
1081
|
+
align: dropdownAlign,
|
|
1082
|
+
sideOffset: 4,
|
|
1083
|
+
onPointerDownOutside: toggleOpen,
|
|
1084
|
+
onKeyDown: closeOnEscape
|
|
1085
|
+
},
|
|
1086
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.Viewport, null, multiselect && !!chipLabels?.length && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
1087
|
+
SelectPrimitive.Group,
|
|
1088
|
+
{
|
|
1089
|
+
className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
|
|
1090
|
+
"data-testid": "selected-labels"
|
|
1091
|
+
},
|
|
1092
|
+
chipLabels?.map(
|
|
1093
|
+
(chip) => chip && /* @__PURE__ */ React.createElement(Chip_default, { key: chip.title, size: "small", variant: "primary" }, /* @__PURE__ */ React.createElement("span", null, chip.title), /* @__PURE__ */ React.createElement(
|
|
1094
|
+
X3,
|
|
1095
|
+
{
|
|
1096
|
+
size: 18,
|
|
1097
|
+
"data-testid": `chip-remove-${chip.value}`,
|
|
1098
|
+
className: "cursor-pointer",
|
|
1099
|
+
onClick: () => handleChange(chip.value)
|
|
1100
|
+
}
|
|
1101
|
+
))
|
|
1102
|
+
)
|
|
1103
|
+
), /* @__PURE__ */ React.createElement(Separator, null)), options?.map(({ id: id2, title, value: value2, description: description2 }) => /* @__PURE__ */ React.createElement(
|
|
1104
|
+
SelectPrimitive.Item,
|
|
768
1105
|
{
|
|
769
|
-
|
|
770
|
-
value:
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
children: [
|
|
786
|
-
/* @__PURE__ */ jsx13("span", { className: "truncate", children: /* @__PURE__ */ jsx13(
|
|
787
|
-
SelectPrimitive.Value,
|
|
788
|
-
{
|
|
789
|
-
placeholder: placeholder ?? "Select an option",
|
|
790
|
-
"aria-label": getLabel(),
|
|
791
|
-
children: getLabel()
|
|
792
|
-
}
|
|
793
|
-
) }),
|
|
794
|
-
/* @__PURE__ */ jsx13(
|
|
795
|
-
ChevronDownIcon,
|
|
796
|
-
{
|
|
797
|
-
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
798
|
-
size: "16"
|
|
799
|
-
}
|
|
800
|
-
)
|
|
801
|
-
]
|
|
802
|
-
}
|
|
1106
|
+
key: id2,
|
|
1107
|
+
value: value2,
|
|
1108
|
+
className: cn(
|
|
1109
|
+
"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",
|
|
1110
|
+
classNames?.item
|
|
1111
|
+
),
|
|
1112
|
+
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
1113
|
+
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
1114
|
+
onClick: () => handleChange(value2)
|
|
1115
|
+
},
|
|
1116
|
+
/* @__PURE__ */ React.createElement(
|
|
1117
|
+
CheckIcon2,
|
|
1118
|
+
{
|
|
1119
|
+
className: cn(
|
|
1120
|
+
"absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
1121
|
+
classNames?.checkmark
|
|
803
1122
|
),
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
children: chipLabels?.map(
|
|
821
|
-
(chip) => chip && /* @__PURE__ */ jsxs8(Chip_default, { size: "small", variant: "primary", children: [
|
|
822
|
-
/* @__PURE__ */ jsx13("span", { children: chip.title }),
|
|
823
|
-
/* @__PURE__ */ jsx13(
|
|
824
|
-
X3,
|
|
825
|
-
{
|
|
826
|
-
size: 18,
|
|
827
|
-
"data-testid": `chip-remove-${chip.value}`,
|
|
828
|
-
className: "cursor-pointer",
|
|
829
|
-
onClick: () => handleChange(chip.value)
|
|
830
|
-
}
|
|
831
|
-
)
|
|
832
|
-
] }, chip.title)
|
|
833
|
-
)
|
|
834
|
-
}
|
|
835
|
-
),
|
|
836
|
-
/* @__PURE__ */ jsx13(Separator, {})
|
|
837
|
-
] }),
|
|
838
|
-
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ jsxs8(
|
|
839
|
-
SelectPrimitive.Item,
|
|
840
|
-
{
|
|
841
|
-
value: value2,
|
|
842
|
-
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",
|
|
843
|
-
"data-state": selected.includes(value2) ? "checked" : "unchecked",
|
|
844
|
-
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
845
|
-
onClick: () => handleChange(value2),
|
|
846
|
-
children: [
|
|
847
|
-
/* @__PURE__ */ jsx13(SelectPrimitive.ItemText, { children: title }),
|
|
848
|
-
/* @__PURE__ */ jsx13(
|
|
849
|
-
CheckIcon2,
|
|
850
|
-
{
|
|
851
|
-
className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
852
|
-
size: 16
|
|
853
|
-
}
|
|
854
|
-
)
|
|
855
|
-
]
|
|
856
|
-
},
|
|
857
|
-
id2
|
|
858
|
-
)),
|
|
859
|
-
!!footer && /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
860
|
-
/* @__PURE__ */ jsx13(Separator, {}),
|
|
861
|
-
/* @__PURE__ */ jsx13(
|
|
862
|
-
SelectPrimitive.Group,
|
|
863
|
-
{
|
|
864
|
-
className: "mt-2 flex flex-row flex-wrap gap-1 px-2",
|
|
865
|
-
"data-testid": "selected-labels",
|
|
866
|
-
children: footer
|
|
867
|
-
}
|
|
868
|
-
)
|
|
869
|
-
] })
|
|
870
|
-
] })
|
|
871
|
-
}
|
|
872
|
-
) })
|
|
873
|
-
]
|
|
874
|
-
}
|
|
875
|
-
),
|
|
876
|
-
/* @__PURE__ */ jsx13(ErrorMessage_default, { message: error })
|
|
877
|
-
]
|
|
878
|
-
}
|
|
1123
|
+
size: 16
|
|
1124
|
+
}
|
|
1125
|
+
),
|
|
1126
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.ItemText, null, title),
|
|
1127
|
+
description2 && /* @__PURE__ */ React.createElement("span", { className: "block text-sm text-grey-70" }, description2)
|
|
1128
|
+
)), !!footer && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Separator, null), /* @__PURE__ */ React.createElement(
|
|
1129
|
+
SelectPrimitive.Group,
|
|
1130
|
+
{
|
|
1131
|
+
className: "mt-2 flex flex-row flex-wrap gap-1 px-2",
|
|
1132
|
+
"data-testid": "selected-labels"
|
|
1133
|
+
},
|
|
1134
|
+
footer
|
|
1135
|
+
)))
|
|
1136
|
+
))
|
|
1137
|
+
),
|
|
1138
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
879
1139
|
);
|
|
880
1140
|
}
|
|
881
1141
|
);
|
|
@@ -888,9 +1148,8 @@ import Link from "next/link";
|
|
|
888
1148
|
|
|
889
1149
|
// src/components/primitives/avatar.tsx
|
|
890
1150
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
891
|
-
import * as
|
|
892
|
-
|
|
893
|
-
var AvatarBase = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1151
|
+
import * as React7 from "react";
|
|
1152
|
+
var AvatarBase = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
894
1153
|
AvatarPrimitive.Root,
|
|
895
1154
|
{
|
|
896
1155
|
ref,
|
|
@@ -899,7 +1158,7 @@ var AvatarBase = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
899
1158
|
}
|
|
900
1159
|
));
|
|
901
1160
|
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
902
|
-
var AvatarImage =
|
|
1161
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
903
1162
|
AvatarPrimitive.Image,
|
|
904
1163
|
{
|
|
905
1164
|
ref,
|
|
@@ -909,7 +1168,7 @@ var AvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
909
1168
|
}
|
|
910
1169
|
));
|
|
911
1170
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
912
|
-
var AvatarFallback =
|
|
1171
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
|
913
1172
|
AvatarPrimitive.Fallback,
|
|
914
1173
|
{
|
|
915
1174
|
ref,
|
|
@@ -923,17 +1182,13 @@ var AvatarFallback = React5.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
923
1182
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
924
1183
|
|
|
925
1184
|
// src/components/ui/Avatar.tsx
|
|
926
|
-
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
927
1185
|
function Avatar({ size, src, href, name, ...linkProps }) {
|
|
928
1186
|
const fallbackShort = name?.slice(0, 2);
|
|
929
1187
|
const fallbackWords = name?.split(" ").map((n) => n[0]).join("").slice(0, 2);
|
|
930
1188
|
const fallback = fallbackWords && fallbackWords.length > 1 ? fallbackWords : fallbackShort;
|
|
931
|
-
const renderAvatar = () => /* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */ jsx15(AvatarImage, { src, alt: name }),
|
|
933
|
-
/* @__PURE__ */ jsx15(AvatarFallback, { children: fallback?.toUpperCase() })
|
|
934
|
-
] });
|
|
1189
|
+
const renderAvatar = () => /* @__PURE__ */ React.createElement(AvatarBase, { className: avatarVariants({ size }) }, /* @__PURE__ */ React.createElement(AvatarImage, { src, alt: name }), /* @__PURE__ */ React.createElement(AvatarFallback, null, fallback?.toUpperCase()));
|
|
935
1190
|
if (href) {
|
|
936
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ React.createElement(Link, { href, ...linkProps }, renderAvatar());
|
|
937
1192
|
}
|
|
938
1193
|
return renderAvatar();
|
|
939
1194
|
}
|
|
@@ -952,7 +1207,7 @@ var avatarVariants = cva3("ring ring-white ring-2", {
|
|
|
952
1207
|
|
|
953
1208
|
// src/components/ui/Badge.tsx
|
|
954
1209
|
import { cva as cva4 } from "cva";
|
|
955
|
-
import
|
|
1210
|
+
import * as React8 from "react";
|
|
956
1211
|
var badgeVariants = cva4("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
957
1212
|
variants: {
|
|
958
1213
|
variant: {
|
|
@@ -966,31 +1221,42 @@ var badgeVariants = cva4("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
|
966
1221
|
}
|
|
967
1222
|
});
|
|
968
1223
|
function Badge({ className, variant, ...props }) {
|
|
969
|
-
return /* @__PURE__ */
|
|
1224
|
+
return /* @__PURE__ */ React8.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
970
1225
|
}
|
|
971
1226
|
|
|
972
1227
|
// src/components/ui/Button.tsx
|
|
973
1228
|
import { Slot } from "@radix-ui/react-slot";
|
|
974
1229
|
import { cva as cva5 } from "cva";
|
|
975
|
-
import {
|
|
976
|
-
import {
|
|
1230
|
+
import { Loader2 } from "lucide-react";
|
|
1231
|
+
import React9, { forwardRef as forwardRef9 } from "react";
|
|
977
1232
|
var Button = forwardRef9(
|
|
978
|
-
({
|
|
1233
|
+
({
|
|
1234
|
+
className,
|
|
1235
|
+
variant,
|
|
1236
|
+
size,
|
|
1237
|
+
asChild = false,
|
|
1238
|
+
type = "button",
|
|
1239
|
+
children,
|
|
1240
|
+
isLoading = false,
|
|
1241
|
+
...props
|
|
1242
|
+
}, ref) => {
|
|
979
1243
|
const Component = asChild ? Slot : "button";
|
|
980
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ React9.createElement(
|
|
981
1245
|
Component,
|
|
982
1246
|
{
|
|
983
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
1247
|
+
className: cn(buttonVariants({ variant, size, className, isLoading, asChild })),
|
|
984
1248
|
type,
|
|
985
1249
|
ref,
|
|
986
1250
|
...props
|
|
987
|
-
}
|
|
1251
|
+
},
|
|
1252
|
+
asChild ? children : /* @__PURE__ */ React9.createElement(React9.Fragment, null, children, isLoading && /* @__PURE__ */ React9.createElement("div", { className: "absolute inset-0 flex items-center justify-center bg-white/30 backdrop-blur-[0.5px]" }, /* @__PURE__ */ React9.createElement(Loader2, { className: "h-5 w-5 animate-spin text-gray-800" })))
|
|
988
1253
|
);
|
|
989
1254
|
}
|
|
990
1255
|
);
|
|
991
1256
|
Button.displayName = "Button";
|
|
992
1257
|
var buttonVariants = cva5(
|
|
993
1258
|
[
|
|
1259
|
+
"relative",
|
|
994
1260
|
"flex",
|
|
995
1261
|
"items-center",
|
|
996
1262
|
"justify-center",
|
|
@@ -1000,7 +1266,8 @@ var buttonVariants = cva5(
|
|
|
1000
1266
|
"outline-2",
|
|
1001
1267
|
"outline-offset-2",
|
|
1002
1268
|
"outline-dashed",
|
|
1003
|
-
"outline-transparent"
|
|
1269
|
+
"outline-transparent",
|
|
1270
|
+
"overflow-hidden"
|
|
1004
1271
|
],
|
|
1005
1272
|
{
|
|
1006
1273
|
variants: {
|
|
@@ -1047,19 +1314,92 @@ var buttonVariants = cva5(
|
|
|
1047
1314
|
"focus:text-black",
|
|
1048
1315
|
"focus:outline-purple-100",
|
|
1049
1316
|
"active:text-purple-80"
|
|
1317
|
+
],
|
|
1318
|
+
"outline-primary": [
|
|
1319
|
+
"bg-transparent",
|
|
1320
|
+
"border-2",
|
|
1321
|
+
"border-pickle-100",
|
|
1322
|
+
"text-pickle-100",
|
|
1323
|
+
"hover:bg-pickle-100",
|
|
1324
|
+
"hover:text-black",
|
|
1325
|
+
"active:bg-pickle-80",
|
|
1326
|
+
"active:text-black",
|
|
1327
|
+
"focus:outline-purple-100",
|
|
1328
|
+
"disabled:text-grey-40",
|
|
1329
|
+
"disabled:border-grey-40",
|
|
1330
|
+
"disabled:hover:bg-transparent",
|
|
1331
|
+
"disabled:hover:text-grey-40"
|
|
1332
|
+
],
|
|
1333
|
+
"outline-secondary": [
|
|
1334
|
+
"bg-transparent",
|
|
1335
|
+
"border-2",
|
|
1336
|
+
"border-green-80",
|
|
1337
|
+
"text-green-80",
|
|
1338
|
+
"hover:bg-green-80",
|
|
1339
|
+
"hover:text-white",
|
|
1340
|
+
"active:bg-green-90",
|
|
1341
|
+
"active:text-white",
|
|
1342
|
+
"focus:outline-pickle-100",
|
|
1343
|
+
"disabled:text-grey-40",
|
|
1344
|
+
"disabled:border-grey-40",
|
|
1345
|
+
"disabled:hover:bg-transparent",
|
|
1346
|
+
"disabled:hover:text-grey-40"
|
|
1347
|
+
],
|
|
1348
|
+
"icon-outline": [
|
|
1349
|
+
"bg-transparent",
|
|
1350
|
+
"text-black",
|
|
1351
|
+
"hover:bg-grey-5",
|
|
1352
|
+
"active:bg-grey-10",
|
|
1353
|
+
"focus:outline-purple-100",
|
|
1354
|
+
"disabled:text-grey-40",
|
|
1355
|
+
"disabled:hover:bg-transparent",
|
|
1356
|
+
"disabled:hover:text-grey-40"
|
|
1357
|
+
],
|
|
1358
|
+
"icon-primary": [
|
|
1359
|
+
"bg-pickle-100",
|
|
1360
|
+
"text-black",
|
|
1361
|
+
"hover:bg-pickle-80",
|
|
1362
|
+
"active:bg-pickle-60",
|
|
1363
|
+
"focus:outline-purple-100",
|
|
1364
|
+
"disabled:text-grey-40",
|
|
1365
|
+
"disabled:bg-grey-10"
|
|
1366
|
+
],
|
|
1367
|
+
"icon-secondary": [
|
|
1368
|
+
"bg-green-80",
|
|
1369
|
+
"text-white",
|
|
1370
|
+
"hover:bg-green-90",
|
|
1371
|
+
"active:bg-green-100",
|
|
1372
|
+
"focus:outline-pickle-100",
|
|
1373
|
+
"disabled:text-grey-40",
|
|
1374
|
+
"disabled:bg-grey-10"
|
|
1050
1375
|
]
|
|
1051
1376
|
},
|
|
1052
1377
|
size: {
|
|
1378
|
+
"extra-small": ["h-8", "text-xs", "px-3", "py-1"],
|
|
1053
1379
|
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
1054
1380
|
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
1055
1381
|
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
1382
|
+
},
|
|
1383
|
+
isLoading: {
|
|
1384
|
+
true: ["cursor-not-allowed", "pointer-events-none"]
|
|
1385
|
+
},
|
|
1386
|
+
asChild: {
|
|
1387
|
+
true: [],
|
|
1388
|
+
false: ["cursor-pointer", "pointer-events-auto"]
|
|
1056
1389
|
}
|
|
1057
1390
|
},
|
|
1058
1391
|
defaultVariants: {
|
|
1059
1392
|
variant: "neutral",
|
|
1060
|
-
size: "medium"
|
|
1393
|
+
size: "medium",
|
|
1394
|
+
isLoading: false,
|
|
1395
|
+
asChild: false
|
|
1061
1396
|
},
|
|
1062
1397
|
compoundVariants: [
|
|
1398
|
+
{
|
|
1399
|
+
variant: "link",
|
|
1400
|
+
size: "extra-small",
|
|
1401
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
1402
|
+
},
|
|
1063
1403
|
{
|
|
1064
1404
|
variant: "link",
|
|
1065
1405
|
size: "small",
|
|
@@ -1074,6 +1414,66 @@ var buttonVariants = cva5(
|
|
|
1074
1414
|
variant: "link",
|
|
1075
1415
|
size: "large",
|
|
1076
1416
|
class: ["h-6", "text-base", "p-0"]
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
variant: "icon-outline",
|
|
1420
|
+
size: "extra-small",
|
|
1421
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
variant: "icon-outline",
|
|
1425
|
+
size: "small",
|
|
1426
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
variant: "icon-outline",
|
|
1430
|
+
size: "medium",
|
|
1431
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
variant: "icon-outline",
|
|
1435
|
+
size: "large",
|
|
1436
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
variant: "icon-primary",
|
|
1440
|
+
size: "extra-small",
|
|
1441
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
variant: "icon-primary",
|
|
1445
|
+
size: "small",
|
|
1446
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
variant: "icon-primary",
|
|
1450
|
+
size: "medium",
|
|
1451
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
variant: "icon-primary",
|
|
1455
|
+
size: "large",
|
|
1456
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
variant: "icon-secondary",
|
|
1460
|
+
size: "extra-small",
|
|
1461
|
+
class: ["h-8", "w-8", "p-2"]
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
variant: "icon-secondary",
|
|
1465
|
+
size: "small",
|
|
1466
|
+
class: ["h-10", "w-10", "p-3"]
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
variant: "icon-secondary",
|
|
1470
|
+
size: "medium",
|
|
1471
|
+
class: ["h-12", "w-12", "p-4"]
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
variant: "icon-secondary",
|
|
1475
|
+
size: "large",
|
|
1476
|
+
class: ["h-14", "w-14", "p-4"]
|
|
1077
1477
|
}
|
|
1078
1478
|
]
|
|
1079
1479
|
}
|
|
@@ -1082,15 +1482,14 @@ var buttonVariants = cva5(
|
|
|
1082
1482
|
// src/components/ui/Combobox.tsx
|
|
1083
1483
|
import { cva as cva6 } from "cva";
|
|
1084
1484
|
import { ChevronDownIcon as ChevronDownIcon2, CircleX as CircleX2, icons as icons3 } from "lucide-react";
|
|
1085
|
-
import { forwardRef as forwardRef11, useEffect as
|
|
1485
|
+
import { forwardRef as forwardRef11, useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
|
|
1086
1486
|
|
|
1087
1487
|
// src/components/primitives/popover.tsx
|
|
1088
1488
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1089
|
-
import * as
|
|
1090
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1489
|
+
import * as React10 from "react";
|
|
1091
1490
|
var Popover = PopoverPrimitive.Root;
|
|
1092
1491
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1093
|
-
var PopoverContent =
|
|
1492
|
+
var PopoverContent = React10.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React10.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
1094
1493
|
PopoverPrimitive.Content,
|
|
1095
1494
|
{
|
|
1096
1495
|
ref,
|
|
@@ -1102,11 +1501,10 @@ var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffse
|
|
|
1102
1501
|
),
|
|
1103
1502
|
...props
|
|
1104
1503
|
}
|
|
1105
|
-
)
|
|
1504
|
+
)));
|
|
1106
1505
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1107
1506
|
|
|
1108
1507
|
// src/components/ui/Combobox.tsx
|
|
1109
|
-
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1110
1508
|
var Combobox = forwardRef11((props, ref) => {
|
|
1111
1509
|
const {
|
|
1112
1510
|
id,
|
|
@@ -1127,9 +1525,9 @@ var Combobox = forwardRef11((props, ref) => {
|
|
|
1127
1525
|
onChange: handleChange,
|
|
1128
1526
|
children: footer
|
|
1129
1527
|
} = props;
|
|
1130
|
-
const [selected, setSelected] =
|
|
1131
|
-
const [open, setOpen] =
|
|
1132
|
-
const isUserUpdate =
|
|
1528
|
+
const [selected, setSelected] = useState4([]);
|
|
1529
|
+
const [open, setOpen] = useState4(false);
|
|
1530
|
+
const isUserUpdate = useRef4(false);
|
|
1133
1531
|
const IconComponent = icon && icons3[icon];
|
|
1134
1532
|
const hideSearchBox = options?.length <= 5;
|
|
1135
1533
|
const isDefault = variant === "default";
|
|
@@ -1137,7 +1535,7 @@ var Combobox = forwardRef11((props, ref) => {
|
|
|
1137
1535
|
const isEmpty = selected.length === 0;
|
|
1138
1536
|
const showChevron = isDefault ? isEmpty : true;
|
|
1139
1537
|
const close = () => setOpen(false);
|
|
1140
|
-
|
|
1538
|
+
useEffect4(() => {
|
|
1141
1539
|
if (!isUserUpdate.current) {
|
|
1142
1540
|
const valueArray = multiselect ? value ?? [] : value ? [value] : [];
|
|
1143
1541
|
setSelected(
|
|
@@ -1145,7 +1543,7 @@ var Combobox = forwardRef11((props, ref) => {
|
|
|
1145
1543
|
);
|
|
1146
1544
|
}
|
|
1147
1545
|
}, [value, options, multiselect]);
|
|
1148
|
-
|
|
1546
|
+
useEffect4(() => {
|
|
1149
1547
|
if (isUserUpdate.current) {
|
|
1150
1548
|
if (multiselect) {
|
|
1151
1549
|
handleChange?.(selected.map((o) => o.value));
|
|
@@ -1177,111 +1575,91 @@ var Combobox = forwardRef11((props, ref) => {
|
|
|
1177
1575
|
const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
|
|
1178
1576
|
return isDefault ? defaultLabel : label;
|
|
1179
1577
|
};
|
|
1180
|
-
return /* @__PURE__ */
|
|
1181
|
-
|
|
1182
|
-
|
|
1578
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col gap-1", className) }, isDefault && /* @__PURE__ */ React.createElement(
|
|
1579
|
+
Label_default,
|
|
1580
|
+
{
|
|
1581
|
+
text: label,
|
|
1582
|
+
htmlFor: name,
|
|
1583
|
+
required,
|
|
1584
|
+
description,
|
|
1585
|
+
className: classNames?.label
|
|
1586
|
+
}
|
|
1587
|
+
), /* @__PURE__ */ React.createElement("div", { className: "relative flex" }, /* @__PURE__ */ React.createElement(Popover, { open, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(
|
|
1588
|
+
PopoverTrigger,
|
|
1589
|
+
{
|
|
1590
|
+
asChild: true,
|
|
1591
|
+
disabled: options.length === 0,
|
|
1592
|
+
"data-testid": `${id ?? name}-combobox-trigger`
|
|
1593
|
+
},
|
|
1594
|
+
/* @__PURE__ */ React.createElement(
|
|
1595
|
+
"div",
|
|
1183
1596
|
{
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
),
|
|
1191
|
-
/* @__PURE__ */ jsxs10("div", { className: "relative flex", children: [
|
|
1192
|
-
/* @__PURE__ */ jsxs10(Popover, { open, onOpenChange: setOpen, children: [
|
|
1193
|
-
/* @__PURE__ */ jsx19(
|
|
1194
|
-
PopoverTrigger,
|
|
1195
|
-
{
|
|
1196
|
-
asChild: true,
|
|
1197
|
-
disabled: options.length === 0,
|
|
1198
|
-
"data-testid": `${id ?? name}-combobox-trigger`,
|
|
1199
|
-
children: /* @__PURE__ */ jsxs10(
|
|
1200
|
-
"div",
|
|
1201
|
-
{
|
|
1202
|
-
ref,
|
|
1203
|
-
className: cn(
|
|
1204
|
-
triggerVariants({ variant, size }),
|
|
1205
|
-
isDefault && !isEmpty && "pr-10",
|
|
1206
|
-
classNames?.trigger
|
|
1207
|
-
),
|
|
1208
|
-
"aria-expanded": open,
|
|
1209
|
-
children: [
|
|
1210
|
-
isDefault && IconComponent && /* @__PURE__ */ jsx19(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1211
|
-
isChip && !isEmpty && /* @__PURE__ */ jsx19(Badge, { variant: "purple", children: selected.length }),
|
|
1212
|
-
/* @__PURE__ */ jsx19(
|
|
1213
|
-
"span",
|
|
1214
|
-
{
|
|
1215
|
-
className: cn(
|
|
1216
|
-
"w-full truncate leading-normal",
|
|
1217
|
-
isDefault && isEmpty && "text-grey-40"
|
|
1218
|
-
),
|
|
1219
|
-
children: handleDisplayValue()
|
|
1220
|
-
}
|
|
1221
|
-
),
|
|
1222
|
-
showChevron && /* @__PURE__ */ jsx19(
|
|
1223
|
-
ChevronDownIcon2,
|
|
1224
|
-
{
|
|
1225
|
-
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
1226
|
-
size: "16"
|
|
1227
|
-
}
|
|
1228
|
-
)
|
|
1229
|
-
]
|
|
1230
|
-
}
|
|
1231
|
-
)
|
|
1232
|
-
}
|
|
1597
|
+
ref,
|
|
1598
|
+
className: cn(
|
|
1599
|
+
triggerVariants({ variant, size }),
|
|
1600
|
+
isDefault && !isEmpty && "pr-10",
|
|
1601
|
+
classNames?.trigger
|
|
1233
1602
|
),
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
classNames?.content
|
|
1241
|
-
),
|
|
1242
|
-
collisionPadding: 8,
|
|
1243
|
-
sideOffset: 4,
|
|
1244
|
-
align: "start",
|
|
1245
|
-
children: /* @__PURE__ */ jsxs10(Command, { children: [
|
|
1246
|
-
!hideSearchBox && /* @__PURE__ */ jsx19(CommandInput, { placeholder: "Search..." }),
|
|
1247
|
-
/* @__PURE__ */ jsxs10(CommandList, { children: [
|
|
1248
|
-
/* @__PURE__ */ jsx19(CommandEmpty, { children: "No results" }),
|
|
1249
|
-
/* @__PURE__ */ jsx19(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ jsx19(
|
|
1250
|
-
CommandItem,
|
|
1251
|
-
{
|
|
1252
|
-
value: option.title,
|
|
1253
|
-
onSelect: () => handleSelect(option.value),
|
|
1254
|
-
children: /* @__PURE__ */ jsx19(
|
|
1255
|
-
ListItem_default,
|
|
1256
|
-
{
|
|
1257
|
-
className: cn(classNames?.items, "truncate py-1"),
|
|
1258
|
-
isSelected: selected.some((s) => s.value === option.value),
|
|
1259
|
-
hasCheckbox: multiselect,
|
|
1260
|
-
...option
|
|
1261
|
-
}
|
|
1262
|
-
)
|
|
1263
|
-
},
|
|
1264
|
-
id2
|
|
1265
|
-
)) })
|
|
1266
|
-
] }),
|
|
1267
|
-
!!footer && /* @__PURE__ */ jsx19(Separator, {}),
|
|
1268
|
-
footer && footer({ close })
|
|
1269
|
-
] })
|
|
1270
|
-
}
|
|
1271
|
-
)
|
|
1272
|
-
] }),
|
|
1273
|
-
isDefault && !isEmpty && /* @__PURE__ */ jsx19(
|
|
1274
|
-
"button",
|
|
1603
|
+
"aria-expanded": open
|
|
1604
|
+
},
|
|
1605
|
+
isDefault && IconComponent && /* @__PURE__ */ React.createElement(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1606
|
+
isChip && !isEmpty && /* @__PURE__ */ React.createElement(Badge, { variant: "purple" }, selected.length),
|
|
1607
|
+
/* @__PURE__ */ React.createElement(
|
|
1608
|
+
"span",
|
|
1275
1609
|
{
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1610
|
+
className: cn(
|
|
1611
|
+
"w-full truncate leading-normal",
|
|
1612
|
+
isDefault && isEmpty && "text-grey-40"
|
|
1613
|
+
)
|
|
1614
|
+
},
|
|
1615
|
+
handleDisplayValue()
|
|
1616
|
+
),
|
|
1617
|
+
showChevron && /* @__PURE__ */ React.createElement(
|
|
1618
|
+
ChevronDownIcon2,
|
|
1619
|
+
{
|
|
1620
|
+
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
1621
|
+
size: "16"
|
|
1622
|
+
}
|
|
1623
|
+
)
|
|
1624
|
+
)
|
|
1625
|
+
), /* @__PURE__ */ React.createElement(
|
|
1626
|
+
PopoverContent,
|
|
1627
|
+
{
|
|
1628
|
+
className: cn(
|
|
1629
|
+
"flex w-full max-w-xs flex-col overflow-hidden p-0",
|
|
1630
|
+
"max-h-[--radix-popover-content-available-height]",
|
|
1631
|
+
classNames?.content
|
|
1632
|
+
),
|
|
1633
|
+
collisionPadding: 8,
|
|
1634
|
+
sideOffset: 4,
|
|
1635
|
+
align: "start"
|
|
1636
|
+
},
|
|
1637
|
+
/* @__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(
|
|
1638
|
+
CommandItem,
|
|
1639
|
+
{
|
|
1640
|
+
key: id2,
|
|
1641
|
+
value: option.title,
|
|
1642
|
+
onSelect: () => handleSelect(option.value)
|
|
1643
|
+
},
|
|
1644
|
+
/* @__PURE__ */ React.createElement(
|
|
1645
|
+
ListItem_default,
|
|
1646
|
+
{
|
|
1647
|
+
className: cn(classNames?.items, "truncate py-1"),
|
|
1648
|
+
isSelected: selected.some((s) => s.value === option.value),
|
|
1649
|
+
hasCheckbox: multiselect,
|
|
1650
|
+
...option
|
|
1280
1651
|
}
|
|
1281
1652
|
)
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1653
|
+
)))), !!footer && /* @__PURE__ */ React.createElement(Separator, null), footer && footer({ close }))
|
|
1654
|
+
)), isDefault && !isEmpty && /* @__PURE__ */ React.createElement(
|
|
1655
|
+
"button",
|
|
1656
|
+
{
|
|
1657
|
+
type: "button",
|
|
1658
|
+
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",
|
|
1659
|
+
onClick: handleClear
|
|
1660
|
+
},
|
|
1661
|
+
/* @__PURE__ */ React.createElement(CircleX2, { className: "h-4 w-4 text-green-100" })
|
|
1662
|
+
)), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1285
1663
|
});
|
|
1286
1664
|
Combobox.displayName = "Combobox";
|
|
1287
1665
|
var triggerVariants = cva6(
|
|
@@ -1313,27 +1691,20 @@ var triggerVariants = cva6(
|
|
|
1313
1691
|
// src/components/ui/Switch.tsx
|
|
1314
1692
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
1315
1693
|
import { forwardRef as forwardRef12 } from "react";
|
|
1316
|
-
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1317
1694
|
var Switch = forwardRef12(
|
|
1318
|
-
({ label, error, className, ...props }, ref) => {
|
|
1319
|
-
return /* @__PURE__ */
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
),
|
|
1332
|
-
label && /* @__PURE__ */ jsxs11("label", { className: "pl-4 text-sm leading-none text-inherit", htmlFor: props.name, children: [
|
|
1333
|
-
label,
|
|
1334
|
-
/* @__PURE__ */ jsx20(ErrorMessage_default, { message: error, className: "mt-1" })
|
|
1335
|
-
] })
|
|
1336
|
-
] });
|
|
1695
|
+
({ label, error, className, ...props }, ref) => {
|
|
1696
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("flex items-center", props.disabled && "opacity-50") }, /* @__PURE__ */ React.createElement(
|
|
1697
|
+
SwitchPrimitive.Root,
|
|
1698
|
+
{
|
|
1699
|
+
className: cn(
|
|
1700
|
+
"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",
|
|
1701
|
+
className
|
|
1702
|
+
),
|
|
1703
|
+
ref,
|
|
1704
|
+
...props
|
|
1705
|
+
},
|
|
1706
|
+
/* @__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]" })
|
|
1707
|
+
), 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" })));
|
|
1337
1708
|
}
|
|
1338
1709
|
);
|
|
1339
1710
|
Switch.displayName = "Switch";
|
|
@@ -1346,29 +1717,24 @@ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
|
1346
1717
|
import {
|
|
1347
1718
|
forwardRef as forwardRef13
|
|
1348
1719
|
} from "react";
|
|
1349
|
-
|
|
1350
|
-
var RadioGroup = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(RadioGroupPrimitive.Root, { className, ...props, ref }));
|
|
1720
|
+
var RadioGroup = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(RadioGroupPrimitive.Root, { className, ...props, ref }));
|
|
1351
1721
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1352
1722
|
var RadioGroupItem = forwardRef13(({ className, children, ...props }, ref) => {
|
|
1353
|
-
return /* @__PURE__ */
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
),
|
|
1365
|
-
/* @__PURE__ */ jsx21("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40", children })
|
|
1366
|
-
] });
|
|
1723
|
+
return /* @__PURE__ */ React.createElement("div", { className: "group flex flex-row items-center gap-2" }, /* @__PURE__ */ React.createElement(
|
|
1724
|
+
RadioGroupPrimitive.Item,
|
|
1725
|
+
{
|
|
1726
|
+
ref,
|
|
1727
|
+
className: cn(
|
|
1728
|
+
"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",
|
|
1729
|
+
className
|
|
1730
|
+
),
|
|
1731
|
+
...props
|
|
1732
|
+
}
|
|
1733
|
+
), /* @__PURE__ */ React.createElement("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40" }, children));
|
|
1367
1734
|
});
|
|
1368
1735
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1369
1736
|
|
|
1370
1737
|
// src/components/ui/Radio.tsx
|
|
1371
|
-
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1372
1738
|
var Radio = forwardRef14(
|
|
1373
1739
|
({
|
|
1374
1740
|
label,
|
|
@@ -1380,33 +1746,29 @@ var Radio = forwardRef14(
|
|
|
1380
1746
|
orientation,
|
|
1381
1747
|
...props
|
|
1382
1748
|
}, ref) => {
|
|
1383
|
-
return /* @__PURE__ */
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1749
|
+
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(
|
|
1750
|
+
RadioGroup,
|
|
1751
|
+
{
|
|
1752
|
+
ref,
|
|
1753
|
+
className: cn(
|
|
1754
|
+
"flex text-sm",
|
|
1755
|
+
orientation === "vertical" ? "flex-col gap-2" : "flex-row gap-4",
|
|
1756
|
+
classNames?.group
|
|
1757
|
+
),
|
|
1758
|
+
onValueChange: handleValueChange,
|
|
1759
|
+
...props
|
|
1760
|
+
},
|
|
1761
|
+
options?.map(({ id, title, value }) => /* @__PURE__ */ React.createElement(
|
|
1762
|
+
RadioGroupItem,
|
|
1387
1763
|
{
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
children: options?.map(({ id, title, value }) => /* @__PURE__ */ jsx22(
|
|
1397
|
-
RadioGroupItem,
|
|
1398
|
-
{
|
|
1399
|
-
value,
|
|
1400
|
-
id: `radio-group-item-${title}`,
|
|
1401
|
-
className: classNames?.item,
|
|
1402
|
-
children: title
|
|
1403
|
-
},
|
|
1404
|
-
id
|
|
1405
|
-
))
|
|
1406
|
-
}
|
|
1407
|
-
),
|
|
1408
|
-
/* @__PURE__ */ jsx22(ErrorMessage_default, { message: error })
|
|
1409
|
-
] });
|
|
1764
|
+
key: id,
|
|
1765
|
+
value,
|
|
1766
|
+
id: `radio-group-item-${title}`,
|
|
1767
|
+
className: classNames?.item
|
|
1768
|
+
},
|
|
1769
|
+
title
|
|
1770
|
+
))
|
|
1771
|
+
), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1410
1772
|
}
|
|
1411
1773
|
);
|
|
1412
1774
|
Radio.displayName = "Radio";
|
|
@@ -1414,12 +1776,11 @@ Radio.displayName = "Radio";
|
|
|
1414
1776
|
// src/components/ui/Counter.tsx
|
|
1415
1777
|
import { cva as cva7 } from "cva";
|
|
1416
1778
|
import { Minus as Minus2, Plus } from "lucide-react";
|
|
1417
|
-
import { forwardRef as forwardRef15, useEffect as
|
|
1418
|
-
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1779
|
+
import { forwardRef as forwardRef15, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1419
1780
|
var Counter = forwardRef15(
|
|
1420
1781
|
({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
|
|
1421
|
-
const [count, setCount] =
|
|
1422
|
-
|
|
1782
|
+
const [count, setCount] = useState5(0);
|
|
1783
|
+
useEffect5(() => {
|
|
1423
1784
|
setCount(value ?? 0);
|
|
1424
1785
|
}, [value]);
|
|
1425
1786
|
const handleChange = (e) => {
|
|
@@ -1450,56 +1811,50 @@ var Counter = forwardRef15(
|
|
|
1450
1811
|
onChange?.(newValue);
|
|
1451
1812
|
setCount(newValue);
|
|
1452
1813
|
};
|
|
1453
|
-
return /* @__PURE__ */
|
|
1814
|
+
return /* @__PURE__ */ React.createElement(
|
|
1454
1815
|
"div",
|
|
1455
1816
|
{
|
|
1456
1817
|
className: cn("flex w-auto flex-col gap-1", classNames?.root),
|
|
1457
|
-
"data-testid": `counter-wrapper-${props.id}
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
}
|
|
1498
|
-
)
|
|
1499
|
-
] }),
|
|
1500
|
-
/* @__PURE__ */ jsx23(ErrorMessage_default, { message: error })
|
|
1501
|
-
]
|
|
1502
|
-
}
|
|
1818
|
+
"data-testid": `counter-wrapper-${props.id}`
|
|
1819
|
+
},
|
|
1820
|
+
label && /* @__PURE__ */ React.createElement(
|
|
1821
|
+
Label_default,
|
|
1822
|
+
{
|
|
1823
|
+
text: label,
|
|
1824
|
+
htmlFor: props.name,
|
|
1825
|
+
required: props.required,
|
|
1826
|
+
description,
|
|
1827
|
+
className: classNames?.label
|
|
1828
|
+
}
|
|
1829
|
+
),
|
|
1830
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex w-[122px] flex-row items-center" }, /* @__PURE__ */ React.createElement(
|
|
1831
|
+
"button",
|
|
1832
|
+
{
|
|
1833
|
+
type: "button",
|
|
1834
|
+
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",
|
|
1835
|
+
onClick: decrement
|
|
1836
|
+
},
|
|
1837
|
+
/* @__PURE__ */ React.createElement(Minus2, { className: "h-4 w-4 text-green-100" })
|
|
1838
|
+
), /* @__PURE__ */ React.createElement(
|
|
1839
|
+
"input",
|
|
1840
|
+
{
|
|
1841
|
+
className: cn(counterVariants({ theme }), classNames?.input),
|
|
1842
|
+
ref,
|
|
1843
|
+
value: count,
|
|
1844
|
+
onChange: handleChange,
|
|
1845
|
+
"data-testid": `counter-element-${props.id}`,
|
|
1846
|
+
...props
|
|
1847
|
+
}
|
|
1848
|
+
), /* @__PURE__ */ React.createElement(
|
|
1849
|
+
"button",
|
|
1850
|
+
{
|
|
1851
|
+
type: "button",
|
|
1852
|
+
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",
|
|
1853
|
+
onClick: increment
|
|
1854
|
+
},
|
|
1855
|
+
/* @__PURE__ */ React.createElement(Plus, { className: "h-4 w-4 text-green-100" })
|
|
1856
|
+
)),
|
|
1857
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
1503
1858
|
);
|
|
1504
1859
|
}
|
|
1505
1860
|
);
|
|
@@ -1559,11 +1914,10 @@ import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
|
1559
1914
|
import { cva as cva8 } from "cva";
|
|
1560
1915
|
import { forwardRef as forwardRef16 } from "react";
|
|
1561
1916
|
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
1562
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1563
1917
|
var Icon = forwardRef16(
|
|
1564
1918
|
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
1565
1919
|
const Component = readonly ? Slot2 : "button";
|
|
1566
|
-
return /* @__PURE__ */
|
|
1920
|
+
return /* @__PURE__ */ React.createElement(
|
|
1567
1921
|
Component,
|
|
1568
1922
|
{
|
|
1569
1923
|
className: cn(
|
|
@@ -1637,9 +1991,8 @@ import { forwardRef as forwardRef18 } from "react";
|
|
|
1637
1991
|
// src/components/primitives/input-otp.tsx
|
|
1638
1992
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1639
1993
|
import { Dot } from "lucide-react";
|
|
1640
|
-
import * as
|
|
1641
|
-
|
|
1642
|
-
var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1994
|
+
import * as React11 from "react";
|
|
1995
|
+
var InputOTP = React11.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
1643
1996
|
OTPInput,
|
|
1644
1997
|
{
|
|
1645
1998
|
ref,
|
|
@@ -1652,12 +2005,12 @@ var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1652
2005
|
}
|
|
1653
2006
|
));
|
|
1654
2007
|
InputOTP.displayName = "InputOTP";
|
|
1655
|
-
var InputOTPGroup =
|
|
2008
|
+
var InputOTPGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1656
2009
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1657
|
-
var InputOTPSlot =
|
|
1658
|
-
const inputOTPContext =
|
|
2010
|
+
var InputOTPSlot = React11.forwardRef(({ index, error, className, ...props }, ref) => {
|
|
2011
|
+
const inputOTPContext = React11.useContext(OTPInputContext);
|
|
1659
2012
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1660
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1661
2014
|
"div",
|
|
1662
2015
|
{
|
|
1663
2016
|
ref,
|
|
@@ -1667,57 +2020,52 @@ var InputOTPSlot = React8.forwardRef(({ index, error, className, ...props }, ref
|
|
|
1667
2020
|
error && "border-red-500 dark:border-red-400",
|
|
1668
2021
|
className
|
|
1669
2022
|
),
|
|
1670
|
-
...props
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
]
|
|
1675
|
-
}
|
|
2023
|
+
...props
|
|
2024
|
+
},
|
|
2025
|
+
char,
|
|
2026
|
+
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" }))
|
|
1676
2027
|
);
|
|
1677
2028
|
});
|
|
1678
2029
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1679
|
-
var InputOTPSeparator =
|
|
2030
|
+
var InputOTPSeparator = React11.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React11.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React11.createElement(Dot, null)));
|
|
1680
2031
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1681
2032
|
|
|
1682
2033
|
// src/components/ui/InputOtp.tsx
|
|
1683
|
-
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1684
2034
|
var InputOtp = forwardRef18(
|
|
1685
2035
|
({ digits, label, description, error, ...props }, ref) => {
|
|
1686
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ React.createElement(
|
|
1687
2037
|
"div",
|
|
1688
2038
|
{
|
|
1689
2039
|
className: "group flex w-full flex-col gap-1",
|
|
1690
|
-
"data-testid": `input-otp-wrapper-${props.id}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
]
|
|
1720
|
-
}
|
|
2040
|
+
"data-testid": `input-otp-wrapper-${props.id}`
|
|
2041
|
+
},
|
|
2042
|
+
label && /* @__PURE__ */ React.createElement(
|
|
2043
|
+
Label_default,
|
|
2044
|
+
{
|
|
2045
|
+
text: label,
|
|
2046
|
+
htmlFor: props.name,
|
|
2047
|
+
required: props.required,
|
|
2048
|
+
description
|
|
2049
|
+
}
|
|
2050
|
+
),
|
|
2051
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, /* @__PURE__ */ React.createElement(
|
|
2052
|
+
InputOTP,
|
|
2053
|
+
{
|
|
2054
|
+
ref,
|
|
2055
|
+
maxLength: digits,
|
|
2056
|
+
"data-testid": `input-otp-element-${props.id}`,
|
|
2057
|
+
...props
|
|
2058
|
+
},
|
|
2059
|
+
[...Array(digits)].map((_, index) => /* @__PURE__ */ React.createElement(InputOTPGroup, { key: index }, /* @__PURE__ */ React.createElement(
|
|
2060
|
+
InputOTPSlot,
|
|
2061
|
+
{
|
|
2062
|
+
"data-testid": `input-otp-slot-${index}`,
|
|
2063
|
+
index,
|
|
2064
|
+
error: Boolean(error)
|
|
2065
|
+
}
|
|
2066
|
+
)))
|
|
2067
|
+
)),
|
|
2068
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
1721
2069
|
);
|
|
1722
2070
|
}
|
|
1723
2071
|
);
|
|
@@ -1725,7 +2073,7 @@ InputOtp.displayName = "Input";
|
|
|
1725
2073
|
|
|
1726
2074
|
// src/components/ui/LinkButton.tsx
|
|
1727
2075
|
import Link2 from "next/link";
|
|
1728
|
-
import
|
|
2076
|
+
import React12 from "react";
|
|
1729
2077
|
var LinkButton = ({
|
|
1730
2078
|
disabled = false,
|
|
1731
2079
|
useAnchor = false,
|
|
@@ -1734,27 +2082,26 @@ var LinkButton = ({
|
|
|
1734
2082
|
...props
|
|
1735
2083
|
}) => {
|
|
1736
2084
|
const Component = useAnchor ? "a" : Link2;
|
|
1737
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1738
2086
|
Component,
|
|
1739
2087
|
{
|
|
1740
2088
|
href,
|
|
1741
2089
|
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" : ""} `,
|
|
1742
2090
|
...disabled && { "aria-disabled": true, tabIndex: -1 },
|
|
1743
|
-
...props
|
|
1744
|
-
|
|
1745
|
-
|
|
2091
|
+
...props
|
|
2092
|
+
},
|
|
2093
|
+
children
|
|
1746
2094
|
);
|
|
1747
2095
|
};
|
|
1748
2096
|
|
|
1749
2097
|
// src/components/ui/ReadMore.tsx
|
|
1750
|
-
import { useEffect as
|
|
2098
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1751
2099
|
import Markdown from "react-markdown";
|
|
1752
|
-
import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1753
2100
|
function ReadMore({ text, ...props }) {
|
|
1754
|
-
const [isExpanded, setIsExpanded] =
|
|
1755
|
-
const [maxWords, setMaxWords] =
|
|
2101
|
+
const [isExpanded, setIsExpanded] = useState6(false);
|
|
2102
|
+
const [maxWords, setMaxWords] = useState6(160);
|
|
1756
2103
|
const isOverMaxWords = text.split(" ").length > maxWords;
|
|
1757
|
-
|
|
2104
|
+
useEffect6(() => {
|
|
1758
2105
|
const updateMaxWords = () => {
|
|
1759
2106
|
const windowWidth = window.innerWidth;
|
|
1760
2107
|
if (windowWidth <= 768) {
|
|
@@ -1776,39 +2123,33 @@ function ReadMore({ text, ...props }) {
|
|
|
1776
2123
|
}
|
|
1777
2124
|
const toggleText = () => setIsExpanded(!isExpanded);
|
|
1778
2125
|
const snippet = createReadMoreText(text, maxWords, isExpanded);
|
|
1779
|
-
return /* @__PURE__ */
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
"Read ",
|
|
1790
|
-
isExpanded ? "less" : "more"
|
|
1791
|
-
] })
|
|
1792
|
-
}
|
|
1793
|
-
)
|
|
1794
|
-
] });
|
|
2126
|
+
return /* @__PURE__ */ React.createElement("div", { ...props }, /* @__PURE__ */ React.createElement("div", { "data-testid": "read-more-text", className: "prose lg:prose-lg" }, /* @__PURE__ */ React.createElement(Markdown, null, snippet)), isOverMaxWords && /* @__PURE__ */ React.createElement(
|
|
2127
|
+
Button,
|
|
2128
|
+
{
|
|
2129
|
+
type: "button",
|
|
2130
|
+
className: "mt-2 flex items-center justify-center",
|
|
2131
|
+
variant: "link",
|
|
2132
|
+
onClick: toggleText
|
|
2133
|
+
},
|
|
2134
|
+
/* @__PURE__ */ React.createElement("p", { className: "text-sm font-bold underline underline-offset-2" }, "Read ", isExpanded ? "less" : "more")
|
|
2135
|
+
));
|
|
1795
2136
|
}
|
|
1796
2137
|
|
|
1797
2138
|
// src/components/ui/DatePicker.tsx
|
|
1798
2139
|
import { cva as cva10 } from "cva";
|
|
1799
2140
|
import { format } from "date-fns";
|
|
1800
2141
|
import { Calendar as CalendarIcon } from "lucide-react";
|
|
1801
|
-
import { forwardRef as forwardRef20, useEffect as
|
|
2142
|
+
import { forwardRef as forwardRef20, useEffect as useEffect7, useState as useState7 } from "react";
|
|
1802
2143
|
|
|
1803
2144
|
// src/components/ui/calendar.tsx
|
|
1804
2145
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2146
|
+
import * as React14 from "react";
|
|
1805
2147
|
import { DayPicker } from "react-day-picker";
|
|
1806
2148
|
|
|
1807
2149
|
// src/components/ui/buttonShadcn.tsx
|
|
1808
2150
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1809
2151
|
import { cva as cva9 } from "class-variance-authority";
|
|
1810
|
-
import * as
|
|
1811
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2152
|
+
import * as React13 from "react";
|
|
1812
2153
|
var buttonVariants2 = cva9(
|
|
1813
2154
|
"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",
|
|
1814
2155
|
{
|
|
@@ -1834,18 +2175,17 @@ var buttonVariants2 = cva9(
|
|
|
1834
2175
|
}
|
|
1835
2176
|
}
|
|
1836
2177
|
);
|
|
1837
|
-
var Button2 =
|
|
2178
|
+
var Button2 = React13.forwardRef(
|
|
1838
2179
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
1839
2180
|
const Comp = asChild ? Slot3 : "button";
|
|
1840
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ React13.createElement(Comp, { className: cn(buttonVariants2({ variant, size, className })), ref, ...props });
|
|
1841
2182
|
}
|
|
1842
2183
|
);
|
|
1843
2184
|
Button2.displayName = "Button";
|
|
1844
2185
|
|
|
1845
2186
|
// src/components/ui/calendar.tsx
|
|
1846
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1847
2187
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
1848
|
-
return /* @__PURE__ */
|
|
2188
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1849
2189
|
DayPicker,
|
|
1850
2190
|
{
|
|
1851
2191
|
showOutsideDays,
|
|
@@ -1885,8 +2225,8 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
1885
2225
|
...classNames
|
|
1886
2226
|
},
|
|
1887
2227
|
components: {
|
|
1888
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
1889
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
2228
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ React14.createElement(ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
2229
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ React14.createElement(ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
1890
2230
|
},
|
|
1891
2231
|
...props
|
|
1892
2232
|
}
|
|
@@ -1895,11 +2235,10 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
1895
2235
|
Calendar.displayName = "Calendar";
|
|
1896
2236
|
|
|
1897
2237
|
// src/components/ui/DatePicker.tsx
|
|
1898
|
-
import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1899
2238
|
var DatePicker = forwardRef20(
|
|
1900
2239
|
({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {
|
|
1901
|
-
const [date, setDate] =
|
|
1902
|
-
|
|
2240
|
+
const [date, setDate] = useState7(null);
|
|
2241
|
+
useEffect7(() => {
|
|
1903
2242
|
setDate(value ?? null);
|
|
1904
2243
|
}, [value]);
|
|
1905
2244
|
const handleDateSelect = (dateSelected) => {
|
|
@@ -1907,35 +2246,25 @@ var DatePicker = forwardRef20(
|
|
|
1907
2246
|
onChange?.(dateSelected);
|
|
1908
2247
|
setDate(dateSelected);
|
|
1909
2248
|
};
|
|
1910
|
-
return /* @__PURE__ */
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
selected: date || void 0,
|
|
1930
|
-
onSelect: handleDateSelect,
|
|
1931
|
-
captionLayout: "dropdown",
|
|
1932
|
-
showOutsideDays: true,
|
|
1933
|
-
className: classNames?.calendar
|
|
1934
|
-
}
|
|
1935
|
-
) })
|
|
1936
|
-
] }),
|
|
1937
|
-
/* @__PURE__ */ jsx31(ErrorMessage_default, { message: error })
|
|
1938
|
-
] });
|
|
2249
|
+
return /* @__PURE__ */ React.createElement("div", { id, className: cn("flex w-auto flex-col gap-1") }, label && /* @__PURE__ */ React.createElement(
|
|
2250
|
+
Label_default,
|
|
2251
|
+
{
|
|
2252
|
+
text: label,
|
|
2253
|
+
required,
|
|
2254
|
+
description,
|
|
2255
|
+
className: classNames?.label
|
|
2256
|
+
}
|
|
2257
|
+
), /* @__PURE__ */ React.createElement(Popover, null, /* @__PURE__ */ React.createElement(PopoverTrigger, { "data-testid": testId }, /* @__PURE__ */ React.createElement("div", { className: cn(datePickerStyle(), classNames?.input) }, /* @__PURE__ */ React.createElement(CalendarIcon, { size: 16 }), date ? format(date, "MM/dd/yyyy") : "Select a date")), /* @__PURE__ */ React.createElement(PopoverContent, { ref }, /* @__PURE__ */ React.createElement(
|
|
2258
|
+
Calendar,
|
|
2259
|
+
{
|
|
2260
|
+
mode: "single",
|
|
2261
|
+
selected: date || void 0,
|
|
2262
|
+
onSelect: handleDateSelect,
|
|
2263
|
+
captionLayout: "dropdown",
|
|
2264
|
+
showOutsideDays: true,
|
|
2265
|
+
className: classNames?.calendar
|
|
2266
|
+
}
|
|
2267
|
+
))), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
1939
2268
|
}
|
|
1940
2269
|
);
|
|
1941
2270
|
var datePickerStyle = cva10([
|
|
@@ -1973,7 +2302,6 @@ var datePickerStyle = cva10([
|
|
|
1973
2302
|
// src/components/ui/StepTabs.tsx
|
|
1974
2303
|
import * as Tabs from "@radix-ui/react-tabs";
|
|
1975
2304
|
import { cva as cva11 } from "cva";
|
|
1976
|
-
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1977
2305
|
var tabParentVariants = cva11("flex flex-col", {
|
|
1978
2306
|
variants: {
|
|
1979
2307
|
variant: {
|
|
@@ -2024,45 +2352,42 @@ function StepTabs({
|
|
|
2024
2352
|
variant,
|
|
2025
2353
|
...props
|
|
2026
2354
|
}) {
|
|
2027
|
-
return /* @__PURE__ */
|
|
2355
|
+
return /* @__PURE__ */ React.createElement(
|
|
2028
2356
|
Tabs.Root,
|
|
2029
2357
|
{
|
|
2030
2358
|
value: currentStep,
|
|
2031
2359
|
onValueChange: setCurrentStep,
|
|
2032
2360
|
defaultValue: defaultValue ?? "0",
|
|
2033
2361
|
className: cn(tabParentVariants({ variant }), className),
|
|
2034
|
-
...props
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
]
|
|
2058
|
-
}
|
|
2362
|
+
...props
|
|
2363
|
+
},
|
|
2364
|
+
/* @__PURE__ */ React.createElement(Tabs.List, { className: cn(headerVariants({ variant })) }, list.length > 1 && list.map((item, index) => /* @__PURE__ */ React.createElement(
|
|
2365
|
+
Tabs.Trigger,
|
|
2366
|
+
{
|
|
2367
|
+
key: `${item}-${index}`,
|
|
2368
|
+
className: cn(singleTabVariants({ variant }), classNameTab),
|
|
2369
|
+
value: index.toString()
|
|
2370
|
+
},
|
|
2371
|
+
item
|
|
2372
|
+
))),
|
|
2373
|
+
children && children.map((child, index) => /* @__PURE__ */ React.createElement(
|
|
2374
|
+
Tabs.Content,
|
|
2375
|
+
{
|
|
2376
|
+
key: index,
|
|
2377
|
+
className: cn(
|
|
2378
|
+
"grow rounded-b-md bg-white p-5 outline-none",
|
|
2379
|
+
variant === "minimal" && "border-t"
|
|
2380
|
+
),
|
|
2381
|
+
value: index.toString()
|
|
2382
|
+
},
|
|
2383
|
+
child
|
|
2384
|
+
))
|
|
2059
2385
|
);
|
|
2060
2386
|
}
|
|
2061
2387
|
|
|
2062
2388
|
// src/components/ui/DismissibleBanner.tsx
|
|
2063
2389
|
import { X as X4 } from "lucide-react";
|
|
2064
|
-
import { useEffect as
|
|
2065
|
-
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2390
|
+
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
2066
2391
|
function DismissibleBanner({
|
|
2067
2392
|
children,
|
|
2068
2393
|
cookieId,
|
|
@@ -2071,8 +2396,8 @@ function DismissibleBanner({
|
|
|
2071
2396
|
buttonClassNames
|
|
2072
2397
|
}) {
|
|
2073
2398
|
const safeId = encodeURIComponent(cookieId);
|
|
2074
|
-
const [isVisible, setIsVisible] =
|
|
2075
|
-
|
|
2399
|
+
const [isVisible, setIsVisible] = useState8(false);
|
|
2400
|
+
useEffect8(() => {
|
|
2076
2401
|
const cookies = document.cookie.split(";");
|
|
2077
2402
|
const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`));
|
|
2078
2403
|
if (!isDismissed) {
|
|
@@ -2084,26 +2409,24 @@ function DismissibleBanner({
|
|
|
2084
2409
|
setIsVisible(false);
|
|
2085
2410
|
};
|
|
2086
2411
|
if (!isVisible) return null;
|
|
2087
|
-
return /* @__PURE__ */
|
|
2412
|
+
return /* @__PURE__ */ React.createElement(
|
|
2088
2413
|
"nav",
|
|
2089
2414
|
{
|
|
2090
2415
|
className: cn(
|
|
2091
2416
|
"align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3",
|
|
2092
2417
|
className
|
|
2093
|
-
)
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
]
|
|
2106
|
-
}
|
|
2418
|
+
)
|
|
2419
|
+
},
|
|
2420
|
+
/* @__PURE__ */ React.createElement("div", { className: cn("w-full text-center text-sm text-green-100", textClassNames) }, children),
|
|
2421
|
+
/* @__PURE__ */ React.createElement(
|
|
2422
|
+
"button",
|
|
2423
|
+
{
|
|
2424
|
+
className: cn("text-green-100", buttonClassNames),
|
|
2425
|
+
"aria-label": "Close banner",
|
|
2426
|
+
onClick: handleDismiss
|
|
2427
|
+
},
|
|
2428
|
+
/* @__PURE__ */ React.createElement(X4, { size: 28 })
|
|
2429
|
+
)
|
|
2107
2430
|
);
|
|
2108
2431
|
}
|
|
2109
2432
|
|
|
@@ -2537,17 +2860,12 @@ function salaryRange(salary, showUnitText = true) {
|
|
|
2537
2860
|
}
|
|
2538
2861
|
|
|
2539
2862
|
// src/components/company/CompanyBenefits.tsx
|
|
2540
|
-
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2541
2863
|
function CompanyBenefits({ benefits }) {
|
|
2542
2864
|
if (!benefits) return null;
|
|
2543
|
-
return /* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */ jsx34("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg", children: "Company benefits" }),
|
|
2545
|
-
/* @__PURE__ */ jsx34("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ jsx34("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
|
|
2546
|
-
] });
|
|
2865
|
+
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))));
|
|
2547
2866
|
}
|
|
2548
2867
|
|
|
2549
2868
|
// src/components/company/CompanyInformation.tsx
|
|
2550
|
-
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2551
2869
|
function CompanyInformation({
|
|
2552
2870
|
name,
|
|
2553
2871
|
how,
|
|
@@ -2555,78 +2873,45 @@ function CompanyInformation({
|
|
|
2555
2873
|
wow,
|
|
2556
2874
|
website
|
|
2557
2875
|
}) {
|
|
2558
|
-
return /* @__PURE__ */
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
] })
|
|
2577
|
-
] }),
|
|
2578
|
-
wow && /* @__PURE__ */ jsxs22("div", { className: "flex gap-2", children: [
|
|
2579
|
-
/* @__PURE__ */ jsx35("span", { children: "\u{1F31F}" }),
|
|
2580
|
-
/* @__PURE__ */ jsxs22("p", { className: "text-base text-grey-80", children: [
|
|
2581
|
-
/* @__PURE__ */ jsx35("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
|
|
2582
|
-
wow
|
|
2583
|
-
] })
|
|
2584
|
-
] }),
|
|
2585
|
-
website && /* @__PURE__ */ jsx35("div", { className: "pt-2", children: /* @__PURE__ */ jsx35(
|
|
2586
|
-
LinkButton,
|
|
2587
|
-
{
|
|
2588
|
-
"data-testid": "company-website-link",
|
|
2589
|
-
href: website,
|
|
2590
|
-
target: "_blank",
|
|
2591
|
-
rel: "noopener noreferrer",
|
|
2592
|
-
children: "Website"
|
|
2593
|
-
}
|
|
2594
|
-
) })
|
|
2595
|
-
] });
|
|
2876
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React.createElement(
|
|
2877
|
+
"h2",
|
|
2878
|
+
{
|
|
2879
|
+
"data-testid": "company-name",
|
|
2880
|
+
className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg"
|
|
2881
|
+
},
|
|
2882
|
+
"About ",
|
|
2883
|
+
name
|
|
2884
|
+
), 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(
|
|
2885
|
+
LinkButton,
|
|
2886
|
+
{
|
|
2887
|
+
"data-testid": "company-website-link",
|
|
2888
|
+
href: website,
|
|
2889
|
+
target: "_blank",
|
|
2890
|
+
rel: "noopener noreferrer"
|
|
2891
|
+
},
|
|
2892
|
+
"Website"
|
|
2893
|
+
)));
|
|
2596
2894
|
}
|
|
2597
2895
|
|
|
2598
2896
|
// src/components/company/CompanyTake.tsx
|
|
2599
|
-
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2600
2897
|
function CompanyTake({ content, avatarSrc }) {
|
|
2601
2898
|
if (!content) return null;
|
|
2602
|
-
return /* @__PURE__ */
|
|
2899
|
+
return /* @__PURE__ */ React.createElement(
|
|
2603
2900
|
"div",
|
|
2604
2901
|
{
|
|
2605
2902
|
"data-testid": "company-take",
|
|
2606
|
-
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6"
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
/* @__PURE__ */ jsx36(Avatar, { name: "Jon Lee", src: avatarSrc }),
|
|
2612
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col flex-wrap items-start", children: [
|
|
2613
|
-
/* @__PURE__ */ jsx36("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
|
|
2614
|
-
/* @__PURE__ */ jsx36("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
|
|
2615
|
-
] })
|
|
2616
|
-
] })
|
|
2617
|
-
]
|
|
2618
|
-
}
|
|
2903
|
+
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6"
|
|
2904
|
+
},
|
|
2905
|
+
/* @__PURE__ */ React.createElement("p", { className: "text-lg font-bold text-white sm:text-xl" }, "The Real Dill \u2618\uFE0F"),
|
|
2906
|
+
/* @__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)),
|
|
2907
|
+
/* @__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")))
|
|
2619
2908
|
);
|
|
2620
2909
|
}
|
|
2621
2910
|
|
|
2622
2911
|
// src/components/jobPost/JobDescription.tsx
|
|
2623
|
-
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2624
2912
|
function JobDescription({ description }) {
|
|
2625
2913
|
if (!description) return null;
|
|
2626
|
-
return /* @__PURE__ */
|
|
2627
|
-
/* @__PURE__ */ jsx37("h3", { className: "text-xl font-bold", children: "Job Description" }),
|
|
2628
|
-
/* @__PURE__ */ jsx37(ReadMore, { text: description })
|
|
2629
|
-
] });
|
|
2914
|
+
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 }));
|
|
2630
2915
|
}
|
|
2631
2916
|
|
|
2632
2917
|
// src/components/jobPost/JobHeader.tsx
|
|
@@ -2642,19 +2927,18 @@ import { useContext as useContext2 } from "react";
|
|
|
2642
2927
|
|
|
2643
2928
|
// src/contexts/WindowHistoryProvider.tsx
|
|
2644
2929
|
import { useSearchParams } from "next/navigation";
|
|
2645
|
-
import { createContext, useEffect as
|
|
2646
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2930
|
+
import { createContext, useEffect as useEffect9, useMemo as useMemo3, useState as useState9 } from "react";
|
|
2647
2931
|
var WindowHistoryContext = createContext({});
|
|
2648
2932
|
function WindowHistoryProvider({ children }) {
|
|
2649
|
-
const [history, setHistory] =
|
|
2933
|
+
const [history, setHistory] = useState9([]);
|
|
2650
2934
|
const searchParams = useSearchParams();
|
|
2651
|
-
|
|
2935
|
+
useEffect9(() => {
|
|
2652
2936
|
setHistory(
|
|
2653
2937
|
(prev) => prev.at(-1) === window.location.href ? prev : [...prev, window.location.href]
|
|
2654
2938
|
);
|
|
2655
2939
|
}, [searchParams]);
|
|
2656
|
-
const contextValue =
|
|
2657
|
-
return /* @__PURE__ */
|
|
2940
|
+
const contextValue = useMemo3(() => ({ history }), [history]);
|
|
2941
|
+
return /* @__PURE__ */ React.createElement(WindowHistoryContext.Provider, { value: contextValue }, children);
|
|
2658
2942
|
}
|
|
2659
2943
|
|
|
2660
2944
|
// src/hooks/useWindowHistory.ts
|
|
@@ -2664,7 +2948,6 @@ function useWindowHistory() {
|
|
|
2664
2948
|
}
|
|
2665
2949
|
|
|
2666
2950
|
// src/components/buttons/BackButton.tsx
|
|
2667
|
-
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2668
2951
|
function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
2669
2952
|
const { history } = useWindowHistory();
|
|
2670
2953
|
const router = useRouter();
|
|
@@ -2677,7 +2960,7 @@ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
|
2677
2960
|
router.push(fallbackHref ?? "/");
|
|
2678
2961
|
}
|
|
2679
2962
|
};
|
|
2680
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ React.createElement(
|
|
2681
2964
|
Icon,
|
|
2682
2965
|
{
|
|
2683
2966
|
"aria-label": "back button",
|
|
@@ -2685,9 +2968,9 @@ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
|
2685
2968
|
size: "small",
|
|
2686
2969
|
onClick: goBack,
|
|
2687
2970
|
className,
|
|
2688
|
-
...props
|
|
2689
|
-
|
|
2690
|
-
|
|
2971
|
+
...props
|
|
2972
|
+
},
|
|
2973
|
+
/* @__PURE__ */ React.createElement(X5, null)
|
|
2691
2974
|
);
|
|
2692
2975
|
}
|
|
2693
2976
|
|
|
@@ -2738,7 +3021,6 @@ var iconMap = {
|
|
|
2738
3021
|
};
|
|
2739
3022
|
|
|
2740
3023
|
// src/components/jobPost/JobHeader.tsx
|
|
2741
|
-
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2742
3024
|
function JobHeader({
|
|
2743
3025
|
title,
|
|
2744
3026
|
subtitles,
|
|
@@ -2754,130 +3036,111 @@ function JobHeader({
|
|
|
2754
3036
|
}) {
|
|
2755
3037
|
const renderIcon = (icon) => {
|
|
2756
3038
|
const Icon2 = iconMap[icon];
|
|
2757
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ React.createElement(Icon2, { size: 18 });
|
|
2758
3040
|
};
|
|
2759
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ React.createElement(
|
|
2760
3042
|
"div",
|
|
2761
3043
|
{
|
|
2762
3044
|
"data-testid": "job-header-root",
|
|
2763
3045
|
className: cn(
|
|
2764
3046
|
"-mt-8 flex w-full flex-col items-center justify-between gap-6 md:-mt-0",
|
|
2765
3047
|
!standalone && "rounded-3xl"
|
|
3048
|
+
)
|
|
3049
|
+
},
|
|
3050
|
+
!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(
|
|
3051
|
+
Image2,
|
|
3052
|
+
{
|
|
3053
|
+
className: "h-full w-full rounded-t-3xl object-cover",
|
|
3054
|
+
src: bannerSrc,
|
|
3055
|
+
alt: "job banner",
|
|
3056
|
+
fill: true
|
|
3057
|
+
}
|
|
3058
|
+
), /* @__PURE__ */ React.createElement(
|
|
3059
|
+
BackButton,
|
|
3060
|
+
{
|
|
3061
|
+
acceptedRoutes: backAcceptedRoutes,
|
|
3062
|
+
fallbackHref: backFallbackHref,
|
|
3063
|
+
className: "absolute right-2 top-2 flex items-center justify-center text-white sm:hidden",
|
|
3064
|
+
"data-testid": "job-header-back-button"
|
|
3065
|
+
}
|
|
3066
|
+
), /* @__PURE__ */ React.createElement(
|
|
3067
|
+
"div",
|
|
3068
|
+
{
|
|
3069
|
+
className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
|
|
3070
|
+
"data-testid": "job-header-avatar"
|
|
3071
|
+
},
|
|
3072
|
+
/* @__PURE__ */ React.createElement(
|
|
3073
|
+
Avatar,
|
|
3074
|
+
{
|
|
3075
|
+
size: "large",
|
|
3076
|
+
target: "_blank",
|
|
3077
|
+
href: avatarHref,
|
|
3078
|
+
name: avatarName,
|
|
3079
|
+
src: avatarSrc,
|
|
3080
|
+
rel: "noopener noreferrer"
|
|
3081
|
+
}
|
|
3082
|
+
)
|
|
3083
|
+
)),
|
|
3084
|
+
/* @__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(
|
|
3085
|
+
Avatar,
|
|
3086
|
+
{
|
|
3087
|
+
size: "large",
|
|
3088
|
+
target: "_blank",
|
|
3089
|
+
href: avatarHref,
|
|
3090
|
+
name: avatarName,
|
|
3091
|
+
src: avatarSrc,
|
|
3092
|
+
rel: "noopener noreferrer"
|
|
3093
|
+
}
|
|
3094
|
+
)), /* @__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(
|
|
3095
|
+
"div",
|
|
3096
|
+
{
|
|
3097
|
+
key: subtitle,
|
|
3098
|
+
"data-testid": `job-header-subtitle-${i}`,
|
|
3099
|
+
className: "flex items-center"
|
|
3100
|
+
},
|
|
3101
|
+
subtitle,
|
|
3102
|
+
i < subtitles.length - 1 && /* @__PURE__ */ React.createElement(Dot2, { className: "mx-1 shrink-0", size: 10 })
|
|
3103
|
+
)))), /* @__PURE__ */ React.createElement(
|
|
3104
|
+
"div",
|
|
3105
|
+
{
|
|
3106
|
+
"data-testid": "job-header-content",
|
|
3107
|
+
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1"
|
|
3108
|
+
},
|
|
3109
|
+
/* @__PURE__ */ React.createElement(
|
|
3110
|
+
"h2",
|
|
3111
|
+
{
|
|
3112
|
+
"data-testid": "job-header-title",
|
|
3113
|
+
className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg"
|
|
3114
|
+
},
|
|
3115
|
+
title
|
|
2766
3116
|
),
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
{
|
|
2795
|
-
size: "large",
|
|
2796
|
-
target: "_blank",
|
|
2797
|
-
href: avatarHref,
|
|
2798
|
-
name: avatarName,
|
|
2799
|
-
src: avatarSrc,
|
|
2800
|
-
rel: "noopener noreferrer"
|
|
2801
|
-
}
|
|
2802
|
-
)
|
|
2803
|
-
}
|
|
2804
|
-
)
|
|
2805
|
-
] }),
|
|
2806
|
-
/* @__PURE__ */ jsxs25("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
|
|
2807
|
-
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col md:flex-row", children: [
|
|
2808
|
-
standalone && /* @__PURE__ */ jsx40("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ jsx40(
|
|
2809
|
-
Avatar,
|
|
2810
|
-
{
|
|
2811
|
-
size: "large",
|
|
2812
|
-
target: "_blank",
|
|
2813
|
-
href: avatarHref,
|
|
2814
|
-
name: avatarName,
|
|
2815
|
-
src: avatarSrc,
|
|
2816
|
-
rel: "noopener noreferrer"
|
|
2817
|
-
}
|
|
2818
|
-
) }),
|
|
2819
|
-
/* @__PURE__ */ jsx40("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg", children: subtitles?.map((subtitle, i) => /* @__PURE__ */ jsxs25(
|
|
2820
|
-
"div",
|
|
2821
|
-
{
|
|
2822
|
-
"data-testid": `job-header-subtitle-${i}`,
|
|
2823
|
-
className: "flex items-center",
|
|
2824
|
-
children: [
|
|
2825
|
-
subtitle,
|
|
2826
|
-
i < subtitles.length - 1 && /* @__PURE__ */ jsx40(Dot2, { className: "mx-1 shrink-0", size: 10 })
|
|
2827
|
-
]
|
|
2828
|
-
},
|
|
2829
|
-
subtitle
|
|
2830
|
-
)) })
|
|
2831
|
-
] }),
|
|
2832
|
-
/* @__PURE__ */ jsxs25(
|
|
2833
|
-
"div",
|
|
2834
|
-
{
|
|
2835
|
-
"data-testid": "job-header-content",
|
|
2836
|
-
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
|
|
2837
|
-
children: [
|
|
2838
|
-
/* @__PURE__ */ jsx40(
|
|
2839
|
-
"h2",
|
|
2840
|
-
{
|
|
2841
|
-
"data-testid": "job-header-title",
|
|
2842
|
-
className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg",
|
|
2843
|
-
children: title
|
|
2844
|
-
}
|
|
2845
|
-
),
|
|
2846
|
-
!!actions && /* @__PURE__ */ jsx40(
|
|
2847
|
-
"div",
|
|
2848
|
-
{
|
|
2849
|
-
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
2850
|
-
"data-testid": "job-header-actions",
|
|
2851
|
-
children: actions
|
|
2852
|
-
}
|
|
2853
|
-
)
|
|
2854
|
-
]
|
|
2855
|
-
}
|
|
2856
|
-
),
|
|
2857
|
-
/* @__PURE__ */ jsx40(
|
|
2858
|
-
"div",
|
|
2859
|
-
{
|
|
2860
|
-
"data-testid": "job-header-tags",
|
|
2861
|
-
className: "flex flex-row flex-wrap items-center justify-start gap-2",
|
|
2862
|
-
children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ jsxs25(
|
|
2863
|
-
Chip_default,
|
|
2864
|
-
{
|
|
2865
|
-
size: "small",
|
|
2866
|
-
variant: "neutral",
|
|
2867
|
-
"aria-label": name,
|
|
2868
|
-
"data-testid": `job-header-tag-${name}`,
|
|
2869
|
-
children: [
|
|
2870
|
-
renderIcon(icon),
|
|
2871
|
-
/* @__PURE__ */ jsx40("span", { children: label })
|
|
2872
|
-
]
|
|
2873
|
-
},
|
|
2874
|
-
`${name}-${label}`
|
|
2875
|
-
))
|
|
2876
|
-
}
|
|
2877
|
-
)
|
|
2878
|
-
] })
|
|
2879
|
-
]
|
|
2880
|
-
}
|
|
3117
|
+
!!actions && /* @__PURE__ */ React.createElement(
|
|
3118
|
+
"div",
|
|
3119
|
+
{
|
|
3120
|
+
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
3121
|
+
"data-testid": "job-header-actions"
|
|
3122
|
+
},
|
|
3123
|
+
actions
|
|
3124
|
+
)
|
|
3125
|
+
), /* @__PURE__ */ React.createElement(
|
|
3126
|
+
"div",
|
|
3127
|
+
{
|
|
3128
|
+
"data-testid": "job-header-tags",
|
|
3129
|
+
className: "flex flex-row flex-wrap items-center justify-start gap-2"
|
|
3130
|
+
},
|
|
3131
|
+
tags?.map(({ name, label, icon }) => /* @__PURE__ */ React.createElement(
|
|
3132
|
+
Chip_default,
|
|
3133
|
+
{
|
|
3134
|
+
key: `${name}-${label}`,
|
|
3135
|
+
size: "small",
|
|
3136
|
+
variant: "neutral",
|
|
3137
|
+
"aria-label": name,
|
|
3138
|
+
"data-testid": `job-header-tag-${name}`
|
|
3139
|
+
},
|
|
3140
|
+
renderIcon(icon),
|
|
3141
|
+
/* @__PURE__ */ React.createElement("span", null, label)
|
|
3142
|
+
))
|
|
3143
|
+
))
|
|
2881
3144
|
);
|
|
2882
3145
|
}
|
|
2883
3146
|
|
|
@@ -2885,7 +3148,7 @@ function JobHeader({
|
|
|
2885
3148
|
import * as DateFns from "date-fns";
|
|
2886
3149
|
|
|
2887
3150
|
// src/hooks/useDisplayText.ts
|
|
2888
|
-
import { useEffect as
|
|
3151
|
+
import { useEffect as useEffect10, useMemo as useMemo4, useState as useState10 } from "react";
|
|
2889
3152
|
|
|
2890
3153
|
// src/lib/mappings.ts
|
|
2891
3154
|
var employmentTypeDisplayText = {
|
|
@@ -3329,9 +3592,9 @@ var DisplayTextService = class {
|
|
|
3329
3592
|
|
|
3330
3593
|
// src/hooks/useDisplayText.ts
|
|
3331
3594
|
var useDisplayText = (scope, value) => {
|
|
3332
|
-
const [displayText, setDisplayText] =
|
|
3333
|
-
const displayService =
|
|
3334
|
-
|
|
3595
|
+
const [displayText, setDisplayText] = useState10("");
|
|
3596
|
+
const displayService = useMemo4(() => new DisplayTextService(), []);
|
|
3597
|
+
useEffect10(() => {
|
|
3335
3598
|
if (!displayService || !value) {
|
|
3336
3599
|
setDisplayText("");
|
|
3337
3600
|
return;
|
|
@@ -3392,7 +3655,6 @@ function getAddressList(jobPost) {
|
|
|
3392
3655
|
}
|
|
3393
3656
|
|
|
3394
3657
|
// src/components/jobPost/JobPost.tsx
|
|
3395
|
-
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3396
3658
|
function JobPost({
|
|
3397
3659
|
job,
|
|
3398
3660
|
bannerSrc,
|
|
@@ -3438,97 +3700,80 @@ function JobPost({
|
|
|
3438
3700
|
label
|
|
3439
3701
|
}))
|
|
3440
3702
|
].filter((t) => !!t);
|
|
3441
|
-
return /* @__PURE__ */
|
|
3703
|
+
return /* @__PURE__ */ React.createElement(
|
|
3442
3704
|
"div",
|
|
3443
3705
|
{
|
|
3444
3706
|
className: cn(
|
|
3445
3707
|
"flex flex-col gap-10 pb-4",
|
|
3446
3708
|
!standalone && "border-1 rounded-3xl border-grey-5"
|
|
3447
|
-
)
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
{
|
|
3487
|
-
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
|
|
3488
|
-
}
|
|
3489
|
-
)
|
|
3490
|
-
] })
|
|
3491
|
-
]
|
|
3492
|
-
}
|
|
3709
|
+
)
|
|
3710
|
+
},
|
|
3711
|
+
/* @__PURE__ */ React.createElement(
|
|
3712
|
+
JobHeader,
|
|
3713
|
+
{
|
|
3714
|
+
title: job.title,
|
|
3715
|
+
bannerSrc,
|
|
3716
|
+
avatarName: job.hiringOrganization?.companyName,
|
|
3717
|
+
avatarSrc: job.hiringOrganization?.logo?.asset?.url,
|
|
3718
|
+
subtitles: [job.hiringOrganization?.companyName ?? "", `Posted ${formattedDate}`],
|
|
3719
|
+
actions,
|
|
3720
|
+
standalone,
|
|
3721
|
+
avatarHref,
|
|
3722
|
+
backFallbackHref: fallbackHref,
|
|
3723
|
+
backAcceptedRoutes,
|
|
3724
|
+
tags
|
|
3725
|
+
}
|
|
3726
|
+
),
|
|
3727
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-8 px-6" }, /* @__PURE__ */ React.createElement(JobDescription, { description: job.description }), /* @__PURE__ */ React.createElement(
|
|
3728
|
+
CompanyTake,
|
|
3729
|
+
{
|
|
3730
|
+
avatarSrc,
|
|
3731
|
+
content: job.hiringOrganization?.companyNDG?.companyNDGTake
|
|
3732
|
+
}
|
|
3733
|
+
), /* @__PURE__ */ React.createElement(
|
|
3734
|
+
CompanyInformation,
|
|
3735
|
+
{
|
|
3736
|
+
name: job.hiringOrganization?.companyName ?? "",
|
|
3737
|
+
how: job.hiringOrganization?.companyPhilosophy?.companyHow,
|
|
3738
|
+
mission: job.hiringOrganization?.companyPhilosophy?.companyMission,
|
|
3739
|
+
wow: job.hiringOrganization?.companyNDG?.companyWow,
|
|
3740
|
+
website: job.hiringOrganization?.companyWebsite
|
|
3741
|
+
}
|
|
3742
|
+
), /* @__PURE__ */ React.createElement(
|
|
3743
|
+
CompanyBenefits,
|
|
3744
|
+
{
|
|
3745
|
+
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
|
|
3746
|
+
}
|
|
3747
|
+
))
|
|
3493
3748
|
);
|
|
3494
3749
|
}
|
|
3495
3750
|
|
|
3496
3751
|
// src/components/jobCard/JobLocation.tsx
|
|
3497
3752
|
import { MapPin as MapPin2 } from "lucide-react";
|
|
3498
|
-
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3499
3753
|
function JobLocation({ jobPost }) {
|
|
3500
3754
|
const locations = getAddressList(jobPost);
|
|
3501
3755
|
if (!locations || locations.length === 0) return null;
|
|
3502
3756
|
const primaryOffice = locations[0];
|
|
3503
3757
|
const extendedLocations = locations.slice(1).map((address) => address);
|
|
3504
|
-
return /* @__PURE__ */
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
TooltipContent,
|
|
3524
|
-
{
|
|
3525
|
-
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3526
|
-
"data-testid": "job-location-tooltip-content",
|
|
3527
|
-
children: extendedLocations.map((location) => /* @__PURE__ */ jsx42("div", { className: "text-nowrap text-sm", children: location }, location))
|
|
3528
|
-
}
|
|
3529
|
-
)
|
|
3530
|
-
] }) })
|
|
3531
|
-
] });
|
|
3758
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2", "data-testid": "job-location-element" }, /* @__PURE__ */ React.createElement(MapPin2, { 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(
|
|
3759
|
+
Chip_default,
|
|
3760
|
+
{
|
|
3761
|
+
className: "font-bold",
|
|
3762
|
+
size: "small",
|
|
3763
|
+
variant: "jobLocation",
|
|
3764
|
+
"data-testid": "job-location-tooltip"
|
|
3765
|
+
},
|
|
3766
|
+
"+ ",
|
|
3767
|
+
extendedLocations.length,
|
|
3768
|
+
" more"
|
|
3769
|
+
)), /* @__PURE__ */ React.createElement(
|
|
3770
|
+
TooltipContent,
|
|
3771
|
+
{
|
|
3772
|
+
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3773
|
+
"data-testid": "job-location-tooltip-content"
|
|
3774
|
+
},
|
|
3775
|
+
extendedLocations.map((location) => /* @__PURE__ */ React.createElement("div", { key: location, className: "text-nowrap text-sm" }, location))
|
|
3776
|
+
))));
|
|
3532
3777
|
}
|
|
3533
3778
|
|
|
3534
3779
|
// src/types/data/company_service_latest.ts
|
|
@@ -3845,7 +4090,7 @@ export {
|
|
|
3845
4090
|
Label_default as Label,
|
|
3846
4091
|
LinkButton,
|
|
3847
4092
|
ListItem_default as ListItem,
|
|
3848
|
-
|
|
4093
|
+
MapComponent,
|
|
3849
4094
|
PlacesQueryInput_default as PlacesQueryInput,
|
|
3850
4095
|
Radio,
|
|
3851
4096
|
ReadMore,
|