bmdl-sdk 1.5.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +37 -0
- package/bin/dev.js +10 -8
- package/bin/init.js +2 -1
- package/bmdl-sdk-2.0.1.tgz +0 -0
- package/global.d.ts +9 -0
- package/next.config.ts +35 -0
- package/package.json +35 -8
- package/postcss.config.mjs +5 -0
- package/public/favicon.ico +0 -0
- package/public/images/bg/404.bg.dark.png +0 -0
- package/public/images/bg/404.bg.png +0 -0
- package/public/images/bg/maintenance.bg.dark.png +0 -0
- package/public/images/bg/maintenance.bg.png +0 -0
- package/public/images/bg/not-authorized.bg.dark.png +0 -0
- package/public/images/bg/not-authorized.bg.png +0 -0
- package/public/images/bg/redirect.bg.dark.png +0 -0
- package/public/images/bg/redirect.bg.png +0 -0
- package/public/images/cover/email-verify.cover.dark.png +0 -0
- package/public/images/cover/email-verify.cover.png +0 -0
- package/public/images/cover/login.cover.dark.png +0 -0
- package/public/images/cover/login.cover.png +0 -0
- package/public/images/cover/password-forgot.cover.dark.png +0 -0
- package/public/images/cover/password-forgot.cover.png +0 -0
- package/public/images/cover/password-reset.cover.dark.png +0 -0
- package/public/images/cover/password-reset.cover.png +0 -0
- package/public/images/cover/register.cover.dark.png +0 -0
- package/public/images/cover/register.cover.png +0 -0
- package/public/images/cover/two-factor-verify.cover.dark.png +0 -0
- package/public/images/cover/two-factor-verify.cover.png +0 -0
- package/public/images/lang/en.png +0 -0
- package/public/images/lang/ru.png +0 -0
- package/public/locales/en/datasets.json +92 -0
- package/public/locales/en/errors.json +402 -0
- package/public/locales/en/general.json +139 -0
- package/public/locales/ru/datasets.json +92 -0
- package/public/locales/ru/errors.json +406 -0
- package/public/locales/ru/general.json +139 -0
- package/src/app/datasets/page.tsx +25 -0
- package/src/app/layout.tsx +45 -0
- package/src/app/not-found.tsx +34 -0
- package/src/app/page.tsx +24 -0
- package/src/components/atoms/Actions/Actions.styles.ts +31 -0
- package/src/components/atoms/Actions/Actions.tsx +45 -0
- package/src/components/atoms/Actions/index.ts +1 -0
- package/src/components/atoms/Avatar/Avatar.styles.ts +95 -0
- package/src/components/atoms/Avatar/Avatar.tsx +46 -0
- package/src/components/atoms/Avatar/index.ts +1 -0
- package/src/components/atoms/Badge/Badge.styles.ts +93 -0
- package/src/components/atoms/Badge/Badge.tsx +31 -0
- package/src/components/atoms/Badge/index.ts +1 -0
- package/src/components/atoms/Button/Button.styles.ts +189 -0
- package/src/components/atoms/Button/Button.tsx +29 -0
- package/src/components/atoms/Button/index.ts +1 -0
- package/src/components/atoms/Calendar/Calendar.styles.ts +227 -0
- package/src/components/atoms/Calendar/Calendar.tsx +96 -0
- package/src/components/atoms/Calendar/index.ts +1 -0
- package/src/components/atoms/Checkbox/Checkbox.styles.ts +37 -0
- package/src/components/atoms/Checkbox/Checkbox.tsx +26 -0
- package/src/components/atoms/Checkbox/index.ts +1 -0
- package/src/components/atoms/Date/Date.styles.ts +6 -0
- package/src/components/atoms/Date/Date.tsx +27 -0
- package/src/components/atoms/Date/index.ts +1 -0
- package/src/components/atoms/DatePicker/DatePicker.styles.ts +53 -0
- package/src/components/atoms/DatePicker/DatePicker.tsx +114 -0
- package/src/components/atoms/DatePicker/DatePicker.utils.tsx +49 -0
- package/src/components/atoms/DatePicker/index.ts +1 -0
- package/src/components/atoms/Dialog/Dialog.styles.ts +71 -0
- package/src/components/atoms/Dialog/Dialog.tsx +55 -0
- package/src/components/atoms/Dialog/index.ts +1 -0
- package/src/components/atoms/Dropdown/Divider/Divider.styles.ts +8 -0
- package/src/components/atoms/Dropdown/Divider/Divider.tsx +14 -0
- package/src/components/atoms/Dropdown/Divider/index.ts +1 -0
- package/src/components/atoms/Dropdown/Dropdown.styles.ts +31 -0
- package/src/components/atoms/Dropdown/Dropdown.tsx +48 -0
- package/src/components/atoms/Dropdown/Item/Item.styles.ts +12 -0
- package/src/components/atoms/Dropdown/Item/Item.tsx +18 -0
- package/src/components/atoms/Dropdown/Item/index.ts +1 -0
- package/src/components/atoms/Dropdown/index.ts +1 -0
- package/src/components/atoms/Form/Form.styles.ts +23 -0
- package/src/components/atoms/Form/Form.tsx +21 -0
- package/src/components/atoms/Form/Item/Item.styles.ts +23 -0
- package/src/components/atoms/Form/Item/Item.tsx +11 -0
- package/src/components/atoms/Form/Item/index.ts +1 -0
- package/src/components/atoms/Form/Label/Label.tsx +11 -0
- package/src/components/atoms/Form/Label/index.ts +1 -0
- package/src/components/atoms/Form/Message/Message.tsx +29 -0
- package/src/components/atoms/Form/Message/index.ts +1 -0
- package/src/components/atoms/Form/index.ts +1 -0
- package/src/components/atoms/Input/Email/Email.tsx +11 -0
- package/src/components/atoms/Input/Email/index.ts +1 -0
- package/src/components/atoms/Input/Input.styles.ts +77 -0
- package/src/components/atoms/Input/Input.tsx +29 -0
- package/src/components/atoms/Input/Number/Number.tsx +12 -0
- package/src/components/atoms/Input/Number/index.ts +1 -0
- package/src/components/atoms/Input/OTP/OTP.styles.ts +30 -0
- package/src/components/atoms/Input/OTP/OTP.tsx +23 -0
- package/src/components/atoms/Input/OTP/index.ts +1 -0
- package/src/components/atoms/Input/Password/Password.tsx +11 -0
- package/src/components/atoms/Input/Password/index.ts +1 -0
- package/src/components/atoms/Input/Search/Search.tsx +12 -0
- package/src/components/atoms/Input/Search/index.ts +1 -0
- package/src/components/atoms/Input/index.ts +1 -0
- package/src/components/atoms/Label/Label.styles.ts +29 -0
- package/src/components/atoms/Label/Label.tsx +18 -0
- package/src/components/atoms/Label/index.ts +1 -0
- package/src/components/atoms/Logo/Logo.styles.ts +16 -0
- package/src/components/atoms/Logo/Logo.tsx +20 -0
- package/src/components/atoms/Logo/index.ts +1 -0
- package/src/components/atoms/Pagination/Pagination.styles.ts +77 -0
- package/src/components/atoms/Pagination/Pagination.tsx +131 -0
- package/src/components/atoms/Pagination/index.ts +1 -0
- package/src/components/atoms/Popover/Popover.styles.ts +28 -0
- package/src/components/atoms/Popover/Popover.tsx +46 -0
- package/src/components/atoms/Popover/index.ts +1 -0
- package/src/components/atoms/Radio/Item/Item.styles.ts +35 -0
- package/src/components/atoms/Radio/Item/Item.tsx +18 -0
- package/src/components/atoms/Radio/Item/index.ts +1 -0
- package/src/components/atoms/Radio/Radio.styles.ts +25 -0
- package/src/components/atoms/Radio/Radio.tsx +21 -0
- package/src/components/atoms/Radio/index.ts +1 -0
- package/src/components/atoms/RangeNumber/RangeNumber.tsx +33 -0
- package/src/components/atoms/RangeNumber/index.ts +1 -0
- package/src/components/atoms/Select/Item/Item.styles.ts +22 -0
- package/src/components/atoms/Select/Item/Item.tsx +17 -0
- package/src/components/atoms/Select/Item/index.ts +1 -0
- package/src/components/atoms/Select/Select.styles.ts +149 -0
- package/src/components/atoms/Select/Select.tsx +68 -0
- package/src/components/atoms/Select/index.ts +1 -0
- package/src/components/atoms/Separator/Separator.styles.ts +13 -0
- package/src/components/atoms/Separator/Separator.tsx +20 -0
- package/src/components/atoms/Separator/index.ts +1 -0
- package/src/components/atoms/Sheet/Sheet.styles.ts +100 -0
- package/src/components/atoms/Sheet/Sheet.tsx +53 -0
- package/src/components/atoms/Sheet/index.ts +1 -0
- package/src/components/atoms/Skeleton/Skeleton.styles.ts +30 -0
- package/src/components/atoms/Skeleton/Skeleton.tsx +11 -0
- package/src/components/atoms/Skeleton/index.ts +1 -0
- package/src/components/atoms/Spin/Spin.styles.ts +17 -0
- package/src/components/atoms/Spin/Spin.tsx +19 -0
- package/src/components/atoms/Spin/index.ts +1 -0
- package/src/components/atoms/Switch/Switch.styles.ts +34 -0
- package/src/components/atoms/Switch/Switch.tsx +20 -0
- package/src/components/atoms/Switch/index.ts +1 -0
- package/src/components/atoms/Table/FilterContent/FilterContent.styles.ts +33 -0
- package/src/components/atoms/Table/FilterContent/FilterContent.tsx +300 -0
- package/src/components/atoms/Table/FilterContent/index.ts +1 -0
- package/src/components/atoms/Table/FilterIcon/FilterIcon.tsx +16 -0
- package/src/components/atoms/Table/FilterIcon/index.ts +1 -0
- package/src/components/atoms/Table/SortIcon/SortIcon.tsx +32 -0
- package/src/components/atoms/Table/SortIcon/index.ts +1 -0
- package/src/components/atoms/Table/Table.styles.ts +178 -0
- package/src/components/atoms/Table/Table.tsx +484 -0
- package/src/components/atoms/Table/Table.utils.tsx +19 -0
- package/src/components/atoms/Table/index.ts +1 -0
- package/src/components/atoms/Tabs/Tabs.tsx +15 -0
- package/src/components/atoms/Tabs/index.ts +1 -0
- package/src/components/atoms/Textarea/Textarea.styles.ts +64 -0
- package/src/components/atoms/Textarea/Textarea.tsx +15 -0
- package/src/components/atoms/Textarea/index.ts +1 -0
- package/src/components/atoms/Toast/Toast.styles.ts +35 -0
- package/src/components/atoms/Toast/Toast.tsx +85 -0
- package/src/components/atoms/Toast/Toast.utils.tsx +43 -0
- package/src/components/atoms/Toast/index.ts +1 -0
- package/src/components/atoms/Tooltip/Tooltip.styles.ts +33 -0
- package/src/components/atoms/Tooltip/Tooltip.tsx +32 -0
- package/src/components/atoms/Tooltip/index.ts +1 -0
- package/src/components/atoms/Typography/Display/Display.styles.ts +26 -0
- package/src/components/atoms/Typography/Display/Display.tsx +11 -0
- package/src/components/atoms/Typography/Display/index.ts +1 -0
- package/src/components/atoms/Typography/Link/Link.styles.ts +32 -0
- package/src/components/atoms/Typography/Link/Link.tsx +25 -0
- package/src/components/atoms/Typography/Link/index.ts +1 -0
- package/src/components/atoms/Typography/Paragraph/Paragraph.styles.ts +32 -0
- package/src/components/atoms/Typography/Paragraph/Paragraph.tsx +11 -0
- package/src/components/atoms/Typography/Paragraph/index.ts +1 -0
- package/src/components/atoms/Typography/Text/Text.styles.ts +39 -0
- package/src/components/atoms/Typography/Text/Text.tsx +25 -0
- package/src/components/atoms/Typography/Text/index.ts +1 -0
- package/src/components/atoms/Typography/Title/Title.styles.ts +28 -0
- package/src/components/atoms/Typography/Title/Title.tsx +15 -0
- package/src/components/atoms/Typography/Title/index.ts +1 -0
- package/src/components/atoms/Typography/Typography.tsx +21 -0
- package/src/components/atoms/Typography/index.ts +1 -0
- package/src/components/atoms/icons/AvanpostIcon.tsx +31 -0
- package/src/components/atoms/icons/CheckIcon.tsx +22 -0
- package/src/components/atoms/icons/EmptyIcon.tsx +56 -0
- package/src/components/atoms/icons/LogoIcon.tsx +141 -0
- package/src/components/atoms/icons/NumberTypeIcon.tsx +25 -0
- package/src/components/atoms/icons/SidebarCloseIcon.tsx +75 -0
- package/src/components/atoms/icons/index.ts +6 -0
- package/src/components/atoms/index.ts +31 -0
- package/src/components/molecules/DataTable/CreationModal/CreationModal.tsx +31 -0
- package/src/components/molecules/DataTable/CreationModal/index.ts +1 -0
- package/src/components/molecules/DataTable/DataTable.styles.ts +23 -0
- package/src/components/molecules/DataTable/DataTable.tsx +167 -0
- package/src/components/molecules/DataTable/Name/Name.tsx +20 -0
- package/src/components/molecules/DataTable/Name/index.ts +1 -0
- package/src/components/molecules/DataTable/Skeleton/Skeleton.tsx +27 -0
- package/src/components/molecules/DataTable/Skeleton/index.ts +6 -0
- package/src/components/molecules/DataTable/index.ts +8 -0
- package/src/components/molecules/Header/Button/Button.styles.ts +24 -0
- package/src/components/molecules/Header/Button/Button.tsx +20 -0
- package/src/components/molecules/Header/Button/index.ts +1 -0
- package/src/components/molecules/Header/Header.styles.ts +16 -0
- package/src/components/molecules/Header/Header.tsx +20 -0
- package/src/components/molecules/Header/Navigate/Navigate.tsx +40 -0
- package/src/components/molecules/Header/Navigate/index.ts +1 -0
- package/src/components/molecules/Header/SelectLang/SelectLang.tsx +47 -0
- package/src/components/molecules/Header/SelectLang/index.ts +2 -0
- package/src/components/molecules/Header/SelectTheme/SelectTheme.tsx +43 -0
- package/src/components/molecules/Header/SelectTheme/index.ts +1 -0
- package/src/components/molecules/Header/index.ts +2 -0
- package/src/components/molecules/ProjectIcon/ProjectIcon.styles.ts +23 -0
- package/src/components/molecules/ProjectIcon/ProjectIcon.tsx +37 -0
- package/src/components/molecules/ProjectIcon/index.ts +1 -0
- package/src/components/molecules/Sidebar/Item/Item.styles.ts +52 -0
- package/src/components/molecules/Sidebar/Item/Item.tsx +30 -0
- package/src/components/molecules/Sidebar/Item/index.ts +1 -0
- package/src/components/molecules/Sidebar/Sidebar.styles.ts +97 -0
- package/src/components/molecules/Sidebar/Sidebar.tsx +122 -0
- package/src/components/molecules/Sidebar/Sidebar.utils.tsx +36 -0
- package/src/components/molecules/Sidebar/Trigger/Trigger.tsx +23 -0
- package/src/components/molecules/Sidebar/Trigger/index.ts +1 -0
- package/src/components/molecules/Sidebar/index.ts +1 -0
- package/src/components/molecules/Widget/Content/Content.tsx +80 -0
- package/src/components/molecules/Widget/Content/index.ts +1 -0
- package/src/components/molecules/Widget/Toolbox/Toolbox.tsx +0 -0
- package/src/components/molecules/Widget/Toolbox/index.ts +0 -0
- package/src/components/molecules/Widget/Widget.tsx +26 -0
- package/src/components/molecules/Widget/Widget.utils.tsx +31 -0
- package/src/components/molecules/Widget/index.ts +2 -0
- package/src/components/molecules/index.ts +6 -0
- package/src/components/organisms/ComponentWidget/ComponentWidget.tsx +9 -0
- package/src/components/organisms/ComponentWidget/index.ts +2 -0
- package/src/components/organisms/DatasetsTable/Creation/Creation.tsx +105 -0
- package/src/components/organisms/DatasetsTable/Creation/Navigate/Navigate.tsx +59 -0
- package/src/components/organisms/DatasetsTable/Creation/Navigate/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Step/Step.styles.ts +12 -0
- package/src/components/organisms/DatasetsTable/Creation/Step/Step.tsx +43 -0
- package/src/components/organisms/DatasetsTable/Creation/Step/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step1/Step1.styles.ts +41 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step1/Step1.tsx +67 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step1/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/SelectSource/SelectSource.tsx +252 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/SelectSource/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/Step2.tsx +11 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/UploadFile/UploadFile.tsx +112 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/UploadFile/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step2/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step3/Step3.tsx +145 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step3/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step4/Step4.tsx +120 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/Step4/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Creation/Steps/index.ts +4 -0
- package/src/components/organisms/DatasetsTable/Creation/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/DatasetsTable.tsx +81 -0
- package/src/components/organisms/DatasetsTable/DatasetsTable.utils.tsx +125 -0
- package/src/components/organisms/DatasetsTable/Source/Source.styles.ts +7 -0
- package/src/components/organisms/DatasetsTable/Source/Source.tsx +39 -0
- package/src/components/organisms/DatasetsTable/Source/Source.utils.tsx +45 -0
- package/src/components/organisms/DatasetsTable/Source/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Status/Status.styles.ts +25 -0
- package/src/components/organisms/DatasetsTable/Status/Status.tsx +29 -0
- package/src/components/organisms/DatasetsTable/Status/Status.utils.tsx +29 -0
- package/src/components/organisms/DatasetsTable/Status/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/Type/Type.styles.ts +7 -0
- package/src/components/organisms/DatasetsTable/Type/Type.tsx +32 -0
- package/src/components/organisms/DatasetsTable/Type/Type.utils.tsx +14 -0
- package/src/components/organisms/DatasetsTable/Type/index.ts +1 -0
- package/src/components/organisms/DatasetsTable/index.ts +1 -0
- package/src/components/organisms/index.ts +3 -0
- package/src/components/templates/DefaultLayout/DefaultLayout.styles.ts +26 -0
- package/src/components/templates/DefaultLayout/DefaultLayout.tsx +41 -0
- package/src/components/templates/DefaultLayout/index.ts +1 -0
- package/src/components/templates/PageLayout/PageLayout.styles.ts +25 -0
- package/src/components/templates/PageLayout/PageLayout.tsx +28 -0
- package/src/components/templates/PageLayout/index.ts +1 -0
- package/src/components/templates/index.ts +3 -0
- package/src/config/i18n.config.ts +46 -0
- package/src/constants/index.ts +10 -0
- package/src/contexts/CreateComponentContext/CreateComponentContext.tsx +17 -0
- package/src/contexts/CreateComponentContext/index.ts +4 -0
- package/src/contexts/CreateDatasetContext/CreateDatasetContext.tsx +25 -0
- package/src/contexts/CreateDatasetContext/index.ts +4 -0
- package/src/contexts/ProjectContext/ProjectContext.tsx +32 -0
- package/src/contexts/ProjectContext/index.ts +1 -0
- package/src/contexts/SidebarContext/SidebarContext.tsx +10 -0
- package/src/contexts/SidebarContext/index.ts +1 -0
- package/src/contexts/index.ts +10 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useCreateComponent.ts +15 -0
- package/src/hooks/useCreateDataset.ts +15 -0
- package/src/hooks/useDebounce.ts +17 -0
- package/src/hooks/useDebounced.ts +31 -0
- package/src/hooks/useIsMobile.ts +27 -0
- package/src/hooks/useSidebar.ts +15 -0
- package/src/hooks/useStickyHeader.ts +35 -0
- package/src/hooks/useWindowSize.ts +27 -0
- package/src/providers/CreateComponentProvider/CreateComponentProvider.tsx +53 -0
- package/src/providers/CreateComponentProvider/index.ts +1 -0
- package/src/providers/CreateDatasetProvider/CreateDatasetProvider.tsx +73 -0
- package/src/providers/CreateDatasetProvider/index.ts +1 -0
- package/src/providers/LangProvider/LangProvider.tsx +15 -0
- package/src/providers/LangProvider/index.ts +1 -0
- package/src/providers/ProjectProvider/ProjectProvider.tsx +110 -0
- package/src/providers/ProjectProvider/index.ts +1 -0
- package/src/providers/SidebarProvider/SidebarProvider.tsx +51 -0
- package/src/providers/SidebarProvider/index.ts +1 -0
- package/src/providers/ThemeProvider/ThemeProvider.tsx +20 -0
- package/src/providers/ThemeProvider/index.ts +1 -0
- package/src/providers/index.ts +6 -0
- package/src/store/index.ts +2 -0
- package/src/store/sidebar/sidebar.store.ts +17 -0
- package/src/store/sidebar/sidebar.type.ts +4 -0
- package/src/styles/globals.css +202 -0
- package/src/types/component.type.ts +13 -0
- package/src/types/dataset.type.ts +25 -0
- package/src/types/file.type.ts +13 -0
- package/src/types/general.type.ts +86 -0
- package/src/types/index.ts +9 -0
- package/src/types/layer.type.ts +7 -0
- package/src/types/project.type.ts +15 -0
- package/src/types/user.type.ts +6 -0
- package/src/types/widget.type.ts +12 -0
- package/src/utils/bm.util.ts +150 -0
- package/src/utils/bytes.util.ts +110 -0
- package/src/utils/date.util.ts +49 -0
- package/src/utils/dynamicMessage.util.ts +9 -0
- package/src/utils/getInitials.util.ts +10 -0
- package/src/utils/hideEmail.util.ts +14 -0
- package/src/utils/index.ts +12 -0
- package/src/utils/pagination.util.ts +144 -0
- package/src/utils/twJoin.util.ts +49 -0
- package/src/utils/twMerge.util.ts +6 -0
- package/src/utils/upload.util.ts +26 -0
- package/src/utils/url.util.ts +29 -0
- package/tsconfig.json +40 -6
- package/bmdl-sdk-1.5.9.tgz +0 -0
- package/index.html +0 -12
- package/src/App.tsx +0 -187
- package/src/main.tsx +0 -15
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
import { twJoin } from '@/utils'
|
|
4
|
+
|
|
5
|
+
export const rootStyles = cva(
|
|
6
|
+
twJoin({
|
|
7
|
+
tw: [
|
|
8
|
+
'group/label',
|
|
9
|
+
'has-[[role="checkbox"]]:hover:cursor-pointer',
|
|
10
|
+
'has-[[role="switch"]]:hover:cursor-pointer',
|
|
11
|
+
'has-[[role="radio"]]:hover:cursor-pointer'
|
|
12
|
+
],
|
|
13
|
+
display: 'flex items-center gap-1.5',
|
|
14
|
+
text: 'leading-none text-nowrap'
|
|
15
|
+
}),
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
md: 'text-sm text-gray-900 dark:text-dark-gray-200',
|
|
20
|
+
lg: 'mb-0.5 text-base font-semibold text-gray-800 dark:text-dark-gray-300'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: 'md'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
export type RootStylesProps = VariantProps<typeof rootStyles>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react'
|
|
2
|
+
|
|
3
|
+
import { Label as RadixLabel } from 'radix-ui'
|
|
4
|
+
|
|
5
|
+
import { type RootStylesProps, rootStyles } from './Label.styles'
|
|
6
|
+
|
|
7
|
+
type LabelProps = ComponentProps<typeof RadixLabel.Root> & RootStylesProps
|
|
8
|
+
|
|
9
|
+
function Label({ size, className, ...props }: LabelProps) {
|
|
10
|
+
return (
|
|
11
|
+
<RadixLabel.Root
|
|
12
|
+
className={rootStyles({ size, className })}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Label }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Label } from './Label'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { twJoin } from '@/utils'
|
|
2
|
+
|
|
3
|
+
export const rootStyles = twJoin({
|
|
4
|
+
display: 'flex items-center',
|
|
5
|
+
text: 'text-2xl font-bold text-gray-900 text-nowrap',
|
|
6
|
+
animation: 'transition-opacity',
|
|
7
|
+
hover: 'hover:opacity-90',
|
|
8
|
+
childs: {
|
|
9
|
+
display: '[&_svg]:mr-2.5',
|
|
10
|
+
text: '[&_span]:leading-none'
|
|
11
|
+
},
|
|
12
|
+
//
|
|
13
|
+
dark: {
|
|
14
|
+
text: 'dark:text-dark-gray-300'
|
|
15
|
+
}
|
|
16
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Link from 'next/link'
|
|
2
|
+
|
|
3
|
+
import { LogoIcon } from '@/components/atoms/icons'
|
|
4
|
+
|
|
5
|
+
import { rootStyles } from './Logo.styles'
|
|
6
|
+
|
|
7
|
+
import { twMerge } from '@/utils'
|
|
8
|
+
|
|
9
|
+
type LogoProps = {
|
|
10
|
+
className?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function Logo({ className }: LogoProps) {
|
|
14
|
+
return (
|
|
15
|
+
<Link href='/' className={twMerge(rootStyles, className)}>
|
|
16
|
+
<LogoIcon size={34} />
|
|
17
|
+
<span>SDK</span>
|
|
18
|
+
</Link>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Logo } from './Logo'
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
import { twJoin } from '@/utils'
|
|
4
|
+
|
|
5
|
+
export const rootStyles = twJoin({
|
|
6
|
+
display: 'flex gap-1'
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
// /////////////////////////
|
|
10
|
+
|
|
11
|
+
export const itemStyles = cva(
|
|
12
|
+
twJoin({
|
|
13
|
+
mouse: 'cursor-pointer',
|
|
14
|
+
display: 'flex items-center justify-center',
|
|
15
|
+
text: 'text-gray-800',
|
|
16
|
+
visual: 'bg-secondary/16',
|
|
17
|
+
hover: 'hover:bg-secondary/32',
|
|
18
|
+
focus: 'focus-visible:bg-secondary/32 outline-none',
|
|
19
|
+
active: 'active:bg-secondary/32',
|
|
20
|
+
disabled: [
|
|
21
|
+
'disabled:cursor-not-allowed!',
|
|
22
|
+
'disabled:select-none',
|
|
23
|
+
'disabled:opacity-65',
|
|
24
|
+
'disabled:shadow-none'
|
|
25
|
+
],
|
|
26
|
+
//
|
|
27
|
+
dark: {
|
|
28
|
+
text: 'dark:text-dark-gray-300',
|
|
29
|
+
visual: 'dark:bg-dark-gray-700/16',
|
|
30
|
+
hover: 'dark:hover:bg-dark-gray-700/32',
|
|
31
|
+
focus: 'dark:focus-visible:bg-dark-gray-700/32',
|
|
32
|
+
active: 'dark:active:bg-dark-gray-700/32'
|
|
33
|
+
}
|
|
34
|
+
}),
|
|
35
|
+
{
|
|
36
|
+
variants: {
|
|
37
|
+
size: {
|
|
38
|
+
sm: 'size-7 py-1 px-2 text-sm rounded-sm',
|
|
39
|
+
md: 'size-8.5 py-1.5 px-2.5 text-base rounded-md',
|
|
40
|
+
lg: 'size-11 py-2 px-4 text-lg rounded-lg'
|
|
41
|
+
},
|
|
42
|
+
type: {
|
|
43
|
+
text: '[&_svg]:hidden',
|
|
44
|
+
icon: '[&_span]:hidden'
|
|
45
|
+
},
|
|
46
|
+
isPrevOrNext: {
|
|
47
|
+
true: ''
|
|
48
|
+
},
|
|
49
|
+
isActive: {
|
|
50
|
+
true: twJoin({
|
|
51
|
+
mouse: 'cursor-not-allowed!',
|
|
52
|
+
text: '!text-white',
|
|
53
|
+
visual: '!bg-primary shadow-sm',
|
|
54
|
+
transform: 'scale-98'
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
compoundVariants: [
|
|
59
|
+
{
|
|
60
|
+
isPrevOrNext: true,
|
|
61
|
+
type: 'text',
|
|
62
|
+
class: 'w-auto'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
isPrevOrNext: true,
|
|
66
|
+
type: 'icon',
|
|
67
|
+
class: '!p-2 [&_svg]:size-5'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
size: 'md',
|
|
72
|
+
type: 'text',
|
|
73
|
+
isPrevOrNext: false,
|
|
74
|
+
isActive: false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import clsx from 'clsx'
|
|
4
|
+
import { useTranslations } from 'next-intl'
|
|
5
|
+
import { useRouter } from 'next/navigation'
|
|
6
|
+
import { type ComponentProps } from 'react'
|
|
7
|
+
|
|
8
|
+
import { TbChevronLeft, TbChevronRight } from 'react-icons/tb'
|
|
9
|
+
|
|
10
|
+
import { IPaginationOptions } from '@/types'
|
|
11
|
+
|
|
12
|
+
import { itemStyles, rootStyles } from './Pagination.styles'
|
|
13
|
+
|
|
14
|
+
import { addParam, getPaginationData, removeParam } from '@/utils'
|
|
15
|
+
|
|
16
|
+
type PaginationProps = {
|
|
17
|
+
pagination: IPaginationOptions
|
|
18
|
+
getData?: (data: Record<string, any>) => void
|
|
19
|
+
} & ComponentProps<'ul'>
|
|
20
|
+
|
|
21
|
+
function Pagination({
|
|
22
|
+
pagination,
|
|
23
|
+
getData,
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: PaginationProps) {
|
|
27
|
+
const t = useTranslations('pagination')
|
|
28
|
+
//
|
|
29
|
+
const router = useRouter()
|
|
30
|
+
//
|
|
31
|
+
const data = getPaginationData(pagination)
|
|
32
|
+
//
|
|
33
|
+
const onPrevPage = () => {
|
|
34
|
+
const page = data.page - 1
|
|
35
|
+
//
|
|
36
|
+
if (page !== 0) {
|
|
37
|
+
addParam(router, 'page', page)
|
|
38
|
+
} else {
|
|
39
|
+
removeParam(router, 'page')
|
|
40
|
+
}
|
|
41
|
+
//
|
|
42
|
+
getData?.({
|
|
43
|
+
page
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
//
|
|
47
|
+
const onPage = (page: number) => {
|
|
48
|
+
const newPage = page - 1
|
|
49
|
+
//
|
|
50
|
+
if (newPage !== 0) {
|
|
51
|
+
addParam(router, 'page', newPage)
|
|
52
|
+
} else {
|
|
53
|
+
removeParam(router, 'page')
|
|
54
|
+
}
|
|
55
|
+
//
|
|
56
|
+
getData?.({
|
|
57
|
+
page: newPage
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
//
|
|
61
|
+
const onNextPage = () => {
|
|
62
|
+
const page = data.page + 1
|
|
63
|
+
//
|
|
64
|
+
addParam(router, 'page', page)
|
|
65
|
+
//
|
|
66
|
+
getData?.({
|
|
67
|
+
page
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
//
|
|
71
|
+
return (
|
|
72
|
+
<ul
|
|
73
|
+
role='navigation'
|
|
74
|
+
aria-label='pagination'
|
|
75
|
+
className={clsx(rootStyles, className)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
<li>
|
|
79
|
+
<button
|
|
80
|
+
onClick={onPrevPage}
|
|
81
|
+
className={itemStyles({
|
|
82
|
+
isPrevOrNext: true,
|
|
83
|
+
type: 'icon'
|
|
84
|
+
})}
|
|
85
|
+
disabled={!data.hasPrevPage}
|
|
86
|
+
>
|
|
87
|
+
<TbChevronLeft />
|
|
88
|
+
<span>{t('prev')}</span>
|
|
89
|
+
</button>
|
|
90
|
+
</li>
|
|
91
|
+
{data.pageNumbers.map(page => {
|
|
92
|
+
return (
|
|
93
|
+
<li key={page}>
|
|
94
|
+
<button
|
|
95
|
+
onClick={() => {
|
|
96
|
+
if (
|
|
97
|
+
page !== data.page + 1 &&
|
|
98
|
+
page !== 'ellipsis'
|
|
99
|
+
) {
|
|
100
|
+
onPage(page)
|
|
101
|
+
}
|
|
102
|
+
}}
|
|
103
|
+
className={itemStyles({
|
|
104
|
+
isActive: page === data.page + 1,
|
|
105
|
+
isPrevOrNext: page === 'ellipsis'
|
|
106
|
+
})}
|
|
107
|
+
disabled={page === 'ellipsis'}
|
|
108
|
+
>
|
|
109
|
+
{page === 'ellipsis' ? '…' : page}
|
|
110
|
+
</button>
|
|
111
|
+
</li>
|
|
112
|
+
)
|
|
113
|
+
})}
|
|
114
|
+
<li>
|
|
115
|
+
<button
|
|
116
|
+
onClick={onNextPage}
|
|
117
|
+
className={itemStyles({
|
|
118
|
+
isPrevOrNext: true,
|
|
119
|
+
type: 'icon'
|
|
120
|
+
})}
|
|
121
|
+
disabled={!data.hasNextPage}
|
|
122
|
+
>
|
|
123
|
+
<span>{t('next')}</span>
|
|
124
|
+
<TbChevronRight />
|
|
125
|
+
</button>
|
|
126
|
+
</li>
|
|
127
|
+
</ul>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export { Pagination }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pagination } from './Pagination'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { twJoin } from '@/utils'
|
|
2
|
+
|
|
3
|
+
export const contentStyles = twJoin({
|
|
4
|
+
position: 'z-50',
|
|
5
|
+
display: 'w-auto overflow-hidden',
|
|
6
|
+
text: 'text-gray-800',
|
|
7
|
+
visual: ['bg-white', 'rounded-md', 'shadow-lg', 'outline-hidden'],
|
|
8
|
+
attrs: [
|
|
9
|
+
'data-[state=open]:animate-in',
|
|
10
|
+
'data-[state=open]:fade-in-0',
|
|
11
|
+
'data-[state=open]:zoom-in-95',
|
|
12
|
+
//
|
|
13
|
+
'data-[state=closed]:animate-out',
|
|
14
|
+
'data-[state=closed]:fade-out-0',
|
|
15
|
+
'data-[state=closed]:zoom-out-95',
|
|
16
|
+
//
|
|
17
|
+
'data-[side=top]:slide-in-from-bottom-2',
|
|
18
|
+
'data-[side=right]:slide-in-from-left-2',
|
|
19
|
+
'data-[side=bottom]:slide-in-from-top-2',
|
|
20
|
+
'data-[side=left]:slide-in-from-right-2'
|
|
21
|
+
],
|
|
22
|
+
vars: 'origin-(--radix-popover-content-transform-origin)',
|
|
23
|
+
//
|
|
24
|
+
dark: {
|
|
25
|
+
text: 'dark:text-dark-gray-300',
|
|
26
|
+
visual: 'dark:bg-tooltip dark:shadow-dark-lg'
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import clsx from 'clsx'
|
|
4
|
+
import { type ComponentProps, type ReactNode } from 'react'
|
|
5
|
+
|
|
6
|
+
import { Popover as RadixPopover } from 'radix-ui'
|
|
7
|
+
|
|
8
|
+
import { contentStyles } from './Popover.styles'
|
|
9
|
+
|
|
10
|
+
type PopoverProps = ComponentProps<typeof RadixPopover.Root> &
|
|
11
|
+
ComponentProps<typeof RadixPopover.Content> & {
|
|
12
|
+
trigger: ReactNode
|
|
13
|
+
arrow?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function Popover({
|
|
17
|
+
trigger,
|
|
18
|
+
arrow = true,
|
|
19
|
+
sideOffset,
|
|
20
|
+
align,
|
|
21
|
+
alignOffset,
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: PopoverProps) {
|
|
26
|
+
return (
|
|
27
|
+
<RadixPopover.Root {...props}>
|
|
28
|
+
<RadixPopover.Trigger asChild>{trigger}</RadixPopover.Trigger>
|
|
29
|
+
<RadixPopover.Portal>
|
|
30
|
+
<RadixPopover.Content
|
|
31
|
+
align={align}
|
|
32
|
+
sideOffset={sideOffset}
|
|
33
|
+
alignOffset={alignOffset}
|
|
34
|
+
onOpenAutoFocus={e => e.preventDefault()}
|
|
35
|
+
onCloseAutoFocus={e => e.preventDefault()}
|
|
36
|
+
className={clsx(contentStyles, className)}
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
{arrow && <RadixPopover.Arrow />}
|
|
40
|
+
</RadixPopover.Content>
|
|
41
|
+
</RadixPopover.Portal>
|
|
42
|
+
</RadixPopover.Root>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { Popover }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popover } from './Popover'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { twJoin } from '@/utils'
|
|
2
|
+
|
|
3
|
+
export const rootStyles = twJoin({
|
|
4
|
+
tw: 'peer group-has-[input]/label:mr-0.5',
|
|
5
|
+
display: 'flex justify-center items-center size-4.5 shrink-0',
|
|
6
|
+
visual: 'border-divider rounded-full border outline-none',
|
|
7
|
+
animation: 'transition-all',
|
|
8
|
+
hover: [
|
|
9
|
+
'hover:cursor-pointer',
|
|
10
|
+
'group-hover/label:border-gray',
|
|
11
|
+
'group-hover/label:data-[state=checked]:border-transparent'
|
|
12
|
+
],
|
|
13
|
+
attrs: [
|
|
14
|
+
'data-[state=checked]:text-white',
|
|
15
|
+
'data-[state=checked]:bg-primary',
|
|
16
|
+
'data-[state=checked]:border-primary',
|
|
17
|
+
'data-[state=checked]:shadow-primary-sm',
|
|
18
|
+
'data-[state=checked]:hover:shadow-primary'
|
|
19
|
+
],
|
|
20
|
+
//
|
|
21
|
+
dark: [
|
|
22
|
+
'dark:border-dark-gray-200',
|
|
23
|
+
'dark:data-[state=checked]:shadow-dark-sm',
|
|
24
|
+
'dark:data-[state=checked]:hover:shadow-dark-md',
|
|
25
|
+
'dark:group-hover/label:border-dark-gray-400'
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
// /////////////////////////
|
|
30
|
+
|
|
31
|
+
export const indicatorStyles = twJoin({
|
|
32
|
+
display: 'flex size-2',
|
|
33
|
+
visual: 'bg-white rounded-full',
|
|
34
|
+
animation: 'transition-none'
|
|
35
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import { type ComponentProps } from 'react'
|
|
3
|
+
|
|
4
|
+
import { RadioGroup } from 'radix-ui'
|
|
5
|
+
|
|
6
|
+
import { indicatorStyles, rootStyles } from './Item.styles'
|
|
7
|
+
|
|
8
|
+
type ItempProps = ComponentProps<typeof RadioGroup.Item>
|
|
9
|
+
|
|
10
|
+
function Item({ className, ...props }: ItempProps) {
|
|
11
|
+
return (
|
|
12
|
+
<RadioGroup.Item className={clsx(rootStyles, className)} {...props}>
|
|
13
|
+
<RadioGroup.Indicator className={indicatorStyles} />
|
|
14
|
+
</RadioGroup.Item>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Item }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Item } from './Item'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VariantProps, cva } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
import { twJoin } from '@/utils'
|
|
4
|
+
|
|
5
|
+
export const rootStyles = cva(
|
|
6
|
+
twJoin({
|
|
7
|
+
tw: 'peer',
|
|
8
|
+
display: 'w-7.5 h-4.5 p-0.5 mr-0.5',
|
|
9
|
+
visual: 'border border-divider rounded-full',
|
|
10
|
+
attrs: 'data-[state="checked"]:shadow-sm'
|
|
11
|
+
}),
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
color: {
|
|
15
|
+
primary:
|
|
16
|
+
'data-[state="checked"]:bg-primary data-[state="checked"]:border-primary'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
color: 'primary'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
export type RootStylesProps = VariantProps<typeof rootStyles>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react'
|
|
2
|
+
|
|
3
|
+
import { RadioGroup as RadixRadio } from 'radix-ui'
|
|
4
|
+
|
|
5
|
+
import { type RootStylesProps } from './Radio.styles'
|
|
6
|
+
|
|
7
|
+
import { Item } from './Item'
|
|
8
|
+
|
|
9
|
+
type RadioProps = ComponentProps<typeof RadixRadio.Root> & RootStylesProps
|
|
10
|
+
|
|
11
|
+
function Radio({ children, className, ...props }: RadioProps) {
|
|
12
|
+
return (
|
|
13
|
+
<RadixRadio.Root className={className} {...props}>
|
|
14
|
+
{children}
|
|
15
|
+
</RadixRadio.Root>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Radio.Item = Item
|
|
20
|
+
|
|
21
|
+
export { Radio }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio } from './Radio'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useTranslations } from 'next-intl'
|
|
2
|
+
|
|
3
|
+
import { Input } from '@/components/atoms'
|
|
4
|
+
|
|
5
|
+
import { Typography } from '../Typography'
|
|
6
|
+
|
|
7
|
+
const { Text } = Typography
|
|
8
|
+
|
|
9
|
+
type RangeNumberProps = {
|
|
10
|
+
size?: 'sm' | 'md' | 'lg' | null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function RangeNumber({ size = 'md' }: RangeNumberProps) {
|
|
14
|
+
const t = useTranslations('range')
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className='flex items-center gap-x-2'>
|
|
18
|
+
<Input.Number
|
|
19
|
+
sizes={size}
|
|
20
|
+
placeholder={t('from')}
|
|
21
|
+
className='!w-30'
|
|
22
|
+
/>
|
|
23
|
+
<Text muted size={'sm'}>
|
|
24
|
+
—
|
|
25
|
+
</Text>
|
|
26
|
+
<Input.Number
|
|
27
|
+
sizes={size}
|
|
28
|
+
placeholder={t('to')}
|
|
29
|
+
className='!w-30'
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RangeNumber } from './RangeNumber'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { twJoin } from '@/utils'
|
|
2
|
+
|
|
3
|
+
export const rootStyles = twJoin({
|
|
4
|
+
display: 'flex items-center px-4 py-2 mt-0.5 first:mt-0',
|
|
5
|
+
text: 'text-base',
|
|
6
|
+
visual: 'rounded-md outline-none',
|
|
7
|
+
animation: 'transition-(color,bg) duration-300',
|
|
8
|
+
hover: [
|
|
9
|
+
'hover:cursor-pointer',
|
|
10
|
+
'data-[state="unchecked"]:hover:bg-gray-100'
|
|
11
|
+
],
|
|
12
|
+
attrs: [
|
|
13
|
+
'data-[state="checked"]:text-primary',
|
|
14
|
+
'data-[state="checked"]:bg-primary/16'
|
|
15
|
+
],
|
|
16
|
+
childs: [
|
|
17
|
+
'[&_span]:flex [&_span]:items-center',
|
|
18
|
+
'[&_span_svg]:size-4.5 [&_span_svg]:mr-3'
|
|
19
|
+
],
|
|
20
|
+
//
|
|
21
|
+
dark: 'dark:[&[data-state="unchecked"]]:hover:bg-dark-gray-800/50'
|
|
22
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import { type ComponentProps } from 'react'
|
|
3
|
+
|
|
4
|
+
import { Select } from 'radix-ui'
|
|
5
|
+
|
|
6
|
+
import { rootStyles } from './Item.styles'
|
|
7
|
+
|
|
8
|
+
type ItemProps = ComponentProps<typeof Select.Item>
|
|
9
|
+
|
|
10
|
+
function Item({ children, className, ...props }: ItemProps) {
|
|
11
|
+
return (
|
|
12
|
+
<Select.Item className={clsx(rootStyles, className)} {...props}>
|
|
13
|
+
<Select.ItemText>{children}</Select.ItemText>
|
|
14
|
+
</Select.Item>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
export { Item }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Item } from './Item'
|