@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Counter.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'cva'\nimport { Minus, Plus } from 'lucide-react'\nimport { type ChangeEvent, forwardRef, type InputHTMLAttributes, useEffect, useState } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>\ntype CounterVariants = VariantProps<typeof counterVariants>\ntype Props = InputProps &\n CounterVariants & {\n label?: string\n value?: number\n error?: string\n min?: number\n max?: number\n step?: number\n description?: string\n classNames?: { root?: string; input?: string; label?: string }\n onChange?: (n: number) => void\n }\n\nexport const Counter = forwardRef<HTMLInputElement, Props>(\n (\n { label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props },\n ref\n ) => {\n const [count, setCount] = useState(0)\n\n useEffect(() => {\n setCount(value ?? 0)\n }, [value])\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = parseInt(e.target.value.replace(/\\D/g, ''), 10)\n if (isNaN(newValue)) return\n if (min && newValue < min) {\n onChange?.(min)\n setCount(min)\n return\n }\n if (max && newValue > max) {\n onChange?.(max)\n setCount(max)\n return\n }\n onChange?.(newValue)\n setCount(newValue)\n }\n\n const decrement = () => {\n const proposedValue = count - step\n const newValue = Math.max(min ?? -Infinity, proposedValue)\n onChange?.(newValue)\n setCount(newValue)\n }\n\n const increment = () => {\n const proposedValue = count + step\n const newValue = Math.min(max ?? Infinity, proposedValue)\n onChange?.(newValue)\n setCount(newValue)\n }\n\n return (\n <div\n className={cn('flex w-auto flex-col gap-1', classNames?.root)}\n data-testid={`counter-wrapper-${props.id}`}\n >\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n className={classNames?.label}\n />\n )}\n\n <div className=\"relative flex w-[122px] flex-row items-center\">\n <button\n type=\"button\"\n 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\"\n onClick={decrement}\n >\n <Minus className=\"h-4 w-4 text-green-100\" />\n </button>\n\n <input\n className={cn(counterVariants({ theme }), classNames?.input)}\n ref={ref}\n value={count}\n onChange={handleChange}\n data-testid={`counter-element-${props.id}`}\n {...props}\n />\n\n <button\n type=\"button\"\n 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\"\n onClick={increment}\n >\n <Plus className=\"h-4 w-4 text-green-100\" />\n </button>\n </div>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nCounter.displayName = 'Counter'\n\nconst counterVariants = cva(\n [\n 'border-input',\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-[122px]',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'text-center',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n ],\n {\n variants: {\n theme: {\n light: 'text-grey-80 border',\n dark: 'text-white',\n },\n hasIcon: {\n false: 'pl-3',\n true: 'pl-8',\n },\n },\n defaultVariants: {\n theme: 'light',\n hasIcon: false,\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\"> *</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip,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A,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;","names":["forwardRef","jsx","jsx","jsx","jsxs","forwardRef"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Counter.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'cva'\nimport { Minus, Plus } from 'lucide-react'\nimport { type ChangeEvent, forwardRef, type InputHTMLAttributes, useEffect, useState } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>\ntype CounterVariants = VariantProps<typeof counterVariants>\ntype Props = InputProps &\n CounterVariants & {\n label?: string\n value?: number\n error?: string\n min?: number\n max?: number\n step?: number\n description?: string\n classNames?: { root?: string; input?: string; label?: string }\n onChange?: (n: number) => void\n }\n\nexport const Counter = forwardRef<HTMLInputElement, Props>(\n (\n { label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props },\n ref\n ) => {\n const [count, setCount] = useState(0)\n\n useEffect(() => {\n setCount(value ?? 0)\n }, [value])\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = parseInt(e.target.value.replace(/\\D/g, ''), 10)\n if (isNaN(newValue)) return\n if (min && newValue < min) {\n onChange?.(min)\n setCount(min)\n return\n }\n if (max && newValue > max) {\n onChange?.(max)\n setCount(max)\n return\n }\n onChange?.(newValue)\n setCount(newValue)\n }\n\n const decrement = () => {\n const proposedValue = count - step\n const newValue = Math.max(min ?? -Infinity, proposedValue)\n onChange?.(newValue)\n setCount(newValue)\n }\n\n const increment = () => {\n const proposedValue = count + step\n const newValue = Math.min(max ?? Infinity, proposedValue)\n onChange?.(newValue)\n setCount(newValue)\n }\n\n return (\n <div\n className={cn('flex w-auto flex-col gap-1', classNames?.root)}\n data-testid={`counter-wrapper-${props.id}`}\n >\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n className={classNames?.label}\n />\n )}\n\n <div className=\"relative flex w-[122px] flex-row items-center\">\n <button\n type=\"button\"\n 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\"\n onClick={decrement}\n >\n <Minus className=\"h-4 w-4 text-green-100\" />\n </button>\n\n <input\n className={cn(counterVariants({ theme }), classNames?.input)}\n ref={ref}\n value={count}\n onChange={handleChange}\n data-testid={`counter-element-${props.id}`}\n {...props}\n />\n\n <button\n type=\"button\"\n 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\"\n onClick={increment}\n >\n <Plus className=\"h-4 w-4 text-green-100\" />\n </button>\n </div>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nCounter.displayName = 'Counter'\n\nconst counterVariants = cva(\n [\n 'border-input',\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-[122px]',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'text-center',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n ],\n {\n variants: {\n theme: {\n light: 'text-grey-80 border',\n dark: 'text-white',\n },\n hasIcon: {\n false: 'pl-3',\n true: 'pl-8',\n },\n },\n defaultVariants: {\n theme: 'light',\n hasIcon: false,\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\"> *</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"mappings":";;;AAEA,SAAS,WAA8B;AACvC,SAAS,OAAO,YAAY;AAC5B,SAA2B,cAAAA,aAAsC,WAAW,gBAAgB;;;ACJ5F,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACGA,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oCAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,SAC3D,OACH;AAEJ;AAEA,IAAO,uBAAQ;;;AClBf,SAAS,gBAAgB;;;ACEzB,YAAY,sBAAsB;AAClC,YAAYC,YAAW;AAIvB,IAAM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yB;AAAA,MAC3C,CACF;AAAA,MAEA,oCAAC,wBAAa,SAAS,OAAO;AAAA,IAChC;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;AAEtB,IAAM,kBAAkB;AAAA,EACtB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;","names":["forwardRef","React","forwardRef"]}
|
|
@@ -41,7 +41,7 @@ var import_react = require("react");
|
|
|
41
41
|
|
|
42
42
|
// src/components/primitives/popover.tsx
|
|
43
43
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
44
|
-
var
|
|
44
|
+
var React2 = __toESM(require("react"), 1);
|
|
45
45
|
|
|
46
46
|
// src/lib/utils.ts
|
|
47
47
|
var import_clsx = require("clsx");
|
|
@@ -51,10 +51,9 @@ function cn(...inputs) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// src/components/primitives/popover.tsx
|
|
54
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
54
|
var Popover = PopoverPrimitive.Root;
|
|
56
55
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
57
|
-
var PopoverContent =
|
|
56
|
+
var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(
|
|
58
57
|
PopoverPrimitive.Content,
|
|
59
58
|
{
|
|
60
59
|
ref,
|
|
@@ -66,18 +65,18 @@ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset
|
|
|
66
65
|
),
|
|
67
66
|
...props
|
|
68
67
|
}
|
|
69
|
-
)
|
|
68
|
+
)));
|
|
70
69
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
71
70
|
|
|
72
71
|
// src/components/ui/calendar.tsx
|
|
73
72
|
var import_lucide_react = require("lucide-react");
|
|
73
|
+
var React4 = __toESM(require("react"), 1);
|
|
74
74
|
var import_react_day_picker = require("react-day-picker");
|
|
75
75
|
|
|
76
76
|
// src/components/ui/buttonShadcn.tsx
|
|
77
77
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
78
78
|
var import_class_variance_authority = require("class-variance-authority");
|
|
79
|
-
var
|
|
80
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
79
|
+
var React3 = __toESM(require("react"), 1);
|
|
81
80
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
82
81
|
"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",
|
|
83
82
|
{
|
|
@@ -103,18 +102,17 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
);
|
|
106
|
-
var Button =
|
|
105
|
+
var Button = React3.forwardRef(
|
|
107
106
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
108
107
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
109
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ React3.createElement(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
110
109
|
}
|
|
111
110
|
);
|
|
112
111
|
Button.displayName = "Button";
|
|
113
112
|
|
|
114
113
|
// src/components/ui/calendar.tsx
|
|
115
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
116
114
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
117
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ React4.createElement(
|
|
118
116
|
import_react_day_picker.DayPicker,
|
|
119
117
|
{
|
|
120
118
|
showOutsideDays,
|
|
@@ -154,8 +152,8 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
154
152
|
...classNames
|
|
155
153
|
},
|
|
156
154
|
components: {
|
|
157
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
158
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
155
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ React4.createElement(import_lucide_react.ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
156
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ React4.createElement(import_lucide_react.ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
159
157
|
},
|
|
160
158
|
...props
|
|
161
159
|
}
|
|
@@ -164,10 +162,9 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
164
162
|
Calendar.displayName = "Calendar";
|
|
165
163
|
|
|
166
164
|
// src/components/ui/ErrorMessage.tsx
|
|
167
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
168
165
|
function ErrorMessage({ message, className, ...props }) {
|
|
169
166
|
if (!message) return null;
|
|
170
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
171
168
|
}
|
|
172
169
|
var ErrorMessage_default = ErrorMessage;
|
|
173
170
|
|
|
@@ -176,12 +173,11 @@ var import_lucide_react2 = require("lucide-react");
|
|
|
176
173
|
|
|
177
174
|
// src/components/primitives/tooltip.tsx
|
|
178
175
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
179
|
-
var
|
|
180
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
176
|
+
var React5 = __toESM(require("react"), 1);
|
|
181
177
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
182
178
|
var Tooltip = TooltipPrimitive.Root;
|
|
183
179
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
184
|
-
var TooltipContent =
|
|
180
|
+
var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
185
181
|
TooltipPrimitive.Content,
|
|
186
182
|
{
|
|
187
183
|
ref,
|
|
@@ -196,34 +192,24 @@ var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
196
192
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
197
193
|
|
|
198
194
|
// src/components/ui/Label.tsx
|
|
199
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
200
195
|
function Label({ text, required, description, className, ...props }) {
|
|
201
196
|
if (!text) return null;
|
|
202
|
-
return /* @__PURE__ */
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
),
|
|
217
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Tooltip, { children: [
|
|
218
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.InfoIcon, { className: "h-4 w-4" }) }),
|
|
219
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
220
|
-
] }) })
|
|
221
|
-
] });
|
|
197
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
198
|
+
"label",
|
|
199
|
+
{
|
|
200
|
+
className: cn(
|
|
201
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
202
|
+
className
|
|
203
|
+
),
|
|
204
|
+
...props
|
|
205
|
+
},
|
|
206
|
+
text,
|
|
207
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
208
|
+
), !!description && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(import_lucide_react2.InfoIcon, { className: "h-4 w-4" })), /* @__PURE__ */ React.createElement(TooltipContent, { className: "max-w-48" }, description))));
|
|
222
209
|
}
|
|
223
210
|
var Label_default = Label;
|
|
224
211
|
|
|
225
212
|
// src/components/ui/DatePicker.tsx
|
|
226
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
227
213
|
var DatePicker = (0, import_react.forwardRef)(
|
|
228
214
|
({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {
|
|
229
215
|
const [date, setDate] = (0, import_react.useState)(null);
|
|
@@ -235,35 +221,25 @@ var DatePicker = (0, import_react.forwardRef)(
|
|
|
235
221
|
onChange?.(dateSelected);
|
|
236
222
|
setDate(dateSelected);
|
|
237
223
|
};
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
selected: date || void 0,
|
|
258
|
-
onSelect: handleDateSelect,
|
|
259
|
-
captionLayout: "dropdown",
|
|
260
|
-
showOutsideDays: true,
|
|
261
|
-
className: classNames?.calendar
|
|
262
|
-
}
|
|
263
|
-
) })
|
|
264
|
-
] }),
|
|
265
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ErrorMessage_default, { message: error })
|
|
266
|
-
] });
|
|
224
|
+
return /* @__PURE__ */ React.createElement("div", { id, className: cn("flex w-auto flex-col gap-1") }, label && /* @__PURE__ */ React.createElement(
|
|
225
|
+
Label_default,
|
|
226
|
+
{
|
|
227
|
+
text: label,
|
|
228
|
+
required,
|
|
229
|
+
description,
|
|
230
|
+
className: classNames?.label
|
|
231
|
+
}
|
|
232
|
+
), /* @__PURE__ */ React.createElement(Popover, null, /* @__PURE__ */ React.createElement(PopoverTrigger, { "data-testid": testId }, /* @__PURE__ */ React.createElement("div", { className: cn(datePickerStyle(), classNames?.input) }, /* @__PURE__ */ React.createElement(import_lucide_react3.Calendar, { size: 16 }), date ? (0, import_date_fns.format)(date, "MM/dd/yyyy") : "Select a date")), /* @__PURE__ */ React.createElement(PopoverContent, { ref }, /* @__PURE__ */ React.createElement(
|
|
233
|
+
Calendar,
|
|
234
|
+
{
|
|
235
|
+
mode: "single",
|
|
236
|
+
selected: date || void 0,
|
|
237
|
+
onSelect: handleDateSelect,
|
|
238
|
+
captionLayout: "dropdown",
|
|
239
|
+
showOutsideDays: true,
|
|
240
|
+
className: classNames?.calendar
|
|
241
|
+
}
|
|
242
|
+
))), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
267
243
|
}
|
|
268
244
|
);
|
|
269
245
|
var datePickerStyle = (0, import_cva.cva)([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/DatePicker.tsx","../../../src/components/primitives/popover.tsx","../../../src/lib/utils.ts","../../../src/components/ui/calendar.tsx","../../../src/components/ui/buttonShadcn.tsx","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport { cva } from 'cva'\nimport { format } from 'date-fns'\nimport { Calendar as CalendarIcon } from 'lucide-react'\nimport { forwardRef, useEffect, useState } from 'react'\n\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Calendar } from '@/components/ui/calendar'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype Props = {\n label?: string\n description?: string\n required?: boolean\n id?: string\n classNames?: {\n label?: string\n input?: string\n calendar?: string\n }\n value?: Date | null\n onChange?: (date: Date) => void\n error?: string\n testId?: string\n}\n\nexport const DatePicker = forwardRef<HTMLInputElement, Props>(\n ({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {\n const [date, setDate] = useState<Date | null>(null)\n\n useEffect(() => {\n setDate(value ?? null)\n }, [value])\n\n const handleDateSelect = (dateSelected: Date | undefined) => {\n if (!dateSelected) return\n onChange?.(dateSelected)\n setDate(dateSelected)\n }\n\n return (\n <div id={id} className={cn('flex w-auto flex-col gap-1')}>\n {label && (\n <Label\n text={label}\n required={required}\n description={description}\n className={classNames?.label}\n />\n )}\n <Popover>\n <PopoverTrigger data-testid={testId}>\n <div className={cn(datePickerStyle(), classNames?.input)}>\n <CalendarIcon size={16} />\n {date ? format(date, 'MM/dd/yyyy') : 'Select a date'}\n </div>\n </PopoverTrigger>\n <PopoverContent ref={ref}>\n <Calendar\n mode=\"single\"\n selected={date || undefined}\n onSelect={handleDateSelect}\n captionLayout=\"dropdown\"\n showOutsideDays={true}\n className={classNames?.calendar}\n />\n </PopoverContent>\n </Popover>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\n\nconst datePickerStyle = cva([\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-full',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n 'text-grey-80 border',\n 'font-normal',\n])\n","'use client'\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverContent, PopoverTrigger }\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport * as React from 'react'\nimport { DayPicker } from 'react-day-picker'\n\nimport { buttonVariants } from '@/components/ui/buttonShadcn'\nimport { cn } from '@/lib/utils'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\nfunction Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn('p-3', className)}\n classNames={{\n months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',\n month: 'space-y-4',\n caption: 'flex justify-center pt-1 relative items-center',\n caption_label: 'text-sm font-medium',\n nav: 'space-x-1 flex items-center',\n nav_button: cn(\n buttonVariants({ variant: 'outline' }),\n 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'\n ),\n nav_button_previous: 'absolute left-1',\n nav_button_next: 'absolute right-1',\n table: 'w-full border-collapse space-y-1',\n head_row: 'flex',\n head_cell:\n 'text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400',\n row: 'flex w-full mt-2',\n cell: cn(\n 'relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-outside)]:bg-neutral-100/50 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800 dark:[&:has([aria-selected].day-outside)]:bg-neutral-800/50',\n props.mode === 'range'\n ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'\n : '[&:has([aria-selected])]:rounded-md'\n ),\n day: cn(\n buttonVariants({ variant: 'ghost' }),\n 'h-8 w-8 p-0 font-normal aria-selected:opacity-100'\n ),\n day_range_start: 'day-range-start',\n day_range_end: 'day-range-end',\n day_selected:\n 'bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900',\n day_today: 'bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50',\n day_outside:\n 'day-outside text-neutral-500 aria-selected:bg-neutral-100/50 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:bg-neutral-800/50 dark:aria-selected:text-neutral-400',\n day_disabled: 'text-neutral-500 opacity-50 dark:text-neutral-400',\n day_range_middle:\n 'aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50',\n day_hidden: 'invisible',\n ...classNames,\n }}\n components={{\n IconLeft: ({ className, ...props }) => (\n <ChevronLeft className={cn('h-4 w-4', className)} {...props} />\n ),\n IconRight: ({ className, ...props }) => (\n <ChevronRight className={cn('h-4 w-4', className)} {...props} />\n ),\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = 'Calendar'\n\nexport { Calendar }\n","import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n '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',\n {\n variants: {\n variant: {\n default:\n 'bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90',\n destructive:\n 'bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90',\n outline:\n 'border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50',\n secondary:\n 'bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80',\n ghost:\n 'hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50',\n link: 'text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\"> *</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip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AA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;","names":["import_lucide_react","React","import_jsx_runtime","import_jsx_runtime","className","props","import_jsx_runtime","import_lucide_react","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","CalendarIcon"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/DatePicker.tsx","../../../src/components/primitives/popover.tsx","../../../src/lib/utils.ts","../../../src/components/ui/calendar.tsx","../../../src/components/ui/buttonShadcn.tsx","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport { cva } from 'cva'\nimport { format } from 'date-fns'\nimport { Calendar as CalendarIcon } from 'lucide-react'\nimport { forwardRef, useEffect, useState } from 'react'\n\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Calendar } from '@/components/ui/calendar'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype Props = {\n label?: string\n description?: string\n required?: boolean\n id?: string\n classNames?: {\n label?: string\n input?: string\n calendar?: string\n }\n value?: Date | null\n onChange?: (date: Date) => void\n error?: string\n testId?: string\n}\n\nexport const DatePicker = forwardRef<HTMLInputElement, Props>(\n ({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {\n const [date, setDate] = useState<Date | null>(null)\n\n useEffect(() => {\n setDate(value ?? null)\n }, [value])\n\n const handleDateSelect = (dateSelected: Date | undefined) => {\n if (!dateSelected) return\n onChange?.(dateSelected)\n setDate(dateSelected)\n }\n\n return (\n <div id={id} className={cn('flex w-auto flex-col gap-1')}>\n {label && (\n <Label\n text={label}\n required={required}\n description={description}\n className={classNames?.label}\n />\n )}\n <Popover>\n <PopoverTrigger data-testid={testId}>\n <div className={cn(datePickerStyle(), classNames?.input)}>\n <CalendarIcon size={16} />\n {date ? format(date, 'MM/dd/yyyy') : 'Select a date'}\n </div>\n </PopoverTrigger>\n <PopoverContent ref={ref}>\n <Calendar\n mode=\"single\"\n selected={date || undefined}\n onSelect={handleDateSelect}\n captionLayout=\"dropdown\"\n showOutsideDays={true}\n className={classNames?.calendar}\n />\n </PopoverContent>\n </Popover>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\n\nconst datePickerStyle = cva([\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-full',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n 'text-grey-80 border',\n 'font-normal',\n])\n","'use client'\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverContent, PopoverTrigger }\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport * as React from 'react'\nimport { DayPicker } from 'react-day-picker'\n\nimport { buttonVariants } from '@/components/ui/buttonShadcn'\nimport { cn } from '@/lib/utils'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\nfunction Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn('p-3', className)}\n classNames={{\n months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',\n month: 'space-y-4',\n caption: 'flex justify-center pt-1 relative items-center',\n caption_label: 'text-sm font-medium',\n nav: 'space-x-1 flex items-center',\n nav_button: cn(\n buttonVariants({ variant: 'outline' }),\n 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'\n ),\n nav_button_previous: 'absolute left-1',\n nav_button_next: 'absolute right-1',\n table: 'w-full border-collapse space-y-1',\n head_row: 'flex',\n head_cell:\n 'text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400',\n row: 'flex w-full mt-2',\n cell: cn(\n 'relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-outside)]:bg-neutral-100/50 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800 dark:[&:has([aria-selected].day-outside)]:bg-neutral-800/50',\n props.mode === 'range'\n ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'\n : '[&:has([aria-selected])]:rounded-md'\n ),\n day: cn(\n buttonVariants({ variant: 'ghost' }),\n 'h-8 w-8 p-0 font-normal aria-selected:opacity-100'\n ),\n day_range_start: 'day-range-start',\n day_range_end: 'day-range-end',\n day_selected:\n 'bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900',\n day_today: 'bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50',\n day_outside:\n 'day-outside text-neutral-500 aria-selected:bg-neutral-100/50 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:bg-neutral-800/50 dark:aria-selected:text-neutral-400',\n day_disabled: 'text-neutral-500 opacity-50 dark:text-neutral-400',\n day_range_middle:\n 'aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50',\n day_hidden: 'invisible',\n ...classNames,\n }}\n components={{\n IconLeft: ({ className, ...props }) => (\n <ChevronLeft className={cn('h-4 w-4', className)} {...props} />\n ),\n IconRight: ({ className, ...props }) => (\n <ChevronRight className={cn('h-4 w-4', className)} {...props} />\n ),\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = 'Calendar'\n\nexport { Calendar }\n","import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n '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',\n {\n variants: {\n variant: {\n default:\n 'bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90',\n destructive:\n 'bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90',\n outline:\n 'border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50',\n secondary:\n 'bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80',\n ghost:\n 'hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50',\n link: 'text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\"> *</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAoB;AACpB,sBAAuB;AACvB,IAAAA,uBAAyC;AACzC,mBAAgD;;;ACHhD,uBAAkC;AAClC,IAAAC,SAAuB;;;ACHvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,qCAAkB,yBAAjB,MACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACF,CACD;AACD,eAAe,cAA+B,yBAAQ;;;AE1BtD,0BAA0C;AAC1C,IAAAC,SAAuB;AACvB,8BAA0B;;;ACJ1B,wBAAqB;AACrB,sCAAuC;AACvC,IAAAC,SAAuB;AAIvB,IAAM,qBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QAC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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;","names":["import_lucide_react","React","React","React","className","props","import_lucide_react","React","CalendarIcon"]}
|
|
@@ -8,7 +8,7 @@ import { forwardRef as forwardRef4, useEffect, useState } from "react";
|
|
|
8
8
|
|
|
9
9
|
// src/components/primitives/popover.tsx
|
|
10
10
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
11
|
-
import * as
|
|
11
|
+
import * as React2 from "react";
|
|
12
12
|
|
|
13
13
|
// src/lib/utils.ts
|
|
14
14
|
import { clsx } from "clsx";
|
|
@@ -18,10 +18,9 @@ function cn(...inputs) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// src/components/primitives/popover.tsx
|
|
21
|
-
import { jsx } from "react/jsx-runtime";
|
|
22
21
|
var Popover = PopoverPrimitive.Root;
|
|
23
22
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
24
|
-
var PopoverContent =
|
|
23
|
+
var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(
|
|
25
24
|
PopoverPrimitive.Content,
|
|
26
25
|
{
|
|
27
26
|
ref,
|
|
@@ -33,18 +32,18 @@ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset
|
|
|
33
32
|
),
|
|
34
33
|
...props
|
|
35
34
|
}
|
|
36
|
-
)
|
|
35
|
+
)));
|
|
37
36
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
38
37
|
|
|
39
38
|
// src/components/ui/calendar.tsx
|
|
40
39
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
40
|
+
import * as React4 from "react";
|
|
41
41
|
import { DayPicker } from "react-day-picker";
|
|
42
42
|
|
|
43
43
|
// src/components/ui/buttonShadcn.tsx
|
|
44
44
|
import { Slot } from "@radix-ui/react-slot";
|
|
45
45
|
import { cva } from "class-variance-authority";
|
|
46
|
-
import * as
|
|
47
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
46
|
+
import * as React3 from "react";
|
|
48
47
|
var buttonVariants = cva(
|
|
49
48
|
"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",
|
|
50
49
|
{
|
|
@@ -70,18 +69,17 @@ var buttonVariants = cva(
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
);
|
|
73
|
-
var Button =
|
|
72
|
+
var Button = React3.forwardRef(
|
|
74
73
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
75
74
|
const Comp = asChild ? Slot : "button";
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ React3.createElement(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
77
76
|
}
|
|
78
77
|
);
|
|
79
78
|
Button.displayName = "Button";
|
|
80
79
|
|
|
81
80
|
// src/components/ui/calendar.tsx
|
|
82
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
83
81
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
84
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ React4.createElement(
|
|
85
83
|
DayPicker,
|
|
86
84
|
{
|
|
87
85
|
showOutsideDays,
|
|
@@ -121,8 +119,8 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
121
119
|
...classNames
|
|
122
120
|
},
|
|
123
121
|
components: {
|
|
124
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
125
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */
|
|
122
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ React4.createElement(ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
123
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ React4.createElement(ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
126
124
|
},
|
|
127
125
|
...props
|
|
128
126
|
}
|
|
@@ -131,10 +129,9 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
131
129
|
Calendar.displayName = "Calendar";
|
|
132
130
|
|
|
133
131
|
// src/components/ui/ErrorMessage.tsx
|
|
134
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
135
132
|
function ErrorMessage({ message, className, ...props }) {
|
|
136
133
|
if (!message) return null;
|
|
137
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
138
135
|
}
|
|
139
136
|
var ErrorMessage_default = ErrorMessage;
|
|
140
137
|
|
|
@@ -143,12 +140,11 @@ import { InfoIcon } from "lucide-react";
|
|
|
143
140
|
|
|
144
141
|
// src/components/primitives/tooltip.tsx
|
|
145
142
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
146
|
-
import * as
|
|
147
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
143
|
+
import * as React5 from "react";
|
|
148
144
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
149
145
|
var Tooltip = TooltipPrimitive.Root;
|
|
150
146
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
151
|
-
var TooltipContent =
|
|
147
|
+
var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
152
148
|
TooltipPrimitive.Content,
|
|
153
149
|
{
|
|
154
150
|
ref,
|
|
@@ -163,34 +159,24 @@ var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
163
159
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
164
160
|
|
|
165
161
|
// src/components/ui/Label.tsx
|
|
166
|
-
import { jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
167
162
|
function Label({ text, required, description, className, ...props }) {
|
|
168
163
|
if (!text) return null;
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
!!description && /* @__PURE__ */ jsx6(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
185
|
-
/* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(InfoIcon, { className: "h-4 w-4" }) }),
|
|
186
|
-
/* @__PURE__ */ jsx6(TooltipContent, { className: "max-w-48", children: description })
|
|
187
|
-
] }) })
|
|
188
|
-
] });
|
|
164
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
165
|
+
"label",
|
|
166
|
+
{
|
|
167
|
+
className: cn(
|
|
168
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
169
|
+
className
|
|
170
|
+
),
|
|
171
|
+
...props
|
|
172
|
+
},
|
|
173
|
+
text,
|
|
174
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
175
|
+
), !!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))));
|
|
189
176
|
}
|
|
190
177
|
var Label_default = Label;
|
|
191
178
|
|
|
192
179
|
// src/components/ui/DatePicker.tsx
|
|
193
|
-
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
194
180
|
var DatePicker = forwardRef4(
|
|
195
181
|
({ label, description, required, classNames, value, onChange, error, id, testId }, ref) => {
|
|
196
182
|
const [date, setDate] = useState(null);
|
|
@@ -202,35 +188,25 @@ var DatePicker = forwardRef4(
|
|
|
202
188
|
onChange?.(dateSelected);
|
|
203
189
|
setDate(dateSelected);
|
|
204
190
|
};
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
selected: date || void 0,
|
|
225
|
-
onSelect: handleDateSelect,
|
|
226
|
-
captionLayout: "dropdown",
|
|
227
|
-
showOutsideDays: true,
|
|
228
|
-
className: classNames?.calendar
|
|
229
|
-
}
|
|
230
|
-
) })
|
|
231
|
-
] }),
|
|
232
|
-
/* @__PURE__ */ jsx7(ErrorMessage_default, { message: error })
|
|
233
|
-
] });
|
|
191
|
+
return /* @__PURE__ */ React.createElement("div", { id, className: cn("flex w-auto flex-col gap-1") }, label && /* @__PURE__ */ React.createElement(
|
|
192
|
+
Label_default,
|
|
193
|
+
{
|
|
194
|
+
text: label,
|
|
195
|
+
required,
|
|
196
|
+
description,
|
|
197
|
+
className: classNames?.label
|
|
198
|
+
}
|
|
199
|
+
), /* @__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(
|
|
200
|
+
Calendar,
|
|
201
|
+
{
|
|
202
|
+
mode: "single",
|
|
203
|
+
selected: date || void 0,
|
|
204
|
+
onSelect: handleDateSelect,
|
|
205
|
+
captionLayout: "dropdown",
|
|
206
|
+
showOutsideDays: true,
|
|
207
|
+
className: classNames?.calendar
|
|
208
|
+
}
|
|
209
|
+
))), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
234
210
|
}
|
|
235
211
|
);
|
|
236
212
|
var datePickerStyle = cva2([
|