gd-design-library 0.3.4 → 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.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/index.js +351 -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/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,4 @@
|
|
|
1
|
-
|
|
1
|
+
var e = /* @__PURE__ */ ((r) => (r.Row = "row", r.Column = "column", r.Grid = "grid", r))(e || {});
|
|
2
|
+
export {
|
|
3
|
+
e as RadioGroupVariant
|
|
4
|
+
};
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as v } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { TooltipPosition as k } from "../../../core/Tooltip/Tooltip.types.js";
|
|
4
|
+
import { ITEM_COMPONENT_NAME as p } from "../constants.js";
|
|
5
|
+
import { RadioItemStyled as c, HiddenInputStyled as f, RadioLabelStyled as g } from "../RadioGroupStyled.js";
|
|
6
|
+
import m from "../../../core/Tooltip/Tooltip.js";
|
|
7
|
+
import { useTheme as C } from "../../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
const T = ({
|
|
9
|
+
item: o,
|
|
10
|
+
selected: t,
|
|
11
|
+
disabled: a,
|
|
12
|
+
width: u,
|
|
13
|
+
height: $,
|
|
14
|
+
name: e,
|
|
15
|
+
onClick: x,
|
|
16
|
+
children: n,
|
|
17
|
+
styles: l
|
|
18
|
+
}) => {
|
|
19
|
+
const {
|
|
20
|
+
theme: r
|
|
21
|
+
} = C(), h = () => {
|
|
22
|
+
a || x(o.value);
|
|
23
|
+
};
|
|
24
|
+
return o.tooltip ? /* @__PURE__ */ i(m, { content: o.tooltip, position: k.Top, styles: {}, children: /* @__PURE__ */ v(c, { selected: t, disabled: a, theme: r, $hex: o.hex, $image: o.image, $height: u, $width: $, "data-testid": `${p}-${o.value}`, onClick: h, styles: l, children: [
|
|
25
|
+
/* @__PURE__ */ i(f, { name: e, theme: r, "data-testid": `${p}-input-${o.value}`, "aria-checked": t, "aria-disabled": a, value: o.value, checked: t, disabled: a, onChange: h }),
|
|
26
|
+
n && n,
|
|
27
|
+
!n && /* @__PURE__ */ i(g, { theme: r, selected: t, disabled: a, children: o.label })
|
|
28
|
+
] }) }) : /* @__PURE__ */ v(c, { selected: t, disabled: a, theme: r, $hex: o.hex, $image: o.image, $height: u, $width: $, "data-testid": `${p}-${o.value}`, onClick: h, styles: l, children: [
|
|
29
|
+
/* @__PURE__ */ i(f, { name: e, theme: r, value: o.value, checked: t, disabled: a, "data-testid": `${p}-input-${o.value}`, onChange: h, "aria-checked": t, "aria-disabled": a }),
|
|
30
|
+
n && n,
|
|
31
|
+
!n && /* @__PURE__ */ i(g, { theme: r, selected: t, disabled: a, children: o.label })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
T.displayName = p;
|
|
35
|
+
export {
|
|
36
|
+
T as RadioGroupItem
|
|
37
|
+
};
|
|
@@ -1 +1,130 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as $ } from "react";
|
|
4
|
+
import { getBoxStyles as G } from "../../../tokens/utils.js";
|
|
5
|
+
import { RadioGroupVariant as R } from "./RadioGroup.types.js";
|
|
6
|
+
import { calculateGutter as b, calculateGridRows as w, calculateGridColumns as v, calculateJustify as k, calculateAlign as x } from "../../../utils/layout.js";
|
|
7
|
+
import { get as s } from "../../../utils/helpers.js";
|
|
8
|
+
const A = (r) => {
|
|
9
|
+
const {
|
|
10
|
+
theme: {
|
|
11
|
+
radiogroup: t
|
|
12
|
+
} = {},
|
|
13
|
+
...e
|
|
14
|
+
} = r, o = {
|
|
15
|
+
...s(t, "input", {})
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ c("input", { type: "radio", css: o, ...e });
|
|
18
|
+
}, B = $((r, t) => {
|
|
19
|
+
const {
|
|
20
|
+
theme: {
|
|
21
|
+
radiogroup: e
|
|
22
|
+
} = {},
|
|
23
|
+
styles: o = {},
|
|
24
|
+
...a
|
|
25
|
+
} = r, l = {
|
|
26
|
+
...s(e, "default", {}),
|
|
27
|
+
...o
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ c("fieldset", { ref: t, css: l, ...a });
|
|
30
|
+
}), H = (r) => {
|
|
31
|
+
const {
|
|
32
|
+
theme: {
|
|
33
|
+
radiogroup: t
|
|
34
|
+
} = {},
|
|
35
|
+
disabled: e,
|
|
36
|
+
selected: o,
|
|
37
|
+
$hex: a,
|
|
38
|
+
$width: l,
|
|
39
|
+
$height: d,
|
|
40
|
+
$image: i,
|
|
41
|
+
styles: n = {},
|
|
42
|
+
...m
|
|
43
|
+
} = r, p = s(t, "item.selected", {}), g = s(t, "item.disabled", {}), u = s(t, "item.hover", {}), y = a ? {
|
|
44
|
+
backgroundColor: a
|
|
45
|
+
} : {}, f = i ? {
|
|
46
|
+
backgroundImage: `url(${i})`,
|
|
47
|
+
backgroundPosition: "center",
|
|
48
|
+
backgroundRepeat: "no-repeat"
|
|
49
|
+
} : {}, S = {
|
|
50
|
+
...s(t, "item.default", {}),
|
|
51
|
+
...e ? g : {},
|
|
52
|
+
...o ? p : {},
|
|
53
|
+
...y,
|
|
54
|
+
...f,
|
|
55
|
+
...l ? {
|
|
56
|
+
width: l
|
|
57
|
+
} : {},
|
|
58
|
+
...d ? {
|
|
59
|
+
height: d
|
|
60
|
+
} : {},
|
|
61
|
+
...!e && !o ? u : {},
|
|
62
|
+
...n
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ c("div", { css: S, ...m });
|
|
65
|
+
}, J = (r) => {
|
|
66
|
+
const {
|
|
67
|
+
theme: {
|
|
68
|
+
radiogroup: t
|
|
69
|
+
} = {},
|
|
70
|
+
selected: e,
|
|
71
|
+
disabled: o,
|
|
72
|
+
...a
|
|
73
|
+
} = r, l = s(t, "label.selected", {}), d = s(t, "label.disabled", {}), i = s(t, "label.hover", {}), n = {
|
|
74
|
+
...s(t, "label.default", {}),
|
|
75
|
+
...o ? d : {},
|
|
76
|
+
...e ? l : {},
|
|
77
|
+
...!o && !e ? i : {}
|
|
78
|
+
};
|
|
79
|
+
return /* @__PURE__ */ c("label", { css: n, ...a });
|
|
80
|
+
}, P = (r) => {
|
|
81
|
+
const {
|
|
82
|
+
theme: {
|
|
83
|
+
radiogroup: t
|
|
84
|
+
} = {},
|
|
85
|
+
$isWrap: e,
|
|
86
|
+
$align: o = "start",
|
|
87
|
+
$justify: a = "start",
|
|
88
|
+
$variant: l,
|
|
89
|
+
$gutter: d,
|
|
90
|
+
$gridColumns: i,
|
|
91
|
+
$gridRows: n,
|
|
92
|
+
$gridColumnGutter: m,
|
|
93
|
+
$gridRowGutter: p,
|
|
94
|
+
styles: g,
|
|
95
|
+
...u
|
|
96
|
+
} = r, y = {
|
|
97
|
+
...s(t, `layouts.${l}`, {}),
|
|
98
|
+
...G(u).boxStyles,
|
|
99
|
+
gap: b(d),
|
|
100
|
+
...g
|
|
101
|
+
};
|
|
102
|
+
if (l === R.Grid) {
|
|
103
|
+
const h = {
|
|
104
|
+
...y,
|
|
105
|
+
gridTemplateColumns: v(i),
|
|
106
|
+
gridTemplateRows: w(n),
|
|
107
|
+
...m && {
|
|
108
|
+
columnGap: b(m)
|
|
109
|
+
},
|
|
110
|
+
...p && {
|
|
111
|
+
rowGap: b(p)
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ c("div", { css: h, ...u });
|
|
115
|
+
}
|
|
116
|
+
const S = {
|
|
117
|
+
...y,
|
|
118
|
+
flexWrap: e ? "wrap" : "nowrap",
|
|
119
|
+
alignItems: x(o),
|
|
120
|
+
justifyContent: k(a)
|
|
121
|
+
};
|
|
122
|
+
return /* @__PURE__ */ c("div", { css: S, ...u });
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
A as HiddenInputStyled,
|
|
126
|
+
B as RadioGroupStyled,
|
|
127
|
+
H as RadioItemStyled,
|
|
128
|
+
J as RadioLabelStyled,
|
|
129
|
+
P as RadioLayoutStyled
|
|
130
|
+
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
const o = "RadioGroup", N = "RadioGroupItem";
|
|
2
|
+
export {
|
|
3
|
+
o as COMPONENT_NAME,
|
|
4
|
+
N as ITEM_COMPONENT_NAME
|
|
5
|
+
};
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _, jsx as i } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as w, useState as L } from "react";
|
|
4
|
+
import { DEFAULT_VALUE as H, COMPONENT_NAME as e, DEFAULT_READ_ONLY as z, DEFAULT_MAX_RATE as K, DEFAULT_SIZE as Y, DEFAULT_SIZE_VALUE as R } from "./constants.js";
|
|
5
|
+
import { RatingStyled as j, RatingProgressWrapperStyled as Z, RadioLabelStyled as q, RadioInputStyled as B } from "./RatingStyled.js";
|
|
6
|
+
import { convertToFormattedPercents as W } from "../../../utils/math.js";
|
|
7
|
+
import { generateUniqueId as T } from "../../../utils/uniqueKeys.js";
|
|
8
|
+
import { useTheme as X } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { get as o } from "../../../utils/helpers.js";
|
|
10
|
+
import { Icon as V } from "../../core/Icon/Icon.js";
|
|
11
|
+
import { TabIndex as G } from "../../../types/accesability.js";
|
|
12
|
+
import { KEYBOARD_KEYS as J } from "../../../constants/keyboard.js";
|
|
13
|
+
const Q = w(($, I) => {
|
|
14
|
+
const {
|
|
15
|
+
value: l = H,
|
|
16
|
+
groupName: C = e,
|
|
17
|
+
onChange: m,
|
|
18
|
+
readOnly: t = z,
|
|
19
|
+
max: u = K,
|
|
20
|
+
size: D = Y,
|
|
21
|
+
...S
|
|
22
|
+
} = $, {
|
|
23
|
+
theme: s
|
|
24
|
+
} = X(), [b, O] = L(l), [f, g] = L(0), h = m ? l : b, p = o(s, "rating", {}), E = o(p, ["size", D], {
|
|
25
|
+
width: R,
|
|
26
|
+
height: R
|
|
27
|
+
}), c = o(p, "icons", {}), A = Array.from({
|
|
28
|
+
length: u
|
|
29
|
+
}), U = W({
|
|
30
|
+
max: u,
|
|
31
|
+
target: l,
|
|
32
|
+
formatChar: "%"
|
|
33
|
+
}), y = (r) => {
|
|
34
|
+
if (t) return;
|
|
35
|
+
(m || O)(r);
|
|
36
|
+
}, M = (r, a) => {
|
|
37
|
+
t || r.key !== J.ENTER || y(a);
|
|
38
|
+
}, N = (r) => {
|
|
39
|
+
t || g(r);
|
|
40
|
+
}, F = () => {
|
|
41
|
+
g(0);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ _(j, { $readOnly: t, ref: I, theme: s, "data-testid": e, ...S, children: [
|
|
44
|
+
t && /* @__PURE__ */ i(Z, { theme: s, $width: U, "data-testid": `${e}-progress`, children: A.map((r, a) => /* @__PURE__ */ i(V, { fill: "bg.fill.primary.default", ...o(c, "rateActive", {
|
|
45
|
+
name: "star"
|
|
46
|
+
}), ...E }, T(`${e}-${a}`, "rate-progress"))) }),
|
|
47
|
+
A.map((r, a) => {
|
|
48
|
+
const n = a + 1, v = n === h, d = n <= (f !== 0 ? f : h), x = d ? o(c, "rateActive", {
|
|
49
|
+
name: "star"
|
|
50
|
+
}) : o(c, "rateInactive", {
|
|
51
|
+
name: "starOutlined"
|
|
52
|
+
}), P = d ? "bg.fill.primary.default" : "bg.fill.disabled";
|
|
53
|
+
return /* @__PURE__ */ _(q, { $isActive: d, $readOnly: t, theme: s, onKeyDown: (k) => M(k, n), tabIndex: G.Default, onMouseEnter: () => N(n), onMouseLeave: F, "data-testid": `${e}-label`, children: [
|
|
54
|
+
/* @__PURE__ */ i(B, { name: C, theme: s, value: n, onChange: () => y(n), defaultChecked: v, "aria-checked": v, readOnly: t, "data-testid": `${e}-input` }),
|
|
55
|
+
/* @__PURE__ */ i(V, { fill: P, ...E, ...x })
|
|
56
|
+
] }, T(`${e}-${a}`, "rate"));
|
|
57
|
+
})
|
|
58
|
+
] });
|
|
59
|
+
});
|
|
60
|
+
Q.displayName = e;
|
|
61
|
+
export {
|
|
62
|
+
Q as Rating
|
|
63
|
+
};
|
|
@@ -1 +1,61 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as l } from "react";
|
|
4
|
+
import { get as e } from "../../../utils/helpers.js";
|
|
5
|
+
const m = l((s, r) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: {
|
|
8
|
+
rating: t
|
|
9
|
+
} = {},
|
|
10
|
+
$readOnly: n,
|
|
11
|
+
styles: o = {},
|
|
12
|
+
...c
|
|
13
|
+
} = s, a = {
|
|
14
|
+
...e(t, "default", {}),
|
|
15
|
+
...n ? e(t, "readOnly", {}) : {},
|
|
16
|
+
...o
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ d("div", { ref: r, css: a, ...c });
|
|
19
|
+
}), y = (s) => {
|
|
20
|
+
const {
|
|
21
|
+
theme: {
|
|
22
|
+
rating: r
|
|
23
|
+
} = {},
|
|
24
|
+
$width: t,
|
|
25
|
+
...n
|
|
26
|
+
} = s, o = {
|
|
27
|
+
...e(r, "progress.default", {}),
|
|
28
|
+
width: t
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ d("div", { css: o, ...n });
|
|
31
|
+
}, f = (s) => {
|
|
32
|
+
const {
|
|
33
|
+
theme: {
|
|
34
|
+
rating: r
|
|
35
|
+
} = {},
|
|
36
|
+
$readOnly: t,
|
|
37
|
+
$isActive: n,
|
|
38
|
+
...o
|
|
39
|
+
} = s, c = e(r, "label", {}), a = {
|
|
40
|
+
...e(c, "default", {}),
|
|
41
|
+
...t ? e(c, "readOnly", {}) : {},
|
|
42
|
+
...n ? e(c, "active", {}) : {}
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ d("label", { css: a, ...o });
|
|
45
|
+
}, g = (s) => {
|
|
46
|
+
const {
|
|
47
|
+
theme: {
|
|
48
|
+
rating: r
|
|
49
|
+
} = {},
|
|
50
|
+
...t
|
|
51
|
+
} = s, n = {
|
|
52
|
+
...e(r, "radioInput.default", {})
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ d("input", { type: "radio", css: n, ...t });
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
g as RadioInputStyled,
|
|
58
|
+
f as RadioLabelStyled,
|
|
59
|
+
y as RatingProgressWrapperStyled,
|
|
60
|
+
m as RatingStyled
|
|
61
|
+
};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
const E = "Rating", A = 5, _ = "md", t = 24, L = 0, n = !1;
|
|
2
|
+
export {
|
|
3
|
+
E as COMPONENT_NAME,
|
|
4
|
+
A as DEFAULT_MAX_RATE,
|
|
5
|
+
n as DEFAULT_READ_ONLY,
|
|
6
|
+
_ as DEFAULT_SIZE,
|
|
7
|
+
t as DEFAULT_SIZE_VALUE,
|
|
8
|
+
L as DEFAULT_VALUE
|
|
9
|
+
};
|
|
@@ -1 +1,58 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as I, useRef as P, useCallback as c } from "react";
|
|
4
|
+
import { DEFAULT_EMPTY_SEARCH_RESULTS_PLACEHOLDER as g, DEFAULT_SEARCH_PLACEHOLDER as x, DEFAULT_SEARCH_WIDTH as N, COMPONENT_NAME as R } from "./constants.js";
|
|
5
|
+
import { SearchInputStyled as U } from "./SearchStyled.js";
|
|
6
|
+
import { Select as F } from "../../core/Select/Select.js";
|
|
7
|
+
import { get as E } from "../../../utils/helpers.js";
|
|
8
|
+
import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { InputRole as b } from "../../../types/input.js";
|
|
10
|
+
const y = I((u, j) => {
|
|
11
|
+
var m, l;
|
|
12
|
+
const {
|
|
13
|
+
children: h,
|
|
14
|
+
emptyItemsResult: f = g,
|
|
15
|
+
placeholder: C = x,
|
|
16
|
+
renderOption: S,
|
|
17
|
+
dropdownParams: A,
|
|
18
|
+
renderDropdownHeader: O,
|
|
19
|
+
onType: i,
|
|
20
|
+
onSelectCb: a,
|
|
21
|
+
value: _,
|
|
22
|
+
width: L = N,
|
|
23
|
+
items: D
|
|
24
|
+
} = u, H = E(u, "aria-controls"), r = P(null), {
|
|
25
|
+
theme: T
|
|
26
|
+
} = M(), v = c((t) => {
|
|
27
|
+
var o, p, n, d;
|
|
28
|
+
const e = E(t, "target.value");
|
|
29
|
+
if (!e) {
|
|
30
|
+
(p = (o = r == null ? void 0 : r.current) == null ? void 0 : o.close) == null || p.call(o);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
(d = (n = r == null ? void 0 : r.current) == null ? void 0 : n.open) == null || d.call(n), i == null || i(e);
|
|
34
|
+
}, [r]), w = c(({
|
|
35
|
+
event: t,
|
|
36
|
+
value: e,
|
|
37
|
+
index: o
|
|
38
|
+
}) => {
|
|
39
|
+
a == null || a({
|
|
40
|
+
event: t,
|
|
41
|
+
value: e,
|
|
42
|
+
index: o
|
|
43
|
+
});
|
|
44
|
+
}, [a]);
|
|
45
|
+
return /* @__PURE__ */ s(F, { ref: r, width: L, autoOpen: !1, emptyItemsResult: f, dropdownParams: A, renderDropdownHeader: O, renderOption: S, items: D, initiator: /* @__PURE__ */ s(U, { value: _, onChange: v, "aria-required": !!((m = r == null ? void 0 : r.current) != null && m.isOpen), "aria-controls": H, "aria-expanded": !!((l = r == null ? void 0 : r.current) != null && l.isOpen), placeholder: C, theme: T, role: b.Combobox }), onSelect: ({
|
|
46
|
+
event: t,
|
|
47
|
+
value: e,
|
|
48
|
+
index: o
|
|
49
|
+
}) => w({
|
|
50
|
+
event: t,
|
|
51
|
+
value: e,
|
|
52
|
+
index: o
|
|
53
|
+
}), children: h });
|
|
54
|
+
});
|
|
55
|
+
y.displayName = R;
|
|
56
|
+
export {
|
|
57
|
+
y as Search
|
|
58
|
+
};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { Input as s } from "../../core/Input/Input.js";
|
|
4
|
+
import { get as p } from "../../../utils/helpers.js";
|
|
5
|
+
const u = (t) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: {
|
|
8
|
+
search: r
|
|
9
|
+
} = {},
|
|
10
|
+
...e
|
|
11
|
+
} = t;
|
|
12
|
+
return /* @__PURE__ */ o(s, { css: [p(r, "input.default", {})], ...e });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
u as SearchInputStyled
|
|
16
|
+
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const E = "Search", A = "Search", _ = "448px", L = "No result";
|
|
2
|
+
export {
|
|
3
|
+
E as COMPONENT_NAME,
|
|
4
|
+
L as DEFAULT_EMPTY_SEARCH_RESULTS_PLACEHOLDER,
|
|
5
|
+
A as DEFAULT_SEARCH_PLACEHOLDER,
|
|
6
|
+
_ as DEFAULT_SEARCH_WIDTH
|
|
7
|
+
};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { DEFAULT_PLACEHOLDER as s, DEFAULT_CLOSE_ICON as d, COMPONENT_NAME as n } from "./constants.js";
|
|
4
|
+
import { SearchInputStyled as l, SearchEndIconWrapperStyled as h } from "./SearchInputStyled.js";
|
|
5
|
+
import { useTheme as E } from "../../../../hooks/useTheme/useTheme.js";
|
|
6
|
+
import { get as f } from "../../../../utils/helpers.js";
|
|
7
|
+
import { InputVariantType as u } from "../../../../types/input.js";
|
|
8
|
+
import { Icon as I } from "../../../core/Icon/Icon.js";
|
|
9
|
+
const S = (a = {}) => {
|
|
10
|
+
const {
|
|
11
|
+
placeholder: c = s,
|
|
12
|
+
onEndIconClick: o,
|
|
13
|
+
...p
|
|
14
|
+
} = a, {
|
|
15
|
+
theme: r
|
|
16
|
+
} = E(), m = f(r, "searchModal.input.icons.close", {
|
|
17
|
+
name: d
|
|
18
|
+
}), i = (e) => {
|
|
19
|
+
e.stopPropagation(), o == null || o(e);
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ t(l, { theme: r, variant: u.Search, "data-testid": n, placeholder: c, adornmentEnd: /* @__PURE__ */ t(h, { theme: r, onClick: i, children: /* @__PURE__ */ t(I, { ...m }) }), ...p });
|
|
22
|
+
};
|
|
23
|
+
S.displayName = n;
|
|
24
|
+
export {
|
|
25
|
+
S as SearchInput
|
|
26
|
+
};
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { get as n } from "../../../../utils/helpers.js";
|
|
4
|
+
import { Input as c } from "../../../core/Input/Input.js";
|
|
5
|
+
const u = (t) => {
|
|
6
|
+
const {
|
|
7
|
+
theme: {
|
|
8
|
+
searchModal: e
|
|
9
|
+
} = {},
|
|
10
|
+
...o
|
|
11
|
+
} = t, r = n(e, "input.default", {});
|
|
12
|
+
return /* @__PURE__ */ s(c, { styles: r, ...o });
|
|
13
|
+
}, l = (t) => {
|
|
14
|
+
const {
|
|
15
|
+
theme: {
|
|
16
|
+
searchModal: e
|
|
17
|
+
} = {},
|
|
18
|
+
...o
|
|
19
|
+
} = t, r = n(e, "input.endIcon", {});
|
|
20
|
+
return /* @__PURE__ */ s("div", { css: r, ...o });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
l as SearchEndIconWrapperStyled,
|
|
24
|
+
u as SearchInputStyled
|
|
25
|
+
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const E = "SearchInput", c = "Search", o = "cross";
|
|
2
|
+
export {
|
|
3
|
+
E as COMPONENT_NAME,
|
|
4
|
+
o as DEFAULT_CLOSE_ICON,
|
|
5
|
+
c as DEFAULT_PLACEHOLDER
|
|
6
|
+
};
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as n, jsx as o } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { Fragment as u } from "react";
|
|
4
|
+
import { NEW_CHAT_ICON as f, NO_RESULTS_ICON as y, COMPONENT_NAME as N, COMPONENT_GROUP_TITLE as P, COMPONENT_ITEM_NAME as l, COMPONENT_EMPTY_NAME as $, NEW_SEARCH as R } from "./constants.js";
|
|
5
|
+
import { getIcon as m } from "./utils.js";
|
|
6
|
+
import { SearchItemsStyled as w, NewSearchButtonStyled as A, SearchGroupTitleStyled as g, SearchNoItemsStyled as G, SearchItemStyled as v, SearchItemRowStyled as L, SearchItemColumnStyled as j, SearchItemContentStyled as d } from "./SearchItemsStyled.js";
|
|
7
|
+
import { formatDate as k } from "../../../../utils/date.js";
|
|
8
|
+
import { useTheme as x } from "../../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { get as h } from "../../../../utils/helpers.js";
|
|
10
|
+
import { Icon as S } from "../../../core/Icon/Icon.js";
|
|
11
|
+
const H = (I = {}) => {
|
|
12
|
+
const {
|
|
13
|
+
items: c,
|
|
14
|
+
onItemClick: a,
|
|
15
|
+
newSearchCta: s,
|
|
16
|
+
noItemsLabel: C
|
|
17
|
+
} = I, {
|
|
18
|
+
theme: r
|
|
19
|
+
} = x(), E = h(r, "searchModal.items.icons.newChat", {
|
|
20
|
+
name: f
|
|
21
|
+
}), T = h(r, "searchModal.items.icons.noResults", {
|
|
22
|
+
name: y
|
|
23
|
+
}), M = h(r, "searchModal.items.icons.item", {}), i = (t) => (e) => {
|
|
24
|
+
a == null || a(e, t);
|
|
25
|
+
}, p = (t, e) => /* @__PURE__ */ o(v, { iconStart: m(t == null ? void 0 : t.icon, M), theme: r, onClick: i(t), "data-testid": l, children: /* @__PURE__ */ n(L, { theme: r, children: [
|
|
26
|
+
/* @__PURE__ */ n(j, { theme: r, children: [
|
|
27
|
+
/* @__PURE__ */ o(d, { theme: r, $variant: "title", title: t.title, children: t.title }),
|
|
28
|
+
(t == null ? void 0 : t.description) && /* @__PURE__ */ o(d, { theme: r, $variant: "description", title: t.description, children: t.description })
|
|
29
|
+
] }),
|
|
30
|
+
(t == null ? void 0 : t.date) && /* @__PURE__ */ o(d, { theme: r, $variant: "date", children: k({
|
|
31
|
+
date: t.date
|
|
32
|
+
}) })
|
|
33
|
+
] }) }, (t == null ? void 0 : t.id) || `${l}-${e}`);
|
|
34
|
+
return /* @__PURE__ */ n(w, { theme: r, "data-testid": N, children: [
|
|
35
|
+
s && /* @__PURE__ */ o(A, { theme: r, onClick: i(R), iconStart: /* @__PURE__ */ o(S, { ...E }), children: s }),
|
|
36
|
+
c != null && c.length ? c.map((t, e) => "items" in t ? /* @__PURE__ */ n(u, { children: [
|
|
37
|
+
/* @__PURE__ */ o(g, { theme: r, "data-testid": P, title: t.title, children: t.title }),
|
|
38
|
+
((t == null ? void 0 : t.items) || []).map((O, _) => p(O, _))
|
|
39
|
+
] }, (t == null ? void 0 : t.id) || `${l}-${e}`) : p(t, e)) : /* @__PURE__ */ n(G, { theme: r, "data-testid": $, children: [
|
|
40
|
+
!s && /* @__PURE__ */ o(S, { ...T }),
|
|
41
|
+
C
|
|
42
|
+
] })
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
45
|
+
H.displayName = N;
|
|
46
|
+
export {
|
|
47
|
+
H as SearchItems
|
|
48
|
+
};
|