@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
|
@@ -4,7 +4,7 @@ import { forwardRef as forwardRef3 } from "react";
|
|
|
4
4
|
// src/components/primitives/input-otp.tsx
|
|
5
5
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
6
6
|
import { Dot } from "lucide-react";
|
|
7
|
-
import * as
|
|
7
|
+
import * as React2 from "react";
|
|
8
8
|
|
|
9
9
|
// src/lib/utils.ts
|
|
10
10
|
import { clsx } from "clsx";
|
|
@@ -14,8 +14,7 @@ function cn(...inputs) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// src/components/primitives/input-otp.tsx
|
|
17
|
-
|
|
18
|
-
var InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17
|
+
var InputOTP = React2.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
|
19
18
|
OTPInput,
|
|
20
19
|
{
|
|
21
20
|
ref,
|
|
@@ -28,12 +27,12 @@ var InputOTP = React.forwardRef(({ className, containerClassName, ...props }, re
|
|
|
28
27
|
}
|
|
29
28
|
));
|
|
30
29
|
InputOTP.displayName = "InputOTP";
|
|
31
|
-
var InputOTPGroup =
|
|
30
|
+
var InputOTPGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
32
31
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
33
|
-
var InputOTPSlot =
|
|
34
|
-
const inputOTPContext =
|
|
32
|
+
var InputOTPSlot = React2.forwardRef(({ index, error, className, ...props }, ref) => {
|
|
33
|
+
const inputOTPContext = React2.useContext(OTPInputContext);
|
|
35
34
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ React2.createElement(
|
|
37
36
|
"div",
|
|
38
37
|
{
|
|
39
38
|
ref,
|
|
@@ -43,23 +42,20 @@ var InputOTPSlot = React.forwardRef(({ index, error, className, ...props }, ref)
|
|
|
43
42
|
error && "border-red-500 dark:border-red-400",
|
|
44
43
|
className
|
|
45
44
|
),
|
|
46
|
-
...props
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]
|
|
51
|
-
}
|
|
45
|
+
...props
|
|
46
|
+
},
|
|
47
|
+
char,
|
|
48
|
+
hasFakeCaret && /* @__PURE__ */ React2.createElement("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React2.createElement("div", { className: "h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50" }))
|
|
52
49
|
);
|
|
53
50
|
});
|
|
54
51
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
55
|
-
var InputOTPSeparator =
|
|
52
|
+
var InputOTPSeparator = React2.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React2.createElement(Dot, null)));
|
|
56
53
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
57
54
|
|
|
58
55
|
// src/components/ui/ErrorMessage.tsx
|
|
59
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
60
56
|
function ErrorMessage({ message, className, ...props }) {
|
|
61
57
|
if (!message) return null;
|
|
62
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
|
|
63
59
|
}
|
|
64
60
|
var ErrorMessage_default = ErrorMessage;
|
|
65
61
|
|
|
@@ -68,12 +64,11 @@ import { InfoIcon } from "lucide-react";
|
|
|
68
64
|
|
|
69
65
|
// src/components/primitives/tooltip.tsx
|
|
70
66
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
71
|
-
import * as
|
|
72
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
67
|
+
import * as React3 from "react";
|
|
73
68
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
74
69
|
var Tooltip = TooltipPrimitive.Root;
|
|
75
70
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
76
|
-
var TooltipContent =
|
|
71
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
77
72
|
TooltipPrimitive.Content,
|
|
78
73
|
{
|
|
79
74
|
ref,
|
|
@@ -88,71 +83,59 @@ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
88
83
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
89
84
|
|
|
90
85
|
// src/components/ui/Label.tsx
|
|
91
|
-
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
92
86
|
function Label({ text, required, description, className, ...props }) {
|
|
93
87
|
if (!text) return null;
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
!!description && /* @__PURE__ */ jsx4(TooltipProvider, { children: /* @__PURE__ */ jsxs2(Tooltip, { children: [
|
|
110
|
-
/* @__PURE__ */ jsx4(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx4(InfoIcon, { className: "h-4 w-4" }) }),
|
|
111
|
-
/* @__PURE__ */ jsx4(TooltipContent, { className: "max-w-48", children: description })
|
|
112
|
-
] }) })
|
|
113
|
-
] });
|
|
88
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
89
|
+
"label",
|
|
90
|
+
{
|
|
91
|
+
className: cn(
|
|
92
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
...props
|
|
96
|
+
},
|
|
97
|
+
text,
|
|
98
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
99
|
+
), !!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))));
|
|
114
100
|
}
|
|
115
101
|
var Label_default = Label;
|
|
116
102
|
|
|
117
103
|
// src/components/ui/InputOtp.tsx
|
|
118
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
119
104
|
var InputOtp = forwardRef3(
|
|
120
105
|
({ digits, label, description, error, ...props }, ref) => {
|
|
121
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ React.createElement(
|
|
122
107
|
"div",
|
|
123
108
|
{
|
|
124
109
|
className: "group flex w-full flex-col gap-1",
|
|
125
|
-
"data-testid": `input-otp-wrapper-${props.id}
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
]
|
|
155
|
-
}
|
|
110
|
+
"data-testid": `input-otp-wrapper-${props.id}`
|
|
111
|
+
},
|
|
112
|
+
label && /* @__PURE__ */ React.createElement(
|
|
113
|
+
Label_default,
|
|
114
|
+
{
|
|
115
|
+
text: label,
|
|
116
|
+
htmlFor: props.name,
|
|
117
|
+
required: props.required,
|
|
118
|
+
description
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ React.createElement("div", { className: "relative flex flex-row items-center" }, /* @__PURE__ */ React.createElement(
|
|
122
|
+
InputOTP,
|
|
123
|
+
{
|
|
124
|
+
ref,
|
|
125
|
+
maxLength: digits,
|
|
126
|
+
"data-testid": `input-otp-element-${props.id}`,
|
|
127
|
+
...props
|
|
128
|
+
},
|
|
129
|
+
[...Array(digits)].map((_, index) => /* @__PURE__ */ React.createElement(InputOTPGroup, { key: index }, /* @__PURE__ */ React.createElement(
|
|
130
|
+
InputOTPSlot,
|
|
131
|
+
{
|
|
132
|
+
"data-testid": `input-otp-slot-${index}`,
|
|
133
|
+
index,
|
|
134
|
+
error: Boolean(error)
|
|
135
|
+
}
|
|
136
|
+
)))
|
|
137
|
+
)),
|
|
138
|
+
/* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error })
|
|
156
139
|
);
|
|
157
140
|
}
|
|
158
141
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/InputOtp.tsx","../../../src/components/primitives/input-otp.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { forwardRef, type InputHTMLAttributes } from 'react'\n\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/primitives/input-otp'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\n\ninterface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n digits: 4 | 6 | 8\n value?: string\n label?: string\n description?: string\n error?: string\n onChange?: (v: string) => void\n}\n\nexport const InputOtp = forwardRef<HTMLInputElement, Props>(\n ({ digits, label, description, error, ...props }, ref) => {\n return (\n <div\n className=\"group flex w-full flex-col gap-1\"\n data-testid={`input-otp-wrapper-${props.id}`}\n >\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n />\n )}\n <div className=\"relative flex flex-row items-center\">\n <InputOTP\n ref={ref}\n maxLength={digits}\n data-testid={`input-otp-element-${props.id}`}\n {...props}\n >\n {[...Array(digits)].map((_, index) => (\n <InputOTPGroup key={index}>\n <InputOTPSlot\n data-testid={`input-otp-slot-${index}`}\n index={index}\n error={Boolean(error)}\n />\n </InputOTPGroup>\n ))}\n </InputOTP>\n </div>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nInputOtp.displayName = 'Input'\n","'use client'\n\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport { Dot } from 'lucide-react'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-[:disabled]:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n))\nInputOTP.displayName = 'InputOTP'\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n))\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number; error?: boolean }\n>(({ index, error, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\n\n return (\n <div\n ref={ref}\n className={cn(\n 'relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800',\n isActive &&\n 'z-10 ring-2 ring-purple-100 ring-offset-white dark:ring-purple-20 dark:ring-offset-purple-100',\n error && 'border-red-500 dark:border-red-400',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50\" />\n </div>\n )}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n))\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot }\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":";AAAA,SAAS,cAAAA,mBAA4C;;;ACErD,SAAS,UAAU,uBAAuB;AAC1C,SAAS,WAAW;AACpB,YAAY,WAAW;;;ACJvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADOE,cA4BE,YA5BF;AAJF,IAAM,WAAiB,iBAGrB,CAAC,EAAE,WAAW,oBAAoB,GAAG,MAAM,GAAG,QAC9C;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW,GAAG,+BAA+B,SAAS;AAAA,IACrD,GAAG;AAAA;AACN,CACD;AACD,SAAS,cAAc;AAEvB,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,SAAI,KAAU,WAAW,GAAG,qBAAqB,SAAS,GAAI,GAAG,OAAO,CAC1E;AACD,cAAc,cAAc;AAE5B,IAAM,eAAqB,iBAGzB,CAAC,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChD,QAAM,kBAAwB,iBAAW,eAAe;AACxD,QAAM,EAAE,MAAM,cAAc,SAAS,IAAI,gBAAgB,MAAM,KAAK;AAEpE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,YACE;AAAA,QACF,SAAS;AAAA,QACT;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,gBACC,oBAAC,SAAI,WAAU,yEACb,8BAAC,SAAI,WAAU,gFAA+E,GAChG;AAAA;AAAA;AAAA,EAEJ;AAEJ,CAAC;AACD,aAAa,cAAc;AAE3B,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,oBAAC,SAAI,KAAU,MAAK,aAAa,GAAG,OAClC,8BAAC,OAAI,GACP,CACD;AACD,kBAAkB,cAAc;;;AE1D5B,gBAAAC,YAAA;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,gBAAAA,KAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;AClBf,SAAS,gBAAgB;;;ACEzB,YAAY,sBAAsB;AAClC,YAAYC,YAAW;AAcrB,gBAAAC,YAAA;AAVF,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,gBAAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;;;ADLhD,SAQe,OAAAC,MARf,QAAAC,aAAA;AALN,SAAS,MAAM,EAAE,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,GAAoB;AACpF,MAAI,CAAC,KAAM,QAAO;AAElB,SACE,gBAAAA,MAAC,SAAI,WAAU,8BACb;AAAA,oBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,YAAY,gBAAAD,KAAC,UAAK,WAAU,gBAAe,mBAAO;AAAA;AAAA;AAAA,IACrD;AAAA,IAEC,CAAC,CAAC,eACD,gBAAAA,KAAC,mBACC,0BAAAC,MAAC,WACC;AAAA,sBAAAD,KAAC,kBAAe,SAAO,MACrB,0BAAAA,KAAC,YAAS,WAAU,WAAU,GAChC;AAAA,MACA,gBAAAA,KAAC,kBAAe,WAAU,YAAY,uBAAY;AAAA,OACpD,GACF;AAAA,KAEJ;AAEJ;AAEA,IAAO,gBAAQ;;;AJ7BT,SAKI,OAAAE,MALJ,QAAAC,aAAA;AAHC,IAAM,WAAWC;AAAA,EACtB,CAAC,EAAE,QAAQ,OAAO,aAAa,OAAO,GAAG,MAAM,GAAG,QAAQ;AACxD,WACE,gBAAAD;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAa,qBAAqB,MAAM,EAAE;AAAA,QAEzC;AAAA,mBACC,gBAAAD;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,SAAS,MAAM;AAAA,cACf,UAAU,MAAM;AAAA,cAChB;AAAA;AAAA,UACF;AAAA,UAEF,gBAAAA,KAAC,SAAI,WAAU,uCACb,0BAAAA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,WAAW;AAAA,cACX,eAAa,qBAAqB,MAAM,EAAE;AAAA,cACzC,GAAG;AAAA,cAEH,WAAC,GAAG,MAAM,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,UAC1B,gBAAAA,KAAC,iBACC,0BAAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAa,kBAAkB,KAAK;AAAA,kBACpC;AAAA,kBACA,OAAO,QAAQ,KAAK;AAAA;AAAA,cACtB,KALkB,KAMpB,CACD;AAAA;AAAA,UACH,GACF;AAAA,UAEA,gBAAAA,KAAC,wBAAa,SAAS,OAAO;AAAA;AAAA;AAAA,IAChC;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":["forwardRef","jsx","React","jsx","jsx","jsxs","jsx","jsxs","forwardRef"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/InputOtp.tsx","../../../src/components/primitives/input-otp.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { forwardRef, type InputHTMLAttributes } from 'react'\n\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/primitives/input-otp'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\n\ninterface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n digits: 4 | 6 | 8\n value?: string\n label?: string\n description?: string\n error?: string\n onChange?: (v: string) => void\n}\n\nexport const InputOtp = forwardRef<HTMLInputElement, Props>(\n ({ digits, label, description, error, ...props }, ref) => {\n return (\n <div\n className=\"group flex w-full flex-col gap-1\"\n data-testid={`input-otp-wrapper-${props.id}`}\n >\n {label && (\n <Label\n text={label}\n htmlFor={props.name}\n required={props.required}\n description={description}\n />\n )}\n <div className=\"relative flex flex-row items-center\">\n <InputOTP\n ref={ref}\n maxLength={digits}\n data-testid={`input-otp-element-${props.id}`}\n {...props}\n >\n {[...Array(digits)].map((_, index) => (\n <InputOTPGroup key={index}>\n <InputOTPSlot\n data-testid={`input-otp-slot-${index}`}\n index={index}\n error={Boolean(error)}\n />\n </InputOTPGroup>\n ))}\n </InputOTP>\n </div>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nInputOtp.displayName = 'Input'\n","'use client'\n\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport { Dot } from 'lucide-react'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-[:disabled]:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n))\nInputOTP.displayName = 'InputOTP'\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n))\nInputOTPGroup.displayName = 'InputOTPGroup'\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number; error?: boolean }\n>(({ index, error, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\n\n return (\n <div\n ref={ref}\n className={cn(\n 'relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800',\n isActive &&\n 'z-10 ring-2 ring-purple-100 ring-offset-white dark:ring-purple-20 dark:ring-offset-purple-100',\n error && 'border-red-500 dark:border-red-400',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50\" />\n </div>\n )}\n </div>\n )\n})\nInputOTPSlot.displayName = 'InputOTPSlot'\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n))\nInputOTPSeparator.displayName = 'InputOTPSeparator'\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot }\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":"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","names":["forwardRef","React","React","forwardRef"]}
|
|
@@ -37,7 +37,7 @@ var import_lucide_react = require("lucide-react");
|
|
|
37
37
|
|
|
38
38
|
// src/components/primitives/tooltip.tsx
|
|
39
39
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
40
|
-
var
|
|
40
|
+
var React2 = __toESM(require("react"), 1);
|
|
41
41
|
|
|
42
42
|
// src/lib/utils.ts
|
|
43
43
|
var import_clsx = require("clsx");
|
|
@@ -47,11 +47,10 @@ function cn(...inputs) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// src/components/primitives/tooltip.tsx
|
|
50
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
50
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
52
51
|
var Tooltip = TooltipPrimitive.Root;
|
|
53
52
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
54
|
-
var TooltipContent =
|
|
53
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
|
55
54
|
TooltipPrimitive.Content,
|
|
56
55
|
{
|
|
57
56
|
ref,
|
|
@@ -66,29 +65,20 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
66
65
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
67
66
|
|
|
68
67
|
// src/components/ui/Label.tsx
|
|
69
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
70
68
|
function Label({ text, required, description, className, ...props }) {
|
|
71
69
|
if (!text) return null;
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Tooltip, { children: [
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
90
|
-
] }) })
|
|
91
|
-
] });
|
|
70
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
71
|
+
"label",
|
|
72
|
+
{
|
|
73
|
+
className: cn(
|
|
74
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
},
|
|
79
|
+
text,
|
|
80
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
81
|
+
), !!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))));
|
|
92
82
|
}
|
|
93
83
|
var Label_default = Label;
|
|
94
84
|
//# sourceMappingURL=Label.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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","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,0BAAyB;;;ACEzB,uBAAkC;AAClC,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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","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,0BAAyB;;;ACEzB,uBAAkC;AAClC,IAAAA,SAAuB;;;ACHvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;;;ADVtD,SAAS,MAAM,EAAE,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,GAAoB;AACpF,MAAI,CAAC,KAAM,QAAO;AAElB,SACE,oCAAC,SAAI,WAAU,gCACb;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,IACA,YAAY,oCAAC,UAAK,WAAU,kBAAe,OAAO;AAAA,EACrD,GAEC,CAAC,CAAC,eACD,oCAAC,uBACC,oCAAC,eACC,oCAAC,kBAAe,SAAO,QACrB,oCAAC,gCAAS,WAAU,WAAU,CAChC,GACA,oCAAC,kBAAe,WAAU,cAAY,WAAY,CACpD,CACF,CAEJ;AAEJ;AAEA,IAAO,gBAAQ;","names":["React"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
@@ -6,6 +6,6 @@ interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
description?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function Label({ text, required, description, className, ...props }: Readonly<Props>):
|
|
9
|
+
declare function Label({ text, required, description, className, ...props }: Readonly<Props>): React.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { Label as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
@@ -6,6 +6,6 @@ interface Props extends ComponentPropsWithoutRef<'label'> {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
description?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function Label({ text, required, description, className, ...props }: Readonly<Props>):
|
|
9
|
+
declare function Label({ text, required, description, className, ...props }: Readonly<Props>): React.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { Label as default };
|
|
@@ -3,7 +3,7 @@ import { InfoIcon } from "lucide-react";
|
|
|
3
3
|
|
|
4
4
|
// src/components/primitives/tooltip.tsx
|
|
5
5
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6
|
-
import * as
|
|
6
|
+
import * as React2 from "react";
|
|
7
7
|
|
|
8
8
|
// src/lib/utils.ts
|
|
9
9
|
import { clsx } from "clsx";
|
|
@@ -13,11 +13,10 @@ function cn(...inputs) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// src/components/primitives/tooltip.tsx
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
17
16
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
18
17
|
var Tooltip = TooltipPrimitive.Root;
|
|
19
18
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
20
|
-
var TooltipContent =
|
|
19
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
|
21
20
|
TooltipPrimitive.Content,
|
|
22
21
|
{
|
|
23
22
|
ref,
|
|
@@ -32,29 +31,20 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
32
31
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
33
32
|
|
|
34
33
|
// src/components/ui/Label.tsx
|
|
35
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
36
34
|
function Label({ text, required, description, className, ...props }) {
|
|
37
35
|
if (!text) return null;
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
!!description && /* @__PURE__ */ jsx2(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
54
|
-
/* @__PURE__ */ jsx2(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx2(InfoIcon, { className: "h-4 w-4" }) }),
|
|
55
|
-
/* @__PURE__ */ jsx2(TooltipContent, { className: "max-w-48", children: description })
|
|
56
|
-
] }) })
|
|
57
|
-
] });
|
|
36
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
|
|
37
|
+
"label",
|
|
38
|
+
{
|
|
39
|
+
className: cn(
|
|
40
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
41
|
+
className
|
|
42
|
+
),
|
|
43
|
+
...props
|
|
44
|
+
},
|
|
45
|
+
text,
|
|
46
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
|
|
47
|
+
), !!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))));
|
|
58
48
|
}
|
|
59
49
|
var Label_default = Label;
|
|
60
50
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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","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,gBAAgB;;;ACEzB,YAAY,sBAAsB;AAClC,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx","../../../src/lib/utils.ts"],"sourcesContent":["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","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,gBAAgB;;;ACEzB,YAAY,sBAAsB;AAClC,YAAYA,YAAW;;;ACHvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;;;ADVtD,SAAS,MAAM,EAAE,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,GAAoB;AACpF,MAAI,CAAC,KAAM,QAAO;AAElB,SACE,oCAAC,SAAI,WAAU,gCACb;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,IACA,YAAY,oCAAC,UAAK,WAAU,kBAAe,OAAO;AAAA,EACrD,GAEC,CAAC,CAAC,eACD,oCAAC,uBACC,oCAAC,eACC,oCAAC,kBAAe,SAAO,QACrB,oCAAC,YAAS,WAAU,WAAU,CAChC,GACA,oCAAC,kBAAe,WAAU,cAAY,WAAY,CACpD,CACF,CAEJ;AAEJ;AAEA,IAAO,gBAAQ;","names":["React"]}
|
|
@@ -34,7 +34,7 @@ __export(LinkButton_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(LinkButton_exports);
|
|
36
36
|
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
-
var
|
|
37
|
+
var import_react = __toESM(require("react"), 1);
|
|
38
38
|
var LinkButton = ({
|
|
39
39
|
disabled = false,
|
|
40
40
|
useAnchor = false,
|
|
@@ -43,15 +43,15 @@ var LinkButton = ({
|
|
|
43
43
|
...props
|
|
44
44
|
}) => {
|
|
45
45
|
const Component = useAnchor ? "a" : import_link.default;
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
47
47
|
Component,
|
|
48
48
|
{
|
|
49
49
|
href,
|
|
50
50
|
className: `inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? "pointer-events-none text-grey-40" : ""} `,
|
|
51
51
|
...disabled && { "aria-disabled": true, tabIndex: -1 },
|
|
52
|
-
...props
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
...props
|
|
53
|
+
},
|
|
54
|
+
children
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/LinkButton.tsx"],"sourcesContent":["import Link from 'next/link'\nimport React from 'react'\n\nexport interface LinkButtonProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,\n Omit<React.ComponentProps<typeof Link>, 'href'> {\n disabled?: boolean\n href: string // Ensures href is always required and compatible with both\n useAnchor?: boolean // New prop to decide between <a> and <Link>\n}\n\n/**\n * A custom button component that can render a link using either\n * Next.js's Link component or a regular <a> tag based on a prop.\n *\n * @component\n * @example\n * ```tsx\n * <LinkButton href=\"/about\">About</LinkButton>\n * ```\n *\n * @param {object} props - The component props.\n * @param {boolean} [props.disabled=false] - Determines if the button is disabled.\n * @param {boolean} [props.useAnchor=false] - Whether to render a regular <a> instead of Next.js Link.\n * @param {React.ReactNode} props.children - The content of the button.\n * @param {string} props.href - The URL the button points to.\n * @returns {JSX.Element} The rendered LinkButton component.\n */\nexport const LinkButton = ({\n disabled = false,\n useAnchor = false,\n children,\n href,\n ...props\n}: LinkButtonProps) => {\n const Component = useAnchor ? 'a' : Link\n\n return (\n <Component\n href={href}\n className={`inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? 'pointer-events-none text-grey-40' : ''} `}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n {...props}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/LinkButton.tsx"],"sourcesContent":["import Link from 'next/link'\nimport React from 'react'\n\nexport interface LinkButtonProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,\n Omit<React.ComponentProps<typeof Link>, 'href'> {\n disabled?: boolean\n href: string // Ensures href is always required and compatible with both\n useAnchor?: boolean // New prop to decide between <a> and <Link>\n}\n\n/**\n * A custom button component that can render a link using either\n * Next.js's Link component or a regular <a> tag based on a prop.\n *\n * @component\n * @example\n * ```tsx\n * <LinkButton href=\"/about\">About</LinkButton>\n * ```\n *\n * @param {object} props - The component props.\n * @param {boolean} [props.disabled=false] - Determines if the button is disabled.\n * @param {boolean} [props.useAnchor=false] - Whether to render a regular <a> instead of Next.js Link.\n * @param {React.ReactNode} props.children - The content of the button.\n * @param {string} props.href - The URL the button points to.\n * @returns {JSX.Element} The rendered LinkButton component.\n */\nexport const LinkButton = ({\n disabled = false,\n useAnchor = false,\n children,\n href,\n ...props\n}: LinkButtonProps) => {\n const Component = useAnchor ? 'a' : Link\n\n return (\n <Component\n href={href}\n className={`inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? 'pointer-events-none text-grey-40' : ''} `}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n {...props}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,mBAAkB;AA2BX,IAAM,aAAa,CAAC;AAAA,EACzB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAuB;AACrB,QAAM,YAAY,YAAY,MAAM,YAAAA;AAEpC,SACE,6BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,uQAAuQ,WAAW,qCAAqC,EAAE;AAAA,MACnU,GAAI,YAAY,EAAE,iBAAiB,MAAM,UAAU,GAAG;AAAA,MACtD,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ;","names":["Link","React"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import Link from 'next/link';
|
|
3
2
|
import React__default from 'react';
|
|
4
3
|
|
|
@@ -24,6 +23,6 @@ interface LinkButtonProps extends Omit<React__default.AnchorHTMLAttributes<HTMLA
|
|
|
24
23
|
* @param {string} props.href - The URL the button points to.
|
|
25
24
|
* @returns {JSX.Element} The rendered LinkButton component.
|
|
26
25
|
*/
|
|
27
|
-
declare const LinkButton: ({ disabled, useAnchor, children, href, ...props }: LinkButtonProps) =>
|
|
26
|
+
declare const LinkButton: ({ disabled, useAnchor, children, href, ...props }: LinkButtonProps) => React__default.JSX.Element;
|
|
28
27
|
|
|
29
28
|
export { LinkButton, type LinkButtonProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import Link from 'next/link';
|
|
3
2
|
import React__default from 'react';
|
|
4
3
|
|
|
@@ -24,6 +23,6 @@ interface LinkButtonProps extends Omit<React__default.AnchorHTMLAttributes<HTMLA
|
|
|
24
23
|
* @param {string} props.href - The URL the button points to.
|
|
25
24
|
* @returns {JSX.Element} The rendered LinkButton component.
|
|
26
25
|
*/
|
|
27
|
-
declare const LinkButton: ({ disabled, useAnchor, children, href, ...props }: LinkButtonProps) =>
|
|
26
|
+
declare const LinkButton: ({ disabled, useAnchor, children, href, ...props }: LinkButtonProps) => React__default.JSX.Element;
|
|
28
27
|
|
|
29
28
|
export { LinkButton, type LinkButtonProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/ui/LinkButton.tsx
|
|
2
2
|
import Link from "next/link";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
var LinkButton = ({
|
|
5
5
|
disabled = false,
|
|
6
6
|
useAnchor = false,
|
|
@@ -9,15 +9,15 @@ var LinkButton = ({
|
|
|
9
9
|
...props
|
|
10
10
|
}) => {
|
|
11
11
|
const Component = useAnchor ? "a" : Link;
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ React.createElement(
|
|
13
13
|
Component,
|
|
14
14
|
{
|
|
15
15
|
href,
|
|
16
16
|
className: `inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? "pointer-events-none text-grey-40" : ""} `,
|
|
17
17
|
...disabled && { "aria-disabled": true, tabIndex: -1 },
|
|
18
|
-
...props
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
...props
|
|
19
|
+
},
|
|
20
|
+
children
|
|
21
21
|
);
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/LinkButton.tsx"],"sourcesContent":["import Link from 'next/link'\nimport React from 'react'\n\nexport interface LinkButtonProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,\n Omit<React.ComponentProps<typeof Link>, 'href'> {\n disabled?: boolean\n href: string // Ensures href is always required and compatible with both\n useAnchor?: boolean // New prop to decide between <a> and <Link>\n}\n\n/**\n * A custom button component that can render a link using either\n * Next.js's Link component or a regular <a> tag based on a prop.\n *\n * @component\n * @example\n * ```tsx\n * <LinkButton href=\"/about\">About</LinkButton>\n * ```\n *\n * @param {object} props - The component props.\n * @param {boolean} [props.disabled=false] - Determines if the button is disabled.\n * @param {boolean} [props.useAnchor=false] - Whether to render a regular <a> instead of Next.js Link.\n * @param {React.ReactNode} props.children - The content of the button.\n * @param {string} props.href - The URL the button points to.\n * @returns {JSX.Element} The rendered LinkButton component.\n */\nexport const LinkButton = ({\n disabled = false,\n useAnchor = false,\n children,\n href,\n ...props\n}: LinkButtonProps) => {\n const Component = useAnchor ? 'a' : Link\n\n return (\n <Component\n href={href}\n className={`inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? 'pointer-events-none text-grey-40' : ''} `}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n {...props}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";AAAA,OAAO,UAAU;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/LinkButton.tsx"],"sourcesContent":["import Link from 'next/link'\nimport React from 'react'\n\nexport interface LinkButtonProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,\n Omit<React.ComponentProps<typeof Link>, 'href'> {\n disabled?: boolean\n href: string // Ensures href is always required and compatible with both\n useAnchor?: boolean // New prop to decide between <a> and <Link>\n}\n\n/**\n * A custom button component that can render a link using either\n * Next.js's Link component or a regular <a> tag based on a prop.\n *\n * @component\n * @example\n * ```tsx\n * <LinkButton href=\"/about\">About</LinkButton>\n * ```\n *\n * @param {object} props - The component props.\n * @param {boolean} [props.disabled=false] - Determines if the button is disabled.\n * @param {boolean} [props.useAnchor=false] - Whether to render a regular <a> instead of Next.js Link.\n * @param {React.ReactNode} props.children - The content of the button.\n * @param {string} props.href - The URL the button points to.\n * @returns {JSX.Element} The rendered LinkButton component.\n */\nexport const LinkButton = ({\n disabled = false,\n useAnchor = false,\n children,\n href,\n ...props\n}: LinkButtonProps) => {\n const Component = useAnchor ? 'a' : Link\n\n return (\n <Component\n href={href}\n className={`inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? 'pointer-events-none text-grey-40' : ''} `}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n {...props}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";AAAA,OAAO,UAAU;AACjB,OAAO,WAAW;AA2BX,IAAM,aAAa,CAAC;AAAA,EACzB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAuB;AACrB,QAAM,YAAY,YAAY,MAAM;AAEpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,uQAAuQ,WAAW,qCAAqC,EAAE;AAAA,MACnU,GAAI,YAAY,EAAE,iBAAiB,MAAM,UAAU,GAAG;AAAA,MACtD,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ;","names":[]}
|