@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,14 +0,0 @@
|
|
|
1
|
-
import clsx from "../../utils/clsx";
|
|
2
|
-
export default function BottomBlurryPoint({ className, }) {
|
|
3
|
-
return (<div className={clsx("pointer-events-none absolute inset-x-0 top-[calc(100%-22rem)] transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-43rem)]", className)}>
|
|
4
|
-
<svg className="relative left-[calc(50%+3rem)] h-[21.1875rem] max-w-none -translate-x-1/2 sm:left-[calc(50%+36rem)] sm:h-[42.375rem]" viewBox="0 0 1155 678" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path fill="url(#ecb5b0c9-546c-4772-8c71-4d3f06d544bc)" fillOpacity=".3" d="M317.219 518.975L203.852 678 0 438.341l317.219 80.634 204.172-286.402c1.307 132.337 45.083 346.658 209.733 145.248C936.936 126.058 882.053-94.234 1031.02 41.331c119.18 108.451 130.68 295.337 121.53 375.223L855 299l21.173 362.054-558.954-142.079z"/>
|
|
6
|
-
<defs>
|
|
7
|
-
<linearGradient id="ecb5b0c9-546c-4772-8c71-4d3f06d544bc" x1="1155.49" x2="-78.208" y1=".177" y2="474.645" gradientUnits="userSpaceOnUse">
|
|
8
|
-
<stop stopColor="#9089FC"/>
|
|
9
|
-
<stop offset={1} stopColor="#FF80B5"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|
|
13
|
-
</div>);
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import clsx from "../../utils/clsx";
|
|
2
|
-
export default function TopBlurryPoint({ className }) {
|
|
3
|
-
return (<div className={clsx("pointer-events-none absolute inset-x-0 top-[-10rem] z-10 transform-gpu overflow-hidden blur-3xl sm:top-[-20rem]", className)}>
|
|
4
|
-
<svg className="relative left-[calc(50%-11rem)] z-10 h-[21.1875rem] max-w-none -translate-x-1/2 rotate-[30deg] sm:left-[calc(50%-30rem)] sm:h-[42.375rem]" viewBox="0 0 1155 678" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path fill="url(#45de2b6b-92d5-4d68-a6a0-9b9b2abad533)" fillOpacity=".3" d="M317.219 518.975L203.852 678 0 438.341l317.219 80.634 204.172-286.402c1.307 132.337 45.083 346.658 209.733 145.248C936.936 126.058 882.053-94.234 1031.02 41.331c119.18 108.451 130.68 295.337 121.53 375.223L855 299l21.173 362.054-558.954-142.079z"/>
|
|
6
|
-
<defs>
|
|
7
|
-
<linearGradient id="45de2b6b-92d5-4d68-a6a0-9b9b2abad533" x1="1155.49" x2="-78.208" y1=".177" y2="474.645" gradientUnits="userSpaceOnUse">
|
|
8
|
-
<stop stopColor="#9089FC"/>
|
|
9
|
-
<stop offset={1} stopColor="#FF80B5"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|
|
13
|
-
</div>);
|
|
14
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
declare const colorMap: {
|
|
3
|
-
default: {
|
|
4
|
-
badge: string;
|
|
5
|
-
button: string;
|
|
6
|
-
};
|
|
7
|
-
primary: {
|
|
8
|
-
badge: string;
|
|
9
|
-
button: string;
|
|
10
|
-
};
|
|
11
|
-
success: {
|
|
12
|
-
badge: string;
|
|
13
|
-
button: string;
|
|
14
|
-
};
|
|
15
|
-
error: {
|
|
16
|
-
badge: string;
|
|
17
|
-
button: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
declare const sizeMap: {
|
|
21
|
-
badge: {
|
|
22
|
-
sm: string;
|
|
23
|
-
md: string;
|
|
24
|
-
lg: string;
|
|
25
|
-
};
|
|
26
|
-
button: {
|
|
27
|
-
sm: string;
|
|
28
|
-
md: string;
|
|
29
|
-
lg: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
declare function Badge({ color, size, className, children, onActionClick, href, shallow, onClick, ...props }: {
|
|
33
|
-
color?: keyof typeof colorMap;
|
|
34
|
-
size?: keyof (typeof sizeMap)["badge"];
|
|
35
|
-
className?: string;
|
|
36
|
-
children: ReactNode;
|
|
37
|
-
onActionClick?: () => void;
|
|
38
|
-
href?: string;
|
|
39
|
-
shallow?: boolean;
|
|
40
|
-
onClick?: () => void;
|
|
41
|
-
}): import("react").JSX.Element;
|
|
42
|
-
export default Badge;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import clsx from "../../utils/clsx";
|
|
2
|
-
import Link from "next/link";
|
|
3
|
-
import { useCallback, } from "react";
|
|
4
|
-
import preventDefault from "../../utils/preventDefault";
|
|
5
|
-
const colorMap = {
|
|
6
|
-
default: {
|
|
7
|
-
badge: "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-100",
|
|
8
|
-
button: "text-zinc-400 hover:bg-zinc-300 dark:hover:bg-zinc-600 hover:text-zinc-500 dark:hover:text-zinc-300 dark:focus:bg-zinc-500 focus:bg-zinc-500",
|
|
9
|
-
},
|
|
10
|
-
primary: {
|
|
11
|
-
badge: "bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-100",
|
|
12
|
-
button: "text-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 hover:text-primary-500 dark:hover:text-primary-300 focus:bg-primary-500",
|
|
13
|
-
},
|
|
14
|
-
success: {
|
|
15
|
-
badge: "bg-success-100 dark:bg-success-900 text-success-700 dark:text-success-100",
|
|
16
|
-
button: "text-success-400 hover:bg-success-200 dark:hover:bg-success-800 hover:text-success-500 dark:hover:text-success-300 focus:bg-success-500",
|
|
17
|
-
},
|
|
18
|
-
error: {
|
|
19
|
-
badge: "bg-error-100 dark:bg-error-900 text-error-700 dark:text-error-100",
|
|
20
|
-
button: "text-error-400 hover:bg-error-200 dark:hover:bg-error-800 hover:text-error-500 dark:hover:text-error-300 focus:bg-error-500",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
const sizeMap = {
|
|
24
|
-
badge: {
|
|
25
|
-
sm: "py-0.5 px-2 text-xs rounded-xl",
|
|
26
|
-
md: "py-0.5 px-2.5 text-sm rounded-xl",
|
|
27
|
-
lg: "py-0.5 px-3 text-md rounded-2xl",
|
|
28
|
-
},
|
|
29
|
-
button: {
|
|
30
|
-
sm: "-mr-1",
|
|
31
|
-
md: "-mr-1.5",
|
|
32
|
-
lg: "-mr-1.5",
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
function Badge({ color = "default", size = "md", className, children, onActionClick, href, shallow, onClick, ...props }) {
|
|
36
|
-
const Component = href ? Link : "span";
|
|
37
|
-
const handleActionClick = useCallback((e) => {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
onActionClick?.();
|
|
40
|
-
}, [onActionClick]);
|
|
41
|
-
return (<Component className={clsx("inline-flex items-center py-0.5 font-medium", sizeMap.badge[size], colorMap[color].badge, className)} href={href} shallow={shallow} onClick={onClick} {...props}>
|
|
42
|
-
{children}
|
|
43
|
-
{onActionClick && (<div className={clsx("ml-1 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full focus:text-white focus:outline-hidden", sizeMap.button[size], colorMap[color].button)} onClick={handleActionClick} onPointerDown={preventDefault}>
|
|
44
|
-
<span className="sr-only">Remove</span>
|
|
45
|
-
<svg className="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
|
|
46
|
-
<path strokeLinecap="round" strokeWidth="1.5" d="M1 1l6 6m0-6L1 7"/>
|
|
47
|
-
</svg>
|
|
48
|
-
</div>)}
|
|
49
|
-
</Component>);
|
|
50
|
-
}
|
|
51
|
-
export default Badge;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReactElement } from "react";
|
|
2
|
-
type BaseBreadcrumbPage = {
|
|
3
|
-
href?: string;
|
|
4
|
-
loading?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type BreadcrumbPage = (BaseBreadcrumbPage & {
|
|
7
|
-
title: string;
|
|
8
|
-
id?: string;
|
|
9
|
-
}) | (BaseBreadcrumbPage & {
|
|
10
|
-
title: ReactElement;
|
|
11
|
-
id: string;
|
|
12
|
-
});
|
|
13
|
-
export type BreadcrumbsProps = {
|
|
14
|
-
pages?: Array<BreadcrumbPage>;
|
|
15
|
-
homeHref?: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
};
|
|
19
|
-
export default function Breadcrumbs({ pages, homeHref, className, loading, }: BreadcrumbsProps): import("react").JSX.Element | null;
|
|
20
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { HomeIcon } from "@heroicons/react/20/solid";
|
|
2
|
-
import clsx from "../../utils/clsx";
|
|
3
|
-
import Text from "../Text";
|
|
4
|
-
import NextLink from "next/link";
|
|
5
|
-
import Loading from "../Loading";
|
|
6
|
-
import Skeleton from "../Skeleton";
|
|
7
|
-
export default function Breadcrumbs({ pages, homeHref = "/", className, loading, }) {
|
|
8
|
-
if (!pages?.length) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return (<nav className={clsx("flex", className)} aria-label="Breadcrumb">
|
|
12
|
-
<ol role="list" className="flex w-full space-x-4 overflow-auto bg-white px-6 whitespace-nowrap shadow-sm md:w-auto md:rounded-md dark:border-y dark:border-zinc-800 dark:bg-zinc-900 md:dark:border-x">
|
|
13
|
-
<li className="flex">
|
|
14
|
-
<div className="flex items-center">
|
|
15
|
-
<NextLink href={homeHref} className="text-zinc-400 hover:text-zinc-500 dark:hover:text-zinc-200">
|
|
16
|
-
<HomeIcon className="h-5 w-5 shrink-0" aria-hidden="true"/>
|
|
17
|
-
<span className="sr-only">Home</span>
|
|
18
|
-
</NextLink>
|
|
19
|
-
</div>
|
|
20
|
-
</li>
|
|
21
|
-
{pages.map((page, i) => {
|
|
22
|
-
const isLast = i === pages.length - 1;
|
|
23
|
-
return (<li key={page.id || page.title.toString()} className="flex">
|
|
24
|
-
<div className="flex items-center">
|
|
25
|
-
<svg className="h-full w-6 shrink-0 text-zinc-200 dark:text-zinc-800" viewBox="0 0 24 44" preserveAspectRatio="none" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
26
|
-
<path d="M.293 0l22 22-22 22h1.414l22-22-22-22H.293z"/>
|
|
27
|
-
</svg>
|
|
28
|
-
<Text href={page.href} className={clsx("ml-4 text-sm font-medium text-zinc-500 no-underline dark:text-zinc-400", {
|
|
29
|
-
"cursor-default": !page.href,
|
|
30
|
-
"hover:text-zinc-700! dark:hover:text-zinc-200!": !!page.href,
|
|
31
|
-
})} aria-current={isLast ? "page" : undefined}>
|
|
32
|
-
{page.loading ? (<Skeleton className="h-3 w-10"/>) : (page.title)}
|
|
33
|
-
</Text>
|
|
34
|
-
</div>
|
|
35
|
-
</li>);
|
|
36
|
-
})}
|
|
37
|
-
{loading && (<li className="ml-auto! flex items-center">
|
|
38
|
-
<Loading className="-mr-3 ml-4"/>
|
|
39
|
-
</li>)}
|
|
40
|
-
</ol>
|
|
41
|
-
</nav>);
|
|
42
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { type UnstyledButtonProps } from "./UnstyledButton";
|
|
2
|
-
import { type ReactElement, type Ref } from "react";
|
|
3
|
-
declare const styles: {
|
|
4
|
-
root: string;
|
|
5
|
-
variant: {
|
|
6
|
-
filled: string;
|
|
7
|
-
light: string;
|
|
8
|
-
outlined: string;
|
|
9
|
-
text: string;
|
|
10
|
-
custom: string;
|
|
11
|
-
};
|
|
12
|
-
color: {
|
|
13
|
-
primary: string;
|
|
14
|
-
success: string;
|
|
15
|
-
error: string;
|
|
16
|
-
gray: string;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
variantColor: {
|
|
20
|
-
"filled-primary": string;
|
|
21
|
-
"filled-success": string;
|
|
22
|
-
"filled-error": string;
|
|
23
|
-
"filled-gray": string;
|
|
24
|
-
"filled-default": string;
|
|
25
|
-
"light-primary": string;
|
|
26
|
-
"light-success": string;
|
|
27
|
-
"light-error": string;
|
|
28
|
-
"light-gray": string;
|
|
29
|
-
"light-default": string;
|
|
30
|
-
"outlined-primary": string;
|
|
31
|
-
"outlined-success": string;
|
|
32
|
-
"outlined-error": string;
|
|
33
|
-
"outlined-gray": string;
|
|
34
|
-
"outlined-default": string;
|
|
35
|
-
"text-primary": string;
|
|
36
|
-
"text-success": string;
|
|
37
|
-
"text-error": string;
|
|
38
|
-
"text-gray": string;
|
|
39
|
-
"text-default": string;
|
|
40
|
-
};
|
|
41
|
-
disabled: string;
|
|
42
|
-
size: {
|
|
43
|
-
xs: {
|
|
44
|
-
button: string;
|
|
45
|
-
};
|
|
46
|
-
sm: {
|
|
47
|
-
button: string;
|
|
48
|
-
};
|
|
49
|
-
md: {
|
|
50
|
-
button: string;
|
|
51
|
-
};
|
|
52
|
-
lg: {
|
|
53
|
-
button: string;
|
|
54
|
-
};
|
|
55
|
-
xl: {
|
|
56
|
-
button: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
icon: {
|
|
60
|
-
xs: {
|
|
61
|
-
button: string;
|
|
62
|
-
icon: string;
|
|
63
|
-
leading: string;
|
|
64
|
-
trailing: string;
|
|
65
|
-
};
|
|
66
|
-
sm: {
|
|
67
|
-
button: string;
|
|
68
|
-
icon: string;
|
|
69
|
-
leading: string;
|
|
70
|
-
trailing: string;
|
|
71
|
-
};
|
|
72
|
-
md: {
|
|
73
|
-
button: string;
|
|
74
|
-
icon: string;
|
|
75
|
-
leading: string;
|
|
76
|
-
trailing: string;
|
|
77
|
-
};
|
|
78
|
-
lg: {
|
|
79
|
-
button: string;
|
|
80
|
-
icon: string;
|
|
81
|
-
leading: string;
|
|
82
|
-
trailing: string;
|
|
83
|
-
};
|
|
84
|
-
xl: {
|
|
85
|
-
button: string;
|
|
86
|
-
icon: string;
|
|
87
|
-
leading: string;
|
|
88
|
-
trailing: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
export type ButtonProps<T extends HTMLElement = HTMLButtonElement> = Omit<UnstyledButtonProps<T>, "size"> & {
|
|
93
|
-
variant?: keyof (typeof styles)["variant"];
|
|
94
|
-
color?: keyof (typeof styles)["color"];
|
|
95
|
-
size?: keyof (typeof styles)["size"];
|
|
96
|
-
icon?: boolean;
|
|
97
|
-
leading?: ReactElement<{
|
|
98
|
-
className?: string;
|
|
99
|
-
}>;
|
|
100
|
-
trailing?: ReactElement<{
|
|
101
|
-
className?: string;
|
|
102
|
-
}>;
|
|
103
|
-
loading?: boolean;
|
|
104
|
-
disabled?: boolean;
|
|
105
|
-
rounded?: boolean;
|
|
106
|
-
trailingClassName?: string;
|
|
107
|
-
leadingClassName?: string;
|
|
108
|
-
ref?: Ref<T>;
|
|
109
|
-
};
|
|
110
|
-
declare const Button: <T extends HTMLElement = HTMLButtonElement>({ variant, color, size, className, trailingClassName, leadingClassName, icon, type, leading, trailing, children, loading, disabled, rounded, ...props }: ButtonProps<T>) => import("react").JSX.Element;
|
|
111
|
-
export default Button;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import UnstyledButton, {} from "./UnstyledButton";
|
|
2
|
-
import clsx from "../../utils/clsx";
|
|
3
|
-
import { cloneElement } from "react";
|
|
4
|
-
import Loading from "../Loading";
|
|
5
|
-
const styles = {
|
|
6
|
-
root: clsx("appearance-none select-none border transition-colors inline-flex items-center justify-center font-medium leading-4 focus:outline-hidden cursor-pointer", "ring-offset-zinc-100 focus-visible:ring-2 focus:ring-primary-500 focus:ring-offset-2", "dark:ring-offset-zinc-900"),
|
|
7
|
-
variant: {
|
|
8
|
-
filled: "shadow-xs",
|
|
9
|
-
light: "shadow-xs",
|
|
10
|
-
outlined: "shadow-xs",
|
|
11
|
-
text: "",
|
|
12
|
-
custom: "",
|
|
13
|
-
},
|
|
14
|
-
color: {
|
|
15
|
-
primary: "",
|
|
16
|
-
success: "",
|
|
17
|
-
error: "",
|
|
18
|
-
gray: "",
|
|
19
|
-
default: "",
|
|
20
|
-
},
|
|
21
|
-
variantColor: {
|
|
22
|
-
"filled-primary": "bg-primary-500 hover:bg-primary-500/80 text-on-primary border-transparent active:border-primary-700 dark:active:border-primary-300",
|
|
23
|
-
"filled-success": "bg-success-500 hover:bg-success-500/80 text-white border-transparent active:border-success-700 dark:active:border-success-300",
|
|
24
|
-
"filled-error": "bg-red-500 hover:bg-red-500/80 text-white border-transparent active:border-red-700 dark:active:border-red-300",
|
|
25
|
-
"filled-gray": "bg-zinc-500 hover:bg-zinc-500/80 text-white border-transparent active:border-zinc-500 dark:active:border-zinc-400",
|
|
26
|
-
"filled-default": "bg-zinc-200 hover:bg-zinc-300 dark:bg-zinc-300 dark:hover:bg-zinc-400 text-zinc-900 border-transparent active:border-zinc-400 dark:active:border-zinc-300",
|
|
27
|
-
"light-primary": "border-transparent text-primary-500 bg-primary-500/20 hover:bg-primary-500/30 active:border-primary-700",
|
|
28
|
-
"light-success": "border-transparent text-success-500 bg-success-500/20 hover:bg-success-500/30 active:border-success-700",
|
|
29
|
-
"light-error": "border-transparent text-error-500 bg-error-500/20 hover:bg-error-500/30 active:border-error-700",
|
|
30
|
-
"light-gray": "border-transparent text-zinc-500 dark:text-zinc-300 bg-zinc-500/20 hover:bg-zinc-500/30 dark:hover:bg-zinc-400/30 active:border-zinc-700 dark:active:border-zinc-500",
|
|
31
|
-
"light-default": "border-transparent dark:text-white bg-zinc-300/30 dark:bg-white/20 hover:bg-zinc-300/70 dark:hover:bg-white/30 active:border-zinc-400",
|
|
32
|
-
"outlined-primary": "border-primary-500 text-primary-500 hover:bg-primary-500/10 active:border-primary-700",
|
|
33
|
-
"outlined-success": "border-success-500 text-success-500 hover:bg-success-500/10 active:border-success-700",
|
|
34
|
-
"outlined-error": "border-error-500 text-error-500 hover:bg-error-500/10 active:border-error-700",
|
|
35
|
-
"outlined-gray": "border-zinc-400 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-500/10 active:border-zinc-700",
|
|
36
|
-
"outlined-default": clsx("border-zinc-300 hover:bg-zinc-500/5 active:border-zinc-400", "dark:text-white dark:border-zinc-700 dark:hover:bg-zinc-500/5 dark:active:border-zinc-500"),
|
|
37
|
-
"text-primary": "text-primary-500 hover:bg-primary-500/5 border-transparent active:border-primary-500",
|
|
38
|
-
"text-success": "text-success-500 hover:bg-success-500/5 border-transparent active:border-success-500",
|
|
39
|
-
"text-error": "text-error-500 hover:bg-error-500/5 border-transparent active:border-error-500",
|
|
40
|
-
"text-gray": "text-zinc-500 dark:text-zinc-400 hover:bg-zinc-500/5 border-transparent active:border-zinc-500",
|
|
41
|
-
"text-default": "hover:bg-zinc-500/5 dark:hover:bg-white/5 border-transparent active:border-zinc-500/50 dark:active:border-white/50",
|
|
42
|
-
},
|
|
43
|
-
disabled: "opacity-50 pointer-events-none",
|
|
44
|
-
size: {
|
|
45
|
-
xs: {
|
|
46
|
-
button: "px-2 py-1 text-xs",
|
|
47
|
-
},
|
|
48
|
-
sm: {
|
|
49
|
-
button: "px-2 py-1.5 text-sm",
|
|
50
|
-
},
|
|
51
|
-
md: {
|
|
52
|
-
button: "px-3 py-2 text-sm",
|
|
53
|
-
},
|
|
54
|
-
lg: {
|
|
55
|
-
button: "px-5 py-3 text-md",
|
|
56
|
-
},
|
|
57
|
-
xl: {
|
|
58
|
-
button: "px-6 py-4 text-lg",
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
icon: {
|
|
62
|
-
xs: {
|
|
63
|
-
button: "p-1.5",
|
|
64
|
-
icon: "w-3 h-3",
|
|
65
|
-
leading: "mr-1.5 -ml-0.5",
|
|
66
|
-
trailing: "ml-1.5 -mr-0.5",
|
|
67
|
-
},
|
|
68
|
-
sm: {
|
|
69
|
-
button: "p-2",
|
|
70
|
-
icon: "w-4 h-4",
|
|
71
|
-
leading: "mr-1.5",
|
|
72
|
-
trailing: "ml-1.5",
|
|
73
|
-
},
|
|
74
|
-
md: {
|
|
75
|
-
button: "p-2",
|
|
76
|
-
icon: "w-5 h-5",
|
|
77
|
-
leading: "-my-0.5 mr-2 -ml-1",
|
|
78
|
-
trailing: "-my-0.5 ml-2 -mr-1",
|
|
79
|
-
},
|
|
80
|
-
lg: {
|
|
81
|
-
button: "p-3",
|
|
82
|
-
icon: "w-6 h-6",
|
|
83
|
-
leading: "-my-1 mr-3 -ml-2",
|
|
84
|
-
trailing: "-my-1 ml-3 -mr-2",
|
|
85
|
-
},
|
|
86
|
-
xl: {
|
|
87
|
-
button: "p-4",
|
|
88
|
-
icon: "w-7 h-7",
|
|
89
|
-
leading: "-my-2 mr-4 -ml-2",
|
|
90
|
-
trailing: "-my-2 ml-4 -mr-2",
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
const Button = ({ variant = "outlined", color = "default", size = "md", className, trailingClassName, leadingClassName, icon, type = "button", leading, trailing, children, loading, disabled, rounded, ...props }) => {
|
|
95
|
-
if (loading) {
|
|
96
|
-
if (icon) {
|
|
97
|
-
children = <Loading className="my-auto"/>;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
trailing = <Loading className="mr-0 h-auto w-auto"/>;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return (<UnstyledButton {...props} className={clsx(styles.root, styles.variant[variant], variant !== "custom" && styles.color[color], variant !== "custom" && styles.variantColor[`${variant}-${color}`], icon ? styles.icon[size].button : styles.size[size].button, rounded ? "rounded-full" : "rounded-sm", {
|
|
104
|
-
[styles.disabled]: disabled,
|
|
105
|
-
}, className)} type={type} disabled={disabled}>
|
|
106
|
-
{leading &&
|
|
107
|
-
cloneElement(leading, {
|
|
108
|
-
className: clsx(styles.icon[size].icon, styles.icon[size].leading, leading?.props?.className, leadingClassName),
|
|
109
|
-
})}
|
|
110
|
-
{!icon
|
|
111
|
-
? children
|
|
112
|
-
: Array.isArray(children)
|
|
113
|
-
? children.map((child, key) => cloneElement(child, {
|
|
114
|
-
key,
|
|
115
|
-
className: clsx(styles.icon[size].icon, child?.props?.className),
|
|
116
|
-
}))
|
|
117
|
-
: (() => {
|
|
118
|
-
const child = children;
|
|
119
|
-
return cloneElement(child, {
|
|
120
|
-
className: clsx(styles.icon[size].icon, child?.props?.className),
|
|
121
|
-
});
|
|
122
|
-
})()}
|
|
123
|
-
{trailing &&
|
|
124
|
-
cloneElement(trailing, {
|
|
125
|
-
className: clsx(styles.icon[size].icon, styles.icon[size].trailing, trailing?.props?.className, trailingClassName),
|
|
126
|
-
})}
|
|
127
|
-
</UnstyledButton>);
|
|
128
|
-
};
|
|
129
|
-
export default Button;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HTMLProps } from "react";
|
|
2
|
-
export type UnstyledButtonProps<T extends HTMLElement = HTMLButtonElement> = {
|
|
3
|
-
href?: string | null;
|
|
4
|
-
target?: string;
|
|
5
|
-
rel?: string;
|
|
6
|
-
download?: string;
|
|
7
|
-
as?: string;
|
|
8
|
-
} & Omit<HTMLProps<T>, "ref" | "href">;
|
|
9
|
-
declare const UnstyledButton: <T extends HTMLElement = HTMLButtonElement>({ href, as, ...props }: UnstyledButtonProps<T>) => import("react").JSX.Element;
|
|
10
|
-
export default UnstyledButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import NextLink from "next/link";
|
|
2
|
-
const UnstyledButton = ({ href, as, ...props }) => {
|
|
3
|
-
if (as) {
|
|
4
|
-
const Component = as;
|
|
5
|
-
return <Component {...props}/>;
|
|
6
|
-
}
|
|
7
|
-
if (href) {
|
|
8
|
-
const props2 = props;
|
|
9
|
-
return (<NextLink {...props2} href={href} tabIndex={props2.disabled ? -1 : undefined}/>);
|
|
10
|
-
}
|
|
11
|
-
return (<button {...props}/>);
|
|
12
|
-
};
|
|
13
|
-
export default UnstyledButton;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { EmblaOptionsType, EmblaPluginType } from "embla-carousel";
|
|
3
|
-
export type CarouselProps = {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
carouselClassName?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
navigation?: boolean;
|
|
8
|
-
plugins?: EmblaPluginType[];
|
|
9
|
-
} & EmblaOptionsType;
|
|
10
|
-
declare function Carousel({ children, className, carouselClassName, navigation, plugins, ...options }: CarouselProps): import("react").JSX.Element;
|
|
11
|
-
declare namespace Carousel {
|
|
12
|
-
var Slide: typeof CarouselSlide;
|
|
13
|
-
}
|
|
14
|
-
export default Carousel;
|
|
15
|
-
export interface CarouselSlideProps {
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
declare function CarouselSlide({ children, className }: CarouselSlideProps): import("react").JSX.Element;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
|
2
|
-
import useEmblaCarousel from "embla-carousel-react";
|
|
3
|
-
import clsx from "../../utils/clsx";
|
|
4
|
-
import { useEffect, useState } from "react";
|
|
5
|
-
import Button from "../Button";
|
|
6
|
-
import { useMeasure } from "react-use";
|
|
7
|
-
import { mergeRefs } from "react-merge-refs";
|
|
8
|
-
export default function Carousel({ children, className, carouselClassName, navigation, plugins, ...options }) {
|
|
9
|
-
const [emblaRef, embla] = useEmblaCarousel(options, plugins);
|
|
10
|
-
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
11
|
-
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
12
|
-
const [ref, { width, height }] = useMeasure();
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
function updateCanScroll() {
|
|
15
|
-
if (embla) {
|
|
16
|
-
setCanScrollPrev(embla.canScrollPrev());
|
|
17
|
-
setCanScrollNext(embla.canScrollNext());
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (embla) {
|
|
21
|
-
embla.reInit();
|
|
22
|
-
updateCanScroll();
|
|
23
|
-
embla.on("select", updateCanScroll);
|
|
24
|
-
embla.on("reInit", updateCanScroll);
|
|
25
|
-
}
|
|
26
|
-
return () => {
|
|
27
|
-
if (embla) {
|
|
28
|
-
embla.off("select", updateCanScroll);
|
|
29
|
-
embla.off("reInit", updateCanScroll);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}, [embla, width, height]);
|
|
33
|
-
return (<div data-axis={options.axis}>
|
|
34
|
-
<div className={clsx("overflow-hidden", className)} ref={mergeRefs([ref, emblaRef])}>
|
|
35
|
-
<div className={clsx("flex", carouselClassName)}>{children}</div>
|
|
36
|
-
{navigation && (<div className="flex h-full">
|
|
37
|
-
<Button icon variant="text" className={clsx({
|
|
38
|
-
hidden: !canScrollPrev,
|
|
39
|
-
})} disabled={!canScrollPrev} onClick={() => embla?.scrollPrev()}>
|
|
40
|
-
<ChevronLeftIcon />
|
|
41
|
-
</Button>
|
|
42
|
-
<div className="grow"/>
|
|
43
|
-
<Button icon variant="text" className={clsx({
|
|
44
|
-
hidden: !canScrollNext,
|
|
45
|
-
})} disabled={!canScrollNext} onClick={() => embla?.scrollNext()}>
|
|
46
|
-
<ChevronRightIcon />
|
|
47
|
-
</Button>
|
|
48
|
-
</div>)}
|
|
49
|
-
</div>
|
|
50
|
-
</div>);
|
|
51
|
-
}
|
|
52
|
-
Carousel.Slide = CarouselSlide;
|
|
53
|
-
function CarouselSlide({ children, className }) {
|
|
54
|
-
return (<div className={clsx("min-w-0 flex-[0_0_auto]", className)}>{children}</div>);
|
|
55
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type DetailedHTMLProps, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
export type CheckboxProps = {
|
|
3
|
-
label?: ReactNode;
|
|
4
|
-
description?: ReactNode;
|
|
5
|
-
labelClassName?: string;
|
|
6
|
-
descriptionClassName?: string;
|
|
7
|
-
inputClassName?: string;
|
|
8
|
-
labelOuterClassName?: string;
|
|
9
|
-
error?: boolean;
|
|
10
|
-
helpText?: ReactNode;
|
|
11
|
-
indeterminate?: boolean;
|
|
12
|
-
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
13
|
-
declare function Checkbox({ id, label, description, className, labelClassName, descriptionClassName, inputClassName, labelOuterClassName, type, error, helpText, indeterminate, ref, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
14
|
-
export default Checkbox;
|