@okam/stack-ui 1.25.3 → 1.25.4
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/components/Accordion/components/AccordionItem.d.ts +3 -0
- package/components/Accordion/components/AriaAccordionItem.d.ts +3 -0
- package/components/Accordion/hooks/useAccordionState.d.ts +10 -0
- package/components/Accordion/index.d.ts +3 -0
- package/{src/components/Accordion/interface.ts → components/Accordion/interface.d.ts} +17 -23
- package/components/Alerts/components/AlertsCloseButton.d.ts +4 -0
- package/components/Alerts/components/AlertsItem.d.ts +3 -0
- package/components/Alerts/components/AlertsNavigationButton.d.ts +8 -0
- package/components/Alerts/components/AlertsSwiper.d.ts +3 -0
- package/components/Alerts/components/pagination/AlertsPagination.d.ts +3 -0
- package/components/Alerts/components/pagination/AlertsPaginationBullet.d.ts +3 -0
- package/components/Alerts/index.d.ts +3 -0
- package/components/Alerts/interface.d.ts +41 -0
- package/components/Box/index.d.ts +5 -0
- package/components/Box/interface.d.ts +11 -0
- package/components/Button/index.d.ts +6 -0
- package/components/Button/interface.d.ts +20 -0
- package/components/Calendar/RangeCalendar.d.ts +3 -0
- package/components/Calendar/components/CalendarCell.d.ts +3 -0
- package/components/Calendar/components/CalendarGrid.d.ts +3 -0
- package/components/Calendar/index.d.ts +3 -0
- package/components/Calendar/interface.d.ts +32 -0
- package/components/Carousel/index.d.ts +3 -0
- package/components/Carousel/interface.d.ts +24 -0
- package/components/Date/index.d.ts +3 -0
- package/components/Date/interface.d.ts +6 -0
- package/components/Dialog/index.d.ts +2 -0
- package/components/Dialog/interface.d.ts +6 -0
- package/components/DirectusImg/index.d.ts +3 -0
- package/components/DirectusImg/interface.d.ts +17 -0
- package/components/Icon/index.d.ts +3 -0
- package/components/Icon/interface.d.ts +7 -0
- package/components/Img/index.d.ts +3 -0
- package/components/Img/interface.d.ts +6 -0
- package/components/Lightbox/index.d.ts +3 -0
- package/components/Lightbox/interface.d.ts +25 -0
- package/components/Menu/Menu.d.ts +3 -0
- package/components/Menu/MenuSidePanel.d.ts +3 -0
- package/components/Menu/components/InnerContent.d.ts +3 -0
- package/components/Menu/components/MenuItems.d.ts +3 -0
- package/components/Menu/components/TabContainer.d.ts +3 -0
- package/components/Menu/interface.d.ts +31 -0
- package/components/Modal/components/ModalDialog.d.ts +3 -0
- package/components/Modal/components/ModalOverlay.d.ts +3 -0
- package/components/Modal/index.d.ts +3 -0
- package/{src/components/Modal/interface.ts → components/Modal/interface.d.ts} +11 -14
- package/components/Popover/index.d.ts +3 -0
- package/components/Popover/interface.d.ts +21 -0
- package/components/ShareButton/index.d.ts +4 -0
- package/components/ShareButton/interface.d.ts +26 -0
- package/components/ShareButton/utils/generateUtmTags.d.ts +2 -0
- package/components/ShareButton/utils/useFacebookShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useMailToShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useTwitterShareUrl.d.ts +2 -0
- package/components/ShareButton/utils/useWindow.d.ts +5 -0
- package/components/SidePanel/index.d.ts +4 -0
- package/components/SidePanel/interface.d.ts +12 -0
- package/components/TabList/components/TabPanel/TabPanel.d.ts +4 -0
- package/components/TabList/interface.d.ts +18 -0
- package/components/Typography/index.d.ts +5 -0
- package/components/Typography/interface.d.ts +10 -0
- package/components/WysiwygBlock/index.d.ts +3 -0
- package/components/WysiwygBlock/interface.d.ts +5 -0
- package/components/fields/Checkbox/Checkbox.interface.d.ts +18 -0
- package/components/fields/Checkbox/index.d.ts +3 -0
- package/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.d.ts +3 -0
- package/components/fields/CheckboxGroup/index.d.ts +3 -0
- package/components/fields/CheckboxGroup/interface.d.ts +13 -0
- package/components/fields/DatePicker/DateRangePicker.d.ts +3 -0
- package/components/fields/DatePicker/components/CalendarPopover.d.ts +2 -0
- package/components/fields/DatePicker/components/DateField.d.ts +4 -0
- package/components/fields/DatePicker/index.d.ts +3 -0
- package/components/fields/DatePicker/interface.d.ts +37 -0
- package/components/fields/Radio/Radio.interface.d.ts +26 -0
- package/components/fields/Radio/index.d.ts +4 -0
- package/components/fields/RadioGroup/index.d.ts +3 -0
- package/components/fields/RadioGroup/interface.d.ts +9 -0
- package/components/fields/SearchField/index.d.ts +3 -0
- package/components/fields/SearchField/interface.d.ts +9 -0
- package/components/fields/Select/Select.d.ts +4 -0
- package/components/fields/Select/Select.interface.d.ts +26 -0
- package/components/fields/Select/components/Listbox.d.ts +4 -0
- package/{src/components/fields/Select/components/Listbox.interface.ts → components/fields/Select/components/Listbox.interface.d.ts} +8 -11
- package/components/fields/Select/components/Popover.d.ts +3 -0
- package/components/fields/Select/components/Popover.interface.d.ts +13 -0
- package/components/fields/SelectItem/SelectItem.d.ts +3 -0
- package/{src/components/fields/SelectItem/SelectItem.interface.ts → components/fields/SelectItem/SelectItem.interface.d.ts} +3 -4
- package/components/fields/TextArea/index.d.ts +4 -0
- package/components/fields/TextInputField/index.d.ts +4 -0
- package/components/fields/TextInputField/interface.d.ts +24 -0
- package/components/icons/ArrowDown.d.ts +3 -0
- package/components/icons/ArrowLeft.d.ts +3 -0
- package/components/icons/ArrowRight.d.ts +3 -0
- package/components/icons/Check.d.ts +3 -0
- package/components/icons/ChevronLeft.d.ts +3 -0
- package/components/icons/ChevronRight.d.ts +3 -0
- package/components/icons/CloseBtn.d.ts +3 -0
- package/components/icons/Facebook.d.ts +3 -0
- package/components/icons/FacebookColored.d.ts +3 -0
- package/components/icons/FacebookRounded.d.ts +3 -0
- package/components/icons/Globe.d.ts +3 -0
- package/components/icons/IconFallback.d.ts +3 -0
- package/components/icons/Instagram.d.ts +3 -0
- package/components/icons/InstagramColored.d.ts +3 -0
- package/components/icons/Link.d.ts +3 -0
- package/components/icons/LinkedIn.d.ts +3 -0
- package/components/icons/Mail.d.ts +3 -0
- package/components/icons/Plus.d.ts +3 -0
- package/components/icons/Search.d.ts +3 -0
- package/components/icons/Share.d.ts +3 -0
- package/components/icons/Twitter.d.ts +3 -0
- package/components/icons/TwitterColored.d.ts +3 -0
- package/components/icons/Upload.d.ts +3 -0
- package/components/icons/X.d.ts +3 -0
- package/components/icons/YouTube.d.ts +3 -0
- package/components/icons/YouTubeColored.d.ts +3 -0
- package/components/icons/index.d.ts +24 -0
- package/{src/index.ts → index.d.ts} +57 -72
- package/index.js +110 -0
- package/index.mjs +12755 -0
- package/package.json +1 -1
- package/providers/Accordion/index.d.ts +4 -0
- package/providers/Accordion/interface.d.ts +12 -0
- package/providers/Alerts/index.d.ts +4 -0
- package/providers/Alerts/interface.d.ts +9 -0
- package/providers/CheckboxGroup/index.d.ts +5 -0
- package/{src/providers/CheckboxGroup/interface.ts → providers/CheckboxGroup/interface.d.ts} +4 -5
- package/providers/Client/index.d.ts +4 -0
- package/providers/Client/interface.d.ts +10 -0
- package/providers/Menu/index.d.ts +4 -0
- package/providers/Menu/interface.d.ts +28 -0
- package/providers/RadioGroup/RadioGroup.d.ts +5 -0
- package/providers/RadioGroup/RadioGroup.interface.d.ts +7 -0
- package/providers/SidePanel/index.d.ts +4 -0
- package/providers/SidePanel/interface.d.ts +23 -0
- package/providers/Theme/hooks.d.ts +3 -0
- package/providers/Theme/index.d.ts +10 -0
- package/providers/Theme/interface.d.ts +24 -0
- package/providers/Theme/utils.d.ts +2 -0
- package/providers/UserSearchQuery/index.d.ts +4 -0
- package/providers/UserSearchQuery/interface.d.ts +10 -0
- package/style.css +1 -0
- package/theme/Accordion/index.d.ts +274 -0
- package/theme/Alerts/index.d.ts +1167 -0
- package/theme/Box/index.d.ts +214 -0
- package/theme/Button/index.d.ts +121 -0
- package/theme/Calendar/index.d.ts +366 -0
- package/theme/Carousel/index.d.ts +9 -0
- package/theme/Checkbox/index.d.ts +159 -0
- package/theme/CheckboxGroup/index.d.ts +30 -0
- package/theme/DatePicker/index.d.ts +43 -0
- package/theme/Image/index.d.ts +3 -0
- package/theme/LightBox/index.d.ts +455 -0
- package/theme/Radio/index.d.ts +108 -0
- package/theme/RadioGroup/index.d.ts +30 -0
- package/theme/Search/index.d.ts +30 -0
- package/theme/ShareButton/index.d.ts +174 -0
- package/theme/SidePanel/index.d.ts +3 -0
- package/theme/TextArea/index.d.ts +29 -0
- package/theme/Typography/index.d.ts +233 -0
- package/theme/index.d.ts +5 -0
- package/transitions/AccordionTransition.d.ts +4 -0
- package/transitions/ModalTransition.d.ts +7 -0
- package/transitions/RenderWithOpacity.d.ts +4 -0
- package/transitions/RenderWithSlide.d.ts +7 -0
- package/transitions/SidePanelTransition.d.ts +7 -0
- package/types/components.d.ts +28 -0
- package/.eslintrc.js +0 -32
- package/.storybook/.eslintrc.js +0 -29
- package/.storybook/main.ts +0 -33
- package/.storybook/preview.js +0 -56
- package/.storybook/tsconfig.json +0 -17
- package/CHANGELOG.md +0 -574
- package/README.md +0 -8
- package/postcss.config.js +0 -15
- package/project.json +0 -77
- package/src/_stories/icons/code-brackets.svg +0 -1
- package/src/_stories/icons/colors.svg +0 -1
- package/src/_stories/icons/comments.svg +0 -1
- package/src/_stories/icons/direction.svg +0 -1
- package/src/_stories/icons/flow.svg +0 -1
- package/src/_stories/icons/plugin.svg +0 -1
- package/src/_stories/icons/repo.svg +0 -1
- package/src/_stories/icons/stackalt.svg +0 -1
- package/src/components/Accordion/accordion.stories.mdx +0 -240
- package/src/components/Accordion/components/AccordionItem.tsx +0 -53
- package/src/components/Accordion/components/AriaAccordionItem.tsx +0 -76
- package/src/components/Accordion/hooks/useAccordionState.ts +0 -46
- package/src/components/Accordion/index.tsx +0 -38
- package/src/components/Alerts/alerts.stories.mdx +0 -282
- package/src/components/Alerts/components/AlertsCloseButton.tsx +0 -20
- package/src/components/Alerts/components/AlertsItem.tsx +0 -39
- package/src/components/Alerts/components/AlertsNavigationButton.tsx +0 -71
- package/src/components/Alerts/components/AlertsSwiper.tsx +0 -125
- package/src/components/Alerts/components/pagination/AlertsPagination.tsx +0 -32
- package/src/components/Alerts/components/pagination/AlertsPaginationBullet.tsx +0 -61
- package/src/components/Alerts/index.tsx +0 -54
- package/src/components/Alerts/interface.ts +0 -51
- package/src/components/Box/box.stories.mdx +0 -27
- package/src/components/Box/index.tsx +0 -36
- package/src/components/Box/interface.ts +0 -10
- package/src/components/Button/button.stories.mdx +0 -99
- package/src/components/Button/index.tsx +0 -92
- package/src/components/Button/interface.ts +0 -22
- package/src/components/Calendar/RangeCalendar.tsx +0 -61
- package/src/components/Calendar/calendar.stories.mdx +0 -28
- package/src/components/Calendar/components/CalendarCell.tsx +0 -60
- package/src/components/Calendar/components/CalendarGrid.tsx +0 -44
- package/src/components/Calendar/index.tsx +0 -63
- package/src/components/Calendar/interface.ts +0 -37
- package/src/components/Carousel/carousel.stories.mdx +0 -182
- package/src/components/Carousel/index.tsx +0 -99
- package/src/components/Carousel/interface.ts +0 -26
- package/src/components/Date/date.stories.mdx +0 -122
- package/src/components/Date/index.tsx +0 -35
- package/src/components/Date/interface.ts +0 -7
- package/src/components/Dialog/index.tsx +0 -14
- package/src/components/Dialog/interface.ts +0 -6
- package/src/components/DirectusImg/index.tsx +0 -59
- package/src/components/DirectusImg/interface.ts +0 -19
- package/src/components/Icon/index.tsx +0 -40
- package/src/components/Icon/interface.ts +0 -8
- package/src/components/Img/img.stories.mdx +0 -28
- package/src/components/Img/index.tsx +0 -30
- package/src/components/Img/interface.ts +0 -9
- package/src/components/Lightbox/hooks/overlay/index.tsx +0 -36
- package/src/components/Lightbox/index.tsx +0 -82
- package/src/components/Lightbox/interface.ts +0 -28
- package/src/components/Lightbox/lightbox.stories.mdx +0 -79
- package/src/components/Menu/Menu.tsx +0 -43
- package/src/components/Menu/MenuSidePanel.tsx +0 -41
- package/src/components/Menu/components/InnerContent.tsx +0 -26
- package/src/components/Menu/components/MenuItems.tsx +0 -133
- package/src/components/Menu/components/TabContainer.tsx +0 -13
- package/src/components/Menu/interface.ts +0 -41
- package/src/components/Menu/menu.stories.mdx +0 -23
- package/src/components/Modal/components/ModalDialog.tsx +0 -31
- package/src/components/Modal/components/ModalOverlay.tsx +0 -21
- package/src/components/Modal/index.tsx +0 -32
- package/src/components/Popover/index.tsx +0 -138
- package/src/components/Popover/interface.ts +0 -25
- package/src/components/Popover/popover.stories.mdx +0 -66
- package/src/components/ShareButton/index.tsx +0 -172
- package/src/components/ShareButton/interface.ts +0 -29
- package/src/components/ShareButton/share-button.stories.mdx +0 -48
- package/src/components/ShareButton/utils/generateUtmTags.ts +0 -4
- package/src/components/ShareButton/utils/useFacebookShareUrl.ts +0 -15
- package/src/components/ShareButton/utils/useMailToShareUrl.ts +0 -15
- package/src/components/ShareButton/utils/useTwitterShareUrl.ts +0 -15
- package/src/components/ShareButton/utils/useWindow.ts +0 -17
- package/src/components/SidePanel/index.tsx +0 -43
- package/src/components/SidePanel/interface.ts +0 -16
- package/src/components/SidePanel/side-panel.stories.mdx +0 -44
- package/src/components/TabList/components/Tab/Tab.tsx +0 -19
- package/src/components/TabList/components/TabPanel/TabPanel.tsx +0 -27
- package/src/components/TabList/index.tsx +0 -44
- package/src/components/TabList/interface.ts +0 -23
- package/src/components/Typography/index.tsx +0 -35
- package/src/components/Typography/interface.ts +0 -9
- package/src/components/Typography/typo.stories.mdx +0 -157
- package/src/components/WysiwygBlock/index.tsx +0 -20
- package/src/components/WysiwygBlock/interface.ts +0 -7
- package/src/components/WysiwygBlock/wysiwyg.stories.mdx +0 -53
- package/src/components/fields/Checkbox/Checkbox.interface.ts +0 -21
- package/src/components/fields/Checkbox/Checkbox.stories.mdx +0 -127
- package/src/components/fields/Checkbox/index.tsx +0 -62
- package/src/components/fields/CheckboxGroup/checkbox-group.stories.mdx +0 -59
- package/src/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.tsx +0 -66
- package/src/components/fields/CheckboxGroup/index.tsx +0 -49
- package/src/components/fields/CheckboxGroup/interface.ts +0 -17
- package/src/components/fields/DatePicker/DateRangePicker.tsx +0 -73
- package/src/components/fields/DatePicker/components/CalendarPopover.tsx +0 -31
- package/src/components/fields/DatePicker/components/DateField.tsx +0 -61
- package/src/components/fields/DatePicker/date-picker.stories.mdx +0 -55
- package/src/components/fields/DatePicker/index.tsx +0 -71
- package/src/components/fields/DatePicker/interface.ts +0 -69
- package/src/components/fields/Radio/Radio.interface.ts +0 -30
- package/src/components/fields/Radio/index.tsx +0 -63
- package/src/components/fields/RadioGroup/index.tsx +0 -33
- package/src/components/fields/RadioGroup/interface.ts +0 -10
- package/src/components/fields/RadioGroup/radio-group.stories.mdx +0 -56
- package/src/components/fields/SearchField/index.tsx +0 -59
- package/src/components/fields/SearchField/interface.ts +0 -10
- package/src/components/fields/SearchField/search.stories.mdx +0 -91
- package/src/components/fields/Select/Select.interface.ts +0 -24
- package/src/components/fields/Select/Select.stories.mdx +0 -53
- package/src/components/fields/Select/Select.tsx +0 -108
- package/src/components/fields/Select/components/Listbox.tsx +0 -40
- package/src/components/fields/Select/components/Popover.interface.ts +0 -14
- package/src/components/fields/Select/components/Popover.tsx +0 -32
- package/src/components/fields/SelectItem/SelectItem.tsx +0 -10
- package/src/components/fields/TextArea/index.tsx +0 -105
- package/src/components/fields/TextArea/textArea.stories.mdx +0 -60
- package/src/components/fields/TextInputField/index.tsx +0 -107
- package/src/components/fields/TextInputField/interface.ts +0 -30
- package/src/components/fields/TextInputField/text-input-field.stories.mdx +0 -64
- package/src/components/icons/ArrowDown.tsx +0 -11
- package/src/components/icons/ArrowLeft.tsx +0 -18
- package/src/components/icons/ArrowRight.tsx +0 -18
- package/src/components/icons/Check.tsx +0 -11
- package/src/components/icons/ChevronLeft.tsx +0 -11
- package/src/components/icons/ChevronRight.tsx +0 -11
- package/src/components/icons/CloseBtn.tsx +0 -11
- package/src/components/icons/Facebook.tsx +0 -14
- package/src/components/icons/FacebookColored.tsx +0 -16
- package/src/components/icons/FacebookRounded.tsx +0 -16
- package/src/components/icons/Globe.tsx +0 -38
- package/src/components/icons/IconFallback.tsx +0 -8
- package/src/components/icons/Instagram.tsx +0 -14
- package/src/components/icons/InstagramColored.tsx +0 -59
- package/src/components/icons/Link.tsx +0 -14
- package/src/components/icons/LinkedIn.tsx +0 -16
- package/src/components/icons/Mail.tsx +0 -16
- package/src/components/icons/Plus.tsx +0 -18
- package/src/components/icons/Search.tsx +0 -19
- package/src/components/icons/Share.tsx +0 -16
- package/src/components/icons/Twitter.tsx +0 -16
- package/src/components/icons/TwitterColored.tsx +0 -16
- package/src/components/icons/Upload.tsx +0 -14
- package/src/components/icons/X.tsx +0 -14
- package/src/components/icons/YouTube.tsx +0 -16
- package/src/components/icons/YouTubeColored.tsx +0 -17
- package/src/components/icons/index.ts +0 -24
- package/src/examples/PageLayout/index.tsx +0 -61
- package/src/examples/PageLayout/layout.stories.mdx +0 -35
- package/src/message.tsx +0 -8
- package/src/providers/Accordion/index.tsx +0 -15
- package/src/providers/Accordion/interface.ts +0 -14
- package/src/providers/Alerts/index.tsx +0 -15
- package/src/providers/Alerts/interface.ts +0 -11
- package/src/providers/CheckboxGroup/index.tsx +0 -22
- package/src/providers/Client/index.tsx +0 -21
- package/src/providers/Client/interface.ts +0 -13
- package/src/providers/Menu/index.tsx +0 -43
- package/src/providers/Menu/interface.ts +0 -32
- package/src/providers/RadioGroup/RadioGroup.interface.ts +0 -8
- package/src/providers/RadioGroup/RadioGroup.tsx +0 -25
- package/src/providers/SidePanel/index.tsx +0 -55
- package/src/providers/SidePanel/interface.ts +0 -26
- package/src/providers/Theme/hooks.ts +0 -25
- package/src/providers/Theme/index.tsx +0 -40
- package/src/providers/Theme/interface.ts +0 -28
- package/src/providers/Theme/utils.ts +0 -3
- package/src/providers/UserSearchQuery/index.tsx +0 -20
- package/src/providers/UserSearchQuery/interface.ts +0 -12
- package/src/storybook/Lightbox/LightboxControlledState.tsx +0 -28
- package/src/storybook/Menu/Menu.tsx +0 -177
- package/src/storybook/Menu/NestedMenu.tsx +0 -24
- package/src/storybook/Menu/mock.tsx +0 -84
- package/src/storybook/SelectField/index.tsx +0 -57
- package/src/storybook/ShareButtonExample/index.tsx +0 -66
- package/src/tailwind.css +0 -3
- package/src/theme/Accordion/index.tsx +0 -101
- package/src/theme/Alerts/index.ts +0 -97
- package/src/theme/Box/index.ts +0 -45
- package/src/theme/Button/index.tsx +0 -72
- package/src/theme/Calendar/index.tsx +0 -167
- package/src/theme/Carousel/index.ts +0 -36
- package/src/theme/Checkbox/index.ts +0 -49
- package/src/theme/CheckboxGroup/index.ts +0 -14
- package/src/theme/DatePicker/index.tsx +0 -42
- package/src/theme/Image/index.ts +0 -8
- package/src/theme/LightBox/index.ts +0 -56
- package/src/theme/Radio/index.ts +0 -31
- package/src/theme/RadioGroup/index.ts +0 -14
- package/src/theme/Search/index.ts +0 -20
- package/src/theme/ShareButton/index.tsx +0 -76
- package/src/theme/SidePanel/index.ts +0 -9
- package/src/theme/TextArea/index.ts +0 -25
- package/src/theme/Typography/index.tsx +0 -44
- package/src/theme/index.tsx +0 -178
- package/src/transitions/AccordionTransition.tsx +0 -26
- package/src/transitions/ModalTransition.tsx +0 -38
- package/src/transitions/RenderWithOpacity.tsx +0 -25
- package/src/transitions/RenderWithSlide.tsx +0 -21
- package/src/transitions/SidePanelTransition.tsx +0 -30
- package/src/types/components.ts +0 -34
- package/static/images/image.png +0 -0
- package/tailwind.config.js +0 -14
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -25
- package/vite.config.ts +0 -58
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { Item } from '@react-stately/collections'
|
|
2
|
-
import { isEmpty } from 'radash'
|
|
3
|
-
import type { ComponentType } from 'react'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
import Button, { ButtonWithForwardRef } from '../../components/Button'
|
|
6
|
-
import type { TButtonProps } from '../../components/Button/interface'
|
|
7
|
-
import MenuItems from '../../components/Menu/components/MenuItems'
|
|
8
|
-
import type { TMenuItemProps, TMenuProps, TMenuSidePanelProps } from '../../components/Menu/interface'
|
|
9
|
-
import MenuSidePanel from '../../components/Menu/MenuSidePanel'
|
|
10
|
-
import Typography from '../../components/Typography'
|
|
11
|
-
import { MenuContextProvider, useMenu } from '../../providers/Menu'
|
|
12
|
-
import { useSidePanel } from '../../providers/SidePanel'
|
|
13
|
-
import RenderWithSlide from '../../transitions/RenderWithSlide'
|
|
14
|
-
import { items } from './mock'
|
|
15
|
-
|
|
16
|
-
export type TSubMenuTab = {
|
|
17
|
-
key: string
|
|
18
|
-
title: string
|
|
19
|
-
childItems?: TMenuItemProps[] | null
|
|
20
|
-
extra: React.ReactNode | undefined
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type TSubMenuExtraData = {
|
|
24
|
-
path: string
|
|
25
|
-
data: React.ReactNode
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const SidePanelControl = () => {
|
|
29
|
-
const { buttonProps } = useSidePanel()
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<ButtonWithForwardRef {...buttonProps?.openButtonProps} ref={buttonProps?.openButtonRef}>
|
|
33
|
-
Open
|
|
34
|
-
</ButtonWithForwardRef>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const BackBtn = ({ label }: TButtonProps & { label?: string }) => {
|
|
39
|
-
const { tabState, defaultSelectedKey } = useMenu()
|
|
40
|
-
const { setSelectedKey } = tabState
|
|
41
|
-
|
|
42
|
-
return <Button handlePress={() => setSelectedKey?.(defaultSelectedKey)}>{label}</Button>
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const CloseBtn = () => {
|
|
46
|
-
const { tabState, defaultSelectedKey } = useMenu()
|
|
47
|
-
const { buttonProps, overlayState } = useSidePanel()
|
|
48
|
-
const { closeButtonProps, closeButtonRef } = buttonProps
|
|
49
|
-
const { isOpen } = overlayState
|
|
50
|
-
|
|
51
|
-
const handlePress = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
52
|
-
tabState?.setSelectedKey?.(defaultSelectedKey)
|
|
53
|
-
closeButtonProps?.onClick?.(e)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const updatedCloseButtonProps = { ...closeButtonProps, onClick: handlePress }
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
isOpen && (
|
|
60
|
-
<ButtonWithForwardRef type="button" {...updatedCloseButtonProps} ref={closeButtonRef} aria-label="CloseButton">
|
|
61
|
-
Close
|
|
62
|
-
</ButtonWithForwardRef>
|
|
63
|
-
)
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const ShowTab = ({ children }: { children: React.ReactNode }) => (
|
|
68
|
-
<div>
|
|
69
|
-
<div>
|
|
70
|
-
<BackBtn label="SHOWS" />
|
|
71
|
-
<CloseBtn />
|
|
72
|
-
</div>
|
|
73
|
-
<Typography>{children}</Typography>
|
|
74
|
-
</div>
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
export const CloseBtnRender = () => <CloseBtn />
|
|
78
|
-
|
|
79
|
-
export const MenuFactory = ({
|
|
80
|
-
menuItems,
|
|
81
|
-
tabs,
|
|
82
|
-
id,
|
|
83
|
-
defaultIsOpen,
|
|
84
|
-
openBtn = null,
|
|
85
|
-
MenuComponent,
|
|
86
|
-
}: {
|
|
87
|
-
tabs: JSX.Element[]
|
|
88
|
-
id: string
|
|
89
|
-
menuItems?: TMenuItemProps[] | null
|
|
90
|
-
defaultIsOpen?: boolean
|
|
91
|
-
openBtn?: React.ReactNode | null
|
|
92
|
-
MenuComponent: ComponentType<TMenuProps | TMenuSidePanelProps>
|
|
93
|
-
}) => {
|
|
94
|
-
const { tabState, defaultSelectedKey } = useMenu()
|
|
95
|
-
|
|
96
|
-
const handleCloseMenu = () => {
|
|
97
|
-
if (defaultSelectedKey != null) {
|
|
98
|
-
tabState?.setSelectedKey?.(defaultSelectedKey)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<MenuContextProvider
|
|
104
|
-
defaultIsOpen={defaultIsOpen}
|
|
105
|
-
closeBtn={CloseBtnRender}
|
|
106
|
-
openBtn={SidePanelControl}
|
|
107
|
-
defaultSelectedKey="empty"
|
|
108
|
-
onCloseCallback={handleCloseMenu}
|
|
109
|
-
tabs={tabs}
|
|
110
|
-
>
|
|
111
|
-
<>
|
|
112
|
-
{openBtn}
|
|
113
|
-
<MenuComponent id={id} TransitionAnimation={RenderWithSlide as (props: unknown) => JSX.Element}>
|
|
114
|
-
<MenuItems menuItems={menuItems} />
|
|
115
|
-
</MenuComponent>
|
|
116
|
-
</>
|
|
117
|
-
</MenuContextProvider>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export const menuTabs = (
|
|
122
|
-
menu: TMenuItemProps[],
|
|
123
|
-
extras?: TSubMenuExtraData[],
|
|
124
|
-
MenuComponent: ComponentType<TMenuProps> = MenuSidePanel,
|
|
125
|
-
) => {
|
|
126
|
-
const tabs: TSubMenuTab[] = [{ key: 'empty', title: 'empty', childItems: null, extra: null }]
|
|
127
|
-
|
|
128
|
-
const recursiveFilter = (x: TMenuItemProps) => {
|
|
129
|
-
if (x.path?.startsWith('#')) {
|
|
130
|
-
const extra = extras?.find((f) => x.path === f.path)
|
|
131
|
-
tabs.push({ key: x.path.substring(1), title: x.label ?? x.path, childItems: x.childItems, extra: extra?.data })
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
menu.forEach(recursiveFilter)
|
|
136
|
-
|
|
137
|
-
return tabs.map(({ childItems, key, title }) => {
|
|
138
|
-
const childTabs = isEmpty(childItems) ? undefined : menuTabs(childItems ?? [], extras, MenuComponent)
|
|
139
|
-
return (
|
|
140
|
-
<Item key={key} title={title}>
|
|
141
|
-
<MenuFactory
|
|
142
|
-
defaultIsOpen
|
|
143
|
-
id={`menu-${title}`}
|
|
144
|
-
tabs={childTabs ?? []}
|
|
145
|
-
menuItems={childItems}
|
|
146
|
-
MenuComponent={MenuComponent}
|
|
147
|
-
/>
|
|
148
|
-
</Item>
|
|
149
|
-
)
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const MenuContent = () => {
|
|
154
|
-
const extras: TSubMenuExtraData[] = [
|
|
155
|
-
{
|
|
156
|
-
path: '#shows',
|
|
157
|
-
data: (
|
|
158
|
-
<ShowTab>
|
|
159
|
-
<div>Hello World</div>
|
|
160
|
-
</ShowTab>
|
|
161
|
-
),
|
|
162
|
-
},
|
|
163
|
-
]
|
|
164
|
-
const tabs = menuTabs(items, extras)
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<MenuFactory
|
|
168
|
-
MenuComponent={MenuSidePanel}
|
|
169
|
-
openBtn={<SidePanelControl />}
|
|
170
|
-
id="main-menu"
|
|
171
|
-
tabs={tabs}
|
|
172
|
-
menuItems={items}
|
|
173
|
-
/>
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export default MenuContent
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Menu from '../../components/Menu/Menu'
|
|
2
|
-
import type { TSubMenuExtraData } from './Menu'
|
|
3
|
-
import { ShowTab, menuTabs, MenuFactory, SidePanelControl } from './Menu'
|
|
4
|
-
import { items } from './mock'
|
|
5
|
-
|
|
6
|
-
const MenuContent = () => {
|
|
7
|
-
const extras: TSubMenuExtraData[] = [
|
|
8
|
-
{
|
|
9
|
-
path: '#shows',
|
|
10
|
-
data: (
|
|
11
|
-
<ShowTab>
|
|
12
|
-
<div>Hello World</div>
|
|
13
|
-
</ShowTab>
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
]
|
|
17
|
-
const tabs = menuTabs(items, extras, Menu)
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<MenuFactory MenuComponent={Menu} openBtn={<SidePanelControl />} id="main-menu" tabs={tabs} menuItems={items} />
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default MenuContent
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { TMenuItemProps } from '../../components/Menu/interface'
|
|
2
|
-
|
|
3
|
-
export const items: TMenuItemProps[] = [
|
|
4
|
-
{
|
|
5
|
-
id: '1',
|
|
6
|
-
target: null,
|
|
7
|
-
path: '#shows',
|
|
8
|
-
label: 'Open 2nd Level Menu Label',
|
|
9
|
-
children: <div>Open 2nd Level Menu</div>,
|
|
10
|
-
ariaLabel: 'Open 2nd Level Menu Aria',
|
|
11
|
-
childItems: [
|
|
12
|
-
{
|
|
13
|
-
id: 'abc',
|
|
14
|
-
target: null,
|
|
15
|
-
path: '/',
|
|
16
|
-
label: '2nd level link',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: '7',
|
|
20
|
-
target: null,
|
|
21
|
-
path: '#subPanel1',
|
|
22
|
-
label: 'Open 3rd Level Menu',
|
|
23
|
-
childItems: [
|
|
24
|
-
{
|
|
25
|
-
id: '8',
|
|
26
|
-
target: null,
|
|
27
|
-
path: '/',
|
|
28
|
-
label: '3rd level link',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: '9',
|
|
32
|
-
target: null,
|
|
33
|
-
path: '#subPanel2',
|
|
34
|
-
label: 'Open 4th Level Menu',
|
|
35
|
-
childItems: [
|
|
36
|
-
{
|
|
37
|
-
id: '10',
|
|
38
|
-
target: null,
|
|
39
|
-
path: '/',
|
|
40
|
-
label: '4th level link',
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: '8',
|
|
50
|
-
target: null,
|
|
51
|
-
path: '#brands',
|
|
52
|
-
label: 'Brands',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: '2',
|
|
56
|
-
target: null,
|
|
57
|
-
path: '/',
|
|
58
|
-
label: 'Today’s Lede Stories',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: '3',
|
|
62
|
-
target: null,
|
|
63
|
-
path: '/',
|
|
64
|
-
label: 'News',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: '4',
|
|
68
|
-
target: null,
|
|
69
|
-
path: '/',
|
|
70
|
-
label: 'Trailers and screeners',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: '5',
|
|
74
|
-
target: null,
|
|
75
|
-
path: '/',
|
|
76
|
-
label: 'Team',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: '6',
|
|
80
|
-
target: null,
|
|
81
|
-
path: '#search',
|
|
82
|
-
label: 'Search the lede',
|
|
83
|
-
},
|
|
84
|
-
]
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import Select from '../../components/fields/Select/Select'
|
|
3
|
-
import type { TSelectProps } from '../../components/fields/Select/Select.interface'
|
|
4
|
-
|
|
5
|
-
const SelectContent = ({
|
|
6
|
-
disabled = false,
|
|
7
|
-
isError = false,
|
|
8
|
-
errorMessage,
|
|
9
|
-
id,
|
|
10
|
-
label,
|
|
11
|
-
name,
|
|
12
|
-
placeholderLabel,
|
|
13
|
-
...rest
|
|
14
|
-
}: TSelectProps) => {
|
|
15
|
-
const [value, setValue] = useState<string>()
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
<button type="button" onClick={() => setValue('1')}>
|
|
20
|
-
1
|
|
21
|
-
</button>
|
|
22
|
-
<button type="button" onClick={() => setValue('2')}>
|
|
23
|
-
2
|
|
24
|
-
</button>
|
|
25
|
-
<button type="button" onClick={() => setValue('3')}>
|
|
26
|
-
3
|
|
27
|
-
</button>
|
|
28
|
-
<button type="button" onClick={() => setValue('4')}>
|
|
29
|
-
4
|
|
30
|
-
</button>
|
|
31
|
-
<Select
|
|
32
|
-
id={id}
|
|
33
|
-
label={label}
|
|
34
|
-
name={name}
|
|
35
|
-
placeholderLabel={placeholderLabel}
|
|
36
|
-
disabled={disabled}
|
|
37
|
-
isError={isError}
|
|
38
|
-
errorMessage={errorMessage}
|
|
39
|
-
{...rest}
|
|
40
|
-
onSelectionChange={(key) => {
|
|
41
|
-
setValue(key.toString())
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
console.log('selection changed')
|
|
44
|
-
}}
|
|
45
|
-
value={value}
|
|
46
|
-
options={[
|
|
47
|
-
{ key: '1', value: 'Option 1' },
|
|
48
|
-
{ key: '2', value: 'Option 2' },
|
|
49
|
-
{ key: '3', value: 'Option 3' },
|
|
50
|
-
{ key: '4', value: 'Option 4' },
|
|
51
|
-
]}
|
|
52
|
-
/>
|
|
53
|
-
</>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default SelectContent
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { useCopyToClipboard } from 'usehooks-ts'
|
|
2
|
-
import LinkedIn from '../../components/icons/LinkedIn'
|
|
3
|
-
import ShareButton from '../../components/ShareButton'
|
|
4
|
-
import type { TShareButtonProps } from '../../components/ShareButton/interface'
|
|
5
|
-
import Typography from '../../components/Typography'
|
|
6
|
-
|
|
7
|
-
const ShareButtonExample = (props: TShareButtonProps) => {
|
|
8
|
-
const { tokens } = props
|
|
9
|
-
const [value, copy] = useCopyToClipboard()
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<ShareButton
|
|
13
|
-
id="share"
|
|
14
|
-
ariaLabel="Share"
|
|
15
|
-
tokens={tokens}
|
|
16
|
-
sharingLinksList={[
|
|
17
|
-
{
|
|
18
|
-
ariaLabel: 'Share on Facebook',
|
|
19
|
-
icon: 'FacebookRounded',
|
|
20
|
-
key: 'facebook',
|
|
21
|
-
href: '#',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
ariaLabel: 'Share on Twitter',
|
|
25
|
-
icon: 'Twitter',
|
|
26
|
-
key: 'twitter',
|
|
27
|
-
href: '#',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
ariaLabel: 'Share on Instagram',
|
|
31
|
-
icon: 'Instagram',
|
|
32
|
-
key: 'instagram',
|
|
33
|
-
href: '#',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
ariaLabel: 'Share on YouTube',
|
|
37
|
-
icon: 'YouTube',
|
|
38
|
-
key: 'youtube',
|
|
39
|
-
href: '#',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
ariaLabel: 'Share on X',
|
|
43
|
-
icon: 'X',
|
|
44
|
-
key: 'x',
|
|
45
|
-
href: '#',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
ariaLabel: 'Share on LinkedIn',
|
|
49
|
-
icon: <LinkedIn />,
|
|
50
|
-
key: 'linkedin',
|
|
51
|
-
href: '#',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
ariaLabel: 'Copy to clipboard',
|
|
55
|
-
icon: 'ArrowDown',
|
|
56
|
-
key: 'copy',
|
|
57
|
-
onClick: (linkKey) => copy(linkKey),
|
|
58
|
-
},
|
|
59
|
-
]}
|
|
60
|
-
/>
|
|
61
|
-
<Typography>{value ? `Copied value: ${value}` : 'Nothing copied yet!'}</Typography>
|
|
62
|
-
</>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default ShareButtonExample
|
package/src/tailwind.css
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { tv } from 'tailwind-variants'
|
|
2
|
-
import type { TToken } from '../../providers/Theme/interface'
|
|
3
|
-
|
|
4
|
-
export const accordionContainer = tv({
|
|
5
|
-
base: '[border-radius: 32px] p-1.5 focus:outline-none text-color-1-500',
|
|
6
|
-
defaultVariants: {
|
|
7
|
-
textAlign: 'left',
|
|
8
|
-
isOpen: false,
|
|
9
|
-
},
|
|
10
|
-
variants: {
|
|
11
|
-
textAlign: {
|
|
12
|
-
center: 'text-center',
|
|
13
|
-
left: 'text-left',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export const accordionButton = tv({
|
|
19
|
-
base: 'grid overflow-hidden w-full items-center border-b-2 border-color-1-500 focus-ring-black',
|
|
20
|
-
variants: {
|
|
21
|
-
titleBold: {
|
|
22
|
-
true: 'font-bold',
|
|
23
|
-
},
|
|
24
|
-
textAlign: {
|
|
25
|
-
center: 'grid-cols-[3rem_1fr_3rem] pl-0 sm:pl-0',
|
|
26
|
-
left: 'grid-cols-[1fr_3rem]',
|
|
27
|
-
},
|
|
28
|
-
bgColor: {
|
|
29
|
-
gray: 'bg-gray-300',
|
|
30
|
-
white: 'bg-white',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
defaultVariants: {
|
|
34
|
-
titleBold: false,
|
|
35
|
-
textAlign: 'left',
|
|
36
|
-
bgColor: 'white',
|
|
37
|
-
},
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
export const accordionTitle = tv({
|
|
41
|
-
base: '',
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
textAlign: 'left',
|
|
44
|
-
},
|
|
45
|
-
variants: {
|
|
46
|
-
textAlign: {
|
|
47
|
-
center: 'justify-self-center col-start-2',
|
|
48
|
-
left: 'justify-self-start',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
export const accordionIcon = tv({
|
|
54
|
-
base: 'text-color-1-500 min-h-12 rotate-90 min-w-12 rounded-full flex items-center justify-center transition duration-500 transform ml-auto aspect-square',
|
|
55
|
-
variants: {
|
|
56
|
-
isOpen: {
|
|
57
|
-
true: '-rotate-90',
|
|
58
|
-
false: '',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
export const accordionRegion = tv({
|
|
64
|
-
base: `
|
|
65
|
-
font-body
|
|
66
|
-
text-inherit
|
|
67
|
-
h-auto
|
|
68
|
-
grid
|
|
69
|
-
`,
|
|
70
|
-
defaultVariants: {
|
|
71
|
-
textAlign: 'left',
|
|
72
|
-
},
|
|
73
|
-
variants: {
|
|
74
|
-
textAlign: {
|
|
75
|
-
center: 'grid-cols-[3rem_1fr_3rem] px-6 text-center',
|
|
76
|
-
left: 'grid-cols-[1fr_3rem] text-left',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
export const accordionContent = tv({
|
|
82
|
-
base: 'overflow-hidden flex flex-col gap-2 items-start',
|
|
83
|
-
defaultVariants: {
|
|
84
|
-
textAlign: 'left',
|
|
85
|
-
},
|
|
86
|
-
variants: {
|
|
87
|
-
textAlign: {
|
|
88
|
-
center: 'col-start-2',
|
|
89
|
-
left: '',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
export const accordionTheme = {
|
|
95
|
-
container: (props: TToken) => accordionContainer(props),
|
|
96
|
-
button: (props: TToken) => accordionButton(props),
|
|
97
|
-
title: (props: TToken) => accordionTitle(props),
|
|
98
|
-
icon: (props: TToken) => accordionIcon(props),
|
|
99
|
-
region: (props: TToken) => accordionRegion(props),
|
|
100
|
-
content: (props: TToken) => accordionContent(props),
|
|
101
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { tv } from 'tailwind-variants'
|
|
2
|
-
import button from '../Button'
|
|
3
|
-
import typography from '../Typography'
|
|
4
|
-
|
|
5
|
-
const alertsWrapper = tv({
|
|
6
|
-
base: 'bg-color-1-200 p-4 flex flex-col gap-4',
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
const alertsContainer = tv({
|
|
10
|
-
base: 'flex justify-between items-center gap-4 relative',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
const alertsCloseBtn = tv({
|
|
14
|
-
extend: button,
|
|
15
|
-
base: 'self-end',
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const alertsSwiperSwiper = tv({
|
|
19
|
-
base: 'bg-color-1-300 m-2 rounded-lg order-2',
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const alertsSwiperWrapper = tv({
|
|
23
|
-
base: 'm-4',
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const alertsItemWrapper = tv({
|
|
27
|
-
base: '',
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const alertsItemContainer = tv({
|
|
31
|
-
base: '',
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const alertsItemTitle = tv({
|
|
35
|
-
extend: typography,
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
size: 'h1',
|
|
38
|
-
},
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
const alertsItemContent = tv({
|
|
42
|
-
extend: typography,
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
const alertsItemIcon = tv({
|
|
46
|
-
base: 'block w-min bg-color-1-400 p-2 rounded-lg',
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
const alertsNavigationButton = tv({
|
|
50
|
-
extend: button,
|
|
51
|
-
variants: {
|
|
52
|
-
order: {
|
|
53
|
-
prev: 'order-1',
|
|
54
|
-
next: 'order-3',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const alertsPaginationWrapper = tv({
|
|
60
|
-
base: 'flex gap-4 justify-center absolute z-10 bottom-4 left-0 right-0',
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const alertsPaginationBullet = tv({
|
|
64
|
-
base: 'w-4 h-4 rounded-full block bg-color-1-600 focus-ring-black',
|
|
65
|
-
variants: {
|
|
66
|
-
active: {
|
|
67
|
-
true: 'bg-color-1-100',
|
|
68
|
-
false: '',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
const alertsTheme = {
|
|
74
|
-
wrapper: alertsWrapper,
|
|
75
|
-
container: alertsContainer,
|
|
76
|
-
closeBtn: alertsCloseBtn,
|
|
77
|
-
swiper: {
|
|
78
|
-
swiper: alertsSwiperSwiper,
|
|
79
|
-
wrapper: alertsSwiperWrapper,
|
|
80
|
-
},
|
|
81
|
-
item: {
|
|
82
|
-
wrapper: alertsItemWrapper,
|
|
83
|
-
container: alertsItemContainer,
|
|
84
|
-
title: alertsItemTitle,
|
|
85
|
-
content: alertsItemContent,
|
|
86
|
-
icon: alertsItemIcon,
|
|
87
|
-
},
|
|
88
|
-
navigation: {
|
|
89
|
-
button: alertsNavigationButton,
|
|
90
|
-
},
|
|
91
|
-
pagination: {
|
|
92
|
-
wrapper: alertsPaginationWrapper,
|
|
93
|
-
bullet: alertsPaginationBullet,
|
|
94
|
-
},
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export default alertsTheme
|
package/src/theme/Box/index.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { tv } from 'tailwind-variants'
|
|
2
|
-
|
|
3
|
-
export const main = tv({
|
|
4
|
-
base: 'w-full bg-slate-100',
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
export const container = tv({
|
|
8
|
-
base: 'max-w-screen-lg mx-auto w-full',
|
|
9
|
-
variants: {
|
|
10
|
-
fullWidth: {
|
|
11
|
-
true: 'max-w-full col-span-full p-0',
|
|
12
|
-
},
|
|
13
|
-
spacing: {
|
|
14
|
-
small: 'mb-3',
|
|
15
|
-
medium: 'mb-6',
|
|
16
|
-
large: 'mb-8',
|
|
17
|
-
none: 'mb-0',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const grid = tv({
|
|
23
|
-
extend: container,
|
|
24
|
-
base: 'grid grid-cols-12 gap-6 px-4 col-span-full',
|
|
25
|
-
variants: {
|
|
26
|
-
fullWidth: {
|
|
27
|
-
true: 'max-w-full col-span-full p-0',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
export const gridItem = tv({
|
|
33
|
-
base: 'bg-slate-300 h-64 p-4 flex justify-start items-end',
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
size: 'small',
|
|
36
|
-
},
|
|
37
|
-
variants: {
|
|
38
|
-
size: {
|
|
39
|
-
small: 'col-span-12 sm:col-span-6 md:col-span-4 lg:col-span-4',
|
|
40
|
-
medium: 'col-span-12 sm:col-span-12 md:col-span-8 lg:col-span-8',
|
|
41
|
-
large:
|
|
42
|
-
'lg:col-start-3 sm:col-start-1 sm:col-end-13 lg:col-end-11 md:col-start-3 md:col-end-11 col-start-1 col-end-13',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
})
|