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,48 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as O, jsx as i } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as h, useRef as y, useMemo as N, useImperativeHandle as x } from "react";
|
|
4
|
+
import { COMPONENT_NAME as s } from "./constants.js";
|
|
5
|
+
import { DragAndDropFilesStyled as E } from "./DragAndDropFilesStyled.js";
|
|
6
|
+
import { useDragAndDrop as M } from "./hooks/useDragAndDrop/useDragAndDrop.js";
|
|
7
|
+
import { useTheme as T } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
import { Portal as b } from "../../core/Portal/Portal.js";
|
|
9
|
+
import { WrapperVariant as j } from "../../../types/wrapper.js";
|
|
10
|
+
const w = h((m, l) => {
|
|
11
|
+
const {
|
|
12
|
+
children: p,
|
|
13
|
+
dragOverContent: o,
|
|
14
|
+
targetRef: r,
|
|
15
|
+
triggerRef: c,
|
|
16
|
+
onDragEnter: d,
|
|
17
|
+
onDragOver: f,
|
|
18
|
+
onDragLeave: D,
|
|
19
|
+
onDrop: g,
|
|
20
|
+
...u
|
|
21
|
+
} = m, {
|
|
22
|
+
theme: v
|
|
23
|
+
} = T(), t = y(null), {
|
|
24
|
+
files: n,
|
|
25
|
+
isOver: e,
|
|
26
|
+
isGlobalDragging: a
|
|
27
|
+
} = M({
|
|
28
|
+
triggerRef: c,
|
|
29
|
+
targetRef: r,
|
|
30
|
+
fallbackRef: t,
|
|
31
|
+
onDragEnter: d,
|
|
32
|
+
onDragOver: f,
|
|
33
|
+
onDragLeave: D,
|
|
34
|
+
onDrop: g
|
|
35
|
+
}), A = N(() => !!(r != null && r.current && e && o), [r == null ? void 0 : r.current, e, o]);
|
|
36
|
+
return x(l, () => ({
|
|
37
|
+
files: n ? Array.from(n) : [],
|
|
38
|
+
isOver: e,
|
|
39
|
+
isGlobalDragging: a
|
|
40
|
+
}), [n, e, a]), /* @__PURE__ */ O("div", { children: [
|
|
41
|
+
A && /* @__PURE__ */ i(b, { container: r.current, wrapperVariant: j.Section, children: o }),
|
|
42
|
+
/* @__PURE__ */ i(E, { theme: v, ref: t, "data-testid": s, ...u, children: p })
|
|
43
|
+
] });
|
|
44
|
+
});
|
|
45
|
+
w.displayName = s;
|
|
46
|
+
export {
|
|
47
|
+
w as DragAndDropFiles
|
|
48
|
+
};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as f } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { get as p } from "../../../utils/helpers.js";
|
|
4
|
+
const a = m((r, t) => {
|
|
5
|
+
const {
|
|
6
|
+
theme: {
|
|
7
|
+
draganddropfiles: e
|
|
8
|
+
} = {},
|
|
9
|
+
styles: o = {},
|
|
10
|
+
...s
|
|
11
|
+
} = r, d = [p(e, "default", {}), o];
|
|
12
|
+
return /* @__PURE__ */ f("div", { css: d, ref: t, ...s });
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
a as DragAndDropFilesStyled
|
|
16
|
+
};
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState as h, useCallback as n, useEffect as A } from "react";
|
|
2
|
+
const j = (F) => {
|
|
3
|
+
const {
|
|
4
|
+
triggerRef: s,
|
|
5
|
+
targetRef: l,
|
|
6
|
+
fallbackRef: i,
|
|
7
|
+
onDragEnter: g,
|
|
8
|
+
onDragOver: a,
|
|
9
|
+
onDragLeave: c,
|
|
10
|
+
onDrop: f
|
|
11
|
+
} = F, [Z, G] = h(null), [k, o] = h(!1), [R, u] = h(!1), r = n((e) => e ? typeof e == "object" && "current" in e && e !== null ? e.current : e instanceof HTMLElement ? e : null : null, []), p = n((e) => {
|
|
12
|
+
var d;
|
|
13
|
+
e.preventDefault(), Array.from(((d = e.dataTransfer) == null ? void 0 : d.items) || []).some((y) => y.kind === "file") && (u(!0), g == null || g(e), o(!0), console.log("Global Drag Enter (Trigger):", r(s) || document.body));
|
|
14
|
+
}, [g, s, r]), D = n((e) => {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
const t = r(s) || document.body;
|
|
17
|
+
(!e.relatedTarget || !t.contains(e.relatedTarget)) && (u(!1), c == null || c(e), o(!1), console.log("Global Drag Leave (Trigger):", t));
|
|
18
|
+
}, [c, s, r]), E = n((e) => {
|
|
19
|
+
e.preventDefault(), u(!1), o(!1);
|
|
20
|
+
}, []), v = n((e) => {
|
|
21
|
+
var d;
|
|
22
|
+
e.preventDefault(), Array.from(((d = e.dataTransfer) == null ? void 0 : d.items) || []).some((y) => y.kind === "file") && (o(!0), console.log("Drop Zone Drag Enter:", r(l) || r(i) || document.body));
|
|
23
|
+
}, [l, i, r]), L = n((e) => {
|
|
24
|
+
e.preventDefault(), a == null || a(e), o((t) => t || (console.log("isOver (inside functional update):", !t), a == null || a(e), !0));
|
|
25
|
+
}, [a]), b = n((e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
const t = r(l) || r(i) || document.body;
|
|
28
|
+
(!e.relatedTarget || !t.contains(e.relatedTarget)) && o(!1);
|
|
29
|
+
}, [l, i, r]), T = n((e) => {
|
|
30
|
+
var m;
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
const t = (m = e.dataTransfer) == null ? void 0 : m.files;
|
|
33
|
+
t && t.length > 0 && (G(t), f == null || f(t, e)), o(!1), u(!1);
|
|
34
|
+
}, [f]);
|
|
35
|
+
return A(() => {
|
|
36
|
+
const e = r(s) || document.body, t = r(l) || r(i) || document.body;
|
|
37
|
+
if (!(!e || !t))
|
|
38
|
+
return e.addEventListener("dragenter", p), e.addEventListener("dragleave", D), e.addEventListener("drop", E), t.addEventListener("dragenter", v), t.addEventListener("dragover", L), t.addEventListener("dragleave", b), t.addEventListener("drop", T), () => {
|
|
39
|
+
e.removeEventListener("dragenter", p), e.removeEventListener("dragleave", D), e.removeEventListener("drop", E), t.removeEventListener("dragenter", v), t.removeEventListener("dragover", L), t.removeEventListener("dragleave", b), t.removeEventListener("drop", T);
|
|
40
|
+
};
|
|
41
|
+
}, [s, l, i, p, D, E, v, L, b, T, r]), {
|
|
42
|
+
files: Z,
|
|
43
|
+
isOver: k,
|
|
44
|
+
isGlobalDragging: R
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
j as useDragAndDrop
|
|
49
|
+
};
|
|
@@ -1 +1,88 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as n, jsx as e, Fragment as B } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as I, useState as A } from "react";
|
|
4
|
+
import { COMPONENT_NAME as b } from "./constants.js";
|
|
5
|
+
import { HeaderStyled as E, TopBannerRowStyled as H, NavigationRowStyled as $, MobileMenuOpenedDropdownWrapperStyled as D, CloseMenuIconWrapperStyled as F, MobileMenuWrapperStyled as P, MobileMenuItemWrapperStyled as Q, OpenMenuIconWrapperStyled as V, SearchColumnStyled as _, ActionsColumnStyled as q, MenuRowStyled as z, MenuColumnStyled as G, ChildrenRowStyled as J } from "./HeaderStyled.js";
|
|
6
|
+
import { useMediaQuery as K } from "../../../hooks/useMediaQuery/useMediaQuery.js";
|
|
7
|
+
import { Search as C } from "../Search/Search.js";
|
|
8
|
+
import { useTheme as U } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { get as i } from "../../../utils/helpers.js";
|
|
10
|
+
import { Row as d } from "../../layout/Row/Row.js";
|
|
11
|
+
import { Column as t } from "../../layout/Column/Column.js";
|
|
12
|
+
import { Icon as u } from "../../core/Icon/Icon.js";
|
|
13
|
+
import { Typography as X } from "../../core/Typography/Typography.js";
|
|
14
|
+
import { TypographyVariant as Y } from "../../../types/typography.js";
|
|
15
|
+
const Z = I((x, j) => {
|
|
16
|
+
var g;
|
|
17
|
+
const {
|
|
18
|
+
theme: r
|
|
19
|
+
} = U(), c = i(r, "header.icons", {}), {
|
|
20
|
+
bgColor: R = i(r, "header.container.backgroundColor"),
|
|
21
|
+
onMobileMenuItemClick: h,
|
|
22
|
+
menuItemMapper: f,
|
|
23
|
+
showTopBanner: O = !1,
|
|
24
|
+
showSearch: a,
|
|
25
|
+
children: y,
|
|
26
|
+
advBlock: T,
|
|
27
|
+
mobileMenuList: m,
|
|
28
|
+
bannerContent: w,
|
|
29
|
+
logo: l,
|
|
30
|
+
menu: p,
|
|
31
|
+
actions: o,
|
|
32
|
+
...k
|
|
33
|
+
} = x, S = K(`(max-width: ${(g = r == null ? void 0 : r.values) == null ? void 0 : g.screenMedium})`), [v, M] = A(!1);
|
|
34
|
+
return /* @__PURE__ */ n(E, { ref: j, theme: r, $backgroundColor: R, "data-testid": b, ...k, children: [
|
|
35
|
+
O && w && /* @__PURE__ */ e(H, { theme: r, justify: "center", children: w }),
|
|
36
|
+
/* @__PURE__ */ e($, { theme: r, children: S ? v ? (
|
|
37
|
+
// Mobile Menu Dropdown
|
|
38
|
+
/* @__PURE__ */ n(D, { theme: r, children: [
|
|
39
|
+
/* @__PURE__ */ n(d, { justify: "between", children: [
|
|
40
|
+
/* @__PURE__ */ e(t, { justify: "center", children: /* @__PURE__ */ e(F, { theme: r, onClick: () => M(!1), children: /* @__PURE__ */ e(u, { ...i(c, "close", {
|
|
41
|
+
name: "cross",
|
|
42
|
+
width: 24,
|
|
43
|
+
height: 24
|
|
44
|
+
}) }) }) }),
|
|
45
|
+
/* @__PURE__ */ e(d, { children: o })
|
|
46
|
+
] }),
|
|
47
|
+
a && /* @__PURE__ */ e(C, { width: "100%", styles: {
|
|
48
|
+
margin: "24px 0"
|
|
49
|
+
}, placeholder: "Search" }),
|
|
50
|
+
/* @__PURE__ */ e(P, { theme: r, children: m == null ? void 0 : m.map((s, N) => /* @__PURE__ */ e("div", { onClick: (W) => h == null ? void 0 : h(W, s), children: /* @__PURE__ */ n(Q, { theme: r, justify: "between", align: "center", children: [
|
|
51
|
+
/* @__PURE__ */ e(X, { variant: Y.Body1, children: f ? f(s) : s.title }),
|
|
52
|
+
/* @__PURE__ */ e(u, { ...i(c, "right", {
|
|
53
|
+
name: "arrowRight",
|
|
54
|
+
width: 16,
|
|
55
|
+
height: 16
|
|
56
|
+
}) })
|
|
57
|
+
] }) }, N)) }),
|
|
58
|
+
T
|
|
59
|
+
] })
|
|
60
|
+
) : (
|
|
61
|
+
// Mobile top nav bar
|
|
62
|
+
/* @__PURE__ */ n(d, { justify: "between", styles: {
|
|
63
|
+
width: "100%"
|
|
64
|
+
}, children: [
|
|
65
|
+
/* @__PURE__ */ e(t, { justify: "center", children: /* @__PURE__ */ e(V, { theme: r, onClick: () => M(!0), children: /* @__PURE__ */ e(u, { ...i(c, "menu", {
|
|
66
|
+
name: "mobileMenu",
|
|
67
|
+
width: 40,
|
|
68
|
+
height: 40
|
|
69
|
+
}) }) }) }),
|
|
70
|
+
l && /* @__PURE__ */ e(t, { children: l }),
|
|
71
|
+
o && /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(d, { children: o }) })
|
|
72
|
+
] })
|
|
73
|
+
) : (
|
|
74
|
+
// --- Desktop View ---
|
|
75
|
+
/* @__PURE__ */ n(B, { children: [
|
|
76
|
+
l && /* @__PURE__ */ e(t, { flex: "2", children: l }),
|
|
77
|
+
/* @__PURE__ */ e(_, { theme: r, flex: "5", children: a ? /* @__PURE__ */ e(C, { width: "484px", placeholder: "Search" }) : p }),
|
|
78
|
+
o && /* @__PURE__ */ e(q, { theme: r, flex: "2", children: o })
|
|
79
|
+
] })
|
|
80
|
+
) }),
|
|
81
|
+
!S && a && p && /* @__PURE__ */ e(z, { theme: r, children: /* @__PURE__ */ e(G, { theme: r, children: p }) }),
|
|
82
|
+
y && /* @__PURE__ */ e(J, { theme: r, children: y })
|
|
83
|
+
] });
|
|
84
|
+
});
|
|
85
|
+
Z.displayName = b;
|
|
86
|
+
export {
|
|
87
|
+
Z as Header
|
|
88
|
+
};
|
|
@@ -1 +1,136 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as h } from "react";
|
|
4
|
+
import { getBoxStyles as y } from "../../../tokens/utils.js";
|
|
5
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
6
|
+
import { Row as n } from "../../layout/Row/Row.js";
|
|
7
|
+
import { Column as l } from "../../layout/Column/Column.js";
|
|
8
|
+
const b = h((e, r) => {
|
|
9
|
+
const {
|
|
10
|
+
theme: {
|
|
11
|
+
flexContainer: t,
|
|
12
|
+
header: c
|
|
13
|
+
} = {},
|
|
14
|
+
styles: p,
|
|
15
|
+
$backgroundColor: d,
|
|
16
|
+
...a
|
|
17
|
+
} = e, {
|
|
18
|
+
boxStyles: m,
|
|
19
|
+
restProps: u
|
|
20
|
+
} = y(a), i = [o(t, "default", {}), o(c, "container", {}), m, d ? {
|
|
21
|
+
backgroundColor: d
|
|
22
|
+
} : {}, p];
|
|
23
|
+
return /* @__PURE__ */ s("div", { css: i, ...u, ref: r });
|
|
24
|
+
}), R = (e) => {
|
|
25
|
+
const {
|
|
26
|
+
theme: {
|
|
27
|
+
header: r
|
|
28
|
+
} = {},
|
|
29
|
+
...t
|
|
30
|
+
} = e;
|
|
31
|
+
return /* @__PURE__ */ s(n, { css: o(r, "topBannerRow", {}), ...t });
|
|
32
|
+
}, W = (e) => {
|
|
33
|
+
const {
|
|
34
|
+
theme: {
|
|
35
|
+
header: r
|
|
36
|
+
} = {},
|
|
37
|
+
...t
|
|
38
|
+
} = e;
|
|
39
|
+
return /* @__PURE__ */ s(n, { css: o(r, "navigationRow.default", {}), ...t });
|
|
40
|
+
}, v = (e) => {
|
|
41
|
+
const {
|
|
42
|
+
theme: {
|
|
43
|
+
header: r
|
|
44
|
+
} = {},
|
|
45
|
+
...t
|
|
46
|
+
} = e;
|
|
47
|
+
return /* @__PURE__ */ s(l, { css: o(r, "searchColumn.default", {}), ...t });
|
|
48
|
+
}, g = (e) => {
|
|
49
|
+
const {
|
|
50
|
+
theme: {
|
|
51
|
+
header: r
|
|
52
|
+
} = {},
|
|
53
|
+
...t
|
|
54
|
+
} = e;
|
|
55
|
+
return /* @__PURE__ */ s(l, { css: o(r, "actionsColumn.default", {}), ...t });
|
|
56
|
+
}, x = (e) => {
|
|
57
|
+
const {
|
|
58
|
+
theme: {
|
|
59
|
+
header: r
|
|
60
|
+
} = {},
|
|
61
|
+
...t
|
|
62
|
+
} = e;
|
|
63
|
+
return /* @__PURE__ */ s(n, { css: o(r, "menuRow.default", {}), ...t });
|
|
64
|
+
}, I = (e) => {
|
|
65
|
+
const {
|
|
66
|
+
theme: {
|
|
67
|
+
header: r
|
|
68
|
+
} = {},
|
|
69
|
+
...t
|
|
70
|
+
} = e;
|
|
71
|
+
return /* @__PURE__ */ s(n, { css: o(r, "menuRow.column", {}), ...t });
|
|
72
|
+
}, B = (e) => {
|
|
73
|
+
const {
|
|
74
|
+
theme: {
|
|
75
|
+
header: r
|
|
76
|
+
} = {},
|
|
77
|
+
...t
|
|
78
|
+
} = e;
|
|
79
|
+
return /* @__PURE__ */ s(n, { css: o(r, "children.default", {}), ...t });
|
|
80
|
+
}, k = (e) => {
|
|
81
|
+
const {
|
|
82
|
+
theme: {
|
|
83
|
+
header: r
|
|
84
|
+
} = {},
|
|
85
|
+
...t
|
|
86
|
+
} = e;
|
|
87
|
+
return /* @__PURE__ */ s("div", { css: o(r, "mobile.openedDropdownWrapper", {}), ...t });
|
|
88
|
+
}, D = (e) => {
|
|
89
|
+
const {
|
|
90
|
+
theme: {
|
|
91
|
+
header: r
|
|
92
|
+
} = {},
|
|
93
|
+
...t
|
|
94
|
+
} = e;
|
|
95
|
+
return /* @__PURE__ */ s("div", { css: o(r, "mobile.closeMenuIconWrapper", {}), ...t });
|
|
96
|
+
}, N = (e) => {
|
|
97
|
+
const {
|
|
98
|
+
theme: {
|
|
99
|
+
flexContainer: r,
|
|
100
|
+
header: t
|
|
101
|
+
} = {},
|
|
102
|
+
...c
|
|
103
|
+
} = e, p = [o(r, "default", {}), o(t, "mobile.menuWrapper", {})];
|
|
104
|
+
return /* @__PURE__ */ s("div", { css: p, ...c });
|
|
105
|
+
}, O = (e) => {
|
|
106
|
+
const {
|
|
107
|
+
theme: {
|
|
108
|
+
header: r
|
|
109
|
+
} = {},
|
|
110
|
+
...t
|
|
111
|
+
} = e;
|
|
112
|
+
return /* @__PURE__ */ s(n, { css: o(r, "mobile.menuItemWrapper", {}), ...t });
|
|
113
|
+
}, j = (e) => {
|
|
114
|
+
const {
|
|
115
|
+
theme: {
|
|
116
|
+
header: r
|
|
117
|
+
} = {},
|
|
118
|
+
...t
|
|
119
|
+
} = e;
|
|
120
|
+
return /* @__PURE__ */ s("div", { css: o(r, "mobile.openMenuIconWrapper", {}), ...t });
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
g as ActionsColumnStyled,
|
|
124
|
+
B as ChildrenRowStyled,
|
|
125
|
+
D as CloseMenuIconWrapperStyled,
|
|
126
|
+
b as HeaderStyled,
|
|
127
|
+
I as MenuColumnStyled,
|
|
128
|
+
x as MenuRowStyled,
|
|
129
|
+
O as MobileMenuItemWrapperStyled,
|
|
130
|
+
k as MobileMenuOpenedDropdownWrapperStyled,
|
|
131
|
+
N as MobileMenuWrapperStyled,
|
|
132
|
+
W as NavigationRowStyled,
|
|
133
|
+
j as OpenMenuIconWrapperStyled,
|
|
134
|
+
v as SearchColumnStyled,
|
|
135
|
+
R as TopBannerRowStyled
|
|
136
|
+
};
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as m, jsx as o } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { COMPONENT_NAME as r } from "./constants.js";
|
|
5
|
+
import { PriceStyled as a, CurrentPriceStyled as u, OldPriceStyled as f } from "./PriceStyled.js";
|
|
6
|
+
import { useTheme as p } from "../../../hooks/useTheme/useTheme.js";
|
|
7
|
+
const O = n((d, i) => {
|
|
8
|
+
const {
|
|
9
|
+
className: l = "",
|
|
10
|
+
oldValue: t,
|
|
11
|
+
currentValue: c,
|
|
12
|
+
...s
|
|
13
|
+
} = d, {
|
|
14
|
+
theme: e
|
|
15
|
+
} = p();
|
|
16
|
+
return /* @__PURE__ */ m(a, { ref: i, className: l, theme: e, "data-testid": r, ...s, children: [
|
|
17
|
+
/* @__PURE__ */ o(u, { "data-testid": `${r}-current`, theme: e, children: c }),
|
|
18
|
+
t ? /* @__PURE__ */ o(f, { "data-testid": `${r}-old`, theme: e, children: t }) : null
|
|
19
|
+
] });
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
O as Price
|
|
23
|
+
};
|
|
@@ -1 +1,42 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as l } from "react";
|
|
4
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
5
|
+
const p = l((e, t) => {
|
|
6
|
+
const {
|
|
7
|
+
styles: r = {},
|
|
8
|
+
theme: {
|
|
9
|
+
price: s
|
|
10
|
+
} = {},
|
|
11
|
+
...n
|
|
12
|
+
} = e, d = {
|
|
13
|
+
...o(s, "default", {}),
|
|
14
|
+
...r
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ c("div", { ref: t, css: d, ...n });
|
|
17
|
+
}), f = (e) => {
|
|
18
|
+
const {
|
|
19
|
+
theme: {
|
|
20
|
+
price: t
|
|
21
|
+
} = {},
|
|
22
|
+
...r
|
|
23
|
+
} = e, s = {
|
|
24
|
+
...o(t, "currentPrice.default", {})
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ c("span", { css: s, ...r });
|
|
27
|
+
}, y = (e) => {
|
|
28
|
+
const {
|
|
29
|
+
theme: {
|
|
30
|
+
price: t
|
|
31
|
+
} = {},
|
|
32
|
+
...r
|
|
33
|
+
} = e, s = {
|
|
34
|
+
...o(t, "oldPrice.default", {})
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ c("del", { css: s, ...r });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
f as CurrentPriceStyled,
|
|
40
|
+
y as OldPriceStyled,
|
|
41
|
+
p as PriceStyled
|
|
42
|
+
};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as S } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as _ } from "react";
|
|
4
|
+
import { PROGRESS_MIN_VALUE_DEFAULT as t, COMPONENT_ROLE_DEFAULT as L, COMPONENT_NAME as a, PROGRESS_MAX_VALUE_DEFAULT as d } from "./constants.js";
|
|
5
|
+
import { ProgressBarStyled as P, TrackStyled as p, IndeterminateFillStyled as A, DeterminateFillStyled as M, PercentLabelStyled as N } from "./ProgressBarStyled.js";
|
|
6
|
+
import { useTheme as O } from "../../../hooks/useTheme/useTheme.js";
|
|
7
|
+
const T = _((n, s) => {
|
|
8
|
+
const {
|
|
9
|
+
value: m = t,
|
|
10
|
+
indeterminate: i = !1,
|
|
11
|
+
showPercentage: c = !1,
|
|
12
|
+
fillColor: o,
|
|
13
|
+
role: f = L,
|
|
14
|
+
backgroundColor: h,
|
|
15
|
+
children: b,
|
|
16
|
+
"aria-label": E,
|
|
17
|
+
...u
|
|
18
|
+
} = n, {
|
|
19
|
+
theme: e
|
|
20
|
+
} = O(), r = Math.min(d, Math.max(t, m));
|
|
21
|
+
return /* @__PURE__ */ l(P, { ref: s, theme: e, role: f, "aria-label": E, "aria-valuemin": t, "aria-valuemax": d, "aria-valuenow": i ? void 0 : r, ...u, "data-testid": a, children: /* @__PURE__ */ l(p, { theme: e, $backgroundColor: h, "data-testid": `${a}-track`, children: i ? /* @__PURE__ */ l(A, { theme: e, fill: o, "data-testid": `${a}-fill` }) : /* @__PURE__ */ l(M, { theme: e, fill: o, $width: r, "data-testid": `${a}-fill`, children: c && r > t && /* @__PURE__ */ S(N, { theme: e, children: [
|
|
22
|
+
r,
|
|
23
|
+
"%"
|
|
24
|
+
] }) }) }) });
|
|
25
|
+
});
|
|
26
|
+
T.displayName = a;
|
|
27
|
+
export {
|
|
28
|
+
T as ProgressBar
|
|
29
|
+
};
|
|
@@ -1 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { convertJsonToCssKeyframeCss as f } from "../../../tokens/utils.js";
|
|
4
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
5
|
+
const P = y((r, t) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: {
|
|
8
|
+
progressbar: e
|
|
9
|
+
} = {},
|
|
10
|
+
styles: s = {},
|
|
11
|
+
...n
|
|
12
|
+
} = r, a = [o(e, "styledProgressBar.default", {}), s];
|
|
13
|
+
return /* @__PURE__ */ i("div", { css: a, ref: t, ...n });
|
|
14
|
+
}), $ = (r) => {
|
|
15
|
+
const {
|
|
16
|
+
theme: {
|
|
17
|
+
progressbar: t
|
|
18
|
+
} = {},
|
|
19
|
+
$backgroundColor: e,
|
|
20
|
+
...s
|
|
21
|
+
} = r, n = [o(t, "styledTrack.default", {}), e && {
|
|
22
|
+
backgroundColor: e
|
|
23
|
+
}];
|
|
24
|
+
return /* @__PURE__ */ i("div", { css: n, ...s });
|
|
25
|
+
}, k = (r) => {
|
|
26
|
+
const {
|
|
27
|
+
theme: {
|
|
28
|
+
progressbar: t
|
|
29
|
+
} = {},
|
|
30
|
+
fill: e,
|
|
31
|
+
$width: s = 0,
|
|
32
|
+
...n
|
|
33
|
+
} = r, a = [o(t, "styledDeterminateFill.default", {}), e && {
|
|
34
|
+
backgroundColor: e
|
|
35
|
+
}, s && {
|
|
36
|
+
width: `${s}%`
|
|
37
|
+
}];
|
|
38
|
+
return /* @__PURE__ */ i("div", { css: a, ...n });
|
|
39
|
+
}, C = (r) => {
|
|
40
|
+
const {
|
|
41
|
+
theme: {
|
|
42
|
+
progressbar: t,
|
|
43
|
+
animations: e
|
|
44
|
+
} = {},
|
|
45
|
+
fill: s,
|
|
46
|
+
$animationName: n = o(t, "styledIndeterminateFillAnimations.animationName", "progressIndeterminate"),
|
|
47
|
+
$animationProps: a,
|
|
48
|
+
...c
|
|
49
|
+
} = r, l = n ? o(e, n, null) : null, m = l ? f(l) : n, d = a || o(t, "styledIndeterminateFillAnimations.animationProps", ""), p = {
|
|
50
|
+
animation: `${m} ${d}`
|
|
51
|
+
}, u = [o(t, "styledIndeterminateFill.default", {}), s ? {
|
|
52
|
+
backgroundColor: s
|
|
53
|
+
} : {}, m ? p : {}];
|
|
54
|
+
return /* @__PURE__ */ i("div", { css: u, ...c });
|
|
55
|
+
}, F = (r) => {
|
|
56
|
+
const {
|
|
57
|
+
theme: {
|
|
58
|
+
progressbar: t
|
|
59
|
+
} = {},
|
|
60
|
+
...e
|
|
61
|
+
} = r, s = [o(t, "styledPercentLabel.default", {})];
|
|
62
|
+
return /* @__PURE__ */ i("span", { css: s, ...e });
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
k as DeterminateFillStyled,
|
|
66
|
+
C as IndeterminateFillStyled,
|
|
67
|
+
F as PercentLabelStyled,
|
|
68
|
+
P as ProgressBarStyled,
|
|
69
|
+
$ as TrackStyled
|
|
70
|
+
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const E = "ProgressBar", _ = "progressbar", s = 0, o = 100;
|
|
2
|
+
export {
|
|
3
|
+
E as COMPONENT_NAME,
|
|
4
|
+
_ as COMPONENT_ROLE_DEFAULT,
|
|
5
|
+
o as PROGRESS_MAX_VALUE_DEFAULT,
|
|
6
|
+
s as PROGRESS_MIN_VALUE_DEFAULT
|
|
7
|
+
};
|
|
@@ -1 +1,54 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as W, useId as A, useState as D, useCallback as H } from "react";
|
|
4
|
+
import { COMPONENT_NAME as h } from "./constants.js";
|
|
5
|
+
import { RadioGroupVariant as L } from "./RadioGroup.types.js";
|
|
6
|
+
import { RadioGroupStyled as _, RadioLayoutStyled as q } from "./RadioGroupStyled.js";
|
|
7
|
+
import { spacing as f } from "../../../tokens/spacing.js";
|
|
8
|
+
import { RadioGroupItem as p } from "./RadioGroupItem/RadioGroupItem.js";
|
|
9
|
+
import { useTheme as z } from "../../../hooks/useTheme/useTheme.js";
|
|
10
|
+
import { InputRole as B } from "../../../types/input.js";
|
|
11
|
+
import { Column as F } from "../../layout/Column/Column.js";
|
|
12
|
+
const J = W(($, R) => {
|
|
13
|
+
const {
|
|
14
|
+
styles: C,
|
|
15
|
+
options: w,
|
|
16
|
+
variant: v = L.Row,
|
|
17
|
+
value: d,
|
|
18
|
+
defaultValue: G,
|
|
19
|
+
onChange: s,
|
|
20
|
+
name: y,
|
|
21
|
+
itemHeight: l,
|
|
22
|
+
itemWidth: m,
|
|
23
|
+
gutter: I = f.sm,
|
|
24
|
+
gridColumns: b,
|
|
25
|
+
gridRows: N,
|
|
26
|
+
gridColumnGutter: k,
|
|
27
|
+
gridRowGutter: S,
|
|
28
|
+
renderOption: n,
|
|
29
|
+
className: V,
|
|
30
|
+
align: j,
|
|
31
|
+
justify: O,
|
|
32
|
+
wrapItems: x
|
|
33
|
+
} = $, {
|
|
34
|
+
theme: u
|
|
35
|
+
} = z(), E = A(), i = y ?? `radio-group-${E}`, [M, P] = D(G), o = d !== void 0, c = o ? d : M, T = H((e) => {
|
|
36
|
+
const t = o ? s : P;
|
|
37
|
+
t == null || t(e);
|
|
38
|
+
}, [o, s]), g = (e) => {
|
|
39
|
+
e.disabled || T(e.value);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ r(_, { ref: R, role: B.Radiogroup, theme: u, styles: C, "data-testid": h, className: V, children: /* @__PURE__ */ r(F, { gutter: f.sm, children: /* @__PURE__ */ r(q, { theme: u, $variant: v, $isWrap: x, $align: j, $justify: O, $gutter: I, $gridColumns: b, $gridRows: N, $gridColumnGutter: k, $gridRowGutter: S, children: w.map((e) => {
|
|
42
|
+
const t = c === e.value, a = e.disabled;
|
|
43
|
+
return n ? /* @__PURE__ */ r(p, { name: i, selected: t, disabled: a, item: e, width: m, height: l, onClick: () => g(e), children: n({
|
|
44
|
+
option: e,
|
|
45
|
+
isSelected: t,
|
|
46
|
+
isDisabled: a,
|
|
47
|
+
selectedValue: c
|
|
48
|
+
}) }, `${i}-${e.value}`) : /* @__PURE__ */ r(p, { name: i, selected: t, disabled: a, item: e, width: m, height: l, onClick: () => g(e) }, `${i}-${e.value}`);
|
|
49
|
+
}) }) }) });
|
|
50
|
+
});
|
|
51
|
+
J.displayName = h;
|
|
52
|
+
export {
|
|
53
|
+
J as RadioGroup
|
|
54
|
+
};
|