gd-design-library 0.3.3 → 0.3.5
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/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.d.ts +1 -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 +53 -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.js +6 -1
- 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 +11 -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 +47 -1
- package/hooks/useTheme/useTheme.types.d.ts +1 -1
- package/index.js +351 -1
- package/package.json +17 -2
- package/stories/Introduction/ThemeJsonPreview.d.ts +2 -0
- 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/button.js +146 -1
- package/tokens/card.js +187 -1
- package/tokens/carousel.js +216 -1
- package/tokens/chat.js +118 -1
- package/tokens/chatbubble.js +56 -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 +22 -15
- package/tokens/defaultTheme.js +113 -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 +22 -15
- package/tokens/index.js +142 -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 +24 -1
- package/tokens/skeleton.js +77 -1
- package/tokens/slider.js +45 -1
- package/tokens/snackbar.js +167 -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.js +85 -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/chat.js +4 -1
- package/types/common.js +5 -1
- package/types/cursors.js +4 -1
- 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/layout/ChatContainer/ChatContainer.types.js +0 -1
- /package/{gd-design-library.css → assets/styles.css} +0 -0
|
@@ -1 +1,137 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t, jsxs as S } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { Fragment as q, forwardRef as G, Children as J, isValidElement as K, cloneElement as Q, useRef as U, useImperativeHandle as X } from "react";
|
|
4
|
+
import { COMPONENT_NAME as o } from "./constants.js";
|
|
5
|
+
import { LayoutType as Y, ThumbsPosition as D, CarouselVariantTypes as Z } from "./Carousel.types.js";
|
|
6
|
+
import { CarouselSlideStyled as A, CarouselContainerStyled as tt, CarouselControlsWrapperStyled as et, CarouselControlsStyled as rt, CarouselControlsButtonStyled as T, ContentContainerStyled as ot, CarouselViewportStyled as at, CarouselViewportSlideWrapperStyled as nt, CarouselDotsStyled as lt, CarouselDotStyled as it, CarouselThumbsStyled as st, CarouselThumbsViewportStyled as dt, CarouselThumbsWrapperStyled as ct, CarouselThumbStyled as mt } from "./CarouselStyled.js";
|
|
7
|
+
import { useCarousel as ut } from "../../../hooks/useCarousel/useCarousel.js";
|
|
8
|
+
import { Typography as V } from "../../core/Typography/Typography.js";
|
|
9
|
+
import { TypographyVariant as B } from "../../../types/typography.js";
|
|
10
|
+
import { Image as pt } from "../../core/Image/Image.js";
|
|
11
|
+
import { useTheme as ft } from "../../../hooks/useTheme/useTheme.js";
|
|
12
|
+
import { get as E } from "../../../utils/helpers.js";
|
|
13
|
+
import { TabIndex as j } from "../../../types/accesability.js";
|
|
14
|
+
import { ButtonColorVariant as g, ButtonVariant as I } from "../../../types/button.js";
|
|
15
|
+
import { Icon as x } from "../../core/Icon/Icon.js";
|
|
16
|
+
function Ct(r) {
|
|
17
|
+
const i = [];
|
|
18
|
+
function s(N) {
|
|
19
|
+
return J.toArray(N).flatMap((n) => {
|
|
20
|
+
if (!K(n))
|
|
21
|
+
return [n];
|
|
22
|
+
if (n.type === ht.Image)
|
|
23
|
+
return i.push(n), [];
|
|
24
|
+
const {
|
|
25
|
+
children: d,
|
|
26
|
+
...P
|
|
27
|
+
} = n.props;
|
|
28
|
+
if (d) {
|
|
29
|
+
const c = s(d);
|
|
30
|
+
return [Q(n, P, c.length > 0 ? c : void 0)];
|
|
31
|
+
}
|
|
32
|
+
return [n];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const w = s(r);
|
|
36
|
+
return {
|
|
37
|
+
images: i,
|
|
38
|
+
content: /* @__PURE__ */ t(q, { children: w })
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const L = G(({
|
|
42
|
+
layout: r = Y.Horizontal,
|
|
43
|
+
variant: i = Z.Cards,
|
|
44
|
+
showArrows: s = !0,
|
|
45
|
+
isFocusable: w = !0,
|
|
46
|
+
showDots: N = !1,
|
|
47
|
+
thumbs: n = D.End,
|
|
48
|
+
styles: d,
|
|
49
|
+
children: P
|
|
50
|
+
}, c) => {
|
|
51
|
+
var k;
|
|
52
|
+
const {
|
|
53
|
+
theme: e
|
|
54
|
+
} = ft(), {
|
|
55
|
+
images: l,
|
|
56
|
+
content: H
|
|
57
|
+
} = Ct(P), {
|
|
58
|
+
active: m,
|
|
59
|
+
disabled: u
|
|
60
|
+
} = E(e, "colors.icon.primary"), {
|
|
61
|
+
icons: {
|
|
62
|
+
base: p,
|
|
63
|
+
controlLeft: M,
|
|
64
|
+
controlRight: O
|
|
65
|
+
}
|
|
66
|
+
} = E(e, "carousel"), R = U(null), {
|
|
67
|
+
carouselRef: W,
|
|
68
|
+
carouselApi: z,
|
|
69
|
+
thumbsRef: _,
|
|
70
|
+
activeIndex: f,
|
|
71
|
+
scrollTo: C,
|
|
72
|
+
scrollPrev: h,
|
|
73
|
+
scrollNext: y,
|
|
74
|
+
canScrollPrev: $,
|
|
75
|
+
canScrollNext: b,
|
|
76
|
+
slidesCount: F
|
|
77
|
+
} = ut({
|
|
78
|
+
options: {
|
|
79
|
+
axis: r === "vertical" ? "y" : "x"
|
|
80
|
+
},
|
|
81
|
+
targetRef: R
|
|
82
|
+
});
|
|
83
|
+
return X(c, () => ({
|
|
84
|
+
scrollPrev: h,
|
|
85
|
+
scrollNext: y,
|
|
86
|
+
scrollTo: C,
|
|
87
|
+
carouselApi: z,
|
|
88
|
+
selectedIndex: f
|
|
89
|
+
}), [h, y, C, f]), /* @__PURE__ */ S(tt, { ref: R, theme: e, $layout: r, styles: d, $variant: i, tabIndex: w ? j.Default : j.Disabled, "data-testid": o, children: [
|
|
90
|
+
/* @__PURE__ */ S(et, { "data-testid": `${o}-controls-wrapper`, theme: e, styles: {
|
|
91
|
+
order: n === D.Start ? 1 : "inherit"
|
|
92
|
+
}, children: [
|
|
93
|
+
s && /* @__PURE__ */ S(rt, { theme: e, "data-testid": `${o}-controls`, children: [
|
|
94
|
+
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: I.Text, color: g.Primary, onClick: h, disabled: !$, "data-testid": `${o}-control-previous`, children: /* @__PURE__ */ t(x, { ...p, name: "arrowLeft", fill: $ ? m : u }) }),
|
|
95
|
+
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: I.Text, styles: {
|
|
96
|
+
transform: "rotate(180deg)"
|
|
97
|
+
}, color: g.Primary, onClick: y, disabled: !b, "data-testid": `${o}-control-next`, children: /* @__PURE__ */ t(x, { ...p, name: "arrowLeft", fill: b ? m : u }) })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ t(ot, { theme: e, "data-testid": `${o}-content-container`, children: H }),
|
|
100
|
+
/* @__PURE__ */ t(at, { theme: e, ref: W, "data-testid": `${o}-viewport`, children: /* @__PURE__ */ t(nt, { theme: e, "data-testid": `${o}-slider-wrapper`, children: l == null ? void 0 : l.map((v, a) => /* @__PURE__ */ t(A, { theme: e, "data-testid": `${o}-slide-${a}`, children: v }, a)) }) }),
|
|
101
|
+
N && /* @__PURE__ */ t(lt, { theme: e, "data-testid": `${o}-dots`, children: (k = Array.from({
|
|
102
|
+
length: F
|
|
103
|
+
})) == null ? void 0 : k.map((v, a) => /* @__PURE__ */ t(it, { theme: e, $active: a === f, onClick: () => C(a) }, a)) })
|
|
104
|
+
] }),
|
|
105
|
+
n && /* @__PURE__ */ S(st, { theme: e, $layout: r, "data-testid": `${o}-thumbnails`, children: [
|
|
106
|
+
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: I.Text, styles: {
|
|
107
|
+
transform: `rotate(${r === "vertical" ? "90" : "0"}deg)`
|
|
108
|
+
}, color: g.Primary, onClick: h, disabled: !$, "data-testid": `${o}-thumbnail-control-previous`, children: /* @__PURE__ */ t(x, { ...p, ...M, fill: $ ? m : u }) }),
|
|
109
|
+
/* @__PURE__ */ t(dt, { theme: e, $layout: r, "data-testid": `${o}-thumbs-viewport`, ref: _, children: /* @__PURE__ */ t(ct, { theme: e, $layout: r, "data-testid": `${o}-thumbs-wrapper`, children: l == null ? void 0 : l.map((v, a) => /* @__PURE__ */ t(mt, { theme: e, $layout: r, $active: a === f, onClick: () => C(a), "data-testid": `${o}-thumbnail-${a}`, children: v }, a)) }) }),
|
|
110
|
+
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: I.Text, color: g.Primary, onClick: y, styles: {
|
|
111
|
+
transform: `rotate(${r === "vertical" ? "90" : "0"}deg)`
|
|
112
|
+
}, disabled: !b, "data-testid": `${o}-thumbnail-control-next`, children: /* @__PURE__ */ t(x, { ...p, ...O, fill: b ? m : u }) })
|
|
113
|
+
] })
|
|
114
|
+
] });
|
|
115
|
+
});
|
|
116
|
+
L.displayName = o;
|
|
117
|
+
const ht = Object.assign(L, {
|
|
118
|
+
Slide: A,
|
|
119
|
+
Image: (r) => /* @__PURE__ */ t(pt, { styles: {
|
|
120
|
+
height: "100%",
|
|
121
|
+
width: "100%"
|
|
122
|
+
}, ...r }),
|
|
123
|
+
Title: (r) => /* @__PURE__ */ t(V, { variant: B.H1, ...r }),
|
|
124
|
+
Description: (r) => /* @__PURE__ */ t(V, { variant: B.Body1, ...r }),
|
|
125
|
+
Content: (r) => /* @__PURE__ */ t(V, { styles: {
|
|
126
|
+
flexDirection: "column",
|
|
127
|
+
height: "100%",
|
|
128
|
+
position: "absolute",
|
|
129
|
+
justifyContent: "center",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
zIndex: "100"
|
|
132
|
+
}, ...r })
|
|
133
|
+
});
|
|
134
|
+
export {
|
|
135
|
+
ht as Carousel,
|
|
136
|
+
Ct as extractCarouselNodes
|
|
137
|
+
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
var t = /* @__PURE__ */ ((r) => (r.Cards = "cards", r.Single = "single", r))(t || {}), a = /* @__PURE__ */ ((r) => (r.Horizontal = "horizontal", r.Vertical = "vertical", r))(a || {}), n = /* @__PURE__ */ ((r) => (r.Start = "start", r.End = "end", r))(n || {});
|
|
2
|
+
export {
|
|
3
|
+
t as CarouselVariantTypes,
|
|
4
|
+
a as LayoutType,
|
|
5
|
+
n as ThumbsPosition
|
|
6
|
+
};
|
|
@@ -1 +1,143 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
4
|
+
import { Button as m } from "../../core/Button/Button.js";
|
|
5
|
+
const S = n((s, e) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: {
|
|
8
|
+
carousel: t
|
|
9
|
+
} = {},
|
|
10
|
+
$layout: r,
|
|
11
|
+
$variant: u,
|
|
12
|
+
styles: l,
|
|
13
|
+
...a
|
|
14
|
+
} = s, p = [o(t, "container", {}), o(t, `container.layout.${r}`, {}), o(t, `container.variant.${u}`, {}), l];
|
|
15
|
+
return /* @__PURE__ */ c("div", { css: p, ...a, ref: e });
|
|
16
|
+
}), C = n((s, e) => {
|
|
17
|
+
const {
|
|
18
|
+
theme: {
|
|
19
|
+
carousel: t
|
|
20
|
+
} = {},
|
|
21
|
+
...r
|
|
22
|
+
} = s;
|
|
23
|
+
return /* @__PURE__ */ c("div", { css: o(t, "carouselViewport", {}), ...r, ref: e });
|
|
24
|
+
}), v = n((s, e) => {
|
|
25
|
+
const {
|
|
26
|
+
theme: {
|
|
27
|
+
carousel: t
|
|
28
|
+
} = {},
|
|
29
|
+
$layout: r,
|
|
30
|
+
...u
|
|
31
|
+
} = s, l = [o(t, "carouselThumbsViewport.default", {}), o(t, `carouselThumbsViewport.${r}`, {})];
|
|
32
|
+
return /* @__PURE__ */ c("div", { css: l, ...u, ref: e });
|
|
33
|
+
}), b = (s) => {
|
|
34
|
+
const {
|
|
35
|
+
theme: {
|
|
36
|
+
carousel: e
|
|
37
|
+
} = {},
|
|
38
|
+
...t
|
|
39
|
+
} = s;
|
|
40
|
+
return /* @__PURE__ */ c("div", { css: o(e, "contentContainer", {}), ...t });
|
|
41
|
+
}, f = (s) => {
|
|
42
|
+
const {
|
|
43
|
+
theme: {
|
|
44
|
+
carousel: e
|
|
45
|
+
} = {},
|
|
46
|
+
...t
|
|
47
|
+
} = s;
|
|
48
|
+
return /* @__PURE__ */ c("div", { css: o(e, "carouselViewportSlideWrapper", {}), ...t });
|
|
49
|
+
}, P = (s) => {
|
|
50
|
+
const {
|
|
51
|
+
theme: {
|
|
52
|
+
carousel: e
|
|
53
|
+
} = {},
|
|
54
|
+
...t
|
|
55
|
+
} = s;
|
|
56
|
+
return /* @__PURE__ */ c("div", { css: o(e, "carouselSlide", {}), ...t });
|
|
57
|
+
}, T = (s) => {
|
|
58
|
+
const {
|
|
59
|
+
theme: {
|
|
60
|
+
carousel: e
|
|
61
|
+
} = {},
|
|
62
|
+
styles: t,
|
|
63
|
+
...r
|
|
64
|
+
} = s, u = [o(e, "carouselControlsWrapper", {}), t];
|
|
65
|
+
return /* @__PURE__ */ c("div", { css: u, ...r });
|
|
66
|
+
}, $ = (s) => {
|
|
67
|
+
const {
|
|
68
|
+
theme: {
|
|
69
|
+
carousel: e
|
|
70
|
+
} = {},
|
|
71
|
+
...t
|
|
72
|
+
} = s;
|
|
73
|
+
return /* @__PURE__ */ c("div", { css: o(e, "carouselControls", {}), ...t });
|
|
74
|
+
}, w = (s) => {
|
|
75
|
+
const {
|
|
76
|
+
theme: {
|
|
77
|
+
carousel: e
|
|
78
|
+
} = {},
|
|
79
|
+
...t
|
|
80
|
+
} = s;
|
|
81
|
+
return /* @__PURE__ */ c(m, { styles: o(e, "controlsButton", {}), ...t });
|
|
82
|
+
}, V = (s) => {
|
|
83
|
+
const {
|
|
84
|
+
theme: {
|
|
85
|
+
carousel: e
|
|
86
|
+
} = {},
|
|
87
|
+
...t
|
|
88
|
+
} = s;
|
|
89
|
+
return /* @__PURE__ */ c("div", { css: o(e, "carouselDots", {}), ...t });
|
|
90
|
+
}, W = (s) => {
|
|
91
|
+
const {
|
|
92
|
+
theme: {
|
|
93
|
+
carousel: e
|
|
94
|
+
} = {},
|
|
95
|
+
$active: t,
|
|
96
|
+
...r
|
|
97
|
+
} = s, u = [o(e, "carouselDot.default", {}), t ? o(e, "carouselDot.active", {}) : o(e, "carouselDot.nonActive", {})];
|
|
98
|
+
return /* @__PURE__ */ c("button", { css: u, ...r });
|
|
99
|
+
}, D = (s) => {
|
|
100
|
+
const {
|
|
101
|
+
theme: {
|
|
102
|
+
carousel: e
|
|
103
|
+
} = {},
|
|
104
|
+
$layout: t,
|
|
105
|
+
...r
|
|
106
|
+
} = s, u = [o(e, "carouselThumbs.default", {}), o(e, `carouselThumbs.${t}`, {})];
|
|
107
|
+
return /* @__PURE__ */ c("div", { css: u, ...r });
|
|
108
|
+
}, B = (s) => {
|
|
109
|
+
const {
|
|
110
|
+
theme: {
|
|
111
|
+
carousel: e
|
|
112
|
+
} = {},
|
|
113
|
+
$layout: t,
|
|
114
|
+
...r
|
|
115
|
+
} = s, u = [o(e, "carouselThumbsWrapper.default", {}), o(e, `carouselThumbsWrapper.${t}`, {})];
|
|
116
|
+
return /* @__PURE__ */ c("div", { css: u, ...r });
|
|
117
|
+
}, x = (s) => {
|
|
118
|
+
const {
|
|
119
|
+
theme: {
|
|
120
|
+
carousel: e
|
|
121
|
+
} = {},
|
|
122
|
+
$active: t,
|
|
123
|
+
$layout: r,
|
|
124
|
+
...u
|
|
125
|
+
} = s, l = [o(e, "carouselThumb.default", {}), o(e, `carouselThumb.${r}`, {}), t ? o(e, "carouselThumb.active", {}) : o(e, "carouselThumb.nonActive", {})];
|
|
126
|
+
return /* @__PURE__ */ c("button", { css: l, ...u });
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
S as CarouselContainerStyled,
|
|
130
|
+
w as CarouselControlsButtonStyled,
|
|
131
|
+
$ as CarouselControlsStyled,
|
|
132
|
+
T as CarouselControlsWrapperStyled,
|
|
133
|
+
W as CarouselDotStyled,
|
|
134
|
+
V as CarouselDotsStyled,
|
|
135
|
+
P as CarouselSlideStyled,
|
|
136
|
+
x as CarouselThumbStyled,
|
|
137
|
+
D as CarouselThumbsStyled,
|
|
138
|
+
v as CarouselThumbsViewportStyled,
|
|
139
|
+
B as CarouselThumbsWrapperStyled,
|
|
140
|
+
f as CarouselViewportSlideWrapperStyled,
|
|
141
|
+
C as CarouselViewportStyled,
|
|
142
|
+
b as ContentContainerStyled
|
|
143
|
+
};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, jsx as a } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f } from "react";
|
|
4
|
+
import { COMPONENT_NAME as e } from "./constants.js";
|
|
5
|
+
import { ChatBubbleStyled as h, ChatContentStyled as c, ChatActionsStyled as p } from "./ChatBubbleStyled.js";
|
|
6
|
+
import { useTheme as C } from "../../../hooks/useTheme/useTheme.js";
|
|
7
|
+
const y = f((o, i) => {
|
|
8
|
+
const {
|
|
9
|
+
styles: n = {},
|
|
10
|
+
status: r = "fulfilled",
|
|
11
|
+
variant: l = "question",
|
|
12
|
+
actions: t = [],
|
|
13
|
+
children: d,
|
|
14
|
+
...m
|
|
15
|
+
} = o, {
|
|
16
|
+
theme: s
|
|
17
|
+
} = C();
|
|
18
|
+
return /* @__PURE__ */ u(h, { theme: s, styles: n, $variant: l, ref: i, $status: r, "data-testid": e, ...m, children: [
|
|
19
|
+
/* @__PURE__ */ a(c, { theme: s, $status: r, "data-testid": `${e}-content`, children: d }),
|
|
20
|
+
t != null && t.length ? /* @__PURE__ */ a(p, { theme: s, "data-testid": `${e}-actions`, children: t }) : null
|
|
21
|
+
] });
|
|
22
|
+
});
|
|
23
|
+
y.displayName = e;
|
|
24
|
+
export {
|
|
25
|
+
y as ChatBubble
|
|
26
|
+
};
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as u } from "react";
|
|
4
|
+
import { Loader as m } from "../../core/Loader/Loader.js";
|
|
5
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
6
|
+
const y = u((o, e) => {
|
|
7
|
+
const {
|
|
8
|
+
theme: {
|
|
9
|
+
chatbubble: t
|
|
10
|
+
} = {},
|
|
11
|
+
styles: r = {},
|
|
12
|
+
$variant: c,
|
|
13
|
+
$status: n,
|
|
14
|
+
...d
|
|
15
|
+
} = o, l = [s(t, "default", {}), s(t, c, {}), s(t, n, {}), r];
|
|
16
|
+
return /* @__PURE__ */ a("div", { css: l, ...d, ref: e });
|
|
17
|
+
}), S = (o) => {
|
|
18
|
+
const {
|
|
19
|
+
theme: {
|
|
20
|
+
chatbubble: e
|
|
21
|
+
} = {},
|
|
22
|
+
$status: t,
|
|
23
|
+
children: r,
|
|
24
|
+
...c
|
|
25
|
+
} = o, n = s(e, "loader.props", {}), d = [s(e, "content.default", {}), s(e, ["content", t], {})];
|
|
26
|
+
return /* @__PURE__ */ p("div", { css: d, ...c, children: [
|
|
27
|
+
t === "pending" && /* @__PURE__ */ a(m, { ...n }),
|
|
28
|
+
r
|
|
29
|
+
] });
|
|
30
|
+
}, v = (o) => {
|
|
31
|
+
const {
|
|
32
|
+
theme: {
|
|
33
|
+
chatbubble: e
|
|
34
|
+
} = {},
|
|
35
|
+
...t
|
|
36
|
+
} = o, r = s(e, "actions", {});
|
|
37
|
+
return /* @__PURE__ */ a("div", { css: r, ...t });
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
v as ChatActionsStyled,
|
|
41
|
+
y as ChatBubbleStyled,
|
|
42
|
+
S as ChatContentStyled
|
|
43
|
+
};
|
|
@@ -1 +1,69 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as A, useRef as F, useImperativeHandle as j } from "react";
|
|
4
|
+
import { CarouselContainerStyled as E, CarouselControlsWrapperStyled as H, CarouselViewportStyled as L, CarouselViewportSlideWrapperStyled as M, CarouselDotsStyled as O, CarouselDotStyled as W, CarouselControlsButtonStyled as S } from "../Carousel/CarouselStyled.js";
|
|
5
|
+
import { COMPONENT_NAME as o } from "./constants.js";
|
|
6
|
+
import { ContentSlideStyled as _, CarouselFooterStyled as z, CarouselFooterControlsStyled as q } from "./ContentCarouselStyled.js";
|
|
7
|
+
import { CarouselVariantTypes as G, LayoutType as J } from "../Carousel/Carousel.types.js";
|
|
8
|
+
import { useTheme as K } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { useCarousel as Q } from "../../../hooks/useCarousel/useCarousel.js";
|
|
10
|
+
import { TabIndex as $ } from "../../../types/accesability.js";
|
|
11
|
+
import { ButtonColorVariant as v, ButtonVariant as x } from "../../../types/button.js";
|
|
12
|
+
import { Icon as b } from "../../core/Icon/Icon.js";
|
|
13
|
+
const U = A((w, I) => {
|
|
14
|
+
var y;
|
|
15
|
+
const {
|
|
16
|
+
theme: t
|
|
17
|
+
} = K(), {
|
|
18
|
+
items: l,
|
|
19
|
+
renderItem: T,
|
|
20
|
+
showArrows: N = !0,
|
|
21
|
+
isFocusable: R = !0,
|
|
22
|
+
showDots: D = !0,
|
|
23
|
+
styles: P
|
|
24
|
+
} = w, {
|
|
25
|
+
active: c,
|
|
26
|
+
disabled: u
|
|
27
|
+
} = t.colors.icon.primary, {
|
|
28
|
+
icons: {
|
|
29
|
+
base: m,
|
|
30
|
+
controlLeft: V,
|
|
31
|
+
controlRight: B
|
|
32
|
+
}
|
|
33
|
+
} = t.carousel, p = F(null), {
|
|
34
|
+
carouselRef: g,
|
|
35
|
+
activeIndex: a,
|
|
36
|
+
scrollTo: s,
|
|
37
|
+
scrollPrev: i,
|
|
38
|
+
scrollNext: n,
|
|
39
|
+
canScrollPrev: C,
|
|
40
|
+
canScrollNext: f,
|
|
41
|
+
slidesCount: k
|
|
42
|
+
} = Q({
|
|
43
|
+
options: {
|
|
44
|
+
axis: "x"
|
|
45
|
+
},
|
|
46
|
+
targetRef: p
|
|
47
|
+
});
|
|
48
|
+
return j(I, () => ({
|
|
49
|
+
scrollPrev: i,
|
|
50
|
+
scrollNext: n,
|
|
51
|
+
scrollTo: s,
|
|
52
|
+
selectedIndex: a
|
|
53
|
+
}), [i, n, s, a]), /* @__PURE__ */ d(E, { ref: p, theme: t, styles: P, $layout: J.Horizontal, $variant: G.Cards, tabIndex: R ? $.Default : $.Disabled, "data-testid": o, children: [
|
|
54
|
+
/* @__PURE__ */ e(H, { "data-testid": `${o}-controls-wrapper`, theme: t, children: /* @__PURE__ */ e(L, { theme: t, ref: g, "data-testid": `${o}-viewport`, children: /* @__PURE__ */ e(M, { theme: t, "data-testid": `${o}-slider-wrapper`, children: l == null ? void 0 : l.map((h, r) => /* @__PURE__ */ e(_, { theme: t, "data-testid": `${o}-content-slide-${r}`, children: T(h, r) }, r)) }) }) }),
|
|
55
|
+
/* @__PURE__ */ d(z, { theme: t, "data-testid": `${o}-footer`, children: [
|
|
56
|
+
D && /* @__PURE__ */ e(O, { theme: t, "data-testid": `${o}-dots`, children: (y = Array.from({
|
|
57
|
+
length: k
|
|
58
|
+
})) == null ? void 0 : y.map((h, r) => /* @__PURE__ */ e(W, { theme: t, $active: r === a, onClick: () => s(r) }, r)) }),
|
|
59
|
+
N && /* @__PURE__ */ d(q, { theme: t, "data-testid": `${o}-controls`, children: [
|
|
60
|
+
/* @__PURE__ */ e(S, { theme: t, variant: x.Text, color: v.Primary, onClick: i, disabled: !C, "data-testid": `${o}-control-previous`, children: /* @__PURE__ */ e(b, { ...m, ...V, fill: C ? c : u }) }),
|
|
61
|
+
/* @__PURE__ */ e(S, { theme: t, variant: x.Text, color: v.Primary, onClick: n, disabled: !f, "data-testid": `${o}-control-next`, children: /* @__PURE__ */ e(b, { ...m, ...B, fill: f ? c : u }) })
|
|
62
|
+
] })
|
|
63
|
+
] })
|
|
64
|
+
] });
|
|
65
|
+
});
|
|
66
|
+
U.displayName = o;
|
|
67
|
+
export {
|
|
68
|
+
U as ContentCarousel
|
|
69
|
+
};
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
3
|
+
const l = (o) => {
|
|
4
|
+
const {
|
|
5
|
+
theme: {
|
|
6
|
+
carousel: t
|
|
7
|
+
} = {},
|
|
8
|
+
...e
|
|
9
|
+
} = o;
|
|
10
|
+
return /* @__PURE__ */ r("div", { css: s(t, "contentSlide", {}), ...e });
|
|
11
|
+
}, d = (o) => {
|
|
12
|
+
const {
|
|
13
|
+
theme: {
|
|
14
|
+
carousel: t
|
|
15
|
+
} = {},
|
|
16
|
+
...e
|
|
17
|
+
} = o;
|
|
18
|
+
return /* @__PURE__ */ r("div", { css: s(t, "footer", {}), ...e });
|
|
19
|
+
}, u = (o) => {
|
|
20
|
+
const {
|
|
21
|
+
theme: {
|
|
22
|
+
carousel: t
|
|
23
|
+
} = {},
|
|
24
|
+
...e
|
|
25
|
+
} = o;
|
|
26
|
+
return /* @__PURE__ */ r("div", { css: s(t, "footerControls", {}), ...e });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
u as CarouselFooterControlsStyled,
|
|
30
|
+
d as CarouselFooterStyled,
|
|
31
|
+
l as ContentSlideStyled
|
|
32
|
+
};
|
|
@@ -1 +1,55 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as v, jsx as r } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as x, useState as S, useEffect as A } from "react";
|
|
4
|
+
import { MIN_INITIAL_QTY as B, MAX_INITIAL_QTY as D, INITIAL_QTY as w, COMPONENT_NAME as s, REGEX_NUMBER as L } from "./constants.js";
|
|
5
|
+
import { CounterStyled as Q, NavButtonStyled as T } from "./CounterStyled.js";
|
|
6
|
+
import { Input as R } from "../../core/Input/Input.js";
|
|
7
|
+
import { useTheme as Y } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
9
|
+
import { Icon as V } from "../../core/Icon/Icon.js";
|
|
10
|
+
import { InputVariantType as $ } from "../../../types/input.js";
|
|
11
|
+
const j = x((g, M) => {
|
|
12
|
+
const {
|
|
13
|
+
min: l = B,
|
|
14
|
+
max: m = D,
|
|
15
|
+
initial: d = w,
|
|
16
|
+
onCounterChange: u,
|
|
17
|
+
styles: b = {}
|
|
18
|
+
} = g, {
|
|
19
|
+
theme: i
|
|
20
|
+
} = Y(), p = o(i, "counter.icons", {}), [e, c] = S(d), [I, n] = S(String(d)), f = e >= m, N = e <= l, _ = () => {
|
|
21
|
+
if (f) return;
|
|
22
|
+
const t = e + 1;
|
|
23
|
+
c(t), n(String(t));
|
|
24
|
+
}, y = () => {
|
|
25
|
+
if (N) return;
|
|
26
|
+
const t = e - 1;
|
|
27
|
+
c(t), n(String(t));
|
|
28
|
+
}, C = (t) => {
|
|
29
|
+
const a = o(t, "target.value");
|
|
30
|
+
L.test(a) && n(a);
|
|
31
|
+
}, E = () => {
|
|
32
|
+
const t = parseInt(I, 10);
|
|
33
|
+
if (isNaN(t))
|
|
34
|
+
n(String(e));
|
|
35
|
+
else {
|
|
36
|
+
const a = Math.min(m, t), h = Math.max(l, a);
|
|
37
|
+
c(h), n(String(h));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return A(() => {
|
|
41
|
+
u == null || u(e);
|
|
42
|
+
}, [e]), /* @__PURE__ */ v(Q, { theme: i, styles: b, ref: M, "data-testid": s, children: [
|
|
43
|
+
/* @__PURE__ */ r(T, { theme: i, disabled: N, onClick: y, "data-testid": `${s}-button-decrease`, children: /* @__PURE__ */ r(V, { ...o(p, "minus", {
|
|
44
|
+
name: "minus"
|
|
45
|
+
}) }) }),
|
|
46
|
+
/* @__PURE__ */ r(R, { variant: $.Number, onChange: C, onBlur: E, value: I, "data-testid": `${s}-input` }),
|
|
47
|
+
/* @__PURE__ */ r(T, { theme: i, disabled: f, onClick: _, "data-testid": `${s}-button-increase`, children: /* @__PURE__ */ r(V, { ...o(p, "plus", {
|
|
48
|
+
name: "plus"
|
|
49
|
+
}) }) })
|
|
50
|
+
] });
|
|
51
|
+
});
|
|
52
|
+
j.displayName = s;
|
|
53
|
+
export {
|
|
54
|
+
j as Counter
|
|
55
|
+
};
|
|
@@ -1 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
4
|
+
import { Button as i } from "../../core/Button/Button.js";
|
|
5
|
+
import { ButtonVariant as f } from "../../../types/button.js";
|
|
6
|
+
const v = c((t, o) => {
|
|
7
|
+
const {
|
|
8
|
+
theme: {
|
|
9
|
+
counter: r
|
|
10
|
+
} = {},
|
|
11
|
+
styles: e = {},
|
|
12
|
+
...m
|
|
13
|
+
} = t, u = [s(r, "default", {}), e];
|
|
14
|
+
return /* @__PURE__ */ n("div", { css: u, ref: o, ...m });
|
|
15
|
+
}), B = (t) => {
|
|
16
|
+
const {
|
|
17
|
+
theme: {
|
|
18
|
+
counter: o
|
|
19
|
+
} = {},
|
|
20
|
+
...r
|
|
21
|
+
} = t, e = [s(o, "navButton", {})];
|
|
22
|
+
return /* @__PURE__ */ n(i, { css: e, variant: f.Outlined, isIcon: !0, ...r });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
v as CounterStyled,
|
|
26
|
+
B as NavButtonStyled
|
|
27
|
+
};
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
const I = "Counter", n = 1, t = 1 / 0, N = 1, o = /^\d*$/;
|
|
2
|
+
export {
|
|
3
|
+
I as COMPONENT_NAME,
|
|
4
|
+
n as INITIAL_QTY,
|
|
5
|
+
t as MAX_INITIAL_QTY,
|
|
6
|
+
N as MIN_INITIAL_QTY,
|
|
7
|
+
o as REGEX_NUMBER
|
|
8
|
+
};
|