@majapisoftwares/ui 4.3.17 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +27 -0
- package/README.md +79 -0
- package/THIRD_PARTY_NOTICES.md +39 -0
- package/components.json +25 -0
- package/docs/MIGRATION-0.2.md +20 -0
- package/docs/MIGRATION-6.0.md +33 -0
- package/docs/NEXT-STARTER-VALIDATION.md +14 -0
- package/docs/STANDARDS.md +41 -0
- package/docs/VALIDATION.md +11 -0
- package/docs/VERSIONING.md +28 -0
- package/package.json +78 -2
- package/scripts/check-standards.mjs +41 -0
- package/src/components/ui/accordion.tsx +82 -0
- package/src/components/ui/alert-dialog.tsx +187 -0
- package/src/components/ui/alert.tsx +77 -0
- package/src/components/ui/avatar.tsx +108 -0
- package/src/components/ui/badge.tsx +55 -0
- package/src/components/ui/breadcrumb.tsx +125 -0
- package/src/components/ui/button-group.tsx +89 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/card.tsx +101 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/context-menu.tsx +271 -0
- package/src/components/ui/dialog.tsx +161 -0
- package/src/components/ui/dropdown-menu.tsx +271 -0
- package/src/components/ui/empty.tsx +105 -0
- package/src/components/ui/field.tsx +238 -0
- package/src/components/ui/hover-card.tsx +50 -0
- package/src/components/ui/input-group.tsx +155 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/kbd.tsx +28 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/orb.css +1002 -0
- package/src/components/ui/orb.tsx +752 -0
- package/src/components/ui/popover.tsx +89 -0
- package/src/components/ui/progress.tsx +82 -0
- package/src/components/ui/radio-group.tsx +37 -0
- package/src/components/ui/scroll-area.tsx +54 -0
- package/src/components/ui/select.tsx +204 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +1035 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +53 -0
- package/src/components/ui/sonner.tsx +44 -0
- package/src/components/ui/spinner.tsx +32 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/table.tsx +121 -0
- package/src/components/ui/tabs.tsx +81 -0
- package/src/components/ui/textarea.tsx +19 -0
- package/src/components/ui/toggle-group.tsx +89 -0
- package/src/components/ui/toggle.tsx +44 -0
- package/src/components/ui/tooltip.tsx +65 -0
- package/src/hooks/use-mobile.ts +20 -0
- package/src/lib/i18n.tsx +109 -0
- package/src/lib/utils.ts +1 -0
- package/src/patterns/app-shell.tsx +175 -0
- package/src/patterns/data-table.tsx +2486 -0
- package/src/patterns/details-sheet.tsx +53 -0
- package/src/patterns/filter-tabs.tsx +53 -0
- package/src/patterns/majapi-logo.tsx +32 -0
- package/src/patterns/page-header.tsx +62 -0
- package/src/patterns/preferences.tsx +172 -0
- package/src/patterns/status-badge.tsx +24 -0
- package/src/styles.css +165 -0
- package/src/templates/admin-dashboard.tsx +44 -0
- package/src/templates/auth-layout.tsx +30 -0
- package/src/templates/login-form.tsx +129 -0
- package/src/templates/signup-form.tsx +177 -0
- package/base.css +0 -360
- package/bootstrap/AppProps.d.ts +0 -9
- package/bootstrap/AppProps.js +0 -1
- package/bootstrap/index.d.ts +0 -1
- package/bootstrap/index.js +0 -1
- package/bootstrap/modeScript.d.ts +0 -2
- package/bootstrap/modeScript.js +0 -35
- package/bootstrap/nprogress.d.ts +0 -1
- package/bootstrap/nprogress.js +0 -19
- package/bootstrap/scrolledScript.d.ts +0 -2
- package/bootstrap/scrolledScript.js +0 -27
- package/bootstrap/setupFocusManager.d.ts +0 -1
- package/bootstrap/setupFocusManager.js +0 -13
- package/bootstrap/suppressConsoleLog.d.ts +0 -1
- package/bootstrap/suppressConsoleLog.js +0 -8
- package/components/Accordion/Accordion.d.ts +0 -16
- package/components/Accordion/Accordion.jsx +0 -27
- package/components/Accordion/index.d.ts +0 -3
- package/components/Accordion/index.jsx +0 -3
- package/components/Alert/Alert.d.ts +0 -31
- package/components/Alert/Alert.jsx +0 -53
- package/components/Alert/index.d.ts +0 -3
- package/components/Alert/index.jsx +0 -3
- package/components/AntiClickjacking/AntiClickjacking.d.ts +0 -1
- package/components/AntiClickjacking/AntiClickjacking.jsx +0 -17
- package/components/AntiClickjacking/index.d.ts +0 -2
- package/components/AntiClickjacking/index.jsx +0 -2
- package/components/Aurora/Aurora.d.ts +0 -10
- package/components/Aurora/Aurora.jsx +0 -189
- package/components/Aurora/index.d.ts +0 -3
- package/components/Aurora/index.jsx +0 -3
- package/components/Autocomplete/Autocomplete.d.ts +0 -7
- package/components/Autocomplete/Autocomplete.jsx +0 -23
- package/components/Autocomplete/UnstyledAutocomplete.d.ts +0 -36
- package/components/Autocomplete/UnstyledAutocomplete.jsx +0 -72
- package/components/Autocomplete/index.d.ts +0 -5
- package/components/Autocomplete/index.jsx +0 -5
- package/components/BackgroundEffects/BottomBlurryPoint.d.ts +0 -3
- package/components/BackgroundEffects/BottomBlurryPoint.jsx +0 -14
- package/components/BackgroundEffects/TopBlurryPoint.d.ts +0 -3
- package/components/BackgroundEffects/TopBlurryPoint.jsx +0 -14
- package/components/Badge/Badge.d.ts +0 -42
- package/components/Badge/Badge.jsx +0 -51
- package/components/Badge/index.d.ts +0 -3
- package/components/Badge/index.jsx +0 -3
- package/components/Breadcrumbs/Breadcrumbs.d.ts +0 -20
- package/components/Breadcrumbs/Breadcrumbs.jsx +0 -42
- package/components/Breadcrumbs/index.d.ts +0 -3
- package/components/Breadcrumbs/index.jsx +0 -3
- package/components/Button/Button.d.ts +0 -111
- package/components/Button/Button.jsx +0 -129
- package/components/Button/UnstyledButton.d.ts +0 -10
- package/components/Button/UnstyledButton.jsx +0 -13
- package/components/Button/index.d.ts +0 -3
- package/components/Button/index.jsx +0 -3
- package/components/Carousel/Carousel.d.ts +0 -19
- package/components/Carousel/Carousel.jsx +0 -55
- package/components/Carousel/index.d.ts +0 -3
- package/components/Carousel/index.jsx +0 -3
- package/components/Checkbox/Checkbox.d.ts +0 -14
- package/components/Checkbox/Checkbox.jsx +0 -45
- package/components/Checkbox/index.d.ts +0 -3
- package/components/Checkbox/index.js +0 -3
- package/components/Code/Code.d.ts +0 -12
- package/components/Code/Code.jsx +0 -25
- package/components/Code/Json.d.ts +0 -5
- package/components/Code/Json.jsx +0 -7
- package/components/Code/index.d.ts +0 -4
- package/components/Code/index.jsx +0 -4
- package/components/ConfirmationButton/ConfirmationButton.d.ts +0 -17
- package/components/ConfirmationButton/ConfirmationButton.jsx +0 -13
- package/components/ConfirmationButton/index.d.ts +0 -3
- package/components/ConfirmationButton/index.jsx +0 -3
- package/components/ContextMenu/ContextMenu.d.ts +0 -28
- package/components/ContextMenu/ContextMenu.jsx +0 -70
- package/components/ContextMenu/index.d.ts +0 -3
- package/components/ContextMenu/index.jsx +0 -3
- package/components/CopyButton/CopyButton.d.ts +0 -7
- package/components/CopyButton/CopyButton.jsx +0 -29
- package/components/CopyButton/index.d.ts +0 -3
- package/components/CopyButton/index.jsx +0 -3
- package/components/DateInput/DateInput.d.ts +0 -6
- package/components/DateInput/DateInput.jsx +0 -19
- package/components/DateInput/DateTimeInput.d.ts +0 -3
- package/components/DateInput/DateTimeInput.jsx +0 -8
- package/components/DateInput/index.d.ts +0 -4
- package/components/DateInput/index.jsx +0 -4
- package/components/DateInput/useRefValue.d.ts +0 -5
- package/components/DateInput/useRefValue.js +0 -48
- package/components/DatePicker/DatePicker.d.ts +0 -19
- package/components/DatePicker/DatePicker.jsx +0 -55
- package/components/DatePicker/index.d.ts +0 -3
- package/components/DatePicker/index.jsx +0 -3
- package/components/DateRangePicker/DateRangePicker.d.ts +0 -16
- package/components/DateRangePicker/DateRangePicker.jsx +0 -56
- package/components/DateRangePicker/index.d.ts +0 -3
- package/components/DateRangePicker/index.jsx +0 -3
- package/components/Dialog/Dialog.d.ts +0 -25
- package/components/Dialog/Dialog.jsx +0 -35
- package/components/Dialog/Dialogs.d.ts +0 -1
- package/components/Dialog/Dialogs.jsx +0 -21
- package/components/Dialog/dialogs.state.d.ts +0 -21
- package/components/Dialog/dialogs.state.js +0 -40
- package/components/Dialog/index.d.ts +0 -6
- package/components/Dialog/index.jsx +0 -7
- package/components/Drawer/Drawer.d.ts +0 -15
- package/components/Drawer/Drawer.jsx +0 -72
- package/components/Drawer/index.d.ts +0 -3
- package/components/Drawer/index.jsx +0 -3
- package/components/DropdownMenu/DropdownMenu.d.ts +0 -33
- package/components/DropdownMenu/DropdownMenu.jsx +0 -74
- package/components/DropdownMenu/index.d.ts +0 -3
- package/components/DropdownMenu/index.jsx +0 -3
- package/components/ErrorBoundary/ErrorBoundary.d.ts +0 -18
- package/components/ErrorBoundary/ErrorBoundary.jsx +0 -32
- package/components/ErrorBoundary/index.d.ts +0 -3
- package/components/ErrorBoundary/index.jsx +0 -3
- package/components/ErrorPage/Error404Page.d.ts +0 -1
- package/components/ErrorPage/Error404Page.jsx +0 -4
- package/components/ErrorPage/Error500Page.d.ts +0 -1
- package/components/ErrorPage/Error500Page.jsx +0 -4
- package/components/ErrorPage/ErrorPage.d.ts +0 -11
- package/components/ErrorPage/ErrorPage.jsx +0 -23
- package/components/FileInput/FileInput.d.ts +0 -53
- package/components/FileInput/FileInput.jsx +0 -141
- package/components/FileInput/PreviewFile.d.ts +0 -18
- package/components/FileInput/PreviewFile.jsx +0 -54
- package/components/FileInput/index.d.ts +0 -3
- package/components/FileInput/index.jsx +0 -3
- package/components/FileInput/isImage.d.ts +0 -1
- package/components/FileInput/isImage.js +0 -10
- package/components/FileInput/isVideo.d.ts +0 -1
- package/components/FileInput/isVideo.js +0 -10
- package/components/FileSelect/FileSelect.d.ts +0 -31
- package/components/FileSelect/FileSelect.jsx +0 -146
- package/components/FileSelect/index.d.ts +0 -3
- package/components/FileSelect/index.jsx +0 -3
- package/components/Footer/Footer.d.ts +0 -19
- package/components/Footer/Footer.jsx +0 -30
- package/components/Footer/index.d.ts +0 -3
- package/components/Footer/index.jsx +0 -3
- package/components/GridPattern/GridPattern.d.ts +0 -2
- package/components/GridPattern/GridPattern.jsx +0 -12
- package/components/GridPattern/index.d.ts +0 -3
- package/components/GridPattern/index.jsx +0 -3
- package/components/Group/Group.d.ts +0 -5
- package/components/Group/Group.jsx +0 -6
- package/components/Group/index.d.ts +0 -3
- package/components/Group/index.jsx +0 -3
- package/components/Header/Header.d.ts +0 -5
- package/components/Header/Header.jsx +0 -19
- package/components/Header/index.d.ts +0 -3
- package/components/Header/index.jsx +0 -3
- package/components/ImageInput/ImageInput.d.ts +0 -4
- package/components/ImageInput/ImageInput.jsx +0 -8
- package/components/ImageInput/index.d.ts +0 -3
- package/components/ImageInput/index.jsx +0 -3
- package/components/Input/Input.d.ts +0 -14
- package/components/Input/Input.jsx +0 -57
- package/components/Input/InputIcon.d.ts +0 -9
- package/components/Input/InputIcon.jsx +0 -7
- package/components/Input/MultiSelectInput.d.ts +0 -16
- package/components/Input/MultiSelectInput.jsx +0 -48
- package/components/Input/NumericInput.d.ts +0 -6
- package/components/Input/NumericInput.jsx +0 -6
- package/components/Input/PatternInput.d.ts +0 -6
- package/components/Input/PatternInput.jsx +0 -6
- package/components/Input/SelectInput.d.ts +0 -12
- package/components/Input/SelectInput.jsx +0 -25
- package/components/Input/UnstyledInput.d.ts +0 -22
- package/components/Input/UnstyledInput.jsx +0 -28
- package/components/Input/index.d.ts +0 -6
- package/components/Input/index.jsx +0 -6
- package/components/Input/useInputRefValue.d.ts +0 -11
- package/components/Input/useInputRefValue.jsx +0 -51
- package/components/Input2/InputWrapper.d.ts +0 -11
- package/components/Input2/InputWrapper.jsx +0 -11
- package/components/Link/Link.d.ts +0 -3
- package/components/Link/Link.jsx +0 -9
- package/components/Link/index.d.ts +0 -3
- package/components/Link/index.jsx +0 -3
- package/components/Loading/Loading.d.ts +0 -5
- package/components/Loading/Loading.jsx +0 -15
- package/components/Loading/index.d.ts +0 -3
- package/components/Loading/index.jsx +0 -3
- package/components/Magnet/Magnet.d.ts +0 -13
- package/components/Magnet/Magnet.jsx +0 -50
- package/components/Magnet/index.d.ts +0 -3
- package/components/Magnet/index.jsx +0 -3
- package/components/Markdown/Markdown.d.ts +0 -8
- package/components/Markdown/Markdown.jsx +0 -11
- package/components/Markdown/index.d.ts +0 -3
- package/components/Markdown/index.jsx +0 -3
- package/components/Menu/Menu.d.ts +0 -28
- package/components/Menu/Menu.jsx +0 -54
- package/components/Modal/Modal.d.ts +0 -45
- package/components/Modal/Modal.jsx +0 -65
- package/components/Modal/index.d.ts +0 -4
- package/components/Modal/index.jsx +0 -4
- package/components/Modal/useModalState.d.ts +0 -6
- package/components/Modal/useModalState.js +0 -16
- package/components/ModeToggle/ModeToggle.d.ts +0 -9
- package/components/ModeToggle/ModeToggle.jsx +0 -12
- package/components/ModeToggle/index.d.ts +0 -4
- package/components/ModeToggle/index.jsx +0 -5
- package/components/ModeToggle/useModeToggle.d.ts +0 -1
- package/components/ModeToggle/useModeToggle.js +0 -21
- package/components/MultiSelect/MultiSelect.d.ts +0 -28
- package/components/MultiSelect/MultiSelect.jsx +0 -116
- package/components/MultiSelect/MultiSelectInput.d.ts +0 -12
- package/components/MultiSelect/MultiSelectInput.jsx +0 -27
- package/components/MultiSelect/index.d.ts +0 -5
- package/components/MultiSelect/index.jsx +0 -5
- package/components/MultiText/MultiText.d.ts +0 -23
- package/components/MultiText/MultiText.jsx +0 -118
- package/components/MultiText/index.d.ts +0 -3
- package/components/MultiText/index.jsx +0 -3
- package/components/NavigationDrawer/NavigationDrawer.d.ts +0 -9
- package/components/NavigationDrawer/NavigationDrawer.jsx +0 -29
- package/components/NavigationDrawer/NavigationItem.d.ts +0 -13
- package/components/NavigationDrawer/NavigationItem.jsx +0 -24
- package/components/NavigationDrawer/index.d.ts +0 -6
- package/components/NavigationDrawer/index.jsx +0 -6
- package/components/NavigationDrawer/navigationDrawer.state.d.ts +0 -9
- package/components/NavigationDrawer/navigationDrawer.state.js +0 -19
- package/components/NoSsr/NoSsr.d.ts +0 -4
- package/components/NoSsr/NoSsr.jsx +0 -8
- package/components/NoSsr/index.d.ts +0 -3
- package/components/NoSsr/index.jsx +0 -3
- package/components/Noise/Noise.d.ts +0 -11
- package/components/Noise/Noise.jsx +0 -69
- package/components/Noise/index.d.ts +0 -3
- package/components/Noise/index.jsx +0 -3
- package/components/Notifications/Notifications.d.ts +0 -3
- package/components/Notifications/Notifications.jsx +0 -60
- package/components/Notifications/index.d.ts +0 -5
- package/components/Notifications/index.jsx +0 -6
- package/components/Notifications/notifications.state.d.ts +0 -24
- package/components/Notifications/notifications.state.js +0 -41
- package/components/Orb/Orb.d.ts +0 -8
- package/components/Orb/Orb.jsx +0 -258
- package/components/Orb/index.d.ts +0 -3
- package/components/Orb/index.jsx +0 -3
- package/components/Pagination/Pagination.d.ts +0 -13
- package/components/Pagination/Pagination.jsx +0 -64
- package/components/Pagination/index.d.ts +0 -3
- package/components/Pagination/index.jsx +0 -3
- package/components/Particles/Particles.d.ts +0 -18
- package/components/Particles/Particles.jsx +0 -205
- package/components/Particles/index.d.ts +0 -3
- package/components/Particles/index.jsx +0 -3
- package/components/PictureCropInput/PictureCropInput.d.ts +0 -20
- package/components/PictureCropInput/PictureCropInput.jsx +0 -174
- package/components/PictureCropInput/canvasPreview.d.ts +0 -2
- package/components/PictureCropInput/canvasPreview.js +0 -37
- package/components/PictureCropInput/index.d.ts +0 -3
- package/components/PictureCropInput/index.js +0 -3
- package/components/Popover/Popover.d.ts +0 -13
- package/components/Popover/Popover.jsx +0 -22
- package/components/Popover/index.d.ts +0 -3
- package/components/Popover/index.jsx +0 -3
- package/components/Resizable/Resizable.d.ts +0 -12
- package/components/Resizable/Resizable.jsx +0 -54
- package/components/Resizable/index.d.ts +0 -3
- package/components/Resizable/index.jsx +0 -3
- package/components/ScrollArea/ScrollArea.d.ts +0 -9
- package/components/ScrollArea/ScrollArea.jsx +0 -16
- package/components/ScrollArea/index.d.ts +0 -3
- package/components/ScrollArea/index.jsx +0 -3
- package/components/Select/Select.d.ts +0 -25
- package/components/Select/Select.jsx +0 -55
- package/components/Select/index.d.ts +0 -3
- package/components/Select/index.jsx +0 -3
- package/components/Skeleton/Skeleton.d.ts +0 -2
- package/components/Skeleton/Skeleton.jsx +0 -8
- package/components/Skeleton/index.d.ts +0 -3
- package/components/Skeleton/index.jsx +0 -3
- package/components/Slider/Slider.d.ts +0 -10
- package/components/Slider/Slider.jsx +0 -21
- package/components/Slider/index.d.ts +0 -3
- package/components/Slider/index.jsx +0 -3
- package/components/Spotlight/Spotlight.d.ts +0 -30
- package/components/Spotlight/Spotlight.jsx +0 -86
- package/components/Spotlight/index.d.ts +0 -3
- package/components/Spotlight/index.jsx +0 -3
- package/components/SpotlightCard/SpotlightCard.d.ts +0 -7
- package/components/SpotlightCard/SpotlightCard.jsx +0 -35
- package/components/SpotlightCard/index.d.ts +0 -3
- package/components/SpotlightCard/index.jsx +0 -3
- package/components/Stack/Stack.d.ts +0 -4
- package/components/Stack/Stack.jsx +0 -5
- package/components/Stack/index.d.ts +0 -3
- package/components/Stack/index.jsx +0 -3
- package/components/StarBorder/StarBorder.d.ts +0 -10
- package/components/StarBorder/StarBorder.jsx +0 -19
- package/components/StarBorder/index.d.ts +0 -3
- package/components/StarBorder/index.jsx +0 -3
- package/components/Switch/Switch.d.ts +0 -16
- package/components/Switch/Switch.jsx +0 -24
- package/components/Switch/index.d.ts +0 -3
- package/components/Switch/index.jsx +0 -3
- package/components/Table/DataTable.d.ts +0 -57
- package/components/Table/DataTable.jsx +0 -155
- package/components/Table/Table.d.ts +0 -27
- package/components/Table/Table.jsx +0 -31
- package/components/Table/TableActionButton.d.ts +0 -6
- package/components/Table/TableActionButton.jsx +0 -20
- package/components/Table/TableBody.d.ts +0 -6
- package/components/Table/TableBody.jsx +0 -10
- package/components/Table/TableCell.d.ts +0 -9
- package/components/Table/TableCell.jsx +0 -18
- package/components/Table/TableFooter.d.ts +0 -5
- package/components/Table/TableFooter.jsx +0 -5
- package/components/Table/TableFooterWithPagination.d.ts +0 -13
- package/components/Table/TableFooterWithPagination.jsx +0 -57
- package/components/Table/TableHead.d.ts +0 -5
- package/components/Table/TableHead.jsx +0 -9
- package/components/Table/TableHeadContext.d.ts +0 -4
- package/components/Table/TableHeadContext.jsx +0 -3
- package/components/Table/TableHeader.d.ts +0 -7
- package/components/Table/TableHeader.jsx +0 -15
- package/components/Table/TableRow.d.ts +0 -8
- package/components/Table/TableRow.jsx +0 -9
- package/components/Table/index.d.ts +0 -3
- package/components/Table/index.jsx +0 -3
- package/components/Tabs/Tabs.d.ts +0 -9
- package/components/Tabs/Tabs.jsx +0 -13
- package/components/Tabs/index.d.ts +0 -3
- package/components/Tabs/index.jsx +0 -3
- package/components/TabsSwitcher/Tab.d.ts +0 -15
- package/components/TabsSwitcher/Tab.jsx +0 -18
- package/components/TabsSwitcher/TabsSwitcher.d.ts +0 -22
- package/components/TabsSwitcher/TabsSwitcher.jsx +0 -31
- package/components/TabsSwitcher/index.d.ts +0 -4
- package/components/TabsSwitcher/index.jsx +0 -4
- package/components/Text/Text.d.ts +0 -24
- package/components/Text/Text.jsx +0 -29
- package/components/Text/index.d.ts +0 -3
- package/components/Text/index.jsx +0 -3
- package/components/Textarea/Textarea.d.ts +0 -5
- package/components/Textarea/Textarea.jsx +0 -6
- package/components/Textarea/index.d.ts +0 -3
- package/components/Textarea/index.js +0 -3
- package/components/Threads/Threads.d.ts +0 -9
- package/components/Threads/Threads.jsx +0 -203
- package/components/Threads/index.d.ts +0 -3
- package/components/Threads/index.jsx +0 -3
- package/components/Tooltip/Tooltip.d.ts +0 -11
- package/components/Tooltip/Tooltip.jsx +0 -21
- package/components/Tooltip/index.d.ts +0 -3
- package/components/Tooltip/index.jsx +0 -3
- package/components/VisibilityActivatedButton/VisibilityActivatedButton.d.ts +0 -7
- package/components/VisibilityActivatedButton/VisibilityActivatedButton.jsx +0 -18
- package/components/VisibilityActivatedButton/index.d.ts +0 -3
- package/components/VisibilityActivatedButton/index.jsx +0 -3
- package/form.d.ts +0 -82
- package/form.js +0 -113
- package/form2.d.ts +0 -15
- package/form2.jsx +0 -30
- package/hooks/useBeforeUnload.d.ts +0 -1
- package/hooks/useBeforeUnload.js +0 -17
- package/hooks/useDebounceEffect.d.ts +0 -2
- package/hooks/useDebounceEffect.js +0 -14
- package/hooks/useDebouncedValue.d.ts +0 -2
- package/hooks/useDebouncedValue.js +0 -14
- package/hooks/useLagRadar.d.ts +0 -1
- package/hooks/useLagRadar.jsx +0 -124
- package/hooks/useMediaQuery.d.ts +0 -1
- package/hooks/useMediaQuery.js +0 -37
- package/hooks/useMutationWindowCloseProtection.d.ts +0 -2
- package/hooks/useMutationWindowCloseProtection.js +0 -13
- package/hooks/useScroll.d.ts +0 -3
- package/hooks/useScroll.js +0 -47
- package/hooks/useTranslation.d.ts +0 -4
- package/hooks/useTranslation.js +0 -11
- package/hooks/useWhyDidYouUpdate.d.ts +0 -3
- package/hooks/useWhyDidYouUpdate.js +0 -44
- package/imgur.d.ts +0 -1
- package/imgur.js +0 -13
- package/styles/DayPicker.classNames.d.ts +0 -29
- package/styles/DayPicker.classNames.js +0 -30
- package/styles/DayPicker.classNames.ts +0 -81
- package/styles/Dropdown.classNames.d.ts +0 -6
- package/styles/Dropdown.classNames.js +0 -7
- package/styles/Dropdown.classNames.ts +0 -38
- package/styles/Input.css +0 -23
- package/styles/Modal.classNames.d.ts +0 -2
- package/styles/Modal.classNames.js +0 -3
- package/styles/Modal.classNames.ts +0 -15
- package/styles/MultiText.css +0 -40
- package/styles/Pagination.css +0 -19
- package/styles/Tabs.css +0 -23
- package/tsconfig.tsbuildinfo +0 -1
- package/types.d.ts +0 -6
- package/types.js +0 -1
- package/utils/UseState.d.ts +0 -2
- package/utils/UseState.js +0 -1
- package/utils/blobToText.d.ts +0 -1
- package/utils/blobToText.js +0 -13
- package/utils/capitalize.d.ts +0 -1
- package/utils/capitalize.js +0 -6
- package/utils/clsx.d.ts +0 -2
- package/utils/clsx.js +0 -5
- package/utils/copy2DToClipboard.d.ts +0 -1
- package/utils/copy2DToClipboard.js +0 -44
- package/utils/cpfCpnjUtils.d.ts +0 -3
- package/utils/cpfCpnjUtils.js +0 -43
- package/utils/createLocalStorageStateHydration.d.ts +0 -1
- package/utils/createLocalStorageStateHydration.js +0 -18
- package/utils/createStateHydration.d.ts +0 -3
- package/utils/createStateHydration.js +0 -49
- package/utils/csvBlobToJson.d.ts +0 -2
- package/utils/csvBlobToJson.js +0 -59
- package/utils/downloadArrayAsCSV.d.ts +0 -1
- package/utils/downloadArrayAsCSV.js +0 -34
- package/utils/emailRegExp.d.ts +0 -2
- package/utils/emailRegExp.js +0 -2
- package/utils/fakeArray.d.ts +0 -1
- package/utils/fakeArray.js +0 -3
- package/utils/filterBoolean.d.ts +0 -1
- package/utils/filterBoolean.js +0 -3
- package/utils/formatClock.d.ts +0 -1
- package/utils/formatClock.js +0 -21
- package/utils/getInitials.d.ts +0 -4
- package/utils/getInitials.js +0 -22
- package/utils/isBrowser.d.ts +0 -12
- package/utils/isBrowser.js +0 -26
- package/utils/ms.d.ts +0 -6
- package/utils/ms.js +0 -31
- package/utils/preventDefault.d.ts +0 -2
- package/utils/preventDefault.js +0 -3
- package/utils/recursiveChildrenMap.d.ts +0 -2
- package/utils/recursiveChildrenMap.js +0 -16
- package/utils/setSelectionRange.d.ts +0 -1
- package/utils/setSelectionRange.js +0 -55
- package/utils/smoothScrollToHref.d.ts +0 -2
- package/utils/smoothScrollToHref.js +0 -14
- package/utils/stopPropagation.d.ts +0 -2
- package/utils/stopPropagation.js +0 -3
- package/utils/stripHtml.d.ts +0 -1
- package/utils/stripHtml.js +0 -4
- package/utils/stripLineBreak.d.ts +0 -1
- package/utils/stripLineBreak.js +0 -4
- package/utils/stripMarkdown.d.ts +0 -1
- package/utils/stripMarkdown.js +0 -28
- package/utils/xlsxBlobToJson.d.ts +0 -2
- package/utils/xlsxBlobToJson.js +0 -62
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from "react";
|
|
2
|
-
import * as RSelect from "@radix-ui/react-select";
|
|
3
|
-
import Button from "../Button";
|
|
4
|
-
declare function SelectContent({ className, children, ...props }: ComponentProps<typeof RSelect.Content>): import("react").JSX.Element;
|
|
5
|
-
declare function SelectSeparator({ className, ...props }: ComponentProps<typeof RSelect.Separator>): import("react").JSX.Element;
|
|
6
|
-
declare function SelectItem({ children, className, indicatorClassName, ...props }: ComponentProps<typeof RSelect.Item> & {
|
|
7
|
-
indicatorClassName?: string;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
declare function SelectTrigger({ className, placeholder, children, readOnly, ref, buttonClassName, ...props }: ComponentProps<typeof RSelect.Trigger> & ComponentProps<typeof Button> & {
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
buttonClassName?: string;
|
|
12
|
-
}): import("react").JSX.Element;
|
|
13
|
-
declare function SelectLabel({ className, ...props }: ComponentProps<typeof RSelect.Label>): import("react").JSX.Element;
|
|
14
|
-
declare const Select: {
|
|
15
|
-
Root: import("react").FC<RSelect.SelectProps>;
|
|
16
|
-
Item: typeof SelectItem;
|
|
17
|
-
Trigger: typeof SelectTrigger;
|
|
18
|
-
Content: typeof SelectContent;
|
|
19
|
-
Group: import("react").ForwardRefExoticComponent<RSelect.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
-
Label: typeof SelectLabel;
|
|
21
|
-
Separator: typeof SelectSeparator;
|
|
22
|
-
Icon: import("react").ForwardRefExoticComponent<RSelect.SelectIconProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
23
|
-
Value: import("react").ForwardRefExoticComponent<RSelect.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
24
|
-
};
|
|
25
|
-
export default Select;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as RSelect from "@radix-ui/react-select";
|
|
2
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon, } from "@heroicons/react/16/solid";
|
|
3
|
-
import Button from "../Button";
|
|
4
|
-
import clsx from "../../utils/clsx";
|
|
5
|
-
import { dropdownItemClassName, dropdownItemIndicatorClassName, dropdownLabelClassName, dropdownSeparatorClassName, } from "../../styles/Dropdown.classNames";
|
|
6
|
-
import { modalContentClassName } from "../../styles/Modal.classNames";
|
|
7
|
-
const selectScrollButtonClassName = clsx("ui-select-scroll-button", "flex h-6 cursor-default items-center justify-center", "bg-white", "dark:bg-zinc-900", "[&>svg]:w-4 [&>svg]:h-4");
|
|
8
|
-
function SelectContent({ className, children, ...props }) {
|
|
9
|
-
return (<RSelect.Portal>
|
|
10
|
-
<RSelect.Content {...props} className={clsx(modalContentClassName, "ui-select-content -ml-[6px]", className)}>
|
|
11
|
-
<RSelect.ScrollUpButton className={selectScrollButtonClassName}>
|
|
12
|
-
<ChevronUpIcon />
|
|
13
|
-
</RSelect.ScrollUpButton>
|
|
14
|
-
<RSelect.Viewport>{children}</RSelect.Viewport>
|
|
15
|
-
<RSelect.ScrollDownButton className={selectScrollButtonClassName}>
|
|
16
|
-
<ChevronDownIcon />
|
|
17
|
-
</RSelect.ScrollDownButton>
|
|
18
|
-
</RSelect.Content>
|
|
19
|
-
</RSelect.Portal>);
|
|
20
|
-
}
|
|
21
|
-
function SelectSeparator({ className, ...props }) {
|
|
22
|
-
return (<RSelect.Separator {...props} className={clsx(dropdownSeparatorClassName, "ui-select-separator", className)}/>);
|
|
23
|
-
}
|
|
24
|
-
function SelectItem({ children, className, indicatorClassName, ...props }) {
|
|
25
|
-
return (<RSelect.Item className={clsx(dropdownItemClassName, "ui-select-item", className)} {...props}>
|
|
26
|
-
<RSelect.ItemIndicator className={clsx(dropdownItemIndicatorClassName, "ui-select-item-indicator", indicatorClassName)}>
|
|
27
|
-
<CheckIcon />
|
|
28
|
-
</RSelect.ItemIndicator>
|
|
29
|
-
<RSelect.ItemText>{children}</RSelect.ItemText>
|
|
30
|
-
</RSelect.Item>);
|
|
31
|
-
}
|
|
32
|
-
function SelectTrigger({ className, placeholder, children, readOnly, ref, buttonClassName, ...props }) {
|
|
33
|
-
return (<RSelect.Trigger asChild {...props} className={clsx("data-[placeholder]:text-zinc-500", className)} ref={children ? ref : undefined}>
|
|
34
|
-
{children || (<Button trailing={!readOnly ? (<RSelect.Icon>
|
|
35
|
-
<ChevronDownIcon />
|
|
36
|
-
</RSelect.Icon>) : undefined} ref={ref} disabled={readOnly} className={clsx("rounded-md opacity-100", buttonClassName)}>
|
|
37
|
-
<RSelect.Value placeholder={placeholder}/>
|
|
38
|
-
</Button>)}
|
|
39
|
-
</RSelect.Trigger>);
|
|
40
|
-
}
|
|
41
|
-
function SelectLabel({ className, ...props }) {
|
|
42
|
-
return (<RSelect.Label className={clsx(dropdownLabelClassName, "ui-select-label", className)} {...props}/>);
|
|
43
|
-
}
|
|
44
|
-
const Select = {
|
|
45
|
-
Root: RSelect.Root,
|
|
46
|
-
Item: SelectItem,
|
|
47
|
-
Trigger: SelectTrigger,
|
|
48
|
-
Content: SelectContent,
|
|
49
|
-
Group: RSelect.Group,
|
|
50
|
-
Label: SelectLabel,
|
|
51
|
-
Separator: SelectSeparator,
|
|
52
|
-
Icon: RSelect.Icon,
|
|
53
|
-
Value: RSelect.Value,
|
|
54
|
-
};
|
|
55
|
-
export default Select;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import clsx from "../../utils/clsx";
|
|
2
|
-
export default function Skeleton({ className, ...props }) {
|
|
3
|
-
return (<div className={clsx("animate-pulse overflow-hidden rounded-sm text-transparent", "bg-zinc-300 text-zinc-300 dark:bg-zinc-700 dark:text-zinc-700", className)} {...props}>
|
|
4
|
-
<div className={clsx("animate-skeleton-shiny h-full w-full", "bg-[linear-gradient(120deg,rgba(255,255,255,0)_0%,#e4e4e7,rgba(255,255,255,0)_100%)]", "dark:bg-[linear-gradient(120deg,rgba(255,255,255,0)_20%,#52525b,rgba(255,255,255,0)_80%)]")} style={{
|
|
5
|
-
backgroundSize: "400% 100%",
|
|
6
|
-
}}/>
|
|
7
|
-
</div>);
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export default function Slider({ step, max, min, className, value, onValueChange, thumbClassName, }: {
|
|
3
|
-
step?: number;
|
|
4
|
-
max?: number;
|
|
5
|
-
className?: string;
|
|
6
|
-
thumbClassName?: string;
|
|
7
|
-
min?: number;
|
|
8
|
-
value?: number[];
|
|
9
|
-
onValueChange?: (value: number[]) => void;
|
|
10
|
-
}): React.JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import * as RSlider from "@radix-ui/react-slider";
|
|
3
|
-
import fakeArray from "../../utils/fakeArray";
|
|
4
|
-
import clsx from "../../utils/clsx";
|
|
5
|
-
import { useUpdateEffect } from "react-use";
|
|
6
|
-
export default function Slider({ step = 1, max = 100, min = 0, className, value, onValueChange, thumbClassName, }) {
|
|
7
|
-
const thumbs = value?.length || 1;
|
|
8
|
-
const [intervalValue, setInternalValue] = useState(fakeArray(thumbs).map((n) => 10 * n));
|
|
9
|
-
useUpdateEffect(() => {
|
|
10
|
-
setInternalValue(value || fakeArray(thumbs).map((n) => 10 * n));
|
|
11
|
-
}, [value]);
|
|
12
|
-
useUpdateEffect(() => {
|
|
13
|
-
onValueChange?.(intervalValue);
|
|
14
|
-
}, [intervalValue, onValueChange]);
|
|
15
|
-
return (<RSlider.Root className={clsx("relative flex h-5 touch-none select-none items-center", className)} value={intervalValue} max={max} onValueChange={setInternalValue} step={step} min={min}>
|
|
16
|
-
<RSlider.Track className="relative h-[3px] grow rounded-full bg-black/30">
|
|
17
|
-
<RSlider.Range className="absolute h-full rounded-full bg-primary-500"/>
|
|
18
|
-
</RSlider.Track>
|
|
19
|
-
{fakeArray(thumbs).map((n) => (<RSlider.Thumb key={n} className={clsx("block h-5 w-5 rounded-full bg-white shadow-md ring-primary-500 ring-offset-2 ring-offset-zinc-100 transition hover:bg-primary-500 focus:outline-hidden focus-visible:shadow-lg focus-visible:ring-2", thumbClassName)}/>))}
|
|
20
|
-
</RSlider.Root>);
|
|
21
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export default function Spotlight<T extends object>({ recentSearchesId, open, setOpen, setQuery, query, onClickItem, results, loading, getItemId, getItemLabel, getItemPicture, getItemHref, onSeeMoreClick, seeMoreHref, overlayClassName, dialogContentClassName, className, contentClassName, iconClassName, inputClassName, buttonClassName, noResultsClassName, recentSearchClassName, seeMoreLabel, noRecentSearchLabel, recentlySearchedLabel, noResultsLabel, onSubmit, }: {
|
|
2
|
-
recentSearchesId: string;
|
|
3
|
-
open: boolean;
|
|
4
|
-
setOpen: (open: boolean) => void;
|
|
5
|
-
setQuery: (search: string) => void;
|
|
6
|
-
query: string;
|
|
7
|
-
results?: T[];
|
|
8
|
-
loading: boolean;
|
|
9
|
-
getItemId?: (item: T) => string;
|
|
10
|
-
getItemLabel?: (item: T) => string;
|
|
11
|
-
getItemPicture?: (item: T) => string;
|
|
12
|
-
getItemHref?: (item: T) => string;
|
|
13
|
-
onClickItem?: (item: T) => void;
|
|
14
|
-
onSeeMoreClick?: () => void;
|
|
15
|
-
seeMoreHref?: string;
|
|
16
|
-
overlayClassName?: string;
|
|
17
|
-
dialogContentClassName?: string;
|
|
18
|
-
className?: string;
|
|
19
|
-
contentClassName?: string;
|
|
20
|
-
iconClassName?: string;
|
|
21
|
-
inputClassName?: string;
|
|
22
|
-
buttonClassName?: string;
|
|
23
|
-
noResultsClassName?: string;
|
|
24
|
-
recentSearchClassName?: string;
|
|
25
|
-
seeMoreLabel?: string;
|
|
26
|
-
noRecentSearchLabel?: string;
|
|
27
|
-
recentlySearchedLabel?: string;
|
|
28
|
-
noResultsLabel?: string;
|
|
29
|
-
onSubmit?: () => void;
|
|
30
|
-
}): import("react").JSX.Element;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
2
|
-
import { VisuallyHidden } from "radix-ui";
|
|
3
|
-
import { Fragment, useCallback } from "react";
|
|
4
|
-
import { ChevronRightIcon } from "@heroicons/react/20/solid";
|
|
5
|
-
import { MagnifyingGlassIcon } from "@heroicons/react/24/solid";
|
|
6
|
-
import { useLocalStorage } from "react-use";
|
|
7
|
-
import { take, uniqBy } from "lodash-es";
|
|
8
|
-
import Image from "next/image";
|
|
9
|
-
import Input from "../Input";
|
|
10
|
-
import Skeleton from "../Skeleton";
|
|
11
|
-
import UnstyledButton from "../Button/UnstyledButton";
|
|
12
|
-
import Button from "../Button";
|
|
13
|
-
import clsx from "../../utils/clsx";
|
|
14
|
-
export default function Spotlight({ recentSearchesId, open, setOpen, setQuery, query, onClickItem, results, loading, getItemId = (item) => item._id, getItemLabel = (item) => item.name, getItemPicture, getItemHref, onSeeMoreClick, seeMoreHref, overlayClassName, dialogContentClassName, className, contentClassName, iconClassName, inputClassName, buttonClassName, noResultsClassName, recentSearchClassName, seeMoreLabel = "See more", noRecentSearchLabel = "No recent search", recentlySearchedLabel = "Recently searched", noResultsLabel = "No result found", onSubmit, }) {
|
|
15
|
-
const [recentQueries, setRecentQueries] = useLocalStorage(`spotlight-recent-queries-${recentSearchesId}`, []);
|
|
16
|
-
const handleClose = useCallback((item) => {
|
|
17
|
-
setRecentQueries(take(uniqBy([item, ...(recentQueries || [])], getItemId), 5));
|
|
18
|
-
setOpen(false);
|
|
19
|
-
setQuery("");
|
|
20
|
-
}, [getItemId, recentQueries, setOpen, setQuery, setRecentQueries]);
|
|
21
|
-
const handleItemClick = useCallback((item) => () => {
|
|
22
|
-
onClickItem?.(item);
|
|
23
|
-
handleClose(item);
|
|
24
|
-
}, [handleClose, onClickItem]);
|
|
25
|
-
return (<Dialog.Root open={open} onOpenChange={setOpen}>
|
|
26
|
-
<Dialog.Portal>
|
|
27
|
-
<Dialog.Overlay className={clsx("fixed inset-0 z-20 flex justify-center bg-white/30 backdrop-blur-xs dark:bg-black/30", "data-[state=closed]:animate-fade-out data-[state=open]:animate-slide-up-and-fade will-change-[opacity,transform]", overlayClassName)}>
|
|
28
|
-
<Dialog.Content className={clsx("fixed mx-auto w-full max-w-(--breakpoint-md) px-4 py-4 focus:outline-hidden md:py-8", "data-[state=closed]:animate-fade-out data-[state=open]:animate-elastic-slide-up-and-fade will-change-[transform,opacity]", dialogContentClassName)}>
|
|
29
|
-
<VisuallyHidden.Root>
|
|
30
|
-
<Dialog.Title />
|
|
31
|
-
<Dialog.Description />
|
|
32
|
-
</VisuallyHidden.Root>
|
|
33
|
-
<div className={clsx("flex w-full flex-col justify-center rounded-sm border border-zinc-200 bg-zinc-100 dark:border-zinc-800 dark:bg-zinc-900", className)}>
|
|
34
|
-
<div className="px-4 py-4">
|
|
35
|
-
<Input className={clsx("w-full", contentClassName)} inputClassName={clsx("border-none rounded-none shadow-none rounded-b-none dark:bg-zinc-900 dark:focus:ring-0 focus:ring-0 bg-transparent", inputClassName)} autoFocus={true} leading={<MagnifyingGlassIcon className={clsx("h-5 w-5 text-black dark:text-white", iconClassName)}/>} value={query} onChange={(e) => setQuery(e.target.value)} onKeyDown={(e) => {
|
|
36
|
-
if (e.key === "Enter") {
|
|
37
|
-
e.preventDefault();
|
|
38
|
-
onSubmit?.();
|
|
39
|
-
}
|
|
40
|
-
}}/>
|
|
41
|
-
</div>
|
|
42
|
-
<div className="w-full border-t border-zinc-200 p-4 dark:border-zinc-800">
|
|
43
|
-
<div className="flex flex-col gap-2">
|
|
44
|
-
{query ? (<>
|
|
45
|
-
{loading && (<div className="flex items-center gap-4">
|
|
46
|
-
{getItemPicture && <Skeleton className="h-16 w-28"/>}
|
|
47
|
-
<Skeleton className="h-6 w-32"/>
|
|
48
|
-
</div>)}
|
|
49
|
-
{!loading && !results?.length && (<div className={clsx("flex justify-center py-5 text-zinc-400 dark:text-zinc-600", noResultsClassName)}>
|
|
50
|
-
{noResultsLabel}
|
|
51
|
-
</div>)}
|
|
52
|
-
{!loading && !!results?.length && (<>
|
|
53
|
-
{results.map((item, i) => (<Fragment key={getItemId(item)}>
|
|
54
|
-
{i > 0 && (<div className="h-px bg-zinc-200 dark:bg-zinc-800"/>)}
|
|
55
|
-
<UnstyledButton key={getItemId(item)} href={getItemHref?.(item)} className="flex w-full items-center gap-4 rounded-sm hover:bg-zinc-200/90 dark:hover:bg-zinc-800/90" onClick={handleItemClick(item)}>
|
|
56
|
-
{getItemPicture && (<Image src={getItemPicture(item)} alt={getItemLabel(item)} width={200} height={378} className="h-16 w-28 rounded-sm object-cover"/>)}
|
|
57
|
-
<div className="text-black dark:text-white">
|
|
58
|
-
{getItemLabel(item)}
|
|
59
|
-
</div>
|
|
60
|
-
</UnstyledButton>
|
|
61
|
-
</Fragment>))}
|
|
62
|
-
{(onSeeMoreClick || seeMoreHref) && (<Button variant="filled" type="submit" className={clsx("mt-2 w-full dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700", buttonClassName)} trailing={<ChevronRightIcon />} onClick={onSeeMoreClick} href={seeMoreHref}>
|
|
63
|
-
{seeMoreLabel}
|
|
64
|
-
</Button>)}
|
|
65
|
-
</>)}
|
|
66
|
-
</>) : (<>
|
|
67
|
-
{recentQueries?.length ? (<div className={clsx("mb-2 text-zinc-600 dark:text-zinc-400", recentSearchClassName)}>
|
|
68
|
-
{recentlySearchedLabel}
|
|
69
|
-
</div>) : (<div className={clsx("flex justify-center py-5 text-zinc-400 dark:text-zinc-600", noResultsClassName)}>
|
|
70
|
-
{noRecentSearchLabel}
|
|
71
|
-
</div>)}
|
|
72
|
-
{recentQueries?.map((item) => (<UnstyledButton key={getItemId(item)} href={getItemHref?.(item)} className="flex w-full items-center gap-4 hover:bg-zinc-200/90 dark:hover:bg-zinc-800/90" onClick={handleItemClick(item)}>
|
|
73
|
-
{getItemPicture && (<Image src={getItemPicture(item)} alt={getItemLabel(item)} width={200} height={378} className="max-h-16 max-w-28 rounded-sm object-cover"/>)}
|
|
74
|
-
<div className="text-black dark:text-white">
|
|
75
|
-
{getItemLabel(item)}
|
|
76
|
-
</div>
|
|
77
|
-
</UnstyledButton>))}
|
|
78
|
-
</>)}
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</Dialog.Content>
|
|
83
|
-
</Dialog.Overlay>
|
|
84
|
-
</Dialog.Portal>
|
|
85
|
-
</Dialog.Root>);
|
|
86
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface SpotlightCardProps extends React.PropsWithChildren {
|
|
3
|
-
className?: string;
|
|
4
|
-
spotlightColor?: `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
5
|
-
}
|
|
6
|
-
declare const SpotlightCard: React.FC<SpotlightCardProps>;
|
|
7
|
-
export default SpotlightCard;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState } from "react";
|
|
2
|
-
const SpotlightCard = ({ children, className = "", spotlightColor = "rgba(255, 255, 255, 0.25)", }) => {
|
|
3
|
-
const divRef = useRef(null);
|
|
4
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
5
|
-
const [position, setPosition] = useState({ x: 0, y: 0 });
|
|
6
|
-
const [opacity, setOpacity] = useState(0);
|
|
7
|
-
const handleMouseMove = (e) => {
|
|
8
|
-
if (!divRef.current || isFocused)
|
|
9
|
-
return;
|
|
10
|
-
const rect = divRef.current.getBoundingClientRect();
|
|
11
|
-
setPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
12
|
-
};
|
|
13
|
-
const handleFocus = () => {
|
|
14
|
-
setIsFocused(true);
|
|
15
|
-
setOpacity(0.6);
|
|
16
|
-
};
|
|
17
|
-
const handleBlur = () => {
|
|
18
|
-
setIsFocused(false);
|
|
19
|
-
setOpacity(0);
|
|
20
|
-
};
|
|
21
|
-
const handleMouseEnter = () => {
|
|
22
|
-
setOpacity(0.6);
|
|
23
|
-
};
|
|
24
|
-
const handleMouseLeave = () => {
|
|
25
|
-
setOpacity(0);
|
|
26
|
-
};
|
|
27
|
-
return (<div ref={divRef} onMouseMove={handleMouseMove} onFocus={handleFocus} onBlur={handleBlur} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} className={`relative overflow-hidden ${className}`}>
|
|
28
|
-
<div className="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-500 ease-in-out" style={{
|
|
29
|
-
opacity,
|
|
30
|
-
background: `radial-gradient(circle at ${position.x}px ${position.y}px, ${spotlightColor}, transparent 80%)`,
|
|
31
|
-
}}/>
|
|
32
|
-
{children}
|
|
33
|
-
</div>);
|
|
34
|
-
};
|
|
35
|
-
export default SpotlightCard;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type StarBorderProps<T extends React.ElementType> = React.ComponentPropsWithoutRef<T> & {
|
|
2
|
-
as?: T;
|
|
3
|
-
className?: string;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
color?: string;
|
|
6
|
-
speed?: React.CSSProperties["animationDuration"];
|
|
7
|
-
innerClassName?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const StarBorder: <T extends React.ElementType = "button">({ as, className, color, speed, children, innerClassName, ...rest }: StarBorderProps<T>) => import("react").JSX.Element;
|
|
10
|
-
export default StarBorder;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {} from "react";
|
|
2
|
-
import clsx from "../../utils/clsx";
|
|
3
|
-
const StarBorder = ({ as, className = "", color = "white", speed = "6s", children, innerClassName, ...rest }) => {
|
|
4
|
-
const Component = (as || "button");
|
|
5
|
-
return (<Component className={`relative inline-block overflow-hidden rounded-[20px] py-[1px] ${className}`} {...rest}>
|
|
6
|
-
<div className="animate-star-movement-bottom absolute right-[-250%] bottom-[-11px] z-0 h-[50%] w-[300%] rounded-full opacity-70" style={{
|
|
7
|
-
background: `radial-gradient(circle, ${color}, transparent 10%)`,
|
|
8
|
-
animationDuration: speed,
|
|
9
|
-
}}/>
|
|
10
|
-
<div className="animate-star-movement-top absolute top-[-10px] left-[-250%] z-0 h-[50%] w-[300%] rounded-full opacity-70" style={{
|
|
11
|
-
background: `radial-gradient(circle, ${color}, transparent 10%)`,
|
|
12
|
-
animationDuration: speed,
|
|
13
|
-
}}/>
|
|
14
|
-
<div className={clsx("relative z-1 rounded-[20px] border border-gray-800 bg-gradient-to-b from-black to-gray-900 px-[26px] py-[16px] text-center text-[16px] text-white", innerClassName)}>
|
|
15
|
-
{children}
|
|
16
|
-
</div>
|
|
17
|
-
</Component>);
|
|
18
|
-
};
|
|
19
|
-
export default StarBorder;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { type UnstyledInputCommonProps } from "../Input";
|
|
3
|
-
export interface SwitchProps {
|
|
4
|
-
srLabel?: string;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
rightLabel?: ReactNode;
|
|
8
|
-
switchClassName?: string;
|
|
9
|
-
pointerClassName?: string;
|
|
10
|
-
readOnly?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
onChange?(checked: boolean): void;
|
|
13
|
-
}
|
|
14
|
-
export default function Switch({ srLabel, checked, onChange, className, rightLabel, readOnly, switchClassName, pointerClassName, disabled, }: SwitchProps): import("react").JSX.Element;
|
|
15
|
-
export type SwitchInputProps = UnstyledInputCommonProps & SwitchProps;
|
|
16
|
-
export declare function SwitchInput({ inputClassName, checked, ...props }: SwitchInputProps): import("react").JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Switch as RSwitch } from "radix-ui";
|
|
2
|
-
import clsx from "../../utils/clsx";
|
|
3
|
-
import Input, {} from "../Input";
|
|
4
|
-
export default function Switch({ srLabel, checked, onChange, className, rightLabel, readOnly, switchClassName, pointerClassName, disabled, }) {
|
|
5
|
-
return (<div className={clsx(className, "flex items-center")}>
|
|
6
|
-
<RSwitch.Root checked={checked} onCheckedChange={onChange} className={clsx({
|
|
7
|
-
"bg-primary-600": checked,
|
|
8
|
-
"bg-zinc-300 dark:bg-zinc-600": !checked,
|
|
9
|
-
"cursor-pointer": !readOnly && !disabled,
|
|
10
|
-
"cursor-not-allowed": disabled,
|
|
11
|
-
}, "focus:ring-primary-500 relative inline-flex h-6 w-11 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:ring-2 focus:ring-offset-2 focus:outline-hidden dark:ring-offset-zinc-900", switchClassName)} disabled={readOnly || disabled}>
|
|
12
|
-
{srLabel && <span className="sr-only">{srLabel}</span>}
|
|
13
|
-
<RSwitch.Thumb aria-hidden="true" className={clsx("pointer-events-none inline-block h-5 w-5 translate-x-0 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out data-[state=checked]:translate-x-5", pointerClassName)}/>
|
|
14
|
-
</RSwitch.Root>
|
|
15
|
-
{rightLabel && (<span className="ml-3 text-sm text-zinc-500 dark:text-zinc-300">
|
|
16
|
-
{rightLabel}
|
|
17
|
-
</span>)}
|
|
18
|
-
</div>);
|
|
19
|
-
}
|
|
20
|
-
export function SwitchInput({ inputClassName, checked, ...props }) {
|
|
21
|
-
return (<Input
|
|
22
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
23
|
-
{...props} as={Switch} inputClassName={clsx("p-1.5 border bg-white", inputClassName)} checked={!!checked}/>);
|
|
24
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { type ComponentType, type ReactElement, type ReactNode } from "react";
|
|
2
|
-
export type DataTableProps<RowData> = {
|
|
3
|
-
title?: ReactNode;
|
|
4
|
-
subtitle?: ReactNode;
|
|
5
|
-
headerContent?: ReactNode;
|
|
6
|
-
data?: RowData[];
|
|
7
|
-
idAccessor?: keyof RowData;
|
|
8
|
-
columns: {
|
|
9
|
-
id?: string;
|
|
10
|
-
title?: ReactNode;
|
|
11
|
-
accessor?: keyof RowData;
|
|
12
|
-
render?: (item: RowData) => ReactNode;
|
|
13
|
-
headerClassName?: string;
|
|
14
|
-
cellClassName?: string;
|
|
15
|
-
sortable?: boolean;
|
|
16
|
-
}[];
|
|
17
|
-
actions?: {
|
|
18
|
-
title: string;
|
|
19
|
-
icon: ReactElement;
|
|
20
|
-
href?: string | ((item: RowData) => string | null | undefined);
|
|
21
|
-
onClick?: (item: RowData) => void;
|
|
22
|
-
wrapper?: ComponentType<{
|
|
23
|
-
item: RowData;
|
|
24
|
-
children: ReactElement<{
|
|
25
|
-
className?: string;
|
|
26
|
-
onClick: () => void;
|
|
27
|
-
}>;
|
|
28
|
-
}>;
|
|
29
|
-
target?: string;
|
|
30
|
-
}[];
|
|
31
|
-
isLoading?: boolean;
|
|
32
|
-
noRecords?: ReactNode;
|
|
33
|
-
onRowClick?: (item: RowData) => void;
|
|
34
|
-
rowWrapper?: ComponentType<{
|
|
35
|
-
item: RowData;
|
|
36
|
-
children: ReactElement<{
|
|
37
|
-
className?: string;
|
|
38
|
-
}>;
|
|
39
|
-
}>;
|
|
40
|
-
pagination?: boolean;
|
|
41
|
-
currentPage?: number;
|
|
42
|
-
onChangePage?: (page: number) => void;
|
|
43
|
-
totalItems?: number;
|
|
44
|
-
itemsPerPage?: number;
|
|
45
|
-
className?: string;
|
|
46
|
-
autoHeight?: boolean;
|
|
47
|
-
onChangeSort?: (sort: [string, "asc" | "desc"][]) => void;
|
|
48
|
-
sort?: [string, "asc" | "desc"][];
|
|
49
|
-
previousText?: string;
|
|
50
|
-
nextText?: string;
|
|
51
|
-
showingText?: string;
|
|
52
|
-
toText?: string;
|
|
53
|
-
ofText?: string;
|
|
54
|
-
resultsText?: string;
|
|
55
|
-
tableClassName?: string;
|
|
56
|
-
};
|
|
57
|
-
export default function DataTable<RowData>({ title, subtitle, headerContent, data, idAccessor, actions, columns, isLoading, noRecords: noRecordsText, onRowClick, rowWrapper, pagination, currentPage, onChangePage, totalItems, itemsPerPage, className, autoHeight, onChangeSort, sort: defaultSort, previousText, nextText, showingText, toText, ofText, resultsText, tableClassName, }: DataTableProps<RowData>): import("react").JSX.Element;
|