@skybin-tech/nebula-ui 0.0.28 → 0.0.30
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/README.md +422 -356
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/cjs/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/cjs/components/Alert/Alert.cjs.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.cjs +1 -1
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/cjs/components/Form/Checkbox.cjs.map +1 -1
- package/dist/cjs/components/Form/Combobox.cjs +124 -0
- package/dist/cjs/components/Form/Combobox.cjs.map +1 -0
- package/dist/cjs/components/Form/CountryPicker.cjs +101 -0
- package/dist/cjs/components/Form/CountryPicker.cjs.map +1 -0
- package/dist/cjs/components/Form/CountrySelect.cjs +111 -0
- package/dist/cjs/components/Form/CountrySelect.cjs.map +1 -0
- package/dist/cjs/components/Form/DatePicker.cjs +122 -0
- package/dist/cjs/components/Form/DatePicker.cjs.map +1 -0
- package/dist/cjs/components/Form/FieldLayout.cjs +65 -0
- package/dist/cjs/components/Form/FieldLayout.cjs.map +1 -0
- package/dist/cjs/components/Form/Form.cjs +12 -9
- package/dist/cjs/components/Form/Form.cjs.map +1 -1
- package/dist/cjs/components/Form/FormSwitch.cjs.map +1 -1
- package/dist/cjs/components/Form/PhoneInput.cjs +170 -0
- package/dist/cjs/components/Form/PhoneInput.cjs.map +1 -0
- package/dist/cjs/components/Form/Radio.cjs.map +1 -1
- package/dist/cjs/components/Form/Select.cjs +35 -47
- package/dist/cjs/components/Form/Select.cjs.map +1 -1
- package/dist/cjs/components/Form/TextArea.cjs +1 -1
- package/dist/cjs/components/Form/TextArea.cjs.map +1 -1
- package/dist/cjs/components/Form/TextBox.cjs +50 -61
- package/dist/cjs/components/Form/TextBox.cjs.map +1 -1
- package/dist/cjs/components/Form/context.cjs +25 -11
- package/dist/cjs/components/Form/context.cjs.map +1 -1
- package/dist/cjs/components/Form/hooks.cjs.map +1 -1
- package/dist/cjs/components/Form/index.cjs +16 -0
- package/dist/cjs/components/Form/variants.cjs.map +1 -1
- package/dist/cjs/components/Input/Input.cjs +2 -2
- package/dist/cjs/components/Input/Input.cjs.map +1 -1
- package/dist/cjs/components/Label/Label.cjs.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.cjs +4 -4
- package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/components/Separator/Separator.cjs.map +1 -1
- package/dist/cjs/components/Switch/Switch.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/cjs/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/data/countries.cjs +1062 -0
- package/dist/cjs/data/countries.cjs.map +1 -0
- package/dist/cjs/hooks/useDebounce.cjs.map +1 -1
- package/dist/cjs/hooks/useToast.cjs.map +1 -1
- package/dist/cjs/hooks/useToggle.cjs.map +1 -1
- package/dist/cjs/index.cjs +64 -4
- package/dist/cjs/primitives/accordion.cjs.map +1 -1
- package/dist/cjs/primitives/alert-dialog.cjs +73 -0
- package/dist/cjs/primitives/alert-dialog.cjs.map +1 -0
- package/dist/cjs/primitives/alert.cjs.map +1 -1
- package/dist/cjs/primitives/avatar.cjs.map +1 -1
- package/dist/cjs/primitives/badge.cjs.map +1 -1
- package/dist/cjs/primitives/breadcrumb.cjs +73 -0
- package/dist/cjs/primitives/breadcrumb.cjs.map +1 -0
- package/dist/cjs/primitives/button.cjs +8 -7
- package/dist/cjs/primitives/button.cjs.map +1 -1
- package/dist/cjs/primitives/calendar.cjs.map +1 -1
- package/dist/cjs/primitives/card.cjs.map +1 -1
- package/dist/cjs/primitives/checkbox.cjs.map +1 -1
- package/dist/cjs/primitives/command.cjs.map +1 -1
- package/dist/cjs/primitives/dialog.cjs.map +1 -1
- package/dist/cjs/primitives/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/primitives/input-otp.cjs +49 -0
- package/dist/cjs/primitives/input-otp.cjs.map +1 -0
- package/dist/cjs/primitives/label.cjs.map +1 -1
- package/dist/cjs/primitives/popover.cjs.map +1 -1
- package/dist/cjs/primitives/progress.cjs +24 -0
- package/dist/cjs/primitives/progress.cjs.map +1 -0
- package/dist/cjs/primitives/radio-group.cjs.map +1 -1
- package/dist/cjs/primitives/scroll-area.cjs.map +1 -1
- package/dist/cjs/primitives/select.cjs.map +1 -1
- package/dist/cjs/primitives/separator.cjs.map +1 -1
- package/dist/cjs/primitives/sheet.cjs +78 -0
- package/dist/cjs/primitives/sheet.cjs.map +1 -0
- package/dist/cjs/primitives/slider.cjs +23 -0
- package/dist/cjs/primitives/slider.cjs.map +1 -0
- package/dist/cjs/primitives/sonner.cjs.map +1 -1
- package/dist/cjs/primitives/switch.cjs.map +1 -1
- package/dist/cjs/primitives/table.cjs.map +1 -1
- package/dist/cjs/primitives/tabs.cjs.map +1 -1
- package/dist/cjs/primitives/textarea.cjs +1 -1
- package/dist/cjs/primitives/textarea.cjs.map +1 -1
- package/dist/cjs/primitives/textbox.cjs +1 -1
- package/dist/cjs/primitives/textbox.cjs.map +1 -1
- package/dist/cjs/primitives/toast.cjs.map +1 -1
- package/dist/cjs/primitives/toggle.cjs.map +1 -1
- package/dist/cjs/utils/cn.cjs.map +1 -1
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.d.ts +2 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/Form/Checkbox.js.map +1 -1
- package/dist/components/Form/Combobox.d.ts +31 -0
- package/dist/components/Form/Combobox.d.ts.map +1 -0
- package/dist/components/Form/Combobox.js +124 -0
- package/dist/components/Form/Combobox.js.map +1 -0
- package/dist/components/Form/CountryPicker.d.ts +17 -0
- package/dist/components/Form/CountryPicker.d.ts.map +1 -0
- package/dist/components/Form/CountryPicker.js +101 -0
- package/dist/components/Form/CountryPicker.js.map +1 -0
- package/dist/components/Form/CountrySelect.d.ts +32 -0
- package/dist/components/Form/CountrySelect.d.ts.map +1 -0
- package/dist/components/Form/CountrySelect.js +111 -0
- package/dist/components/Form/CountrySelect.js.map +1 -0
- package/dist/components/Form/DatePicker.d.ts +27 -0
- package/dist/components/Form/DatePicker.d.ts.map +1 -0
- package/dist/components/Form/DatePicker.js +122 -0
- package/dist/components/Form/DatePicker.js.map +1 -0
- package/dist/components/Form/FieldLayout.d.ts +15 -0
- package/dist/components/Form/FieldLayout.d.ts.map +1 -0
- package/dist/components/Form/FieldLayout.js +65 -0
- package/dist/components/Form/FieldLayout.js.map +1 -0
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form.js +12 -9
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/FormSwitch.js.map +1 -1
- package/dist/components/Form/PhoneInput.d.ts +38 -0
- package/dist/components/Form/PhoneInput.d.ts.map +1 -0
- package/dist/components/Form/PhoneInput.js +170 -0
- package/dist/components/Form/PhoneInput.js.map +1 -0
- package/dist/components/Form/Radio.js.map +1 -1
- package/dist/components/Form/Select.d.ts.map +1 -1
- package/dist/components/Form/Select.js +35 -47
- package/dist/components/Form/Select.js.map +1 -1
- package/dist/components/Form/TextArea.js +1 -1
- package/dist/components/Form/TextArea.js.map +1 -1
- package/dist/components/Form/TextBox.d.ts.map +1 -1
- package/dist/components/Form/TextBox.js +50 -61
- package/dist/components/Form/TextBox.js.map +1 -1
- package/dist/components/Form/context.d.ts.map +1 -1
- package/dist/components/Form/context.js +25 -11
- package/dist/components/Form/context.js.map +1 -1
- package/dist/components/Form/context.test.d.ts +2 -0
- package/dist/components/Form/context.test.d.ts.map +1 -0
- package/dist/components/Form/hooks.js.map +1 -1
- package/dist/components/Form/index.d.ts +12 -0
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/components/Form/index.js +7 -1
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/InputOTP/InputOTP.d.ts +2 -0
- package/dist/components/InputOTP/InputOTP.d.ts.map +1 -0
- package/dist/components/InputOTP/index.d.ts +2 -0
- package/dist/components/InputOTP/index.d.ts.map +1 -0
- package/dist/components/Label/Label.js.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +4 -4
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Progress/Progress.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Sheet/Sheet.d.ts +2 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet/index.d.ts +2 -0
- package/dist/components/Sheet/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/data/countries.d.ts +18 -0
- package/dist/data/countries.d.ts.map +1 -0
- package/dist/data/countries.js +1054 -0
- package/dist/data/countries.js.map +1 -0
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/hooks/useToast.js.map +1 -1
- package/dist/hooks/useToggle.js.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -5
- package/dist/primitives/accordion.js.map +1 -1
- package/dist/primitives/alert-dialog.d.ts +21 -0
- package/dist/primitives/alert-dialog.d.ts.map +1 -0
- package/dist/primitives/alert-dialog.js +60 -0
- package/dist/primitives/alert-dialog.js.map +1 -0
- package/dist/primitives/alert.js.map +1 -1
- package/dist/primitives/avatar.js.map +1 -1
- package/dist/primitives/breadcrumb.d.ts +20 -0
- package/dist/primitives/breadcrumb.d.ts.map +1 -0
- package/dist/primitives/breadcrumb.js +65 -0
- package/dist/primitives/breadcrumb.js.map +1 -0
- package/dist/primitives/button.d.ts +4 -3
- package/dist/primitives/button.d.ts.map +1 -1
- package/dist/primitives/button.js +7 -7
- package/dist/primitives/button.js.map +1 -1
- package/dist/primitives/calendar.js.map +1 -1
- package/dist/primitives/card.js.map +1 -1
- package/dist/primitives/checkbox.js.map +1 -1
- package/dist/primitives/command.js.map +1 -1
- package/dist/primitives/dialog.js.map +1 -1
- package/dist/primitives/dropdown-menu.js.map +1 -1
- package/dist/primitives/index.d.ts +6 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/input-otp.d.ts +35 -0
- package/dist/primitives/input-otp.d.ts.map +1 -0
- package/dist/primitives/input-otp.js +44 -0
- package/dist/primitives/input-otp.js.map +1 -0
- package/dist/primitives/input.d.ts +1 -3
- package/dist/primitives/input.d.ts.map +1 -1
- package/dist/primitives/label.js.map +1 -1
- package/dist/primitives/popover.js.map +1 -1
- package/dist/primitives/progress.d.ts +5 -0
- package/dist/primitives/progress.d.ts.map +1 -0
- package/dist/primitives/progress.js +21 -0
- package/dist/primitives/progress.js.map +1 -0
- package/dist/primitives/radio-group.js.map +1 -1
- package/dist/primitives/scroll-area.js.map +1 -1
- package/dist/primitives/select.js.map +1 -1
- package/dist/primitives/separator.js.map +1 -1
- package/dist/primitives/sheet.d.ts +26 -0
- package/dist/primitives/sheet.d.ts.map +1 -0
- package/dist/primitives/sheet.js +66 -0
- package/dist/primitives/sheet.js.map +1 -0
- package/dist/primitives/slider.d.ts +5 -0
- package/dist/primitives/slider.d.ts.map +1 -0
- package/dist/primitives/slider.js +20 -0
- package/dist/primitives/slider.js.map +1 -0
- package/dist/primitives/sonner.js.map +1 -1
- package/dist/primitives/switch.js.map +1 -1
- package/dist/primitives/table.js.map +1 -1
- package/dist/primitives/tabs.js.map +1 -1
- package/dist/primitives/textarea.js +1 -1
- package/dist/primitives/textarea.js.map +1 -1
- package/dist/primitives/textbox.js +1 -1
- package/dist/primitives/textbox.js.map +1 -1
- package/dist/primitives/toast.js.map +1 -1
- package/dist/primitives/toggle.js.map +1 -1
- package/package.json +168 -60
- package/src/styles/index.css +107 -0
- package/dist/cjs/primitives/input.cjs +0 -20
- package/dist/cjs/primitives/input.cjs.map +0 -1
- package/dist/primitives/input.js +0 -18
- package/dist/primitives/input.js.map +0 -1
- package/dist/stories/Button.d.ts +0 -15
- package/dist/stories/Button.d.ts.map +0 -1
- package/dist/stories/Button.stories.d.ts +0 -24
- package/dist/stories/Button.stories.d.ts.map +0 -1
- package/dist/stories/Header.d.ts +0 -12
- package/dist/stories/Header.d.ts.map +0 -1
- package/dist/stories/Header.stories.d.ts +0 -19
- package/dist/stories/Header.stories.d.ts.map +0 -1
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.d.ts.map +0 -1
- package/dist/stories/Page.stories.d.ts +0 -13
- package/dist/stories/Page.stories.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countries.js","names":[],"sources":["../../src/data/countries.ts"],"sourcesContent":["export interface Country {\n code: string;\n name: string;\n dialCode: string;\n}\n\nexport const COUNTRIES: Country[] = [\n {\n \"code\": \"AF\",\n \"name\": \"Afghanistan\",\n \"dialCode\": \"+93\"\n },\n {\n \"code\": \"AL\",\n \"name\": \"Albania\",\n \"dialCode\": \"+355\"\n },\n {\n \"code\": \"DZ\",\n \"name\": \"Algeria\",\n \"dialCode\": \"+213\"\n },\n {\n \"code\": \"AD\",\n \"name\": \"Andorra\",\n \"dialCode\": \"+376\"\n },\n {\n \"code\": \"AO\",\n \"name\": \"Angola\",\n \"dialCode\": \"+244\"\n },\n {\n \"code\": \"AG\",\n \"name\": \"Antigua and Barbuda\",\n \"dialCode\": \"+1268\"\n },\n {\n \"code\": \"AR\",\n \"name\": \"Argentina\",\n \"dialCode\": \"+54\"\n },\n {\n \"code\": \"AM\",\n \"name\": \"Armenia\",\n \"dialCode\": \"+374\"\n },\n {\n \"code\": \"AU\",\n \"name\": \"Australia\",\n \"dialCode\": \"+61\"\n },\n {\n \"code\": \"AT\",\n \"name\": \"Austria\",\n \"dialCode\": \"+43\"\n },\n {\n \"code\": \"AZ\",\n \"name\": \"Azerbaijan\",\n \"dialCode\": \"+994\"\n },\n {\n \"code\": \"BS\",\n \"name\": \"Bahamas\",\n \"dialCode\": \"+1242\"\n },\n {\n \"code\": \"BH\",\n \"name\": \"Bahrain\",\n \"dialCode\": \"+973\"\n },\n {\n \"code\": \"BD\",\n \"name\": \"Bangladesh\",\n \"dialCode\": \"+880\"\n },\n {\n \"code\": \"BB\",\n \"name\": \"Barbados\",\n \"dialCode\": \"+1246\"\n },\n {\n \"code\": \"BY\",\n \"name\": \"Belarus\",\n \"dialCode\": \"+375\"\n },\n {\n \"code\": \"BE\",\n \"name\": \"Belgium\",\n \"dialCode\": \"+32\"\n },\n {\n \"code\": \"BZ\",\n \"name\": \"Belize\",\n \"dialCode\": \"+501\"\n },\n {\n \"code\": \"BJ\",\n \"name\": \"Benin\",\n \"dialCode\": \"+229\"\n },\n {\n \"code\": \"BT\",\n \"name\": \"Bhutan\",\n \"dialCode\": \"+975\"\n },\n {\n \"code\": \"BO\",\n \"name\": \"Bolivia\",\n \"dialCode\": \"+591\"\n },\n {\n \"code\": \"BA\",\n \"name\": \"Bosnia and Herzegovina\",\n \"dialCode\": \"+387\"\n },\n {\n \"code\": \"BW\",\n \"name\": \"Botswana\",\n \"dialCode\": \"+267\"\n },\n {\n \"code\": \"BR\",\n \"name\": \"Brazil\",\n \"dialCode\": \"+55\"\n },\n {\n \"code\": \"BN\",\n \"name\": \"Brunei\",\n \"dialCode\": \"+673\"\n },\n {\n \"code\": \"BG\",\n \"name\": \"Bulgaria\",\n \"dialCode\": \"+359\"\n },\n {\n \"code\": \"BF\",\n \"name\": \"Burkina Faso\",\n \"dialCode\": \"+226\"\n },\n {\n \"code\": \"BI\",\n \"name\": \"Burundi\",\n \"dialCode\": \"+257\"\n },\n {\n \"code\": \"CV\",\n \"name\": \"Cabo Verde\",\n \"dialCode\": \"+238\"\n },\n {\n \"code\": \"KH\",\n \"name\": \"Cambodia\",\n \"dialCode\": \"+855\"\n },\n {\n \"code\": \"CM\",\n \"name\": \"Cameroon\",\n \"dialCode\": \"+237\"\n },\n {\n \"code\": \"CA\",\n \"name\": \"Canada\",\n \"dialCode\": \"+1\"\n },\n {\n \"code\": \"CF\",\n \"name\": \"Central African Republic\",\n \"dialCode\": \"+236\"\n },\n {\n \"code\": \"TD\",\n \"name\": \"Chad\",\n \"dialCode\": \"+235\"\n },\n {\n \"code\": \"CL\",\n \"name\": \"Chile\",\n \"dialCode\": \"+56\"\n },\n {\n \"code\": \"CN\",\n \"name\": \"China\",\n \"dialCode\": \"+86\"\n },\n {\n \"code\": \"CO\",\n \"name\": \"Colombia\",\n \"dialCode\": \"+57\"\n },\n {\n \"code\": \"KM\",\n \"name\": \"Comoros\",\n \"dialCode\": \"+269\"\n },\n {\n \"code\": \"CG\",\n \"name\": \"Congo\",\n \"dialCode\": \"+242\"\n },\n {\n \"code\": \"CD\",\n \"name\": \"Congo (DRC)\",\n \"dialCode\": \"+243\"\n },\n {\n \"code\": \"CR\",\n \"name\": \"Costa Rica\",\n \"dialCode\": \"+506\"\n },\n {\n \"code\": \"CI\",\n \"name\": \"Cote d Ivoire\",\n \"dialCode\": \"+225\"\n },\n {\n \"code\": \"HR\",\n \"name\": \"Croatia\",\n \"dialCode\": \"+385\"\n },\n {\n \"code\": \"CU\",\n \"name\": \"Cuba\",\n \"dialCode\": \"+53\"\n },\n {\n \"code\": \"CY\",\n \"name\": \"Cyprus\",\n \"dialCode\": \"+357\"\n },\n {\n \"code\": \"CZ\",\n \"name\": \"Czechia\",\n \"dialCode\": \"+420\"\n },\n {\n \"code\": \"DK\",\n \"name\": \"Denmark\",\n \"dialCode\": \"+45\"\n },\n {\n \"code\": \"DJ\",\n \"name\": \"Djibouti\",\n \"dialCode\": \"+253\"\n },\n {\n \"code\": \"DM\",\n \"name\": \"Dominica\",\n \"dialCode\": \"+1767\"\n },\n {\n \"code\": \"DO\",\n \"name\": \"Dominican Republic\",\n \"dialCode\": \"+1809\"\n },\n {\n \"code\": \"EC\",\n \"name\": \"Ecuador\",\n \"dialCode\": \"+593\"\n },\n {\n \"code\": \"EG\",\n \"name\": \"Egypt\",\n \"dialCode\": \"+20\"\n },\n {\n \"code\": \"SV\",\n \"name\": \"El Salvador\",\n \"dialCode\": \"+503\"\n },\n {\n \"code\": \"GQ\",\n \"name\": \"Equatorial Guinea\",\n \"dialCode\": \"+240\"\n },\n {\n \"code\": \"ER\",\n \"name\": \"Eritrea\",\n \"dialCode\": \"+291\"\n },\n {\n \"code\": \"EE\",\n \"name\": \"Estonia\",\n \"dialCode\": \"+372\"\n },\n {\n \"code\": \"SZ\",\n \"name\": \"Eswatini\",\n \"dialCode\": \"+268\"\n },\n {\n \"code\": \"ET\",\n \"name\": \"Ethiopia\",\n \"dialCode\": \"+251\"\n },\n {\n \"code\": \"FJ\",\n \"name\": \"Fiji\",\n \"dialCode\": \"+679\"\n },\n {\n \"code\": \"FI\",\n \"name\": \"Finland\",\n \"dialCode\": \"+358\"\n },\n {\n \"code\": \"FR\",\n \"name\": \"France\",\n \"dialCode\": \"+33\"\n },\n {\n \"code\": \"GA\",\n \"name\": \"Gabon\",\n \"dialCode\": \"+241\"\n },\n {\n \"code\": \"GM\",\n \"name\": \"Gambia\",\n \"dialCode\": \"+220\"\n },\n {\n \"code\": \"GE\",\n \"name\": \"Georgia\",\n \"dialCode\": \"+995\"\n },\n {\n \"code\": \"DE\",\n \"name\": \"Germany\",\n \"dialCode\": \"+49\"\n },\n {\n \"code\": \"GH\",\n \"name\": \"Ghana\",\n \"dialCode\": \"+233\"\n },\n {\n \"code\": \"GR\",\n \"name\": \"Greece\",\n \"dialCode\": \"+30\"\n },\n {\n \"code\": \"GD\",\n \"name\": \"Grenada\",\n \"dialCode\": \"+1473\"\n },\n {\n \"code\": \"GT\",\n \"name\": \"Guatemala\",\n \"dialCode\": \"+502\"\n },\n {\n \"code\": \"GN\",\n \"name\": \"Guinea\",\n \"dialCode\": \"+224\"\n },\n {\n \"code\": \"GW\",\n \"name\": \"Guinea-Bissau\",\n \"dialCode\": \"+245\"\n },\n {\n \"code\": \"GY\",\n \"name\": \"Guyana\",\n \"dialCode\": \"+592\"\n },\n {\n \"code\": \"HT\",\n \"name\": \"Haiti\",\n \"dialCode\": \"+509\"\n },\n {\n \"code\": \"HN\",\n \"name\": \"Honduras\",\n \"dialCode\": \"+504\"\n },\n {\n \"code\": \"HK\",\n \"name\": \"Hong Kong\",\n \"dialCode\": \"+852\"\n },\n {\n \"code\": \"HU\",\n \"name\": \"Hungary\",\n \"dialCode\": \"+36\"\n },\n {\n \"code\": \"IS\",\n \"name\": \"Iceland\",\n \"dialCode\": \"+354\"\n },\n {\n \"code\": \"IN\",\n \"name\": \"India\",\n \"dialCode\": \"+91\"\n },\n {\n \"code\": \"ID\",\n \"name\": \"Indonesia\",\n \"dialCode\": \"+62\"\n },\n {\n \"code\": \"IR\",\n \"name\": \"Iran\",\n \"dialCode\": \"+98\"\n },\n {\n \"code\": \"IQ\",\n \"name\": \"Iraq\",\n \"dialCode\": \"+964\"\n },\n {\n \"code\": \"IE\",\n \"name\": \"Ireland\",\n \"dialCode\": \"+353\"\n },\n {\n \"code\": \"IL\",\n \"name\": \"Israel\",\n \"dialCode\": \"+972\"\n },\n {\n \"code\": \"IT\",\n \"name\": \"Italy\",\n \"dialCode\": \"+39\"\n },\n {\n \"code\": \"JM\",\n \"name\": \"Jamaica\",\n \"dialCode\": \"+1876\"\n },\n {\n \"code\": \"JP\",\n \"name\": \"Japan\",\n \"dialCode\": \"+81\"\n },\n {\n \"code\": \"JO\",\n \"name\": \"Jordan\",\n \"dialCode\": \"+962\"\n },\n {\n \"code\": \"KZ\",\n \"name\": \"Kazakhstan\",\n \"dialCode\": \"+7\"\n },\n {\n \"code\": \"KE\",\n \"name\": \"Kenya\",\n \"dialCode\": \"+254\"\n },\n {\n \"code\": \"KI\",\n \"name\": \"Kiribati\",\n \"dialCode\": \"+686\"\n },\n {\n \"code\": \"KP\",\n \"name\": \"Korea (North)\",\n \"dialCode\": \"+850\"\n },\n {\n \"code\": \"KR\",\n \"name\": \"Korea (South)\",\n \"dialCode\": \"+82\"\n },\n {\n \"code\": \"XK\",\n \"name\": \"Kosovo\",\n \"dialCode\": \"+383\"\n },\n {\n \"code\": \"KW\",\n \"name\": \"Kuwait\",\n \"dialCode\": \"+965\"\n },\n {\n \"code\": \"KG\",\n \"name\": \"Kyrgyzstan\",\n \"dialCode\": \"+996\"\n },\n {\n \"code\": \"LA\",\n \"name\": \"Laos\",\n \"dialCode\": \"+856\"\n },\n {\n \"code\": \"LV\",\n \"name\": \"Latvia\",\n \"dialCode\": \"+371\"\n },\n {\n \"code\": \"LB\",\n \"name\": \"Lebanon\",\n \"dialCode\": \"+961\"\n },\n {\n \"code\": \"LS\",\n \"name\": \"Lesotho\",\n \"dialCode\": \"+266\"\n },\n {\n \"code\": \"LR\",\n \"name\": \"Liberia\",\n \"dialCode\": \"+231\"\n },\n {\n \"code\": \"LY\",\n \"name\": \"Libya\",\n \"dialCode\": \"+218\"\n },\n {\n \"code\": \"LI\",\n \"name\": \"Liechtenstein\",\n \"dialCode\": \"+423\"\n },\n {\n \"code\": \"LT\",\n \"name\": \"Lithuania\",\n \"dialCode\": \"+370\"\n },\n {\n \"code\": \"LU\",\n \"name\": \"Luxembourg\",\n \"dialCode\": \"+352\"\n },\n {\n \"code\": \"MO\",\n \"name\": \"Macao\",\n \"dialCode\": \"+853\"\n },\n {\n \"code\": \"MG\",\n \"name\": \"Madagascar\",\n \"dialCode\": \"+261\"\n },\n {\n \"code\": \"MW\",\n \"name\": \"Malawi\",\n \"dialCode\": \"+265\"\n },\n {\n \"code\": \"MY\",\n \"name\": \"Malaysia\",\n \"dialCode\": \"+60\"\n },\n {\n \"code\": \"MV\",\n \"name\": \"Maldives\",\n \"dialCode\": \"+960\"\n },\n {\n \"code\": \"ML\",\n \"name\": \"Mali\",\n \"dialCode\": \"+223\"\n },\n {\n \"code\": \"MT\",\n \"name\": \"Malta\",\n \"dialCode\": \"+356\"\n },\n {\n \"code\": \"MH\",\n \"name\": \"Marshall Islands\",\n \"dialCode\": \"+692\"\n },\n {\n \"code\": \"MR\",\n \"name\": \"Mauritania\",\n \"dialCode\": \"+222\"\n },\n {\n \"code\": \"MU\",\n \"name\": \"Mauritius\",\n \"dialCode\": \"+230\"\n },\n {\n \"code\": \"MX\",\n \"name\": \"Mexico\",\n \"dialCode\": \"+52\"\n },\n {\n \"code\": \"FM\",\n \"name\": \"Micronesia\",\n \"dialCode\": \"+691\"\n },\n {\n \"code\": \"MD\",\n \"name\": \"Moldova\",\n \"dialCode\": \"+373\"\n },\n {\n \"code\": \"MC\",\n \"name\": \"Monaco\",\n \"dialCode\": \"+377\"\n },\n {\n \"code\": \"MN\",\n \"name\": \"Mongolia\",\n \"dialCode\": \"+976\"\n },\n {\n \"code\": \"ME\",\n \"name\": \"Montenegro\",\n \"dialCode\": \"+382\"\n },\n {\n \"code\": \"MA\",\n \"name\": \"Morocco\",\n \"dialCode\": \"+212\"\n },\n {\n \"code\": \"MZ\",\n \"name\": \"Mozambique\",\n \"dialCode\": \"+258\"\n },\n {\n \"code\": \"MM\",\n \"name\": \"Myanmar\",\n \"dialCode\": \"+95\"\n },\n {\n \"code\": \"NA\",\n \"name\": \"Namibia\",\n \"dialCode\": \"+264\"\n },\n {\n \"code\": \"NR\",\n \"name\": \"Nauru\",\n \"dialCode\": \"+674\"\n },\n {\n \"code\": \"NP\",\n \"name\": \"Nepal\",\n \"dialCode\": \"+977\"\n },\n {\n \"code\": \"NL\",\n \"name\": \"Netherlands\",\n \"dialCode\": \"+31\"\n },\n {\n \"code\": \"NZ\",\n \"name\": \"New Zealand\",\n \"dialCode\": \"+64\"\n },\n {\n \"code\": \"NI\",\n \"name\": \"Nicaragua\",\n \"dialCode\": \"+505\"\n },\n {\n \"code\": \"NE\",\n \"name\": \"Niger\",\n \"dialCode\": \"+227\"\n },\n {\n \"code\": \"NG\",\n \"name\": \"Nigeria\",\n \"dialCode\": \"+234\"\n },\n {\n \"code\": \"MK\",\n \"name\": \"North Macedonia\",\n \"dialCode\": \"+389\"\n },\n {\n \"code\": \"NO\",\n \"name\": \"Norway\",\n \"dialCode\": \"+47\"\n },\n {\n \"code\": \"OM\",\n \"name\": \"Oman\",\n \"dialCode\": \"+968\"\n },\n {\n \"code\": \"PK\",\n \"name\": \"Pakistan\",\n \"dialCode\": \"+92\"\n },\n {\n \"code\": \"PW\",\n \"name\": \"Palau\",\n \"dialCode\": \"+680\"\n },\n {\n \"code\": \"PS\",\n \"name\": \"Palestine\",\n \"dialCode\": \"+970\"\n },\n {\n \"code\": \"PA\",\n \"name\": \"Panama\",\n \"dialCode\": \"+507\"\n },\n {\n \"code\": \"PG\",\n \"name\": \"Papua New Guinea\",\n \"dialCode\": \"+675\"\n },\n {\n \"code\": \"PY\",\n \"name\": \"Paraguay\",\n \"dialCode\": \"+595\"\n },\n {\n \"code\": \"PE\",\n \"name\": \"Peru\",\n \"dialCode\": \"+51\"\n },\n {\n \"code\": \"PH\",\n \"name\": \"Philippines\",\n \"dialCode\": \"+63\"\n },\n {\n \"code\": \"PL\",\n \"name\": \"Poland\",\n \"dialCode\": \"+48\"\n },\n {\n \"code\": \"PT\",\n \"name\": \"Portugal\",\n \"dialCode\": \"+351\"\n },\n {\n \"code\": \"PR\",\n \"name\": \"Puerto Rico\",\n \"dialCode\": \"+1787\"\n },\n {\n \"code\": \"QA\",\n \"name\": \"Qatar\",\n \"dialCode\": \"+974\"\n },\n {\n \"code\": \"RO\",\n \"name\": \"Romania\",\n \"dialCode\": \"+40\"\n },\n {\n \"code\": \"RU\",\n \"name\": \"Russia\",\n \"dialCode\": \"+7\"\n },\n {\n \"code\": \"RW\",\n \"name\": \"Rwanda\",\n \"dialCode\": \"+250\"\n },\n {\n \"code\": \"KN\",\n \"name\": \"Saint Kitts and Nevis\",\n \"dialCode\": \"+1869\"\n },\n {\n \"code\": \"LC\",\n \"name\": \"Saint Lucia\",\n \"dialCode\": \"+1758\"\n },\n {\n \"code\": \"VC\",\n \"name\": \"Saint Vincent and the Grenadines\",\n \"dialCode\": \"+1784\"\n },\n {\n \"code\": \"WS\",\n \"name\": \"Samoa\",\n \"dialCode\": \"+685\"\n },\n {\n \"code\": \"SM\",\n \"name\": \"San Marino\",\n \"dialCode\": \"+378\"\n },\n {\n \"code\": \"ST\",\n \"name\": \"Sao Tome and Principe\",\n \"dialCode\": \"+239\"\n },\n {\n \"code\": \"SA\",\n \"name\": \"Saudi Arabia\",\n \"dialCode\": \"+966\"\n },\n {\n \"code\": \"SN\",\n \"name\": \"Senegal\",\n \"dialCode\": \"+221\"\n },\n {\n \"code\": \"RS\",\n \"name\": \"Serbia\",\n \"dialCode\": \"+381\"\n },\n {\n \"code\": \"SC\",\n \"name\": \"Seychelles\",\n \"dialCode\": \"+248\"\n },\n {\n \"code\": \"SL\",\n \"name\": \"Sierra Leone\",\n \"dialCode\": \"+232\"\n },\n {\n \"code\": \"SG\",\n \"name\": \"Singapore\",\n \"dialCode\": \"+65\"\n },\n {\n \"code\": \"SK\",\n \"name\": \"Slovakia\",\n \"dialCode\": \"+421\"\n },\n {\n \"code\": \"SI\",\n \"name\": \"Slovenia\",\n \"dialCode\": \"+386\"\n },\n {\n \"code\": \"SB\",\n \"name\": \"Solomon Islands\",\n \"dialCode\": \"+677\"\n },\n {\n \"code\": \"SO\",\n \"name\": \"Somalia\",\n \"dialCode\": \"+252\"\n },\n {\n \"code\": \"ZA\",\n \"name\": \"South Africa\",\n \"dialCode\": \"+27\"\n },\n {\n \"code\": \"SS\",\n \"name\": \"South Sudan\",\n \"dialCode\": \"+211\"\n },\n {\n \"code\": \"ES\",\n \"name\": \"Spain\",\n \"dialCode\": \"+34\"\n },\n {\n \"code\": \"LK\",\n \"name\": \"Sri Lanka\",\n \"dialCode\": \"+94\"\n },\n {\n \"code\": \"SD\",\n \"name\": \"Sudan\",\n \"dialCode\": \"+249\"\n },\n {\n \"code\": \"SR\",\n \"name\": \"Suriname\",\n \"dialCode\": \"+597\"\n },\n {\n \"code\": \"SE\",\n \"name\": \"Sweden\",\n \"dialCode\": \"+46\"\n },\n {\n \"code\": \"CH\",\n \"name\": \"Switzerland\",\n \"dialCode\": \"+41\"\n },\n {\n \"code\": \"SY\",\n \"name\": \"Syria\",\n \"dialCode\": \"+963\"\n },\n {\n \"code\": \"TW\",\n \"name\": \"Taiwan\",\n \"dialCode\": \"+886\"\n },\n {\n \"code\": \"TJ\",\n \"name\": \"Tajikistan\",\n \"dialCode\": \"+992\"\n },\n {\n \"code\": \"TZ\",\n \"name\": \"Tanzania\",\n \"dialCode\": \"+255\"\n },\n {\n \"code\": \"TH\",\n \"name\": \"Thailand\",\n \"dialCode\": \"+66\"\n },\n {\n \"code\": \"TL\",\n \"name\": \"Timor-Leste\",\n \"dialCode\": \"+670\"\n },\n {\n \"code\": \"TG\",\n \"name\": \"Togo\",\n \"dialCode\": \"+228\"\n },\n {\n \"code\": \"TO\",\n \"name\": \"Tonga\",\n \"dialCode\": \"+676\"\n },\n {\n \"code\": \"TT\",\n \"name\": \"Trinidad and Tobago\",\n \"dialCode\": \"+1868\"\n },\n {\n \"code\": \"TN\",\n \"name\": \"Tunisia\",\n \"dialCode\": \"+216\"\n },\n {\n \"code\": \"TR\",\n \"name\": \"Turkey\",\n \"dialCode\": \"+90\"\n },\n {\n \"code\": \"TM\",\n \"name\": \"Turkmenistan\",\n \"dialCode\": \"+993\"\n },\n {\n \"code\": \"TV\",\n \"name\": \"Tuvalu\",\n \"dialCode\": \"+688\"\n },\n {\n \"code\": \"UG\",\n \"name\": \"Uganda\",\n \"dialCode\": \"+256\"\n },\n {\n \"code\": \"UA\",\n \"name\": \"Ukraine\",\n \"dialCode\": \"+380\"\n },\n {\n \"code\": \"AE\",\n \"name\": \"United Arab Emirates\",\n \"dialCode\": \"+971\"\n },\n {\n \"code\": \"GB\",\n \"name\": \"United Kingdom\",\n \"dialCode\": \"+44\"\n },\n {\n \"code\": \"US\",\n \"name\": \"United States\",\n \"dialCode\": \"+1\"\n },\n {\n \"code\": \"UY\",\n \"name\": \"Uruguay\",\n \"dialCode\": \"+598\"\n },\n {\n \"code\": \"UZ\",\n \"name\": \"Uzbekistan\",\n \"dialCode\": \"+998\"\n },\n {\n \"code\": \"VU\",\n \"name\": \"Vanuatu\",\n \"dialCode\": \"+678\"\n },\n {\n \"code\": \"VA\",\n \"name\": \"Vatican City\",\n \"dialCode\": \"+379\"\n },\n {\n \"code\": \"VE\",\n \"name\": \"Venezuela\",\n \"dialCode\": \"+58\"\n },\n {\n \"code\": \"VN\",\n \"name\": \"Vietnam\",\n \"dialCode\": \"+84\"\n },\n {\n \"code\": \"YE\",\n \"name\": \"Yemen\",\n \"dialCode\": \"+967\"\n },\n {\n \"code\": \"ZM\",\n \"name\": \"Zambia\",\n \"dialCode\": \"+260\"\n },\n {\n \"code\": \"ZW\",\n \"name\": \"Zimbabwe\",\n \"dialCode\": \"+263\"\n }\n];\n\nexport function getCountryFlag(code: string): string {\n if (!code || code.length !== 2) {\n return \"\";\n }\n\n const upper = code.toUpperCase();\n return String.fromCodePoint(\n ...upper.split(\"\").map((char) => 127397 + char.charCodeAt(0))\n );\n}\n\nexport function getCountryByCode(code: string): Country | undefined {\n return COUNTRIES.find((country) => country.code === code.toUpperCase());\n}\n\nexport function getCountryName(code: string): string {\n return getCountryByCode(code)?.name ?? code;\n}\n\nexport function getCountryDialCode(code: string): string {\n return getCountryByCode(code)?.dialCode ?? \"\";\n}\n\nexport function sortCountriesWithPriority(\n countries: Country[],\n priorityCountries: string[] = []\n): Country[] {\n const prioritySet = new Set(priorityCountries.map((code) => code.toUpperCase()));\n const priority = priorityCountries\n .map((code) => countries.find((country) => country.code === code.toUpperCase()))\n .filter((country): country is Country => !!country);\n const rest = countries.filter((country) => !prioritySet.has(country.code));\n return [...priority, ...rest];\n}\n\nexport function filterCountries(countries: Country[], query: string): Country[] {\n const normalizedQuery = query.trim().toLowerCase();\n if (!normalizedQuery) {\n return countries;\n }\n\n return countries.filter(\n (country) =>\n country.name.toLowerCase().includes(normalizedQuery) ||\n country.code.toLowerCase().includes(normalizedQuery) ||\n country.dialCode.includes(normalizedQuery)\n );\n}\n\nconst DIAL_CODE_DIGITS = new Map(\n COUNTRIES.map((country) => [country.code, country.dialCode.replace(/\\D/g, \"\")])\n);\n\nexport function formatE164(countryCode: string, nationalNumber: string): string {\n const digits = nationalNumber.replace(/\\D/g, \"\");\n const dialDigits = DIAL_CODE_DIGITS.get(countryCode.toUpperCase());\n if (!dialDigits || !digits) {\n return \"\";\n }\n\n return `+${dialDigits}${digits}`;\n}\n\nexport function parseE164(value: string): { countryCode: string; nationalNumber: string } | null {\n if (!value?.startsWith(\"+\")) {\n return null;\n }\n\n const digits = value.slice(1).replace(/\\D/g, \"\");\n if (!digits) {\n return null;\n }\n\n const sortedCountries = [...COUNTRIES].sort(\n (left, right) =>\n right.dialCode.replace(/\\D/g, \"\").length - left.dialCode.replace(/\\D/g, \"\").length\n );\n\n for (const country of sortedCountries) {\n const dialDigits = country.dialCode.replace(/\\D/g, \"\");\n if (digits.startsWith(dialDigits)) {\n return {\n countryCode: country.code,\n nationalNumber: digits.slice(dialDigits.length),\n };\n }\n }\n\n return null;\n}"],"mappings":";;AAMA,IAAa,YAAuB;CAClC;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;CACd;CACA;EACE,QAAQ;EACR,QAAQ;EACR,YAAY;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CAAC,SAAS,KAAK,SAAS,QAAQ,OAAO,EAAE,CAAC,CAAC,MAChF;CAEA,KAAK,MAAM,WAAW,iBAAiB;EACrC,MAAM,aAAa,QAAQ,SAAS,QAAQ,OAAO,EAAE;EACrD,IAAI,OAAO,WAAW,UAAU,GAC9B,OAAO;GACL,aAAa,QAAQ;GACrB,gBAAgB,OAAO,MAAM,WAAW,MAAM;EAChD;CAEJ;CAEA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.js","names":[],"sources":["../../src/hooks/useDebounce.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect } from \"react\";\r\n\r\n/**\r\n * A hook that debounces a value by a specified delay\r\n * @param value - The value to debounce\r\n * @param delay - The delay in milliseconds (default: 500)\r\n * @returns The debounced value\r\n */\r\nexport function useDebounce<T>(value: T, delay = 500): T {\r\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setDebouncedValue(value);\r\n }, delay);\r\n\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, [value, delay]);\r\n\r\n return debouncedValue;\r\n}\r\n"],"mappings":";;;;;;;;;;AAUA,SAAgB,YAAe,OAAU,QAAQ,KAAQ;CACvD,MAAM,CAAC,gBAAgB,qBAAqB,SAAY,KAAK;CAE7D,gBAAgB;EACd,MAAM,QAAQ,iBAAiB;GAC7B,kBAAkB,KAAK;EACzB,GAAG,KAAK;EAER,aAAa;GACX,aAAa,KAAK;EACpB;CACF,GAAG,CAAC,OAAO,KAAK,CAAC;CAEjB,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"useDebounce.js","names":[],"sources":["../../src/hooks/useDebounce.ts"],"sourcesContent":["'use client';\r\n\r\nimport { useState, useEffect } from \"react\";\r\n\r\n/**\r\n * A hook that debounces a value by a specified delay\r\n * @param value - The value to debounce\r\n * @param delay - The delay in milliseconds (default: 500)\r\n * @returns The debounced value\r\n */\r\nexport function useDebounce<T>(value: T, delay = 500): T {\r\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setDebouncedValue(value);\r\n }, delay);\r\n\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, [value, delay]);\r\n\r\n return debouncedValue;\r\n}\r\n"],"mappings":";;;;;;;;;;AAUA,SAAgB,YAAe,OAAU,QAAQ,KAAQ;CACvD,MAAM,CAAC,gBAAgB,qBAAqB,SAAY,KAAK;CAE7D,gBAAgB;EACd,MAAM,QAAQ,iBAAiB;GAC7B,kBAAkB,KAAK;EACzB,GAAG,KAAK;EAER,aAAa;GACX,aAAa,KAAK;EACpB;CACF,GAAG,CAAC,OAAO,KAAK,CAAC;CAEjB,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToast.js","names":[],"sources":["../../src/hooks/useToast.ts"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport type { ToastActionElement, ToastProps } from \"../primitives/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\ntype Action =\n | { type: ActionType[\"ADD_TOAST\"]; toast: ToasterToast }\n | { type: ActionType[\"UPDATE_TOAST\"]; toast: Partial<ToasterToast> }\n | { type: ActionType[\"DISMISS_TOAST\"]; toastId?: ToasterToast[\"id\"] }\n | { type: ActionType[\"REMOVE_TOAST\"]; toastId?: ToasterToast[\"id\"] }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) return\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({ type: \"REMOVE_TOAST\", toastId })\n }, TOAST_REMOVE_DELAY)\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return { ...state, toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT) }\n case \"UPDATE_TOAST\":\n return { ...state, toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t) }\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((t) => addToRemoveQueue(t.id))\n }\n return { ...state, toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined ? { ...t, open: false } : t) }\n }\n case \"REMOVE_TOAST\":\n return action.toastId === undefined\n ? { ...state, toasts: [] }\n : { ...state, toasts: state.toasts.filter((t) => t.id !== action.toastId) }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((l) => l(memoryState))\n}\n\ntype Toast = Omit<ToasterToast, \"id\">\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n const update = (props: ToasterToast) => dispatch({ type: \"UPDATE_TOAST\", toast: { ...props, id } })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => { if (!open) dismiss() },\n },\n })\n\n return { id, dismiss, update }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) listeners.splice(index, 1)\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n"],"mappings":";;;;AAKA,IAAM,cAAc;AACpB,IAAM,qBAAqB;AAgB3B,IAAI,QAAQ;AACZ,SAAS,QAAQ;CACf,SAAS,QAAQ,KAAK,OAAO;CAC7B,OAAO,MAAM,SAAS;AACxB;AAaA,IAAM,gCAAgB,IAAI,IAA2C;AAErE,IAAM,oBAAoB,YAAoB;CAC5C,IAAI,cAAc,IAAI,OAAO,GAAG;CAChC,MAAM,UAAU,iBAAiB;EAC/B,cAAc,OAAO,OAAO;EAC5B,SAAS;GAAE,MAAM;GAAgB;EAAQ,CAAC;CAC5C,GAAG,kBAAkB;CACrB,cAAc,IAAI,SAAS,OAAO;AACpC;AAEA,IAAa,WAAW,OAAc,WAA0B;CAC9D,QAAQ,OAAO,MAAf;EACE,KAAK,aACH,OAAO;GAAE,GAAG;GAAO,QAAQ,CAAC,OAAO,OAAO,GAAG,MAAM,MAAM,CAAC,CAAC,MAAM,GAAG,WAAW;EAAE;EACnF,KAAK,gBACH,OAAO;GAAE,GAAG;GAAO,QAAQ,MAAM,OAAO,KAAK,MAAM,EAAE,OAAO,OAAO,MAAM,KAAK;IAAE,GAAG;IAAG,GAAG,OAAO;GAAM,IAAI,CAAC;EAAE;EAC/G,KAAK,iBAAiB;GACpB,MAAM,EAAE,YAAY;GACpB,IAAI,SACF,iBAAiB,OAAO;QAExB,MAAM,OAAO,SAAS,MAAM,iBAAiB,EAAE,EAAE,CAAC;GAEpD,OAAO;IAAE,GAAG;IAAO,QAAQ,MAAM,OAAO,KAAK,MAAM,EAAE,OAAO,WAAW,YAAY,KAAA,IAAY;KAAE,GAAG;KAAG,MAAM;IAAM,IAAI,CAAC;GAAE;EAC5H;EACA,KAAK,gBACH,OAAO,OAAO,YAAY,KAAA,IACtB;GAAE,GAAG;GAAO,QAAQ,CAAC;EAAE,IACvB;GAAE,GAAG;GAAO,QAAQ,MAAM,OAAO,QAAQ,MAAM,EAAE,OAAO,OAAO,OAAO;EAAE;CAChF;AACF;AAEA,IAAM,YAA2C,CAAC;AAClD,IAAI,cAAqB,EAAE,QAAQ,CAAC,EAAE;AAEtC,SAAS,SAAS,QAAgB;CAChC,cAAc,QAAQ,aAAa,MAAM;CACzC,UAAU,SAAS,MAAM,EAAE,WAAW,CAAC;AACzC;AAIA,SAAS,MAAM,EAAE,GAAG,SAAgB;CAClC,MAAM,KAAK,MAAM;CACjB,MAAM,UAAU,UAAwB,SAAS;EAAE,MAAM;EAAgB,OAAO;GAAE,GAAG;GAAO;EAAG;CAAE,CAAC;CAClG,MAAM,gBAAgB,SAAS;EAAE,MAAM;EAAiB,SAAS;CAAG,CAAC;CAErE,SAAS;EACP,MAAM;EACN,OAAO;GACL,GAAG;GACH;GACA,MAAM;GACN,eAAe,SAAS;IAAE,IAAI,CAAC,MAAM,QAAQ;GAAE;EACjD;CACF,CAAC;CAED,OAAO;EAAE;EAAI;EAAS;CAAO;AAC/B;AAEA,SAAS,WAAW;CAClB,MAAM,CAAC,OAAO,YAAY,MAAM,SAAgB,WAAW;CAE3D,MAAM,gBAAgB;EACpB,UAAU,KAAK,QAAQ;EACvB,aAAa;GACX,MAAM,QAAQ,UAAU,QAAQ,QAAQ;GACxC,IAAI,QAAQ,IAAI,UAAU,OAAO,OAAO,CAAC;EAC3C;CACF,GAAG,CAAC,KAAK,CAAC;CAEV,OAAO;EACL,GAAG;EACH;EACA,UAAU,YAAqB,SAAS;GAAE,MAAM;GAAiB;EAAQ,CAAC;CAC5E;AACF"}
|
|
1
|
+
{"version":3,"file":"useToast.js","names":[],"sources":["../../src/hooks/useToast.ts"],"sourcesContent":["'use client';\r\n\r\nimport * as React from \"react\"\r\nimport type { ToastActionElement, ToastProps } from \"../primitives/toast\"\r\n\r\nconst TOAST_LIMIT = 1\r\nconst TOAST_REMOVE_DELAY = 1000000\r\n\r\ntype ToasterToast = ToastProps & {\r\n id: string\r\n title?: React.ReactNode\r\n description?: React.ReactNode\r\n action?: ToastActionElement\r\n}\r\n\r\nconst actionTypes = {\r\n ADD_TOAST: \"ADD_TOAST\",\r\n UPDATE_TOAST: \"UPDATE_TOAST\",\r\n DISMISS_TOAST: \"DISMISS_TOAST\",\r\n REMOVE_TOAST: \"REMOVE_TOAST\",\r\n} as const\r\n\r\nlet count = 0\r\nfunction genId() {\r\n count = (count + 1) % Number.MAX_SAFE_INTEGER\r\n return count.toString()\r\n}\r\n\r\ntype ActionType = typeof actionTypes\r\ntype Action =\r\n | { type: ActionType[\"ADD_TOAST\"]; toast: ToasterToast }\r\n | { type: ActionType[\"UPDATE_TOAST\"]; toast: Partial<ToasterToast> }\r\n | { type: ActionType[\"DISMISS_TOAST\"]; toastId?: ToasterToast[\"id\"] }\r\n | { type: ActionType[\"REMOVE_TOAST\"]; toastId?: ToasterToast[\"id\"] }\r\n\r\ninterface State {\r\n toasts: ToasterToast[]\r\n}\r\n\r\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\r\n\r\nconst addToRemoveQueue = (toastId: string) => {\r\n if (toastTimeouts.has(toastId)) return\r\n const timeout = setTimeout(() => {\r\n toastTimeouts.delete(toastId)\r\n dispatch({ type: \"REMOVE_TOAST\", toastId })\r\n }, TOAST_REMOVE_DELAY)\r\n toastTimeouts.set(toastId, timeout)\r\n}\r\n\r\nexport const reducer = (state: State, action: Action): State => {\r\n switch (action.type) {\r\n case \"ADD_TOAST\":\r\n return { ...state, toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT) }\r\n case \"UPDATE_TOAST\":\r\n return { ...state, toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t) }\r\n case \"DISMISS_TOAST\": {\r\n const { toastId } = action\r\n if (toastId) {\r\n addToRemoveQueue(toastId)\r\n } else {\r\n state.toasts.forEach((t) => addToRemoveQueue(t.id))\r\n }\r\n return { ...state, toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined ? { ...t, open: false } : t) }\r\n }\r\n case \"REMOVE_TOAST\":\r\n return action.toastId === undefined\r\n ? { ...state, toasts: [] }\r\n : { ...state, toasts: state.toasts.filter((t) => t.id !== action.toastId) }\r\n }\r\n}\r\n\r\nconst listeners: Array<(state: State) => void> = []\r\nlet memoryState: State = { toasts: [] }\r\n\r\nfunction dispatch(action: Action) {\r\n memoryState = reducer(memoryState, action)\r\n listeners.forEach((l) => l(memoryState))\r\n}\r\n\r\ntype Toast = Omit<ToasterToast, \"id\">\r\n\r\nfunction toast({ ...props }: Toast) {\r\n const id = genId()\r\n const update = (props: ToasterToast) => dispatch({ type: \"UPDATE_TOAST\", toast: { ...props, id } })\r\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\r\n\r\n dispatch({\r\n type: \"ADD_TOAST\",\r\n toast: {\r\n ...props,\r\n id,\r\n open: true,\r\n onOpenChange: (open) => { if (!open) dismiss() },\r\n },\r\n })\r\n\r\n return { id, dismiss, update }\r\n}\r\n\r\nfunction useToast() {\r\n const [state, setState] = React.useState<State>(memoryState)\r\n\r\n React.useEffect(() => {\r\n listeners.push(setState)\r\n return () => {\r\n const index = listeners.indexOf(setState)\r\n if (index > -1) listeners.splice(index, 1)\r\n }\r\n }, [state])\r\n\r\n return {\r\n ...state,\r\n toast,\r\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\r\n }\r\n}\r\n\r\nexport { useToast, toast }\r\n"],"mappings":";;;;AAKA,IAAM,cAAc;AACpB,IAAM,qBAAqB;AAgB3B,IAAI,QAAQ;AACZ,SAAS,QAAQ;CACf,SAAS,QAAQ,KAAK,OAAO;CAC7B,OAAO,MAAM,SAAS;AACxB;AAaA,IAAM,gCAAgB,IAAI,IAA2C;AAErE,IAAM,oBAAoB,YAAoB;CAC5C,IAAI,cAAc,IAAI,OAAO,GAAG;CAChC,MAAM,UAAU,iBAAiB;EAC/B,cA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O;EAAG;CAAE,CAAC;CAClG,MAAM,gBAAgB,SAAS;EAAE,MAAM;EAAiB,SAAS;CAAG,CAAC;CAErE,SAAS;EACP,MAAM;EACN,OAAO;GACL,GAAG;GACH;GACA,MAAM;GACN,eAAe,SAAS;IAAE,IAAI,CAAC,MAAM,QAAQ;GAAE;EACjD;CACF,CAAC;CAED,OAAO;EAAE;EAAI;EAAS;CAAO;AAC/B;AAEA,SAAS,WAAW;CAClB,MAAM,CAAC,OAAO,YAAY,MAAM,SAAgB,WAAW;CAE3D,MAAM,gBAAgB;EACpB,UAAU,KAAK,QAAQ;EACvB,aAAa;GACX,MAAM,QAAQ,UAAU,QAAQ,QAAQ;GACxC,IAAI,QAAQ,IAAI,UAAU,OAAO,OAAO,CAAC;EAC3C;CACF,GAAG,CAAC,KAAK,CAAC;CAEV,OAAO;EACL,GAAG;EACH;EACA,UAAU,YAAqB,SAAS;GAAE,MAAM;GAAiB;EAAQ,CAAC;CAC5E;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","names":[],"sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["'use client';\n\nimport { useState, useCallback } from \"react\";\r\n\r\n/**\r\n * A hook that returns a boolean state and a function to toggle it\r\n * @param initialValue - The initial value of the toggle (default: false)\r\n * @returns A tuple containing the current value and a toggle function\r\n */\r\nexport function useToggle(initialValue = false): [boolean, () => void] {\r\n const [value, setValue] = useState(initialValue);\r\n\r\n const toggle = useCallback(() => {\r\n setValue((prev) => !prev);\r\n }, []);\r\n\r\n return [value, toggle];\r\n}\r\n"],"mappings":";;;;;;;;;AASA,SAAgB,UAAU,eAAe,OAA8B;CACrE,MAAM,CAAC,OAAO,YAAY,SAAS,YAAY;CAM/C,OAAO,CAAC,OAJO,kBAAkB;EAC/B,UAAU,SAAS,CAAC,IAAI;CAC1B,GAAG,CAAC,CAEW,CAAM;AACvB"}
|
|
1
|
+
{"version":3,"file":"useToggle.js","names":[],"sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["'use client';\r\n\r\nimport { useState, useCallback } from \"react\";\r\n\r\n/**\r\n * A hook that returns a boolean state and a function to toggle it\r\n * @param initialValue - The initial value of the toggle (default: false)\r\n * @returns A tuple containing the current value and a toggle function\r\n */\r\nexport function useToggle(initialValue = false): [boolean, () => void] {\r\n const [value, setValue] = useState(initialValue);\r\n\r\n const toggle = useCallback(() => {\r\n setValue((prev) => !prev);\r\n }, []);\r\n\r\n return [value, toggle];\r\n}\r\n"],"mappings":";;;;;;;;;AASA,SAAgB,UAAU,eAAe,OAA8B;CACrE,MAAM,CAAC,OAAO,YAAY,SAAS,YAAY;CAM/C,OAAO,CAAC,OAJO,kBAAkB;EAC/B,UAAU,SAAS,CAAC,IAAI;CAC1B,GAAG,CAAC,CAEW,CAAM;AACvB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { Button, buttonVariants } from './components/Button';
|
|
2
2
|
export type { ButtonProps } from './components/Button';
|
|
3
|
-
export { Form, TextBox, TextArea, FormCheckbox, RadioGroup, RadioItem, FormSwitch, FormConfigContext, defaultFormConfig, buildZodSchemaFromRules, useFieldValidationRegistry, useFormConfig, useForm, useFormField, useFieldError, } from './components/Form';
|
|
3
|
+
export { Form, TextBox, TextArea, FormCheckbox, RadioGroup, RadioItem, FormSwitch, FormConfigContext, defaultFormConfig, buildZodSchemaFromRules, useFieldValidationRegistry, useFormConfig, useForm, useFormField, useFieldError, CountrySelect, FormCountrySelect, PhoneInput, FormPhoneInput, DatePicker, FormDatePicker, Combobox, FormCombobox, } from './components/Form';
|
|
4
4
|
export { Select as FormSelect } from './components/Form/Select';
|
|
5
|
-
export type { FormProps, TextBoxProps, TextAreaProps, CheckboxProps, RadioGroupProps, RadioItemProps, RadioOption, FormSwitchProps, FormConfig, FormContextValue, FieldValidationRules, FieldRegistration, } from './components/Form';
|
|
5
|
+
export type { FormProps, TextBoxProps, TextAreaProps, CheckboxProps, RadioGroupProps, RadioItemProps, RadioOption, FormSwitchProps, FormConfig, FormContextValue, FieldValidationRules, FieldRegistration, CountrySelectProps, FormCountrySelectProps, PhoneInputProps, FormPhoneInputProps, DatePickerProps, FormDatePickerProps, ComboboxProps, FormComboboxProps, } from './components/Form';
|
|
6
6
|
export type { SelectProps as FormSelectProps, SelectOption } from './components/Form/Select';
|
|
7
|
+
export { getCountryFlag, getCountryByCode, getCountryName, getCountryDialCode, formatE164, parseE164, COUNTRIES, } from './data/countries';
|
|
8
|
+
export type { Country } from './data/countries';
|
|
7
9
|
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
8
10
|
export type { CheckboxProps as StandaloneCheckboxProps } from './components/Checkbox/Checkbox';
|
|
9
11
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from './components/Card';
|
|
@@ -24,6 +26,12 @@ export type { TextareaProps } from './components/Textarea';
|
|
|
24
26
|
export { Switch } from './components/Switch';
|
|
25
27
|
export type { SwitchProps as StandaloneSwitchProps } from './components/Switch';
|
|
26
28
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/Dialog';
|
|
29
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './components/Sheet';
|
|
30
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/AlertDialog';
|
|
31
|
+
export { Progress } from './components/Progress';
|
|
32
|
+
export { Slider } from './components/Slider';
|
|
33
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './components/Breadcrumb';
|
|
34
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, } from './components/InputOTP';
|
|
27
35
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/Popover';
|
|
28
36
|
export { ScrollArea, ScrollBar } from './components/ScrollArea';
|
|
29
37
|
export { Toggle, toggleVariants } from './components/Toggle';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,OAAO,EACP,YAAY,EACZ,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,QAAQ,EACR,YAAY,GACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE/D,YAAY,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,aAAa,EACb,eAAe,EACf,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AAA;AAGlD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC/F,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG/D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGrG,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,15 @@ import { TextBox } from "./components/Form/TextBox.js";
|
|
|
7
7
|
import { TextArea } from "./components/Form/TextArea.js";
|
|
8
8
|
import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./primitives/select.js";
|
|
9
9
|
import { Select } from "./components/Form/Select.js";
|
|
10
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./primitives/dialog.js";
|
|
11
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./primitives/command.js";
|
|
12
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./primitives/popover.js";
|
|
13
|
+
import { COUNTRIES, formatE164, getCountryByCode, getCountryDialCode, getCountryFlag, getCountryName, parseE164 } from "./data/countries.js";
|
|
14
|
+
import { CountrySelect } from "./components/Form/CountrySelect.js";
|
|
15
|
+
import { PhoneInput } from "./components/Form/PhoneInput.js";
|
|
16
|
+
import { Calendar } from "./primitives/calendar.js";
|
|
17
|
+
import { DatePicker } from "./components/Form/DatePicker.js";
|
|
18
|
+
import { Combobox } from "./components/Form/Combobox.js";
|
|
10
19
|
import { Checkbox as Checkbox$1 } from "./components/Form/Checkbox.js";
|
|
11
20
|
import { RadioGroup, RadioItem } from "./components/Form/Radio.js";
|
|
12
21
|
import { FormSwitch } from "./components/Form/FormSwitch.js";
|
|
@@ -23,13 +32,15 @@ import { Input } from "./components/Input/Input.js";
|
|
|
23
32
|
import { Label } from "./components/Label/Label.js";
|
|
24
33
|
import { Textarea } from "./components/Textarea/Textarea.js";
|
|
25
34
|
import { Switch } from "./components/Switch/Switch.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
35
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from "./primitives/sheet.js";
|
|
36
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./primitives/alert-dialog.js";
|
|
37
|
+
import { Progress } from "./primitives/progress.js";
|
|
38
|
+
import { Slider } from "./primitives/slider.js";
|
|
39
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./primitives/breadcrumb.js";
|
|
40
|
+
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "./primitives/input-otp.js";
|
|
28
41
|
import { ScrollArea, ScrollBar } from "./primitives/scroll-area.js";
|
|
29
42
|
import { Toggle, toggleVariants } from "./primitives/toggle.js";
|
|
30
43
|
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./primitives/table.js";
|
|
31
|
-
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./primitives/command.js";
|
|
32
|
-
import { Calendar } from "./primitives/calendar.js";
|
|
33
44
|
import { Toaster } from "./primitives/sonner.js";
|
|
34
45
|
import { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./primitives/toast.js";
|
|
35
46
|
import { useToggle } from "./hooks/useToggle.js";
|
|
@@ -39,4 +50,4 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./comp
|
|
|
39
50
|
import { Skeleton } from "./components/Skeleton/Skeleton.js";
|
|
40
51
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/Accordion/Accordion.js";
|
|
41
52
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/Pagination/Pagination.js";
|
|
42
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, Checkbox$1 as FormCheckbox, FormConfigContext, Select as FormSelect, FormSwitch, Input, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioItem, ScrollArea, ScrollBar, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextArea, TextBox, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildZodSchemaFromRules, buttonVariants, cn, defaultFormConfig, toast, toggleVariants, useDebounce, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField, useToast, useToggle };
|
|
53
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, COUNTRIES, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountrySelect, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, Checkbox$1 as FormCheckbox, Combobox as FormCombobox, FormConfigContext, CountrySelect as FormCountrySelect, DatePicker as FormDatePicker, PhoneInput as FormPhoneInput, Select as FormSelect, FormSwitch, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioItem, ScrollArea, ScrollBar, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextArea, TextBox, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildZodSchemaFromRules, buttonVariants, cn, defaultFormConfig, formatE164, getCountryByCode, getCountryDialCode, getCountryFlag, getCountryName, parseE164, toast, toggleVariants, useDebounce, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField, useToast, useToggle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","names":[],"sources":["../../src/primitives/accordion.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDown } from \"lucide-react\"\r\nimport { cn } from \"@/utils/index\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <AccordionPrimitive.Item\r\n ref={ref}\r\n className={cn(\"border-b border-border\", className)}\r\n {...props}\r\n />\r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Header className=\"flex\">\r\n <AccordionPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\r\n </AccordionPrimitive.Trigger>\r\n </AccordionPrimitive.Header>\r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Content\r\n ref={ref}\r\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\r\n {...props}\r\n >\r\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\r\n </AccordionPrimitive.Content>\r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n"],"mappings":";;;;;;;AAKA,IAAM,YAAY,mBAAmB;AAErC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,mBAAmB,MAApB;CACO;CACL,WAAW,GAAG,0BAA0B,SAAS;CACjD,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc;AAE5B,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,QAApB;CAA2B,WAAU;
|
|
1
|
+
{"version":3,"file":"accordion.js","names":[],"sources":["../../src/primitives/accordion.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDown } from \"lucide-react\"\r\nimport { cn } from \"@/utils/index\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <AccordionPrimitive.Item\r\n ref={ref}\r\n className={cn(\"border-b border-border\", className)}\r\n {...props}\r\n />\r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Header className=\"flex\">\r\n <AccordionPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\r\n </AccordionPrimitive.Trigger>\r\n </AccordionPrimitive.Header>\r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Content\r\n ref={ref}\r\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\r\n {...props}\r\n >\r\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\r\n </AccordionPrimitive.Content>\r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n"],"mappings":";;;;;;;AAKA,IAAM,YAAY,mBAAmB;AAErC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,mBAAmB,MAApB;CACO;CACL,WAAW,GAAG,0BAA0B,SAAS;CACjD,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc;AAE5B,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,QAApB;CAA2B,WAAU;CACnC,UAAA,qBAAC,mBAAmB,SAApB;EACO;EACL,WAAW,GACT,kJACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACD,oBAAC,aAAD,EAAa,WAAU,2EAA4E,CAAA,CACzE;;AACH,CAAA,CAC5B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ;AAE1D,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,SAApB;CACO;CACL,WAAU;CACV,GAAI;CAEJ,UAAA,oBAAC,OAAD;EAAK,WAAW,GAAG,aAAa,SAAS;EAAI;CAAc,CAAA;AACjC,CAAA,CAC7B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
21
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/primitives/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,QAAA,MAAM,WAAW,iDAA4B,CAAA;AAE7C,QAAA,MAAM,kBAAkB,wHAA+B,CAAA;AAEvD,QAAA,MAAM,iBAAiB,uDAA8B,CAAA;AAErD,QAAA,MAAM,kBAAkB,wKAYtB,CAAA;AAGF,QAAA,MAAM,kBAAkB,wKAetB,CAAA;AAGF,QAAA,MAAM,iBAAiB;8BAGpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,iBAAiB;8BAGpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,gBAAgB,8KASpB,CAAA;AAGF,QAAA,MAAM,sBAAsB,wLAS1B,CAAA;AAIF,QAAA,MAAM,iBAAiB,6KASrB,CAAA;AAGF,QAAA,MAAM,iBAAiB,6KAarB,CAAA;AAGF,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { buttonVariants } from "./button.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
7
|
+
//#region src/primitives/alert-dialog.tsx
|
|
8
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
9
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
11
|
+
var AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
|
|
12
|
+
className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
|
|
13
|
+
...props,
|
|
14
|
+
ref
|
|
15
|
+
}));
|
|
16
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
17
|
+
var AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className),
|
|
20
|
+
...props
|
|
21
|
+
})] }));
|
|
22
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
23
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
28
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
33
|
+
var AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
|
|
34
|
+
ref,
|
|
35
|
+
className: cn("text-lg font-semibold", className),
|
|
36
|
+
...props
|
|
37
|
+
}));
|
|
38
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
39
|
+
var AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
|
|
40
|
+
ref,
|
|
41
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
42
|
+
...props
|
|
43
|
+
}));
|
|
44
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
45
|
+
var AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
|
|
46
|
+
ref,
|
|
47
|
+
className: cn(buttonVariants(), className),
|
|
48
|
+
...props
|
|
49
|
+
}));
|
|
50
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
51
|
+
var AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
|
|
52
|
+
ref,
|
|
53
|
+
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
|
|
54
|
+
...props
|
|
55
|
+
}));
|
|
56
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","names":[],"sources":["../../src/primitives/alert-dialog.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\n\nimport { cn } from \"@/utils/index\"\nimport { buttonVariants } from \"@/primitives/button\"\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n))\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n))\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n))\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n )}\n {...props}\n />\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"mappings":";;;;;;;AAMA,IAAM,cAAc,qBAAqB;AAEzC,IAAM,qBAAqB,qBAAqB;AAEhD,IAAM,oBAAoB,qBAAqB;AAE/C,IAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,SAAtB;CACE,WAAW,GACT,2JACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,mBAAmB,cAAc,qBAAqB,QAAQ;AAE9D,IAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAAC,qBAAqB,SAAtB;CACO;CACL,WAAW,GACT,+fACA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc,qBAAqB,QAAQ;AAE9D,IAAM,qBAAqB,EACzB,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,WAAW,GACT,oDACA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,IAAM,qBAAqB,EACzB,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,WAAW,GACT,iEACA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,OAAtB;CACO;CACL,WAAW,GAAG,yBAAyB,SAAS;CAChD,GAAI;AACL,CAAA,CACF;AACD,iBAAiB,cAAc,qBAAqB,MAAM;AAE1D,IAAM,yBAAyB,MAAM,YAGlC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,aAAtB;CACO;CACL,WAAW,GAAG,iCAAiC,SAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,uBAAuB,cACrB,qBAAqB,YAAY;AAEnC,IAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,QAAtB;CACO;CACL,WAAW,GAAG,eAAe,GAAG,SAAS;CACzC,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,qBAAqB,OAAO;AAE5D,IAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,QAAtB;CACO;CACL,WAAW,GACT,eAAe,EAAE,SAAS,UAAU,CAAC,GACrC,gBACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,qBAAqB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","names":[],"sources":["../../src/primitives/alert.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n"],"mappings":";;;;;;AAKA,IAAM,gBAAgB,IACpB,6JACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,aACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAEA,IAAM,QAAQ,MAAM,YAGjB,EAAE,WAAW,SAAS,GAAG,SAAS,QACnC,oBAAC,OAAD;CACO;CACL,MAAK;CACL,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;CACnD,GAAI;AACL,CAAA,CACF;AACD,MAAM,cAAc;AAEpB,IAAM,aAAa,MAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GAAG,gDAAgD,SAAS;CACvE,GAAI;AACL,CAAA,CACF;AACD,WAAW,cAAc;AAEzB,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,iCAAiC,SAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,iBAAiB,cAAc"}
|
|
1
|
+
{"version":3,"file":"alert.js","names":[],"sources":["../../src/primitives/alert.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/utils/index\"\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-background text-foreground\",\r\n destructive:\r\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Alert = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\r\n>(({ className, variant, ...props }, ref) => (\r\n <div\r\n ref={ref}\r\n role=\"alert\"\r\n className={cn(alertVariants({ variant }), className)}\r\n {...props}\r\n />\r\n))\r\nAlert.displayName = \"Alert\"\r\n\r\nconst AlertTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes<HTMLHeadingElement>\r\n>(({ className, ...props }, ref) => (\r\n <h5\r\n ref={ref}\r\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\r\n {...props}\r\n />\r\n))\r\nAlertTitle.displayName = \"AlertTitle\"\r\n\r\nconst AlertDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes<HTMLParagraphElement>\r\n>(({ className, ...props }, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\r\n {...props}\r\n />\r\n))\r\nAlertDescription.displayName = \"AlertDescription\"\r\n\r\nexport { Alert, AlertTitle, AlertDescription }\r\n"],"mappings":";;;;;;AAKA,IAAM,gBAAgB,IACpB,6JACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,aACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAEA,IAAM,QAAQ,MAAM,YAGjB,EAAE,WAAW,SAAS,GAAG,SAAS,QACnC,oBAAC,OAAD;CACO;CACL,MAAK;CACL,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;CACnD,GAAI;AACL,CAAA,CACF;AACD,MAAM,cAAc;AAEpB,IAAM,aAAa,MAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GAAG,gDAAgD,SAAS;CACvE,GAAI;AACL,CAAA,CACF;AACD,WAAW,cAAc;AAEzB,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,iCAAiC,SAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,iBAAiB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","names":[],"sources":["../../src/primitives/avatar.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],"mappings":";;;;;;AAKA,IAAM,SAAS,MAAM,YAGlB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,MAAjB;CACO;CACL,WAAW,GACT,iEACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,OAAO,cAAc,gBAAgB,KAAK;AAE1C,IAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,+BAA+B,SAAS;CACtD,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,UAAjB;CACO;CACL,WAAW,GACT,wEACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc,gBAAgB,SAAS"}
|
|
1
|
+
{"version":3,"file":"avatar.js","names":[],"sources":["../../src/primitives/avatar.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\r\n\r\nimport { cn } from \"@/utils\"\r\n\r\nconst Avatar = React.forwardRef<\r\n React.ElementRef<typeof AvatarPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\r\n>(({ className, ...props }, ref) => (\r\n <AvatarPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nAvatar.displayName = AvatarPrimitive.Root.displayName\r\n\r\nconst AvatarImage = React.forwardRef<\r\n React.ElementRef<typeof AvatarPrimitive.Image>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\r\n>(({ className, ...props }, ref) => (\r\n <AvatarPrimitive.Image\r\n ref={ref}\r\n className={cn(\"aspect-square h-full w-full\", className)}\r\n {...props}\r\n />\r\n))\r\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\r\n\r\nconst AvatarFallback = React.forwardRef<\r\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\r\n>(({ className, ...props }, ref) => (\r\n <AvatarPrimitive.Fallback\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\r\n\r\nexport { Avatar, AvatarImage, AvatarFallback }\r\n"],"mappings":";;;;;;AAKA,IAAM,SAAS,MAAM,YAGlB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,MAAjB;CACO;CACL,WAAW,GACT,iEACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,OAAO,cAAc,gBAAgB,KAAK;AAE1C,IAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,+BAA+B,SAAS;CACtD,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,UAAjB;CACO;CACL,WAAW,GACT,wEACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc,gBAAgB,SAAS"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const BreadcrumbSeparator: {
|
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BreadcrumbEllipsis: {
|
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
20
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/primitives/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,UAAU;gBAGA,KAAK,CAAC,SAAS;qCAE+C,CAAA;AAG9E,QAAA,MAAM,cAAc,2KAYlB,CAAA;AAGF,QAAA,MAAM,cAAc,kKASlB,CAAA;AAGF,QAAA,MAAM,cAAc;cAGN,OAAO;2CAYnB,CAAA;AAGF,QAAA,MAAM,cAAc,sKAYlB,CAAA;AAGF,QAAA,MAAM,mBAAmB;wCAItB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;;CAS5B,CAAA;AAGD,QAAA,MAAM,kBAAkB;8BAGrB,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;;CAU9B,CAAA;AAGD,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
7
|
+
//#region src/primitives/breadcrumb.tsx
|
|
8
|
+
var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", {
|
|
9
|
+
ref,
|
|
10
|
+
"aria-label": "breadcrumb",
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
14
|
+
var BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ol", {
|
|
15
|
+
ref,
|
|
16
|
+
className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className),
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
20
|
+
var BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", {
|
|
21
|
+
ref,
|
|
22
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
23
|
+
...props
|
|
24
|
+
}));
|
|
25
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
26
|
+
var BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
27
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
28
|
+
ref,
|
|
29
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
34
|
+
var BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
|
|
35
|
+
ref,
|
|
36
|
+
role: "link",
|
|
37
|
+
"aria-disabled": "true",
|
|
38
|
+
"aria-current": "page",
|
|
39
|
+
className: cn("font-normal text-foreground", className),
|
|
40
|
+
...props
|
|
41
|
+
}));
|
|
42
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
43
|
+
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
44
|
+
role: "presentation",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
47
|
+
...props,
|
|
48
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
49
|
+
});
|
|
50
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
51
|
+
var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
|
|
52
|
+
role: "presentation",
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: "sr-only",
|
|
58
|
+
children: "More"
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/primitives/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />)\nBreadcrumb.displayName = \"Breadcrumb\"\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n))\nBreadcrumbList.displayName = \"BreadcrumbList\"\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n))\nBreadcrumbItem.displayName = \"BreadcrumbItem\"\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n})\nBreadcrumbLink.displayName = \"BreadcrumbLink\"\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n))\nBreadcrumbPage.displayName = \"BreadcrumbPage\"\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n)\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\"\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n)\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\"\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n"],"mappings":";;;;;;;AAMA,IAAM,aAAa,MAAM,YAKtB,EAAE,GAAG,SAAS,QAAQ,oBAAC,OAAD;CAAU;CAAK,cAAW;CAAa,GAAI;AAAQ,CAAA,CAAC;AAC7E,WAAW,cAAc;AAEzB,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variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export { ButtonPrimitive, buttonVariants };
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, Button as ButtonPrimitive, buttonVariants };
|
|
12
|
+
export type { ButtonProps as ButtonPrimitiveProps };
|
|
12
13
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/primitives/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/primitives/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EA2BnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,eAAe,EAAE,cAAc,EAAE,CAAA;AAC5D,YAAY,EAAE,WAAW,IAAI,oBAAoB,EAAE,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/primitives/button.tsx
|
|
8
|
-
var buttonVariants = cva("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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
8
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -17,8 +17,8 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
default: "h-10 px-4 py-2",
|
|
20
|
-
sm: "h-9 px-3",
|
|
21
|
-
lg: "h-11 px-8",
|
|
20
|
+
sm: "h-9 rounded-md px-3",
|
|
21
|
+
lg: "h-11 rounded-md px-8",
|
|
22
22
|
icon: "h-10 w-10"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
@@ -27,19 +27,19 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
27
27
|
size: "default"
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
var
|
|
30
|
+
var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
31
31
|
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
32
|
-
ref,
|
|
33
32
|
className: cn(buttonVariants({
|
|
34
33
|
variant,
|
|
35
34
|
size,
|
|
36
35
|
className
|
|
37
36
|
})),
|
|
37
|
+
ref,
|
|
38
38
|
...props
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
Button.displayName = "Button";
|
|
42
42
|
//#endregion
|
|
43
|
-
export { ButtonPrimitive, buttonVariants };
|
|
43
|
+
export { Button, Button as ButtonPrimitive, buttonVariants };
|
|
44
44
|
|
|
45
45
|
//# sourceMappingURL=button.js.map
|