gd-design-library 0.3.4 → 0.4.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/CHANGELOG.md +86 -17
- package/README.md +2 -0
- package/assets/icons/account_circle.js +17 -1
- package/assets/icons/arrow-down.js +15 -1
- package/assets/icons/arrow-forward.js +17 -1
- package/assets/icons/attachment.js +17 -1
- package/assets/icons/check.js +16 -1
- package/assets/icons/chevron-left.js +17 -1
- package/assets/icons/chevron-right.js +17 -1
- package/assets/icons/content-copy.js +17 -1
- package/assets/icons/cross.js +16 -1
- package/assets/icons/delete_outlined.js +17 -1
- package/assets/icons/dot.js +16 -1
- package/assets/icons/edit.js +17 -1
- package/assets/icons/error_outline.js +22 -1
- package/assets/icons/eye.js +17 -1
- package/assets/icons/favorite.js +17 -1
- package/assets/icons/favorite_outlined.js +17 -1
- package/assets/icons/file-copy.js +16 -1
- package/assets/icons/filter.js +17 -1
- package/assets/icons/folder.js +17 -1
- package/assets/icons/folderOpen.js +17 -1
- package/assets/icons/home.js +17 -1
- package/assets/icons/keyboard-arrow-down.js +12 -1
- package/assets/icons/local_shipping.js +17 -1
- package/assets/icons/minus.js +16 -1
- package/assets/icons/mobile_menu_button.js +17 -1
- package/assets/icons/paymentCard.js +17 -1
- package/assets/icons/plus.js +16 -1
- package/assets/icons/portrait.js +17 -1
- package/assets/icons/processing.js +17 -1
- package/assets/icons/ruler.js +17 -1
- package/assets/icons/search.js +17 -1
- package/assets/icons/shopping_bag.js +17 -1
- package/assets/icons/slash.js +17 -1
- package/assets/icons/star.js +16 -1
- package/assets/icons/starOutlined.js +16 -1
- package/assets/icons/thumb-down.js +17 -1
- package/assets/icons/thumb-up.js +17 -1
- package/assets/icons/toast_error.js +20 -1
- package/assets/icons/toast_info.js +16 -1
- package/assets/icons/toast_success.js +20 -1
- package/assets/icons/toast_warning.js +16 -1
- package/assets/icons/upload.js +17 -1
- package/assets/icons/volume-up.js +17 -1
- package/assets/icons/wifiTethering.js +17 -1
- package/assets/svg/checkbox_bg_checked.svg.js +5 -2
- package/assets/svg/checkbox_border.svg.js +5 -2
- package/assets/svg/checkbox_disabled_bg_checked.svg.js +5 -2
- package/assets/svg/radio_bg.svg.js +5 -2
- package/assets/svg/radio_bg_checked.svg.js +5 -2
- package/components/core/Breadcrumbs/Breadcrumbs.js +34 -1
- package/components/core/Breadcrumbs/BreadcrumbsStyled.js +58 -1
- package/components/core/Breadcrumbs/constants.js +4 -1
- package/components/core/Button/Button.js +43 -1
- package/components/core/Button/ButtonStyled.js +53 -1
- package/components/core/Button/constants.js +4 -1
- package/components/core/Dropdown/Dropdown.js +38 -1
- package/components/core/Dropdown/DropdownStyled.js +20 -1
- package/components/core/Dropdown/constants.js +4 -1
- package/components/core/Dropdown/hooks/useDropdown.js +12 -1
- package/components/core/DropdownItem/DropdownItem.js +38 -1
- package/components/core/DropdownItem/DropdownItemStyled.js +17 -1
- package/components/core/DropdownItem/constants.js +4 -1
- package/components/core/Form/Form.js +48 -1
- package/components/core/Form/FormStyled.js +16 -1
- package/components/core/Form/constants.js +4 -1
- package/components/core/Form/utils.js +34 -1
- package/components/core/Icon/Icon.js +33 -1
- package/components/core/Icon/constants.js +92 -1
- package/components/core/Image/Image.js +39 -1
- package/components/core/Image/ImageStyled.js +54 -1
- package/components/core/Image/constants.js +4 -1
- package/components/core/InlineNotification/InlineNotification.js +38 -1
- package/components/core/InlineNotification/InlineNotificationStyled.js +29 -1
- package/components/core/InlineNotification/constants.js +21 -1
- package/components/core/Input/Input.js +72 -1
- package/components/core/Input/InputAdornment/InputAdornment.js +18 -1
- package/components/core/Input/InputAdornment/InputAdornmentStyled.js +15 -1
- package/components/core/Input/InputAdornment/constants.js +4 -1
- package/components/core/Input/InputHelper/InputHelper.js +22 -1
- package/components/core/Input/InputHelper/InputHelperStyled.js +17 -1
- package/components/core/Input/InputHelper/constants.js +4 -1
- package/components/core/Input/InputStyled.js +18 -1
- package/components/core/Input/InputWrapper/InputWrapper.js +22 -1
- package/components/core/Input/InputWrapper/InputWrapperStyled.js +21 -1
- package/components/core/Input/InputWrapper/constants.js +5 -1
- package/components/core/Input/constants.js +18 -1
- package/components/core/Input/useInputHandlers.js +31 -1
- package/components/core/InputFile/InputFile.js +40 -1
- package/components/core/InputFile/InputFileStyled.js +27 -1
- package/components/core/InputFile/constants.js +6 -1
- package/components/core/Label/Label.js +27 -1
- package/components/core/Label/LabelStyled.js +17 -1
- package/components/core/Label/constants.js +4 -1
- package/components/core/Link/Link.js +43 -1
- package/components/core/Link/LinkStyled.js +22 -1
- package/components/core/Link/constants.js +4 -1
- package/components/core/List/List.js +45 -1
- package/components/core/List/ListStyled.js +31 -1
- package/components/core/List/constants.js +4 -1
- package/components/core/Loader/Loader.js +28 -1
- package/components/core/Loader/LoaderStyled.js +41 -1
- package/components/core/Loader/constants.js +6 -1
- package/components/core/Loader/utils.js +37 -1
- package/components/core/Menu/Menu.js +100 -1
- package/components/core/Menu/MenuStyled.js +31 -1
- package/components/core/Menu/constants.js +24 -1
- package/components/core/Modal/Modal.js +47 -1
- package/components/core/Modal/ModalStyled.js +76 -1
- package/components/core/Modal/constants.js +4 -1
- package/components/core/Portal/Portal.d.ts +1 -2
- package/components/core/Portal/Portal.js +19 -1
- package/components/core/Portal/index.d.ts +1 -1
- package/components/core/Scroll/Scroll.js +40 -1
- package/components/core/Scroll/ScrollBar.js +68 -1
- package/components/core/Scroll/ScrollStyled.js +56 -1
- package/components/core/Scroll/constants.js +6 -1
- package/components/core/Scroll/utils.js +41 -1
- package/components/core/Select/Select.js +145 -1
- package/components/core/Select/SelectStyled.js +70 -1
- package/components/core/Select/constants.js +5 -1
- package/components/core/Select/hooks/useSelectContext.js +12 -1
- package/components/core/Separator/Separator.js +36 -1
- package/components/core/Separator/SeparatorStyled.js +61 -1
- package/components/core/Separator/constants.js +4 -1
- package/components/core/Skeleton/Skeleton.js +24 -1
- package/components/core/Skeleton/SkeletonStyled.js +28 -1
- package/components/core/Skeleton/constants.js +6 -1
- package/components/core/Slider/Slider.js +35 -1
- package/components/core/Slider/SliderStyled.js +20 -1
- package/components/core/Slider/constants.js +6 -1
- package/components/core/Snackbar/Snackbar.js +46 -1
- package/components/core/Snackbar/SnackbarManager.js +48 -1
- package/components/core/Snackbar/SnackbarStyled.js +109 -5
- package/components/core/Snackbar/constants.js +10 -1
- package/components/core/Switch/Switch.js +36 -1
- package/components/core/Switch/SwitchStyled.js +56 -1
- package/components/core/Switch/constants.js +4 -1
- package/components/core/Textarea/Textarea.js +41 -1
- package/components/core/Textarea/Textarea.types.d.ts +1 -3
- package/components/core/Textarea/Textarea.types.js +6 -1
- package/components/core/Textarea/TextareaStyled.js +29 -1
- package/components/core/Textarea/constants.js +4 -1
- package/components/core/Textarea/hooks/useDynamicHeightAdjustment.js +8 -1
- package/components/core/Textarea/hooks/useResizeObserver.js +24 -1
- package/components/core/Toggle/Toggle.js +37 -1
- package/components/core/Toggle/ToggleStyled.js +18 -1
- package/components/core/Toggle/constants.js +4 -1
- package/components/core/Tooltip/Tooltip.js +40 -1
- package/components/core/Tooltip/Tooltip.types.js +4 -1
- package/components/core/Tooltip/TooltipStyled.js +23 -1
- package/components/core/Tooltip/constants.js +6 -1
- package/components/core/Tooltip/utils.js +64 -1
- package/components/core/Typography/Typography.js +26 -1
- package/components/core/Typography/TypographyStyled.js +32 -1
- package/components/core/Typography/constants.js +4 -1
- package/components/core/Wrapper/Wrapper.js +20 -1
- package/components/core/Wrapper/WrapperStyled.js +23 -1
- package/components/core/Wrapper/constants.js +4 -1
- package/components/core/index.d.ts +1 -1
- package/components/core/types/roles.types.js +4 -1
- package/components/domainSpecific/Accordion/Accordion.js +35 -1
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +21 -1
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +29 -1
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +26 -1
- package/components/domainSpecific/Accordion/AccordionStyled.js +39 -1
- package/components/domainSpecific/Accordion/constants.js +7 -1
- package/components/domainSpecific/Accordion/hooks/useAccordion.js +12 -1
- package/components/domainSpecific/Avatar/Avatar.js +44 -1
- package/components/domainSpecific/Avatar/AvatarStyled.js +63 -1
- package/components/domainSpecific/Avatar/constants.js +6 -1
- package/components/domainSpecific/Card/Card.js +47 -1
- package/components/domainSpecific/Card/CardButton/CardButton.js +25 -1
- package/components/domainSpecific/Card/CardButton/CardButtonStyled.js +18 -1
- package/components/domainSpecific/Card/CardButton/constants.js +4 -1
- package/components/domainSpecific/Card/CardCounter/CardCounter.js +26 -1
- package/components/domainSpecific/Card/CardCounter/CardCounterStyled.js +17 -1
- package/components/domainSpecific/Card/CardCounter/constants.js +4 -1
- package/components/domainSpecific/Card/CardDescription/CardDescription.js +24 -1
- package/components/domainSpecific/Card/CardDescription/CardDescriptionStyled.js +24 -1
- package/components/domainSpecific/Card/CardDescription/constants.js +10 -1
- package/components/domainSpecific/Card/CardImage/CardImage.js +26 -1
- package/components/domainSpecific/Card/CardImage/CardImageStyled.js +18 -1
- package/components/domainSpecific/Card/CardImage/constants.js +4 -1
- package/components/domainSpecific/Card/CardPrice/CardPrice.js +22 -1
- package/components/domainSpecific/Card/CardPrice/CardPriceStyled.js +18 -1
- package/components/domainSpecific/Card/CardPrice/constants.js +4 -1
- package/components/domainSpecific/Card/CardRating/CardRating.js +30 -1
- package/components/domainSpecific/Card/CardRating/CardRatingStyled.js +18 -1
- package/components/domainSpecific/Card/CardRating/constants.js +6 -1
- package/components/domainSpecific/Card/CardTitle/CardTitle.js +25 -1
- package/components/domainSpecific/Card/CardTitle/CardTitleStyled.js +24 -1
- package/components/domainSpecific/Card/CardTitle/constants.js +10 -1
- package/components/domainSpecific/Card/CartStyled.js +26 -1
- package/components/domainSpecific/Card/constants.js +4 -1
- package/components/domainSpecific/Carousel/Carousel.js +137 -1
- package/components/domainSpecific/Carousel/Carousel.types.d.ts +1 -12
- package/components/domainSpecific/Carousel/CarouselStyled.js +143 -1
- package/components/domainSpecific/Carousel/constants.js +4 -1
- package/components/domainSpecific/ChatBubble/ChatBubble.js +26 -1
- package/components/domainSpecific/ChatBubble/ChatBubbleStyled.js +43 -1
- package/components/domainSpecific/ChatBubble/constants.js +4 -1
- package/components/domainSpecific/ContentCarousel/ContentCarousel.js +69 -1
- package/components/domainSpecific/ContentCarousel/ContentCarouselStyled.js +32 -1
- package/components/domainSpecific/ContentCarousel/constants.js +4 -1
- package/components/domainSpecific/Counter/Counter.js +55 -1
- package/components/domainSpecific/Counter/CounterStyled.js +27 -1
- package/components/domainSpecific/Counter/constants.js +8 -1
- package/components/domainSpecific/DragAndDropFiles/DragAndDropFiles.js +48 -1
- package/components/domainSpecific/DragAndDropFiles/DragAndDropFilesStyled.js +16 -1
- package/components/domainSpecific/DragAndDropFiles/constants.js +4 -1
- package/components/domainSpecific/DragAndDropFiles/hooks/useDragAndDrop/useDragAndDrop.js +49 -1
- package/components/domainSpecific/Header/Header.js +88 -1
- package/components/domainSpecific/Header/HeaderStyled.js +136 -1
- package/components/domainSpecific/Header/constants.js +4 -1
- package/components/domainSpecific/Price/Price.js +23 -1
- package/components/domainSpecific/Price/PriceStyled.js +42 -1
- package/components/domainSpecific/Price/constants.js +4 -1
- package/components/domainSpecific/ProgressBar/ProgressBar.js +29 -1
- package/components/domainSpecific/ProgressBar/ProgressBarStyled.js +70 -1
- package/components/domainSpecific/ProgressBar/constants.js +7 -1
- package/components/domainSpecific/RadioGroup/RadioGroup.js +54 -1
- package/components/domainSpecific/RadioGroup/RadioGroup.types.js +4 -1
- package/components/domainSpecific/RadioGroup/RadioGroupItem/RadioGroupItem.js +37 -1
- package/components/domainSpecific/RadioGroup/RadioGroupStyled.js +130 -1
- package/components/domainSpecific/RadioGroup/constants.js +5 -1
- package/components/domainSpecific/Rating/Rating.js +63 -1
- package/components/domainSpecific/Rating/RatingStyled.js +61 -1
- package/components/domainSpecific/Rating/constants.js +9 -1
- package/components/domainSpecific/Search/Search.js +58 -1
- package/components/domainSpecific/Search/SearchStyled.js +16 -1
- package/components/domainSpecific/Search/constants.js +7 -1
- package/components/domainSpecific/SearchModal/SearchInput/SearchInput.js +26 -1
- package/components/domainSpecific/SearchModal/SearchInput/SearchInputStyled.js +25 -1
- package/components/domainSpecific/SearchModal/SearchInput/constants.js +6 -1
- package/components/domainSpecific/SearchModal/SearchItems/SearchItems.js +48 -1
- package/components/domainSpecific/SearchModal/SearchItems/SearchItemsStyled.js +82 -1
- package/components/domainSpecific/SearchModal/SearchItems/constants.js +10 -1
- package/components/domainSpecific/SearchModal/SearchItems/utils.js +7 -1
- package/components/domainSpecific/SearchModal/SearchLoader/SearchLoader.js +20 -1
- package/components/domainSpecific/SearchModal/SearchLoader/SearchLoaderStyled.js +14 -1
- package/components/domainSpecific/SearchModal/SearchLoader/constants.js +4 -1
- package/components/domainSpecific/SearchModal/SearchModal.js +39 -1
- package/components/domainSpecific/SearchModal/SearchModalStyled.js +29 -1
- package/components/domainSpecific/SearchModal/constants.js +8 -1
- package/components/domainSpecific/Stepper/Stepper.js +42 -1
- package/components/domainSpecific/Stepper/StepperStyled.js +58 -1
- package/components/domainSpecific/Stepper/constants.js +4 -1
- package/components/domainSpecific/Stepper/utils.js +37 -1
- package/components/domainSpecific/Tabs/Tabs.js +40 -1
- package/components/domainSpecific/Tabs/TabsStyled.js +79 -1
- package/components/domainSpecific/Tabs/constants.js +6 -1
- package/components/index.types.js +4 -1
- package/components/layout/ChatContainer/ChatContainer.js +51 -1
- package/components/layout/ChatContainer/ChatContainer.types.d.ts +1 -6
- package/components/layout/ChatContainer/ChatContainerStyled.js +71 -1
- package/components/layout/ChatContainer/constants.js +4 -1
- package/components/layout/Column/Column.js +26 -1
- package/components/layout/Column/ColumnStyled.js +36 -1
- package/components/layout/Column/constants.js +4 -1
- package/components/layout/FlexContainer/FlexContainer.js +25 -1
- package/components/layout/FlexContainer/FlexContainerStyled.js +27 -1
- package/components/layout/FlexContainer/constants.js +4 -1
- package/components/layout/FlexContainer/utils.js +18 -1
- package/components/layout/Row/Row.js +26 -1
- package/components/layout/Row/RowStyled.js +36 -1
- package/components/layout/Row/constants.js +4 -1
- package/components/templates/SkeletonSearch/SkeletonSearch.js +30 -1
- package/components/templates/SkeletonSearch/SkeletonSearchStyled.js +97 -1
- package/components/templates/SkeletonSearch/constants.js +5 -1
- package/components/widget/DragAndDrop/DragAndDrop.js +74 -1
- package/components/widget/DragAndDrop/DragAndDropStyled.js +61 -1
- package/components/widget/DragAndDrop/constants.js +4 -1
- package/components/widget/DragAndDrop/utils/validators.js +17 -1
- package/constants/keyboard.js +10 -1
- package/constants/positioning.js +12 -1
- package/constants/timers.js +5 -1
- package/hooks/useAutoFocus/useAutoFocus.js +11 -1
- package/hooks/useCarousel/useCarousel.js +61 -1
- package/hooks/useClickOutside/useClickOutside.js +15 -1
- package/hooks/useKeyControls/useKeyControls.js +19 -1
- package/hooks/useMediaQuery/useMediaQuery.js +14 -1
- package/hooks/useTheme/useTheme.js +48 -1
- package/index.js +350 -1
- package/package.json +17 -2
- package/stories/components/TokenViewer/TokenViewer.d.ts +2 -0
- package/stories/components/TokenViewer/TokenViewer.types.d.ts +12 -0
- package/stories/components/TokenViewer/TokenViewerStyled.d.ts +11 -0
- package/stories/components/TokenViewer/index.d.ts +1 -0
- package/tokens/accordion.js +72 -1
- package/tokens/animations.js +63 -1
- package/tokens/avatar.d.ts +22 -15
- package/tokens/avatar.js +153 -1
- package/tokens/borders.js +17 -1
- package/tokens/breadcrumbs.js +37 -1
- package/tokens/breakpoints.d.ts +8 -0
- package/tokens/breakpoints.js +12 -0
- package/tokens/button.js +146 -1
- package/tokens/card.d.ts +5 -1
- package/tokens/card.js +191 -1
- package/tokens/carousel.js +216 -1
- package/tokens/chat.d.ts +4 -0
- package/tokens/chat.js +122 -1
- package/tokens/chatbubble.d.ts +1 -3
- package/tokens/chatbubble.js +75 -1
- package/tokens/colors.js +157 -1
- package/tokens/column.js +9 -1
- package/tokens/constants.js +4 -1
- package/tokens/counter.js +37 -1
- package/tokens/cursors.js +20 -1
- package/tokens/defaultTheme.d.ts +154 -47
- package/tokens/defaultTheme.js +123 -1
- package/tokens/display.js +19 -1
- package/tokens/draganddrop.js +87 -1
- package/tokens/draganddropfiles.js +6 -1
- package/tokens/flexContainer.js +13 -1
- package/tokens/font.js +52 -1
- package/tokens/form.js +6 -1
- package/tokens/header.js +123 -1
- package/tokens/icon.js +32 -1
- package/tokens/image.js +40 -1
- package/tokens/index.d.ts +71 -47
- package/tokens/index.js +145 -1
- package/tokens/inlineNotification.js +75 -1
- package/tokens/input.js +192 -1
- package/tokens/inputfile.js +12 -1
- package/tokens/label.js +9 -1
- package/tokens/link.js +66 -1
- package/tokens/list.js +87 -1
- package/tokens/loader.js +141 -1
- package/tokens/menu.js +19 -1
- package/tokens/modal.js +108 -1
- package/tokens/price.js +32 -1
- package/tokens/progressbar.js +60 -1
- package/tokens/radiogroup.js +103 -2
- package/tokens/radius.js +14 -1
- package/tokens/rating.js +73 -1
- package/tokens/reset.js +4 -1
- package/tokens/row.js +8 -1
- package/tokens/scroll.js +99 -1
- package/tokens/search.js +45 -1
- package/tokens/searchModal.js +159 -1
- package/tokens/select.js +99 -1
- package/tokens/separator.js +63 -1
- package/tokens/shadow.js +25 -1
- package/tokens/skeleton.js +77 -1
- package/tokens/slider.js +45 -1
- package/tokens/snackbar.d.ts +30 -28
- package/tokens/snackbar.js +169 -1
- package/tokens/spacing.js +13 -1
- package/tokens/stepper.js +147 -1
- package/tokens/switch.js +76 -1
- package/tokens/tabs.js +108 -1
- package/tokens/textarea.js +45 -1
- package/tokens/toggle.js +19 -1
- package/tokens/tooltip.js +69 -1
- package/tokens/types/index.types.js +4 -1
- package/tokens/typography.js +134 -1
- package/tokens/utils.d.ts +6 -0
- package/tokens/utils.js +88 -1
- package/tokens/values.js +73 -1
- package/tokens/wrapper.js +34 -1
- package/types/accesability.js +4 -1
- package/types/button.js +7 -1
- package/types/card.js +5 -1
- package/types/carousel.d.ts +12 -1
- package/types/carousel.js +6 -0
- package/types/chat.js +4 -1
- package/types/common.js +5 -1
- package/types/cursors.js +4 -1
- package/types/index.d.ts +1 -0
- package/types/input.js +6 -1
- package/types/label.js +4 -1
- package/types/layout.js +4 -1
- package/types/link.js +5 -1
- package/types/list.js +4 -1
- package/types/separator.js +5 -1
- package/types/skeleton.js +4 -1
- package/types/snackbar.js +5 -1
- package/types/stepper.js +5 -1
- package/types/typography.js +6 -1
- package/types/wrapper.js +4 -1
- package/utils/animationFrame.js +17 -1
- package/utils/common.js +4 -1
- package/utils/date.js +11 -1
- package/utils/focus.js +54 -1
- package/utils/helpers.js +42 -1
- package/utils/layout.js +32 -1
- package/utils/math.js +11 -1
- package/utils/setInRange.js +11 -1
- package/utils/uniqueKeys.js +4 -1
- package/components/domainSpecific/Carousel/Carousel.types.js +0 -1
- package/components/layout/ChatContainer/ChatContainer.types.js +0 -1
- /package/{gd-design-library.css → assets/styles.css} +0 -0
|
@@ -1 +1,43 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as N } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as $ } from "react";
|
|
4
|
+
import { COMPONENT_NAME as r } from "./constants.js";
|
|
5
|
+
import { LinkStyled as h } from "./LinkStyled.js";
|
|
6
|
+
import { LinkVariant as T, LinkTarget as y } from "../../../types/link.js";
|
|
7
|
+
import { Roles as C } from "../types/roles.types.js";
|
|
8
|
+
import { Cursors as P } from "../../../types/cursors.js";
|
|
9
|
+
import { TabIndex as g } from "../../../types/accesability.js";
|
|
10
|
+
import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
|
|
11
|
+
const A = $((o, i) => {
|
|
12
|
+
const {
|
|
13
|
+
variant: m = T.Primary,
|
|
14
|
+
disabled: e = !1,
|
|
15
|
+
className: n = "",
|
|
16
|
+
cursor: s = P.Pointer,
|
|
17
|
+
target: l = y.Blank,
|
|
18
|
+
tabindex: f = g.Default,
|
|
19
|
+
href: c,
|
|
20
|
+
role: d = C.Link,
|
|
21
|
+
children: p,
|
|
22
|
+
onClick: k,
|
|
23
|
+
external: b = !1,
|
|
24
|
+
ariaLabel: a,
|
|
25
|
+
rel: t,
|
|
26
|
+
...u
|
|
27
|
+
} = o, {
|
|
28
|
+
theme: x
|
|
29
|
+
} = v(), L = b ? {
|
|
30
|
+
href: c
|
|
31
|
+
} : {
|
|
32
|
+
onClick: k
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ N(h, { ref: i, $variant: m, $cursor: s, className: `${n}${e ? `${r}--disabled` : ""}`, theme: x, target: l, role: d, tabIndex: f, "data-testid": r, ...t ? {
|
|
35
|
+
rel: t
|
|
36
|
+
} : {}, ...e ? {} : L, ...a ? {
|
|
37
|
+
"aria-label": a
|
|
38
|
+
} : {}, ...u, children: p });
|
|
39
|
+
});
|
|
40
|
+
A.displayName = r;
|
|
41
|
+
export {
|
|
42
|
+
A as Link
|
|
43
|
+
};
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f } from "react";
|
|
4
|
+
import { LinkVariant as p } from "../../../types/link.js";
|
|
5
|
+
import { get as t } from "../../../utils/helpers.js";
|
|
6
|
+
const k = f((o, e) => {
|
|
7
|
+
const {
|
|
8
|
+
theme: {
|
|
9
|
+
link: r
|
|
10
|
+
} = {},
|
|
11
|
+
$variant: s = p.Primary,
|
|
12
|
+
$cursor: n,
|
|
13
|
+
styles: i = {},
|
|
14
|
+
...m
|
|
15
|
+
} = o, a = [{
|
|
16
|
+
cursor: n
|
|
17
|
+
}, t(r, "default", {}), t(r, s, {}), i];
|
|
18
|
+
return /* @__PURE__ */ c("a", { css: a, ...m, ref: e });
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
k as LinkStyled
|
|
22
|
+
};
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, Fragment as m, jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as b, useCallback as v } from "react";
|
|
4
|
+
import { COMPONENT_NAME as t } from "./constants.js";
|
|
5
|
+
import { ListWrapperStyled as N, ListItemStyled as O } from "./ListStyled.js";
|
|
6
|
+
import { useTheme as _ } from "../../../hooks/useTheme/useTheme.js";
|
|
7
|
+
import { ListVariant as a } from "../../../types/list.js";
|
|
8
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
9
|
+
import { Icon as u } from "../Icon/Icon.js";
|
|
10
|
+
const w = b((f, h) => {
|
|
11
|
+
const {
|
|
12
|
+
items: i = [],
|
|
13
|
+
variant: o = a.OrderedCircle,
|
|
14
|
+
styles: p,
|
|
15
|
+
...$
|
|
16
|
+
} = f, {
|
|
17
|
+
theme: n
|
|
18
|
+
} = _(), c = s(n, "list.icons", {}), C = v((r) => {
|
|
19
|
+
switch (o) {
|
|
20
|
+
case a.UnorderedDot:
|
|
21
|
+
return /* @__PURE__ */ d(m, { children: [
|
|
22
|
+
/* @__PURE__ */ e("div", { className: `${t}__bulletPoint`, children: /* @__PURE__ */ e(u, { ...s(c, "bulletDot", {
|
|
23
|
+
name: "dot"
|
|
24
|
+
}) }) }),
|
|
25
|
+
r
|
|
26
|
+
] });
|
|
27
|
+
case a.UnorderedCheck:
|
|
28
|
+
return /* @__PURE__ */ d(m, { children: [
|
|
29
|
+
/* @__PURE__ */ e("div", { className: `${t}__bulletPoint`, children: /* @__PURE__ */ e(u, { ...s(c, "bulletCheck", {
|
|
30
|
+
name: "check"
|
|
31
|
+
}) }) }),
|
|
32
|
+
r
|
|
33
|
+
] });
|
|
34
|
+
case a.OrderedCircle:
|
|
35
|
+
case a.OrderedSquare:
|
|
36
|
+
default:
|
|
37
|
+
return r;
|
|
38
|
+
}
|
|
39
|
+
}, [o]);
|
|
40
|
+
if (i != null && i.length)
|
|
41
|
+
return /* @__PURE__ */ e(N, { "data-testid": t, ref: h, theme: n, styles: p, $variant: o, ...$, children: i.map((r, l) => /* @__PURE__ */ e(O, { theme: n, $variant: o, "data-testid": `${t}-item-${l}`, children: C(r) }, `${t}-${l}`)) });
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
w as default
|
|
45
|
+
};
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { ListVariant as l } from "../../../types/list.js";
|
|
4
|
+
import { get as t } from "../../../utils/helpers.js";
|
|
5
|
+
const u = (r) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: o,
|
|
8
|
+
$variant: n = l.OrderedCircle,
|
|
9
|
+
styles: c,
|
|
10
|
+
...e
|
|
11
|
+
} = r, s = t(o, "list.wrapper", {}), m = {
|
|
12
|
+
...t(s, "default", {}),
|
|
13
|
+
...t(s, n, {}),
|
|
14
|
+
...c
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ i("ul", { css: m, ...e });
|
|
17
|
+
}, y = (r) => {
|
|
18
|
+
const {
|
|
19
|
+
theme: o,
|
|
20
|
+
$variant: n = l.OrderedCircle,
|
|
21
|
+
...c
|
|
22
|
+
} = r, e = t(o, "list.item", {}), s = {
|
|
23
|
+
...t(e, "default", {}),
|
|
24
|
+
...t(e, n, {})
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ i("li", { css: s, ...c });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
y as ListItemStyled,
|
|
30
|
+
u as ListWrapperStyled
|
|
31
|
+
};
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as h } from "react";
|
|
4
|
+
import { BASE_ANIMATION as u, COMPONENT_NAME as m } from "./constants.js";
|
|
5
|
+
import { LoaderStyled as N } from "./LoaderStyled.js";
|
|
6
|
+
import { Portal as P } from "../Portal/Portal.js";
|
|
7
|
+
import A from "../Wrapper/Wrapper.js";
|
|
8
|
+
import { WrapperVariant as a } from "../../../types/wrapper.js";
|
|
9
|
+
import { SizeVariant as M } from "../../../types/common.js";
|
|
10
|
+
import { useTheme as $ } from "../../../hooks/useTheme/useTheme.js";
|
|
11
|
+
const w = h((n, p) => {
|
|
12
|
+
const {
|
|
13
|
+
name: s,
|
|
14
|
+
variant: r = a.Inline,
|
|
15
|
+
children: o,
|
|
16
|
+
size: f = M.Md,
|
|
17
|
+
animationProps: d = u,
|
|
18
|
+
withWrapper: i = !0,
|
|
19
|
+
...l
|
|
20
|
+
} = n, {
|
|
21
|
+
theme: c
|
|
22
|
+
} = $(), e = () => o || /* @__PURE__ */ t(N, { ref: p, theme: c, $name: s, $variant: r, $size: f, $animationProps: d, "data-testid": m, ...l });
|
|
23
|
+
return r === a.FullPage ? /* @__PURE__ */ t(P, { wrapperVariant: r, withWrapper: i, children: e() }) : i ? /* @__PURE__ */ t(A, { variant: r, children: e() }) : e();
|
|
24
|
+
});
|
|
25
|
+
w.displayName = m;
|
|
26
|
+
export {
|
|
27
|
+
w as Loader
|
|
28
|
+
};
|
|
@@ -1 +1,41 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as h, jsx as x } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as S } from "react";
|
|
4
|
+
import { getAnimationDataByName as V } from "./utils.js";
|
|
5
|
+
import { WrapperVariant as g } from "../../../types/wrapper.js";
|
|
6
|
+
import { SizeVariant as j } from "../../../types/common.js";
|
|
7
|
+
import { get as t } from "../../../utils/helpers.js";
|
|
8
|
+
const B = S((o, e) => {
|
|
9
|
+
const {
|
|
10
|
+
theme: {
|
|
11
|
+
loader: a,
|
|
12
|
+
animations: r
|
|
13
|
+
} = {},
|
|
14
|
+
styles: m,
|
|
15
|
+
$name: i,
|
|
16
|
+
$variant: s = g.Inline,
|
|
17
|
+
$size: f = j.Md,
|
|
18
|
+
$animationProps: p,
|
|
19
|
+
children: c,
|
|
20
|
+
...d
|
|
21
|
+
} = o, l = t(a, ["animation", i, "name"], ""), u = t(r, l, {}), {
|
|
22
|
+
animation: n,
|
|
23
|
+
AnimationView: y
|
|
24
|
+
} = V(i, u, p), $ = {
|
|
25
|
+
...t(a, "default", {}),
|
|
26
|
+
...t(a, s, {}),
|
|
27
|
+
...t(a, [i, "default"], {}),
|
|
28
|
+
...t(a, [i, f], {}),
|
|
29
|
+
...n ? {
|
|
30
|
+
animation: n
|
|
31
|
+
} : {},
|
|
32
|
+
...m
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ h("div", { css: $, ...d, ref: e, children: [
|
|
35
|
+
/* @__PURE__ */ x(y, {}),
|
|
36
|
+
c
|
|
37
|
+
] });
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
B as LoaderStyled
|
|
41
|
+
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { BASE_ANIMATION_MS as o } from "../../../constants/timers.js";
|
|
2
|
+
const N = "Loader", t = `${o}ms ease-in-out infinite`;
|
|
3
|
+
export {
|
|
4
|
+
t as BASE_ANIMATION,
|
|
5
|
+
N as COMPONENT_NAME
|
|
6
|
+
};
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as o, Fragment as m, jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { css as t } from "@emotion/react";
|
|
4
|
+
import { convertJsonToCssKeyframeCss as c } from "../../../tokens/utils.js";
|
|
5
|
+
const f = (i, a = {}, e) => {
|
|
6
|
+
const s = `${c(a)} ${e}`;
|
|
7
|
+
switch (i) {
|
|
8
|
+
case "dots":
|
|
9
|
+
return {
|
|
10
|
+
animation: null,
|
|
11
|
+
AnimationView: () => /* @__PURE__ */ o(m, { children: [
|
|
12
|
+
/* @__PURE__ */ n("div", { css: /* @__PURE__ */ t({
|
|
13
|
+
animation: s
|
|
14
|
+
}), className: "dot" }),
|
|
15
|
+
/* @__PURE__ */ n("div", { css: /* @__PURE__ */ t({
|
|
16
|
+
animation: s
|
|
17
|
+
}), className: "dot" }),
|
|
18
|
+
/* @__PURE__ */ n("div", { css: /* @__PURE__ */ t({
|
|
19
|
+
animation: s
|
|
20
|
+
}), className: "dot" })
|
|
21
|
+
] })
|
|
22
|
+
};
|
|
23
|
+
case "circle":
|
|
24
|
+
return {
|
|
25
|
+
animation: s,
|
|
26
|
+
AnimationView: () => null
|
|
27
|
+
};
|
|
28
|
+
default:
|
|
29
|
+
return {
|
|
30
|
+
animation: null,
|
|
31
|
+
AnimationView: () => null
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
f as getAnimationDataByName
|
|
37
|
+
};
|
|
@@ -1 +1,100 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _, Fragment as A, jsx as g } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as D, useMemo as F, useRef as h, useState as K, useCallback as M, useImperativeHandle as W, useEffect as O } from "react";
|
|
4
|
+
import { MENU_DEFAULT_OPTIONS as Y, EMPTY_CLIENT_RECT as P, COMPONENT_NAME as v } from "./constants.js";
|
|
5
|
+
import { MenuTriggerStyled as $, MenuContentStyled as j } from "./MenuStyled.js";
|
|
6
|
+
import { useAnimationFrame as U } from "../../../utils/animationFrame.js";
|
|
7
|
+
import { SelectContext as V } from "../Select/hooks/useSelectContext.js";
|
|
8
|
+
import { convertToInlineBoxStyles as q } from "../../../tokens/utils.js";
|
|
9
|
+
import { useTheme as z } from "../../../hooks/useTheme/useTheme.js";
|
|
10
|
+
import { Portal as G } from "../Portal/Portal.js";
|
|
11
|
+
import { KEYBOARD_KEYS as J } from "../../../constants/keyboard.js";
|
|
12
|
+
const Q = D((T, S) => {
|
|
13
|
+
const {
|
|
14
|
+
onSelect: E,
|
|
15
|
+
children: k,
|
|
16
|
+
content: I,
|
|
17
|
+
options: x = {},
|
|
18
|
+
...C
|
|
19
|
+
} = T, {
|
|
20
|
+
theme: y
|
|
21
|
+
} = z(), u = F(() => ({
|
|
22
|
+
...Y,
|
|
23
|
+
...x
|
|
24
|
+
}), [x]), r = h(null), o = h(null), b = h(), N = h({
|
|
25
|
+
top: 0,
|
|
26
|
+
left: 0,
|
|
27
|
+
maxHeight: u.maxHeight
|
|
28
|
+
}), [a, d] = K(!1), R = M(({
|
|
29
|
+
width: e,
|
|
30
|
+
height: n
|
|
31
|
+
}) => {
|
|
32
|
+
const t = r.current ? r.current.getBoundingClientRect() : P, {
|
|
33
|
+
minHeight: i,
|
|
34
|
+
align: c,
|
|
35
|
+
direction: m,
|
|
36
|
+
offset: s
|
|
37
|
+
} = u, l = b.current || m || "top", w = t.right + s, f = {
|
|
38
|
+
top: t.top - 2 * s,
|
|
39
|
+
bottom: window.innerHeight - t.bottom - 2 * s
|
|
40
|
+
}, p = {
|
|
41
|
+
top: t.top,
|
|
42
|
+
bottom: t.bottom + s,
|
|
43
|
+
right: w,
|
|
44
|
+
center: t.left + t.width / 2 + e / 2 < window.innerWidth - s ? t.left + t.width / 2 - e / 2 : w,
|
|
45
|
+
left: t.left + e < window.innerWidth - s ? t.left : w
|
|
46
|
+
}, H = f.top > f.bottom ? "top" : "bottom";
|
|
47
|
+
return f[l] > i && m || f[l] > n ? {
|
|
48
|
+
top: p[l],
|
|
49
|
+
left: p[c]
|
|
50
|
+
} : (b.current = H, {
|
|
51
|
+
top: p[H],
|
|
52
|
+
left: p[c]
|
|
53
|
+
});
|
|
54
|
+
}, [u]), B = {
|
|
55
|
+
onSelect: (e, n) => {
|
|
56
|
+
E == null || E({
|
|
57
|
+
event: e,
|
|
58
|
+
value: n
|
|
59
|
+
}), d(!1);
|
|
60
|
+
}
|
|
61
|
+
}, L = M(() => {
|
|
62
|
+
d((e) => !e);
|
|
63
|
+
}, []);
|
|
64
|
+
return W(S, () => r.current), U(() => {
|
|
65
|
+
if (o.current && a) {
|
|
66
|
+
const e = o.current.getBoundingClientRect(), n = r.current ? r.current.getBoundingClientRect() : P, {
|
|
67
|
+
top: t,
|
|
68
|
+
left: i
|
|
69
|
+
} = R(e), {
|
|
70
|
+
offset: c,
|
|
71
|
+
maxHeight: m
|
|
72
|
+
} = u, l = i < n.right && e.right > n.left && t < 2 * c ? n.top - 2 * c : window.innerHeight - t - c;
|
|
73
|
+
N.current = {
|
|
74
|
+
top: t,
|
|
75
|
+
left: i,
|
|
76
|
+
maxHeight: Math.min(m, l)
|
|
77
|
+
}, o.current && (o.current.style.left = `${i}px`, o.current.style.top = `${t}px`, o.current.style.maxHeight = `${Math.min(m, l)}px`);
|
|
78
|
+
}
|
|
79
|
+
}), O(() => {
|
|
80
|
+
const e = (n) => {
|
|
81
|
+
a && n.key === J.ESCAPE && d(!1);
|
|
82
|
+
};
|
|
83
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
84
|
+
}, [a]), O(() => {
|
|
85
|
+
const e = (n) => {
|
|
86
|
+
var t, i;
|
|
87
|
+
!((t = r == null ? void 0 : r.current) != null && t.contains(n.target)) && !((i = o == null ? void 0 : o.current) != null && i.contains(n.target)) && d(!1);
|
|
88
|
+
};
|
|
89
|
+
return document.addEventListener("mousedown", e), () => {
|
|
90
|
+
document.removeEventListener("mousedown", e);
|
|
91
|
+
};
|
|
92
|
+
}, [o]), /* @__PURE__ */ _(A, { children: [
|
|
93
|
+
/* @__PURE__ */ g($, { onClick: L, theme: y, ref: r, "data-testid": v, ...C, children: k }),
|
|
94
|
+
a && /* @__PURE__ */ g(G, { withWrapper: !1, children: /* @__PURE__ */ g(V.Provider, { value: B, children: /* @__PURE__ */ g(j, { ref: o, "data-testid": v, theme: y, ...q(C), children: I }) }) })
|
|
95
|
+
] });
|
|
96
|
+
});
|
|
97
|
+
Q.displayName = v;
|
|
98
|
+
export {
|
|
99
|
+
Q as Menu
|
|
100
|
+
};
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { Button as u } from "../Button/Button.js";
|
|
5
|
+
import { get as m } from "../../../utils/helpers.js";
|
|
6
|
+
import { ButtonVariant as i } from "../../../types/button.js";
|
|
7
|
+
const y = s((t, e) => {
|
|
8
|
+
const {
|
|
9
|
+
theme: {
|
|
10
|
+
menu: r
|
|
11
|
+
} = {},
|
|
12
|
+
styles: o = {},
|
|
13
|
+
...f
|
|
14
|
+
} = t;
|
|
15
|
+
return /* @__PURE__ */ n(u, { variant: i.Text, styles: {
|
|
16
|
+
...m(r, "wrapper.default", {}),
|
|
17
|
+
...o
|
|
18
|
+
}, ...f, ref: e });
|
|
19
|
+
}), g = s((t, e) => {
|
|
20
|
+
const {
|
|
21
|
+
theme: {
|
|
22
|
+
menu: r
|
|
23
|
+
} = {},
|
|
24
|
+
...o
|
|
25
|
+
} = t;
|
|
26
|
+
return /* @__PURE__ */ n("div", { css: m(r, "content.default", {}), ...o, ref: e });
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
g as MenuContentStyled,
|
|
30
|
+
y as MenuTriggerStyled
|
|
31
|
+
};
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
const i = "Menu", t = {
|
|
2
|
+
bottom: 0,
|
|
3
|
+
height: 0,
|
|
4
|
+
left: 0,
|
|
5
|
+
right: 0,
|
|
6
|
+
top: 0,
|
|
7
|
+
width: 0,
|
|
8
|
+
x: 0,
|
|
9
|
+
y: 0
|
|
10
|
+
}, o = {
|
|
11
|
+
...t
|
|
12
|
+
}, e = {
|
|
13
|
+
align: "right",
|
|
14
|
+
direction: null,
|
|
15
|
+
limitWidth: "auto",
|
|
16
|
+
maxHeight: 400,
|
|
17
|
+
minHeight: 80,
|
|
18
|
+
offset: 4
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
i as COMPONENT_NAME,
|
|
22
|
+
o as EMPTY_CLIENT_RECT,
|
|
23
|
+
e as MENU_DEFAULT_OPTIONS
|
|
24
|
+
};
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t, jsxs as m, Fragment as w } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as k, useEffect as O } from "react";
|
|
4
|
+
import { COMPONENT_NAME as r } from "./constants.js";
|
|
5
|
+
import { ModalOverlayStyled as v, ModalContentStyled as B, ModalHeaderStyled as T, ModalTitleStyled as x, CloseButtonStyled as N, ModalBodyStyled as P, ModalFooterStyled as $ } from "./ModalStyled.js";
|
|
6
|
+
import { useTheme as b } from "../../../hooks/useTheme/useTheme.js";
|
|
7
|
+
import { get as f } from "../../../utils/helpers.js";
|
|
8
|
+
import { Portal as g } from "../Portal/Portal.js";
|
|
9
|
+
import { convertToInlineBoxStyles as A } from "../../../tokens/utils.js";
|
|
10
|
+
import { Icon as K } from "../Icon/Icon.js";
|
|
11
|
+
import { KEYBOARD_KEYS as j } from "../../../constants/keyboard.js";
|
|
12
|
+
const D = k((y, p) => {
|
|
13
|
+
const {
|
|
14
|
+
isOpen: d = !1,
|
|
15
|
+
isCustomView: u = !1,
|
|
16
|
+
onClose: o,
|
|
17
|
+
showCloseButton: s = !0,
|
|
18
|
+
closeOnEscape: a,
|
|
19
|
+
title: n,
|
|
20
|
+
children: i,
|
|
21
|
+
footer: c,
|
|
22
|
+
styles: h,
|
|
23
|
+
...C
|
|
24
|
+
} = y, {
|
|
25
|
+
theme: e
|
|
26
|
+
} = b(), E = f(e, "modal.icons", {}), S = n || s && o;
|
|
27
|
+
return O(() => {
|
|
28
|
+
if (!a) return;
|
|
29
|
+
const l = (M) => {
|
|
30
|
+
o && M.key === j.ESCAPE && o();
|
|
31
|
+
};
|
|
32
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
33
|
+
}, [d, a, o]), d ? /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(v, { onClick: o, theme: e, children: /* @__PURE__ */ t(B, { ref: p, onClick: (l) => l.stopPropagation(), "data-testid": r, theme: e, styles: h, ...A(C), children: u ? i : /* @__PURE__ */ m(w, { children: [
|
|
34
|
+
S && /* @__PURE__ */ m(T, { theme: e, $withTitle: !!n, children: [
|
|
35
|
+
n && /* @__PURE__ */ t(x, { theme: e, "data-testid": `${r}-title`, children: n }),
|
|
36
|
+
s && o && /* @__PURE__ */ t(N, { onClick: o, "data-testid": "close-button", theme: e, children: /* @__PURE__ */ t(K, { ...f(E, "close", {
|
|
37
|
+
name: "cross"
|
|
38
|
+
}) }) })
|
|
39
|
+
] }),
|
|
40
|
+
i && /* @__PURE__ */ t(P, { theme: e, "data-testid": `${r}-body`, children: i }),
|
|
41
|
+
c && /* @__PURE__ */ t($, { theme: e, "data-testid": `${r}-footer`, children: c })
|
|
42
|
+
] }) }) }) }) : null;
|
|
43
|
+
});
|
|
44
|
+
D.displayName = r;
|
|
45
|
+
export {
|
|
46
|
+
D as Modal
|
|
47
|
+
};
|
|
@@ -1 +1,76 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as m } from "react";
|
|
4
|
+
import { getBoxStyles as u } from "../../../tokens/utils.js";
|
|
5
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
6
|
+
const S = (t) => {
|
|
7
|
+
const {
|
|
8
|
+
theme: {
|
|
9
|
+
modal: e
|
|
10
|
+
} = {},
|
|
11
|
+
...o
|
|
12
|
+
} = t;
|
|
13
|
+
return /* @__PURE__ */ r("div", { css: s(e, "overlay.default", {}), ...o });
|
|
14
|
+
}, h = m((t, e) => {
|
|
15
|
+
const {
|
|
16
|
+
theme: {
|
|
17
|
+
modal: o
|
|
18
|
+
} = {},
|
|
19
|
+
styles: d = {},
|
|
20
|
+
...l
|
|
21
|
+
} = t, {
|
|
22
|
+
boxStyles: n,
|
|
23
|
+
restProps: c
|
|
24
|
+
} = u(l), a = [s(o, "content.default", {}), d, n];
|
|
25
|
+
return /* @__PURE__ */ r("div", { css: a, ...c, ref: e });
|
|
26
|
+
}), P = (t) => {
|
|
27
|
+
const {
|
|
28
|
+
theme: {
|
|
29
|
+
modal: e
|
|
30
|
+
} = {},
|
|
31
|
+
$withTitle: o,
|
|
32
|
+
...d
|
|
33
|
+
} = t, l = s(e, "header", {}), n = [s(l, "default", {}), o ? s(l, "withTitle", {}) : {}];
|
|
34
|
+
return /* @__PURE__ */ r("div", { css: n, ...d });
|
|
35
|
+
}, v = (t) => {
|
|
36
|
+
const {
|
|
37
|
+
theme: {
|
|
38
|
+
modal: e
|
|
39
|
+
} = {},
|
|
40
|
+
...o
|
|
41
|
+
} = t;
|
|
42
|
+
return /* @__PURE__ */ r("div", { css: s(e, "title.default", {}), ...o });
|
|
43
|
+
}, M = (t) => {
|
|
44
|
+
const {
|
|
45
|
+
theme: {
|
|
46
|
+
modal: e
|
|
47
|
+
} = {},
|
|
48
|
+
...o
|
|
49
|
+
} = t;
|
|
50
|
+
return /* @__PURE__ */ r("div", { css: s(e, "body.default", {}), ...o });
|
|
51
|
+
}, x = (t) => {
|
|
52
|
+
const {
|
|
53
|
+
theme: {
|
|
54
|
+
modal: e
|
|
55
|
+
} = {},
|
|
56
|
+
...o
|
|
57
|
+
} = t;
|
|
58
|
+
return /* @__PURE__ */ r("div", { css: s(e, "footer.default", {}), ...o });
|
|
59
|
+
}, B = (t) => {
|
|
60
|
+
const {
|
|
61
|
+
theme: {
|
|
62
|
+
modal: e
|
|
63
|
+
} = {},
|
|
64
|
+
...o
|
|
65
|
+
} = t;
|
|
66
|
+
return /* @__PURE__ */ r("button", { css: s(e, "closeButton.default", {}), ...o });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
B as CloseButtonStyled,
|
|
70
|
+
M as ModalBodyStyled,
|
|
71
|
+
h as ModalContentStyled,
|
|
72
|
+
x as ModalFooterStyled,
|
|
73
|
+
P as ModalHeaderStyled,
|
|
74
|
+
S as ModalOverlayStyled,
|
|
75
|
+
v as ModalTitleStyled
|
|
76
|
+
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { PortalProps } from './Portal.types';
|
|
2
|
-
declare const Portal: import('react').ForwardRefExoticComponent<PortalProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
|
-
export default Portal;
|
|
2
|
+
export declare const Portal: import('react').ForwardRefExoticComponent<PortalProps & import('react').RefAttributes<HTMLDivElement>>;
|