@majapisoftwares/ui 4.3.16 → 5.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 +17 -0
- package/README.md +71 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/components.json +25 -0
- package/docs/MIGRATION-0.2.md +20 -0
- package/docs/NEXT-STARTER-VALIDATION.md +14 -0
- package/docs/STANDARDS.md +36 -0
- package/docs/VALIDATION.md +11 -0
- package/package.json +69 -2
- package/scripts/check-standards.mjs +39 -0
- package/src/components/ui/alert.tsx +77 -0
- package/src/components/ui/badge.tsx +55 -0
- package/src/components/ui/button.tsx +63 -0
- package/src/components/ui/empty.tsx +105 -0
- package/src/components/ui/field.tsx +238 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/native-select.tsx +66 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +137 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/table.tsx +115 -0
- package/src/components/ui/tabs.tsx +81 -0
- package/src/lib/utils.ts +1 -0
- package/src/patterns/app-shell.tsx +70 -0
- package/src/patterns/data-table.tsx +225 -0
- package/src/patterns/details-sheet.tsx +51 -0
- package/src/patterns/page-header.tsx +40 -0
- package/src/patterns/status-badge.tsx +23 -0
- package/src/styles.css +465 -0
- package/src/templates/admin-dashboard.tsx +63 -0
- package/src/templates/auth-layout.tsx +36 -0
- package/src/templates/login-form.tsx +97 -0
- package/src/templates/signup-form.tsx +137 -0
- package/src/vite-env.d.ts +1 -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
package/src/styles.css
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
4
|
+
@import "@fontsource-variable/geist";
|
|
5
|
+
@source "./";
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
.wb-shell,
|
|
9
|
+
.wb-auth {
|
|
10
|
+
background: var(--background);
|
|
11
|
+
color: var(--foreground);
|
|
12
|
+
}
|
|
13
|
+
.wb-auth {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: 1fr 1fr;
|
|
16
|
+
min-height: 100dvh;
|
|
17
|
+
}
|
|
18
|
+
.wb-auth-intro {
|
|
19
|
+
background: var(--foreground);
|
|
20
|
+
color: var(--background);
|
|
21
|
+
padding: clamp(2rem, 6vw, 6rem);
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
gap: 3rem;
|
|
26
|
+
}
|
|
27
|
+
.wb-auth-intro h1 {
|
|
28
|
+
font: 3.5rem/1.1 var(--font-heading);
|
|
29
|
+
letter-spacing: -0.04em;
|
|
30
|
+
max-width: 12ch;
|
|
31
|
+
}
|
|
32
|
+
.wb-auth-intro p {
|
|
33
|
+
margin-top: 1.5rem;
|
|
34
|
+
max-width: 36ch;
|
|
35
|
+
opacity: 0.7;
|
|
36
|
+
line-height: 1.8;
|
|
37
|
+
}
|
|
38
|
+
.wb-auth-intro footer {
|
|
39
|
+
font-size: 0.75rem;
|
|
40
|
+
opacity: 0.7;
|
|
41
|
+
}
|
|
42
|
+
.wb-auth-panel {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
padding: 2rem;
|
|
47
|
+
}
|
|
48
|
+
.wb-auth-form {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 1.5rem;
|
|
52
|
+
width: min(100%, 380px);
|
|
53
|
+
}
|
|
54
|
+
.wb-auth-form h2 {
|
|
55
|
+
font-size: 1.6rem;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
letter-spacing: -0.04em;
|
|
58
|
+
}
|
|
59
|
+
.wb-auth-form header p,
|
|
60
|
+
.wb-auth-form footer {
|
|
61
|
+
font-size: 0.875rem;
|
|
62
|
+
color: var(--muted-foreground);
|
|
63
|
+
margin-top: 0.75rem;
|
|
64
|
+
}
|
|
65
|
+
@media (max-width: 767px) {
|
|
66
|
+
.wb-auth {
|
|
67
|
+
grid-template-columns: 1fr;
|
|
68
|
+
}
|
|
69
|
+
.wb-auth-intro {
|
|
70
|
+
padding: 1.5rem;
|
|
71
|
+
gap: 1.5rem;
|
|
72
|
+
}
|
|
73
|
+
.wb-auth-intro h1 {
|
|
74
|
+
font-size: 2rem;
|
|
75
|
+
max-width: none;
|
|
76
|
+
}
|
|
77
|
+
.wb-auth-intro p,
|
|
78
|
+
.wb-auth-intro footer {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
.wb-auth-panel {
|
|
82
|
+
padding: 2rem 1.5rem;
|
|
83
|
+
}
|
|
84
|
+
.wb-sidebar {
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
}
|
|
87
|
+
.wb-sidebar nav {
|
|
88
|
+
flex-wrap: wrap;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@custom-variant dark (&:is(.dark *));
|
|
94
|
+
|
|
95
|
+
@theme inline {
|
|
96
|
+
--font-heading: Georgia, serif;
|
|
97
|
+
--font-sans: "Geist Variable", sans-serif;
|
|
98
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
99
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
100
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
101
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
102
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
103
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
104
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
105
|
+
--color-sidebar: var(--sidebar);
|
|
106
|
+
--color-chart-5: var(--chart-5);
|
|
107
|
+
--color-chart-4: var(--chart-4);
|
|
108
|
+
--color-chart-3: var(--chart-3);
|
|
109
|
+
--color-chart-2: var(--chart-2);
|
|
110
|
+
--color-chart-1: var(--chart-1);
|
|
111
|
+
--color-ring: var(--ring);
|
|
112
|
+
--color-input: var(--input);
|
|
113
|
+
--color-border: var(--border);
|
|
114
|
+
--color-destructive: var(--destructive);
|
|
115
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
116
|
+
--color-accent: var(--accent);
|
|
117
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
118
|
+
--color-muted: var(--muted);
|
|
119
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
120
|
+
--color-secondary: var(--secondary);
|
|
121
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
122
|
+
--color-primary: var(--primary);
|
|
123
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
124
|
+
--color-popover: var(--popover);
|
|
125
|
+
--color-card-foreground: var(--card-foreground);
|
|
126
|
+
--color-card: var(--card);
|
|
127
|
+
--color-foreground: var(--foreground);
|
|
128
|
+
--color-background: var(--background);
|
|
129
|
+
--color-success: var(--success);
|
|
130
|
+
--color-success-foreground: var(--success-foreground);
|
|
131
|
+
--color-warning: var(--warning);
|
|
132
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
133
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
134
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
135
|
+
--radius-lg: var(--radius);
|
|
136
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
137
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
138
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
139
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:root {
|
|
143
|
+
--background: oklch(0.982 0.006 105);
|
|
144
|
+
--foreground: oklch(0.145 0 0);
|
|
145
|
+
--card: oklch(1 0 0);
|
|
146
|
+
--card-foreground: oklch(0.145 0 0);
|
|
147
|
+
--popover: oklch(1 0 0);
|
|
148
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
149
|
+
--primary: oklch(0.52 0.15 42);
|
|
150
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
151
|
+
--secondary: oklch(0.97 0 0);
|
|
152
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
153
|
+
--muted: oklch(0.97 0 0);
|
|
154
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
155
|
+
--accent: oklch(0.97 0 0);
|
|
156
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
157
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
158
|
+
--border: oklch(0.922 0 0);
|
|
159
|
+
--input: oklch(0.922 0 0);
|
|
160
|
+
--ring: oklch(0.708 0 0);
|
|
161
|
+
--chart-1: oklch(0.87 0 0);
|
|
162
|
+
--chart-2: oklch(0.556 0 0);
|
|
163
|
+
--chart-3: oklch(0.439 0 0);
|
|
164
|
+
--chart-4: oklch(0.371 0 0);
|
|
165
|
+
--chart-5: oklch(0.269 0 0);
|
|
166
|
+
--radius: 0.5rem;
|
|
167
|
+
--success: oklch(0.94 0.03 145);
|
|
168
|
+
--success-foreground: oklch(0.36 0.08 145);
|
|
169
|
+
--warning: oklch(0.96 0.045 85);
|
|
170
|
+
--warning-foreground: oklch(0.4 0.08 65);
|
|
171
|
+
--sidebar: oklch(0.985 0 0);
|
|
172
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
173
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
174
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
175
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
176
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
177
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
178
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.dark {
|
|
182
|
+
--success: oklch(0.25 0.035 145);
|
|
183
|
+
--success-foreground: oklch(0.83 0.1 145);
|
|
184
|
+
--warning: oklch(0.28 0.035 85);
|
|
185
|
+
--warning-foreground: oklch(0.87 0.1 85);
|
|
186
|
+
--background: oklch(0.145 0 0);
|
|
187
|
+
--foreground: oklch(0.985 0 0);
|
|
188
|
+
--card: oklch(0.205 0 0);
|
|
189
|
+
--card-foreground: oklch(0.985 0 0);
|
|
190
|
+
--popover: oklch(0.205 0 0);
|
|
191
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
192
|
+
--primary: oklch(0.922 0 0);
|
|
193
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
194
|
+
--secondary: oklch(0.269 0 0);
|
|
195
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
196
|
+
--muted: oklch(0.269 0 0);
|
|
197
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
198
|
+
--accent: oklch(0.269 0 0);
|
|
199
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
200
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
201
|
+
--border: oklch(1 0 0 / 10%);
|
|
202
|
+
--input: oklch(1 0 0 / 15%);
|
|
203
|
+
--ring: oklch(0.556 0 0);
|
|
204
|
+
--chart-1: oklch(0.87 0 0);
|
|
205
|
+
--chart-2: oklch(0.556 0 0);
|
|
206
|
+
--chart-3: oklch(0.439 0 0);
|
|
207
|
+
--chart-4: oklch(0.371 0 0);
|
|
208
|
+
--chart-5: oklch(0.269 0 0);
|
|
209
|
+
--sidebar: oklch(0.205 0 0);
|
|
210
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
211
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
212
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
213
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
214
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
215
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
216
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@layer components {
|
|
220
|
+
.wb-shell {
|
|
221
|
+
min-height: 100dvh;
|
|
222
|
+
display: grid;
|
|
223
|
+
grid-template-columns: 224px minmax(0, 1fr);
|
|
224
|
+
}
|
|
225
|
+
.wb-sidebar {
|
|
226
|
+
--sidebar-foreground: var(--background);
|
|
227
|
+
--sidebar-accent: color-mix(
|
|
228
|
+
in oklch,
|
|
229
|
+
var(--background) 12%,
|
|
230
|
+
var(--foreground)
|
|
231
|
+
);
|
|
232
|
+
--sidebar-accent-foreground: var(--background);
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
gap: 2rem;
|
|
236
|
+
padding: 2rem 1.25rem;
|
|
237
|
+
background: var(--foreground);
|
|
238
|
+
color: var(--background);
|
|
239
|
+
}
|
|
240
|
+
.wb-brand {
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
font-size: 1.25rem;
|
|
243
|
+
letter-spacing: -0.04em;
|
|
244
|
+
}
|
|
245
|
+
.wb-brand span {
|
|
246
|
+
color: oklch(0.78 0.13 45);
|
|
247
|
+
font:
|
|
248
|
+
italic 2rem Georgia,
|
|
249
|
+
serif;
|
|
250
|
+
margin-right: 0.6rem;
|
|
251
|
+
}
|
|
252
|
+
.wb-sidebar nav {
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
gap: 0.5rem;
|
|
256
|
+
}
|
|
257
|
+
.wb-sidebar [data-slot="button"] {
|
|
258
|
+
justify-content: flex-start;
|
|
259
|
+
color: inherit;
|
|
260
|
+
}
|
|
261
|
+
.wb-sidebar [data-slot="button"]:hover,
|
|
262
|
+
.wb-sidebar [data-active="true"] {
|
|
263
|
+
background: color-mix(in oklch, var(--background) 12%, transparent);
|
|
264
|
+
color: inherit;
|
|
265
|
+
}
|
|
266
|
+
.wb-sidebar-footer {
|
|
267
|
+
margin-top: auto;
|
|
268
|
+
font-size: 0.75rem;
|
|
269
|
+
opacity: 0.7;
|
|
270
|
+
line-height: 1.8;
|
|
271
|
+
}
|
|
272
|
+
.wb-topbar {
|
|
273
|
+
display: flex;
|
|
274
|
+
gap: 1rem;
|
|
275
|
+
align-items: center;
|
|
276
|
+
justify-content: space-between;
|
|
277
|
+
min-height: 4.5rem;
|
|
278
|
+
padding: 1rem 2.5rem;
|
|
279
|
+
border-bottom: 1px solid var(--border);
|
|
280
|
+
font-size: 0.75rem;
|
|
281
|
+
color: var(--muted-foreground);
|
|
282
|
+
}
|
|
283
|
+
.wb-main {
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
gap: 2rem;
|
|
287
|
+
padding: 2.5rem;
|
|
288
|
+
max-width: 1600px;
|
|
289
|
+
margin-inline: auto;
|
|
290
|
+
}
|
|
291
|
+
.wb-page-header {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
gap: 1rem;
|
|
296
|
+
}
|
|
297
|
+
.wb-page-header h1 {
|
|
298
|
+
font: 2.75rem/1.15 var(--font-heading);
|
|
299
|
+
letter-spacing: -0.04em;
|
|
300
|
+
}
|
|
301
|
+
.wb-page-header p {
|
|
302
|
+
color: var(--muted-foreground);
|
|
303
|
+
font-size: 0.875rem;
|
|
304
|
+
margin-top: 0.75rem;
|
|
305
|
+
}
|
|
306
|
+
.wb-eyebrow {
|
|
307
|
+
color: var(--primary);
|
|
308
|
+
font: 0.65rem/1.5 monospace;
|
|
309
|
+
letter-spacing: 0.14em;
|
|
310
|
+
text-transform: uppercase;
|
|
311
|
+
margin-bottom: 0.75rem;
|
|
312
|
+
}
|
|
313
|
+
.wb-metrics {
|
|
314
|
+
display: grid;
|
|
315
|
+
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
316
|
+
border-block: 1px solid var(--border);
|
|
317
|
+
padding-block: 1.5rem;
|
|
318
|
+
gap: 1.5rem;
|
|
319
|
+
}
|
|
320
|
+
.wb-metric-label {
|
|
321
|
+
color: var(--muted-foreground);
|
|
322
|
+
text-transform: uppercase;
|
|
323
|
+
letter-spacing: 0.08em;
|
|
324
|
+
font: 0.65rem/1.6 monospace;
|
|
325
|
+
}
|
|
326
|
+
.wb-metric-value {
|
|
327
|
+
font-size: 1.8rem;
|
|
328
|
+
font-weight: 400;
|
|
329
|
+
margin-block: 0.5rem;
|
|
330
|
+
}
|
|
331
|
+
.wb-metric-note {
|
|
332
|
+
font-size: 0.7rem;
|
|
333
|
+
color: var(--muted-foreground);
|
|
334
|
+
}
|
|
335
|
+
.wb-status[data-tone="success"] {
|
|
336
|
+
background: var(--success);
|
|
337
|
+
color: var(--success-foreground);
|
|
338
|
+
}
|
|
339
|
+
.wb-status[data-tone="warning"] {
|
|
340
|
+
background: var(--warning);
|
|
341
|
+
color: var(--warning-foreground);
|
|
342
|
+
}
|
|
343
|
+
.wb-status[data-tone="danger"] {
|
|
344
|
+
background: var(--destructive);
|
|
345
|
+
color: var(--background);
|
|
346
|
+
}
|
|
347
|
+
.wb-status-dot {
|
|
348
|
+
width: 0.35rem;
|
|
349
|
+
height: 0.35rem;
|
|
350
|
+
border-radius: 50%;
|
|
351
|
+
background: currentColor;
|
|
352
|
+
}
|
|
353
|
+
.wb-table-toolbar {
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-wrap: wrap;
|
|
356
|
+
align-items: center;
|
|
357
|
+
gap: 0.75rem;
|
|
358
|
+
padding: 1rem;
|
|
359
|
+
background: var(--muted);
|
|
360
|
+
border-radius: var(--radius) var(--radius) 0 0;
|
|
361
|
+
}
|
|
362
|
+
.wb-table-toolbar [data-slot="input"] {
|
|
363
|
+
flex: 1;
|
|
364
|
+
min-width: 200px;
|
|
365
|
+
}
|
|
366
|
+
.wb-table-footer {
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: center;
|
|
369
|
+
justify-content: space-between;
|
|
370
|
+
gap: 1rem;
|
|
371
|
+
padding: 1rem 0;
|
|
372
|
+
font-size: 0.75rem;
|
|
373
|
+
color: var(--muted-foreground);
|
|
374
|
+
}
|
|
375
|
+
.wb-details {
|
|
376
|
+
display: grid;
|
|
377
|
+
gap: 1.5rem;
|
|
378
|
+
}
|
|
379
|
+
.wb-details dt {
|
|
380
|
+
font-size: 0.7rem;
|
|
381
|
+
color: var(--muted-foreground);
|
|
382
|
+
text-transform: uppercase;
|
|
383
|
+
letter-spacing: 0.06em;
|
|
384
|
+
}
|
|
385
|
+
.wb-details dd {
|
|
386
|
+
font-size: 0.875rem;
|
|
387
|
+
margin-top: 0.35rem;
|
|
388
|
+
overflow-wrap: anywhere;
|
|
389
|
+
}
|
|
390
|
+
.wb-catalog-section {
|
|
391
|
+
display: flex;
|
|
392
|
+
flex-direction: column;
|
|
393
|
+
gap: 1rem;
|
|
394
|
+
}
|
|
395
|
+
.wb-catalog-section h2 {
|
|
396
|
+
font-size: 1.125rem;
|
|
397
|
+
font-weight: 600;
|
|
398
|
+
}
|
|
399
|
+
@media (max-width: 767px) {
|
|
400
|
+
.wb-shell {
|
|
401
|
+
grid-template-columns: minmax(0, 1fr);
|
|
402
|
+
}
|
|
403
|
+
.wb-sidebar {
|
|
404
|
+
padding: 1rem;
|
|
405
|
+
flex-direction: row;
|
|
406
|
+
align-items: center;
|
|
407
|
+
justify-content: space-between;
|
|
408
|
+
gap: 1rem;
|
|
409
|
+
}
|
|
410
|
+
.wb-sidebar nav {
|
|
411
|
+
flex-direction: row;
|
|
412
|
+
}
|
|
413
|
+
.wb-sidebar-footer {
|
|
414
|
+
display: none;
|
|
415
|
+
}
|
|
416
|
+
.wb-main {
|
|
417
|
+
padding: 1.5rem 1rem;
|
|
418
|
+
gap: 1.5rem;
|
|
419
|
+
}
|
|
420
|
+
.wb-topbar {
|
|
421
|
+
padding: 1rem;
|
|
422
|
+
}
|
|
423
|
+
.wb-page-header {
|
|
424
|
+
align-items: flex-start;
|
|
425
|
+
flex-direction: column;
|
|
426
|
+
}
|
|
427
|
+
.wb-page-header h1 {
|
|
428
|
+
font-size: 2.2rem;
|
|
429
|
+
}
|
|
430
|
+
.wb-metrics {
|
|
431
|
+
grid-template-columns: 1fr 1fr;
|
|
432
|
+
}
|
|
433
|
+
.wb-table-footer {
|
|
434
|
+
flex-wrap: wrap;
|
|
435
|
+
}
|
|
436
|
+
[data-slot="input"],
|
|
437
|
+
[data-slot="native-select"] {
|
|
438
|
+
font-size: 16px;
|
|
439
|
+
min-height: 44px;
|
|
440
|
+
}
|
|
441
|
+
[data-slot="button"] {
|
|
442
|
+
min-height: 44px;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
@media (prefers-reduced-motion: reduce) {
|
|
446
|
+
*,
|
|
447
|
+
*::before,
|
|
448
|
+
*::after {
|
|
449
|
+
animation-duration: 0.01ms !important;
|
|
450
|
+
transition-duration: 0.01ms !important;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@layer base {
|
|
456
|
+
* {
|
|
457
|
+
@apply border-border outline-ring/50;
|
|
458
|
+
}
|
|
459
|
+
body {
|
|
460
|
+
@apply bg-background text-foreground;
|
|
461
|
+
}
|
|
462
|
+
html {
|
|
463
|
+
@apply font-sans;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { AppShell, type NavigationItem } from "../patterns/app-shell";
|
|
5
|
+
import { PageHeader, MetricStrip } from "../patterns/page-header";
|
|
6
|
+
import { DataTable, type DataTableProps } from "../patterns/data-table";
|
|
7
|
+
|
|
8
|
+
export interface AdminDashboardProps<T> {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
navigation: NavigationItem[];
|
|
12
|
+
activeId: string;
|
|
13
|
+
onNavigate: (id: string) => void;
|
|
14
|
+
metrics: Parameters<typeof MetricStrip>[0]["items"];
|
|
15
|
+
table: DataTableProps<T>;
|
|
16
|
+
brand?: string;
|
|
17
|
+
brandMark?: ReactNode;
|
|
18
|
+
context?: ReactNode;
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
beforeTable?: ReactNode;
|
|
21
|
+
afterTable?: ReactNode;
|
|
22
|
+
footer?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export function AdminDashboard<T>({
|
|
25
|
+
title,
|
|
26
|
+
description,
|
|
27
|
+
navigation,
|
|
28
|
+
activeId,
|
|
29
|
+
onNavigate,
|
|
30
|
+
metrics,
|
|
31
|
+
table,
|
|
32
|
+
brand,
|
|
33
|
+
brandMark,
|
|
34
|
+
context,
|
|
35
|
+
actions,
|
|
36
|
+
beforeTable,
|
|
37
|
+
afterTable,
|
|
38
|
+
footer,
|
|
39
|
+
}: AdminDashboardProps<T>) {
|
|
40
|
+
return (
|
|
41
|
+
<AppShell
|
|
42
|
+
title={title}
|
|
43
|
+
context={context}
|
|
44
|
+
navigation={navigation}
|
|
45
|
+
activeId={activeId}
|
|
46
|
+
onNavigate={onNavigate}
|
|
47
|
+
brand={brand}
|
|
48
|
+
brandMark={brandMark}
|
|
49
|
+
footer={footer}
|
|
50
|
+
>
|
|
51
|
+
<PageHeader
|
|
52
|
+
eyebrow="Painel administrativo"
|
|
53
|
+
title={title}
|
|
54
|
+
description={description}
|
|
55
|
+
actions={actions}
|
|
56
|
+
/>
|
|
57
|
+
<MetricStrip items={metrics} />
|
|
58
|
+
{beforeTable}
|
|
59
|
+
<DataTable {...table} />
|
|
60
|
+
{afterTable}
|
|
61
|
+
</AppShell>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export function AuthLayout({
|
|
3
|
+
children,
|
|
4
|
+
brand = "workbench",
|
|
5
|
+
brandMark = "w.",
|
|
6
|
+
title,
|
|
7
|
+
description,
|
|
8
|
+
aside,
|
|
9
|
+
footer,
|
|
10
|
+
}: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
brand?: string;
|
|
13
|
+
brandMark?: ReactNode;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
aside?: ReactNode;
|
|
17
|
+
footer?: ReactNode;
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<main className="wb-auth">
|
|
21
|
+
<section className="wb-auth-intro">
|
|
22
|
+
<div className="wb-brand">
|
|
23
|
+
<span>{brandMark}</span>
|
|
24
|
+
{brand}
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
<h1>{title}</h1>
|
|
28
|
+
<p>{description}</p>
|
|
29
|
+
</div>
|
|
30
|
+
{aside}
|
|
31
|
+
<footer>{footer}</footer>
|
|
32
|
+
</section>
|
|
33
|
+
<section className="wb-auth-panel">{children}</section>
|
|
34
|
+
</main>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useId, type ReactNode } from "react";
|
|
4
|
+
import { Button } from "../components/ui/button";
|
|
5
|
+
import { Input } from "../components/ui/input";
|
|
6
|
+
import {
|
|
7
|
+
Field,
|
|
8
|
+
FieldGroup,
|
|
9
|
+
FieldLabel,
|
|
10
|
+
FieldDescription,
|
|
11
|
+
} from "../components/ui/field";
|
|
12
|
+
import { Alert, AlertTitle, AlertDescription } from "../components/ui/alert";
|
|
13
|
+
|
|
14
|
+
export interface LoginValues {
|
|
15
|
+
email: string;
|
|
16
|
+
password: string;
|
|
17
|
+
}
|
|
18
|
+
export interface LoginFormProps {
|
|
19
|
+
onSubmit: (values: LoginValues) => void;
|
|
20
|
+
pending?: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
submitLabel?: string;
|
|
25
|
+
footer?: ReactNode;
|
|
26
|
+
recovery?: ReactNode;
|
|
27
|
+
alternative?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export function LoginForm({
|
|
30
|
+
onSubmit,
|
|
31
|
+
pending = false,
|
|
32
|
+
error,
|
|
33
|
+
title = "Entrar na sua conta",
|
|
34
|
+
description = "Use seu e-mail e senha para continuar.",
|
|
35
|
+
submitLabel = "Entrar",
|
|
36
|
+
footer,
|
|
37
|
+
recovery,
|
|
38
|
+
alternative,
|
|
39
|
+
}: LoginFormProps) {
|
|
40
|
+
const id = useId();
|
|
41
|
+
return (
|
|
42
|
+
<form
|
|
43
|
+
className="wb-auth-form"
|
|
44
|
+
onSubmit={(event) => {
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
const data = new FormData(event.currentTarget);
|
|
47
|
+
onSubmit({
|
|
48
|
+
email: String(data.get("email") ?? ""),
|
|
49
|
+
password: String(data.get("password") ?? ""),
|
|
50
|
+
});
|
|
51
|
+
}}
|
|
52
|
+
aria-busy={pending}
|
|
53
|
+
>
|
|
54
|
+
<header>
|
|
55
|
+
<h2>{title}</h2>
|
|
56
|
+
<p>{description}</p>
|
|
57
|
+
</header>
|
|
58
|
+
{error ? (
|
|
59
|
+
<Alert variant="destructive">
|
|
60
|
+
<AlertTitle>Não foi possível entrar</AlertTitle>
|
|
61
|
+
<AlertDescription>{error}</AlertDescription>
|
|
62
|
+
</Alert>
|
|
63
|
+
) : null}
|
|
64
|
+
<FieldGroup>
|
|
65
|
+
<Field>
|
|
66
|
+
<FieldLabel htmlFor={`${id}-email`}>E-mail</FieldLabel>
|
|
67
|
+
<Input
|
|
68
|
+
id={`${id}-email`}
|
|
69
|
+
name="email"
|
|
70
|
+
type="email"
|
|
71
|
+
autoComplete="username"
|
|
72
|
+
placeholder="voce@empresa.com"
|
|
73
|
+
required
|
|
74
|
+
disabled={pending}
|
|
75
|
+
/>
|
|
76
|
+
</Field>
|
|
77
|
+
<Field>
|
|
78
|
+
<FieldLabel htmlFor={`${id}-password`}>Senha</FieldLabel>
|
|
79
|
+
<Input
|
|
80
|
+
id={`${id}-password`}
|
|
81
|
+
name="password"
|
|
82
|
+
type="password"
|
|
83
|
+
autoComplete="current-password"
|
|
84
|
+
required
|
|
85
|
+
disabled={pending}
|
|
86
|
+
/>
|
|
87
|
+
{recovery ? <FieldDescription>{recovery}</FieldDescription> : null}
|
|
88
|
+
</Field>
|
|
89
|
+
<Button type="submit" disabled={pending}>
|
|
90
|
+
{pending ? "Entrando…" : submitLabel}
|
|
91
|
+
</Button>
|
|
92
|
+
</FieldGroup>
|
|
93
|
+
{alternative}
|
|
94
|
+
{footer ? <footer>{footer}</footer> : null}
|
|
95
|
+
</form>
|
|
96
|
+
);
|
|
97
|
+
}
|