@next-degree/pickle-shared-js 0.12.7 → 0.13.1
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-ByIKe90u.d.cts} +560 -560
- package/dist/{company_service_sanity-KaAGfnNV.d.ts → company_service_sanity-DbYwWmnS.d.ts} +560 -560
- 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 +1 -2
- package/dist/components/ui/Chip.d.ts +1 -2
- 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 +138 -172
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.js +132 -166
- 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.d.cts +1 -1
- package/dist/components/ui/buttonShadcn.d.ts +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-Ce_aqgGP.d.ts} +2 -2
- package/dist/{displayText-DW0qiJqh.d.cts → displayText-Cm8PqS6s.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 +1343 -1111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1293 -1061
- package/dist/index.js.map +1 -1
- package/dist/{job_posting_service_sanity-BKo9TBDT.d.ts → job_posting_service_sanity-1eG3Jh9_.d.ts} +496 -496
- package/dist/{job_posting_service_sanity-BNq-Am9N.d.cts → job_posting_service_sanity-DKYye6oH.d.cts} +496 -496
- 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 +179 -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 +5 -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-BjyG4KCB.d.cts} +319 -319
- package/dist/{company_service_latest-CITz7F53.d.ts → company_service_latest-BjyG4KCB.d.ts} +319 -319
- package/dist/{company_service_latest-C7Moeufo.d.cts → company_service_latest-KJi2W9Ij.d.cts} +319 -319
- package/dist/{company_service_latest-C7Moeufo.d.ts → company_service_latest-KJi2W9Ij.d.ts} +319 -319
- package/dist/{job_posting_service_latest-DdgK8Nnz.d.cts → job_posting_service_latest-82DHqOGu.d.cts} +274 -274
- package/dist/{job_posting_service_latest-DdgK8Nnz.d.ts → job_posting_service_latest-82DHqOGu.d.ts} +274 -274
- package/dist/{job_posting_service_latest-C_TEBzCf.d.cts → job_posting_service_latest-D9I5NE7l.d.cts} +274 -274
- package/dist/{job_posting_service_latest-C_TEBzCf.d.ts → job_posting_service_latest-D9I5NE7l.d.ts} +274 -274
- package/dist/{shared_pickle_output_latest-CtvHTPeX.d.cts → shared_pickle_output_latest-YbRs_xtC.d.cts} +22 -22
- package/dist/{shared_pickle_output_latest-CtvHTPeX.d.ts → shared_pickle_output_latest-YbRs_xtC.d.ts} +22 -22
- package/dist/{shared_pickle_output_latest-CXBCG04N.d.cts → shared_pickle_output_latest-dO-t8iZx.d.cts} +22 -22
- package/dist/{shared_pickle_output_latest-CXBCG04N.d.ts → shared_pickle_output_latest-dO-t8iZx.d.ts} +22 -22
|
@@ -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, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"mappings":";;;AAEA,SAAS,OAAAA,YAAW;AACpB,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoB;AACzC,SAAS,cAAAC,aAAY,WAAW,gBAAgB;;;ACHhD,YAAY,sBAAsB;AAClC,YAAY,WAAW;;;ACHvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADWI;AATJ,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,U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AAC,aAAc;AACnB,iBAAW,YAAY;AACvB,cAAQ,YAAY;AAAA,IACtB;AAEA,WACE,gBAAAD,MAAC,SAAI,IAAQ,WAAW,GAAG,4BAA4B,GACpD;AAAA,eACC,gBAAAD;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA,WAAW,YAAY;AAAA;AAAA,MACzB;AAAA,MAEF,gBAAAC,MAAC,WACC;AAAA,wBAAAD,KAAC,kBAAe,eAAa,QAC3B,0BAAAC,MAAC,SAAI,WAAW,GAAG,gBAAgB,GAAG,YAAY,KAAK,GACrD;AAAA,0BAAAD,KAAC,gBAAa,MAAM,IAAI;AAAA,UACvB,OAAO,OAAO,MAAM,YAAY,IAAI;AAAA,WACvC,GACF;AAAA,QACA,gBAAAA,KAAC,kBAAe,KACd,0BAAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAU,QAAQ;AAAA,YAClB,UAAU;AAAA,YACV,eAAc;AAAA,YACd,iBAAiB;AAAA,YACjB,WAAW,YAAY;AAAA;AAAA,QACzB,GACF;AAAA,SACF;AAAA,MAEA,gBAAAA,KAAC,wBAAa,SAAS,OAAO;AAAA,OAChC;AAAA,EAEJ;AACF;AAEA,IAAM,kBAAkBG,KAAI;AAAA,EAC1B;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;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":["cva","forwardRef","React","jsx","jsx","className","props","jsx","React","jsx","jsx","jsx","jsxs","forwardRef","cva"]}
|
|
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":";;;AA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;AACd,cAAQ,SAAS,IAAI;AAAA,IACvB,GAAG,CAAC,KAAK,CAAC;AAEV,UAAM,mBAAmB,CAAC,iBAAmC;AAC3D,UAAI,CAAC,aAAc;AACnB,iBAAW,YAAY;AACvB,cAAQ,YAAY;AAAA,IACtB;AAEA,WACE,oCAAC,SAAI,IAAQ,WAAW,GAAG,4BAA4B,KACpD,SACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,WAAW,YAAY;AAAA;AAAA,IACzB,GAEF,oCAAC,eACC,oCAAC,kBAAe,eAAa,UAC3B,oCAAC,SAAI,WAAW,GAAG,gBAAgB,GAAG,YAAY,KAAK,KACrD,oCAAC,gBAAa,MAAM,IAAI,GACvB,OAAO,OAAO,MAAM,YAAY,IAAI,eACvC,CACF,GACA,oCAAC,kBAAe,OACd;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,QAAQ;AAAA,QAClB,UAAU;AAAA,QACV,eAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,WAAW,YAAY;AAAA;AAAA,IACzB,CACF,CACF,GAEA,oCAAC,wBAAa,SAAS,OAAO,CAChC;AAAA,EAEJ;AACF;AAEA,IAAM,kBAAkBC,KAAI;AAAA,EAC1B;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;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":["cva","forwardRef","React","React","React","className","props","React","forwardRef","cva"]}
|
|
@@ -34,7 +34,6 @@ function cn(...inputs) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// src/components/ui/DismissibleBanner.tsx
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
37
|
function DismissibleBanner({
|
|
39
38
|
children,
|
|
40
39
|
cookieId,
|
|
@@ -56,26 +55,24 @@ function DismissibleBanner({
|
|
|
56
55
|
setIsVisible(false);
|
|
57
56
|
};
|
|
58
57
|
if (!isVisible) return null;
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ React.createElement(
|
|
60
59
|
"nav",
|
|
61
60
|
{
|
|
62
61
|
className: cn(
|
|
63
62
|
"align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3",
|
|
64
63
|
className
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]
|
|
78
|
-
}
|
|
64
|
+
)
|
|
65
|
+
},
|
|
66
|
+
/* @__PURE__ */ React.createElement("div", { className: cn("w-full text-center text-sm text-green-100", textClassNames) }, children),
|
|
67
|
+
/* @__PURE__ */ React.createElement(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
className: cn("text-green-100", buttonClassNames),
|
|
71
|
+
"aria-label": "Close banner",
|
|
72
|
+
onClick: handleDismiss
|
|
73
|
+
},
|
|
74
|
+
/* @__PURE__ */ React.createElement(import_lucide_react.X, { size: 28 })
|
|
75
|
+
)
|
|
79
76
|
);
|
|
80
77
|
}
|
|
81
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/DismissibleBanner.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { X } from 'lucide-react'\nimport { useEffect, useState } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DismissibleBannerProps = {\n cookieId: string\n className?: string\n textClassNames?: string\n buttonClassNames?: string\n} & React.PropsWithChildren\n\nexport function DismissibleBanner({\n children,\n cookieId,\n className,\n textClassNames,\n buttonClassNames,\n}: DismissibleBannerProps) {\n const safeId = encodeURIComponent(cookieId)\n const [isVisible, setIsVisible] = useState(false)\n\n useEffect(() => {\n const cookies = document.cookie.split(';')\n const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`))\n if (!isDismissed) {\n setIsVisible(true)\n }\n }, [safeId])\n\n const handleDismiss = () => {\n document.cookie = `${safeId}=true;path=/`\n setIsVisible(false)\n }\n\n if (!isVisible) return null\n\n return (\n <nav\n className={cn(\n 'align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3',\n className\n )}\n >\n <div className={cn('w-full text-center text-sm text-green-100', textClassNames)}>\n {children}\n </div>\n <button\n className={cn('text-green-100', buttonClassNames)}\n aria-label=\"Close banner\"\n onClick={handleDismiss}\n >\n <X size={28} />\n </button>\n </nav>\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAkB;AAClB,mBAAoC;;;ACDpC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/DismissibleBanner.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { X } from 'lucide-react'\nimport { useEffect, useState } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DismissibleBannerProps = {\n cookieId: string\n className?: string\n textClassNames?: string\n buttonClassNames?: string\n} & React.PropsWithChildren\n\nexport function DismissibleBanner({\n children,\n cookieId,\n className,\n textClassNames,\n buttonClassNames,\n}: DismissibleBannerProps) {\n const safeId = encodeURIComponent(cookieId)\n const [isVisible, setIsVisible] = useState(false)\n\n useEffect(() => {\n const cookies = document.cookie.split(';')\n const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`))\n if (!isDismissed) {\n setIsVisible(true)\n }\n }, [safeId])\n\n const handleDismiss = () => {\n document.cookie = `${safeId}=true;path=/`\n setIsVisible(false)\n }\n\n if (!isVisible) return null\n\n return (\n <nav\n className={cn(\n 'align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3',\n className\n )}\n >\n <div className={cn('w-full text-center text-sm text-green-100', textClassNames)}>\n {children}\n </div>\n <button\n className={cn('text-green-100', buttonClassNames)}\n aria-label=\"Close banner\"\n onClick={handleDismiss}\n >\n <X size={28} />\n </button>\n </nav>\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAkB;AAClB,mBAAoC;;;ACDpC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADOO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,QAAM,SAAS,mBAAmB,QAAQ;AAC1C,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,KAAK;AAEhD,8BAAU,MAAM;AACd,UAAM,UAAU,SAAS,OAAO,MAAM,GAAG;AACzC,UAAM,cAAc,QAAQ,KAAK,CAAC,WAAW,OAAO,KAAK,EAAE,WAAW,GAAG,MAAM,OAAO,CAAC;AACvF,QAAI,CAAC,aAAa;AAChB,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,QAAM,gBAAgB,MAAM;AAC1B,aAAS,SAAS,GAAG,MAAM;AAC3B,iBAAa,KAAK;AAAA,EACpB;AAEA,MAAI,CAAC,UAAW,QAAO;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA;AAAA,IAEA,oCAAC,SAAI,WAAW,GAAG,6CAA6C,cAAc,KAC3E,QACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,kBAAkB,gBAAgB;AAAA,QAChD,cAAW;AAAA,QACX,SAAS;AAAA;AAAA,MAET,oCAAC,yBAAE,MAAM,IAAI;AAAA,IACf;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
3
|
type DismissibleBannerProps = {
|
|
4
4
|
cookieId: string;
|
|
@@ -6,6 +6,6 @@ type DismissibleBannerProps = {
|
|
|
6
6
|
textClassNames?: string;
|
|
7
7
|
buttonClassNames?: string;
|
|
8
8
|
} & React.PropsWithChildren;
|
|
9
|
-
declare function DismissibleBanner({ children, cookieId, className, textClassNames, buttonClassNames, }: DismissibleBannerProps):
|
|
9
|
+
declare function DismissibleBanner({ children, cookieId, className, textClassNames, buttonClassNames, }: DismissibleBannerProps): React$1.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { DismissibleBanner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
3
|
type DismissibleBannerProps = {
|
|
4
4
|
cookieId: string;
|
|
@@ -6,6 +6,6 @@ type DismissibleBannerProps = {
|
|
|
6
6
|
textClassNames?: string;
|
|
7
7
|
buttonClassNames?: string;
|
|
8
8
|
} & React.PropsWithChildren;
|
|
9
|
-
declare function DismissibleBanner({ children, cookieId, className, textClassNames, buttonClassNames, }: DismissibleBannerProps):
|
|
9
|
+
declare function DismissibleBanner({ children, cookieId, className, textClassNames, buttonClassNames, }: DismissibleBannerProps): React$1.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { DismissibleBanner };
|
|
@@ -10,7 +10,6 @@ function cn(...inputs) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// src/components/ui/DismissibleBanner.tsx
|
|
13
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
function DismissibleBanner({
|
|
15
14
|
children,
|
|
16
15
|
cookieId,
|
|
@@ -32,26 +31,24 @@ function DismissibleBanner({
|
|
|
32
31
|
setIsVisible(false);
|
|
33
32
|
};
|
|
34
33
|
if (!isVisible) return null;
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ React.createElement(
|
|
36
35
|
"nav",
|
|
37
36
|
{
|
|
38
37
|
className: cn(
|
|
39
38
|
"align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3",
|
|
40
39
|
className
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]
|
|
54
|
-
}
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
/* @__PURE__ */ React.createElement("div", { className: cn("w-full text-center text-sm text-green-100", textClassNames) }, children),
|
|
43
|
+
/* @__PURE__ */ React.createElement(
|
|
44
|
+
"button",
|
|
45
|
+
{
|
|
46
|
+
className: cn("text-green-100", buttonClassNames),
|
|
47
|
+
"aria-label": "Close banner",
|
|
48
|
+
onClick: handleDismiss
|
|
49
|
+
},
|
|
50
|
+
/* @__PURE__ */ React.createElement(X, { size: 28 })
|
|
51
|
+
)
|
|
55
52
|
);
|
|
56
53
|
}
|
|
57
54
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/DismissibleBanner.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { X } from 'lucide-react'\nimport { useEffect, useState } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DismissibleBannerProps = {\n cookieId: string\n className?: string\n textClassNames?: string\n buttonClassNames?: string\n} & React.PropsWithChildren\n\nexport function DismissibleBanner({\n children,\n cookieId,\n className,\n textClassNames,\n buttonClassNames,\n}: DismissibleBannerProps) {\n const safeId = encodeURIComponent(cookieId)\n const [isVisible, setIsVisible] = useState(false)\n\n useEffect(() => {\n const cookies = document.cookie.split(';')\n const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`))\n if (!isDismissed) {\n setIsVisible(true)\n }\n }, [safeId])\n\n const handleDismiss = () => {\n document.cookie = `${safeId}=true;path=/`\n setIsVisible(false)\n }\n\n if (!isVisible) return null\n\n return (\n <nav\n className={cn(\n 'align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3',\n className\n )}\n >\n <div className={cn('w-full text-center text-sm text-green-100', textClassNames)}>\n {children}\n </div>\n <button\n className={cn('text-green-100', buttonClassNames)}\n aria-label=\"Close banner\"\n onClick={handleDismiss}\n >\n <X size={28} />\n </button>\n </nav>\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"],"mappings":";AAAA,SAAS,SAAS;AAClB,SAAS,WAAW,gBAAgB;;;ACDpC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/DismissibleBanner.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { X } from 'lucide-react'\nimport { useEffect, useState } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DismissibleBannerProps = {\n cookieId: string\n className?: string\n textClassNames?: string\n buttonClassNames?: string\n} & React.PropsWithChildren\n\nexport function DismissibleBanner({\n children,\n cookieId,\n className,\n textClassNames,\n buttonClassNames,\n}: DismissibleBannerProps) {\n const safeId = encodeURIComponent(cookieId)\n const [isVisible, setIsVisible] = useState(false)\n\n useEffect(() => {\n const cookies = document.cookie.split(';')\n const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`))\n if (!isDismissed) {\n setIsVisible(true)\n }\n }, [safeId])\n\n const handleDismiss = () => {\n document.cookie = `${safeId}=true;path=/`\n setIsVisible(false)\n }\n\n if (!isVisible) return null\n\n return (\n <nav\n className={cn(\n 'align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3',\n className\n )}\n >\n <div className={cn('w-full text-center text-sm text-green-100', textClassNames)}>\n {children}\n </div>\n <button\n className={cn('text-green-100', buttonClassNames)}\n aria-label=\"Close banner\"\n onClick={handleDismiss}\n >\n <X size={28} />\n </button>\n </nav>\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"],"mappings":";AAAA,SAAS,SAAS;AAClB,SAAS,WAAW,gBAAgB;;;ACDpC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADOO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,QAAM,SAAS,mBAAmB,QAAQ;AAC1C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,YAAU,MAAM;AACd,UAAM,UAAU,SAAS,OAAO,MAAM,GAAG;AACzC,UAAM,cAAc,QAAQ,KAAK,CAAC,WAAW,OAAO,KAAK,EAAE,WAAW,GAAG,MAAM,OAAO,CAAC;AACvF,QAAI,CAAC,aAAa;AAChB,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,QAAM,gBAAgB,MAAM;AAC1B,aAAS,SAAS,GAAG,MAAM;AAC3B,iBAAa,KAAK;AAAA,EACpB;AAEA,MAAI,CAAC,UAAW,QAAO;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA;AAAA,IAEA,oCAAC,SAAI,WAAW,GAAG,6CAA6C,cAAc,KAC3E,QACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,kBAAkB,gBAAgB;AAAA,QAChD,cAAW;AAAA,QACX,SAAS;AAAA;AAAA,MAET,oCAAC,KAAE,MAAM,IAAI;AAAA,IACf;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -32,10 +32,9 @@ function cn(...inputs) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// src/components/ui/ErrorMessage.tsx
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
35
|
function ErrorMessage({ message, className, ...props }) {
|
|
37
36
|
if (!message) return null;
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
39
38
|
}
|
|
40
39
|
var ErrorMessage_default = ErrorMessage;
|
|
41
40
|
//# sourceMappingURL=ErrorMessage.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/ErrorMessage.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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 { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/ErrorMessage.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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 { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADGA,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;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'p'> {
|
|
5
5
|
message?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function ErrorMessage({ message, className, ...props }: Readonly<Props>):
|
|
7
|
+
declare function ErrorMessage({ message, className, ...props }: Readonly<Props>): React.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { ErrorMessage as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'p'> {
|
|
5
5
|
message?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function ErrorMessage({ message, className, ...props }: Readonly<Props>):
|
|
7
|
+
declare function ErrorMessage({ message, className, ...props }: Readonly<Props>): React.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { ErrorMessage as default };
|
|
@@ -6,10 +6,9 @@ function cn(...inputs) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
// src/components/ui/ErrorMessage.tsx
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
9
|
function ErrorMessage({ message, className, ...props }) {
|
|
11
10
|
if (!message) return null;
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
13
12
|
}
|
|
14
13
|
var ErrorMessage_default = ErrorMessage;
|
|
15
14
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["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"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["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"],"mappings":";AAAA,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;","names":[]}
|
|
@@ -36,11 +36,10 @@ function cn(...inputs) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// src/components/ui/Icon.tsx
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
39
|
var Icon = (0, import_react.forwardRef)(
|
|
41
40
|
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
42
41
|
const Component = readonly ? import_react_slot.Slot : "button";
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ React.createElement(
|
|
44
43
|
Component,
|
|
45
44
|
{
|
|
46
45
|
className: cn(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Icon.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport { forwardRef } from 'react'\nimport { twMerge } from 'tailwind-merge'\n\nimport { cn } from '@/lib/utils'\n\ninterface IconProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconVariants> {\n active?: boolean\n readonly?: boolean\n}\n\nexport const Icon = forwardRef<HTMLButtonElement, IconProps>(\n ({ variant, size, active = false, readonly = false, className, ...props }, ref) => {\n const Component = readonly ? Slot : 'button'\n return (\n <Component\n className={cn(\n twMerge(iconVariants({ variant: active ? 'active' : variant, size })),\n className\n )}\n {...props}\n ref={ref}\n />\n )\n }\n)\n\nIcon.displayName = 'Icon'\n\nconst iconVariants = cva(\n [\n 'inline-flex',\n 'items-center',\n 'rounded-full',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n 'disabled:text-grey-40',\n 'disabled:bg-transparent',\n 'disabled:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n filled: [\n 'border',\n 'border-green-80',\n 'bg-green-90',\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-80',\n 'focus:outline-pickle-100',\n 'disabled:bg-green-70',\n ],\n transparent: [\n 'text-black',\n 'hover:bg-grey-5',\n 'active:bg-grey-10',\n 'focus:outline-purple-100',\n ],\n tonal: [\n 'border',\n 'border-grey-5',\n 'hover:border-grey-10',\n 'active:border-grey-20',\n 'focus:outline-purple-100',\n ],\n active: ['text-black', 'bg-pickle-100'],\n },\n size: {\n small: ['h-10', 'w-10', 'p-3'],\n medium: ['h-12', 'w-12', 'p-4'],\n large: ['h-14', 'w-14', 'p-4'],\n },\n },\n defaultVariants: {\n variant: 'filled',\n size: 'medium',\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAqB;AACrB,iBAAuC;AACvC,mBAA2B;AAC3B,IAAAA,yBAAwB;;;ACHxB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Icon.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport { forwardRef } from 'react'\nimport { twMerge } from 'tailwind-merge'\n\nimport { cn } from '@/lib/utils'\n\ninterface IconProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconVariants> {\n active?: boolean\n readonly?: boolean\n}\n\nexport const Icon = forwardRef<HTMLButtonElement, IconProps>(\n ({ variant, size, active = false, readonly = false, className, ...props }, ref) => {\n const Component = readonly ? Slot : 'button'\n return (\n <Component\n className={cn(\n twMerge(iconVariants({ variant: active ? 'active' : variant, size })),\n className\n )}\n {...props}\n ref={ref}\n />\n )\n }\n)\n\nIcon.displayName = 'Icon'\n\nconst iconVariants = cva(\n [\n 'inline-flex',\n 'items-center',\n 'rounded-full',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n 'disabled:text-grey-40',\n 'disabled:bg-transparent',\n 'disabled:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n filled: [\n 'border',\n 'border-green-80',\n 'bg-green-90',\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-80',\n 'focus:outline-pickle-100',\n 'disabled:bg-green-70',\n ],\n transparent: [\n 'text-black',\n 'hover:bg-grey-5',\n 'active:bg-grey-10',\n 'focus:outline-purple-100',\n ],\n tonal: [\n 'border',\n 'border-grey-5',\n 'hover:border-grey-10',\n 'active:border-grey-20',\n 'focus:outline-purple-100',\n ],\n active: ['text-black', 'bg-pickle-100'],\n },\n size: {\n small: ['h-10', 'w-10', 'p-3'],\n medium: ['h-12', 'w-12', 'p-4'],\n large: ['h-14', 'w-14', 'p-4'],\n },\n },\n defaultVariants: {\n variant: 'filled',\n size: 'medium',\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAqB;AACrB,iBAAuC;AACvC,mBAA2B;AAC3B,IAAAA,yBAAwB;;;ACHxB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADSO,IAAM,WAAO;AAAA,EAClB,CAAC,EAAE,SAAS,MAAM,SAAS,OAAO,WAAW,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AACjF,UAAM,YAAY,WAAW,yBAAO;AACpC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,cACT,gCAAQ,aAAa,EAAE,SAAS,SAAS,WAAW,SAAS,KAAK,CAAC,CAAC;AAAA,UACpE;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QACJ;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,KAAK,cAAc;AAEnB,IAAM,mBAAe;AAAA,EACnB;AAAA,IACE;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,SAAS;AAAA,QACP,QAAQ;AAAA,UACN;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,aAAa;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,QAAQ,CAAC,cAAc,eAAe;AAAA,MACxC;AAAA,MACA,MAAM;AAAA,QACJ,OAAO,CAAC,QAAQ,QAAQ,KAAK;AAAA,QAC7B,QAAQ,CAAC,QAAQ,QAAQ,KAAK;AAAA,QAC9B,OAAO,CAAC,QAAQ,QAAQ,KAAK;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["import_tailwind_merge"]}
|
|
@@ -12,11 +12,10 @@ function cn(...inputs) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// src/components/ui/Icon.tsx
|
|
15
|
-
import { jsx } from "react/jsx-runtime";
|
|
16
15
|
var Icon = forwardRef(
|
|
17
16
|
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
18
17
|
const Component = readonly ? Slot : "button";
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ React.createElement(
|
|
20
19
|
Component,
|
|
21
20
|
{
|
|
22
21
|
className: cn(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Icon.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport { forwardRef } from 'react'\nimport { twMerge } from 'tailwind-merge'\n\nimport { cn } from '@/lib/utils'\n\ninterface IconProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconVariants> {\n active?: boolean\n readonly?: boolean\n}\n\nexport const Icon = forwardRef<HTMLButtonElement, IconProps>(\n ({ variant, size, active = false, readonly = false, className, ...props }, ref) => {\n const Component = readonly ? Slot : 'button'\n return (\n <Component\n className={cn(\n twMerge(iconVariants({ variant: active ? 'active' : variant, size })),\n className\n )}\n {...props}\n ref={ref}\n />\n )\n }\n)\n\nIcon.displayName = 'Icon'\n\nconst iconVariants = cva(\n [\n 'inline-flex',\n 'items-center',\n 'rounded-full',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n 'disabled:text-grey-40',\n 'disabled:bg-transparent',\n 'disabled:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n filled: [\n 'border',\n 'border-green-80',\n 'bg-green-90',\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-80',\n 'focus:outline-pickle-100',\n 'disabled:bg-green-70',\n ],\n transparent: [\n 'text-black',\n 'hover:bg-grey-5',\n 'active:bg-grey-10',\n 'focus:outline-purple-100',\n ],\n tonal: [\n 'border',\n 'border-grey-5',\n 'hover:border-grey-10',\n 'active:border-grey-20',\n 'focus:outline-purple-100',\n ],\n active: ['text-black', 'bg-pickle-100'],\n },\n size: {\n small: ['h-10', 'w-10', 'p-3'],\n medium: ['h-12', 'w-12', 'p-4'],\n large: ['h-14', 'w-14', 'p-4'],\n },\n },\n defaultVariants: {\n variant: 'filled',\n size: 'medium',\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"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,WAAAA,gBAAe;;;ACHxB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Icon.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport { forwardRef } from 'react'\nimport { twMerge } from 'tailwind-merge'\n\nimport { cn } from '@/lib/utils'\n\ninterface IconProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconVariants> {\n active?: boolean\n readonly?: boolean\n}\n\nexport const Icon = forwardRef<HTMLButtonElement, IconProps>(\n ({ variant, size, active = false, readonly = false, className, ...props }, ref) => {\n const Component = readonly ? Slot : 'button'\n return (\n <Component\n className={cn(\n twMerge(iconVariants({ variant: active ? 'active' : variant, size })),\n className\n )}\n {...props}\n ref={ref}\n />\n )\n }\n)\n\nIcon.displayName = 'Icon'\n\nconst iconVariants = cva(\n [\n 'inline-flex',\n 'items-center',\n 'rounded-full',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n 'disabled:text-grey-40',\n 'disabled:bg-transparent',\n 'disabled:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n filled: [\n 'border',\n 'border-green-80',\n 'bg-green-90',\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-80',\n 'focus:outline-pickle-100',\n 'disabled:bg-green-70',\n ],\n transparent: [\n 'text-black',\n 'hover:bg-grey-5',\n 'active:bg-grey-10',\n 'focus:outline-purple-100',\n ],\n tonal: [\n 'border',\n 'border-grey-5',\n 'hover:border-grey-10',\n 'active:border-grey-20',\n 'focus:outline-purple-100',\n ],\n active: ['text-black', 'bg-pickle-100'],\n },\n size: {\n small: ['h-10', 'w-10', 'p-3'],\n medium: ['h-12', 'w-12', 'p-4'],\n large: ['h-14', 'w-14', 'p-4'],\n },\n },\n defaultVariants: {\n variant: 'filled',\n size: 'medium',\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"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,SAAS,kBAAkB;AAC3B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MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["twMerge","twMerge"]}
|
|
@@ -45,10 +45,9 @@ function cn(...inputs) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// src/components/ui/ErrorMessage.tsx
|
|
48
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
48
|
function ErrorMessage({ message, className, ...props }) {
|
|
50
49
|
if (!message) return null;
|
|
51
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
52
51
|
}
|
|
53
52
|
var ErrorMessage_default = ErrorMessage;
|
|
54
53
|
|
|
@@ -57,12 +56,11 @@ var import_lucide_react = require("lucide-react");
|
|
|
57
56
|
|
|
58
57
|
// src/components/primitives/tooltip.tsx
|
|
59
58
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
60
|
-
var
|
|
61
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
59
|
+
var React2 = __toESM(require("react"), 1);
|
|
62
60
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
63
61
|
var Tooltip = TooltipPrimitive.Root;
|
|
64
62
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
65
|
-
var TooltipContent =
|
|
63
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
|
66
64
|
TooltipPrimitive.Content,
|
|
67
65
|
{
|
|
68
66
|
ref,
|
|
@@ -77,34 +75,24 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
77
75
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
78
76
|
|
|
79
77
|
// src/components/ui/Label.tsx
|
|
80
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
81
78
|
function Label({ text, required, description, className, ...props }) {
|
|
82
79
|
if (!text) return null;
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
|
|
100
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
101
|
-
] }) })
|
|
102
|
-
] });
|
|
80
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
81
|
+
"label",
|
|
82
|
+
{
|
|
83
|
+
className: cn(
|
|
84
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props
|
|
88
|
+
},
|
|
89
|
+
text,
|
|
90
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
91
|
+
), !!description && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(import_lucide_react.InfoIcon, { className: "h-4 w-4" })), /* @__PURE__ */ React.createElement(TooltipContent, { className: "max-w-48" }, description))));
|
|
103
92
|
}
|
|
104
93
|
var Label_default = Label;
|
|
105
94
|
|
|
106
95
|
// src/components/ui/Input.tsx
|
|
107
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
108
96
|
var Input = (0, import_react.forwardRef)(
|
|
109
97
|
({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
110
98
|
const handleClear = () => {
|
|
@@ -115,47 +103,39 @@ var Input = (0, import_react.forwardRef)(
|
|
|
115
103
|
const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
|
|
116
104
|
const hasIcon = !!icon;
|
|
117
105
|
const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
|
|
118
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
151
|
-
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
152
|
-
onClick: handleClear,
|
|
153
|
-
"data-testid": "clear-button"
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] }),
|
|
157
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorMessage_default, { message: error })
|
|
158
|
-
] });
|
|
106
|
+
return /* @__PURE__ */ React.createElement("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}` }, label && /* @__PURE__ */ React.createElement(
|
|
107
|
+
Label_default,
|
|
108
|
+
{
|
|
109
|
+
text: label,
|
|
110
|
+
htmlFor: props.name,
|
|
111
|
+
required: props.required,
|
|
112
|
+
description,
|
|
113
|
+
className: classNames?.label
|
|
114
|
+
}
|
|
115
|
+
), /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, IconComponent && /* @__PURE__ */ React.createElement(
|
|
116
|
+
IconComponent,
|
|
117
|
+
{
|
|
118
|
+
className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
|
|
119
|
+
}
|
|
120
|
+
), /* @__PURE__ */ React.createElement(
|
|
121
|
+
"input",
|
|
122
|
+
{
|
|
123
|
+
className: cn(inputVariants({ theme, hasIcon })),
|
|
124
|
+
ref,
|
|
125
|
+
placeholder,
|
|
126
|
+
value,
|
|
127
|
+
onChange,
|
|
128
|
+
"data-testid": `input-element-${props.id}`,
|
|
129
|
+
...props
|
|
130
|
+
}
|
|
131
|
+
), hasIcon && value && /* @__PURE__ */ React.createElement(
|
|
132
|
+
import_lucide_react2.X,
|
|
133
|
+
{
|
|
134
|
+
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
135
|
+
onClick: handleClear,
|
|
136
|
+
"data-testid": "clear-button"
|
|
137
|
+
}
|
|
138
|
+
)), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
|
|
159
139
|
}
|
|
160
140
|
);
|
|
161
141
|
Input.displayName = "Input";
|